Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
sequencelengths
0
101
negative_scores
sequencelengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
rewrite this! pan + zoom function
function initPanZoom() { var panZoom = map.paper.panzoom(); panZoom.enable() setInterval(function() { $('h1').html(panZoom.currZoom +' x:'+panZoom.currPos.x.toFixed(0)+' y:'+panZoom.currPos.y.toFixed(0)); }, 50); var css = '<style type="text/css">.grabbing { cursor: url(data:image/x-icon;base64,AAACAAEAICACAAcABQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAAAEAAAAAAAAAAAAAAgAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8AAAA/AAAAfwAAAP+AAAH/gAAB/8AAAH/AAAB/wAAA/0AAANsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////////////////////////////////////////////////////////////////gH///4B///8Af//+AD///AA///wAH//+AB///wAf//4AH//+AD///yT/////////////////////////////8=), pointer !important; } .map-controls div { cursor:pointer; font-size: 20px; color: #777; font-weight:bold; font-family: Helvetica; line-height: 28px; text-align:center;border: 1px solid #bbb; } .map-controls div:hover { border: 1px solid #999; color: #000; }</style>'; $('body').append(css); // init pan zoom controls var ctrls = $('<div />'), up = $('<div>+</div>'), down = $('<div>-</div>'); ctrls .addClass('map-controls') .css({ position: 'relative', top: -80, left: 30, 'z-index': 1000 }) .append(up).append(down); up.css({ 'border-radius': '14px 14px 0 0', width: 28, height: 28, position: 'absolute', top: 0, left: 0, background: '#fff' }); down.css({ 'border-radius': '0 0 14px 14px', width: 28, height: 28, position: 'absolute', top: 29, left: 0, background: '#fff' }) $('#map').parent().append(ctrls); up.click(function (e) { panZoom.zoomIn(1); e.preventDefault(); }); down.click(function (e) { panZoom.zoomOut(1); e.preventDefault(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function zoom(){\n\t//NOT YET\n\t/*var rect = canvas.getBoundingClientRect();\n var mx = panX + (panX - rect.left) / zooms;\n var my = panY + (panY - rect.top) / zooms;\n zooms = document.getElementById(\"za\");\n panX = mx - ((panX - rect.left) / zooms);\n panY = my - ((panY - rect.top) / zooms);\n */\n zooms = document.getElementById(\"za\").value; \n mx = ((panX + (a-1)/zooms) - panX) / 2;\n panX -= mx;\n my = ((panY + (b-1)/zooms) - panY) / 2;\n panY -= mx;\n \n show();\n abortRun();\n startRun();\n}", "zoomIn () {}", "function wheelPanZoom( event ) {\n event = event.originalEvent;\n if ( event.deltaX === 0 && event.deltaY === 0 )\n return false;\n event.preventDefault();\n if ( event.shiftKey )\n return zoom( event.deltaX+event.deltaY > 0 ? 1 : -1, selectedCenter() );\n else {\n var x=0, y=0;\n if ( Math.abs(event.deltaX) > Math.abs(event.deltaY) )\n x = event.deltaX > 0 ? -0.02 : 0.02;\n else\n y = event.deltaY > 0 ? -0.02 : 0.02;\n return pan(x,y);\n }\n }", "onMinimapPanTo(event) {\n let x = event.offsetX - (this.dims.width - (this.graphDims.width + this.minimapOffsetX) / this.minimapScaleCoefficient);\n let y = event.offsetY + this.minimapOffsetY / this.minimapScaleCoefficient;\n this.panTo(x * this.minimapScaleCoefficient, y * this.minimapScaleCoefficient);\n this.isMinimapPanning = true;\n }", "function pan( dx, dy ) {\n //console.log('called pan dx='+dx+' dy='+dy);\n //boxX0 -= dx * boxW ;\n //boxY0 -= dy * boxH ;\n var S = boxW < boxH ? boxW : boxH;\n boxX0 -= dx * S ;\n boxY0 -= dy * S ;\n viewBoxLimits();\n svgRoot.setAttribute( 'viewBox', boxX0+' '+boxY0+' '+boxW+' '+boxH );\n for ( var k=0; k<self.cfg.onPanZoomChange.length; k++ )\n self.cfg.onPanZoomChange[k](boxW,boxH);\n return false;\n }", "function pan() {\n\t\tvar range = 0.12,\n\t\t\trangeX = window.innerWidth * range,\n\t\t\trangeY = window.innerHeight * range,\n\t\t\tscrollOffset = getScrollOffset();\n\n\t\t// Up\n\t\tif( mouseY < rangeY ) {\n\t\t\twindow.scroll( scrollOffset.x, scrollOffset.y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) );\n\t\t}\n\t\t// Down\n\t\telse if( mouseY > window.innerHeight - rangeY ) {\n\t\t\twindow.scroll( scrollOffset.x, scrollOffset.y + ( 1 - ( window.innerHeight - mouseY ) / rangeY ) * ( 14 / level ) );\n\t\t}\n\n\t\t// Left\n\t\tif( mouseX < rangeX ) {\n\t\t\twindow.scroll( scrollOffset.x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ), scrollOffset.y );\n\t\t}\n\t\t// Right\n\t\telse if( mouseX > window.innerWidth - rangeX ) {\n\t\t\twindow.scroll( scrollOffset.x + ( 1 - ( window.innerWidth - mouseX ) / rangeX ) * ( 14 / level ), scrollOffset.y );\n\t\t}\n\t}", "zoomIn(x, y){ return this.zoom(x, y, this.Scale.current + this.Scale.factor) }", "function ZoomableView() { }", "recenter() {\n this.pan = {\n x: 0,\n y: 0\n };\n this.zoom = 1;\n }", "_animatePanZoomEvent() {\n var event = this._lastPanZoomEvent;\n this._lastPanZoomEvent = null; // nullify to indicate that the event has been processed\n\n var subtype = event.subtype;\n var actionDone = subtype === 'panEnd' || subtype === 'zoom' || subtype === 'pinchEnd';\n\n // Calculate the bounds and update the viewport\n var bounds;\n if (DvtChartBehaviorUtils.isLiveScroll(this)) {\n // live\n bounds = DvtChartEventUtils.getAxisBoundsByDelta(\n this,\n event.dxMin,\n event.dxMax,\n event.dyMin,\n event.dyMax\n );\n this._setScrollbarViewport(bounds);\n this._setViewport(bounds, actionDone);\n } else {\n // delayed\n bounds = DvtChartEventUtils.getAxisBoundsByDelta(\n this,\n event.dxMinTotal,\n event.dxMaxTotal,\n event.dyMinTotal,\n event.dyMaxTotal\n );\n this._setScrollbarViewport(bounds); // always update the scrollbars\n if (actionDone) this._setViewport(bounds, actionDone);\n }\n\n if (actionDone) {\n // Event handlers have to be reset because the plot area space may change\n DvtChartRenderer._setEventHandlers(this);\n\n // Clear the touch target, if there's one\n if (this._panZoomTarget != this._plotArea) {\n this._container.removeChild(this._panZoomTarget);\n this._panZoomTarget = null;\n }\n }\n\n // Fire viewport change event\n if (actionDone || !bounds.unchanged) {\n var viewportChangeEvent;\n if (DvtChartTypeUtils.isBLAC(this))\n viewportChangeEvent = dvt.EventFactory.newChartViewportChangeEvent(\n actionDone,\n bounds.xMin,\n bounds.xMax,\n bounds.startGroup,\n bounds.endGroup,\n null,\n null\n );\n else\n viewportChangeEvent = dvt.EventFactory.newChartViewportChangeEvent(\n actionDone,\n bounds.xMin,\n bounds.xMax,\n null,\n null,\n bounds.yMin,\n bounds.yMax\n );\n\n this.dispatchEvent(viewportChangeEvent);\n }\n }", "function zoomClick() {\n var direction = -1,\n factor = 0.2,\n target_zoom = 1,\n center = [mapWidth / 2, mapHeight / 2],\n extent = zoom.scaleExtent(),\n translate = zoom.translate(),\n translate_temp = [],\n l = [],\n view = {x: translate[0], y: translate[1], k: zoom.scale()};\n\n if (arguments[0] == 0) { zoomReset(); }\n else if (arguments[0] == 1) { direction = arguments[0]; }\n\n target_zoom = zoom.scale() * (1 + factor * direction);\n\n if (target_zoom < extent[0] || target_zoom > extent[1]) { return false; }\n\n translate_temp = [(center[0] - view.x) / view.k, (center[1] - view.y) / view.k];\n view.k = target_zoom;\n l = [translate_temp[0] * view.k + view.x, translate_temp[1] * view.k + view.y];\n\n view.x += center[0] - l[0];\n view.y += center[1] - l[1];\n\n interpolateZoom([view.x, view.y], view.k);\n}", "pan_view(offset, zoom = 0) {\n this.view.left += offset.left;\n this.view.top += offset.top;\n this.scale += zoom;\n const view = this.view.mul(2 ** this.scale);\n this.canvas.element.style.transform\n = `translate(${-view.left}px, ${-view.top}px) scale(${2 ** this.scale})`;\n this.update_grid();\n }", "function zoom(event) \r\n {\r\n\r\n let delta = Math.sign(event.deltaY);\r\n\r\n if (delta > 0)\r\n {\r\n if (width <= 240)\r\n width += scale;\r\n\r\n if (height <= 260)\r\n height += scale;\r\n }\r\n\r\n if (delta < 0)\r\n {\r\n if (width >= 40)\r\n width -= scale;\r\n\r\n if (height >= 60)\r\n height -= scale;\r\n }\r\n\r\n\r\n lens.style.width = width + \"px\";\r\n lens.style.height = height + \"px\";\r\n }", "function applyPanZoom(element) {\n\n if (panZoom != null)\n delete panZoom;\n\n panZoom = svgPanZoom(element, {\n panEnabled: true,\n zoomEnabled: true,\n dblClickZoomEnabled: false,\n controlIconsEnabled: true,\n center: true,\n fit: true,\n minZoom: 0,\n maxZoom: 9999\n });\n\n panZoom.resize();\n panZoom.fit();\n panZoom.center();\n panZoom.zoomOut();\n}", "function zoomed() {\n svgMap.attr(\"transform\",\n \"translate(\" + zoom.translate() + \")\" +\n \"scale(\" + zoom.scale() + \")\");\n svgMap.selectAll(\"circle\")\n .attr(\"d\", path.projection(projection))\n .attr(\"r\", circleRadius/zoom.scale());\n svgMap.selectAll(\"path\")\n .attr(\"d\", path.projection(projection));\n}", "function _zoomFractal(zoomin) {\n if (zoomin) {\n zoom *= _zoomFactor;\n const dx = -(Shape.mouse.x + offsetX + panX + 90 * _zoomFactor) / zoom * _zoomFactor;\n const dy = -(Shape.mouse.y + offsetY + panY + 50 * _zoomFactor) / zoom * _zoomFactor;\n panX += dx;\n panY += dy;\n } else {\n zoom /= _zoomFactor;\n const dx = -(Shape.mouse.x + offsetX - panX - 90 * _zoomFactor) / zoom;\n const dy = -(Shape.mouse.y + offsetY - panY - 50 * _zoomFactor) / zoom;\n panX += dx;\n panY += dy;\n }\n }", "function zoomed() {\n map.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n meteorites.attr('transform', 'translate(' + d3.event.translate + ')scale(' + d3.event.scale + ')');\n }", "zoomOut () {}", "function zoomFunction() {\n\t\tvar transform = d3.event.transform;\n\t\td3.select(\"#map_g\")\n\t\t.attr(\"transform\", \"translate(\" + transform.x + \",\" + transform.y + \") scale(\" + transform.k + \")\")\n\t}", "rezoom(foc_x=null, foc_y=null, abs=false) {\n // JQuery convenience\n var imwrap = jquery_default()(\"#\" + this.config[\"imwrap_id\"]);\n var annbox = jquery_default()(\"#\" + this.config[\"annbox_id\"]);\n\n if (foc_x == null) {\n foc_x = annbox.width()/2;\n }\n if (foc_y == null) {\n foc_y = annbox.height()/2;\n }\n\n // Get old size and position\n let old_width = imwrap.width();\n let old_height = imwrap.height();\n let old_left = annbox.scrollLeft();\n let old_top = annbox.scrollTop();\n if (abs) {\n old_width = this.config[\"image_width\"];\n old_height = this.config[\"image_height\"];\n }\n\n const viewport_width = annbox.width();\n const viewport_height = annbox.height();\n\n // Compute new size\n const new_width = Math.round(this.config[\"image_width\"]*this.state[\"zoom_val\"]);\n const new_height = Math.round(this.config[\"image_height\"]*this.state[\"zoom_val\"]);\n\n // Apply new size\n var toresize = jquery_default()(\".\" + this.config[\"imgsz_class\"]);\n toresize.css(\"width\", new_width + \"px\");\n toresize.css(\"height\", new_height + \"px\");\n\n // Compute and apply new position\n let new_left, new_top;\n if (abs) {\n new_left = foc_x*new_width/old_width - viewport_width/2;\n new_top = foc_y*new_height/old_height - viewport_height/2;\n }\n else {\n new_left = (old_left + foc_x)*new_width/old_width - foc_x;\n new_top = (old_top + foc_y)*new_height/old_height - foc_y;\n }\n annbox.scrollLeft(new_left);\n annbox.scrollTop(new_top);\n\n // Redraw demo annotation\n this.redraw_demo();\n }", "function zoomClipped(geo, projLayout) {\n\t var projection = geo.projection,\n\t view = {r: projection.rotate(), k: projection.scale()},\n\t zoom = initZoom(projection, projLayout),\n\t event = d3_eventDispatch(zoom, 'zoomstart', 'zoom', 'zoomend'),\n\t zooming = 0,\n\t zoomOn = zoom.on;\n\t\n\t var zoomPoint;\n\t\n\t zoom.on('zoomstart', function() {\n\t d3.select(this).style(zoomstartStyle);\n\t\n\t var mouse0 = d3.mouse(this),\n\t rotate0 = projection.rotate(),\n\t lastRotate = rotate0,\n\t translate0 = projection.translate(),\n\t q = quaternionFromEuler(rotate0);\n\t\n\t zoomPoint = position(projection, mouse0);\n\t\n\t zoomOn.call(zoom, 'zoom', function() {\n\t var mouse1 = d3.mouse(this);\n\t\n\t projection.scale(view.k = d3.event.scale);\n\t\n\t if(!zoomPoint) {\n\t // if no zoomPoint, the mouse wasn't over the actual geography yet\n\t // maybe this point is the start... we'll find out next time!\n\t mouse0 = mouse1;\n\t zoomPoint = position(projection, mouse0);\n\t }\n\t // check if the point is on the map\n\t // if not, don't do anything new but scale\n\t // if it is, then we can assume between will exist below\n\t // so we don't need the 'bank' function, whatever that is.\n\t // TODO: is this right?\n\t else if(position(projection, mouse1)) {\n\t // go back to original projection temporarily\n\t // except for scale... that's kind of independent?\n\t projection\n\t .rotate(rotate0)\n\t .translate(translate0);\n\t\n\t // calculate the new params\n\t var point1 = position(projection, mouse1),\n\t between = rotateBetween(zoomPoint, point1),\n\t newEuler = eulerFromQuaternion(multiply(q, between)),\n\t rotateAngles = view.r = unRoll(newEuler, zoomPoint, lastRotate);\n\t\n\t if(!isFinite(rotateAngles[0]) || !isFinite(rotateAngles[1]) ||\n\t !isFinite(rotateAngles[2])) {\n\t rotateAngles = lastRotate;\n\t }\n\t\n\t // update the projection\n\t projection.rotate(rotateAngles);\n\t lastRotate = rotateAngles;\n\t }\n\t\n\t zoomed(event.of(this, arguments));\n\t });\n\t\n\t zoomstarted(event.of(this, arguments));\n\t })\n\t .on('zoomend', function() {\n\t d3.select(this).style(zoomendStyle);\n\t zoomOn.call(zoom, 'zoom', null);\n\t zoomended(event.of(this, arguments));\n\t })\n\t .on('zoom.redraw', function() {\n\t geo.render();\n\t });\n\t\n\t function zoomstarted(dispatch) {\n\t if(!zooming++) dispatch({type: 'zoomstart'});\n\t }\n\t\n\t function zoomed(dispatch) {\n\t dispatch({type: 'zoom'});\n\t }\n\t\n\t function zoomended(dispatch) {\n\t if(!--zooming) dispatch({type: 'zoomend'});\n\t }\n\t\n\t return d3.rebind(zoom, event, 'on');\n\t}", "function zoomClipped(geo, projLayout) {\n\t var projection = geo.projection,\n\t view = {r: projection.rotate(), k: projection.scale()},\n\t zoom = initZoom(projection, projLayout),\n\t event = d3_eventDispatch(zoom, 'zoomstart', 'zoom', 'zoomend'),\n\t zooming = 0,\n\t zoomOn = zoom.on;\n\t\n\t var zoomPoint;\n\t\n\t zoom.on('zoomstart', function() {\n\t d3.select(this).style(zoomstartStyle);\n\t\n\t var mouse0 = d3.mouse(this),\n\t rotate0 = projection.rotate(),\n\t lastRotate = rotate0,\n\t translate0 = projection.translate(),\n\t q = quaternionFromEuler(rotate0);\n\t\n\t zoomPoint = position(projection, mouse0);\n\t\n\t zoomOn.call(zoom, 'zoom', function() {\n\t var mouse1 = d3.mouse(this);\n\t\n\t projection.scale(view.k = d3.event.scale);\n\t\n\t if(!zoomPoint) {\n\t // if no zoomPoint, the mouse wasn't over the actual geography yet\n\t // maybe this point is the start... we'll find out next time!\n\t mouse0 = mouse1;\n\t zoomPoint = position(projection, mouse0);\n\t }\n\t // check if the point is on the map\n\t // if not, don't do anything new but scale\n\t // if it is, then we can assume between will exist below\n\t // so we don't need the 'bank' function, whatever that is.\n\t // TODO: is this right?\n\t else if(position(projection, mouse1)) {\n\t // go back to original projection temporarily\n\t // except for scale... that's kind of independent?\n\t projection\n\t .rotate(rotate0)\n\t .translate(translate0);\n\t\n\t // calculate the new params\n\t var point1 = position(projection, mouse1),\n\t between = rotateBetween(zoomPoint, point1),\n\t newEuler = eulerFromQuaternion(multiply(q, between)),\n\t rotateAngles = view.r = unRoll(newEuler, zoomPoint, lastRotate);\n\t\n\t if(!isFinite(rotateAngles[0]) || !isFinite(rotateAngles[1]) ||\n\t !isFinite(rotateAngles[2])) {\n\t rotateAngles = lastRotate;\n\t }\n\t\n\t // update the projection\n\t projection.rotate(rotateAngles);\n\t lastRotate = rotateAngles;\n\t }\n\t\n\t zoomed(event.of(this, arguments));\n\t });\n\t\n\t zoomstarted(event.of(this, arguments));\n\t })\n\t .on('zoomend', function() {\n\t d3.select(this).style(zoomendStyle);\n\t zoomOn.call(zoom, 'zoom', null);\n\t zoomended(event.of(this, arguments));\n\t })\n\t .on('zoom.redraw', function() {\n\t geo.render();\n\t });\n\t\n\t function zoomstarted(dispatch) {\n\t if(!zooming++) dispatch({type: 'zoomstart'});\n\t }\n\t\n\t function zoomed(dispatch) {\n\t dispatch({type: 'zoom'});\n\t }\n\t\n\t function zoomended(dispatch) {\n\t if(!--zooming) dispatch({type: 'zoomend'});\n\t }\n\t\n\t return d3.rebind(zoom, event, 'on');\n\t}", "function zoomClipped(geo, projection) {\n var view = {r: projection.rotate(), k: projection.scale()},\n zoom = initZoom(geo, projection),\n event = d3_eventDispatch(zoom, 'zoomstart', 'zoom', 'zoomend'),\n zooming = 0,\n zoomOn = zoom.on;\n\n var zoomPoint;\n\n zoom.on('zoomstart', function() {\n d3.select(this).style(zoomstartStyle);\n\n var mouse0 = d3.mouse(this),\n rotate0 = projection.rotate(),\n lastRotate = rotate0,\n translate0 = projection.translate(),\n q = quaternionFromEuler(rotate0);\n\n zoomPoint = position(projection, mouse0);\n\n zoomOn.call(zoom, 'zoom', function() {\n var mouse1 = d3.mouse(this);\n\n projection.scale(view.k = d3.event.scale);\n\n if(!zoomPoint) {\n // if no zoomPoint, the mouse wasn't over the actual geography yet\n // maybe this point is the start... we'll find out next time!\n mouse0 = mouse1;\n zoomPoint = position(projection, mouse0);\n }\n // check if the point is on the map\n // if not, don't do anything new but scale\n // if it is, then we can assume between will exist below\n // so we don't need the 'bank' function, whatever that is.\n else if(position(projection, mouse1)) {\n // go back to original projection temporarily\n // except for scale... that's kind of independent?\n projection\n .rotate(rotate0)\n .translate(translate0);\n\n // calculate the new params\n var point1 = position(projection, mouse1),\n between = rotateBetween(zoomPoint, point1),\n newEuler = eulerFromQuaternion(multiply(q, between)),\n rotateAngles = view.r = unRoll(newEuler, zoomPoint, lastRotate);\n\n if(!isFinite(rotateAngles[0]) || !isFinite(rotateAngles[1]) ||\n !isFinite(rotateAngles[2])) {\n rotateAngles = lastRotate;\n }\n\n // update the projection\n projection.rotate(rotateAngles);\n lastRotate = rotateAngles;\n }\n\n zoomed(event.of(this, arguments));\n });\n\n zoomstarted(event.of(this, arguments));\n })\n .on('zoomend', function() {\n d3.select(this).style(zoomendStyle);\n zoomOn.call(zoom, 'zoom', null);\n zoomended(event.of(this, arguments));\n sync(geo, projection, syncCb);\n })\n .on('zoom.redraw', function() {\n geo.render();\n });\n\n function zoomstarted(dispatch) {\n if(!zooming++) dispatch({type: 'zoomstart'});\n }\n\n function zoomed(dispatch) {\n dispatch({type: 'zoom'});\n }\n\n function zoomended(dispatch) {\n if(!--zooming) dispatch({type: 'zoomend'});\n }\n\n function syncCb(set) {\n var _rotate = projection.rotate();\n set('projection.rotation.lon', -_rotate[0]);\n set('projection.rotation.lat', -_rotate[1]);\n }\n\n return d3.rebind(zoom, event, 'on');\n}", "zoomIn(e){\n // |--- check\n if(!(this.zoomLevel<5)){\n this.x = -this.mapTransLeft;\n this.y = -this.mapTransTop;\n\n return;\n }\n\n this.zoomLevel = this.zoomLevel + this.zoomStep;\n this.zoomCef = this.zoomLevel / (this.zoomLevel-this.zoomStep);\n this.cursorX = e.clientX - this.mapOffLeft;\n this.cursorY = e.clientY - this.mapOffTop;\n\n // |--- compute zoom center\n this.x = \n this.cursorX\n -\n ((this.cursorX+this.mapTransLeft)\n *\n this.zoomCef);\n\n this.y = \n this.cursorY\n -\n ((this.cursorY+this.mapTransTop)\n *\n this.zoomCef);\n }", "function zoomed() {\r\n\t svgmap.style(\"stroke-width\", 1);\r\n\t k = d3.event.transform.k;\r\n\t svgmap.attr(\"transform\", d3.event.transform);\r\n\t drawmap.attr('stroke-width', (1/k));\r\n\t svgpoints.attr(\"transform\", d3.event.transform);\r\n\t circles.attr('r', (5/k) + \"px\");\r\n\t}", "function panTo(newLat, newLng, newZoom, d, steps) {\r\n\r\n // Lets compute the points we'll use\r\n //console.log(\"panto \");\r\n\r\n panPath.push(\"LAZY SYNCRONIZED LOCK\"); // make length non-zero - 'release' this before calling setTimeout\r\n var curLat = map.getCenter().lat();\r\n var curLng = map.getCenter().lng();\r\n var curZoom = map.getZoom();\r\n var dLat = (newLat - curLat)/steps;\r\n var dLng = (newLng - curLng)/steps;\r\n var dZoom = (newZoom - curZoom)/steps;\r\n\r\n for (var i=0; i < steps; i++) {\r\n panPath.push([curLat + dLat * i, curLng + dLng * i, curZoom + dZoom * i]);\r\n }\r\n panPath.push([newLat, newLng, newZoom]);\r\n panPath.shift(); // LAZY SYNCRONIZED LOCK\r\n pan_started = 1;\r\n var first = panPath.shift();\r\n //setTimeout(doPan, 100);\r\n\r\n doPan(d,steps);\r\n\r\n}", "zoomIn() {\n this.zoom *= 1.25;\n }", "function panZoomTo( fact, limits, sel ) {\n if ( typeof sel === 'undefined' )\n sel = '.selected';\n if ( typeof sel === 'string' )\n sel = $(svgRoot).find(sel).closest('g');\n if ( typeof sel === 'object' && ! ( sel instanceof jQuery ) )\n sel = $(sel);\n if ( sel.length === 0 || sel.hasClass('dragging') )\n return;\n var rect = sel[0].getBBox();\n\n if ( typeof fact.w !== 'undefined' ) {\n boxW = rect.width / fact.w;\n boxH = boxW / canvasR;\n }\n else if ( typeof fact.h !== 'undefined' ) {\n boxH = rect.height / fact.h;\n boxW = boxH * canvasR;\n }\n\n boxX0 = (rect.x + 0.5*rect.width) - 0.5*boxW;\n boxY0 = (rect.y + 0.5*rect.height) - 0.5*boxH;\n\n if ( typeof limits === 'undefined' || limits )\n viewBoxLimits();\n\n svgRoot.setAttribute( 'viewBox', boxX0+' '+boxY0+' '+boxW+' '+boxH );\n\n dragpointScale();\n\n for ( var k=0; k<self.cfg.onPanZoomChange.length; k++ )\n self.cfg.onPanZoomChange[k](boxW,boxH);\n }", "toggleZoomPan () {\n this.isZoomPan = !this.isLayout1d ? !this.isZoomPan : false;\n }", "function zoomed() {\n\n var zoom_x = d3.event.scale,\n zoom_y = d3.event.scale,\n trans_x = d3.event.translate[0] - params.viz.clust.margin.left,\n trans_y = d3.event.translate[1] - params.viz.clust.margin.top;\n\n // apply transformation\n apply_transformation(trans_x, trans_y, zoom_x, zoom_y);\n }", "function zoomed() {\n container.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "#updateZoom() {\n\n const size = this.#getSize();\n \n var zoom = -this.#diffwheel;\n zoom /= size.y;\n zoom *= this.zoompower;\n \n const ray = this.raycaster.ray.direction;\n\n this.camera.position.x += zoom * ray.x;\n this.camera.position.y += zoom * ray.y;\n this.camera.position.z += zoom * ray.z;\n\n this.#diffwheel = 0;\n }", "function zoomed() {\n container.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "function zoomIn() {\n _zoomLevel = _krpano().get('view.fov') - 20;\n _krpano().call('zoomto(' + _zoomLevel + ',smooth())');\n _krpano().set('view.fov', _zoomLevel);\n }", "function handlePan(loc) {\r\n // Update the source rectangle origin, but afterwards, check to\r\n // make sure we're not trying to look outside the image bounds.\r\n drawingCenter[0] += (loc[0] - lastLocation[0]);\r\n drawingCenter[1] += (loc[1] - lastLocation[1]);\r\n\r\n // Update mouse location\r\n lastLocation = loc;\r\n }", "addZoomAndMapPanHandling() {\n\n this.getMap().on(\"zoomend\", (event) => {\n // console.log(\"zoomend\");\n this.updateMarkersToShowOnMapChange(event);\n\n });\n\n this.getMap().on(\"moveend\", (event) => {\n this.updateMarkersToShowOnMapChange(event);\n });\n\n\n }", "function zoomed() {\n draw();\n circlesTranslate();\n }", "function Pan()\n{\n console.info(\"Pan\");\n MINPAN_rad = (MINPAN_deg * Math.PI) / 180;\n MAXPAN_rad = (MAXPAN_deg * Math.PI) / 180;\n var req = {\"min_pos\": MINPAN_rad, \"max_pos\": MAXPAN_rad, \"velocity\": VELPAN}\n d3.select(\"box\").text(\"Panning Continuously\");\n pan.pan(req);\n}", "function zoom() {\n var translate = d3.event.translate,\n scale = d3.event.scale;\n svg.attr(\"transform\", \"translate(\" + translate + \")scale(\" + d3.event.scale + \")\");\n }", "function zoom(e) { \r\n\t\t\r\n\t//get canvas position and add it to current mouse position\t\r\n\t\r\n\tvar obj = document.getElementById('canvas');\r\n\t\r\n\tvar left = 0;\r\n\tvar top = 0;\r\n\t\r\n\tif (obj.offsetParent) {\r\n\t\tdo {\r\n\t\t\tleft += obj.offsetLeft;\r\n\t\t\ttop += obj.offsetTop;\r\n\t\t} while (obj = obj.offsetParent);\t\r\n\t}\r\n \r\n\tmouseX = e.clientX - canvas.offsetLeft;\r\n\tmouseY = e.clientY - canvas.offsetTop;\r\n\t\r\n\t\r\n\t// re-calculate the new max and min values for the real and imaginary axii\r\n\t\r\n\tvar xZoom = mouseX / CANVAS_WIDTH;\r\n\tvar yZoom = mouseY / CANVAS_HEIGHT;\r\n\t\r\n\tvar rangeRe = MaxRe - MinRe;\r\n\tvar centerRe = MinRe + rangeRe * xZoom;\r\n\t\r\n\tMinRe = centerRe - rangeRe/4;\r\n\tMaxRe = centerRe + rangeRe/4;\r\n\t\r\n\tvar rangeIm = MaxIm + Math.abs(MinIm);\r\n\tvar centerIm = MinIm +( (1.0 - yZoom)*rangeIm);\r\n\t\r\n\tMinIm = centerIm - rangeIm/4;\r\n\tMaxIm = MinIm+(MaxRe-MinRe)*CANVAS_HEIGHT/CANVAS_WIDTH;\r\n\t\r\n\tRe_factor = (MaxRe-MinRe)/(CANVAS_WIDTH-1);\r\n\tIm_factor = (MaxIm-MinIm)/(CANVAS_HEIGHT-1);\r\n\t\r\n\tdrawJulia();\t\t// re-draw the set\r\n\t\r\n}", "onZoom($event, direction) {\n if (this.enableTrackpadSupport && !$event.ctrlKey) {\n this.pan($event.deltaX * -1, $event.deltaY * -1);\n return;\n }\n const zoomFactor = 1 + (direction === 'in' ? this.zoomSpeed : -this.zoomSpeed);\n // Check that zooming wouldn't put us out of bounds\n const newZoomLevel = this.zoomLevel * zoomFactor;\n if (newZoomLevel <= this.minZoomLevel || newZoomLevel >= this.maxZoomLevel) {\n return;\n }\n // Check if zooming is enabled or not\n if (!this.enableZoom) {\n return;\n }\n if (this.panOnZoom === true && $event) {\n // Absolute mouse X/Y on the screen\n const mouseX = $event.clientX;\n const mouseY = $event.clientY;\n // Transform the mouse X/Y into a SVG X/Y\n const svg = this.chart.nativeElement.querySelector('svg');\n const svgGroup = svg.querySelector('g.chart');\n const point = svg.createSVGPoint();\n point.x = mouseX;\n point.y = mouseY;\n const svgPoint = point.matrixTransform(svgGroup.getScreenCTM().inverse());\n // Panzoom\n this.pan(svgPoint.x, svgPoint.y, true);\n this.zoom(zoomFactor);\n this.pan(-svgPoint.x, -svgPoint.y, true);\n }\n else {\n this.zoom(zoomFactor);\n }\n }", "function zoom() {\n svgGroup.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "function zoomed () {\n // update the zoom level and offset on the main view\n svg.select(\"g\").attr(\"transform\",\n \"translate(\" + d3.event.translate + \")\" +\n \"scale(\" + d3.event.scale + \")\"); // + (0.67 * d3.event.scale) + \")\" +\n //\"rotate(30, \" + (svg_width / 2) + \", \" + (svg_height / 2) + \")\");\n\n // ...and update the position and size of the view rectangle in the overview.\n var scale = 1 / d3.event.scale;\n d3.select(\"#view-rect\")\n .attr(\"x\", -d3.event.translate[0] * scale)\n .attr(\"y\", -d3.event.translate[1] * scale)\n .attr(\"width\", view_width * scale)\n .attr(\"height\", view_height * scale);\n }", "function onMove() {\t\t\t\n\t\tWGL.mcontroller.zoommove(map.getZoom(), getTopLeftTC(), WGL.filterByExt);\n}", "function onMove() {\t\t\t\n\t\tWGL.mcontroller.zoommove(map.getZoom(), getTopLeftTC(), WGL.filterByExt);\n}", "function zoomed() {\n container.attr(\"transform\", d3.event.transform + \" translate(\" + width / 2 + \",\" + height / 2 + \") scale(0.2)\")\n }", "function zoom() {\n svgGroup.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "function zoom() {\n svgGroup.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "function zoom() {\n svgGroup.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "function zoom() {\n svgGroup.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "function zoom() {\n svgGroup.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "function zoomed() {\n svg.attr('transform', 'translate(' + d3.event.translate + ')scale(' + d3.event.scale + ')');\n }", "zoomMap() {\n PaintGraph.Pixels.zoomExtent(this.props.map, this.props.bbox)\n window.refreshTiles()\n window.updateTiles()\n }", "panTo(x, y) {\n if (x === null || x === undefined || isNaN(x) || y === null || y === undefined || isNaN(y)) {\n return;\n }\n const panX = -this.panOffsetX - x * this.zoomLevel + this.dims.width / 2;\n const panY = -this.panOffsetY - y * this.zoomLevel + this.dims.height / 2;\n this.transformationMatrix = Object(transformation_matrix__WEBPACK_IMPORTED_MODULE_9__[\"transform\"])(this.transformationMatrix, Object(transformation_matrix__WEBPACK_IMPORTED_MODULE_9__[\"translate\"])(panX / this.zoomLevel, panY / this.zoomLevel));\n this.updateTransform();\n }", "function zoom() {\n $scope.svg.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "function zoom() {\n //console.log(\"zoom\");\n svgGroup.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "function handleZoom(e) {\n // Limit panning so the visualization remains on the screen.\n // TODO: Redo this as part of the d3.zoom() call above: http://bl.ocks.org/garrilla/11280861.\n if (e.transform.x > width * 0.5) {\n e.transform.x = width * 0.5;\n }\n if (e.transform.y > height * 0.05) {\n e.transform.y = height * 0.05;\n }\n currentZoom = e.transform;\n d3.select(\"svg g\")\n .attr(\"transform\", e.transform);\n}", "function zoom() {\n svgGroup.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "function zoombox_apply(minx, miny, maxx, maxy) {\n var imgbox = minx + \"+\" + miny + \"+\" + maxx + \"+\" + maxy;\n var imgxy = minx + \"+\" + miny;\n\n // NORMAL MOUSE ACTIONS IN MAIN MAP //\n if (refmapClick == false) {\n\n // ZOOM/PAN ACTIONS\n var varform = _$(\"varform\");\n var vmode = varform.mode.value;\n \n if (vmode == 'map' || rightMouseButton) {\n showloading();\n // Only click\n if ((minx + jitter) > maxx && (miny + jitter) > maxy) {\n if (varform.zoom_type.value == 'zoomrect') {\n if (rightMouseButton) {\n zoom_factor = 1; \n } else {\n zoom_factor = 2;\n }\n zoompoint(zoom_factor, imgxy);\n \n } else {\n // Pan\n var zoom_factor = varform.zoom_factor.value;\n zoompoint(zoom_factor, imgxy);\n }\n \n // Zoombox \n } else {\n zoomin(imgbox);\n }\n\n // QUERY/IDENTIFY ACTIONS\n // query on all visible groups\n } else if (vmode == 'query') {\n showqueryresult('query', imgxy);\n // query only on selected group with multiselect\n } else if (vmode == 'nquery') {\n \tvar selform = _$(\"selform\");\n if (!selform.selgroup) return false;\n if (selform.selgroup.selectedIndex != -1) {\n // only with single click\n if ((minx + jitter) > maxx && (miny + jitter) > maxy) { // x/y point\n showqueryresult('nquery', imgxy);\n // with zoom box\n } else {\n showqueryresult('nquery', imgbox); // rectangle\n }\n }\n } else if (vmode == 'poi') {\n openPoiDlg(imgxy);\n } else {\n try {\n eval(vmode + '_start(imgbox)');\n return false;\n } catch(e) {\n \n }\n }\n\n // ACTIONS IN REF MAP //\n } else {\n zoomref(imgxy);\n }\n}", "function zoom () {\r\n if (zoomAllowed) {\r\n d3.event.preventDefault()\r\n var dy = +d3.event.wheelDeltaY\r\n var sign = dy < 0 ? -1 : +1\r\n dy = Math.pow(Math.abs(dy), 1.4) * sign\r\n\r\n if (timeWindow + dy > 10 * 1000) {\r\n timeWindow += dy\r\n } else {\r\n timeWindow = 10 * 1000\r\n }\r\n }\r\n step()\r\n }", "function zoomNonClipped(geo, projection) {\n var zoom = initZoom(geo, projection);\n\n var INSIDETOLORANCEPXS = 2;\n\n var mouse0, rotate0, translate0, lastRotate, zoomPoint,\n mouse1, rotate1, point1;\n\n function position(x) { return projection.invert(x); }\n\n function outside(x) {\n var pt = projection(position(x));\n return (Math.abs(pt[0] - x[0]) > INSIDETOLORANCEPXS ||\n Math.abs(pt[1] - x[1]) > INSIDETOLORANCEPXS);\n }\n\n function handleZoomstart() {\n d3.select(this).style(zoomstartStyle);\n\n mouse0 = d3.mouse(this);\n rotate0 = projection.rotate();\n translate0 = projection.translate();\n lastRotate = rotate0;\n zoomPoint = position(mouse0);\n }\n\n function handleZoom() {\n mouse1 = d3.mouse(this);\n\n if(outside(mouse0)) {\n zoom.scale(projection.scale());\n zoom.translate(projection.translate());\n return;\n }\n\n projection.scale(d3.event.scale);\n projection.translate([translate0[0], d3.event.translate[1]]);\n\n if(!zoomPoint) {\n mouse0 = mouse1;\n zoomPoint = position(mouse0);\n }\n else if(position(mouse1)) {\n point1 = position(mouse1);\n rotate1 = [lastRotate[0] + (point1[0] - zoomPoint[0]), rotate0[1], rotate0[2]];\n projection.rotate(rotate1);\n lastRotate = rotate1;\n }\n\n geo.render();\n }\n\n function handleZoomend() {\n d3.select(this).style(zoomendStyle);\n sync(geo, projection, syncCb);\n }\n\n function syncCb(set) {\n var rotate = projection.rotate();\n var center = projection.invert(geo.midPt);\n\n set('projection.rotation.lon', -rotate[0]);\n set('center.lon', center[0]);\n set('center.lat', center[1]);\n }\n\n zoom\n .on('zoomstart', handleZoomstart)\n .on('zoom', handleZoom)\n .on('zoomend', handleZoomend);\n\n return zoom;\n}", "function zoomInHere(x,y) {\r\n\r\n var transform = d3.zoomIdentity\r\n .translate(width / 2, height / 2)\r\n .scale(8)\r\n .translate(-x,-y);\r\n\r\n focus.transition().ease(d3.easeLinear).duration(1000).call(\r\n zoom.transform,\r\n transform\r\n //d3.zoomIdentity.translate(width / 2, height / 2).scale(8).translate(-x, -y),\r\n )\r\n\r\n }", "function zoom() {\n svgGroup.attr(\"transform\", `translate(${d3.event.translate})scale(${d3.event.scale})`);\n }", "function zoom() {\n\t\t\t\tmap.projection.translate(d3.event.translate).scale(d3.event.scale);\n\t\t\t\tpaths.attr('d', path);\n\n\t\t\t\tmarkers.circles\n\t\t\t\t\t.attr('cx', function(d) { \n\t\t\t\t\t\treturn map.projection([d.longitude ,d.latitude])[0]\n\t\t\t\t\t})\n\t\t\t\t\t.attr('cy', function(d) { \n\t\t\t\t\t\treturn map.projection([d.longitude, d.latitude])[1]\n\t\t\t\t\t});\n\t\t\t}", "function zoom(x, y, isZoomIn) {\n\tvar direction = (isZoomIn) ? 1 : -1,\n\t\tfactor = (1 + direction * 0.1),\n\t\tlocal_pt = new PIXI.Point(),\n\t\tpoint = new PIXI.Point(x, y);\n\t\t\n\tvar stage = p.stage;\n\t\n\tPIXI.interaction.InteractionData.prototype.getLocalPosition(stage, local_pt, point);\n\t\n\tstage.scale.x *= factor;\n\tstage.scale.y *= factor;\n\tstage.pivot = local_pt;\n\tstage.position = point;\n}", "handleZoom (newZoomLevel, focalPoint)\n {\n // If the zoom level provided is invalid, return false\n if (!this.isValidOption('zoomLevel', newZoomLevel))\n return false;\n\n // While zooming, don't update scroll offsets based on the scaled version of diva-inner\n this.viewerState.viewportObject.removeEventListener('scroll', this.boundScrollFunction);\n\n // If no focal point was given, zoom on the center of the viewport\n if (!focalPoint)\n {\n const viewport = this.viewerState.viewport;\n const currentRegion = this.viewerState.renderer.layout.getPageRegion(this.settings.currentPageIndex);\n\n focalPoint = {\n anchorPage: this.settings.currentPageIndex,\n offset: {\n left: (viewport.width / 2) - (currentRegion.left - viewport.left),\n top: (viewport.height / 2) - (currentRegion.top - viewport.top)\n }\n };\n }\n\n const pageRegion = this.viewerState.renderer.layout.getPageRegion(focalPoint.anchorPage);\n\n // calculate distance from cursor coordinates to center of viewport\n const focalXToCenter = (pageRegion.left + focalPoint.offset.left) -\n (this.settings.viewport.left + (this.settings.viewport.width / 2));\n const focalYToCenter = (pageRegion.top + focalPoint.offset.top) -\n (this.settings.viewport.top + (this.settings.viewport.height / 2));\n\n const getPositionForZoomLevel = function (zoomLevel, initZoom)\n {\n const zoomRatio = Math.pow(2, zoomLevel - initZoom);\n\n //TODO(jeromepl): Calculate position from page top left to viewport top left\n // calculate horizontal/verticalOffset: distance from viewport center to page upper left corner\n const horizontalOffset = (focalPoint.offset.left * zoomRatio) - focalXToCenter;\n const verticalOffset = (focalPoint.offset.top * zoomRatio) - focalYToCenter;\n\n return {\n zoomLevel: zoomLevel,\n anchorPage: focalPoint.anchorPage,\n verticalOffset: verticalOffset,\n horizontalOffset: horizontalOffset\n };\n };\n\n this.viewerState.options.zoomLevel = newZoomLevel;\n let initialZoomLevel = this.viewerState.oldZoomLevel;\n this.viewerState.oldZoomLevel = this.settings.zoomLevel;\n const endPosition = getPositionForZoomLevel(newZoomLevel, initialZoomLevel);\n this.viewerState.options.goDirectlyTo = endPosition.anchorPage;\n this.viewerState.verticalOffset = endPosition.verticalOffset;\n this.viewerState.horizontalOffset = endPosition.horizontalOffset;\n\n this.viewerState.renderer.transitionViewportPosition({\n duration: this.settings.zoomDuration,\n parameters: {\n zoomLevel: {\n from: initialZoomLevel,\n to: newZoomLevel\n }\n },\n getPosition: (parameters) =>\n {\n return getPositionForZoomLevel(parameters.zoomLevel, initialZoomLevel);\n },\n onEnd: (info) =>\n {\n this.viewerState.viewportObject.addEventListener('scroll', this.boundScrollFunction);\n\n if (info.interrupted)\n this.viewerState.oldZoomLevel = newZoomLevel;\n }\n });\n\n // Send off the zoom level did change event.\n this.publish(\"ZoomLevelDidChange\", newZoomLevel);\n\n return true;\n }", "function zoomed(){\n if (zoomHelpText){\n zoomHelpText.remove();\n }\n\n // Get current zoom scale\n currScale = {\n x: d3.event.transform.rescaleX(xScale),\n y: d3.event.transform.rescaleY(yScale)\n };\n\n // Transform contour plot, minimum circles, axes and Nelder-Mead triangles according to zoom\n contourPlot.attr(\"transform\", d3.event.transform);\n\n radarCircle.attr(\"transform\", d3.event.transform);\n minCircle.attr(\"transform\", d3.event.transform);\n\n gX.call(xAxis.scale(currScale.x));\n gY.call(yAxis.scale(currScale.y));\n\n d3.select(\"#triangle\").attr(\"transform\", d3.event.transform);\n\n // Hide crosshair/coordinate display while zooming\n showCrosshair(this, false);\n showCoords(this, false);\n}", "function touchInit(visData) {\n // console.log(arguments.callee.name);\n\n visData.touchElement = document.getElementById('TouchLayer');\n\n mc = new Hammer.Manager(visData.touchElement);\n // create pan recognizers\n pan = new Hammer.Pan();\n pan.options.threshold = 25;\n pan.options.pointers = 0;\n // create pinch recognizers\n pinch = new Hammer.Pinch();\n // add to the Manager\n var tap = new Hammer.Tap();\n mc.add([pan, pinch, tap]);\n mc.on(\"tap\", function(ev) {\n calcCoords(ev.pointers[0].clientX, ev.pointers[0].clientY, visData);\n GPSDisplayUpdate(visData.lat, visData.lon);\n });\n\n mc.on(\"pinchstart\", function(ev) {\n pan.options.enable = false;\n });\n\n mc.on(\"pinch\", function(ev) {\n ev.scale = ev.scale.toFixed(3);\n ev.scale = Number(ev.scale);\n ev.scale = ev.scale - 1;\n if (ev.scale < 0) {\n ev.scale = ev.scale * 5;\n ev.scale = Math.pow(ev.scale, 2) * -1;\n } else {\n ev.scale = Math.pow(ev.scale, 2);\n\n }\n $('#sliderStatus').text(ev.scale);\n zoomPreview(ev.scale + visData.zoomFactor, oxPre, oyPre, visData);\n });\n\n mc.on(\"pinchend\", function(ev) {\n zoomEnd(ev.scale + visData.zoomFactor, visData);\n simulateArea(vizObj.m0[0], vizObj.m1[0], vizObj.m0[1], vizObj.m1[1], 3, vizObj.selectedTime);\n paintArrows(vizObj);\n updateGPSValues();\n GPSDisplayUpdate(vizObj.lat, vizObj.lon);\n pan.options.enable = true;\n });\n\n mc.on(\"pan panstart panend\", function(ev) {\n pinch.options.enable = false;\n if (ev.type == 'panend') {\n if (!panStartFired) {\n return;\n }\n panEnd(-pan.pX, -pan.pY, visData);\n simulateArea(vizObj.m0[0], vizObj.m1[0], vizObj.m0[1], vizObj.m1[1], 3, vizObj.selectedTime);\n paintArrows(vizObj);\n visData.previewSize = [$('#LandMap').width(), $('#LandMap').height()];\n visData.previewPosition = [$('#LandMap').position().left, $('#LandMap').position().top];\n updateGPSValues();\n GPSDisplayUpdate(vizObj.lat, vizObj.lon);\n\n pinch.options.enable = true;\n panStartFired = false;\n } else if (ev.type == 'panstart') {\n panStartFired = true;\n visData.previewSize = [$('#LandMap').width(), $('#LandMap').height()];\n visData.previewPosition = [$('#LandMap').position().left, $('#LandMap').position().top];\n panStartPreviewPosition = visData.previewPosition;\n visData.contextArrows.clearRect(0, 0, visData.displaySize[0], visData.displaySize[1]);\n visData.contextOcean.clearRect(0, 0, visData.displaySize[0], visData.displaySize[1]);\n landPosn = $('#LandMap').position();\n } else if (ev.type == 'pan') {\n if (!panStartFired) {\n return;\n }\n panPreview(-pan.pX, -pan.pY, visData);\n visData.previewSize = [$('#LandMap').width(), $('#LandMap').height()];\n visData.previewPosition = [$('#LandMap').position().left, $('#LandMap').position().top];\n }\n });\n\n}", "function zoom() {\n this\n .on(\"mousedown.zoom\", mousedown)\n .on(\"mousewheel.zoom\", mousewheel)\n .on(\"mousemove.zoom\", mousemove)\n .on(\"DOMMouseScroll.zoom\", mousewheel)\n .on(\"dblclick.zoom\", dblclick)\n .on(\"touchstart.zoom\", touchstart)\n .on(\"touchmove.zoom\", touchmove)\n .on(\"touchend.zoom\", touchstart);\n }", "function zoomTo(event) {\n\n\t\tsetTimeout(function() {\n\t\t\tif ($('.magazine-viewport').data().regionClicked) {\n\t\t\t\t$('.magazine-viewport').data().regionClicked = false;\n\t\t\t} else {\n\t\t\t\tif ($('.magazine-viewport').zoom('value')==1) {\n\t\t\t\t\t$('.magazine-viewport').zoom('zoomIn', event);\n\t\t\t\t} else {\n\t\t\t\t\t$('.magazine-viewport').zoom('zoomOut');\n\t\t\t\t}\n\t\t\t}\n\t\t}, 1);\n\n}", "function zoomBoard() {\r\n\tvar lbounds = paper.project.activeLayer.bounds;\r\n\tvar vbounds = {\r\n\t\twidth: canvas.width,\r\n\t\theight: canvas.height\r\n\t};\r\n\r\n\tvar zoomFactorW = (vbounds.width * 0.9) / 480;\r\n\tvar zoomFactorH = (vbounds.height * 0.9) / 320;\r\n\r\n\tzoomFactorW <= zoomFactorH ? paper.view.zoom = zoomFactorW : paper.view.zoom = zoomFactorH;\r\n\t\r\n\t//lbounds.width <= lbounds.height ? (vbounds.width * 0.9) / 480 : (vbounds.height * 0.9) / 320;\r\n\t//paper.view.zoom = zoomFactor;\r\n}", "function zoom_actions(){\n g.attr(\"transform\", d3.event.transform)\n }", "function zoomed() {\n const transform = d3.event.transform;\n zx = transform.rescaleX(x).interpolate(d3.interpolateRound);\n zy = transform.rescaleY(y).interpolate(d3.interpolateRound);\n //const zradius = transform.rescaleY(radius).interpolate(d3.interpolateRound);\n\n gDot.attr(\"transform\", transform)\n .attr(\"stroke-width\", 5 / transform.k);\n gx.call(xAxis, zx);\n gy.call(yAxis, zy);\n gGrid.call(grid, zx, zy);\n}", "function myPanto(lat, lng) {\n let zoom = 13;\n\n \n map.setView([lat, lng], zoom, {\n animate: true,\n noMoveStart: true\n });\n map.closePopup();\n}", "function zoomIn(){\n $(this).off('click', zoomIn);\n $(this).off('mouseover', showPointer);\n $(this).off('mouseleave', unZoom);\n\n $figureElt = $(this).parent();\n $img = $(this);\n $dezoom = $(this).parent().find('.dezoom');\n\n $bodyElt.css(\"overflow\" , \"hidden\");\n $figureElt.addClass('figure-zoom');\n $img.addClass('image-zoomed-in');\n\n $img.css({\n 'cursor' : 'initial',\n 'transform' : 'scale(1)',\n '-moz-transform' : 'scale(1)',\n '-webkit-transform' : 'scale(1)',\n 'transition' : '0s',\n '-moz-transition' : '0s',\n '-webkit-transition' : '0s'\n });\n\n $dezoom.click(function(){\n $bodyElt.css(\"overflow\" , \"visible\");\n $figureElt.removeClass('figure-zoom');\n $img.removeClass('image-zoomed-in');\n $img.css('cursor' , 'pointer');\n $img.on(\"click\", zoomIn);\n $img.on(\"mouseover\", showPointer);\n $img.on(\"mouseleave\", unZoom);\n });\n }", "function zoom() {\n\t\t\t var trans = d3.event.translate,\n\t\t scale = Math.min(6, Math.max(d3.event.scale, 2));\n\n\t\t var svgWidth = parseInt(d3.select(importedNode).attr(\"width\"));\n\t \t\tvar svgHeight = parseInt(d3.select(importedNode).attr('height'));\n\t \t\tvar xBound = (svgWidth - (width / scale)) * scale;\n\t \t\tvar yBound = (svgHeight - (height / scale)) * scale;\n\n\t\t var tx = Math.min(0, Math.max(xBound * -1, trans[0]));\n\t\t var ty = Math.min(0, Math.max(yBound * -1, trans[1]));\n\t\t\t g.attr(\"transform\", \"translate(\" + tx + \", \" + ty + \")scale(\" + d3.event.scale + \")\");\n\t\t\t zoomBehavior.translate([tx, ty]);\n\t\t}", "function zoomed() {\n // Get the height and width\n height = el.clientHeight;\n width = el.clientWidth;\n\n // Set the map tile size\n tile.size([width, height]);\n\n // Get the current display bounds\n var bounds = display.llBounds();\n\n // Project the bounds based on the current projection\n var psw = projection(bounds[0]);\n var pne = projection(bounds[1]);\n\n // Based the new scale and translation vector off the current one\n var scale = projection.scale() * 2 * Math.PI;\n var translate = projection.translate();\n\n var dx = pne[0] - psw[0];\n var dy = pne[1] - psw[1];\n\n scale = scale * (1 / Math.max(dx / width, dy / height));\n projection\n .translate([width / 2, height / 2])\n .scale(scale / 2 / Math.PI);\n\n // Reproject the bounds based on the new scale and translation vector\n psw = projection(bounds[0]);\n pne = projection(bounds[1]);\n var x = (psw[0] + pne[0]) / 2;\n var y = (psw[1] + pne[1]) / 2;\n translate = [width - x, height - y];\n\n // Update the Geo tiles\n tile\n .scale(scale)\n .translate(translate);\n\n // Get the new set of tiles and render\n renderTiles(tile());\n }", "refreshZoom() {}", "function zoomIn(){\r\n\r\nvar temp=[];\r\n\r\ntemp[0]= (start[0]+end[0])/2;\r\ntemp[1]= (start[1]+end[1])/2;\r\n\r\n\r\n\r\nvar dist= ((start[0]-end[0])*(start[0]-end[0]))+((start[1]-end[1])*(start[1]-end[1]));\r\ndist= Math.sqrt(dist);\r\n\r\nif((dist*1000)<1)\r\n Zoom=15;\r\nelse if((dist*100)<1)\r\n Zoom=14;\r\nelse if((dist*10)<1)\r\n Zoom=13; \r\nelse if(dist>1 && dist <10)\r\n Zoom=12;\r\n\r\nelse \r\n Zoom=11;\r\n\r\n\r\nvar newCenter=[temp[0],temp[1]];\r\n//console.log(dist);\r\nmap.setZoom(Zoom);\r\n\r\nmap.setCenter(newCenter);\r\n\r\nif(count==0)\r\n count++;\r\n\r\n//map.flyto({center: newCenter});\r\n}", "function zoomTo(event) {\n\tsetTimeout(function() {\n\t\tif ($('.magazine-viewport').data().regionClicked) {\n\t\t\t$('.magazine-viewport').data().regionClicked = false;\n\t\t} else {\n\t\t\tif ($('.magazine-viewport').zoom('value') == 1) {\n\t\t\t\t$('.magazine-viewport').zoom('zoomIn', event);\n\t\t\t} else {\n\t\t\t\t$('.magazine-viewport').zoom('zoomOut');\n\t\t\t}\n\t\t}\n\t}, 1);\n}", "function onZoomChanged(e, Panzoom, zoom) {\n instance.setZoom(zoom);\n $panzoom.panzoom(\"pan\", -130, -60, {\n\trelative : true,\n\tanimation : true\n });\n $(\"#editor\").offset({\n\ttop : $setTop,\n\tleft : $setLeft\n });\n}", "function zoomed() {\n\t container.attr(\"transform\", \"translate(\" + d3.event.transform.x + \", \" + d3.event.transform.y + \") scale(\" + d3.event.transform.k + \")\");\n}", "function zoomPosFixed(t){\n\n\tif (t.x<-70 && t.k==1){\n\t\tt.x = -70;\n\t}\n\telse if(t.k>1 && t.k <= 1.6471820345351462 && t.x<-877.5684473379315){\n\t\tt.x=-877.5684473379315;\n\t}\n\telse if(t.k <= 2.7132086548953436 && t.x<-2214.3504808609173){\n\t\tt.x=-2214.3504808609173;\n\t}\n\n\n\t//console.log(\"t.x:\"+t.x+\"\\nt.y:\"+t.y+\"\\nt.k:\"+t.k);\n\n\treturn t;\n}", "function zoomViewPort(x, y, factor, viewPort) {\n // incomplete...\n return _.extend({}, viewPort, {\n width: viewPort.width * factor,\n height: viewPort.height * factor\n });\n }", "function zoom_actions(){\r\n circles.attr(\"transform\", d3.event.transform);\r\n zoomed();\r\n}", "function onZoomPlotFrame() {\n if (map.graphics.graphics.length > 0) {\n var extentOfAllPlotFrames = getExtentOfAllPlotFrames();\n var extentOfCurrentPlotFrame = getExtentOfCurrentPlotFrame();\n var deltaX = (extentOfCurrentPlotFrame.xmax - extentOfCurrentPlotFrame.xmin) / 2;\n var deltaY = (extentOfCurrentPlotFrame.ymax - extentOfCurrentPlotFrame.ymin) / 2;\n zoomToExtent(extentOfAllPlotFrames.xmin - deltaX,\n extentOfAllPlotFrames.ymin - deltaY,\n extentOfAllPlotFrames.xmax + deltaX,\n extentOfAllPlotFrames.ymax + deltaY);\n }\n onMovePlotFrame();\n}", "function zoomNonClipped(geo, projLayout) {\n\t var projection = geo.projection,\n\t zoom = initZoom(projection, projLayout);\n\t\n\t var INSIDETOLORANCEPXS = 2;\n\t\n\t var mouse0, rotate0, translate0, lastRotate, zoomPoint,\n\t mouse1, rotate1, point1;\n\t\n\t function position(x) { return projection.invert(x); }\n\t\n\t function outside(x) {\n\t var pt = projection(position(x));\n\t return (Math.abs(pt[0] - x[0]) > INSIDETOLORANCEPXS ||\n\t Math.abs(pt[1] - x[1]) > INSIDETOLORANCEPXS);\n\t }\n\t\n\t function handleZoomstart() {\n\t d3.select(this).style(zoomstartStyle);\n\t\n\t mouse0 = d3.mouse(this);\n\t rotate0 = projection.rotate();\n\t translate0 = projection.translate();\n\t lastRotate = rotate0;\n\t zoomPoint = position(mouse0);\n\t }\n\t\n\t function handleZoom() {\n\t mouse1 = d3.mouse(this);\n\t\n\t if(outside(mouse0)) {\n\t zoom.scale(projection.scale());\n\t zoom.translate(projection.translate());\n\t return;\n\t }\n\t\n\t projection.scale(d3.event.scale);\n\t\n\t projection.translate([translate0[0], d3.event.translate[1]]);\n\t\n\t if(!zoomPoint) {\n\t mouse0 = mouse1;\n\t zoomPoint = position(mouse0);\n\t }\n\t else if(position(mouse1)) {\n\t point1 = position(mouse1);\n\t rotate1 = [lastRotate[0] + (point1[0] - zoomPoint[0]), rotate0[1], rotate0[2]];\n\t projection.rotate(rotate1);\n\t lastRotate = rotate1;\n\t }\n\t\n\t geo.render();\n\t }\n\t\n\t function handleZoomend() {\n\t d3.select(this).style(zoomendStyle);\n\t\n\t // or something like\n\t // http://www.jasondavies.com/maps/gilbert/\n\t // ... a little harder with multiple base layers\n\t }\n\t\n\t zoom\n\t .on('zoomstart', handleZoomstart)\n\t .on('zoom', handleZoom)\n\t .on('zoomend', handleZoomend);\n\t\n\t return zoom;\n\t}", "function zoomNonClipped(geo, projLayout) {\n\t var projection = geo.projection,\n\t zoom = initZoom(projection, projLayout);\n\t\n\t var INSIDETOLORANCEPXS = 2;\n\t\n\t var mouse0, rotate0, translate0, lastRotate, zoomPoint,\n\t mouse1, rotate1, point1;\n\t\n\t function position(x) { return projection.invert(x); }\n\t\n\t function outside(x) {\n\t var pt = projection(position(x));\n\t return (Math.abs(pt[0] - x[0]) > INSIDETOLORANCEPXS ||\n\t Math.abs(pt[1] - x[1]) > INSIDETOLORANCEPXS);\n\t }\n\t\n\t function handleZoomstart() {\n\t d3.select(this).style(zoomstartStyle);\n\t\n\t mouse0 = d3.mouse(this);\n\t rotate0 = projection.rotate();\n\t translate0 = projection.translate();\n\t lastRotate = rotate0;\n\t zoomPoint = position(mouse0);\n\t }\n\t\n\t function handleZoom() {\n\t mouse1 = d3.mouse(this);\n\t\n\t if(outside(mouse0)) {\n\t zoom.scale(projection.scale());\n\t zoom.translate(projection.translate());\n\t return;\n\t }\n\t\n\t projection.scale(d3.event.scale);\n\t\n\t projection.translate([translate0[0], d3.event.translate[1]]);\n\t\n\t if(!zoomPoint) {\n\t mouse0 = mouse1;\n\t zoomPoint = position(mouse0);\n\t }\n\t else if(position(mouse1)) {\n\t point1 = position(mouse1);\n\t rotate1 = [lastRotate[0] + (point1[0] - zoomPoint[0]), rotate0[1], rotate0[2]];\n\t projection.rotate(rotate1);\n\t lastRotate = rotate1;\n\t }\n\t\n\t geo.render();\n\t }\n\t\n\t function handleZoomend() {\n\t d3.select(this).style(zoomendStyle);\n\t\n\t // or something like\n\t // http://www.jasondavies.com/maps/gilbert/\n\t // ... a little harder with multiple base layers\n\t }\n\t\n\t zoom\n\t .on('zoomstart', handleZoomstart)\n\t .on('zoom', handleZoom)\n\t .on('zoomend', handleZoomend);\n\t\n\t return zoom;\n\t}", "function zoomPreview(zf, xoff, yoff, visData) {\n //console.log(arguments.callee.name);\n visData.contextOcean.clearRect(0, 0, visData.displaySize[0], visData.displaySize[1]);\n visData.contextArrows.clearRect(0, 0, visData.displaySize[0], visData.displaySize[1]);\n zf = Number(zf);\n if (zf < 1) {\n zf = 1;\n }\n\n //Maintain the center of the landmap\n var parentSize = [$('#Map').width(), $('#Map').height()];\n\n // Calculate relative distance to center of image\n var distTop = (parentSize[1] / 2) - visData.previewPosition[1];\n var distLeft = (parentSize[0] / 2) - visData.previewPosition[0];\n distTop = distTop / visData.previewSize[1];\n distLeft = distLeft / visData.previewSize[0];\n\n // Calculate new width and height for the LandMap\n var newWidth = visData.landImageSize[0] * zf;\n var newHeight = visData.landImageSize[1] * zf;\n\n // Calculate distance to left in pixels\n var newLeft = newWidth * distLeft;\n var newTop = newHeight * distTop;\n // Subtract half the width of the parent container\n newLeft = -(newLeft - parentSize[0] / 2);\n newTop = -(newTop - parentSize[1] / 2);\n // Calculate new left and top in order to maintain the center\n\n $('#LandMap').width((newWidth) + 'px');\n $('#LandMap').height((newHeight) + 'px');\n $('#LandMap').css({ \"left\": newLeft + 'px' });\n $('#LandMap').css({ \"top\": newTop + 'px' });\n\n}", "function dealWithKeyboard(e) {\n switch (e.keyCode) {\n case 33: // PageUp key , Zoom in\n {\n var range = (right - left);\n var delta = (range - range * 0.9) * 0.5;\n left += delta; right -= delta;\n range = topBound - bottom;\n delta = (range - range * 0.9) * 0.5;\n bottom += delta; topBound -= delta;\n }\n break;\n case 34: // PageDown key, zoom out\n {\n var range = (right - left);\n var delta = (range * 1.1 - range) * 0.5;\n left -= delta; right += delta;\n range = topBound - bottom;\n delta = (range * 1.1 - range) * 0.5;\n bottom -= delta; topBound += delta;\n }\n case 37: // left arrow pan left\n {left += -0.1; right += -0.1};\n break;\n case 38: // up arrow pan left\n {bottom += 0.1; topBound += 0.1};\n break;\n case 39: // right arrow pan left\n {left += 0.1; right += 0.1};\n break;\n case 40: // down arrow pan left\n {bottom += -0.1; topBound += -0.1};\n break;\n \n }\n}", "function zoomed() {\n container.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n}", "function zoomed() {\n \n closeInfo();\n \n transform = d3.event.transform;\n \n // bound the zoom and pan so user cannot move outside map limits\n tx = Math.min(0, Math.max(transform.x, mapWidth - mapWidth*transform.k));\n ty = Math.min(0, Math.max(transform.y, mapHeight - mapHeight*transform.k));\n transform.x = tx;\n transform.y = ty;\n \n gBasemap.attr(\"transform\", transform);\n gBasemap.selectAll(\".land\").attr(\"stroke-width\", 1/transform.k);\n \n gTG.attr(\"transform\", transform).attr(\"stroke-width\", 1/transform.k);\n \n sym[0].currentSize = sym[0].initSize/(1 + 3*(transform.k - 1));\n var zmTri = d3.symbol().size( sym[0].currentSize ).type( sym[0].symbol );\n gTG.selectAll(\".tgTriangle\").attr(\"d\", zmTri);\n \n sym[1].currentSize = sym[1].initSize/(1 + 3*(transform.k - 1));\n var zmCirc = d3.symbol().size( sym[1].currentSize ).type( sym[1].symbol );\n gTG.selectAll(\".tgCircle\").attr(\"d\", zmCirc);\n \n} // end zoomed", "on() {\r\n\t\t\tif (!this.active) {\r\n\t\t\t\tthis.p.push();\r\n\t\t\t\tthis.p.scale(this.zoom);\r\n\t\t\t\tthis.p.translate(-this.x + this.p.world.hw / this.zoom, -this.y + this.p.world.hh / this.zoom);\r\n\t\t\t\tthis.active = true;\r\n\t\t\t}\r\n\t\t}", "function mousewheel() {\n start.apply(this, arguments);\n if (!d3_behavior_zoomZooming) d3_behavior_zoomZooming = d3_behavior_zoomLocation(d3.svg.mouse(d3_behavior_zoomTarget));\n d3_behavior_zoomTo(d3_behavior_zoomDelta() + xyz[2], d3.svg.mouse(d3_behavior_zoomTarget), d3_behavior_zoomZooming);\n }", "setZoom(value,add,speed=3) {\n const memZ = this._zoom;\n const target = this._target || {x:this.camToMapX,y:this.camToMapY};\n this._zoom = add? memZ+value : value;\n this.updateProjection();\n const to = this._target ? this.getLocalTarget(target) :\n {\n x:this.pivot.x+(target.x-this.camToMapX), //+ (target.x-this.camToMapX),\n y:this.pivot.y+(target.y-this.camToMapY), //+ (target.y+this.camToMapY)\n };\n // back to origin\n this._zoom = memZ;\n this.updateProjection();\n // zoom only\n TweenLite.to(this, speed, {\n _zoom:add? memZ+value : value,\n ease: Elastic.easeOut.config(0.4, 0.4),\n });\n }", "function manualZoom(zoom) {\n let scale = zoom / 100,\n translation = zoomObj.translate(),\n origZoom = zoomObj.scale(),\n unscaledOffsetX = (translation[0] + ((windowWidth * origZoom) - windowWidth) / 2) / origZoom,\n unscaledOffsetY = (translation[1] + ((windowHeight * origZoom) - windowHeight) / 2) / origZoom,\n translateX = unscaledOffsetX * scale - ((scale * windowWidth) - windowWidth) / 2,\n translateY = unscaledOffsetY * scale - ((scale * windowHeight) - windowHeight) / 2;\n\n svgGroup.attr(\"transform\", \"translate(\" + [translateX + (marginLeft * scale), translateY + ((windowHeight / 2 - rootH / 2 - startNodeOffsetY) * scale)] + \")scale(\" + scale + \")\");\n zoomObj.scale(scale);\n zoomObj.translate([translateX, translateY]);\n }", "zoomOut(e){\n // |--- check\n if(!(this.zoomLevel>1)) return;\n\n this.zoomLevel = this.zoomLevel - this.zoomStep;\n this.zoomCef = this.zoomLevel / (this.zoomLevel+this.zoomStep);\n this.cursorX = e.clientX - this.mapOffLeft;\n this.cursorY = e.clientY - this.mapOffTop;\n\n // |--- compute zoom center\n this.x = \n this.cursorX\n -\n ((this.cursorX + this.mapTransLeft)\n *\n this.zoomCef);\n\n this.y = \n this.cursorY\n -\n ((this.cursorY + this.mapTransTop)\n *\n this.zoomCef);\n\n\n // |--- Align if out of border\n let\n viewChunkHr, viewChunkVr;\n\n if( this.x>0 ){\n this.x = 0;\n } else if( this.x<0 ){\n viewChunkHr = (this.refSvgContainer.offsetWidth*this.zoomCef) - Math.abs(this.x);\n\n if(viewChunkHr<this.refMap.offsetWidth){\n this.x = -((this.refSvgContainer.offsetWidth*this.zoomCef) - this.refMap.offsetWidth);\n }\n }\n\n if( this.y>0 ){\n this.y = 0;\n } else if( this.y<0 ){\n viewChunkVr = (this.refSvgContainer.offsetHeight*this.zoomCef) - Math.abs(this.y);\n\n if(viewChunkVr< this.refMap.offsetHeight){\n this.y = -((this.refSvgContainer.offsetHeight*this.zoomCef) - this.refMap.offsetHeight);\n }\n }\n }", "function zoom() {\n // console.log(d3.event.scale);\n if ($scope.xAxisIsLocked && $scope.yAxisIsLocked) return;\n if ($scope.xAxisIsLocked) {\n svg.selectAll(\"circle\")\n .classed(\"animate\", false)\n .attr(\"cy\", function(d) { return x(d[\"y_category\"]); });\n d3.select('.y.axis').call(yAxis);\n } else if ($scope.yAxisIsLocked) {\n svg.selectAll(\"circle\")\n .classed(\"animate\", false)\n .attr(\"cx\", function(d) { return x(d[\"x_category\"]); });\n d3.select('.x.axis').call(xAxis);\n } else {\n svg.selectAll(\"circle\")\n .classed(\"animate\", false)\n .attr(\"cx\", function(d) { return x(d[\"x_category\"]); })\n .attr(\"cy\", function(d) { return y(d[\"y_category\"]); });\n d3.select('.x.axis').call(xAxis);\n d3.select('.y.axis').call(yAxis);\n }\n }", "slideZoom() {\n this.map.setZoom(this.slider);\n }", "setupZoom () {\n const mainViewerZoom = getZoom(\n MAIN_VIEWER_DIMENSIONS.width,\n MAIN_VIEWER_DIMENSIONS.height,\n zoomedAll,\n [this]\n )\n this.axisElements['plot-marker'].call(mainViewerZoom)\n }" ]
[ "0.7314129", "0.7143018", "0.7032239", "0.7011948", "0.69826597", "0.6962996", "0.6936321", "0.6837072", "0.6791536", "0.676691", "0.6753278", "0.67343026", "0.67177033", "0.67031777", "0.66930425", "0.66316444", "0.66298586", "0.66282594", "0.6600352", "0.6590201", "0.6582786", "0.6582786", "0.6577546", "0.657443", "0.65670305", "0.65553546", "0.6536186", "0.65283203", "0.6517836", "0.6500611", "0.64825535", "0.64809585", "0.6473591", "0.64712316", "0.6463929", "0.6440787", "0.6439353", "0.6424735", "0.6420692", "0.64168763", "0.64079785", "0.63892335", "0.63704795", "0.6368318", "0.6368318", "0.6367994", "0.63441336", "0.63441336", "0.63441336", "0.63441336", "0.63441336", "0.63310724", "0.6316185", "0.63161325", "0.6316011", "0.631568", "0.6315536", "0.6314846", "0.6306323", "0.6301357", "0.6300723", "0.62949806", "0.6294062", "0.6292509", "0.6288622", "0.62855047", "0.62830335", "0.6276578", "0.6271168", "0.6270328", "0.6265482", "0.62615794", "0.62532073", "0.6252488", "0.6245062", "0.6241816", "0.6240691", "0.623908", "0.6232193", "0.62230766", "0.6219652", "0.6218235", "0.6216916", "0.62167877", "0.6209955", "0.6208695", "0.620474", "0.620474", "0.61961615", "0.61955774", "0.6193655", "0.61930776", "0.61880094", "0.6187649", "0.6183776", "0.6181525", "0.617861", "0.6167848", "0.6156749", "0.61562324" ]
0.6526144
28
begin timeline at the right time
function klapp_timeline_startpoint() { $('.timecapsule').each(function() { if( $('ol', this).children().length != 0 && $('ol', this).children().is(':visible') ) { var container_margin = $(this).position(); $('.maintain').animate({ 'margin-top': '-' + container_margin.top + 'px' }, 500); return false; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start(){\n timeline.play();\n }", "function start_timeline(time) {\n line_count = setInterval(timer, 33);\n function timer() {\n time += 1;\n time_line.style.width = time + \"px\";\n if (time > 479) {\n clearInterval(line_count);\n }\n }\n}", "function begin() {\n points = 0;\n pausedGame = false;\n emerge();\n startTimer();\n}", "playTimeLine(){\n\t\tif(this.timeLine.isTimeLineMoving() === false){\n\t\t\tthis.timeLine.playTimeLine();\n\t\t\tthis.setPopUpNotShowAble();\n\t\t\tthis.mainChart.isMoving(true);\n\t\t}\n\t\telse{\n\t\t\tthis.setPopUpShowAble();\n\t\t\tthis.timeLine.pauseTimeLine();\n\t\t\tthis.mainChart.isMoving(false);\n\t\t}\n\t}", "function start() {\n var timelineHolder = document.getElementById(\"schedule-graph\");\n var timeline = new google.visualization.Timeline(timelineHolder);\n var dataTable = prepareDataTable();\n\n timeline.draw(dataTable);\n}", "onInitialDrawComplete() {\n var date = new Date();\n var year = date.getFullYear();\n var month = date.getMonth();\n var nextMonth = month == 11 ? 0 : month + 1;\n var nextYear = month == 11 ? year + 1 : year;\n var day = 1;\n\n this.timeline.setWindow(\n new Date(year, month, day),\n new Date(nextYear, nextMonth, day),\n { animation: false }\n );\n }", "function moveToCurrentTime() {\n timeline.setVisibleChartRangeNow();\n}", "async function TimelineOpen() {\n document.getElementById('Timeline').style.left = 0;\n document.getElementById('innerTime').style.display = 'none';\n document.getElementById(\"Timeline\").style.width = \"100%\";\n await sleep(360);\n document.getElementById('innerTime').style.display = 'inline';\n}", "play() {\n this.timeline.play();\n }", "function start() {\n initialTime = $scope.partData.timer_for_revision || 30;\n $scope.time = initialTime;\n \n circle.style.strokeDashoffset = 0;\n circle.style.strokeDasharray = offset;\n \n /**\n * Timer itself\n * @type {number}\n */\n interval = setInterval( function () {\n i++;\n $scope.time--;\n $scope.$apply();\n circle.style.strokeDashoffset = -(400 / initialTime) * i;\n if ( !$scope.time ) {\n timeIsOut();\n }\n }, 1000 );\n }", "setStartTime(time, moveFadeInEnd = false) {\n if (moveFadeInEnd) {\n const rampLength = this.options.fadeInEnd - this.options.fadeInStart;\n this.options.fadeInEnd = time + rampLength;\n }\n this.options.fadeInStart = time;\n this.renderPolyline();\n }", "function startTime2() {\n if (t == 0) {\n //h, m and s are assigned to the real time\n var today = new Date();\n h = today.getHours();\n m = today.getMinutes();\n s = today.getSeconds();\n }\n if (t == 1) { \n //h, m and s are assigned to the set time\n h = hSetTime;\n m = mSetTime;\n s = sSetTime; \n }\n\n\t\t\tseconds.animate({transform: [ 'r',((s*6) + 180),200,200]}); //secondhand animation\n\t\t\tminutes.animate({transform: ['r',((m*6) + 180),200,200]}); //minute hand animation\n\t\t\thours.animate({transform: ['r',((h*30) + 180),200,200]}); //hours hand animation\t\t\n\t\t\t\n\t\t\tsetTimeout(function(){startTime2()}, 250); //funtion refreshes at 1/4 second intervals\n\n //Changes the AM/PM text depending on the time\n\t\t\tif (h < 12){\n ampmtxt.attr({text: \"AM\", \"font-size\": 15, fill: outline1 });\n\t\t\t} else {\n ampmtxt.attr({text: \"PM\" , \"font-size\": 15, fill: outline1});\n\t\t\t}\t\n\t\t}", "function startTime() {\n setTimer();\n}", "function timerStart() {\n position = 1;\n}", "function startJump(){\r\n timeline.play()\r\n timeline2.play()\r\n timeline3.play()\r\n}", "function setCurrentTimeAsNewInpoint() {\n if (!continueProcessing && (editor.selectedSplit != null)) {\n setTimefieldTimeBegin(getCurrentTime());\n okButtonClick();\n }\n}", "function delayStart (){\n\t\t\tstartRace((clickedTime-createdTime)/1000)\n\t\t}", "start() {\n\t\tthis.startTime = Date.now();\n\t}", "gotoNextFrame() {\n this.timeline.gotoNextFrame();\n }", "_autobegin(){\r\n if(!this._started)\r\n this.begin(false);\r\n }", "function main(){\r\n\tvar TL=fl.getDocumentDOM().getTimeline()\r\n\tvar curL=TL.currentLayer;\r\n\tvar curF=TL.currentFrame;\r\n\tvar frame=TL.layers[curL].frames[curF];\r\n\tif(curF>frame.startFrame){\r\n\t\tTL.currentFrame=frame.startFrame;\r\n\t}else if(curF==frame.startFrame && curF>0){\r\n\t\tTL.currentFrame=frame.startFrame;\r\n\t\tvar prevFrame=TL.layers[curL].frames[frame.startFrame-1];\r\n\t\tTL.currentFrame=frame.startFrame-(prevFrame.duration);\r\n\t}\r\n}", "function setTimefieldTimeBegin(time) {\n if (!continueProcessing) {\n $('#clipBegin').timefield('option', 'value', time);\n }\n}", "function TrainBeginMoving(ent) {\n\tent.s.pos.trTime = level.time;\n\tent.s.pos.trType = TR.LINEAR_STOP;\n}", "function resume(){\n\ttempDate = getRightNow();\n\tdrawCalendar(tempDate);\n}", "refreshTimeline() {\n this.items.clear();\n\n scenarioRepo.getAllPhases(currentScenario).forEach(p => {\n if (selectedPhases.includes(p.phaseID)) {\n this.addNewData(p.events, true);\n } else {\n this.addNewData(p.events, false);\n }\n });\n\n const time = configRepo.get(currentConfig).scenarioStartTime;\n this.startTime = time;\n this.currentTime = time;\n this.line.setCustomTime(time, 0);\n }", "function startTimeAnimation() {\n\n\t// reset the time slider\n\t$('#time_slider').slider('value', 0);\n\t\n\t// update the map\n\tupdateMapTimePeriod(0);\n\t\n\t// update the time marker\n\tcurrentTimeInterval = 1;\n\t\n\t// set a timeout for the continue time animation\n\tnextTimeout = setTimeout('continueTimeAnimation()', 3000);\n\t\n\t// update the message\n\t$('#animation_message').empty().append('Animation running…');\n\n}", "function onFirstPlay() {\n var duration = player.getDuration();\n if (q.end) {\n duration = Math.min(duration, q.end);\n }\n if (!q.start) {\n q.start = 0;\n }\n //console.log('duration', duration);\n for(var t = q.start + q.interval; t < duration; t += q.interval) {\n game.timePoints.push({ time: t,\n choices: [{prompt: q.message}] });\n }\n game.timePoints.push({time: duration,\n choices: [{prompt: \"Again!\", next: 'start'}]});\n //console.log('tp', game.timePoints);\n }", "function timeUpdate() {\n // timeline width adjusted for playhead\n var timelineWidth = timeline_begin.offsetWidth - playhead_begin.offsetWidth;\n var playPercent = timelineWidth * (audio_begin.currentTime / duration_begin);\n playhead_begin.style.marginLeft = playPercent + \"px\";\n if (audio_begin.currentTime == duration_begin) {\n pButton_begin.className = \"\";\n pButton_begin.className = \"play\";\n }\n currentTime_begin.textContent = formatTime(audio_begin.currentTime);\n }", "function startTimer() {\n\tif(typeof chainTimelineObj == \"object\") {\n\t\tcountdownTimer();\n\t\tvar counter=setInterval(\"countdownTimer()\",1000);\n\t}\n}", "set_time( t ){ this.current_time = t; this.draw_fg(); return this; }", "function update_timeline(once) {\r\n if (once == undefined) once = false;\r\n determine_now();\r\n tl_update_data();\r\n \r\n // Get context\r\n var g = tl.getContext(\"2d\");\r\n g.clearRect(0,0,TIMELINE_SIZES_WIDTH,TIMELINE_SIZES_FULL_HEIGHT);\r\n g.save();\r\n \r\n // Draw bar\r\n g.translate(TIMELINE_SIZES_WIDTH - 9.5, TIMELINE_SIZES_HISTORY * TIMELINE_SIZES_HEIGHT + .5);\r\n \r\n g.strokeStyle = \"rgb(0,0,0)\";\r\n g.beginPath();\r\n g.moveTo(0,-TIMELINE_SIZES_HISTORY * TIMELINE_SIZES_HEIGHT);\r\n g.lineTo(0, TIMELINE_SIZES_FUTURE * TIMELINE_SIZES_HEIGHT);\r\n g.stroke();\r\n for (var i=-TIMELINE_SIZES_HISTORY - tl_scroll_offset; i<=TIMELINE_SIZES_FUTURE - tl_scroll_offset; i+=1) {\r\n g.beginPath();\r\n l = -2;\r\n ll = 0;\r\n if (i%5 == 0) l-=2;\r\n if (i%15 == 0) l-=2;\r\n if ((i + tl_t_time.getMinutes())%60 == 0) ll+=8;\r\n g.moveTo(l, tl_warp(i + tl_scroll_offset));\r\n g.lineTo(ll, tl_warp(i + tl_scroll_offset)); \r\n g.stroke();\r\n }\r\n\r\n // Draw times\r\n g.mozTextStyle = \"8pt Monospace\";\r\n function round15(i){ return Math.floor(i/15)*15;}\r\n function drawtime(i, t) {\r\n h = t.getHours()+\"\";\r\n m = t.getMinutes()+\"\";\r\n if (m.length==1) m = \"0\" + m;\r\n x = h+\":\"+m;\r\n\r\n g.save();\r\n g.translate(-g.mozMeasureText(x) - 10, 4 + tl_warp(i + tl_scroll_offset));\r\n g.mozDrawText(x); \r\n g.restore(); \r\n }\r\n for (var i=round15(-TIMELINE_SIZES_HISTORY - tl_scroll_offset);\r\n i <= round15(TIMELINE_SIZES_FUTURE - tl_scroll_offset); i+=15) {\r\n t = new Date(tl_t_time);\r\n t.setMinutes(t.getMinutes() + i);\r\n drawtime(i, t);\r\n }\r\n\r\n // Draw current time\r\n diff = (tl_c_time.getTime() - tl_t_time.getTime()) / 1000 / 60;\r\n if (diff+tl_scroll_offset >= -TIMELINE_SIZES_HISTORY && diff+tl_scroll_offset <= TIMELINE_SIZES_FUTURE){\r\n y = tl_warp(diff + tl_scroll_offset);\r\n\r\n g.strokeStyle = \"rgb(0,0,255)\";\r\n g.beginPath();\r\n g.moveTo(-8, y);\r\n g.lineTo( 4, y);\r\n g.lineTo( 6, y-2);\r\n g.lineTo( 8, y);\r\n g.lineTo( 6, y+2);\r\n g.lineTo( 4, y);\r\n g.stroke();\r\n\r\n g.fillStyle = \"rgb(0,0,255)\";\r\n drawtime(diff, tl_c_time);\r\n\r\n // Highlight the 'elapsed time since last refresh'\r\n diff2 = (script_start_time - tl_t_time.getTime()) / 1000 / 60;\r\n y2 = tl_warp(diff2 + tl_scroll_offset);\r\n g.fillStyle = \"rgba(0,128,255,0.1)\";\r\n g.fillRect(9-TIMELINE_SIZES_WIDTH, y,TIMELINE_SIZES_WIDTH+1, y2-y);\r\n }\r\n\r\n unit = new Array(17);\r\n for (i=1; i<12; i++) {\r\n unit[i] = new Image();\r\n if (i==11)\r\n unit[i].src = \"img/un/u/hero.gif\";\r\n else\r\n unit[i].src = \"img/un/u/\"+(RACE*10+i)+\".gif\";\r\n }\r\n\r\n for (i=13; i<17; i++) {\r\n unit[i] = new Image();\r\n unit[i].src = \"img/un/r/\"+(i-12)+\".gif\";\r\n }\r\n\r\n\r\n function left(q) {\r\n if (q.constructor == Array)\r\n return q[0]-q[1];\r\n else\r\n return q-0;\r\n }\r\n\r\n // Draw data\r\n for (e in events) {\r\n p = events[e];\r\n diff = (e - tl_t_time.getTime()) / 1000 / 60 + tl_scroll_offset;\r\n if (diff<-TIMELINE_SIZES_HISTORY || diff>TIMELINE_SIZES_FUTURE) continue;\r\n y = tl_warp(diff);\r\n y = Math.round(y);\r\n g.strokeStyle = TIMELINE_EVENT_COLORS[p[0]];\r\n g.beginPath();\r\n g.moveTo(-10, y);\r\n g.lineTo(-50, y); \r\n g.stroke();\r\n \r\n g.fillStyle = \"rgb(0,128,0)\";\r\n var cap = 60*left(p[1])+40*left(p[2])+110*left(p[5]) - ((p[13]-0)+(p[14]-0)+(p[15]-0)+(p[16]-0));\r\n cap = (cap<=0)?\"*\":\"\";\r\n g.save();\r\n g.translate(20 - TIMELINE_SIZES_WIDTH - g.mozMeasureText(cap), y+4);\r\n g.mozDrawText(cap + p[12]);\r\n g.restore();\r\n\r\n if (p[17]) {\r\n g.fillStyle = \"rgb(0,0,128)\";\r\n g.save();\r\n g.translate(20 - TIMELINE_SIZES_WIDTH, y-5);\r\n g.mozDrawText(p[17]);\r\n g.restore();\r\n }\r\n\r\n if (SHOW_TIMELINE_REPORT_INFO) {\r\n g.fillStyle = \"rgb(64,192,64)\";\r\n g.save();\r\n g.translate(-40, y+4+12); // Move this below the message.\r\n for (i = 16; i>0; i--) {\r\n if (i==12)\r\n g.fillStyle = \"rgb(0,0,255)\";\r\n else if (p[i]) {\r\n try {\r\n g.translate(-unit[i].width - 8, 0);\r\n g.drawImage(unit[i], -0.5, Math.round(-unit[i].height*0.7) -0.5);\r\n } catch (e) {\r\n // This might fail if the image is not yet or can't be loaded.\r\n // Ignoring this exception prevents the script from terminating to early.\r\n var fs = g.fillStyle;\r\n g.fillStyle = \"rgb(128,128,128)\";\r\n g.translate(-24,0);\r\n g.mozDrawText(\"??\");\r\n g.fillStyle = fs;\r\n }\r\n if (p[i].constructor == Array) {\r\n g.fillStyle = \"rgb(192,0,0)\";\r\n g.translate(-g.mozMeasureText(-p[i][1]) - 2, 0);\r\n g.mozDrawText(-p[i][1]);\r\n g.fillStyle = \"rgb(0,0,255)\";\r\n g.translate(-g.mozMeasureText(p[i][0]), 0);\r\n g.mozDrawText(p[i][0]);\r\n } else {\r\n g.translate(-g.mozMeasureText(p[i]) - 2, 0);\r\n g.mozDrawText(p[i]);\r\n }\r\n }\r\n }\r\n }\r\n g.restore();\r\n }\r\n g.restore();\r\n if (KEEP_TIMELINE_UPDATED && once != true) {\r\n setTimeout(update_timeline,TIMELINE_UPDATE_INTERVAL);\r\n }\r\n }", "startJourney() {\n this.running = true;\n this.previousTime = false;\n this.ui.notify('The journey through the wasteland begins', 'positive');\n this.step();\n }", "startDraw(){\n if(!this.drawing) {\n this.drawing = true;\n this.then = Date.now();\n this.draw();\n }\n }", "function onUpdate() {\n timeline.currentTime += 10 * currentSpeed;\n timeline.line.setCustomTime(timeline.currentTime, 0);\n}", "start () {\r\n this._startTime = Date.now()\r\n\r\n const lastSeg = this._dna[this._dna.length-1]\r\n this._totalRunningTime = lastSeg.startTime + lastSeg.pace * 60 / 1000 * lastSeg.distance\r\n }", "function onStartFrame(t, state) {\n // (KTR) TODO implement option so a person could pause and resume elapsed time\n // if someone visits, leaves, and later returns\n let tStart = t;\n if (!state.tStart) {\n state.tStart = t;\n state.time = t;\n }\n\n tStart = state.tStart;\n\n let now = (t - tStart);\n // different from t, since t is the total elapsed time in the entire system, best to use \"state.time\"\n state.time = now;\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n gl.uniform1f(state.uTimeLoc, now / 1000.0);\n\n gl.enable(gl.DEPTH_TEST);\n}", "function play(){\n x = margin.left;\n timer = setInterval(function(){x = x+1;\n removeLine();\n drawLine(x);},100);\n setup();\n playViz();\n\n }", "function setAt(e) {\r\n var at = document.getElementById(\"at\");\r\n if (at) {\r\n // d = 'top of the timeline time' \r\n var n = new Date();\r\n n.setTime(tl_t_time.getTime() + (tl_unwarp(e.pageY) - tl_scroll_offset) *60*1000);\r\n s=(n.getFullYear())+\"/\"+(n.getMonth()+1)+\"/\"+n.getDate()+\" \"+n.getHours()+\":\"+pad2(n.getMinutes())+\":\"+pad2(n.getSeconds());\r\n at.value=s;\r\n }\r\n }", "onLineStart() { }", "initTimeline() {\n\t\tthis.timelineGfx = new createjs.Container;\n\t\tthis.timelineGfx.x = this.width/2;\n\t\tthis.timelineGfx.y = 20;\n\t\tthis.timelineGfx.level = this;\n\t\t\n\t\tvar border = new createjs.Shape();\n\t\tborder.graphics.beginStroke(\"#FFFFFF\").beginFill(\"#000000\").setStrokeStyle(1);\n\t\tborder.graphics.rect(-this.width/3,-5,2*this.width/3,10);\n\t\tthis.timelineGfx.addChild(border);\n\n\t\tvar fill = new createjs.Shape();\n\t\tfill.graphics.beginFill(\"DeepSkyBlue\");\n\t\tfill.graphics.rect(-this.width/3,-5,1,10);\n\t\tthis.timelineGfx.fillGfx = fill;\n\t\tthis.timelineGfx.addChild(fill);\n\t\t\n\t\t// add a click event listener\n\t\tthis.timelineGfx.addEventListener(\"click\", function(event) {\n\t\t\tvar level = event.currentTarget.level;\n\t\t\tlevel.reset();\n\t\t\t// calculate how far in the timeline we choose\n\t\t\tvar barPos = event.stageX - level.width/6;\n\t\t\tvar totalBarLength = 2*level.width/3;\n\t\t\tvar barRatio = barPos/totalBarLength;\n\t\t\t// calculate that time\n\t\t\tvar timelineLength = level.game.timeline.end - level.game.timeline.start;\n\t\t\tvar timeLerp = level.game.timeline.start + barRatio*timelineLength;\n\t\t\t// set the new time position\n\t\t\tlevel.game.timeline.setPosition(timeLerp);\n\t\t});\n\t\t\n\t\t// add all the highlight markings\n\t\tfor (var k = 0; k < this.level.highlights.length; k++) {\n\t\t\tvar highlight = this.level.highlights[k];\n\t\t\t// calculate where the highlight begins and ends\n\t\t\tvar songStart = this.game.timeline.start;\n\t\t\tvar songEnd = this.game.timeline.end;\n\t\t\tvar songLength = songEnd-songStart;\n\t\t\tvar startTime = 1000*this.notetrack.beatToTime(highlight[0]);\n\t\t\tvar endTime = 1000*this.notetrack.beatToTime(highlight[1]);\n\t\t\tvar startRatio = (startTime-songStart)/songLength;\n\t\t\tvar endRatio = (endTime-songStart)/songLength;\n\t\t\tvar boxBegin = -this.width/3;\n\t\t\tvar boxEnd = this.width/3;\n\t\t\tvar boxLength = boxEnd - boxBegin;\n\t\t\tvar boxBeginLerp = boxBegin + startRatio*boxLength;\n\t\t\tvar boxEndLerp = boxBegin + endRatio*boxLength;\n\t\t\tvar highlightWidth = boxEndLerp - boxBeginLerp;\n\t\t\t// draw the box\n\t\t\tvar highlightBox = new createjs.Shape();\n\t\t\tvar highlightColor = \"#ffff99\";\n\t\t\tif (highlight[2]) {\n\t\t\t\thighlightColor = highlight[2];\n\t\t\t}\n\t\t\thighlightBox.graphics.beginFill(highlightColor);\n\t\t\thighlightBox.graphics.rect(boxBeginLerp,-10,highlightWidth,20);\n\t\t\thighlightBox.alpha = 0.5;\n\t\t\tthis.timelineGfx.addChild(highlightBox);\n\t\t\tthis.stage.update();\n\t\t}\n\t\t\n\t\t// add timestamp\n\t\tthis.timestampText = new createjs.Text(\"start/end\", \"12px Arial\", \"#ffffff\")\n\t\tthis.timestampText.textAlign = 'right';\n\t\tthis.timestampText.x = 5*this.width/6;\n\t\tthis.timestampText.y = 32;\n\t\tthis.stage.addChild(this.timestampText)\n\t\t\n\t\tthis.stage.addChild(this.timelineGfx);\n\t}", "function move2Now() {\r\n var now = new Date();\r\n //var nowBuff = new Date(now.getTime() + (24*3600*1000));\r\n///Set to tomorrow so it includes all of today\r\n //$(\"#date2\").val(now.toISOString().split('T')[0]);\r\n $(\"#date2\").val(momentLA_Date(now));\r\n setStartRange(now, $(\"#qryRangeDD\").val()); \r\n $('#fwd').addClass('disabled');\r\n $('#fwdEnd').addClass('disabled');\r\n //timelineType();\r\n}", "initCurrentTimeLine() {\n const me = this,\n now = new Date();\n\n if (me.currentTimeLine || !me.showCurrentTimeLine) {\n return;\n }\n\n me.currentTimeLine = new me.store.modelClass({\n // eslint-disable-next-line quote-props\n 'id': 'currentTime',\n cls: 'b-sch-current-time',\n startDate: now,\n name: DateHelper.format(now, me.currentDateFormat)\n });\n me.updateCurrentTimeLine = me.updateCurrentTimeLine.bind(me);\n me.currentTimeInterval = me.setInterval(me.updateCurrentTimeLine, me.updateCurrentTimeLineInterval);\n\n if (me.client.isPainted) {\n me.renderRanges();\n }\n }", "function addTime() {\n calcAddHours(TIMELINE_HOURS);\n redrawTimeline();\n}", "gotoPrevFrame() {\n this.timeline.gotoPrevFrame();\n }", "function start() {\n startSeconds = new Date().getTime() / 1000;\n animating = true;\n }", "function start() {\n\n setTime(); //set timer\n\n //next question function\n next();\n}", "initCurrentTimeLine() {\n const me = this,\n now = new Date();\n\n if (me.currentTimeLine || !me.showCurrentTimeLine) {\n return;\n }\n\n me.currentTimeLine = new me.store.modelClass({\n id: 'currentTime',\n cls: 'b-sch-current-time',\n startDate: now,\n name: DateHelper.format(now, me.currentDateFormat)\n });\n\n me.currentTimeInterval = me.setInterval(() => {\n me.currentTimeLine.startDate = new Date();\n me.currentTimeLine.name = DateHelper.format(me.currentTimeLine.startDate, me.currentDateFormat);\n me.onStoreChanged({ action: 'update', record: me.currentTimeLine });\n }, me.updateCurrentTimeLineInterval);\n\n if (me.client.rendered) {\n me.renderRanges();\n }\n }", "function startTimer() {\n if(started == false ){\n started = true;\n myp5.background(200, 200, 200, 0);\n startTime = Date.now();\n }\n}", "function moveFwd() {\r\n var d1 = new Date($(\"#date1\").val())\r\n var d2 = new Date($(\"#date2\").val())\r\n var span = (d2 - d1)/(24*3600*1000);\r\nconsole.log(\"move forward:\", span);\r\n $(\"#date1\").val($(\"#date2\").val());\r\n //$(\"#date2\").val(new Date(d2.getTime()+span).toISOString().split('T')[0]);\r\n setEndRange(d2, span);\r\n //timelineType();\r\n}", "function changeToNextFrame() {\n if (_currentTime === undefined) {\n _currentTime = getBeginDate().getTime();\n\n } else {\n var deltaTime = getResolution();\n _currentTime = _currentTime + deltaTime > getEndDate().getTime() ? getBeginDate().getTime() : _currentTime + deltaTime;\n }\n MyController.events.triggerEvent(\"timechanged\", {\n time : _currentTime\n });\n }", "function scheduler() {\n if (!play) {\n return;\n }\n while (nextNoteTime < context.currentTime + scheduleAheadTime) {\n commandList.forEach(function (c) {\n return c.play(cursor);\n });\n nextNote();\n }\n}", "ScheduleAt(time){\n \tconsole.log(\"scheduleprofecionales at\");\n }", "function startAnimating() {\n fpsInterval = 1000 / fps;\n then = Date.now();\n startTime = then;\n animate();\n}", "function playStartLine(e) {\n if (trjs.param.isContinuousPlaying === true) {\n endContinuousPlay();\n return;\n }\n setMedia();\n // console.log(\"pause playStartLine\");\n media.pause();\n var sel = trjs.data.selectedLine;\n sel = trjs.events.findLineToStart(sel);\n if (sel == null) return;\n var ts = trjs.events.lineGetCell(sel, trjs.data.TSCOL);\n if (ts !== '') media.currentTime = ts;\n// not necessary: \ttrjs.events.goToTime('wave');\n setTimer('standard');\n media.play();\n }", "chronoContinue(){\n this.start = new Date()-this.diff;\n this.start = new Date(this.start);\n this.chrono();\n }", "function startTime(time) {\n \tlet timeArr = []; //holds hh:mm:ss time in an array format.\n let hour = 0; //holds hour value from timeArr array\n let minute = 0; //holds minute value from timeArr array\n let second = 0; //holds seconds value from timeArr array\n\n //holds drift value for timer\n let drift = Date.now() - initialStart;\n\n //calls checkForReset function to see if timer has reached end.\n timeArr = checkForReset(time);\n\n //If timeArr length is 3, assign pos 0 to hour, pos 1 to minute, pos 2 to second\n //,else pos 0 to minute and pos 1 to second.\n if(timeArr.length == 3) {\n \thour = parseInt(timeArr[0])\n \tminute = parseInt(timeArr[1]);\n \tsecond = parseInt(timeArr[2]);\n }\n else {\n \tminute = parseInt(timeArr[0]);\n \tsecond = parseInt(timeArr[1]);\n }\n //Calculate current time into seconds.\n let totalTime = (hour * 60 * 60) + (minute * 60) + second;\n\n //If time parameter equals 00:00, keep totalTime and newVertPos values same,\n //else decrease total time by 1 and inc/decrease newVertPos.\n if(time == '00:00') {\n totalTime = totalTime;\n newVertPos = newVertPos;\n }\n else {\n totalTime -= 1;\n newVertPos = newVertPos + verticalNum;\n }\n\n //Call changeTransitionDirection function passing newVertPos value to see\n //if vertical position direction should be changed.\n vertPosition = changeTransitionDirection(newVertPos);\n\n let newHour = Math.floor((totalTime/3600) % 24);\n let newMinute = checkTime(Math.floor((totalTime/60) % 60));\n let newSecond = checkTime(Math.floor(totalTime % 60));\n\n let newTime = \"\"; //holds new time formatted as a string hh:mm:ss\n\n //If newHour is zero, then newTime is 'mm:ss' format, else newTime is\n //'hh:mm:ss' format\n if(newHour == 0 ) {\n \tnewTime = newMinute + \":\" + newSecond;\n }\n else {\n \tnewTime = newHour + \":\" + newMinute + \":\" + newSecond;\n }\n\n let backgroundPos = \"0% \" + vertPosition + \"%\"; //holds background-position value\n //sets cached DOM elements background-postion properties to backgroundPos value\n $timerDisplay.css(\"background-position\", backgroundPos);\n $pomodoroContainer.css(\"background-position\", backgroundPos);\n $sessionSettings.css(\"background-position\", backgroundPos);\n $breakSettings.css(\"background-position\", backgroundPos);\n\n $timer.text(newTime); //timer element text set to newTime\n\n initialStart += interval; //update initial start time by 1000.\n\n //setTimeout calls startTime function, corrects delay time and passes newTime as an argument\n timeID = setTimeout(startTime, Math.max(0, interval - drift), newTime);\n }", "start() {\n const that = this; // Closure trick\n (function innerTick(timestamp=null) {\n if (timestamp !== null &&\n that.last_realtimestamp !== null) {\n // Advance our target time, but not more than MAX_DT.\n const real_dt = timestamp-that.last_realtimestamp;\n if (real_dt < that.MAX_DT) {\n that.target_time += real_dt;\n } else { \n that.target_time += that.MAX_DT;\n }\n // Compute desired timestep based on target and lag.\n const goal_dt = (that.target_time - that.time_reached)\n / that.frames_behind;\n const time_after_goal_dt = that.time_reached + goal_dt;\n that.fps = 1/goal_dt;\n that.runFrame(goal_dt,time_after_goal_dt);\n that.time_reached = time_after_goal_dt;\n }\n if (timestamp !== null) {\n that.last_real_timestamp = timestamp;\n }\n window.requestAnimationFrame(innerTick);\n })(null);\n }", "function startAnimation () {\r\n on = true; // Animation angeschaltet\r\n timer = setInterval(paint,40); // Timer mit Intervall 0,040 s aktivieren\r\n t0 = new Date(); // Neuer Bezugszeitpunkt \r\n }", "function startLine() {\n picking_photo = false;\n line_started = true;\n updateLabels();\n}", "start() {\n if (!this.timer) {\n this.startDate = moment.now();\n this.eventHandlers.onStart();\n this.timer = setInterval(() => {\n this.seconds++;\n this.render(this.seconds);\n }, 1000);\n }\n }", "function startTime(){\n if(start)\n clearInterval(start);\n\n start = setInterval(updateTime, 1000); //essa funçao faz o delay em cada 1000 milisegundos actualiza o time\n }", "function _moveStart() {\n\t\t\t\t// TODO does anything need to be included in this event?\n\t\t\t\t// TODO make cancelable\n\t\t\t\t$fire(this._timetable, \"moveStart\");\n\t\t\t}", "start() {\n this.destIndex = 0;\n this.startTime = new Date();\n setInterval(updateTimer, TIMER_INTERVAL_MS);\n }", "function startTimerline(time){\n\n counterline =setInterval(timer,29);\n function timer(){\n time+= 1;\n timeline.style.width =time + \"px\";\n if(time > 549){\n clearInterval(counterline);\n }\n }\n}", "chronoStart(){\n this.start = new Date();\n this.chrono();\n }", "function SarahActivityRun() {\n\tif (AmandaIntroTime > 0) AmandaIntroTime = AmandaIntroTime - 60000;\n\tif (SophieIntroTime > 0) SophieIntroTime = SophieIntroTime - 60000;\n\tSarahLoadNewCharacter();\n}", "resume(){\n\t\tvar _self = this\n\t\tvar dur = new Date( _self.currentTime )\n\t\tthis.tick( dur.getUTCMinutes() )\n\t\tconsole.log(\"timer resumed\")\n\t}", "function start(){\n //removes input section and submit buttons, \n //create time display div\n this.timeDisplay = document.createElement(\"div\");\n this.timeDisplay.id = \"display\";\n this.timeDisplay.innerHTML = \"display\";\n this.el.appendChild(this.timeDisplay);\n }", "function startAnimation () {\n on = true; // Animation angeschaltet\n timer = setInterval(paint,40); // Timer mit Intervall 0,040 s aktivieren\n t0 = new Date(); // Neuer Anfangszeitpunkt \n }", "function startAnimation () {\n on = true; // Animation angeschaltet\n timer = setInterval(paint,40); // Timer mit Intervall 0,040 s aktivieren\n t0 = new Date(); // Neuer Anfangszeitpunkt \n }", "function startAnimation () {\n on = true; // Animation angeschaltet\n timer = setInterval(paint,40); // Timer mit Intervall 0,040 s aktivieren\n t0 = new Date(); // Neuer Anfangszeitpunkt \n }", "function updateTime() {\n if (typeof envData === 'undefined') {\n return;\n }\n else if (scope.currenttime > envData[envData.length -1].time) {\n timeData[0].time = envData[envData.length -1].time;\n timeData[1].time = envData[envData.length -1].time;\n }\n else if (scope.currenttime < envData[0].time) {\n timeData[0].time = envData[0].time;\n timeData[1].time = envData[0].time;\n }\n else if (typeof timeData !== 'undefined') { \n timeData[0].time = scope.currenttime;\n timeData[1].time = scope.currenttime;\n }\n \n svg.select('#timeLine')\n .datum(timeData)\n .transition() \n .attr(\"d\", currentTimeLine)\n .ease(\"linear\")\n .duration(150); \n }", "begin() {\n //for (let [, arr] of this.arrangements.filter(a => a.at === this.iterations && a.when === \"start\")) arr.exe();\n this.engine.phases.current = this;\n this.engine.events.emit(this.name, this);\n }", "function createTimeline() {\n var chart = new SmoothieChart();\n chart.addTimeSeries(random, { strokeStyle: 'rgba(0, 255, 0, 1)', fillStyle: 'rgba(0, 255, 0, 0.2)', lineWidth: 4 });\n chart.streamTo(document.getElementById(\"chart\"), 500);\n // HACK: because the chart needs some init data\n random.append(new Date().getTime(), 0);\n random.append(new Date().getTime(), 1);\n random.append(new Date().getTime(), 1);\n }", "_start_instruction() {\n\t\t\tthis.current_start_time = Date.now();\n\t\t\tthis._start_mouse_track();\n\t\t}", "function start() {displayCountdown(setCountdown(month,day,hour,min,tz),lab);}", "function drawTimeline(player, nr) {\n //tömmer vyn för timeline innan den målas om\n $(`#timelinecontainer${nr}`).empty();\n $(`#timelinecontainer${nr}`).css('background-color', 'white');\n let height = heightCalculation(player.timeLine, player.tempList);\n let timeLineSorted = player.timeLine.sort();\n if (player.tempList.length < 1) {\n for (var i = 0; i < timeLineSorted.length; i++) {\n $(`#timelinecontainer${nr}`).append(`<div class=\\\"timelineblock\\\" style=\\\"height: ${height}%\\\"> <div class=\\\"timelineline\\\" style=\"background-color:${player.color}\"></div> </div> <div class=\\\"yearblock\\\" >${timeLineSorted[i]}</div>`);\n\n }\n }\n else {\n \n let tempListSorted = player.tempList.sort();\n let iterations = player.timeLine.length + player.tempList.length;\n let j = 0;\n let k = 0;\n for (var i = 0; i < iterations; i++) {\n if (timeLineSorted[j] < tempListSorted[k] || tempListSorted[k] == null && timeLineSorted != null) {\n $(`#timelinecontainer${nr}`).append(`<div class=\\\"timelineblock\\\" style=\\\"height: ${height}%\\\"> <div class=\\\"timelineline\\\" style=\"background-color:${player.color}\"></div> </div> <div class=\\\"yearblock\\\" >${timeLineSorted[j]}</div>`);\n j++;\n }\n else {\n $(`#timelinecontainer${nr}`).append(`<div class=\\\"timelineblock\\\" style=\\\"height: ${height}%\\\"> <div class=\\\"timelineline\\\" style=\"background-color:${player.color}\"></div> </div> <div class=\\\"yearblock\\\" style=\\\"opacity: 0.5\\\">${tempListSorted[k]}</div>`);\n k++;\n }\n }\n }\n $(`#timelinecontainer${nr}`).append(`<div class=\\\"timelineblock\\\" style=\\\"height: ${height}%\\\"> <div class=\\\"timelineline\\\" style=\"background-color:${player.color}\"></div> </div> `);\n}", "function updateTimelinePosition() {\r\n\tupdatePosition('updateTimelinePosition', '#timeline > .video-container');\r\n}", "function start() {\n lastTime = null;\n frameId = requestAnimationFrame(onFrame);\n }", "function start() {\n console.log(\"Animation Started\");\n\n let masterTl = new TimelineMax();\n\n //TODO: add childtimelines to master\n masterTl\n .add(clearStage(), \"scene-clear-stage\")\n .add(enterFloorVegetation(), \"scene-floor-vegitation\")\n .add(enterTreeStuff(), \"tree-stuff\");\n }", "function setTime() {\n\t\tseconds += 500;\n\t}", "function goToTime(t) {\n //console.log('goto', t);\n if (t == -2) {\n window.close();\n return;\n } else if (t == -1) {\n t = game.start;\n }\n player.seekTo(t, true);\n player.playVideo();\n nextTimePoint = getNext(t);\n}", "function start(startnode, resume_seconds){\n\t\t\t\tstart_time=+new Date();\n\t\t\t\t\n\t\t\t\t//alert('start_time '+start_time);\n\t\t\t\t//aggiungo la classe playNode alla slide che sto visualizzando\n\t\t\t\t$playBtnNav.each(function(){\n\t\t\t\t\tvar id=$(this).data('id');\n\t\t\t\t\tif((parseInt(id))==startnode){\n\t\t\t\t\t\t$(this).addClass('playNode');\n\t\t\t\t\t\t$(this).children('img').attr('src',path_+'/slider-pause.png');\n\t\t\t\t\t\t}\n\t\t\t\t\telse if($(this).hasClass('playNode')){\n\t\t\t\t\t\t$(this).removeClass('playNode');\n\t\t\t\t\t\t$(this).children('img').attr('src',path_+'/slider-play.png');\n\t\t\t\t\t\t}\t\n\t\t\t\t\t});\n\t\t\t\t//\tresume second è sempre 4, non va bene\n\t\t\t\t//alert('resume_seconds'+resume_seconds);\n\t\t\t\t// Presentation start callback function\n\t\t\t\tif(startnode<2 && !resume_seconds && !started){\n\t\t\t\t\tthe_start_callback();\n\t\t\t\t}\n\t\t\t\t// Start the timer\n\t\t\t\tif(!resume_seconds){\n\t\t\t\t\tseconds = nodesec[startnode];\n\t\t\t\t}\n\t\t\t\tif(o.showtimedisplay){\n\t\t\t\t\ttime_start(seconds);\n\t\t\t\t}\n\t\t\t\t// Reset positions\n\t\t\t\tif(!resume_seconds){\n\t\t\t\t\t$innertimeline.css({ width:nodepos[startnode] });\n\t\t\t\t\tif(o.showtimedisplay){\n\t\t\t\t\t\t$time.css({ left:nodepos[startnode]-halftimewidth });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Calculate animation time\n\t\t\t\tif(resume_seconds){\n\t\t\t\t\tanimationtime = (resume_seconds*1000);\n\t\t\t\t}else{\n\t\t\t\t\tanimationtime = (nodeinterval[startnode]*1000);\n\t\t\t\t}\n\t\t\t\t// Animate time display\n\t\t\t\tif(startnode<nodes){\n\t\t\t\t\t//alert(nodepos[(startnode+1)]);\n\t\t\t\t\ttargetpos = nodepos[(startnode+1)];\n\t\t\t\t}else{\n\t\t\t\t\ttargetpos = o.timelinewidth;\n\t\t\t\t}\n\t\t\t\tif(o.showtimedisplay){\n\t\t\t\t\t$time.animate({\n\t\t\t\t\t\tleft:(targetpos-halftimewidth)\n\t\t\t\t\t}, animationtime, 'linear');\n\t\t\t\t}\n\t\t\t\t// Animate timeline bar\n\t\t\t\t//targetpos è undefined se clicco sulla freccia\n\t\t\t\t\n\t\t\t\t//alert(targetpos);\n\t\t\t\t$innertimeline.animate({\n\t\t\t\t\twidth:targetpos\n\t\t\t\t}, animationtime, 'linear', function(){\n\t\t\t\t\t// Slide end callback\n\t\t\t\t\tif(o.showtimedisplay){\n\t\t\t\t\t\ttime_stop();\n\t\t\t\t\t}\n\t\t\t\t\tif(startnode<nodes){\n\t\t\t\t\t\tstart((startnode+1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// Presentation end callback function\n\t\t\t\t\t\tthe_end_callback();\n\t\t\t\t\t\tstarted = false;\n\t\t\t\t\t\t// Repeat presentation\n\t\t\t\t\t\tif(o.repeat){\n\t\t\t\t\t\t\tstart(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// Slide transition\n\t\t\t\tif(startnode != activenode){\n\t\t\t\t\tdifferenceTot=0;\n\t\t\t\t\t$container.find('.slide:not(.slide'+startnode+'):not(.slide'+activenode+')').stop().animate({ opacity:0 },0).css({ 'z-index':0 });\n\t\t\t\t\tif(o.transition=='fade'){\n\t\t\t\t\t\tvar bgCol = $container.find('.slide'+startnode).find('.description').css('background-color');\n\t\t\t\t\t\t$('#bg-slider')\n\t\t\t\t\t\t\t.stop()\n\t\t\t\t\t\t\t.animate({ opacity:0 },300);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$container.find('.slide'+activenode)\n\t\t\t\t\t\t\t.stop()\n\t\t\t\t\t\t\t.animate({ opacity:0 },300,function(){\n\t\t\t\t\t\t\t\t$(this).css({ 'z-index':0 });\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t$container.find('.slide'+startnode)\n\t\t\t\t\t\t\t.stop()\n\t\t\t\t\t\t\t.animate({ opacity:1 },300,function(){\n\t\t\t\t\t\t\t\t$(this).css({ 'z-index':1 });\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t$('#bg-slider')\n\t\t\t\t\t\t\t.stop()\n\t\t\t\t\t\t\t.animate({ opacity:1 },150,function(){\n\t\t\t\t\t\t\t\t$(this).css({ 'background-color': bgCol });\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tif(o.transition=='slide' || o.transition=='reveal'){\n\t\t\t\t\t\t$container.find('.slide'+activenode)\n\t\t\t\t\t\t\t.css({ 'z-index':1 })\n\t\t\t\t\t\t\t.stop(true,true)\n\t\t\t\t\t\t\t.animate({ left:-o.containerwidth },600,function(){\n\t\t\t\t\t\t\t\t$(this)\n\t\t\t\t\t\t\t\t\t.css({ 'z-index':0, left:0 })\n\t\t\t\t\t\t\t\t\t.animate({ opacity:0 },0);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tif(o.transition=='reveal'){\n\t\t\t\t\t\t$container.find('.slide'+startnode)\n\t\t\t\t\t\t\t.css({ 'z-index':0 })\n\t\t\t\t\t\t\t.stop(true,true)\n\t\t\t\t\t\t\t.animate({ opacity:1 },0);\n\t\t\t\t\t}\n\t\t\t\t\tif(o.transition=='slide'){\n\t\t\t\t\t\t$container.find('.slide'+startnode)\n\t\t\t\t\t\t\t.css({ 'z-index':1, left:o.containerwidth })\n\t\t\t\t\t\t\t.stop(true,true)\n\t\t\t\t\t\t\t.animate({ opacity:1 },0)\n\t\t\t\t\t\t\t.animate({ left:0 },600);\n\t\t\t\t\t}\n\t\t\t\t\tif(o.transition=='instant'){\n\t\t\t\t\t\t$container.find('.slide'+activenode).animate({ opacity:0 },0);\n\t\t\t\t\t\t$container.find('.slide'+startnode).animate({ opacity:1 },0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Activate node\n\t\t\t\t$container.find('.node'+activenode).removeClass('node_active');\n\t\t\t\t$container.find('.node'+startnode).addClass('node_active');\n\n\t\t\t\tactivenode = startnode;\n\t\t\t\tplaying = true;\n\t\t\t\tif(o.showpauseplay){\n\t\t\t\t\t$pauseplay.attr('class','pause');\n\t\t\t\t}\n\t\t\t\t// Pause if this is the last node and repeat is off\n\t\t\t\tif(o.showpauseplay && (startnode==nodes && !o.repeat)){\n\t\t\t\t\tstop();\n\t\t\t\t}\n\t\t\t\t// New slide callback function\n\t\t\t\tif(!resume_seconds && started){\n\t\t\t\t\tthe_newslide_callback();\n\t\t\t\t}\n\t\t\t\tif(!started){\n\t\t\t\t\tstarted = true;\n\t\t\t\t}\n\t\t\t}", "function startEsperaTime(){\n if(startEspera)\n clearInterval(startEspera);\n\n startEspera= setInterval(updateTimeEspera, 1000); //essa funçao faz o delay em cada 1000 milisegundos actualiza o time\n }", "function setStartTime(newStart) {\n if (newStart < 0 || newStart < (snipWin / 2)) {\n songStart = 0;\n songEnd = snipWin;\n } else {\n songStart = parseFloat(newStart) - (snipWin / 2);\n songEnd = Math.abs(songStart) + snipWin\n }\n}", "function startSetTime() { \n if (t == 1) {\n sSetTime++;\n if (sSetTime > 59) { //When sSetTime reaches 1 minute it resets to 0 the mSetTime value increases by 1\n mSetTime++;\n sSetTime = 0;\n }\n if (mSetTime > 59) { //When mSetTime reaches 1 hour it resets to 0 the hSetTime value increases by 1\n hSetTime++;\n mSetTime = 0;\n }\n if (hSetTime > 23) { //When hSetTime reaches 24 hours its value resets\n hSetTime = 0;\n } \n }\n setTimeTO = setTimeout(function () { startSetTime() }, 1000); //1 second intervals\n }", "function Update () \n{\n\tif (Time.frameCount % 30 == 0)\n\t{\n\t System.GC.Collect();\n\t}\n\tif (eventdata==null)\n\t{\n\t\t//if ((Time.time > 5)&&(Time.time < 6)&&(ttt==0)) \n\t\t//{\n\t\t//\tttt=1;\n\t\t//\tLoadEvent(\"91\");\n\t\t//}\n\t\treturn;\n\t}\n\t\n\tif (toc==0)\n\t{\n\t\tTime.timeScale = 0;\n\t\treturn;\n\t}\n\t\n\tredraw_grid();\n\tredraw_marks();\n\t\n\tplaytime = playtime + Time.deltaTime;\n\t\n\t// load race\n\tif ((eventdata!=null)&&(typeof(eventdata[\"race\"])))\n\t{\n\t\tif (raceindex+1<eventdata[\"race\"].length)\n\t\t{\n\t\t\tif (playtime+60 > (parseFloat(eventdata[\"race\"][raceindex+1][\"start_time\"])-parseFloat(eventdata[\"start_time\"])))\n\t\t\t{\n\t\t\t\tLoadRace(raceindex+1);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// update boats\n\tfor (var idx = 0; idx < boatsorder.Count; idx++)\n\t{\n\t\tvar boat : GameObject = boats[boatsorder[idx]];\n\t\tvar boatdatascript:boatdata = boat.GetComponent(boatdata); \n \t\t\n \t\tboatdatascript.RecalculatePosition(playtime);\n \t\t\t\n \t\tvar sailed:float = boatdatascript.routeCompletedDistance + boatdatascript.routeCompletedTotalDistance;\n\t \t\t\n\t \tif (sailed > firstboatsailed)\n\t \t{\n\t \t\tfirstboatindex = idx;\n\t \t\tfirstboatsailed = sailed;\n\t \t}\n\t} \n\t\n\tif (firstboatindex > -1)\n\t{\t\t\t\n\t\tif (firstline!=null)\n\t\t{\n\t\t\tvar firstboat : GameObject = boats[boatsorder[firstboatindex]];\n\t\t\tvar firstboatscript:boatdata = firstboat.GetComponent(boatdata); \n\t\t\t\n\t\t\tvar boatfront:GameObject = firstboat.transform.Find(\"container/front\").gameObject;\n\t\t\t\n\t\t\tif ((firstboatscript.routeIndex >=0)&&(firstboatscript.routeIndex<firstboatscript.route.length))\n\t\t\t{\n\t\t\t\tvar firstboatrouteitem = firstboatscript.GetRouteItem(firstboatscript.routeIndex);\n\t\t\t\t\n\t\t\t\tfirstline.active = true;\n\t\t\t\t//firstline.transform.position.x = boatfront.transform.position.x;\n\t\t\t\t//firstline.transform.position.z = boatfront.transform.position.z;\n\t\t\t\t\n\t\t\t\tfirstline.transform.position.x = firstboatscript.routePointX/2;\n\t\t\t\tfirstline.transform.position.z = firstboatscript.routePointY/2;\n\t\t\t\tfirstline.transform.localScale.z = firstboatscript.routeA/10;\n\t\t\t\n\t\t\t\tfirstline.transform.eulerAngles.y = 180-getdirection_between_points(firstboatrouteitem[\"v1\"].x,firstboatrouteitem[\"v1\"].y,firstboatrouteitem[\"v2\"].x,firstboatrouteitem[\"v2\"].y);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfirstline.active = false;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (boats.Count>0)\n \t{\n\t \tvar navigator:GameObject = GameObject.Find(\"navigator\");\t\t\n \t \tnavigator.transform.position = Vector3.SmoothDamp(navigator.transform.position, boats[cameraboatindex].transform.position,velocity, 2.0f);\n\t\t//navigator.transform.position.z = Vector3.MoveTowards(navigator.transform.position.z, boats[cameraboatindex].transform.position.z, Time.deltaTime);\n\t\t\n\t}\n\t\n\t// wind update -- NUll value\n\t/*if (typeof(marker[\"wind\"]))\n\t{\n\t\tif (windindex<marker[\"wind\"].length)\n\t\t{\n\t\t\tvar wind:GameObject = GameObject.Find(\"navigator/wind\");\n\t\t\tif (wind) wind.transform.localRotation.eulerAngles.y = parseFloat(marker[\"wind\"][windindex][\"direction\"]);\n\t\t}\n\t\tif (windindex+1<marker[\"wind\"].length)\n\t\t{\n\t\t\tvar windtime = parseInt(marker[\"wind\"][windindex+1][\"time\"]);\n\t\t\tif (playtime > windtime) windindex = windindex + 1;\n\t\t\t//Debug.Log (windindex+\" \"+eventdata[\"wind\"].length+\" \"+playtime+\" \"+windtime);\n\t\t}\n\t}*/\n}", "function initiateAsccend(){\r\n //se quitan las colisionas dañinans con android1 / android2\r\n unsubscribe1();\r\n unsubscribe2();\r\n //velocidad de ascenso\r\n obj.setStaticVelY(-2.5);\r\n scene.time.addEvent({\r\n delay: 700,\r\n callback: () => (stop2(scene, obj))\r\n });\r\n //despues de 700 steps se para la apisonadora\r\n function stop2(){\r\n obj.sprite.setSensor(true)\r\n obj.setStaticVelY(0);\r\n //se reajusta su posicion\r\n obj.sprite.x = obj.initialX;\r\n obj.sprite.y = obj.initialY;\r\n //se vuelve a llamar a su metodo inicial con un delay de 200 steps pero con una n menor (hasta que n==0)\r\n scene.time.addEvent({\r\n delay: 2000,\r\n callback: () => (obj.startCycle(n-1, 0))\r\n });\r\n }\r\n }", "function begin(){\n interval = setInterval(animate, timeInt)\n}", "function timerStart(){\n\t\n\t\t\n\t}", "function start() {\n displayTZCountDown(setTZCountDown(month, day, hour, tz), lab);\n millisecondsEmulator();\n}", "function start(){\r\n\t\t// for now, start() will call _draw(), which draws all the objects on the stage\r\n\t\t// but in the next lesson, we'll add an animation loop that calls _draw()\r\n\t\t_draw(ctx);\r\n\t}", "start() {\n this.model = DaySchedulerModel;\n this.view = DaySchedulerView;\n\n this.model.start();\n\n this.view.currentDayText.show(this.model.getTodayText());\n\n this.view.eventBlocks.setCallbacks(\n () => DaySchedulerController.updateSchedule(),\n (hourBlock, event) => DaySchedulerController.addEvent(hourBlock, event)\n );\n this.view.eventBlocks.show();\n }", "function sync() {\n if (videos.b.media.readyState === 4) {\n videos.b.currentTime(\n videos.a.currentTime() + offsetSecond\n );\n }\n // 方法通知瀏覽器我們想要產生動畫,並且要求瀏覽器在刷新畫面前呼叫特定函數刷新動畫\n requestAnimationFrame(sync);\n }", "function startDataTime() {\n TimeHandler.addEventInterval(updateDataTime, 25, Infinity, data.time);\n}", "function begin()\n\t\t{\n\t\t\tcurrentRandomTimer = null;\n\t\t\tgenerateRandomSwim();\n\t\t} // end begin()", "function setTime(){\n let dt = new Date();\n currScene.timeInScene = dt.getTime();\n}", "function start (){ \r\nsetInterval(tickUpdate,12);\r\n}", "shiftView() {\n const stime = (configRepo.get(currentConfig).scenarioStartTime);\n const levent = scenarioRepo.getLastEventOf(currentScenario);\n const etime = levent == null ? stime : stime + levent.pointInTime;\n this.line.setWindow(stime, etime, null, function () {\n timeline.line.zoomOut(0.3)\n });\n }", "function startTime() {\n var timerInterval = setInterval(function() {\n secondsLeft--;\n cornerTimer.text(\"Time: \" + secondsLeft);\n \n if(secondsLeft <= 0) {\n clearInterval(timerInterval);\n allDone();\n }\n \n }, 1000);\n }" ]
[ "0.6834218", "0.6737481", "0.6436609", "0.6418372", "0.6414582", "0.64077926", "0.6360009", "0.63226986", "0.6284321", "0.6269062", "0.6234801", "0.6206289", "0.61557275", "0.6131043", "0.61040974", "0.6079186", "0.6052311", "0.6033709", "0.60205156", "0.6000109", "0.59807914", "0.59788036", "0.59739894", "0.59732246", "0.5970266", "0.5966906", "0.5966609", "0.5961496", "0.59481096", "0.5947994", "0.5933075", "0.5918345", "0.5904179", "0.5898167", "0.58927065", "0.58891344", "0.5884295", "0.5876882", "0.58764535", "0.58626366", "0.5860853", "0.58544916", "0.5839187", "0.58373654", "0.5819725", "0.5811519", "0.58114326", "0.5805856", "0.57940364", "0.57921046", "0.5790763", "0.5766745", "0.5756397", "0.5748273", "0.5743671", "0.57417434", "0.5736912", "0.57198894", "0.57162535", "0.5711482", "0.5707686", "0.5701395", "0.56959254", "0.5688937", "0.56807685", "0.56692666", "0.56638545", "0.56627893", "0.5655426", "0.5655426", "0.5655426", "0.5651733", "0.5649366", "0.5631687", "0.5631037", "0.56266105", "0.56247675", "0.5624176", "0.5617633", "0.5604868", "0.559545", "0.55908316", "0.55901587", "0.5582739", "0.5580859", "0.5580797", "0.55792636", "0.55781966", "0.5577356", "0.5576339", "0.5573936", "0.55645925", "0.55611724", "0.5560815", "0.5558461", "0.5558214", "0.555635", "0.55555844", "0.55498934", "0.5544908" ]
0.664933
2
expand events that have a definite ending onload
function klapp_expand_events_onload() { $('.timeline ol').each(function() { $('li', this).each(function() { var event_finish = $(this).attr('data-event-finish'); if( event_finish != undefined && event_finish != false ) { $('a', this).append('<div class="stretch onload"></div>'); var capsule_offset = 0; var event_height = $(this).attr('data-element-height'); var event_stretch = $(this).find('.stretch'); var previous_capsules = $(this).parents('.timecapsule').prevAll(); //get capsule offset if( previous_capsules != undefined && previous_capsules != false ) { $.each(previous_capsules, function(i, item) { capsule_offset = capsule_offset + parseInt( $(item).attr('data-element-height') ); }); } //get event offset var previous_events = $(this).prevAll(); var event_type_odd = false; var event_offset = 0; if( previous_events != undefined && previous_events != false ) { if( $(this).hasClass('odd') ) { event_type_odd = true; } $.each(previous_events, function(i, item) { if( event_type_odd && $(item).is('.odd') ) { event_offset = event_offset + parseInt( $(item).attr('data-element-height') ); } else if ( ! event_type_odd && $(item).is('.odd:not') ) { event_offset = event_offset + parseInt( $(item).attr('data-element-height') ); } }); } if(event_offset > 0) { event_offset = event_offset + 5; } //calculate and set stretch height $('.timecapsule').each(function() { var event_time = $(this).attr('data-event-time'); if( event_time == event_finish ) { var timecapsule_margin = 17; if( ! $(this).hasClass('empty') && ! $(this).hasClass('hide') ) { timecapsule_margin = 27; } var previous_capsules = $(this).prevAll(); var event_total_height = 0; if( previous_capsules != undefined && previous_capsules != false ) { $.each(previous_capsules, function(i, item) { event_total_height = event_total_height + parseInt( $(item).attr('data-element-height') ); }); } var stretch_height = event_total_height - (capsule_offset + event_offset + 1 - timecapsule_margin); $(event_stretch).css({'height': event_height, 'display': 'block', 'top': '0px'}).animate({'height': stretch_height + 'px'}, 1000); return false; } }); } }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPreExpandStarted(){}", "onloadend() {}", "onChildrenLoadEnd() {\n if (this._childrenLoadEnd) {\n this._childrenLoadEnd.raise();\n }\n }", "function completeOnTransitionEnd(ev) {\n if (ev.target !== this) return;\n transitionComplete();\n }", "function completeOnTransitionEnd(ev) {\n if (ev.target !== this) return;\n transitionComplete();\n }", "function _onload(ev) {\n _emit('load', [ev]);\n }", "function loadedEndedHandler(callback) {\n var nbEnd = 0;\n return function () {\n if (nbEnd == 1) {\n callback();\n }\n else { nbEnd++; }\n }\n }", "function completed( event ) {\n\t // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {\n\t detach();\n\t ready();\n\t }\n\t }", "onload() {}", "function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener || event.type === \"load\" || document.readyState === \"complete\") {\n detach();\n jQuery.ready();\n }\n }", "function onLoadHook() {\n g_finished_loading = true;\n initialUpdate();\n g_initial_collapsed = {};\n g_prev_entries = [];\n}", "loadComplete(event)\n {\n // Do something when loading is complete, for instance, switch the game state\n app.gotoScreen(\"menus\");\n\n // Start the music\n\t\tif(polishSettings.menuMusic)\n\t\t{\n\t\t\taudio.startMenuMusic();\n\t\t}\n }", "function $w_completed() {\r\n\tconsole.log(\"$w_completed\");\r\n\tif ($d.addEventListener || event.type === \"load\" || $d.readyState === \"complete\" ) {\r\n\t\t$w_detach();\r\n\t\tif(!Whaty.isReady){\r\n\t\t\tconsole.log(\"Whaty.isReady---:\"+Whaty.isReady);\r\n\t\t\tWhaty.isReady = true;\r\n\t\t\t$w_init();\r\n\t\t}\r\n\t}\r\n}", "function attachTransitionEndEvents() {\n $resizeElem.on(transEndEventNames.join(' '), function () {\n console.log(running);\n\n if (running === false) {\n running = true;\n resizeCallback();\n }\n });\n }", "function onLoadComplete() {\n}", "function loadComplete() {\n cnt--;\n if (!cnt) {\n execComplete();\n }\n }", "_onEnd() {}", "function delayedExpandedLayout() {\n\t//$(document).trigger('beforeExpand');\n\t$(document).trigger('adm_expand');\n}", "function delayedExpandedLayout() {\n\t//$(document).trigger('beforeExpand');\n\t$(document).trigger('adm_expand');\n}", "imageLoadListeners() {\n\t\tvar images = this.document.querySelectorAll(\"img\");\n\t\tvar img;\n\t\tfor (var i = 0; i < images.length; i++) {\n\t\t\timg = images[i];\n\n\t\t\tif (typeof img.naturalWidth !== \"undefined\" &&\n\t\t\t\t\timg.naturalWidth === 0) {\n\t\t\t\timg.onload = this.expand.bind(this);\n\t\t\t}\n\t\t}\n\t}", "function dispatchLoadedEvent () {\n\tlet ftNextLoaded = false;\n\tconst ftNextLoadedTrigger = () => {\n\t\tif (document.readyState === 'complete' && ftNextLoaded === false) {\n\t\t\tftNextLoaded = true;\n\t\t\twindow.dispatchEvent(new CustomEvent('ftNextLoaded'));\n\t\t\treturn true;\n\t\t}\n\t};\n\tif (!ftNextLoadedTrigger()) {\n\t\twindow.addEventListener('load', ftNextLoadedTrigger);\n\t\tdocument.onreadystatechange = ftNextLoadedTrigger;\n\t}\n}", "completeExpand() {\n toggle(this.element, true);\n this.requestMeasure();\n }", "function start_expanding() {\r\n setTimeout(change_cagle_thumbs, wait);\r\n}", "complete() {\n this.trigger('load_complete');\n }", "_animationDoneListener(event) {\n this._animationEnd.next(event);\n }", "function loadComplete() {\n\thasLoaded = true;\n}", "function completed() {\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\t\tdetach();\n\t\t\tjQuery.ready();\n\t\t}\n\t}", "function completed() {\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\t\tdetach();\n\t\t\tjQuery.ready();\n\t\t}\n\t}", "function expand_start() \n\t{\t\n\t\t$collapsed_panel.css({\n\t\t\t\"display\" : \"none\"\n\t\t});\n\t\t$expanded_panel.css({\n\t\t\t\"display\" : \"block\"\n\t\t});\t\n\t\t\n\t\t$expanded_panel.animate({\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t}, 500, function() \n\t\t{\n\t\t\tEnabler.finishExpand();\n\t\t});\n\t}", "_transitionendHandlerExpand() {\n let menu, container;\n\n if (arguments.length === 1) {\n if (arguments[0].propertyName === 'visibility') {\n return;\n }\n\n container = this;\n menu = container.menuItemsGroup.menu;\n }\n else {\n menu = arguments[0];\n container = arguments[1];\n }\n\n container.removeEventListener('transitionend', menu._transitionendHandlerExpand);\n container.style.height = null;\n menu._checkOverflow(menu.$.mainContainer, false, [menu.$.scrollButtonNear, menu.$.scrollButtonFar]);\n\n if (menu._minimized) {\n menu._browserBoundsDetection(menu.$.mainContainer);\n }\n\n if (menu._ensureVisibleOnTransitionend) {\n menu._ensureVisible(menu._ensureVisibleOnTransitionend);\n delete menu._ensureVisibleOnTransitionend;\n }\n\n delete menu._treeAnimationInProgress;\n }", "function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n detach();\n jQuery.ready();\n }\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n detach();\n jQuery.ready();\n }\n }", "function completed() {\r\n\r\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\r\n\t\tif (document.addEventListener ||\r\n\t\t\twindow.event.type === \"load\" ||\r\n\t\t\tdocument.readyState === \"complete\") {\r\n\r\n\t\t\tdetach();\r\n\t\t\tjQuery.ready();\r\n\t\t}\r\n\t}", "function SetupAfterAllLoaded() {\n /**\n * CHECK IMAGE LOADED -> IF LOADED COMPLETE THEN EXECUTE 'SLIDE-END'\n */\n slData.nImage = slData.nImage + 1;\n if (slData.nImage == slData.imageLen\n && (!slData.isVideoback || (slData.isVideoback && slData.isVideobackLoaded))) {\n setTimeout(function () {\n VariableModule(that);\n (slData['id'] == 'home') ? M.Module('LAYER').LoadHomeEnd()\n : that.LOAD.SlideEnd($slCur);\n }, 10);\n }\n }", "function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n detach();\n jQuery.ready();\n }\n}", "function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n detach();\n jQuery.ready();\n }\n}", "function _onAllJsIncludesDone() {\n\t\tinitNavigationMode();\n//\t\tSitoolsDesk.loadPreferences(this);\n\n\t\tthis.fireEvent('modulesLoaded');\n\t}", "onChildrenLoadStarted() {\n if (this._childrenLoadStarted) {\n this._childrenLoadStarted.raise();\n }\n }", "function AppendOnLoad(fx) { \n var old = window.onload;\n if (typeof old != 'function') { window.onload = fx; }\n else { window.onload = function() { old(); fx(); }; }\n }", "loadComplete() {\n // Nothing\n }", "function m_tt_SetOnloadFnc()\n{\n\tm_tt_AddEvtFnc(document, \"DOMContentLoaded\", m_tt_HideSrcTags);\n\tm_tt_AddEvtFnc(window, \"load\", m_tt_HideSrcTags);\n\tif(m_tt_body.attachEvent)\n\t\tm_tt_body.attachEvent(\"onreadystatechange\",\n\t\t\tfunction() {\n\t\t\t\tif(m_tt_body.readyState == \"complete\")\n\t\t\t\t\tm_tt_HideSrcTags();\n\t\t\t} );\n\tif(/WebKit|KHTML/i.test(navigator.userAgent))\n\t{\n\t\tvar t = setInterval(function() {\n\t\t\t\t\tif(/loaded|complete/.test(document.readyState))\n\t\t\t\t\t{\n\t\t\t\t\t\tclearInterval(t);\n\t\t\t\t\t\tm_tt_HideSrcTags();\n\t\t\t\t\t}\n\t\t\t\t}, 10);\n\t}\n}", "function loadSuccess(ev) {\n if (ev) {\n removeAllEventsFromDisplay();\n cosmo.view.cal.itemRegistry = ev;\n }\n cosmo.view.cal.itemRegistry.each(appendLozenge);\n // Update the view\n updateEventsDisplay();\n }", "function WindowOnload(e)\r\n{\r\n\t// Call every onload handler in the list.\r\n\tfor (var i = 0; i < window.onloadHandlers.length; i++)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\twindow.onloadHandlers[i](e);\r\n\t\t}\r\n\t\tcatch (ex)\r\n\t\t{}\r\n\t}\r\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}", "function completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}" ]
[ "0.6560426", "0.63730705", "0.61586577", "0.60685474", "0.60685474", "0.6028648", "0.59488493", "0.58742374", "0.5852475", "0.5846617", "0.5831434", "0.58073586", "0.58062196", "0.576401", "0.5733575", "0.57334316", "0.56999993", "0.5698674", "0.5698674", "0.56640816", "0.5657556", "0.56512696", "0.5625822", "0.5616122", "0.55941063", "0.55921906", "0.5587243", "0.5587243", "0.5584484", "0.5577986", "0.55521184", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.5519107", "0.55190164", "0.55116457", "0.550742", "0.5507008", "0.5507008", "0.54979414", "0.54926825", "0.54761404", "0.54726976", "0.5471609", "0.546131", "0.54583967", "0.5448299", "0.5448299", "0.5448299", "0.5448299", "0.5448299", "0.5448299", "0.5448299", "0.5448299", "0.5448299", "0.5448299", "0.5448299", "0.5448299", "0.5448299", "0.5448299", "0.5448299" ]
0.6265674
2
A method that loops through the array of letters and creates a new instance of Letter for each one
assignLetters() { for (let letter in this.wordArray) { let letterObj = new Letter(this.wordArray[letter]); // Push the new Letter object into the array this.array.push(letterObj); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Word(wordtoGuess) {\n this.lettersArray = wordtoGuess.split(\"\").map(function(char){\n return new Letter(char);\n });\n\n}", "function Word(wordtoGuess) {\n this.lettersArray = wordtoGuess.split(\"\").map(function(char){\n return new Letter(char);\n });\n\n}", "function createAlphabet(){\n // Creates an array with the letters of the alphabet\n let letters = 'abcdefghijklmnopqrstuvwxyz'.split('');\n for(let i in letters) {\n alphabet.append($(`<div class=\"alphabet\"><p>${letters[i].toUpperCase()}</p></div>`));\n }// for loop\n }// end createAlphabet", "function initAlphaArray() {\n this.length = 26;\n this[0] = \"A\";\n this[1] = \"B\";\n this[2] = \"C\";\n this[3] = \"D\";\n this[4] = \"E\";\n this[5] = \"F\";\n this[6] = \"G\";\n this[7] = \"H\";\n this[8] = \"I\";\n this[9] = \"J\";\n this[10] = \"K\";\n this[11] = \"L\";\n this[12] = \"M\";\n this[13] = \"N\";\n this[14] = \"O\";\n this[15] = \"P\";\n this[16] = \"Q\";\n this[17] = \"R\";\n this[18] = \"S\";\n this[19] = \"T\";\n this[20] = \"U\";\n this[21] = \"V\";\n this[22] = \"W\";\n this[23] = \"X\";\n this[24] = \"Y\";\n this[25] = \"Z\";\n}", "function generateAlphabet () {\n const letters = []\n for (let i = 0; i < 26; i++) {\n letters.push(String.fromCharCode(i + 97))\n }\n return letters\n}", "function makeLowerArray(){\n var letterArray = [];\n for(var i = 0; i < 26; i++){\n // lowercase letters have an ascii index of 97 - 122\n letterArray[i] = String.fromCharCode(97 + i);\n }\n return(letterArray);\n}", "constructor(words) {\n this.words = words;\n this.letters = [];\n }", "function letterGenerator(){\n\tconst letters = \"abcdefghijklmnopqrstuvwxyz\"; //string of possible letters\n\t\n\tlet randomLetters = []; //random letter array\n\t\n\twhile(randomLetters.length < 9 ){ //add a random letter while array length less than 9\n\t\trandomLetters.push(letters[Math.floor(Math.random() * 25)]);\n\t\t\n\t\tif(randomLetters.length === 9){ // if array size = 9, then check to see if there's enough consonants & vowels\n\t\t\tlet vowels = 0;\n\t\t\tlet consonants = 0;\n\t\t\trandomLetters.forEach((letter)=>{\n\t\t\t\tswitch(letter){\n\t\t\t\t\tcase \"a\":\n\t\t\t\t\tcase \"e\":\n\t\t\t\t\tcase \"i\":\n\t\t\t\t\tcase \"o\":\n\t\t\t\t\tcase \"u\":\n\t\t\t\t\t\tvowels++;\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsonants++;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif(vowels < 2 || consonants < 2){ // erase array if there are not enough vowels/consonants\n\t\t\t\trandomLetters = [];\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn randomLetters; // return array if length === 9 and vowels/consonants > 2\n\t\t\t}\n\t\t}\n\t}\n}", "function multiplesArray(letter) {\n var arrLetter = letter.split(\"\");\n var newLetter = \"\";\n\n for (var i = 0; i < arrLetter.length; i++) {\n if (arrLetter[i] !== arrLetter[0]) {\n newLetter += \"-\";\n }\n for (\n var j = 0; j < arrLetter[i].length + arrLetter.indexOf(arrLetter[i]); j++\n ) {\n newLetter += `${arrLetter[i]}`;\n }\n }\n return newLetter \n}", "function generateAlphabet(){\n var arr = [];\n for(var i = 97; i <= 122; i++){\n arr.push(String.fromCharCode(i));\n }\n return arr;\n }", "_addToWordLetterArray(thisKey){\n let startIndex = 0;\n let i;\n while((i = this._word.indexOf(thisKey,startIndex))> -1 ){\n this._wordLetter[i] = thisKey;\n startIndex = i+1;\n }\n }", "function createLetter () {\nrandLetter = possibleLetters[Math.floor(Math.random() * possibleLetters.length)];\nconsole.log(randLetter) }", "function genLetter() {\n return letters[Math.floor(Math.random() * letters.length)];\n }", "function Word(wordArr) {\n this.wordArr = wordArr;\n this.letters = [];\n \n\n this.makeWord = function(){\n for (var i = 0; i < wordArr.length; i++) {\n var let = new Letter(wordArr[i]);\n this.letters.push(let);\n }\n }\n // Displays the word\n this.showWord = function() {\n var wordDisplay = [];\n \n for (var i = 0; i < this.letters.length; i++) {\n wordDisplay.push(this.letters[i].displayLet());\n \n }\n \n return wordDisplay.join(' ');\n }\n\n //Equality comparer \n this.equals = function(word) {\n\n return this.toString() === word;\n }\n\n //returns a clean string of the underlying letters, forming a word\n this.toString = function() {\n var word = [];\n\n\n for(var i = 0; i < this.letters.length; i++) {\n word.push(this.letters[i].displayLet());\n }\n\n return word.join('');\n }\n\n //function that loops through the letters to see if there is a match\n //for each letter in the letters of the word.\n this.checkGuess = function(userGuess) {\n \n for (let i = 0; i < this.letters.length; i++) {\n this.letters[i].check(userGuess);\n }\n }\n\n \n}", "function Word(word) {\n this.letters = word.split(\"\").map(function(char) {\n return new Letter(char);\n });\n}", "function splitLetter() {\n for (var h = 0; h < nameLength; h++) {\n splitArray.push(chosenGame[h]);\n }\n return splitArray;\n}", "function Letter(){\n var letter = document.getElementById(\"letter\") .value;\n if (letter.length > 0){\n for (var i=0; i < randomWord.length; i++);{\n if (randomWord[i]=== letter){\n answerArray[i] = letter;\n }\n }\n }\n }", "function createBoard() {\r\n\r\n var randomWord = wordList[Math.floor(Math.random() * (77 -4) + 6)];\r\n generatedWord = randomWord.split(\"\");\r\n\r\n for(var i = 0; i < randomWord.length; i++){\r\n var letterElement = document.createElement(\"span\");\r\n letterElement.textContent = \"_\" ///player1SelectedWord[i];\r\n letterElement.id = \"letters\";\r\n //letterElement.style.letterspacing = \"2px\";\r\n wordsArea.appendChild(letterElement);\r\n }\r\n}", "function tableLetters(lett) {\n lett.forEach((val) => {\n let el = document.createElement(\"p\");\n el.className = \"letter\";\n el.textContent = val;\n el.addEventListener(\"click\", checkLetter);\n selectElement(\".alphabet\").append(el);\n });\n}", "function newRandomLetter() {\n randomLetter = letters[Math.floor(Math.random() * letters.length)];\n //console.log(randomLetter);\n}", "function createABC() {\n let abc = 'abcdefghijklmnopqrstuvwxyz'\n abc = abc.toLowerCase().split('')\n return abc\n}", "function stringWord() {\n for (var x = 0; x < letterObjects.length; x++) {\n var strings = [];\n var newStrings = letterObjects[x].guessLetter();\n strings.push(newStrings);\n // console.log(strings.join(\" \"));\n }\n }", "function sameStart(arr, letter) {\n\n}", "function Letters() {\n this.letters = \"abcdefghijklmnopqrstuvwxyz\";\n this.guesses = '';\n}", "function newLetter() {\n theLetter = letters[Math.floor(Math.random() * letters.length)];\n console.log(`Current letter: ${theLetter}`);\n}", "function Alphabet() {\n this.letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'ñ', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'á', 'é', 'í', 'ó', 'ú'];\n }", "function letterCombinations(arr) {\n // ...\n}", "function newWord2(choice) {\n\t\tcurWord.word = choice;\n\t\t// console.log(JSON.stringify(curWord, null, 2));\n\t\t// console.log(curWord.word);\n\t\tletters.reset();\n\t\tcurWord.word = curWord.word.trim();\n\t\tfor (var i = 0; i < curWord.word.length; i++) {\n\t\t\tletters.constructed[i] = new Letter(curWord.word[i]);\n\t\t\t// console.log(curWord.word[i]);\n\t\t}\t\t\t \t\t\n\t\tletterPicker();\n\t}", "function lowerLetters(){\n // start at the position of the first lowercase letter\n for (var i = 97; i <= 122; i++) {\n // push every lowercase letter from positions 97 to 122 into storedCharacters key\n answer.storedCharacters.push(String.fromCharCode(i));\n }\n}", "function randomize() {\r\n\r\n\tlet characterPos = Math.floor((Math.random() * characters.length));\r\n\tlet character = characters[characterPos];\r\n\r\n\tlet bgSize = Math.floor((Math.random() * 25) + 25);\r\n\r\n\tlet color = Math.floor((Math.random() * colors.length));\r\n\tlet bgColor = colors[color];\r\n\r\n\tlet fontSize = Math.floor((Math.random() * 15) + 10);\r\n\r\n\tlet speed = Math.floor((Math.random() * 5) + 2);\r\n\r\n\tlet position = Math.floor((Math.random() * 440) + 10);\r\n\r\n\tletters.push(new Letter(character, bgSize, bgColor, fontSize, speed, position));\r\n\r\n\r\n\t\r\n}", "function randomizeCharacters(word) {\n var charArray = word.split(\"\");\n var n = charArray.length;\n for(var i = n - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n var tmp = charArray[i];\n charArray[i] = charArray[j];\n charArray[j] = tmp;\n }\n $(\".letters\").text(charArray.join(\"\"));\n}", "function _createTile(letter) {\n return _.find(letterDistribution, function(tile) {\n return tile.letter === letter;\n });\n }", "function populateCharArr(){\n for(i = 0; i < characters.length; i++){\n charArr.push(characters[i].name);\n }\n }", "function createInputBoxes(random_word) {\n\n word_letters = random_word.split('');\n var letter_container = document.getElementById('letter_container');\n\n for (var i= 0; i < word_letters.length; i++){\n var div = document.createElement('div');\n div.className = 'letter ' + word_letters[i];\n letter_container.appendChild(div)\n }\n}", "function alphabet(){ \n randomletter = letters[getRandomInteger(0,27)];\n let string_length = getRandomInteger(5,26);\n for ( let i = 0; i < string_length; i++) {\n output = randomletter.repeat(string_length);\n };\n console.log(output);\n}", "function makeUpperArray(){\n var letterArray = [];\n for(var i = 0; i < 26; i++){\n // uppercase letters have an ascii index of 65 - 90\n letterArray[i] = String.fromCharCode(65 + i);\n }\n return(letterArray);\n}", "function playerCreate(characters){\n\tplayers = characters.map(function(letter, index){\n\t\treturn new Player(index, sanitizeInputs(letter));\n\t}); \n\treturn players;\n}", "function formWord (wordArray) {\n var word = \"\";\n for (var i = 0; i < wordArray.length; i++) {\n word += wordArray[i].letter;\n }\n\n return word;\n}", "function generate_array(arr_length){\n\n var test_data = [];\n var word_length = null;\n var char_array = [\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"];\n var index_of_char_array = null;\n var random_char = \"\";\n var new_word = \"\";\n\n//main loop, create test data array\n for(i = 0; i < arr_length; i++){\n\n var word = []\n\n word_length = Math.floor(Math.random() * 10) + 1;\n // console.log(\"word length for word in test data array at \" + i + \" is \" + word_length);\n\n for(index = 0; index < word_length; index++){\n\n index_of_char_array = Math.floor(Math.random() * 25) + 1;\n random_char = char_array[index_of_char_array];\n word[index] = random_char;\n // console.log(\"innermost loop, current state of word: \" + word[index]);\n\n };\n\n new_word = word.join(\"\");\n test_data[i] = new_word;\n // console.log(\"word in test data array at index \" + i + \" is \" + test_data[i]);\n\n }\n // console.log(\"test data array is \" + test_data);\n return test_data;\n}", "generateCharactersAvailable() {\n let randNumArray = [];\n for (i = 0; i < 4; i++) {\n let randNum = Math.floor(Math.random() * this.characterArray.length);\n while (randNumArray.includes(randNum)) {\n randNum = Math.floor(Math.random() * this.characterArray.length);\n };\n randNumArray.push(randNum);\n let newCharacter = new Character(this.characterArray[randNum]);\n newCharacter.index = i;\n this.availableCharacters.push(newCharacter);\n };\n }", "function setLetters() {\n\n var toreturn = \"\";\n var items = [];\n var unique = 0;\n var multiplicationFactor = 3;\n\n //generates all letters\n lettersUsed = 0;\n\n for (var i = 0; i < alphabet.length; i++) { //generating each list item.\n var contains = wordContains(i);\n if (contains) {\n if (inWord(i)) {\n unique++;\n }\n var thisObj = {};\n var returning = '<li class=\"letter\" ';\n\n returning += 'onclick=\"change(' + i + ')\" ';\n returning += 'id=li-' + i + ' \">' + alphabet[i] + '</li>';\n thisObj.id = i;\n thisObj.htmlValue = returning;\n thisObj.isUsed = false;\n items.push(thisObj);\n console.log('letter ' + alphabet[i] + ' added with html value of ' + thisObj.htmlValue);\n }\n\n }\n var order = [];\n if (unique < 4) {\n multiplicationFactor = 1;\n }\n for (var i = 0; i < items.length; i++) {\n var temp = (i * multiplicationFactor) % items.length;\n order.push(temp);\n\n }\n\n for (var i = 0; i < items.length; i++) {\n\n toreturn += items[order[i]].htmlValue;\n\n }\n\n document.getElementById('availableLetters').innerHTML = toreturn;\n\n}", "function eliminateDuplicates(pArray) {\n var auxLetters = [];\n\tvar lettersJson = {};\n\n\tfor (var letterPosition = 0; letterPosition < pArray.length; letterPosition++) {\n\t lettersJson[pArray[letterPosition]] = 0;\n\t}\n\n\tfor (letter in lettersJson) {\n\t auxLetters.push(letter);\n\t}\n\n\treturn auxLetters;\n}", "function Word(selectedWord){\n this.word = selectedWord;\n this.lettersArray = [];\n}", "addLetter(letter) {\n if (!this.alphabet.includes(letter)) {\n this.alphabet.push(letter);\n }\n this.alphabet.sort((a, b) => {\n return a > b;\n });\n }", "function Word(word) {\n // The map() method creates a new array.\n // it also calls the callback function in the parameter on every element in that array.\n // At the end, this.letters is a Word, which is an object that itself is an array of letter objects. \n //\n // Each \"letter\" object will consist of the \n // underlying character and a \"visible\" property. Non-alpha characters (like \".\") are visible by default;\n // alpha characters have to be guessed and so are not visible.\n this.letters = word.split(\"\").map((char) => {\n return new Letter(char); //Iterate over each char in Word and make each of them into a Letter object.\n //Each Letter has two properties: the character itself, and the \"visible\" property.\n });\n}", "function generateButtons(word) {\r\n\r\n for (let i = 0; i < letters.length; i++) {\r\n let currentLetter = letters[i];\r\n let b = new Button(currentLetter, word, game.underscore_list); // create a new button object\r\n\r\n letterButtons.push(b.btn);\r\n document.getElementById('letterButtonContainer').appendChild(b.btn);\r\n }\r\n}", "function gen_words_array(num_words) { \r\n\r\n\tvar word = \"\";\r\n var possible_char = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n var array_words =[];\r\n\r\n for (var i = 0; i < num_words; i++) {\r\n \t//console.log(i);\r\n num_letters = Math.floor(Math.random() * (10) + 1);\r\n //console.log(num_letters);\r\n for (var x= 0; x < num_letters; x++) {\r\n \tramdom_letter = \r\n \tword += possible_char.substr( Math.floor(Math.random() * (61)), 1);\r\n }\r\n array_words.push(word);\r\n word = \"\";\r\n }\r\n return array_words;\r\n}", "function genCharArray(charA, charZ){\n\t\tvar a = [\n\t\t], i = charA.charCodeAt(0), j = charZ.charCodeAt(0);\n\t\tfor(; i <= j; ++i) {\n\t\t\ta.push(String.fromCharCode(i));\n\t\t}\n\t\treturn a;\n\t}", "fillAlpha(arr) {\n\t\tconst alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''),\n\t\tstart = alpha.indexOf(arr[0]),\n\t\tend = alpha.indexOf(arr[arr.length-1]),\n\t\tfullAlpha = alpha.slice(start, end + 1);\t\t\n\n\t\treturn fullAlpha;\n\t}", "function repeatedLetter() {\n\n}", "function displayLetters(WordChosen){\n var letters = [];\n var underlines = [];\n for (let i=0;i<WordChosen.length;i++){\n letters[i] = document.createElement('h1');\n letters[i].innerHTML = WordChosen[i];\n letters[i].setAttribute(\"class\", WordChosen[i]);\n letters[i].style.display = 'inline-block';\n letters[i].style.visibility = 'hidden';\n letters[i].style.margin = '20px';\n letters[i].style.fontSize = '1em'\n document.getElementById('wordChosen').appendChild(letters[i]);\n underlines[i] = document.createElement('p');\n underlines[i].style.margin = '2px';\n underlines[i].innerHTML = '_';\n underlines[i].style.visibility = 'visible';\n underlines[i].style.fontSize = '1em'\n letters[i].appendChild(underlines[i]);\n }\n}", "function loadLettersLeftArray(elmnt) {\n var ltrToPlay = elmnt.target.textContent;\n //add the letter the user just selected to the letters Used Array.\n lettersUsed.push(ltrToPlay);\n lettersUsed.sort();\n //Build the letters used section of the screen.\n doLetterUsedWork();\n //Remove the letters played from the Letters available to play\n var letters = updateLettersAvailableList();\n clearLiFromList();\n //Create the links for the available letters that the user can select.\n var li = document.createElement('li');\n li.textContent = \"\";\n lettersLeft.appendChild(li);\n for (var index = 0; index < letters.length; index++) {\n var checkBtn = document.createElement('a');\n checkBtn.classList.add('letters-to-use');\n var letter = letters[index];\n checkBtn.textContent = ' ' + letter + ' ';\n li.appendChild(checkBtn);\n }\n lettersLeft.classList.value = letters.toString();\n isLetterInWord(ltrToPlay);\n}", "function createLetterHolders(inputWord) {\n for(let i = 0; i < inputWord.length; i++) {\n // Append div with 2 els, p & div to the word\n wordField.append(`<div class=\"letter-holder\">\n <p class=\"letter\">${inputWord[i]}</p><div class=\"dash\"></div>\n </div>`);\n $('.letter').hide();\n }// for loop\n }// end createLetterHolders func", "function createWords(array, string) {\n let wordLength = Math.ceil(Math.random() * 6);\n if (letterCount > 0) {\n string = string + \" \";\n totalWords++;\n }\n for (let i = 0; i < wordLength; i++) {\n let character = Math.floor(Math.random() * 15);\n string += array[character];\n letterCount++;\n }\n return string;\n}", "function showLetter(letter) {\n for (var i = 0; i < randomName.length; i++) {\n if (letter === lettersCurrentWord[i]) {\n dashesCurrentWord[i] = letter;\n console.log(dashesCurrentWord);\n }\n }\n document.getElementById(\"current-word\").innerHTML = dashesCurrentWord.join(\"\");\n}", "function addLetters(...letters) {\n let newArray = [];\n for(let i = 0; i < letters.length ; i ++){\n newArray.push(letters[i].charCodeAt(0)-96) ;\n }\n if(newArray.length === 0){\n return 'z'\n }\n let sum = newArray.reduce(function (a,b) {return a+b})\n while(sum > 26){\n sum -= 26;\n }\n let zoinks = sum + 96\n return(String.fromCharCode(zoinks))\n}", "function Word(sportWord) {\n this.wordArray = sportWord.split(\"\").map(eachLetter => { return new Letter(eachLetter) });\n // console.log(this.wordArray)\n\n this.stringz = function () {\n var underscoreWord = [];\n for (i = 0; i < this.wordArray.length; i++) {\n var wordString = this.wordArray[i].letterResult();\n underscoreWord.push(wordString);\n }\n console.log(underscoreWord.join(\" \").toString())\n }\n this.guessCheck= function (userLetter) {\n var hasBeenGuessed = false;\n for (i = 0; i < this.wordArray.length; i++) {\n if (this.wordArray[i].letterGuess(userLetter)) {\n hasBeenGuessed = true;\n \n } \n // else {\n // return false;\n // } \n }\n if (hasBeenGuessed) {\n return true;\n // console.log(\"true\")\n }\n else {\n return false;\n // console.log(\"false\")\n };\n }\n \n}", "generateLetters() {\n var alphabet = [\n 'a',\n 'b',\n 'c',\n 'd',\n 'e',\n 'f',\n 'g',\n 'h',\n 'i',\n 'j',\n 'k',\n 'l',\n 'm',\n 'n',\n 'o',\n 'p',\n 'q',\n 'r',\n 's',\n 't',\n 'u',\n 'v',\n 'w',\n 'x',\n 'y',\n 'z'\n ]\n // creates 26 divs containing the letters in the array above.\n for (var i = 0; i < alphabet.length; i++) {\n console.log('letterContainer')\n $('.letterSetContainer').append(\n `<button class=\"letter\" data-letter=\"${alphabet[\n i\n ]}\"><span class=\"innerLetter\">` +\n alphabet[i] +\n `</span></button>`\n )\n }\n\n // gives the divs \"clickability\" and tells you what button you are clicking on. Will also return true or false if the letter is in \"chosenWord\"\n $('.letter').one('click', e => {\n let letter = $(e.target).data('letter')\n console.log($(this))\n $(e.target).attr('disabled', 'disabled')\n $(e.target).css('background-color', 'red')\n this.checkLetter(letter)\n })\n }", "toString() {\n let string = \"\";\n // Loop through each letter object in the word array and cocatenate it with the empty string\n for (let i in this.array) {\n let LetterObj = this.array[i];\n // LetterObj will return an _ if the letter has not been guessed yet\n string += `${LetterObj} `;\n }\n // Display the built out string to the user\n console.log(string);\n }", "determineAvailableLetters(){\n let alphabet_string = 'abcdefghijklmnopqrstuvwxyz'\n let alphabet_array = alphabet_string.toUpperCase().split('')\n let available_letters = []\n\n if(this.props.chosen_letters.length > 0){\n for(let i = 0; i < alphabet_array.length; i++){\n if(!this.props.chosen_letters.includes(alphabet_array[i])){\n available_letters.push(alphabet_array[i])\n }\n }\n this.setState({\n available_letters: available_letters\n })\n } else {\n this.setState({\n available_letters: alphabet_array\n })\n }\n }", "function getAlphabetArray() {\n const result = [];\n for (i = a; i <= b; i++) {\n result.push(String.fromCharCode(i));\n }\n return result;\n}", "function genCharArray(charA, charZ) {\n var a = [], i = charA.charCodeAt(0), j = charZ.charCodeAt(0);\n for (i = charA.charCodeAt(0); i <= j; i++) {\n console.log(i);\n a.push(String.fromCharCode(i));\n }\n return a;\n}", "function populateLetters() {\n var $letters = '';\n var $word = '';\n var $left = 0;\n var $j, $max;\n var $letters_array = $dna_string_letters.split('');\n for (var $i = 0; $i < $letters_array.length/10; $i++) {\n $j = $i * 11;\n $max = $j + 10;\n $word = '';\n while ($j < $max) {\n $word += $letters_array[$j];\n $j++;\n }\n $letters += '<span>' + $word + '</span>'; \n }\n $('#letters').html($letters);\n}", "function addPhraseToDisplay(array) {\r\n for (let i = 0; i < array.length; i++) {\r\n var arri = array[i];\r\n var liLetter = document.createElement('li');\r\n randomUl.appendChild(liLetter);\r\n liLetter.innerHTML = arri;\r\n\r\n if (arri === ' ') {\r\n liLetter.className = 'space';\r\n } else {\r\n liLetter.className = 'letter';\r\n }\r\n }\r\n}", "function correctLetter(letter) {\n for (let key of keyboard) {\n if (key.textContent == letter) {\n key.classList.add(\"chosen\");\n key.disabled = true;\n }\n }\n}", "function stackLetters (theAlphabetArray) {\n\n var letters = \"\"; \n // empty string for new combinations (bucket)\n\n for (var i = 0; i < alphabet.length; i++){\n letters += alphabet[i];\n\n // console.log(\"letters inside of for loop\", letters );\n // console.log(\"each letter\", alphabet[i]);\n // console.log(\"type of\", typeof(alphabet[i]) );\n \n if ((i + 1) % 3 === 0) {\n letters += \" \";\n } \n\n // % means remainder, so i is the counter variable divided by 3 = zero; since it doesn't coincide\n // with every 3rd letter, that's why we use i + 1 first\n\n console.log(letters);\n }\n\n}", "function RandomArray(num) {\n var alph = \"abcdefghijklmnopqrstuvwxyz\"\n var newArray = []\n for (var i = 0; i < num; i++) {\n var randomWord = \"\";\n var strLength = Math.floor(Math.random()*10 + 1);\n for (var j = 0; j < strLength; j++) {\n var randomLetter = \"\";\n randomLetter = alph[Math.floor(Math.random() * alph.length)];\n newArray[i] = (randomWord += randomLetter);\n }\n }\n return newArray;\n}", "function addPhraseToDisplay(arr) {\n for (let i = 0; i < arr.length; i++) {\n\n let letter = arr[i];\n let li = document.createElement('li');\n\n li.textContent = letter;\n phrase_container.appendChild(li);\n\n if (li.textContent !== \" \") {\n li.className = \"letter\";\n } else {\n li.className = \"space\";\n }\n }\n}", "function createKeyboard() {\n for (i = 0; i < alphabet.length; i++) {\n letter = document.createElement(\"div\");\n letter.classList.add(\"letter\");\n letter.innerText = alphabet[i];\n letter.setAttribute(\"data-letter\", alphabet[i]);\n letter.addEventListener(\"click\", guessLetter);\n keyboard.appendChild(letter);\n imageLoop.setAttribute(\"src\", imagesArr[counter]);\n }\n ownWordButton.addEventListener(\"click\", displayInput);\n musicButton.addEventListener(\"click\", displayMusic);\n wordForm.addEventListener(\"submit\", setWord);\n}", "function createAlphabet() {\n if (alphabets.length > 0) {\n alphabets = [];\n }\n\n var strings = document.getElementById(\"patterns\").value.split(\",\");\n\n for (str = 0; str < strings.length; str++) {\n var chars = strings[str].split(\"\");\n for (char = 0; char < chars.length; char++) {\n if (alphabets.indexOf(chars[char]) === -1) {\n alphabets.push(chars[char]);\n }\n }\n }\n\n document.getElementById(\"alphabets\").value = alphabets;\n createTable();\n}", "function addPhraseToDisplay(arr) {\n // loop through array of characters\n for (let i = 0; i < arr.length; i++) {\n const letter = arr[i];\n // For each character, create a list item\n const item = document.createElement('li');\n // Put each character inside the list item\n item.textContent = letter;\n\n // Add the appropriate class to the list items\n if (letter !== \" \") {\n item.className = 'letter';\n } else {\n item.className = 'space';\n }\n\n // Append the list item to the DOM (specifically to the #phrase ul )\n ul.appendChild(item);\n }\n}", "function EnumLetter(Letter,Multiply)\n\t{\n\t\tfor ( let i=0;\ti<Multiply;\ti++ )\n\t\t\tPool.push(Letter);\n\t}", "function makeWordIntoArray() {\n for (var i=0, j=0; i<wordToGuess.length; i++) {\n printWord[j] = wordToGuess.charAt(i);\n j++\n if (wordToGuess.charAt(i) != \" \") {\n printWord[j] = false;\n } else {\n printWord[j] = true;\n }\n j++\n }\n}", "function generateTrie(array){\n trie = new TrieNode();\n for(let i = 0; i < array.length; i++) {\n let word = array[i];\n addWord(word);\n }\n}", "function newLetter() {\r\n \t computerGuess = computerLetters[Math.floor(Math.random() * computerLetters.length)];\r\n console.log(computerGuess);\r\n }", "function Letter(character){\n \n this.character = character;\n this.letterGuessed = false;\n this.toString = function(){\n if( this.letterGuessed ){\n return this.character;\n }\n else{\n return \"_ \";\n }\n };\n this.checkLetter = function(char){\n if( char === this.character ){\n this.letterGuessed = true;\n }\n }; \n\n}", "function randLetter() {\n var letters = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\n var letter = letters[Math.floor(Math.random() * letters.length)];\n return letter\n}", "function fillEmptyLetter(){\n\n var underline= [];\n var checkWin = word.length;\n var firstLetterValue;\n for(var i= 0; i <= word.length; i++){\n //get the letter from indice\n firstLetterValue = word.charAt(i);\n //verify the word if contains \n if(firstLetterValue == letter()){\n underline[i]= firstLetterValue;\n //count until the lenght of the word to win\n win = win +1;\n //set goodwords with the good letter\n underline.forEach((value,x ) =>{\n if(value == firstLetterValue){\n goodwords[i]= firstLetterValue;\n }\n \n //if is the same lenght the game is finished\n if(win == checkWin){\n alert('you won the game congratulations!!!, the word was ' + word);\n document.getElementById('restart').click();\n }\n })\n \n }\n }\n}", "function createLettersHtml() {\r\n var html = [];\r\n for (var i = 1; i < letters.length; i++) {\r\n if (html.length === 0) {\r\n html.push('<a class=\"all\" href=\"#\">'+ opts.allText + '</a><a class=\"_\" href=\"#\">0-9</a>');\r\n }\r\n html.push('<a class=\"' + letters[i] + '\" href=\"#\">' + ((letters[i] === '-') ? '...' : letters[i].toUpperCase()) + '</a>');\r\n }\r\n return '<div class=\"ln-letters\">' + html.join('') + '</div>' + ((opts.showCounts) ? '<div class=\"ln-letter-count listNavHide\">0</div>' : '');\r\n // Remove inline styles, replace with css class\r\n // Element will be repositioned when made visible\r\n }", "function getLetter() {\n const wordLetters = document.querySelectorAll('#current_word .letter-pressed');\n let arr = []\n for (let i = 0; i < wordLetters.length; i++) {\n arr.push(wordLetters[i].textContent);\n // console.log(i);\n }\n return arr\n}", "function makeArray(word) {\n var word_array = [];\n for (var i = 0; i < word.length; i++) {\n word_array.push(word.charAt(i));\n }\n return word_array;\n }", "function createWordArrays(array_length){\r\n \r\n var wordArray = [];\r\n var alphaString = 'abcdefghijklmnopqrstuvwxyz';\r\n\r\n\r\n if (array_length != 0) {\r\n for(var i = 0; i < array_length; i++) {\r\n randomWord = \"\";\r\n for (var j = 0; j < randomRange(1,10); j++) {\r\n randomWord += alphaString[randomRange(0,26)];\r\n }\r\n wordArray.push(randomWord);\r\n }\r\n }\r\n\r\n return wordArray;\r\n}", "function getAlphabet() {\n let a = [];\n for (let i = 'a'.charCodeAt(0); i <= 'z'.charCodeAt(0); i++) {\n a.push(String.fromCharCode(i));\n }\n return a;\n}", "function mixCharacters(array) {\n for (let i = array.length - 1; i > 0; i--) {\n let j = Math.floor(Math.random() * (i + 1));\n [array[i], array[j]] = [array[j], array[i]];\n }\n return array;\n}", "function nameGenerator(arr){\n var name = [];\n var x = ''; //variable initialized as string to store alphabets\n \n //Checks what alphabet is encoded for each number in the number's list\n for (var i = 0; i < arr.length; i++){\n if(arr[i] == 1){\n name.push('A'); \n }\n else if(arr[i] == 2){\n name.push('B'); \n }\n else if(arr[i] == 3){\n name.push('C'); \n }\n else if(arr[i] == 4){\n name.push('D'); \n }\n else if(arr[i] == 5){\n name.push('E'); \n }\n else if(arr[i] == 6){\n name.push('F'); \n }\n else if(arr[i] == 7){\n name.push('G'); \n }\n else if(arr[i] == 8){\n name.push('H'); \n }\n else if(arr[i] == 9){\n name.push('I'); \n }\n else if(arr[i] == 10){\n name.push('J'); \n }\n else if(arr[i] == 11){\n name.push('K');\n }\n else if(arr[i] == 12){\n name.push('L'); \n }\n else if(arr[i] == 13){\n name.push('M'); \n }\n else if(arr[i] == 14){\n name.push('N'); \n }\n else if(arr[i] == 15){\n name.push('O'); \n }\n else if(arr[i] == 16){\n name.push('P'); \n }\n else if(arr[i] == 17){\n name.push('Q'); \n }\n else if(arr[i] == 18){\n name.push('R'); \n }\n else if(arr[i] == 19){\n name.push('S'); \n }\n else if(arr[i] == 20){\n name.push('T'); \n }\n else if(arr[i] == 21){\n name.push('U'); \n }\n else if(arr[i] == 22){\n name.push('V'); \n }\n else if(arr[i] == 23){\n name.push('W'); \n }\n else if(arr[i] == 24){\n name.push('X'); \n }\n else if(arr[i] == 25){\n name.push('Y'); \n } \n else if(arr[i] == 26){\n name.push('Z'); \n }\n }\n \n //Combines all the alphabets to make one single word\n for (var i = 0; i < name.length;i++){\n x += name[i];\n }\n return x;\n}", "function letter(arr2, char){\n let arr = []\n for(let i = 0; i < arr2.length; i++){\n if (arr2[i].includes(char)) {\n arr.push(arr2[i])\n }\n }\n return arr\n}", "function addPhraseToDisplay (arr) {\n\n // Loop through picked phrase array and set as li elements (letters)\n for (let i = 0; i < arr.length; i++ ) {\n const li = document.createElement('li');\n li.innerHTML = arr[i];\n ul.appendChild(li);\n\n // If character is not a space add class of letter\n if (li.textContent !== ' ' ) {\n li.className = 'letter';\n } else {\n li.className = 'space';\n }\n }\n}", "function generate() {\r\n var b = [],\r\n i = [],\r\n n = [],\r\n g = [],\r\n o = [];\r\n var letters = [b,i,n,g,o];\r\n\r\n var bLetters = Array.from(document.getElementsByClassName(\"letterB\"));\r\n var iLetters = Array.from(document.getElementsByClassName(\"letterI\"));\r\n var nLetters = Array.from(document.getElementsByClassName(\"letterN\"));\r\n var gLetters = Array.from(document.getElementsByClassName(\"letterG\"));\r\n var oLetters = Array.from(document.getElementsByClassName(\"letterO\"));\r\n \r\n \r\n randomNumber(15, 1, bLetters);\r\n randomNumber(15, 16, iLetters);\r\n randomNumber(30, 16, nLetters);\r\n randomNumber(45, 16, gLetters);\r\n randomNumber(60, 16, oLetters);\r\n \r\n\t// for(let i = 0; i < letters.length; i+=1) {\r\n\t // let randomNum = Math.floor(Math.random() * 0 + 16);\r\n\t // nLetters[i].innerHTML = randomNum;\r\n\t// }\r\n \r\n //numDisplay.innerHTML = numbers;\r\n \r\n \t//console.log(bLetters.length);\r\n \r\n}", "function addPhraseToDisplay(arr) {\n for ( let i = 0; i < arr.length; i++ ) {\n const letter = arr[i];\n const li = document.createElement('li');\n const ul = document.querySelector('#phrase ul');\n li.textContent = letter;\n ul.appendChild(li);\n if(letter !== ' ') {\n li.className = 'letter';\n }\n else {\n li.className = 'space';\n }\n }\n}", "function splitLetters(word) {\n let content = word.textContent;\n word.textContent = \"\";\n let letters = [];\n\n for (let i = 0; i < content.length; i++) {\n let letter = document.createElement(\"span\");\n letter.className = \"letter\";\n\n if (content.charAt(i) === \"_\") {\n letter.style.opacity = \"0\";\n };\n\n letter.textContent = content.charAt(i);\n word.appendChild(letter);\n letters.push(letter);\n }\n \n wordArray.push(letters);\n }", "updateWordMap(word, wordMap, letter) {\n for (let i = 0; i < word.length; i++) {\n if (word[i] === letter) {\n wordMap[i] = letter;\n }\n }\n return wordMap;\n }", "function letters() {\r\n let random = Math.floor(Math.random() * 26);\r\n let randomLetter = characters.letter[random];\r\n return randomLetter;\r\n}", "function addPhraseToDisplay () {\n var letter=getRandomPhraseAsArray();\n for (var i= 0; i<letter.length; i++){\n if (letter[i] !== \" \"){\n var li=document.createElement(\"li\");\n li.appendChild(document.createTextNode(letter[i]));\n li.classList.add(\"letter\");\n ul.appendChild(li);\n } else {\n var li=document.createElement(\"li\");\n li.appendChild(document.createTextNode(letter[i]));\n li.classList.add(\"space\");\n ul.appendChild(li);\n }\n }\n return letter;\n}", "function selectLetter(){\n let alpha = [...alphabet];\n let guess = alpha.splice(alpha.indexOf(this.innerHTML), 1);\n checkGuess(this.innerHTML,currentWord,currentSolution);\n guesses.push(guess);\n printUsedLetters(guesses);\n letterArea.removeChild(this);\n }", "function newGame() {\n //reset all game info\n gameRunning = true;\n guessesLeft = 8;\n guessedLetterBank = [];\n incorrectLetterBank = [];\n pickedWordPlacholderArr = [];\n\n //picked a new word;\n pickedWord = wordBank[Math.floor(Math.random() * wordBank.length)];\n console.log(pickedWord);\n // console.log(guessesLeft);\n\n\n //newGame function to reset all stats, pick new word, and create placholders\n for (var i = 0; i < pickedWord.length; i++) {\n if (pickedWord[i] === ' ') {\n pickedWordPlacholderArr.push(' ');\n console.log(\"hi there\");\n } else {\n pickedWordPlacholderArr.push(\"__ \");\n console.log(\"from me too\");\n }\n }\n\n //write all new game info for the DOM (document object model)\n //how do I convert the numbers into letters? I tried this. thing. \n //I looked at several articles at like 6. .. My brain no worky good. \n\n\n $guessesLeft.textContent = guessesLeft;\n $placeholder.textContent = pickedWordPlacholderArr.join('');\n $guessedLetters.textContent = incorrectLetterBank.join(', ');\n}", "function addPhraseToDisplay(array) {\n // loop through array of characters\n\n for (let i = 0; i < array.length; i++) {\n // create list items\n\n const characters = array[i];\n const displayList = document.createElement('li');\n displayList.textContent = characters;\n phraseUl.appendChild(displayList);\n\n // add appropriate classes\n\n if (displayList.textContent !== ' ') {\n displayList.classList.add('letter');\n } else {\n displayList.classList.add('space');\n }\n }\n}", "function startGame() {\n // Randomly computer selects an array\n chosenName = bandNames[Math.floor(Math.random() * bandNames.length)];\n // make chosenname into an array\n newArray = chosenName.split('');\n // Calculate the amount of letters in the array\n nameLength = newArray.length;\n // sets the expected amount of letters to be guessed\n for (var i = 0; i < nameLength; i++) {\n emptyWord.push('_');\n }\n document.getElementById(\"chosenWord\").innerHTML = \" \" + emptyWord.join(\" \");\n}", "function breakWord (word, color) {\n var letters = [];\n for (var i = 0; i < word.length; i++) {\n var letter = { letter: word.charAt(i),\n color: color,\n score: getLetterScore(word.charAt(i)) };\n letters.push(letter);\n }\n\n return letters;\n}", "function setLetterByLetterIndex( params ){\n\n\t\tif( params.letterIndex < 0 ){\n\n\t\t\tparams.letterIndex += LETTERS.length\n\t\t\tparams.octaveIndex --\n\t\t}\n\t\tif( params.letterIndex >= LETTERS.length ){\n\n\t\t\tparams.letterIndex -= LETTERS.length\n\t\t\t// Next line commented out but left in as a reminder\n\t\t\t// that it would cause G♯ conversion to A♭\n\t\t\t// to jump up an entire octave for no good reason!\n\t\t\t//params.octaveIndex ++\n\t\t}\n\t\tparams.letter = LETTERS.substr( params.letterIndex, 1 )\n\t\treturn params\n\t}", "constructor(arr) {\n //I assume we go for performance here, so instead of\n //words = arr.map((str)=>str.split('')); I'll do\n words = new Array(arr.length);\n const len = arr.length;\n for (let i = 0; i < len; i++) {\n words[i] = arr[i].split('');\n }\n }" ]
[ "0.67379665", "0.67379665", "0.6594558", "0.6523145", "0.6453985", "0.6391814", "0.631034", "0.6306251", "0.62300676", "0.618791", "0.6148416", "0.609464", "0.60147965", "0.60133266", "0.60072047", "0.5962573", "0.59476125", "0.59463865", "0.59428006", "0.5938534", "0.591436", "0.5865214", "0.583706", "0.58022994", "0.5800477", "0.5790605", "0.57852167", "0.57773846", "0.5765025", "0.5742717", "0.5728431", "0.5710809", "0.5702906", "0.5691663", "0.56895053", "0.568668", "0.5680622", "0.5675985", "0.5671585", "0.5666477", "0.5661372", "0.56499505", "0.56491226", "0.56490797", "0.56341267", "0.5627837", "0.5611301", "0.56002194", "0.5599987", "0.55948645", "0.5589781", "0.5583988", "0.55794096", "0.55763936", "0.55699456", "0.55672634", "0.5566038", "0.55580103", "0.5555356", "0.55551845", "0.5553441", "0.55502063", "0.5544011", "0.5543524", "0.553396", "0.5531943", "0.5526286", "0.5522312", "0.5518402", "0.5507881", "0.5502575", "0.54935545", "0.5486743", "0.5479124", "0.5474501", "0.5455981", "0.5452399", "0.54495776", "0.5444372", "0.54371697", "0.5436761", "0.54311407", "0.54300404", "0.5427521", "0.5422966", "0.5410313", "0.54083395", "0.5404558", "0.54040694", "0.53948", "0.5384874", "0.5380226", "0.5374105", "0.5363358", "0.53623766", "0.53613967", "0.5360934", "0.535233", "0.5347696", "0.5344028" ]
0.77935785
0
This method creates the word that is displayed to the user in the terminal, filled with _ or correctly guessed letters
toString() { let string = ""; // Loop through each letter object in the word array and cocatenate it with the empty string for (let i in this.array) { let LetterObj = this.array[i]; // LetterObj will return an _ if the letter has not been guessed yet string += `${LetterObj} `; } // Display the built out string to the user console.log(string); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateDispWord(){\n dispWord = \"\"; // Reset the displayed string so it can be rebuilt\n for(var i = 0; i < guessWord.length; i++){ //Loop through the current random word\n if(correctGuesses.indexOf(guessWord[i]) > -1){ // If a letter in the random word has been guessed correctly, reveal it\n dispWord = dispWord + guessWord[i] + \" \";\n } \n else {\n dispWord = dispWord + \"_ \"; // If a letter has not been guessed yet, continue to mask it\n }\n }\n return dispWord;\n}", "function generateUnderscore() {\n let builtWord = \"\";\n for(let i = 0; i < choosenWord.length; i++) {\n var guessed = false;\n for(var j = 0; j < guessedLetters.length; j++){\n if (guessedLetters[j] == choosenWord[i]){\n guessed = true;\n }\n }\n\n if(guessed){\n builtWord += choosenWord[i]\n }\n else{\n builtWord += \"_\";\n }\n\n }\n return builtWord;\n}", "function mysteryWordGenerator() {\n unknown.forEach((x) => {\n if (x != \" \") {\n underscores.push(\"_\");\n } else {\n underscores.push(\" \");\n }\n });\n\n console.log(underscores);\n document.getElementById(\"mysteryWord\").innerHTML = underscores.join(\"\");\n}", "function createWordPlaceholder(word) {\n var wordPlaceholder = [];\n //Replace placeholder array with underscore corresponding to each letter of the word\n for (i = 0; i < word.length; i++) {\n wordPlaceholder.push(\"_\");\n };\n\n // Join the underscores together and display as a string \n wordPlaceholderString = wordPlaceholder.join(\" \");\n\n // Display undescores in UI correspoding to the length of the randonnly selected word \n document.getElementById(\"word-placeholder\").textContent = wordPlaceholderString;\n return wordPlaceholder;\n}", "function createWord() {\n\tconsole.log(\"createWord\", word);\n\tword = document.getElementById(\"secretWord\").value;\n\tword = word.toUpperCase();\n document.getElementById(\"displayClue\").innerHTML = word;\n\tanswerArray=word.split();\n\tcreateSpaces();\n}", "function createWord() {\n console.log(newAnswer);\n for (i = 0; i < newAnswer.length; i++) {\n emptyWord.push(\"_\");\n document.getElementById(\"empty-word\").innerHTML = emptyWord.join(\" \");\n }\n console.log(emptyWord);\n }", "function writeWord(){\n var letterOrDash = \"\";\n var allLettersGuessed = true;\n\n for(var i=0; i<randWord.length; i++){\n if(guesses.includes(randWord.charAt(i))){\n letterOrDash += randWord.charAt(i) + \" \";\n }\n else{\n letterOrDash += \"_ \";\n allLettersGuessed = false;\n }\n\n document.getElementById(\"writeWord\").innerHTML = letterOrDash;\n }\n\n if (allLettersGuessed === true){\n win++;\n endGame(true);\n\n }\n}", "function dashedString(word) {\n for (let i = 0; i < word.length; i++) {\n guessString[i] = '_';\n }\n}", "function newWord(num) {\n guesses = 8;\n document.querySelector(\".guesses\").innerHTML = guesses;\n position = [];\n guessedLetters = [];\n document.querySelector(\".letters-guessed\").innerHTML = guessedLetters.join(\" \");\n word = words[num].split(\"\");\n for (var i=0; i<word.length; i++) {\n position.push(\"_\");\n }\n document.querySelector(\".position\").innerHTML = position.join(\" \");\n\n document.onkeyup = function(event) {\n if (event.keyCode >= 65 && event.keyCode <= 90) {\n userGuess = String.fromCharCode(event.keyCode).toUpperCase(); \n checkGuess(userGuess);\n } \n else {\n document.querySelector(\".error\").innerHTML = \"Press a letter, homie\";\n }\n }\n }", "function renderNewWord() {\n\n // random word generator\n var random = Math.floor(Math.random() * wordLength.length);\n\n // get a random word and clear the string display\n let word = wordLength[random];\n wordDisplayString.innerHTML = \"\";\n\n // for each character in the word array create a 1 char span\n word.split(\"\").forEach(character => {\n const characterSpan = document.createElement(\"span\");\n characterSpan.innerText = character;\n wordDisplayString.appendChild(characterSpan);\n })\n\n // set input to null and focus it\n wordInput.value = null;\n wordInput.focus();\n }", "function buildWord(userInput) {\n\n // Initialize placeholder array with underscore array\n if (prevPlaceholderArray.length == 0) {\n placeholderArray = createWordPlaceholder(word);\n // Display letters and underscores \n } else {\n placeholderArray = prevPlaceholderArray;\n }\n\n // Replace underscore with matching letter\n for (i = 0; i < word.length; i++) {\n if (userInput == word[i]) {\n console.log(userInput + \"in word at\" + i)\n placeholderArray[i] = userInput;\n }\n }\n prevPlaceholderArray = placeholderArray;\n\n // Convert placeholder array to string to display in UI\n placeholder = placeholderArray.join(\" \");\n document.getElementById('word-placeholder').innerHTML = placeholder;\n\n if (placeholder == word.join(\" \")) {\n \twins++;\n document.getElementById('win-count').innerHTML = wins;\n // Calls function to Restart game\n restartGame(); \n }\n}", "function underline(){\r\n\r\n underscore = [];\r\n for(let i=0;i<theWord.length;i++){\r\n underscore.push('_');\r\n }\r\n document.getElementById('wordToGuess').textContent= underscore.join(\" \");\r\n\r\n document.getElementById('lives').textContent=guesslift;\r\n}", "function pickWord() {\n //Randomly picks one word from wordList\n word = wordList[Math.floor(Math.random() * wordList.length)]\n //Splitting word by each character and placing it into the empty wordToGuess array\n wordToGuess = word.split(\"\");\n console.log(word);\n //Creating the blank spaces for the guessable word\n for(var i = 0; i < wordToGuess.length; i++) {\n displayWord.push(\"_\");\n }\n var wordDisplay = displayWord.join(\" \");\n document.getElementById(\"word-to-guess\").innerHTML = wordDisplay;\n}", "function init() {\n //picks a random number and matches it to a letter\n currentWord = words[Math.floor(Math.random()*words.length)];\n wordHint.textContent = currentWord.split(\"\").map(letter => letter = \"__\").join(\" \");\n}", "function generateEasy(easyWords) {\n temp = \"\"\n $.getJSON(easyWords, function(data) {\n let wordVal = Math.floor(Math.random() * data.length)\n actual = data[wordVal].word.toUpperCase()\n for (let i = 0; i < actual.length; i++) {\n if (actual.substring(i, i + 1) == \" \") {\n temp += \" \"\n } \n else {\n temp += \"_\"\n }\n }\n $(\".easy\").text(temp)\n })\n}", "function showTheWord() {\n // get random word then store it in the global var theWord\n theWord = getRandomWord().split(''); // make it into array\n\n // place underscore referencing the number of letters\n for (var i = 0; i < theWord.length; i++) {\n $(\"#letterHolder\").append($(\"<span class='theWord' data-letter=\" + theWord[i] + \">_</span>\"));\n }\n }", "function plantSpaces() {\n for (var i = 0; i < chosenWord.length; i++) {\n unknown[i] = \" _ \";\n }\n\n preparePlantingSpaces();\n}", "function startGame() {\n // Randomly computer selects an array\n chosenName = bandNames[Math.floor(Math.random() * bandNames.length)];\n // make chosenname into an array\n newArray = chosenName.split('');\n // Calculate the amount of letters in the array\n nameLength = newArray.length;\n // sets the expected amount of letters to be guessed\n for (var i = 0; i < nameLength; i++) {\n emptyWord.push('_');\n }\n document.getElementById(\"chosenWord\").innerHTML = \" \" + emptyWord.join(\" \");\n}", "function newWord() {\r\n selected = Math.floor(Math.random() * words.length);\r\n word = words[selected].split('');\r\n length = word.length;\r\n letterSpan = [];\r\n lives = 10;\r\n letterString = \"\";\r\n finished = true,\r\n disableInput = false;\r\n\r\n livesContainer.style.width = lives*40 +\"px\"\r\n wordContainer.innerHTML = \"\";\r\n document.getElementsByTagName(\"html\")[0].className = \"\";\r\n\r\n //Remove the disabled-class from all buttons\r\n for(i = 0; i <= 25; i++){\r\n buttons[i].className = \"\";\r\n }\r\n\r\n //Create a <span> for each char of the word and replace it with _\r\n for (i = 0; i < length; i++) {\r\n letterSpan[i] = document.createElement(\"span\");\r\n letterSpan[i].innerHTML = \"_\";\r\n wordContainer.appendChild(letterSpan[i]);\r\n }\r\n }", "function wordGenerator() {\n randomWord = wordList[Math.floor(Math.random() * wordList.length)];\n // console.log(\"Computer Picked: \" + randomWord);\n letters = randomWord.split('');\n console.log(letters);\n // display length of the random word selected as underscores\n hiddenWord = [];\n for (var i = 0; i < randomWord.length; i++) {\n hiddenWord.push(\"_\");\n console.log(\"computer picked: \" + randomWord);\n // push those underscores to an html element so it displays on the page\n document.getElementById(\"randomWord\").innerText = hiddenWord.join(' ');\n };\n}", "function guessedWord() {\n wordStatus = answer.split('').map(letter => (guessed.indexOf(letter) >= 0 ? letter : \" _ \")).join('');\n\n document.getElementById('wordSpotlight').innerHTML = wordStatus;\n}", "function createAnswer(){\n for (var i = 0; i < toGuess.length; i++) {\n answer[i] = \" _ \";\n if (toGuess.charAt(i) === \" \") {\n answer[i]=\" \";\n alreadyGuessed++;\n }\n }\n printAnswer();\n}", "function newWord(word) {\n mysteryWord = new Word(word);\n mysteryWord.guess(\" \");\n goalWord = word;\n goalWord = goalWord\n .split(\"\")\n .join(\" \")\n .concat(\" \");\n}", "function newWord() {\n\n //Picks a random word from our list\n gameWord = wordJar[Math.floor(Math.random() * wordJar.length)];\n\n //Should stop the same word from being chosen twice in a row.\n if (gameWord === previousWord) {\n newWord();\n }\n\n\n //Loops through the gameWord and creates an array of underscores\n for (var i = 0; i < gameWord.length; i++) {\n answerWord[i] = \"_\";\n }\n\n //Displays the word as underscores. innerHTML should prevent a shorter word from not displaying properly on new game.\n document.getElementById(\"underscore-word\").innerHTML = answerWord.slice(\"\").join(\" \");\n console.log(\"gameWord: \", gameWord); //Dev tools cheatcodes.\n\n //Displays the ammount of guesses remaining.\n document.getElementById(\"remaining-guesses\").innerHTML = (\"Guesses Remaining: \" + wrongGuesses);\n\n remainingLetters = answerWord.length; //Sets the variable remaining letter to the length of our word.\n console.log(\"Remaining Letters: \", remainingLetters);\n}", "function guessedWord() {\r\n wordStatus = answer.split('').map(letter => (guessed.indexOf(letter) >= 0 ? letter : \" _ \")).join('');\r\n\r\n document.getElementById('wordSpotlight').innerHTML = wordStatus;\r\n}", "function createWord(wordArray) {\n word = wordArray[Math.floor(Math.random() * wordArray.length)];\n //Create placeholder for word in UI\n createWordPlaceholder(word);\n return word;\n}", "function createWord() {\r\n let randomNumber = Math.floor(Math.random()*wordList.length);\r\n let wordObject = wordList[randomNumber];\r\n\r\n //definitionText.style.visibility=\"hidden\";\r\n document.getElementById('definition').innerHTML = wordObject.definition;\r\n\r\n\r\n return wordObject.name.toUpperCase(); // to pass to letter buttons\r\n}", "displayWord(word,letters){\n\tlet dWord = '';\n\tfor(let i=0; i< word.length; i++){\n\t\tif (letters.indexOf(word[i]) === -1) {\n\t\t\tdWord = dWord + '_';\n\t\t} else {\n\t\t\tdWord = dWord + '' + word[i];\n\t\t}\n\t}\n\treturn dWord;\n}", "function newGame() {\n lettersGuessed = []; //Empty array for guessed letters\n document.getElementById(\"lettersGuessed\").innerHTML = lettersGuessed.join(\" \");\n guessingWord = []; //Combination of \"_\" and letters player has guessed to build word\n document.getElementById(\"remainingGuesses\").innerHTML = remainingGuesses;\n //Display wins\n document.getElementById(\"winsTotal\").innerHTML = wins;\n\n //Display Remaining Guesses\n document.getElementById(\"remainingGuesses\").innerHTML = remainingGuesses;\n\n //Generate the current word\n currentWord = gameWords[Math.floor(Math.random() * gameWords.length)];\n currentWordLetters = [currentWord.split(\"\")];\n\n //Represent currentWord using \" _ \"\n for (i = 0; i < currentWord.length; i++) {\n guessingWord.push(\" _ \");\n };\n document.getElementById(\"currentWord\").innerText = \"\";\n for (j = 0; j < guessingWord.length; j++) {\n document.getElementById(\"currentWord\").innerText += guessingWord[j];\n };\n}", "function createSpan() {\n for (var i = 0; i < chosenWord.length; i++) {\n if (!/[a-zA-Z0-9]/.test(chosenWord[i])) {\n var whiteSpace = $(\"<span>\").addClass(\"letter\").html(chosenWord[i]);\n if (/\\s+/.test(chosenWord[i])) {\n $(\"#hang-word\").append(whiteSpace);\n $(\"#hang-word\").append($(\"<br>\"));\n } else {\n $(\"#hang-word\").append(whiteSpace);\n }\n } else {\n var letter = document.createElement(\"span\");\n letter.innerHTML = `_`;\n letter.className = \"letter\";\n letter.id = `letter${i}`;\n \n $(\"#hang-word\").append(letter);\n }\n }\n $(\"#hint-img\").attr(\"src\", chosenImg).show();\n}", "_constructDisplayWord(){\n let displayWord = \"\";\n for (let i=0;i<this._wordLetter.length;i++){\n if (this._wordLetter[i] == true){\n displayWord += \"&nbsp;&nbsp;&nbsp;\";\n }else if(this._wordLetter[i] == false){\n displayWord += \"_&nbsp;\"\n }else{\n displayWord += this._wordLetter[i]+\"&nbsp;\";\n }\n }\n return displayWord;\n }", "function newGame() { \n gameRunning = true;\n guessesLeft = 10\n guessedLetterBank = [];\n incorrectLetterBank = [];\n pickedWordPlaceholderArr = [];\n \n //mystery word chosen at random\n pickedWord = mysteryWords[Math.floor(Math.random() * mysteryWords.length)];\n console.log(\"Mystery Word is: \"+ pickedWord);\n //create underscores based on length of mystery word\n for (var i=0; i< pickedWord.length; i++) {\n if (pickedWord[i] === ' ') {\n pickedWordPlaceholderArr.push(' ');\n } else {\n pickedWordPlaceholderArr.push('_');\n }\n }\n console.log(pickedWordPlaceholderArr)\n //write all new game info to DOM\n $guessesLeft.textContent = guessesLeft;\n $placeholders.textContent = pickedWordPlaceholderArr.join(' ');\n $guessedLetters.textContent = incorrectLetterBank;\n}", "function fillTheBlanks( word ) {\n console.log(\"Blanking word\");\n /*\n * Global variable blankedWord so we can use it to replace single\n * letters as they are guessed\n */\n window.blankedWord = [];\n\n for ( var letters = 0; letters < word.length; letters++ ) {\n blankedWord.push(\"_\");\n }\n\n return blankedWord;\n }", "function addUnderscores(chosenWord) {\n console.log();\n var wordLength = chosenWord.length;\n var underscores = \"_\";\n\n // for (var i = 0; i < chosenWord.length; i++) {\n // var span = document.createElement(\"span\");\n // span.innerHTML = \"_ \";\n // underscoresContainer.appendChild(span);\n // }\n\n // refresh after every game\n var remainingGuesses = 11;\n var guessesAllowed = 11;\n var letterChoice = [];\n var wrongGuesses = [];\n\n // fill in blanks and letters (question as to whether necessary given code on line 58-66)\n\n for (var i = 0; i < chosenWord.length; i++) {\n blanksAndLetters.push(\"_\");\n }\n underscores = blanksAndLetters.join(\" \");\n underscoresContainer.innerHTML = underscores;\n\n // testing in console\n\n console.log(chosenWord);\n console.log(underscores);\n console.log(lettersOfWord);\n return underscores;\n}", "function insertWord(scrambled) {\n\t\n\tscrambledArray = scrambled.split(\"\");\n\t\n\t//insert individual letters\n\tfor (var i=0; i<scrambledArray.length; i++) {\n\n\t\tvar letter = document.getElementById(\"letter\" + String(i+1));\n\n\t\tletter.innerHTML = scrambledArray[i].toUpperCase();\n\t}\n}", "function newWord() {\n $('#word_hint').html(words[Math.floor((Math.random() * words.length))]);\n resetTimer();\n vrtionary.ultimateClear();\n vrtionary.setTeamTime(30);\n}", "function gameWord() {\n \n remainingGuesses = 12;\n correctGuesses = 0;\n letterBlanks = [];\n wrongLetters = [];\n\n randomWord = wordList[Math.floor(Math.random() * wordList.length)];\n\n console.log(randomWord);\n\n// Display characters of the random game word as blanks on screen\n \n for (var i = 0; i < randomWord.length; i++) {\n\n letterBlanks.push(\"_\");\n };\n \n document.getElementById(\"wordBlanks\").textContent = letterBlanks.join(\" \");\n \n\n console.log(letterBlanks)\n\n }", "function newWord2(choice) {\n\t\tcurWord.word = choice;\n\t\t// console.log(JSON.stringify(curWord, null, 2));\n\t\t// console.log(curWord.word);\n\t\tletters.reset();\n\t\tcurWord.word = curWord.word.trim();\n\t\tfor (var i = 0; i < curWord.word.length; i++) {\n\t\t\tletters.constructed[i] = new Letter(curWord.word[i]);\n\t\t\t// console.log(curWord.word[i]);\n\t\t}\t\t\t \t\t\n\t\tletterPicker();\n\t}", "function printToPage(randomWord) {\n myWord = randomWord.word;\n // concatenate array to Str for printing on one line\n var myStr = '';\n console.log(myWord);\n for (var i = 0; i < myWord.length; i++){\n if (correctGuesses.includes(myWord[i])) {\n myStr += (\" \" + myWord[i] + \" \");\n }\n else {\n myStr += (\" _ \");\n }\n };\n console.log('\\n' + myStr + '\\n');\n if (correctGuesses.length == myWord.length) {\n console.log(\"GG bro\");\n }\n else {\n promptUser();\n };\n \n}", "function start() {\n word = wordList[Math.floor(Math.random() * wordList.length)];\n counter = 10;\n document.getElementById(\"counter\").innerHTML = counter;\n for (i = 0; i < word.length; i++) {\n letters[i] = \"__\";\n }\n // get rid of the comma in the answer section\n document.getElementById(\"answer\").innerHTML = letters.join(\" \");\n console.log(word);\n\n}", "function generateUnderScore() {\n for (var i=0; i < chosenWord.length; i++) {\n underScore.push('_');\n $underScore.textContent = underScore.join(' ');\n };\n}", "function newGame() {\n // reset all game info\n gameRunning = true;\n guessesLeft = 8;\n guessedLetterBank = [];\n incorrectLetterBank = [];\n pickedwordPlaceholderArr = [];\n\n // pick new word\n\n pickedWord = wordBank[Math.floor(Math.random() * wordBank.length)];\n\n // create placehold out of the new pickedword\n\n for( var i = 0; i< pickedWord.length; i++) {\n if(pickedWord[i] === ' ') {\n pickedwordPlaceholderArr.push(' '); \n }else{\n pickedwordPlaceholderArr.push('_');\n }\n }\n// all new game into the DOM\n\n$guessesLeft.textContent = guessesLeft;\n$placeholders.textContent = pickedwordPlaceholderArr.join('');\n$guessedletters.textContent = incorrectLetterBank;\n}", "function addSpaces(randomWord) {\n for (var i = 0; i < randomWord.length; i++) {\n if (randomWord[i] != \" \") {\n $(\"<span class='letters'>\").text(\"_ \").appendTo(\"#chalk\");\n } else {\n $(\"<span class='letters'>\").html('&nbsp&nbsp&nbsp;').appendTo(\"#chalk\");\n winCounter++;\n }\n }\n}", "function playGame() {\n //get random secret word\n secretWord = (hangmanWords[Math.floor(Math.random() * hangmanWords.length)]).toUpperCase();\n //make secret word into an array\n secretWordArray = secretWord.split(\"\");\n\n //get number of letters to replace with underscores\n underscores = secretWord.length;\n for (var i = 0; i < underscores; i++) {\n underscoreArray[i] = \"_\";\n }\n $(\"#secretWordOutput\").text(underscoreArray.join(\" \"));\n $(\"#wrongGuessesOutput\").hide();\n }", "function letterCheck() {\n unknown.forEach((x, i) => {\n if (guess.localeCompare(unknown[i], \"en\", { sensitivity: \"base\" }) == 0) {\n underscores[i] = unknown[i];\n }\n document.getElementById(\"mysteryWord\").innerHTML = underscores.join(\"\");\n });\n}", "function gameInitialize() {\n //Chooses a random word from the words array\n wordPicker = words[Math.floor(Math.random() * words.length)];\n console.log(wordPicker);\n\n\n for (var i = 0; i < wordPicker.length; i++){\n answerArray[i] = '_';\n }\n console.log(answerArray[i]);\n\n answer = answerArray.join(\" \");\n wrong\n\n\n}", "function newGame() {\n wordRandom = Math.floor((Math.random() * words.length));\n newWord = words[wordRandom];\n console.log(newWord);\n\n\n if (blankWord.length !== newWord.length) {\n blankWord = [];\n }\n\n\n//blanks for letters\n\nfor (var i = 0; i < newWord.length; i++) {\n if (newWord[i] === \" \") {\n blankWord[i] = \" \";\n } else {\n blankWord[i] = (\" _ \");\n }\n }\n\n $('#blankWord').html(blankWord);\n}", "function Word(characters, placeholder) {\n this.letters = [];\n this.placeholder = placeholder;\n let letter = \"_\";\n let word = \"\";\n word = characters.toString();\n for(i=0; i < word.length ;i++)\n {\n let character = word.charAt(i);\n if ( character != '\"')\n {\n letter = new Letter(character,this.placeholder);\n this.letters.push(letter);\n }\n }\n this.answered = false;\n }", "function initialize(){\n\t\n\t// displays \" _ \" for every letter in hiddenLetters and adds spaces if randomWord has a space\n\tfor(var i = 0; i < randomWord.length; i++){\n\t\tif(randomWord[i] == \"\\xa0\"){\n\t\t\thiddenLetters.push(\"\\xa0\");\n\t\t\tdocument.getElementById(\"hangmanTextUpper\").textContent += hiddenLetters[i];\n\t\t}\n\t\telse{\n\t\t\thiddenLetters.push(\" _ \");\n\t\t\tdocument.getElementById(\"hangmanTextUpper\").textContent += hiddenLetters[i];\n\t\t}\n\t}\n}", "function displayWord(hangmanWord) {\n\tvar showWord = \"\";\n\tfor (var i = 0; i < hangmanWord.correctLettersGuessed.length; i++) {\n\t\tshowWord += hangmanWord.correctLettersGuessed[i].letterGuessed;\n\t}\n\treturn showWord;\n}", "function revealWord(letter, answer_word, masked_word, incorrect_letter_guesses){\n var new_word = '';\n\n if (! isLetter(letter)){\n $(\".letter_alert\").text(letter + \" Invalid Letter\");\n return masked_word;\n }\n\n if (incorrect_letter_guesses.has(letter) || masked_word.indexOf(letter) != -1){\n $(\".letter_alert\").text(letter + \" Already Guessed\");\n return masked_word;\n }\n\n if (answer_word.indexOf(letter) === -1){\n guess_count -= 1;\n incorrect_letter_guesses.add(letter);\n $(\".your_letters\").append(letter);\n $(\".panel-title\").text(\"You have \" + guess_count + \" guesses left\");\n return masked_word;\n }\n\n for (var i = 0; i < answer_word.length; i++){\n if (letter == answer_word[i]){\n new_word += letter;\n }\n else {\n new_word += masked_word[i];\n }\n }\n return new_word;\n}", "function answerCheck() {\n\tgameWordDisplay = \"\"; \n\n//loops through the game word \nfor (var i = 0; i < gameWord.length; i++) {\n\n\t//check the letters guessed by the user agains each position of the game word\n\tif (guessedLetters.includes(gameWord.charAt(i))) {\n\n\t\t//if the letter is there, displays it at the position\n\t\tgameWordDisplay += gameWord.charAt(i);\n\t\t//if not, replaces the display with _ _ _\n\t} else {\n\t\tgameWordDisplay += \"_\";\n\n\t}\n}\n}", "function setUnderscores(){\n \tcurrentWord = arr[Math.floor(Math.random()*arr.length)]\n \tconsole.log(currentWord) \n \tchosenWord = currentWord.split(\"\")\n\tconsole.log(chosenWord)\n\twordCompare = currentWord.split(\"\")\n \tfor ( var k=0; k<chosenWord.length; k++){\n \t\tchosenWord[k]=\"_\";\n \t\t\n\t// document.getElementById('wins').innerHTML\n\n \t}\n \tnumberOfGuessesRemaining = 10\n \tlettersAlreadyGuessed=[]\n\n\n \t\n \t// wordUnderscores = chosenWord.join(' ');\n\n \t\t\n }", "function startGame() {\n gameRunning = true;\n guessesLeft = 6;\n guessedLetterBank = [];\n wrongLetterBank = [];\n wordPlaceholder = [];\n\n chosenWord = words [Math.floor(Math.random() * words.length)];\n console.log(chosenWord)\n for (i = 0; i < chosenWord.length; i++ ){\n if (chosenWord[i] === ' '){\n wordPlaceholder.push(' ');\n } else {\n wordPlaceholder.push('_');\n }\n }\n //Update Elements on page\nguessesRemaining.textContent = guessesLeft;\nplaceholders.textContent = wordPlaceholder;\nguessed.textContent = wrongLetterBank; \n}", "function replaceLettersWithBlanks() {\n\tfor (var i = 0; i < randomCoffee.length; i++) {\n\t\tif (randomWord[i]) {\n\t\t\tcurrentCoffee.push(\" \");\n\t\t}\n\t\telse {\n\t\t\tcurrentCoffee.push(\"_\");\n\t\t}\n\n\t}\n}", "function wordGen() {\n\tcurrentWord = wordList[Math.floor(Math.random() * wordList.length)].toLowerCase();\n}", "function handleGameWord(arr) {\n let hiddenWordArr = [];\n const strArr = arr[0].split(\"\");\n console.log(strArr)\n // first and last letters:\n hiddenWordArr[0] = strArr[0];\n hiddenWordArr[1] = strArr[strArr.length - 1];\n // intermediate letters become dashes\n for (let i = 1; i < strArr.length - 1; i++) {\n if (strArr[i] === \" \") {\n hiddenWordArr.splice(i, 0, \" / \");\n } else {\n hiddenWordArr.splice(i, 0, \" &#8212; \");\n // INTERMITTENT LETTERS = SCORE TAHT WILL GO TO USER OR PUTER\n scoreAmount++;\n }\n }\n return hiddenWordArr.join(\"\").toUpperCase();\n}", "function startGame(){\n if(Number(document.getElementById(\"chosenWord\").value) != 0){\n document.getElementById(\"openingBox\").setAttribute(\"style\", \"display: none;\");\n document.getElementById(\"mainDisplay\").setAttribute(\"style\", \"display:inline;\"); \n document.getElementById(\"guessingSpace\").innerHTML = \"\";\n document.getElementById(\"wronged\").innerHTML = \"\";\n if(Number(document.getElementById(\"chosenHint\").value) != 0){ document.getElementById(\"hintBox\").innerHTML = \"<span style='text-decoration: underline;'>HINT:</span> \" + document.getElementById(\"chosenHint\").value; }\n else{ document.getElementById(\"hintBox\").innerHTML = \"<span style='text-decoration: underline;'>ERROR:</span> Hint Not Found\"; document.getElementById(\"changeHint\").innerHTML = \"Make One\"; }\n answer = document.getElementById(\"chosenWord\").value.toUpperCase();\n\tanswerChar = answer.split(\"\");\n for(var i=0, length=answerChar.length; i<length; i++){\n\t answerChar[i] = { letter:answerChar[i], guessed:false };\n console.log(answerChar[i].letter); \n\t if(answerChar[i].letter == \" \"){ document.getElementById(\"guessingSpace\").innerHTML += \"&emsp;\"; }\n\t else if(answerChar[i].guessed == false){ document.getElementById(\"guessingSpace\").innerHTML += \"_\"; } \n } \n }\n else{ document.getElementById(\"chosenWord\").setAttribute(\"style\", \"border-right: solid red 2px;\"); } \n}", "displayLetters() {\r\n let wordHidden = \"\\n\";\r\n for (let i = 0; i < this.text.length; i++) {\r\n if (this.lettersToGuess.includes(this.text.charAt(i))) {\r\n wordHidden += HangmanUtils.symbol;\r\n }\r\n else {\r\n wordHidden += this.text.charAt(i);\r\n }\r\n wordHidden += \" \";\r\n }\r\n console.log(wordHidden);\r\n }", "function getNewWord() {\n\n if (challengedone) {\n // Reset variables to initial values\n lives = 10;\n matchesWin = 0;\n matchesLost = 0;\n badguess = 0;\n wordpool = [\"agnes\", \"barney\", \"bart\", \"carl\", \"edna\", \"homer\", \"kent\", \"krusty\", \"lenny\", \"lisa\", \"marge\", \"martin\", \"milhouse\", \"moe\", \"ned\", \"nelson\", \"patty\", \"ralph\", \"rod\", \"selma\", \"seymour\", \"todd\", \"tony\", \"troy\", \"waylon\", \"willie\"];\n\n // Set challenge mode ON\n challengedone = false;\n }\n\n // Select an index number based on the WORDPOOL array\n wordIndex = Math.floor(Math.random() * wordpool.length)\n\n // Randomly pick a word\n word = wordpool[wordIndex];\n\n // Show the word to the log... for cheaters!\n console.log(\"Word selected: \" + word);\n\n // Clear the GUESS and GUESSEDLETTERS arrays\n guess = [];\n guessedletters = [];\n\n // Reset LIVES and BADGUESSES to initial values for new game\n lives = 10;\n badguess = 0;\n\n // Show the image of the selected character based on WORD\n document.getElementById('hintImage').innerHTML = \"<h2>HINT IMAGE</h2><img src=\\\"./assets/images/\" + word + \".png\\\" alt=\\\"Hint image\\\" id=\\\"hintCanvas\\\">\";\n\n // Create GUESS word with -\n for (var i = 0; i < word.length; i++) {\n guess.push('-');\n }\n\n // Set game mode ON\n gamedone = false;\n\n // Update the labels\n updateGame();\n }", "function newGame (){\n\n\tcomputerGuess = hangman[Math.floor(Math.random() * hangman.length)];\n\tconsole.log('Computer Guess: ' + computerGuess)\n\n\n// 2. print blank \"_\" to var gameWord and insert that variable into HTML \n\n\tfor (var i = 0; i < computerGuess.length; i++) {\n\t \tgameWord.push('_');\n\t } \n\n\tdocument.getElementById(\"game-word\").innerHTML = gameWord.join(\"\"); \n\tguessCount = 10;\n\tplayerGuess = []; \n\t}", "function loadWord(word, guess){\n\tvar span = \"\";\n\tfor (i=0;i<word.length;i++){\n\t\tif(guess){\n\t\t\tspan = span + '<span>_</span>';\n\t\t}else{\n\t\t\tspan = span + '<span>' + word[i] + '</span>';\n\t\t}\n\t};\n\treturn span;\n}", "function chooseRandomWord() {\n\n randomWord = wordList[Math.floor(Math.random() * wordList.length)].toUpperCase();\n someWord = new word(randomWord);\n\n console.log(gameTextColor(\"Your word contains \" + randomWord.length + \" letters.\"));\n console.log(gameTextColor(\"WORD TO GUESS: \" + randomWord));\n\n someWord.splitWord();\n someWord.generateLetters();\n guessLetter();\n}", "function addChar(char) {\n for (var index = 0; index < chosenWord.length; index++) {\n if (chosenWord[index] === char) {\n blankWord = (blankWord.replaceAt(index, char));\n SpaceInWord();\n console.log(spacedWord);\n countUp++;\n $(\"#theWord\").text(spacedWord);\n //document.getElementById(\"animeImage\").src = \"\";\n }\n }\n }", "function pickAWord() \n{\n\t\tcurrentWord = words[Math.floor(Math.random() * words.length)];\n\tfor(var i = 0; i < currentWord.length; i++)\n\t{\n\t\tanswer[i] = \"_\";\n\t\tdocument.getElementById(\"blanks\").innerHTML = answer;\n\n\t\t// removing the commas from in between the lines.\n\t\tvar remove = document.getElementById(\"blanks\");\n\t\tremove.innerHTML = answer.join(\" \");\n\t\t\n\t}\n}", "function startGame() {\n wrongGuesses = [];\n word = getRandom(wordArray);\n correctGuesses = [];\n remainingGuesses = word.length + 4;\n warning = [];\n warningElement.innerHTML = warning;\n\n // Gets a random word from wordArray\n function getRandom(word) {\n return word[Math.floor(Math.random() * word.length)];\n }\n // console.log(word); <---- if you want to cheat...\n\n // Push underscores over random word\n for (let i = 0; i < word.length; i++) {\n correctGuesses.push(\"_\");\n }\n\n wordElement.innerHTML = correctGuesses.join(\" \");\n letterCountElement.innerHTML = remainingGuesses;\n}", "function setDashes () {\n \tfor (var i = 0; i < chosenWord.length; i++){\n \t\tblanksAndSuccesses[i] = \"_\";\n \t\tvar panel = document.getElementById('panel');\n \t\tpanel.innerHTML = blanksAndSuccesses.join(\" \");\n \t}\n}", "guessedWord() {\n return this.state.answer.split(\"\").map(letter => (this.state.guessed.has(letter) ? letter : \" _ \"));\n }", "function updateHiddenCharacter()\n{\n\tdocument.getElementById(\"hiddenWord\").innerHTML = \" \";\n\n\tfor(var i = 0; i < currentWord.length; i++)\n\t{\n\t\t//each letter is _ unless they are replaced with a letter\n\t\tvar displayLetter = \" _ \";\n\n\t\tfor(var j = 0; j < usedCharacters.length; j++)\n\t\t{\n\t\t\tif(currentWord.charAt(i)=== usedCharacters[j])\n\t\t\t{\n\t\t\t\tdisplayLetter = usedCharacters[j] + \" \";\n\t\t\t}\n\t\t}\n\t\tdocument.getElementById(\"hiddenWord\").innerHTML +=displayLetter;\n\t}\n\tconsole.log(\"updatewordtesting\");\n}", "function wordGen() {\n targetWord= words[Math.floor(Math.random() * words.length)];\n for (var i of targetWord) {\n hiddenWord.push(\"_\");\n }\n $(\".game-board\").text(hiddenWord.join(\" \"));\n \n}", "function startGame()\n{\n\t//selects random word\n\ttargetWord = wordBank[Math.floor(Math.random()* wordBank.length)];\n\ttargetWordArray = targetWord.split(\"\");\n\t//transforms word to an array of dashes\n\tfor(i=0; i<targetWord.length; i++)\n\t{\n\t\tdisplayWord.push(\" _ \");\n\t}\n\n\tdocument.getElementById(\"array-box\").innerHTML = displayWord.join(\"\");\n\tdocument.getElementById(\"instruction-box\").innerHTML = \"press any key to guess a letter\";\n\tdocument.getElementById(\"wins\").innerHTML = \"Wins: \" + wins;\n\tdocument.getElementById(\"losses\").innerHTML = \"Losses: \" + losses;\n\tdocument.getElementById(\"remaining-guesses\").innerHTML = \"Guesses Remaing: \" + remainingGuesses;\n\tdocument.getElementById(\"letters-guessed-box\").innerHTML = \"Letters Guessed: \" + wrongLetters;\n}", "function wordPressed(word_number) {\n correct_word = suggested_words[word_number];\n let i;\n\n console.log(\"currently_typed.length = \" + currently_typed.length);\n for (i = currently_typed.length - 1; currently_typed.charAt(i) != \" \"; i--)\n if (i == 0){\n currently_typed = \"\";\n break;\n }\n\n if (currently_typed != \"\")\n currently_typed = currently_typed.slice(0, i+1);\n currently_typed += correct_word + \" \";\n current_word = \"\";\n autocomplete();\n}", "showLetter() {\n if(this.isGuessed) {\n return this.character;\n } else {\n return \"_\"\n }\n }", "function initWord(word) {\n var underscores = [];\n for (var i = 0; i < word.length; i++) {\n underscores.push(\"<span class='letter'>_</span>\");\n }\n return underscores;\n }", "function chooseRandomWord() {\n //store random word\n currentWord = wordLibraryArray[Math.floor(Math.random() * wordLibraryArray.length)];\n currentWordArray = currentWord.split('');\n remainingLetters = currentWord.length;\n displayStatus(currentWord);\n}", "function newGame() {\n // Reset all game info\n gameRunning = true;\n guessesLeft = 8;\n guessedLetterBank = [];\n incorrectLetterBank = [];\n pickedWordPlaceholderArr = [];\n pickedWord = wordBank[Math.floor(Math.random() * wordBank.length)];\n\n // Create placeholders out of new pickedWord\n for (var i = 0; i < pickedWord.length; i++) {\n if (pickedWord[i] === \" \") {\n pickedWordPlaceholderArr.push(\" \");\n } else if (pickedWord[i] === \"'\") {\n pickedWordPlaceholderArr.push(\"'\");\n }else {\n pickedWordPlaceholderArr.push(\"_\");\n }\n }\n\n // Write all new game info to DOM\n $guessesLeft.textContent = guessesLeft;\n // .join(\"\") pushes all the characters back into a string\n $placeholders.textContent = pickedWordPlaceholderArr.join(\"\");\n $guessedLetters.textContent = incorrectLetterBank;\n}", "wordToGuess() {\n let wordToArray = wordOfTheGame.split(\"\").map((letter) => (letter === \" \" ? \"\" : \"_\"));s\n console.log(`${wordToArray.join(\" \")} hey`);\n console.log(wordToArray);\n return wordToArray.join(\" \")\n /*for(let i = 0; i < wordOfTheGame.length; i++){\n if(wordGuess[i] === ' '){\n wordGuess[i] = \"4\";\n console.log(wordGuess[i])\n }else{\n console.log(`${wordGuess} what is this`)\n wordGuess[i] = \"_\";\n }\n }\n return wordGuess.join(' ');*/\n }", "function DisplaySecretWord() {\n // var dashes = \"\";\n for (var i = 0; i < computerWordChoice.length; i++) {\n if (computerWordChoice.charAt(i) == \" \") {\n dashes += \" &nbsp \";\n } else {\n dashes += \"_ \";\n }\n console.log(dashes);\n var wordContainer = document.getElementById(\"empty-word-display\");\n // console.log(wordContainer);\n wordContainer.innerHTML = dashes;\n\n }\n}", "function newGame() {\n \n gameOn = true;\n numGuess = 12;\n correctLetter = [];\n wrongLetter = [];\n randomWord = words[Math.floor(Math.random() * words.length)];\n selectedWord = randomWord.split(\"\");\n \n for (var i = 0; i < randomWord.length; i++) {\n correctLetter.push(\"_\");\n }\n\n winsDom.textContent = numWins;\n guessDom.textContent = numGuess;\n correctDom.textContent = correctLetter.join(\" \");\n wrongDom.textContent = wrongLetter;\n console.log(\"New game\");\n console.log(randomWord);\n \n}", "displayLettersToGuess() {\r\n let lettersNotGuessed = \"\\n\";\r\n for (let letter of Utilities.alphabet) {\r\n if (!this.guessedLetters.includes(letter.toLowerCase())) {\r\n lettersNotGuessed += letter.toUpperCase() + \" \";\r\n }\r\n else {\r\n lettersNotGuessed += \" \";\r\n }\r\n }\r\n lettersNotGuessed += \"\\n\";\r\n console.log(Utilities.strReplaceByIndex(lettersNotGuessed, \"\\n\", 39));\r\n }", "function Word(answer) {\r\n\r\n // split the word into an array of constructed Letters\r\n this.wordArray = answer.split(\"\").map(letter => new Letter(letter));\r\n\r\n // display the word to the user\r\n this.displayWord = function() {\r\n // variable to display the updated guesses\r\n let builtString = \"\";\r\n // loop through word array to modify string with letters or underscores\r\n this.wordArray.forEach(item => (builtString += `${item.toString()} `));\r\n console.log(builtString);\r\n\r\n return builtString.split(\" \").join(\"\");\r\n };\r\n\r\n // test the user guess against answer\r\n this.guess = function(userGuess) {\r\n let correct = false;\r\n this.wordArray.forEach(letter => {\r\n letter.testGuess(userGuess);\r\n if (letter.answer === userGuess && letter.guessed) {\r\n correct = true;\r\n }\r\n });\r\n\r\n // display result to user\r\n if (correct) {\r\n console.log(\"Correct!\");\r\n return true;\r\n } else {\r\n console.log(\"Incorrect!\");\r\n return false;\r\n }\r\n };\r\n}", "function displayWords (words) {\n 'use strict'\n\n // add the word to the main display\n $.each(words, function (index, obj) {\n $password.val($password.val() + obj.word.capitalize())\n $passwordConfirm.val($passwordConfirm.val() + obj.word.capitalize())\n var $specialChar = specialCharacters[Math.floor(Math.random() * specialCharacters.length)];\n if (index != (words.length - 1)) {\n var $rand = ~~(Math.random() * 10)\n $password.val($password.val() + $specialChar + $rand)\n $passwordConfirm.val($passwordConfirm.val() + $specialChar + $rand)\n }\n })\n}", "function start(){\n for (var i = 0; i < randomword.length; i ++){\n answerArray[i] = \"_\"\n }\n // s = answerArray.join(' ')\n // document.getElementById('currentword').innerHTML = s\n }", "function hideWord(splitGuess) {\n console.log(splitGuess);\n for (var i = 0; i < splitGuess.length; i++) {\n if (splitGuess[i] === \" \") {\n hiddenWord.push(\" \")\n }\n else {\n hiddenWord.push(\"_\")\n }\n }\n $(\"#blankWord\").text(hiddenWord);\n console.log(hiddenWord);\n }", "makePun (word) {\n this.lastMsgTime = Date.now();\n\n return this.makeMessage(word + '? I hardly know her!');\n }", "function buildWord(word){\n var focusElements = determineFocusLetter(word.length);\n var formattedWord = focusElements[1];\n for(var i = 0; i < word.length; i++){\n if(i == focusElements[0]){\n formattedWord += '<span class=\"focus\">' + word.charAt(focusElements[0]) + \"</span>\";\n } else {\n formattedWord += word.charAt(i);\n }\n }\n return formattedWord;\n}", "function displayLetter(myword, letter, word){ // by jaguar\r\n let display = \"\";\r\n let mywordarr = myword.split(\"\")\r\n for(let i = 0; i < myword.length; i++){\r\n if(i != myword.length){\r\n if(letter === word.charAt(i)){\r\n display = display + letter + \" \";\r\n mywordarr[i] = letter\r\n } else {\r\n display += myword.charAt(i) + \" \";\r\n }\r\n } else {\r\n display += myword.charAt(i);\r\n }\r\n }\r\n displayed = mywordarr.join(\"\")\r\n document.getElementById(\"display\").innerHTML = display;\r\n checkWincondition(display, word)\r\n}", "function setFinalResultVariable() {\n for (let i = 0; i < currentWordArray.length; i++) {\n correctWord = correctWord + \"_ \";\n }\n // Sets the word\n document.getElementById(\"word\").innerHTML = correctWord;\n\n}", "function generateUnderscore() {\n for (let i = 0; i < chosenWord.length; i++) {\n underScore.push('_');\n docUnderScore[0].innerHTML = underScore.join(' ');\n }\n return underScore;\n}", "function displayWord(myword, desc){\r\n let display = \"\";\r\n for(let i = 0; i < myword.length; i++){\r\n if(i != myword.length - 1){\r\n display += myword.charAt(i) + \" \";\r\n } else {\r\n display += myword.charAt(i);\r\n }\r\n }\r\n document.getElementById(\"display\").innerHTML = display;\r\n document.getElementById(\"desc\").innerHTML = desc;\r\n}", "function getRandomWord() {\n // array taken from https://gist.github.com/borlaym/585e2e09dd6abd9b0d0a\n wordList = [\n \"Aardvark\",\n \"Albatross\",\n \"Alligator\",\n \"Alpaca\",\n \"Ant\",\n \"Anteater\",\n \"Antelope\",\n \"Ape\",\n \"Armadillo\",\n \"Donkey\",\n \"Baboon\",\n \"Badger\",\n \"Barracuda\",\n \"Bat\",\n \"Bear\",\n \"Beaver\",\n \"Bee\",\n \"Bison\",\n \"Boar\",\n \"Buffalo\",\n \"Butterfly\",\n \"Camel\",\n \"Capybara\",\n \"Caribou\",\n \"Cassowary\",\n \"Cat\",\n \"Caterpillar\",\n \"Cattle\",\n \"Chamois\",\n \"Cheetah\",\n \"Chicken\",\n \"Chimpanzee\",\n \"Chinchilla\",\n \"Chough\",\n \"Clam\",\n \"Cobra\",\n \"Cockroach\",\n \"Cod\",\n \"Cormorant\",\n \"Coyote\",\n \"Crab\",\n \"Crane\",\n \"Crocodile\",\n \"Crow\",\n \"Curlew\",\n \"Deer\",\n \"Dinosaur\",\n \"Dog\",\n \"Dogfish\",\n \"Dolphin\",\n \"Dotterel\",\n \"Dove\",\n \"Dragonfly\",\n \"Duck\",\n \"Dugong\",\n \"Dunlin\",\n \"Eagle\",\n \"Echidna\",\n \"Eel\",\n \"Eland\",\n \"Elephant\",\n \"Elk\",\n \"Emu\",\n \"Falcon\",\n \"Ferret\",\n \"Finch\",\n \"Fish\",\n \"Flamingo\",\n \"Fly\",\n \"Fox\",\n \"Frog\",\n \"Gaur\",\n \"Gazelle\",\n \"Gerbil\",\n \"Giraffe\",\n \"Gnat\",\n \"Gnu\",\n \"Goat\",\n \"Goldfinch\",\n \"Goldfish\",\n \"Goose\",\n \"Gorilla\",\n \"Goshawk\",\n \"Grasshopper\",\n \"Grouse\",\n \"Guanaco\",\n \"Gull\",\n \"Hamster\",\n \"Hare\",\n \"Hawk\",\n \"Hedgehog\",\n \"Heron\",\n \"Herring\",\n \"Hippopotamus\",\n \"Hornet\",\n \"Horse\",\n \"Human\",\n \"Hummingbird\",\n \"Hyena\",\n \"Ibex\",\n \"Ibis\",\n \"Jackal\",\n \"Jaguar\",\n \"Jay\",\n \"Jellyfish\",\n \"Kangaroo\",\n \"Kingfisher\",\n \"Koala\",\n \"Kookabura\",\n \"Kouprey\",\n \"Kudu\",\n \"Lapwing\",\n \"Lark\",\n \"Lemur\",\n \"Leopard\",\n \"Lion\",\n \"Llama\",\n \"Lobster\",\n \"Locust\",\n \"Loris\",\n \"Louse\",\n \"Lyrebird\",\n \"Magpie\",\n \"Mallard\",\n \"Manatee\",\n \"Mandrill\",\n \"Mantis\",\n \"Marten\",\n \"Meerkat\",\n \"Mink\",\n \"Mole\",\n \"Mongoose\",\n \"Monkey\",\n \"Moose\",\n \"Mosquito\",\n \"Mouse\",\n \"Mule\",\n \"Narwhal\",\n \"Newt\",\n \"Nightingale\",\n \"Octopus\",\n \"Okapi\",\n \"Opossum\",\n \"Oryx\",\n \"Ostrich\",\n \"Otter\",\n \"Owl\",\n \"Oyster\",\n \"Panther\",\n \"Parrot\",\n \"Partridge\",\n \"Peafowl\",\n \"Pelican\",\n \"Penguin\",\n \"Pheasant\",\n \"Pig\",\n \"Pigeon\",\n \"Pony\",\n \"Porcupine\",\n \"Porpoise\",\n \"Quail\",\n \"Quelea\",\n \"Quetzal\",\n \"Rabbit\",\n \"Raccoon\",\n \"Rail\",\n \"Ram\",\n \"Rat\",\n \"Raven\",\n \"Red deer\",\n \"Red panda\",\n \"Reindeer\",\n \"Rhinoceros\",\n \"Rook\",\n \"Salamander\",\n \"Salmon\",\n \"Sand Dollar\",\n \"Sandpiper\",\n \"Sardine\",\n \"Scorpion\",\n \"Seahorse\",\n \"Seal\",\n \"Shark\",\n \"Sheep\",\n \"Shrew\",\n \"Skunk\",\n \"Snail\",\n \"Snake\",\n \"Sparrow\",\n \"Spider\",\n \"Spoonbill\",\n \"Squid\",\n \"Squirrel\",\n \"Starling\",\n \"Stingray\",\n \"Stinkbug\",\n \"Stork\",\n \"Swallow\",\n \"Swan\",\n \"Tapir\",\n \"Tarsier\",\n \"Termite\",\n \"Tiger\",\n \"Toad\",\n \"Trout\",\n \"Turkey\",\n \"Turtle\",\n \"Viper\",\n \"Vulture\",\n \"Wallaby\",\n \"Walrus\",\n \"Wasp\",\n \"Weasel\",\n \"Whale\",\n \"Wildcat\",\n \"Wolf\",\n \"Wolverine\",\n \"Wombat\",\n \"Woodcock\",\n \"Woodpecker\",\n \"Worm\",\n \"Wren\",\n \"Yak\",\n \"Zebra\"\n ];\n\n var x = Math.floor((Math.random() * wordList.length));\n return wordList[x].toUpperCase();\n }", "function updateLetter(){\n var wordHolder = document.getElementById(\"word\");\n var correct = document.createElement(\"ul\");\n for (i=0; i<wordInput.length; i++){\n correct.setAttribute(\"id\",\"myWord\");\n var guess = document.createElement(\"li\");\n guess.setAttribute(\"class\", \"guess\");\n if (wordInput[i] === \" \") {\n guess.innerHTML = \" \";\n } else {\n guess.innerHTML = \"_\";\n };\n\n guessArr.push(guess);\n wordHolder.appendChild(correct);\n correct.appendChild(guess);\n }\n }", "function createDash(wordToGuess, \" \") {\n\tfor (var i = 0; i < wordToGuess.length; i++){\n\t\tthis.split()\n\t\t}\n\t}", "function main() {\n let word = readline();\n\n let res = word;\n let firtLetter = res[0].toUpperCase();\n let res2 = res.substring(1,res.length);\n process.stdout.write(firtLetter.concat(res2));\n}", "function formWord (wordArray) {\n var word = \"\";\n for (var i = 0; i < wordArray.length; i++) {\n word += wordArray[i].letter;\n }\n\n return word;\n}", "function startGame() {\n wrongGuesses = ' ';\n allGuesses = \"\";\n currentDisplay = [];\n //Randomly selects a word from the array wordList\n wordString = (wordList[Math.floor(Math.random() * wordList.length)]).toUpperCase(); \n // Put the selected word into an array\n word = wordString.split(''); \n guessRemain = wordString.length; \n for (var i = 0; i < guessRemain; i++){\n currentDisplay[i] = \"_\"; \n //displays the game\n }\n displayGame(); \n }", "function chooseWord () {\n var word = words[Math.floor(Math.random() * words.length)];\n answer = word.toUpperCase();\n hiddenWord(answer);\n}", "function setup() {\n winsElement.textContent = winsCount;\n let randomIndex = Math.floor(Math.random() * word.length);\n currentWord = word[randomIndex];\n\n console.log(currentWord);\n characterCount = currentWord.length;\n remainingLettersElement.textContent = characterCount;\n\n\n\n\n // here we take currentWord and replace letters with underscores\n list = document.createElement('ul');\n \n for( let i = 0; i < currentWord.length; i++ ) {\n \n let item = document.createElement('li');\n item.style.display = 'inline';\n item.innerHTML = '_ ';\n underscores.push(item)\n list.appendChild(item);\n\n }\n currentWordElement.appendChild(list)\n }", "function CurrentWord(word) {\n this.word = word;\n this.guessedLetters = '-';\n}", "function createDash(wordToGuess) {\n document.getElementById(\"dash\").innerHTML = \"\";\n for (let i = 0; i < wordToGuess.length; i++) {\n wordDashes[i] = \"- \";\n document.getElementById(\"dash\").innerHTML += wordDashes[i];\n }\n}", "function generateUnderscores(){\n //loop through every letter of the current random word from the words Array\n for (var i=0; i < currentWord.length; i++){\n // everytime the for loop is ran we create an underscore for the letter\n // add the underscore to our empty array \n underScoreString.push(\"_\");\n } \n console.log(underScoreString)\n}" ]
[ "0.75527847", "0.74378157", "0.7324609", "0.7289476", "0.7242434", "0.7172494", "0.71288604", "0.7101971", "0.7100153", "0.7096851", "0.70688385", "0.70687854", "0.70282364", "0.7003736", "0.6982391", "0.6969807", "0.696273", "0.6940054", "0.6931251", "0.6897483", "0.68843263", "0.68827313", "0.6868867", "0.6864172", "0.6860831", "0.68385", "0.6838197", "0.6823076", "0.67988586", "0.67478937", "0.6742889", "0.67124575", "0.67094916", "0.66922337", "0.6691696", "0.66900194", "0.66788226", "0.66710025", "0.6668731", "0.6661008", "0.66593117", "0.6658979", "0.66481644", "0.66481495", "0.663785", "0.6633242", "0.6627975", "0.66206217", "0.6616554", "0.6606318", "0.6599077", "0.6598751", "0.6595526", "0.65698004", "0.65691626", "0.65625286", "0.65491647", "0.65479547", "0.65460455", "0.654408", "0.6544032", "0.6541878", "0.6540977", "0.6538767", "0.653664", "0.65361464", "0.65256196", "0.65228486", "0.65146655", "0.6495567", "0.6483246", "0.64827156", "0.64826965", "0.64799863", "0.6478117", "0.6476292", "0.6467096", "0.646618", "0.64655226", "0.6462562", "0.6451662", "0.6435275", "0.6434559", "0.64229876", "0.64120376", "0.64111125", "0.64053106", "0.6403436", "0.63982266", "0.63978904", "0.6396746", "0.63874155", "0.63690585", "0.6366583", "0.6364056", "0.6362301", "0.63582313", "0.63546985", "0.63510674", "0.6348601", "0.63442147" ]
0.0
-1
When the user guesses a letter check every letter object to see if the guess matches one of them
guessCharacter(x) { // A count is used to check if any letter was changed from guessed=false to guessed=true let count = 0; for (let i in this.array) { let LetterObj = this.array[i]; // Calle the guessLetter function of the current letter we are looking at LetterObj.guessLetter(x); // If the current letter matches the user's guess then increase count if (LetterObj.letter.toLowerCase() == x) { count++; } } // If count was increased at all then this method returns true this is used to check if the user guesses the letter // correctly and if we need to lower how many guesses they have left if (count > 0) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkGuessedLetters() {\n //This is checking that if users guess is in alailableLetters\n if(availableLetters.indexOf(this.event.key) > -1) {\n //Looping through guessed letters for the length of word\n for(var i = 0; i < word.length; i++) {\n //If the users guess has already been guessed then we will set guessed to true\n if(this.event.key === guessedLetters[i]) {\n guessed = true;\n }\n }\n }\n}", "function testGuess(letter){\n\t\tfor (var i=0;i<randomWord.length;i++){\t\n\t\t\t\n\t\t\tif (letter == randomWord[0]){\n\t\t\t\tdisplayLetters(letter);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (letter == randomWord[i+1]){\n\t\t\t\tdisplayLetters(letter);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (letter == randomWord[i+2]){\n\t\t\t\tdisplayLetters(letter);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (letter == randomWord[i+3]){\n\t\t\t\tdisplayLetters(letter);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (letter == randomWord[i+4]){\n\t\t\t\tdisplayLetters(letter);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (letter == randomWord[i+5]){\n\t\t\t\tdisplayLetters(letter);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (letter == randomWord[i+6]){\n\t\t\t\tdisplayLetters(letter);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (letter == randomWord[i+7]){\n\t\t\t\tdisplayLetters(letter);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar j = 0;\n\t\t\t\tif (letter == guessedLetters[j]){\n\t\t\t\t\talert(\"Already guessed!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\telse if (letter == guessedLetters[j+1]){\n\t\t\t\t\talert(\"Already guessed!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (letter == guessedLetters[j+2]){\n\t\t\t\t\talert(\"Already guessed!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (letter == guessedLetters[j+3]){\n\t\t\t\t\talert(\"Already guessed!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (letter == guessedLetters[j+4]){\n\t\t\t\t\talert(\"Already guessed!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tguessedLetters.push(letter);\n\t\t\t\t\tlives = lives - 1;\n\t\t\t\t\treturn;\n\t\t\t\t}\t\n\t\t\t};\n\t\t};\n\t}", "checkLetter(e) {\n\t\tthis.letterGuess = e.toLowerCase();\n\t\tthis.regexText = /[A-Za-z]/.test(this.letterGuess);\n\t\tif (this.regexText) {\n\t \t\tlet thisPhrase = this.phrase.toString();\n\n\t\t\t//Append letters to Letter CheckArray\n\t\t\tif (this.letterGuesses.includes(this.letterGuess)) {\n\t\t\t\talert(\"You've already used that letter!\")\n\t\t\t} else {\n\t\t\tthis.letterGuesses.push(this.letterGuess);\n\t\t\t}\n\n\t\t\tif (this.phrase.includes(this.letterGuess)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\talert(\"Please only use letters!\");\n\n\t\t}\n\t}", "function checkGuesses(guess){\n hasLetter = false;\n for(var i=0;i<guesses.length;i++){\n if(guess === guesses[i]){\n hasLetter = true;\n }\n }\n if(hasLetter){\n alert(\"You guessed that letter already! Choose another letter.\");\n }\n else{\n guesses.push(guess);\n lettersUsed.innerText = (guesses.join(\"\") + \" \");\n compareGuess(guess);\n }\n }", "function checkGuess() {\n // Collect the text from the letters and the guess\n var letters = getLetters();\n var guess = getGuess();\n\n // Convert both to uppercase so we can compare equals\n guess = guess.toUpperCase();\n letters = letters.toUpperCase();\n\n // Determine if all the characters in the guess are in the letters\n for (var i = 0; i < guess.length; i++) {\n var currentChar = guess[i];\n\n // If the current character can't be found in letters, the guess is incorrect\n if (letters.indexOf(currentChar) === -1) {\n // Show a message saying guess is incorrect\n showMessage(\"Wrong guess, try again.\");\n // Return false to exit the function\n return false;\n }\n }\n\n // If we've made it this far, then the guess must be correct!\n // Show a message saying guess is correct\n showMessage(\"Good guess, that is correct!\");\n // Return true to exit the function\n return true;\n}", "function newLetter(letter){\n\tvar valid = true;\n\tfor( i = 0 ; i < HangMan[curObjName].guesses.length ; i++){\n\t\tif(letter === HangMan[curObjName].guesses[i]){\n\t\t\tvalid = false;\n\t\t\tbreak;\n\t\t};\n\t};\n\treturn valid;\n}", "function checkGuess(guessedLetter) {\nfor(var i = 0; i < word.length; i++) {\nif (word[i] === guessedLetter) {\n\tcorrectGuesses.push(guessedLetter);\n\t\t}\n\t}\n}", "function selectLetter(letter) {\n mysteryWord.lettersGuessed.push(letter);\n let theWord = mysteryWord.word;\n let theLetters = mysteryWord.actualLetters;\n if (theWord.includes(letter)) {\n // loop through the letters in the word comparing them with the letter the user person guessed\n for (let i = 0; i < theLetters.length; i++) {\n if (theLetters[i].letter === letter) {\n console.log(\"yeah!\")\n theLetters[i].guessCorrectly();\n }\n }\n } else {\n console.log(\"nope\")\n }\n console.log(\"guesses remaining: \" + theUser.guesses);\n showTheQuestion();\n}", "function checkLetter(guess) {\n\tmatch = null;\n\tlet letters = document.querySelectorAll('.letter'); //unrevealed letters collection\n\tfor (i = 0; i < letters.length; i++) {\n\t\tif (guess.textContent == letters[i].textContent) {\n\t\t\tletters[i].classList.add('show');\n\t\t\tmatch = true;\n\t\t}\n\t}\n\treturn match;\n}", "function checkGuess(guessedLetter) {\n //for each letter in 'word'\n for (i = 0; i < word.length; i++) {\n //if 'guessedLetter' is in 'word': consle.log('yup');\n if (word[i] === guessedLetter ) {\n correctGuesses.push(guessedLetter);\n } \n }\n}", "function checkForLetter(letter) {\r\n var foundLetter = false;\r\n\r\n // Search string for letter\r\n for (var i=0; i < randomNumber.length; i++) {\r\n if (letter === randomNumber[i]) {\r\n guesses[i] = letter\r\n foundLetter = true;\r\n}\r\n}\r\n}", "checkLettersForGuessed() {\n // Initialize a count\n let count = 0;\n for (let i in this.array) {\n let LetterObj = this.array[i];\n // If the letter hasn't been guessed yet increase count\n if (!LetterObj.guessed) {\n count++;\n }\n }\n // If there are still unguessed letters, return true. If all letters have been guessed return false.\n if (count > 0) {\n return true;\n } else {\n return false;\n }\n }", "function alreadyGuessed(letter) {\n for (y = 0; y < guessArray.length; y++) {\n if (letter === guessArray[y]) {\n return true;\n }\n }\n return false;\n}", "function checkUserGuess(letterPicked, divClicked){\n if(inputWord.indexOf(letterPicked)!== -1){\n for(let i in inputWord){\n if(letterPicked === inputWord[i]) {\n $('.letter').eq(i).show();\n correctBank++;\n }}\n }else {\n guessBank--;\n hangman.css('background-image', 'none');\n hangman.css('background-image', `url(${gameImgs[guessBank]})`);\n }\n }// end checkUserGuess func", "function checkLetter(input){\n\t\t// Check if word has been used before\n\t\tvar counter = 0; // counts how many times the letter appears in the word\n\t\tfor(l=0; l< word.length; l++){\n\t\t\tvar currentGuess = input;\n\t\t\tvar currentCheck = word.charAt(l);\n\t\t\tif(currentGuess === currentCheck){\n\t\t\t\tcorrectGuesses++;\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\n\t\tif(counter === 0){\n\t\t\t\tincorrectGuesses++;\n\t\t\t\tplayVideo();\n\t\t\t}\n\n\t\tfor(k=0; k < word.length; k++){\n\t\t\tvar currentGuess = input;\n\t\t\tvar currentCheck = word.charAt(k);\n\t\t\tif(input === word.charAt(k)){\n\t\t\t\tanswerMask[k] = input;\n\t\t\t\t// correctGuesses++;\n\t\t\t}\n\t\t}\n\t\theartbeat = chances - incorrectGuesses;\n\t\t// log(\"incorrectGuesses \" + incorrectGuesses);\n\t\t// log(\"correctGuesses\" + correctGuesses);\n\n\t\tguessedLetters.push(input);\n\t}", "checkLetter(guess) {\n for (let i = 0; i < this.phrase.length; i++) {\n if (this.phrase.charAt(i) === guess) {\n return true;\n }\n }\n }", "function checkLetter(guess) {\n const letterAnswers = document.querySelectorAll('.letter');\n const li = document.querySelectorAll('.letter');\n let match;\n for (let i = 0; i < letterAnswers.length; i +=1) {\n let show = letterAnswers[i].textContent;\n if (show === guess) {\n li[i].classList.add('spin');\n li[i].className += ' show';\n match = show;\n }\n }\n return match;\n }", "guessLetter(letterGuessed){\n if(letterGuessed === this.character){\n this.isGuessed = true;\n }\n\n this.showLetter()\n }", "function checkForLetter(letter) {\n var foundLetter = false\n \n // loop through word letters\n for (var i = 0, j = hiddenWord.length; i < j; i++) {\n\n // if matching letter, assign to guessing word array\n if (letter === hiddenWord[i]) {\n wordBeingGuessed[i] = letter\n foundLetter = true\n\n // if all letters match hidden word, increase winTotal, reset game\n if (wordBeingGuessed.join(\"\") === hiddenWord) {\n winTotal++\n removePicture()\n displayPicture()\n updateDisplay()\n resetGame()\n }\n }\n }\n // if letter doesnt match, lower guessing remaining\n if (!foundLetter) {\n if (!guessedLetters.includes(letter)) {\n guessedLetters.push(letter)\n guessesRemaining--\n }\n\n // if guesses are 0, display the word and reset game\n if (guessesRemaining === 0) {\n wordBeingGuessed = hiddenWord.split()\n resetGame()\n }\n }\n\n updateDisplay()\n}", "function checkLetter (guess){\n\t\tconst letter = document.getElementsByClassName(\"letter\");\n\t\tlet foundMatch = null;\n\t\tfor (let i = 0; i < letter.length; i++) {\n\t\t\tif (guess === letter[i].textContent.toLowerCase()) {\n letter[i].classList.add('show');\n foundMatch = letter[i].textContent;\n } \n }\n return foundMatch\n }", "function matchLetter(letter) {\n\tvar matched = false;\n\n\tfor (var i = 0; i < letterCounter; i++) {\n\t\tif(answerWord[i] === letter ) {\n\t\t\t//Changes matched to true if the answerWord contains letter\n\t\t\tmatched = true;\n\t\t}\n\t}\n\t//Once matched is true, it loops through to the occurance of the letter and replaces \n\tif (matched) {\n\t\tfor (var j = 0; j < letterCounter; j++) {\n\t\t\tif (answerWord[j] === letter) {\n\t\t\t\tupdatedWordWithGuesses[j] = letter\n\t\t\t}\n\t\t}\n\t\tconsole.log(\"\\n\\x1b[32m%s\\x1b[0m\", \"CORRECT!!!\");\n\t\tconsole.log(\"\\n\" + updatedWordWithGuesses.join(\"\") + \"\\n\");\n\t\tendGame();\n\t\taskquestions();\n\t}\n\telse{\n\t\twrongLetters.push(letter);\n\t\t//Subtracts every time user gets the letter incorrectly\n\t\tnumberGuesses--;\n\t\tconsole.log(\"\\n\\x1b[31m%s\\x1b[0m\", \"INCORRECT!!!\");\n\t\tconsole.log(\"\\n\" + numberGuesses + \" guesses remaining!\");\n\t\tconsole.log(\"\\nLetters guessed: \" + wrongLetters);\n\t\tconsole.log(\"\\n\" + updatedWordWithGuesses.join(\"\") + \"\\n\");\n\t\tendGame();\n\t\taskquestions();\n\n\t}\n}", "function isValidGuess() {\n\n if (alphabet.indexOf(currentGuess) !== -1) {\n console.log(\"Your guess: \" + currentGuess);\n isCorrectGuess();\n } else {\n console.log(\"That is not a letter!\");\n }\n }", "function isCorrectGuess() {\n \n // for each item in randomLetters, check if it matches currentGuess\n for (i = 0; i < randomLetters.length; i++) { \n if (currentGuess === randomLetters[i]) { \n // store each matching letter's index from randomLetters in matchingLetters\n matchingLetters.push(randomLetters.indexOf(randomLetters[i]));\n // change items at indices in randomBlanks to values at same indicies in randomLetters\n randomBlanks[i] = randomLetters[i];\n $(\"#letters\").html(randomBlanks);\n }\n }\n\n if (((randomLetters.indexOf(currentGuess) !== -1) && (randomBlanks.indexOf(currentGuess) !== -1)) || (lettersGuessed.indexOf(currentGuess) !== -1)) {\n console.log(\"You've already guessed that letter!\"); \n } else if (randomLetters.indexOf(currentGuess) !== -1) {\n console.log(\"Correct guess\");\n createFirework(62,136,5,4,null,null,null,null,true,true); \n guessesLeft--; \n } else {\n console.log(\"That letter is not part of the answer!\");\n lettersGuessed.push(currentGuess);\n console.log(\"The letters you have guessed are: \" + lettersGuessed);\n guessesLeft--;\n }\n showLettersGuessed();\n\n \n console.log(\"You have \" + guessesLeft + \" guesses left.\");\n console.log(\"The mysterious random word: \" + randomBlanks);\n }", "function checkLetter(event) {\n var userGuess = event.key.toLowerCase();\n if ($(\"#loseModal\").css(\"display\") !== \"block\" && $(\"#winModal\").css(\"display\") !== \"block\") {\n if ((event.which >= 65 && event.which <= 90) || ((event.which >= 97 && event.which <= 122)) && (guesses.indexOf(userGuess) == -1)) { \n guesses.push(userGuess);\n guessMatch(userGuess);\n appearLetters(indexChecker, userGuess);\n }\n winOrLose(winCounter, lives);\n indexChecker = [];\n }\n}", "checkLetter(guessedletter) {\r\n let activePhr = game.activePhrase.toLowerCase();\r\n const phraseLetterArray = activePhr.split(\"\").filter(i => i != \" \");\r\n let letterWasCheacked = phraseLetterArray.includes(guessedletter);\r\n return letterWasCheacked;\r\n }", "checkLetter(guess) {\n if (this.phrase.includes(guess.toLowerCase())) {\n return true;\n } else {\n return false;\n }\n }", "function checkGuess(letter) {\n // Array to store letterPosition of letters in string\n var letterPosition = [];\n\n // Loop through word finding all instances of guessed letter, store the indicies in an array.\n for (var i = 0; i < word[randWord].length; i++) {\n if(word[randWord][i] === letter) {\n letterPosition.push(i);\n }\n\n }\n\n // if there are no indicies, remove a guess and update the hangman image\n if (letterPosition.length <= 0) {\n guessesLeft--;\n updateHangmanImage();\n } else {\n // Loop through all the indicies and replace the '_' with a letter.\n for(var i = 0; i < letterPosition.length; i++) {\n wordGuess[letterPosition[i]] = letter;\n \n }\n }\n}", "function checkLetters(letter) {\n\n\tvar lettersInWord = false;\n\tvar letter = event.key;\n\n\t// Check if a letter exists insidethe array at all\n\tfor (var i = 0; i < underscores; i++) {\n\t\t\n\t\tif (word[i] === letter) {\n\t\t\tconsole.log('word[i] ' + word[i])\n\t\t\tlettersInWord = true;\n\t\t}\n\t}\n// If the letter exists in the word, find which index\n\tif (lettersInWord) {\n\t\t\n\t\tfor (var j = 0; j < underscores; j++) {\n\t\t//Populate the blanksAndSuccesses with every correct letter.\n\t\t\tif (word[j] === letter) {\n\t\t\t// This is where the specfic space in blanks is set and letter is equal to the letter when there is a match.\n\t\t\tblanksAndSuccesses[j] = letter;\n\t\t\t}\n\t\t}\t\n\t}\n\t\n\telse {\n\t\twrongLetter.push(letter);\n\t\tguesses--;\n\t}\n}", "function letterCheck(letter) {\n if (lettersArray.indexOf(letter.key) > -1) {\n correctLetterCheck(letter);\n }\n}", "function evaluateGuess(letter) {\r\n var positions = [];\r\n\r\n for (var i = 0; i < transformersCharacters[computerPick].length; i++) {\r\n if(transformersCharacters[computerPick][i] === letter) {\r\n positions.push(i);\r\n }\r\n }\r\n\r\n if (positions.length <= 0) {\r\n guessesLeft--;\r\n } else {\r\n for(var i = 0; i < positions.length; i++) {\r\n wordGuessed[positions[i]] = letter;\r\n }\r\n }\r\n}", "function userGuessLogic(letter){\n\t//Check to see if the user already guessed this letter in the guessedLetters array.\n\tif ( guessedLetters.indexOf(letter) == -1 ) {\n\t\tguessedLetters[guessedLetters.length] = letter;\n\t\tcorrectOrIncorrect(letter);\n\t} else {\n\t//Display a message if the letter was found in guessedLetters\n\t\tconsole.log(\"You already guessed that letter.\")\n\t}\n}", "function validateLetter (usersKeypress) {\n message.innerText = \"\";\n\n var repeatGuess = lettersGuessed.some(function(item){\n return item === usersKeypress;\n })\n\n //alert player if the above code is true.\n if (repeatGuess) {\n //alert(usersKeypress + \" already guessed. Try again!\");\n message.innerHTML = \"<span class='duplicateMessage'>Already guessed that. Try again!</span>\";\n\n //if it is not a repeat guess, check if it's in word\n } else {\n lettersGuessed.push(usersKeypress);\n console.log(\"Guessed so far\", lettersGuessed);\n\n //show user's input in browser\n showLettersGuessed();\n //is user's input a match to computer guess\n guessMatch(usersKeypress);\n }\n\n}", "function checkLetter(letter) {\n\t\t//check to see if the guess is part of the goal word and also\n\t\t//check to see if the letter has been guessed before\n\t\t//if it is not, add 1 to the numberWrong variable \n\t\t//(and draw the next piece of the stick-figure)\n\t\t//if game is over, display complete word and related image\n\n\t\tif (gameOver === \"no\" && lowerGame.indexOf(letter.toLowerCase()) == -1 && usedLetters.indexOf(letter.toUpperCase()) === -1) {\n\t\t\tnumberWrong++;\n\t\t\tusedLetters.push(letter.toUpperCase());\n\t\t\tshowUsedLetters();\n\t\t}\n\n\t\telse if (gameOver === \"no\" && usedLetters.indexOf(letter.toUpperCase()) === -1) {\n\n\t\t\tusedLetters.push(letter.toUpperCase());\n\t\t\tshowUsedLetters();\n\n\n\t\t//if the guess is part of the goal word, update the solution array\n\t\t//everywhere the letter appears.\n\n\t\t\tfor (var i = 0; i < solution.length; i++) {\n\t\t\t\tif (lowerGame[i] === letter.toLowerCase()) {\n\t\t\t\t\tsolution[i] = currGame[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t//after all locations are updated, display the updated solution\n\t\t//to the user.\n\n\t\tshowSolution();\n\n\t\t//show hangman image based on number of wrong guesses\n\t\tcurrentHangmanImage.attr(\"src\", hangmanImgArray[numberWrong].src);\n\n\t\t//if game is over, update gameOver variable. If game was won, display won image\n\t\tif (numberWrong == 6) {\n\t\t\tgameOver = \"loss\";\n\n\t\t} else if (solution.indexOf(\"_\") === -1) {\n\t\t\tgameOver = \"win\";\n\t\t\tcurrentHangmanImage.attr(\"src\", \"assets/images/gallowsWin.png\");\n\t\t\t}\n\n\n\t\t//if the game is over, display the video or image associated with the city used\n\t\tif (gameOver != \"no\") {\n\t\t\t//update solution to fill in all letters\n\t\t\tfor (var i = 0; i < currGame.length; i++) {\n\t\t\t\tif (currGame[i] === \" \"){\n\t\t\t\t\tsolution[i] = \"\\xa0\\xa0\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsolution[i] = currGame[i];\n\t\t\t\t}\n\t\t\t};\n\t\t\tshowSolution();\n\t\t\t//if the image type is video, embed the youtube video\n\t\t\tif (cities[randomNumber].imageType == \"video\") {\n\t\t\tvideoDiv = $(\"<iframe>\");\n\t\t\tvideoDiv.attr({\n\t\t\t\tsrc: cities[randomNumber].imageLink,\n\t\t\t\twidth: \"600\",\n\t\t\t\theight: \"400\",\n\t\t\t\tframeborder: \"0\",\n\t\t\t\tallowfullscreen: \"\"});\n\t\t\t// videoDiv.attr(\"width\", \"800\");\n\t\t\t$(\".usedArea\").append(videoDiv);\n\t\t\t} else {\n\t\t\t\t//if the image type is not video, it is a photo that should be displayed\n\t\t\t\tpictureDiv = $(\"<img>\");\n\t\t\t\tpictureDiv.attr({src: cities[randomNumber].imageLink,\n\t\t\t\twidth: \"600\",\n\t\t\t\theight: \"400\"\n\t\t\t\t});\t\t\n\t\t\t\t$(\".usedArea\").append(pictureDiv);\t\n\t\t\t}\n\t\t}\n\t}", "function checkLetters(letter) {\n\n\t// a boolean which will be toggled based on whether \n\tvar letterInWord = false;\n\n\tfor (var i=0; i < numBlanks; i++) {\n\t\tif (chosenWord[i] === letter) {\n\t\t\t// If the letter exists then change this to true\n\t\t\t// It will be used in the next step\n\t\t\tletterInWord = true;\n\t\t}\n\t}\n\n\t// If the letter exists somewhere in the word\n\t// then figure out exactly where (what index)\n\tif (letterInWord) {\n\t\t// Loop throught the word\n\t\tfor (var j=0; j < numBlanks; j++) {\n\t\t\t//Populate the blanksAndSuccesses with every\n\t\t\t//instance of the letter\n\t\t\tif (chosenWord[j] === letter) {\n\t\t\t\t//set specific blank spaces to equal the correct\n\t\t\t\t// letter when there is a match\n\t\t\t\tblanksAndSuccesses[j] = letter;\n\t\t\t}\n\t\t}\n\t\t// Log for testing purposes\n\t\tconsole.log(blanksAndSuccesses);\n\t} \n\n\t// If the letter doesn't exist at all...\n\telse {\n\t\t// Then we add the letter at the list of wrong letters\n\t\twrongGuesses.push(letter);\n\t\t// We also subtract one of the guesses\n\t\tnumGuesses--;\n\t}\n}", "function isLetterAlreadyGuessed(userGuess) {\n\t\treturn lettersGuessed.includes(userGuess) && alphabet.indexOf(userGuess) > -1;\n\t}", "checkLetter(phrase, guess) {\r\n\t\tlet correctGuess = false;\r\n\t\tfor (var i = 0; i < phrase.length; i++) {\r\n\t\t\tif (guess === phrase.charAt(i)) {\r\n\t\t\t\tcorrectGuess = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn correctGuess;\r\n\t}", "function checkLetters(userkey) {\n\n\t//See if the userkey exists in the wrong guesses array\n\tvar letterExist = false;\n\n\tfor (var i = 0; i < wrongGuesses.length; i++) {\n\n\t\tif(userkey === wrongGuesses[i]){\n\n\t\t\tletterExist = true;\n\n\t\t};\n\n\t};\n\n\tif (letterExist === false) {\n\n\t\tvar flag = false;\n\n\t\tfor (var i = 0; i < numBlanks; i++) {\n\t \t\n\t \t\tif(randomWord[i] === userkey) {\n\t \t\t\tflag = true;\n\t \t\t}\n\t \t}\n\n\n\t\t// If the letter exists somewhere in the word, then figure out exactly where (which indices).\n\t\tif (flag) {\n\n\t\t // Loop through the word.\n\t\t for (var i = 0; i < numBlanks; i++) {\n\n\t\t //If the first letter equals the user's input, make it capitalized\n\t\t\t\tif (randomWord[0] === userkey) {\n\n\t\t\t\t\tlettersInWord[0] = userkey.toUpperCase();;\n\n\t\t\t\t} \n\n\t\t\t\t//Else set the specific space in blanks and letter equal to the letter when there is a match.\n\t\t\t\telse if(randomWord[i] === userkey) {\n\n\t\t\t\t\tlettersInWord[i] = userkey\n\n\t\t\t\t};\n\t\t }\n\t\t}\n\n\t\t // If the letter doesn't exist at all...\n\t\telse {\n\n\t\t // ..then we add the letter to the list of wrong letters, and we subtract one of the guesses.\n\t\t\twrongGuesses.push(userkey);\n\n\t\t // numGuesses--;\n\t\t turns--;\n\t\t \n\t \t\tdocument.getElementById(\"turns\").innerHTML = turns;\n\t \n \t\t}\t\n\n\t roundComplete();\n\t}\n}", "function checkGuess(letter) {\n var guess = false;\n\n //looping through the selected word\n for (var i = 0; i < numBlanks; i++) {\n\n //if the array created \n if (wordSelect[i] === userGuess) {\n guess = true;\n }\n }\n if (guess) {\n for (var x = 0; x < numBlanks; x++) {\n if (wordSelect[x] === userGuess) {\n unguessedWord[x] = letter;\n }\n }\n }\n //subtracting a life for each incorrect guess\n else {\n badGuesses.push(letter);\n lives--;\n }\n}", "function letterGuess(letter) {\n console.log(letter);\n if (gameRunning === true && guessedLetterBank.indexOf(letter) == -1) {\n //Run game logic\n guessedLetterBank.push(letter);\n //Check if guessed letter is in my picked word\n for (var i = 0; i < pickedWord.length; i++) {\n //convert both values to lowercase(if mystery word had caps or capslock on)\n if (pickedWord[i].toLowerCase() === letter.toLowerCase()) {\n //If a match, swap out that character in the placeholder with the actdual letter\n pickedWordPlaceholderArr[i] = pickedWord[i];\n }\n }\n $placeholders.textContent = pickedWordPlaceholderArr.join(' ');\n //Pass letter into our checkIncorrect function\n checkIncorrect(letter);\n }\n else {\n if (!gameRunning) {\n alert (\"The game isn't running, click on the START button to start over\");\n } else {\n alert (\"You've already guessed this letter, try a new one!\");\n }\n }\n }", "function evaluateGuess(letter) {\n var positions = [];\n\n for (let i = 0; i < selectableWords[currentWordIndex].length; i++) {\n if (selectableWords[currentWordIndex][i] === letter) {\n positions.push(i);\n }\n }\n if (positions.length <= 0) {\n remainingGuesses--;\n } else {\n for (let i = 0; i < positions.length; i++) {\n guessingWord[positions[i]] = letter;\n }\n }\n}", "function alreadyChosen(letter){\n\t//search the current word for matching letters\n\t////console.log(\"in alreadyChosen function\");\n\t//if the user hasnt chosen any letters,\n\t// add letter to .guesser.alpha return false\n\tif (guesser.alpha.length===0) {\n\t\tfor (var i = 0; i < comp.word.length; i++) {\n\t\t\tif(comp.word[i].toLowerCase()===letter.toLowerCase())\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tguesser.alpha[0]=letter.toLowerCase();\n\t\t//console.log(guesser.alpha);\n\t\treturn false;\n\t}\n\t//otherwise go through guesser.alpha and see if there is a matching letter.\n\t//if matching letter return true otherwise false\n\telse{\n\t\t////console.log(\"going into loop\");\n\n\t\tfor (var i = 0; i < guesser.alpha.length; i++) {\n\n\t\t\tif (guesser.alpha[i].toLowerCase()===letter.toLowerCase()){\n\t\t\t\t////console.log(\"returning true\");\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\t\t////console.log(\"going into loop\");\n\t\tfor (var i = 0; i < comp.word.length; i++) {\n\t\t\tif(comp.word[i].toLowerCase()===letter.toLowerCase())\n\t\t\t{\n\t\t\t\t////console.log(\"letter found returning false\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tguesser.alpha[guesser.alpha.length]=letter.toLowerCase();\n\t\t////console.log(guesser.alpha);\n\t\treturn false;\n\t}\n\t\n\n}", "function wordCheck(letter) {\n var WordLetters = false;\n for (var i = 0; i < nameLength; i++) {\n if (chosenName[i] === letter) {\n WordLetters = true;\n }\n }\n\n if (WordLetters) {\n for (var i = 0; i < nameLength; i++) {\n if (chosenName[i] === letter) {\n emptyWord[i] = letter;\n }\n }\n }\n\n else (chosenName[i] !== letter); {\n incorrectGuess.push(letter);\n incorrect--;\n }\n\n \n}", "function checkLetters(letter) {\n\t// check if letter exists in word at all\n\tvar isLetterInWord = false;\n\tfor (var i=0; i<hiddenWord.length; i++) {\n\t\tif (hiddenWord[i]===letter) {\n\t\t\tisLetterInWord= true;\n\t\t\tconsole.log('Letter found');\n\t\t}\n\t}\n\n\tif (isLetterInWord) {\n\t\t// check where in the word the letter exists\n\t\tfor (i=0; i<hiddenWord.length; i++) {\n\t\t\tif(hiddenWord[i]===letter) {\n\t\t\t\tdashes[i] = letter;\n\n\t\t\t}\n\t\t}\n\t\t$('#hiddenWord').html(dashes);\n\t} else {\n\t\twrongGuesses.push(letter+' ');\n\t\tguessesLeft--;\n\t\t$('#guessesLeft').html(guessesLeft);\n\t\t$('#wrongGuesses').html(wrongGuesses);\n\t}\n}", "function letterGuess(letter) {\n\n console.log(letter)\n\n if(gameRunning === true && guessedLetterBank.indexOf(letter) === -1){\n //run game logic\n guessedLetterBank.push(letter);\n\n //check if guessed letter is in my picked word\n\n for(var i = 0; i < pickedWord.length; i++) {\n // convert both values to lower case so i can compare them correctly\n if (pickedWord[i].toLocaleLowerCase() === letter.toLocaleLowerCase()){\n\n // if a match, swap character in the placeholder with the actual letter\n pickedwordPlaceholderArr[i] = pickedWord[i];\n }\n }\n\n $placeholders.textContent = pickedwordPlaceholderArr.join('');\n checkIncorrect(letter);\n\n }\n else {\n if(!gameRunning){\n alert(\"THe game isn't running, click on new button to start over.\"); \n } else{\n alert(\"you have already chosen this letter, try a new one!\");\n }\n }\n}", "function check(letter) {\n \n if (guessedLetters.indexOf(letter) === -1) {\n guessedLetters.push(letter);\n \n if (ansWord.indexOf(letter) === -1) {\n numGuessesRemaining--;\n \n if (numGuessesRemaining <=3) {\n document.getElementById(\"numGuesses\").style.color = \"#fff\";\n }\n \n } else { \n for (var i = 0; i < ansWord.length; i++) {\n if (letter === ansWord[i]) {\n ansWordArr[i] = letter;\n } \n } \n }\n }\n\n}", "function checkLetters(letter) {\n\n\tvar letterInWord = false; // this boolean will be toggled based on whether or not a user letter is found anywhere in the word\n\n\t// Check if a leter exists inside the array at all.\n\tfor (var i=0; i<numBlanks; i++) {\n\t\tif(chosenWord[i] == letter) {\n\t\t\tletterInWord = true; // if the letter exists then toggle this boolean to true. This will be used in the next step.\n \t\t}\n\t}\n\n\t// If the letter exists somewhere in the word, then figure out exactly where (which indices)\n\tif(letterInWord){\n\n\t\t// loop through the word\n\t\tfor (var i=0; i<numBlanks; i++){\n\n\t\t\t// Populate the blanksAndSuccesses with every instance of the letter.\n\t\t\tif(chosenWord[i] == letter) {\n\t\t\t\tblanksAndSuccesses[i] = letter; // here we set the specific space in blanks and letter equal to the letter when there is a match.\n\t\t\t}\n\t\t}\n\t\tconsole.log(blanksAndSuccesses); // logging for testing\n\t}\n\t// If the letter doesn't exist at all...\n\telse {\n\t\twrongGuesses.push(letter); // then we add the letter to the list of wrong letters\n\t\tnumGuesses--; // and we subtract one of the guesses\n\t}\n}", "function checkLetter() {\n if (validKeys.indexOf(currentGuess) > -1) {\n if ((secretPhrase.indexOf(currentGuess) > -1)) {\n for (var i = 0; i < secretPhrase.length; i++) {\n if (phraseArray[i] === currentGuess) {\n blankArray[i] = currentGuess;\n spanSecretRandom.innerHTML = blankArray.join(\" \");\n }\n }\n } else {\n lettersGuessed.push(currentGuess);\n spanLettersGuessed.innerHTML = lettersGuessed.join(\" \");\n numGuesses--;\n numGuesses <= 0 ? spanNumGuesses.innerHTML = 0 : spanNumGuesses.innerHTML = numGuesses;\n }\n } else {\n alert(\"Please guess a valid letter\");\n }\n}", "function checkLetter(letter) {\n \n var isInWord = false;\n\n for (var i=0; i<blanks; i++) {\n if(randomWord[i] == letter) {\n isInWord = true;\n }\n\n }\n\n if (isInWord) {\n for (var i=0; i<blanks; i++) {\n if(randomWord[i] == letter) {\n blanksandGuessed[i] = letter;\n }\n\n }\n }\n \n\n else {\n wrongGuessed.push(letter);\n guessesLeft = guessesLeft - 1;\n }\n\n\n}", "function isValidGuess(letter){\n\tif(letter.length > 1){\n\t\treturn [{msg: \"The guess \", color: null}, {msg: letter, color: \"yellowBright\"}, {msg: \" is more than 1 character. Please limit to only 1 letter per guess.\", color: null}];\n\t}\n\telse if(letterCheck.indexOf(letter.toUpperCase()) == -1){\n\t\treturn [{msg: \"The guess \", color: null}, {msg: letter, color: \"yellowBright\"}, {msg: \" is not a valid guess.\", color: null}];\n\t}\n\telse\n\t\treturn null;\n}", "function checkGuess(letter) {\n \n if (LettersGuessed.indexOf(letter) === -1) {\n LettersGuessed.push(letter);\n\n if (Word.indexOf(letter) === -1) {\n GuessesLeft--;\n \n if (GuessesLeft <=3) {\n document.getElementById(\"GuessesLeft\").style.color = \"#e12d2e\";\n }\n \n } else { \n for (var i = 0; i < Word.length; i++) {\n if (letter === Word[i]) {\n PlayerArray[i] = letter;\n } \n } \n }\n }\n\n}", "function checkGuess(letter) {\n // If letter is correct, replace blank space with corresponding letter\n if (chosenWord.indexOf(letter) > -1) {\n for (var j=0; j < chosenWord.length; j++) {\n if (chosenWord[j] == letter) {\n underScore[j] = chosenWord[j];\n }\n }\n // If letter is wrong, guesses left decreases\n } else {\n wrongLetters.push(letter);\n guessesLeft--;\n }\n updateDomElements();\n checkAnswer();\n}", "function guessCountry(letter) {\n if (remGuess > 0) {\n // Make sure we didn't use this letter yet\n if (guessedKeys.indexOf(userGuess) >-1){\n console.log(\"You've tried this before\");\n dispuserMessage.innerHTML = \"You've guessed this letter before. Try a different one.\"\n } else {\n guessedKeys.push(userGuess);\n console.log(\"You haven't guessed this key before. Let's check it!\");\n checkGuess();\n }\n \n }\n}", "checkLetter(letter) {\n let hasMatch = false;\n //loop through each phrase letter\n for (let i = 0; i < this.phrase.length; i++){\n if (this.phrase[i] === letter) {\n this.showMatchedLetter(letter);\n hasMatch = true;\n }\n }\n return hasMatch;\n }", "function checkLetter(letter)\n{\n\tvar isInWord;\n\tfor (i = 0; i < targetWordArray.length; i++)\n\t{\n\t\tif(letter == targetWordArray[i])\n\t\t{\n\t\t\tisInWord = true;\n\t\t\treplaceLetter(letter);\n\t\t\tcorrectLetters.push(letter);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tisInWord = false;\n\t\t}\n\t}\n\tif(isInWord === false)\n\t{\n\t\twrongLetters.push(letter);\n\t\tremainingGuesses = remainingGuesses - 1;\n\t}\n\telse\n\t{\t\n\t}\n\tdocument.getElementById(\"array-box\").innerHTML = displayWord.join(\"\");\n}", "function evaluateGuess(letter) {\n // Array to store positions of letters in string\n var positions = [];\n for (var i = 0; i < wordList[currentWordIndex].length; i++) {\n if(wordList[currentWordIndex][i] === letter) {\n positions.push(i);\n }\n }\n if (positions.length <= 0) {\n remainingGuesses--;\n } else {\n for(var i = 0; i < positions.length; i++) {\n guessingWord[positions[i]] = letter;\n }\n }\n}", "checkLetter(button, selectedLetter) {\n let isChosen = true;\n //iterates through phrase and adds 'chosen' class if there is a match\n if (this.phrase.indexOf(selectedLetter) >= 0) {\n $(button).addClass('chosen');\n //displays letter to user if they guessed right\n this.showMatchedLetter(selectedLetter)\n isChosen = true;\n //iterates through phrase and adds 'wrong' class if there is no match\n } else if ($(button).attr('class') === 'key') {\n $(button).addClass('wrong');\n isChosen = false;\n } \n return isChosen\n }", "guessed(guessedLetter) {\n if (guessedLetter === this.letter) {\n this.guessed = true;\n return this.letter;\n }\n }", "function guessLetter() {\n input = document.getElementById('letter').value;\n input = input.toUpperCase();\n \n if(guessedLetters.includes(input)) {\n alert('You\\'ve already guessed the letter ' + input.toUpperCase() + '!');\n \n } else if(input === '') {\n alert('You didn\\'t guess a letter! Please enter a letter!');\n \n } else if(randomWord.includes(input)) {\n for(var i = 0; i < randomWord.length; i++) {\n if(randomWord[i].includes(input)) {\n arrBlank[i].style.visibility = 'visible';\n }\n }\n correctLetters.push(input);\n guessedLetters.push(input);\n totalGuesses++;\n\n } else {\n alert('Sorry, the letter ' + input + ' is not included in the word!');\n guessedLetters.push(input);\n maxTries--;\n totalGuesses++;\n wrongGuesses++;\n gallows();\n }\n document.getElementById('letter').value = ''; // erases value of text box after \"Guess\" is clicked\n document.getElementById('guessed-letters').textContent = 'You\\'ve guessed: ' + guessedLetters.join(' ').toUpperCase();\n document.getElementById('remaining-guesses').textContent = 'Tries remaining ' + maxTries;\n document.getElementById('total-guesses').textContent = 'Total guesses: ' + totalGuesses;\n winLose();\n}", "function correctLetterCheck(letter) {\n if (character.indexOf(letter.key) > -1) {\n correctLetter(letter);\n } else {\n incorrectLetter(letter);\n }\n}", "function evaluateGuess(letter) {\n // Array to store positions of letters in string\n var positions = [];\n\n // Loop through word finding all instances of guessed letter, store the indicies in an array.\n for (var i = 0; i < villainsList[currentWordIndex].length; i++) {\n if(villainsList[currentWordIndex][i] === letter) {\n positions.push(i);\n }\n }\n\n // if there are no indicies, remove a guess and update the hangman image\n if (positions.length <= 0) {\n remainingGuesses--;\n updateHangmanImage();\n } else {\n // Loop through all the indicies and replace the '_' with a letter.\n for(var i = 0; i < positions.length; i++) {\n guessingWord[positions[i]] = letter;\n }\n }\n}", "function alreadyGuessed(letterCheck){\n\tif(guessArray.indexOf(letterCheck)>-1)\n\t\treturn false;\n\telse\n\t\treturn true;\n}", "function repeatGuess () {\n\tfor(var i = 0; i < userGuesses.length; i++) {\n\t\tif (userLetter === userGuesses[i]) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function getValidLetterGuess() {\n function guessIsValid(letter) {\n return (\n letter.length === 1 &&\n letter.toUpperCase() !== letter.toLowerCase() &&\n !Object.values(gameDataObj).includes(letter)\n );\n }\n let letter = \"\";\n while (!letter) {\n console.log(`\\n${board.join(\" \")}\\n`); // display board\n let input = readline.question(\"Please enter your guess: \");\n if (guessIsValid(input)) {\n letter = input;\n console.log(displayLettersGuessed(letter)); // display user input\n compareLetters(letter); // comapre if user input is in secret word\n } else {\n console.clear();\n console.log(displayLettersGuessed(letter)); // display user input\n console.log(chalk.red(\"Please enter a valid letter\"));\n }\n }\n return letter.toLowerCase();\n}", "function checkMatch(userGuess) {\n\n // Runs if the user selected a matching letter\n if (lettersToGuess.includes(userGuess)) {\n console.log(\"bingo\");\n\n // This will check the matching letter and replace it in the hidden word\n for (let i = 0; i < numLetters; i++) {\n if (userGuess === lettersToGuess[i]) {\n\n hiddenWord[i] = userGuess;\n document.querySelector('#hiddenWord').innerHTML = hiddenWord;\n\n // This is used in order to determine if all letters have been matched\n numMatches++;\n\n console.log(\"It's a match\");\n console.log(hiddenWord);\n } \n }\n // Runs if the user selected a non-matching letter\n } else {\n // Decrease number of remaining guesses\n numGuesses--;\n\n // Add the user's guess to the non-matching guesses and rewrite info to the screen\n userGuesses.push(userGuess);\n document.querySelector('#userGuesses').innerHTML = 'Guesses: ' + userGuesses;\n document.querySelector('#numGuesses').innerHTML = 'Guesses Left: ' + numGuesses;\n\n console.log(userGuesses);\n console.log('numGuesses: ' + numGuesses);\n }\n\n // Runs after each match or mismatch to determine if the game has been won or lost\n checkWinLoss();\n}", "function playGame(letter) { \n\n var letter = letter.toLowerCase();\n\n if (alphabet.indexOf(letter) > -1 === lettersCurrentWord.indexOf(letter) > -1) {\n showLetter(letter);\n correctGuesses.push(letter);\n console.log(correctGuesses);\n checkForWin();\n }\n \n else {\n maxGuess--;\n document.getElementById(\"guesses-left\").innerHTML = \"Guesses left: \" + maxGuess;\n wrongLetters.push(letter);\n document.getElementById(\"wrong-letter\").innerHTML = \"Wrong letters: \" + wrongLetters;\n }\n}", "function checkLetters(letter) {\n\n\n var letterInWord = false;\n\n for (var i = 0; i < blanks; i++) {\n if (word[i] === letter) {\n letterInWord = true;\n\n }\n }\n\n if (letterInWord) {\n for (var i = 0; i < blanks; i++) {\n if (word[i] === letter) {\n correctLetters[i] = letter;\n }\n\n }\n } else {\n guessesLeft--;\n wrongLetters.push(letter)\n }\n\n\n}", "function hangman(letter){\n //is the key a valid letter? \n if (availableLetters.indexOf(letter)!==-1) {\n availableLetters.splice(availableLetters.indexOf(letter),1);\n letterClicked.push(letter);\n document.getElementById(\"outputError\").innerText= messages.correct;\n //is valid\n /* does guess exist in current word? if so, add to answer, if final letter added, game over with win message */\n if(existInWord(letter)){\n printAnswer();\n }\n else{\n lives--;\n printLives(messages.incorrect);\n error.play();\n }\n }else if(letterClicked.indexOf(letter)!==-1){\n lives--;\n printLives(messages.guessed); \n error.play(); \n }else{\n lives--;\n printLives(messages.validLetter);\n error.play();\n }\n checkScores();\n\n}", "function checkGuess(lettersGuessed, userGuess) {\n\tif (lettersGuessed.indexOf(userGuess) == -1) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "function checkLetter (letter){\r\n var letterInSong = false; \r\n\r\n for (var i = 0; i < underscores; i++){\r\n if(chosenWord [i] === letter){\r\n letterInSong = true; \r\n }\r\n }\r\n if (letterInSong){\r\n for ( i = 0; i < underscores; i++){\r\n if(chosenWord [i] === letter){\r\n rightGuesses[i] = letter; \r\n }\r\n }\r\n }\r\n else{\r\n numGuesses --;\r\n wrongGuesses.push(letter)\r\n }\r\n\r\n\r\n// once you guess one song\r\ndocument.getElementById(\"wordBlank\").innerHTML = rightGuesses.join(\" \");\r\ndocument.getElementById(\"attemptsLeft\").innerHTML = numGuesses.join(\" \");\r\ndocument.getElementById(\"wrongGuess\").innerHTML = wrongGuesses.join(\" \");\r\n\r\nconsole.log(letterInWord);\r\nconsole.log(rightGuesses);\r\n\r\nif(letterInWord.join(\" \") === rightGuesses.join(\" \")){\r\n winCounter++;\r\n alert (\"YOU WIN\");\r\n document.getElementById(\"winCounter\").innerHTML = winCounter;\r\n startGame();\r\n}\r\nelse if(numGuesses === 0){\r\n document.getElementById(\"lossCounter\").innerHTML = lossCounter++;\r\n document.getElementById(\"wrongGuess\").innerHTML = \"\";\r\n alert (\"You lost... try again!\");\r\n startGame();\r\n}\r\n}", "function Guess(letter) {\nconsole.log(letter);\n\nif (gameRunning && GuessedLetters.indexOf(letter) === -1) {\n\n//Run Game \nGuessedLetters.push(letter);\n\n//check if guessed letter is in picked word\n\nfor (var i = 0 ; i < ChosenWord.length ; i++) {\n //convert both values to lower case for comaprison.\n if (ChosenWord[i].toLowerCase() === letter.toLowerCase()) {\n //if match swap out character in placeholder\n ChosenWordarr[i] = ChosenWord[i];\n }\n}\nplaceholder.innerHTML = ChosenWordarr.join('');\nIncorrect(letter);\n}\nelse{\n if(!gameRunning) {\n alert(\"Press the Button to save the world!\")\n Alert();\n } else {\n alert(\"This button has already been pressed!\")\n Alert();\n }\n}\n }", "function updateGuesses(letter) {\n // Scans through current games letter presses\n for (var i = 0; i < letterPresses.length; i++) {\n if (\n letter.key.toUpperCase() === letterPresses[i] ||\n !letter.key.toUpperCase().match(/^[A-Z]+$/)\n ) {\n // False meaning don't use current letter\n currentLetter = false;\n break;\n } else {\n currentLetter = true;\n }\n }\n\n if (currentLetter === true) {\n numGuesses--;\n document.querySelector(\"#guess-number\").innerHTML = numGuesses.toString();\n document\n .querySelector(\"#letters-guessed\")\n .append(letter.key.toUpperCase() + \" \");\n letterPresses.push(letter.key.toUpperCase());\n\n if (numGuesses === 0) {\n restartGame();\n }\n }\n}", "function checkLetters(letter) {\n var letterInWord = false;\n\n for (var i = 0; i < gaps; i++) {\n if (randomWord[i] == letter) {\n letterInWord = true;\n }\n }\n //if letterInWord (false)\n if (letterInWord) {\n //check each letter to see if it matches word\n for (var i = 0; i < gaps; i++) {\n if (randomWord[i] == letter) {\n gapsAndCorrect[i] = letter;\n }\n }\n }\n //otherwise, push the incorrect guess in the incorrect guesses section, and reduce remaining guesses\n else {\n incorrectGuess.push(letter);\n guessesRemaining--;\n }\n console.log(gapsAndCorrect);\n}", "function evaluateGuess(letter) {\n // to store store of letters \n var store = [];\n\n // finding all letters store.\n for (var i = 0; i < words[asnwerArray].length; i++) {\n if(words[asnwerArray][i] === letter) {\n store.push(i);\n }\n }\n\n if (store.length <= 0) {\n triesLeft--;\n updatehangman();\n } else {\n for(var i = 0; i < store.length; i++) {\n word[store[i]] = letter;\n }\n }\n}", "function handleGuess(chosenLetter) {\r\n guessed.indexOf(chosenLetter) === -1 ? guessed.push(chosenLetter) : null;\r\n document.getElementById(chosenLetter).setAttribute('disabled', true);\r\n\r\n if (answer.indexOf(chosenLetter) >= 0) {\r\n guessedWord();\r\n checkIfGameWon();\r\n } else if (answer.indexOf(chosenLetter) === -1) {\r\n mistakes++;\r\n updateMistakes();\r\n checkIfGameLost();\r\n updatedinoPicture();\r\n }\r\n}", "function letterGuess(){\r\n var c = document.getElementById('Gletter').value.toUpperCase();\r\n // If the guesses letter is Present !!\r\n if (key.includes(c)){\r\n // All the chars having same value as c must be shown ie if a letter is guessed, all places having it it shown\r\n for (var w = 0; w < guesses.length; w++){\r\n // Equals the word\r\n if (c == key[w]){\r\n // the space is still blank-Fill it in\r\n if (guesses[w] == '_')\r\n guesses[w] = c;\r\n // If not\r\n else{\r\n // Check if other blanks contain the same letter\r\n var count = 0;\r\n for (var v = w+1; v < key.length; v++){\r\n if (key[v] == c)\r\n count += 1;\r\n }\r\n // If they do not then for 5 seconds show that the letter exists\r\n if (count == 0){\r\n document.getElementById('last').innerHTML = 'Letter Already Present';\r\n setTimeout(function(){document.getElementById('last').innerHTML = 'Current Position: ';}, 5000);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // If the letter is not in the word at all => Punishment extra part to the hanging...\r\n else{\r\n errors += 1;\r\n changeImage();\r\n }\r\n // Checking for decisive result\r\n if (errors == 10)\r\n resultingText(false);\r\n if (guesses.toString().replaceAll(',', '') == key)\r\n resultingText(true);\r\n \r\n // Setting the input back to null and printing the new dashes again\r\n document.getElementById('Gletter').value = '';\r\n dashes();\r\n}", "function moreUserGuesses(letter) {\n \t\treturn letter != computerGuess;\n}", "function guessLetter() {\n //gets value of the letter guess\n\n guess = document.getElementById(\"playerGuess\").value;\n guess = guess.toLowerCase();\n //Check to see if input is valid or blank\n if (!guess || guess.length > 1 || !(guess.match(/[a-z]/i))){\n alert('Please enter a letter.');\n document.getElementById(\"playerGuess\").value = \"\";\n \n } else {\n //check to see if letter has been guessed\n letterGuessCheck();\n \n //check to see if the letter is in the word\n //isInWord();\n\n }; \n}", "function checkLetters(letter) {\n\n // just in case the user puts a number\n var letterInWord = false;\n\n // to see if the letter is even in the array\n for (var i = 0; i < numBlanks; i++) {\n if (chosenWord[i] === letter) {\n // if it does exist than go on\n letterInWord = true;\n }\n }\n\n // if it does exist this will tell where exactly that it does\n if (letterInWord) {\n\n // loop through the word.\n for (var j = 0; j < numBlanks; j++) {\n\n // populate the blanksAndSuccesses with every instance of the letter.\n if (chosenWord[j] === letter) {\n // here we set the specific space in blanks and letter equal to the letter when there is a match.\n blanksAndSuccesses[j] = letter;\n }\n }\n // log for testing.\n console.log(blanksAndSuccesses);\n }\n // if the letter doesnt exist at all\n else {\n // ..then we add the letter to the list of wrong letters, and we subtract one of the guesses.\n wrongGuesses.push(letter);\n numGuesses--;\n }\n}", "checkIfLetterHasbeenGuessed(letter) {\r\n return this.guessedLetters.includes(letter);\r\n }", "function letterGuessed(letter) {\n // If user has already guessed letter, push to guessedLetters array\n if (guessedLetters.indexOf(letter) === -1) {\n guessedLetters.push(letter);\n checkGuess(letter);\n } else {\n console.log(\"you pressed this already\");\n }\n}", "function letterGuess(letter) {\n console.log(letter);\n\n // Test if the new game has been started and if the letter has not been chosen already\n if (gameRunning === true && guessedLetterBank.indexOf(letter) === -1) {\n\n // Put letter in the guessed word bank\n guessedLetterBank.push(letter);\n\n // for loop to check every character in the placeholder\n for (var i = 0; i < pickedWord.length; i++) {\n // Convert both values to lower case so I can compare them correctly\n if (pickedWord[i].toLowerCase() === letter.toLowerCase()) {\n // If a match, swap out that character in the placeholder with the letter\n pickedWordPlaceholderArr[i] = pickedWord[i];\n }\n }\n\n // Replace the textContent of the placeholder in DOM\n $placeholders.textContent = pickedWordPlaceholderArr.join('');\n // Pass letter into our checkIncorrect function\n checkIncorrect(letter);\n\n }\n // If new game has not been started, alert error message.\n else {\n if (!gameRunning) {\n alert(\"The game isn't running, click on the New Game button to start over.\")\n } else {\n alert(\"You've already guessed this letter, try a new one!\")\n }\n }\n}", "function addLetter (usersKeypress) {\n var repeatGuess = lettersGuessed.some(function(item){\n return item === usersKeypress;\n})\n// alerts the player they have already guessed that letter and to pick another one\nif (repeatGuess) {\n alert(usersKeypress + \" Been there, done that- Try again!\");\n}\n// continues to compare the player guess to the computer guess\n else {\n lettersGuessed.push(usersKeypress);\n console.log(lettersGuessed);\n showLettersGuessed();\n guessMatch(usersKeypress);\n}\n}", "function letterMatch(selected){\n\n var letterSuccess = false;\n\n for(var j=0; j < numberOfBlanks; j++){\n if(wordSelected[j] === selected){\n letterSuccess = true;\n }\n \n }\n\n if(letterSuccess){\n for(k=0; k < numberOfBlanks; k++){\n if(wordSelected[k] === wordSelected[wordSelected.indexOf(selected)]){\n blankLines[k] = selected;\n }\n }\n \n }\n\n else{\n guessesCounter --;\n wrongLetters.push(selected);\n document.getElementById(\"incorrect-guess\").innerText= wrongLetters.join(\", \");\n\n }\n}", "function makeGuess(letter) {\n if (remainingGuesses > 0) {\n if (!gameStarted) {\n gameStarted = true;\n }\n\n if (guessedLetters.indexOf(letter) === -1) {\n guessedLetters.push(letter);\n evaluateGuess(letter);\n }\n }\n updateDisplay();\n checkWin();\n}", "function checkLetter(num) {\r\n\r\n var good = false;\r\n for (i = 0; i < password.length; i++) {\r\n\r\n if (password.charAt(i) == letters[num]) {\r\n password1 = password1.setChar(i, letters[num]);\r\n good = true;\r\n }\r\n }\r\n if (good == true) {\r\n markGood(num);\r\n updateBoard();\r\n if (password1 == password) win = true;\r\n } \r\n else {\r\n markBad(num);\r\n chances++;\r\n document.getElementById(\"hangman\").innerHTML = '<img src=\"img/hang' + chances + '.jpg\" alt=\"\">';\r\n }\r\n checkIfGameEnded();\r\n}", "function checkLetters(input) {\n var isLetterInWord = false;\n for (var i = 0; i < numEmpty; i++) {\n if (lettersInMovie.indexOf(input) > -1) {\n isLetterInWord = true;\n }\n }\n if (isLetterInWord) {\n for (var i = 0; i < numEmpty; i++) {\n if (lettersInMovie[i] == input) {\n answer[i] = input;\n\n }\n }\n }\n else {\n guesses--;\n guessedLetters.push(input);\n document.getElementById(\"guesses\").innerHTML = guesses;\n document.getElementById(\"guessed-letters-list\").innerHTML = guessedLetters;\n }\n}", "function testWin() {\n var hasLetters = false;\n\n for (var i = 0; i < guitarist.length; i++) {\n\n if (goodGuess.includes(guitarist.toLowerCase().charAt(i)) || (guitarist.charAt(i) === \" \")) {\n hasLetters = true;\n } else {\n hasLetters = false;\n }\n\n if (hasLetters === false) {\n if (numGuess === 0) {\n displayMessage('You lose, click \"Start\" to try again :(');\n document.querySelector(\"#wordLetters\").innerHTML = guitarist;\n return true;\n }\n return false;\n } \n\n }\n \n if (hasLetters === true) {\n displayMessage('You win!, click \"Start\" to play again :)');\n return true;\n }\n\n\n}", "function validate() {\n\n\t\t\tvar alphabet = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\n\n\t\t\tfor (var i = 0; i < guessedLetters.length; i++) {\n\n\t\t\t\tif (userGuess === guessedLetters[i] || userGuess === blankWord[i]) {\n\t\t\t\t\talert(\"You've already tried \" + userGuess + \". Try again!\");\n\t\t\t\t\treturn;\n\t\t\t\t} \n\t\t\t}\n\n\t\t\tfor (var j = 0; j < alphabet.length; j++) {\n\t\t\t\tif (userGuess === alphabet[j]) {\n\t\t\t\t\tvalid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function guessExist(char) {\n if (guesses.indexOf(char.key) < 0){\n return true\n }\n}", "function checkLetters(letter) {\n // create boolean toggle based on whether a user letter is found in the word.\n var letterInWord = false;\n for (var i = 0; i < numBlanks; i++) {\n // ==>\n if (randomWord[i] === letter) {\n letterInWord = true;\n }\n }\n // if the letter exists in the word, then find out where it belongs.\n // ==>\n if (letterInWord) {\n // Loop through the word\n for (var j = 0; j < numBlanks; j++) {\n if (randomWord[j] === letter) {\n // put it in the correct spot.\n blanksAndSuccesses[j] = letter;\n }\n }\n console.log(\"Correct Spot?: \", blanksAndSuccesses);\n }\n // ==>\n else {\n // add the letter to the list of wrong letters and subtract one of the guesses.\n guessWrongArray.push(letter);\n guessesLeft--;\n }\n}", "showMatchedLetter(letter){\r\n $(letter).addClass('show');\r\n // display the char of the corresponding letters check if game is won\r\n }", "function evaluateGuess(letter) {\n // Array to store positions of letters in string\n var positions = [];\n\n // Loop through word finding all instances of guessed letter and store in an array.\n for (var i = 0; i < currentWord.length; i++) {\n if (currentWord[i] === letter) {\n positions.push(i);\n }\n }\n // Loop through all the matching keys pressed and replace the '_' with a letter.\n for (var i = 0; i < positions.length; i++) {\n guessingWord[positions[i]] = letter;\n \n }\n}", "function compare(x){\n\tvar letterFound = false;\n\t// If letter has not been guessed, run the following code. If letter has already been guessed, nothing happens.\n\tif (lettersGuessed.indexOf(x) === -1) {\n\t\t// Add letter to list of guessed letters\n\t\tlettersGuessed.push(x);\n\t\t// Loop through each letter of answer and compare against the letter the user guessed.\n\t\tfor (i=0; i<answer.length; i++) {\n\t\t\t// If they match, reveal the corresponding index in the currentWord array. If they don't match, nothing happens.\n\t\t\tif (x===answer[i]) {\n\t\t\t\tcurrentWord[i] = answer[i];\n\t\t\t\tletterFound = true;\n\t\t\t}\n\t\t}\n\t\t// If after the loop completes the user's guess does not match any letters in the answer, reduce guessesRemaining by 1...\n\t\tif (letterFound === false) {\n\t\t\tguessesRemaining--;\n\t\t\t// And if guessesRemaining reaches 0, run function lose()\n\t\t\tif (guessesRemaining === 0) {\n\t\t\t\tlose();\n\t\t\t}\n\t\t}\n\t\t// If user's guess does match a letter in the answer, and then if the answer has been completely discovered, run function win()\n\t\telse {\n\t\t\tif (currentWord.join(\"\") === answer) {\n\t\t\t\twin();\n\t\t\t}\n\n\t\t}\n\t}\n\n}", "checkLetter(letter) {\r\r // Loop through the phrase text and if the letter matches\r // the phrase text at index j, return true\r for (let j = 0; j < this.phrase.length; j++){\r\r\n if (this.phrase[j] == letter)\r\n return true;\r\n }\r\r // No match, return false\r return false;\r }", "function checkGuess(letter) {\n //if letter is not in guessedLetters array then push the letter to the array, and if the letter isn't in the answer word then -1 the numGuessesRemaining\n if (guessedLetters.indexOf(letter) === -1 && ansWord.indexOf(letter) === -1) {\n guessedLetters.push(letter);\n numGuessesRemaining--;\n //if numGuessesRemaining is 3 or less then change the color\n if (numGuessesRemaining <=3) {\n document.getElementById(\"numGuesses\").style.color = \"#e12d2e\";\n }\n //if letter is in answer then replace the positioned \"_\" with the letter\n } else {\n for (var i = 0; i < ansWord.length; i++) {\n if (letter === ansWord[i]) {\n ansWordArr[i] = letter;\n }\n }\n }\n }", "function checkLetter(letter){\n\tvar match = false;\n\tfor (var i=0; i<secretWord.length; i++) {\n\t\tif(letter === secretWord[i]){\n\t\t\tif (blank[i] === blankSpace) {\n\t\t\t\tblank[i] = letter;\n\t\t\t\tmatch = true;\n\t\t\t\twordSize--;\n\t\t\t}\t\n\t\t}\n\t}\n\tif(match === false) {\n\t\tguesses--;\n\t\tcheckNumGuess();\n\t}\n\treturn match;\n}", "function checkforMatch(f) {\n if (inputWord.length === 0) {\n let modalText = document.querySelector(\".modal__text\");\n modalBox.style.display = \"flex\";\n modalText.innerText = `Pick a word first!`;\n }\n if (inputWord.indexOf(f) === -1) {\n console.log(\"incorrect\");\n gunshot.play();\n wrongLetters.push(f);\n counter++;\n guessesLeft--;\n guessCounter.innerText = `Guesses Left: ${guessesLeft}`;\n imageLoop.setAttribute(\"src\", imagesArr[counter]);\n document\n .querySelector(\"[data-letter=\" + f + \"]\")\n .classList.add(\"letter_no\");\n if (counter === 8) {\n let modalText = document.querySelector(\".modal__text\");\n let fullWord = inputWord.join(\"\");\n modalBox.style.display = \"flex\";\n modalText.innerText = `You Lost! The correct word was ${fullWord}`;\n }\n return;\n }\n console.log(\"correct letter\");\n document.querySelector(\"[data-letter=\" + f + \"]\").classList.add(\"letter_yes\");\n addLetters(f);\n}", "function duplicateChars(letter) {\n if (correctGuesses.includes(letter) || wrongGuesses.includes(letter)) {\n warning = \"YOU ALREADY GUESSED THAT LETTER!\";\n warningElement.innerHTML = warning;\n }\n}", "function isRepeat() {\n var i = 0;\n for (i = 0; i < lettersUsed.length; i++) {\n if (userGuess.toUpperCase() === lettersUsed[i].toUpperCase()) {\n feedBackText.textContent = \"This letter was already used. Please make another selection.\";\n return true;\n }\n }\n return false;\n }", "function checkLetter(letter, compPick) {\n if (letter === compPick) {\n wins++;\n guessesMade = [];\n } else {\n guessesMade.push(letter);\n losses++;\n guessesRemaining--;\n };\n}" ]
[ "0.7899323", "0.7839297", "0.77726775", "0.7767463", "0.7766113", "0.77641034", "0.7746255", "0.77344704", "0.7715875", "0.7710845", "0.7689169", "0.7672926", "0.765627", "0.7629062", "0.7622974", "0.7579444", "0.7562825", "0.75552756", "0.75468504", "0.7537755", "0.7527801", "0.7483637", "0.7470567", "0.74486023", "0.74450374", "0.7444301", "0.74409926", "0.7439777", "0.7430606", "0.74285966", "0.74180907", "0.7416449", "0.74145633", "0.7380895", "0.73790705", "0.7365297", "0.7360678", "0.7359699", "0.7357696", "0.73524714", "0.7344889", "0.7336321", "0.73307234", "0.7316902", "0.73106724", "0.7301868", "0.73015046", "0.7278938", "0.72713894", "0.72613937", "0.72578025", "0.7256039", "0.7252259", "0.7250855", "0.72480756", "0.7245526", "0.72403455", "0.7240072", "0.7236229", "0.7223488", "0.72210085", "0.72184634", "0.7217211", "0.7215118", "0.72101754", "0.7199311", "0.71907616", "0.7185825", "0.71725774", "0.7167661", "0.7164126", "0.71640235", "0.71597856", "0.7149466", "0.7148743", "0.7146843", "0.7144796", "0.7144007", "0.7141454", "0.7135016", "0.7129167", "0.7117763", "0.71145916", "0.711363", "0.7110495", "0.7108993", "0.71079886", "0.71028185", "0.71017474", "0.710123", "0.7095768", "0.7088184", "0.70851696", "0.7074578", "0.70734954", "0.70717406", "0.7065458", "0.7060095", "0.70595014", "0.7056852" ]
0.7475369
22
This method checks to see if any letter is still hidden or not, used to check if the user has guessed the word
checkLettersForGuessed() { // Initialize a count let count = 0; for (let i in this.array) { let LetterObj = this.array[i]; // If the letter hasn't been guessed yet increase count if (!LetterObj.guessed) { count++; } } // If there are still unguessed letters, return true. If all letters have been guessed return false. if (count > 0) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkForWin() {\n let unsolvedLetters = 0;\n\n for (let i = 0; i < phraseLetters.length; i++) {\n phraseLetters[i].className == `hide letter ${ phraseLetters[i].textContent }` ? \n unsolvedLetters++ : unsolvedLetters = unsolvedLetters;\n }\n\n return unsolvedLetters === 0;\n }", "checkForWin() {\n //Returns false if there are any hidden letter, returns true if there are none\n return ($('#phrase ul .hide').length === 0);\n }", "checkForWin(){\n let unguessedLetters = 0; \n for(let c = 0; c < this.activePhrase.phrase.length; c++){\n if(phraseSection.firstElementChild.children[c].classList.contains('hide')){\n unguessedLetters ++;\n } \n } \n if(unguessedLetters === 0){\n return true;\n } \n }", "checkForWin(){\n const $hidenLetters = $('#phrase .hide');\n if($hidenLetters.length === 0){\n return true;\n }\n return false;\n }", "function checkLetter(guess) {\n\tmatch = null;\n\tlet letters = document.querySelectorAll('.letter'); //unrevealed letters collection\n\tfor (i = 0; i < letters.length; i++) {\n\t\tif (guess.textContent == letters[i].textContent) {\n\t\t\tletters[i].classList.add('show');\n\t\t\tmatch = true;\n\t\t}\n\t}\n\treturn match;\n}", "checkLetter(guessedletter) {\r\n let activePhr = game.activePhrase.toLowerCase();\r\n const phraseLetterArray = activePhr.split(\"\").filter(i => i != \" \");\r\n let letterWasCheacked = phraseLetterArray.includes(guessedletter);\r\n return letterWasCheacked;\r\n }", "function checkForLetter(letter) {\n var foundLetter = false\n \n // loop through word letters\n for (var i = 0, j = hiddenWord.length; i < j; i++) {\n\n // if matching letter, assign to guessing word array\n if (letter === hiddenWord[i]) {\n wordBeingGuessed[i] = letter\n foundLetter = true\n\n // if all letters match hidden word, increase winTotal, reset game\n if (wordBeingGuessed.join(\"\") === hiddenWord) {\n winTotal++\n removePicture()\n displayPicture()\n updateDisplay()\n resetGame()\n }\n }\n }\n // if letter doesnt match, lower guessing remaining\n if (!foundLetter) {\n if (!guessedLetters.includes(letter)) {\n guessedLetters.push(letter)\n guessesRemaining--\n }\n\n // if guesses are 0, display the word and reset game\n if (guessesRemaining === 0) {\n wordBeingGuessed = hiddenWord.split()\n resetGame()\n }\n }\n\n updateDisplay()\n}", "checkForWin() {\n const hiddenLetters = document.getElementsByClassName(\"hide letter\"); //Total hidden litters which are set by Phrase class\n if (hiddenLetters.length > 0) {\n //if more than zero, not winning yet if 0 return true and player won\n return false;\n } else {\n return true;\n }\n }", "displayLetters() {\r\n let wordHidden = \"\\n\";\r\n for (let i = 0; i < this.text.length; i++) {\r\n if (this.lettersToGuess.includes(this.text.charAt(i))) {\r\n wordHidden += HangmanUtils.symbol;\r\n }\r\n else {\r\n wordHidden += this.text.charAt(i);\r\n }\r\n wordHidden += \" \";\r\n }\r\n console.log(wordHidden);\r\n }", "checkWin() {\n const letter = document.querySelectorAll('.letter')\n for(let i = 0; i < letter.length; i++) {\n if(letter[i].className.includes('hide')){\n return false;\n }\n }\n return true;\n }", "checkForWin(){\r\n revealedLetters = document.querySelectorAll('.show')\r\n let phraseNoSpaces = splitPhraseArray.filter( char => char !== ' ')\r\n if(revealedLetters.length === phraseNoSpaces.length){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "function checkLetters(letter) {\n\t// check if letter exists in word at all\n\tvar isLetterInWord = false;\n\tfor (var i=0; i<hiddenWord.length; i++) {\n\t\tif (hiddenWord[i]===letter) {\n\t\t\tisLetterInWord= true;\n\t\t\tconsole.log('Letter found');\n\t\t}\n\t}\n\n\tif (isLetterInWord) {\n\t\t// check where in the word the letter exists\n\t\tfor (i=0; i<hiddenWord.length; i++) {\n\t\t\tif(hiddenWord[i]===letter) {\n\t\t\t\tdashes[i] = letter;\n\n\t\t\t}\n\t\t}\n\t\t$('#hiddenWord').html(dashes);\n\t} else {\n\t\twrongGuesses.push(letter+' ');\n\t\tguessesLeft--;\n\t\t$('#guessesLeft').html(guessesLeft);\n\t\t$('#wrongGuesses').html(wrongGuesses);\n\t}\n}", "checkForWin() {\n //The player wins by \"showing\"/guessing all the letters, which means hidden letter count would be 0\n return (document.getElementsByClassName('hide').length ? 0 : true);\n }", "function checkLetter(guess) {\n const letterAnswers = document.querySelectorAll('.letter');\n const li = document.querySelectorAll('.letter');\n let match;\n for (let i = 0; i < letterAnswers.length; i +=1) {\n let show = letterAnswers[i].textContent;\n if (show === guess) {\n li[i].classList.add('spin');\n li[i].className += ' show';\n match = show;\n }\n }\n return match;\n }", "checkForWin(){\n \t\tconst remainingHiddenLetters = document.querySelectorAll(\".hide\").length\n \t\tif (remainingHiddenLetters === 0){\n \t\t\treturn true;\n \t\t} else {\n \t\t\treturn false; \n \t\t}\n \t}", "function answerCheck() {\n\tgameWordDisplay = \"\"; \n\n//loops through the game word \nfor (var i = 0; i < gameWord.length; i++) {\n\n\t//check the letters guessed by the user agains each position of the game word\n\tif (guessedLetters.includes(gameWord.charAt(i))) {\n\n\t\t//if the letter is there, displays it at the position\n\t\tgameWordDisplay += gameWord.charAt(i);\n\t\t//if not, replaces the display with _ _ _\n\t} else {\n\t\tgameWordDisplay += \"_\";\n\n\t}\n}\n}", "function showWord(letter) {\n\n console.log(chosenWord);\n // Check if current letter exists\n for (var i = 0; i < chosenWord.length; i++) {\n // If the letter exists, display it on screen\n if (chosenWord[i].toLowerCase() === letter) {\n hideWord[i] = letter;\n hidden.innerHTML = hideWord.join(\"\");\n }\n }\n\n // If the letter doesn't exist, decrement the guess counter\n if (!chosenWord.includes(letter)) {\n startingGuesses--;\n guesses.innerHTML = startingGuesses;\n\n // If there are no remaining guesses, show the word on screen\n if (startingGuesses === 0) {\n losses++;\n alert(\"game over\");\n hidden.innerHTML = chosenWord;\n //gameInitalLoad();\n }\n // If all of the letters have been guessed, increment wins by 1\n else if (!hideWord.includes(\"-\") && guesses > 0) {\n wins++;\n var showWins = document.getElementById(\"wins\");\n showWins.innerHTML = wins;\n }\n }\n}", "function checkLetter(keyLetter) {\n let list = document.querySelectorAll('.letter');\n let correctLetter = false;\n \n for (let i = 0; i < list.length; i++) {\n \n let listLetter = list[i].textContent;\n \n if (listLetter === keyLetter) {\n correctLetter = true;\n list[i].classList.add('show');\n // CSS transistion added for exceed expectations\n list[i].style.transition = 'all 2s';\n } \n }\n \n if (correctLetter === false) {\n missed += 1;\n } if (missed == 1) {\n life[0].style.display = 'none';\n } if (missed == 2) {\n life[1].style.display = 'none';\n } if (missed == 3) {\n life[2].style.display = 'none';\n } if (missed == 4) {\n life[3].style.display = 'none';\n } if (missed == 5) {\n life[4].style.display = 'none';\n }\n \n return correctLetter;\n}", "function checkGuessedLetters() {\n //This is checking that if users guess is in alailableLetters\n if(availableLetters.indexOf(this.event.key) > -1) {\n //Looping through guessed letters for the length of word\n for(var i = 0; i < word.length; i++) {\n //If the users guess has already been guessed then we will set guessed to true\n if(this.event.key === guessedLetters[i]) {\n guessed = true;\n }\n }\n }\n}", "function checkLetter (guess){\n\t\tconst letter = document.getElementsByClassName(\"letter\");\n\t\tlet foundMatch = null;\n\t\tfor (let i = 0; i < letter.length; i++) {\n\t\t\tif (guess === letter[i].textContent.toLowerCase()) {\n letter[i].classList.add('show');\n foundMatch = letter[i].textContent;\n } \n }\n return foundMatch\n }", "function testWin() {\n var hasLetters = false;\n\n for (var i = 0; i < guitarist.length; i++) {\n\n if (goodGuess.includes(guitarist.toLowerCase().charAt(i)) || (guitarist.charAt(i) === \" \")) {\n hasLetters = true;\n } else {\n hasLetters = false;\n }\n\n if (hasLetters === false) {\n if (numGuess === 0) {\n displayMessage('You lose, click \"Start\" to try again :(');\n document.querySelector(\"#wordLetters\").innerHTML = guitarist;\n return true;\n }\n return false;\n } \n\n }\n \n if (hasLetters === true) {\n displayMessage('You win!, click \"Start\" to play again :)');\n return true;\n }\n\n\n}", "checkSpace(letters, correctLetters) {\n \n if(correctLetters.indexOf(letters) >= 0) {\n return \"show letter\";\n } else if (letters === \" \") {\n return 'space';\n } else {\n return 'hide letter'\n }\n }", "checkForWin() {\r\n const shown = document.getElementsByClassName('letter');\r\n const shownArr = [...shown];\r\n\r\n for (let show of shownArr) {\r\n if (show.classList.contains('hide')) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "checkForWin() {\n let win = true;\n $('.letter').map(letter => {\n if ($('.letter').eq(letter).hasClass('hide')) {\n win = false;\n }\n });\n return win;\n }", "checkForWin() {\r\n return this.activePhrase.phrase.split(\"\")\r\n // if any letter in the phrase hasn't been guessed, allLettersGuessed\r\n // will be false from that point on, and false will be returned.\r\n // if all letters of the phrase have been guessed, they'll all be in\r\n // this.guessedLetters, and truth will be maintained;\r\n .reduce((allLettersGuessed,currentLetter) => {\r\n return (this.guessedLetters[currentLetter] || false) && allLettersGuessed\r\n },true);\r\n }", "function guessLetter() {\n //gets value of the letter guess\n\n guess = document.getElementById(\"playerGuess\").value;\n guess = guess.toLowerCase();\n //Check to see if input is valid or blank\n if (!guess || guess.length > 1 || !(guess.match(/[a-z]/i))){\n alert('Please enter a letter.');\n document.getElementById(\"playerGuess\").value = \"\";\n \n } else {\n //check to see if letter has been guessed\n letterGuessCheck();\n \n //check to see if the letter is in the word\n //isInWord();\n\n }; \n}", "function isLetterInWord(playedLetter) {\n var playedFound = false;\n for (var index = 0; index < wordDisplay.length; index++) {\n var displayLetter = wordDisplay[index];\n var found = false;\n if (playedLetter.trim() == displayLetter) {\n found = true;\n playedFound = true;\n }\n if (found) {\n wordToUse[index] = playedLetter;\n }\n }\n if (!playedFound) {\n wrongGuessCount++;\n }\n //Loop through the word to use and create a nice set of fields\n cleanUpHiddenWord();\n var imgLink = \"../images/\" + wrongGuessCount + \".jpg\";\n document.getElementById(\"hangman\").innerHTML = formatImage(imgLink);\n if (allLetterSlotsFilled()) {\n window.alert(\"Congratulations, you solved the word\");\n //newGame();\n }\n if (maxWrongGuess == wrongGuessCount) {\n window.alert(\"Sorry, max number of wrong guesses met for word > \" + wordInfo);\n //newGame();\n }\n}", "function letterCheck() {\n unknown.forEach((x, i) => {\n if (guess.localeCompare(unknown[i], \"en\", { sensitivity: \"base\" }) == 0) {\n underscores[i] = unknown[i];\n }\n document.getElementById(\"mysteryWord\").innerHTML = underscores.join(\"\");\n });\n}", "function revealWord(letter, answer_word, masked_word, incorrect_letter_guesses){\n var new_word = '';\n\n if (! isLetter(letter)){\n $(\".letter_alert\").text(letter + \" Invalid Letter\");\n return masked_word;\n }\n\n if (incorrect_letter_guesses.has(letter) || masked_word.indexOf(letter) != -1){\n $(\".letter_alert\").text(letter + \" Already Guessed\");\n return masked_word;\n }\n\n if (answer_word.indexOf(letter) === -1){\n guess_count -= 1;\n incorrect_letter_guesses.add(letter);\n $(\".your_letters\").append(letter);\n $(\".panel-title\").text(\"You have \" + guess_count + \" guesses left\");\n return masked_word;\n }\n\n for (var i = 0; i < answer_word.length; i++){\n if (letter == answer_word[i]){\n new_word += letter;\n }\n else {\n new_word += masked_word[i];\n }\n }\n return new_word;\n}", "checkForWin(){\r\n if(show.length === letters.length){\r\n return true;\r\n }\r\n }", "checkForWin() {\r\n const activeLetters = this.activePhrase.phrase.split('');\r\n const selectedLetter = document.querySelectorAll(`li.show.letter`);\r\n\r\n for (let i = 0; i < activeLetters.length; i++) {\r\n if (activeLetters[i] === ' ') {\r\n activeLetters.pop(activeLetters[i]);\r\n }\r\n }\r\n\r\n for (let i = 0; i < activeLetters.length; i++) {\r\n if (selectedLetter.length === activeLetters.length) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }", "checkForWin() {\n const noSpacesArray = game.activePhrase.phraseArray.filter(\n (character) => character !== \" \"\n );\n return matchedLetterList.length === noSpacesArray.length;\n }", "function checkLetter() {\n const sContainer = selectElement(\".secret-word\");\n let word = secretWord.toUpperCase();\n\n //Check if word includes this letter\n if (word.includes(this.textContent)) {\n this.classList.add(\"true\");\n let indexArr = [];\n //Get all indexs where we must replace symbol\n for (let i = 0; i < secretWord.length; i++) {\n let symbol = word.indexOf(this.textContent, i);\n if (symbol != -1) {\n indexArr.push({ index: symbol });\n }\n }\n //Replace symbols\n for (let i = 0; i < indexArr.length; i++) {\n let wordSize = (+indexArr[i].index) ?\n this.textContent.toLowerCase() : this.textContent;\n sContainer.textContent = sContainer.textContent\n .replaceAt(indexArr[i].index, wordSize);\n }\n\n if (sContainer.textContent == secretWord) {\n wictoryFun();\n }\n }\n else {\n selectElement(\".hangman img\").classList.add(\"hide\");\n selectElement(\".hangman img\").src = `image/${count}.png`;\n setTimeout(() => selectElement(\".hangman img\").classList.remove(\"hide\"), 400);\n this.classList.add(\"false\");\n count++;\n if (count == 13) {\n setTimeout(overFun, 1500);\n };\n }\n this.removeEventListener('click', checkLetter);\n}", "function letterGuess(){\r\n var c = document.getElementById('Gletter').value.toUpperCase();\r\n // If the guesses letter is Present !!\r\n if (key.includes(c)){\r\n // All the chars having same value as c must be shown ie if a letter is guessed, all places having it it shown\r\n for (var w = 0; w < guesses.length; w++){\r\n // Equals the word\r\n if (c == key[w]){\r\n // the space is still blank-Fill it in\r\n if (guesses[w] == '_')\r\n guesses[w] = c;\r\n // If not\r\n else{\r\n // Check if other blanks contain the same letter\r\n var count = 0;\r\n for (var v = w+1; v < key.length; v++){\r\n if (key[v] == c)\r\n count += 1;\r\n }\r\n // If they do not then for 5 seconds show that the letter exists\r\n if (count == 0){\r\n document.getElementById('last').innerHTML = 'Letter Already Present';\r\n setTimeout(function(){document.getElementById('last').innerHTML = 'Current Position: ';}, 5000);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // If the letter is not in the word at all => Punishment extra part to the hanging...\r\n else{\r\n errors += 1;\r\n changeImage();\r\n }\r\n // Checking for decisive result\r\n if (errors == 10)\r\n resultingText(false);\r\n if (guesses.toString().replaceAll(',', '') == key)\r\n resultingText(true);\r\n \r\n // Setting the input back to null and printing the new dashes again\r\n document.getElementById('Gletter').value = '';\r\n dashes();\r\n}", "function textVisible() {\n if(guessText.style.visibility === \"hidden\" && lastGuessWas.style.visibility === \"hidden\") {\n guessText.style.visibility = \"visible\";\n lastGuessWas.style.visibility = \"visible\";\n } else {\n guessText.style.visibility = \"hidden\";\n lastGuessWas.style.visibility = \"hidden\";\n }\n}", "function checkLetter(letter) {\n\t\t//check to see if the guess is part of the goal word and also\n\t\t//check to see if the letter has been guessed before\n\t\t//if it is not, add 1 to the numberWrong variable \n\t\t//(and draw the next piece of the stick-figure)\n\t\t//if game is over, display complete word and related image\n\n\t\tif (gameOver === \"no\" && lowerGame.indexOf(letter.toLowerCase()) == -1 && usedLetters.indexOf(letter.toUpperCase()) === -1) {\n\t\t\tnumberWrong++;\n\t\t\tusedLetters.push(letter.toUpperCase());\n\t\t\tshowUsedLetters();\n\t\t}\n\n\t\telse if (gameOver === \"no\" && usedLetters.indexOf(letter.toUpperCase()) === -1) {\n\n\t\t\tusedLetters.push(letter.toUpperCase());\n\t\t\tshowUsedLetters();\n\n\n\t\t//if the guess is part of the goal word, update the solution array\n\t\t//everywhere the letter appears.\n\n\t\t\tfor (var i = 0; i < solution.length; i++) {\n\t\t\t\tif (lowerGame[i] === letter.toLowerCase()) {\n\t\t\t\t\tsolution[i] = currGame[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t//after all locations are updated, display the updated solution\n\t\t//to the user.\n\n\t\tshowSolution();\n\n\t\t//show hangman image based on number of wrong guesses\n\t\tcurrentHangmanImage.attr(\"src\", hangmanImgArray[numberWrong].src);\n\n\t\t//if game is over, update gameOver variable. If game was won, display won image\n\t\tif (numberWrong == 6) {\n\t\t\tgameOver = \"loss\";\n\n\t\t} else if (solution.indexOf(\"_\") === -1) {\n\t\t\tgameOver = \"win\";\n\t\t\tcurrentHangmanImage.attr(\"src\", \"assets/images/gallowsWin.png\");\n\t\t\t}\n\n\n\t\t//if the game is over, display the video or image associated with the city used\n\t\tif (gameOver != \"no\") {\n\t\t\t//update solution to fill in all letters\n\t\t\tfor (var i = 0; i < currGame.length; i++) {\n\t\t\t\tif (currGame[i] === \" \"){\n\t\t\t\t\tsolution[i] = \"\\xa0\\xa0\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsolution[i] = currGame[i];\n\t\t\t\t}\n\t\t\t};\n\t\t\tshowSolution();\n\t\t\t//if the image type is video, embed the youtube video\n\t\t\tif (cities[randomNumber].imageType == \"video\") {\n\t\t\tvideoDiv = $(\"<iframe>\");\n\t\t\tvideoDiv.attr({\n\t\t\t\tsrc: cities[randomNumber].imageLink,\n\t\t\t\twidth: \"600\",\n\t\t\t\theight: \"400\",\n\t\t\t\tframeborder: \"0\",\n\t\t\t\tallowfullscreen: \"\"});\n\t\t\t// videoDiv.attr(\"width\", \"800\");\n\t\t\t$(\".usedArea\").append(videoDiv);\n\t\t\t} else {\n\t\t\t\t//if the image type is not video, it is a photo that should be displayed\n\t\t\t\tpictureDiv = $(\"<img>\");\n\t\t\t\tpictureDiv.attr({src: cities[randomNumber].imageLink,\n\t\t\t\twidth: \"600\",\n\t\t\t\theight: \"400\"\n\t\t\t\t});\t\t\n\t\t\t\t$(\".usedArea\").append(pictureDiv);\t\n\t\t\t}\n\t\t}\n\t}", "function user_inp() {\n //create a array of all the subsets of a random word, array to hold guessed words, counter for correct guesses\n let good_words = all_words(word)\n let guessed_words = [];\n let correct_counter = 0;\n let shuffle_word = shuffler(word);\n //starting screen with scrammbled word and hidden words\n console.log(\"Scrambled Key Word: \" + shuffle_word.join(\"\"));\n console.log('\\n');\n for(let i = 0; i < good_words.length; i++) {\n console.log(hide_words(good_words[i]))\n }\n //while loop that goes till all words are guessed\n while(correct_counter != good_words.length) {\n let input = prompt(\"Enter a guess:\" );\n //shuffle letters\n if(input == '*') {\n shuffle_word = shuffler(shuffle_word);\n alert(\"SHUFFLING LETTERS \\n Press OK to continue\")\n //clear old console output and changes it using the newly shuffled word\n console.clear();\n console.log(\"Scrambled Key Word: \" + shuffle_word.join(\"\"));\n console.log('\\n');\n for(let i = 0; i < good_words.length; i++) {\n if(guessed_words.includes(good_words[i])) {\n console.log(good_words[i]);\n }\n else{\n console.log(hide_words(good_words[i]))\n }\n }\n }\n //already guessed\n else if(guessed_words.includes(input)) {\n alert(\"Already chose this word, try again\")\n }\n //cancel button\n else if(input == null) {\n break;\n }\n //not a english word, too small/big\n else if(!dictionary.includes(input) && (input.length < 3 || input.length > 6)) {\n alert(\"Not an english word!\")\n }\n else if(input.length < 3) {\n alert(\"Word is too small\")\n }\n else if(input.length > 6) {\n alert(\"Word is too big\")\n }\n //guessed the right word, prints updated hidden words\n else if(good_words.includes(input)) {\n alert(\"Correct! \" + input + \" is one of the words!\")\n //adds input to guessed_word array, updates correct_counter\n console.clear();\n guessed_words.push(input)\n correct_counter++;\n console.log(\"Scrambled Key Word: \" + shuffle_word.join(\"\"));\n console.log('\\n');\n //update hidden words board to show correct word\n for(let i = 0; i < good_words.length; i++) {\n if(guessed_words.includes(good_words[i])) {\n console.log(good_words[i]);\n }\n else{\n console.log(hide_words(good_words[i]))\n }\n }\n }\n //incorrect guess\n else{\n alert(\"Incorrect! \" + input + \" is not a word!\")\n }\n }\n //if all words are guessed\n if(correct_counter == good_words.length) {\n alert(\"CONGRATULATION!!! YOU GUESSED ALL THE WORDS! \\n Press OK to show your results\")\n }\n //finishing screen with correct guesses, and reveals the hidden words\n console.clear();\n console.log(\"You got: \" + correct_counter + \" out of \" + good_words.length + \" correct\");\n console.log('\\n');\n for(let i = 0; i < good_words.length; i++) {\n console.log(good_words[i])\n }\n\n /**\n * Function that takes an array of letters and shuffles them around to\n * produce a shuffled result of the original array of letters\n * \n * @param {*} arr array of letters to be shuffled\n * @returns array of letters that have been shuffled from the original\n */\n function shuffler(arr) {\n for(let i = 0; i < arr.length; i++) {\n //chooses a random number out of the length of the array and the element at that index\n let random_idx = Math.floor(Math.random() * arr.length);\n let random_pick = arr[random_idx];\n //uses splice to switch the two indexs\n arr.splice(random_idx, 1, arr[i]);\n arr.splice(i, 1, random_pick);\n }\n return arr;\n }\n}", "checkForWin() {\n //console.log('The phrases property: ', this.phrases);\n //const arrayActivePhrase = this.phrases.map(item => item.phrase);\n\n //select all the letters in the activePhrase with a class name 'hide'\n const phraseLetterDomNodes = document.querySelectorAll(\"div#phrase ul li\");\n\n const hiddenPhraseLettersDomNodes = [...phraseLetterDomNodes].filter(item => item.classList.contains(\"hide\"));\n\n const hiddenPhraseLetters = hiddenPhraseLettersDomNodes.map(hiddenNode => hiddenNode.textContent);\n \n // //selects all the letters in the activePhrase with a class name 'show'\n // const shownPhraseLettersDomNodes = [...phraseLetterDomNodes].filter(item => item.classList.contains(\"show\"));\n // const shownPhraseLetters = shownPhraseLettersDomNodes.map(hiddenNode => hiddenNode.textContent);\n\n\n console.log(\"The hidden list items: \", hiddenPhraseLettersDomNodes, hiddenPhraseLetters)\n //console.log(\"The shown list items: \", shownPhraseLettersDomNodes, shownPhraseLetters)\n //if the hidden letters length equals to the activePhrase letters length\n if (hiddenPhraseLetters.length > 0) {\n //keep the game going\n return false;\n //if the shown letters length equals to the activePhrase letters lenght\n } else {\n //stop the game, the usr has won\n return true;\n }\n }", "checkForWin() {\n let condition = false;\n let letterElements = document.getElementsByClassName('hide');\n if (letterElements.length == 0) {\n condition = true;\n }\n return condition;\n }", "function checkLetter(event) {\n var userGuess = event.key.toLowerCase();\n if ($(\"#loseModal\").css(\"display\") !== \"block\" && $(\"#winModal\").css(\"display\") !== \"block\") {\n if ((event.which >= 65 && event.which <= 90) || ((event.which >= 97 && event.which <= 122)) && (guesses.indexOf(userGuess) == -1)) { \n guesses.push(userGuess);\n guessMatch(userGuess);\n appearLetters(indexChecker, userGuess);\n }\n winOrLose(winCounter, lives);\n indexChecker = [];\n }\n}", "function moreUserGuesses(letter) {\n \t\treturn letter != computerGuess;\n}", "function dryEliminator() {\n\n //sets everything to initial status so page refresh is not n eeded\n letterGuessed = 0;\n correctGuesses = 0;\n lives = 15;\n\n wrongLetters = [];\n underscoreDisplay = [];\n letterChecker = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i',\n 'j', 'k', 'l',\n 'm', 'n', 'o',\n 'p', 'q', 'r',\n 's', 't', 'u',\n 'v', 'w', 'x',\n 'y', 'z'\n ];\n\n\n\n \n}", "get uniqueHiddenLettersInPhrase() {\n const letterElements = document.getElementsByClassName('letter');\n let uniqueHiddenLetters = '';\n\n for (let letterElement of letterElements) {\n if (uniqueHiddenLetters.indexOf(letterElement.textContent) === -1 && letterElement.classList.contains('hide')) {\n uniqueHiddenLetters += letterElement.textContent;\n }\n }\n return uniqueHiddenLetters;\n }", "function isKeyInWord() {\n var isinword = false;\n\n // Compare the KEYINPUT with the characters of the word\n for (var i = 0; i < word.length; i++) {\n if (keyinput == word[i]) {\n isinword = true;\n // Replace the guessed character in GUESS\n guess[i] = keyinput;\n }\n }\n\n // If KEYINPT is not a match increase a bad guess and remove a life\n if (!isinword) {\n $(\".audioDoh\").trigger('play');\n lives--;\n badguess++;\n if (lives < 1) {\n matchesLost++;\n gamedone = true;\n }\n }\n\n // Update the labels\n updateGame();\n }", "function checkLetters() {\n //If no - add letter to guessed letters array\n if ((remainingGuesses - lettersGuessed.length) > 0 && (lettersGuessed.indexOf(playerGuess) == -1)) {\n lettersGuessed.push(\" \" + playerGuess);\n document.getElementById(\"lettersGuessed\").innerHTML = lettersGuessed.join(\" \");\n\n //Check to see if letter is in word\n //If yes - replace dash with letter in the appropriate position\n for (k = 0; k < currentWord.length; k++) {\n if (currentWord[k] == playerGuess) {\n guessingWord[k] = \" \" + playerGuess + \" \";\n document.getElementById(\"currentWord\").textContent = guessingWord.join(\"\");\n }\n //If no - decrement Number of Guesses by 1\n else {\n document.getElementById(\"remainingGuesses\").innerHTML = remainingGuesses - lettersGuessed.length;\n }\n };\n };\n }", "llskipAndScoreWord() {\r\n this.lettersToGuess = [];\r\n this.displayLetters();\r\n }", "function checkLetter() {\n if (validKeys.indexOf(currentGuess) > -1) {\n if ((secretPhrase.indexOf(currentGuess) > -1)) {\n for (var i = 0; i < secretPhrase.length; i++) {\n if (phraseArray[i] === currentGuess) {\n blankArray[i] = currentGuess;\n spanSecretRandom.innerHTML = blankArray.join(\" \");\n }\n }\n } else {\n lettersGuessed.push(currentGuess);\n spanLettersGuessed.innerHTML = lettersGuessed.join(\" \");\n numGuesses--;\n numGuesses <= 0 ? spanNumGuesses.innerHTML = 0 : spanNumGuesses.innerHTML = numGuesses;\n }\n } else {\n alert(\"Please guess a valid letter\");\n }\n}", "function checkGuess() {\n // Collect the text from the letters and the guess\n var letters = getLetters();\n var guess = getGuess();\n\n // Convert both to uppercase so we can compare equals\n guess = guess.toUpperCase();\n letters = letters.toUpperCase();\n\n // Determine if all the characters in the guess are in the letters\n for (var i = 0; i < guess.length; i++) {\n var currentChar = guess[i];\n\n // If the current character can't be found in letters, the guess is incorrect\n if (letters.indexOf(currentChar) === -1) {\n // Show a message saying guess is incorrect\n showMessage(\"Wrong guess, try again.\");\n // Return false to exit the function\n return false;\n }\n }\n\n // If we've made it this far, then the guess must be correct!\n // Show a message saying guess is correct\n showMessage(\"Good guess, that is correct!\");\n // Return true to exit the function\n return true;\n}", "function guessLetter() {\n // make sure letter is a-z\n if (!isNonEmptyStr(letterGuess.value)) {\n displayMessage.textContent = \"Please guess a letter from a-z!\";\n displayMessage.style.display = 'initial';\n letterGuess.focus();\n return;\n }\n // if letter is has already been guessed before\n if (guessCharSet.has(letterGuess.value)) {\n displayMessage.textContent = \"You have already guessed that letter!\";\n displayMessage.style.display = 'initial';\n letterGuess.focus();\n return;\n }\n // add letter guessed to set\n guessCharSet.add(letterGuess.value);\n displayMessage.style.display = 'none';\n // loop through secretWord to fill in corresponding matching letters\n let letterFound = false;\n for (let i = 0; i < secretWord.length; i++) {\n if (letterGuess.value === secretWord[i]) {\n letterFound = true;\n lettersRevealed++;\n wordToDisplay = setCharAt(wordToDisplay, i * 2, letterGuess.value);\n displayWord.textContent = wordToDisplay;\n }\n }\n // if letter is not in the word\n if (letterFound === false) {\n incorrectGuessesLeft--;\n guessPics.childNodes[displayImage].style.display = 'none';\n displayImage += 2;\n guessPics.childNodes[displayImage].style.display = 'initial';\n }\n lettersGuessed.textContent += letterGuess.value + ' ';\n guessesLeftMessage.textContent = \"You have \" + incorrectGuessesLeft + \" incorrect guesses remaining.\";\n // after every letter guess, check if the user has won or lost\n if (checkWinOrLoss() === false) {\n letterGuess.focus();\n }\n}", "function isCorrectGuess(letter) {\n //if false, this should also decrement lives\n if (!currentWordArray.includes(letter)) {\n livesRemaining -= 1;\n gameEnding.innerHTML = \"Lives Remaining: \" + livesRemaining;\n wrongLetters.push(letter);\n displayWrongLetterBank();\n } else {\n remainingLetters -= 1;\n displayStatus(currentWord)\n }\n}", "function wordCheck(letter) {\n var WordLetters = false;\n for (var i = 0; i < nameLength; i++) {\n if (chosenName[i] === letter) {\n WordLetters = true;\n }\n }\n\n if (WordLetters) {\n for (var i = 0; i < nameLength; i++) {\n if (chosenName[i] === letter) {\n emptyWord[i] = letter;\n }\n }\n }\n\n else (chosenName[i] !== letter); {\n incorrectGuess.push(letter);\n incorrect--;\n }\n\n \n}", "function reveal(guess) {\n for (var z = 0; z < word.length; z++) {\n if (word[z] == guess) {\n context.fillText(word[z], (100 + (z * 20)), 490);\n lettersRemaining--;\n console.log(\"reveal: \" + lettersRemaining);\n }\n }\n }", "function isWinner(word, guesses) {\n if (showGuess(word, guesses).includes('_')){\n return false\n }\n else {\n return true\n }\n}", "checkLetter(guess) {\n if (this.phrase.includes(guess.toLowerCase())) {\n return true;\n } else {\n return false;\n }\n }", "function checkLetter(letter)\n{\n\tvar isInWord;\n\tfor (i = 0; i < targetWordArray.length; i++)\n\t{\n\t\tif(letter == targetWordArray[i])\n\t\t{\n\t\t\tisInWord = true;\n\t\t\treplaceLetter(letter);\n\t\t\tcorrectLetters.push(letter);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tisInWord = false;\n\t\t}\n\t}\n\tif(isInWord === false)\n\t{\n\t\twrongLetters.push(letter);\n\t\tremainingGuesses = remainingGuesses - 1;\n\t}\n\telse\n\t{\t\n\t}\n\tdocument.getElementById(\"array-box\").innerHTML = displayWord.join(\"\");\n}", "function checkLetter(input){\n\t\t// Check if word has been used before\n\t\tvar counter = 0; // counts how many times the letter appears in the word\n\t\tfor(l=0; l< word.length; l++){\n\t\t\tvar currentGuess = input;\n\t\t\tvar currentCheck = word.charAt(l);\n\t\t\tif(currentGuess === currentCheck){\n\t\t\t\tcorrectGuesses++;\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\n\t\tif(counter === 0){\n\t\t\t\tincorrectGuesses++;\n\t\t\t\tplayVideo();\n\t\t\t}\n\n\t\tfor(k=0; k < word.length; k++){\n\t\t\tvar currentGuess = input;\n\t\t\tvar currentCheck = word.charAt(k);\n\t\t\tif(input === word.charAt(k)){\n\t\t\t\tanswerMask[k] = input;\n\t\t\t\t// correctGuesses++;\n\t\t\t}\n\t\t}\n\t\theartbeat = chances - incorrectGuesses;\n\t\t// log(\"incorrectGuesses \" + incorrectGuesses);\n\t\t// log(\"correctGuesses\" + correctGuesses);\n\n\t\tguessedLetters.push(input);\n\t}", "checkLetter(guess) {\n for (let i = 0; i < this.phrase.length; i++) {\n if (this.phrase.charAt(i) === guess) {\n return true;\n }\n }\n }", "function checkGuess(letter) {\n // Array to store letterPosition of letters in string\n var letterPosition = [];\n\n // Loop through word finding all instances of guessed letter, store the indicies in an array.\n for (var i = 0; i < word[randWord].length; i++) {\n if(word[randWord][i] === letter) {\n letterPosition.push(i);\n }\n\n }\n\n // if there are no indicies, remove a guess and update the hangman image\n if (letterPosition.length <= 0) {\n guessesLeft--;\n updateHangmanImage();\n } else {\n // Loop through all the indicies and replace the '_' with a letter.\n for(var i = 0; i < letterPosition.length; i++) {\n wordGuess[letterPosition[i]] = letter;\n \n }\n }\n}", "function isLetterAlreadyGuessed(userGuess) {\n\t\treturn lettersGuessed.includes(userGuess) && alphabet.indexOf(userGuess) > -1;\n\t}", "function checkMatch(userGuess) {\n\n // Runs if the user selected a matching letter\n if (lettersToGuess.includes(userGuess)) {\n console.log(\"bingo\");\n\n // This will check the matching letter and replace it in the hidden word\n for (let i = 0; i < numLetters; i++) {\n if (userGuess === lettersToGuess[i]) {\n\n hiddenWord[i] = userGuess;\n document.querySelector('#hiddenWord').innerHTML = hiddenWord;\n\n // This is used in order to determine if all letters have been matched\n numMatches++;\n\n console.log(\"It's a match\");\n console.log(hiddenWord);\n } \n }\n // Runs if the user selected a non-matching letter\n } else {\n // Decrease number of remaining guesses\n numGuesses--;\n\n // Add the user's guess to the non-matching guesses and rewrite info to the screen\n userGuesses.push(userGuess);\n document.querySelector('#userGuesses').innerHTML = 'Guesses: ' + userGuesses;\n document.querySelector('#numGuesses').innerHTML = 'Guesses Left: ' + numGuesses;\n\n console.log(userGuesses);\n console.log('numGuesses: ' + numGuesses);\n }\n\n // Runs after each match or mismatch to determine if the game has been won or lost\n checkWinLoss();\n}", "checkLetter(keyClicked) {\r\n if (this.phrase.includes(keyClicked)) {\r\n console.log('Yeah bitch');\r\n return true;\r\n } else {\r\n console.log('No Bitch');\r\n return false;\r\n }\r\n }", "function keyPress(){\n\n\tguessedLetters[counter] = event.key.toUpperCase();\t\n\n\tvar correct = 0;\n\tfor(var i = 0; i < randomWord.length; i++){\n\t\tif(guessedLetters[counter] == randomWord.charAt(i)){\n\t\t\thiddenLetters[i] = guessedLetters[counter];\t\n\t\t\tcorrect++;\n\t\t\t}\n\t}\n\n\n\tif(isDuplicate() !== true && (guessedLetters[counter].charCodeAt(0) >= 65 && guessedLetters[counter].charCodeAt(0) <= 90 && guessedLetters[counter].length <= 1)){\n\t\tcounter++;\n\t\tdocument.getElementById(\"hangmanTextLower\").textContent = \"Guessed Letters: \" + guessedLetters;\n\n\t\trefresh();\n\t\tifWon();\n\t\tifLost(correct);\n\t}\n}", "function checkLetter(letter){\n\tvar match = false;\n\tfor (var i=0; i<secretWord.length; i++) {\n\t\tif(letter === secretWord[i]){\n\t\t\tif (blank[i] === blankSpace) {\n\t\t\t\tblank[i] = letter;\n\t\t\t\tmatch = true;\n\t\t\t\twordSize--;\n\t\t\t}\t\n\t\t}\n\t}\n\tif(match === false) {\n\t\tguesses--;\n\t\tcheckNumGuess();\n\t}\n\treturn match;\n}", "function wrongGuess(press) {\n var wrongLetters = document.getElementById(\"guessedLetters\").textContent;\n if(!wrongLetters.includes(press)) {\n var dropChanger = document.getElementById(\"blood\" + chances);\n dropChanger.style.visibility = \"hidden\";\n console.log(dropChanger);\n --chances;\n };\n}", "function isRepeat() {\n var i = 0;\n for (i = 0; i < lettersUsed.length; i++) {\n if (userGuess.toUpperCase() === lettersUsed[i].toUpperCase()) {\n feedBackText.textContent = \"This letter was already used. Please make another selection.\";\n return true;\n }\n }\n return false;\n }", "function guessLetter() {\n input = document.getElementById('letter').value;\n input = input.toUpperCase();\n \n if(guessedLetters.includes(input)) {\n alert('You\\'ve already guessed the letter ' + input.toUpperCase() + '!');\n \n } else if(input === '') {\n alert('You didn\\'t guess a letter! Please enter a letter!');\n \n } else if(randomWord.includes(input)) {\n for(var i = 0; i < randomWord.length; i++) {\n if(randomWord[i].includes(input)) {\n arrBlank[i].style.visibility = 'visible';\n }\n }\n correctLetters.push(input);\n guessedLetters.push(input);\n totalGuesses++;\n\n } else {\n alert('Sorry, the letter ' + input + ' is not included in the word!');\n guessedLetters.push(input);\n maxTries--;\n totalGuesses++;\n wrongGuesses++;\n gallows();\n }\n document.getElementById('letter').value = ''; // erases value of text box after \"Guess\" is clicked\n document.getElementById('guessed-letters').textContent = 'You\\'ve guessed: ' + guessedLetters.join(' ').toUpperCase();\n document.getElementById('remaining-guesses').textContent = 'Tries remaining ' + maxTries;\n document.getElementById('total-guesses').textContent = 'Total guesses: ' + totalGuesses;\n winLose();\n}", "function isValidGuess() {\n\n if (alphabet.indexOf(currentGuess) !== -1) {\n console.log(\"Your guess: \" + currentGuess);\n isCorrectGuess();\n } else {\n console.log(\"That is not a letter!\");\n }\n }", "function check() {\n for (var j = 0; j < holdWord.length; j++) {\n if (userGuess === holdWord[j]) {\n place = holdWord.indexOf(holdWord[j]);\n return true;\n }\n /*else {\n return false; \n }*/\n }return false;\n }", "function check(word) {\n //For the purposes of the check() functiion, we must turn the word into an array\n //We will do this by splitting the word at each character\n var wordArray = word.split(\"\");\n //Make sure it's working\n console.log(word + \" as an array:\");\n console.log(wordArray);\n //Re-focus the text input\n document.getElementById(\"userGuess\").focus();\n //Get the value of what user entered into text field, and convert it to lower case\n var userGuess = document.getElementById(\"userGuess\").value.toLowerCase();\n //Get the value of userWordGuess, and convert it to lower case\n var userWordGuess = document.getElementById(\"userWordGuess\").value.toLowerCase();\n //After entered value has been obtained, clear both input text fields\n document.getElementById(\"userGuess\").value = \"\";\n document.getElementById(\"userWordGuess\").value = \"\";\n //Make sure it's working \n console.log(\"The user guessed: \" + userGuess);\n //Make sure the user entered a string\n console.log(userGuess + \" is a \" + (typeof(userGuess)));\n\n //Get userWordGuess out of the way\n if ((userGuess === \"\") && (userWordGuess === word)) {\n outcome(word, youWon);\n horse.play();\n } else if ((userGuess === \"\") && (userWordGuess !== \"\") && (userWordGuess !== word)) {\n outcome(word, gameOver);\n flute.play();\n //This is where you start to weed out all inputs that are not letters in the alphabet\n } else if (alphabet.includes(userGuess) === false) {\n correctOrIncorrect(\"Sorry, Charlie, if you wanna play, it's gotta be a letter\");\n console.log(\"User input is not a letter in the alphabet\");\n //Now that's out of the way, we can get down to business...\n //If user input is a letter in the word, reveal the guessed letters in the word\n //If user input is not a letter in the word, add to the 'incorrect guess' counter\n } else if (word.includes(userGuess)) {\n //Make sure user input is included in the word string\n console.log(\"userGuess is a letter in the alphabet? \" + (alphabet.includes(userGuess)));\n //Show the user that they made a correct answer, using the correctOrIncorrect function from earlier\n correctOrIncorrect(\"Way to go! You guessed a letter!\");\n cockAndFire.play();\n //Run a for-loop that compares the user guess against all indices in the array \n for (i = 0; i <= word.length; i++) {\n\t\n if (wordArray[i] === userGuess) {\n \n //Replace value at index \"i\" of array with userGuess\n startingSpacesArray[i] = userGuess;\t\n //Make sure letter has been added to array\n console.log(\"startingSpacesArray now looks like this: \" + startingSpacesArray);\n //Turn array into a string using the .join method, but with nothing (\"\") as the separator, instead of commas\n var newString = startingSpacesArray.join(\"\");\n //Make sure the string works\n console.log(\"The user will see this: \" + newString);\n //Add new string to the web page, where startingSpaces used to sit\n document.getElementById(\"word\").innerHTML = newString;\n //If user has guessed all the letters correctly, print a YOU WIN screen\n if (newString === word) {\n outcome(word, youWon);\n horse.play();\n }\n }\n }\n //A player loses hangman after six wrong guesses: head, body, two arms, and two legs\n //Using the incorrectGuess variable defined earlier, this else-if will keep adding to the variable. \n //After six wrong guesses, the entire web page is overwritten with a \"GAME OVER\" screen \n } else if (word.includes(userGuess) === false) {\n //Make sure it's working\n console.log(\"userGuess is included in the word? \" + false);\n //Show the user that they made a correct answer, using the correctOrIncorrect function from earlier\n correctOrIncorrect(\"Tough luck, Chuck, you guessed wrong&hellip;\");\n cockAndDryFire.play();\n //Add to the incorrectGuess variable\n incorrectGuess++;\n document.getElementById(\"hangman\").innerHTML += svgArray[incorrectGuess];\n //Log how many incorrect guesses there have been\n console.log(\"# of incorrect guesses= \" + incorrectGuess + \"/6\");\n //Display wrong guesses to user, against how many guesses they have (6)\n document.getElementById(\"wrongGuessCounter\").innerHTML = \"Number of wrong guesses: <b>\" + incorrectGuess + \" / 6</b>\";\n //Show prior wrong guesses\n document.getElementById(\"wrongGuesses\").innerHTML = \"Your wrong guesses so far: \"\n document.getElementById(\"guessesSoFar\").innerHTML += userGuess + \" \";\n //Once the counter reaches 6, the game over screen is triggered\n if (incorrectGuess >= 6) {\n outcome(word, gameOver);\n flute.play();\n } \n }\n}", "function checkInput() {\n drawMan();\n //console.log(\"this is the\" + underscoreArray);\n if(remainingGuesses > 0)\n { \n if(event.which < 65 || event.which > 90)\n {\n alert(\"Please guess a letter!!!\");\n return;\n } \n else if(event.which >= 65 && event.which <= 90)\n {\n letters.push(event.key);\n $(\"#guessedLetters\").append(event.key + \", \");\n }\n\n for(let i = 0; i < wordSplit.length; i++)\n {\n if(event.key === wordSplit[i])\n {\n underscoreArray[i] = event.key;\n underscoreArray[i] = underscoreArray[i].toLowerCase(); \n document.getElementById(\"underscores\").innerHTML = underscoreArray.join(\"\");\n ifYouWin(); \n }\n \n }\n if(!wordSplit.includes(event.key))\n {\n remainingGuesses--;\n ifYouLose();\n }\n $(\"#remaining\").html(remainingGuesses);\n }\n}", "guessLetter(letterGuessed){\n if(letterGuessed === this.character){\n this.isGuessed = true;\n }\n\n this.showLetter()\n }", "function hiddenWord (word) {\n //Split a string into an array of letters\n\t$.each(word.split(\"\"), function (i, el) {\n //For each letter in the word, create a span with the atribute data-letter = letter and a text of \"_ \"\n $(\"#blank-word\").append(\"<span id='hidden-letter-\" + el + \"'>_ </span\");\n });\n\t\n }", "function isGameOver() {\n //game is over if the player has 6 wrong guesses\n if (wrongGuesses === 6) {\n //display game over\n $(\"#gameOver\").text(\"You Lost! Maggie will be lost in space!\").css(\"color\", \"red\").show();\n $(\"#hangman\").hide();\n }\n //game is over if the player has guessed the word\n if (dashes.join(\"\") === randomWordArray.join(\"\")) {\n //display you won, yay\n $(\"#gameOver\").text(\"You guessed it! Maggie can get back to her ship now!\").css(\"color\", \"blue\").show();\n $(\"#hangman\").hide();\n }\n }", "function checkLetter(letter) {\n \n var isInWord = false;\n\n for (var i=0; i<blanks; i++) {\n if(randomWord[i] == letter) {\n isInWord = true;\n }\n\n }\n\n if (isInWord) {\n for (var i=0; i<blanks; i++) {\n if(randomWord[i] == letter) {\n blanksandGuessed[i] = letter;\n }\n\n }\n }\n \n\n else {\n wrongGuessed.push(letter);\n guessesLeft = guessesLeft - 1;\n }\n\n\n}", "function guessTheWordClick() {\n //get the click\n var theClick = $(this).attr(\"data-letter\");\n\n // loop thru all the letters in theWord\n for (var i = 0; i < theWord.length; i++) {\n\n // test if click is equal to the letter in the word\n if (theWord[i] === theClick) {\n // not gonna take away life\n takeLife = false;\n\n // update the underscores if true\n $(\"span[data-letter=\" + theClick + \"]\").text(theClick);\n winCounter += 1; // add 1 to winCounter if letters match\n }\n }\n // call endGame function to determine the status of the game\n endGame();\n\n // disable button after clicking so it does not keep substracting from players life\n disableTheLetters($(this));\n }", "checkLetter(letter) {\r\n return !(this.phrase.indexOf(letter) == -1);\r\n }", "function game(){\n // DECIDE ON NEW RANDOM WORD FOR GAME\n var currentWord = longWords[Math.floor(Math.random()* longWords.length)];\n var upper = currentWord.toUpperCase();\n\n//LOG CURRENT WORD TO CONSOLE//\nconsole.log(`current word is '${upper}'`);\n \n//DISPLAY UNDERSCORES FOR NUMBER OF LETTERS//\nvar wordspaces = upper.split('')\nvar underscores =\"\"\n function hiddenWord(){\n for(i =0; i<wordspaces.length; i++){\n underscores+= \"_\"\n }\n}\n// CALL THE FUNCTION AND PLACE UNDERSCORES IN PLACE OF THE LETTERS FOR THE WORD\nhiddenWord();\n$(\"#wordspaces\").html(underscores);\n\n// get word length and console.log the length of the word\n var wordLength = upper.length\n console.log(`current word length is:${wordLength}`)\n\n //set lives value\n var lives = 5\n\n//DISPLAY HOW MANY LIVES REMAIN\n $(\"#lives\").html(`You have ${lives} lives left! Choose carefully!`)\n\n//EVENT HANDLER FOR WHEN THE BUTTON IS CLICKED TO GUESS A LETTER\n var guessed = \"\"\n $(\".letters\").on('click', function(){\n \n//DISABLE THE BUTTON THAT WAS CLICKED AND CHANGE CSS\n this.disabled = true;\n $(this).css(\"background\", \"red\");\n\n//GRAB THE ID OF THE BUTTON THAT WAS CLICKED\n var buttonClicked = $(this).attr('id')\n\n//DISPLAY THE LETTER THAT WAS CLICKED AND LOG IT TO THE CONSOLE AS WELL\n console.log(guessed);\n var b = guessed += buttonClicked;\n $(\"#guessed\").html(`<p class=\"para1\">You have guessed</p><span class =\"guessedletters\">${b}</span><p class=\"para2\">thus far. be careful...</p>`)\n\n //CHECK TO SEE IF THE LETTER GUESSED MATCHES A LETTER IN THE WORD\n if(currentWord.includes(buttonClicked.toLowerCase())){\n console.log(buttonClicked)\n\n //LOOP THROUGH THE UNDERSCORES AND FIND THE INDEX OF THE MATCHED LETTER OF THE CURRENT WORD\n for(let i =0; i <underscores.length; i++){\n if(currentWord[i]===buttonClicked.toLowerCase()){\n\n //REPLACE THE UNDERSCORE WITH THE LETTER OF THE MATCHED INDEX\n wordArr = underscores.split('')\n wordArr[i] = buttonClicked\n underscores = wordArr.join('')\n $(\"#wordspaces\").html(underscores);\n\n//IF THE REPLACED UNDERSCORES WORD MATCHES THE CURRENT WORD, END THE GAME \n if(underscores.toLowerCase()=== currentWord){\n $(\"#lives\").html(\"Congratulations! You win motherfucker!\");\n $(\"#buttons\").hide();\n $(\"#restart\").show();\n $(\"#restart\").css('background','pink')\n $(\"#guessed\").hide();\n document.getElementById('myAudio2').play(); \n }\n }\n }\n \n//if letter is not included and you have more than one life left\n }else if(currentWord.includes(buttonClicked) !== true&&lives >1){\n lives--;\n $(\"#lives\").html(`You have ${lives} lives left! Choose carefully!`)\n\n//if letter is not included and you had 1 life left\n } else if(!currentWord.includes(buttonClicked)&&lives===1){\n $(\"#lives\").html(`You have 0 Lives left... GAME OVER.`)\n $(\"#buttons\").hide();\n $(\"#restart\").show();\n document.getElementById(\"myAudio\").play();\n $(\"#guessed\").hide();\n } \n\n})\n//RELOAD THE PAGE WHEN RESTART BUTTON IS CLICKED//\n$(\"#restart\").on('click', function(){\n window.location.reload();\n})\n}", "function checkUserGuess(letterPicked, divClicked){\n if(inputWord.indexOf(letterPicked)!== -1){\n for(let i in inputWord){\n if(letterPicked === inputWord[i]) {\n $('.letter').eq(i).show();\n correctBank++;\n }}\n }else {\n guessBank--;\n hangman.css('background-image', 'none');\n hangman.css('background-image', `url(${gameImgs[guessBank]})`);\n }\n }// end checkUserGuess func", "function checkLetters(letter) {\n\n\tvar lettersInWord = false;\n\tvar letter = event.key;\n\n\t// Check if a letter exists insidethe array at all\n\tfor (var i = 0; i < underscores; i++) {\n\t\t\n\t\tif (word[i] === letter) {\n\t\t\tconsole.log('word[i] ' + word[i])\n\t\t\tlettersInWord = true;\n\t\t}\n\t}\n// If the letter exists in the word, find which index\n\tif (lettersInWord) {\n\t\t\n\t\tfor (var j = 0; j < underscores; j++) {\n\t\t//Populate the blanksAndSuccesses with every correct letter.\n\t\t\tif (word[j] === letter) {\n\t\t\t// This is where the specfic space in blanks is set and letter is equal to the letter when there is a match.\n\t\t\tblanksAndSuccesses[j] = letter;\n\t\t\t}\n\t\t}\t\n\t}\n\t\n\telse {\n\t\twrongLetter.push(letter);\n\t\tguesses--;\n\t}\n}", "function guessedLetters () {\n $('.already-guessed').html(\"You have already guessed:\");\n $('.already-guessed-letters').html($guessedScreen);\n }", "function hideWord(splitGuess) {\n console.log(splitGuess);\n for (var i = 0; i < splitGuess.length; i++) {\n if (splitGuess[i] === \" \") {\n hiddenWord.push(\" \")\n }\n else {\n hiddenWord.push(\"_\")\n }\n }\n $(\"#blankWord\").text(hiddenWord);\n console.log(hiddenWord);\n }", "function right() {\r\n //if guess is correct\r\n //keep checking if to see if there is another space for the same letter\r\n for (var j = 0; j < underScore.length; j++) {\r\n if (word[j] === guess) {\r\n underScore[j] = guess;\r\n var blank = \"<p>\" + underScore.join(\" \") + \"</p>\";\r\n document.getElementById(\"blank\").innerHTML = blank;\r\n }\r\n //hide and show you win div\r\n if (underScore.join(\"\") === word) {\r\n winMessage.show();\r\n direct.hide();\r\n }\r\n }\r\n}", "function checkGuess(guessedLetter) {\nfor(var i = 0; i < word.length; i++) {\nif (word[i] === guessedLetter) {\n\tcorrectGuesses.push(guessedLetter);\n\t\t}\n\t}\n}", "function isInWord() {\n //gets the first position of the letter value in the word\n pos = word.indexOf(guess);\n //check to see if the letter is in the word\n if (word.indexOf(guess) > -1 ) { \n //if letter is in the word, enter the letter into the word array and html \n enterLetters(); \n\n //function wordSolved to see if the word is solved and if anyone won and to switch players\n wordSolved(); \n\n\n } else {\n //the letter is not in the word\n document.getElementById('audio').play();\n hangTheMan();\n };\n}", "function guessLetter(){\n var correct = 0;\n var target = event.target || event.srcElement;\n target.style.visibility = \"hidden\";\n var lower = target.id;\n var upper = document.getElementById(lower).getAttribute('value');\n var results = document.getElementById('results');\n var ul1 = document.getElementById('underline1').offsetWidth;\n for(a = 1; a < 101; a++){\n if(document.getElementById('letter'+a).innerHTML === upper || document.getElementById('letter'+a).innerHTML === lower){\n document.getElementById('letter'+a).style.visibility = \"visible\";\n correct++;\n numRight++;\n }\n }\n\n\n//This block of code displays the consequences of getting a wrong answer.\n if(correct==0){\n numWrong++;\n hang();\n }\n if(numWrong==6){\n results.style.visibility = \"visible\";\n results.style.color = \"red\";\n results.innerHTML = \"You can't miss another letter!\";\n if(ul1 == 50){\n results.style.lineHeight = \"70px\";\n results.style.fontSize = \"30px\";\n }\n if(ul1 == 28){\n results.style.lineHeight = \"50px\";\n results.style.fontSize = \"25px\";\n }\n if(ul1 == 18){\n results.style.lineHeight = \"40px\";\n results.style.fontSize = \"20px\";\n }\n }\n if(numWrong==7){\n results.innerHTML = \"You lose!<br>Keep guessing until you get it right.\";\n document.getElementById('again').style.display = \"block\";\n document.getElementById('home').style.display = \"block\";\n if(ul1 == 50){\n results.style.lineHeight = \"40px\";\n }\n if(ul1 == 28){\n results.style.lineHeight = \"25px\";\n }\n if(ul1 == 18){\n results.style.lineHeight = \"20px\";\n }\n }\n if(numRight==wordLength){\n win();\n }\n}", "function correctGuess() {\n console.log(`\\n You guessed right!\\n`.bgBlue);\n if (\n chosenWord.replace(/ /g, \"\") == gameWord.displayWord().replace(/ /g, \"\")\n ) {\n console.log(gameWord.displayWord());\n console.log(`\\n You Win!!!!\\n`.bgMagenta);\n chosenWord = \"\";\n gameWord = \"\";\n select = 0;\n counter = 0;\n startGame();\n } else {\n promptUser();\n }\n}", "checkLetter(e) {\n\t\tthis.letterGuess = e.toLowerCase();\n\t\tthis.regexText = /[A-Za-z]/.test(this.letterGuess);\n\t\tif (this.regexText) {\n\t \t\tlet thisPhrase = this.phrase.toString();\n\n\t\t\t//Append letters to Letter CheckArray\n\t\t\tif (this.letterGuesses.includes(this.letterGuess)) {\n\t\t\t\talert(\"You've already used that letter!\")\n\t\t\t} else {\n\t\t\tthis.letterGuesses.push(this.letterGuess);\n\t\t\t}\n\n\t\t\tif (this.phrase.includes(this.letterGuess)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\talert(\"Please only use letters!\");\n\n\t\t}\n\t}", "checkForWin() {\n const letters = document.getElementById('phrase').querySelector('ul').querySelectorAll('li');\n let result = true;\n for (let i = 0; i < letters.length; i++) {\n if (!letters[i].classList.contains(\"matched\") && !letters[i].classList.contains(\"space\")) {\n result = false;\n }\n }\n return result;\n }", "function checkWord() {\n for (i = 0; i < answer.length; i++) {\n if (guess === answer[i] && letterInWord === false) {\n emptyWord[i] = String.fromCharCode(event.keyCode).toLowerCase();\n document.getElementById(\"empty-word\").innerHTML = emptyWord.join(\" \");\n countBlank -= 1;\n }\n }\n if (guess != answer[i]) {\n lives -= 1;\n }\n console.log(countBlank);\n }", "function checkLetters(userkey) {\n\n\t//See if the userkey exists in the wrong guesses array\n\tvar letterExist = false;\n\n\tfor (var i = 0; i < wrongGuesses.length; i++) {\n\n\t\tif(userkey === wrongGuesses[i]){\n\n\t\t\tletterExist = true;\n\n\t\t};\n\n\t};\n\n\tif (letterExist === false) {\n\n\t\tvar flag = false;\n\n\t\tfor (var i = 0; i < numBlanks; i++) {\n\t \t\n\t \t\tif(randomWord[i] === userkey) {\n\t \t\t\tflag = true;\n\t \t\t}\n\t \t}\n\n\n\t\t// If the letter exists somewhere in the word, then figure out exactly where (which indices).\n\t\tif (flag) {\n\n\t\t // Loop through the word.\n\t\t for (var i = 0; i < numBlanks; i++) {\n\n\t\t //If the first letter equals the user's input, make it capitalized\n\t\t\t\tif (randomWord[0] === userkey) {\n\n\t\t\t\t\tlettersInWord[0] = userkey.toUpperCase();;\n\n\t\t\t\t} \n\n\t\t\t\t//Else set the specific space in blanks and letter equal to the letter when there is a match.\n\t\t\t\telse if(randomWord[i] === userkey) {\n\n\t\t\t\t\tlettersInWord[i] = userkey\n\n\t\t\t\t};\n\t\t }\n\t\t}\n\n\t\t // If the letter doesn't exist at all...\n\t\telse {\n\n\t\t // ..then we add the letter to the list of wrong letters, and we subtract one of the guesses.\n\t\t\twrongGuesses.push(userkey);\n\n\t\t // numGuesses--;\n\t\t turns--;\n\t\t \n\t \t\tdocument.getElementById(\"turns\").innerHTML = turns;\n\t \n \t\t}\t\n\n\t roundComplete();\n\t}\n}", "function checkLetter(letter) {\n $letterCount = 0;\n for (var x = 0; x < $randomWordArrayExtended.length; x++) {\n if ($randomWordArrayExtended[x] == letter) {\n $screenArray[x] = letter;\n $letterCount++;\n }\n }\n if ($letterCount == 0) {\n\n $attempts--;\n $previous_bg = \".state\" + $image_state;\n $image_state++;\n $current_bg = \".state\" + $image_state;\n $(\".state0\").hide(0);\n $(\"#\" + letter).css({\"pointer-events\": \"none\", \"background-color\": \"#800000\"});\n $($previous_bg).hide();\n $($current_bg).show();\n /* $(\"#\" + letter).addClass(\"used fail\").promise().done(function() {\n $($previous_bg).hide();\n $($current_bg).show();\n }); */\n\n } else {\n $(\"#\" + letter).css({\"pointer-events\": \"none\", \"background-color\": \"#195904\"});\n /* $(\"#\" + letter).addClass(\"used success\"); */\n }\n }", "function checkGuess(letter) {\n // If letter is correct, replace blank space with corresponding letter\n if (chosenWord.indexOf(letter) > -1) {\n for (var j=0; j < chosenWord.length; j++) {\n if (chosenWord[j] == letter) {\n underScore[j] = chosenWord[j];\n }\n }\n // If letter is wrong, guesses left decreases\n } else {\n wrongLetters.push(letter);\n guessesLeft--;\n }\n updateDomElements();\n checkAnswer();\n}", "checkLetter(phrase, guess) {\r\n\t\tlet correctGuess = false;\r\n\t\tfor (var i = 0; i < phrase.length; i++) {\r\n\t\t\tif (guess === phrase.charAt(i)) {\r\n\t\t\t\tcorrectGuess = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn correctGuess;\r\n\t}", "function generateDispWord(){\n dispWord = \"\"; // Reset the displayed string so it can be rebuilt\n for(var i = 0; i < guessWord.length; i++){ //Loop through the current random word\n if(correctGuesses.indexOf(guessWord[i]) > -1){ // If a letter in the random word has been guessed correctly, reveal it\n dispWord = dispWord + guessWord[i] + \" \";\n } \n else {\n dispWord = dispWord + \"_ \"; // If a letter has not been guessed yet, continue to mask it\n }\n }\n return dispWord;\n}", "function checkLetter(target) {\n const letter = document.querySelectorAll(\".letter\");\n const clickedLetter = target.textContent;\n let letterFound = null;\n\n for (let i = 0; i < letter.length; i++) {\n if (letter[i].textContent.toLocaleLowerCase() === clickedLetter) {\n letter[i].classList.add(\"show\");\n letterFound = letter[i].textContent;\n }\n }\n return letterFound;\n }", "function hangMan() {\n document.onkeyup = function (event) { //when key pressed\n let userGuess = event.key.toLowerCase(); //assign the input to userGuess\n let resultVar = currentWord.search(userGuess);\n document.getElementById('directionsText').innerHTML = (''); //sets resultVar to if the letter is in word or not\n if (resultVar > -1) //if it is,\n {\n rightGuess++; //add one to rightguess\n for (i = 0; i <= cwLength; i++) //a for loop, should run for as long as the currentword, but it doesn't.\n {\n if (userGuess === currentWord.charAt(i)) //if the input is in current word,\n {\n wordArray[i] = currentWord.charAt(i);\n console.log(wordArray);\n let hiddenWord = document.getElementById(\"currentWord\");\n hiddenWord.innerHTML = 'your current word is ' + wordArray;\n }\n } if (wordArray.join(\"\") === currentWord) {\n document.getElementById('directionsText').innerHTML = ('<p>Congratulations! You have won. Press any key to begin again.</p>')\n winCount++\n //victory message\n document.onkeyup = function (event) //reload page on keyup\n {\n location.reload();\n }\n }\n }\n else { //runs if input is incorrect\n guessVar--; //minus one guess\n wrongGuess.push(userGuess); //add to empty array of wrong input\n document.getElementById('incorrectGuesses').innerHTML = ('Wrong letters guessed: ' + wrongGuess); //displays info\n document.getElementById('guessCount').innerHTML = ('Guesses left: ' + guessVar);\n if (guessVar === 0) { //if you run out of guesses\n document.getElementById('directionsText').innerHTML = (\"<p> I'm sorry, you have lost. Press any key to begin again.</p>\")\n lossCount++//loss screen\n document.onkeyup = function (event) {\n location.reload();\n }\n }\n }\n }\n}", "function gameInit() {\n\n // Reset Used Letters.\n userLetterGuesses.textContent = \"\";\n\n // Create an array to hold the words the player must guess.\n var wordList = [\"tree\", \"grass\", \"soil\", \"weeds\", \"rain\", \"ocean\", \"life\", \"flowers\", \"forrest\"];\n // Randomize each word.\n var randomWord = wordList[Math.floor(Math.random() * wordList.length)];\n // Stores a single random word so we can populate the DOM.\n var singleGuess = [];\n // Hide the words with underscores.\n for (var i = 0; i < randomWord.length; i++) {\n singleGuess.push(\"_\");\n }\n // Populate the hidden random word to the DOM.\n randomWordDisplay.textContent = singleGuess.join(\" \");\n\n // Make the cheaters feel bad about themselves.\n var feelBadArray = [\n \"I caught you red handed, cheater! Just take it.\",\n \"Cheating, in my game? I'm not mad, just disappointed. Go on and take it.\",\n \"Cheating isn't a good look, you know. Pathetic. Just take the word and go.\",\n \"Do you really think this is just another generic hangman game with all the answers logged in the console? Oh wait. JUST TAKE IT!\",\n ];\n // Randomize the feel bad phrases.\n var randomPhrase = feelBadArray[Math.floor(Math.random() * feelBadArray.length)];\n\n // Create a little character in the console that makes the player feel bad for cheating!\n console.log(\"%cCHEATER ALERT!\", \"color: red; font-weight: bold; text-shadow: 2px 2px 10px; font-size: 200%;\");\n console.log(' ಠ_ಠ' + \" \" + randomPhrase + \"\\n\" +\n ' /█──' + \" \" + \"The word is: '\" + randomWord + \"'.\" + '\\n' +\n ' .Π.' + '\\n' +\n '');\n\n // Log the players keyboard events.\n document.onkeyup = function (event) {\n var playerKeyPress = event.key;\n // Track only the players keypresses (A through Z; A = 65 || Z = 90).\n if (event.keyCode >= 65 && event.keyCode <= 90) {\n // Change hangmans hang state based on 'playerKeyPress'.\n document.getElementById(\"baseImg\").src = \"./assets/images/hang-states/try-guess-\" + playerRemainingGuesses + \".jpg\";\n\n // Default Keypress Sound.\n defaultPress.volume = 0.04; // MP3 Volume.\n defaultPress.play();\n\n // If the player picks a correct letter, replace the underscore with the correct letter.\n var guess = playerKeyPress;\n for (var j = 0; j < randomWord.length; j++) {\n if (randomWord[j] === guess) {\n // Override the underscore with the correct letter.\n singleGuess[j] = guess;\n // Update the DOM to show the players progress.\n randomWordDisplay.textContent = singleGuess.join(\" \");\n }\n // Win Condition.\n if (randomWord === singleGuess.join(\"\")) {\n // Let the player know they won.\n alert(\"You are correct, the word is '\" + randomWord + \"'!\");\n // Increment a win point.\n playerWon.textContent = playerGamesWon++;\n\n // Reset game.\n playerRemainingGuesses = 8;\n // Reset Hangman.\n document.getElementById(\"baseImg\").src = \"./assets/images/hang-states/try-default.jpg\";\n // Re-Initialize Game.\n gameInit();\n // Break Statement Execution.\n break;\n }\n // Loss Condition.\n if (playerRemainingGuesses === 0) {\n // Let the player know they lost the game.\n alert(\"Better luck next time, the word is '\" + randomWord + \"'!\");\n // Disable Game.\n randomWordDisplay.style.display = \"none\";\n // Add a loss to the counter.\n playerLost.textContent = playerGamesLost++;\n // Show Dead Hangman.\n document.getElementById(\"baseImg\").src = \"./assets/images/hang-states/try-loss.jpg\";\n\n // Reset game.\n setTimeout(function () {\n // Re-Enable Game.\n randomWordDisplay.style.display = \"block\";\n // Reset Hangman.\n document.getElementById(\"baseImg\").src = \"./assets/images/hang-states/try-default.jpg\";\n }, 3000);\n\n // Reset Guesses\n playerRemainingGuesses = 8;\n\n // Re-Initialize Game.\n gameInit()\n // Break Statement Execution.\n break;\n }\n }\n\n // Populate remaining guesses.\n pGuessesRemaining.textContent = playerRemainingGuesses;\n // Remaining guess deductor.\n playerRemainingGuesses--;\n\n // Each time a letter is typed, put it into the guess box.\n userLetterGuesses.textContent += playerKeyPress + \" \";\n }\n }\n}", "checkLetter(letter)\r\n {\r\n // get the index of the letter in the phrase (-1 if not found)\r\n\r\n let foundIndex = this.phrase.indexOf(letter);\r\n\r\n // if not found\r\n\r\n if (foundIndex === -1) \r\n {\r\n // return false\r\n\r\n return false;\r\n } \r\n else \r\n {\r\n // if found show the letters on the phrase area and return true\r\n //this.showMatchedLetter(letter);\r\n return true;\r\n }\r\n\r\n }", "function whenUserGuesses () {\n if (currentWord.alreadyPressedLetters.includes(userKey) && userWon === false && userLost === false) {\n $(\".already-pressed\").empty().append('You already guessed \"' + userKey + '\"').fadeIn(\"slow\").fadeOut(\"slow\");\n } else if (keyCode > 64 && keyCode < 91 && remainingGuesses > 0 && userWon === false) {\n $(\".guessed-letters\").append(userKey + \" \"); \n remainingGuesses -= 1;\n $(\".remaining-guesses\").empty().append(remainingGuesses);\n currentWord.alreadyPressedLetters.push(userKey);\n } \n}", "checkLetter(letter) {\n let compareLetter = chosenWord.includes(letter)\n console.log('Chosen letter: ' + letter)\n if (compareLetter === true) {\n var numCorrectLetters = $('.spaceLetter[data-letter=\"' + letter + '\"]')\n .length\n this.correctLetters += numCorrectLetters\n\n if (this.correctLetters === chosenWord.length) {\n setTimeout(function() {\n alert('You won!')\n }, 300)\n setTimeout(function() {\n location.reload()\n }, 2000)\n }\n $('*[data-letter=\"' + letter + '\"]').removeClass('hidden')\n } else {\n this.turnsRemaining -= 1\n console.log('Turns Remaining:' + this.turnsRemaining)\n this.drawBodyPart()\n }\n }", "function guessedWord() {\n wordStatus = answer.split('').map(letter => (guessed.indexOf(letter) >= 0 ? letter : \" _ \")).join('');\n\n document.getElementById('wordSpotlight').innerHTML = wordStatus;\n}" ]
[ "0.75704396", "0.75040966", "0.75040174", "0.74393064", "0.73941904", "0.7210228", "0.719771", "0.71723175", "0.71718353", "0.7153414", "0.71518844", "0.7142824", "0.7094757", "0.6987208", "0.69158083", "0.6899759", "0.6856858", "0.6853797", "0.6850085", "0.6830862", "0.6827472", "0.68212783", "0.6817792", "0.68173075", "0.67752445", "0.6754647", "0.6746922", "0.67236036", "0.6709821", "0.67012835", "0.6658833", "0.6654756", "0.66465914", "0.66419804", "0.66319895", "0.66277736", "0.66184545", "0.6600603", "0.65988266", "0.65971845", "0.65949947", "0.6588896", "0.6581986", "0.6576088", "0.65364647", "0.65194076", "0.65133786", "0.65099627", "0.6506871", "0.6502404", "0.65014666", "0.64978325", "0.64945805", "0.6492476", "0.64891654", "0.6478524", "0.6471733", "0.6461941", "0.64548737", "0.6448383", "0.6444306", "0.64410543", "0.64364713", "0.64324033", "0.643097", "0.6414975", "0.64128155", "0.64103", "0.64081264", "0.6396684", "0.6389276", "0.63892335", "0.63880205", "0.63855416", "0.6360369", "0.6353156", "0.6351856", "0.6345719", "0.63363487", "0.6335173", "0.633051", "0.6329945", "0.63288116", "0.63275534", "0.631429", "0.6312882", "0.6305487", "0.6303763", "0.63016516", "0.6293248", "0.629136", "0.6289783", "0.62850064", "0.6282301", "0.627192", "0.62682045", "0.626447", "0.6260431", "0.6246064", "0.6245662", "0.6243184" ]
0.0
-1
Tells us, on a nested basis, if objects are the same, or differ at some level
function objectsAreDifferent(dominantObject: Object, slaveObject: Object) : boolean { for (const key:string in dominantObject) { if (!dominantObject.hasOwnProperty(key)) { continue; } const dominantKeyValue: any = dominantObject[key]; const slaveKeyValue: any = slaveObject[key]; if (!slaveKeyValue) { return true; } if (typeof dominantKeyValue === 'object') { return objectsAreDifferent(dominantKeyValue, slaveKeyValue); } if (dominantKeyValue !== slaveKeyValue) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deepEqual(obj1, obj2) {\n // Your code here\n for(var prop in obj1) {\n if(typeof obj1[prop] == 'object' && typeof obj2[prop] == 'object') {\n deepEqual(obj1[prop], obj2[prop]);\n }\n else if(obj1[prop] != obj2[prop]) {\n return false;\n }\n }\n return true;\n}", "function isEqual(obj1, obj2) {\n var shallow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n // https://github.com/mapbox/mapbox-gl-js/pull/5979/files#diff-fde7145050c47cc3a306856efd5f9c3016e86e859de9afbd02c879be5067e58f\n var refSet = new Set();\n function deepEqual(a, b) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var circular = refSet.has(a);\n (0,_warning__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .ZP)(!circular, 'Warning: There may be circular references');\n if (circular) {\n return false;\n }\n if (a === b) {\n return true;\n }\n if (shallow && level > 1) {\n return false;\n }\n refSet.add(a);\n var newLevel = level + 1;\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n for (var i = 0; i < a.length; i++) {\n if (!deepEqual(a[i], b[i], newLevel)) {\n return false;\n }\n }\n return true;\n }\n if (a && b && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__/* [\"default\"] */ .Z)(a) === 'object' && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__/* [\"default\"] */ .Z)(b) === 'object') {\n var keys = Object.keys(a);\n if (keys.length !== Object.keys(b).length) {\n return false;\n }\n return keys.every(function (key) {\n return deepEqual(a[key], b[key], newLevel);\n });\n }\n // other\n return false;\n }\n return deepEqual(obj1, obj2);\n}", "function isEqual(obj1, obj2) {\n var shallow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n // https://github.com/mapbox/mapbox-gl-js/pull/5979/files#diff-fde7145050c47cc3a306856efd5f9c3016e86e859de9afbd02c879be5067e58f\n var refSet = new Set();\n function deepEqual(a, b) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var circular = refSet.has(a);\n (0,_warning__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(!circular, 'Warning: There may be circular references');\n if (circular) {\n return false;\n }\n if (a === b) {\n return true;\n }\n if (shallow && level > 1) {\n return false;\n }\n refSet.add(a);\n var newLevel = level + 1;\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n for (var i = 0; i < a.length; i++) {\n if (!deepEqual(a[i], b[i], newLevel)) {\n return false;\n }\n }\n return true;\n }\n if (a && b && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a) === 'object' && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(b) === 'object') {\n var keys = Object.keys(a);\n if (keys.length !== Object.keys(b).length) {\n return false;\n }\n return keys.every(function (key) {\n return deepEqual(a[key], b[key], newLevel);\n });\n }\n // other\n return false;\n }\n return deepEqual(obj1, obj2);\n}", "function deepEqual(object1, object2) {\n //for each element in the object, make a comparison\n //figure out how to traverse the object\n\n //if one of the objects is null then return false\n if(object1 === null || object2 === null) {\n return false;\n }\n //find out if they are pointing to the same place in memory\n if (object1 === object2 && object1 !== null) {\n return true;\n }\n\n //count the number of properties, if they are not the same then return false\n //figure out how to count the number of properties\n\n // if the types are the same and the values of the properties are the same then return true. Do I access the properties by naming them with 'here' and 'object' or does it need to be more generic than that?\n if (typeof object1 === typeof object2) {\n\n }\n\n\n}", "function deepEqual(obj1, obj2) {\n // Your code here\n if( typeof obj1 == 'object' && typeof obj2 == 'object')\n {\n var o1=0, o2=0;\n for(var element in obj1)\n o1++;\n for(var element in obj2) \n o2++;\n if(o1-o2 !== 0) return false;\n for(var element in obj1)\n {\n if(!(element in obj2) || !deepEqual(obj1[element],obj2[element]))\n return false;\n }\n for(var element in obj2)\n {\n if(!(element in obj1) || !deepEqual(obj1[element],obj2[element])) \n return false;\n }\n return true;\n }\n else\n return obj1 === obj2;\n \n}", "function sameKeysNested(objA, objB, ignoreOrder) {\n var keysA = Object.keys(objA)\n var keysB = Object.keys(objB)\n\n if (keysA.length !== keysB.length)\n return false\n\n if (ignoreOrder) keysA.sort(), keysB.sort()\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i])\n return false\n\n if (typeof objA[keysA[i]] === \"object\")\n sameKeysNested(objA[keysA[i]], objB[keysB[i]], ignoreOrder)\n\n return true\n}", "function deepEqual(el1, el2)\n{\n if ((typeof el1) == (typeof el2))\n {\n if ((typeof el1) === 'object')\n {\n if ((el1 == null) && (el2 == null))\n {\n console.log(\"Both null\");\n return true;\n }\n else\n {\n //compares number of properties from each object\n if (Object.keys(el1).length != Object.keys(el2).length)\n {\n return false;\n }\n\n var match = true;\n for (var elem in el1)\n {\n //makes sure that the property is from object, not from prototype\n if (el1.hasOwnProperty(elem) && (el2[elem] != undefined))\n {\n if (el1[elem] != el2[elem])\n {\n match = false;\n }\n }\n }\n return match;\n }\n }\n else\n {\n return el1 === el2;\n }\n }\n else\n {\n console.log(\"Not the same type\");\n return false;\n }\n}", "function deepEqual(obj1,obj2) {\n return areObjects(obj1,obj2) && equalProp(obj1,obj2);\n}", "function deepEqual(x, y){\n //console.log('x '+x+'y '+y);\n//if x equals y in value and typeof then return true\n if(x===y){\n return true;\n//if x and y are both objects then\n }else if (typeof(x)===\"object\" && typeof(y)===\"object\"){\n // x = {here: \"an\", abhi: \"neely\"}\n // y = {here: \"an\", abhi: \"neely\"}\n//for loop through the properties and values of x and y (property names and values should be the same if they are equal)\n for(var key in x) {\n x_value = x[key];\n y_value = y[key];\n //console.log('xvalue '+x_value +'yvalue '+ y_value);\n////recursive function to see if the values inside the object are objects and equal and will return true and false\n return deepEqual(x_value, y_value);\n }\n } else {\n return false;\n }\n}", "function deepEqual(obj1, obj2) {\n // Your code here\n if (obj1===obj2) return true;\n if (obj1==null || typeof obj1 != \"object\" || obj2==null || typeof obj2 != \"object\"){\n return false;\n }\n\n for (var key in obj2) {\n if (!(key in obj1) || !deepEqual(obj1[key], obj2[key]))\n return false;\n }\n\n return true;\n}", "sameJSONStructure(o1, o2) {\n var equal = true;\n for (var i in o1) {\n if (!o2.hasOwnProperty(i)) {\n equal = false;\n }\n }\n\n return equal;\n }", "function shallowEqual(object1, object2) {\n if(\n (object1['searchTerm'] !== object2['searchTerm']) ||\n (object1['richtext'] !== object2['richtext']) ||\n (object1['buttonsCount'] !== object2['buttonsCount']) ||\n (object1['imagesCount'] !== object2['imagesCount']) ||\n (object1['links'] !== object2['links']) ||\n (object1['listing'] !== object2['listing']) ||\n (object1['typeName'] !== object2['typeName'])\n ) {\n return false\n } else {\n return true\n }\n }", "function deepEqual(obj1, obj2) {\n // Your code here\n}", "function deepEqual(obj1, obj2) {\n // Your code here\n if (obj1 === obj2) return true;\n\n if (\n obj1 == null ||\n typeof obj1 != \"object\" ||\n obj2 == null ||\n typeof obj2 != \"object\"\n )\n return false;\n\n var propsInA = 0,\n propsInB = 0;\n\n for (var prop in obj1) propsInA += 1;\n\n for (var prop in obj2) {\n propsInB += 1;\n if (!(prop in obj1) || !deepEqual(obj1[prop], obj2[prop])) return false;\n }\n\n return propsInA == propsInB;\n}", "function sameKeys(objA, objB, protoCheck, deepCheck) {\n var keysA = Object.getNestedKeys(objA, protoCheck, !deepCheck)\n var keysB = Object.getNestedKeys(objB, protoCheck, !deepCheck)\n\n if (keysA.length !== keysB.length)\n return false\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i])\n return false\n\n return true\n}", "function deepEqual(a,b) \n{\n//two inputs ob ojects\n\tif (a === b) return true; //this is true when these share same value prop.\n\tif (a == null || typeof a !=\"object\" || b == null || typeof b !=\"object\" ) //Null =/ null\n\t\treturn false; //this checks if they dont equal\n\n\tvar a_count = 0, b_count = 0; //counters for loop iteration\n\tfor(var properties in a)\n\t\ta_count++;\n\tfor( var properties in b) \n\t{\n\t\tb_count++;\n\t\n\tif(!(properties in a) || !deepEqual(a[properties], b[properties]))\n\t\treturn false;\n\t}\nreturn a_count === b_count;\n}", "function deepEqual (a, b) {\n\tif (typeof a === \"object\" && typeof b === \"object\") {\n\t\treturn Object.keys(a).concat(Object.keys(b)).every(function (property) {return deepEqual(a[property], b[property])});\n\t} else {\n\t\treturn a === b;\n\t}\t\n}", "function deepEqual(object1, object2) {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n \n if (keys1.length !== keys2.length) {\n return false;\n }\n \n for (const key of keys1) {\n const val1 = object1[key];\n const val2 = object2[key];\n const areObjects = isObject(val1) && isObject(val2);\n if (\n areObjects && !deepEqual(val1, val2) ||\n !areObjects && val1 !== val2\n ) {\n return false;\n }\n }\n \n return true;\n}", "function deepEqual(obj1, obj2){\n if(obj1 == null || obj2 == null)\n return true;\n else if ( typeof obj1 != typeof obj2){\n if(typeof obj1 != \"undefined\" && typeof obj2 != \"undefined\" )\n return false;\n }\n else{\n if (obj1.length != obj2.length)\n return false;\n else if (obj1.length == 1 && obj1 == obj2)\n return true;\n else{\n for(x in obj1){\n if (!deepEqual(obj1[x],obj2[x]))\n return false;\n }\n return true;\n }\n }\n}", "function deepEquals(obj1, obj2) {\n if (obj1 === obj2) return true;\n if (obj1 == null) return obj2 == null;\n if (obj2 == null) return obj1 == null;\n if (Array.isArray(obj1) && Array.isArray(obj2)) {\n let allSame = true;\n obj1.forEach((item, index) => {\n if (!allSame) return;\n if (!deepEquals(item, obj2[index])) allSame = false;\n });\n return allSame && obj1.length === obj2.length;\n } else if (typeof obj1 === 'object' && typeof obj2 === 'object') {\n const keys1 = Object.keys(obj1);\n const keys2 = Object.keys(obj2);\n if (keys1.length !== keys2.length) return false;\n let allSame = true;\n keys1.forEach(key => {\n if (!allSame) return;\n if (!deepEquals(obj1[key], obj2[key])) {\n allSame = false;\n }\n });\n return allSame;\n } else {\n return obj1 === obj2;\n }\n}", "function objectsAreIdentical( objs ){\n\t\n\tvar identical = true; \n\tvar length0 = getObjectLength( objs[0] );\n\tvar length1 = getObjectLength( objs[1] );\n\tvar isObj0, isObj1;\n\t\n\tif ( length0 !== length1 ){\n\t\tidentical = false;\n\t}\n\t\n\telse if ( objs[0].isColor && objs[1].isColor ){\n\t\tif ( !objs[0].equals( objs[1] ) ) { identical = false; }\n\t}\n\t\n\telse if ( !objs[0].isColor && !objs[1].isColor ){\n\t\tfor ( var k in objs[0] ){\n\t\t\tif ( !objs[1].hasOwnProperty( k ) ){\n\t\t\t\tidentical = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( var k in objs[1] ){\n\t\t\tif ( !objs[0].hasOwnProperty( k ) ){\n\t\t\t\tidentical = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( var k in objs[0] ){\n\t\t\tif ( objs[0][k] !== objs[1][k] ){\n\t\t\t\tidentical = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tdebug.master && debug.generalUtils && console.log( 'objectsAreIdentical(): ', identical );\n\treturn identical;\n}", "function check(subref, subother, path)\n\t\t{\n\t\t\t//console.log(\"checking\");\n\t\t\t//console.log(\"path: \" + path);\n\t\t\t//console.log(\"subref: \" +subref);\n\t\t\t//console.log(\"subother: \"+subother);\n\t\t\tif(subref instanceof Array)\n\t\t\t{\n\t\t\t\t//console.log(\"is Array: \" + path);\n\t\t\t\tif(!(subother instanceof Array))\n\t\t\t\t{\n\t\t\t\t\tok = false;\n\t\t\t\t\tconsole.log(\"Error: not an Array \" + path);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(subother.length == 0)\n\t\t\t\t{\n\t\t\t\t\tconsole.log(\"Warning: can't check Array of lentgh 0 \" + path);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// check first array member\n\t\t\t\tcheck(subref[0], subother[0], path);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// else compare as dict\n\t\t\tfor(m in subref)\n\t\t\t{\n\t\t\t\tif(!(m in subother))\n\t\t\t\t{\n\t\t\t\t\tok = false;\n\t\t\t\t\tconsole.log(\"Error: missing member \\\"\" + m + \"\\\" in \"+ path);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(subref[m] === undefined)\n\t\t\t\t{\n\t\t\t\t\t// undefined = don't care what it is\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(typeof(subref[m]) == typeof(subother[m]))\n\t\t\t\t{\n\t\t\t\t\tif(typeof(subref[m]) == \"object\")\n\t\t\t\t\t{\n\t\t\t\t\t\t// make deep object inspection\n\t\t\t\t\t\tpath.push(m);\n\t\t\t\t\t\tcheck(subref[m], subother[m], path);\n\t\t\t\t\t\tpath.pop();\n\t\t\t\t\t}\n\t\t\t\t\t// else everthing is fine\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tok = false;\n\t\t\t\t\tconsole.log(\"Error: member \\\"\" + m + \"\\\" has wrong type in \"+ path);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// TODO: check for additional members and print notice\n\t\t}", "function deepEqual(left,right){\n \n//check if unequal number of elements found they are not equal\n\t\t\tif(Object.keys(left).length !== Object.keys(right).length) return false;\n\t\t\t\n//check type of checking for comparision\n if(typeof(left)!==typeof(right)) return false; \n\t\t\t\n// check if type of found to be object we consider it has key : value so call for every objects using loop and recursive function call\n if(typeof(left)===\"object\"){ \n\n for(let key in left){\n return deepEqual(left[key],right[key]);\n }\n }\n else{\n if(left===right) return true; // here we reach if the left and right both are not of object so checking using === for equality\n // if equal return true else false\n else\n return false;\n }\n\n\n }", "function compareObjects(obj1, obj2) {\n\t if (typeof obj1 !== 'object' || typeof obj2 !== 'object') {\n\t return obj1 === obj2;\n\t }\n\t if (obj1 === obj2) {\n\t // Same object or both are null\n\t return true;\n\t }\n\t if (obj1 === null || obj2 === null) {\n\t // One of objects is null\n\t return false;\n\t }\n\t // Check for arrays\n\t if (obj1 instanceof Array) {\n\t if (!(obj2 instanceof Array)) {\n\t return false;\n\t }\n\t if (obj1.length !== obj2.length) {\n\t return false;\n\t }\n\t for (let i = 0; i < obj1.length; i++) {\n\t const value1 = obj1[i];\n\t const value2 = obj2[i];\n\t if (value1 !== value2) {\n\t // Different values. If both are objects, do deep comparison, otherwise return false\n\t if (typeof value1 !== 'object' ||\n\t typeof value2 !== 'object' ||\n\t !compareObjects(value1, value2)) {\n\t return false;\n\t }\n\t }\n\t }\n\t return true;\n\t }\n\t else if (obj2 instanceof Array) {\n\t return false;\n\t }\n\t // Not array\n\t const keys1 = Object.keys(obj1);\n\t const keys2 = Object.keys(obj2);\n\t if (keys1.length !== keys2.length) {\n\t return false;\n\t }\n\t for (let i = 0; i < keys1.length; i++) {\n\t const key = keys1[i];\n\t if (typeof obj1[key] !==\n\t typeof obj2[key]) {\n\t return false;\n\t }\n\t if (typeof obj1[key] === 'object') {\n\t if (!compareObjects(obj1[key], obj2[key])) {\n\t return false;\n\t }\n\t }\n\t else if (obj1[key] !==\n\t obj2[key]) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t}", "function deepEqual(firstObject, secondObject) {\n const firstKeys = Object.keys(firstObject);\n const secondKeys = Object.keys(secondObject);\n\n if (firstKeys.length !== secondKeys.length) {\n return false;\n }\n\n for (const key of firstKeys) {\n const val1 = firstObject[key];\n const val2 = secondObject[key];\n const areObjects = val1 != null && typeof val1 === 'object' && val2 != null && typeof val2 === 'object';\n if (\n areObjects && !deepEqual(val1, val2) ||\n !areObjects && val1 !== val2\n ) {\n return false;\n }\n }\n\n return true;\n}", "function deepEqual(obj1, obj2) {\n \n // Check to see if the two comparrisons are both objects\n if(typeof(obj1) == \"object\" && typeof(obj2) == \"object\") {\n \n // itterate through the objects properties\n for(var props in obj1) {\n // check to see if the other object has that property\n // (pulled the.hasOwnProperty from the MDN resource)\n if(obj2.hasOwnProperty(props)){\n\n // Recursively call the function to go deeper and check\n // the two properties are the same\n if(deepEqual(obj1[props], obj2[props])) {\n return true;\n }\n } else {\n // The other object dosen't have the same property\n return false;\n }\n }\n\n return false;\n\n // The two comparrisons are not both objects. Check\n // to see if they're the same\n } else if (obj1 === obj2) {\n return true;\n \n // The comparrison failed and they are not the same\n } else {\n return false;\n }\n}", "function deepEqual(a, b){\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (Object.keys(a).length != Object.keys(b).length) return false;\n for (var key in a) if (!deepEqual(a[key], b[key])) return false;\n return true;\n } \n else return a === b\n}", "function deepCompare(objA, objB, equivalent) {\n // keep track of references that have been compared to find circular references while walking down either object\n var refsComparedA = [];\n var refsComparedB = [];\n var compare = Boolean(equivalent) ? equivalent : function (a, b) { return (a === b); };\n var equals = function (a, b) {\n // try a simple equality test first\n if (a === b) {\n return true;\n }\n if ((a === null) || (b === null)) {\n return false;\n }\n // if both are objects, then further comparison is required\n if ((typeof (a) === \"object\") && (typeof (b) === \"object\")) {\n // perform deep comparison over object's properties\n var aKeys = Object.keys(a).sort();\n var bKeys_1 = Object.keys(b).sort();\n // does one object have a different number of properties?\n if (aKeys.length !== bKeys_1.length) {\n return false;\n }\n var keysMatch = aKeys.every((function (key, index) {\n // key names should match\n if (key !== bKeys_1[index]) {\n return false;\n }\n else if (typeof (a[key]) === 'function' || typeof (b[key]) === 'function') {\n //skip comparison of function properties\n return true;\n }\n else if (!compare(a[key], b[key])) {\n // if this is an Object then recursive testing is needed on its properties\n if (typeof a[key] === \"object\") {\n // if this property was encountered before then we're going in circles, give up\n if (refsComparedA.indexOf(a[key]) !== -1) {\n throw new Error(\"Cannot perform DeepCompare() because a circular reference was encountered, object: \" + String(a) + \", property: \" + key);\n }\n refsComparedA.push(a[key]);\n if (refsComparedB.indexOf(b[key]) !== -1) {\n throw new Error(\"Cannot perform DeepCompare() because a circular reference was encountered, object: \" + String(b) + \", property: \" + key);\n }\n refsComparedB.push(b[key]);\n // recursive compare object's properties\n if (!equals(a[key], b[key])) {\n return false;\n }\n refsComparedA.pop();\n refsComparedB.pop();\n return true;\n }\n else {\n // properties don't match\n return false;\n }\n }\n else {\n return true;\n }\n }));\n if (!keysMatch) {\n return false;\n }\n }\n else {\n // parameters aren't equal, and at least one is not an Object\n return false;\n }\n // everything is equal\n return true;\n };\n return equals(objA, objB);\n}", "function isObjectBelongsToParent(obj){\r\n\t\t\r\n\t\tvar objParent = obj.parents(\".uc-assets-wrapper\");\r\n\t\tvar parentID = objParent.attr(\"id\");\r\n\t\tvar wrapperID = t.getID();\r\n\t\t\r\n\t\tif(parentID == wrapperID)\r\n\t\t\treturn(true);\r\n\t\t\r\n\t\treturn(false);\r\n\t}", "function deepEqual(a,b){\n if(a === b){\n return true;\n }\n if(typeof a != typeof b){\n return false;\n }\n if(a === null || b === null){\n return false;\n }\n if(typeof a == 'object'){\n var equal = true;\n for(prop in a){\n if(!(prop in b)){\n return false;\n }\n if(typeof a[prop] == 'object'){\n var equal = deepEqual(a[prop],b[prop]);\n if(!equal){\n return false;\n }\n }\n equal = a[prop] === b[prop];\n if(!equal){\n break;\n }\n }\n return equal;\n }\n}", "function isEqualObjects(x, y, depth)\n\t{\n\t\tif (x === null || x === undefined || y === null || y === undefined)\n\t\t\treturn x === y; \t\t\t\t\t//not both null or undefined\n\n\t\tif (x.constructor !== y.constructor)\n\t\t\treturn false;\t\t\t\t\t\t//not both same constructor\n\n\t\tif (typeof(x) == 'number' && isNaN(x) && isNaN(y))\n\t\t\treturn true;\t\t\t\t\t\t//required because NaN === NaN is false\n\n\t\t// if they are functions, they should exactly refer to same one (because of closures)\n\t\t// NO: same name and script except comments (if comment stripper available)\n\t\tif (x instanceof Function)\n\t\t{\n\t\t\t//if (!x.name && x.name != y.name && x !== y)\n\t\t\tif (x.name !== y.name)\n\t\t\t\treturn false;\n\n\t\t\tif ((x + '').trim() !== (y + '').trim())\n\t\t\t\treturn false;\n\t\t}\n\n\t\t// if they are regexps, they should exactly refer to same one\n\t\t// (it is hard to better equality check on current ES)\n\t\t// NO -- only check flags and source patter properties -- NOT lastIndex\n\t\tif (x instanceof RegExp)\n\t\t{\n\t\t\treturn x.global == y.global && x.ignoreCase == y.ignoreCase\n\t\t\t\t&& x.multiline == y.multiline && x.source == y.source;\n\t\t\t//return x === y;\n\t\t}\n\n\t\tif (x === y || x.valueOf() === y.valueOf())\n\t\t\treturn true;\t\t\t\t\t\t\t//both same object ??\n\n\t\tif (x instanceof Array && x.length !== y.length)\n\t\t\treturn false;\n\n\t\t// Date: date and time zone besides owner properties (e.g. EZ.date)\n\t\tif (x instanceof Date)\n\t\t{\n\t\t\tif (x.getTime() != y.getTime())\n\t\t\t\treturn false;\t\t\t\t\t\t//different dates\n\t\t}\n\t\t\n\t\t// not Object: if they are strictly equal, they both need to be object at least\n\t\tif (!(x instanceof Object) || !(y instanceof Object))\n\t\t\treturn false;\n\n\t\t//------------------------------------------\n\t\t// embedded object properties equality check\n\t\t//------------------------------------------\n\t\tvar keys = Object.keys(x).concat(Object.keys(y)).removeDups();\n\t\tvar is = keys.every(function(i)\t\t\t\t\t//use is as debugger convenience\n\t\t{\n\t\t\treturn i in x && i in y && typeof(x[i]) == typeof(y[i]);\n\t\t})\n\t\tif (!is && !showDiff)\t\t\t\t\t\t\t//quit if keys do not match\n\t\t\treturn false;\n\n\t\t//if (EZ.test.debug('EZequals')) debugger;\n\t\tis = keys.every(function(key)\n\t\t{\n\t\t\twhile (x[key] instanceof Object)\t\t\t//for function or object properties . . .\n\t\t\t{\t\t\t\n\t\t\t\tif (x[key] == y[key]) return true;\t\t//same Object\n\t\t\t\t\n\t\t\t\tif (!showDiff && EZ.test.running != 'EZequals') \n\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t//skip repeat logic UNLESS TESTING\n\t\t\t\t//if (true) break;\n\n\t\t\t\tvar i = getObjectIdx('x', x[key]);\t\t//index of processed x Objects\n\t\t\t\tif (matchedObj.x[i].includes(y[key]))\n\t\t\t\t\treturn true;\t\t\t\t\t\t//...previously matched y[key]\n\t\t\t\tif (unmatchedObj.x[i].includes(y[key]))\n\t\t\t\t\treturn false;\t\t\t\t\t\t//...previously did NOT match y[key]\n\n\t\t\t\tvar j = getObjectIdx('y', y[key]);\t\t//index of processed y Objects\n\t\t\t\tif (matchedObj.y[j].includes(x[key]))\n\t\t\t\t\treturn true;\t\t\t\t\t\t//...previously matched x[key]\n\t\t\t\tif (unmatchedObj.y[j].includes(x[key]))\n\t\t\t\t\treturn false;\t\t\t\t\t\t//...previously did NOT match x[key]\n\n\t\t\t\tdotName.push(key);\n\t\t\t\tvar isEqual = isEqualObjects(x[key], y[key], depth+1);\n\t\t\t\tdotName.pop();\n\t\t\t\tif (isEqual)\n\t\t\t\t{\t\t\t\t\t\t\t\t\t\t//objects match -- remember for future\n\t\t\t\t\tmatchedObj.x[i].push(y[key]);\t\t\t\t\n\t\t\t\t\tmatchedObj.y[j].push(x[key]);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\t\t\t\t\t\t\t\t\t//remember NOT matched\n\t\t\t\t\tunmatchedObj.x[i].push(y[key]);\n\t\t\t\t\tunmatchedObj.y[j].push(x[key]);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar isEqual = isEqualObjects(x[key], y[key], depth+1);\n\t\t\tif (!isEqual && showDiff)\n\t\t\t{\n\t\t\t\tvar msg = 'x.' + key + ': ' + x[key] + '\\t\\ty.' + key + ': ' + y[key];\n\t\t\t\tconsole.log(msg);\n\t\t\t}\n\t\t\treturn isEqual;\n\t\t});\n\t\treturn is;\n\t}", "function deepCompare(a, b) {\n var count = React.Children.count(a);\n\n if (count !== React.Children.count(b)) {\n return false;\n }\n\n // check if single item\n if (count === 1) {\n // if react element, continue recursion\n if (a.props && b.props) {\n // tag type and keys\n if (a.type === b.type && a.key === b.key) {\n var usedSet = new Set();\n for (var key in a.props) {\n if (!(key in b.props) || !deepCompare(a.props[key], b.props[key])) {\n return false;\n }\n usedSet.add(key);\n }\n for (var _key in b.props) {\n if (!usedSet.has(_key)) {\n if (!(_key in a.props) || !deepCompare(a.props[_key], b.props[_key])) {\n return false;\n }\n }\n }\n return true;\n }\n return false;\n }\n // primitive data type\n else if (!a.props && !b.props) {\n return a === b;\n }\n return false;\n }\n // if multiple, compare all\n for (var i = 0; i < count; i++) {\n if (!deepCompare(a[i], b[i])) {\n return false;\n }\n }\n return true;\n}", "function deepObjectEqual(first, second) {\n // Check referential equality first.\n if (first === second) {\n return true;\n }\n // Check for the first object's keys in the second object.\n for (var key in first) {\n if (!(key in second)) {\n return false;\n }\n }\n // Check for the second object's keys in the first object.\n for (var key in second) {\n if (!(key in first)) {\n return false;\n }\n }\n // Compare the values for equality.\n for (var key in first) {\n if (!deepEqual(first[key], second[key])) {\n return false;\n }\n }\n // At this point, the objects are equal.\n return true;\n }", "function deepObjectEqual(first, second) {\r\n // Check referential equality first.\r\n if (first === second) {\r\n return true;\r\n }\r\n // Check for the first object's keys in the second object.\r\n for (var key in first) {\r\n if (!(key in second)) {\r\n return false;\r\n }\r\n }\r\n // Check for the second object's keys in the first object.\r\n for (var key in second) {\r\n if (!(key in first)) {\r\n return false;\r\n }\r\n }\r\n // Compare the values for equality.\r\n for (var key in first) {\r\n if (!deepEqual(first[key], second[key])) {\r\n return false;\r\n }\r\n }\r\n // At this point, the objects are equal.\r\n return true;\r\n }", "function deepObjectEqual(first, second) {\r\n // Check referential equality first.\r\n if (first === second) {\r\n return true;\r\n }\r\n // Check for the first object's keys in the second object.\r\n for (var key in first) {\r\n if (!(key in second)) {\r\n return false;\r\n }\r\n }\r\n // Check for the second object's keys in the first object.\r\n for (var key in second) {\r\n if (!(key in first)) {\r\n return false;\r\n }\r\n }\r\n // Compare the values for equality.\r\n for (var key in first) {\r\n if (!deepEqual(first[key], second[key])) {\r\n return false;\r\n }\r\n }\r\n // At this point, the objects are equal.\r\n return true;\r\n }", "function deepCompare(objA, objB, equivalent) {\r\n // keep track of references that have been compared to find circular references while walking down either object\r\n var refsComparedA = [];\r\n var refsComparedB = [];\r\n var compare = equivalent ? equivalent : function (a, b) { return (a === b); };\r\n function equals(a, b) {\r\n // try a simple equality test first\r\n if (a === b) {\r\n return true;\r\n }\r\n if ((a === null) || (b === null)) {\r\n return false;\r\n }\r\n // if both are objects, then further comparison is required\r\n if ((typeof (a) === 'object') && (typeof (b) === 'object')) {\r\n // perform deep comparison over object's properties\r\n var aKeys = Object.keys(a).sort();\r\n var bKeys_1 = Object.keys(b).sort();\r\n // does one object have a different number of properties?\r\n if (aKeys.length !== bKeys_1.length) {\r\n return false;\r\n }\r\n var keysMatch = aKeys.every(function (key, index) {\r\n // key names should match\r\n if (key !== bKeys_1[index]) {\r\n return false;\r\n }\r\n else if (typeof (a[key]) === 'function' || typeof (b[key]) === 'function') {\r\n // skip comparison of function properties\r\n return true;\r\n // @ts-ignore\r\n }\r\n else if (!compare(a[key], b[key])) {\r\n // if this is an Object then recursive testing is needed on its properties\r\n if (typeof a[key] === 'object') {\r\n // if this property was encountered before then we're going in circles, give up\r\n // @ts-ignore\r\n if (refsComparedA.indexOf(a[key]) !== -1) {\r\n throw new Error(\"Cannot perform DeepCompare() because a circular reference was encountered, object: \" + a + \", property: \" + key);\r\n }\r\n // @ts-ignore\r\n refsComparedA.push(a[key]);\r\n // @ts-ignore\r\n if (refsComparedB.indexOf(b[key]) !== -1) {\r\n throw new Error(\"Cannot perform DeepCompare() because a circular reference was encountered, object: \" + b + \", property: \" + key);\r\n }\r\n // @ts-ignore\r\n refsComparedB.push(b[key]);\r\n // recursive compare object's properties\r\n if (!equals(a[key], b[key])) {\r\n return false;\r\n }\r\n refsComparedA.pop();\r\n refsComparedB.pop();\r\n return true;\r\n }\r\n else {\r\n // properties don't match\r\n return false;\r\n }\r\n }\r\n else {\r\n return true;\r\n }\r\n });\r\n if (!keysMatch) {\r\n return false;\r\n }\r\n }\r\n else {\r\n // parameters aren't equal, and at least one is not an Object\r\n return false;\r\n }\r\n // everything is equal\r\n return true;\r\n }\r\n return equals(objA, objB);\r\n}", "function deepCompare(objA, objB, equivalent) {\r\n // keep track of references that have been compared to find circular references while walking down either object\r\n var refsComparedA = [];\r\n var refsComparedB = [];\r\n var compare = equivalent ? equivalent : function (a, b) { return (a === b); };\r\n function equals(a, b) {\r\n // try a simple equality test first\r\n if (a === b) {\r\n return true;\r\n }\r\n if ((a === null) || (b === null)) {\r\n return false;\r\n }\r\n // if both are objects, then further comparison is required\r\n if ((typeof (a) === 'object') && (typeof (b) === 'object')) {\r\n // perform deep comparison over object's properties\r\n var aKeys = Object.keys(a).sort();\r\n var bKeys_1 = Object.keys(b).sort();\r\n // does one object have a different number of properties?\r\n if (aKeys.length !== bKeys_1.length) {\r\n return false;\r\n }\r\n var keysMatch = aKeys.every(function (key, index) {\r\n // key names should match\r\n if (key !== bKeys_1[index]) {\r\n return false;\r\n }\r\n else if (typeof (a[key]) === 'function' || typeof (b[key]) === 'function') {\r\n // skip comparison of function properties\r\n return true;\r\n // @ts-ignore\r\n }\r\n else if (!compare(a[key], b[key])) {\r\n // if this is an Object then recursive testing is needed on its properties\r\n if (typeof a[key] === 'object') {\r\n // if this property was encountered before then we're going in circles, give up\r\n // @ts-ignore\r\n if (refsComparedA.indexOf(a[key]) !== -1) {\r\n throw new Error(\"Cannot perform DeepCompare() because a circular reference was encountered, object: \" + a + \", property: \" + key);\r\n }\r\n // @ts-ignore\r\n refsComparedA.push(a[key]);\r\n // @ts-ignore\r\n if (refsComparedB.indexOf(b[key]) !== -1) {\r\n throw new Error(\"Cannot perform DeepCompare() because a circular reference was encountered, object: \" + b + \", property: \" + key);\r\n }\r\n // @ts-ignore\r\n refsComparedB.push(b[key]);\r\n // recursive compare object's properties\r\n if (!equals(a[key], b[key])) {\r\n return false;\r\n }\r\n refsComparedA.pop();\r\n refsComparedB.pop();\r\n return true;\r\n }\r\n else {\r\n // properties don't match\r\n return false;\r\n }\r\n }\r\n else {\r\n return true;\r\n }\r\n });\r\n if (!keysMatch) {\r\n return false;\r\n }\r\n }\r\n else {\r\n // parameters aren't equal, and at least one is not an Object\r\n return false;\r\n }\r\n // everything is equal\r\n return true;\r\n }\r\n return equals(objA, objB);\r\n}", "function deepEqual(a, b) {\n if (typeof a !== 'object' || typeof b !== 'object' || a == null || b == null)\n return a === b;\n if (Object.keys(a).length !== Object.keys(b).length) return false;\n for (let i = 0; i < Object.keys(a).length; i++)\n if (!deepEqual(a[Object.keys(a)[i]], b[Object.keys(a)[i]])) return false;\n return true;\n}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function deepEqual(obj1, obj2) {\n\n // Check if the two objects have the same memory address\n if (obj1 === obj2) {\n return true;\n }\n\n // Check if either is not an object or is null\n if (typeof obj1 != \"object\" || obj1 == null) {\n return false;\n }\n\n if (typeof obj2 != \"object\" || obj2 == null) {\n return false;\n }\n\n // Loop over each prop in obj1 and see if it is not in obj2\n for (var prop in obj1) {\n if (obj2.hasOwnProperty(prop)) { \n if (!deepEqual(obj1[prop], obj2[prop])) {\n return false;\n }\n } \n else {\n return false;\n } \n } \n return true;\n}", "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function deepEqual(val1, val2) {\n // Your code here\n // check if both arguments are objects\n if ((typeof val1 === \"object\" && val1 !== null) && (typeof val2 === \"object\" && val2 !== null)) {\n // check if both objects have the same number of properties\n var val1_num_elements = 0;\n var val2_num_elements = 0;\n for (var property in val1) {\n ++val1_num_elements;\n }\n for (var property in val2) {\n ++val2_num_elements;\n }\n if (val1_num_elements !== val2_num_elements) return false;\n // check if both objects have the same properties\n for (var property1 in val1) {\n if ((property1 in val2) === false) return false;\n }\n // check if both objects have the same value for each property\n for (var property in val1) {\n return deepEqual(val1[property], val2[property]);\n } \n }\n else {\n return val1 === val2;\n }\n}", "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(_typeof(objA)!=='object'||objA===null||_typeof(objB)!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(_typeof(objA)!=='object'||objA===null||_typeof(objB)!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "isWhereMergeable(a, b) {\n for (let key in a) {\n let valueA = a[key];\n if (key in b) {\n let valueB = b[key];\n if (typeof valueA === 'object' && typeof valueB === 'object') {\n if (!this.isWhereMergeable(valueA, valueB)) {\n // console.log(valueA, valueB, key, false);\n return false;\n }\n } else {\n // console.log(valueA, valueB, key, false, 1);\n return false;\n }\n }\n }\n\n return true;\n }", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "checkStructure() {\n let numRepr = 0;\n\n this.parents.forEach((parent, i) => {\n const rank = this.ranks[i];\n const size = this.sizes[i];\n const isRepr = parent === i;\n\n if (isRepr) {\n numRepr++;\n }\n\n const isParentInRange = 0 <= parent && parent < this.parents.length;\n const isReprRelevant = (isRepr || rank < this.ranks[parent]) &&\n (!isRepr && size === 0 || isRepr && size >= (1 << rank));\n const noAssertion = isParentInRange && isReprRelevant && 0 <= rank ;\n\n if (!noAssertion) {\n throw \"Assertion error\";\n }\n });\n\n if (!(0 <= this.numSets && this.numSets === numRepr && this.numSets <= this.parents.length)) {\n throw \"Assertion error\";\n }\n }", "function isEqualObjects(x, y, depth)\n\t{\n\t\tvar rtnValue = false;\n\n\t\twhile (!rtnValue)\n\t\t{\n\t\t\tif (x === null || x === undefined || y === null || y === undefined)\n\t\t\t{\n\t\t\t\trtnValue = (x === y); \t\t\t\t//not both null or undefined\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (x.constructor !== y.constructor)\n\t\t\t\treturn false;\t\t\t\t\t\t//not both same constructor\n\n\t\t\tif (typeof(x) == 'number' && isNaN(x) && isNaN(y))\n\t\t\t\treturn true;\t\t\t\t\t\t//required because NaN === NaN is false\n\n\t\t\t// if they are functions, they should exactly refer to same one (because of closures)\n\t\t\t// NO: same name and script except comments (if comment stripper available)\n\t\t\tif (x instanceof Function)\n\t\t\t{\n\t\t\t\t//if (!x.name && x.name != y.name && x !== y)\n\t\t\t\tif (x.name !== y.name)\n\t\t\t\t\tbreak;\n\n\t\t\t\tif ((x + '').trim() !== (y + '').trim())\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// if they are regexps, they should exactly refer to same one\n\t\t\t// (it is hard to better equality check on current ES)\n\t\t\t// NO -- only check flags and source patter properties -- NOT lastIndex\n\t\t\tif (x instanceof RegExp)\n\t\t\t{\n\t\t\t\treturn x.global == y.global && x.ignoreCase == y.ignoreCase\n\t\t\t\t\t&& x.multiline == y.multiline && x.source == y.source;\n\t\t\t\t//return x === y;\n\t\t\t}\n\n\t\t\tif (x === y || x.valueOf() === y.valueOf())\n\t\t\t\treturn true;\t\t\t\t\t\t\t//both same object ??\n\n\t\t\tif (x instanceof Array)\n\t\t\t{\n\t\t\t\tif (x.length !== y.length)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Date: date and time zone besides owner properties (e.g. EZ.date)\n\t\t\tif (x instanceof Date)\n\t\t\t{\n\t\t\t\tif (x.getTime() != y.getTime())\n\t\t\t\t\tbreak;\t\t\t\t\t\t//different dates\n\t\t\t}\n\n\t\t\t// not Object: if they are strictly equal, they both need to be object at least\n\t\t\tif (!(x instanceof Object) || !(y instanceof Object))\n\t\t\t\tbreak;\n\n\n\t\t\tif (getType(x) != getType(y))\n\t\t\t\tbreak;\n\n\t\t\t//------------------------------------------\n\t\t\t// embedded object properties equality check\n\t\t\t//------------------------------------------\n\t\t\tvar keys = Object.keys(x);\n\t\t\tvar keysOther = Object.keys(y);\n\t\t\tif (getType(x) != 'array')\n\t\t\t{\n\t\t\t\tkeys.sort();\n\t\t\t\tkeysOther.sort();\n\t\t\t}\n\t\t\tif (keys.join('.') != keysOther.join('.'))\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t//keys DO NOT must match\n\t\t\t\tif (!showDiff)\n\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t//quit if not logging diff\n\n\t\t\t\tif (getType(x) == 'array')\t\t\t\t\t//use highest # of keys\n\t\t\t\t\tkeys = x.length < y.length ? keysOther : keys;\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tkeysOther.forEach(function(key)\t\t\t//get combined list of keys\n\t\t\t\t\t{\n\t\t\t\t\t\tif (keys.indexOf(key) == -1)\n\t\t\t\t\t\t\tkeys.push(key);\n\t\t\t\t\t});\n\t\t\t\t\tkeys.sort();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tkeys.every(function(key)\t\t\t\t\t\t//for every key until false returned . . .\n\t\t\t{\n\t\t\t\t//if (EZ.test.debug('EZequals')) debugger;\n\n\t\t\t\tdotName.push(key);\n\t\t\t\tdo\t\t\t\t\t\t\t\t\t\t\t//for function or object properties . . .\n\t\t\t\t{\n\t\t\t\t\tif (!(x[key] instanceof Object))\n\t\t\t\t\t{\n\t\t\t\t\t\trtnValue = isEqualObjects(x[key], y[key], depth+1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (x[key] == y[key])\n\t\t\t\t\t\treturn true;\t\t\t\t\t\t\t//equal if same Object\n\n\t\t\t\t\te = getObjectIdx;\n\t\t\t\t\t/*\n\t\t\t\t\tif (!showDiff && EZ.test && EZ.test.running != 'EZequals')\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t//skip repeat logic UNLESS TESTING\n\n\t\t\t\t\tvar i = getObjectIdx('x', x[key]);\t\t//index of processed x Objects\n\t\t\t\t\tif (matchedObj.x[i].includes(y[key]))\n\t\t\t\t\t\treturn true;\t\t\t\t\t\t\t//previously matched y[key]\n\t\t\t\t\tif (unmatchedObj.x[i].includes(y[key]))\n\t\t\t\t\t\treturn false || showDiff;\t\t\t\t//previously did NOT match y[key]\n\n\t\t\t\t\tvar j = getObjectIdx('y', y[key]);\t\t//index of processed y Objects\n\t\t\t\t\tif (matchedObj.y[j].includes(x[key]))\n\t\t\t\t\t\treturn true;\t\t\t\t\t\t\t//previously matched x[key]\n\t\t\t\t\tif (unmatchedObj.y[j].includes(x[key]))\n\t\t\t\t\t\treturn false || showDiff;\t\t\t\t//previously did NOT match y[key]\n\t\t\t\t\t*/\n\n\t\t\t\t\trtnValue = isEqualObjects(x[key], y[key], depth+1);\n\n\t\t\t\t\t//if (!isEqual)\n\t\t\t\t\t//\tlogDiff(x[key], y[key]);\n\n\t\t\t\t\t/*\n\t\t\t\t\tif (isEqual)\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t//objects match -- remember for future\n\t\t\t\t\t\tmatchedObj.x[i].push(y[key]);\n\t\t\t\t\t\tmatchedObj.y[j].push(x[key]);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t//remember NOT matched\n\t\t\t\t\t\tunmatchedObj.x[i].push(y[key]);\n\t\t\t\t\t\tunmatchedObj.y[j].push(x[key]);\n\t\t\t\t\t\treturn || showDiff;\t\t\t\t//previously did NOT match y[key]\n\t\t\t\t\t}\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\t\twhile (false)\n\n\t\t\t\tdotName.pop();\n\t\t\t\treturn rtnValue || showDiff;\n\t\t\t});\n\t\t\tif (rtnValue)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//log if showDiff enabled\n\t\twhile (!rtnValue && showDiff)\t// )\n\t\t{\n\t\t\tif (getType(x) == getType(x)\n\t\t\t&& typeof(x) == 'object' && typeof(y) == 'object')\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t//already reported\n\n\t\t\tif (showDiff !== true)\t\t\t\t\t\t\t//heading if not true\n\t\t\t{\n\t\t\t\tconsole.log(showDiff);\n\t\t\t\tshowDiff = true;\n\t\t\t}\n\t\t\tvar key = dotName.join('.');\n\t\t\tkey = key ? '.' + key : '';\n\t\t\tkey = key.replace(/\\.(\\d+)\\b/, '[$1]');\n\t\t\tvar msg = typeof(x) != typeof(y) && x != null && y != null\n\n\t\t\t\t\t? 'typeof(x' + key + '):\\t' + typeof(x) + '\\n'\n\t\t\t\t\t+ 'typeof(y' + key + '):\\t' + typeof(y)\n\n\t\t\t\t\t: 'x' + key + ':\\t' + x + '\\n'\n\t\t\t\t\t+ 'y' + key + ':\\t' + y;\n\n\t\t\tconsole.log('\\t' + msg.replace(/:\\t/g, ': ').replace(/\\n/g, ' \\t '));\n\t\t\t//console.log('\\t' + msg);\n\n\t\t\tmsg = msg.split('\\n');\n\t\t\tEZ.equals.log.push(msg[0], msg[1], ' ');\t//{key:dotName, x:x, y:y}\n\t\t\tbreak;\n\t\t}\n\t\treturn rtnValue;\n\t}", "function isGrouped(anObject){\n try\n {\n var isGrouped = false;\n var currentObject = anObject;\n while (isGrouped == false && currentObject != null)\n {\n \tif(currentObject.name != null){\n\t\t isGrouped = (currentObject.name.indexOf(\"block_\") != -1);\n\t\t }\n\t\t else{\n\t\t \tisGrouped = false;\n\t\t }\n\t currentObject = currentObject.parent;\n }\n\n return isGrouped;\n }\n catch(err)\n {\n console.log(\"Excception: \" + err);\n }\n}", "function deepEqual(value1 = null, value2 = null) {\n if (value1 === value2) return true;\n if (value1 !== null && value2 !== null && typeof value1 === \"object\" && typeof value2 === \"object\") {\n let keysV1 = Object.keys(value1);\n let keysV2 = Object.keys(value2);\n if ( keysV1.length !== keysV2.length) return false;\n for ( let i = 0; i < keysV1.length; i++){\n if(!keysV2.includes(keysV1[i]) || !deepEqual(value1[keysV1[i]], value2[keysV1[i]])) {\n return false;\n }\n }\n return true;\n } else return false;\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (areBothNaN(a, b))\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (areBothNaN(a, b))\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function areObjectsEqual(obj1, obj2) {\n if (Object.keys(obj1).length !== Object.keys(obj2).length) {\n return false;\n }\n let objectLength = Object.keys(obj1).length;\n let i = 1;\n for (let key in obj1) {\n if (!obj2[key] || obj1[key] !== obj2[key]) {\n return false;\n } else if (objectLength === i) {\n return true;\n }\n i++;\n }\n}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if(_typeof(objA)!=='object'||objA===null||_typeof(objB)!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function deepEqual(value1, value2) {\n if (value1 === value2) {\n return true;\n }\n if (value1 == null || typeof value1 != \"object\" || value2 == null || typeof value2 != \"object\") {\n return false;\n }\n var propsIn1 = 0, propsin2 = 0;\n\n for (prop in value1) {\n propsIn1++;\n }\n for (prop in value2) {\n propsin2++;\n if (!(prop in value1) || !deepEqual(value1[prop], value2[prop])) {\n return false;\n }\n }\n return propsIn1 == propsin2;\n}", "function areObjectsEqual(a, b, isEqual, meta) {\r\n var keysA = keys(a);\r\n var index = keysA.length;\r\n if (keys(b).length !== index) {\r\n return false;\r\n }\r\n if (index) {\r\n var key = void 0;\r\n while (index-- > 0) {\r\n key = keysA[index];\r\n if (key === OWNER) {\r\n var reactElementA = isReactElement(a);\r\n var reactElementB = isReactElement(b);\r\n if ((reactElementA || reactElementB) &&\r\n reactElementA !== reactElementB) {\r\n return false;\r\n }\r\n }\r\n if (!hasOwnProperty(b, key) || !isEqual(a[key], b[key], meta)) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}", "function isTheSameObject(obj1, obj2) {\n\t\treturn JSON.stringify(obj1) == JSON.stringify(obj2);\n\t}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function deepEquals(a, b) {\n return a === b || JSON.stringify(a) === JSON.stringify(b);\n}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof4(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof4(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\r\n\tfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function equalProp(obj1,obj2) {\n if (Object.keys(obj1).length === Object.keys(obj2).length) {\n for (let prop in obj1) {\n if (!obj2.hasOwnProperty(prop) || !areEqual(obj1[prop],obj2[prop])) return false;\n }\n return true;\n } else {\n return false;\n }\n}", "isObjectEqual(a, b) {\n return a && b && a.foo === b.foo;\n }", "function deepEqual(a, b){\n if (typeof(a) != typeof(b)){\n console.log(\"types don't match!\");\n return false;\n \n }\n if ((typeof(a) == \"object\" && typeof(a) != null) && (typeof(b) == \"object\" && typeof(b) != null)){\n \n var countA = 0;\n var countB = 0;\n var stringA = \"\";\n var stringB = \"\";\n for (x in a) {\n stringA += x + \" \" + a[x] + \" \";\n countA++;\n }\n for (x in b) {\n stringB += x + \" \" + b[x] + \" \";\n countB++;\n }\n if (countA != countB){\n console.log(\"false, different value count\");\n return false;\n }\n if (stringA != stringB){\n console.log(\"false, different strings\");\n return false;\n }\n deepEqual(stringA, stringB);\n\n}\n\n if (a === b){\n console.log(\"a match! non-objects\");\n return true;\n \n }\n else {\n console.log(\"something else!\");\n return false; \n \n}\n}", "function deepEquals(ar1, ar2) {\n\t\t\tif(typeof(ar1) != typeof(ar2)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(typeof(ar1) != \"object\") {\n\t\t\t\treturn ar1 == ar2;\n\t\t\t}\n\t\t\t// TODO typeof(null) == \"object\", but Object.keys(null) blows up\n\t\t\tif(ar1 === null || ar2 === null) {\n\t\t\t\treturn ar1 == ar2;\n\t\t\t}\n\t\t\tvar k1 = Object.keys(ar1);\n\t\t\tvar k2 = Object.keys(ar2);\n\t\t\tif(k1.length != k2.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor(var key in k1) {\n\t\t\t\tif(!deepEquals(ar1[key], ar2[key])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA===\"undefined\"?\"undefined\":_typeof3(objA))!=='object'||objA===null||(typeof objB===\"undefined\"?\"undefined\":_typeof3(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;} // Test for A's keys different from B.\n\tfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function same(o1, o2) {\n var rv = {};\n // collect all keys of `o1` and `o2` both:\n for (var k in o1) {\n rv[k] = true;\n }\n for (var k in o2) {\n rv[k] = true;\n }\n // now check if all keys exist in both objects and have the same value.\n // (Due to the nature of the AMsymbols[] table, we only need to\n // check the top level of both objects, as any complex substructures\n // in any of these will be *references* to the same base item, hence\n // we can get away with comparing substructures using the simple `===`\n // operator:\n for (var k in rv) {\n //var chk = ((k in o1) && (k in o2) && (o1[k] === o2[k]));\n // ==> simplified version:\n var chk = o1[k] === o2[k];\n if (!chk) {\n return false;\n }\n }\n return true;\n }", "function areEqual(obj1,obj2) {\n return deepEqual(obj1,obj2) || obj1 === obj2;\n}", "function compareObject(obj1, obj2)\r\n{\r\n\tfor(var p in obj1)\r\n\t{\r\n\t\tif(obj1[p] !== obj2[p])\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t\r\n\tfor(var p in obj2)\r\n\t{\r\n\t\tif(obj1[p] !== obj2[p]){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn true;\r\n}", "function objects_hold_same_values(o1, o2)\n{\n\tif (typeof(o1) != typeof(o2))\n\t\treturn false;\n\t\t\n\tswitch (typeof(o1))\n\t{\n\t\tcase \"number\":\n\t\t\tif (isNaN(o1) && isNaN(o2))\n\t\t\t\treturn true;\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t\tcase \"boolean\":\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t\tcase \"string\": \n\t\t\tif (o1 != null && o2 != null && o1.length != o2.length)\n\t\t\t\treturn false;\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t\tcase \"object\": /* also, arrays */\n\t\t\tif (o1 != null && o2 != null && o1.length != o2.length)\n\t\t\t\treturn false;\n\t\t\tvar i;\n\t\t\tfor (i in o1)\n\t\t\t{\n\t\t\t\tif(!objects_hold_same_values(o1[i], o2[i]))\n\t\t\t\treturn false;\n\t\t\t}\n\t\tbreak;\n\t\tdefault:\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t}\n\n\treturn true;\n}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA===\"undefined\"?\"undefined\":_typeof2(objA))!=='object'||objA===null||(typeof objB===\"undefined\"?\"undefined\":_typeof2(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;} // Test for A's keys different from B.\n\tfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "sameNames(obj) {\n // tripple equals\n return obj.name === this.obj.friends.name;\n }", "function checkStructure(object, structure) {\n var key, child, tempList;\n \n visitor.call(null, object);\n for (key in object) {\n if (object.hasOwnProperty(key)) {\n child = object[key];\n if (typeof child === 'object' && child !== null) {\n tempList = ancestors.concat(object.type);\n traverse(child, tempList, visitor);\n // call checkStructure at every leaf\n } else {\n checkStructure(ancestors);\n }\n }\n }\n }", "function arraysAreDifferent(dominantArray: Array<any>, slaveArray: Array<any>) : boolean {\n // if array has been `push`ed to, it is different\n if (slaveArray.length !== dominantArray.length) {\n return true;\n }\n\n const responseValues = dominantArray.map((dominantIndexValue, index) => {\n const slaveIndexValue: any = slaveArray[index];\n\n if (Array.isArray(dominantIndexValue)) {\n return arraysAreDifferent(dominantIndexValue, slaveIndexValue);\n } else if (typeof dominantIndexValue === 'object') {\n return objectsAreDifferent(dominantIndexValue, slaveIndexValue);\n }\n\n return dominantIndexValue !== slaveIndexValue;\n });\n\n return responseValues.indexOf(true) !== -1;\n}\n\n/*\n * Validates object comparisons and returns the deep nested object that\n * is unique.\n *\n * For example,\n * if you compared these to objects:\n *\n * ```js\n * {\n * foo: { bar: 1 }\n * baz: { bax: 2 }\n * }\n * {\n * foo: { bar: -1 },\n * baz: { bax: 2 },\n * }\n * ```\n *\n * These two have the same `baz` value, but unique `foo` values. Thus\n * our expected result would be to include the foo object.\n *\n * ```js\n * { foo: { bar: -1 } }\n * ```\n */\nexport default function intersection(dominantObject: Object, slaveObject: Object) : Object {\n const intersectedObject: Object = {};\n\n for (const key:string in dominantObject) {\n if (!slaveObject.hasOwnProperty(key)) {\n continue;\n }\n\n const dominantKeyValue:any = dominantObject[key];\n const slaveKeyValue:any = slaveObject[key];\n\n if (Array.isArray(dominantKeyValue)) {\n if (arraysAreDifferent(dominantKeyValue, slaveKeyValue)) {\n intersectedObject[key] = dominantKeyValue;\n }\n\n continue;\n } else if (typeof dominantKeyValue === 'object') {\n if (typeof dominantKeyValue.then === 'function') {\n intersectedObject[key] = dominantKeyValue;\n } else if (objectsAreDifferent(dominantKeyValue, slaveKeyValue)) { // check to see if nested object is different\n intersectedObject[key] = dominantKeyValue;\n }\n\n continue;\n } else if (dominantKeyValue !== slaveKeyValue) {\n intersectedObject[key] = dominantKeyValue;\n }\n }\n\n return intersectedObject;\n}", "function sameProps(objA, objB) {\n var keysA = Object.keys(objA)\n var keysB = Object.keys(objB)\n\n if (keysA.length !== keysB.length)\n return false\n\n for (var i = 0; i < keysA.length; i++) {\n if (keysA[i] !== keysB[i])\n return false\n }\n\n return true\n}", "function deepEqual(a, b) {\n // Your code here\n // check for identity\n if (a === b) {\n return true;\n }\n\n // compare two objects by properties, only if they're both not null\n if (isNotNull(a) && isNotNull(b)) {\n\n // compare all the properties in a\n for (var prop in a) {\n // if b is missing one of a's props...\n if (!b.hasOwnProperty(prop)) {\n // return false\n return false;\n }\n\n // if the property values aren't equal...\n if (!deepEqual(b[prop], a[prop])) {\n return false;\n }\n }\n\n // compare all the properties in b\n for (var prop in b) {\n // if a is missing one of b's props...\n if (!a.hasOwnProperty(prop)) {\n // return false\n return false;\n }\n\n // if the property values aren't equal...\n if (!deepEqual(a[prop], b[prop])) {\n return false;\n }\n }\n\n // if we get to this point, we're pretty confident they're the same\n return true;\n\n }\n\n // all others are false\n return false;\n}", "function isHitsEqual(hit0,hit1){if(!hit0&&!hit1){return true;}if(hit0&&hit1){return hit0.component===hit1.component&&isHitPropsWithin(hit0,hit1)&&isHitPropsWithin(hit1,hit0);// ensures all props are identical\n}return false;}// Returns true if all of subHit's non-standard properties are within superHit", "function compare_level_one(key){\n \n var com_array = getLevelOne(key);\n\n for(var i = 0; i < 4; i++){\n\tif(level_one[i] != com_array[i]){\n\t \n\t return false;\n\t} \n }\n return true;\n}", "function same(obj, obj2) {\n\treturn JSON.stringify(obj) === JSON.stringify(obj2)\n}", "function deepEqual(a, b) {\r\n if (a === b) {\r\n return true;\r\n }\r\n const aKeys = Object.keys(a);\r\n const bKeys = Object.keys(b);\r\n for (const k of aKeys) {\r\n if (!bKeys.includes(k)) {\r\n return false;\r\n }\r\n const aProp = a[k];\r\n const bProp = b[k];\r\n if (isObject(aProp) && isObject(bProp)) {\r\n if (!deepEqual(aProp, bProp)) {\r\n return false;\r\n }\r\n }\r\n else if (aProp !== bProp) {\r\n return false;\r\n }\r\n }\r\n for (const k of bKeys) {\r\n if (!aKeys.includes(k)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "function compareObjects(obj1, obj2){\n\tswitch(typeof(obj1)){\n\t\tcase 'string':\n\t\t\tif(obj1 != obj2) return false;\n\t\t\tbreak;\n\t\tcase 'number':\n\t\t\tif(obj1 != obj2) return false;\n\t\t\tbreak;\n\t\tcase 'boolean':\n\t\t\tif(obj1 != obj2) return false;\n\t\t\tbreak;\n\t}\n\t\n\t//If they aren't both objects they can't match, either.\n\tif( typeof(obj1) != typeof(obj2) ){\n\t\treturn false;\n\t}\n\t\n\tfor(p in obj1){\n\t\tswitch(typeof(obj1[p])){\n\t\t\tcase 'object':\n\t\t\t\tif (!compareObjects(obj1[p], obj2[p])){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t/*we'll ignore methods in objects as harmless.\n\t\t\tcase 'function':\n\t\t\t\tif ( typeof(obj2[p])=='undefined' || obj1[p].toString() != obj2[p].toString() ){\n\t\t\t\t\treturn false;\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\t*/\n\t\t\tdefault:\n\t\t\t\tif (obj1[p] != obj2[p]){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}\n\t}\n\t\n\tfor(p in obj2){\n\t\tif(typeof obj1[p] == 'undefined'){\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\treturn true;\n}", "function arePropertiesEqual(p1, p2) {\n if (Array.isArray(p1) && Array.isArray(p2)) {\n if (p1.length != p2.length) {\n return false;\n }\n\n for (var i = 0; i < p1.length; i++) {\n var found = false;\n for (var j = 0; j < p2.length; j++) {\n if (arePropertiesEqual(p1[i], p2[j])) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n return false;\n }\n }\n\n return true;\n }\n else if (typeof p1 == 'object' && typeof p2 == 'object') {\n var areEqual = (p1 != null);\n if (areEqual) {\n radiant.each(p1, function (k, v) {\n if (!areEqual) {\n return;\n }\n areEqual = arePropertiesEqual(v, p2 && p2[k]);\n });\n }\n\n return areEqual;\n }\n\n return p1 == p2;\n}", "function assertEquals(obj1, obj2) {\n checkEquals(obj1, obj2, \"(top)\");\n\n function checkEquals(obj1, obj2, objName) {\n var t1 = typeFunctions.type(obj1);\n var t2 = typeFunctions.type(obj2);\n\n if (t1 != t2) {\n throw new Exception(\"at \" + objName + \" \" + t1 + \" .vs. \" + t2);\n }\n switch (t1) {\n case \"object\":\n for (var name in obj1) {\n if (hasValue(obj1[name]) && !hasValue(obj2[name])) {\n throw new Exception(name + \".\" + namet1 + \" .is missing\");\n }\n }\n for (var name in obj2) {\n if (hasValue(obj2[name]) && !hasValue(obj1[name])) {\n throw new Exception(name + \".\" + namet1 + \" .is missing\");\n }\n checkEquals(obj1[name], obj2[name], objName + \".\" + name);\n }\n break;\n\n case 'array':\n if (obj1.length != obj2.length) {\n throw new Exception(\"different array lengths at \" + objName);\n }\n obj1.forEach(function(row, index) {\n checkEquals(row, obj2[index], objName + \"[\" + index + \"]\");\n })\n break;\n\n default:\n if (obj1 != obj2) {\n throw new Exception(\"at \" + objName + \" \" + obj1 + \" .vs. \" + obj2);\n }\n break;\n }\n }\n}", "function differentKeys(aObject, bObject, prefix, depth, result, seen) {\n\t\tif (prefix === undefined) {\n\t\t\tprefix = \"\";\n\t\t}\n\t\tif (depth === undefined) {\n\t\t\tdepth = 0;\n\t\t}\n\t\tif (result === undefined) {\n\t\t\tresult = [];\n\t\t}\n\t\tif (seen === undefined) {\n\t\t\tseen = [];\n\t\t}\n\n\t\t/* Prevent an infinite loop if there is a cycle in the graph */\n\t\tif (arrayIndexOf(seen, aObject) !== -1 || arrayIndexOf(seen, bObject) !== -1) {\n\t\t\treturn result;\n\t\t}\n\t\tseen.push(aObject);\n\t\tseen.push(bObject);\n\n\t\tvar key;\n\t\tfor (key in aObject) {\n\t\t\tif (aObject[key] !== bObject[key]) {\n\t\t\t\tif (typeof aObject[key] === \"object\" && typeof bObject[key] === \"object\") {\n\t\t\t\t\t/* Nested objects */\n\t\t\t\t\tdifferentKeys(aObject[key], bObject[key], prefix + key + \".\", depth + 1, result, seen);\n\t\t\t\t} else {\n\t\t\t\t\tresult.push(prefix + key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Collect anything that exists in bObject but isn't in aObject */\n\t\tfor (key in bObject) {\n\t\t\tif (aObject[key] === undefined) {\n\t\t\t\tresult.push(prefix + key);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "isNested(nested, key, obj){\n var self = this;\n if(nested){\n let nestedArray = obj.values[key];\n return self.isRange(obj.range, nestedArray)\n }else{\n return self.isRange(obj.range, obj.values)\n }\n\n}", "function matchObject(object1, object2) {\n for (var property in object1){\n if (object1[property] !== object2[property]) {\n return false;\n }\n }\n for (var property in object2){\n if (object1[property] !== object2[property]) {\n return false;\n }\n}\n return true;\n}", "function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n for (var _i = 0, aKeys_1 = aKeys; _i < aKeys_1.length; _i++) {\n var k = aKeys_1[_i];\n if (!bKeys.includes(k)) {\n return false;\n }\n var aProp = a[k];\n var bProp = b[k];\n if (isObject(aProp) && isObject(bProp)) {\n if (!deepEqual(aProp, bProp)) {\n return false;\n }\n }\n else if (aProp !== bProp) {\n return false;\n }\n }\n for (var _a = 0, bKeys_1 = bKeys; _a < bKeys_1.length; _a++) {\n var k = bKeys_1[_a];\n if (!aKeys.includes(k)) {\n return false;\n }\n }\n return true;\n}", "function sameBranch(p1, p2) {\n if (p1.type == p2.type\n && (p1.parameter == p2.parameter)\n && (p1.location && p2.location)\n && (p1.location == p2.location)\n && (p1.modelName && p2.modelName)\n && (p1.modelName == p2.modelName)\n && (p1.modelSource && p2.modelSource)\n && (p1.modelSource == p2.modelSource)\n && (p1.level && p2.level)\n && (p1.level == p2.level)) {\n return true;\n }\n else {\n return false;\n }\n }", "function iterableEquality(a, b) {\n if (\n typeof a !== 'object' ||\n typeof b !== 'object' ||\n Array.isArray(a) ||\n Array.isArray(b) ||\n a === null ||\n b === null\n ) {\n return undefined\n }\n if (a && b && a.constructor !== b.constructor) {\n // check if the object are natives and then shallow equal them\n return a.sketchObject && b.sketchObject && a.sketchObject == b.sketchObject\n }\n\n if (a.size !== undefined) {\n if (a.size !== b.size) {\n return false\n } else if (isA('Set', a)) {\n var allFound = true\n for (var aValue of a) {\n if (!b.has(aValue)) {\n allFound = false\n break\n }\n }\n if (allFound) {\n return true\n }\n } else if (isA('Map', a)) {\n var allFound = true\n for (var aEntry of a) {\n if (\n !b.has(aEntry[0]) ||\n !equals(aEntry[1], b.get(aEntry[0]), [iterableEquality])\n ) {\n allFound = false\n break\n }\n }\n if (allFound) {\n return true\n }\n }\n }\n\n if (Object.keys(a).length !== Object.keys(a).length) {\n return false\n }\n\n var aKeys = Object.keys(a).sort()\n var bKeys = Object.keys(b).sort()\n\n for (var i = 0; i < aKeys.length; i += 1) {\n var aKey = aKeys[i]\n var bKey = bKeys[i]\n if (aKey !== bKey || !equals(a[aKey], b[bKey], [iterableEquality])) {\n return false\n }\n }\n\n return true\n}", "function isEquivalent(obj1, obj2) {\n\tif (obj1.name === obj2.name && obj1.picture === obj2.picture) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function equalArrays(array1, array2) {\n // if the other array is a falsy value, return\n if (!array1 || !array2)\n return false;\n\n // compare lengths - can save a lot of time\n if (array1.length != array2.length)\n return false;\n\n for (var i = 0, l=array1.length; i < l; i++) {\n // Check if we have nested arrays\n if (array1[i] instanceof Array && array2[i] instanceof Array) {\n // recurse into the nested arrays\n if (!equalArrays(array1[i],array2[i]))\n return false;\n }\n else if (array1[i] != array2[i]) {\n // Warning - two different object instances will never be equal: {x:20} != {x:20}\n return false;\n }\n }\n return true;\n}", "function equalArrays(array1, array2) {\n // if the other array is a falsy value, return\n if (!array1 || !array2)\n return false;\n\n // compare lengths - can save a lot of time\n if (array1.length != array2.length)\n return false;\n\n for (var i = 0, l=array1.length; i < l; i++) {\n // Check if we have nested arrays\n if (array1[i] instanceof Array && array2[i] instanceof Array) {\n // recurse into the nested arrays\n if (!equalArrays(array1[i],array2[i]))\n return false;\n }\n else if (array1[i] != array2[i]) {\n // Warning - two different object instances will never be equal: {x:20} != {x:20}\n return false;\n }\n }\n return true;\n}", "static equals(t1, t2) {\n let res = true;\n function recursive(node1, node2) {\n // check names\n if (node1.name != node2.name) {\n res = false;\n return;\n }\n // check childs\n if (node1.childs.length != node2.childs.length) {\n res = false;\n return;\n }\n let length = node1.childs.length;\n for (let i = 0; i < length; i++) {\n let child1 = node1.childs[i];\n let child2 = node2.childs[i];\n // check parents\n if (child1.parent != node1 ||\n child2.parent != node2) {\n res = false;\n return;\n }\n recursive(child1, child2);\n if (!res) {\n return;\n }\n }\n }\n recursive(t1.root, t2.root);\n return res;\n }", "function equalObjects(a, b) {\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== (typeof b === 'undefined' ? 'undefined' : _typeof(b))) {\n return false;\n }\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== 'object') {\n return a === b;\n }\n if (a === b) {\n return true;\n }\n if (toString.call(a) === '[object Date]') {\n if (toString.call(b) === '[object Date]') {\n return +a === +b;\n }\n return false;\n }\n if (Array.isArray(a)) {\n if (Array.isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n for (var i = 0; i < a.length; i++) {\n if (!equalObjects(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n for (var key in a) {\n if (!equalObjects(a[key], b[key])) {\n return false;\n }\n }\n return true;\n}", "function objEquals(a, b)\r\n{\r\n for(x in b)\r\n if(typeof(a[x]) == \"undefined\")\r\n return false;\r\n\r\n for(x in a)\r\n {\r\n if(typeof(b[x]) == \"undefined\")\r\n return false;\r\n\r\n if(a[x])\r\n {\r\n if(typeof(a[x]) == \"object\")\r\n {\r\n if(typeof(b[x]) != \"object\" || !objEquals(a[x], b[x]))\r\n return false;\r\n }\r\n else if(a[x] !== b[x])\r\n return false;\r\n }\r\n else if(b[x])\r\n return false;\r\n }\r\n\r\n return true;\r\n}", "function deepCompare(actual, expect) {\n return (\n actual === expect ||\n Object.is(actual, expect) ||\n (Object(actual) === actual &&\n Object(expect) === expect &&\n ((Array.isArray(actual) &&\n Array.isArray(expect) &&\n actual.length === expect.length &&\n expect.every((expect, index) => deepCompare(actual[index], expect))) ||\n (Object.keys(actual).length === Object.keys(expect).length &&\n Object.keys(expect).every((key) =>\n deepCompare(actual[key], expect[key])\n ))))\n );\n}" ]
[ "0.6709001", "0.66702783", "0.6577204", "0.6553737", "0.6525595", "0.6490196", "0.64470214", "0.6367979", "0.6355462", "0.63320917", "0.6313347", "0.63088304", "0.6297473", "0.62272745", "0.6227252", "0.6194476", "0.61818415", "0.6175378", "0.61301684", "0.610225", "0.60991174", "0.6079016", "0.6050413", "0.5990196", "0.59825814", "0.59819174", "0.59789354", "0.59686446", "0.5925116", "0.5901646", "0.58721906", "0.5871855", "0.5870056", "0.5869902", "0.5869902", "0.5868717", "0.5868717", "0.58442515", "0.58273673", "0.5816051", "0.5813847", "0.5813847", "0.5813847", "0.58010024", "0.5775836", "0.5775836", "0.577421", "0.5769718", "0.575379", "0.57395744", "0.5736966", "0.57328606", "0.57200897", "0.57200897", "0.57162267", "0.570618", "0.5704337", "0.57033294", "0.5699834", "0.56970143", "0.56970143", "0.56970143", "0.56959295", "0.56933343", "0.5683791", "0.56801534", "0.567256", "0.56684923", "0.56682336", "0.5662271", "0.5645189", "0.5641121", "0.5639142", "0.563436", "0.5633031", "0.5627324", "0.56246924", "0.56196624", "0.5602671", "0.5600968", "0.55990285", "0.55914915", "0.5583506", "0.55831397", "0.55762655", "0.55699897", "0.55687875", "0.55641776", "0.5553278", "0.5541257", "0.5537286", "0.55279654", "0.55212474", "0.5516012", "0.5515451", "0.5515451", "0.55111134", "0.5502761", "0.55000937", "0.5494462" ]
0.60279703
23
compares arrays in a nested basis
function arraysAreDifferent(dominantArray: Array<any>, slaveArray: Array<any>) : boolean { // if array has been `push`ed to, it is different if (slaveArray.length !== dominantArray.length) { return true; } const responseValues = dominantArray.map((dominantIndexValue, index) => { const slaveIndexValue: any = slaveArray[index]; if (Array.isArray(dominantIndexValue)) { return arraysAreDifferent(dominantIndexValue, slaveIndexValue); } else if (typeof dominantIndexValue === 'object') { return objectsAreDifferent(dominantIndexValue, slaveIndexValue); } return dominantIndexValue !== slaveIndexValue; }); return responseValues.indexOf(true) !== -1; } /* * Validates object comparisons and returns the deep nested object that * is unique. * * For example, * if you compared these to objects: * * ```js * { * foo: { bar: 1 } * baz: { bax: 2 } * } * { * foo: { bar: -1 }, * baz: { bax: 2 }, * } * ``` * * These two have the same `baz` value, but unique `foo` values. Thus * our expected result would be to include the foo object. * * ```js * { foo: { bar: -1 } } * ``` */ export default function intersection(dominantObject: Object, slaveObject: Object) : Object { const intersectedObject: Object = {}; for (const key:string in dominantObject) { if (!slaveObject.hasOwnProperty(key)) { continue; } const dominantKeyValue:any = dominantObject[key]; const slaveKeyValue:any = slaveObject[key]; if (Array.isArray(dominantKeyValue)) { if (arraysAreDifferent(dominantKeyValue, slaveKeyValue)) { intersectedObject[key] = dominantKeyValue; } continue; } else if (typeof dominantKeyValue === 'object') { if (typeof dominantKeyValue.then === 'function') { intersectedObject[key] = dominantKeyValue; } else if (objectsAreDifferent(dominantKeyValue, slaveKeyValue)) { // check to see if nested object is different intersectedObject[key] = dominantKeyValue; } continue; } else if (dominantKeyValue !== slaveKeyValue) { intersectedObject[key] = dominantKeyValue; } } return intersectedObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equalArrays(array1, array2) {\n // if the other array is a falsy value, return\n if (!array1 || !array2)\n return false;\n\n // compare lengths - can save a lot of time\n if (array1.length != array2.length)\n return false;\n\n for (var i = 0, l=array1.length; i < l; i++) {\n // Check if we have nested arrays\n if (array1[i] instanceof Array && array2[i] instanceof Array) {\n // recurse into the nested arrays\n if (!equalArrays(array1[i],array2[i]))\n return false;\n }\n else if (array1[i] != array2[i]) {\n // Warning - two different object instances will never be equal: {x:20} != {x:20}\n return false;\n }\n }\n return true;\n}", "function equalArrays(array1, array2) {\n // if the other array is a falsy value, return\n if (!array1 || !array2)\n return false;\n\n // compare lengths - can save a lot of time\n if (array1.length != array2.length)\n return false;\n\n for (var i = 0, l=array1.length; i < l; i++) {\n // Check if we have nested arrays\n if (array1[i] instanceof Array && array2[i] instanceof Array) {\n // recurse into the nested arrays\n if (!equalArrays(array1[i],array2[i]))\n return false;\n }\n else if (array1[i] != array2[i]) {\n // Warning - two different object instances will never be equal: {x:20} != {x:20}\n return false;\n }\n }\n return true;\n}", "function arrayEquals(array1, array2) {\n // if the other array is a falsy value, return\n if (!array2) {\n return false;\n } // compare lengths - can save a lot of time\n\n\n if (array1.length !== array2.length) {\n return false;\n }\n\n for (let i = 0, l = array1.length; i < l; i++) {\n // Check if we have nested arrays\n if (array1[i] instanceof Array && array2[i] instanceof Array) {\n // recurse into the nested arrays\n if (!array1[i].equals(array2[i])) {\n return false;\n }\n } else if (array1[i] !== array2[i]) {\n // Warning - two different object instances will never be\n // equal: {x:20} != {x:20}\n return false;\n }\n }\n\n return true;\n}", "arrayCompare(arr1, arr2) {\n const { courses } = this.props;\n\n // arr1 and arr2 are arrays of course Ids\n let subArr = [];\n for (let i = 0; i < arr2.length; i++) {\n if (arr1.every(el => !this.isCollision(courses[el], courses[arr2[i]]))) {\n subArr.push(arr1.concat(arr2[i]));\n }\n }\n return subArr;\n }", "function eqArrays(array1, array2){ \n if (array1.length !== array2.length) {\n return false;\n } \n for (let i = 0; i < array1.length; i++) { //check item at same index if the same; not nested for loop, not need both 1 and 2\n if(array1[i] !== array2[i]) { //end condition is not equal\n return false; \n } \n } \n return true; //return boolean\n }", "function comp(array1, array2) {\n if (Array.isArray(array1) && Array.isArray(array2)) {\n return array2.map(n => Math.sqrt(n)).sort().toString() == array1.sort().toString();\n } else {\n return false;\n }\n}", "function compareArrays(left, right) {\n if (left.length !== right.length) {\n return false;\n }return zip(left, right).every(function (pair) {\n return compare(pair[0], pair[1]);\n });\n}", "arrayCompare(array1, array2) {\n //check if the input are both arrays and have the same lenght\n if (!Array.isArray(array1) || !Array.isArray(array2) || array1.length !== array2.length) {\n return false;\n }\n // .concat() to not mutate arguments\n const arr1 = array1.concat().sort();\n const arr2 = array2.concat().sort();\n //check if the elements in each array are the same\n for (let i = 0; i < arr1.length; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n }", "function arrayEqual (array1, array2) {\n // if the other array is a falsy value, return\n if (!array2)\n return false;\n \n // compare lengths - can save a lot of time\n if (array1.length != array2.length)\n return false;\n \n for (var i = 0, l=array1.length; i < l; i++) {\n // Check if we have nested arrays\n if (array1[i] instanceof Array && array2[i] instanceof Array) {\n // recurse into the nested arrays\n if (!array1[i].compare(array2[i]))\n return false;\n }\n else if (array1[i] != array2[i]) {\n // Warning - two different object instances will never be equal: {x:20} != {x:20}\n return false;\n }\n }\n return true;\n}", "function arrayEquals(left,right){if(left.length!==right.length){return false;}for(var i=0;i<left.length;i++){if(!left[i].isEqual(right[i])){return false;}}return true;}", "function compareArrs(winningArr, comboArr) {\n return winningArr.every(function(element, index) {\n return element === comboArr[index]\n })\n }", "function compareArr(arr1, arr2) {\n let array1 = reloadMatrix(arr1);\n let array2 = reloadMatrix(arr2);\n let res = [];\n if(array1.length == array2.length){\n res = compareValue(array1,array2)\n res[1]==='true' ? console.log('Mismo tamaño y mismo contenido') : console.log(`Mismo tamaño y mismo contenido hasta ${res[0].length}`)\n return compareValue(array1,array2)\n }else {\n if (array1.length > array2.length){\n res = compareValue(array2,array1)\n res[1]==='true' ? console.log('Distinto tamaño y mismo contenido') : console.log(`Distinto tamaño y mismo contenido hasta ${res[0].length}`)\n return compareValue(array2,array1)\n } else {\n res = compareValue(array1,array2)\n res[1]==='true' ? console.log('Distinto tamaño y mismo contenido') : console.log(`Distinto tamaño y mismo contenido hasta ${res[0].length}`)\n return compareValue(array1,array2)\n }\n }\n}", "function compara(a, b) {\n for (let i = 0; i < a.length; i++) {\n for (let j = 0; j < a[i].length; j++) {\n if (a[i][j] !== b[i][j]) {\n return false;\n }\n }\n }\n return true;\n }", "function eqArrays(arr1, arr2) {\n for (let i = 0; i < arr1.length; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}", "function arrayEquals(arrayA, arrayB) {\n\t\"use strict\";\n\n\t// if the other array is a falsy value, return\n\tif (!arrayB || !arrayA) {\n\t\treturn false;\n\t}\n\n\t// compare lengths - can save a lot of time\n\tif (arrayA.length !== arrayB.length) {\n\t\treturn false;\n\t}\n\n\tfor (var i = 0; i < arrayA.length; i++) {\n\t\t// Check if we have nested arrays\n\t\tif (arrayA[i] instanceof Array && arrayB[i] instanceof Array) {\n\t\t\t// recurse into the nested arrays\n\t\t\tif (!arrayEquals(arrayA[i], arrayB[i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse if (arrayA[i] !== arrayB[i]) {\n\t\t\t// Warning - two different object instances will never be equal: {x:20} != {x:20}\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "function arrayEquals(arrayA, arrayB) {\n\t\"use strict\";\n\n\t// if the other array is a falsy value, return\n\tif (!arrayB || !arrayA) {\n\t\treturn false;\n\t}\n\n\t// compare lengths - can save a lot of time\n\tif (arrayA.length !== arrayB.length) {\n\t\treturn false;\n\t}\n\n\tfor (var i = 0; i < arrayA.length; i++) {\n\t\t// Check if we have nested arrays\n\t\tif (arrayA[i] instanceof Array && arrayB[i] instanceof Array) {\n\t\t\t// recurse into the nested arrays\n\t\t\tif (!arrayEquals(arrayA[i], arrayB[i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse if (arrayA[i] !== arrayB[i]) {\n\t\t\t// Warning - two different object instances will never be equal: {x:20} != {x:20}\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "function compareArrays(first, second){\n //write type error\n return first.every((e)=> second.includes(e)) && second.every((e)=> first.includes(e));\n}", "function testArraysEqual(array1, array2) {\n if(array1.length !== array2.length) {\n\t\treturn false;\n }\n for(var i=0; i<array1.length; i++) {\n if(Array.isArray(array1[i]) && Array.isArray(array2[i])) {\n if(!testArraysEqual(array1[i], array2[i])) {\n return false;\n }\n } else if(array1[i] !== array2[i]) {\n\t\t\treturn false;\n }\n }\n return true;\n}", "function arrayEquals(array) {\n // if the other array is a falsy value, return\n if (!array)\n return false;\n\n // compare lengths - can save a lot of time\n if (this.length != array.length)\n return false;\n\n for (var i = 0, l=this.length; i < l; i++) {\n // Check if we have nested arrays\n if (this[i] instanceof Array && array[i] instanceof Array) {\n // recurse into the nested arrays\n if (!this[i].equals(array[i]))\n return false;\n }\n else if (this[i] != array[i]) {\n // Warning - two different object instances will never be equal: {x:20} != {x:20}\n return false;\n }\n }\n return true;\n }", "function arrayEquals(array) {\n // if the other array is a falsy value, return\n if (!array)\n return false;\n\n // compare lengths - can save a lot of time\n if (this.length != array.length)\n return false;\n\n for (var i = 0, l=this.length; i < l; i++) {\n // Check if we have nested arrays\n if (this[i] instanceof Array && array[i] instanceof Array) {\n // recurse into the nested arrays\n if (!this[i].equals(array[i]))\n return false;\n }\n else if (this[i] != array[i]) {\n // Warning - two different object instances will never be equal: {x:20} != {x:20}\n return false;\n }\n }\n return true;\n }", "function eqArrays(array1, array2) {\n let isSame = (array1.length === array2.length) && array1.every(function(element, index) {\n return element === array2[index];\n });\n return isSame;\n //console.log(isSame);\n}", "function arraysMatching(arr1, arr2){\n if (arr1.length !== arr2.length){\n return false;\n } else {\n var lib = {};\n for (var i = 0; i < arr1.length; i++){\n lib[arr1[i]] = true;\n }\n for (var j = 0; j < arr2.length; j++){\n if (lib[arr2[j]] === undefined){\n return false;\n }\n }\n return true;\n }\n}", "function compareArrays(a1, a2) {\n if (Array.isArray(a1) == false) return false;\n if (Array.isArray(a2) == false) return false;\n if (a1.length !== a2.length) return false;\n for (var i = 0; i < a1.length; i++) { if (a1[i] !== a2[i]) return false; }\n return true;\n }", "function isSameArrays(a1,a2){\r\n\t\tvar l1=a1.length,l2=a2.length;\r\n\t\tif(l1!=l2){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tvar i2=0,step=1;\r\n\t\tif((l1>1)&&(a1[0]==a1[l1-1])){\r\n\t\t\t//poly\r\n\t\t\tl1--;\r\n\t\t\tfor(i2=0;i2<l1;i2++){\r\n\t\t\t\tif(a1[0]==a2[i2])break;\r\n\t\t\t};\r\n\t\t\tif(i2>=l1){\r\n\t\t\t\techo('different');\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t\t//i2<l1\r\n\t\t\tif(a1[1]==a2[i2+1]){\r\n\t\t\t}else if(a1[l1-1]==a2[i2+1]){\r\n\t\t\t\tstep=l1-1;\r\n\t\t\t\techo('antipoly');\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t}else if(l1 && (a1[0]!=a2[0])){\r\n\t\t\ti2=l1-1;\r\n\t\t\tstep=-1;\r\n\t\t};\r\n\t\tfor(var i=0;i<l1;i++,i2=(i2+step)%l1){\r\n\t\t\tif(a1[i]!=a2[i2]){\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t};\r\n\t\treturn true;\r\n\t}", "function areEqualArrays(array1, array2) {\n\t var temp = new Array();\n\t \n\t if((!array1[0]) || (!array2[0])) {\n\t return false;\n\t }\n\n\t if(array1.length != array2.length) {\n\t return false;\n\t }\n\t for(var i = 0; i < array1.length; i++) {\n\t key = (typeof array1[i]) + \"~\" + array1[i];\n\t if(temp[key]) {\n\t \ttemp[key]++;\n\t } else {\n\t \ttemp[key] = 1;\n\t }\n\t }\n\t \n for(var i = 0; i < array2.length; i++) {\n\t key = (typeof array2[i]) + \"~\" + array2[i];\n\t if(temp[key]) {\n\t if(temp[key] == 0) {\n\t \treturn false;\n\t } else {\n\t \ttemp[key]--;\n\t }\n\t } else {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "function compare(a, b) {\r\n\tfor (var i = 0; i < 4; i++) {\r\n\t\tfor (var j = 0; j < 4; j++) {\r\n\t\t\tif (a[i][j] != b[i][j])\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "function arrayEquals(a, b) {\n return Array.isArray(a) &&\n Array.isArray(b) &&\n a.length === b.length &&\n a.every((val, index) => {\n if (Array.isArray(val)) {\n return arrayEquals(val, b[index]);\n }\n else {\n return val === b[index];\n }\n }\n );\n}", "function comp(array1, array2){\r\n let result = [], answer; \r\n if (array1 == null || array2 == null) {\r\n return false\r\n } else {\r\n var sorted_array1 = array1.sort((a,b) => a - b);\r\n var sorted_array2 = array2.sort((a,b) => a - b);\r\n }\r\n \r\n for (let i = 0; i < sorted_array1.length; i++) {\r\n for (let k = 0; k < sorted_array2.length; k++) {\r\n if (i === k) {\r\n if (Math.floor(Math.pow(sorted_array1[i],2)) === sorted_array2[k]) {\r\n result.push(true);\r\n } else {\r\n result.push(false);\r\n }\r\n }\r\n }\r\n }\r\n answer = result.includes(false) ? false : true;\r\n return answer;\r\n}", "function equals(a, b) {\n\tconsole.log(a.constructor);\n\tif (a.constructor === Array && b.constructor === Array) {\n\t\treturn a.every(a => {\n\t\t\tconsole.log({ a });\n\t\t\treturn b.every(b => {\n\t\t\t\tconsole.log({ b });\n\t\t\t\treturn a === b;\n\t\t\t});\n\t\t});\n\t} else {\n\t\treturn [a].every(a => {\n\t\t\tconsole.log({ a });\n\t\t\treturn [b].every(b => {\n\t\t\t\tconsole.log({ b });\n\t\t\t\treturn a === b;\n\t\t\t});\n\t\t});\n\t}\n}", "function comp(array1, array2) {\n function calcRoot(num) {\n const root = Math.pow(num, 1 / 2);\n if (Number.isInteger(root) && num !== 1 && num !== 0) {\n return calcRoot(root);\n } else {\n return num;\n }\n }\n\n if (!array1 || !array2) {\n return false;\n } else {\n const arr1 = array1.sort();\n const arr2 = array2.sort();\n\n let equal = true;\n for (const num of arr1) {\n const double = num * num;\n arr2Index = arr2.indexOf(double);\n arr1Index = arr1.indexOf(double);\n if (arr2Index === arr1Index) {\n equal = true;\n } else {\n equal = false;\n }\n }\n return equal;\n }\n}", "function deep_compare(a, base) {\n for (var i = 0; i < a.length; i++)\n if (a[i] != base[i])\n return false;\n return true;\n}", "function same(myArray1, myArray2) {\n //check if array lengths are the same\n if (myArray1.length !== myArray2.length || myArray1[0] !== myArray2[0]) {\n return false;\n }\n\n if (myArray1.length === 0 && myArray2.length === 0) {\n return true;\n }\n const rootNode = myArray1[0];\n myArray1.splice(0, 1); //remove root node for comparison\n myArray2.splice(0, 1); //remove root node for comparison\n\n let rightNode1 = [];\n let leftNode1 = [];\n\n //compare values sequentially, push into separate arrays - left & right for each array\n myArray1.forEach(node => {\n node > rootNode ? rightNode1.push(node) : leftNode1.push(node);\n });\n\n let rightNode2 = [];\n let leftNode2 = [];\n //compare values against the root, push into separate arrays - left & right for each array\n myArray2.forEach(node => {\n node > rootNode ? rightNode2.push(node) : leftNode2.push(node);\n });\n\n //input the arrays recursively to run the check!\n\n return same(rightNode1, rightNode2) && same(leftNode1, leftNode2);\n}", "function arrayCompare(arrayA, arrayB) {\r\n let a = ExtendObject(true, [], arrayA);\r\n let b = ExtendObject(true, [], arrayB);\r\n a.sort(); \r\n b.sort();\r\n for (let i = 0, l = a.length; i < l; i++) {\r\n if (a[i] !== b[i]) { \r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "function arraysMatching(arr1, arr2) {\n if (arr1.length !== arr2.length) {\n return false;\n }\n\n let cache = {};\n for (let i = 0; i < arr1.length; i++) {\n if (cache[arr1[i]] === undefined) {\n cache[arr1[i]] = 1;\n } else {\n cache[arr1[i]]++;\n }\n }\n\n for (let j = 0; j < arr2.length; j++) {\n if (cache[arr2[j]] === undefined || cache[arr2[j]] === 0) {\n return false;\n }\n cache[arr2[j]]--;\n }\n return true;\n}", "function compare_level_one(key){\n \n var com_array = getLevelOne(key);\n\n for(var i = 0; i < 4; i++){\n\tif(level_one[i] != com_array[i]){\n\t \n\t return false;\n\t} \n }\n return true;\n}", "function comparaGrupos(arr1 = [], arr2 = []) {\r\n let retorno = true;\r\n for (let i = 0; i < arr1.length; i++) {\r\n if (arr1[i] != arr2[i]) {\r\n retorno = false;\r\n }\r\n }\r\n return retorno;\r\n}", "function compareArrays(a, b, memos){\n var i = a.length\n if (i !== b.length) return false\n memos.push([a, b])\n while (i--) {\n if (!compare(a[i], b[i], memos)) return false\n }\n return true\n}", "static allEqualElements(array) {\n let arrayBase = array[0]\n for (let i = 0; i < array.length; i++) {\n if (array[i] !== arrayBase) {\n return false\n }\n }\n return true;\n }", "compareArray(array1, array2) {\n return JSON.stringify(array1) === JSON.stringify(array2)\n\n }", "function ArrayMatch2D(arrayA, arrayB) {\n\n if (arrayA.length != arrayB.length) {\n return false; \n }\n for (row = 0; row < arrayA.length; row++) {\n if (arrayA[row].length != arrayB[row].length) {\n return false; \n }\n for (col = 0; col < arrayA[row].length; col++) {\n if (arrayA[row][col] != arrayB[row][col]) {\n return false; \n }\n }\n }\n //if it makes it all the way through the above, they're the same in every entry! \n return true; \n}", "function checkIfSameArrays(arrayA, arrayB) {\r\n\tconsole.log('In checkIfSameArrays(arrayA.length=%s, arrayB.length=%s)'\r\n\t\t, arrayA.length, arrayB.length);\r\n\r\n\tvar rtnBool = true, i=0, element, arrayA1 = new Array(), arrayB1 = new Array();\r\n\r\n\tarrayA1 = getArrayFromArray(arrayA);\r\n\tarrayB1 = getArrayFromArray(arrayB);\r\n//\tconsole.log(' cISA: \\n\\tarrayA1=%s \\n\\tarrayB1=%s', arrayA1, arrayB1);\r\n\tconsole.log(' cISA: \\n\\tarrayA1=%s \\n\\tarrayB1=%s', JSON.stringify(arrayA1), JSON.stringify(arrayB1));\r\n\r\n//\tif(arrayA.length() != arrayB.length()) {\r\n//\t\trtnBool = false;\r\n//\t} else {\r\n////\t\tconsole.log(' cISA: arrayA=%s arrayB=%s', arrayA, arrayB);\r\n//\t\tconsole.log(' cISA: \\n\\tarrayA=%s \\n\\tarrayB=%s', arrayA.print(), arrayB.print());\r\n//\t\t// check contents\r\n//\t\twhile(i < arrayA.length()) {\r\n//\t\t\telement = arrayA[i];\r\n//\r\n//\t\t\tif(!arrayB.includes(element)) {\r\n//\t\t\t\trtnBool = false;\r\n//\t\t\t\tbreak;\r\n//\t\t\t}\r\n//\r\n//\t\t\ti++;\r\n//\t\t}\r\n//\t}\r\n\t\r\n\tif(arrayA1.length != arrayB1.length) {\r\n\t\trtnBool = false;\r\n\t} else {\r\n\t\twhile(i < arrayA1.length) {\r\n\t\t\tif(!arrayB1.includes(arrayA1[i])) {\r\n\t\t\t\trtnBool = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}\r\n\t\r\n\tconsole.log(' cISA: rtnBool=', rtnBool);\r\n\treturn rtnBool;\r\n}", "function sameBsts(arrayOne, arrayTwo) {\n if (arrayOne.length !== arrayTwo.length) return false;\n if (arrayOne.length === 0 && arrayTwo.length === 0) return true;\n if (arrayOne[0] !== arrayTwo[0]) return false;\n let arrLesserOne = [];\n let arrLesserTwo = [];\n let arrGreaterOne = [];\n let arrGreaterTwo = [];\n for (let i = 1; i < arrayOne.length; i++) {\n if (arrayOne[i] < arrayOne[0]) arrLesserOne.push(arrayOne[i]);\n if (arrayTwo[i] < arrayTwo[0]) arrLesserTwo.push(arrayTwo[i]);\n if (arrayOne[i] >= arrayOne[0]) arrGreaterOne.push(arrayOne[i]);\n if (arrayTwo[i] >= arrayTwo[0]) arrGreaterTwo.push(arrayTwo[i]);\n }\n return sameBsts(arrLesserOne, arrLesserTwo) && sameBsts(arrGreaterOne, arrGreaterTwo);\n}", "equalArray(a, b) {\n if(a.length != b.length)\n \treturn false;\n \tfor(var j=0; j<a.length; j++) {\n \tif(JSON.stringify(a[j]) == JSON.stringify(b[j]))\n \treturn true;\n }\n return false;\n }", "function arraysEqual(a1,a2) {\n return JSON.stringify(a1)==JSON.stringify(a2);\n}", "function deepContains(tree1, tree2, cb, errCb, originalOpts) {\n const opts = { ...defaults,\n ...originalOpts\n };\n\n if (is(tree1) !== is(tree2)) {\n errCb(`the first input arg is of a type ${is(tree1).toLowerCase()} but the second is ${is(tree2).toLowerCase()}. Values are - 1st:\\n${JSON.stringify(tree1, null, 4)}\\n2nd:\\n${JSON.stringify(tree2, null, 4)}`);\n } else {\n // release AST monkey to traverse tree2, check each node's presence in tree1\n traverse(tree2, (key, val, innerObj, stop) => {\n const current = val !== undefined ? val : key;\n const {\n path\n } = innerObj; // retrieve the path of the current node from the monkey // console.log(\n // `061 ${`\\u001b[${33}m${`innerObj`}\\u001b[${39}m`} = ${JSON.stringify(\n // innerObj,\n // null,\n // 4\n // )}; typeof current = \"${typeof current}\"`\n // );\n\n if (objectPath.has(tree1, path)) {\n\n if (!opts.arrayStrictComparison && is.plainObject(current) && innerObj.parentType === \"array\" && innerObj.parent.length > 1) { // stop the monkey, we'll go further recursively\n\n stop.now = true;\n const arr1 = Array.from(innerObj.path.includes(\".\") ? objectPath.get(tree1, goUp(path)) : tree1);\n\n if (arr1.length < innerObj.parent.length) {\n // source array from tree1 has less elements than array from tree2!\n // It will not be possible to match them all!\n errCb(`the first array: ${JSON.stringify(arr1, null, 4)}\\nhas less objects than array we're matching against, ${JSON.stringify(innerObj.parent, null, 4)}`);\n } else {\n const arr2 = innerObj.parent; // we extract just indexes:\n\n const tree1RefSource = arr1.map((_v, i) => i);\n arr2.map((_v, i) => i); // [0, 1, 2] for example.\n // We'll use them to calculate combinations, as in 1st object in tree2\n // array against 2nd object in tree1 array... // Challenge: Array of objects is compared to another array of objects.\n // Order is mixed, the intended object is actually slightly off,\n // it's wrong, test runners will flag it, but we still need to pinpoint which\n // object did user intend to match against.\n // Outcome: we can't use strict comparison or even assume that anything\n // will be matching. The real world bar is the following: we need to\n // calculate which object is the most resembling which.\n //\n //\n // Plan: let's generate the table combinations of each table vs. each\n // table. Think about 3 vs. 2 compares:\n // deepContains(\n // [\n // { key1: \"a\", key2: \"b\" },\n // { key1: \"k\", key2: \"l\" }, <---- we'd ignore this\n // { key1: \"x\", key2: \"y\" }\n // ],\n // [\n // { key1: \"x\", key2: \"y\" }, <---- notice, the order\n // { key1: \"a\", key2: \"b\" } <---- is wrong\n // ]\n //\n // Once we have table of all combinations, we'll calculate the\n // likeness score of each combination, and whichever is the highest\n // we'll ping those objects to user-supplied (likely AVA's t.equal()) callback.\n //\n // We want to achieve something like this (using example above):\n // [[0, 0], [1, 1]]\n // [[0, 0], [1, 2]]\n //\n // [[0, 1], [1, 0]]\n // [[0, 1], [1, 2]]\n //\n // [[0, 2], [1, 0]]\n // [[0, 2], [1, 1]]\n // where [[0, 0], [1, 1]] means:\n // [\n // [ index 0 from tree2, index 0 from tree1 ]\n // [ index 1 from tree2, index 1 from tree1 ]\n // ]\n // We'll compose the combinations array from two parts:\n // The first digits are following \"tree2RefSource\", the tree2 indexes.\n // The second digits are from iterating tree1, picking one and\n // iterating what's left for the second variation.\n // TODO:\n\n const secondDigits = []; // const secondDigits = [];\n\n for (let i = 0, len = tree1RefSource.length; i < len; i++) {\n const currArr = [];\n const pickedVal = tree1RefSource[i];\n const disposableArr1 = dropIth(tree1RefSource, i);\n currArr.push(pickedVal); // iterate what's left\n\n disposableArr1.forEach(key1 => {\n secondDigits.push(Array.from(currArr).concat(key1));\n });\n }\n\n const finalCombined = secondDigits.map(arr => {\n return arr.map((val2, i) => [i, val2]);\n }); // now, use the \"finalCombined\" as a guidance which objects to match against which, and array-push the comparison score as third element into each. Whichever comparison gathers highest score, gets pinged to the callback.\n let maxScore = 0;\n\n for (let i = 0, len = finalCombined.length; i < len; i++) {\n let score = 0; // finalCombined[i] === something like [[0,0],[1,1]]\n // tree1 array: arr1\n // tree2 array: arr2\n finalCombined[i].forEach(mapping => {\n\n if (is.plainObject(arr2[mapping[0]]) && is.plainObject(arr1[mapping[1]])) {\n Object.keys(arr2[mapping[0]]).forEach(key2 => {\n if (Object.keys(arr1[mapping[1]]).includes(key2)) {\n score += 1;\n\n if (arr1[mapping[1]][key2] === arr2[mapping[0]][key2]) {\n score += 5;\n }\n }\n });\n }\n });\n finalCombined[i].push(score); // finally, push the score as 3rd arg. into mapping array\n\n if (score > maxScore) {\n maxScore = score;\n }\n } // FINALLY, ping callbacks with the max score objects\n\n for (let i = 0, len = finalCombined.length; i < len; i++) {\n if (finalCombined[i][2] === maxScore) {\n finalCombined[i].forEach((matchPairObj, y) => {\n // beware score is the last element.\n if (y < finalCombined[i].length - 1) {\n // console.log(\n // `${`\\u001b[${33}m${`matchPairObj`}\\u001b[${39}m`} = ${JSON.stringify(\n // matchPairObj,\n // null,\n // 4\n // )}`\n // ); // ping object pairs recursively:\n\n deepContains(arr1[matchPairObj[1]], arr2[matchPairObj[0]], cb, errCb, opts);\n }\n });\n break;\n }\n } //\n\n }\n } else { // if tree1 has that path on tree2, call the callback\n\n const retrieved = objectPath.get(tree1, path);\n\n if (!opts.skipContainers || !is.plainObject(retrieved) && !Array.isArray(retrieved)) {\n cb(retrieved, current, path);\n }\n }\n } else {\n errCb(`the first input: ${JSON.stringify(tree1, null, 4)}\\ndoes not have the path \"${path}\", we were looking, would it contain a value ${JSON.stringify(current, null, 0)}.`);\n }\n return current;\n });\n }\n} // -----------------------------------------------------------------------------", "function arraysAreEqual(arrOne,arrTwo){\r\n if (arrOne.length!==arrTwo.length) return false;\r\n for (let i =0;i<arrTwo.length;i++){\r\n if (arrOne[i]!== arrTwo[i]) return false;\r\n }\r\n return true;\r\n}", "function subarray_elements_match(a, b, index) {\n if (a.length !== b.length) return false;\n for (var i = 0; i < a.length; i++) {\n if (a[i][index] !== b[i][index]) return false;\n }\n return true;\n}", "function arraysMatch(arr1, arr2) {\n for (let i = 1; i < 4; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}", "function checkArrays(arr1, arr2) {\n if (arr1.length !== arr2.length) return false;\n for (let i = 0; i < arr1.length; i++) {\n if (!compareItems(arr1[i], arr2[i])) return false;\n }\n return true;\n}", "isEqualArray(arr1, arr2) {\n\t\tconst height = arr1.length;\n\t\tconst width = arr1[0].length;\n\t\tfor (let i = 0; i < height; i++) {\n\t\t\tfor (let j = 0; j < width; j++) {\n\t\t\t\tif (arr1[i][j] !== arr2[i][j]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function compareArray(a1, a2) {\n\t if (a1.length != a2.length) return false;\n\t for (var i = 0; i < a1.length; i++) {\n\t if (a1[i] !== a2[i]) return false;\n\t }\n\t return true;\n\t }", "function compareArray(a1, a2) {\n\t if (a1.length != a2.length) return false;\n\t for (var i = 0; i < a1.length; i++) {\n\t if (a1[i] !== a2[i]) return false;\n\t }\n\t return true;\n\t }", "function CompareArrays(arr1, arr2)\r\n{\r\n\tif(arr1.length != arr2.length)\r\n\t\treturn false;\r\n\t\r\n\tfor(i = 0; i < arr1.length; ++i)\r\n\t\tif(arr1[i] != arr2[i])\r\n\t\t\treturn false;\r\n\treturn true;\r\n}", "function validateArrayEquality(a, b) {\n\n if (a.length !== b.length)\n { return false; }\n\n const counts = new Map();\n\n for (const v of a) {\n\n //updates the map if a value doesnt exist in it already with 1's\n const count = counts.get(v) || 0;\n counts.set(v, count + 1);\n }\n for (const v of b) {\n\n //iterates through the second array and checks every value in the map (first array)\n const count = counts.get(v);\n\n if (!count) { // undefined or 0, both mean arrays are not the same\n\n return false;\n }\n\n counts.set(v, count - 1);\n }\n return true;\n}", "function equals(a, b) {\n if (a === b) {\n return true;\n } else if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n\n for (var i = 0; i < a.length; i += 1) {\n if (!equals(a[i], b[i])) {\n return false;\n }\n }\n\n return true;\n } else {\n return false;\n }\n }", "function main(input = []) {\n let matrice = input.slice();\n \n let areRowsEqual = new Set(matrice.map(row => row.reduce((a, b) => a + b))).size === 1;\n let areColsEqual = new Set(matrice.reduce((a, b) => a.map((element, index) => element + b[index]))).size === 1;\n \n //return areRowsEqual && areColsEqual;\n console.log(areRowsEqual && areColsEqual);\n }", "function compArrays(a, b) {\n var i = a.length > b.length ? a.length : b.length;\n while (i--) {\n if (a[i] !== b[i]) return false;\n }\n return true\n\n}", "function compareArrays(firstArray,secondArray){\n\tlet identical = true;\n \n // First, the length of the arrays is compared\n let firstLength = firstArray.length;\n let secondLength = secondArray.length\n \n\tif(firstLength != secondLength){\n // If the length is not equal, the arrays are not identical\n\t\tidentical = false;\n\t} else {\n // If the length is equal, every position of the array is compared\n\t\tfor (let i = 0; i < firstLength; i++) {\n\t\t\tif(firstArray[i] != secondArray[i]){\n\t\t\t\tidentical = false;\n\t\t\t}\n\t\t}\n\t}\n // Return the verdict\n\treturn identical \n}", "function compareSums (array1, array2) {\n var sum1 = 0;\n var sum2 = 0;\n\n for (let i = 0; i < array1.length; i++) {\n sum1 += array1[i];\n }\n\n for (let z = 0; z < array2.length; z++) {\n sum2 += array2[z];\n }\n\n if (sum1 > sum2) {\n return array1;\n }\n else {\n return array2;\n }\n}", "function simpleArrayEquals(arr1, arr2) {\n return Array.isArray(arr1) && Array.isArray(arr2) && arr2.sort().toString() !== arr1.sort().toString();\n }", "function arrayIntersection(arrs) {\n var LinkedArray = function (a) {\n var array = a;\n var index = 0;\n\n return {\n getCurrent: function () {\n return array[index];\n },\n incrementIndex: function (maxValue) {\n if (array[index] && (array[index] < maxValue)) {\n index++;\n console.log('incrementing index', index);\n }\n return array[index];\n },\n isLast: function () {\n return array.length <= index;\n }\n }\n };\n\n function theEnd(linkedArrays) {\n for (var i in linkedArrays) {\n if (!linkedArrays[i].isLast()) return false;\n }\n return true;\n }\n\n function allEqual(linkedArrays) {\n var value = linkedArrays[0].getCurrent();\n for (var i in linkedArrays) {\n if (linkedArrays[i].getCurrent() != value) return false;\n }\n return true;\n }\n\n // od ovde pocit jakoto\n\n arrs = _.map(arrs, function (arr) {\n return new LinkedArray(arr);\n });\n\n var results = [];\n while (!theEnd(arrs)) {\n if (allEqual(arrs)) results.push(arrs[0].getCurrent());\n var maximum = _.max(arrs, function (arr) {\n return arr.getCurrent();\n });\n maximum = maximum.getCurrent();\n\n _.each(arrs, function (arr) {\n arr.incrementIndex(maximum);\n })\n }\n return results;\n}", "static equalTrans(ta, tb) {\n//----------\nreturn ta[0] === tb[0] && ta[1] === tb[1] && ta[2] === tb[2];\n}", "function arrayEquals(left, right) {\n if (left.length !== right.length) {\n return false;\n }\n\n for (var i = 0; i < left.length; i++) {\n if (!left[i].isEqual(right[i])) {\n return false;\n }\n }\n\n return true;\n }", "function eqFuzzyStacks(s1, s2) {\n if (s1.hash !== s2.hash || s1.stack.length !== s2.stack.length) {\n return false;\n }\n\n for (var i = 0; i < s1.stack.length; ++i) {\n if (Array.isArray(s1.stack[i]) !== Array.isArray(s2.stack[i])) {\n return false;\n }\n\n if (Array.isArray(s1.stack[i])) {\n if (s1.stack[i].length !== s2.stack[i].length) {\n return false;\n }\n\n for (var j = 0; j < s1.stack[i].length; ++j) {\n if (s1.stack[j] !== s2.stack[j]) {\n return false;\n }\n }\n } else if (s1.stack[i] !== s2.stack[i]) {\n return false;\n }\n }\n\n return true;\n}", "function areIsomorphic(array1, array2) {\n let lengthsOfArr1 = array1.map(arr => arr.length);\n let lengthsOfArr2 = array2.map(arr => arr.length);\n \n if(lengthsOfArr1.length !== lengthsOfArr2.length)\n return false;\n \n // dimensions of arrays match, check the lengths of rows/cols\n for(let i = 0; i < lengthsOfArr1.length; i++) {\n if(lengthsOfArr1[i] !== lengthsOfArr2[i])\n return false;\n }\n return true;\n}", "function arrayEquals(left, right) {\r\n if (left.length !== right.length) {\r\n return false;\r\n }\r\n for (var i = 0; i < left.length; i++) {\r\n if (!left[i].isEqual(right[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "function arrayEquals(left, right) {\r\n if (left.length !== right.length) {\r\n return false;\r\n }\r\n for (var i = 0; i < left.length; i++) {\r\n if (!left[i].isEqual(right[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "function arrayEquals(left, right) {\r\n if (left.length !== right.length) {\r\n return false;\r\n }\r\n for (var i = 0; i < left.length; i++) {\r\n if (!left[i].isEqual(right[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "function compareArray(a, b) {\n var diffs = []\n Array.prototype.some.call(a, function(numA, idxA) {\n Array.prototype.some.call(b, function(numB, idxB) {\n // console.log('comparing ' + numA + ' with ' + numB);\n // console.log('compare count:', ++count);\n // break if 2 element are equal\n if (numA === numB) {\n return true\n }\n // find a diff if numB is bigger than numA\n if (numB > numA) { \n diffs.push(numA);\n return true\n }\n });\n // break if numA is bigger than last element of bArr\n // slice rest of elements into diffs\n if (numA > b[b.length -1]) {\n console.log('all diffs after this idx:', idxA);\n var rests = Array.prototype.slice.call(a, idxA);\n // console.log('rests:', rests);\n diffs = diffs.concat(rests);\n return true;\n }\n });\n return diffs;\n}", "function arrCmp(mainArr,subArr){\n\n var compare = 0;\n for(index = 0; index<mainArr.length; index++){\n\tif( mainArr[index].join(\"\") == subArr.join(\"\") ){\n\t compare = 1;\n\t}\n }\n return compare;\n}", "function areArraysEqual(a, b, isEqual, meta) {\r\n var index = a.length;\r\n if (b.length !== index) {\r\n return false;\r\n }\r\n while (index-- > 0) {\r\n if (!isEqual(a[index], b[index], meta)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "function areNestedArrayItemsStrictlyEqual(a, b) {\n // If `a` and `b` are referentially equal, return true.\n if (a === b) {\n return true;\n }\n // If either `a` or `b` are not an array or not of the same length return false. `a` and `b` are\n // known to not be equal here, we checked above.\n if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n // Otherwise let us compare all of the array items (which are potentially nested arrays!) to see\n // if they are equal.\n return a.every(function (item, i) { return areNestedArrayItemsStrictlyEqual(item, b[i]); });\n}", "function areNestedArrayItemsStrictlyEqual(a, b) {\n // If `a` and `b` are referentially equal, return true.\n if (a === b) {\n return true;\n }\n // If either `a` or `b` are not an array or not of the same length return false. `a` and `b` are\n // known to not be equal here, we checked above.\n if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n // Otherwise let us compare all of the array items (which are potentially nested arrays!) to see\n // if they are equal.\n return a.every(function (item, i) { return areNestedArrayItemsStrictlyEqual(item, b[i]); });\n}", "function areNestedArrayItemsStrictlyEqual(a, b) {\n // If `a` and `b` are referentially equal, return true.\n if (a === b) {\n return true;\n }\n // If either `a` or `b` are not an array or not of the same length return false. `a` and `b` are\n // known to not be equal here, we checked above.\n if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n // Otherwise let us compare all of the array items (which are potentially nested arrays!) to see\n // if they are equal.\n return a.every(function (item, i) { return areNestedArrayItemsStrictlyEqual(item, b[i]); });\n}", "function areNestedArrayItemsStrictlyEqual(a, b) {\n // If `a` and `b` are referentially equal, return true.\n if (a === b) {\n return true;\n }\n // If either `a` or `b` are not an array or not of the same length return false. `a` and `b` are\n // known to not be equal here, we checked above.\n if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n // Otherwise let us compare all of the array items (which are potentially nested arrays!) to see\n // if they are equal.\n return a.every(function (item, i) { return areNestedArrayItemsStrictlyEqual(item, b[i]); });\n}", "function areYouHere(arr1, arr2) {\n for (let i = 0; i < arr1.length; i++) { //--> polynomial O(n^2) quadratic\n const el1 = arr1[i]; //--> constant\n for (let j = O; j < arr2.length; j++) {\n const el2 = arr2[j]; //--> constant\n if (el1 === el2) return true;\n }\n }\n return false; //--> constant\n}", "function compareArrays (array1, array2) {\n if (array1 == undefined || array1.length == 0) {\n return false;\n }\n if (array1 == undefined || array1.length == 0) {\n return false;\n }\n if (array1.length != array2.length) {\n return false\n } else {\n array1 = array1.sort();\n array2 = array2.sort();\n for (let i = 0; i < array1.length; i++) {\n if (array1[i] != array2[i]) {\n return false\n }\n }\n }\n return true;\n}", "doTypeChecks(a, b) {\n const checkArrayOne = a.getCheck();\n const checkArrayTwo = b.getCheck();\n\n if (!checkArrayOne || !checkArrayTwo) {\n // Null arrays can only connect to other null arrays.\n return checkArrayOne == checkArrayTwo;\n }\n\n // Find any intersection in the check lists.\n for (let i = 0; i < checkArrayOne.length; i++) {\n if (checkArrayTwo.indexOf(checkArrayOne[i]) != -1) {\n return true;\n }\n }\n // No intersection.\n return false;\n }", "comparaGrupos(arr1 = [], arr2 = []) {\r\n let retorno = true;\r\n for (let i = 0; i < arr1.length; i++) {\r\n if (arr1[i] != arr2[i]) {\r\n retorno = false;\r\n }\r\n }\r\n return retorno;\r\n }", "function compareArray(a1, a2) {\r\n if (a1.length != a2.length) return false;\r\n for (var i = 0; i < a1.length; i++) {\r\n if (a1[i] !== a2[i]) return false;\r\n }\r\n return true;\r\n }", "function arrayCompare(a, b) {\n //if the lengths of the two arrays are not equal, return false\n if (a.length !== b.length) return false;\n const uniqueValues = new Set([...a, ...b]);\n //otherwise iterate through the two arrays and see if their contents match\n for (const v of uniqueValues) {\n const aCount = a.filter(e => e === v).length;\n const bCount = b.filter(e => e === v).length;\n //if the contents do not match, return false\n if (aCount !== bCount) return false;\n }\n //otherwise return true\n return true;\n }", "function compare(arr) {\n //compares the input square against all the possibles\n let count = 0;\n for (let i = 0; i < 3; i++) {\n for (let j = 0; j < 3; j++) {\n // keeps count of the difference cost\n count += Math.abs(s[i][j] - arr[i][j]);\n }\n }\n return count;\n }", "function same(arr1, arr2){\n if (arr1.length != arr2.length || arr1[0] != arr2[0]) {\n return false;\n }\n for (let i = 1; i < arr1.length; i++){\n let rightSide1 = [];\n let leftSide1 = [];\n let rightSide2 = [];\n let leftSide2 = [];\n\n let arr1FirstIndex = arr1[0];\n let arr2FirstIndex = arr2[0];\n\n let nextIndexOfArr1 = arr1[i];\n let nextIndexOfArr2 = arr2[i];\n\n if (nextIndexOfArr1 > arr1FirstIndex) {\n rightSide1.push(nextIndexOfArr1);\n } else {\n leftSide1.push(nextIndexOfArr1);\n }\n if (nextIndexOfArr2 > arr2FirstIndex){\n rightSide2.push(nextIndexOfArr2);\n } else {\n leftSide2.push(nextIndexOfArr2);\n } \n \n if (leftSide1 === leftSide2 && rightSide1 === rightSide2) {\n return true;\n }\n }\n}", "function arraysSimilar(arr1, arr2) {\n \n arr1 = arr1.sort((a, b) => a - b);\n arr2 = arr2.sort((a, b) => a - b);\n \n if (arr1.length > arr2.length) {\n return arr1.every((el, index) => el === arr2[index]);\n } else {\n return arr2.every((el, index) => el === arr1[index]);\n }\n\n}", "function areNestedArrayItemsStrictlyEqual(a, b) {\n // If `a` and `b` are referentially equal, return true.\n if (a === b) {\n return true;\n }\n // If either `a` or `b` are not an array or not of the same length return false. `a` and `b` are\n // known to not be equal here, we checked above.\n if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n // Otherwise let us compare all of the array items (which are potentially nested arrays!) to see\n // if they are equal.\n return a.every(function (item, i) {\n return areNestedArrayItemsStrictlyEqual(item, b[i]);\n });\n}", "function areNestedArrayItemsStrictlyEqual(a, b) {\n // If `a` and `b` are referentially equal, return true.\n if (a === b) {\n return true;\n }\n // If either `a` or `b` are not an array or not of the same length return false. `a` and `b` are\n // known to not be equal here, we checked above.\n if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n // Otherwise let us compare all of the array items (which are potentially nested arrays!) to see\n // if they are equal.\n return a.every(function (item, i) {\n return areNestedArrayItemsStrictlyEqual(item, b[i]);\n });\n}", "function arrayEquals(left, right) {\n if (left.length !== right.length) {\n return false;\n }\n for (var i = 0; i < left.length; i++) {\n if (!left[i].isEqual(right[i])) {\n return false;\n }\n }\n return true;\n}", "function arrayEquals(left, right) {\n if (left.length !== right.length) {\n return false;\n }\n for (var i = 0; i < left.length; i++) {\n if (!left[i].isEqual(right[i])) {\n return false;\n }\n }\n return true;\n}", "function arrayEquals(left, right) {\n if (left.length !== right.length) {\n return false;\n }\n for (var i = 0; i < left.length; i++) {\n if (!left[i].isEqual(right[i])) {\n return false;\n }\n }\n return true;\n}", "function areYouHere(arr1, arr2) {\n let ticks = 0;\n for (let i=0; i<arr1.length; i++) {\n ticks++;\n const el1 = arr1[i];\n for (let j=0; j<arr2.length; j++) {\n ticks++;\n const el2 = arr2[j];\n if (el1 === el2) {\n return {\n result: true,\n ticks: ticks\n };\n }\n }\n }\n return {\n results: false,\n ticks: ticks\n };\n}", "function arraySum2 (inputs, tests) {\r\n //iterate through the tests array\r\n for (let i = 0; i < tests.length; i++){\r\n //inner loop iterate through inputs\r\n //if inputs includes (tests[i]-inputs[j]) return true\r\n for (let j = 0; j < inputs.length-1; i++) {\r\n if (inputs.includes((tests[i]-inputs[j]))) return true\r\n };\r\n };\r\n //else return false\r\n return false\r\n}", "function compareArray(a1, a2) {\n if (a1.length != a2.length) return false;\n for (var i = 0; i < a1.length; i++) {\n if (a1[i] !== a2[i]) return false;\n }\n return true;\n }", "function compareArray(a1, a2) {\n if (a1.length != a2.length) return false;\n for (var i = 0; i < a1.length; i++) {\n if (a1[i] !== a2[i]) return false;\n }\n return true;\n }", "function compareArray(a1, a2) {\n if (a1.length != a2.length) return false;\n for (var i = 0; i < a1.length; i++) {\n if (a1[i] !== a2[i]) return false;\n }\n return true;\n }", "function compareArray(a1, a2) {\n if (a1.length != a2.length) return false;\n for (var i = 0; i < a1.length; i++) {\n if (a1[i] !== a2[i]) return false;\n }\n return true;\n }", "function equal_array(A, B) {\n if (!is_array(A) || !is_array(B)) {\n return false;\n } else if (array_length(A) !== array_length(B)) {\n return false;\n } else {\n let is_equal = true;\n const len = array_length(A);\n for (let i = 0; is_equal && i < len; i = i + 1) {\n if (is_array(A[i]) || is_array(B[i])) {\n is_equal = equal_array(A[i], B[i]);\n } else {\n is_equal = equal(A[i], B[i]);\n }\n }\n return is_equal;\n }\n}", "equalsArray(a, b) {\n if (a === b) return true;\n if (a == null || b == null) return false;\n if (a.length !== b.length) return false;\n\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) { return false; }\n }\n return true;\n }", "function diffArray(context, expected, actual, strict) {\n diffType(context, expected, actual);\n let sameLength = expected.length === actual.length;\n if (strict && !sameLength) {\n context.throw(`diff size , ${expected.length} ≠ ${actual.length}`);\n }\n expected.forEach(function(elem, index) {\n diff(context.enter(`[${index}]`), elem, actual[index]);\n });\n}", "function isAllEqual(array1, array2) {\n if (array1.size != array2.size)\n return false;\n for (var i = 0; i < array1.size; i++) {\n if (array1[i] != array2[i])\n return false;\n }\n return true;\n}", "function comp(array1, array2) {\n let arr = [];\n for (let i = 0; i < array1.length; i++) {\n arr.push(array1[i] * array1[i]);\n }\n if (arr === null || array2 === null || arr.length !== array2.length) {\n return false;\n }\n\n if (arr.sort().join('') === array2.sort().join('')) {\n return true;\n } else {\n return false;\n }\n}" ]
[ "0.6682006", "0.6682006", "0.6515023", "0.6448402", "0.6402522", "0.6397374", "0.63972235", "0.6390517", "0.63271725", "0.62853885", "0.6281192", "0.6278067", "0.6275068", "0.6248614", "0.6209656", "0.6209656", "0.6206717", "0.6199717", "0.6187762", "0.6187762", "0.61607146", "0.6158892", "0.6142605", "0.61266816", "0.6121556", "0.61146855", "0.6109921", "0.6096307", "0.60913444", "0.60751003", "0.60709286", "0.60307574", "0.60230464", "0.6022862", "0.5986103", "0.5982534", "0.5959363", "0.59522814", "0.593532", "0.59331745", "0.59158534", "0.5915266", "0.59084374", "0.5907583", "0.58961284", "0.5882288", "0.58760583", "0.5873318", "0.5857025", "0.5842295", "0.5827856", "0.5827856", "0.582217", "0.5819497", "0.5816768", "0.581377", "0.5810315", "0.5795243", "0.57744193", "0.5774387", "0.5773733", "0.5772605", "0.5771747", "0.5771424", "0.5769932", "0.5768194", "0.5768194", "0.5768194", "0.5765584", "0.57581544", "0.57546234", "0.5752017", "0.5752017", "0.5752017", "0.5752017", "0.5751856", "0.57510185", "0.57499766", "0.5739422", "0.573694", "0.57335806", "0.573142", "0.57287407", "0.57269967", "0.57221156", "0.57221156", "0.5721583", "0.5721583", "0.5721583", "0.5720756", "0.57191706", "0.57045144", "0.57045144", "0.57045144", "0.57045144", "0.5699157", "0.5695323", "0.56834257", "0.5679396", "0.5676068" ]
0.6831281
0
display default pause button through change in CSS
function displayPauseButton() { toggle_btn.style.borderStyle = "double"; toggle_btn.style.borderWidth = "0vmin 0vmin 0vmin 7vmin"; toggle_btn.style.borderColor = "transparent transparent transparent rgba(183, 0, 0, 1)"; toggle_btn.style.backgroundColor = "transparent"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doPause() {\n PLAY_STATUS = PlayStatus.PAUSED\n pausePlay.innerHTML = 'Resume'\n d3.select(\"#pauseplay\").attr(\"class\", \"btn menu-button\")\n CODE_MIRROR_BOX.setOption(\"theme\", DISABLED_CODE_THEME)\n}", "function startPause() {\r\n let text = this.getAttribute('data-current');\r\n if (text === \"start\") {\r\n variables.currentTimer = setInterval(timer, 1000);\r\n this.setAttribute('data-current', 'pause');\r\n this.innerHTML = 'PAUSE';\r\n this.style.backgroundColor = '#f44336';\r\n variables.resetBtn.disabled = true;\r\n } else if (text === \"pause\") {\r\n stopTimer();\r\n this.setAttribute('data-current', 'start');\r\n this.innerHTML = 'START';\r\n this.style.backgroundColor = '#4CAF50';\r\n variables.resetBtn.disabled = false;\r\n }\r\n for (var i = 0; i < variables.changer.length; i++) {\r\n variables.changer[i].disabled = true;\r\n }\r\n }", "function pause() {\n if (playId) {\n clearInterval(playId)\n playId = undefined\n }\n\n /* Re-enable all settings, and hide the pause button. */\n d3.selectAll('button').attr('disabled', null)\n d3.select('#pause-button').style('display', 'none')\n d3.select('#play-button').style('display', 'inline-block')\n}", "function pauseAnimation() {\n clearInterval(timerID);\n playButton.text(\"▶️ Play\");\n playButton.style(\"background-color\", \"#77DD77\");\n }", "function runPauseButton() {\n toggleRunning();\n if (RUNNING) \n getElement('button-run').innerHTML = 'pause';\n else \n getElement('button-run').innerHTML = 'run';\n}", "pauseButton(){\r\n pause.addEventListener(\"click\" , () =>{\r\n\t\tevent.preventDefault();\r\n clearInterval(this.slideInterval);\r\n document.getElementById(\"pause\").style.display= \"none\";\r\n document.getElementById(\"play\").style.display= \"inline-block\";\r\n }); \r\n\t}", "toggle_paused() {\n this.paused = !this.paused\n\n // update the button\n let display_text = this.paused ? \"Play\" : \"Pause\";\n $(\"#pause\").html(display_text);\n\n // Update this value so when we unpause we don't add a huge\n // chunk of time.\n this.last_update = AnimationManager.epoch_seconds();\n }", "function resetPause() {\r\n paused = false;\r\n pauseBtn.innerText = \"\";\r\n}", "function pauseOn()\n\t\t\t{\n\t\t\t\tpause = true;\n\t\t\t\tq.find(\".x-controls .pause\").hide();\n\t\t\t\tq.find(\".x-controls .play\").show();\n\t\t\t}", "function pause(button) {\n button.title = 'play';\n button.className = 'fa fa-play';\n clearTimeout(chart.sequenceTimer);\n chart.sequenceTimer = undefined;\n }", "function pauseButton() {\n if (isPlaying == true){\n beep.pause();\n $(\".poop\").css(\"animation-play-state\", \"paused\");\n $( \".h1\" ).removeClass( \"poopActive\" );\n isPlaying = false;\n $(\"#pButtonID\").html(\"⏹\");\n\n }\n else if (isPlaying == false){\n beep.play();\n $(\".poop\").css(\"animation-play-state\", \"running\");\n $(\".h1\").addClass(\"poopActive\");\n isPlaying = true;\n $(\"#pButtonID\").html(\"▶\");\n }\n}", "function Play_Pause() {\n if (Paused) {\n Paused = false\n Play_Pause_Button.style.setProperty('-webkit-mask-image', 'url(../assets/ui/pause_button.svg)')\n } else {\n Paused = true\n Play_Pause_Button.style.setProperty('-webkit-mask-image', 'url(../assets/ui/play_button.svg)')\n }\n}", "function playpause(){\n\t\tif($('#pause').hasClass('activeButton'))\n\t\t{\n\t\t\t$('#slider,#play,#pause').click(function(){\n\t\t\t\t$('#pause').removeClass('activeButton');\n\t\t\t\t$('#play').addClass('activeButton');\n\t\t\t\t$('#pause').hide();\n\t\t\t\t$('#play').show();\n\t\t\t\tautoswitch=false;\n\t\t\t});\n\t\t}\t\n\t\t//When play is clicked, activate pause button\n\telse if($('#play').hasClass('activeButton'))\n\t\t{\n\t\t\t$('#slider,#play,#pause').click(function(){\n\t\t\t\t$('#play').removeClass('activeButton');\n\t\t\t\t$('#pause').addClass('activeButton');\n\t\t\t\t$('#play').hide();\n\t\t\t\t$('#pause').show();\n\t\t\t\tautoswitch=true;\n\t\t\t});\n\t\t}\n}", "function timerState(){\n pause = !pause\n pauseElement.value = pause ? \"Unpause\" : \"Pause\"\n}", "function pauseTimer() {\r\n clearInterval(timeInterval);\r\n playBtn.style.display='block';\r\n pauseBtn.style.display='none';\r\n}", "function SetPauseButton(object) {\n $j(object).removeClass('wavesurfer-active-button');\n\n $j(object).addClass('wavesurfer-paused-button');\n\n $j(object).children('span').text(wavesurfer_localize.resume);\n\n $j(object).parent().children('button.wavesurfer-play').removeClass('wavesurfer-active-button');\n $j(object).parent().children('button.wavesurfer-stop').removeClass('wavesurfer-active-button');\n}", "pause() {\n const self = this;\n const { element, options } = self;\n if (!self.isPaused && options.interval) {\n addClass(element, pausedClass);\n Timer.set(element, () => {}, 1, pausedClass);\n }\n }", "toggleToPause (){\n const el = this.controls.querySelector('[data-timer-action=toggle]');\n\n el.innerText = el.getAttribute('data-timer-pause');\n }", "pause(){\n if(this._isRunning && !this._isPaused){\n this._isPaused = true;\n this._togglePauseBtn.classList.add(\"paused\");\n this.onPause();\n }\n }", "function onClickPause() {\n if(speaking && !paused){ /* pause text */\n pauseText.className = 'paused';\n playText.className = '';\n pause();\n }\n }", "renderPlaybackControl() {\n const { intl, isPaused } = this.props;\n const text = intl.formatMessage(isPaused ? messages.play : messages.pause);\n return (\n <button\n aria-label={text}\n className={classNames(styles.playbackControl)}\n onClick={this.togglePause}\n tabIndex=\"0\"\n type=\"button\"\n value={text}\n >\n <img alt=\"\" role=\"presentation\" src={isPaused ? playImage : pauseImage} />\n </button>\n );\n }", "paused() {\n\n }", "paused() {\n\n }", "paused() {\n\n }", "paused() {\n\n }", "paused() {\n\n }", "pause() { this.setPaused(true); }", "function togglePause() {\r\n //Toggle play state\r\n //Pause\r\n if (paused === true) {\r\n //Update playing boolean\r\n paused = false;\r\n //Change play button text\r\n pauseBtn.innerText = \"Pause\";\r\n }\r\n //Play\r\n else {\r\n //Update paused boolean\r\n paused = true;\r\n //Change play button text\r\n pauseBtn.innerText = \"Resume\";\r\n }\r\n}", "togglePause() {\n this.model.togglePause();\n }", "function togglePlay() {\n var playPauseBtn = document.getElementById('play-pause-btn');\n running = !running;\n\n if (running) {\n playPauseBtn.value = 'Pause';\n } else {\n playPauseBtn.value = 'Play';\n }\n}", "function changeButtonLabel(){\n\t\t\tif(that.isPlaying){\t\t\t\t\n\t\t\t\tbutton.attr(\"class\",pause);\t\n\t\t\t}\t\t\t\n\t\t\telse{\n\t\t\t\tbutton.attr(\"class\", play);\t\t\t\n\t\t\t}\n\t\t}", "function ChangePlayButtonToPauseButton() {\n\t\tplayButton.classList.remove(\"play-button-on\");\n \tplayButton.classList.add(\"play-button-off\");\n \tpauseButton.classList.remove(\"pause-button-off\");\n \tpauseButton.classList.add(\"pause-button-on\");\n \n \tdoPlay();\n \tfunction doPlay() {\n \tplayerAudio.play();\n \t}\n \tgoWithProgressOfSong();\n\t}", "pauseButtonStart() {\n if (!this.state.started) this.start();\n else this.unpause();\n }", "function togglePause() {\n if (loading) {\n return;\n }\n\n if (parseInt(controls.style.bottom,10) === 0) {\n video.play(1);\n // Delay hidding the controls a bit to make it more fluent\n setTimeout(function() {\n hideControls();\n }, 1000);\n }\n else {\n video.play(0);\n showControls('PAUSED');\n }\n }", "function updateButton() {\n const icon = this.paused ? \">\" : \"||\";\n selectors.toggle.textContent = icon;\n}", "make_control_panel() {\n this.key_triggered_button(\"Pause Time\", [\"n\"], () => {\n this.paused = !this.paused;\n });\n }", "function pauseTimer() {\n if(x) {\n isPaused = !isPaused;\n if(isPaused) {\n document.getElementById(\"pauseBtn\").innerHTML = \"Pause\";\n }\n else {\n document.getElementById(\"pauseBtn\").innerHTML = \"Resume\";\n }\n }\n}", "function action_toggle_play() {\n if (video.paused) {\n video.play();\n change_icon('play'); \n } else {\n video.pause();\n change_icon('pause'); \n }\n delay = delay_value;\n}", "function togglePause() {\n\n if (isPaused()) {\n resume();\n }\n else {\n pause();\n }\n\n }", "function pause(delta) {\n}", "function togglePause() {\n globalPause = ! globalPause;\n \n if ( globalPause ) {\n $(\"input[id=pause]\").val(\"Go\");\n \n } else {\n $(\"input[id=pause]\").val(\"Pause\");\n }\n}", "function pauseToPlayBtn(el) {\n el.classList.remove('fa-pause');\n el.classList.add('fa-play');\n }", "function pauseButton (val){\n if (val === \"false\" ){\n paused=true;\n $(\".pause\").attr(\"value\",\"true\") \n }else if(val === \"true\"){\n paused=false;\n $(\".pause\").attr(\"value\",\"false\")\n }\n}", "function updateButton() {\n // My solution\n // if (!video.paused) {\n // toggle.textContent = \"││\";\n // } else {\n // toggle.textContent = \"►\";\n // }\n\n // Wes's solution\n const icon = this.paused ? \"►\" : \"││\"; // `this` used instead of `video`\n toggle.textContent = icon;\n}", "function ChangePauseButtonToPlayButton() {\n\t\tplayButton.classList.remove(\"play-button-off\");\n \tplayButton.classList.add(\"play-button-on\");\n \tpauseButton.classList.remove(\"pause-button-on\");\n \tpauseButton.classList.add(\"pause-button-off\");\n \n \tdoPause();\n \tfunction doPause(){\n \tplayerAudio.pause();\n \t}\n \tgoWithProgressOfSong();\n\t}", "make_control_panel()\n {\n this.key_triggered_button(\"Pause Time\", [\"n\"], () => { this.paused = !this.paused; });\n }", "function togglePause() {\n var e = document.getElementById('pause');\n\n if (gba.paused) {\n gba.runStable();\n e.textContent = \"PAUSE\";\n } else {\n gba.pause();\n e.textContent = \"UNPAUSE\";\n }\n }", "function togglePausePlay() {\n\n // If we are in the middle of demonstrating the step button (see tutorial.js)\n // then disable the pause/play button\n if (TUTORIAL_STEP_BUTTON_ACTIVE) {\n return\n }\n\n if (PLAY_STATUS == PlayStatus.INITAL_STATE_PAUSED) {\n doRun()\n } else if (PLAY_STATUS == PlayStatus.PAUSED) {\n doResume()\n } else {\n doPause()\n }\n}", "function pauseOff()\n\t\t\t{\n\t\t\t\tpause = false;\n\t\t\t\tstartRotate();\n\t\t\t\tq.find(\".x-controls .play\").hide();\n\t\t\t\tq.find(\".x-controls .pause\").show();\n\t\t\t}", "function _event_for_pause_btn(){\n try{\n if(self.recording.recording){\n if(self.recording.paused){\n self.pause_btn.title = 'Pause recording';\n self.recording.resume();\n _timer = setInterval(_recording_timer,1000);\n }else{\n self.pause_btn.title = \"Continue Recording\";\n self.recording.pause();\n clearInterval(_timer);\n }\n }\n }catch(err){\n self.process_simple_error_message(err,window_source+' - _event_for_pause_btn');\n return;\n } \n }", "function pause() {\n if (!paused) {\n paused = true;\n } else {\n paused = false;\n }\n}", "function updateButton() {\n // we can use this because it's bound to the video itself\n const icon = this.paused ? '►' : '❚ ❚';\n toggle.textContent = icon;\n}", "pause() { this._pause$.next(true); }", "pause() {\n paused = true;\n }", "function pauseSlideshow () {\n isRunning = false;\n control.className = \"fa fa-play\";\n clearInterval(play);\n play = 0;\n }", "function pauseControl(){\r\n if (!pause && startGame) { \r\n pause = 1; Pause();\r\n if (audioon) music[3].play();\r\n }else if(pause) {\r\n pause = 0;\r\n startGame = 1;\r\n txtPause.visible = false;\r\n document.getElementById(\"ButtonPause\").style.background = \"url('project/img/pause.png') no-repeat\";\r\n document.getElementById(\"ButtonPause\").style.backgroundSize = \"cover\";\r\n if (audioon) music[3].play();\r\n }\r\n}", "function updateButton(){\n\tconst icon = this.paused ? \"►\" : \"❚ ❚\";\n\ttoggle.textContent = icon;\n}", "function pause(amount) {\n seconds = amount;\n disable_stop_button();\n compute_display();\n }", "function updateButton() {\n const icon = this.paused ? '►' : '❚ ❚';\n toggle.textContent = icon;\n}", "function playToPauseBtn(el) {\n el.classList.remove('fa-play');\n el.classList.add('fa-pause');\n }", "@autobind\n pauseVisuals() {\n this.pause = true;\n }", "set Pause(value) {}", "togglePause () {\n this.paused = !this.paused\n }", "function pause() {\n\n var wasPaused = dom.wrapper.classList.contains('paused');\n\n cancelAutoSlide();\n dom.wrapper.classList.add('paused');\n\n if (wasPaused === false) {\n dispatchEvent('paused');\n }\n\n }", "function updateButton() {\n const icon = this.paused ? '►' : '❚ ❚';\n toggle.textContent = icon;\n}", "function startBtnClickHandler() {\n\n if (paused) {\n this.innerHTML = 'Pause'\n start()\n } else {\n this.innerHTML = 'Continue'\n pause()\n }\n\n}", "function switchBtn(btn){\r\n isTimerOn = !isTimerOn;\r\n btn.classList.toggle(\"in-progress\");\r\n if(btn.innerHTML === \"Pause\"){\r\n btn.innerHTML = \"Restart\";\r\n return 1;\r\n }\r\n if(btn.innerHTML === \"Start\" || \"Restart\"){\r\n btn.innerHTML = \"Pause\";\r\n return 1;\r\n }\r\n\r\n}", "function togglePause() {\n\n ball.body.enable = ball.body.enable ? false: true;\n ball2.body.enable = ball2.body.enable ? false: true;\n\n pauseText.text === \"Pause\" ? pauseText.setText(\" Cont.\") : pauseText.setText(\"Pause\") ;\n}", "function pause () {\n if (globalVariables.whichGame !== \"opening scene\" && globalVariables.whichGame !== \"victory scene\") {\n globalVariables.paused = true;\n $(\"#pause_button\").html(\"&#9658;\");\n }\n }", "function playOrPause(value){\n \tif(value == true){\n \t\t// show play button\n \t\tcp.show(playID);\n \t\t// hide pause button\n \t\tcp.hide(pauseID);\t\t\t\n \t}\n \telse{\n \t\t// hide play\n \t\tcp.hide(playID);\n \t\t// show pause\n \t\tcp.show(pauseID);\t\n \t}\n }", "pause() {\n this.disable = true;\n }", "function PauseEventListener(){\r\n\t//my click handler\r\n\texportRoot.runTime_mc.pbcPause_mc.visible = false;\r\n\texportRoot.runTime_mc.pbcPlay_mc.visible = true;\r\n}", "function play_btn_pause() {\n playTrackBtn.setAttribute('src', 'images/pause.png');\n}", "function clickPlayPauseList() {\n // Update status of other btn's (If pause icons replace by play icons)\n var btnPauseStatus = document.querySelectorAll(\".mdi-pause-circle-outline\");\n btnPauseStatus.forEach(element => {\n element.classList.remove(\"mdi-pause-circle-outline\");\n element.classList.add(\"mdi-play-circle-outline\");\n })\n\n last_url = this.getAttribute(\"url\");\n // Si player en pause alors lire\n if (player.paused) {\n if (last_url !== url) {\n url = last_url;\n change(last_url);\n }\n player.play();\n lastbtn = this;\n btnPlayPause.setAttribute(\"value\", \"Pause\");\n playPause_Icons(this, false);\n }\n else // Si player en lecture alors pause\n {\n // Compare l'url du bouton et celui en cours dans le lecteur (Si pas les mêmes changer l'url du lecteur par la nouvelle reçu puis relancer automatiquement la lecture)\n if (last_url !== url) {\n url = last_url;\n change(last_url);\n player.play();\n lastbtn = this;\n btnPlayPause.setAttribute(\"value\", \"Pause\");\n playPause_Icons(this, false);\n }\n else {\n player.pause();\n btnPlayPause.setAttribute(\"value\", \"Play\");\n playPause_Icons(this, true);\n }\n }\n}", "function updateButton(){\n const icon = this.paused ? '►' : '❚ ❚';\n toggleButton.textContent = icon;\n}", "function pause(isso){\n if(isso.id == `play`){\n audio.play()\n isso.src = '/img/pause.png'\n isso.id = 'pause'\n\n } else if(isso.id == `pause`) {\n audio.pause()\n isso.src = '/img/play-button-arrowhead.png'\n isso.id = 'play'\n \n }\n}", "function onPauseClick(e) \n\t{\n\t\tvar btn = e.target,uploader = btn.parent('li').data('uploader');\n\t\tif (btn.hasClass('paused'))\n\t\t{\n\t\t\tbtn.removeClass('paused').text('Pause');\n\t\t\tresume(uploader);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbtn.addClass('paused').text('Resume');\n\t\t\tpause(uploader);\n\t\t}\n\t}", "function toggle() {\n enable = !enable;\n if (1 == enable) {\n document.getElementById(\"PauseBtn\").innerHTML = \"Pause\";\n console.log(\"Display Resumed\");\n } else {\n document.getElementById(\"PauseBtn\").innerHTML = \"Play\";\n console.log(\"Display Paused\");\n }\n}", "function pauseGame(){\n var pauseButton = document.getElementById(\"pauseButton\");\n //Toggle button text and add/remove processTurn from core game timer as necessary\n switch(pauseButton.value){\n case \"Pause\":\n pauseButton.value = \"Resume\"\n game.time.events.removeAll();\n break;\n case \"Resume\":\n pauseButton.value = \"Pause\"\n processTurnTimerEvent = game.time.events.loop(TIME_TO_NEXT_UPDATE, processTurn, this);\n break;\n default:\n break;\n } \n}", "pause() {\n this.paused = true;\n }", "pause() {\n this._isPaused = true;\n }", "function pause() {\n if (running) {\n togglePlay();\n }\n}", "function pauseOrPlayAllSelected() {\n if (playingList.length === 0) {\n pauseAll.style.display = 'none';\n pauseAllDisabled.style.display = 'block';\n } else {\n pauseAll.style.display = 'block';\n pauseAllDisabled.style.display = 'none';\n }\n}", "function togglePause() {\n if(pause) {\n document.getElementById(\"toggle-pause-content\").innerHTML = \"Pause\";\n drawBoard(board);\n\n drawPieceBoard(pieceBoard);\n drawHoldPieceBoard(holdBoard);\n drawPiece();\n drawNextPiece();\n drawHoldPiece();\n\n drawPiece();\n }\n else{\n document.getElementById(\"toggle-pause-content\").innerHTML = \"Resume\";\n drawBoard(pauseBoard);\n drawPieceBoard(pieceBoard);\n drawHoldPieceBoard(holdBoard);\n }\n pause=!pause;\n}", "function pauseTrack() {\n curr_track.pause();\n isPlaying = false;\n\n // Replace icon with the play icon \n playpause_btn.innerHTML = '<i class=\"fa fa-play-circle fa-5x\"></i>';\n}", "function playPause() {\n target = this.classList[1] - 1;\n\n if(shownMedia[target].paused) {\n shownMedia[target].play();\n playPauseBtn[target].textContent = 'Pause';\n } else {\n shownMedia[target].pause();\n playPauseBtn[target].textContent = 'Play';\n }\n }", "function updateIcon() {\n\tconst ctrl = document.querySelector('.player__button[title=\"Toggle Play\"]');\n\tif(video_application.paused) {\n\t\tctrl.textContent = '>';\n\t}\n\telse {\n\t\tctrl.textContent = '||';\n\t}\n}", "function playPause() {\r\n if ($play.text() === \"play\") {\r\n \r\n //setting Options for play/pause button to change appearance\r\n var Options;\r\n Options = {label:\"pause\",icons:{primary: \"ui-icon-pause\"}};\r\n $play.button(\"option\",Options);\r\n \r\n //getting data of current position of slider and map parameters\r\n var s = $date.next(), val = (+(s.slider(\"values\"))), min = 0, max = timePeriods;\r\n \r\n //starting the slide\r\n if (val<max) {\r\n startSlide = setInterval(\"slideThrough()\", slideSpeed);\r\n //stopping the slide because it reached the end\r\n } else {\r\n s.slider(\"values\", 0, min);\r\n $period.html(periodPrefix +'<h2 class =\"big\">'+ (min+startDate)+'</h2>');\r\n startSlide = setInterval(\"slideThrough()\", slideSpeed);\r\n }\r\n \r\n } else {\r\n \r\n //stopping the slide if user hits play button again\r\n clearInterval( startSlide );\r\n \r\n //setting Options for play/pause button to change appearance\r\n var Options;\r\n Options = {label:\"play\", icons:{primary: \"ui-icon-play\"}};\r\n $play.button(\"option\", Options);\r\n \r\n //getting data of current position of slider and map parameters\r\n var s = $date.next(), val = (+(s.slider(\"values\"))), min = 0, max = timePeriods;\r\n \r\n //setting the value at the current place\r\n s.slider(\"values\", 0, val);\r\n $period.html(periodPrefix + '<h2 class =\"big\">'+(val+startDate)+'</h2>');\r\n }\r\n }", "function startStop() {\n running = !running;\n if (running) {\n console.log(\"START\");\n startButton.value = \" Pause \";\n // reset();\n } else {\n startButton.value = \"Resume\";\n }\n}", "function pp(){\n if(config.site ==='twitch'){\n $(\".qa-pause-play-button\").click();\n } else if(config.site ==='netflix'){\n return;\n }\n else {\n if(myPlayer.paused){\n myPlayer.play();\n } else {\n myPlayer.pause();\n }\n }\n log(\"play/pause triggered\");\n}", "function pauseTimer () {\n timerPauseTimestamp = Date.now();\n window.clearInterval(timerIntervalId);\n timerIntervalId = null;\n window.clearInterval(pageTitleIntervallId);\n pageTitleIntervallId = null;\n startPauseButton.innerHTML = 'Start';\n if (getActiveMode() == 'countdown') {\n startPauseButton.setAttribute('onclick', 'startCountdown();');\n } else if (getActiveMode() == 'stopwatch') {\n startPauseButton.setAttribute('onclick', 'startStopwatch();');\n };\n}", "function playPause() {\n setIsTimerRunning((prevState) => !prevState);\n }", "function pause() {\n document.getElementById(\"aud-source\").pause();\n document.getElementById(\"playBtn\").disabled = false;\n}", "function play() {\n player.playVideo();\n launch_progress_timer();\n play_pause_button.setAttribute('title', 'Pause');\n play_pause_snap_button.toState(1);\n\n var is_hover_bottom_bar = el.querySelector('.mp-bottom-bar:hover');\n if (!is_hover_bottom_bar) {\n setTimeout(hideControls, 2000);\n }\n }", "function pauseSlide() {\n\t\tif (!$('.pause-cycle-button').hasClass('paused')) {\n\t\t\tconsole.log('Pause Slide');\n\t\t\t$('.carousel').carousel('pause');\n\t\t\t$('.pause-cycle-button').toggleClass('paused');\n\t\t\t$('.pause-cycle-button i').removeClass('fa-pause').addClass('fa-play');\n\t\t\t$(this).blur();\n\t\t}\n\t}", "function pausePlaying()\n{\n\tif(document.querySelector('#remoteScreen span#stopspan').className!='remoteshow')\n\t{\n\t\tdocument.querySelector(\"audio.current\").pause();\n\t\n\tdocument.querySelector('#textIndicator').innerHTML='Pause';\n\tallBars=document.querySelectorAll('#indicator div');\n\t\n\tfor(var i=0; i<allBars.length ; i++)\n\t{\n\t\tallBars[i].className='stopAnim';\n\t}\n\t\n\tdocument.querySelector('#remoteScreen span.remoteshow').className=' ';\t\t\t\n\tdocument.querySelector('#remoteScreen span#pausespan').className='remoteshow';\n\t}\n\t\t\n\t\tdocument.querySelector('#timer').style.webkitAnimationPlayState='paused';\n\t\tdocument.querySelector('#timer').style.MozAnimationPlayState='paused';\n\t\tdocument.querySelector('#timer').style.OAnimationPlayState='paused';\n\t\tdocument.querySelector('#timer').style.animationPlayState='paused';\n\n}", "pause() {\n this.raise('pause')\n }", "function pause() {\n const pauseButton = document.querySelector('#pause');\n pauseButton.addEventListener('click', (event) =>{\n event.preventDefault();\n //la condition permet de passer de la pause à la lecture et inversement\n if (play) {\n vaisseau.userData.speed = 0;\n stopMoving = false;\n stopScore = false;\n play = false;\n presentationrId.style.display = 'block';\n presentationrId.style.left = '34%';\n presentationrId.style.textAlign = 'center';\n }else{\n vaisseau.userData.speed = currentSpeed + currentSpeed;\n stopMoving = true;\n stopScore = true;\n play = true;\n presentationrId.style.display = 'none';\n }\n });\n}", "function start() {\n grid.style.display = 'flex';\n toggleBtn.textContent = 'Pause';\n watch.start();\n }", "pause() {\n this._isPaused = true;\n }" ]
[ "0.7353066", "0.7321258", "0.7289142", "0.7280639", "0.72663635", "0.7177744", "0.71488523", "0.7143652", "0.7137813", "0.70337135", "0.70299", "0.6998044", "0.69532764", "0.6929814", "0.6925953", "0.69000095", "0.6887238", "0.68854296", "0.68815404", "0.68787086", "0.6876344", "0.68637854", "0.68637854", "0.68637854", "0.68637854", "0.68637854", "0.6861873", "0.68577176", "0.6855204", "0.6853718", "0.6841457", "0.6824745", "0.68219477", "0.6804732", "0.6775044", "0.67652726", "0.67601347", "0.6755009", "0.6754539", "0.6752167", "0.6751464", "0.6746518", "0.6743332", "0.6736733", "0.6732137", "0.6723687", "0.6719147", "0.67181915", "0.669422", "0.669119", "0.6677173", "0.6669193", "0.6667653", "0.66643", "0.666233", "0.66593975", "0.66473025", "0.66299367", "0.66268337", "0.66180944", "0.66144174", "0.6612536", "0.66084504", "0.66057223", "0.65891117", "0.6581769", "0.65682095", "0.65680516", "0.65672064", "0.65624446", "0.655472", "0.65494823", "0.6545176", "0.6537741", "0.65325177", "0.65320253", "0.65289533", "0.65127826", "0.6508124", "0.6500896", "0.6498976", "0.64954287", "0.6484568", "0.6481713", "0.6476063", "0.64666164", "0.64625144", "0.6458923", "0.6447715", "0.64420956", "0.64412856", "0.6438686", "0.6425084", "0.6416901", "0.64153016", "0.6409408", "0.64009714", "0.63999057", "0.63938826", "0.63898003" ]
0.714253
8
display default play button through change in CSS
function displayPlayButton() { toggle_btn.style.borderStyle = "solid"; toggle_btn.style.borderWidth = "7vmin 0vmin 7vmin 14vmin"; toggle_btn.style.borderColor = "transparent transparent transparent rgba(183, 0, 0, 1)"; toggle_btn.style.backgroundColor = "transparent"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onPlayButtonClick() {\n\t\tif ( this.target ) this.target.play();\n\t\tthis.trigger( 'play' );\n\t}", "function onClick () {\n\n play =! play;\n\tif(play){\n\t\tbutton.setFrames(0,0,1);\n\t}else{\n\t\tbutton.setFrames(1,1,0);\n\t}\n}", "function togglePlay() {\n if (elements.video.paused) {\n elements.video.play();\n elements.playBtn.classList.replace('fa-play', 'fa-pause');\n elements.playBtn.setAttribute('title', 'Pause');\n } else {\n elements.video.pause();\n showPlayIcon();\n }\n}", "function play_btn_play() {\n playTrackBtn.setAttribute('src', 'images/play.png');\n}", "play() {\n this.player.play();\n this.shadowRoot.querySelector(\"#play\").className = \"playerClicked\";\n this.shadowRoot.querySelector(\"#pause\").className = \"\";\n }", "function action_toggle_play() {\n if (video.paused) {\n video.play();\n change_icon('play'); \n } else {\n video.pause();\n change_icon('pause'); \n }\n delay = delay_value;\n}", "renderPlaybackControl() {\n const { intl, isPaused } = this.props;\n const text = intl.formatMessage(isPaused ? messages.play : messages.pause);\n return (\n <button\n aria-label={text}\n className={classNames(styles.playbackControl)}\n onClick={this.togglePause}\n tabIndex=\"0\"\n type=\"button\"\n value={text}\n >\n <img alt=\"\" role=\"presentation\" src={isPaused ? playImage : pauseImage} />\n </button>\n );\n }", "function togglePlay() {\n if(isPlaying) {\n domVideo.pause();\n isPlaying = false;\n playButton.innerHTML = '<img src=\"video-plugin/video-img/play.png\" />';\n } else {\n domVideo.play();\n isPlaying = true;\n playButton.innerHTML = '<img src=\"video-plugin/video-img/pause.png\" />';\n }\n}", "function playOrPause(value){\n \tif(value == true){\n \t\t// show play button\n \t\tcp.show(playID);\n \t\t// hide pause button\n \t\tcp.hide(pauseID);\t\t\t\n \t}\n \telse{\n \t\t// hide play\n \t\tcp.hide(playID);\n \t\t// show pause\n \t\tcp.show(pauseID);\t\n \t}\n }", "function playWrap () {\r\n ( isAutoplayButtonClicked && isAutoplay) ? isAutoplayButtonClicked = false : isAutoplayButtonClicked = true;\r\n play();\r\n }", "function togglePlay() {\n var theSVG = this.firstElementChild;\n poster.classList.add('hide');\n videoControls.classList.remove('invisible');\n vidPlayer.classList.remove('hide');\n\n if (vidPlayer.paused) {\n theSVG.dataset.icon = \"pause-circle\";\n vidPlayer.play();\n } else {\n theSVG.dataset.icon = \"play-circle\";\n vidPlayer.pause();\n }\n }", "get btn_play() { return $(\"~Btn-Play\"); }", "function togglePlay() {\n if (player.paused === false) {\n player.pause();\n isPlaying = false;\n document.getElementById('play-btn').className = \"\";\n\n } else {\n player.play();\n document.getElementById('play-btn').className = \"pause\";\n isPlaying = true;\n }\n }", "function reenablePlayButton() {\r\n document.getElementById(\"pg-2-play-button\").disabled = false;\r\n}", "playCallback(e) {\n if (this.isCurrentTrack()) {\n this.setBigPlay()\n } else {\n this.bigPlayLoaded = false\n Rails.fire(this.loadTrackTarget, 'click')\n }\n this.registeredListen = false\n this.playTarget.classList.replace('play_button', 'pause_button')\n this.playTarget.firstElementChild.setAttribute('data-icon', 'pause')\n }", "function updateIcon() {\n\tconst ctrl = document.querySelector('.player__button[title=\"Toggle Play\"]');\n\tif(video_application.paused) {\n\t\tctrl.textContent = '>';\n\t}\n\telse {\n\t\tctrl.textContent = '||';\n\t}\n}", "function togglePlay() {\r\n\tif (miguel.paused){\r\n\t\ttoggleIcon();\r\n\t\treturn miguel.play();\r\n\t} else {\r\n\t\ttoggleIcon();\r\n\t\treturn miguel.pause();\r\n\t}\r\n}", "function playingHandler() {\n\n console.log(getTime() + ' Player.Playing');\n\n if (currentOptions.display.playControl) {\n var playButton = document.getElementById(\"play-pause\");\n playButton.style.backgroundImage = 'url(/public/images/player/player-pause.svg)';\n }\n\n }", "function ChangePauseButtonToPlayButton() {\n\t\tplayButton.classList.remove(\"play-button-off\");\n \tplayButton.classList.add(\"play-button-on\");\n \tpauseButton.classList.remove(\"pause-button-on\");\n \tpauseButton.classList.add(\"pause-button-off\");\n \n \tdoPause();\n \tfunction doPause(){\n \tplayerAudio.pause();\n \t}\n \tgoWithProgressOfSong();\n\t}", "function ChangePlayButtonToPauseButton() {\n\t\tplayButton.classList.remove(\"play-button-on\");\n \tplayButton.classList.add(\"play-button-off\");\n \tpauseButton.classList.remove(\"pause-button-off\");\n \tpauseButton.classList.add(\"pause-button-on\");\n \n \tdoPlay();\n \tfunction doPlay() {\n \tplayerAudio.play();\n \t}\n \tgoWithProgressOfSong();\n\t}", "function showPlayButton() {\n document.querySelector(\".top-menu\").classList.add(\"show-play\");\n document.getElementById(\"encouragement1\").remove();\n\n // fixme: mobile not starting animation auto?\n if (window.innerWidth > 819 && isPaused) {\n playPauseButton.innerHTML = \"<i class='fas fa-pause'></i>\";\n } else {\n playPauseButton.innerHTML = \"<i class='fas fa-play'></i>\";\n }\n}", "function togglePlay() {\n var playPauseBtn = document.getElementById('play-pause-btn');\n running = !running;\n\n if (running) {\n playPauseBtn.value = 'Pause';\n } else {\n playPauseBtn.value = 'Play';\n }\n}", "function changeButtonLabel(){\n\t\t\tif(that.isPlaying){\t\t\t\t\n\t\t\t\tbutton.attr(\"class\",pause);\t\n\t\t\t}\t\t\t\n\t\t\telse{\n\t\t\t\tbutton.attr(\"class\", play);\t\t\t\n\t\t\t}\n\t\t}", "function playTrack() {\n curr_track.play();\n isPlaying = true;\n \n // To replace icon with pause icon\n playpause_btn.innerHTML = '<i class=\"fa fa-pause-circle fa-5x\"></i>';\n}", "function togglePlay() {\n\tif (player.paused){\n\t\ttoggleIcon();\n\t\treturn player.play();\n\t} else {\n\t\ttoggleIcon();\n\t\treturn player.pause();\n\t}\n}", "function togglePreviewPlayPause() {\n\tvar audio = document.getElementById(\"urlAudio\");\n var playpause = document.getElementById(\"audioPlayerButton\");\n if (audio.paused || audio.ended) {\n \tplaypause.className = \"glyphicon glyphicon-pause\";\n\t\taudio.play();\n }\n else {\n \tplaypause.className = \"glyphicon glyphicon-play\";\n \taudio.pause();\n }\n}", "function playControlsShow(type) {\n if( type === \"play\"){\n \n $('#tl_controls .tl_ctrls_play').hide();\n $('#tl_controls .tl_ctrls_pause').show();\n $('#tl_controls .play_btn').addClass('pause_btn');\n $('#tl_controls .play_btn').removeClass('play_btn');\n\n }else if( type === \"pause\"){\n\n $('#tl_controls .pause_btn').addClass('play_btn');\n $('#tl_controls .pause_btn').removeClass('pause_btn');\n $('#tl_controls .tl_ctrls_pause').hide();\n $('#tl_controls .tl_ctrls_play').show();\n\n }\n}", "function playpause(){\n\t\tif($('#pause').hasClass('activeButton'))\n\t\t{\n\t\t\t$('#slider,#play,#pause').click(function(){\n\t\t\t\t$('#pause').removeClass('activeButton');\n\t\t\t\t$('#play').addClass('activeButton');\n\t\t\t\t$('#pause').hide();\n\t\t\t\t$('#play').show();\n\t\t\t\tautoswitch=false;\n\t\t\t});\n\t\t}\t\n\t\t//When play is clicked, activate pause button\n\telse if($('#play').hasClass('activeButton'))\n\t\t{\n\t\t\t$('#slider,#play,#pause').click(function(){\n\t\t\t\t$('#play').removeClass('activeButton');\n\t\t\t\t$('#pause').addClass('activeButton');\n\t\t\t\t$('#play').hide();\n\t\t\t\t$('#pause').show();\n\t\t\t\tautoswitch=true;\n\t\t\t});\n\t\t}\n}", "function Play_Pause() {\n if (Paused) {\n Paused = false\n Play_Pause_Button.style.setProperty('-webkit-mask-image', 'url(../assets/ui/pause_button.svg)')\n } else {\n Paused = true\n Play_Pause_Button.style.setProperty('-webkit-mask-image', 'url(../assets/ui/play_button.svg)')\n }\n}", "function playButton(param, parentOfParam) {\n document.querySelector('.' + parentOfParam.classList[0]).children[1].classList.toggle('hide');\n document.querySelector('.' + parentOfParam.classList[0]).children[0].children[0].classList.toggle('bg-black');\n}", "play () {\n\t\t\t\n\t\tthis.playButton = $('#playButton') // Init Bouton play\n\n\t\tthis.options.play ? this.options.play = false : this.options.play = true \n\n\t\tif (this.options.play === true) { // Si l'option play est égal à true\n\n\t\t\tthis.playButton.removeClass('carousel__play') // Enlève la classe carousel__play\n\t\t\tthis.playButton.addClass('carousel__pause') // Ajoute la classe carousel__pause\n\t\t\t\t\n\t\t\tthis.interval = window.setInterval(() => { // Définis l'intervale\n\t\t\t\t\n\t\t\t\tthis.gotoItem(this.currentItem + 1, this.options.animation) // Appel de la methode GotoItem avec le slide auquel j'ajoute 1 et l'animation à true\n\t\t\t\t\n\t\t\t}, this.options.timer) // 5 secondes entre les défillements\n\t\t\t\n\t\t} else if (this.options.play === false) { // Si option play est égal à false\n\t\t\t\n\t\t\tthis.playButton.removeClass('carousel__pause') // Enleve la classe carousel__pause\n\t\t\tthis.playButton.addClass('carousel__play') // Ajoute la classe carousel__play\n\t\t\t\n\t\t\tclearInterval(this.interval) // Nettoyage de l'intervale\n\t\t}\n\t\t\t\t\n\t}", "function togglePlay() {\n if (audioPlayer.paused === true) {\n audioPlayer.play();\n playToggle.addClass(\"btn__play--enabled\");\n startBarProgressInterval();\n } else {\n audioPlayer.pause();\n playToggle.removeClass(\"btn__play--enabled\");\n clearBarProgressInterval();\n }\n}", "function playToPauseBtn(el) {\n el.classList.remove('fa-play');\n el.classList.add('fa-pause');\n }", "function updatePlayLabel(playState) {\n isPlaying = playState;\n var playLabel = isPlaying ? \"Stop\" : \"Play\";\n playStopButton.value = playLabel;\n}", "function updateIcons() {\n // Check if video is paused or playing \n if (video.paused) {\n // if video is paused, show the play button \n play.innerHTML = '<i class=\"fa fa-play fa-2x\">'\n } else {\n // if video is playing, show the pause button\n play.innerHTML = '<i class=\"fa fa-pause fa-2x\">'\n }\n\n}", "function hidePlayButton() {\r\n document.getElementById(\"buttonPlayPause\").style.display = \"none\";\r\n}", "function playYtVideo() {\n player.playVideo();\n if (this.classList.value === playFaClass) {\n $('.playButton').tooltip('hide')\n $('.playButton').removeClass(playFaClass).toggleClass(pauseFaClass);\n $(this).attr('data-original-title','Pause')\n } else {\n $('.pauseButton').tooltip('hide');\n $('.pauseButton').removeClass(pauseFaClass).toggleClass(playFaClass);\n $(this).attr('data-original-title','Play')\n player.pauseVideo()\n }\n }", "function playMyPlayer() {\n \n\t// If music is in paused state...\n if ($audioPlayer.paused) {\n $audioPlayer.play();\n\n $btnPause.style.display = \"inline-block\";\n $btnPlay.style.display = \"none\";\n\n } else {\n $audioPlayer.pause();\n \n $btnPause.style.display = \"none\";\n $btnPlay.style.display = \"inline-block\";\n }\n}", "function start_play(elem){\n // toggle_play = true;\n \n elem.parentNode.parentNode.childNodes[1].classList.add(\"autoplay\");\n // get right arrow element\n var elem = elem.parentNode.childNodes[3];\n play(elem);\n \n \n // toggle play/stop buttons\n var stop_button = elem.parentNode.getElementsByTagName(\"span\")[3];\n var play_button = elem.parentNode.getElementsByTagName(\"span\")[2];\n stop_button.style = \"display:inline-block\";\n play_button.style = \"display:none\";\n \n // hide controllers arrows\n elem.parentNode.getElementsByTagName(\"span\")[0].style = \"display:none\";\n elem.parentNode.getElementsByTagName(\"span\")[1].style = \"display:none\";\n}", "function play_btn_pause() {\n playTrackBtn.setAttribute('src', 'images/pause.png');\n}", "function play()\n {\n if (music.paused)\n {\n music.play();\n pButton.className = \"pause\";\n }\n else\n {\n music.pause();\n pButton.className = \"play\";\n }\n }", "function togglePlay() {\n\n // if on mobile and controls are collapsed,\n // don't do anything\n if (state.get(\"controls_collapsed\") && state.get(\"platform\") === state.platforms.MOBILE) {\n return;\n }\n\n // switch between playing and pausing\n switch (state.get(\"state\")) {\n case state.states.PLAYING:\n case state.states.BUFFERING:\n pause();\n break;\n case state.states.PAUSED:\n case state.states.ENDED:\n case state.states.READY:\n play();\n break;\n }\n}", "function playbutton(){\n document.querySelector('#startMenu').style.display = \"none\";\n bg_call();\n }", "function togglePlay() {\r\n if (player.paused === false) {\r\n player.pause();\r\n isPlaying = false;\r\n $('#play-btn').removeClass('pause');\r\n\r\n } else {\r\n player.play();\r\n $('#play-btn').addClass('pause');\r\n isPlaying = true;\r\n }\r\n }", "function playButtonPress(){\n var slider = document.getElementById(\"homecontent-slider\");\n var slider_button = document.getElementById(\"slider-playbutton\");\n if (!slider || !slider_button){ return; }\n if (slider.dataset.play != 0){\n slider.dataset.play = 0;\n slider_button.className = \"play-button\";\n } else {\n slider.dataset.play = 1;\n slider_button.className = \"pause-button\";\n }\n}", "@action handlePlayButtonClick() {\n this.currentPlayState = PlaylistModel.playState.PLAYING;\n }", "function setPlaybackControlState(value) {\n if (value) {\n /* video is playing */\n playButton.style.display = NONE\n pauseButton.style.display = INLINE\n } else {\n /* video is paused */\n playButton.style.display = INLINE\n pauseButton.style.display = NONE\n }\n}", "function play() {\n player.playVideo();\n launch_progress_timer();\n play_pause_button.setAttribute('title', 'Pause');\n play_pause_snap_button.toState(1);\n\n var is_hover_bottom_bar = el.querySelector('.mp-bottom-bar:hover');\n if (!is_hover_bottom_bar) {\n setTimeout(hideControls, 2000);\n }\n }", "function play() {\n video.play();\n play_pause_button.setAttribute('title', 'Pause');\n play_pause_snap_button.toState(1);\n\n var is_hover_bottom_bar = el.querySelector('.mp-bottom-bar:hover');\n if (!is_hover_bottom_bar) {\n setTimeout(hideControls, 2000);\n }\n }", "function onPlayStart(){\n\t\t\n\t\tg_objThis.trigger(t.events.PLAY_START);\n\t\t\n\t\tif(g_objButtonClose)\n\t\t\tg_objButtonClose.hide();\n\t}", "function play(that) {\n\t\tvar video = that.find('video').get(0),\n\t\t\tcontroller;\n\t\tif (that.settings.controlPosition) {\n\t\t\tcontroller = $(that.settings.controlPosition).find('.ui-video-background-play a');\n\t\t} else {\n\t\t\tcontroller = that.find('.ui-video-background-play a');\n\t\t}\n\t\tif (video.paused) {\n\t\t\tvideo.play();\n\t\t\tcontroller.toggleClass('ui-icon-pause ui-icon-play').text(that.settings.controlText[1]);\n\t\t} else {\n\t\t\tif (video.ended) {\n\t\t\t\tvideo.play();\n\t\t\t\tcontroller.toggleClass('ui-icon-pause ui-icon-play').text(that.settings.controlText[1]);\n\t\t\t} else {\n\t\t\t\tvideo.pause();\n\t\t\t\tcontroller.toggleClass('ui-icon-pause ui-icon-play').text(that.settings.controlText[0]);\n\t\t\t}\n\t\t}\n\t}", "function playIcon(index) {\n\n\tvar i = parseInt(index);\n\n\tplaylist.stop(); // removes highlight and stops audio\n\n\tplaylist.nowPlayingIndex = i; \n\tplaylist.play(); \n\tplaylist.renderInElement(playlistElement); // updates HTML to show changes\n\n\tif (playButton.innerHTML === '<i class=\"fa fa-play\"></i>') {\n\t\treturn playButton.innerHTML = '<i class=\"fa fa-stop\"></i>';\n\t}\n\n}", "function togplaybtn() {\n playtoggle.classList.toggle(\"fa-play\");\n playtoggle.classList.toggle(\"fa-pause\");\n}", "function pauseToPlayBtn(el) {\n el.classList.remove('fa-pause');\n el.classList.add('fa-play');\n }", "onPlayPauseClick() {\n const { controller } = this.props;\n controller.togglePlayPause();\n }", "function initPlayBtn() {\n\tvar phase_intro = '<a href=\"#\" id=\"phase_intro\" class=\"border-radius\">Synopsis</a>';\n\t\n\t$('.tl_ctrl_bar').append(phase_intro);\n\t\n\t$('#phase_intro').click(function() {\n\t\tstopAnimation();\n\t\tloadIntro($(this).attr('data-ref'));\n\t\t$.cookie('phaseIntro',true);\n\t});\n\t\n\t//play button image\n\t$('#tl_controls .play_btn, #tl_controls .tl_ctrls_play').live('click', function() {\n\t\tplayAnimation();\n\t});\n\t\n\t$('#tl_controls .pause_btn, #tl_controls .tl_ctrls_pause').live('click', function() {\n\t\tstopAnimation();\n\t});\n}", "function pauseAnimation() {\n clearInterval(timerID);\n playButton.text(\"▶️ Play\");\n playButton.style(\"background-color\", \"#77DD77\");\n }", "function play() {\n document.getElementById(\"musicplayr\").play();\n document.getElementById(\"npplaypause\").winControl.icon = \"pause\";\n document.getElementById(\"npplaypause\").winControl.label = \"Pause\";\n document.getElementById(\"appbarplaypause\").winControl.icon = \"pause\";\n document.getElementById(\"appbarplaypause\").winControl.label = \"Pause\";\n document.getElementById(\"snapplaypause\").winControl.icon = \"pause\";\n document.getElementById(\"snapplaypause\").winControl.label = \"Pause\";\n Windows.Media.MediaControl.isPlaying = true;\n }", "function controlBtnCLicked(e){\n if(e.target.classList.contains('fa-play')){\n playStream();\n } else if(e.target.classList.contains('fa-pause')) {\n pauseStream();\n }\n e.preventDefault(); \n}", "function updateButton() {\n // we can use this because it's bound to the video itself\n const icon = this.paused ? '►' : '❚ ❚';\n toggle.textContent = icon;\n}", "function buttonDisplay(buttonKey) {\n const displayedButton = buttonKey === \"PLAY\" ? playButton : pauseButton;\n const hiddenButton = buttonKey === \"PLAY\" ? pauseButton : playButton;\n displayedButton.style.display = \"block\";\n hiddenButton.style.display = \"none\";\n}", "function playThemeSong() {\n themeSong.play();\n}", "function playButton() {\n if (!sound || !sound.playing) {\n form.fillOnly('rgba(0,0,0,.2)').circle( Circle.fromCenter( space.center, 30 ) );\n form.fillOnly('#fff').polygon( Triangle.fromCenter( space.center, 15 ).rotate2D( Const.half_pi, space.center ) );\n \n }\n }", "function play(btn) {\n btn.innerHTML = 'Shuffle Play';\n let playButton = document.querySelector('.playControl');\n let shuffleButton = document.querySelector('.shuffleControl');\n let skipButton = document.querySelector(\".skipControl__next\");\n\n // Re-Shuffle tracks if shuffle is enabled, and enable shuffle if it is disabled\n if (shuffleButton.classList.contains('m-shuffling')) {\n shuffleButton.click();\n shuffleButton.click();\n } else if (!shuffleButton.classList.contains('m-shuffling')) {\n shuffleButton.click();\n }\n\n // Skip the duplicate first track that was added previously\n // This also begins playback\n skipButton.click();\n\n // Close the queue if it is open\n toggleQueue('close');\n\n // Add focus back to the play/pause button so keybinds work\n playButton.focus()\n }", "function updateButton() {\n // My solution\n // if (!video.paused) {\n // toggle.textContent = \"││\";\n // } else {\n // toggle.textContent = \"►\";\n // }\n\n // Wes's solution\n const icon = this.paused ? \"►\" : \"││\"; // `this` used instead of `video`\n toggle.textContent = icon;\n}", "function clickPlayPauseList() {\n // Update status of other btn's (If pause icons replace by play icons)\n var btnPauseStatus = document.querySelectorAll(\".mdi-pause-circle-outline\");\n btnPauseStatus.forEach(element => {\n element.classList.remove(\"mdi-pause-circle-outline\");\n element.classList.add(\"mdi-play-circle-outline\");\n })\n\n last_url = this.getAttribute(\"url\");\n // Si player en pause alors lire\n if (player.paused) {\n if (last_url !== url) {\n url = last_url;\n change(last_url);\n }\n player.play();\n lastbtn = this;\n btnPlayPause.setAttribute(\"value\", \"Pause\");\n playPause_Icons(this, false);\n }\n else // Si player en lecture alors pause\n {\n // Compare l'url du bouton et celui en cours dans le lecteur (Si pas les mêmes changer l'url du lecteur par la nouvelle reçu puis relancer automatiquement la lecture)\n if (last_url !== url) {\n url = last_url;\n change(last_url);\n player.play();\n lastbtn = this;\n btnPlayPause.setAttribute(\"value\", \"Pause\");\n playPause_Icons(this, false);\n }\n else {\n player.pause();\n btnPlayPause.setAttribute(\"value\", \"Play\");\n playPause_Icons(this, true);\n }\n }\n}", "$mediaplayerPlay() {\n // console.log('mediaplayerPlay');\n this.tag('Stop').patch({\n visible: false\n }, false);\n this.tag('Play').patch({\n visible: false \n }, false);\n \n}", "function play_button(){\n fill(0);\n rect(480, 300, 300, 100);\n textSize(64); \n fill(255);\n textFont(\"Impact\");\n text(\"PLAY\", 570, 375); \n}", "play() {\n console.log('radDemo: play()');\n this.media.play();\n this.btnPlayPause.classList.add('play');\n this.btnPlayPause.classList.remove('pause');\n\n this.btnPausePoints.forEach(element => {\n if(element.classList.contains('current') || element.classList.contains('previous')) {\n console.log(element);\n element.classList.remove('current', 'previous');\n if(this.state.pausePointCurrent == element.dataset.pausePoint) {\n element.classList.add('previous');\n }\n }\n });\n\n this.state.playCount++;\n }", "function togglePlay() {\n if(!downloadFinished){\n return;\n }\n if(playing){\n player.pause();\n }else{\n player.play();\n }\n }", "function togglePlay(audioObj){\r\n if(!audioObj.paused){\r\n audioObj.pause();\r\n $(\".fa-play, .fa-pause\").toggle(\"swing\").css(\"display\", \"inline-block\");\r\n } else {\r\n audioObj.play();\r\n $(\".fa-play, .fa-pause\").toggle(\"swing\").css(\"display\", \"inline-block\");\r\n }\r\n }", "function shuffle_play() {\n if (document.querySelector('ons-toast').style.display == \"none\") {\n document.querySelector('ons-toast').show();\n }\n document.getElementById(\"play_icon\").classList.remove(\"fa-play-circle-o\");\n document.getElementById(\"play_icon\").classList.add(\"fa-pause-circle-o\");\n}", "function togglePlay() {\n\t// Selecting the right method\n\tconst method = video.paused ? 'play' : 'pause';\n\t// Calling the finction\n\tvideo[method]();\n}", "function playTheme() {\n themeSong.play();\n}", "function playPause() {\n target = this.classList[1] - 1;\n\n if(shownMedia[target].paused) {\n shownMedia[target].play();\n playPauseBtn[target].textContent = 'Pause';\n } else {\n shownMedia[target].pause();\n playPauseBtn[target].textContent = 'Play';\n }\n }", "function toggleSong() {\n if (song.isPlaying()) {\n //pause audio and change button text to Play\n song.pause();\n button.html('Play');\n } else {\n //pause audio and change button text to Pause\n song.play();\n button.html('Pause');\n }\n}", "function toggleSong() {\n if (song.isPlaying()) {\n //pause audio and change button text to Play\n song.pause();\n button.html('Play');\n } else {\n //pause audio and change button text to Pause\n song.play();\n button.html('Pause');\n }\n}", "function pauseOn()\n\t\t\t{\n\t\t\t\tpause = true;\n\t\t\t\tq.find(\".x-controls .pause\").hide();\n\t\t\t\tq.find(\".x-controls .play\").show();\n\t\t\t}", "function togglePlay(doPlay) {\n\tif (doPlay == null || doPlay == undefined)\n\t\tgIsRunning = !gIsRunning;\n\telse\n\t\tgIsRunning = doPlay;\n\n\tdocument.getElementById('BtnToggleSimulation').firstElementChild.className = (gIsRunning ? \"fa fa-pause\" : \"fa fa-play\");\n\tdocument.getElementById('BtnToggleSimulation').className = 'btn btn-info';\n\n\tfireSimulation();\n}", "function onPlayPauseButtonPressed() {\n if (window.playGame === true) {\n window.playGame = false;\n $('#playPauseButton').text('Play');\n } else {\n window.playGame = true;\n $('#playPauseButton').text('Pause');\n }\n}", "function togglePlay() {\n // if (selectors.video.paused) {\n // selectors.video.play();\n // } else {\n // selectors.video.pause();\n // }\n\n const method = selectors.video.paused ? \"play\" : \"pause\";\n selectors.video[method]();\n}", "function start() {\n if (playing) {\n pause();\n playBtn.textContent = '►';\n playing = false;\n updateReplay(true, false);\n } else {\n play();\n playBtn.textContent = '❚ ❚';\n playing = true;\n }\n}", "function toggleSong() {\n if(!song.isPlaying()) {\n song.play();\n button.html(\"pause\");\n } else {\n song.pause();\n button.html(\"play\")\n }\n}", "function PlayButton(props) {\n const [play, { stop, isPlaying }] = useSound(Audio);\n return (\n <PlayButton\n active={isPlaying}\n size={60}\n iconColor=\"var(--color-background)\"\n idleBackgroundColor=\"var(--color-text)\"\n activeBackgroundColor=\"var(--color-primary)\"\n play={() => {\n play();\n }}\n stop={stop}\n />\n );\n }", "beforePlay () {\n document.getElementById(\"customize\").classList.add(\"dontShow\");\n let aux = Array();\n aux.push( batman );\n aux.push( joker );\n aux.push( dolarJoker );\n aux.push( dolar );\n aux.forEach( e => {\n e.classList.remove(\"dontShow\");\n });\n }", "function togglePlayPause() {\n if (video.paused || video.ended) {\n playpause.title = 'pause';\n playpause.innerHTML = '<img src=\"icons/pause-icon.png\">';\n playpause.className = 'pause';\n video.play();\n}\n else {\n playpause.title = 'play';\n playpause.innerHTML = '<img src=\"icons/play-icon.png\">';\n playpause.className = 'play';\n video.pause();\n }\n}", "function setPlayOne() {\n\t\tisPlayOne = !isPlayOne;\n\t}", "play(){\n super.play();\n this.isPlaying = true;\n }", "function pp(){\n if(config.site ==='twitch'){\n $(\".qa-pause-play-button\").click();\n } else if(config.site ==='netflix'){\n return;\n }\n else {\n if(myPlayer.paused){\n myPlayer.play();\n } else {\n myPlayer.pause();\n }\n }\n log(\"play/pause triggered\");\n}", "function togglePlay() {\n const method = video.paused ? 'play' : 'pause' ;\n video[method]();\n}", "function togglePlay() {\n video[video.paused ? 'play' : 'pause']();\n}", "function doPause() {\n PLAY_STATUS = PlayStatus.PAUSED\n pausePlay.innerHTML = 'Resume'\n d3.select(\"#pauseplay\").attr(\"class\", \"btn menu-button\")\n CODE_MIRROR_BOX.setOption(\"theme\", DISABLED_CODE_THEME)\n}", "function togglePlay() {\n const method = video.paused ? 'play' : 'pause';\n video[method]();\n}", "play() {\n this.paused = false;\n }", "function playVideo() {\r\n video.play();\r\n play.innerHTML = '<i class=\"fas fa-pause fa-2x\"></i>';\r\n}", "function hidePlay () { \n cp.hide(getElement(\"Play\", \"id\"));\n cp.show(getElement(\"Pause\", \"id\")); \n }", "function playTune(index){\n\tvar id=null;\t\n\tswitch(index){\n\t\tcase 0:\n\t\t\tid=\"button-tl\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tid=\"button-tr\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tid=\"button-br\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tid=\"button-bl\";\n\t\t\tbreak;\n\t}\n\tbtnData[id].play();\t\n\t//making effect of pressed button\n\t$(\"#\"+id).addClass(\"clickeffect\");\n\tsetTimeout(function(){\n\t\t$(\"#\"+id).removeClass(\"clickeffect\");\n\t}, 400);\t\t\n}", "function togglePlay() {\n video.paused ? video.play() : video.pause();\n}", "#buildhowToPlayButton() {\n this.howToPlayButton.addEventListener('click', () => {\n this.howToPlayText.style.display = 'block';\n this.aboutText.style.display = 'none';\n });\n }", "_onClickPlayButton () {\n switch (this.props.playbackState) {\n case PlaybackState.Stopped:\n this.props.audioPlayerAction.open(this.props.music, true)\n break\n\n case PlaybackState.Paused:\n this.props.audioPlayerAction.play()\n break\n\n case PlaybackState.Playing:\n this.props.audioPlayerAction.pause()\n break\n\n default:\n break\n }\n }" ]
[ "0.7222774", "0.7209913", "0.71686345", "0.7140184", "0.7135463", "0.71346927", "0.7110338", "0.70711184", "0.7062931", "0.70524645", "0.69814503", "0.6981387", "0.69701654", "0.69685584", "0.6964077", "0.6943242", "0.69379896", "0.6930504", "0.6915746", "0.69070154", "0.690441", "0.6903819", "0.6885764", "0.6880595", "0.68719137", "0.685076", "0.6818234", "0.6814168", "0.6806345", "0.6786309", "0.67835224", "0.67468554", "0.6739938", "0.673529", "0.6725352", "0.67251766", "0.6723963", "0.67078066", "0.670301", "0.6702758", "0.6702618", "0.66958636", "0.6694951", "0.66945", "0.6694353", "0.667649", "0.6675874", "0.66704875", "0.66704214", "0.6667578", "0.66658", "0.6660233", "0.665649", "0.66540265", "0.66501105", "0.6642123", "0.66358197", "0.6622808", "0.6621511", "0.6621059", "0.6604197", "0.65785956", "0.65765196", "0.65685576", "0.6562822", "0.6553461", "0.6543769", "0.65422726", "0.6532098", "0.6526009", "0.65241796", "0.65235686", "0.6520098", "0.6517949", "0.650377", "0.6502464", "0.6502464", "0.6500043", "0.6495732", "0.64941484", "0.64878106", "0.6486428", "0.64824516", "0.6481632", "0.64802223", "0.6479734", "0.6476847", "0.647528", "0.64721817", "0.6469909", "0.64610124", "0.6449717", "0.6447874", "0.6447831", "0.6447062", "0.64456195", "0.6445614", "0.6442478", "0.6441498", "0.64407873" ]
0.6664932
51
Make request in parallel
function task2() { clearTable(); console.clear(); const stop = Math.floor(Math.random() * 10) + 1; getData(1, stop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getMultiRequest(url, reqArr) {\n const reqParams = []\n reqArr.forEach(item => {\n reqParams.push({\n url,\n param: item,\n method: 'get'\n })\n })\n try {\n const response = await multiRequestWithPromise(reqParams)\n return response\n } catch (err) {\n console.log(err)\n }\n}", "function httpGetParallel(urls, callback) {\n // You have to write this code.\n // You can use 'httpGet', but don't use promises.\n throw new Error('unimplemented');\n}", "function parallel() {\n var _this3 = this;\n\n var config = this.config,\n URLs = this.URLs;\n var fetchOptions = config.fetchOptions,\n template = config.template,\n target = config.target;\n template = resolveToArray(template, URLs.length, 'template');\n target = resolveToArray(target, URLs.length, 'target');\n var method = fetchOptions.method || methods$1.GET;\n var requestPromises = URLs.map(function (URL, index) {\n return new Promise(function (resolve, reject) {\n doRequest(URL, method, fetchOptions).then(function (res) {\n return res.json();\n }).then(function (data) {\n renderAjaxData.apply(_this3, [template[index], target[index], data, resolve, reject]);\n })[\"catch\"](function (error) {\n renderError.apply(_this3, [_this3.templateMap[template[index]], target[index], error, reject]);\n });\n });\n });\n URLs.length = 0;\n return requestPromises;\n }", "function startClients() {\n for (var i = 0; i < options.concurrency; i++) {\n\n makeRequest();\n\n }\n }", "function batchRequest(){\n // Use the lower value of items left in the link array or maxRequests\n var total = (linkArr.length-1 > maxRequests) ? maxRequests : linkArr.length-1;\n for(var i = 0; i<= total; i++) {\n qwest.get(endPoint+encodeURIComponent(linkArr[0]))\n .then(function(response) {\n apiActions.response({pageURL: response.url, report: response.data});\n })\n .catch(function(e, response) {\n console.log('>> Error: ', e, '\\nResponse: ', response);\n })\n // Remove the head from the array\n linkArr.shift();\n }\n\n // Batch request again if there's anything left in the array\n if(linkArr.length > 0) {\n setTimeout(function() {\n batchRequest();\n }, 30*1000);\n }\n}", "function bar(url1, url2) {\n // make both requests \"in parallel\"\n return Promise.all([\n request(url1),\n request(url2)\n ]);\n}", "function makeRequests(users, cb) {\n var parallel = new Parallel();\n users.forEach(function(user) {\n parallel.add(function(done) {\n request.get(user, function(err, res) {\n if (err) return done(err);\n done(null, res);\n });\n });\n });\n\n parallel.done(function(err, result) {\n var error = { message: 'Something went wrong, please try again later' };\n if (err) renderCallBack(error, null);\n return renderCallBack(null, result);\n });\n}", "async function postMultiRequest(url, reqArr) {\n const reqParams = []\n const {\n param\n } = reqArr\n reqArr.forEach(item => {\n reqParams.push({\n url,\n param: item,\n method: 'post'\n })\n })\n try {\n const response = await multiRequestWithPromise(reqParams)\n return response\n } catch (err) {\n console.log(err)\n }\n}", "allRequest(urls) {\n return new Promise((resolve, reject) => {\n const limit = 4;\n async.eachLimit(urls, limit, (file, cb) => {\n this.request(HomeUrl + file)\n .then((data) => {\n this.eachPageCheerio(data)\n .then((obj) => {\n console.log(obj);\n\n // download images to local\n const url = obj.imgUrl;\n const name = obj.airlineName.replace(' ', '_');\n const image = obj.imgUrl.split('/')[8];\n const dest = this.dir + name + '_' + image;\n const formData = {\n name: obj.airlineName,\n image: dest,\n short_code: obj.airlineCode,\n };\n this.download(url, dest)\n .then(() => this.postRequest(apiUrl, formData)) // post request to api\n .then(() => { cb(); });\n });\n });\n }, (err) => {\n if (err) throw err;\n resolve('All process finished!');\n });\n });\n }", "async request() {\n if (this.isTest()) { console.log(\"in getAllCalls\"); }\n // GET first page (and number of pages)\n await this.getCallsPage();\n \n if (this.isTest()) { console.log(`getLastPage = ` + this.getLastPage()); }\n // GET the remaining pages\n for (let pageNum = 2; pageNum <= this.getLastPage(); pageNum++) {\n await Util.throttle(this.#config.throttle);\n await this.getCallsPage(pageNum);\n }\n }", "function callSeqHTTPRequest(i){\n i = i || 0 ;\n\n if(i < NO_OF_DATA_POINTS){\n\n\n (function (index, req) {\n sendHTTPRequest(req, index)\n\n })(i, new XMLHttpRequest())\n }\n}", "async function parallel(count) {\n const swappiPeople = [];\n for (let i = 1; i < count; i++) {\n swappiPeople.push(\n //Observe no await\n fetch(\"https://swapi.co/api/people/\" + i)\n //returns whichever person is acquired first\n .then(res => { return res.json() }));\n }\n const all = await Promise.all(swappiPeople);\n console.log(all.map(p => p.name).join(\", \"));\n\n}", "async submitRequests(requests) {\n return Promise.all(\n Promise.all(requests.creation.map(x => {\n return this.requestCreation(requests.workerType, x);\n })),\n Promise.all(requests.deletion.map(x => {\n return this.requestDeletion(requests.workerType, x);\n })),\n );\n }", "function getMatch(link){\n // async function\n console.log(\"sending request !!!\" , count);\n count++;\n request(link , cb); //node api => 48 request functions\n}", "function fetchStaticAssets(){\n \n if (window.XMLHttpRequest) {\n \t// In case PARALLEL_REQUEST , make all the calls immediately \n if(PARALLEL_REQUESTS){\n\n for (var i = 0; i < NO_OF_DATA_POINTS; i++) {\n\n (function (index, req) {\n sendHTTPRequest(req, index)\n\n })(i, new XMLHttpRequest())\n }\n\n }else{\n \t// In case of Seq Requests, make the calls one after the prev one has ended\n callSeqHTTPRequest()\n\n }\n }\n}", "async function executeHardAsync() {\n const r1 = await fetchUrlData(apis[0]);\n const r2 = await fetchUrlData(apis[1]);\n}", "function _makeRemoteRequest() {\n // Copy the shared batch and allow the building of a new batch while you are waiting for a response.\n // Note the use of \"splice\" rather than \"slice\", which will modify the original _batch array\n // to empty it out.\n var batchCopy = _batch.splice(0, _batch.length);\n\n _isBatchedRequestScheduled = false; // Build a simpler request batch that only contains the arguments for each invocation.\n\n var requestBatch = batchCopy.map(function (item) {\n return {\n operation: item.operation,\n args: item.args\n };\n }); // Make the remote request.\n\n _fetchFromRemoteService(requestBatch).then(function (responseBatch) {\n // Match each value from the response batch to its corresponding invocation entry from the request batch,\n // and resolve the invocation promise with its corresponding response value.\n responseBatch.forEach(function (response, index) {\n if (response.error) {\n batchCopy[index].reject(new Error(response.error));\n } else {\n console.log(response);\n batchCopy[index].resolve(response.result);\n }\n });\n });\n} // --------------------- A public API ------------------------------", "function executeURLS() {\n\n for(var i = 0, len = documentsURL.length; i < len; i++) {\n (function () {\n var aux = i, endChecker = false;\n\n request(documentsURL[i], function (error, response, body) {\n if (!error) {\n if(aux === len - 1) {\n endChecker = true;\n }\n parseDocument(body, documentsURL[aux], endChecker);\n } else {\n console.log(error);\n }\n });\n })();\n }\n }", "async function raceRequests (\n urls,\n callback\n) {\n const sources = []\n const requests = urls.map(async (url, i) => {\n const source = CancelToken.source()\n sources.push(source)\n\n // Slightly offset requests by their order, so:\n // 1. We try public gateways first\n // 2. We give requests the opportunity to get canceled if other's are very fast\n await Utils.wait(100 * i)\n\n return new Promise((resolve, reject) => {\n axios({\n method: 'get',\n url,\n responseType: 'blob',\n cancelToken: source.token\n })\n .then(response => {\n resolve({\n blob: response,\n url\n })\n })\n .catch((thrown) => {\n reject(thrown)\n // no-op.\n // If debugging `axios.isCancel(thrown)`\n // can be used to check if the throw was from a cancel.\n })\n })\n })\n const response = await Utils.promiseFight(requests)\n sources.forEach(source => {\n source.cancel('Fetch already succeeded')\n })\n callback(response.url)\n return response.blob\n}", "function _uuajaxparallel(ajax, ary, lastCallback, ngCallback) {\r\n function _nextParallel(hash) {\r\n var idx = atom.indexOf(hash.guid);\r\n\r\n rv[idx] = hash;\r\n ++n >= iz / 3 && !run++ && lastCallback(rv); // callback([{...}, ..])\r\n }\r\n function _error(hash) {\r\n !run++ && ngCallback(hash);\r\n }\r\n\r\n var rv = [], atom = [], i = 0, iz = ary.length, n = 0, run = 0;\r\n\r\n for (; i < iz; i += 3) {\r\n atom.push((ajax ? _uuajax : _uujsonp)(ary[i], ary[i + 1],\r\n ary[i + 2], _error, _nextParallel));\r\n }\r\n}", "static BATCH_GET(requestConfigs, callback) {\n\n let requests = _.map(requestConfigs, requestConfig => {\n let authHeaders = {'Authorization': 'Token ' + ArchestAuth.getToken()};\n let headers = requestConfig.headers ? {...authHeaders, ...requestConfig.headers} : authHeaders;\n return axios.get(requestConfig.url, {params: requestConfig.params, headers: headers});\n });\n\n axios.all(requests).then(axios.spread((...responses) => {\n let callbackParams = {};\n for (let i = 0; i < requestConfigs.length; i++) {\n callbackParams[requestConfigs[i].name] = responses[i];\n }\n callback(callbackParams);\n }));\n }", "async function makerequest() {\r\n \r\n}", "async function requestMultipleUrls(URLs) {\n const aggregatedResponse = mapURLsToFetch(URLs);\n\n return await Promise.all(aggregatedResponse)\n .then((responses) => {\n return new Promise((resolve, reject) => {\n resolve(errorValidator(reject, responses));\n })\n })\n .catch(error => console.log(error));\n}", "async function parallel(count) {\n const swappiPeople = [];\n for (let i = 1; i <= count; i++) {\n swappiPeople.push(\n //Observe no await\n fetch(\"http://api.icndb.com/jokes/random\" )\n .then(res => { return res.json() }));\n }\n const allEntries = await Promise.all(swappiPeople);\n console.log(allEntries.map(p=>p.value.joke).join(\"\\n\")); \n }", "function sendRequests1() {\n sendRequests(tokenList[0], userIdList[0], pathList_1h, nextUser);\n setTimeout(sendRequests1, 3600000);\n}", "function callApi() {\n return setCuisine().then((res) => {\n setIntolerance().then((res2) => {\n setDiet().then((res3) => {\n var tabIntolerances = []\n var tabCuisine = []\n var resultFile = []\n\n // Traitement des résultats inscrit par l'utilisateur\n // Pour pouvoir les mettre dans l'URL\n for(var i = 0; i < res2['intolerances'].length; i++) {\n tabIntolerances += res2['intolerances'][i] + '%2C+'\n }\n\n for(var i = 0; i < res['cuisine'].length; i++) {\n tabCuisine += res['cuisine'][i] + '%2C+'\n }\n\n if(res3 == 'Om nom nom, I eat everything') {\n res3 = ''\n }\n\n unirest.get(`https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/recipes/search?\n diet${res3['diet']}\n &cuisine=${tabCuisine}\n &intolerances=${tabIntolerances}\n &limitLicense=false\n &type=main+course`)\n .header(\"X-Mashape-Key\", \"mnuIxvIQSamshydbUwjdW6RTqapVp1J5b4YjsnJF4NF7n9uRi5\")\n .header(\"Accept\", \"application/json\")\n .end(function (result) {\n var recipes = result.body\n var promises = []\n var compteur = 0 \n var compteurMax = recipes['results'].length - 1\n\n // Permet de récupérer les recettes de manière récursive\n getRecipes(promises, compteur, compteurMax, recipes)\n })\n })\n })\n }) \n}", "function sendRequests4() {\n sendRequests(tokenList[0], userIdList[0], pathList_4h, nextUser);\n setTimeout(sendRequests4, 14400000);\n}", "async batch (items) {\n try {\n for (const item of items) item.id = this.getNextRequestId++\n\n const data = await makeHTTPRequest(this.opts, JSON.stringify(items))\n const batch = JSON.parse(data)\n if (!Array.isArray(batch)) throw new Error(JSON.stringify(batch))\n\n const itemsById = lodash.keyBy(items, 'id')\n for (const { result, error, id } of batch) {\n const { resolve, reject } = itemsById[id]\n if (error) reject(Object.assign(new Error(error.message || error.code), { code: error.code }))\n else if (result === undefined) reject(new TypeError('Missing RPC result'))\n else resolve(result)\n }\n } catch (e) {\n if (e.message === 'Internal server error') {\n return this.batch(items)\n }\n throw e\n }\n }", "threadsRequest(response) {\n // PHP doesn't have threads, but it may have multiple requests in parallel.\n // Think about a website that makes multiple, parallel AJAX requests to your PHP backend.\n // XDebug opens a new socket connection for each of them, we tell VS Code that these are our threads.\n const connections = Array.from(this._connections.values());\n response.body = {\n threads: connections.map(connection => new vscode.Thread(connection.id, `Request ${ connection.id } (${ (0, _moment2.default)(connection.timeEstablished).format('LTS') })`))\n };\n this.sendResponse(response);\n }", "function loop_request(){\r\n let waisted_count = 0; // set to 0\r\n \r\n //requset from api\r\n async function StartR() \r\n {\r\n // request, fetch api data\r\n const response = await fetch(api_url); //fetch\r\n const data = await response.json(); //api\r\n let json_split = JSON.parse(JSON.stringify(data)); // split api data\r\n\r\n // only for the first request\r\n if (beginvar == true){\r\n console.log(\"first try\");\r\n render_call(json_split, waisted_count, beginvar);\r\n last_api = json_split[0].id;\r\n beginvar = false; \r\n } \r\n else{\r\n console.log(\"secound try\");\r\n waisted_count = while_count(last_api, json_split);\r\n render_call(json_split, waisted_count, beginvar);\r\n }\r\n console.log(\"assync vege 15perc \" + \"Last API: \" + last_api);\r\n }\r\n StartR();\r\n}", "function sendRequest(argNumber) {\n http.get(process.argv[argNumber], function(response) {\n let accumulator = '';\n response.setEncoding('utf8');\n response.on('data', function(data) {\n accumulator += data;\n });\n response.on('error', console.error);\n response.on('end', function(args) {\n responses[argNumber - 2] = accumulator;\n requestEnds++;\n\n // Prints results if all requests have ended.\n if (requestEnds === neededRequests) {\n for (let i = 0; i < responses.length; i++) {\n console.log(responses[i]);\n }\n }\n });\n });\n }", "function __request(apiURI, allQueries) {\n request(\n\tapiURI + \"?s=\" + allQueries[\"s\"] + \"&v=\" + allQueries[\"v\"]\n , function (error, response, body) {\n if (!error) {\n \tsetRedisPair(allQueries[\"s\"] + allQueries[\"v\"], body, function() {});\n } else {\n console.log('info', responseResult(\"failure\",\"Access the API went error.\",\"\"));\n }\n });\n}", "async function executeSeqWithForAwait(urls) {\n const responses = [];\n const promises = urls.map((url) => {\n return fetchUrlDataWithAsyncAwait(url);\n });\n\n for await (const res of promises) {\n console.log(res);\n responses.push(res);\n }\n console.log(responses);\n}", "function runRequest(lines) {\n\tif (continueRequesting && lines.length > 0) {\n\t\tvar line = lines.pop()\n\t\t\n\t\tconsole.log('urls to get: ' + lines.length)\n\t\tvar request =\thttp.get(line, function(res) {\n\t\t\tvar body = '';\n\n\t\t\tres.on('error', function(err) {\n\t\t\t\tconsole.log('we got an error!')\n\t\t\t\tconsole.log(e.message);});\n\n\t\t\tres.on('data', function(chunk) {\tbody += chunk; });\n\n\t\t\tres.on('end', function() {\n\t\t\t\tuniqueURLArray.push(line);\n\t\t\t\t//load the cheerio object\n\t\t\t\tvar $ = cheerio.load(body);\n\t\t\t\t//first thing to do is determine the number of pages to link to (there will be a max of 3 pages of info to scrape through and it'd be better to find those pages using cheerio than doing it manually\n\t\t\t\t// the urls are all p2, p3, p4 etc and if we put the first url in there then the rest will follow\n\t\t\t var url = $('a.Next').prev().attr('href'); //the sibling of the next button (which is the last page of results)\n\t\t\t \n\t\t\t //console.log(url, line);\n\t\t\t\tif (url != null) {\n\t\t\t\t\tpgNum = url.replace('.html', '').slice(-2).replace(/[^\\d]/g,''); //get the page number\n\t\t\t\t\tfor (var ii = 2; ii <= pgNum; ii++) {\n\t\t\t\t\t\tuniqueURLArray.push(url.replace(/(-p(\\d+)[.]html)/g, '-p' + ii + '.html'));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//if the request timed out\n\t\t\t\tif (timeout) {\n\t\t\t\t\ttimeout = false;\n\t\t\t\t\tconsole.log(completed_requests, line);\n\t\t\t\t}\n\n\t\t\t\t//once 5 requests are completed start parsing the data\n\t\t\t\tif (completed_requests++ == 5) {\n\t\t \tcontinueRequesting = true;\n\t\t //now get the messages\n\t\t console.log('num urls: ' + uniqueURLArray.length);\n\t\t \n\t\t var messages = [];\n\n\n\t\t getMessages(uniqueURLArray, messages, uniqueURLArray.length);\n\t\t //now the messages are all here\n\t\t //time to filter \n\t\t\t\t}\n\n\t\t\t\tsetTimeout(runRequest(lines), tools.randInt(0,100)); //works with 500-1000\n\t\t\t});\n\t\t});\n\n\t\t//request stuff\n\t\trequest.setTimeout(90000, function () {\n\t\t\trequest.abort();\n\t\t\tconsole.log('request timed out');\n\t\t\ttimeout = true;\n\t\t});\n\t\trequest.on('error', function(e) {\n\t\t\tconsole.log(e);\n\t\t\tcompleted_requests++;\n\t\t});\n\t}\n}", "function sendRequests(token, userId, pathList, callback) {\n var json = {json: {token: token, userId: userId, limit: 2}};\n var i = 0;\n var successCount = 0;\n\n // callback function, executed once the previous post request has completed\n var nextRequest = function (success) {\n // increment a success counter to check if all requests were successful\n if (success) {successCount++;}\n\n // proceed onto next request, or end\n i++;\n\n if (i < pathList.length) {\n postRequest(endpoint, port, \"/api\" + pathList[i], json, nextRequest);\n } else {\n // check all requests returned ok, and return status\n var allSuccessful = true;\n if (successCount !== pathList.length) { allSuccessful = false; }\n return callback(allSuccessful, pathList);\n }\n };\n\n // first post request, which triggers the rest via the callback\n postRequest(endpoint, port, \"/api\" + pathList[i], json, nextRequest);\n}", "function makeAllRequests(titles, scaling_factor, proxy_indexes) {\n //store error keywords in a list to retry later\n var errors = [];\n titles.forEach((title, i) => {\n if (i >= start && i < end) {\n if (i % qps === 0) {\n time += 1000 * scaling_factor;\n }\n for (let j = 0; j < proxy_indexes.length - 1; j++) {\n // cycle through proxies randomly\n let host_index = generateHostIndex(proxy_indexes, j);\n let proxy_info = generateProxyInformation(host_index);\n\n let proxiedRequest = createProxiedRequest(proxy_info.host, proxy_info.user, proxy_info.pass, proxy_info.port);\n let proxyUrl = \"http://\" + proxy_info.user + \":\" + proxy_info.pass + \"@\" + proxy_info.host + \":\" + proxy_info.port;\n\n //console.log(proxyUrl)\n //use the function below if you want to \n //getCurrentIp(proxiedRequest);\n setTimeout(() => {\n //console.log(proxyUrl);\n //console.log(\"what is j: \" + j)\n makeRequest(title, proxiedRequest, proxy_indexes, proxy_info.proxyLocation, proxy_info.host, j, 0) //last param is retry count, set that to zero and increment if the request fails\n }\n , time * (.8 + Math.random()/2.5) //generate a number between .8 and 1.2\n ); \n }\n };\n });\n}", "function makeRequest (url, numTry, maxTries, cb) {\n request(url, (err, res, body) => {\n if (err) {\n if (numTry >= maxTries) {\n cb(err);\n return;\n }\n setTimeout(() => {\n makeRequest(url, numTry + 1, maxTries, cb);\n }, 500 * Math.pow(numTry, 2));\n } else {\n cb(null, res, body);\n }\n });\n}", "setupForMultiRequest(responses) {\n\t\tthis.request = (options, success, error) => {\n\t\t\tfor (var response in responses) {\n\t\t\t\tif (options.host === response) {\n\t\t\t\t\tsuccess(responses[response]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "_requestAPI(paramsURL, callback) {\n console.log('init _requestAPI');\n let options = {\n method: 'POST',\n uri: this.queryURL,\n body: {\n params: 'query=&facets=*&distinct=true&page='+this.pageNumber+'&hitsPerPage=100&facetFilters=type%3AOrganization'+paramsURL,\n apiKey: this.apiKey,\n appID: this.appID\n },\n json: true\n };\n\n request(options)\n .then((response) => {\n console.log(response.nbHits + ' companies exist in this query');\n let NumberUrlsLeftToScrape = response.nbHits - this.filtredCompanies.length;\n console.log(NumberUrlsLeftToScrape + ' companies not scraped yet');\n\n if (response.nbHits - this.filtredCompanies.length < 1) {\n console.log('no companies left to scrape, please change criteria');\n callback();\n } else {\n if (response.hits && response.hits.length > 0) {\n this.pageNumber++;\n response.hits.forEach(comp => {\n let url = (comp.url[0] === '/') ? comp.url.slice(1) : comp.url;\n url = this.baseURL + url;\n if (!_.findWhere(this.companies, {companyName:comp.name}) &&\n !_.findWhere(this.companies, {crunchBaseURL:url}) &&\n !_.findWhere(this.companies, {websiteLink:comp.homepage_url})) {\n this.urlsPool.push({name:comp.name, url:url});\n }\n });\n this.urlsPool = _.uniq(this.urlsPool, 'name');\n\n let max = (NumberUrlsLeftToScrape < this.urlsNumber) ? NumberUrlsLeftToScrape : this.urlsNumber;\n\n console.log('urls returned: '+this.urlsPool.length+' after getting page: '+this.pageNumber);\n\n if (this.urlsPool.length < max) {\n this._requestAPI(paramsURL, () => callback());\n } else {\n callback();\n }\n } else {\n this.pageNumber = (this.pageNumber > response.nbPages) ? 0 : ++this.pageNumber;\n console.log('response didn\\'t return any hits');\n this._requestAPI(paramsURL, () => callback());\n }\n }\n })\n .catch((err) => {\n console.log('ERROR getting list of companies from CB API.. retrying');\n console.log(err);\n clearTimeout(this.retryTimer);\n this.retryTimer = setTimeout(() => {\n this._requestAPI(paramsURL, () => callback());\n }, 30000);\n });\n }", "async function main() {\n // create the promises first\n var call1 = myApiClient(1)\n var call2 = myApiClient(2)\n\n // then wait for them\n var response1 = await call1\n var response2 = await call2\n\n // do something with the responses\n var message = response1['message'] + ' ' + response2['message']\n console.log(message)\n}", "function requestList(api_key, user, page_count){\n var requests = [];\n for(var page = 1; page <= page_count; page++){\n requests.push(requestData(api_key, user, page))\n }\n return requests\n}", "function makeRequests(generator){\t\n\t// Wrapper Function with builtin callback\n\tfunction request(url){\n\t\tmakeAjaxRequest(url, function(response){\n\t\t\tit.next(response); //reference to iterator\n\t\t});\n\t}\n\n\t// Call main and yield the response to us\n\t// 1st time - runs once only\n\tvar it = generator(request); // generates the iterator -> doesnt start \n\tit.next(); \t// start execution of the iterator\n}", "function forLoopingOverCSV(emailArray) {\n return new Promise((resolve, reject)=>{\n let request;\n for (let i = 0; i < emailArray.length; i++) {\n new Promise((res, rej)=>{\n let options = {\n url: endpoint, //https://api.careerbuilder.com/core/bounce/hard\n headers: { Authorization: \"Bearer\" + token, \"request- id\": _requestId },\n json: true,\n body: { Email: emailArray[i] }, //JSON.stringify might be used,\n method: 'POST'\n };\n \n res(options);\n \n }).then((val)=>{\n request = http.request(val, (res)=> {//request variable has higher scope in this method\n console.log('STATUS: ' + res.statusCode);\n console.log('HEADERS: ' + JSON.stringify(res.headers));\n res.setEncoding('utf8');\n res.on('data', function (chunk) {\n console.log('BODY: ' + chunk);\n });\n });\n \n }).then(()=>{\n request.on('error', (e)=>{\n console.log('problem with request: ' + e.message);\n });\n }).catch((error)=>{\n reject({message:`failed for email ${emailArray[i]}`, Error : error})\n })\n \n \n }\n resolve({\"done with email\" : emailArray[i]});\n })\n}", "sendEmailCards(orderUuid, cards) {\n const { dispatch, senderFirstName, senderLastName } = this.props;\n\n // Create promise for each email card.\n const promises = cards.map((card) => {\n const attributes = {\n ...card.emailFormData,\n donations_order_uuid: orderUuid,\n donations_product_uuid: card.product.id,\n field_sender_first_name: senderFirstName,\n field_sender_last_name: senderLastName,\n };\n\n // Remove virtual fields.\n delete attributes.sending_date;\n\n dispatch(checkoutActions.checkoutCardsSending());\n return api.postEmailCard(card, attributes);\n });\n\n // TODO: Can multiple items be sent in one request?\n // Multiple parallel requests (Promise.all) can cause \"Deadlock found when trying to get lock\".\n // Execute requests one by one.\n var sequencePromise = Promise.resolve();\n promises.forEach((promise) => {\n sequencePromise = sequencePromise.then(() => promise);\n });\n\n sequencePromise\n .then(() => {\n // Inform other components that all work is done for gift cards.\n dispatch(checkoutActions.checkoutCardsSent());\n })\n .catch(() => {\n // Complete checkout even if cards are not successfully sent because user can't fix it.\n dispatch(checkoutActions.checkoutCardsSent());\n });\n }", "function _request(model, query64, _t){\n\t\t\t\t$.getJSON(_.template(model.API, { network: options.network || \"umg.fyre.co\" , query: query64} ), requestParams, \n\t\t\t\t\t\t_.bind(self.handleResponse, self, {requestCount:_batches.length, _batch: batch}, callback));\n\t\t\t}", "async function dataRetriever() {\n var $ = await rp(options);\n var count = 0;\n $('.individual_internship').each(async function () {\n\n\n var link = $(this).children('.button_container').children('a').attr('href');\n links.push(link) //making array of all the internship links on the page \n count++;\n }\n )\n //sending requests on all the links \n for (i = 0; i < count; i++) {\n console.log(`https://internshala.com${links[i]}`)\n\n\n await sleep(100) //delay of 0.1sec with each request \n //request execution\n var options1 = {\n uri: `https://internshala.com${links[i]}`,\n transform: function (body) {\n return cheerio.load(body);\n },\n\n }\n await rp(options1).then(async ($) => {\n var res = $('#skillsContainer').text() \n var res1 = $('.stipend_container_table_cell').text()\n console.log(res)\n console.log(\"Stipend : \" + res1) \n }).catch((err) => {\n console.log(err);\n });\n }\n console.log(count);\n}", "doRequestBy(alias, params = {}) {\n const RequestFactoryInstance = new RequestFactory();\n\n this.requests = RequestFactoryInstance.createRequestsBy(alias, params);\n\n // console.log(this.requests);\n\n return this.executeChain();\n }", "function makeRequest (url, numTry, maxTries, cb) {\n request(url, function (err, res, body) {\n if (err) {\n if (numTry >= maxTries) {\n return cb(err);\n }\n setTimeout(function () {\n makeRequest(url, numTry + 1, maxTries, cb);\n }, 500 * Math.pow(numTry, 2));\n } else {\n cb(null, res, body);\n }\n });\n}", "async function dowork() {\n try {\n const response = await makeReques('Google');\n console.log('response received');\n const processingResponse = await processRequest(response);\n console.log(processingResponse);\n\n }\n catch (err) {\n console.log(err);\n }\n}", "_m_exec_http_request(ph_args, pf_process_next_in_queue) {\n const lo_this = this;\n\n const ph_query_opts = ph_args.ph_query_opts;\n\n const pf_json_callback = lo_this.m_pick_option(ph_args, \"pf_json_callback\");\n const pi_timeout_ms = lo_this.m_pick_option(ph_args, \"pi_timeout_ms\");\n const ps_call_context = lo_this.m_pick_option(ph_args, \"ps_call_context\");\n const ps_method = lo_this.m_pick_option(ph_args, \"ps_method\");\n const ps_url_end_point = lo_this.m_pick_option(ph_args, \"ps_url_end_point\");\n const ps_url_path = lo_this.m_pick_option(ph_args, \"ps_url_path\");\n\n const ls_url_full = f_join_non_blank_vals('', f_string_remove_trailing_slash(ps_url_end_point), ps_url_path);\n\n\n // credentials to call our own services\n const ps_http_pass = lo_this.m_pick_option(ph_args, \"ps_http_pass\", true);\n const ps_http_user = lo_this.m_pick_option(ph_args, \"ps_http_user\", true);\n\n /* eslint multiline-ternary:0, no-ternary:0 */\n const lh_auth = (f_string_is_blank(ps_http_pass) ? null : {\n user: ps_http_user,\n pass: ps_http_pass,\n sendImmediately: true\n });\n\n\n // one more call\n lo_this._ai_call_count_exec_total ++;\n f_chrono_start(lo_this._as_queue_chrono_name);\n\n // at first call\n if (lo_this._ab_first_call) {\n lo_this._ab_first_call = false;\n f_console_OUTGOING_CNX(`target=[${ls_url_full}] login=[${ps_http_user}] way=[push] comment=[connection ${lo_this.m_get_context(ps_call_context)}]`);\n }\n\n const ls_full_call_context = lo_this.m_get_context(`[#${lo_this._ai_call_count_exec_total}]`, ps_call_context);\n\n f_console_verbose(1, `${ls_full_call_context} - init`);\n\n // https://github.com/request/request#requestoptions-callback\n const lh_query_opts = f_object_extend({\n method: ps_method,\n url: ls_url_full,\n\n agent: false,\n auth: lh_auth,\n encoding: \"utf8\",\n json: true,\n rejectUnauthorized: false,\n requestCert: false,\n timeout: pi_timeout_ms,\n }, ph_query_opts);\n\n const ls_call_chrono_name = f_digest_md5_hex(f_join_non_blank_vals('~', lo_this._as_queue_chrono_name, lo_this._ai_call_count_exec_total, f_date_format_iso()));\n f_chrono_start(ls_call_chrono_name);\n\n\n // one more pending request in parallel...\n lo_this._ai_parallel_current ++;\n lo_this._ai_parallel_max = f_number_max(lo_this._ai_parallel_max, lo_this._ai_parallel_current);\n\n cm_request(lh_query_opts, function(ps_error, po_response, po_json_response) {\n\n // one less pending request in parallel...\n lo_this._ai_parallel_current --;\n\n const li_call_duration_ms = f_chrono_elapsed_ms(ls_call_chrono_name);\n f_console_verbose(2, `${ls_full_call_context} - call took [${f_human_duration(li_call_duration_ms, true)}]`);\n\n // collect stats\n lo_this._ai_call_duration_total_ms += li_call_duration_ms;\n lo_this._ai_call_duration_max_ms = f_number_max(lo_this._ai_call_duration_max_ms, li_call_duration_ms);\n lo_this._ai_call_duration_min_ms = f_number_min(lo_this._ai_call_duration_min_ms, li_call_duration_ms);\n\n try {\n\n // error ?\n if (f_string_is_not_blank(ps_error)) {\n throw f_console_error(`${ls_full_call_context} - ${ps_error}`);\n }\n\n const li_statusCode = po_response.statusCode;\n if (li_statusCode !== 200) {\n throw f_console_error(`${ls_full_call_context} - call returned statusCode=[${li_statusCode} / ${po_response.statusMessage}] on URL=[${ls_url_full}] - reponse=[${f_console_stringify(po_json_response)}]`);\n }\n\n if (f_is_not_defined(po_json_response)) {\n throw f_console_error(`${ls_full_call_context} - returned an empty body`);\n }\n\n f_console_verbose(3, `${ls_full_call_context} - returned statusCode=[${li_statusCode}] with raw response:`, {\n po_json_response: po_json_response\n });\n\n if (f_is_defined(po_json_response.errors)) {\n throw f_console_error(`${ls_full_call_context} - errors=[${f_console_stringify(po_json_response.errors)}]`);\n }\n\n if (f_is_defined(po_json_response.error)) {\n throw f_console_error(`${ls_full_call_context} - error=[${f_console_stringify(po_json_response.error)}]`);\n }\n\n // give a context to the reply\n po_json_response.as_call_context = ls_full_call_context;\n\n // positive feed-back through the call-back\n pf_json_callback(null, po_json_response);\n }\n\n catch (po_err) {\n f_console_catch(po_err);\n }\n\n // handle the next pending element in the queue\n f_console_verbose(2, `${lo_this.m_get_context()} - next in queue...`);\n pf_process_next_in_queue();\n });\n }", "async execute(){\n\t\tawait this.processRequest();\n\t\tawait this.formatRequest();\n\t\tawait this.processData();\n\t\tawait this.formatResponse();\n\t\tawait this.processResponse();\n\t}", "async function callApi() {\n let j = 1;\n //--starting with 2 pages of 30 entries--//\n for (j = 1; j <= 3; j++) {\n let ans;\n\n try {\n let repoSearchURL =\n \"https://api.github.com/search/repositories?q=\" +\n projkey +\n \"&page=\" +\n j;\n if (j === 1) {\n ans = await axios.get(repoSearchURL);\n } else {\n let pager = repoSearchURL + \"; rel='next'\";\n ans = await axios.get(pager);\n }\n repoIterate(ans);\n } catch (error) {\n console.log(error);\n }\n }\n console.log(logRepos);\n}", "function startAPIRequests()\t{\n // Get app configuration.\n loadConfig().then(() => {\n // -> Get save data.\n afterConfigLoaded();\n loadVideoInformation().then(() => {\n // -> start requesting subs.\n requestSubs();\n });\n });\n}", "function request(url){\n\t\tmakeAjaxRequest(url, function(response){\n\t\t\tit.next(response); //reference to iterator\n\t\t});\n\t}", "function getData() {\n //use the number of records info from the first API call\n return rp(getNum)\n .then(function(ret) {\n // console.log(\"**from keys.js * totalSize = \" + ret.totalSize);\n //determine the number of API calls needed\n size = ret.totalSize;\n callNumber = Math.ceil(size / 200);\n var requestPromiseArray = [];\n for (j = 0; j < callNumber; j++) {\n //create the requestPromiseArray using a loop\n options = {\n method: 'GET',\n uri: 'https://api.salesforceiq.com/v2/lists/57114e10e4b0a3f93805ebc6/listitems?_start=' + URLcounter + '&_limit=200',\n headers: {\n 'Authorization': auth,\n 'Content-type': 'application/json'\n },\n json: true\n }\n if (!options.uri) {}\n //push each call result into the array\n requestPromiseArray.push(rp(options));\n URLcounter = URLcounter + 200;\n }\n //return all the API calls\n return Promise.all(requestPromiseArray); \n })\n .then(function(totalRecords) {\n //join the API calls into one array\n return totalRecords.reduce(function(initial, following) {\n return initial.concat(following.objects);\n }, []);\n })\n .catch(function(err) {\n console.log(\"error in API call\")\n });\n}", "async function fetchEmployees(){\n\t\t\t\tconst ids = [8569129, 254808831, 58197, 651065]\n\t\t\t\t//const promises = ids.map(id => API.getEmployee(id))\n\t\t\t\tconst promises = ids.map(API.getEmployee)\n\t\t\t\treturn Promise.all(promises)\n\n\t\t\t\t// solution (2)\n\t\t\t\t/*const p1 = await API.getEmployee(8569129)\n\t\t\t\tconst p2 = await API.getEmployee(254808831)\n\t\t\t\tconst p3 = await API.getEmployee(58197)\n\t\t\t\tconst p4 = await API.getEmployee(651065)\n\t\t\t\treturn Promise.all[e1, e2, e3, e4] */\n\n\t\t\t\t// solution (3)\n\t\t\t\t/*const p1 = await API.getEmployee(8569129)\n\t\t\t\tconst p2 = await API.getEmployee(254808831)\n\t\t\t\tconst p3 = await API.getEmployee(58197)\n\t\t\t\tconst p4 = await API.getEmployee(651065)\n\t\t\t\treturn [await e1, await e2, await e3, await e4] */\n\n\t\t\t\t// solution (4) - parallel requests + parallel awaiting\n\t\t\t\t/*const res = []\n\t\t\t\tconst promises = ids.map(async (id, idx) => {\n\t\t\t\t\tconst e = await API.getEmployee(id)\n\t\t\t\t\tres[idx] = e\n\t\t\t\t}) \n\t\t\t\tawait Promise.all(promises)\n\t\t\t\treturn res*/\n\t\t\t}", "async sendBatch(batch) {\n // We create the errors here to capture the stack traces at this point,\n // the async call that follows would probably loose of the stack trace\n const error = new errors_2.ProviderError(\"HttpProviderError\", -1);\n // we need this to sort the responses\n const idToIndexMap = {};\n const requests = batch.map((r, i) => {\n const jsonRpcRequest = this._getJsonRpcRequest(r.method, r.params);\n idToIndexMap[jsonRpcRequest.id] = i;\n return jsonRpcRequest;\n });\n const jsonRpcResponses = await this._fetchJsonRpcResponse(requests);\n for (const response of jsonRpcResponses) {\n if (isErrorResponse(response)) {\n error.message = response.error.message;\n error.code = response.error.code;\n error.data = response.error.data;\n // eslint-disable-next-line @nomiclabs/only-hardhat-error\n throw error;\n }\n }\n // We already know that it has this type, but TS can't infer it.\n const responses = jsonRpcResponses;\n // we use the id to sort the responses so that they match the order of the requests\n const sortedResponses = responses\n .map((response) => [idToIndexMap[response.id], response.result])\n .sort(([indexA], [indexB]) => indexA - indexB)\n .map(([, result]) => result);\n return sortedResponses;\n }", "async function StartR() \r\n {\r\n // request, fetch api data\r\n const response = await fetch(api_url); //fetch\r\n const data = await response.json(); //api\r\n let json_split = JSON.parse(JSON.stringify(data)); // split api data\r\n\r\n // only for the first request\r\n if (beginvar == true){\r\n console.log(\"first try\");\r\n render_call(json_split, waisted_count, beginvar);\r\n last_api = json_split[0].id;\r\n beginvar = false; \r\n } \r\n else{\r\n console.log(\"secound try\");\r\n waisted_count = while_count(last_api, json_split);\r\n render_call(json_split, waisted_count, beginvar);\r\n }\r\n console.log(\"assync vege 15perc \" + \"Last API: \" + last_api);\r\n }", "function makeCalls(username, total){\n var calls = [];\n for(var i = 2; i <= total; i++){\n calls.push(axios.get('https://api.github.com/users/' + username + '/repos?page=' + i.toString()));\n }\n return calls;\n}", "async function executeRequest(url) {\n return new Promise(resolve => {\n request(url, (err, res, body) => {\n if (err) console.log(err);\n resolve(body);\n });\n })\n}", "async function sendRequest(priorToDate = null) {\n // Append priorToDate query string parameter if given; Sets momentum api a range of requested data\n const thinOptions = Object.assign(options, !priorToDate ? {} : {uri: `${apiUrl}?priorToDate=${priorToDate}`});\n\n try {\n const body = await rp.get(thinOptions)\n\n // Assuming we're not on empty state, we can save the received data from current iteration and call up another round\n if (body !== emptyStateString) {\n receivedData.push(body); // Push a new dataBlock for each request iteration\n\n // As per client defaults, momentum sets a gap of 39-days before each request\n date = date.subtract(39, 'days');\n const nextDateFormatted = date.format('YYYY-MM-DD'); // Format date as string for priorToDate expected format\n sendRequest(nextDateFormatted); // Call up another iteration with the next gapped date from current\n\n logger(`Sending next request for: ${nextDateFormatted}`);\n } else {\n // Resolve the fetchAllData promise, indicating all available data has been fetched and the recursion has reached its stop condition\n resolve(receivedData);\n logger(`All available data fetched (${receivedData.length} requests sent)`)\n }\n } catch (error) {\n // In case any of this business has failed, reject the fetchAllData promise with provided error\n reject(error);\n }\n }", "function batchRequests(coords){\n var batchSize = parameters.batchSize-1;\n\n for (var c = 0; c < coords.length; c+=batchSize){\n var batch = coords.slice(c,c+batchSize);\n batch.unshift(startingPosition);\n makeRequest(batch)\n }\n }", "async function getRequest(urlFinal){\n console.log('Recibiendo respuestas de todos')\n for (const server in servers) {\n try {\n console.log(`${servers[server].path}${urlFinal}`)\n response = await axios(`${servers[server].path}${urlFinal}`)\n console.log(response.data)\n if(urlFinal ==='id_server'){\n if(response.data > id){\n serversHiguer.push({path: servers[server].path, id: servers[server].id})\n }\n }\n servers[server].alive = true;\n } catch(err) {\n console.log('err.Error')\n servers[server].alive = false;\n servers[server].isLeader = false;\n }\n }\n}", "function request1() {\n return new Promise((resolve, reject) => {\n setTimeout(() => resolve ({\n data: 'Data',\n makeAnotherRequest: true\n }), 2000);\n });\n }", "setupForMultiGet(responses) {\n\t\tthis.get = (url, success, error) => {\n\t\t\tfor (var response in responses) {\n\t\t\t\tif (url.contains(response)) {\n\t\t\t\t\tsuccess(response);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function callAPIs( APIs ) {\n var API = APIs.shift();\n setTimeout(function(){\n console.log(API);\n request(API, function(err, res, body) { \n if( APIs.length ) {\n callAPIs ( APIs );\n }\n });\n },3000);\n}", "function getData (cb) {\n let url = known_data_instances[Math.floor(Math.random() * known_data_instances.length)]\n\n console.log(url)\n // Do something with the requests\n // request(url, {json: true}, (err, res, data) => {\n // if (err) return cb(err)\n\n // cb(null, data)\n // })\n}", "function startRequest() {\n return __awaiter(this, void 0, void 0, function* () {\n js_logger_1.default.info('start HTTP Request...');\n yield getList('record').then(list => {\n console.log(list);\n storageChrome_1.localAsyncSet({\n '__recordList': JSON.stringify(list)\n });\n js_logger_1.default.info('recordList Refreshed', list);\n });\n yield getList('search').then(list => {\n console.log(list);\n storageChrome_1.localAsyncSet({\n '__searchList': JSON.stringify(list)\n });\n js_logger_1.default.info('searchList Refreshed', list);\n });\n let recordList = JSON.parse(storageChrome_1.localSyncGet('__recordList'));\n let searchList = JSON.parse(storageChrome_1.localSyncGet('__searchList'));\n console.log('refreshed all', recordList, searchList);\n chrome.webRequest.onBeforeRequest.removeListener(webRequest_1.callback);\n chrome.webRequest.onBeforeRequest.addListener(webRequest_1.callback, webRequest_1.filter(), opt_extraInfoSpec);\n });\n}", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = new ExportedMap();\n requests.forEach(function (request) {\n if (requestsById.has(request.id)) {\n requestsById.get(request.id).push(request);\n } else {\n requestsById.set(request.id, [request]);\n }\n });\n\n var numDocs = requestsById.size;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = [];\n requestsById.forEach(function (value, key) {\n allRequests.push(key);\n });\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById.get(docId);\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax', 'latest'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n }", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = new pouchdbCollections.Map();\n requests.forEach(function (request) {\n if (requestsById.has(request.id)) {\n requestsById.get(request.id).push(request);\n } else {\n requestsById.set(request.id, [request]);\n }\n });\n\n var numDocs = requestsById.size;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = [];\n requestsById.forEach(function (value, key) {\n allRequests.push(key);\n });\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById.get(docId);\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax', 'latest'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n }", "function redditRequests(cb) {\n const redditHeaders = {\n 'User-Agent': redditUserAgent,\n 'Authorization': 'Bearer ' + process.env.REDDIT_BEARER_TOKEN\n },\n subredditsOptions = {\n url: redditUrl + `/subreddits/popular?limit=${subredditCount}`,\n headers: redditHeaders,\n json: true,\n };\n\n /**\n * Dates generated used for 24 hour filtration\n * @type {Date}\n */\n const d = new Date(),\n endTime = Math.floor(Date.parse(d) / 1000),\n startTime = Math.floor(d.setDate(d.getDate() - 1) / 1000);\n\n rp(subredditsOptions)\n .then((body) => {\n let subs = [];\n // subs = body.data.children;\n // subs.sort((a, b) => {return b.data.subscribers - a.data.subscribers});\n body.data.children.forEach((item) => subs.push(item.data.display_name));\n return subs;\n })\n .then((subs) => {\n let calls = [];\n subs.forEach((sub) => {\n let threadOptions = {\n url: redditUrl + `/r/${sub}/search?g=GLOBAL&limit=${threadCount}&sort=top&rank=hot&q=timestamp:${startTime}..${endTime}&restrict_sr=on&syntax=cloudsearch`,\n headers: redditHeaders,\n json: true,\n };\n\n calls.push((callback) => {\n rp(threadOptions)\n .then((body) => {\n let cleanedThreads = [];\n body.data.children.forEach((item) => {\n cleanedThreads.push({\n \"subreddit\": item.data.subreddit,\n \"id\": item.data.id,\n \"title\": item.data.title,\n \"score\": item.data.score,\n \"over_18\": item.data.over_18,\n \"subreddit_id\": item.data.subreddit_id,\n \"name\": item.data.name,\n \"subreddit_type\": item.data.subreddit_type,\n \"url\": item.data.url,\n \"created_utc\": item.data.created_utc,\n \"author\": item.data.author,\n \"ups\": item.data.ups,\n \"num_comments\": item.data.num_comments\n })\n });\n callback(null, cleanedThreads);\n })\n .catch((err) => {\n callback(err);\n });\n });\n });\n\n async.parallel(calls, (err, result) => {\n if (err) return console.error(err);\n result.forEach((item) => {\n threads = threads.concat(item);\n });\n cb(null, threads);\n });\n })\n .catch(console.error);\n}", "function _fetchFromRemoteService(requestBatch) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // Simulate a slow network request to the server;\n return [4\n /*yield*/\n , pause(1000)];\n\n case 1:\n // Simulate a slow network request to the server;\n _a.sent();\n\n return [2\n /*return*/\n , requestBatch.map(function (request) {\n var operation = request.operation,\n args = request.args;\n\n try {\n if (operation === \"div2\") {\n // Divide the first argument by the second argument.\n return {\n result: args[0] / args[1]\n };\n } else if (operation === \"mul2\") {\n // Multiply the arguments for the given entry.\n var myresult = args[0] * args[1];\n console.log(myresult);\n return {\n result: myresult\n };\n } else {\n return {\n error: \"Operation not supported: \" + operation\n };\n }\n } catch (error) {\n return {\n error: \"Operation failed: \" + operation\n };\n }\n })];\n }\n });\n });\n}", "function doTheWork(){\n console.log('Getting the stock price...')\n request(url, getStockInfoBody);\n}", "async function getLatestStreamUpdate(clients) {\n /*for (let client = 0; client < clients; client++) {\n let data = await executeRequest('http://localhost:8080/RawData/latest');\n console.log(data);\n }*/\n}", "function bulkGet(db, opts, callback) {\n\t var requests = opts.docs;\n\t\n\t // consolidate into one request per doc if possible\n\t var requestsById = {};\n\t requests.forEach(function (request) {\n\t if (request.id in requestsById) {\n\t requestsById[request.id].push(request);\n\t } else {\n\t requestsById[request.id] = [request];\n\t }\n\t });\n\t\n\t var numDocs = Object.keys(requestsById).length;\n\t var numDone = 0;\n\t var perDocResults = new Array(numDocs);\n\t\n\t function collapseResultsAndFinish() {\n\t var results = [];\n\t perDocResults.forEach(function (res) {\n\t res.docs.forEach(function (info) {\n\t results.push({\n\t id: res.id,\n\t docs: [info]\n\t });\n\t });\n\t });\n\t callback(null, {results: results});\n\t }\n\t\n\t function checkDone() {\n\t if (++numDone === numDocs) {\n\t collapseResultsAndFinish();\n\t }\n\t }\n\t\n\t function gotResult(docIndex, id, docs) {\n\t perDocResults[docIndex] = {id: id, docs: docs};\n\t checkDone();\n\t }\n\t\n\t var allRequests = Object.keys(requestsById);\n\t\n\t var i = 0;\n\t\n\t function nextBatch() {\n\t\n\t if (i >= allRequests.length) {\n\t return;\n\t }\n\t\n\t var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n\t var batch = allRequests.slice(i, upTo);\n\t processBatch(batch, i);\n\t i += batch.length;\n\t }\n\t\n\t function processBatch(batch, offset) {\n\t batch.forEach(function (docId, j) {\n\t var docIdx = offset + j;\n\t var docRequests = requestsById[docId];\n\t\n\t // just use the first request as the \"template\"\n\t // TODO: The _bulk_get API allows for more subtle use cases than this,\n\t // but for now it is unlikely that there will be a mix of different\n\t // \"atts_since\" or \"attachments\" in the same request, since it's just\n\t // replicate.js that is using this for the moment.\n\t // Also, atts_since is aspirational, since we don't support it yet.\n\t var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n\t docOpts.open_revs = docRequests.map(function (request) {\n\t // rev is optional, open_revs disallowed\n\t return request.rev;\n\t });\n\t\n\t // remove falsey / undefined revisions\n\t docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\t\n\t var formatResult = identityFunction;\n\t\n\t if (docOpts.open_revs.length === 0) {\n\t delete docOpts.open_revs;\n\t\n\t // when fetching only the \"winning\" leaf,\n\t // transform the result so it looks like an open_revs\n\t // request\n\t formatResult = formatResultForOpenRevsGet;\n\t }\n\t\n\t // globally-supplied options\n\t ['revs', 'attachments', 'binary', 'ajax'].forEach(function (param) {\n\t if (param in opts) {\n\t docOpts[param] = opts[param];\n\t }\n\t });\n\t db.get(docId, docOpts, function (err, res) {\n\t var result;\n\t /* istanbul ignore if */\n\t if (err) {\n\t result = [{error: err}];\n\t } else {\n\t result = formatResult(res);\n\t }\n\t gotResult(docIdx, docId, result);\n\t nextBatch();\n\t });\n\t });\n\t }\n\t\n\t nextBatch();\n\t\n\t}", "function api_proc(q) {\n if (q.setimmediate) {\n clearTimeout(q.setimmediate);\n q.setimmediate = false;\n }\n if (q.ctxs[q.i].length || !q.ctxs[q.i ^ 1].length) return;\n q.i ^= 1;\n if (!q.xhr) q.xhr = getxhr();\n q.xhr.q = q;\n q.xhr.onerror = function() {\n if (!this.q.cancelled) {\n if (d) console.log('API request error - retrying');\n api_reqerror(q, -3);\n }\n }\n q.xhr.onload = function() {\n if (!this.q.cancelled) {\n var t;\n if (this.status == 200) {\n var response = this.responseText || this.response;\n if (d) console.log('API response: ', response);\n try {\n t = JSON.parse(response);\n if (response[0] == '{') t = [\n t\n ];\n } catch (e) {\n // bogus response, try again\n console.log('Bad JSON data in response: ' + response);\n t = EAGAIN;\n }\n } else {\n if (d) console.log('API server connection failed (error ' + this.status + ')');\n t = ERATELIMIT;\n }\n if (typeof t == 'object') {\n for (var i = 0; i < this.q.ctxs[this.q.i].length; i++)\n if (this.q.ctxs[this.q.i][i].callback) this.q.ctxs[this.q.i][i].callback(t[i], this.q.ctxs[this.q.i][i], this);\n this.q.rawreq = false;\n this.q.backoff = 0; // request succeeded - reset backoff timer\n this.q.cmds[this.q.i] = [];\n this.q.ctxs[this.q.i] = [];\n api_proc(q);\n } else api_reqerror(this.q, t);\n }\n }\n if (q.rawreq === false) {\n q.url = apipath + q.service + '?id=' + (q.seqno++) + '&' + q.sid;\n if (typeof q.cmds[q.i][0] == 'string') {\n q.url += '&' + q.cmds[q.i][0];\n q.rawreq = '';\n } else q.rawreq = JSON.stringify(q.cmds[q.i]);\n }\n api_send(q);\n}", "async run() {\n for (let par of this._combinations) {\n this._results.push({\n params: par,\n results: await this._run_callback(par)\n });\n }\n }", "function getNumberOfHolders(address){\r\n for(i = 0 ; i<=2; i++){ //request the same URL for maximun 10 times (concurrency = 1)\r\n url_pool.push(composeRequestConfig(0, address)); //&start=0 \r\n } \r\n\r\n var poolPromise = pool.start(); // Start the pool\r\n\r\n return poolPromise.then(function () {\r\n //console.log('----------------------All promises fulfilled-----------------------');\r\n console.log(total);\r\n return total;\r\n }\r\n );\r\n\r\n}", "async function getQuestions(baseURL, courseID, quizID, questionsCount){\n\n //build array of urls to use\n let urls = []\n let perPage = 10\n var pagesCount = Math.ceil(questionsCount / perPage)\n for(var page = 1; page <= pagesCount; page++){\n let url = baseURL + \"/courses/\" + courseID + \"/quizzes/\" + quizID + \"/questions?page=\" + page + \"&per_page=\" + perPage\n urls.push(url)\n }\n\n //call all urls\n const promises = urls.map(fetchQuestion);\n // wait until all promises are resolved\n\n\n let questions = []\n await Promise.all(promises).then(p => {\n p.forEach(q => q.forEach(q => questions.push(q)))\n })\n\n return questions\n}", "function bulkGet(db, opts, callback) {\n\t var requests = opts.docs;\n\n\t // consolidate into one request per doc if possible\n\t var requestsById = new ExportedMap();\n\t requests.forEach(function (request) {\n\t if (requestsById.has(request.id)) {\n\t requestsById.get(request.id).push(request);\n\t } else {\n\t requestsById.set(request.id, [request]);\n\t }\n\t });\n\n\t var numDocs = requestsById.size;\n\t var numDone = 0;\n\t var perDocResults = new Array(numDocs);\n\n\t function collapseResultsAndFinish() {\n\t var results = [];\n\t perDocResults.forEach(function (res) {\n\t res.docs.forEach(function (info) {\n\t results.push({\n\t id: res.id,\n\t docs: [info]\n\t });\n\t });\n\t });\n\t callback(null, {results: results});\n\t }\n\n\t function checkDone() {\n\t if (++numDone === numDocs) {\n\t collapseResultsAndFinish();\n\t }\n\t }\n\n\t function gotResult(docIndex, id, docs) {\n\t perDocResults[docIndex] = {id: id, docs: docs};\n\t checkDone();\n\t }\n\n\t var allRequests = [];\n\t requestsById.forEach(function (value, key) {\n\t allRequests.push(key);\n\t });\n\n\t var i = 0;\n\n\t function nextBatch() {\n\n\t if (i >= allRequests.length) {\n\t return;\n\t }\n\n\t var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n\t var batch = allRequests.slice(i, upTo);\n\t processBatch(batch, i);\n\t i += batch.length;\n\t }\n\n\t function processBatch(batch, offset) {\n\t batch.forEach(function (docId, j) {\n\t var docIdx = offset + j;\n\t var docRequests = requestsById.get(docId);\n\n\t // just use the first request as the \"template\"\n\t // TODO: The _bulk_get API allows for more subtle use cases than this,\n\t // but for now it is unlikely that there will be a mix of different\n\t // \"atts_since\" or \"attachments\" in the same request, since it's just\n\t // replicate.js that is using this for the moment.\n\t // Also, atts_since is aspirational, since we don't support it yet.\n\t var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n\t docOpts.open_revs = docRequests.map(function (request) {\n\t // rev is optional, open_revs disallowed\n\t return request.rev;\n\t });\n\n\t // remove falsey / undefined revisions\n\t docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n\t var formatResult = identityFunction;\n\n\t if (docOpts.open_revs.length === 0) {\n\t delete docOpts.open_revs;\n\n\t // when fetching only the \"winning\" leaf,\n\t // transform the result so it looks like an open_revs\n\t // request\n\t formatResult = formatResultForOpenRevsGet;\n\t }\n\n\t // globally-supplied options\n\t ['revs', 'attachments', 'binary', 'ajax', 'latest'].forEach(function (param) {\n\t if (param in opts) {\n\t docOpts[param] = opts[param];\n\t }\n\t });\n\t db.get(docId, docOpts, function (err, res) {\n\t var result;\n\t /* istanbul ignore if */\n\t if (err) {\n\t result = [{error: err}];\n\t } else {\n\t result = formatResult(res);\n\t }\n\t gotResult(docIdx, docId, result);\n\t nextBatch();\n\t });\n\t });\n\t }\n\n\t nextBatch();\n\n\t}", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = {};\n requests.forEach(function (request) {\n if (request.id in requestsById) {\n requestsById[request.id].push(request);\n } else {\n requestsById[request.id] = [request];\n }\n });\n\n var numDocs = Object.keys(requestsById).length;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = Object.keys(requestsById);\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById[docId];\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n}", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = {};\n requests.forEach(function (request) {\n if (request.id in requestsById) {\n requestsById[request.id].push(request);\n } else {\n requestsById[request.id] = [request];\n }\n });\n\n var numDocs = Object.keys(requestsById).length;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = Object.keys(requestsById);\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById[docId];\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n}", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = {};\n requests.forEach(function (request) {\n if (request.id in requestsById) {\n requestsById[request.id].push(request);\n } else {\n requestsById[request.id] = [request];\n }\n });\n\n var numDocs = Object.keys(requestsById).length;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = Object.keys(requestsById);\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById[docId];\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n}", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = {};\n requests.forEach(function (request) {\n if (request.id in requestsById) {\n requestsById[request.id].push(request);\n } else {\n requestsById[request.id] = [request];\n }\n });\n\n var numDocs = Object.keys(requestsById).length;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = Object.keys(requestsById);\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById[docId];\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n}", "async function distribute() {\n // Running Promises in parallel\n const listOfPromises = listOfOptions.map(asyncOperation);\n // Harvesting\n return await Promise.all(listOfPromises);\n}", "async function downloaderCaller({ username, repoTitle, branch }) {\n for (let i = 0; i < toDownload.length; i++) {\n let j = i;\n const sz = Math.min(i + 20, toDownload.length); // making combination of serially and parallely\n const batchDownload_p = [];\n while (j < sz) {\n const download_p = downloadFile({\n ...toDownload[j++],\n // useBrowser: browser, // uncomment to use [visible] browser to download\n username,\n repoTitle,\n branch,\n });\n batchDownload_p.push(download_p);\n }\n await Promise.all(batchDownload_p);\n i = j - 1;\n }\n}", "function makeRequest(options, responseEndCallback, requestId){\n //console.log('making request to url: ' + options.url);\n var url = options.url,\n path = '';\n\n if(!options.url){\n var randomIndex=Math.floor(Math.random()*options.urls.length);//randomly select an index in the urls array\n url = options.urls[randomIndex];\n //console.log('url: %s randomIndex: %s', url, randomIndex);\n }\n\n //seperate the base url from the path.\n var firstSlashIndex = url.indexOf('/');\n if(firstSlashIndex >= 0){\n path = url.substr(firstSlashIndex);\n url = url.substr(0, firstSlashIndex);\n }\n\n //try using agent to get around ECONNRESET. seems to work!\n //var agent = new http.Agent();\n //agent.maxSockets = 20; //1 socket = 1936/2000 success. 10 socket = 1995/2000 success. 20 socket = 2000/2000 success!\n var agent = options.useAgents ? agentProvider.getAgent() : false; //false;//\n\n //create the request options for the http.request api.\n var requestOptions = {\n hostname: url,\n port: options.port,\n path: path,\n method: options.requestMethod,\n agent:agent, //try to fix ECONNRESET, socket closed issue.\n headers:{\n 'connection': options.connectionHeader, //'close' or 'keep-alive'\n 'requestid': requestId\n }\n };\n\n //initiate the request\n var req = http.request(requestOptions, function(res) {\n //console.log('creating request');\n pound.openConnections++;//increment count to keep track\n pound.requestsGenerated++;\n pound.requestsPerSecond = pound.requestsGenerated / ((new Date().getTime() - pound.startMilliseconds) / 1000);\n //console.log('open connections %s - open', pound.openConnections);\n pound.highestOpenConnectionsAtOneTime = pound.openConnections > pound.highestOpenConnectionsAtOneTime ? pound.openConnections : pound.highestOpenConnectionsAtOneTime;\n\n //console.log('STATUS: ' + res.statusCode);\n //console.log('HEADERS: ' + JSON.stringify(res.headers));\n //res.setEncoding('utf8');\n\n //Indicates that the underlaying connection was terminated before response.end() was called or able to flush.\n res.on('close', function(){ // this isn't getting called.\n console.log('response close called');\n });\n\n res.on('end', function(){\n pound.openConnections--;\n });\n //then you must consume the data from the response object, either by calling response.read() whenever there is a 'readable' event\n res.on('readable', function(message){\n //console.log('readable event fired');\n res.read();\n });\n\n }.bind({requestId:requestId}));\n\n //wait for the response\n /**\n * http://nodejs.org/docs/latest/api/http.html#http_class_http_agent\n * If no 'response' handler is added, then the response will be entirely discarded. However, if you add a 'response' event handler, then you must consume the data from the response object,\n * either by calling response.read() whenever there is a 'readable' event, or by adding a 'data' handler, or by calling the .resume() method.\n * Until the data is consumed, the 'end' event will not fire.\n */\n req.on('response', function(resp){\n //console.log('response received');\n //pound.openConnections--;\n \n pound.responsesReceived++;\n pound.responsesPerSecond = pound.responsesReceived / ((new Date().getTime() - pound.startMilliseconds) / 1000);\n //console.log('open connections %s - close', pound.openConnections);\n if(responseEndCallback){\n responseEndCallback(this.requestId);\n }\n });\n\n //log request errors.\n req.on('error', function(e) {\n pound.requestErrorCount++;\n console.warn('problem with requestId: %s to url: %s message: %s \\n complete: %s', this.requestId, this.url, e.message, JSON.stringify(e));\n }.bind({url:url, requestId:requestId}));\n\n //TODO: allow for request timeouts?\n // req.setTimeout(options.requestTimeout, function(e){\n // console.log('timeout for url %s', this.url);\n // this.req.end();\n // this.req.destroy();\n // }.bind({url:url, req:req}));\n\n // write data to request body\n //req.write('data\\n');\n //req.write('data\\n');\n req.end();\n }", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = new ExportedMap();\n requests.forEach(function (request) {\n if (requestsById.has(request.id)) {\n requestsById.get(request.id).push(request);\n } else {\n requestsById.set(request.id, [request]);\n }\n });\n\n var numDocs = requestsById.size;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = [];\n requestsById.forEach(function (value, key) {\n allRequests.push(key);\n });\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById.get(docId);\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax', 'latest'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n}", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = new ExportedMap();\n requests.forEach(function (request) {\n if (requestsById.has(request.id)) {\n requestsById.get(request.id).push(request);\n } else {\n requestsById.set(request.id, [request]);\n }\n });\n\n var numDocs = requestsById.size;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = [];\n requestsById.forEach(function (value, key) {\n allRequests.push(key);\n });\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById.get(docId);\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax', 'latest'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n}", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = new ExportedMap();\n requests.forEach(function (request) {\n if (requestsById.has(request.id)) {\n requestsById.get(request.id).push(request);\n } else {\n requestsById.set(request.id, [request]);\n }\n });\n\n var numDocs = requestsById.size;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = [];\n requestsById.forEach(function (value, key) {\n allRequests.push(key);\n });\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById.get(docId);\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax', 'latest'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n}", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = new ExportedMap();\n requests.forEach(function (request) {\n if (requestsById.has(request.id)) {\n requestsById.get(request.id).push(request);\n } else {\n requestsById.set(request.id, [request]);\n }\n });\n\n var numDocs = requestsById.size;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = [];\n requestsById.forEach(function (value, key) {\n allRequests.push(key);\n });\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById.get(docId);\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax', 'latest'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n}", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = new ExportedMap();\n requests.forEach(function (request) {\n if (requestsById.has(request.id)) {\n requestsById.get(request.id).push(request);\n } else {\n requestsById.set(request.id, [request]);\n }\n });\n\n var numDocs = requestsById.size;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = [];\n requestsById.forEach(function (value, key) {\n allRequests.push(key);\n });\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById.get(docId);\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax', 'latest'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n}", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = new ExportedMap();\n requests.forEach(function (request) {\n if (requestsById.has(request.id)) {\n requestsById.get(request.id).push(request);\n } else {\n requestsById.set(request.id, [request]);\n }\n });\n\n var numDocs = requestsById.size;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = [];\n requestsById.forEach(function (value, key) {\n allRequests.push(key);\n });\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById.get(docId);\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax', 'latest'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n}", "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = new ExportedMap();\n requests.forEach(function (request) {\n if (requestsById.has(request.id)) {\n requestsById.get(request.id).push(request);\n } else {\n requestsById.set(request.id, [request]);\n }\n });\n\n var numDocs = requestsById.size;\n var numDone = 0;\n var perDocResults = new Array(numDocs);\n\n function collapseResultsAndFinish() {\n var results = [];\n perDocResults.forEach(function (res) {\n res.docs.forEach(function (info) {\n results.push({\n id: res.id,\n docs: [info]\n });\n });\n });\n callback(null, {results: results});\n }\n\n function checkDone() {\n if (++numDone === numDocs) {\n collapseResultsAndFinish();\n }\n }\n\n function gotResult(docIndex, id, docs) {\n perDocResults[docIndex] = {id: id, docs: docs};\n checkDone();\n }\n\n var allRequests = [];\n requestsById.forEach(function (value, key) {\n allRequests.push(key);\n });\n\n var i = 0;\n\n function nextBatch() {\n\n if (i >= allRequests.length) {\n return;\n }\n\n var upTo = Math.min(i + MAX_NUM_CONCURRENT_REQUESTS, allRequests.length);\n var batch = allRequests.slice(i, upTo);\n processBatch(batch, i);\n i += batch.length;\n }\n\n function processBatch(batch, offset) {\n batch.forEach(function (docId, j) {\n var docIdx = offset + j;\n var docRequests = requestsById.get(docId);\n\n // just use the first request as the \"template\"\n // TODO: The _bulk_get API allows for more subtle use cases than this,\n // but for now it is unlikely that there will be a mix of different\n // \"atts_since\" or \"attachments\" in the same request, since it's just\n // replicate.js that is using this for the moment.\n // Also, atts_since is aspirational, since we don't support it yet.\n var docOpts = pick(docRequests[0], ['atts_since', 'attachments']);\n docOpts.open_revs = docRequests.map(function (request) {\n // rev is optional, open_revs disallowed\n return request.rev;\n });\n\n // remove falsey / undefined revisions\n docOpts.open_revs = docOpts.open_revs.filter(identityFunction);\n\n var formatResult = identityFunction;\n\n if (docOpts.open_revs.length === 0) {\n delete docOpts.open_revs;\n\n // when fetching only the \"winning\" leaf,\n // transform the result so it looks like an open_revs\n // request\n formatResult = formatResultForOpenRevsGet;\n }\n\n // globally-supplied options\n ['revs', 'attachments', 'binary', 'ajax', 'latest'].forEach(function (param) {\n if (param in opts) {\n docOpts[param] = opts[param];\n }\n });\n db.get(docId, docOpts, function (err, res) {\n var result;\n /* istanbul ignore if */\n if (err) {\n result = [{error: err}];\n } else {\n result = formatResult(res);\n }\n gotResult(docIdx, docId, result);\n nextBatch();\n });\n });\n }\n\n nextBatch();\n\n}", "async send(request, response) {}", "function buildRequests (csw, start, increment, callback) {\n utility.buildGetRecords(csw, start, increment, function (getUrl) {\n callback(getUrl);\n });\n}", "function goRequest(i){\n\tvar requestId = requestBody.id;\n\t//parses it to string so it can be used\n\trequestBody = JSON.stringify(requestBody);\n\trequest.write(requestBody);\n\t//starts stopwatch for current request\n\tstopwatch[i].start = new Date().getTime();\n\tconsole.log('Login Sent ' + requestId);\n\trequire('fs').writeFile('./results/' + 'Request_id_' + requestId + '_' + momentTime() +'.txt', requestBody);\n\trequest.end();\n\t//delay that is calculated by the desired tps\n\tsleep(msDelay);\n}", "function twitterRequests(cb) {\n twitterClient.get('trends/place', {id: 1})\n .then((trends) => {\n let tags = [];\n let sortedTrends = trends[0].trends;\n sortedTrends.sort((a, b) => {\n return b.tweet_volume - a.tweet_volume;\n });\n sortedTrends.slice(0, topicCount).forEach((item) => {\n tags.push(item.query);\n });\n return tags;\n })\n .then((tags) => {\n let calls = [];\n tags.forEach((tag) => {\n calls.push((callback) => {\n twitterClient.get('search/tweets', {q: tag, count: tweetCount, result_type: 'popular'})\n .then((body) => {\n let cleanedTweets = [];\n body.statuses.forEach((item) => {\n cleanedTweets.push({\n \"created_at\": item.created_at,\n \"id_str\": item.id_str,\n \"text\": item.text,\n \"entities\": item.entities,\n \"source\": item.source,\n \"retweet_count\": item.retweet_count,\n \"favorite_count\": item.favorite_count,\n \"possibly_sensitive\": item.possibly_sensitive,\n \"lang\": item.lang\n })\n });\n callback(null, cleanedTweets);\n })\n .catch((err) => {\n callback(err);\n });\n });\n });\n\n async.parallel(calls, (err, result) => {\n if (err) return console.error(err);\n result.forEach((item) => {\n tweets = tweets.concat(item);\n });\n cb(null, tweets);\n });\n })\n .catch((error) => {\n throw error;\n });\n}", "async function main() {\n\n\n const stubTasks = range(50).map(n => () => delay(500).then(() => `#${n} completed`))\n\n return runInParallel(stubTasks, 5, res => {console.log(res)})\n}", "async function asyncRequest(options) {\n return new Promise((resolve, reject) => {\n request(options, (error, response, body) => resolve({ error, response, body }));\n });\n }", "async function asyncRequest(options) {\n return new Promise((resolve, reject) => {\n request(options, (error, response, body) => resolve({ error, response, body }));\n });\n }" ]
[ "0.72077537", "0.702576", "0.6929929", "0.6904526", "0.6887757", "0.68349904", "0.68101156", "0.6736233", "0.63650185", "0.63639337", "0.6354599", "0.6243562", "0.61289096", "0.60994124", "0.60459554", "0.6026916", "0.60204387", "0.6018343", "0.5992659", "0.59869015", "0.5951159", "0.59281594", "0.59197307", "0.59177995", "0.5916521", "0.5903952", "0.58993286", "0.5894474", "0.5851469", "0.5839954", "0.58373743", "0.5829783", "0.58161676", "0.5816019", "0.5798553", "0.5797545", "0.57937574", "0.57915634", "0.5786063", "0.57758695", "0.57702523", "0.5765695", "0.57588124", "0.57446164", "0.5739982", "0.573069", "0.57100886", "0.5703462", "0.569631", "0.5691521", "0.56792575", "0.5675744", "0.566177", "0.56593984", "0.56591487", "0.5655879", "0.5650169", "0.56417346", "0.56352305", "0.56250286", "0.5614381", "0.5609941", "0.56011605", "0.5599001", "0.55986065", "0.55941767", "0.55778724", "0.55653733", "0.55621856", "0.5561411", "0.55434555", "0.5539492", "0.55157375", "0.5515259", "0.551508", "0.55145276", "0.5511819", "0.55090845", "0.54918116", "0.54911643", "0.54889965", "0.54889965", "0.54889965", "0.54889965", "0.5486059", "0.54828066", "0.5478681", "0.54765165", "0.54765165", "0.54765165", "0.54765165", "0.54765165", "0.54765165", "0.54765165", "0.5475446", "0.5465855", "0.5464699", "0.54513496", "0.5451234", "0.5450647", "0.54437196" ]
0.0
-1
Show loading funcion before executing process
showLoading() { var includedTypes = [0, 1, 5, 6]; if (this.showProgress && this.config && includedTypes.includes(this.config.TypeId)) { this.progressBar = Lobibox.progress({ title: flexygo.localization.translate('process.executing'), closeOnEsc: false, closeButton: false, onShow: () => { this.progressTimer = setInterval(() => this.moveLoading(), 500); } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayLoading() {\n console.log(\"Loading...\");\n }", "displayLoading(){\n $.showLoading({\n name: \"line-scale\"\n });\n }", "function loading() {\n}", "function load(){\n\n //Display an optional loading bar\n // g.loadingBar();\n}", "function startLoading() {\n //TODO\n}", "function load() {\r\n\r\n //Display the file currently being loaded\r\n console.log(`loading: ${g.loadingFile}`);\r\n\r\n //Display the percentage of files currently loaded\r\n console.log(`progress: ${g.loadingProgress}`);\r\n\r\n //Add an optional loading bar.\r\n g.loadingBar();\r\n\r\n //This built-in loading bar is fine for prototyping, but I\r\n //encourage to to create your own custom loading bar using Hexi's\r\n //`loadingFile` and `loadingProgress` values. See the `loadingBar`\r\n //and `makeProgressBar` methods in Hexi's `core.js` file for ideas\r\n}", "_loading() {\n }", "function showQuiosqueLoad(){\n $(\"#myloadingDiv\" ).show();\n }", "function load() {\n\n //Display the file currently being loaded\n console.log(`loading: ${g.loadingFile}`);\n\n //Display the percentage of files currently loaded\n console.log(`progress: ${g.loadingProgress}`);\n\n //Add an optional loading bar.\n g.loadingBar();\n\n //This built-in loading bar is fine for prototyping, but I\n //encourage to to create your own custom loading bar using Hexi's\n //`loadingFile` and `loadingProgress` values. See the `loadingBar`\n //and `makeProgressBar` methods in Hexi's `core.js` file for ideas\n}", "function loading() {\n push();\n textSize(32);\n textStyle(BOLD);\n textAlign(CENTER, CENTER);\n text(`Loading ${modelName}...`, width / 2, height / 2);\n pop();\n}", "function loaded(){\n\t\tipcRenderer.send('asynchronous-message', {\"tag\":\"loaded\"});\n\t\t$( document ).tooltip();\n\t}", "function mainLoader(action) {\n\tif(action == 'start') {\n\t\t$('.loading-messages').show();\n\t} else {\n\t\t$('.loading-messages').hide();\n\t}\n}", "function showLoadingView() {\n $loader.css(\"display\", \"block\");\n }", "function showLoading() {\n $B.removeClass(\"js-loaded loaded-reveal\").addClass(\"show-loading\");\n $(\".sl-progress span\").css(\"width\", \"0%\");\n }", "function Procesando() {\n $(\"#divLoading\").show();\n }", "function loading() {\n\tloader.hidden = false;\n\tmain.hidden = true;\n}", "function loader() {\n loaded += 1;\n if(loaded === toLoad) {\n spinner.stop();\n process.stdout.write('\\r ' + url);\n console.log('');\n }\n }", "function showLoading() {\n\tesri.show(app.loading);\n\tapp.map.disableMapNavigation();\n\tapp.map.hideZoomSlider();\n}", "function showAdminLoadingDiv() { tf.showAdminLoading(); }", "function show_loader()\r\n {\r\n $(\"#loader\").show();\r\n }", "function showLoader() {\n loader.style.display = 'block';\n }", "function showLoading(loading) {\r\n\t\t\tif (loading) {\r\n\t\t\t\tself.bbgCss.jq.loading.show();\r\n\t\t\t} else {\r\n\t\t\t\tself.bbgCss.jq.loading.hide();\r\n\t\t\t}\r\n\t\t}", "function showLoadingView() {\n\n}", "function showLoad () \n{\n//\talert('lo');\n//\t$('load').style.display = 'block';\n}", "function drupalgap_loading_message_show() {\n try {\n // Backwards compatability for versions prior to 7.x-1.6-alpha\n if (drupalgap.loading === 'undefined') { drupalgap.loading = false; }\n // Return if the loading message is already shown.\n if (drupalgap.loading) { return; }\n var options = drupalgap_loader_options();\n if (arguments[0]) { options = arguments[0]; }\n // Show the loading message.\n //$.mobile.loading('show', options);\n //drupalgap.loading = true;\n setTimeout(function() {\n $.mobile.loading('show', options);\n drupalgap.loading = true;\n }, 1);\n }\n catch (error) { console.log('drupalgap_loading_message_show - ' + error); }\n}", "function showLoading() {\n _updateState(hotelStates.SHOW_LOADING);\n }", "function showLoader(){\n\t //show Loader\n $(\"#result\").html('<img src=\"images/grey.gif\" style=\"width:20%; top:-5em;left:80%;\"/>');\n\t}", "function showLoading() {\n if (loadingMessageId === null) {\n loadingMessageId = rcmail.display_message('loading', 'loading');\n }\n }", "function showBuildingUiIndicator()\n {\n $(document.body).addClass('spot_easy_mode_loading');\n\n insertProgressIndicator();\n\n updateProgressIndicator(\n 'Building UI <span id=\"spot_easy_mode_loader_progress\">0</span>%'\n );\n }", "function _fnProcessingDisplay ( bShow )\n\t\t{\n\t\t\tif ( bShow )\n\t\t\t\t_nProcessing.style.visibility = \"visible\";\n\t\t\telse\n\t\t\t\t_nProcessing.style.visibility = \"hidden\";\n\t\t}", "function showLoader() {\n\n loader.style.display = \"block\";\n\n }", "function loading(){\n $('#load').css('display','none');\n}", "function LoadingOn() {\n document.getElementById(\"divLoading\").style.display = \"block\";\n var imgProcessing = document.getElementById(\"imgProcessing\");\n if (imgProcessing != null) { imgProcessing.style.display = \"\"; }\n}", "function addLoad(){\n $('#loadingPopup').css('display', 'block');\n }", "function loading(alreadyLoaded) {\n\t\tif(alreadyLoaded == false){\n\t\t\t$loading.prependTo( 'body' ).fadeIn();\n\t\t}\n }", "function showLoading() {\n\twindow.status = \"Obtendo informações\";\n\n\tmainContent.style.display = \"none\";\n\tloading.style.display = \"block\";\n}", "function startDoing(){\n $('#loading').show();\n}", "function showLoader()\n {\n\t\t// $('.loader-container').show();\n // $('.loader-container').preloader({\n // zIndex: 1000,\n // setRelative: false\n // });\n // $('.loader-back').show();\n }", "function showLoading() {\n loading.classList.add(\"show\");\n setTimeout(callData, 2000);\n }", "function loading_error() {\n console.log(\"ERRRR...OR\");\n}", "function preLoad() {\n // load something and continue on only when finished\n}", "function loading_show(){\n \t\t$('#loading').html(\"<img src='img/loading.gif'/>\").fadeIn('fast');\n }", "function showPageLoading() {\n $(\"div.loading-page\").css(\"display\", \"block\");\n $(\".main-page-core\").css(\"opacity\", \"1\");\n $(\".loading-icon\").css(\"display\", \" none\");\n}", "function showWorking(loadingMessage) {\n dojo.byId('divLoadingIndicator').style.display = 'block';\n dojo.byId('loadingMessage').innerHTML = loadingMessage;\n log(loadingMessage);\n}", "function showloading(){ // waiting/working gif-animation\n $(\"#loading\").showv();\n}", "function Loadbar(x){\n\t\tthis.versionNum= app.version.split(\".\")[0] ;\n\t if (this.versionNum >= 13){\n\t\tthis.w = new Window('window', \"Processing...\", undefined, {independent:true});\n\t\tthis.w.frameLocation = [600,500];\n\t\tthis.w.tracker = this.w.add ('statictext' , [15,15,250,35], \"processing\");\n\t\tthis.w.prog = this.w.add ('progressbar' , [15,15,250,35], 0, x);\n\t\t//this.w.show();\n\t}\n }", "function showProgressBar() {\n $(\"#loadingBar\").show();\n }", "function loading() {\n loader.hidden = false;\n quoteContainer.hidden = true;\n}", "function loading() {\n loader.hidden = false;\n quoteContainer.hidden = true;\n}", "function showLoading() {\n $('#MCLoading')[0].innerHTML = 'Loading ...';\n}", "[\"PoSTIR\"](state) {\n state.showLoader = true;\n }", "function processShow(){\n if(increaseCounter() == 1) { // Check if we have to show the loader it's the first\n initLoading();\n\n // We set a param to know that the animation to hide has begin\n waitForAnimation.isAnimated = nbLoadingElements;\n $loadingBar.fadeIn(speed, function(){\n\n // We set a param to know that the animation to show is finished\n waitForAnimation.isAnimated--;\n\n // During destroying, calls can be made to show the loader. So we let's the loader disappear and then we show it again\n callStack();\n\n });\n }\n else{\n callStack();\n }\n }", "function startLoading() {\n vm.loading = true;\n }", "function loading_show(){\n $('#loading5').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function showLoadingState() {\n\tif (!globals.browser) return;\n\tvar loadingDiv = document.getElementById('loadingDiv');\n\tvar loadingDivSwf = document.getElementById('loadingDivSwf');\n\t\n\tvar browserDiv = document.getElementById('browserDiv');\n\tbrowserDiv.style.display = \"none\";\n\t\n\t// hide browser, as its always on top//\n\tglobals.browser.style.display = \"none\";\n\t// show loading//\n\tloadingDiv.style.height = globals.height + \"px\"\n\tloadingDiv.style.display = \"block\";\n\t// show loading swf //\n\tloadingDivSwf.style.display = \"\";\n\tcenterLoading();\n}", "function loading_show(){\n $('#loading4').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function loading_show(){\n $('#loading3').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function showLoader(){\n $(\".page-loader-wrapper\").show();\n}", "function showLoading() {\n\t\t// Create loading layer at first usage\n\t\tif (!ajax_load_element) {\n\t\t\tajax_load_element = document.createElement('div');\n\t\t\tajax_load_element.className = 'ajaxLoad';\n\t\t\tvar\n\t\t\t\toverlay = document.createElement('div'),\n\t\t\t\tload_indicator = document.createElement('div')\n\t\t\t;\n\t\t\toverlay.className = 'overlay';\n\t\t\tajax_load_element.appendChild(overlay);\n\n\t\t\tload_indicator.className = 'loadIcon';\n\t\t\tload_indicator.innerHTML = msg.ajaxLoadingText;\n\t\t\tajax_load_element.appendChild(load_indicator);\n\n\t\t\tdocument.body.appendChild(ajax_load_element);\n\t\t\tsetTransparency(overlay, overlay_opacity);\n\t\t}\n\t\tvar el_pos = getElPos(img_lib_element);\n\t\twith (ajax_load_element.style) {\n\t\t\tdisplay = '';\n\t\t\ttop = el_pos.top + 'px';\n\t\t\tleft = el_pos.left + 'px';\n\t\t\twidth = el_pos.width + 'px';\n\t\t\theight = el_pos.height + 'px';\n\t\t}\n\t}", "function loader(status) {\n jQuery(\"#loadIndicatorContainer\").dxLoadPanel({\n shadingColor: \"rgba(0,0,0,0.4)\",\n position: { of: \"#loading\" },\n showIndicator: true,\n showPane: true,\n shading: true,\n visible: status\n });\n}", "function loading_show(){\n $('#loading').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function oc_showProcessing() { // DEPRECATED\n\tif ( ! document.getElementById) { return; }\n\tvar procdiv = document.getElementById(\"processing\");\n\tprocdiv.style.visibility=\"visible\";\n}", "function showLoading(show) {\r\n if (show) {\r\n Ext.getBody().mask(loadHtml);\r\n } else {\r\n Ext.getBody().unmask();\r\n }\r\n}", "function showLoading(show) {\r\n if (show) {\r\n Ext.getBody().mask(loadHtml);\r\n } else {\r\n Ext.getBody().unmask();\r\n }\r\n}", "function loading_show(){\n $('#loading7').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function load(){\n game.loadingBar();\n}", "function loading_show(){\n $('#loading2').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function go_calllog(){\n\tdocument.getElementById(\"display-screen\").innerHTML = loading;\n\tx_calllog_page(\"\", do_display);\n\t\t\n}", "function showLoadingAjax () {\n\treplaceHTMLOfElement(contentDiv, '');\n\tshowProgressBar();\n}", "function tctInitProgress() {\n $(\"#processingContainer\").show();\n}", "function Completo() {\n\n $(\"#divLoading\").hide();\n\n }", "function showLoading(show)\n{\n\tvar loadGif=$(\"#loading\")\n\tif (show) \n\t{\n\t\tloadGif.css(\"display\", \"block\")\n\t}else{\n\t\tloadGif.css(\"display\", \"none\")\n\t}\n}", "function loading(show=false){\n loadingElement = d3.select(\"#loading\");\n if (show){\n loadingElement.style('display', 'block');\n } else{\n loadingElement.style('display', 'none');\n }\n }", "function loading_show(){\n $('#loading6').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function process(){\n\tprocesar(\"procesando\");\n\t$( \"#procesando\" ).show();\t\t\t\t\n}", "init() {\n\t\tthis.#activateNew('Loading');\n\t}", "function Preloader() \n{\n}", "function showLoadingIcon(viewtype){\n\n if(viewtype == 'tab'){\n $(\".chart-loader-overlay\").show();\n }\n \n }", "function ShowLoading() {\n jQuery('#ajaxloading').show();\n}", "function loading_show(){\n $('#loading8').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function showLoading(show) { $.overlay.style.opacity = show ? 1 : 0; }", "function startLoadingProductScreen()\n{\n\t$(\"#tabsBottom\").block({ \n\t\tmessage: '<h1>Loading Visualizations...</h1>', \n\t\tborder: 'none', \n\t\tpadding: '15px', \n\t\tbackgroundColor: '#000', \n\t\t'-webkit-border-radius': '10px', \n\t\t'-moz-border-radius': '10px', \n\t\topacity: .5, \n\t\tcolor: '#fff' \n\t}); \n}", "function show_loading_image () {\n\t\tstrLoading = '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"font-size:10px;\"><tr><td align=\"center\"><b>Loading..</b></td></tr><tr><td align=\"center\" style=\"padding-top:10px;\"><img src=\"'+JS_HTTP_CURRENT_TEMPLATE+'/media/site-image/loading1.gif\" alt=\"Loading..\" /></td></tr></table>';\n\t\treturn strLoading;\n\t}", "function myfunction(){\n preloader.style.display = 'none';\n }", "showLoadingView() {\n $('#start').empty();\n document.getElementById('start').innerHTML = 'Loading! ';\n $('#start').append($('<i class=\"fas fa-spinner fa-pulse\"></i>'))\n $('#load-screen').append($('<i id=\"loading\" class=\"mt-4 fas fa-spinner fa-pulse\"></i>'))\n }", "function showPageLoader(){\n $('.loader').show();\n}", "function _loading( vis ) {\n\t\t\tvis ? \n\t\t\t\t$( _loader, _context ).fadeIn( \"fast\" ) : \n\t\t\t\t$( _loader, _context ).fadeOut( \"slow\", function () {\n\t\t\t\t\t$( this ).hide(); \n\t\t\t\t}); \n\t\t}", "function showWorking() {\n hidedepth += 1;\n $(\"#loading\").show();\n $(\"#navigation\").hide();\n }", "function startRunning(){\n loadingView.toggleClass(\"d-none\")\n loadView(\"none\")\n running=true\n }", "function showLoader() {\n\tloader.className = 'show';\n\tsetTimeout(() => {\n\t\tloader.className = loader.className.replace('show', '');\n\t}, 90000);\n}", "function loading(state){\n\tif (state)\n\t\t$('#loading').css('display','block');\n\telse\n\t\t$('#loading').css('display','none');\n}", "function displayLoadingPage(afficher) {\n afficher = (!afficher) ? false \n : afficher;\n\tif (afficher) {\n // -- Affichier le progress bar -- //\n NProgress.start();\n // -- Afficher le frame de chargelent -- //\n $('#frame_chargement').show();\n\t} else {\n // -- Finaliser le chargement du progress bar -- //\n NProgress.done();\n // -- Cacher le frae de chargement -- //\n $('#frame_chargement').hide();\n\t}\n}", "function loader(show) {\n //landing page\n if ($(\"#fullSizeContainer\").length > 0) {\n hideLoader();\n showMain();\n return false;\n }\n if (show) {\n $(\"#loadingIndicator\").show();\n } else {\n if ((typeof DELAY_LOADING !== \"undefined\") && !DELAY_LOADING) { /*global DELAY_LOADING*/\n setTimeout(function() {\n showMain();\n }, 100);\n hideLoader(true);\n }\n }\n}", "function unsureIfthisIsAnActualLoadingScreen() {\n //FrameCount on the loading state to \"waste\" your time\n let wasteOfTime = 120;\n if (frameCount > wasteOfTime) {\n state = `bubblePoppin`;\n }\n\n //The text\n push();\n textSize(30);\n fill(255, 132, 0);\n stroke(0);\n strokeWeight(5);\n textAlign(CENTER, CENTER);\n text(`Loading...`, width / 2, height / 2);\n pop();\n}", "function loading(load)\n{\n\tif(load===true)\n\t\t $(\".loading\").fadeIn();\n\telse \n\t\t$(\".loading\").fadeOut();\n}", "function _load() {\r\n document.getElementById(\"loading-icon\").style.visibility = \"hidden\";\r\n document.getElementById(\"body\").style.visibility = \"visible\";\r\n }", "function loderFunction() {\n $ionicLoading.show({\n template: '<ion-spinner icon=\"bubbles\" class=\"spinner-balanced\"></ion-spinner>'\n });\n }", "function showProgress() {\n $(\"#loading-ring\").show();\n WinJS.UI.processAll();\n}", "function ajax_Loading(pState){\n if(pState == 1){$x_Show('loader','wait');}\n else{$x_Hide('loader');}\n}", "function showLoadingSpinner(){\n loader.hidden = false;\n quoteContainer.hidden = true;\n}" ]
[ "0.7965677", "0.7477142", "0.7317707", "0.7127413", "0.71128505", "0.702877", "0.69664025", "0.6965194", "0.69629693", "0.6924848", "0.68984205", "0.6857669", "0.6856633", "0.68309104", "0.6818206", "0.67443156", "0.67401177", "0.6736307", "0.6687508", "0.66864556", "0.66734016", "0.66408986", "0.6620326", "0.6614752", "0.6606927", "0.66001767", "0.6581124", "0.6578055", "0.6553199", "0.65269667", "0.6519859", "0.6519579", "0.6518869", "0.65174687", "0.6483598", "0.64829415", "0.64827454", "0.64697474", "0.64682883", "0.6467939", "0.6450906", "0.6449891", "0.64489", "0.6440119", "0.6432459", "0.642195", "0.6417263", "0.64157325", "0.64157325", "0.6407174", "0.64047253", "0.6390925", "0.63855016", "0.6381202", "0.6379909", "0.63603824", "0.63596463", "0.63464963", "0.6335262", "0.6334219", "0.63319814", "0.6323292", "0.6316188", "0.6316188", "0.63137555", "0.63106596", "0.6304311", "0.63036364", "0.629859", "0.6297334", "0.62970215", "0.6279586", "0.62791187", "0.6277124", "0.62766135", "0.6276046", "0.6262012", "0.62443304", "0.62328976", "0.62299985", "0.6219923", "0.62030834", "0.6202494", "0.61965317", "0.6190307", "0.61881804", "0.61860186", "0.61834645", "0.6181954", "0.6179476", "0.617387", "0.617305", "0.6172952", "0.6172445", "0.6170538", "0.61615574", "0.61549306", "0.61526513", "0.61513734", "0.61429906" ]
0.7089288
5
Move loading funcion during process execution
moveLoading() { if (this.progressBar) { let actVal = this.progressBar.getProgress(); actVal = ((actVal + 1 >= 100) ? 0 : actVal + 1); this.progressBar.setProgress(actVal); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preLoad() {\n // load something and continue on only when finished\n}", "function loading() {\n}", "function forceLoad() {}", "_loading() {\n }", "async load () {}", "function startLoading() {\n //TODO\n}", "load() {}", "load() {}", "function run() {\r\n\t// Initialize the loader before anything happens\r\n\tloader.init();\r\n}", "function preload() {\n // Step 1.1 code goes here\n\n // Step 8.1 code goes here\n}", "load() {\r\n\r\n }", "function Loader() {\n\n}", "function loaded() {\n ut.assert(true);\n ut.async(false);\n }", "function finishedLoad() {\n console.log('finishedLoad()');\n if (externalIsLoaded()) {\n init();\n }\n }", "load() {\n\n }", "async onLoad() {}", "function handleLoadSync() {\n\t\t\t\t\tlogWithPhase( \"handleLoad - Sync\" );\n\t\t\t\t\t$scope.$eval( attributes.bnLoad );\n\t\t\t\t}", "function _useLoadUtil() {\n load(square.stage, app.stage);\n load(circle.stage, app.stage);\n}", "function load(){\r\n\r\n}", "function forceLoad() {\n\t // Noop\n\t}", "preload () {}", "function LocalLoader() { }", "function preload() {}", "function preLoad() {\n return;\n}", "function load()\n{\n setupParts();\n\tbgn();\n}", "preload() {}", "function load() {\n if (!loaded) {\n loaded = true;\n\n callback();\n }\n }", "function alwaysRunOnload () {\n\t\t// Placeholder/Future use.\n\t}", "function executeCallbacks(){\n\t\t\t\t\t\tcallbacks[lib].forEach(function(cb) {\n\t\t\t\t\t\t\tcb();\n\t\t\t\t\t\t});\n\t\t\t\t\t\tloading[lib].status = 1;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}", "load(cb){\r\n\r\n\t\tconsole.log('Loading assets (difficulty: 1)');\r\n\r\n\t\t// Chiama il metodo load della classe parent\r\n\t\tsuper.load(cb, 1);\r\n\t}", "function load()\n{\n\tsetupParts();\n\t\n\tmain();\n}", "_preload() {\n const preloader = new Preloader();\n preloader.run().then(() => {\n this._start();\n });\n }", "async afterLoad () {\n }", "lateLoad() {\n\n }", "preload() {\n this.cargarMapa();\n this.cargarImagenes();\n this.cargarSpritesheets();\n this.cargarSpritePhysics();\n this.cargarAudio();\n\n this.conectarWebsocket();\n }", "function startLoad()\n\t{\n\t\t\tif(startedLoading)\n\t\t\t{\n\t\t\t\tlogger.debug('ND-node startLoad called more than once');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tstartedLoading=true;\n\n\t\t\tcoreModules.forEach(function (moduleName){\n\t\t\t\tmoduleLoaders.push(moduleLoader.getLoader(getCoreModulePath(moduleName)));\n\t\t\t});\n\t\t\tmoduleLoaders.push(moduleLoader.getLoader({instance:logger,moduleName:'$logger'}));\n\t\t\tmoduleLoaders.push(moduleLoader.getLoader({instance:newBackendInstance,moduleName:'$backend'}));\n\n //var modules=getModulesAndDependencies(modulePaths);\n moduleLoaders=moduleLoader.getSortedByDepends(moduleLoaders);\n\n\t\t\tvar modulePromises={};\n\n //we will augment each module in modules with .instance - a member containg a promise returning its instance\n moduleLoaders.forEach(\n \t\t\tfunction(moduleLoader)\n \t\t\t{\n\t\t\t\t\t\t//we init each module instance promise then create it when all dependcies are ready\n\t\t\t\t\t\tmodulePromises[moduleLoader.name]=new BBPromise(function (resolve){\n\t\t var args=\n\t\t _.map(moduleLoader.dependencies,\n\t\t function(name){ return modulePromises[name];}\n\t\t );//concat all dependencies\n\n\t\t\t\t\t\t\t\t\tresolve(BBPromise.all(args).then(//all dependencies have ben created - create this module now\n\t\t\t function(argValues)\n\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tlogger.debug('Creating an instance of '+moduleLoader.name);\n\t\t\t\t\t\t\t\t\t\t\tvar factoryRet=moduleLoader.factory.apply(newBackendInstance,argValues);\n\t\t\t\t\t\t\t\t\t\t\tif(!factoryRet)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tloadedModules[moduleLoader.name]={};\n\t\t\t\t\t\t\t\t\t\t\t\treturn BBPromise.resolve({});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn BBPromise.resolve(factoryRet).then(function(instResolved)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tloadedModules[moduleLoader.name]=instResolved;\n\t\t\t\t\t\t\t\t\t\t\t\treturn instResolved;\n\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t }\n\t\t\t ));\n\t\t\t\t\t\t});\n \t\t\t}\n\t\t\t);\n\n //wait for all loading to complete and update status\n return BBPromise.all(_.values(modulePromises)).then(\n function()\n {\n logger.debug('finished loading modules');\n finishedLoading=true;\n }\n );\n\n\t}", "loadComplete() {\n // Nothing\n }", "load() {\n return this.loading || (this.loading = this.loadFunc().then(support => this.support = support, err => { this.loading = null; throw err; }));\n }", "function mainLoaded() {\n if (typeof(executeOnContentLoad) == \"function\") {\n if (contentLoadDestination && location.hash != contentLoadDestination) return;//wait til we are on the correct page\n var fn = executeOnContentLoad;\n executeOnContentLoad = null;\n contentLoadDestination = null;\n fn();\n }\n }", "preload() {\n \n }", "function forceLoad() {\n // Noop\n}", "preload() {\n\n }", "function loadFunction(){\n\tvalidateLogin();\n\tgetImg();\n\tgetTags();\n\tgetUploader()\n\tgetComments();\n\tupdateViewCount();\n\t\n}", "function forceLoad() {\n // Noop\n}", "function forceLoad() {\n // Noop\n}", "loaded() {}", "function DoLoad()\n{\n for (var i = 0; i < _g_onload_functions.length; ++i)\n {\n if (\"function\" == typeof(_g_onload_functions[i]))\n {\n _g_onload_functions[i]();\n }\n }\n _g_is_loaded = true;\n}", "load(callback) {\n callback();\n }", "function loadMainProcessFiles () {\n const files = glob.sync(path.join(__dirname, '_side-back/js/**/*.js'))\n files.forEach((file) => { require(file) })\n}", "preload() {\n\n }", "preload() {\n\n }", "preload() {\n\n }", "preload() {\n\n }", "load (context, actions) {\n console.log(`Loading module ${this.name} finished`)\n }", "function load() {\n\n //Display the file currently being loaded\n console.log(`loading: ${g.loadingFile}`);\n\n //Display the percentage of files currently loaded\n console.log(`progress: ${g.loadingProgress}`);\n\n //Add an optional loading bar.\n g.loadingBar();\n\n //This built-in loading bar is fine for prototyping, but I\n //encourage to to create your own custom loading bar using Hexi's\n //`loadingFile` and `loadingProgress` values. See the `loadingBar`\n //and `makeProgressBar` methods in Hexi's `core.js` file for ideas\n}", "function load() {\r\n\r\n //Display the file currently being loaded\r\n console.log(`loading: ${g.loadingFile}`);\r\n\r\n //Display the percentage of files currently loaded\r\n console.log(`progress: ${g.loadingProgress}`);\r\n\r\n //Add an optional loading bar.\r\n g.loadingBar();\r\n\r\n //This built-in loading bar is fine for prototyping, but I\r\n //encourage to to create your own custom loading bar using Hexi's\r\n //`loadingFile` and `loadingProgress` values. See the `loadingBar`\r\n //and `makeProgressBar` methods in Hexi's `core.js` file for ideas\r\n}", "function\trunProcessing() {\n initProcessing();\n}", "function load(){\n game.loadingBar();\n}", "function LoadData(){\n\tLoadDataFiles();\n\tExtractDataFromFiles();\n}", "function load(){\n\t//Display the loading progress bar while the game\n\tprogressBar.create(g.canvas, assets);\n\tprogressBar.update();\n}", "async getLoadOperation() {}", "function XLoader() {\r\n return __loadScript(\"YLoader\", 2);\r\n}", "_load() {\n\n // if already loaded, do nothing\n if (this._loaded) {\n return;\n }\n\n // attempt to load\n this._lazyload();\n\n }", "function tabLoad() {\n // Tab load safety check\n if (tabHasLoaded) {\n return;\n }\n tabHasLoaded = true;\n\n setupPage();\n\n getTaskStatuses();\n getTasks();\n }", "function loadNext() {\n if (srcSetObj.callback) { srcSetObj.callback(); }\n thisObj.sourceFileSetQueue.shift();\n if (thisObj.sourceFileSetQueue.length > 0) {\n thisFn.call(thisObj, thisObj.sourceFileSetQueue[0]);\n } else {\n thisObj.sourceFileSetQueue.isRunning = false;\n } \n }", "load () {\n\t\tthis.instanciable = false;\n\t\tconsole.log(this.name + \" loaded\");\n\t}", "onLoad() {\n if (isFunction(onLoad)) {\n onLoad();\n }\n }", "async function load_callback(ev) {\n ev.preventDefault();\n\n var filename = $('#filename').val();\n await load_writing(filename);\n await load_history(filename);\n}", "loadingData() {}", "loadingData() {}", "function Preloader() \n{\n}", "preload() {\n }", "function section_prepareLoad(sectionID){\n if(this.verbose)console.log('Navigation | section_prepareLoad: '+sectionID);\n\n if(FLOCK.sections[sectionID]['prepare']){\n console.log('section '+sectionID+' has prepare function')\n }\n if(!FLOCK.sections[sectionID].prepared){\n if(FLOCK.sections[sectionID]['prepareLoad']){\n FLOCK.sections[sectionID]['prepareLoad']();\n }\n FLOCK.sections[sectionID].prepared = true;\n }\n }", "load() {\n this.loadEventLoop(600)\n }", "function watchAsyncLoad(){if(opts.loadingAsync&&!opts.isRemoved){scope.$$loadingAsyncDone=false;$q.when(opts.loadingAsync).then(function(){scope.$$loadingAsyncDone=true;delete opts.loadingAsync;}).then(function(){$$rAF(positionAndFocusMenu);});}}", "onLoad() {}", "function AutoSaveLoad() {}", "function load(){\n\n //Display an optional loading bar\n // g.loadingBar();\n}", "function actualRun() {\n\n\t\t//set preloader mode\n\t\tif (g_objPreloader) {\n\t\t\tg_objPreloader.fadeTo(0, 1);\n\t\t\tg_objWrapper.height(g_options.theme_preloading_height);\n\t\t\tg_functions.placeElement(g_objPreloader, \"center\", g_options.theme_preloader_vertpos);\n\t\t}\n\n\t\tinitEvents();\n\n\t\tg_tiles.run();\n\t\tg_lightbox.run();\n\t}", "function watchAsyncLoad() {\n if (opts.loadingAsync && !opts.isRemoved) {\n scope.$$loadingAsyncDone = false;\n\n $q.when(opts.loadingAsync)\n .then(function() {\n scope.$$loadingAsyncDone = true;\n delete opts.loadingAsync;\n }).then(function() {\n $$rAF(positionAndFocusMenu);\n });\n }\n }", "function watchAsyncLoad() {\n if (opts.loadingAsync && !opts.isRemoved) {\n scope.$$loadingAsyncDone = false;\n\n $q.when(opts.loadingAsync)\n .then(function() {\n scope.$$loadingAsyncDone = true;\n delete opts.loadingAsync;\n }).then(function() {\n $$rAF(positionAndFocusMenu);\n });\n }\n }", "function asyncStartLoadPartwayThrough(stepState) {\n return function(resolve, reject) {\n var loader = stepState.loader;\n var name = stepState.moduleName;\n var step = stepState.step;\n\n if (loader.modules[name])\n throw new TypeError('\"' + name + '\" already exists in the module table');\n\n // adjusted to pick up existing loads\n var existingLoad;\n for (var i = 0, l = loader.loads.length; i < l; i++) {\n if (loader.loads[i].name == name) {\n existingLoad = loader.loads[i];\n\n if(step == 'translate' && !existingLoad.source) {\n existingLoad.address = stepState.moduleAddress;\n proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));\n }\n\n // a primary load -> use that existing linkset\n if (existingLoad.linkSets.length)\n return existingLoad.linkSets[0].done.then(function() {\n resolve(existingLoad);\n });\n }\n }\n\n var load = existingLoad || createLoad(name);\n\n load.metadata = stepState.moduleMetadata;\n\n var linkSet = createLinkSet(loader, load);\n\n loader.loads.push(load);\n\n resolve(linkSet.done);\n\n if (step == 'locate')\n proceedToLocate(loader, load);\n\n else if (step == 'fetch')\n proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));\n\n else {\n console.assert(step == 'translate', 'translate step');\n load.address = stepState.moduleAddress;\n proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));\n }\n }\n }", "function asyncStartLoadPartwayThrough(stepState) {\n return function(resolve, reject) {\n var loader = stepState.loader;\n var name = stepState.moduleName;\n var step = stepState.step;\n\n if (loader.modules[name])\n throw new TypeError('\"' + name + '\" already exists in the module table');\n\n // adjusted to pick up existing loads\n var existingLoad;\n for (var i = 0, l = loader.loads.length; i < l; i++) {\n if (loader.loads[i].name == name) {\n existingLoad = loader.loads[i];\n\n if(step == 'translate' && !existingLoad.source) {\n existingLoad.address = stepState.moduleAddress;\n proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));\n }\n\n // a primary load -> use that existing linkset\n if (existingLoad.linkSets.length)\n return existingLoad.linkSets[0].done.then(function() {\n resolve(existingLoad);\n });\n }\n }\n\n var load = existingLoad || createLoad(name);\n\n load.metadata = stepState.moduleMetadata;\n\n var linkSet = createLinkSet(loader, load);\n\n loader.loads.push(load);\n\n resolve(linkSet.done);\n\n if (step == 'locate')\n proceedToLocate(loader, load);\n\n else if (step == 'fetch')\n proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));\n\n else {\n console.assert(step == 'translate', 'translate step');\n load.address = stepState.moduleAddress;\n proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));\n }\n }\n }", "function watchAsyncLoad() {\n if (opts.loadingAsync && !opts.isRemoved) {\n scope.$$loadingAsyncDone = false;\n\n $q.when(opts.loadingAsync)\n .then(function() {\n scope.$$loadingAsyncDone = true;\n delete opts.loadingAsync;\n }).then(function() {\n $$rAF(positionAndFocusMenu);\n });\n }\n }", "function fnc_child_objects_load_functions() {\n\t\n}", "function CallLoaderFunction(){\n\tflyTheBird(13000, 1000);\n\t//console.log(\"called flyTheBird\");\n}", "function loadAsync() {\n\t\t\tvar funcs = [getScriptsFunc(scriptsToLoad), getImagesFunc(imagesToLoad)];\n\t\t\tasync.parallelLimit(funcs, maxThreads, function(err, result) {\n\t\t\t\tif (onDone) onDone(err);\n\t\t\t});\n\t\t}", "onLoaderLoading() {\n\n if (this._setState) {\n\n this._setState({\n ...this.state, // Keep previous loaded data\n loading: true,\n loadingError: null\n });\n }\n\n if (this.onLoading) {\n\n this.onLoading();\n }\n }", "loadedCallback(processNum)\n {\n let content = \"deadbeef\";\n\n // Firefox\n if (window.frames[this.frameNames[processNum]].document.body.innerText === undefined)\n {\n // Firefox 1.5\n if (window.frames[this.frameNames[processNum]].document.body.textContent === undefined)\n {\n content = window.frames[this.frameNames[processNum]].document.body.innerHTML;\n }\n // Firefox 2.0\n else\n {\n content = window.frames[this.frameNames[processNum]].document.body.textContent;\n }\n }\n // IE\n else\n {\n content = window.frames[this.frameNames[processNum]].document.body.innerText;\n }\n\n let callback = this.callbacks[processNum];\n this.callbacks[processNum] = undefined;\n\n // Recycle old loader container DOM elements\n this.oldContainerPool.push(this.containers[processNum]);\n this.containers[processNum] = undefined;\n this.frameNames[processNum] = undefined;\n\n // Process counter increment, now that the loading finished\n this.lastProcess++;\n\n // Handle content\n conSense.scrollToBottomFocusInput();\n // User callback with loaded content as parameter\n callback(content);\n\n this.hideIndicator();\n\n conSense.separator();\n conSense.scrollToBottomFocusInput();\n }", "function loader() {\n loaded += 1;\n if(loaded === toLoad) {\n spinner.stop();\n process.stdout.write('\\r ' + url);\n console.log('');\n }\n }", "function preload () { \n training_data = loadStrings('./data/train_10000.csv', () => console.log(\"Training data loaded\"))\n testing_data = loadStrings('./data/test_1000.csv', () => console.log(\"Testing data loaded\"))\n}", "function LoadingHandle (readMainCache, writeMainCache) {\n this.readMainCache = readMainCache;\n this.writeMainCache = writeMainCache;\n var needIndieCache = !(this.readMainCache && this.writeMainCache);\n this.taskIndieCache = needIndieCache ? {} : null;\n }", "function onload() {\r\n\tload();\r\n}", "preload() {\n\n\t\t// Get our type based on the key in the manifest\n\t\tlet _type = Object.keys(this.manifest)[this.preloader.package_loaded];\n\n\t\t// Check to see if our total loaded is < our manifest\n\t\tif(this.preloader.package_loaded < Object.keys(this.manifest).length){\n\t\t\tthis.preloader.load(_type, this.manifest[_type]);\n\t\t} else {\n\t\t\tthis.trigger('assets_loaded');\n\t\t}\n\t}", "cacheLoader (mainNameSpace) {\n \n let NoEmptyNamespace = false \n if (mainNameSpace) {\n \n let keys_exists = Object.keys(mainNameSpace) ; \n\n (keys_exists || keys_exists.length > 0)?NoEmptyNamespace = true : NoEmptyNamespace \n \n if(NoEmptyNamespace){\n \n for(let method in mainNameSpace){\n \n (typeof mainNameSpace[method] == \"function\") ? mainNameSpace[method]() : console.warn(`no module found on ${mainNameSpace}`)\n }\n }\n }\n \n }", "function asyncStartLoadPartwayThrough(stepState) {\n return function(resolve, reject) {\n var loader = stepState.loader;\n var name = stepState.moduleName;\n var step = stepState.step;\n\n if (loader.modules[name])\n throw new TypeError('\"' + name + '\" already exists in the module table');\n\n // adjusted to pick up existing loads\n var existingLoad;\n for (var i = 0, l = loader.loads.length; i < l; i++) {\n if (loader.loads[i].name == name) {\n existingLoad = loader.loads[i];\n\n if (step == 'translate' && !existingLoad.source) {\n existingLoad.address = stepState.moduleAddress;\n proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));\n }\n\n // a primary load -> use that existing linkset if it is for the direct load here\n // otherwise create a new linkset unit\n if (existingLoad.linkSets.length && existingLoad.linkSets[0].loads[0].name == existingLoad.name)\n return existingLoad.linkSets[0].done.then(function() {\n resolve(existingLoad);\n });\n }\n }\n\n var load = existingLoad || createLoad(name);\n\n load.metadata = stepState.moduleMetadata;\n\n var linkSet = createLinkSet(loader, load);\n\n loader.loads.push(load);\n\n resolve(linkSet.done);\n\n if (step == 'locate')\n proceedToLocate(loader, load);\n\n else if (step == 'fetch')\n proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));\n\n else {\n console.assert(step == 'translate', 'translate step');\n load.address = stepState.moduleAddress;\n proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));\n }\n }\n }", "function asyncStartLoadPartwayThrough(stepState) {\n return function(resolve, reject) {\n var loader = stepState.loader;\n var name = stepState.moduleName;\n var step = stepState.step;\n\n if (loader.modules[name])\n throw new TypeError('\"' + name + '\" already exists in the module table');\n\n // adjusted to pick up existing loads\n var existingLoad;\n for (var i = 0, l = loader.loads.length; i < l; i++) {\n if (loader.loads[i].name == name) {\n existingLoad = loader.loads[i];\n\n if (step == 'translate' && !existingLoad.source) {\n existingLoad.address = stepState.moduleAddress;\n proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));\n }\n\n // a primary load -> use that existing linkset if it is for the direct load here\n // otherwise create a new linkset unit\n if (existingLoad.linkSets.length && existingLoad.linkSets[0].loads[0].name == existingLoad.name)\n return existingLoad.linkSets[0].done.then(function() {\n resolve(existingLoad);\n });\n }\n }\n\n var load = existingLoad || createLoad(name);\n\n load.metadata = stepState.moduleMetadata;\n\n var linkSet = createLinkSet(loader, load);\n\n loader.loads.push(load);\n\n resolve(linkSet.done);\n\n if (step == 'locate')\n proceedToLocate(loader, load);\n\n else if (step == 'fetch')\n proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));\n\n else {\n console.assert(step == 'translate', 'translate step');\n load.address = stepState.moduleAddress;\n proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));\n }\n }\n }", "function asyncStartLoadPartwayThrough(stepState) {\n return function(resolve, reject) {\n var loader = stepState.loader;\n var name = stepState.moduleName;\n var step = stepState.step;\n\n if (loader.modules[name])\n throw new TypeError('\"' + name + '\" already exists in the module table');\n\n // adjusted to pick up existing loads\n var existingLoad;\n for (var i = 0, l = loader.loads.length; i < l; i++) {\n if (loader.loads[i].name == name) {\n existingLoad = loader.loads[i];\n\n if(step == 'translate' && !existingLoad.source) {\n existingLoad.address = stepState.moduleAddress;\n proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));\n }\n\n return existingLoad.linkSets[0].done.then(function() {\n resolve(existingLoad);\n });\n }\n }\n\n var load = createLoad(name);\n\n load.metadata = stepState.moduleMetadata;\n\n var linkSet = createLinkSet(loader, load);\n\n loader.loads.push(load);\n\n resolve(linkSet.done);\n\n if (step == 'locate')\n proceedToLocate(loader, load);\n\n else if (step == 'fetch')\n proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));\n\n else {\n console.assert(step == 'translate', 'translate step');\n load.address = stepState.moduleAddress;\n proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));\n }\n }\n }", "function mainFn () {\n logFn( prefixStr + 'Start' );\n xhiObj.npmObj.load( xhiObj.fqPkgFilename, onLoadFn );\n }", "function loadComplete() {\n cnt--;\n if (!cnt) {\n execComplete();\n }\n }", "load() {\n this.mainSegmentLoader_.load();\n if (this.audioPlaylistLoader_) {\n this.audioSegmentLoader_.load();\n }\n }" ]
[ "0.72658396", "0.67664504", "0.6687831", "0.66287416", "0.66158247", "0.6588706", "0.65778196", "0.65778196", "0.6528857", "0.6461724", "0.64147377", "0.6412977", "0.63838995", "0.635878", "0.63469696", "0.63302493", "0.63095295", "0.62852144", "0.62801003", "0.6274061", "0.62654436", "0.62508184", "0.6237251", "0.6234611", "0.6233273", "0.62152565", "0.61993706", "0.6180366", "0.6171511", "0.6169413", "0.61666495", "0.61609465", "0.6137704", "0.6134227", "0.61338615", "0.61223626", "0.6106558", "0.60950977", "0.60835534", "0.6079051", "0.6077234", "0.60715944", "0.6053381", "0.6026328", "0.6026328", "0.6025773", "0.6015008", "0.6011978", "0.59871095", "0.5980547", "0.5980547", "0.5980547", "0.5980547", "0.5975764", "0.5963903", "0.59513295", "0.5940507", "0.59313184", "0.59277606", "0.59116507", "0.5907582", "0.59016687", "0.5901043", "0.58985895", "0.58779156", "0.58767796", "0.5872508", "0.5867585", "0.58664376", "0.58664376", "0.5852614", "0.58463144", "0.58377427", "0.5833212", "0.58311373", "0.58251894", "0.58183134", "0.5816535", "0.58110344", "0.58105", "0.58105", "0.5807384", "0.5807384", "0.5805071", "0.58044386", "0.5802892", "0.57972366", "0.5797205", "0.57961816", "0.5796027", "0.5790555", "0.57905036", "0.578108", "0.5778546", "0.57639414", "0.57601714", "0.57601714", "0.5752591", "0.57482386", "0.5742906", "0.57405835" ]
0.0
-1
Close loading funcion after executing process
closeLoading() { if (this.progressBar) { clearInterval(this.progressTimer); this.progressTimer = null; this.progressBar.destroy(); this.progressBar = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endProcess()\n{\n\tprocess.exit()\n}", "function closeLoading() {\n setTimeout(function () {\n layer.closeAll('loading');\n }, 100);\n }", "Unload() {}", "end() {\n\t\tif (this.process)\n\t\t\tthis.process.kill()\n\t}", "_dispose() {\n\n delete window.FlowUI['_loaders'][this.id];\n\n }", "function closeAndSave() {\r\n console.log(\"process exited, saving...\")\r\n saveToFile();\r\n process.exit();\r\n}", "unload() {}", "close() {\n if (phantom_instance != null) {\n phantom_instance.exit();\n phantom_instance = null;\n }\n }", "function close() {\n\n let $loadingScreenContainer = $('.loadingScreenContainer');\n\n $loadingScreenContainer.trigger('close');\n\n }", "function onClose() {\n\tmain( opts, done );\n}", "stopLoading() {\n if (!this.loadingInstance) return;\n Vue.nextTick(() => {\n this.loadingInstance.close();\n this.loadingInstance = null;\n });\n }", "function unloader() {\n try {\n callback();\n }\n catch(ex) {}\n }", "function unloadAll() {\n if (aicc!=null && aicc.lmsOK) aicc.scheduleExit();\n }", "function unloader() {\n try {\n callback();\n }\n catch(ex) {}\n }", "function _onBeforeUnload() {\n _startClosing();\n }", "function _onBeforeUnload() {\n _startClosing();\n }", "_onClose(code) {\n this.log.warn(\"pocketsphinx process closed with code=\" + code);\n // Restart everything after a short delay\n //setTimeout(this.restart.bind(this), RESTART_DELAY);\n }", "function close() {\n\tproc.kill( 'SIGINT' );\n}", "function unload() {\n}", "function unloader() {\n try {\n callback();\n }\n catch(ex) {}\n }", "function unloader() {\n try {\n callback();\n }\n catch(ex) {}\n }", "function Close_Instruction() {\r\n}", "function fVolver(){\n window.close();\n }", "function appExitProcess () {\n console.log('Closing output objects ... ');\n if(validOutputPin.length>1){\n for(let x in output){\n output[x].close();\n }\n }else{\n output.close();\n } \n}", "function unload() {\n // clean up any globals or other cruft before being removed before i get killed.\n }", "__onUnload() {\n try {\n // Abort and dispose\n if (this) {\n this.dispose();\n }\n } catch (e) {}\n }", "function Close_Builtin() {\r\n}", "close() {\n if (this._shells && this._shells.constructor.name !== 'Error') {\n this._shells.forEach((queue) => queue.shutdown())\n this._shells = undefined\n }\n }", "function fsUnloaded() {\n\t// framescript on unload\n\tconsole.log('fsInaly.js framworker unloading');\n\tbootstrapCallbacks.destroySelf();\n\n}", "close() {\n // Do it the soft way\n if (this.browser) {\n this.browser.close();\n this.browser = null;\n }\n // Do it the hard way\n processes.kill(9, processes.grepChildren(/chrome/));\n // Cleanup the temporary user data directory\n execSync(`rm -rf ${this.userDataDir}`);\n }", "function closeOnProcessTermination() {\n if (cleanup_registered) {\n return;\n }\n cleanup_registered = true;\n process.on(\"exit\", function () {\n logger(\"Shutting down\");\n killProcesses();\n });\n}", "close() {\n /* Disconnect Trueno session */\n process.exit();\n }", "function onClose() {\n\tprocess.exit( 0 );\n}", "function onClose() {\n\tprocess.exit( 0 );\n}", "function onUnload() {\r\n log('onUnload');\r\n stop();\r\n }", "_close() {\n // mark ourselves inactive without doing any work.\n this._active = false;\n }", "function closeHostInfo() {\n d3.select('#HOST_information').transition().duration(300).style('opacity',0).style(\"z-index\",\"-1000\"); \n //location.reload();\n //$('#main')[0].innerHTML = \"<div id=\\\"chart\\\"></div><br><div id=\\\"sequence\\\"></div>\"; \n //$('#sequence')[0].innerHTML = ''; \n LoadMyJs(\"js/sequences.js\");\n //resetEvents(); \n}//closeInfo", "dispose() {\n // this.disposeRunner.run(this, false);\n this.disposeRunner.run(this, false);\n }", "dispose() {\n // this.disposeRunner.run(this, false);\n this.disposeRunner.run(this, false);\n }", "function Cerrar()\n{\n self.close()\n}", "_cleanup() {\n this._page.close();\n this._phantom.exit();\n }", "close() {\n this.__internal.close()\n }", "close() {\n this.__internal.close()\n }", "function doneClosing()\n\t{\n\t\tthat.terminate();\n\t}", "onShutdown () {\n unload()\n }", "close() {\r\n this.native.close();\r\n }", "function unexportOnClose() {\n try {\n LED1.writeSync(0); //turn off led\n console.log('led turned off...');\n LED1.unexport(); //free gpio pin, var set above\n console.log('led GPIO pin cleared...');\n pushButton1.unexport(); //free all resources, var set above\n console.log('button GPIO pin cleared...');\n console.log('cleaninig up...closing server...');\n //close the http server connection\n http.close();\n console.log('server closed...');\n process.exit(0); //should end all async functions, prevents errors \n }\n catch(err) {\n console.error(\"Error in unexportOnClose function: \", err);\n }\n}", "function exit() {\n sensor.unexport();\n process.exit();\n}", "function close() {\n\n ipcRenderer.send('close', 'close')\n\n }", "destroyLoader(loaderName) {\n loaderName = false;\n }", "dispose() {}", "dispose() {}", "dispose() {}", "dispose() {}", "dispose() {}", "function exit() {\n stopDownloading();\n setData = {};\n downloadedPhotos = {};\n window.close();\n}", "close() {\n\t\tthis._killCheckPeriod();\n\t}", "onUnload(callback) {\n try {\n this.log.info(\"cleaned everything up...\");\n callback();\n }\n catch (e) {\n callback();\n }\n }", "dispose() {\n this.disposeRunner.run(this, false);\n // this.disposeRunner.run(this, false);\n }", "function closeHostAttrInfo() {\n d3.select('#HOSTATTR_information').transition().duration(300).style('opacity',0).style(\"z-index\",\"-1000\"); \n //location.reload();\n //$('#main')[0].innerHTML = \"<div id=\\\"chart\\\"></div><br><div id=\\\"sequence\\\"></div>\"; \n //$('#sequence')[0].innerHTML = ''; \n LoadMyJs(\"js/sequences.js\");\n //resetEvents(); \n}//closeInfo", "async close() {\r\n\t\tif (this.fh) {\r\n\t\t\tlet fh = this.fh\r\n\t\t\tthis.fh = undefined\r\n\t\t\tawait fh.close()\r\n\t\t}\r\n\t}", "onUnload(callback) {\n var _a, _b, _c;\n try {\n // Here you must clear all timeouts or intervals that may still be active\n // clearTimeout(timeout1);\n // clearTimeout(timeout2);\n // ...\n // clearInterval(interval1);\n (_b = (_a = this.mydmx) === null || _a === void 0 ? void 0 : _a.universe) === null || _b === void 0 ? void 0 : _b.close();\n (_c = this.mydmx) === null || _c === void 0 ? void 0 : _c.close();\n callback();\n }\n catch (e) {\n callback();\n }\n }", "async close(){\n await uplink.close_download(this.download).catch((error) => {\n errorhandle.storjException(error.error.code,error.error.message);\n });\n }", "onUnload(callback) {\n try {\n this.log.info('cleaned everything up...');\n callback();\n }\n catch (e) {\n callback();\n }\n }", "unload() {\n controls.dispose();\n renderer.dispose();\n }", "function menuPopupPreloaderCloseHandler(event) {\n\t\toverlayPreloaderDestroy(event.data.id);\n\t}", "unload() {\n controls.dispose()\n renderer.dispose()\n }", "async close() {\n\t\tif ( this.browser ) {\n\t\t\tawait this.page.waitForTimeout( 1000 );\n\t\t\tawait this.browser.close();\n\t\t\tthis.browser = null;\n\t\t}\n\t\treturn;\n\t}", "function finishProcess(){\n self.updateBars(callback);\n }", "function dispose() {}", "unload () {\n // controls.dispose();\n renderer.dispose();\n }", "function finishedLoad() {\n console.log('finishedLoad()');\n if (externalIsLoaded()) {\n init();\n }\n }", "Close() {\n\n }", "dispose() { }", "unload() {\n controls.dispose();\n renderer.dispose();\n }", "unload() {\n controls.dispose();\n renderer.dispose();\n }", "unload() {\n controls.dispose();\n renderer.dispose();\n }", "unload() {\n controls.dispose();\n renderer.dispose();\n }", "unload() {\n controls.dispose();\n renderer.dispose();\n }", "onClose() {\n\t\t}", "end() {\n process.exit();\n }", "Unload()\n {\n // TODO: Unload buffers\n }", "function onUnload() {\r\n \tcontrols.log('onUnload');\r\n stop();\r\n }", "function Close() {\n } // Close", "exit() {\n this.exit();\n }", "function unload() {\n\tif (globals.browser && globals.browser.bcCancelBrowse) {\n\t\tglobals.browser.bcCancelBrowse();\n\t\tcancelBrowse();\n\t}\n}", "close() {\n this.next = () => {};\n if (this.worker) {\n this.worker.next(true);\n }\n delete this.next;\n delete this.ctx;\n }", "close() {\n this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`);\n this.reset();\n\n _classPrivateFieldLooseBase(this, _storeUnsubscribe)[_storeUnsubscribe]();\n\n this.iteratePlugins(plugin => {\n this.removePlugin(plugin);\n });\n\n if (typeof window !== 'undefined' && window.removeEventListener) {\n window.removeEventListener('online', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n window.removeEventListener('offline', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n }\n }", "function closeHouseDetails(){\n ipc.send('ipc-close-house-detail', undefined);\n}", "close () {\n if (this._bulkLoadCompleteFn) this._bulkLoadCompleteFn(); \n }", "exit() {\n this.http.close();\n }", "onUnload(callback) {\n try {\n this.alive.next(false);\n this.alive.complete();\n // we want to stop polling. So false\n this.pollingTrigger.next(false);\n this.pollingTrigger.complete();\n // and we clear timeouts as well\n if (this.pollTimeout) {\n clearTimeout(this.pollTimeout);\n this.pollTimeout = null;\n }\n if (this.startPollingTimeout) {\n clearTimeout(this.startPollingTimeout);\n this.startPollingTimeout = null;\n }\n this.log.info('cleaned everything up...');\n callback();\n }\n catch (e) {\n callback();\n }\n }", "close() {\n API.LMSGetValue(\"cmi.core._children\")\n API.LMSFinish(\"\");\n _init = false;\n }", "function finishedProcess(){\n console.log('xxxxxxxxxxxxxxxxxxxx process manually terminated xxxxxxxxxxxxxxxxxxxxxx')\n printTotals();\n clearInterval(pound.statusUpdateIntervalId);\n process.exit();\n }", "function stopLoading() {\n //TODO\n}", "handleWindowClose() {\n\t\tthis.runFinalReport()\n\t}", "exit() {\n this.emitter.emit('exit');\n if (this.browser) this.browser.close();\n }", "function handleClose() {\n\n if ( element.parentNode ) {\n\n Pubsub.publishSync( Messages.HIDE_BLIND );\n\n // unloads emulator\n iframe.setAttribute( \"src\", \"\" );\n\n element.parentNode.removeChild( element );\n }\n\n // free allocated memory\n if ( _binaryURL ) {\n URL.revokeObjectURL( _binaryURL );\n _binaryURL = null;\n }\n}", "function cerrar() {\twindow.close(); }", "function end () {\n //the page goes white\n $('body').css({\n backgroundColor: 'white',\n });\n $('#canvas').css({\n visibility: 'hidden',\n });\n\n //the final package downloads\n window.open('https://whogotnibs.github.io/dart450/assignment02/downloads/package03.zip', '_blank');\n\n //the game functions stop running\n end = true;\n\n //the music stops\n Gibber.clear();\n}" ]
[ "0.6348805", "0.6326224", "0.62342507", "0.6222254", "0.6200246", "0.619346", "0.6188804", "0.61431783", "0.60977817", "0.60717237", "0.60084176", "0.5984164", "0.59779596", "0.5975232", "0.5966157", "0.5966157", "0.5964247", "0.59476763", "0.5930602", "0.59293115", "0.59293115", "0.59099877", "0.59025145", "0.58999735", "0.58692116", "0.586581", "0.58597904", "0.58521575", "0.5844967", "0.5841953", "0.5838037", "0.58270544", "0.58250505", "0.58250505", "0.58173877", "0.58090734", "0.58066916", "0.5804476", "0.5804476", "0.5804468", "0.57921445", "0.5789436", "0.5789436", "0.5777247", "0.5776926", "0.5776671", "0.57660633", "0.57636786", "0.5750711", "0.57447", "0.5744283", "0.5744283", "0.5744283", "0.5744283", "0.5744283", "0.57276523", "0.57172316", "0.5710176", "0.57039374", "0.5698146", "0.5695509", "0.5669384", "0.56657434", "0.5664252", "0.56586176", "0.5644461", "0.5637892", "0.5636689", "0.5632679", "0.5625573", "0.5623263", "0.56190187", "0.5608788", "0.5594995", "0.55947614", "0.55947614", "0.55947614", "0.55947614", "0.55947614", "0.559072", "0.5580117", "0.5574031", "0.5569112", "0.5569103", "0.5562143", "0.5561386", "0.5558071", "0.5547433", "0.5530759", "0.55208445", "0.551866", "0.5517389", "0.551557", "0.5515183", "0.55080754", "0.5503575", "0.55023766", "0.54928017", "0.54900926", "0.5470554" ]
0.6652615
0
Trigger actions with buttons
function startsim1() { //canvas_sim1 = document.getElementById("simulation1"); disableBtn("startsim1"); enableBtn("stopsim1"); let ctx_sim1 = canvas_sim1.getContext("2d"); ctx_sim1.fillStyle = 'rgba(255, 255, 255, .4)'; ctx_sim1.fillRect(0, 0, canvas_sim1.width, canvas_sim1.height); sim1.update(); sim1_chart.update(sim1.hist); sim1_timeout = window.setTimeout(startsim1, 25); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buttonActions() {\n\t\t$(\".button\").on(\"click\", function() {\n\t\t\tvar routeGiven = $(this).attr(\"id\");\n\t\t\tif ($(this).hasClass(\"clicked\")) {\n\t\t\t\t$(this).removeClass(\"clicked\");\n\t\t\t\troutes[routeGiven][\"vRefresh\"] = false;\n\t\t\t\t$(\".route_\" + routeGiven + \",\" + \".path_\" + routeGiven).css({\n\t\t\t\t\t\"visibility\": \"hidden\"\n\t\t\t\t});\n\t\t\t\t$(\"#\"+routeGiven).css({\n\t\t\t\t\t\"background-color\": \"#fff\",\n\t\t\t\t\t\"color\": \"#000\"\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t$(this).addClass(\"clicked\");\n\t\t\t\troutes[routeGiven][\"vRefresh\"] = true;\n\t\t\t\t$(\".route_\" + routeGiven + \",\" + \".path_\" + routeGiven).css({\n\t\t\t\t\t\"visibility\": \"visible\"\n\t\t\t\t});\n\t\t\t\t$(\"#\"+routeGiven).css({\n\t\t\t\t\t\"background-color\": \"#\" + routes[routeGiven][\"color\"],\n\t\t\t\t\t\"color\": \"#fff\"\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}", "function actionButton() {\n\t\t\tif ($('#status').hasClass('play')) {\n\t\t\t\tif (common.type == 'blockly') {\n\t\t\t\t\t// capture screenshot\n\t\t\t\t\tvar xml = capture.captureXml();\n\n\t\t\t\t\t// log screenshot data to database\n\t\t\t\t\tdbService.saveProgram(xml);\n\n\t\t\t\t\t// capture blockly and run generated code\n\t\t\t\t\tvar code = Blockly.JavaScript.workspaceToCode(vm.workspace);\n\t\t\t\t\teval(code);\n\t\t\t\t} else {\n\t\t\t\t\t// capture screenshot and save to database\n\t\t\t\t\tcapture.capturePng('.program-inner');\n\n\t\t\t\t\t// convert program in to list of instructions\n\t\t\t\t\tvar program = [];\n\n\t\t\t\t\tfor (var i = 0; i < vm.program.length; i++) {\n\t\t\t\t\t\tvar ins = vm.program[i];\n\t\t\t\t\t\tprogram.push(ins.name);\n\t\t\t\t\t}\n\n\t\t\t\t\tdbService.saveProgram(program);\n\t\t\t\t}\n\n\t\t\t\t// run program\n\t\t\t\trun();\n\n\t\t\t\t// log button press\n\t\t\t\tdbService.buttonPress('play');\n\n\t\t\t} else if ($('#status').hasClass('stop')) {\n\n\t\t\t\t// stop program\n\t\t\t\tstate.current = state.STOPPED;\n\n\t\t\t\tif (common.type == 'blockly') {\n\t\t\t\t\tvm.program.length = 0;\n\t\t\t\t}\n\n\t\t\t\t// log button press\n\t\t\t\tdbService.buttonPress('stop');\n\n\t\t\t} else if ($('#status').hasClass('rewind')) {\n\t\t\t\trewind();\n\t\t\t}\n\t\t}", "initButtons() {\n const self = this;\n const actions = [\n {\n id: 'compile',\n run: () => {\n self.compile();\n },\n },\n {\n id: 'save',\n run: () => {\n self.save();\n },\n },\n ];\n\n for (let action of actions) {\n const a = document.getElementById(action.id);\n a.addEventListener('click', action.run);\n this.views[action.id] = a;\n }\n }", "handleButton() {}", "function setupactions() {\n\t\tif (ts.ui.appframe) {\n\t\t\tdoaction = function(data) {\n\t\t\t\tgui.Action.ascendGlobal(document, up, data);\n\t\t\t\thandleactions();\n\t\t\t};\n\t\t} else if (ts.ui.subframe) {\n\t\t\tgui.get('main', function(main) {\n\t\t\t\tdoaction = function(data) {\n\t\t\t\t\tmain.action.descendGlobal(down, data);\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\t}", "function handleButtons () {\n handleStartButton();\n handleSubmitButton();\n handleNextButton();\n handleShowAllQandA();\n handleRestartButton();\n }", "function actionEvents() {\n\n // For each button in header, start game when clicked.\n\n buttons.forEach( ( button ) => {\n\n button.addEventListener( 'click', startAction);\n\n });\n\n}", "clickSpinActionEvent () {\n this.getInst('ControlDesktopController').clickSpinAction();\n }", "function actions(mActions) {\n\t\tif (!mActions) {\n\t\t\treturn;\n\t\t}\n\t\tconst oDiv = document.getElementById(\"actions\");\n\t\tfor (const [sTitle, fnAction] of Object.entries(mActions)) {\n\t\t\tconst oButton = document.createElement(\"button\");\n\t\t\toButton.innerText = sTitle;\n\t\t\toButton.onclick = fnAction.bind(null, setStatus);\n\t\t\toDiv.appendChild(oButton);\n\t\t}\n\t}", "function button_click(e) {\n e.preventDefault();\n var $this = e.target,\n name = $this.ancestor('.plugin.well').getAttribute('data-key'), // Get addon name.\n action = $this.getAttribute('data-action');\n if ($this.hasClass('disabled')) {\n return;\n }\n Y.log($this);\n // Get the addon object key to add to action list.\n\n Y.log('Button '+action+' started for '+name);\n // Add addon to actions array.\n if (action in M.local_rlsiteadmin.data_actions) {\n M.local_rlsiteadmin.data_actions[action][name] = name;\n Y.log(M.local_rlsiteadmin.data_actions);\n } else {\n Y.log('Unknown action requested: '+action);\n }\n\n // Disable button for this plugin.\n $this.addClass('disabled');\n M.local_rlsiteadmin.action_dropdown_update();\n }", "function listenForClick() {\n loopThroughGrid();\n clickTurnBtn();\n }", "clickHandler() {\n // Activate if not active\n if (this.active === false) {\n // Button view press effect\n this.changeToActive();\n // No click 'action' for input - text is removed in visualEffectOnActivation\n }\n }", "function actionOnClick(){\n score = 0;\n health = 100;\n reach = 0;\n day = 1;\n game.state.start('brushing');\n\n console.log('click');\n\n }", "function triggerToggleButton(e) {\n $(e).parent().children(\"button\").click();\n}", "function buttonsClick(e) {\n var target = e.target;\n while (target.id != \"story_content\") {\n switch (target.className) {\n case \"top\":\n moveBlockUp(target);\n return;\n case \"bottom\":\n moveBlockDown(target);\n return;\n case \"delete\":\n deleteBlock(target);\n return;\n case \"addmarker\":\n setactiveMarker(target);\n return;\n case \"addmarkerArtifact\":\n setactiveMarker(target);\n return;\n case \"removemarker\":\n removeMarker(target);\n return;\n case \"image_story gallery\":\n galleryChangePicture(target);\n return;\n case \"block_story\":\n editBlock(target);\n return;\n }\n target = target.parentNode;\n }\n}", "clickHandler() {\n // Activate if not active\n if (this.active === 'safety') {\n // Button view press effect\n this.removeSafety();\n } else if (this.active === false) {\n // Button view press effect\n this.changeToActive();\n // Click action\n this.clickAction();\n }\n }", "function bindActions(){\r\n $('a.iBtn').each(function(){\r\n var self = this;\r\n $(self).bind(\"hover\", function(){\r\n $(self).tooltip({placement: \"bottom\"})\r\n })\r\n .bind(\"click\", function(event){\r\n event.preventDefault();\r\n handleOnClick($(self).data('action'), $(self).data('cell'))\r\n })\r\n })\r\n // bind the action button too if Shiny is not found\r\n if (window.Shiny == undefined){\r\n $('a.action-button').each(function(){\r\n var self = this;\r\n $(self).bind(\"hover\", function(){\r\n $(self).tooltip({placement: \"bottom\"})\r\n })\r\n .bind(\"click\", function(event){\r\n event.preventDefault();\r\n handleOnClick($(self).data('action'), $(self).data('cell'))\r\n })\r\n })\r\n }\r\n}", "function onClick( event ) {\n for( var i = 0; i < _buttons.length; i++ ) {\n var button = _buttons[i];\n \n if( button.contains( event.layerX, event.layerY ) ) {\n actionPerformed( button.getActionCommand() );\n return;\n }\n }\n \n if( event.which == 1 ) {\n location.href = linkHref;\n }\n }", "menuButtonClicked() {}", "performAction() {\n this.show_tooltip = !this.show_tooltip;\n this.on_action.emit();\n }", "prepare_system_action_buttons() {\n\t\tlet template,\n\t\t\tactions = {\n\t\t\tshutdown: 'power-off',\n\t\t\thibernate: 'asterisk',\n\t\t\tsuspend: 'arrow-down',\n\t\t\trestart: 'refresh'\n\t\t};\n\n\t\tfor ( let action of Object.keys( actions ) ) {\n\t\t\tlet cmd = `can_${action}`;\n\n\t\t\ttemplate = `\n\t\t\t\t<a href=\"#\" id=\"${action}\" class=\"btn btn-default ${action}\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"${action.capitalize()}\" data-container=\"body\">\n\t\t\t\t\t<i class=\"fa fa-${actions[action]}\"></i>\n\t\t\t\t</a>`;\n\n\t\t\tif ( ! lightdm[cmd] ) {\n\t\t\t\t// This action is either not available on this system or we don't have permission to use it.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$( template )\n\t\t\t\t.appendTo( this.$actions_container )\n\t\t\t\t.on( 'click', event => this.system_action_handler(event) );\n\n\t\t} // END for (let [action, icon] of actions)\n\n\t\t$( '[data-toggle=tooltip]' ).tooltip();\n\t\t$( '.modal' ).modal( { show: false } );\n\t}", "function enableActions () {\n $('#actions').attr('class', 'button-container active')\n $('#adopt').attr('class', 'button-container')\n \n resetPet()\n itsAlive()\n updatePetInfoInHtml()\n}", "click(event) {\n if (event.target === this.get('element')) {\n this.sendAction();\n }\n }", "initButtons() {\n this.setupButton(\"efecBtn\", (e) => {\n\n })\n\n }", "buttonClicked() {\n alert(\"buttonclicked of button\");\n }", "function toggle_actions(e) {\n Y.log('Toggle the actions!');\n var $actions = Y.one('ul#plugin-actions');\n\n if (!Y.one('button.plugin-actions').hasClass('disabled') && $actions.getStyle('display') === 'none') {\n $actions.setStyle('display', 'block');\n } else {\n $actions.setStyle('display', 'none');\n }\n $actions.get('parentNode').toggleClass('open');\n }", "clickHandler(e) {\n // Only activate if there is a buttonHandler\n if (this.buttonHandler !== false) {\n // Activate if not active\n if (this.active === false) {\n // Button view press effect\n this.changeToActive();\n // Click action\n this.clickAction();\n }\n }\n }", "function addButtonActions() {\r\n var startButton = document.getElementById('button-start');\r\n var questionsButton = document.getElementById('button-questions');\r\n\r\n startButton.addEventListener(\"click\", function () {\r\n showStartPage();\r\n });\r\n questionsButton.addEventListener(\"click\", function () {\r\n showQuestionsPage();\r\n });\r\n}", "function commandButtonHandle(){\n\t\tswitch(this.id){\n\t\t\tcase \"commandbutton_1\":\n\t\t\t\tonDealCardsClicked();\n\t\t\t\tbreak;\n\t\t\tcase \"commandbutton_2\":\n\t\t\t\tonMaxBetClicked();\n\t\t\t\tbreak;\n\t\t\tcase \"commandbutton_3\":\n\t\t\t\tonAddFiveClicked();\n\t\t\t\tbreak;\n\t\t\tcase \"commandbutton_4\":\n\t\t\t\tonRemoveFiveClicked();\n\t\t\t\tbreak;\n\t\t}\n\t}", "updateAction() {}", "initButtons() {\n let buttons = document.querySelectorAll('.btn');\n buttons.forEach(btn => { \n btn.addEventListener('click', e => {\n let btnClick = btn.innerHTML;\n this.actionCalc(btnClick); \n }, false);\n }); \n }", "function setupButtons(){\n //speak(quiz[currentquestion]['question'])\n\t\t$('.choice').on('click', function(){\n\t\tsynth.cancel();\n is_on = 0;\n\t\tpicked = $(this).attr('data-index');\n\t\tspeak(quiz[currentquestion]['choices'][picked], LINGUA_RISPOSTA);\n\t\tshow_button();\n\t\t// risposte in francese\n\t\t$('.choice').removeAttr('style').off('mouseout mouseover');\n\t\t$(this).css({'font-weight':'900', 'border-color':'#51a351', 'color':'#51a351', 'background' : 'gold'});\n\t\tif(submt){\n\t\t\t\tsubmt=false;\n\t\t\t\t$('#submitbutton').css({'color':'#fff','cursor':'pointer'}).on('click', function(){\n\t\t\t\t$('.choice').off('click');\n\t\t\t\t$(this).off('click');\n\t\t\t\tprocessQuestion(picked);\n //\n\t\t\t\t});\n\t\t\t}\n\t\t})\n\t}", "function bindButtonActions() {\n // create a new project on click\n createProjectButton.onclick = createProject;\n\n // start the timer on button click\n timerButton.onclick = () => {\n if (timerButton.innerHTML == \"Start Timing\")\n {\n // change button text\n timerButton.innerHTML = \"Stop Timing\";\n\n startTimer();\n }\n else\n {\n // change button text\n timerButton.innerHTML = \"Start Timing\";\n\n stopTimer();\n }\n }\n}", "onClick(element) {\n\t\taction(`You have clicked on element ${element.name}`).call();\n\t}", "function buttonClick(){\r\n\r\n var buttonTriggered = this.innerHTML;\r\n clickPress(buttonTriggered);\r\n buttonAnimation(buttonTriggered);\r\n\r\n}", "addFunctionsToBtns() {\n this.querySelector('#seed-picker-up').addEventListener('click', () => {\n this.changeSeed('up');\n });\n\n this.querySelector('#seed-picker-down').addEventListener('click', () => {\n this.changeSeed('down');\n });\n }", "buttonHandler(){\n\t\tvar items = this.props.hey.questions.present;\n\t\tlet conditions = this.props.hey.conditions.present;\n\t\tlet counter = this.props.hey.counter.present;\n\t\tconst action = this.props.action;\n\t\tconst increment = this.props.increment;\n\t\tconst hide = this.props.hideState;\n\t\tsendButtonHandler(items,conditions,counter,action,increment,hide);\n\t}", "function buttons() {\n\t$('#cardForm').on('click', '#newGame', function() {\n\t\tevent.preventDefault();\n\t\tgetCard();\n\t\t$('#newGame').hide();\n $('#newCard').show();\n $('#prevCard').show();\n $('#btnRules').show();\n $('#answerBtn').show();\n\t\t$('#rules').hide();\n\t});\n\n\t$('#cardForm').on('click', '#newCard', function() {\n\t\tevent.preventDefault();\n\t\tflipped=false;\n\t\tgetCard();\n });\n \n $('#cardForm').on('click', '#prevCard', function() {\n\t\tevent.preventDefault();\n\t\tflipped=false;\n\t\tgetPrevCard();\n });\n \n $('#cardForm').on('click', '#answerBtn', function() {\n event.preventDefault();\n\t\tdisplayAnswer();\n\t});\n\n\t$('#cardForm').on('click', '#btnRules', function() {\n\t\tevent.preventDefault();\n\t\t$('#rules').toggle();\n\t});\n}", "blueClick() {\n\t\tthis._actions.onNext('blue');\n\t}", "function _setTriggers() {\n var i = btnList.length;\n\n while (i--) {\n var btnObj = btnList[i];\n _setTrigger(btnObj.element, btnObj.clickFn, btnObj.condFn);\n }\n }", "function do_button_select(oldbtn, newbtn) {\n switch (oldbtn) {\n case \"div_button_home\":\n $(\"#div_content_home\").fadeOut(divsConfig.fadeSpeed);\n break;\n case \"div_button_map\":\n break;\n case \"div_button_data\": $(\"#div_content_data\").fadeOut(divsConfig.fadeSpeed);\n break;\n case \"div_button_upload\": \n window.open(htmllinks.upload, \"espupload\");\n break;\n case \"div_button_contact\": $(\"#div_content_contact\").fadeOut(divsConfig.fadeSpeed);\n break;\n case \"div_button_help\": $(\"#div_content_help\").fadeOut(divsConfig.fadeSpeed);\n break;\n }\n switch (newbtn) {\n case \"div_button_home\":\n $(\"#div_content_home\").fadeIn(divsConfig.fadeSpeed);\n break;\n case \"div_button_map\":\n break;\n case \"div_button_data\":\n $(\"#div_content_data\").fadeIn(divsConfig.fadeSpeed);\n break;\n case \"div_button_upload\": \n window.open(htmllinks.upload, \"espupload\");\n break;\n case \"div_button_contact\": $(\"#div_content_contact\").fadeIn(divsConfig.fadeSpeed);\n break;\n case \"div_button_help\": $(\"#div_content_help\").fadeIn(divsConfig.fadeSpeed);\n break;\n }\n}", "function makeActionBtns(targetRow, projectId) {\n targetRow.lastElementChild.innerHTML = `<a href='/{{user.username}}/project/${projectId}/track' class='btn btn-primary track'><i class=\"ph-timer ph-lg\"></i> Track</a>\n <button data-trigger='hover' data-container='button' data-toggle=\"tooltip\" data-placement='top' title=\"Edit project details\" class='btn icon edit'><i class=\"ph-pencil-simple ph-lg edit\"></i></button>\n <button data-trigger='hover' data-container='button' data-toggle=\"tooltip\" data-placement='top' title=\"Delete\" class='btn icon delete'><i class=\"ph-trash-simple delete ph-lg\"></i></button>`;\n handleTooltips();\n}", "function sayThings() {\n console.log(\"this button is clicked!\")\n}", "function click() {\n\n setName('Ram')\n setAge(21)\n // console.log(\"button clicked\")\n console.log(name,age)\n }", "clicked() {\n this.get('onOpen')();\n }", "function clickManage() {\n\t$.trigger(\"clickManage\");\n}", "function userButtonPressAction() {\n $(\".btn\").click(function() {\n if(!isClickPatternOrderedSubsetOfGamePattern()) {\n gameOver();\n return;\n }\n if(userClickPattern.length < gamePattern.length)\n return;\n\n /*if user gets to this point, then the clickPattern must equal the\n gamePattern. So, the user will go on to the next level*/\n userClickPattern = [];\n setTimeout(nextLevel, 1000);\n\n });\n}", "clickOnButton() {\n if (!this._disabled) {\n this.cancelBlur();\n this.focusOnButton();\n\n if (this._triggers === 'click') {\n this.toggleMenuVisibility();\n }\n }\n }", "performAction () {\n if(this.action != null) \n this.action();\n }", "function demoAction(button) {\n console.log(\"@demoAction\");\n\tvar action = button.attr(\"data-cp-action\");\n\tvar patientId =$(\"#patientrecord\").attr(\"data-cp-patientid\");\n\tvar data = \"\";\n\tswitch (action) {\n\t case \"get_testresult\": \n\t\t // Respond to \"Demo\" menu \"Get ... test\" buttons\n\t\t\tdata = \"testtype=\" + button.attr(\"data-cp-testtype\");;\n\t\t\tbreak;\n \t case \"reset\":\n\t\t deleteProcesses();\n\t\t break;\n\t}\n\t\n \tupdatePatientRecord(patientId, data, action);\n\tresetPatientRecordDisplayArea();\n}", "function actionPicker(event) {\r\n\tevent.preventDefault();\r\n\tevent.stopPropagation();\r\n\t//button sound\r\n\tbtnSound();\r\n\t//screen move\r\n\tgoto();\r\n\t//action\r\n\tvar action = event.target.getAttribute('data-action');\r\n\tif (action) {\r\n\t\twindow[action](event);\r\n\t}\r\n}", "handleButtonClick(){\n\t\tconsole.log(\"handleButtonClick\");\n\n\t\teventsActions.createEvent(this.state.event);\n\t}", "_beforeRender () {\n if (webix.ARCHIBUS.buttonsMap) {\n for (var key in webix.ARCHIBUS.buttonsMap) {\n var button = webix.ARCHIBUS.buttonsMap[key];\n this.on_click[button.class] = webix.actions[button.function];\n }\n }\n if (webix.ARCHIBUS.editButtonMap) {\n for (var key in webix.ARCHIBUS.editButtonMap) {\n var button = webix.ARCHIBUS.editButtonMap[key];\n this.on_click[button.class] = button.function;\n }\n }\n }", "function clickSolve(){\n env.click.render() ;\n env.clickCopy.render() ;\n refreshDisplay() ;\n}", "function markButton(event){\n// $(\"#qwerty button\").on(\"click\", (event) => {\nevent.target.disabled = true;\nevent.target.classList.add (\"chosen\")\n// if (event.target.tagName === \"BUTTON\")\napp.handleInteraction(event.target.innerHTML.toLowerCase());\n}", "click() { }", "function buttons(){\n $('#ingredients').click(event => {\n $('#welcome').addClass('hidden')\n $('#recipe-search').removeClass('hidden')\n $('#recipe-search').prepend(`<p>What ingredients would you like to use? (i.e. 'gochujang, rice')</p>`)\n })\n $('#dishes').click(event => {\n $('#welcome').addClass('hidden')\n $('#recipe-search').removeClass('hidden')\n $('#recipe-search').prepend(`<p>What are we cooking? (i.e. 'carbonara')</p>`)\n })\n}", "function addButtonEvent() {\n\t\t\tbtnList.begin.click(API.begin);\n\t\t\tbtnList.fastBackward.click(function () {API.backward(FAST_STEP_NUM); });\n\t\t\tbtnList.backward.click(function () {API.backward(1); });\n\t\t\tbtnList.forward.click(function () {API.forward(1); });\n\t\t\tbtnList.fastForward.click(function () {API.forward(FAST_STEP_NUM); });\n\t\t\tbtnList.end.click(API.end);\n\t\t\tbtnList.flag.click(API.flag);\n\t\t\tbtnList.auto.click(API.setAuto);\n\t\t}", "action(type, px, py, evt) { console.log('Action callback'); }", "function onClick() {\n // const behavior = this.getAttribute('my-action');\n // const behavior = this.dataset\n // console.dir(this.dataset.action, 'action');\n const behavior = this.dataset.action;\n\n actions[behavior] && actions[behavior]();\n // console.log(this.getAttribute('my-action'), 'my-action');\n // setTimeout(() => this.setAttribute('my-action', 'hello'), 3000);\n // setTimeout(() => this.removeAttribute('my-action'), 3000);\n }", "function whenButtonPressed(){\n\tconsole.log(\"you pushed button!\");\n}", "function test_generic_object_button_execute_playbook() {}", "function clickLearn() {\n\t$.trigger(\"clickLearn\");\n}", "async clickTrigger() {\n await (await this.trigger).click();\n }", "function clickHandler() {\n console.log(\"Button 2 Pressed\");\n }", "function button0() {buttonAll(0, c0);}", "function startButton(){\n hunger();\n happy();\n knowledge();\n \n}", "function setClickBehaviour(){\n\t\t\tbutton.on(\"click\", changeButtonLabelAndSendEvent);\n\t\t}", "function buttonClicked(){\n if (isShowingOverlays) {\n removeOverlays();\n isShowingOverlays = false;\n } else {\n isShowingOverlays = true;\n }\n\n button.writeProperty('buttonState', isShowingOverlays ? 0 : 1);\n button.writeProperty('defaultState', isShowingOverlays ? 0 : 1);\n button.writeProperty('hoverState', isShowingOverlays ? 2 : 3);\n}", "onObjectClicked(pointer, gameObject) {\n\t\tif (gameObject.name === 'ok') {\n\t\t\tlet nextAction = game.gameData.getNextAction();\n\t\t\tgame.scene.start(nextAction.sceneName);\n\t\t}\n\t}", "function doClick(button) {\r\n\r\n inputBox.focus();\r\n\r\n if (button.textOp) {\r\n\r\n if (undoManager) {\r\n undoManager.setCommandMode();\r\n }\r\n\r\n var state = new TextareaState(panels);\r\n\r\n if (!state) {\r\n return;\r\n }\r\n\r\n var chunks = state.getChunks();\r\n\r\n // Some commands launch a \"modal\" prompt dialog. Javascript\r\n // can't really make a modal dialog box and the WMD code\r\n // will continue to execute while the dialog is displayed.\r\n // This prevents the dialog pattern I'm used to and means\r\n // I can't do something like this:\r\n //\r\n // var link = CreateLinkDialog();\r\n // makeMarkdownLink(link);\r\n // \r\n // Instead of this straightforward method of handling a\r\n // dialog I have to pass any code which would execute\r\n // after the dialog is dismissed (e.g. link creation)\r\n // in a function parameter.\r\n //\r\n // Yes this is awkward and I think it sucks, but there's\r\n // no real workaround. Only the image and link code\r\n // create dialogs and require the function pointers.\r\n var fixupInputArea = function () {\r\n\r\n inputBox.focus();\r\n\r\n if (chunks) {\r\n state.setChunks(chunks);\r\n }\r\n\r\n state.restore();\r\n previewManager.refresh();\r\n };\r\n\r\n var noCleanup = button.textOp(chunks, fixupInputArea);\r\n\r\n if (!noCleanup) {\r\n fixupInputArea();\r\n }\r\n\r\n }\r\n\r\n if (button.execute) {\r\n button.execute(undoManager);\r\n }\r\n }", "function setupButtons() {\n d3.select('#toolbar')\n .selectAll('.button')\n .on('click', function () {\n // Remove active class from all buttons\n d3.selectAll('.button').classed('active', false);\n // Find the button just clicked\n var button = d3.select(this);\n\n // Set it as the active button\n button.classed('active', true);\n\n // Get the id of the button\n var buttonId = button.attr('id');\n console.log(buttonId);\n\n\t //$(this).closest(\"form\").submit();\n \n });\n}", "function attachActionButtons () {\n // Generic elements but select / <a>\n $(document).on('click', '*[data-gmapz-target]:not(select)', function (e) {\n e.preventDefault();\n var\n target = $(this).attr('data-gmapz-target');\n // Get all data attributes ans send them to gmapz handler and the element\n $('[data-gmapz=\"'+target+'\"]')[0].gmapz.btnAction($(this).data(), $(this));\n }).on('change', 'select[data-gmapz-target]', function (e) {\n // <select>\n var\n target = $(this).attr('data-gmapz-target');\n $('[data-gmapz=\"'+target+'\"]')[0].gmapz.btnAction($(this).find('option:selected').data());\n });\n\n }", "function updateActions(data) {\n updateCanvasHeight();\n showQuickMenu(data);\n // Closing menu if opened.\n if ($(\"#qmcaret\").hasClass(\"fa-caret-up\")) {\n toggleMenu();\n }\n $(\".spinner\").hide();\n\n}", "handleClick() {}", "HAXCMSFireButtonEvent(name, target, payload) {\n // send message off so that the control board hands it off to the CMS\n const evt = new CustomEvent(name, {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: {\n originalTarget: target,\n values: payload,\n },\n });\n this.dispatchEvent(evt);\n }", "handleInteraction() {\r\n document.querySelector('button').onclick=function() {\r\n alert('clicked');\r\n }\r\n }", "_addActionEdit() {\n let btn = this._actions.getElementsByClassName('edit')[0];\n if (btn === undefined) {\n return;\n }\n\n btn.onclick = ((event) => {\n window.location.href = Service.editorUrl(this._api.getSlug());\n }).bind(this);\n\n this._btns.edit = btn;\n }", "function onButtonClick() {\n\t\t\t_scope.dispatchEvent( ContentMediator.ON_SHOW_NOTIFICATION_WINDOW );\n\t\t}", "function buttonOn(){\n\t\t\t$('#power-button').unbind('click');\n\t\t\t$('#power-button').click(function(){\n\t\t\t\t// do a little terminal flash or something cool\n\t\t\t\t setTimeout(powerOn,500);\n\t\t\t});\n\t\t}", "function buildActionButtons(){\n/* 241 */ \t\t$('input[type=\"button\"][window_target],input[type=\"button\"][modal_target]').click(function(el){\n/* 242 */ \t\t\tvar url = '';\n/* 243 */ \t\t\tvar title = $(this).attr('_title');\n/* 244 */ \t\t\t// Window\n/* 245 */ \t\t\tif ($(this).attr('window_target')) {\n/* 246 */ \t\t\t\turl = $(this).attr('window_target');\n/* 247 */ \t\t\t\tparent.MochaUI.openWindow({\n/* 248 */ \t\t\t\t\tid: \t\t\turl,\n/* 249 */ \t\t\t\t\ttitle: \t\t\ttitle,\n/* 250 */ \t\t\t\t\tcontentURL: \turl\n\n/* forms.js */\n\n/* 251 */ \t\t\t\t});\n/* 252 */ \t\t\t}\n/* 253 */ \t\t\t// Modal\n/* 254 */ \t\t\telse {\n/* 255 */ \t\t\t\turl = $(this).attr('modal_target');\n/* 256 */ \t\t\t\tparent.MochaUI.openModal({\n/* 257 */ \t\t\t\t\tid: \t\t\turl,\n/* 258 */ \t\t\t\t\ttitle: \t\t\ttitle,\n/* 259 */ \t\t\t\t\tcontentURL: \turl\n/* 260 */ \t\t\t\t});\n/* 261 */ \t\t\t}\n/* 262 */ \t\t});\n/* 263 */ \t}", "_buttonClickHandler() { }", "function trigger( /* action, arg1, arg2, ... */ ) {\n var args = Array.prototype.slice.call( arguments );\n var action = args.shift();\n\n if( typeof action === 'string' ) {\n _runHook( 'actions', action, args );\n }\n return MethodsAvailable;\n }", "function trigger() {\n $el.data(\"pat-inject-autoloaded\", true);\n _.onClick.apply($el[0], []);\n return true;\n }", "*pressButtonA() {\n yield this.sendEvent({ type: 0x01, code: 0x130, value: 1 });\n }", "function init() {\r\n $(\"#btn1\").click(questionOneAction);\r\n $(\"#btn2\").click(questionTwoAction);\r\n $(\"#btn3\").click(questionThreeAction);\r\n $(\"#btn4\").click(questionFourAction);\r\n $(\"#btn5\").click(questionFiveAction);\r\n $(\"#btn6\").click(questionSixAction);\r\n $(\"#btn7\").click(questionSevenAction);\r\n $(\"#btn8\").click(questionEightAction);\r\n $(\"#btn9\").click(questionNineAction);\r\n $(\"#btn10\").click(questionTenAction);\r\n}", "function buttonClick() {\n\tvar id = event.target.id;\n\tswitch(id) {\n\tcase \"Load\":\n\t\tbtRead.disabled = false;\n\t\tloadParams();\n\tbreak;\n\tcase \"Read\":\n\t\tbtStart.disabled = false;\n\t\treadParams();\n\tbreak;\n\tcase \"Start\":\n\t\tif(btStart.innerHTML == \"Start\") {\n\t\t\tbtLoad.disabled = true;\n\t\t\tbtRead.disabled = true;\n\t\t\tbtInfo.disabled = true;\n\t\t\tbtStart.innerHTML = \"Stop\";\n\t\t\tproc = setInterval(simulate, Tproc);\n\t\t} else {\n\t\t\tbtLoad.disabled = false;\n\t\t\tbtRead.disabled = false;\n\t\t\tbtInfo.disabled = false;\n\t\t\tbtStart.innerHTML = \"Start\";\n\t\t\tclearInterval(proc);\n\t\t}\n\tbreak;\n\tcase \"Info\":\n\t\tvar info = \"\";\n\t\tinfo += \"windpend.js\\n\";\n\t\tinfo += \"Wind blows a simple pendulum\\n\";\n\t\tinfo += \"Sparisoma Viridi\\n\";\n\t\tinfo += \"https://github.com/dudung/butiran.js\\n\"\n\t\tinfo += \"Load load parameters\\n\";\n\t\tinfo += \"Read read parameters\\n\";\n\t\tinfo += \"Start start simulation\\n\";\n\t\tinfo += \"Info show this messages\\n\";\n\t\tinfo += \"\\n\";\n\t\taddText(info).to(taOut);\n\tbreak;\n\tdefault:\n\t}\n}", "startBtnClickHandler() {\n this.changeGamePhase(\"creatureSelect\");\n }", "function activateButton() {\n\t\t\t$(\"#cd-inittour-trigger\").addClass('clicked');\n\t\t}", "handleJDotterClick() {}", "function autoClick() {\n //simulate a click of <button id=\"refresh\">Refresh</button>\n \n }", "function makeButtons() {\n\t// attach script to reset button\n\tvar resetObject = GameObject.CreatePrimitive(PrimitiveType.Quad);\n\tvar resetScript = resetObject.AddComponent(resetButtonMouse);\n\tresetScript.init(this);\n\t\n\t// attach script to menu button\n\tvar menuObject = GameObject.CreatePrimitive(PrimitiveType.Quad);\n\tvar menuScript = menuObject.AddComponent(menuButtonMouse);\n\tmenuScript.init(this);\n\t\n\t// attach script to help button\n\tvar helpObject = GameObject.CreatePrimitive(PrimitiveType.Quad);\n\tvar helpScript = helpObject.AddComponent(helpButtonMouse);\n\thelpScript.init(this);\n\n\t// attach script to mute button\n\tvar muteObject = GameObject.CreatePrimitive(PrimitiveType.Quad);\n\tvar muteScript = muteObject.AddComponent(muteButtonMouse);\n\tmuteScript.init(this);\n\n\tvar tempheight: int =Screen.height/500;\n\t\tmenuObject.transform.position = Vector3(-2, 7, 0);\n\t\tresetObject.transform.position = Vector3(-2, 6, 0);\n\t\tmuteObject.transform.position = Vector3(-2, 5, 0);\n\t\thelpObject.transform.position = Vector3(-2, 4, 0);\n}", "function listenForButton() {\n\t\ttag.on('simpleKeyChange', function(left, right) {\n\t\t\t// if both buttons are pressed, disconnect:\n\t\t\tif (left && right) {\n\t\t\t\tconsole.log('both');\n\t\t\t\ttag.disconnect();\n\t\t\t} else\t\t\t\t// if left, send the left key\n\t\t\tif (left) {\n\t\t\t\tconsole.log('left: ' + left);\n\t\t\t\trunFile('applescript/left.scpt');\n\t\t\t} else\n\t\t\tif (right) {\t\t// if right, send the right key\n\t\t\t\tconsole.log('right: ' + right);\n\t\t\t\trunFile('applescript/right.scpt');\n\t\t\t}\n\t });\n\t}", "function editor_action(button_id) {\r\n\r\n // split up button name into \"editorID\" and \"cmdID\"\r\n var BtnParts = Array();\r\n BtnParts = button_id.split(\"_\");\r\n var objname = button_id.replace(/^_(.*)_[^_]*$/, '$1');\r\n var cmdID = BtnParts[ BtnParts.length-1 ];\r\n var button_obj = document.all[button_id];\r\n var editor_obj = document.all[\"_\" +objname + \"_editor\"];\r\n var config = document.all[objname].config;\r\n\r\n // help popup\r\n if (cmdID == 'showhelp') {\r\n window.open(_editor_url + \"/html/egovframework/com/cmm/utl/htmlarea/popups/editor_help.html\", 'EditorHelp');\r\n return;\r\n }\r\n\r\n // popup editor\r\n if (cmdID == 'popupeditor') {\r\n window.open(_editor_url + \"/html/egovframework/com/cmm/utl/htmlarea/popups/fullscreen.html?\"+objname,\r\n 'FullScreen',\r\n 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600');\r\n return;\r\n }\r\n\r\n // check editor mode (don't perform actions in textedit mode)\r\n if (editor_obj.tagName.toLowerCase() == 'textarea') { return; }\r\n\r\n var editdoc = editor_obj.contentWindow.document;\r\n editor_focus(editor_obj);\r\n\r\n // get index and value for pulldowns\r\n var idx = button_obj.selectedIndex;\r\n var val = (idx != null) ? button_obj[ idx ].value : null;\r\n\r\n if (0) {} // use else if for easy cutting and pasting\r\n\r\n //\r\n // CUSTOM BUTTONS START HERE\r\n //\r\n\r\n // Custom1\r\n else if (cmdID == 'custom1') {\r\n alert(\"Hello, I am custom button 1!\");\r\n }\r\n\r\n // Custom2\r\n else if (cmdID == 'custom2') { // insert some text from a popup window\r\n var myTitle = \"This is a custom title\";\r\n var myText = showModalDialog(_editor_url + \"/html/egovframework/com/cmm/utl/htmlarea/popups/custom2.html\",\r\n myTitle, // str or obj specified here can be read from dialog as \"window.dialogArguments\"\r\n \"resizable: yes; help: no; status: no; scroll: no; \");\r\n if (myText) { editor_insertHTML(objname, myText); }\r\n }\r\n\r\n // Custom3\r\n else if (cmdID == 'custom3') { // insert some text\r\n editor_insertHTML(objname, \"It's easy to add buttons that insert text!\");\r\n }\r\n\r\n //\r\n // END OF CUSTOM BUTTONS\r\n //\r\n\r\n // FontName\r\n else if (cmdID == 'FontName' && val) {\r\n editdoc.execCommand(cmdID,0,val);\r\n }\r\n\r\n // FontSize\r\n else if (cmdID == 'FontSize' && val) {\r\n editdoc.execCommand(cmdID,0,val);\r\n }\r\n\r\n // FontStyle (change CSS className)\r\n else if (cmdID == 'FontStyle' && val) {\r\n editdoc.execCommand('RemoveFormat');\r\n editdoc.execCommand('FontName',0,'636c6173734e616d6520706c616365686f6c646572');\r\n var fontArray = editdoc.all.tags(\"FONT\");\r\n for (i=0; i<fontArray.length; i++) {\r\n if (fontArray[i].face == '636c6173734e616d6520706c616365686f6c646572') {\r\n fontArray[i].face = \"\";\r\n fontArray[i].className = val;\r\n fontArray[i].outerHTML = fontArray[i].outerHTML.replace(/face=['\"]+/, \"\");\r\n }\r\n }\r\n button_obj.selectedIndex =0;\r\n }\r\n\r\n // fgColor and bgColor\r\n else if (cmdID == 'ForeColor' || cmdID == 'BackColor') {\r\n var oldcolor = _dec_to_rgb(editdoc.queryCommandValue(cmdID));\r\n var newcolor = showModalDialog(_editor_url + \"/html/egovframework/com/cmm/utl/htmlarea/popups/select_color.html\", oldcolor, \"resizable: no; help: no; status: no; scroll: no;\");\r\n if (newcolor != null) { editdoc.execCommand(cmdID, false, \"#\"+newcolor); }\r\n }\r\n\r\n // execute command for buttons - if we didn't catch the cmdID by here we'll assume it's a\r\n // commandID and pass it to execCommand(). See http://msdn.microsoft.com/workshop/author/dhtml/reference/commandids.asp\r\n else {\r\n // subscript & superscript, disable one before enabling the other\r\n if (cmdID.toLowerCase() == 'subscript' && editdoc.queryCommandState('superscript')) { editdoc.execCommand('superscript'); }\r\n if (cmdID.toLowerCase() == 'superscript' && editdoc.queryCommandState('subscript')) { editdoc.execCommand('subscript'); }\r\n\r\n // insert link\r\n if (cmdID.toLowerCase() == 'createlink'){\r\n editdoc.execCommand(cmdID,1);\r\n }\r\n\r\n // insert image\r\n else if (cmdID.toLowerCase() == 'insertimage'){\r\n showModalDialog(_editor_url + \"/html/egovframework/com/cmm/utl/htmlarea/popups/insert_image.html\", editdoc, \"resizable: no; help: no; status: no; scroll: no; \");\r\n }\r\n\r\n // insert table\r\n else if (cmdID.toLowerCase() == 'inserttable'){\r\n showModalDialog(_editor_url + \"/html/egovframework/com/cmm/utl/htmlarea/popups/insert_table.html?\"+objname,\r\n window,\r\n \"resizable: yes; help: no; status: no; scroll: no; \");\r\n }\r\n\r\n // all other commands microsoft Command Identifiers\r\n else { editdoc.execCommand(cmdID); }\r\n }\r\n\r\n editor_event(objname);\r\n}", "function actionOnClickFact() {\n confirm_sound.play()\n this.state.start('Fact_dif')\n}", "function actions() {\n inquirer\n .prompt({\n name: \"action\",\n type: \"list\",\n message: \"\\n\\nWhat would you like to do?\\n\",\n choices: [\n \"View all products\",\n \"View products with low inventory\",\n \"Add to inventory\",\n \"Add a new product\",\n \"Exit\"\n ]\n })\n // Checks the users selection against four possible cases and runs a function based on the match\n .then(function (answer) {\n switch (answer.action) {\n case \"View all products\":\n viewProducts();\n break;\n\n case \"View products with low inventory\":\n viewLow();\n break;\n\n case \"Add to inventory\":\n addInventory();\n break;\n\n case \"Add a new product\":\n addProduct();\n break;\n\n case \"Exit\":\n connection.end();\n break;\n }\n });\n}", "function handleUi() {\n var buttonText = 'Copy event URL';\n // create button copy url node\n var button = (function () {\n var buttonTemplate = `<div id=\":999.copy_url_top\" class=\"ep-ea-btn-wrapper\">&nbsp;<div class=\"goog-inline-block goog-imageless-button\" role=\"button\" tabindex=\"0\" style=\"-webkit-user-select: none;\"><div class=\"goog-inline-block goog-imageless-button-outer-box\"><div class=\"goog-inline-block goog-imageless-button-inner-box\"><div class=\"goog-imageless-button-pos\"><div class=\"goog-imageless-button-top-shadow\">&nbsp;</div><div class=\"goog-imageless-button-content\">${buttonText}</div></div></div></div></div></div>`;\n var button = document.createElement('div');\n button.innerHTML = buttonTemplate;\n return button.childNodes[0];\n })();\n\n // container where all the action buttons are in like save, discard etc\n var buttonContainer = document.querySelector('.ep-ea');\n var lastButton = buttonContainer.querySelector('.ep-ea-btn-wrapper:last-of-type');\n\n // insert button after the last button\n buttonContainer.insertBefore(button, lastButton.nextSibling);\n var buttonTextContainer = button.querySelector('.goog-imageless-button-content');\n\n button.addEventListener('click', function () {\n var eventUrl = retrieveEventUrl();\n var confirmButtonText = buttonText + ' ✔';\n copyToClipboard(eventUrl);\n buttonTextContainer.textContent = confirmButtonText;\n\n window.setTimeout(function () {\n buttonTextContainer.textContent = buttonText;\n }, 5000);\n });\n\n }", "buttonTwoClick(evt) {\n alert(\"Button Two Clicked\");\n }", "function onButton(){\n input();\n output();\n\n}", "function watchButton() {\n //check for shannon button \n $('#js-section-one-button').on('click', event => {\n //prevent default form behavior\n event.preventDefault();\n //console.log($('#js-section-one-button').text());\n switchHTML('shannon', $('#js-section-one-button').text(), 'one');\n });\n \n //check for chris button\n $('#js-section-two-button').on('click', event => {\n //prevent default form behavior\n event.preventDefault();\n //console.log($('#js-section-one-button').text());\n switchHTML('chris', $('#js-section-two-button').text(), 'two');\n });\n\n //check for lindy button\n $('#js-section-three-button').on('click', event => {\n //prevent default form behavior\n event.preventDefault();\n //console.log($('#js-section-one-button').text());\n switchHTML('lindy', $('#js-section-three-button').text(), 'three');\n });\n\n //check for jennifer button\n $('#js-section-four-button').on('click', event => {\n //prevent default form behavior\n event.preventDefault();\n //console.log($('#js-section-one-button').text());\n switchHTML('jennifer', $('#js-section-four-button').text(), 'four');\n });\n}", "function revealAutomation() {\n reveal('automationActions');\n reveal('automation');\n $('#automateInt').click(buildAutomaton('intelligence'));\n $('#automateTraining').click(buildAutomaton('training'));\n $('#automateTinkering').click(buildAutomaton('tinkering'));\n $('#automateScavenging').click(buildAutomaton('scavenging'));\n}" ]
[ "0.6924182", "0.69096863", "0.66520566", "0.6600927", "0.65185404", "0.64350504", "0.6425251", "0.64069057", "0.638229", "0.63747144", "0.6369747", "0.63506067", "0.63238335", "0.6302309", "0.62645614", "0.6259694", "0.62532675", "0.6225584", "0.6220046", "0.6206496", "0.6177539", "0.6157941", "0.6126918", "0.6118575", "0.60985875", "0.6095061", "0.6092929", "0.6092494", "0.60886335", "0.6082597", "0.6076015", "0.6074996", "0.6066265", "0.6063566", "0.6060189", "0.60404545", "0.6038816", "0.60321665", "0.60213494", "0.6020372", "0.6012421", "0.60011834", "0.6000086", "0.5994306", "0.5984975", "0.5980972", "0.59789026", "0.5978579", "0.59744364", "0.5968033", "0.59657246", "0.59633243", "0.5960491", "0.5959144", "0.59521663", "0.59512216", "0.594979", "0.5942429", "0.5941893", "0.59406614", "0.59335536", "0.5933365", "0.59234047", "0.5914229", "0.5912293", "0.5905933", "0.5902571", "0.59021086", "0.59006786", "0.5895294", "0.5893737", "0.58898544", "0.58759737", "0.58739966", "0.58670765", "0.5862616", "0.58547485", "0.58470607", "0.5842918", "0.58415407", "0.584058", "0.58398944", "0.58392835", "0.58328843", "0.5832544", "0.5830878", "0.5830458", "0.5830196", "0.58300817", "0.58259815", "0.5821131", "0.58185965", "0.58176816", "0.5816832", "0.58162457", "0.58108014", "0.58079404", "0.58076704", "0.5805308", "0.5803613", "0.58028597" ]
0.0
-1
make the tetris blocks function
function tetris(){ if(frameCount % 60 === 0) { var tetris = createSprite(200,1,50,50); tetris.x = mario.x tetris.scale = 0.3 tetris.velocityY = tetris.velocityY + 2 var rand = Math.round(random(1,7)); switch(rand) { case 1: tetris.addImage(t1img); break; case 2: tetris.addImage(t2img); break; case 3: tetris.addImage(t3img); break; case 4: tetris.addImage(t4img); break; case 5: tetris.addImage(t5img); break; case 6: tetris.addImage(t6img); break; case 7: tetris.addImage(t7img); break; default: break; } tgroup.add(tetris) }}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createBlocks(){\n\tfor(let j=1; j < 17; j++){\n\t\tif(j%2==0){\n\t\t\tfor(let i=1; i < 25; i++){\n\t\t\t\tif(i%2==0){\n\t\t\t\t\tblockArray.push(new Block((i-1)*50,(j-1)*50,50,50));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function Block(grid, typeOfBlock, squareSize) {\n // public properties\n this.squaresInGrid = []; // the positions of the block's squares in the grid\n this.center = {x : grid.w / 2 - 1, y : 1}; // the coordinateS of the square which is the 'center' of the block\n this.squaresSprites = [];\n this.squareSize = squareSize;\n this.image = '';\n this.grid = grid;\n this.typeOfBlock = typeOfBlock;\n\n // Private constructor which sets up, depending on the type of the block, the\n // position of its squares when the block appears on screen.\n var __construct = function(that) {\n // Blocks appear low enough so that they can rotate and still be\n // completely visible\n // The grid is assumed to have an even number of squares horizontally\n // Types O and I come exactly centered.\n switch (typeOfBlock) {\n case 0: // Type L (appears lying, not standing)\n that.squaresInGrid.push({x: that.center.x,y: 1});\n that.squaresInGrid.push({x: that.center.x - 1,y: 1});\n that.squaresInGrid.push({x: that.center.x + 1,y: 1});\n that.squaresInGrid.push({x: that.center.x - 1,y: 2});\n that.image = 'L';\n break;\n case 1: // Type T\n that.squaresInGrid.push({x: that.center.x,y: 1});\n that.squaresInGrid.push({x: that.center.x - 1,y: 1});\n that.squaresInGrid.push({x: that.center.x + 1,y: 1});\n that.squaresInGrid.push({x: that.center.x,y: 2});\n that.image = 'T';\n break;\n case 2: // Type S\n that.squaresInGrid.push({x: that.center.x,y: 1});\n that.squaresInGrid.push({x: that.center.x + 1,y: 1});\n that.squaresInGrid.push({x: that.center.x,y: 2});\n that.squaresInGrid.push({x: that.center.x - 1,y: 2});\n that.image = 'S';\n break;\n case 3: // Type Z\n that.squaresInGrid.push({x: that.center.x,y: 1});\n that.squaresInGrid.push({x: that.center.x - 1,y: 1});\n that.squaresInGrid.push({x: that.center.x,y: 2});\n that.squaresInGrid.push({x: that.center.x + 1,y: 2});\n that.image = 'Z';\n break;\n case 4: // Type I (appears lying not standing)\n that.squaresInGrid.push({x: that.center.x,y: 2});\n that.squaresInGrid.push({x: that.center.x - 1,y: 2});\n that.squaresInGrid.push({x: that.center.x + 1,y: 2});\n that.squaresInGrid.push({x: that.center.x + 2,y: 2});\n that.center.y = 2;\n that.image = 'I';\n break;\n case 5: // Type O\n that.squaresInGrid.push({x: that.center.x,y: 1});\n that.squaresInGrid.push({x: that.center.x + 1,y: 1});\n that.squaresInGrid.push({x: that.center.x + 1,y: 2});\n that.squaresInGrid.push({x: that.center.x,y: 2});\n that.image = 'O';\n break;\n case 6: // Type J (appears lying, not standing)\n that.squaresInGrid.push({x: that.center.x,y: 1});\n that.squaresInGrid.push({x: that.center.x - 1,y: 1});\n that.squaresInGrid.push({x: that.center.x + 1,y: 1});\n that.squaresInGrid.push({x: that.center.x + 1,y: 2});\n that.image = 'J';\n break;\n };\n }(this);\n\n}", "function drawBlocks() {\r\n for (let i = 0; i < cols; i++)\r\n for (let j = 0; j < rows; j++) {\r\n if (grid[i][j] === 1) {\r\n blocks.push(new Block(i * CELL, j * CELL, CELL, CELL));\r\n plotBlock(i,j);\r\n }\r\n }\r\n}", "function spawnBlock() {\r\n for(let row = 0; row < thisBlock.matrix.length; row++) {\r\n for(let col = 0; col < thisBlock.matrix[row].length; col++) {\r\n if(thisBlock.matrix[row][col]) {\r\n // If block goes off screen\r\n if(thisBlock.row + row < 0) {\r\n return userGameOver();\r\n }\r\n thisField[thisBlock.row + row][thisBlock.col + col] = thisBlock.id;\r\n }\r\n }\r\n }\r\n\r\n // Line clearing\r\n let linesCleared = 0;\r\n for(let row = thisField.length - 1; row >= 0;) {\r\n if(thisField[row].every((cell) => !!cell)) {\r\n // Drop every row above\r\n linesCleared++;\r\n for(let r = row; r >= 0; r--) {\r\n thisField[r] = thisField[r - 1]\r\n }\r\n } else {\r\n row--;\r\n }\r\n }\r\n // If cleared lines then run numbers\r\n clearLines(linesCleared);\r\n // Next block spawn\r\n thisBlock = fetchNextBlock();\r\n}", "createBlock() {\n switch (this.blockNumber) {\n case 1: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n sprite.y = blockSize * i;\n this.res.addChild(sprite);\n }\n break;\n }\n case 2: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i == 0 || i == 1) {\n sprite.x = blockSize * i;\n }\n else {\n sprite.x = blockSize * (i % 2);\n sprite.y = blockSize;\n }\n this.res.addChild(sprite);\n }\n break;\n }\n case 3: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i < 2) {\n sprite.y = blockSize * i;\n }\n else {\n sprite.y = blockSize;\n sprite.x = blockSize * (i - 1);\n }\n this.res.addChild(sprite);\n }\n break;\n }\n case 4: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i == 0) {\n sprite.y = blockSize;\n }\n else {\n sprite.y = (i - 1) * blockSize;\n sprite.x = blockSize;\n }\n this.res.addChild(sprite);\n }\n break;\n }\n case 5: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i < 2) {\n sprite.x = blockSize * i;\n sprite.y = blockSize;\n }\n else {\n sprite.x = blockSize * (i - 1);\n }\n this.res.addChild(sprite);\n }\n break;\n }\n case 6: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i < 3) {\n sprite.x = blockSize * i;\n sprite.y = blockSize;\n }\n else {\n sprite.x = blockSize * (i - 1);\n }\n this.res.addChild(sprite);\n }\n break;\n }\n case 7: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i < 2) {\n sprite.x = blockSize * i;\n }\n else {\n sprite.x = blockSize * (i - 1);\n sprite.y = blockSize;\n }\n this.res.addChild(sprite);\n }\n break;\n }\n }\n }", "function backgroundBlocks() {\n for (let row = 0; row <= 3; row++) {\n for (let col = 0; col <= 3; col++) {\n $('#blocks').append(`<div class=\"block_behind bl_row${row}_col${col}\"></div>`);\n $(`.bl_row${row}_col${col}`).css('height', `${size}px`).css('width', `${size}px`);\n $(`.bl_row${row}_col${col}`).css('top', `${row*size}px`);\n $(`.bl_row${row}_col${col}`).css('left', `${col*size}px`);\n }\n }\n }", "function drawBlocks() {\n var newX;\n var newY;\n for (var i = 0; i < levels[myLvl].blocks.length; i++){\n newX = zeroX + levels[myLvl].blocks[i].x*squareSize;\n newY = zeroY + levels[myLvl].blocks[i].y*squareSize;\n drawSquare(newX, newY, squareSize, 1, \"black\", \"gray\");\n }\n}", "function Tetromino(){\n this.shape = Math.floor(Math.random() * nbBlockTypes);\n this.color = Math.floor(Math.random() * nbBlockTypes);\n this.sprites = []; // piltide arv igal blokis\n this.cells = []; // kastide nimekiri, mille detail enda alla võtab\n this.center = [0,0];\n // materialize muudab detaili nähtavakas, kas mänguväljal (inGame=true) või uue detaili infona (inGame=false)\n this.materialize = function(c_x,c_y,inGame) {\n this.center = [c_x,c_y];\n this.cells = [];\n // eemaldatakse olemasolevad pildid\n for(var j = 0; j < this.sprites.length; j++){\n this.sprites[j].destroy();\n }\n this.sprites = [];\n var conflict = false; // kas on hõivatud kaste, kui Tetromino esile tekib? Kui jah -> mäng läbi\n for(var i = 0; i < blocksPerTetromino; i++) {\n // arvutatakse Tetromino iga bloki koordinaadid, kasutades keskmest kõrvalekaldumist\n var x = c_x + offsets[this.shape][i][0];\n var y = c_y + offsets[this.shape][i][1];\n var sprite = game.add.sprite(x * blockSize, y * blockSize, 'blocks', this.color);\n this.sprites.push(sprite);\n this.cells.push([x, y]);\n if (inGame) {\n if(!validateCoordinates(x,y)){\n conflict = true;\n }\n scene[x][y] = blockValue; // 1 antud Tetromino jaoks, 2 kui on juba paigale asetatud blokid\n }\n }\n return conflict;\n };\n}", "function drawblocks() \n{\n\tfor (i=0; i < rows; i++) \n\t{\n\t\tcanvas.fillStyle = rowcolors[i]\n\n\t\tfor (j=0; j < columns; j++) \n\t\t{\n\t\t\tif (blocks[i][j] == 1) \n\t\t\t{\n\t\t\t\tblock((j * (blockwidth + shield)) + shield, (i * (blockheight + shield)) + shield, blockwidth, blockheight);\n\t\t\t}\n\t\t}\n\t}\n}", "function createNewBlock() {\n\n // Create a new block object, and assign it to currentBlock.\n currentBlock = new Block(SHAPES_PATTERN[Math.floor(Math.random() * SHAPES_PATTERN.length)]);\n\n var i = 0;\n\n // Check dataBoard cells whether the positions of the new block are already occupied.\n while(i < currentBlock.currentRects.length){\n if(dataBoard[currentBlock.currentRects[i].y][currentBlock.currentRects[i].x] !== null) {\n // if yes terminate game.\n return gameOver();\n }\n i ++;\n }\n\n // if all cells are available, continue game. Map currentBlock into dataBoard cells.\n currentBlock.set();\n\n // Render dataBoard data as SVG DOM.\n stage.render();\n}", "function getNewBlock(){\n blk = [];\n nextBlk = [];\n\n blkColor = nextBlkColor;\n nextBlkColor = Math.ceil(Math.random()*7);\n\n // get tile coordinates of next blocks\n for(let i=0; i<4; i++){\n blk.push(blk_structure[ blkColor ][i].slice(0));\n nextBlk.push(next_blk_structure[ nextBlkColor ][i].slice(0));\n }\n\n // clear grid on status area\n for(let r=0; r<4; r++){\n for(let c=0; c<4; c++){\n $scope.nextGrid[r][c] = 0;\n }\n }\n\n // draw blocks on grids\n for(let i=0; i<4; i++){\n // end game if no open space for current block\n if($scope.grid[ blk[i][0] ][ blk[i][1] ] !== 0){\n clearInterval(blockFallInterval);\n gameStart = false;\n $(\"#tetris-grid\").css(\"opacity\",\"0.7\");\n $(\"#tetris-gameover\").css(\"display\", \"block\");\n }\n\n $scope.grid[ blk[i][0] ][ blk[i][1] ] = blkColor;\n $scope.nextGrid[ nextBlk[i][0] ][ nextBlk[i][1] ] = nextBlkColor;\n }\n }", "function newgameblocks() \n{\n\tblocks = new Array(rows)\n\n\tfor (i=0; i < rows; i++) \n\t{\n\t\tblocks[i] = new Array(columns)\n\n\t\tfor (j=0; j < columns; j++) \n\t\t{\n\t\t\tblocks[i][j] = 1\n\t\t}\n\t}\n}", "function update() {\n // the colour of the block\n DYNAMIC_CTX.fillStyle = \"#bc4d9b\";\n\n // iterate through each block of tetromino and draw it\n for (let i = 0; i < tetr[currTet].config[configState].length; i++) {\n // drawing the block\n DYNAMIC_CTX.fillRect(col_state+(tetr[currTet].config[configState][i][1]*36), row_state+(tetr[currTet].config[configState][i][0]*36), SQUARE_PXL, SQUARE_PXL);\n }\n // draw any set tetrominoes\n for (let i = 0; i < 20; i++) {\n for (let j = 0; j < 10; j++) {\n if (occupied[i][j]) {\n DYNAMIC_CTX.fillRect(j*36, i*36, SQUARE_PXL, SQUARE_PXL);\n }\n }\n }\n}", "generateBlocks () {\n\t\tvar segments = {\n\t\t\tb1 : {i:0, j:0},\n\t\t\tb2 : {i:0, j:3},\n\t\t\tb3 : {i:0, j:6},\n\t\t\tb4 : {i:3, j:0},\n\t\t\tb5 : {i:3, j:3},\n\t\t\tb6 : {i:3, j:6},\n\t\t\tb7 : {i:6, j:0},\n\t\t\tb8 : {i:6, j:3},\n\t\t\tb9 : {i:6, j:6}\t\t\n\t\t}\n\t\tfor (var block in segments) {\n\t\t\tvar rowStart = segments[block]['i'];\n\t\t\tvar colStart = segments[block]['j'];\n\t\t\tvar blockArray = [];\n\t\t\tfor (let i=rowStart; i<rowStart+3; i++) {\n\t\t\t\tvar tempArray = [];\n\t\t\t\tfor (let j=colStart; j<colStart+3; j++) {\n\t\t\t\t\ttempArray.push (this.nineByNineObj[i][j]);\n\t\t\t\t}\n\t\t\t\tfor (var el in tempArray) {\n\t\t\t\t\tblockArray.push (tempArray[el]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.blocks[block] = blockArray;\n\t\t}\n\t}", "function createBlocks() {\n for (let i = 1; i <= 15; i += 1) {\n const block = document.createElement('div');\n block.classList.add('block', `block-${i}`, getXY(i));\n block.innerHTML = i;\n document.getElementById('game-block').appendChild(block);\n }\n}", "constructor(pattern_num, x = 0, y = 0, secondary = false) {\n this.pattern_num = pattern_num;\n this.blocks = [];\n this.pattern = shapes[pattern_num];\n this.color = colors[shape_color[pattern_num]];\n this.start_x = x;\n this.start_y = y;\n\n this.initialize_pattern = function () {\n if (this.blocks.length != 0) {\n let least_x = Infinity;\n let least_y = Infinity;\n this.blocks.forEach(block => {\n if (block.left < least_x) {\n least_x = block.left;\n }\n if (block.top < least_y) {\n least_y = block.top;\n }\n });\n while (least_x + this.pattern[0].length * field.block_width > canvas.width) {\n least_x -= field.block_width;\n }\n while (least_y + this.pattern.length * field.block_height > canvas.height) {\n least_y -= field.block_height;\n }\n\n\n this.start_x = least_x;\n this.start_y = least_y;\n }\n this.blocks = [];\n let start_x = this.start_x;\n let start_y = this.start_y;\n for (let i = 0; i < this.pattern.length; i += 1) {\n\n let row = this.pattern[i];\n for (let j = 0; j < row.length; j += 1) {\n let data = row[j];\n if (data != 1) {\n\n start_x += field.block_width;\n } else {\n let block = new game_block(this.color, start_x, start_y, secondary);\n this.blocks.push(block);\n start_x += field.block_width;\n }\n\n }\n start_x = this.start_x;\n start_y += field.block_height;\n }\n //this.start_y = start_y;\n }\n this.initialize_pattern_test = function (pattern) {\n let imaginary_blocks = [];\n let start_x;\n let start_y;\n if (this.blocks.length != 0) {\n let least_x = Infinity;\n let least_y = Infinity;\n this.blocks.forEach(block => {\n if (block.left < least_x) {\n least_x = block.left;\n }\n if (block.top < least_y) {\n least_y = block.top;\n }\n });\n while (least_x + pattern[0].length * field.block_width > canvas.width) {\n least_x -= field.block_width;\n }\n while (least_y + pattern.length * field.block_height > canvas.height) {\n least_y -= field.block_height;\n }\n\n\n start_x = least_x;\n start_y = least_y;\n }\n\n let st_x = start_x;\n for (let i = 0; i < pattern.length; i += 1) {\n\n let row = pattern[i];\n for (let j = 0; j < row.length; j += 1) {\n let data = row[j];\n if (data != 1) {\n\n start_x += field.block_width;\n } else {\n let block = new game_block(this.color, start_x, start_y);\n imaginary_blocks.push(block);\n start_x += field.block_width;\n }\n\n }\n start_x = st_x;\n start_y += field.block_height;\n }\n return imaginary_blocks;\n\n }\n this.get_vertical_height = function(){\n let smallest_top = Infinity;\n let biggest_bottom = -Infinity;\n this.blocks.forEach(block => {\n if(block.top < smallest_top){\n smallest_top = block.top;\n\n }\n if(block.bottom > biggest_bottom){\n biggest_bottom = block.bottom;\n }\n })\n return biggest_bottom - smallest_top;\n }\n this.delete_block = function (index) {\n this.blocks.splice(index, 1);\n }\n this.rotate_clockwise = function () {\n let new_pattern = rotate_array_clockwise(this.pattern);\n\n let imaginary_blocks = this.initialize_pattern_test(new_pattern);\n console.log(this.blocks, imaginary_blocks);\n let other_pieces = field.pieces;\n let inside_of_another = false;\n for (let i = 0; i < other_pieces.length; i += 1) {\n let other_piece = other_pieces[i];\n for (let j = 0; j < imaginary_blocks.length; j += 1) {\n let cur_block = imaginary_blocks[j];\n \n if (cur_block.inside_of_another_piece(other_piece) === true) {\n \n inside_of_another = true;\n break;\n }\n }\n if (inside_of_another === true) {\n break;\n }\n }\n if (inside_of_another === false) {\n this.pattern = new_pattern;\n\n this.initialize_pattern();\n }\n\n\n }\n this.initialize_pattern();\n this.draw = function () {\n this.blocks.forEach(function (block) {\n block.draw();\n })\n };\n this.touches_other_piece_bottom = function (pieces, excluded = -1) {\n for (let i = 0; i < pieces.length; i += 1) {\n if(excluded === i){\n continue;\n }\n let other_piece = pieces[i];\n for (let j = 0; j < this.blocks.length; j += 1) {\n if (this.blocks[j].touches_other_piece_bottom(other_piece) === true) {\n \n return true;\n }\n }\n\n }\n return false;\n }\n this.touches_other_piece_right = function () {\n for (let i = 0; i < field.pieces.length; i += 1) {\n let other_piece = field.pieces[i];\n for (let j = 0; j < this.blocks.length; j += 1) {\n if (this.blocks[j].touches_other_piece_right(other_piece) === true) {\n return true;\n }\n }\n\n }\n return false;\n }\n this.touches_other_piece_left = function () {\n for (let i = 0; i < field.pieces.length; i += 1) {\n let other_piece = field.pieces[i];\n for (let j = 0; j < this.blocks.length; j += 1) {\n if (this.blocks[j].touches_other_piece_left(other_piece) === true) {\n return true;\n }\n }\n\n }\n return false;\n }\n\n this.touches_bottom = function () {\n let touches_bottom = false;\n for (let i = 0; i < this.blocks.length; i += 1) {\n let item = this.blocks[i];\n let temp = item.touches_bottom();\n if (temp === true) {\n touches_bottom = true;\n break;\n }\n }\n return touches_bottom;\n }\n this.move_down = function () {\n let touches_bottom = this.touches_bottom();\n let touches_other_piece_bottom = this.touches_other_piece_bottom(field.pieces);\n if (touches_bottom === false && touches_other_piece_bottom === false) {\n this.blocks.forEach(block => {\n block.move_down();\n });\n touches_bottom = this.touches_bottom();\n touches_other_piece_bottom = this.touches_other_piece_bottom(field.pieces);\n if (touches_bottom === true || touches_other_piece_bottom === true) {\n field.deactivate_piece();\n }\n } else if (touches_bottom === false || touches_other_piece_bottom === false) {\n field.deactivate_piece();\n }\n\n }\n this.move_right = function () {\n let touches_right = false;\n let touches_other_piece_right = this.touches_other_piece_right();\n for (let i = 0; i < this.blocks.length; i += 1) {\n let item = this.blocks[i];\n let temp = item.touches_right();\n if (temp === true) {\n touches_right = true;\n break;\n }\n }\n if (touches_right === false && touches_other_piece_right === false) {\n\n this.blocks.forEach(block => {\n block.move_right();\n })\n }\n }\n this.move_left = function () {\n let touches_left = false;\n let touches_other_piece_left = this.touches_other_piece_left();\n for (let i = 0; i < this.blocks.length; i += 1) {\n let item = this.blocks[i];\n let temp = item.touches_left();\n if (temp === true) {\n touches_left = true;\n break;\n }\n }\n if (touches_left === false && touches_other_piece_left === false) {\n this.blocks.forEach(block => {\n block.move_left();\n })\n }\n }\n\n\n }", "function draw() {\n\n for ( var x = 0; x < COLS; ++x ) {\n for ( var y = 0; y < ROWS; ++y ) {\n if ( tetrisBoard[ y ][ x ] ) {\n ctx.strokeStyle = 'black';\n ctx.lineWidth = \"4\";\n ctx.fillStyle = colors[ tetrisBoard[ y ][ x ] - 1 ];\n ctx.fillRect( BLOCK_W * x, BLOCK_H * y, BLOCK_W - 1 , BLOCK_H - 1 );\n ctx.strokeRect( BLOCK_W * x, BLOCK_H * y, BLOCK_W - 1 , BLOCK_H - 1 );\n }\n else {\n ctx.strokeStyle = 'black';\n ctx.lineWidth = \"0.8\";\n ctx.fillStyle = 'white';\n ctx.fillRect( BLOCK_W * x+1, BLOCK_H * y+1, BLOCK_W - 1 , BLOCK_H - 1 );\n ctx.strokeRect( BLOCK_W * x, BLOCK_H * y, BLOCK_W - 1 , BLOCK_H - 1 );\n }\n }\n }\n\n ctx.strokeStyle = 'black';\n for ( var y = 0; y < pieceSize; ++y ) {\n for ( var x = 0; x < pieceSize; ++x ) {\n if ( shape[ y ][ x ] ) {\n ctx.fillStyle = colors[ shape[ y ][ x ] - 1 ];\n ctx.lineWidth = \"4\";\n ctx.fillRect( BLOCK_W * (x+currX) , BLOCK_H * (y+currY) , BLOCK_W - 1 , BLOCK_H - 1 );\n ctx.strokeRect( BLOCK_W * (x+currX) , BLOCK_H * (y+currY) , BLOCK_W - 1 , BLOCK_H - 1 );\n }\n }\n }\n}", "function Block(state) {\n this.type = Math.ceil(Math.random() * 7) - 1;\n this.color = state.layout_colors[this.type];\n\n this.orientation = 0;\n\n var layout = state.available_layouts[this.type];\n\n\n this.height = function () {\n if (this.orientation === 0 || this.orientation === 180) {\n return layout.length;\n }\n return layout[0].length;\n };\n\n this.width = function () {\n if (this.orientation === 90 || this.orientation === 270) {\n return layout.length;\n }\n return layout[0].length;\n };\n\n this.x = Math.floor(state.playAreaX / 2 - this.width() / 2);\n this.y = 0;\n\n this.draw = function (ctx) {\n ctx.fillStyle = this.color;\n\n var render_offsets = { \"x\": 0, \"y\": 0 },\n step, filled,\n render_coord_x, render_coord_y;\n\n for (step = 0; step < this.width() * this.height(); step++) {\n filled = this.piece_filled(step);\n\n // Render if necessary.\n if (filled) {\n render_coord_x = (this.x + render_offsets.x) * state.blockSize;\n render_coord_y = (this.y + render_offsets.y) * state.blockSize;\n\n ctx.fillRect(render_coord_x + 1, render_coord_y + 1, state.blockSize - 2, state.blockSize - 2);\n }\n\n render_offsets = this.update_render_offsets(render_offsets);\n }\n };\n\n /**\n * The naming and use of this function needs a review.\n */\n this.update_render_offsets = function(render_offsets) {\n render_offsets.x++;\n\n if (render_offsets.x >= this.width()) {\n render_offsets.y++;\n render_offsets.x = 0;\n }\n\n return render_offsets;\n };\n\n /**\n * Figure out if the current piece in a block is filled..\n */\n this.piece_filled = function (step) {\n var coordinates = this.step_to_rotated_coordinates(step),\n filled = layout[coordinates.y][coordinates.x];\n return !!filled;\n };\n\n /**\n * Converts \"search steps\" into local x/y coordinates.\n */\n this.step_to_coordinates = function(step) {\n var coords = { x: 0, y: 0 };\n\n if (this.orientation === 0 || this.orientation === 180) {\n coords.x = step % this.width();\n coords.y = Math.floor(step / this.width());\n }\n else {\n coords.x = Math.floor(step / this.width());\n coords.y = ((step + 1) % this.width());\n }\n\n return coords;\n };\n\n /**\n * Converts \"search steps\" into local x/y coordinates adjusted for piece\n * rotation.\n */\n this.step_to_rotated_coordinates = function(step) {\n var coords = this.step_to_coordinates(step);\n\n if (this.orientation === 180) {\n coords.x = this.width() - coords.x - 1;\n coords.y = this.height() - coords.y - 1;\n }\n else if (this.orientation === 270) {\n coords.x = this.width() - coords.x;\n // @TODO Ugly hack. Figure out and fix.\n if (this.type === 6) { coords.x--; }\n if (this.width() === 4) { coords.x -= 4; }\n coords.y = this.width() - coords.y - 1;\n }\n\n return coords;\n };\n\n this.down = function () {\n state.gameField.check_hit_bottom(state.block, \"d\");\n\n if (state.block.replace !== true) {\n this.y += 1;\n }\n };\n}", "function setupKnownBlocks(whites_reds){\n $(\".block\").remove();\n var numblocks = model.get_current_state_array().length -1;\n \n $(\"img\").css(\"height\", numblocks*15+75);\n \n for(var i=0; i<whites_reds[0]; i++){\n $(\".image-container\").append(\"<div class='block white-block block\"+i+\"'></div>\");\n $(\".block\"+i).css(\"top\",\"\"+(15*i+ parseInt($(\"img\").css(\"height\"))/2)+\"px\");\n }\n for(var i=whites_reds[0]; i<whites_reds[0]+whites_reds[1]; i++){\n $(\".image-container\").append(\"<div class='block red-block block\"+i+\"'></div>\");\n $(\".block\"+i).css(\"top\",\"\"+(15*i+parseInt($(\"img\").css(\"height\"))/2)+\"px\");\n }\n }", "function newBlock() {\n xPosition = 7;\n yPosition = 0;\n rotation = 0;\n clearFullLines();\n currentPiece = nextPiece;\n generateRandomBlock();\n arrayOfBlockFunctions[currentPiece]();\n\n mainInterval = setInterval(dropBlock, dropDelay);\n}", "function drawTetrominosOnBoard() {\n for (var i=0; i<20; i++){\n for (var j=0; j<14; j++) {\n if (gameBoard[i][j] != 0) {\n switch (gameBoard[i][j]){\n case 1: // Cyan (I Block)\n ctx.fillStyle = \"#00FFFF\";\n break;\n case 2: // Yellow (O Block)\n ctx.fillStyle = \"#FFFF00\";\n break;\n case 3: // Orange (L Block)\n ctx.fillStyle = \"#FFA500\";\n break;\n case 4: // Blue (J Block)\n ctx.fillStyle = \"#0000FF\";\n break;\n case 5: // Green (S Block)\n ctx.fillStyle = \"#00FF00\";\n break;\n case 6: // Red (Z Block)\n ctx.fillStyle = \"#ff0000\";\n break;\n case 7: // Pink (T Block)\n ctx.fillStyle = \"#b600b6\";\n break;\n }\n ctx.fillRect(xGridRefToGameBoardCoordinate(j), yGridRefToGameBoardCoordinate(i), 25, 25);\n ctx.strokeRect(xGridRefToGameBoardCoordinate(j),yGridRefToGameBoardCoordinate(i),25,25);\n }\n }\n }\n\n for (var i=0; i<nextPieceBoard.length; i++){\n for (var j=0; j<nextPieceBoard[0].length; j++) {\n if (nextPieceBoard[i][j] != 0) {\n switch (nextPieceBoard[i][j]){\n case 1: // Cyan (I Block)\n ctx.fillStyle = \"#00FFFF\";\n break;\n case 2: // Yellow (O Block)\n ctx.fillStyle = \"#FFFF00\";\n break;\n case 3: // Orange (L Block)\n ctx.fillStyle = \"#FFA500\";\n break;\n case 4: // Blue (J Block)\n ctx.fillStyle = \"#0000FF\";\n break;\n case 5: // Green (S Block)\n ctx.fillStyle = \"#00FF00\";\n break;\n case 6: // Red (Z Block)\n ctx.fillStyle = \"#ff0000\";\n break;\n case 7: // Pink (T Block)\n ctx.fillStyle = \"#b600b6\";\n break;\n }\n ctx.fillRect(xGridRefToNextPieceCoordinate(j), yGridRefToNextPieceCoordinate(i), 30, 30);\n ctx.strokeRect(xGridRefToNextPieceCoordinate(j),yGridRefToNextPieceCoordinate(i),30,30);\n }\n\n }\n }\n}", "function generateBlock() {\n\t\t// creates the div block\n\t\tvar block = document.createElement(\"div\");\n\t\tblock.className = \"blocks\";\n\n\t\t// gives us numbers 1 - 3 \n\t\tvar num = Math.floor(Math.random() * 3 + 1);\n\n\t\tif(num == 1) \n\t\t\tblock.className += \" fakeBlock\";\n\t\t/* Keep track of the size of the game area */\n\t\tvar gameArea = document.getElementById(\"game-area\");\n\t\tvar areaW = parseInt(window.getComputedStyle(gameArea).width)\n\t\tvar areaH = parseInt(window.getComputedStyle(gameArea).height);\n\t\tblock.style.left = Math.floor(Math.random() * (areaW - 50)) + \"px\";\n\t\tblock.style.top = 0 + \"px\";\n\t\tdocument.getElementById(\"game-area\").appendChild(block);\t\n\t}", "function drawBlock(grid, row, col) {\r\n for (var i = row; i <= row + 1; i += 1) {\r\n for (var j = col; j <= col + 1; j += 1) { \r\n drawPoint(grid, i, j);\r\n } \r\n } \r\n }", "function drawBlocks() {\n for (let c = 0; c < blockColumnCount; c++) {\n for (let r = 0; r < blockRowCount; r++) {\n if (blocks[c][r].show == 1) {\n let blockX = (c * (blockWidth + blockPadding)) + blockOffsetLeft\n let blockY = (r * (blockHeight + blockPadding)) + blockOffsetTop\n blocks[c][r].x = blockX\n blocks[c][r].y = blockY\n ctx.beginPath()\n ctx.rect(blockX, blockY, blockWidth, blockHeight)\n let red = Math.floor(Math.random() * (255 - 200) + 200);\n let green = Math.floor(Math.random() * (255 - 200) + 200);\n let blue = Math.floor(Math.random() * (255 - 200) + 200);\n ctx.fillStyle = \"rgb(\" + red + \",\" + green + \",\" + blue + \" )\"\n ctx.fill()\n ctx.closePath()\n }\n }\n }\n}", "function drawNewBlock() {\r\n \r\n do {\r\n var coords = generateCoords();\r\n var X = coords[0];\r\n var Y = coords[1];\r\n } while (blockDistanceChecker(X, Y));\r\n\r\n var block = new Map();//------reffered from W3------//\r\n block.set(\"X\", X);\r\n block.set(\"Y\", Y);\r\n block.set(\"width\", block_width);\r\n block.set(\"height\", block_height);\r\n\r\n blocks.push(block);\r\n}", "drawBoard() {\n for (let y = 0; y < this.tetris.board.height; y++) {\n for (let x = 0; x < this.tetris.board.width; x++) {\n let id = this.tetris.board.getCell(x, y);\n if (id !== this.tetris.board.EMPTY) {\n this.drawBlock(this.ctxGame, id, x * this.size, y * this.size);\n }\n }\n }\n }", "updateBlockTexture() {\n\t\tlet cur = new Vector2(this.physics.rpos.x, this.physics.rpos.y);\n\t\tlet shift = [new Vector2(0, 0), new Vector2(-1, 0), new Vector2(1, 0), new Vector2(0, -1), new Vector2(0, 1)];\n\t\tfor(let i = 0; i < 5; i++) {\n\t\t\tlet tmp = cur.add(shift[i]);\n\t\t\tif(this.map.checkCoords(tmp.x, tmp.y) && this.map.get(tmp.x, tmp.y).id == 12) {\n\t\t\t\tthis.map.get(tmp.x, tmp.y).updateMultiTexture();\n\t\t\t}\n\t\t}\n\t}", "function createBlock(height, width){\n return `snake-${height}-${width}`\n}", "function createBlock(height, width){\n return `snake-${height}-${width}`\n}", "function block00(){\n block1.style.backgroundColor = \"rgb(255, 255, 255)\";\n block2.style.backgroundColor = \"rgb(255, 255, 255)\";\n block3.style.backgroundColor = \"rgb(255, 255, 255)\";\n block4.style.backgroundColor = \"rgb(255, 255, 255)\";\n block5.style.backgroundColor = \"rgb(255, 255, 255)\";\n block6.style.backgroundColor = \"rgb(255, 255, 255)\";\n block7.style.backgroundColor = \"rgb(255, 255, 255)\";\n block8.style.backgroundColor = \"rgb(255, 255, 255)\";\n block9.style.backgroundColor = \"rgb(255, 255, 255)\";\n block10.style.backgroundColor = \"rgb(255, 255, 255)\";\n block11.style.backgroundColor = \"rgb(255, 255, 255)\";\n}", "constructor(board_size = 400, n_blocks = 20) {\n this.color_map = {\n '#EEAAAA': 'light red',\n '#DDBB99': 'beige',\n '#FFFF80': 'yellow',\n '#BFFF80': 'light green',\n '#408000': 'dark green',\n '#DD99BB': 'pink',\n '#CC88CC': 'purple',\n '#99BBDD': 'light blue',\n '#336699': 'dark blue',\n '#5CD6D6': 'turquoise',\n '#FFB366': 'orange',\n '#e8e8e8': 'grey'\n };\n // board properties\n this.board_size = board_size;\n this.n_blocks = n_blocks;\n this.block_size = board_size / n_blocks;\n this.x = 0\n this.y = 0\n this.show_gridlines = true\n\n // game mode\n this.templ_col = 'grey'\n this.provide_template = true\n this.hide_buttons = true\n this.game_time = 600\n this.demo_time = 300\n }", "function run() {\n // init displayField\n for(var i=0;i<settings.rows;i++) {\n displayField[i] = [];\n for(var j=0;j<settings.cols;j++) {\n displayField[i][j] = \n {\n // upper right coordinate\n ur:\n {\n x: (settings.blockWidth + settings.spacing) * j\n + settings.spacing,\n y: (settings.blockHeight + settings.spacing) * i\n + settings.spacing\n },\n // lower left coordinate\n ll:\n {\n x: (settings.blockWidth + settings.spacing) * j\n + settings.spacing + settings.blockWidth,\n y: (settings.blockHeight + settings.spacing) * i\n + settings.spacing + settings.blockHeight\n },\n occupied: false\n };\n }\n }\n // get first arragement\n curBlocks = genRandomBlocks();\n\n // iterations\n enqueue(0,nextIter);\n\n // perform iterations\n function nextIter() {\n nextBlocks = genRandomBlocks();\n\n // start add/remove process\n enqueue(0,addRemove);\n\n /**\n * First remove an image if there are any to remove,\n * then add an image if there is space and continue until\n * all of nextBlocks have been used, then run nextIter() again.\n */\n function addRemove() {\n // remove images if possible\n if(curBlocks.length > 0 && anyRemovableBlocks()) {\n enqueue(\n settings.imageDelay,\n function() {\n removeImage(curBlocks, displayField);\n }\n );\n }\n // add images if possible\n var nextBlock = getLargestAddableBlock(nextBlocks, displayField);\n if(nextBlock !== null) {\n enqueue(\n settings.imageDelay,\n function() {\n addImage(nextBlock, displayField);\n }\n );\n }\n // continue addRemove() or start another iteration\n if(anyAddableBlocks()) {\n enqueue(0,addRemove);\n } else {\n curBlocks = nextBlocks;\n enqueue(0,nextIter);\n }\n \n // search for removeable blocks\n function anyRemovableBlocks() {\n return testAny(\n curBlocks, function(block) {\n return block.visible;\n }\n );\n }\n\n // search for addable blocks\n function anyAddableBlocks() {\n return testAny(\n nextBlocks, function(block) {\n return !block.visible;\n }\n );\n }\n }\n }\n }", "hort(x, y) {\n //visual blocks\n this.blck = this.add.sprite(x - 65,y - 32,'blck');\n this.blck = this.add.sprite(x - 32,y - 32,'blck');\n this.blck2 = this.add.sprite(x,y - 32,'blck');\n }", "function newBlock()\n\t{\n\t\tif(nextBlock == null)\n\t\t\tnextBlock = new Block();\n\n\t\tcurrentBlock = nextBlock;\n\t\tcurrentBlock.x = currentBlock.y = 0;\n\t\tcurrentBlock.moveHor(Math.floor(self.numColumns/2));\n\t\tcurrentBlock.moveVer(-1);\n\n\t\tbgGrid.addChild(currentBlock);\n\n\t\tnextBlock = new Block();\n\t\tnextBlock.x = bgGrid.x + bgGrid.width + GAP;\n\t\tnextBlock.y = celwid * 2;\n\t\tself.addChild(nextBlock);\n\t\t\n\t\tspeedPoints = 0;\n\t\tupdateSpeedPoints();\n\n\t\tvar canPlace = validateNewBlockPosition();\n\t\tif(!canPlace)\n\t\t\tgameOverSequence();\n\t}", "function addBlock() {\n var index = Math.floor(Math.random() * (7));\n\n var name = blockNames[index];\n var blocktype = blocks[index]\n var center = centers[index];\n var pos = [20, 0];\n center[0] += 20;\n curBlock = new Block(blocktype, name, center, pos);\n\n //add to grid\n for (var k = 0; k < blocktype.length; k++) {\n for (var l = 0; l < blocktype[0].length; l++) {\n grid[k + 20][l] = blocktype[k][l];//start from 20th row\n }\n }\n\n\n}", "function drawBlocks() {\r\n\tfor (i = 0; i < blocks.length; i++) {\r\n\t\tc.fillStyle = 'rgba(255,255,255, 0.9)';\r\n\t\tc.fillRect(blocks[i].x, blocks[i].y, block_size, block_size);\r\n\t}\r\n}", "function choose_next_block(){\n block_no=Random_no();\n from_top=0;\n from_left=4;\n rotation_no=1;\n}", "function addTetris(){\n board.inPlay = false ;\n for( var i = 0 ; i < tetris1.position[ tetris1.rotation % tetris1.types ].length ; ++ i ){\n board.grid[ tetris1.position[ tetris1.rotation % tetris1.types ][i].x + tetris1.dx ][ tetris1.position[ tetris1.rotation % tetris1.types ][i].y + tetris1.dy ].bool = true ;\n board.grid[ tetris1.position[ tetris1.rotation % tetris1.types ][i].x + tetris1.dx ][ tetris1.position[ tetris1.rotation % tetris1.types ][i].y + tetris1.dy ].color= tetris1.color ;\n checkLine( tetris1.position[ tetris1.rotation % tetris1.types ][i].y + tetris1.dy ) ;\n }\n board.checkStatus() ;\n}", "function generateBlock(type, x, y, chunk){\r\n if (type == BlockType.Path){\r\n var cube = new THREE.CubeGeometry( 25,25,25); \r\n var mesh = new THREE.Mesh(cube, path_material);\r\n mesh.position.x = x + 12;\r\n mesh.position.y = y + 12;\r\n mesh.castShadow = true;\r\n mesh.receiveShadow = true;\r\n var b = new Block(x,y,type);\r\n b.collides = false;\r\n \r\n // Put path into chunk \r\n if (chunk.path_mesh == 0)\r\n chunk.path_mesh = mesh;\r\n else {\r\n mesh.position.x -= chunk.path_mesh.position.x;\r\n mesh.position.y -= chunk.path_mesh.position.y;\r\n THREE.GeometryUtils.merge(chunk.path_mesh.geometry, mesh);\r\n }\r\n \r\n return b;\r\n }\r\n else if (type == BlockType.Rock){\r\n var cube = new THREE.CubeGeometry( 25,25,25); \r\n var mesh = new THREE.Mesh(cube, rock_material);\r\n mesh.position.x = x + 12;\r\n mesh.position.y = y + 12;\r\n mesh.castShadow = true;\r\n mesh.receiveShadow = true;\r\n \r\n // Put path into chunk \r\n if (chunk.rock_mesh == 0)\r\n chunk.rock_mesh = mesh;\r\n else {\r\n mesh.position.x -= chunk.rock_mesh.position.x;\r\n mesh.position.y -= chunk.rock_mesh.position.y;\r\n THREE.GeometryUtils.merge(chunk.rock_mesh.geometry, mesh);\r\n }\r\n \r\n return new Block(x,y,type);\r\n }\r\n else if (type == BlockType.Sand){\r\n var cube = new THREE.CubeGeometry( 25,25,25); \r\n var mesh = new THREE.Mesh(cube, sand_material);\r\n mesh.position.x = x + 12;\r\n mesh.position.y = y + 12;\r\n mesh.castShadow = true;\r\n mesh.receiveShadow = true;\r\n \r\n // Put path into chunk \r\n if (chunk.sand_mesh == 0)\r\n chunk.sand_mesh = mesh;\r\n else {\r\n mesh.position.x -= chunk.sand_mesh.position.x;\r\n mesh.position.y -= chunk.sand_mesh.position.y;\r\n THREE.GeometryUtils.merge(chunk.sand_mesh.geometry, mesh);\r\n }\r\n \r\n return new Block(x,y,type);\r\n }\r\n else if (type == BlockType.UnderWRock){\r\n var cube = new THREE.CubeGeometry( 25,25,25); \r\n var mesh = new THREE.Mesh(cube, UWRock_material);\r\n mesh.position.x = x + 12;\r\n mesh.position.y = y + 12;\r\n mesh.castShadow = true;\r\n mesh.receiveShadow = true;\r\n \r\n // Put path into chunk \r\n if (chunk.underWaterRock_mesh == 0)\r\n chunk.underWaterRock_mesh = mesh;\r\n else {\r\n mesh.position.x -= chunk.underWaterRock_mesh.position.x;\r\n mesh.position.y -= chunk.underWaterRock_mesh.position.y;\r\n THREE.GeometryUtils.merge(chunk.underWaterRock_mesh.geometry, mesh);\r\n }\r\n \r\n return new Block(x,y,type);\r\n }\r\n else if (type == BlockType.Dirt || type == BlockType.DirtGrass){\r\n var cube = new THREE.CubeGeometry( 25,25,25); \r\n var mesh = new THREE.Mesh(cube, dirt_material);\r\n mesh.position.x = x + 12;\r\n mesh.position.y = y + 12;\r\n mesh.castShadow = true;\r\n mesh.receiveShadow = true;\r\n \r\n // Put path into chunk \r\n if (chunk.dirt_mesh == 0)\r\n chunk.dirt_mesh = mesh;\r\n else {\r\n mesh.position.x -= chunk.dirt_mesh.position.x;\r\n mesh.position.y -= chunk.dirt_mesh.position.y;\r\n THREE.GeometryUtils.merge(chunk.dirt_mesh.geometry, mesh);\r\n }\r\n \r\n // Make grass \r\n if (type == BlockType.DirtGrass){\r\n cube = new THREE.CubeGeometry( 25,6,25); \r\n mesh = new THREE.Mesh(cube, grass_material);\r\n mesh.position.x = x + 12;\r\n mesh.position.y = y - 3;\r\n mesh.receiveShadow = true;\r\n \r\n // Put path into chunk \r\n if (chunk.grass_mesh == 0)\r\n chunk.grass_mesh = mesh;\r\n else {\r\n mesh.position.x -= chunk.grass_mesh.position.x;\r\n mesh.position.y -= chunk.grass_mesh.position.y;\r\n THREE.GeometryUtils.merge(chunk.grass_mesh.geometry, mesh);\r\n }\r\n }\r\n \r\n return new Block(x,y,type);\r\n }\r\n else if (type == BlockType.Time){\r\n var cube = new THREE.CubeGeometry( 25,25,25); \r\n var mesh = new THREE.Mesh(cube, time_material);\r\n mesh.position.x = x + 12;\r\n mesh.position.y = y + 12;\r\n mesh.castShadow = true;\r\n mesh.receiveShadow = true;\r\n var b = new Block(x,y,type);\r\n b.mesh = mesh;\r\n level.scene.add(b.mesh);\r\n \r\n return b;\r\n }\r\n \r\n var b = new Block(x,y,type);\r\n b.active = false;\r\n b.collides = false;\r\n return b;\r\n}", "function display_board() { \n for (let i = 0; i < COLUMN; i++) {\n for (let j = 0; j < ROW; j++) {\n if (board[i][j] === 2)\n {\n image(boundary_block, j * SIZE, i * SIZE, SIZE, SIZE)\n } \n else if (board[i][j] >=3 && board[i][j] <=16) \n {\n if(board[i][j] == 3 || board[i][j] == 10)\n image(o_block, j * SIZE, i * SIZE, SIZE, SIZE);\n \n if(board[i][j] == 4 || board[i][j] == 11)\n image(i_block, j * SIZE, i * SIZE, SIZE, SIZE);\n \n if(board[i][j] == 5 || board[i][j] == 12)\n image(z_block, j * SIZE, i * SIZE, SIZE, SIZE);\n \n if(board[i][j] == 6 || board[i][j] == 13)\n image(s_block, j * SIZE, i * SIZE, SIZE, SIZE);\n \n if(board[i][j] == 7 || board[i][j] == 14)\n image(l_block, j * SIZE, i * SIZE, SIZE, SIZE);\n \n if(board[i][j] == 8 || board[i][j] == 15)\n image(j_block, j * SIZE, i * SIZE, SIZE, SIZE);\n \n if(board[i][j] == 9 || board[i][j] == 16)\n image(t_block, j * SIZE, i * SIZE, SIZE, SIZE);\n \n }\n }\n }\n}", "function drawBlocks(number) {\n console.log(\"The case number is \" + number);\n switch (number) {\n case \"1\":\n //When the mouse is over the square\n $('td').hover(function(){\n //color the cell with the standard color\n $(this).addClass('hoverTD');\n });\n break;\n\n case \"2\":\n //When the mouse is over the square\n $('td').hover(function(){\n //assign a random number to each color\n var r = Math.floor((Math.random() * 255) + 0);\n var g = Math.floor((Math.random() * 255) + 0);\n var b = Math.floor((Math.random() * 255) + 0);\n\n //color the td with this random color\n $(this).css('background-color', 'rgb(' + r + ','\n + g + ','\n + b +')');\n });\n break;\n\n case \"3\":\n //When the mouse is over the square\n $('td').hover(function(){\n\n var opac = $(this).attr('opac');\n\n if (typeof opac !== typeof undefined && opac !== false) {\n $(this).css('opacity', opac);\n opac = parseFloat(opac)+0.1;\n $(this).attr('opac',opac);\n } else {\n $(this).attr('opac',0.1);\n $(this).css('opacity', 0.1);\n }\n });\n\n break;\n\n default:\n alert(\"Whoops, something went wrong.\")\n }\n}", "function initBlock() {\n block = [{ x: dimention[0] / 2, y: dir > 0 ? 0 : dimention[1] - 1 }];\n block.forEach(function(cell) {\n field[cell.y][cell.x] = dir * 2;\n });\n }", "function drawBlocks(width, height, x, y)\r\n {\r\n width = width;\r\n height = height;\r\n speedX = 0;\r\n x = x;\r\n y = y;\r\n // update = function()\r\n // {\r\n\r\n context.fillStyle = \"#8AC9FF\";\r\n context.fillRect(x, y, width, height);\r\n //}\r\n\r\n // this.newPosition = function ()\r\n // {\r\n // this.x += this.speedX;\r\n // }\r\n }", "function blk() {\n prev = -1;\n flag3 = 0;\n type = 4; // For block type is equal to four\n}", "function animateTransitionBlocks(){\n \n //if there are both red and white blocks in the bag\n if($('.block').hasClass(\"red-block\") && $('.block').hasClass('white-block')){\n setupUnknownBlocks();\n $('.block0').animate({top:-5},\"fast\");\n $('.block0').animate({left:300},\"slow\");\n $('.block0').animate({left:137},\"slow\");\n $('.block0').animate({top:parseInt($(\"img\").css(\"height\"))/2},\"fast\")\n }\n \n //if both blocks are the same color\n else{ \n $('.block0').html(\"?\")\n $('.block0').attr(\"class\",\"block0 block gray-block\");\n $('.block0').animate({top:-5},\"fast\");\n $('.block0').animate({left:300},\"slow\");\n $('.block0').animate({left:137},\"slow\");\n $('.block0').animate({top:50},\"fast\")\n }\n\n }", "function newLevel(){   \n\nBlock.defineBlock(120, \"Redstone Lamp\",[\n[\"redstone_lamp_off\", 0], \n[\"redstone_lamp_off\", 0],   \n[\"redstone_lamp_off\", 0], \n[\"redstone_lamp_off\", 0],   \n[\"redstone_lamp_off\", 0], \n[\"redstone_lamp_off\", 0]]);  \nBlock.setShape(120, 0, 0, 0, 1, 4/4,1);  \nBlock.setDestroyTime(120,.25);  \n  \nBlock.defineBlock(121, \"Redstone Lamp\",[\n[\"redstone_lamp_on\",0], \n[\"redstone_lamp_on\",0],\n[\"redstone_lamp_on\",0], \n[\"redstone_lamp_on\",0],   \n[\"redstone_lamp_on\",0], \n[\"redstone_lamp_on\",0]]);\nBlock.setShape(121,0,0,0,1, 4/4,1);  \nBlock.setDestroyTime(121,.25);\n\n}", "function addBlocks (Blockly) {\n const QH_BEMFA_COLOR = '#5b67a5'\n const QH_BEMFA_ICO = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAC4jAAAuIwF4pT92AAALhWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIiB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTA4LTEwVDE5OjI1OjI1KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDE5LTA0LTEyVDE0OjQzOjMwKzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOS0wNC0xMlQxNDo0MzozMCswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NWU5ZWIyZGMtM2U2ZC1kYzRlLTg5MmMtNmJjNjNmZjVkZmUwIiB4bXBNTTpEb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzBmYWUyM2QtZjEzZi02NTRhLTgyZWUtOTE3NWNjNGNiYTdiIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MGViNzZhZTYtNTM4Ny00MDQxLWJhYzYtNjNhNDk4YzlkMGNmIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHRpZmY6T3JpZW50YXRpb249IjEiIHRpZmY6WFJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6WVJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiIGV4aWY6Q29sb3JTcGFjZT0iMSIgZXhpZjpQaXhlbFhEaW1lbnNpb249IjgwMCIgZXhpZjpQaXhlbFlEaW1lbnNpb249IjgwMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6MGViNzZhZTYtNTM4Ny00MDQxLWJhYzYtNjNhNDk4YzlkMGNmIiBzdEV2dDp3aGVuPSIyMDE4LTA4LTEwVDE5OjI1OjI1KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjEyOTdhMjQ4LWEwYWUtZDA0OS1hMDE3LTRmMDBlYjc1NjdiMCIgc3RFdnQ6d2hlbj0iMjAxOC0wOC0yOVQxNzo1NzoxMCswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDpkYmQ4OWExMy03OTMzLWQzNDUtYTIzNi1lZmIzYjkwYWY2NzAiIHN0RXZ0OndoZW49IjIwMTktMDQtMTJUMTQ6NDM6MzArMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE4IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY29udmVydGVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJmcm9tIGFwcGxpY2F0aW9uL3ZuZC5hZG9iZS5waG90b3Nob3AgdG8gaW1hZ2UvcG5nIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJkZXJpdmVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJjb252ZXJ0ZWQgZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6NWU5ZWIyZGMtM2U2ZC1kYzRlLTg5MmMtNmJjNjNmZjVkZmUwIiBzdEV2dDp3aGVuPSIyMDE5LTA0LTEyVDE0OjQzOjMwKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmRiZDg5YTEzLTc5MzMtZDM0NS1hMjM2LWVmYjNiOTBhZjY3MCIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOmVlZDRhMDdjLTQ5MjctODI0NC1iZDA0LTNkNmYzMzgwMzVmOSIgc3RSZWY6b3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjBlYjc2YWU2LTUzODctNDA0MS1iYWM2LTYzYTQ5OGM5ZDBjZiIvPiA8cGhvdG9zaG9wOkRvY3VtZW50QW5jZXN0b3JzPiA8cmRmOkJhZz4gPHJkZjpsaT5hZG9iZTpkb2NpZDpwaG90b3Nob3A6NDA4NTIwMjktNjMwZi0yZjRjLTlkMmItMGY0NGM4ZTI2YmFmPC9yZGY6bGk+IDxyZGY6bGk+eG1wLmRpZDowZWI3NmFlNi01Mzg3LTQwNDEtYmFjNi02M2E0OThjOWQwY2Y8L3JkZjpsaT4gPC9yZGY6QmFnPiA8L3Bob3Rvc2hvcDpEb2N1bWVudEFuY2VzdG9ycz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4WHlDIAAAXoUlEQVR4nNVdeXwUVbb+zq2q7vSaTifpbIQgCTvug4K4oI4O74k6g4jLqKOgojMuqKPOiAqKC6Lz1BGRUTYd3MYV1HFD4vIAFxBRNo0EWbIvZOlOd1dX3fv+qO6Q0EmnutPovO/3qx9J+m791Tn3nHvuuRcSQqArBr2RfeAXSYA6GKiFARLiwQFhAeDiABNAgIGCDJAEIAAIQLg4qE2CcHAIlw5o1FmdBAERAkgAzCgPZrSLIAEOYfzMAFD072SUq2prwsSBp2PVGat7GBgAQI4+erRWJNpDWsHS3eDPBa/Vhq8avsKu9l09fUwwXnkYBnEcgBUGoWnFfx6BFH1iP7Muv3eBQ3agtr0N71e/21MrCgzSYhKnwSCTAFjQsz6lhLS/kaQhcEBedCjQiCAEgWAonyBAERqY0MEPMMmj6r6l5duDW5SMTxDqoadI9DM5Wk6DQXTKoD7nwBAzugwTKBydszgAizE/ClkAsgAiDFAEoAMUIoiMaLsRAjJElAyjHlQC6QRBBnvCpylQSQZBQCWNdbASqDhNSPBBEhIF2X7h4utFtr6J1Uq6kAFSCcIiAKsAwgQ9pMPmsGPHlXusALRxbx6px77GXv8enDNoMhaeuAT17XU47l+j8NP0RilKpDZ4SZ4urBwQAIUZwAGeo3XOtz9NbuqVwF9UAkWRJiHALAiSoDALI4IS6mCPg+NskPEiIADIAtTKQC1si3CKmSJbW0O1cpxB2HHlHhkAxq08QF5v8C216fXTggwx2U8Rv9gcqBdGJASYlUIUoQ4WogDNpwCrhG6QB8Cw5l15EhhNflrN9ijvCyYGiRydwERX2yrBUFOzYDDUOGX8YgRShAQFKUTt0mQKsP0IsVs63ZjeEDMoEZxBfraLVckPN4mAFbLA7hsbFQBi/KqjTc1p9dOCCgAxeImvX3Pgz0ugIKNHSYDVKqOpTfoGYbwMHR5Iokdr2yNio+5gt+Q0ZjZSmP2+VW2Vyp4pUFvVVrRF2ro9LZEWdGiBzuo/TW9kANjg5blqf7/SIZ8DhU8jCjCAkzCMDTkoSEsRpKmdDnQqIBgqrsFJfmnF4Y8OvlPY6ZKBtkEbBefoahzDWggexWOMx9D3mIPdbxxaAhVBFCQZ0XmJOughqHQbOBlfPh1gAGPA3qrm4X8989bpD0ycv7FdbetGIBccimQBAOS58mUA8C21aU7m7Hf3h5ZAnQRCLELA7xCkJdCQFVPhdIGIUNNWgyGFA8N3nT5nHgC4LO5EVWQA/VbdGNI6Bwo7Z52tGvZtFAVpI/zsdXBkQYL5ec4kCIDfL/Dnk//yhE2x7+mjuAJADFqS0y/D0RVpkUCRrTPo3AI/42BChSAHBdhCROgyQBiBhkMAiRh2Nldj/JAxu68+7tpZJqqwulCtCkrfW0wsgSb6ETbBhEZWCjCdIqRSmP0JIWqBCoO8NEtcV6i6Cs6BO0+b8zD6UMvaYA3N+PgyXvxyASMJnaug/iIxgaKPDqIhK4pQCAE2jtpYBQJsARjk3oIA6YLEJOxubMQFR05eN3Hofz/ZV/l8W4H47Kd12jOjl55dVd34hN3isIqYk94PBUlMYG+GPubwSgAF2BDWIK0hP30CHWXpNBC9gUBoDbXA7bDinl/fd6/Zehsv+Vaa98nc+YqfrrPUZlRRB/uD8OqsP2NOzoh0j5xYoNIiCrAdCLEJnYbjZ4DEGOqbAvjTuBuWD8sd8b7ZevPKH7h2x95dQwZ4C8AjIpuapOWs0rIJEToG8kHLRpNIHI0BQJHo6iFEII0AjUABmgaVngCHPR2kERF0oSMYCaBdDaAjBEP6Y21Hh2jJADKtGfCHQxjgLsbG67eMcFndO8z0sat5Z/4xCw6vUBg53dbMmEMd1TIC7Px9kaVPB6cqhOkQRGNkAYQpg9rZBwjRSZD6sYqAoYZEQFOwGfvbw5AkoNiTi+F5o+uOyD9qT2HmANlmySAmMYTCITQHmtUttd9m72jeVtpQW4VbJt1+j1nyAODeNbP/0tIWdA4pKILOu8xNEgAIwM9+Q2HaJ1z8XFjFKrPt9k6giH6qIRbvs1CT9AV0OiIVUY+ByHitVW11CPk5hhUW4w9HTPry3JHnLT+i4Ohyr9O7G0Cwl+qstaNl6PaGbaNG5Y8uN9vnJ5Xlv3ru6+dvLM7xdievKywC0ABqllaKXO1CKOJlaNSngYknMGY5ZQGEGQMDh0pg1XJ5f8lTmIyGYDOamztw3GGHh68567qllx47bZ4sy305wDHwTLtnx9iSE0xLHgDcV37PXZwDGYqtdwIFOqWRmqWXyMX3CAdfDz2xK9EzgQSASJLqZMY9OqdmaT7CdAKU1MgjEBgDvm/YB7clA0umPrV42thrZgII9FW3v1i6YfFFq7d9ck5pQX7v5HWFDEAlsCrlRT44UgZZJIwXxhFIIWOhT0FGCBOnFnYUBejWlMkjAhc6dlbX48TBY2peuWTllPzMgnUpNZYkIrqK+Z/ef7fdAXRahL4gYGxNhKiE6qVZws6XAehVQ+IJbJRiDQlYuE4qTU1p9DDI04SG3dUNmD720u2LL3huLIC2VNtLFnPXzPnL91U/DR9SWAidJ7n8lQTIzyZBpRoAT/dWLM6OUoiMJ0wCKgHA2FRWFARD8nbXNOCGk67dsfiC58ahD/Law22oaa8CALy57TUUz8vGyU8fh+312wAAwUhvtiUe4UjIs+x/l92WYU9+7ABiG/1lpGFkX8Xi/xJ7CIBG3lTcFcYIu2rrcdmvLvrh8ckLTwDQ2ledfa17sbXuOwDA/mAz9lU3Y2vdtwjrIQjBEdKC0Li5LQyrktEy+zez3wsFgY5IMGr9kwR1bn/2ir6pIajJrhVlJqOisRonHDam8tmLXxgHYL+ZeoqkwK44AAAZsg3MCeQ6fJCZDCIGRlJSynDlCddcfNuEW1ZU1e9PNQATXe33jrQvvgiExmAjvFY7npv6wiUAmlNrp3ubPX/SNx6a9MgVpw09acePDTWQWZIJCaIzN6JXpJ9AAppbQpg1Yc68Ul/Z+qTqgmCJht7tFkMSLZIVLqsLgOFHpgDtkbMeu86uMLSr7anUT4i0EkggVLXX4NjiUfU3n3Lr/cnWd1icqGqrwvKNz1y2dMM/ns+225d0qP7l93x056IF6x89vz5Q75KSlSIARxcf89H0Y65+raa5DYzSKzPp3RMhIBgErjn+hidB8CdT9cemHwpuf2/mPR9WvHdBe5twO5wKBnh8UHUVz254Hku152fMdt+u/tfQcxbNPeOhOw7zliblhN8w/pa/rdj8z/MCET9scqqmOR6JXkfSnnNLaD/KsosCUw6f+lQy9RZ98fdzhjw8bN/r3757lcfmcZcWFiDflYOIroMgYZC3AKV5BbBIVsvzX712w9BHypqf/fqZs5Ppo8xXtv7c4ee+XdPadtCc2j8kIpBMlOlSmNDUHsJvR05Z6XF4GswO4O4P/3rhtStuXJnrdLAhviIozAohxIFwEwyfXggBu+LE0IIiuG12y+XLrl51X/ndF5ntBwB+O/q8lyEA0b+ErG6II0fIgJBBQoYkZABkLtdEgAMEnHjYBNOhoCfWPXrx3LfmvVhUmIXMjExTa1WN6/DaPCgs9OCuN+e+sOiLBZeY7e/EkpM/KMsuCqXTmJjxAzvMNOSP+DHYU9A+dsDYD82U316/tfSWf9+83JubAZtiAxfmpYILDrtihyfbipvfvnHJD407yszUy3bl1I8fePIHDQFTXymmg/32A01NGK2hAEbljd6W58lvBgDOeefTEx765MFZkRCUbHt2UuTFwAWHz5GDYIBbHii//7aeyggh4sYxJGfoNtP5WAIEkdhsp82mhyNAkXvATgAIdATQEeyAP+BHWA3Hla1pq7G+98M7k3xZDnMhpl6gcR35OS688/2bv93TsjvOtKqqCn/Aj45gBzqChtQVuooqIKHbHJsQfRRLn1PEAa8thwDAYXfA6XDC7XLDlmGLK7p+z9oL69pbcp2W/uem2BU7Gv3+3G9qNk05+DOr1Qq3yw2nwwmnw+jL58xjEoCD94JSRVq9SrfdbUrdN1Z/eSo0gNLQPcFIyd1St/lUM+XddjfJyUhgH0jvSsSkexWMBEVSapQAIpr9sK+lylxjXU8BpAHxK5F+fKeOkLl4HaX7vIsAJGau0WAwCF0/OECROuIJPCCTMSNuTkploL69TkcA2N26GwCgRlRke7LhzfR2K+qxeRl0I2Ld37koRkRp9tC479IeaEdtYy0sihGgKPGUYE/Tbp1J6RPCeHIkEXvI2PsVITPv1iID9f46W1ANGrsPgkef+MpjB45fL1nQLwscAwcHScBI3+i4fRYhRJdxGG5MbXuNTdUBSlNQoe9gAplLRrRJMvb6dx+JDGBgVgnCYcN94ZyDC94tCjJu4PgVxZ6CB1tCjZ5sW06/5sKW4H4MyipoPb543EsHf6bICgbml4CIjIi0BWhSG45M5wzS92sQ5qQ9y+bFpurvStfu/mwkABAzUkJkRY4LITktTv8FR/z+7ZbmCCSWuiTITML+ZhUXHXnZG5kZmXFbBrIsgxiBGMFisaCjI4BPK8uP8tiVvhs3NvGor++fNissQUJEAzbVbjwLACyKBVbFCkXuebBzfn3PvYOLirWdzVXJR4phkLeruQolBQWRO06d9WBPZRRZgdVi7ZwDN9ZuGLOlaccYj9WTdH+9IW0ECgjY7cCqba//zoyKZMj2iuem/vMqXQNq2uogJxFtlpmMOn8DIiqwZMryaxwW1w9m6r27450zVRWQKH1h0LT6gXkOH9bu2TDu/R3vjTVTfnzJKcvfuuK1P7YHNVQ07oPEKKF7QSDIjKGyaR9a21W8evmLfzq99MylZvpqD7bjlS0vXZHlsqTNiQbSTKBEEgQDnvri77earTNp+OSnNt20YdpwXwkq9tSgpr0OEX7AbsUI1XgEdf56/LCnGiVZBfhy5rpp5426cKHZfpZ8+fSMHxv2lnpt2X0XTgJpi8YAABcCJZ4crNzx7uS3t646zmy9owqOXfbNDd8XLbzo8VdG+IZhf3A/KptqUVlfi511NahsrEVDoAmDvYPEo1Mfevu7m3YOHzNg3DKz7bcF2vDE+sdmupxS2s+sJ3KkU4LCLJBlYPaHs/42acTZJ4GZ498iWauvHXvD1BnHX5f3fcO28zfXfjPhx6YKazAS1Euzy2xjisauHuEbuVBmctIJSbM+uH1OZcO+4UMLi6Clwffsit7T22LaQ4iPRyUAFxyDs4rw9d4tJ177+tV3PzXlGdM5zADAiNWN8I1eMMI3ekEy9YQQPWYfvLLppfEL1i2aPTAvJ+3kAT3JG+/yiOhfkhR7nXOU5OVg0frF9yxau+Cyfo+yFxgrjd4Ht61mS+n0N/6w0u1SYGWWVLqInSdOWKD7oDIEhE0IoQgGPbVDeQICCrMg1+vEtauuf3bFV8uvSraNvhAMd6CxpbHXnJe61urDJi799ecdXM3Od+RBTyHqDUAFxV0d0A3xEmjjgJ0Ddk4UISsI36ay9OaCI8uWCXBg/uqHHwSQmXCkuooPf3gXDa31vZZpD7bhy8rPsbnyG9Q01UCN9Dy77GrcOWjMgmM/3+uvyynzDjCdkNQNhmDvAkNFomI9e5QcgFUEhIu7wbGSQnR/5xGHJKDpGiCAWyfe+jT6yM6KCBXnL5uCBybMQ7PSgLyOQlx5xgyQlfDl11/i8a3zMSxrBGrq6zHl2PPhdXghd1nlxCRxzfcfDD93xdmfBLnqG5Y7ABE9BfIIQJggsvU3hIMn3GWMV2GbMB4LwH16BBrtgUvMjeYKmoZEDJVNdZg46rTNlx59+R19lWeMoTAzD5l2D9ZUrMFH36xGLLl2a8V3eGPT64iQhkJPHuxWe1z0ttXfghvfnDHr9MW/2U4SfGXZ/SBPJSBD/MjztLnCqyfM3+7dCgsAkgiKXN1OtfI8OPgEhOgks8kgQS0IWQLuPn3uHLNjl8jIasx35SFXy+98vZkuDwZ6i2GVLNHIDsHKrHBZXAAHFqx9dPJ95ffOr2ttKR3g88Im21IjDzBOJTCAF2kXQQGnSGK/LnFEWiVARYc+IGKjJmkKq5c/g4ahfWXqy0xCZe1+XH3i9FfHDTzhTbNjl0mBQ3aCC45cqw/MZrzNIlsxhC5gk+xQrBboXMfXNV8VvFfxzjlvVbxxc2VD7dCsTBtifl7KcUYdIJ3AC7XJwq1vQLjvgG9ieYruH1AYQTi4ELnaSdTGPkIHGw2555OYBEJjRxN8XjfuPPWuR82OfX+g2d2q77/91R9frN7XvmezVdgsH+9YQ9YMCz5uKAdTWPjz2rXZalg9csWuxeO+q98+MaQLZNkzUJpfAAj0z8+LEKAI8CxtolDE+4jQAQ4SwHRYggIsJJw8Ilz8OKqTb6EgzYUWPbrfpRNGhOaWEOaedfuyYk+J6Wz8J9c9ftOu1ro76sIr4VHcqLRU4OUXXoTggMOuwGvJxupdH0EwHRIY8l05kJjcpy/YJ3TjMI1w87dEln4F6WgizfyuTfxZuVUHnZULEsAEKCAZKq0I8Ewus1aWTW3sSYTpPOM2DgFGhH2tNRjsLQt9O3P7EInkfWYG8V3t5gHjnjp2u8vqcDoUh5FMBGFkLAgjOMvSnQuqR29gsoudws4vFS59PRhAfuOmOu7ROy+FSnRWLrlRRY9asEamQaM65POLhZ2fDFlsACdwnSMUAv464a77zZIHAHPXzH4gENSdLqurM9REIEgkQWJS+siLHRUx1LVRZOtX8VytDFa+HiozSE3SVUt+ZLF9VQ6INlJrHA1r+cDwKc5c23mVzXU4c/hpVZccfdl9Zptbte3NE1/ZtPLSQTm5adlkSojovCay9Pncp+UKF18MnaLEpTYNxM2BtaHuOeEFSBw/K/T7+M4ralUAbx+9dFjRkinL43M5EuCBj+fOlxRAZkpKSUamoBlxEW7nHwqvfikU1CFMB65m7AfiCByX/atuv//U2OMFh53YeX1t7Ai2OsQ7rHqAu9h05wvWP37RFzu/HldWUHBoyItdn5fB93K7uAQZ/FMoAlBZ9PC4MJ9O0QviCCw//atuvx/2ck5fbSgAuPwIicll5rNuW0Mt1v/57KF5LpeU/ns5BYyrRi1Ch1P/M3fwxyDIODwuI6quhyozIQlUXlUnAaDShXlJX2Tz4Mf337Srtmbg0KI0BzljJ+w9fDl3638EECQNabroKR79NW+xI9mmMHPtdQotILa9dtvxT6577MG8HGfyhwB7g25cRwAn3yDytZHcq10BJoIUIUOND9ENIilLYOWMOhkASp/I13sKOX66uxwvb30ePkceAGD2KfcrQ7KGSJAhZrx3+fEa1+CWMqH3VzQ4AE6AlVcLu5gmPLpxCYVKP8slGP1R4YSXHa7eVY6F/14C+ABxtyAA0nWvzgwhAlSM3PrUwKH527UmfTFCNBAkkr8W9sA8B+HmtyODzwcTB65ZPoR31nRFSgRWXlVvXF74TB7vbR832+YGfECZtwgwDI1e5i0C6QQ9HImomepqZFApa5auh5/NR5hkKCZvOtKMCyuEm/+LZ+pXgdBGYUJab4UziaSFvPKK+tgBPFPHHyqu28cA0JAFA4zysdVAGxMUII1n6Y/zIi1PZOnPdq4SeuNAhyFhGWIrL9CO5rnaBWBoo1idn0nquiKVWUIBwAf/I8/sq+55X4UACAJ1MA6gWeTr00W+fhSc/BMABlGxzS0dhpGwok549It5tjZa2Pg3UOmQWVezSEqFY27L4Gd8qpnXLe4WMgA2ZMGA3t2c6LIQQdKFIjaLPO006mCHI0ynIkKDwCHBIupgFV9BEeXgpJJGEMlcNXsIEReN6QNWRBXJZPkMGKreTU7O+vA0vFtdjhJHttESAVAAIQCK3XgfIQhHNLcsgqgDHP05dtU27/Jv7J59jgNiEVuqRde6wgJQ7D5rRP8uCQjFuOqg817qWBTmnN6jMDEko8JytGuz5Mk4oIDdcHLeqRCR9OUp/5JIhsDY1enJlO9R0SYV/w6ZdgkhPeGW6/8LmCXQAkP6zC4bLOj+nwF0w8is0TjMXYb2SFJHiv8j8X8D48AgBA7ImwAAAABJRU5ErkJggg==';\n\n //巴法云主题订阅\n Blockly.Blocks.QDP_tcp_device_cloud_subscription = {\n init: function () {\n this.jsonInit({\n message0: '%1',\n message1: Blockly.Msg.QDP_tcp_device_cloud_subscription,\n args0: [\n {\n type: 'field_image',\n src: QH_BEMFA_ICO,\n width: 40,\n height: 40\n }\n ],\n args1: [\n {\n type: 'field_dropdown',\n name: 'type',\n options:[[\"TCP创客云\",\"1\"], [\"TCP设备云\",\"2\"], [\"图云\",\"4\"]]\n },\n {\n type: \"field_input\",\n name: \"Key\",\n \"text\": \"d9efdd0413ec4b74ab0057a0b8675654\"\n },\n {\n type: \"field_input\",\n name: \"topic\",\n \"text\": \"led002\"\n },\n {\n type: \"input_dummy\"\n },\n {\n type: \"input_statement\",\n name: \"function\"\n }\n ],\n \"tooltip\": \"巴法云主题订阅\",\n colour:QH_BEMFA_COLOR,\n extensions: ['shape_statement']\n });\n }\n };\n\n //巴法云主题消息发送\n Blockly.Blocks.QDP_tcp_device_cloud_theme_push = {\n init: function () {\n this.jsonInit({\n message0: '%1',\n message1: Blockly.Msg.QDP_tcp_device_cloud_theme_push,\n args0: [\n {\n type: 'field_image',\n src: QH_BEMFA_ICO,\n width: 40,\n height: 40\n }\n ],\n args1: [\n {\n type: 'field_dropdown',\n name: 'type',\n options:[[\"TCP创客云\",\"1\"], [\"TCP设备云\",\"2\"], [\"图云\",\"4\"]]\n },\n {\n type: \"field_input\",\n name: \"Key\",\n \"text\": \"d9efdd0413ec4b74ab0057a0b8675654\"\n },\n {\n type: \"field_input\",\n name: \"topic\",\n \"text\": \"led002\"\n },\n {\n type: \"input_value\",\n name: \"data\"\n }\n ],\n \"tooltip\": \"巴法云主题消息发送\",\n colour:QH_BEMFA_COLOR,\n extensions: ['shape_statement']\n });\n }\n };\n\n //串口打印\n Blockly.Blocks.serialPrint = {\n init: function () {\n this.jsonInit({\n message0: Blockly.Msg.serialPrint,\n args0: [\n {\n type: 'field_dropdown',\n name: 'type',\n options:[[(Blockly.Msg.println),\"println\"], [(Blockly.Msg.print),\"print\"]]\n },\n {\n type: 'input_value',\n name: 'VALUE'\n }\n ],\n \"tooltip\": \"串口打印\",\n colour:QH_BEMFA_COLOR,\n extensions: ['shape_statement']\n });\n }\n };\n\n //变量get\n Blockly.Blocks.QH_variables_get = {\n init: function () {\n this.jsonInit({\n message0: '%1',\n args0: [\n {\n type: 'input_value',\n name: 'VAR'\n } \n ],\n \"tooltip\": \"获取变量\",\n colour:QH_BEMFA_COLOR,\n extensions: ['output_number']\n });\n } \n };\n\n return Blockly;\n}", "function setupUnknownBlocks(){\n $(\".block\").remove();\n var numblocks = model.get_current_state_array().length -1;\n \n $(\"img\").css(\"height\", numblocks*15+75);\n \n for(var i=0; i<numblocks; i++){\n $(\".image-container\").append(\"<div class='block gray-block block\"+i+\"'>?</div>\");\n $(\".block\"+i).css(\"top\",\"\"+(15*i+parseInt($(\"img\").css(\"height\"))/2)+\"px\");\n }\n \n }", "function genCube(){\n //Chunk in voxel.js is defined as a single array of numbers. Each different number as respresent a different block type. Types stored in 2d array, number reference the index.\n //You must know the dimensions of the chunk multiply the height times width time depth to get the total size of the array/chunk.\n //\n //Chunk array seems to be ordered as follows. Fill 1 row from x=0tox=31, then fill all rows to the top, then start over on filling x on the bottom row over to the originial row.\n\tvar voxels = new Int8Array(32 * 32 * 32)\n\t//forward to end, first row and last.\n\tfor(i = 0;i < 31;i++){\n\t\t//last row\n\t\tvoxels[(32*32*i)+30] = 1\n\t\t//first row\n\t\tvoxels[32*32*i] = 1\n\n\t\t//fill in all floor blocks(grass)\n\t\tfor(i2 = 0;i2 < 31;i2++){\n\t\t\tvoxels[(32*32*i)+i2] = 1\n\t\t}\n\n\t\t//bottom to top\n\t\t//corner 1\n\t\tvoxels[32*i] = 1\n\n\t}\n\tvoxels[0] = 2\n\tvoxels[32] = 2\n\tvar z,x,y\n\tx=1;\n\ty=0;\n\tz=4;\n\t//test code to figure out how to render roads. Place a lineblock in the middle,\n\t//and sideroad blocks around it.\n\tvar pos = 32*32*16+16\n\tvoxels[32*32*16+16] = 2\n\tvoxels[pos-1] = 3\n\tvoxels[pos+1] = 3\n\tvoxels[(32*32)+pos] = 3\n\tvoxels[pos-(32*32)] = 3\n\t//voxels[(32*32*z)+(32*y)+x] = 2\n\t//this.voxels = voxels\n\treturn voxels\n}", "function drawBoard() {\n\tfor (i = 0; i < blockArr.length; i++) {\n\t\tfor (j = 0; j < blockArr[i].length; j++) {\n\t\t\tif (blockArr[i][j][0] != 0) {\n\t\t\t\tif (blockArr[i][j][4] == 25) ctx.globalAlpha = 1;\n\t\t\t\telse ctx.globalAlpha = blockArr[i][j][0];\n\t\t\t\tctx.fillStyle = \"#\" + blockArr[i][j][1] + blockArr[i][j][2] + blockArr[i][j][3];\n\t\t\t\tctx.fillRect(j*BLOCK_SIZE, i*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);\n\t\t\t\tif (blockArr[i][j][4] == 1) {\n\t\t\t\t\tctx.globalAlpha = blockArr[i][j][7] / 2;\n\t\t\t\t\tctx.fillStyle = \"#fd0\";\n\t\t\t\t\tctx.fillRect(j*BLOCK_SIZE, i*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);\n\t\t\t\t}\n\t\t\t\telse if (blockArr[i][j][4] == 3) {\n\t\t\t\t\tctx.globalAlpha = blockArr[i][j][7] / 2;\n\t\t\t\t\tctx.fillStyle = \"#000\";\n\t\t\t\t\tctx.fillRect(j*BLOCK_SIZE, i*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);\n\t\t\t\t}\n\t\t\t\telse if (blockArr[i][j][4] == 25) {\n\t\t\t\t\tctx.globalAlpha = Math.random() / 5;\n\t\t\t\t\tctx.fillStyle = \"#fff\";\n\t\t\t\t\tctx.fillRect(j*BLOCK_SIZE, i*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);\n\t\t\t\t}\n\t\t\t\telse if (blockArr[i][j][4] == 28) {\n\t\t\t\t\tctx.globalAlpha = blockArr[i][j][7];\n\t\t\t\t\tctx.fillStyle = \"#f00\";\n\t\t\t\t\tctx.fillRect(j*BLOCK_SIZE, i*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);\n\t\t\t\t}\n\t\t\t\telse if (blockArr[i][j][4] == 29) {\n\t\t\t\t\tctx.globalAlpha = Math.pow(1 - blockArr[i][j][6], 0.5);\n\t\t\t\t\tctx.fillStyle = \"#f60\";\n\t\t\t\t\tctx.fillRect(j*BLOCK_SIZE, i*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);\n\t\t\t\t}\n\t\t\t\telse if (blockArr[i][j][4] == 30) {\n\t\t\t\t\tctx.globalAlpha = blockArr[i][j][7];\n\t\t\t\t\tctx.fillStyle = \"#f30\";\n\t\t\t\t\tctx.fillRect(j*BLOCK_SIZE, i*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);\n\t\t\t\t}\n\t\t\t\telse if (blockArr[i][j][4] == 23 && alchArr[i][j] == 1) {\n\t\t\t\t\tctx.globalAlpha = Math.random() / 5;\n\t\t\t\t\tctx.fillStyle = \"#fff\";\n\t\t\t\t\tctx.fillRect(j*BLOCK_SIZE, i*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);\n\t\t\t\t}\n\t\t\t\telse alchArr[i][j] = 0;\n\t\t\t}\n\t\t\tif (mechArr[i][j] != 0) {\n\t\t\t\tctx.globalAlpha = 0.25;\n\t\t\t\tctx.fillStyle = \"#664411\";\n\t\t\t\tctx.fillRect(j*BLOCK_SIZE, i*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);\n\t\t\t}\n\t\t}\n\t}\n}", "function Tetromino() {\n this.shape = Math.floor(Math.random() * nbBlockTypes);\n this.color = Math.floor(Math.random() * nbBlockTypes);\n this.sprites = []; // list of the sprites of each block\n this.cells = []; // list of the cells occupied by the tetromino\n this.center = [0, 0];\n // materialize makes the tetromino appear, either in the scene (inGame = true) or on the right (inGame = false) if it's the next tetromino\n this.materialize = function(c_x, c_y, inGame) {\n this.center = [c_x, c_y];\n this.cells = [];\n // clean previous sprites if any\n for (var j = 0; j < this.sprites.length; j++) {\n this.sprites[j].destroy();\n }\n this.sprites = [];\n var conflict = false; // Are there occupied cells where the tetrominon will appear? If yes -> game over\n for (var i = 0; i < blocksPerTetromino; i++) {\n // Compute the coordinates of each block of the tetromino, using it's offset from the center\n var x = c_x + offsets[this.shape][i][0];\n var y = c_y + offsets[this.shape][i][1];\n var sprite = game.add.sprite(x * blockSize, y * blockSize, 'blocks', this.color);\n this.sprites.push(sprite);\n this.cells.push([x, y]);\n if (inGame) {\n if (!validateCoordinates(x, y)) {\n conflict = true;\n }\n scene[x][y] = blockValue; // 1 for blocks of current tetromino, 2 for fallen blocks\n }\n }\n return conflict;\n };\n}", "function puzzle_blocks() {\n return {\n id: \"blocks\",\n name: \"Blocks\",\n description: \"Collect all the coins on the board.\",\n\n // TODO: add read-only code mirror boxes to the hint\n hint: \n \"<p>\"\n + \"Your robot cannot move through blocks. It must go around them.\"\n + \"</p>\"\n\n ,\n win_conditions: [\n {type: WinCondition.COLLECT_COINS}\n ],\n badges: {},\n constraints: [],\n\n // what conditions need to be met to unlock this level?\n // the unlock returns true if this level should be unlocked\n // TODO: come up with better unlock functions. e.g.\n // return USED_MOVE && USED_TURN && isLevelCompleted(LevelEnum.Previous)\n unlock: function(campaign, state, world_index, level_index) {\n return prevLevelCompleted(campaign, state, world_index, level_index)\n },\n\n solutions: [\n \"move\\nmove\\nturn left\\nmove\\nmove\\nturn right\\nmove\\nmove\\nturn right\\nmove\\nmove\",\n ],\n num_cols: 9,\n num_rows: 7,\n // BUG: this should be programming_bot_id, not index\n programming_bot_index: 0,\n bots : [\n {\n botColor: BotColor.BLUE,\n cellX: 2,\n cellY: 3,\n facing: Direction.RIGHT,\n program: \"\",\n },\n ],\n coins: [\n {x:6, y:3},\n ],\n blocks: [\n {x:5, y:2},\n {x:5, y:3},\n {x:5, y:4},\n ],\n traps: [\n //{x:3, y:0}\n ]\n }\n}", "function Labyrinth (board_height, board_width) {\n this.board_width = board_width\n this.board_height = board_height\n\n this.blocks = []\n this.blocksAdded = 0\n this.block_width = 50\n this.block_height = 50\n}", "function EasyBlock(x1, y1, width1, height1, game) {\n let x = x1;\n let y = y1;\n let width = width1;\n let height = height1;\n\n this.getWidth = function() {\n return width;\n }\n\n this.getHeight = function() {\n return height;\n }\n\n this.getX = function() {\n return x;\n }\n\n this.getY = function() {\n return y;\n }\n\n this.draw = function() {\n x -= game.getDificulty();\n\n game.getCtx().beginPath();\n game.getCtx().fillStyle = \"rgb(0, 0, 0)\";\n game.getCtx().fillRect(x, y, width, height);\n game.getCtx().closePath();\n }\n}", "function init() {\r\n for (let i = 0; i < (state.dimensions * state.dimensions); i++) {\r\n const coords = {\r\n x: i % state.dimensions,\r\n y: Math.floor(i / state.dimensions)\r\n }\r\n const newBlock = document.createElement(\"div\");\r\n const id = coords.x + \" \" + coords.y;\r\n newBlock.style[\"background-color\"] = blockColorEnum.background;\r\n newBlock.className = \"block\";\r\n newBlock.setAttribute(\"id\", id);\r\n newBlock.setAttribute(\"x\", coords.x);\r\n newBlock.setAttribute(\"y\", coords.y);\r\n wrapper.appendChild(newBlock);\r\n };\r\n}", "function updateBlocks(){\n\tfor(let i=0; i <blockArray.length ; i++){\n\t\tblockArray[i].drawBlock();\n\t}\n}", "function initBag() {\n //bag.push(TetrisPieces.newStraight());\n //bag.push(TetrisPieces.newStraight());\n //bag.push(TetrisPieces.newStraight());\n\n //bag.push(TetrisPieces.newLBlock());\n //bag.push(TetrisPieces.newReverseLBlock());\n //bag.push(TetrisPieces.newTBlock());\n //bag.push(TetrisPieces.newSquiggly());\n //bag.push(TetrisPieces.newReverseSquiggly());\n //bag.push(TetrisPieces.newSquare());\n //bag.push(TetrisPieces.newStraight());\n\n bag.push(TetrisPieces.newLBlock());\n bag.push(TetrisPieces.newLBlock());\n bag.push(TetrisPieces.newReverseLBlock());\n bag.push(TetrisPieces.newReverseLBlock());\n bag.push(TetrisPieces.newTBlock());\n bag.push(TetrisPieces.newTBlock());\n bag.push(TetrisPieces.newSquiggly());\n bag.push(TetrisPieces.newSquiggly());\n bag.push(TetrisPieces.newSquiggly());\n bag.push(TetrisPieces.newReverseSquiggly());\n bag.push(TetrisPieces.newReverseSquiggly());\n bag.push(TetrisPieces.newReverseSquiggly());\n bag.push(TetrisPieces.newReverseSquiggly());\n bag.push(TetrisPieces.newSquare());\n bag.push(TetrisPieces.newSquare());\n bag.push(TetrisPieces.newSquare());\n bag.push(TetrisPieces.newSquare());\n bag.push(TetrisPieces.newSquare());\n bag.push(TetrisPieces.newStraight());\n bag.push(TetrisPieces.newStraight());\n bag.push(TetrisPieces.newStraight());\n bag.push(TetrisPieces.newStraight());\n bag.push(TetrisPieces.newStraight());\n }", "function Board( height, width )\n{\n\t\n\tthis.board= Array();\t\t// Holds the rows of blocks\n\tthis.heightInBlocks= height;\n\tthis.widthInBlocks= width;\n\tthis.boardHeightInPx= String( height* 128 )+ \"px\"; \n\tthis.boardWidthInPx= String( width* 128 )+ \"px\"; \n\t//The side of a square block in a percentage\n\tthis.blockSidePercentage= String((128/ (128* this.widthInBlocks))* 100)+ \"%\";\n\n\t/*---construct---:\n\t* Creates the logical foundation for\n\t* the board which includes column and\n\t* row naming, and individual Block\n\t* instantiation based off of these \n\t* properties. \n\t*/\n\tthis.construct= function()\n\t{\n\t\tvar isAlt= true;\n\t\tfor( var rowNum= 0; rowNum< this.heightInBlocks; rowNum++ )\n\t\t{\n\t\t\tr= Array(); // Request new address for 'r'\n\t\t\tfor( var colNum= 0; colNum< this.widthInBlocks; colNum++ )\n\t\t\t{\n\t\t\t\tisAlt= !isAlt;\n\t\t\t\tcolLetter= String.fromCharCode(\"A\".charCodeAt(0)+ colNum); \n\t\t\t\tr[colLetter+ rowNum]= new Block( isAlt, colLetter+ rowNum );\n\t\t\t}\n\t\t\tthis.board[rowNum]= r; \n\n\t\t\tif( this.widthInBlocks% 2 == 0 )\n\t\t\t\tisAlt= !isAlt;\t\t// No same colours in a column on boards with even widths\n\t\t}\n\t}\n\n\t/*---getHeightInBlocks---:\n\t* Retrieves the total number of blocks in\n\t* a column.\n\t*/\n\tthis.getHeightInBlocks= function()\n\t{\n\t\treturn this.heightInBlocks;\n\t}\n\t\n\t/*---getWidthInBlocks--:\n\t* Retrieves the total number of blocks in\n\t* a row.\n\t*/\n\tthis.getWidthInBlocks= function()\n\t{\n\t\treturn this.widthInBlocks;\n\t}\n\n\t/*---draw---:\n\t* Draws the board onto the document\n\t* within the element specifed by\n\t* the elemID.\n\t*/\n\tthis.draw= function( elemID )\n\t{\n\t\tvar blk;\n\t\tvar brd= document.getElementById( elemID ).style;\n\t\tbrd.width= this.boardWidthInPx;\n\t\tbrd.height= this.boardHeightInPx;\n\n\t\tfor( var r= 0; r< this.board.length; r++ )\n\t\t\tfor( key in this.board[r] )\n\t\t\t{\n\t\t\t\tdocument.getElementById(elemID).innerHTML+= this.board[r][key].drawBlock();\n\t\t\t\tblk= document.getElementById(key).style;\n\t\t\t\tblk.width= this.blockSidePercentage;\n\t\t\t\tblk.height= this.blockSidePercentage;\n\t\t\t}\n\t\n\t}\n}", "function add() {\n /* iterate through every block in the tetromino */\n for (let i = 0; i < tetr[currTet].config[configState].length; i++) {\n /* current pos for each block*/\n let row = row_state + tetr[currTet].config[configState][i][0]*36;\n let col = col_state + tetr[currTet].config[configState][i][1]*36;\n\n /* set it in occupied */\n occupied[row/36][col/36] = true;\n }\n}", "function Block(gridX,gridY,material,blockSize){ //The x and y will be in world coordinates\r\n /***************\r\n * Block Material Guide:\r\n * 0:air\r\n * 1:dirt\r\n * 2:stone\r\n * 3:bedrock\r\n ***************/\r\n this.gridX = gridX;\r\n this.gridY = gridY;\r\n this.blockSize = blockSize;\r\n this.x = this.gridX*this.blockSize;\r\n this.y = this.gridY*this.blockSize;\r\n this.width = this.blockSize;\r\n this.height = this.blockSize;\r\n this.material = material;\r\n\r\n //Determine the color based on the material\r\n if(this.material == 0){\r\n this.color = null;\r\n }else if(this.material == 1){\r\n this.color = \"#583609\";\r\n }else if(this.material == 2){\r\n this.color = \"#838383\";\r\n }else if(this.material == 3){\r\n this.color = \"#292929\";\r\n }\r\n\r\n //Draw the block based on its color, grid pos and camera position.\r\n this.draw = function(camera){\r\n if(material != 0){\r\n ctx.beginPath();\r\n ctx.fillStyle = this.color;\r\n ctx.fillRect(this.x-camera.x, this.y-camera.y, this.blockSize+1, this.blockSize+1);\r\n ctx.fill();\r\n ctx.closePath();\r\n }\r\n }\r\n}", "function dropTetris(z,k){\n for(var y=0;y<gridWidth;y++)\n {\n for(var l=z-1;l>=0;l--)\n {\n var temp = l+1;\n updateOccupyPropertyOfBlocks(temp,y,players[k].occupiedPropertiesOfAllBlocks[l][y],k);\n updateBackgroundPropertyOfBlocks(temp,y,players[k].backgroundPropertyOfAllBlocks[l][y],k);\n }\n }\n }", "function initBlocks() {\n var grid = Resources.getGrid(), nRows = grid.nRows, nColumns = grid.nColumns;\n var row, col;\n\n for (row = 0; row < nRows; row++) {\n for (col = 0; col < nColumns; col++) {\n blocks.push(new Block(grid.rows[row], col, row));\n }\n }\n }", "function generateBlocks() {\n clearCanvas();\n\n num = canvas.clientWidth / 30 - 1;\n if (num && typeof num !== \"number\") {\n alert(\"First argument must be a typeof Number\");\n return;\n }\n for (let i = 0; i < num; i++) {\n const value = Math.floor(Math.random() * (canvas.clientHeight *0.95));\n\n const block = document.createElement(\"div\");\n block.classList.add(\"block\");\n block.style.height = `${value}px`;\n block.style.transform = `translateX(${i * 30}px)`;\n\n const blockLabel = document.createElement(\"label\");\n blockLabel.classList.add(\"block__id\");\n blockLabel.innerHTML = value;\n\n block.appendChild(blockLabel);\n canvas.appendChild(block);\n }\n}", "function TeaBlock() {\n this.value = [0, 0];\n }", "function getIBlock() {\n switch (rotation) {\n case 0:\n case 2:\n blockWidth = 1;\n blockHeight = 4;\n pieceArray = \n [ \n [1, 0, 0, 0],\n [1, 0, 0, 0],\n [1, 0, 0, 0],\n [1, 0, 0, 0]\n ];\n break;\n case 1:\n case 3:\n blockWidth = 4;\n blockHeight = 1;\n pieceArray = \n [ \n [1, 1, 1, 1],\n [0, 0, 0, 0],\n [0, 0, 0, 0],\n [0, 0, 0, 0]\n ];\n break;\n } \n}", "function Block1() {\n \n //create the block\n block1 = rect(block1X, block1Y, blockWidth, block1Height);\n \n //move the block across the screen\n if (block1X > 0) {\n block1X -= blockMovement;\n }\n \n //box 1 location \n block1Right = block1X + 20;\n block1Left = block1X;\n block1Top = block1Y;\n block1Bottom = block1Y + block1Height;\n \n //if the block goes off the end of the screen:\n \t//start it off the screen\n \t//set a random starting height on screen\n \t//set a random starting block height\n \t//slowly increment block speed\n if (block1X <= 0) {\n block1X = width - random(5,25);\n block1Y = random(0,400);\n block1Height = random(50,150);\n blockMovement += .2;\n }\n}", "function generateRandomBlock() {\n arrayOfBlockFunctions = [\n getIBlock,\n getJBlock,\n getLBlock,\n getOBlock,\n getSBlock,\n getTBlock,\n getZBlock,\n ];\n\n nextPiece = Math.floor(Math.random()*arrayOfBlockFunctions.length);\n arrayOfBlockFunctions[nextPiece]();\n nextPieceBoard = pieceArray;\n}", "function buildBoard(blockOrder, blockType, p1) {\n \n // variables we'll need\n var blockLocations = Array(BLOCK_COUNT).fill(NaN);\n var highestBlockIndex = 0;\n var currentlySelected = 0;\n \n var placeable = [BOX_SUPPLY, TURRET_SUPPLY, CANNON_SUPPLY];\n var counterClassNames = [\"box-selected\", \"turret-selected\", \"cannon-selected\"];\n var counterContainers = [];\n\n // What's gonna hold all our stuff\n var topLevel = document.createElement('div');\n topLevel.id = \"build_main\";\n\n // Instructional text\n var text = document.createElement('div');\n text.id = \"instructions\";\n var playerName = \"Player 1 \";\n if (!p1) {\n playerName = \"Player 2 \";\n }\n var instructionString = playerName + 'Click to place / remove a block';\n text.innerHTML = instructionString;\n topLevel.appendChild(text);\n\n // Hold grid board, and label of which unit is selected / how many you have\n var midParent = document.createElement('div');\n midParent.id = \"mid-parent\";\n\n\n // Set up unit selection\n var typeSelector = document.createElement('div');\n typeSelector.className = \"type-box\";\n\n // for box\n var boxContainer = document.createElement('div');\n boxContainer.className = \"counter-selected\";\n boxContainer.onclick = function() {\n if (placeable[BOX_TYPE] > 0) {\n currentlySelected = BOX_TYPE;\n boxContainer.className = \"counter-selected\";\n fixUnselected(counterContainers, currentlySelected);\n }\n }\n var boxLabel = document.createElement('div');\n boxLabel.className = \"label\";\n boxLabel.innerHTML = \"Box: \";\n boxContainer.appendChild(boxLabel);\n var boxCount = document.createElement('div');\n boxCount.id = \"box-count\";\n boxCount.innerHTML = BOX_SUPPLY;\n boxContainer.appendChild(boxCount);\n typeSelector.appendChild(boxContainer);\n counterContainers.push(boxContainer);\n\n // turret\n var turretContainer = document.createElement('div');\n turretContainer.className = \"counter\";\n turretContainer.onclick = function() {\n if (placeable[TURRET_TYPE] > 0) {\n currentlySelected = TURRET_TYPE;\n turretContainer.className = \"counter-selected\";\n fixUnselected(counterContainers, currentlySelected);\n }\n }\n var turretLabel = document.createElement('div');\n turretLabel.className = \"label\";\n turretLabel.innerHTML = \"Turret: \";\n turretContainer.appendChild(turretLabel);\n var turretCount = document.createElement('div');\n turretCount.id = \"turret-count\";\n turretCount.innerHTML = TURRET_SUPPLY;\n turretContainer.appendChild(turretCount);\n typeSelector.appendChild(turretContainer);\n counterContainers.push(turretContainer);\n\n // cannon\n var cannonContainer = document.createElement('div');\n cannonContainer.className = \"counter\";\n cannonContainer.onclick = function() {\n if (placeable[CANNON_TYPE] > 0) {\n currentlySelected = CANNON_TYPE;\n cannonContainer.className = \"counter-selected\";\n fixUnselected(counterContainers, currentlySelected);\n }\n }\n var cannonLabel = document.createElement('div');\n cannonLabel.className = \"label\";\n cannonLabel.innerHTML = \"Cannon: \";\n cannonContainer.appendChild(cannonLabel);\n var cannonCount = document.createElement('div');\n cannonCount.id = \"cannon-count\";\n cannonCount.innerHTML = CANNON_SUPPLY;\n cannonContainer.appendChild(cannonCount);\n typeSelector.appendChild(cannonContainer);\n counterContainers.push(cannonContainer);\n\n midParent.appendChild(typeSelector);\n\n // Grid that will have sub blocks to click in / off\n var gridParent = document.createElement('div');\n gridParent.className = \"grid-container\";\n gridParent.id = 'gridboard';\n\n for (let i = 0; i < BLOCK_COUNT; i++) {\n var gridObject = document.createElement('div');\n gridObject.className = \"unselected-grid-item\";\n gridObject.id = i; // so we can know where it is\n\n gridObject.onclick = function() {\n id = parseInt(this.id); // kinda annoying but whatever\n\n if (blockLocations[id] >= 0) { // it has already been selected\n this.className = \"unselected-grid-item\";\n this.innerHTML = \"\";\n var orderNumber = blockLocations[id];\n placeable[blockType[orderNumber]]++;\n blockOrder[orderNumber] = NaN;\n blockType[orderNumber] = NaN;\n updateBlockOrder(blockLocations[id], blockOrder, blockType, blockLocations);\n blockLocations[id] = NaN;\n highestBlockIndex--;\n updateCounterNumbers(placeable);\n } else if (placeable[currentlySelected] > 0) {\n this.className = counterClassNames[currentlySelected];\n var orderNumber = highestBlockIndex;\n highestBlockIndex++;\n blockLocations[id] = orderNumber;\n blockType[orderNumber] = currentlySelected;\n blockOrder[orderNumber] = id;\n this.innerHTML = orderNumber;\n placeable[blockType[orderNumber]]--;\n updateCounterNumbers(placeable);\n } else {\n alert(\"You can't place any more of those block types!\");\n }\n }\n \n gridParent.appendChild(gridObject);\n }\n\n midParent.appendChild(gridParent); // add our grid in\n\n // spacing\n var spacing = document.createElement('div');\n spacing.className = \"spacingMid\";\n midParent.appendChild(spacing);\n\n topLevel.appendChild(midParent);\n\n\n // Parent element for input, spawn block\n var bottomParent = document.createElement('div');\n bottomParent.className = \"spawnParent\";\n topLevel.appendChild(bottomParent);\n\n // add in a spawn block location for clarity\n var spawn = document.createElement('div');\n spawn.className = \"spawnBlock\";\n var text = document.createElement('div');\n text.innerHTML = \"Spawn\";\n spawn.appendChild(text);\n bottomParent.appendChild(spawn);\n\n // spacing\n var spacing = document.createElement('div');\n spacing.className = \"spacing\";\n bottomParent.appendChild(spacing);\n\n // Continue button\n var onwards = document.createElement('INPUT');\n onwards.type = 'button';\n if (p1) {\n onwards.value='Continue';\n } else {\n onwards.value='Begin';\n }\n onwards.id = \"continue-button\";\n onwards.className = \"fancyButton\";\n\n onwards.onclick = function() {\n $(\"#build_main\").remove();\n if (p1) {\n buildBoard(p2BlockOrder, p2BlockType, false);\n } else {\n mainGame();\n }\n };\n\n bottomParent.appendChild(onwards);\n\n document.body.appendChild(topLevel);\n}", "enableBlocks() {\n\t\t// Get a reference to this fretboard's pattern area\n\t\tvar patterns = document.querySelector(this.bodyID + ' .patterns');\n\t\t/**\n\t\t * Loop through all of the block buttons associated with this board.\n\t\t * Add each block's image to this freboards' patterns area and add a \n\t\t * click listener that allows each block button to active its' \n\t\t * associated image.\n\t\t */\n\t\tfor(var i = 0; i < this.blocks.length; i++) {\n\t\t\t// Add each image to the fretboard patterns\n\t\t\tvar scalePattern = document.createElement('img');\n\t\t\tscalePattern.src = this.blocks[i];\n\t\t\tpatterns.appendChild(scalePattern);\n\t\t\tscalePattern.style.display = 'none';\n\n\t\t\t// Create a button and add to the controls area\n\t\t\tvar btn = document.createElement('button');\n\t\t\tbtn.id = 'block' + (i + 1);\n\t\t\tbtn.setAttribute('class', 'btn block');\n\t\t\tbtn.innerHTML = 'block ' + (i + 1);\n\t\t\tvar controls = document.querySelector(this.bodyID + ' .controls');\n\t\t\tcontrols.appendChild(btn);\n\n\t\t\t// Add click listener to set image per block clicked\n\t\t\tvar blockBtn = document.querySelector(this.blocks[i].bodyID);\n\t\t\tvar _this = this;\n\t\t\tbtn.addEventListener('click', function(e) {\n\t\t\t\t_this.activateBlock(_this, e);\n\t\t\t}, false);\n\t\t}\n\t}", "printBoard() {\n // This will print the board\n let grid = [...this.grid];\n \n // Loop through the values in the grid and set the tiles appropriately\n // Pass in the values to set its color in setTile()\n for (let i = 0; i < grid.length; i++) {\n for (let j = 0; j < grid.length; j++) { \n if(grid[i][j] === 0){\n // If grid tile === 0\n if((i===0 && (j===1 || j===2)) ){\n // If one of the two middle top tiles pressed\n this.setTile(this.boardDisplay, this.blockWidth, i, j, true, this.grid, grid[i][j],'UP')\n } else if ((i === 3 && (j === 1 || j === 2))){\n // If one of the two bottom tiles pressed\n this.setTile(this.boardDisplay, this.blockWidth, i, j, true, this.grid, grid[i][j],\"DOWN\");\n } else if ((j === 0 && (i === 1 || i === 2))) {\n // If one of the two left tiles pressed\n this.setTile(this.boardDisplay, this.blockWidth, i, j, true, this.grid, grid[i][j], \"LEFT\");\n } else if ((j === 3 && (i === 1 || i === 2))) {\n // If one of the two right tiles pressed\n this.setTile(this.boardDisplay, this.blockWidth, i, j, true, this.grid, grid[i][j], \"RIGHT\");\n }else{\n this.setTile(this.boardDisplay, this.blockWidth, i, j, true, this.grid, grid[i][j]);\n }\n \n }else{\n // If doesnt equal 0 then place value in rect\n\n if ((i === 0 && (j === 1 || j === 2))) {\n // If one of the two middle top tiles pressed\n this.setTile(this.boardDisplay, this.blockWidth, i, j, false, this.grid, grid[i][j], 'UP')\n } else if ((i === 3 && (j === 1 || j === 2))) {\n // If one of the two bottom tiles pressed\n this.setTile(this.boardDisplay, this.blockWidth, i, j, false, this.grid, grid[i][j], \"DOWN\");\n } else if ((j === 0 && (i === 1 || i === 2))) {\n // If one of the two left tiles pressed\n this.setTile(this.boardDisplay, this.blockWidth, i, j, false, this.grid, grid[i][j], \"LEFT\");\n } else if ((j === 3 && (i === 1 || i === 2))) {\n // If one of the two right tiles pressed\n this.setTile(this.boardDisplay, this.blockWidth, i, j, false, this.grid, grid[i][j], \"RIGHT\");\n } else {\n this.setTile(this.boardDisplay, this.blockWidth, i, j, false, this.grid, grid[i][j]);\n }\n } \n }\n }\n if(!this.printedBoard){\n // Displays the elements only needed to be set once (SCORE BANNER)\n this.scoresControlsContainer.append('div').attr('id', 'score-banner');\n d3.select('#score-banner').append('h3').text('SCORE');\n d3.select('#score-banner').append('p').attr('id','score-value'); // Shows score, changed in printBoard()\n this.printedBoard = true; // Prevent this if block from being printed again (unless new game)\n }\n // Change the score display to the current score\n d3.select('#score-value').text(this.score+\"\")\n\n\n\n }", "function testAddBlock()\n\t{\n\t\t// addBlock(0, 0, color, id)\n\t\taddBlock(0,0, 0x00ff80, 0);\n\t\taddBlock(0,0, 0x00ff80, 1);\n\t\taddBlock(15,15, 0x000000, 2);\n\t\taddBlock(15,15, 0xffffff, 6);\n\t\taddBlock(15,15, 0x000000, 2);\n\t\taddBlock(15,15, 0xffffff, 6);\n\t\taddBlock(15,15, 0x000000, 2);\n\t\taddBlock(15,15, 0xffffff, 6);\n\t\taddBlock(15,15, 0x000000, 2);\n\t\taddBlock(15,15, 0xffffff, 6);\n\t\taddBlock(15,15, 0x000000, 2);\n\t\taddBlock(15,15, 0xffffff, 6);\n\t\taddBlock(15,15, 0x000000, 2);\n\t\taddBlock(15,15, 0xffffff, 6);\n\t\taddBlock(15,15, 0x000000, 2);\n\t\taddBlock(15,15, 0xffffff, 6);\n\t\taddBlock(15,15, 0x000000, 2);\n\t\taddBlock(15,15, 0xffffff, 6);\n\t\taddBlock(15,15, 0x000000, 2);\n\t\taddBlock(15,15, 0xffffff, 6);\n\t\taddBlock(15,15, 0x000000, 2);\n\t\taddBlock(15,15, 0xffffff, 6);\n\t\taddBlock(15,15, 0xffffff, 6);\n\n\t\taddBlock(0,0, 0x00ff80, 3);\n\t\taddBlock(0,0, 0x00ff80, 4);\n\t}", "function initBlock() {\n for(let i = 0; i < 40; i++) {\n blocks.push([]);\n for(let j = 0; j < 40; j++) {\n blocks[i][j] = 0;\n }\n }\n}", "get blocks() {\n //return DATA[this.id][this.orientation];\n return Shape.TETROMINOS[this.id][this.orientation];\n }", "buildBlockGrid() {\n this.grid = [];\n for (let y = 0; y < this.blockCountY; y++) {\n let locY = (this.blockHeight + this.YOffSet) * y;\n for (let x = 0; x < this.blockCountX; x++) {\n let locX = (this.blockWidth + this.XOffSet) * x;\n let newBlock = new GameBlock(x, y, locX, locY);\n this.grid.push(newBlock);\n }\n }\n // TODO: make this private?\n // User getter / setter?\n return this.grid\n }", "function drawMaze() {\n for( var i = 0; i < cols; i++ ) {\n for( var j = 0; j < rows; j++ ) {\n /*\n switch( maze[i][j] ) {\n case 0: ctx.fillStyle = \"black\"; break;\n case 1: ctx.fillStyle = \"gray\"; break;\n case 2: ctx.fillStyle = \"red\"; break;\n case 3: ctx.fillStyle = \"yellow\"; break;\n case 4: ctx.fillStyle = \"#500000\"; break;\n case 8: ctx.fillStyle = \"blue\"; break;\n }\n ctx.fillRect( grid * i, grid * j, grid, grid );\n ctx.strokeStyle = ctx.fillStyle;\n ctx.strokeRect( grid * i, grid * i, grid, grid );*/\n drawBlock(i,j,maze[i][j]);\n }\n }\n}", "mazeWithVerticalWalls(grid){\n for (let row = 0; row < 23; row++) {\n for (let col = 0; col < 57; col++) {\n if(((row===0 || col===0)||(row===22 || col===56))&&(grid[row][col].isWall===false)){\n const newGrid = getNewGridWithWallToggled(this.state.grid, row, col);\n this.setState({grid: newGrid, mouseIsPressed: false});\n }\n }\n }\n for (let col = 2; col < 55; col+=2){\n let row=1\n while(row<22) {\n let x=Math.ceil((22-row)*Math.random());\n if (x===21){\n x--;\n }\n while(x>0){\n const newGrid = getNewGridWithWallToggled(this.state.grid, row, col);\n this.setState({grid: newGrid, mouseIsPressed: false});\n row++;\n x--;\n }\n row++;\n }\n }\n }", "function Terrain_Square(x,y,w,h,type,which_sprite_array,name_of_sprite_sheet){\n\n\t//note: kinda needed the width and height of a block before any were defined. \n\t//so thats why I made the static variables. besides, a block shouldn't change \n\t//in size. \n\tthis.tb_w = Terrain_Block.w;\n\tthis.tb_h = Terrain_Block.h;\n\n\t//note: each terrain block is 10 by 10. in order to make sure that no terrain_square\n\t//is either too big or too small to be properly filled with terrain_blocks, we are\n\t//doing this rounding. \n\n\t//this is the ACTUAL width of the ts \n\tthis.w = Math.round(w/this.tb_w) * this.tb_w;\n\tthis.h = Math.round(h/this.tb_h) * this.tb_h;\n\n\t//this is the ACTUAL width of the ts \n\t// this.w = w * this.tb_w;\n\t// this.h = h * this.tb_h;\t\n\n\t//this represents where this ts is in the array \n\tthis.array_loc_x = x;\n\tthis.array_loc_y = y;\n\n\t//this represents the number of terrain blocks wide this terrain square is. \n\tthis.array_w = Math.round(w/this.tb_w);\n\tthis.array_h = Math.round(h/this.tb_h);\n\n\t// //this represents where this terrain square REALLy goes on the canvas\n\t// this.x = x * this.w;\n\t// this.y = y * this.h; \n\n\t//this represents where this terrain square REALLy goes on the canvas\n\tthis.x = x * Terrain_Block.w;\n\tthis.y = y * Terrain_Block.h; \n\n\t// console.log(\"this.x is: \" + this.x);\n\t// console.log(\"this.y is: \" + this.y);\n\n\t//dont need instance here (could have used Terrain_Square.ts_w) but this is simpler. \n\n\t//terrain block count wide. aka how many terrain blocks across in this terrain square\n\tthis.tb_c_w = this.w / this.tb_w;\n\n\t//terrain block count high. aka how many terrain blocks down/vertically in this terrain square\n\tthis.tb_c_h = this.h / this.tb_h;\n\n\n\t//for iterating through the array. \n\tthis.x_end_at = this.array_loc_x + this.tb_c_w;\n\tthis.y_end_at = this.array_loc_y + this.tb_c_h;\n\n\t// console.log(\"Terrain_Block.w is: \" + Terrain_Block.w);\n\n\t// console.log(\"this.ts_w is: \" + this.ts_w);\n\t// console.log(\"this.ts_h is: \" + this.ts_h);\n\n\t//console.log(\"1which_sprite_array is: \" + which_sprite_array);\n\t\n\t//so that these 4 values dont need to be calculated over and over again. \n\tthis.ulc_x = this.x;\n\tthis.urc_x = this.x + this.w;\n\tthis.ulc_y = this.y;\n\tthis.llc_y = this.y + this.h;\n\n\tthis.contains_mouse = false;\n\tthis.color = \"black\";\n\tthis.type = type; //can it be walked on.\n\n\tif(this.type == 0){\n\t\tthis.color = \"yellow\";\n\t}\n\telse if(this.type == 1){\n\t\tthis.color = \"red\";\n\t}\n\n\tthis.sprite_sheet = document.getElementById(name_of_sprite_sheet);\n\n\tthis.ssi = new SSI();\n\n\tthis.loc_of_image_x = which_sprite_array[0];\n\tthis.loc_of_image_y = which_sprite_array[1];\n\n\tthis.ssi.set_x_y_w_h_dw_and_dh(which_sprite_array[0],\n\t\t\t\t\t\t\t\t which_sprite_array[1],\n\t\t\t\t\t\t\t\t which_sprite_array[2],\n\t\t\t\t\t\t\t\t which_sprite_array[3],\n\t\t\t\t\t\t\t\t this.w,\n\t\t\t\t\t\t\t\t this.h\n\t\t\t\t\t\t\t\t );\n\n\n\n\t//terrain block array. Holds what parts of the items can be walked over/behind (0)\n\t//and what parts can't (1)\n\tthis.tba = [];\n\tthis.ascii_tba = [];\n\n\tvar start_at_x = this.array_loc_x;\n\tvar stop_at_x = this.array_loc_x + this.tb_c_w;\n\tvar start_at_y = this.array_loc_y;\n\tvar stop_at_y = this.array_loc_y + this.tb_c_h;\n\n\t// var test_x = 0;\n\t// var test_y = 0;\n\n\tfor(var x = start_at_x; x < stop_at_x; x++){\n\n\t\tthis.ascii_tba[x] = [];\n\t\tthis.tba[x] = [];\n\t\t// console.log(\"test_x is: \" + test_x);\n\t\t// console.log(\"here, x is: \" + x);\n\t\tfor(var y = start_at_y; y < stop_at_y; y++){\n\n\t\t\tvar tb_loc_x = x * this.tb_w;\n\t\t\tvar tb_loc_y = y * this.tb_h;\n\n\t\t\t// console.log(\"test_y is: \" + test_y);\n\t\t\t// console.log(\"here, y is: \" + y);\n\t\t\t// console.log(\"tb_loc_x is: \" + tb_loc_x);\n\t\t\t// console.log(\"tb_loc_y is: \" + tb_loc_y);\n\n\t\t\tthis.tba[x][y] = new Terrain_Block(tb_loc_x,tb_loc_y,type);\n\n\t\t\t//the 'x - start_at_x' i *know* is bad. \n\t\t\tvar image_chunk_x = (x - start_at_x) * this.loc_of_image_x;\n\t\t\tvar image_chunk_y = (y - start_at_y) * this.loc_of_image_y;\n\n\t\t\t//each tb already knows how much of the image it needs (it's own width)\n\t\t\t//but now it also knows which section of the image from the sprite sheet\n\t\t\t//source is needed. \n\t\t\tthis.tba[x][y].set_image_xy_chunks(image_chunk_x,image_chunk_y);\n\n\t\t\tthis.ascii_tba[x][y] = type;\n\n\t\t\t//test_y++;\n\t\t}\n\n\t\t// test_x++;\n\n\t\t// test_y = 0;\n\n\t\t//console.log(\"-----------\");\n\n\t}\n\n\t\n\n}", "_displayBlocks() { /////////////////////\n return (\n <ViroNode>\n {this._makeBlocks()}\n </ViroNode>\n )\n }", "function customBlocks() {\n\t\t\t\tBlockly.Blocks.fw = {\n\t\t\t\t \tinit: function() {\n\t\t\t\t\t\tthis.appendDummyInput()\n\t\t\t\t\t\t\t.appendField(new Blockly.FieldImage(\n\t\t\t\t\t\t\t\t'../../img/blockly-forwards.png', common.imageSize, common.imageSize));\n\t\t\t\t\t\tthis.setPreviousStatement(true);\n\t \t\t\t\tthis.setNextStatement(true);\n\t\t\t\t\t this.setColour(common.blockColour);\n\t\t\t\t \t},\n\t\t\t\t\tonchange: function(ev) {\n\t\t\t\t\t\tvm.current = 'fw';\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tBlockly.Blocks.rr = {\n\t\t\t\t \tinit: function() {\n\t\t\t\t\t \tthis.appendDummyInput()\n\t\t\t\t\t\t\t.appendField(new Blockly.FieldImage(\n\t\t\t\t\t\t\t\t'../../img/blockly-rotateright.png', common.imageSize, common.imageSize));\n \t\t\t\t\t\tthis.setPreviousStatement(true);\n \t\t\t\t\t\tthis.setNextStatement(true);\n\t\t\t\t\t\tthis.setColour(common.blockColour);\n\t\t\t\t \t},\n\t\t\t\t\tonchange: function(ev) {\n\t\t\t\t\t\tvm.current = 'rr';\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tBlockly.Blocks.rl = {\n\t\t\t\t \tinit: function() {\n\t\t\t\t\t \tthis.appendDummyInput()\n\t\t\t\t\t\t\t.appendField(new Blockly.FieldImage(\n\t\t\t\t\t\t\t\t'../../img/blockly-rotateleft.png', common.imageSize, common.imageSize));\n \t\t\t\t\t\tthis.setPreviousStatement(true);\n \t\t\t\t\t\tthis.setNextStatement(true);\n\t\t\t\t\t\tthis.setColour(common.blockColour);\n\t\t\t\t \t},\n\t\t\t\t\tonchange: function(ev) {\n\t\t\t\t\t\tvm.current = 'rl';\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tBlockly.Blocks.lt = {\n\t\t\t\t \tinit: function() {\n\t\t\t\t\t \tthis.appendDummyInput()\n\t\t\t\t\t\t\t.appendField(new Blockly.FieldImage(\n\t\t\t\t\t\t\t\t'../../img/blockly-lightbulb.png', common.imageSize, common.imageSize));\n \t\t\t\t\t\tthis.setPreviousStatement(true);\n \t\t\t\t\t\tthis.setNextStatement(true);\n\t\t\t\t\t\tthis.setColour(common.blockColour);\n\t\t\t\t \t},\n\t\t\t\t\tonchange: function(ev) {\n\t\t\t\t\t\tvm.current = 'lt';\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tBlockly.Blocks.start = {\n\t\t\t\t\tinit: function() {\n\t\t\t\t\t\tthis.appendDummyInput()\n\t\t\t\t\t\t\t.appendField(new Blockly.FieldImage(\n\t\t\t\t\t\t\t\t'../../img/play-button.png', common.imageSize, common.imageSize));\n\t\t\t\t\t\tthis.setPreviousStatement(false);\n\t\t\t\t\t\tthis.setNextStatement(true);\n\t\t\t\t\t\tthis.setColour(65);\n\t\t\t\t\t\tthis.isTopLevel = true;\n\t\t\t\t\t\tthis.setDeletable(false);\n\t\t\t\t\t},\n\t\t\t\t\tonchange: function(ev) {\n\t\t\t\t\t\tvm.current = 'start';\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "function show_block(scene, rectangle, items, algo = pivot_algo) {\n let height = 1;\n let y = -5;\n\n base = show_box(scene, rectangle, height, y, 'red');\n child_rectangles = algo(rectangle, {x:0, z:0}, items);\n let current_col = 0;\n child_rectangles.map(function (rect) {\n current_col = (current_col + 1) % colors.length;\n show_box(base, rect, height, 1, colors[current_col]);\n });\n}", "function randomBlocks(blocks) {\n for(blocks; blocks > 0; blocks--) {\n var row = randomNum(2, App.rows - 5); // Nothing on the top row or bottom 5.\n var col = randomNum(1, App.columns);\n\n var box = $('.row' + row + '.column' + col);\n\n // Ensure unique spawns.\n if(box.attr('block') || box.attr('snake')) {\n blocks += 1;\n continue;\n } else {\n box\n .addClass('block')\n .attr('block', 'true');\n }\n }\n\n App.generated = true;\n}", "function setup() {\n frameRate(10);\n \n var cvn = createCanvas(SizeW,SizeH);\n cvn.parent(\"sketch-holder\");\n \nvar NumBlocksX = (floor(SizeW/blockX));\nvar NumBlocksY = (floor(SizeH/blockY)) ;\n total = (NumBlocksX * NumBlocksY) -1;\n\n\n //this loop is for creating the tiles\n for(var i = 0; i<=total; i++){\n tile.push(new Tile());\n tile[i].selectColor(i);\n \n }\n setTilePositions(tile,NumBlocksX,NumBlocksY);\n \n \n // flipRing(2,tile,224,tile[224].x,tile[224].y,NumBlocksX,NumBlocksY);\n setRings(numRings);\n \n}", "function insertBlocks(block, offset){\n block.forEach((row,y)=>{\n row.forEach((value,x)=>{\n if(value!=0){\n context.fillStyle = colors[value];\n context.fillRect(x + offset.x,\n y + offset.y,\n 1,1);\n }\n });\n });\n}", "function blockify(piece) {\n\t\tpiece.shape.moveTo(blockHeap);\n\t\t\n\t\t/*\n\t\tTODO: will have to use a 2d array as trying to use .getIntersections for each tile is not performant enough\n\t\t\n\t\t*/\n\t\t\n\t\tfor (var i = 0, len = tetrjs.config.board.height; i<len; i++) {\n\t\t\tfor (var j = 0, len2 = tetrjs.config.board.width; j<len; j++) {\n\t\t\t\tvar x = (j * tetrjs.config.board.blockSize) + tetrjs.config.board.blockSize/2;\n\t\t\t\tvar y = (i * tetrjs.config.board.blockSize) + tetrjs.config.board.blockSize/2;\n\t\t\t\tvar ints = tetrjs.game.getBlockHeap().getIntersections(x,y);\n\t\t\t\tfor (var k = 0; k < ints.length; k++) {\n\t\t\t\t\t//console.log(\"intersects\", ints[k].getAbsolutePosition());\n\t\t\t\t\t/*_layer.add( new Kinetic.Rect({\n\t\t\t\t\t\tx: x,\n\t\t\t\t\t\ty: y,\n\t\t\t\t\t\twidth: 1,\n\t\t\t\t\t\theight: 1,\n\t\t\t\t\t\tstroke: \"red\",\n\t\t\t\t\t\tstrokeWidth:1,\n\t\t\t\t\t\tdetectionType: \"path\"\n\t\t\t\t\t}) );*/\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcurrentShape = null;\n\t}", "function drawInfectedBlock(grid, row, col) {\r\n for (var i = row; i <= row + 1; i += 1) {\r\n for (var j = col; j <= col + 1; j += 1) {\r\n drawInfectedPoint(grid, i, j);\r\n } \r\n }\r\n }", "foreach(fct) {\n let action = (x, y) => fct(x, y);\n for (let i = 0; i < this.blocks.length; i++) {\n action(this.x + this.blocks[i].x, this.y + this.blocks[i].y);\n }\n }", "function drawBlock(block){\n ctx.fillStyle = 'black';\n // ctx.fillRect(\n // (block.x - block.width/2) + objOffsetX,\n // (block.y - block.height/2) + objOffsetY,\n // block.width,\n // block.height\n // );\n //ADD OTHER IMAGE FUNCTIONALITY\n ctx.drawImage(\n grassBlock,\n (block.x - block.width/2) + objOffsetX,\n (block.y - block.height/2) + objOffsetY,\n block.width,\n block.height\n );\n}", "function loadBlocksInObjectGrid(){\n console.log(\"Map has been loaded\");\n for(var y=0; y<15 ; y++){\n for(var x=0; x<17 ; x++){\n if( objectGrid[y][x] == 1){\n var newBlock = new destructibleBlock(x,y);\n } \n }\n }\n}", "function drawAllBlocksToPlayArea(ctx) {\n\n // go thru the blocks one by one in playerLevelEnvironment.listOfBlocksInThePlayingArea\n for (let i = 0; i < playerLevelEnvironment.listOfBlocksInThePlayingArea.length; i++) {\n\n // draw the block\n const xModifierInSquares = playerLevelEnvironment.listOfBlocksInThePlayingArea[i].blockX;\n const yModifierInSquares = playerLevelEnvironment.listOfBlocksInThePlayingArea[i].blockY + 1;\n const yModifierInPixels = 0;\n const drawEmptyLines = true;\n const blockMapToDraw = playerLevelEnvironment.listOfBlocksInThePlayingArea[i].blockMap;\n const blockToDrawColor = colorRelated.getBlockColor(playerLevelEnvironment.listOfBlocksInThePlayingArea[i].blockIndex);\n drawBlock.drawBlock(ctx, blockMapToDraw, blockToDrawColor, xModifierInSquares, yModifierInSquares, yModifierInPixels, drawEmptyLines, playerLevelEnvironment.playAreaMode, playerLevelEnvironment.fullLines, playerLevelEnvironment.gameEndFadeAnimationCounter, gameLevelEnvironment.gameEndFadeAnimationLength, playerLevelEnvironment.fullLineFadeAnimationCounter, gameLevelEnvironment.fullLineFadeAnimationLength);\n\n }\n }", "function Tetris() {\n this.reset();\n}", "function drawBlocks(arr) {\n for (var i = 0; i < arr.length; i++) {\n context.fillStyle = arr[i].color;\n context.fillRect(arr[i].x, arr[i].y, arr[i].size, arr[i].size);\n }\n}", "function block(x, y, width, height, blockCode, isVoid)\n{\n\tthis.isVoid = isVoid;\n\tthis.x = ((x * blockWidth) + ((x + 1) * blockSpacing));\n\tthis.y = ((y * blockHeight) + ((y + 1) * blockSpacing) + CANVAS_Y_OFFSET);\n\tthis.width = width;\n\tthis.height = height;\n}", "function hBlockCheck(){\n const tRowTest = game1.toprow.filter(element => element === \"X\");\n const mRowTest = game1.midrow.filter(element => element === \"X\");\n const bRowTest = game1.botrow.filter(element => element === \"X\");\n if (tRowTest.length === 2 && !game1.toprow.includes(\"O\")){\n const place = game1.toprow.findIndex(empty => empty != \"X\");\n switch (place){\n case 0:\n maybePlace(\"NW\");\n break;\n case 1:\n maybePlace(\"NC\");\n break;\n case -1:\n maybePlace(\"NE\");\n break;\n default:\n console.log(\"Something broke!\");\n break;\n }\n } else if (mRowTest.length === 2 && !game1.midrow.includes(\"O\")){\n const place = game1.midrow.findIndex(empty => empty != \"X\");\n switch (place){\n case 0:\n maybePlace(\"CW\");\n break;\n case 1:\n maybePlace(\"CC\");\n break;\n case -1:\n maybePlace(\"CE\");\n break;\n default:\n console.log(\"Something broke!\");\n break;\n }\n } else if (bRowTest.length === 2 && !game1.botrow.includes(\"O\")) {\n const place = game1.botrow.findIndex(empty => empty != \"X\");\n switch (place){\n case 0:\n maybePlace(\"SW\");\n break;\n case 1:\n maybePlace(\"SC\");\n break;\n case -1:\n maybePlace(\"SE\");\n break;\n default:\n console.log(\"Something broke!\");\n break;\n }\n } else {\n vBlockCheck();\n }\n}", "function eachblock(type, x, y, dir, fn) {\n var bit, result, row = 0, col = 0, blocks = type.blocks[dir];\n for(bit = 0x8000 ; bit > 0 ; bit = bit >> 1) {\n if (blocks & bit) {\n fn(x + col, y + row);\n }\n if (++col === 4) {\n col = 0;\n ++row;\n }\n }\n }", "function gridLayout(blocksNumbers) {\n contain.innerHTML = ''\n gameOver.innerHTML = ''\n\n // Generazione randomica della posizione delle bombe\n let bombs = genBombs(nSquares);\n console.log(bombs);\n\n const winCounter = safeSquares(blocksNumbers, bombs.length)\n console.log(winCounter);\n\n for (let n = 1; n <= blocksNumbers; n++) {\n const blockEl = document.createElement('div');\n blockEl.classList.add('square', 'purple');\n blockEl.innerHTML = n;\n contain.append(blockEl);\n\n blockEl.addEventListener('click', function () {\n const keySelected = Number(blockEl.innerText);\n\n const keyBomb = isBomb(bombs, keySelected);\n\n\n if (keyBomb) {\n /* blockEl.classList.remove('purple')\n blockEl.classList.add('crimson') */\n\n //Game over del gioco\n //svuotare la griglia\n contain.innerHTML = \"\"\n\n //creare un contenitore dove mettere la scritta che enuncia la sconfitta e aggiungo lo stile al contenitore\n const loseContainer = document.createElement('div');\n loseContainer.classList.add('loseContainer');\n\n // Inserisco nell'HTML il mio contenitore che enuncia la sconfitta \n gameOver.append(loseContainer)\n\n // La scritta effettiva che ti dice che hai perso\n loseContainer.innerHTML = `\n <h1>You hitted a <span>Bomb</span>! Try again! <span>Click</span> again on button for <span>Start</span> new Game</h1>\n `\n } else { // Se clicchi i quadrati senza le bombe, il quadratino diventa verde tramite la classe \"selected\"\n blockEl.classList.remove('purple')\n blockEl.classList.add('selected')\n }\n\n })\n }\n\n}", "function setupTavern() {\n\n//draw a grid\n//make objects of each area\n\n\n}", "buildCustomBlockGrid(blockImageArray, unplayableImage = 'images/water-block.png') {\n this.grid = [];\n blockImageArray;\n let imageCounter = 0;\n for (let y = 0; y < this.blockCountY; y++) {\n let locY = (this.blockHeight + this.YOffSet) * y;\n for (let x = 0; x < this.blockCountX; x++) {\n let isPlayable = true;\n let image = blockImageArray[imageCounter];\n if (image == unplayableImage) {\n isPlayable = false;\n }\n let locX = (this.blockWidth + this.XOffSet) * x;\n let newBlock = new GameBlock(x, y, locX, locY, image, isPlayable);\n this.grid.push(newBlock);\n imageCounter++;\n }\n }\n return this.grid;\n }", "function spawnBlocks(){\r\n if(frameCount%150===0){\r\n var r = Math.round(random(400,300));\r\n var block = createSprite(1500,r,200,160);\r\n block.scale = 0.4;\r\n block.setCollider(\"rectangle\",0,-80,470,180);\r\n block.velocityX = -3;\r\n var rand = Math.round(random(1,2));\r\n switch(rand){\r\n case 1: block.addImage(chocblock);\r\n break;\r\n case 2: block.addImage(strawblock);\r\n break;\r\n default:break;\r\n }\r\n blockGroup.add(block);\r\n //block.debug = true;\r\n }\r\n}", "function swapBlocks(){\n var tmp = 0;\n tmp = startRow;\n startRow = endRow;\n endRow = tmp;\n\n tmp = startCol;\n startCol = endCol;\n endCol = tmp;\n}", "function draw() {\n console.log(level)\n ctx.drawImage(ground, 0,0);\n if (level != \"easy\") {\n setBlocks_med()\n }\n for (var i = 0; i < snake.length; i++) {\n if(i==0){\n ctx.beginPath();\n ctx.fillStyle = 'green'; \n ctx.arc(snake[i].x+16,snake[i].y+16,(box)/2, 0, Math.PI * 2, false);\n ctx.moveTo(snake[i].x+11.5,snake[i].y+12);\n ctx.arc(snake[i].x+11,snake[i].y+12, 5, 0, Math.PI * 2, true); // Left eye\n ctx.moveTo(snake[i].x+24.5,snake[i].y+12);\n ctx.arc(snake[i].x+24,snake[i].y+12, 5, 0, Math.PI * 2, true);\n ctx.fill();\n ctx.strokeStyle=\"red\";\n ctx.stroke();\n ctx.closePath();\n \n }\n else if(i>0 && i<snake.length-3){\n ctx.beginPath();\n ctx.fillStyle = 'green'; \n ctx.arc(snake[i].x+16,snake[i].y+16,(box-3)/2, 0, Math.PI * 2, false);\n ctx.fill();\n ctx.strokeStyle=\"red\";\n ctx.stroke();\n ctx.closePath();\n }\n else if(i>snake.length-3 && i<snake.length-1){\n ctx.beginPath();\n ctx.fillStyle = 'green'; \n ctx.arc(snake[i].x+16,snake[i].y+16,(box-5)/2, 0, Math.PI * 2, false);\n ctx.fill();\n ctx.strokeStyle=\"red\";\n ctx.stroke();\n ctx.closePath();\n }\n else{\n ctx.beginPath();\n ctx.fillStyle = 'green'; \n ctx.arc(snake[i].x+16,snake[i].y+16,(box-8)/2, 0, Math.PI * 2, false);\n ctx.fill();\n ctx.strokeStyle=\"red\";\n ctx.stroke();\n ctx.closePath();\n }\n \n }\n\n ctx.drawImage(foodImg, food.x, food.y);\n\n // old head position\n var snakeX = snake[0].x;\n var snakeY = snake[0].y;\n\n // which direction\n if (d == \"LEFT\" && snakeX < box * 2 && level !=\"hard\") {\n snakeX = box * 17;\n } else {\n if (d == \"LEFT\") snakeX -= box;\n }\n if (d == \"UP\" && snakeY < 4 * box && level !=\"hard\") {\n snakeY = box * 17\n } else {\n if (d == \"UP\") snakeY -= box;\n }\n if (d == \"RIGHT\" && snakeX > 16 * box && level !=\"hard\") {\n snakeX = box * 1;\n } else {\n if (d == \"RIGHT\") snakeX += box;\n }\n if (d == \"DOWN\" && snakeY > 16 * box && level !=\"hard\") {\n snakeY = 3 * box\n } else {\n if (d == \"DOWN\") snakeY += box;\n }\n\n\n // if the snake eats the food\n if (snakeX == food.x && snakeY == food.y) {\n score++;\n eat.play();\n setFoodImage()\n if (score % 3 == 0) {\n speed -= 5;\n clearInterval(game)\n IncreaseSpeed();\n }\n if (level == \"easy\") {\n createFood_easy()\n }\n else{\n createFood()\n }\n \n // I don't remove the tail\n } else {\n // remove the tail\n snake.pop();\n }\n\n // add new Head\n\n var newHead = {\n x: snakeX,\n y: snakeY\n }\n\n // game over \n if (collision(newHead, snake)) {\n clearInterval(game);\n dead.play();\n setTimeout(function () {\n ctx.drawImage(ground, 0, 0);\n ctx.font = \"100px Comic Sans MS\";\n ctx.fillStyle = \"mediumvioletred\";\n // ctx.textAlign = \"center\";\n ctx.fillText(\"Game Over\", canvas.width / 11.4, canvas.height / 1.7);\n // canvas.setAttribute('style', 'display:none')\n div.setAttribute('style', 'display:block')\n // replayDiv.setAttribute('style', 'display:block')\n }, 2000)\n }\n snake.unshift(newHead);\n ctx.fillStyle = \"white\";\n ctx.font = \"45px Changa one\";\n ctx.fillText(score, 2*box,1.6*box);\n flag = false\n}" ]
[ "0.7070012", "0.69896775", "0.6888118", "0.6872745", "0.6872267", "0.6835983", "0.6797661", "0.6775655", "0.6736805", "0.6715255", "0.6683792", "0.66574556", "0.6583374", "0.65765184", "0.65594935", "0.654928", "0.650711", "0.6506277", "0.64943504", "0.6468478", "0.64493924", "0.6437833", "0.6406267", "0.639583", "0.6389812", "0.63762426", "0.6374422", "0.63368523", "0.63368523", "0.63265944", "0.6296148", "0.62943226", "0.6293061", "0.62835497", "0.6283242", "0.6275516", "0.62754124", "0.627529", "0.62710565", "0.62668455", "0.6265104", "0.62561935", "0.6241074", "0.623917", "0.6234791", "0.6232226", "0.6232171", "0.6226958", "0.62234265", "0.6213327", "0.6212244", "0.61996245", "0.61841536", "0.61790794", "0.6173826", "0.6165076", "0.61628455", "0.61575097", "0.61521304", "0.61509204", "0.61496156", "0.6147099", "0.61426866", "0.61412376", "0.6122603", "0.6115478", "0.6099842", "0.609263", "0.60915667", "0.60905844", "0.6078453", "0.60717416", "0.60559314", "0.60506344", "0.60476154", "0.6043149", "0.6026238", "0.60087824", "0.60072565", "0.600453", "0.60023093", "0.59897655", "0.59894896", "0.5988503", "0.5988053", "0.5987828", "0.5987746", "0.59876907", "0.5977998", "0.59762096", "0.59718955", "0.59548813", "0.5952787", "0.59508765", "0.59418577", "0.593972", "0.59388816", "0.59253037", "0.5905807", "0.59037924" ]
0.6354987
27
LA FONCTION dessinerMonstre LA FONCTION PREND DEUX PARAMETRES: x et y
function dessinerMonstre (x,y) { // LE CORPS fill(0); ellipse(x,y,30,30); // LES YEUX fill(255); ellipse(x-8,y-5,10,10); ellipse(x+8,y-5,10,10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mursVdessin(tab, nx, pas){\r\n\tfor(i = 0; i < tab.length; ++i){\r\n\t\tcoord = mursVtoCoord(tab[i], nx);\r\n\t\t\r\n\t\tpu(); rt(90); fd(coord.x*pas);\r\n\t\trt(90); fd(coord.y*pas);\r\n\t\tpd(); fd(pas); pu();\r\n\t\tbk(pas); bk(coord.y*pas);\r\n\t\tlt(90); bk(coord.x*pas); lt(90);\r\n\t\tpd();\r\n\t}\r\n}", "getDistancia(x, xi, xf, y, yi, yf) {\n\n let dist;\n\n if (xf === xi) {\n let yu = yf;\n let yd = yi;\n\n if (y >= yu) {\n dist = Math.abs(Math.sqrt((xi - x) * (xi - x) + (yu - y) * (yu - y)));\n dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if (y <= yd) {\n dist = Math.abs(Math.sqrt((xi - x) * (xi - x) + (yd - y) * (yd - y)));\n dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if ((y > yd) && (y < yu)) {\n dist = Math.abs(xi - x);\n dist = dist * DEGREE_TO_METER\n return dist;\n }\n }\n\n if (yf === yi) {\n\n let xr;\n let xl;\n if (xf > xi) {\n xr = xf;\n xl = xi;\n } else {\n xr = xi;\n xl = xf;\n }\n if (x >= xr) {\n dist = Math.abs(Math.sqrt((x - xr) * (x - xr) + (yi - y) * (yi - y)));\n dist = dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if (x <= xl) {\n dist = Math.abs(Math.sqrt((x - xl) * (x - xl) + (yi - y) * (yi - y)));\n dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if ((x > xl) && (x < xr)) {\n dist = Math.abs(yi - y);\n dist = dist;\n return dist = Math.abs((yi - y) * DEGREE_TO_METER);\n }\n }\n\n let xr = xf;\n let yr = yf;\n let xl = xi;\n let yl = yi;\n\n let M = (yf - yi) / (xf - xi);\n let b = yi - M * xi;\n let bp = y + (1 / M) * x;\n let xs = (bp - b) / (M + 1 / M);\n let ys = b + M * xs;\n\n if (xs > xr) {\n dist = Math.abs(Math.sqrt((xr - x) * (xr - x) + (yr - y) * (yr - y)));\n } else {\n if (xs < xl) {\n dist = Math.abs(Math.sqrt((xl - x) * (xl - x) + (yl - y) * (yl - y)));\n } else {\n dist = Math.abs(Math.sqrt((xs - x) * (xs - x) + (ys - y) * (ys - y)));\n }\n }\n return dist = Math.abs(dist * DEGREE_TO_METER);\n }", "calculVitesseX(){\r\n //rajout de 1 facteur\r\n if (this.vitesseXFacteur < this.limiteFacteur){\r\n this.vitesseXFacteur +=1; // faire en fonction de la largeur du terrain\r\n }\r\n else {/*rien car la vitesse ne peux pas depasser la limite*/}\r\n }", "function calcularPendiente(){\n var y2 = 12;\n var y1 = 32;\n var x2 = 8;\n var x1 = 6;\n var resultado;\n\n //Fromula de calcular pendiente de una recta.\n // m=(y2-y1)/(x2-x1)\n console.log(\"Pendiente de una recta: \")\n console.log(resultado = (y2-y1)/(x2-x1));\n\n}", "calcFprime(x) {\n return ((x - this.fx) / (this.fy - this._d));\n }", "function findedge (l, p1 , p2) {\n var m = (p1[1] - p2[1])/(p1[0] - p2[0]);\n var b = p1[1] - m*p1[0];\n var y = l + p1[1];\n \n return [(y - b)/m, y];\n }", "dev2(p, l) {\r\n return Math.abs(parseFloat(p.y) - parseFloat(l.f(parseFloat(p.x))));\r\n }", "_distanciaPuntos(x1, x2, y1, y2) {\n let distancia = Math.sqrt(((x2-x1)**2) + ((y2-y1)**2));\n return distancia;\n }", "function misajour() {\n\t// affichage de l'équation dans la bulle informative. Elle est dynamique, elle se modifie si on bouge la courbe\n\tboard.on('update', function() {\n\t\tdocument.getElementById('equationEntree').innerHTML = \"y = \" + dynamiqueA() + 'x + ' + dynamiqueB();\n\t});\n\n\t// Affichage de deux points dynamiques qui servent à illustrer comment calculer la pente à partir de 2 points de la courbe\n\tboard.on('update', function() {\n\t\tdocument.getElementById('penteDeuxPoints').innerHTML = \"p1(\" + point1.X().toFixed(2) + \",\" + point1.Y().toFixed(2) + \")\" + \" et p2(\" + point2.X().toFixed(2) + \",\" + point2.Y().toFixed(2) + \")\";\n\t});\n\n\t// affichage dynamique de la pente de l'équation en se basant uniquement sur le paramètre a de l'équation entrée ou modifiée.\n\tboard.on('update', function() {\n\t\tdocument.getElementById('penteEquation').innerHTML = \"La pente = \" + dynamiqueA();\n\t});\n\n\t// Affichage dynamique du numérateur de la formule de calcul de la pente à partir de deux points\n\t// si le point 2 est négatif, le mettre entre parenthèses: ex. 5 - (-2)\n\tif (point2.Y() < 0) {\n\t\tdocument.getElementById('numerateur').innerHTML = point1.Y().toFixed() + \"-(\" + point2.Y().toFixed(2) + \")\";\n\t} else {\n\t\tdocument.getElementById('numerateur').innerHTML = point1.Y().toFixed() + \"-\" + point2.Y().toFixed(2);\n\t}\n\tboard.on('update', function() {\n\t\tif (point2.Y() < 0) {\n\t\t\tdocument.getElementById('numerateur').innerHTML = point1.Y().toFixed() + \"-(\" + point2.Y().toFixed(2) + \")\";\n\t\t} else {\n\t\t\tdocument.getElementById('numerateur').innerHTML = point1.Y().toFixed() + \"-\" + point2.Y().toFixed(2);\n\t\t}\n\t});\n\n\t// Affichage dynamique du dénominateur de la formule de calcul de la pente à partir de deux points\n\t//si le point 2 est négatif, le mettre entre parenthèses: ex. 5 - (-2)\n\tif (point2.X() < 0) {\n\t\tdocument.getElementById('denominateur').innerHTML = point1.X().toFixed() + \"-(\" + point2.X().toFixed(2) + \")\";\n\t} else {\n\t\tdocument.getElementById('denominateur').innerHTML = point1.X().toFixed() + \"-\" + point2.X().toFixed(2);\n\t}\n\tboard.on('update', function() {\n\t\tif (point2.X() < 0) {\n\t\t\tdocument.getElementById('denominateur').innerHTML = point1.X().toFixed() + \"-(\" + point2.X().toFixed(2) + \")\";\n\t\t} else {\n\t\t\tdocument.getElementById('denominateur').innerHTML = point1.X().toFixed() + \"-\" + point2.X().toFixed(2);\n\t\t}\n\t});\n\n\t// affichage ordonne dans la boite pedagogique/\n\tif (typeEquation == 0) {\n\t\tif (dynamiqueB() < 0) {\n\t\t\tdocument.getElementById('ordonneeEquation').innerHTML = \"y = \" + dynamiqueA() + 'x + ( ' + dynamiqueB() + ')';\n\t\t\tboard.on('update', function() {\n\t\t\t\tdocument.getElementById('ordonneeEquation').innerHTML = \"y = \" + dynamiqueA() + 'x + ( ' + dynamiqueB() + ')';\n\t\t\t});\n\n\t\t} else {\n\t\t\tdocument.getElementById('ordonneeEquation').innerHTML = \"y = \" + dynamiqueA() + 'x + ' + dynamiqueB();\n\t\t\tboard.on('update', function() {\n\t\t\t\tdocument.getElementById('ordonneeEquation').innerHTML = \"y = \" + dynamiqueA() + 'x + ' + dynamiqueB();\n\t\t\t});\n\t\t}\n\n\t\tdocument.getElementById('ordonneeFormule').innerHTML = \"Ordonnée = \" + dynamiqueB();\n\t\tboard.on('update', function() {\n\t\t\tdocument.getElementById('ordonneeFormule').innerHTML = \"Ordonnée = \" + dynamiqueB();\n\t\t});\n\n\t} else if (typeEquation == 1) {\n\t\tif (dynamiqueB() < 0 && dynamiqueC() < 0) {\n\t\t\tdocument.getElementById('ordonneeEquationQuadratique').innerHTML = \"y = \" + dynamiqueA() + 'x² +(' + dynamiqueB() + ')' + '+(' + dynamiqueC() + ')';\n\t\t\tboard.on('update', function() {\n\t\t\t\tdocument.getElementById('ordonneeEquationQuadratique').innerHTML = \"y = \" + dynamiqueA() + 'x² +(' + dynamiqueB() + ')' + '+(' + dynamiqueC() + ')';\n\t\t\t});\n\t\t} else if (dynamiqueB() < 0 && dynamiqueC() >= 0) {\n\t\t\tdocument.getElementById('ordonneeEquationQuadratique').innerHTML = \"y = \" + dynamiqueA() + 'x² +(' + dynamiqueB() + ')' + \"+ \" + dynamiqueC();\n\t\t\tboard.on('update', function() {\n\t\t\t\tdocument.getElementById('ordonneeEquationQuadratique').innerHTML = \"y = \" + dynamiqueA() + 'x² +(' + dynamiqueB() + ')' + \"+ \" + dynamiqueC();\n\t\t\t});\n\t\t} else if (dynamiqueC() < 0 && dynamiqueB() >= 0) {\n\t\t\tdocument.getElementById('ordonneeEquationQuadratique').innerHTML = \"y = \" + dynamiqueA() + 'x² + ' + dynamiqueB() + \"+(\" + dynamiqueC() + ')';\n\t\t\tboard.on('update', function() {\n\t\t\t\tdocument.getElementById('ordonneeEquationQuadratique').innerHTML = \"y = \" + dynamiqueA() + 'x² + ' + dynamiqueB() + \"+(\" + dynamiqueC() + ')';\n\t\t\t});\n\t\t} else if (dynamiqueC() >= 0 && dynamiqueB() >= 0) {\n\t\t\tdocument.getElementById('ordonneeEquationQuadratique').innerHTML = \"y = \" + dynamiqueA() + 'x² + ' + dynamiqueB() + dynamiqueC();\n\t\t\tboard.on('update', function() {\n\t\t\t\tdocument.getElementById('ordonneeEquationQuadratique').innerHTML = \"y = \" + dynamiqueA() + 'x² + ' + dynamiqueB() + dynamiqueC();\n\t\t\t});\n\t\t}\n\t\tdocument.getElementById('ordonneeFormuleQuadratique').innerHTML = \"Ordonnée = \" + dynamiqueC();\n\t\tboard.on('update', function() {\n\t\t\tdocument.getElementById('ordonneeFormuleQuadratique').innerHTML = \"Ordonnée = \" + dynamiqueC();\n\t\t});\n\t}\n}", "function pos_luna(njd){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) ottobre 2010.\n // funzione per il calcolo della posizione della Luna.\n // njd= numero dei giorni giuliani per il T.U. di Greenwich.\n // coordinate equatoriali geocentriche per l'equinozio della data.\n\nvar T=(njd-2415020.0)/36525;\n\nvar L1=270.434164+481267.8831*T-0.001133*T*T+0.0000019*T*T*T; // longitudine media.\n\nvar M=358.475833+35999.04975*T-0.000150*T*T-0.0000033*T+T*T; // anomalia media del Sole\n\nvar M1=296.104608+477198.8491*T+0.009192*T*T+0.0000144*T*T*T; // anomalia media della Luna\n\nvar D=350.737486+445267.1142*T-0.001436*T*T+0.0000019*T*T*T; // elongazione media della Luna\n\nvar F=11.250889+483202.0251*T-0.003211*T*T-0.0000003*T*T*T; // distanza media della Luna dal suo nodo ascendente.\n\nvar N=259.183275-1934.1420*T+0.002078*T*T+0.0000022*T*T*T; // longitudine media del nodo ascendente della Luna.\n\n// termini additivi di correzione.\n\nvar Delta=0.003964*Math.sin(Rad(346.560+132.870*T-0.0091731*T*T));\n\nL1=L1+0.000233*Math.sin(Rad(51.2+20.2*T))+Delta;\n M= M-0.001778*Math.sin(Rad(51.2+20.2*T));\nM1=M1+0.000817*Math.sin(Rad(51.2+20.2*T))+Delta;\n D= D+0.002011*Math.sin(Rad(51.2+20.2*T))+Delta;\n\nL1=L1+0.001964*Math.sin(Rad(N));\nM1=M1+0.002541*Math.sin(Rad(N));\n D= D+0.001964*Math.sin(Rad(N));\n F= F-0.024691*Math.sin(Rad(N));\n F= F-0.004328*Math.sin(Rad(N+275.05-2.30*T));\n F= F+Delta;\n\nvar e=1-0.002495*T-0.00000752*T*T;\n\n// Calcola la Longitudine ecclittica.\n\nvar Long=L1+6.288750*Math.sin(Rad(M1))\n +1.274018*Math.sin(Rad(2*D-M1))\n +0.658309*Math.sin(Rad(2*D))\n +0.213616*Math.sin(Rad(2*M1))\n -0.185596*Math.sin(Rad(M))*e\n -0.114336*Math.sin(Rad(2*F))\n +0.058793*Math.sin(Rad(2*D-2*M1))\n +0.057212*Math.sin(Rad(2*D-M-M1))*e\n +0.053320*Math.sin(Rad(2*D+M1))\n +0.045874*Math.sin(Rad(2*D-M))*e\n +0.041024*Math.sin(Rad(M1-M))*e\n -0.034718*Math.sin(Rad(D))\n -0.030465*Math.sin(Rad(M+M1))*e\n +0.015326*Math.sin(Rad(2*D-2*F))\n -0.012528*Math.sin(Rad(2*F+M1))\n -0.010980*Math.sin(Rad(2*F-M1))\n +0.010674*Math.sin(Rad(4*D-M1))\n +0.010034*Math.sin(Rad(3*M1))\n +0.008548*Math.sin(Rad(4*D-2*M1))\n -0.007910*Math.sin(Rad(M-M1+2*D))*e\n -0.006783*Math.sin(Rad(2*D+M))*e\n +0.005162*Math.sin(Rad(M1-D))\n -0.005000*Math.sin(Rad(M+D))*e\n +0.004049*Math.sin(Rad(M1-M+2*D))*e\n +0.003996*Math.sin(Rad(2*M1+2*D))\n +0.003862*Math.sin(Rad(4*D))\n +0.003665*Math.sin(Rad(2*D-3*M1))\n +0.002695*Math.sin(Rad(2*M1-M))*e\n +0.002602*Math.sin(Rad(M1-2*F-2*D))\n +0.002396*Math.sin(Rad(2*D-M-2*M1))*e\n -0.002349*Math.sin(Rad(M1+D))\n +0.002249*Math.sin(Rad(2*D-2*M))*e*e\n -0.002125*Math.sin(Rad(2*M1+M))*e \n -0.002079*Math.sin(Rad(2*M))*e*e \n +0.002059*Math.sin(Rad(2*D-M1-2*M))*e*e\n -0.001773*Math.sin(Rad(M1+2*D-2*F))\n -0.001595*Math.sin(Rad(2*F+2*D))\n +0.001220*Math.sin(Rad(4*D-M-M1))*e\n -0.001110*Math.sin(Rad(2*M1+2*F))\n +0.000892*Math.sin(Rad(M1-3*D))\n -0.000811*Math.sin(Rad(M+M1+2*D))*e\n +0.000761*Math.sin(Rad(4*D-M-2*M1))*e\n +0.000717*Math.sin(Rad(M1-2*M))*e*e\n +0.000704*Math.sin(Rad(M1-2*M-2*D))*e*e\n +0.000693*Math.sin(Rad(M-2*M1+2*D))*e\n +0.000598*Math.sin(Rad(2*D-M-2*F))*e\n +0.000550*Math.sin(Rad(M1+4*D))\n +0.000538*Math.sin(Rad(4*M1))\n +0.000521*Math.sin(Rad(4*D-M))*e\n +0.000486*Math.sin(Rad(2*M1-D));\n \n// Calcolo della Latitudine ecclittica.\n\nvar Beta= 5.128189*Math.sin(Rad(F))\n +0.280606*Math.sin(Rad(M1+F))\n +0.277693*Math.sin(Rad(M1-F))\n +0.173238*Math.sin(Rad(2*D-F))\n +0.055413*Math.sin(Rad(2*D+F-M1))\n +0.046272*Math.sin(Rad(2*D-F-M1))\n +0.032573*Math.sin(Rad(2*D+F))\n +0.017198*Math.sin(Rad(2*M1+F))\n +0.009267*Math.sin(Rad(2*D+M1-F))\n +0.008823*Math.sin(Rad(2*M1-F))\n +0.008247*Math.sin(Rad(2*D-M-F))*e\n +0.004323*Math.sin(Rad(2*D-F-2*M1))\n +0.004200*Math.sin(Rad(2*D+F+M1))\n +0.003372*Math.sin(Rad(F-M-2*D))*e\n +0.002472*Math.sin(Rad(2*D+F-M-M1))*e\n +0.002222*Math.sin(Rad(2*D+F-M))*e\n +0.002072*Math.sin(Rad(2*D-F-M-M1))*e\n +0.001877*Math.sin(Rad(F-M+M1))*e\n +0.001828*Math.sin(Rad(4*D-F-M1))\n -0.001803*Math.sin(Rad(F+M))*e\n -0.001750*Math.sin(Rad(3*F))\n +0.001570*Math.sin(Rad(M1-M-F))*e\n -0.001487*Math.sin(Rad(F+D))\n -0.001481*Math.sin(Rad(F+M+M1))*e\n +0.001417*Math.sin(Rad(F-M-M1))*e\n +0.001350*Math.sin(Rad(F-M))*e\n +0.001330*Math.sin(Rad(F-D))\n +0.001106*Math.sin(Rad(F+3*M1))\n +0.001020*Math.sin(Rad(4*D-F))\n +0.000833*Math.sin(Rad(F+4*D-M1))\n +0.000781*Math.sin(Rad(M1-3*F))\n +0.000670*Math.sin(Rad(F+4*D-2*M1))\n +0.000606*Math.sin(Rad(2*D-3*F))\n +0.000597*Math.sin(Rad(2*D+2*M1-F))\n +0.000492*Math.sin(Rad(2*D+M1-M-F))*e\n +0.000450*Math.sin(Rad(2*M1-F-2*D))\n +0.000439*Math.sin(Rad(3*M1-F))\n +0.000423*Math.sin(Rad(F+2*D+2*M1))\n +0.000422*Math.sin(Rad(2*D-F-3*M1))\n -0.000367*Math.sin(Rad(M+F+2*D-M1))*e\n -0.000353*Math.sin(Rad(M+F+2*D))*e\n +0.000331*Math.sin(Rad(F+4*D))\n +0.000317*Math.sin(Rad(2*D+F-M+M1))*e\n +0.000306*Math.sin(Rad(2*D-2*M-F))*e*e\n -0.000283*Math.sin(Rad(M1+3*F));\n\n var omega1=0.0004664*Math.cos(Rad(N));\n var omega2=0.0000754*Math.cos(Rad(N+275.05-2.30));\n\n var Lat=Beta*(1-omega1-omega2); // latitudine ecclittica.\n\n // Calcolo della parallasse.\n\n var parallasse=0.950724\n +0.051818*Math.cos(Rad(M1))\n +0.009531*Math.cos(Rad(2*D-M1))\n +0.007843*Math.cos(Rad(2*D))\n +0.002824*Math.cos(Rad(2*M1))\n +0.000857*Math.cos(Rad(2*D+M1))\n +0.000533*Math.cos(Rad(2*D-M))*e\n +0.000401*Math.cos(Rad(2*D-M-M1))*e\n +0.000320*Math.cos(Rad(M1-M))*e\n -0.000271*Math.cos(Rad(D))\n -0.000264*Math.cos(Rad(M1+M))*e\n -0.000198*Math.cos(Rad(2*F-M1))\n +0.000173*Math.cos(Rad(3*M1))\n +0.000167*Math.cos(Rad(4*D-M1))\n -0.000111*Math.cos(Rad(M))*e\n +0.000103*Math.cos(Rad(4*D-2*M1))\n -0.000084*Math.cos(Rad(2*M1-2*D))\n -0.000083*Math.cos(Rad(2*D+M))*e\n +0.000079*Math.cos(Rad(2*D+2*M1))\n +0.000072*Math.cos(Rad(4*D))\n +0.000064*Math.cos(Rad(2*D-M+M1))*e\n -0.000063*Math.cos(Rad(2*D+M-M1))*e\n +0.000041*Math.cos(Rad(M+D))*e\n +0.000035*Math.cos(Rad(2*M1-M))*e\n -0.000033*Math.cos(Rad(3*M1-2*D))\n -0.000030*Math.cos(Rad(M1+D))\n -0.000029*Math.cos(Rad(2*F-2*D))\n -0.000029*Math.cos(Rad(2*M1+M))*e\n +0.000026*Math.cos(Rad(2*D-2*M))*e*e\n -0.000023*Math.cos(Rad(2*F-2*D+M1))\n +0.000019*Math.cos(Rad(4*D-M-M1))*e;\n\n Long=gradi_360(Long); // La longitudine all'interno dell'intervallo 0-360.\n\n var dati_luna=trasf_ecli_equa(njd,Long,Lat); // calcola le coordinate equatoriali geocentriche.\n\n // dati del Sole.\n\n var dat_sole=pos_sole(njd); // calcola la longitudine del sole\n var Long_sole=dat_sole[2]; // longitudine vera del sole.\n \n // CALCOLO DELLA FASE E DELL'ELONGAZIONE\n\n var Elongazione=elong(dati_luna[0],dati_luna[1],dat_sole[0],dat_sole[1]); // elongazione in gradi dal Sole.\n\n var Fase_luna=0.5*(1-Math.cos(Rad(Elongazione))); // FASE\n \n var dist_luna=6378.14/Math.sin(Rad(parallasse));\n dist_luna=dist_luna.toFixed(0); // Distanza in Km.\n\n var dim_app=Math.atan(3476.2/dist_luna); \n dim_app=Rda(dim_app)*3600;\n dim_app=dim_app.toFixed(2); // Diametro apparente in secondi d'arco.\n\n // elenco delle variabili restituite dalla funzione [pos_luna].\n\n // dati_luna[0]= ascensione retta già in ore decimali (diviso per 15).\n // dati_luna[1]= declinazione in gradi sessadecimali.\n dati_luna[2]= Long; // in gradi sessadecimali.\n dati_luna[3]= Fase_luna; // fase lunare.\n dati_luna[4]= Elongazione; // elongazione in gradi sessadecimali.\n dati_luna[5]= parallasse; // parallasse della Luna in gradi. \n dati_luna[6]= dim_app; // diametro apparente in secondi d'arco.\n dati_luna[7]= dist_luna; // distanza della Luna in Km. \n\n return dati_luna;\n\n}", "getResultado(f, l, n) {\n //Seteamos la Funcion Original y el Arreglo de Variables\n core.setFunction('f', l, f); //Hacemos uso de la biblioteca Nerdamer para las derivadas paraciales\n\n this.derivX = core.diff(f, l[0]);\n this.derivY = 0; //Verificamos si es multivariada la funcion.\n\n if (f.indexOf('y') !== null) {\n this.derivY = core.diff(f, l[1]);\n } else {\n this.derivY = 0;\n } //Visualizamos por consola las derivadas\n //console.log('dX: ', this.derivX.text());\n //console.log('dY: ', this.derivY.text());\n //Generamos t symbol\n\n\n t = new nerdamer(\"t\"); //console.log(t.text());\n\n if (n === 'a') {\n //evaluamos las derivadas parciales de la funcion, con los valores parciales del nodo\n this.evaluador(this.derivX, this.derivY, this.valoresParciales);\n this.getT(n); //para hidden layers\n\n let result = parseFloat(core('f(' + this.output + ')').toTeX('decimal'));\n this.resultadoGlobal[0] = result;\n } else {\n this.evaluador(this.derivX, this.derivY, this.valoresParciales[0]);\n this.getT(n); // para output layers\n\n let result = parseFloat(core('f(' + this.output + ')').toTeX('decimal'));\n this.resultadoGlobal.push(result);\n }\n\n return this.resultadoGlobal;\n }", "function getDxyAt1(ps) {\n if (ps.length === 4) {\n let [, , [x2, y2], [x3, y3]] = ps;\n return [\n 3 * (x3 - x2),\n 3 * (y3 - y2),\n ]; // max bitlength increase 3\n }\n else if (ps.length === 3) {\n let [, [x1, y1], [x2, y2]] = ps;\n return [\n 2 * (x2 - x1),\n 2 * (y2 - y1),\n ]; // max bitlength increase 2\n }\n else if (ps.length === 2) {\n let [[x0, y0], [x1, y1]] = ps;\n return [\n x1 - x0,\n y1 - y0\n ]; // max bitlength increase 1\n }\n}", "function leyes_vida(){\n\tcelulas_x2= new Array(50);\n\tfor(i=0;i<50;i++){\n\t\tcelulas_y2= new Array(50);\n\t\tfor(j=0;j<50;j++){\n\t\t\tsum=0;\n\t\t\tcelulas_y2[j]=evaluar(i,j,celulas_x,celulas_x[i][j],sum);\n\t\t\t//alert(\"resultado: \"+celulas_y2[j]);\n\t\t\t\n\t\t}//for j\n\t\tcelulas_x2[i]=celulas_y2;\n\t\t\n\t}//for i\n\tcelulas_x=celulas_x2;\n\t\n\timprimir_celulas(celulas_x);\n\t\n}", "function effemeridi_pianeti(np,TEMPO_RIF,LAT,LON,ALT,ITERAZIONI,STEP,LAN){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) ottobre 2011\n // funzione per il calcolo delle effemeridi del Sole.\n // Parametri utilizzati\n // np= numero identificativo del pianeta 0=Mercurio,1=Venere.....7=Nettuno\n // il valore np=2 (Terra) non deve essere utilizzato come parametro.\n // TEMPO_RIF= \"TL\" o \"TU\" tempo locale o tempo universale.\n // LAT= latitudine in gradi sessadecimali.\n // LON= longtudine in gradi sessadecimali.\n // ALT= altitudine in metri.\n // ITERAZIONE =numero di ripetizioni del calcolo.\n // STEP=salto \n // LAN=\"EN\" versione in inglese.\n \n \n var njd=calcola_jdUT0(); // numero del giorno giuliano all'ora 0 di oggi T.U.\n\n njd=njd+0.00078; // correzione per il Terrestrial Time.\n\n //njd=njd+t_luce(njd,np); // correzione tempo luce.\n \nvar data_ins=0; // data\nvar data_inser=0; // data\nvar numero_iterazioni=ITERAZIONI;\n\nvar fusoloc=-fuso_loc(); // recupera il fuso orario della località (compresa l'ora legale) e riporta l'ora del pc. come T.U.\n\nvar sorge=0;\nvar trans=0;\nvar tramn=0;\nvar azimuts=0;\nvar azimutt=0;\n\nvar effe_pianeta=0;\nvar ar_pianeta=0;\nvar de_pianeta=0;\nvar classetab=\"colore_tabellaef1\";\nvar istanti=0;\nvar magnitudine=0;\nvar fase=0;\nvar diametro=0;\nvar distanza=0;\nvar elongazione=0;\nvar costl=\"*\"; // nome della costellazione.\nvar parallasse=0;\nvar p_ap=0; // coordinate apparenti del pianeta.\n\nif (STEP==0) {STEP=1;}\n \n document.write(\"<table width=100% class='.table_effemeridi'>\");\n document.write(\" <tr>\");\n\n // versione in italiano.\n\n if (LAN!=\"EN\") // diverso da EN\n {\n document.write(\" <td class='colore_tabella'>Data:</td>\");\n document.write(\" <td class='colore_tabella'>Sorge:</td>\");\n document.write(\" <td class='colore_tabella'>Culmina:</td>\");\n document.write(\" <td class='colore_tabella'>Tramonta:</td>\");\n document.write(\" <td class='colore_tabella'>A. So.:</td>\");\n document.write(\" <td class='colore_tabella'>A. Tr.:</td>\");\n document.write(\" <td class='colore_tabella'>A. Retta:</td>\");\n document.write(\" <td class='colore_tabella'>Dec.:</td>\");\n document.write(\" <td class='colore_tabella'>Fase.</td>\");\n document.write(\" <td class='colore_tabella'>Dist.</td>\");\n document.write(\" <td class='colore_tabella'>Dia.</td>\");\n document.write(\" <td class='colore_tabella'>El.</td>\");\n document.write(\" <td class='colore_tabella'>Ma.</td>\");\n document.write(\" <td class='colore_tabella'>Cost.</td>\");\n }\n\n // versione in inglese.\n\nif (LAN==\"EN\")\n {\n\n document.write(\" <td class='colore_tabella'>Date:</td>\");\n document.write(\" <td class='colore_tabella'>Rise:</td>\");\n document.write(\" <td class='colore_tabella'>Transit:</td>\");\n document.write(\" <td class='colore_tabella'>Set:</td>\");\n document.write(\" <td class='colore_tabella'>Az. Rise:</td>\");\n document.write(\" <td class='colore_tabella'>Az. Set:</td>\");\n document.write(\" <td class='colore_tabella'>R.A.:</td>\");\n document.write(\" <td class='colore_tabella'>Dec.:</td>\");\n document.write(\" <td class='colore_tabella'>Ph.</td>\");\n document.write(\" <td class='colore_tabella'>Dist.</td>\");\n document.write(\" <td class='colore_tabella'>Dia.</td>\");\n document.write(\" <td class='colore_tabella'>El.</td>\");\n document.write(\" <td class='colore_tabella'>Ma.</td>\");\n document.write(\" <td class='colore_tabella'>Const.</td>\");\n\n }\n\n\n document.write(\" </tr>\");\n\n // ST_ASTRO_DATA Array(azimut_sorgere,azimut_tramonto,tempo_sorgere,tempo_transito,tempo_tramonto)\n // 0 1 2 3 4\n\n njd=njd-STEP;\n\n for (b=0; b<numero_iterazioni; b=b+STEP){\n njd=njd+STEP;\n effe_pianeta=pos_pianeti(njd,np); \n\n // calcola le coordinate apparenti nutazione e aberrazione.\n\n p_ap=pos_app(njd,effe_pianeta[0],effe_pianeta[1]);\n ar_pianeta= sc_ore(p_ap[0]); // ascensione retta in hh:mm:ss.\n de_pianeta=sc_angolo(p_ap[1],0); // declinazione. \n \n fase=effe_pianeta[2];\n magnitudine=effe_pianeta[3];\n distanza=effe_pianeta[4].toFixed(3);\n diametro=effe_pianeta[5].toFixed(1);\n elongazione=effe_pianeta[6].toFixed(1);\n costl=costell(effe_pianeta[0]); // costellazione.\n\n istanti=ST_ASTRO_DATA(njd,effe_pianeta[0],effe_pianeta[1],LON,LAT,ALT,0);\n\nif (TEMPO_RIF==\"TL\"){\n sorge=ore_24(istanti[2]+fusoloc);\n trans=ore_24(istanti[3]+fusoloc);\n tramn=ore_24(istanti[4]+fusoloc); }\n\nelse {\n sorge=ore_24(istanti[2]);\n trans=ore_24(istanti[3]);\n tramn=ore_24(istanti[4]); } \n\n sorge=sc_ore_hm(sorge); // istanti in hh:mm\n trans=sc_ore_hm(trans);\n tramn=sc_ore_hm(tramn);\n\n // formatta la data da inserire.\n\n data_ins=jd_data(njd);\n\n if (LAN!=\"EN\") {data_inser=Lnum(parseInt(data_ins[0]),2)+\":\"+Lnum(parseInt(data_ins[1]),2)+\" |\"+data_ins[3];} // versione in italiano.\n if (LAN==\"EN\") {data_inser=Lnum(parseInt(data_ins[0]),2)+\":\"+Lnum(parseInt(data_ins[1]),2)+\" |\"+data_ins[4];} // versione in inglese.\n\n azimuts=istanti[0].toFixed(1);\n azimutt=istanti[1].toFixed(1);\n\n if (b%2==0){classetab=\"colore_tabellaef2\"; }\n\n else {classetab=\"colore_tabellaef1\";}\n\n\n document.write(\" <tr>\");\n document.write(\" <td class='\"+classetab+\"'>\"+data_inser+\"</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+sorge+\"</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+trans+\"</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+tramn+\"</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+azimuts+\"&deg;</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+azimutt+\"&deg;</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+ar_pianeta+\"</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+de_pianeta+\"</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+fase+\"</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+distanza+\"</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+diametro+\"</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+elongazione+\"</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+magnitudine+\"</td>\");\n document.write(\" <td class='\"+classetab+\"'>\"+costl+\"</td>\");\n\n document.write(\" </tr>\");\n\n }\n document.write(\" </table>\");\n\n\n}", "function volver_estacionamiento(coord_punto,adyacentes_actual,grafo,grafo_posiciones)\n{\nvar id=nodo_distancia_menor(coord_punto,grafo_posiciones);\n\treturn obtener_ruta(1,[id],adyacentes_actual,grafo_pi(grafo,grafo_posiciones,coord_punto));\n}", "function erf1(y) {\n var ysq = y * y;\n var xnum = P[0][4]*ysq;\n var xden = ysq;\n var i;\n\n for (i = 0; i < 3; i += 1) {\n xnum = (xnum + P[0][i]) * ysq;\n xden = (xden + Q[0][i]) * ysq;\n }\n return y * (xnum + P[0][3]) / (xden + Q[0][3]);\n }", "function erf1(y) {\n var ysq = y * y;\n var xnum = P[0][4]*ysq;\n var xden = ysq;\n var i;\n\n for (i = 0; i < 3; i += 1) {\n xnum = (xnum + P[0][i]) * ysq;\n xden = (xden + Q[0][i]) * ysq;\n }\n return y * (xnum + P[0][3]) / (xden + Q[0][3]);\n }", "function getDateCoordinate(date, urgent_axis) {\n var today = new Date();\n // Einteilung Tage pro Phase\n ONEMONTH = [1, 4, 7, 30];\n TWOMONTHS = [2, 7, 15, 60];\n FOURMONTHS = [4, 14, 30, 120];\n // welche einstellung wird verwendet?\n var abstand = [];\n switch(urgent_axis) {\n case 0:\n abstand = ONEMONTH;\n break;\n case 1:\n abstand = TWOMONTHS;\n break;\n case 2:\n abstand = FOURMONTHS;\n break;\n default:\n abstand = TWOMONTHS;\n }\n // millisecond from task due date to this moment\n var distance2today = Date.parse(date) - Date.parse(today)\n // ein Tag in milliseconds\n var oneDay = 24*60*60*1000;\n // weiter weg als matrix maximum --> linke seite\n if (distance2today > abstand[3]*oneDay) return 50;\n // ueberfaellige aufgaben verschwinden nicht, sondern am rechten rand\n if (distance2today <= 0) return s.width-10;\n // assure: everything is between maximum and today!\n if (distance2today <= abstand[0]*oneDay) {\n // 1 = abstand[0]+today, 0 = today\n // wo liegt die Aufgabe zwischen diesen beiden?\n var bet0and1 = 1-(distance2today/(abstand[0]*oneDay))\n // wird auf einem viertel der achse angezeigt\n // 0 bis 0,25\n var axespart = bet0and1/4;\n // verschiebung nach rechts\n // 0,75 bis 1\n var verschieben = axespart+0.75;\n // eigentliche Koordinate berechnen\n var coordinate = verschieben*(s.width-70)+50;\n return coordinate;\n }\n if (distance2today <= abstand[1]*oneDay) {\n // 1 = abstand[1]+today, 0 = abstand[0]+today\n // 0 bis 1\n var bet0and1 = 1-(distance2today - (abstand[0]*oneDay))/((abstand[1]-abstand[0])*oneDay);\n // viertel der achse\n // 0 bis 0,25\n var axespart = bet0and1/4;\n // 0,5 bis 0,75\n var verschieben = axespart+0.5;\n var coordinate = (verschieben*(s.width-70))+50;\n return coordinate;\n }\n if (distance2today <= abstand[2]*oneDay) {\n // 1 = abstand[2]+today, 0 = abstand[1]+today\n // 0 bis 1\n var bet0and1 = 1-(distance2today - (abstand[1]*oneDay))/((abstand[2]-abstand[1])*oneDay);\n // achtel der achse\n // 0 bis 0,125\n var axespart = bet0and1/8;\n // 0,375 bis 0,5\n var verschieben = axespart+0.375;\n var coordinate = (verschieben*(s.width-70))+50;\n return coordinate;\n }\n if (distance2today <= abstand[3]*oneDay) {\n // 1 = abstand[3]+today, 0 = abstand[2]+today\n // 0 bis 1\n var bet0and1 = 1-(distance2today - (abstand[2]*oneDay))/((abstand[3]-abstand[2])*oneDay);\n // drei achtel der achse\n // 0 bis 0,375\n var axespart = bet0and1/8*3;\n // muss nicht verschoben werden\n var verschieben = axespart;\n var coordinate = (verschieben*(s.width-70))+50;\n return coordinate;\n }\n}", "function forward(p) {\n var lon = p.x;\n var lat = p.y;\n var dlon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(lon - this.long0);\n var us, vs;\n var con;\n if (Math.abs(Math.abs(lat) - _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"HALF_PI\"]) <= _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"EPSLN\"]) {\n if (lat > 0) {\n con = -1;\n }\n else {\n con = 1;\n }\n vs = this.al / this.bl * Math.log(Math.tan(_constants_values__WEBPACK_IMPORTED_MODULE_3__[\"FORTPI\"] + con * this.gamma0 * 0.5));\n us = -1 * con * _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"HALF_PI\"] * this.al / this.bl;\n }\n else {\n var t = Object(_common_tsfnz__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.e, lat, Math.sin(lat));\n var ql = this.el / Math.pow(t, this.bl);\n var sl = 0.5 * (ql - 1 / ql);\n var tl = 0.5 * (ql + 1 / ql);\n var vl = Math.sin(this.bl * (dlon));\n var ul = (sl * Math.sin(this.gamma0) - vl * Math.cos(this.gamma0)) / tl;\n if (Math.abs(Math.abs(ul) - 1) <= _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"EPSLN\"]) {\n vs = Number.POSITIVE_INFINITY;\n }\n else {\n vs = 0.5 * this.al * Math.log((1 - ul) / (1 + ul)) / this.bl;\n }\n if (Math.abs(Math.cos(this.bl * (dlon))) <= _constants_values__WEBPACK_IMPORTED_MODULE_3__[\"EPSLN\"]) {\n us = this.al * this.bl * (dlon);\n }\n else {\n us = this.al * Math.atan2(sl * Math.cos(this.gamma0) + vl * Math.sin(this.gamma0), Math.cos(this.bl * dlon)) / this.bl;\n }\n }\n\n if (this.no_rot) {\n p.x = this.x0 + us;\n p.y = this.y0 + vs;\n }\n else {\n\n us -= this.uc;\n p.x = this.x0 + vs * Math.cos(this.alpha) + us * Math.sin(this.alpha);\n p.y = this.y0 + us * Math.cos(this.alpha) - vs * Math.sin(this.alpha);\n }\n return p;\n}", "function deCasteljau(i, j, u){\n\tvar points = getPoints();\n\tvar temp = new Array();\n\tfor(var i = 0 ; i < points.length ; i++){\n\t\ttemp[i] = new coord(points[i].getAttribute('cx'), points[i].getAttribute('cy'));\n\t}\n\tfor(var k = 1 ; k < points.length ; k++){\n\t\tfor(var i = 0 ; i < points.length-k ; i++){\n\t\t\ttemp[i].x = temp[i].x*(1-u) + temp[i+1].x*(u);\n\t\t\ttemp[i].y = temp[i].y*(1-u) + temp[i+1].y*(u);\n\t\t}\n\t}\n\treturn temp[0];\n}", "calcF(x) {\n let c1 = (x - this.fx) ** 2;\n let c2 = 2 * (this.fy - this._d);\n let c3 = this.fy ** 2 - this._d ** 2;\n return ((c1 + c3) / c2);\n }", "function trait(f, contexte, X, Y) {\n let dx, dy, x, y, x0, y0, d, i;\n\n if (cfg.dernierPoint.length === 0) {\n x = X;\n y = Y;\n } else {\n x0 = cfg.dernierPoint[0];\n y0 = cfg.dernierPoint[1];\n\n //increment entre dernier point et point demandé\n dx = X - x0;\n dy = Y - y0;\n\n //calcul minimum pour avancé de 1px\n d = Math.max(Math.abs(dx), Math.abs(dy));\n dx = dx / d;\n dy = dy / d;\n\n //tracer la forme\n x = x0;\n y = y0;\n for (i = 1; i < d; i++){\n x += dx;\n y += dy;\n f(contexte, x, y);\n }\n }\n f(contexte, x, y);\n}", "function Fe(t,e){this.x=e,this.q=t}", "function getPelnas2(x1, x2){\nvar pelnas = x1 - x2;\nreturn pelnas;\n}", "function _(px,py,pz) {\n var e = 0.01;\n nx = F(px+e, py, pz) - F(px-e, py, pz);\n ny = F(px, py+e, pz) - F(px, py-e, pz);\n nz = F(px, py, pz+e) - F(px, py, pz-e);\n nl = R(nx*nx+ny*ny+nz*nz);\n if (nl==0)return;\n nx/=nl;\n ny/=nl;\n nz/=nl;\n }", "function erf1(y) {\n var ysq = y * y;\n var xnum = P[0][4] * ysq;\n var xden = ysq;\n var i;\n\n for (i = 0; i < 3; i += 1) {\n xnum = (xnum + P[0][i]) * ysq;\n xden = (xden + Q[0][i]) * ysq;\n }\n\n return y * (xnum + P[0][3]) / (xden + Q[0][3]);\n }", "function erf1(y) {\n var ysq = y * y;\n var xnum = P[0][4] * ysq;\n var xden = ysq;\n var i;\n\n for (i = 0; i < 3; i += 1) {\n xnum = (xnum + P[0][i]) * ysq;\n xden = (xden + Q[0][i]) * ysq;\n }\n\n return y * (xnum + P[0][3]) / (xden + Q[0][3]);\n }", "function distancia(p1,p2){\n //obteniendo los parametros de el objeto\n const x= p1.x - p2.x;\n const y= p1.y - p2.y;\n //to fixed, redondear decimales\n return (Math.sqrt(Math.pow(x,2)+Math.pow(y,2))).toFixed(2)\n}", "function forward(p) {\n var lon = p.x;\n var lat = p.y;\n\n var delta_lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(lon - this.long0);\n var con;\n var x, y;\n var sin_phi = Math.sin(lat);\n var cos_phi = Math.cos(lat);\n\n if (!this.es) {\n var b = cos_phi * Math.sin(delta_lon);\n\n if ((Math.abs(Math.abs(b) - 1)) < _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"]) {\n return (93);\n }\n else {\n x = 0.5 * this.a * this.k0 * Math.log((1 + b) / (1 - b)) + this.x0;\n y = cos_phi * Math.cos(delta_lon) / Math.sqrt(1 - Math.pow(b, 2));\n b = Math.abs(y);\n\n if (b >= 1) {\n if ((b - 1) > _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"]) {\n return (93);\n }\n else {\n y = 0;\n }\n }\n else {\n y = Math.acos(y);\n }\n\n if (lat < 0) {\n y = -y;\n }\n\n y = this.a * this.k0 * (y - this.lat0) + this.y0;\n }\n }\n else {\n var al = cos_phi * delta_lon;\n var als = Math.pow(al, 2);\n var c = this.ep2 * Math.pow(cos_phi, 2);\n var cs = Math.pow(c, 2);\n var tq = Math.abs(cos_phi) > _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"] ? Math.tan(lat) : 0;\n var t = Math.pow(tq, 2);\n var ts = Math.pow(t, 2);\n con = 1 - this.es * Math.pow(sin_phi, 2);\n al = al / Math.sqrt(con);\n var ml = Object(_common_pj_mlfn__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(lat, sin_phi, cos_phi, this.en);\n\n x = this.a * (this.k0 * al * (1 +\n als / 6 * (1 - t + c +\n als / 20 * (5 - 18 * t + ts + 14 * c - 58 * t * c +\n als / 42 * (61 + 179 * ts - ts * t - 479 * t))))) +\n this.x0;\n\n y = this.a * (this.k0 * (ml - this.ml0 +\n sin_phi * delta_lon * al / 2 * (1 +\n als / 12 * (5 - t + 9 * c + 4 * cs +\n als / 30 * (61 + ts - 58 * t + 270 * c - 330 * t * c +\n als / 56 * (1385 + 543 * ts - ts * t - 3111 * t)))))) +\n this.y0;\n }\n\n p.x = x;\n p.y = y;\n\n return p;\n}", "function deCasteljau(b, t){\n var temp = [];\n for(var i = 0; i < b.length; i++){\n temp.push(b[i]);\n }\n\n for(var i = 0; temp.length > 1; i++){\n var m = temp.shift();\n var n = temp[0];\n\n temp.push({x: (m.x*(1-t) + n.x*t).toFixed(4), y: (m.y*(1-t) + n.y*t).toFixed(4)});\n\n if(i == temp.length-2){\n temp.shift();\n i = -1;\n }\n }\n return temp[0];\n }", "function equilatRep(L,R,dx,dy){\n let temp = g.points[0];\n let ytip = 70;\n let xtip = 300;\n \n if(!g.inPhaseEnvelope){\n // Solute line and box display\n let x1, y1, x2, y2;\n push();\n stroke(0,0,255);\n strokeWeight(2);\n fill(0,0,255);\n x1 = temp.x;\n y1 = temp.y;\n y2 = temp.y;\n x2 = (y2 - R[1])/R[0];\n push();\n drawingContext.setLineDash([5,5]);\n line(x1,y1,x2-3,y2);\n pop();\n triangle(x2,y2,x2-15,y2+5,x2-15,y2-5)\n pop();\n let solFractemp = map(temp.y,ytip+dy,ytip,0,1); // storing a non-fixed version for improved graphics of the carrier line\n g.soluteFrac = (map(temp.y,ytip+dy,ytip,0,1)).toFixed(2);\n if(g.soluteFrac == 0){ // Correction for -0.00\n let t = (0).toFixed(2);\n g.soluteFrac == t;\n }\n\n if(g.soluteTruth){\n push();\n fill(255);\n rect(x2+10,y2-15,45,30);\n textSize(18); noStroke();\n fill(0,0,255);\n text(g.soluteFrac,x2+15,y2+5)\n pop();\n }\n\n //Solvent line\n push();\n let angle = 30*Math.PI/180;\n stroke(128,0,128); strokeWeight(2); fill(128,0,128);\n x1 = temp.x;\n y1 = temp.y;\n y2 = ytip+dy-5;\n let btemp = y1-L[0]*temp.x;\n x2 = (y2-btemp)/L[0];\n push();\n drawingContext.setLineDash([5,5]);\n line(x1,y1,x2,y2);\n pop();\n y2 = y2 + 5;\n x2 = (y2-btemp)/L[0];\n let pos = equilatSolventTriangleRep(x2,y2);\n triangle(pos[0],pos[1],pos[2],pos[3],pos[4],pos[5]);\n pop();\n let solvFractemp = map(x2,xtip-dx,xtip+dx,0,1); // Non-fixed version\n g.solventFrac = (map(x2,xtip-dx,xtip+dx,0,1)).toFixed(2);\n if(g.solventFrac <= 0){ // Correction for -0.00\n \n g.solventFrac = g.solventFrac.replace(/-/g,'')\n }\n \n\n if(g.solventTruth){\n push();\n fill(255);\n rect(x2-22.5,y2+10,45,30);\n textSize(18); noStroke();\n fill(128,0,128);\n text(g.solventFrac,x2-17.5,y2+30);\n pop();\n }\n \n // Carrier line\n let carFractemp = 1 - solFractemp - solvFractemp; // For drawing the carrier line\n g.carrierFrac = (1 - g.solventFrac - g.soluteFrac).toFixed(2);\n if(g.carrierFrac == 0){ // Correcting for -0.00\n let t = (0).toFixed(2);\n g.carrierFrac = t;\n }\n \n x2 = map(carFractemp,0,1,xtip,xtip-dx); // This is kind of clunky -> I should work on a better method\n y2 = L[0]*x2 + L[1];\n push();\n stroke(255,100,0); strokeWeight(2); fill(255,100,0);\n push();\n drawingContext.setLineDash([5,5]);\n line(temp.x,temp.y,x2,y2);\n pop();\n \n if(g.carrierTruth){\n push();\n fill(255); stroke(0); strokeWeight(1);\n rect(x2-45,y2-30,45,30);\n textSize(18); noStroke();\n fill(255,100,0);\n text(g.carrierFrac,x2-40,y2-10);\n pop();\n }\n pos = equilatCarrierTriangleRep(x2,y2);\n triangle(pos[0],pos[1],pos[2],pos[3],pos[4],pos[5]);\n pop(); \n }\n \n}", "function SDPVTL(a, state) {\n var stack = state.stack;\n var p2i = stack.pop();\n var p1i = stack.pop();\n var p2 = state.z2[p2i];\n var p1 = state.z1[p1i];\n\n if (exports.DEBUG) {\n console.log(state.step, 'SDPVTL[' + a + ']', p2i, p1i);\n }\n\n var dx;\n var dy;\n\n if (!a) {\n dx = p1.x - p2.x;\n dy = p1.y - p2.y;\n } else {\n dx = p2.y - p1.y;\n dy = p1.x - p2.x;\n }\n\n state.dpv = getUnitVector(dx, dy);\n }", "Deff(){\n return 5*(this.wt()*this.Sj/(12*12))*Math.pow(this.Lj,4)*Math.pow(12,4)/(384*29000000*this.Ieff())\n }", "function atvd17(){\n \n let a = parseFloat(document.querySelector(\"#atvd17-1\").value);\n let b = parseFloat(document.querySelector(\"#atvd17-2\").value);\n let c = parseFloat(document.querySelector(\"#atvd17-3\").value);\n\n let de,x1=0,x2=0;\n \n\n de = (Math.pow(b, 2)) - (4*a*c);\n \n \n x1= (-b - Math.sqrt(de))/(2*a);\n \n x2= (-b + Math.sqrt(de))/(2*a);\n \n\n if(de<0){\n document.getElementById(\"raiz\").innerHTML = \"Não existe raiz real\";\n\n }else{\n document.getElementById(\"raiz\").innerHTML = \"VALOR DA PRIMEIRA RAIZ:\" + x1+ \" | \" + \"VALOR DA SEGUNDA RAIZ:\" + x2;\n \n }\n \n }", "function desplazarDerecha() {\n \n xCoord += (357 + 30);\n let limiteDerecho = (7 * (357 +30) + 30);\n \n if (xCoord > limiteDerecho){\n xCoord = limiteDerecho;\n }\n containterTrending.scroll(xCoord, yCoord);\n \n}", "function nutazione(njd){\n // calcola i parametri da utilizzare per la nutazione\n\n var T=(njd-2415020.0)/36525;\n\n var L=279.6967+36000.7689*T+0.000303*T*T;\n var L1=270.4342+481267.8831*T-0.001133*T*T;\n var M=358.4758+ 35999.0498*T-0.000150*T*T;\n var M1=296.1046+477198.8491*T+0.009192*T*T;\n var LN=259.1833-1934.1420*T+0.002078*T*T;\n\n var DELTA_FI=-(17.2327+0.01737*T)*Math.sin(Rad(LN))\n -(1.2729+0.000130*T)*Math.sin(Rad(2*L))\n +0.2088*Math.sin(Rad(2*LN))\n -0.2037*Math.sin(Rad(2*L1))\n +(0.1261-0.00031*T)*Math.sin(Rad(M))\n +0.0675*Math.sin(Rad(M1))\n -(0.0497-0.00012*T)*Math.sin(Rad(2*L+M))\n -0.0342*Math.sin(Rad(2*L1-LN))\n -0.0261*Math.sin(Rad(2*L1+M1))\n +0.0214*Math.sin(Rad(2*L-M))\n -0.0149*Math.sin(Rad(2*L-2*L1+M1))\n +0.0124*Math.sin(Rad(2*L-LN))\n +0.0114*Math.sin(Rad(2*L1-M1));\n\n var DELTA_EP=(9.2100+0.00091*T)*Math.cos(Rad(LN))\n +(0.5522-0.00029*T)*Math.cos(Rad(2*L))\n -0.0904*Math.cos(Rad(2*LN))\n +0.0884*Math.cos(Rad(2*L1))\n +0.0216*Math.cos(Rad(2*L+M))\n +0.0183*Math.cos(Rad(2*L1-LN))\n +0.0113*Math.cos(Rad(2*L1+M1))\n -0.0093*Math.cos(Rad(2*L-M))\n -0.0066*Math.cos(Rad(2*L-LN));\n\n\n\nvar parametri=new Array (DELTA_FI,DELTA_EP);\n\nreturn parametri;\n\n}", "function formule_z(omegak0){\n\t\t//d騁ermine les formules qui sont utilent pour la distance metrique, omegak positif 0 ou negatif\n\tif (omegak0>0){\n\t return Sk_sin_x;\n \n\t\t}\n\telse if (omegak0===0){\n\t return Sk_x;\n\n\t\t}\n\telse{\n\t return Sk_sinh_x;\n\t}\n}", "overpressureToDistance(overPressurekPa)\n{\n const a1 = -0.214362789151;\n const b1 = 1.35034249993;\n const c01 = 2.78076916577;\n const c11 = -1.6958988741;\n const c21 = -0.154159376846;\n const c31 = 0.514060730593;\n const c41 = 0.0988554365274;\n const c51 = -0.293912623038;\n const c61 = -0.0268112345019;\n const c71 = 0.109097496421;\n const c81 = 0.001628467556311;\n const c91 = -0.0214631030242;\n const c101 = 0.0001456723382;\n const c111 = 0.00167847752266;\n \n //Tolerancia del cálculo\n const tolerance = 0.001;\n\n //Valor de inicio del calculo de dsitancia x a la de sobrepresion overPressureTNT;\n let xTNT = 0;\n \n //Presion inicial para el cálculo este numero es el maximo reportado por EPA en kPA\n var pres = 33000;\n \n //Calculo de Masa equivalente de TNT\n let masaEQTNT = (this.fe*this.hCombKJKG*this.mass)/DHCTNT;\n \n //Calculo de la distancia por iteracion\n for (xTNT = 1; pres > overPressurekPa; xTNT = xTNT + tolerance)\n {\n //Distancia Escalada (m/kg^1/3)\n const z = xTNT/Math.pow(masaEQTNT, 1.0/3.0);\n \n let ablog = a1+b1*Math.log10(z);\n let c = c01+c11*ablog+c21*Math.pow(ablog, 2)+c31*Math.pow(ablog, 3)+c41*Math.pow(ablog, 4)+c51*Math.pow(ablog, 5)+c61*Math.pow(ablog, 6)+c71*Math.pow(ablog, 7)+c81*Math.pow(ablog, 8)+c91*Math.pow(ablog, 9)+c101*Math.pow(ablog, 10)+c111*Math.pow(ablog, 11);\n pres = Math.pow(10, c);\n }\n return xTNT;\n\n}", "function getPoints() {\n\n var i;\n var cont=0;\n var points={};\n var aux={};\n var x=extents;\n var contAux=0;\n if(x){\n if(actives[0]==\"Dia_sem\"){\n for(i=0;i<data.length;i++){\n if(data[i].Dia_sem>=x[0][0]&&data[i].Dia_sem<=x[0][1]){\n points[cont]=data[i];\n cont++;\n }\n }\n }else if(actives[0]==\"Mes\"){\n for(i=0;i<data.length;i++){\n if(data[i].Mes>=x[0][0]&&data[i].Mes<=x[0][1]){\n points[cont]=data[i];\n cont++;\n }\n }\n }else if(actives[0]==\"Dia_ocor\") {\n for (i = 0; i < data.length; i++) {\n if (data[i].Dia_ocor >= x[0][0] && data[i].Dia_ocor <= x[0][1]) {\n points[cont] = data[i];\n cont++;\n }\n }\n }else if(actives[0]==\"Hora\") {\n for (i = 0; i < data.length; i++) {\n if (data[i].Hora >= x[0][0] && data[i].Hora <= x[0][1]) {\n points[cont] = data[i];\n cont++;\n }\n }\n }else if(actives[0]==\"Preco\") {\n for (i = 0; i < data.length; i++) {\n if (data[i].Preco >= x[0][0] && data[i].Preco <= x[0][1]) {\n points[cont] = data[i];\n cont++;\n }\n }\n }\n if(actives[1]){\n if(actives[1]==\"Dia_sem\"){\n for(i=0;i<cont;i++){\n if(points[i].Dia_sem>=x[1][0]&&points[i].Dia_sem<=x[1][1]){\n aux[contAux]=points[i];\n contAux++;\n }\n }\n }else if(actives[1]==\"Mes\"){\n for(i=0;i<cont;i++){\n if(points[i].Mes>=x[1][0]&&points[i].Mes<=x[1][1]){\n aux[contAux]=points[i];\n contAux++;\n }\n }\n }else if(actives[1]==\"Dia_ocor\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Dia_ocor >= x[1][0] && points[i].Dia_ocor <= x[1][1]) {\n aux[contAux] = points[i];\n contAux++;\n }\n }\n }else if(actives[1]==\"Hora\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Hora >= x[1][0] && points[i].Hora <= x[1][1]) {\n aux[contAux] = data[i];\n contAux++;\n }\n }\n }else if(actives[1]==\"Preco\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Preco >= x[1][0] && points[i].Preco <= x[1][1]) {\n aux[contAux] = data[i];\n contAux++;\n }\n }\n }\n cont=0;\n points={};\n for(var i=0;i<contAux;i++){\n points[cont]=aux[i];\n cont++;\n }\n }\n if(actives[2]){\n contAux=0;\n aux={};\n if(actives[2]==\"Dia_sem\"){\n for(i=0;i<cont;i++){\n if(points[i].Dia_sem>=x[2][0]&&points[i].Dia_sem<=x[2][1]){\n aux[contAux]=points[i];\n contAux++;\n }\n }\n }else if(actives[2]==\"Mes\"){\n for(i=0;i<cont;i++){\n if(points[i].Mes>=x[2][0]&&points[i].Mes<=x[2][1]){\n aux[contAux]=points[i];\n contAux++;\n }\n }\n }else if(actives[2]==\"Dia_ocor\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Dia_ocor >= x[2][0] && points[i].Dia_ocor <= x[2][1]) {\n aux[contAux] = points[i];\n contAux++;\n }\n }\n }else if(actives[2]==\"Hora\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Hora >= x[2][0] && points[i].Hora <= x[2][1]) {\n aux[contAux] = points[i];\n contAux++;\n }\n }\n }else if(actives[2]==\"Preco\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Preco >= x[2][0] && points[i].Preco <= x[2][1]) {\n aux[contAux] = points[i];\n contAux++;\n }\n }\n }\n cont=0;\n points={};\n for(var i=0;i<contAux;i++){\n points[cont]=aux[i];\n cont++;\n }\n }\n if(actives[3]){\n contAux=0;\n aux={};\n if(actives[3]==\"Dia_sem\"){\n for(i=0;i<cont;i++){\n if(points[i].Dia_sem>=x[3][0]&&points[i].Dia_sem<=x[3][1]){\n aux[contAux]=points[i];\n contAux++;\n }\n }\n }else if(actives[3]==\"Mes\"){\n for(i=0;i<cont;i++){\n if(points[i].Mes>=x[3][0]&&points[i].Mes<=x[3][1]){\n aux[contAux]=points[i];\n contAux++;\n }\n }\n }else if(actives[3]==\"Dia_ocor\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Dia_ocor >= x[3][0] && points[i].Dia_ocor <= x[3][1]) {\n aux[contAux] = points[i];\n contAux++;\n }\n }\n }else if(actives[3]==\"Hora\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Hora >= x[3][0] && points[i].Hora <= x[3][1]) {\n aux[contAux] = points[i];\n contAux++;\n }\n }\n }else if(actives[3]==\"Preco\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Preco >= x[3][0] && points[i].Preco <= x[3][1]) {\n aux[contAux] = points[i];\n contAux++;\n }\n }\n }\n cont=0;\n points={};\n for(var i=0;i<contAux;i++){\n points[cont]=aux[i];\n cont++;\n }\n }\n if(actives[4]){\n contAux=0;\n aux={};\n if(actives[4]==\"Dia_sem\"){\n for(i=0;i<cont;i++){\n if(points[i].Dia_sem>=x[4][0]&&points[i].Dia_sem<=x[4][1]){\n aux[contAux]=points[i];\n contAux++;\n }\n }\n }else if(actives[4]==\"Mes\"){\n for(i=0;i<cont;i++){\n if(points[i].Mes>=x[4][0]&&points[i].Mes<=x[4][1]){\n aux[contAux]=points[i];\n contAux++;\n }\n }\n }else if(actives[4]==\"Dia_ocor\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Dia_ocor >= x[4][0] && points[i].Dia_ocor <= x[4][1]) {\n aux[contAux] = points[i];\n contAux++;\n }\n }\n }else if(actives[4]==\"Hora\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Hora >= x[4][0] && points[i].Hora <= x[4][1]) {\n aux[contAux] = points[i];\n contAux++;\n }\n }\n }else if(actives[4]==\"Preco\") {\n for (i = 0; i < cont; i++) {\n if (points[i].Preco >= x[4][0] && points[i].Preco <= x[4][1]) {\n aux[contAux] = points[i];\n contAux++;\n }\n }\n }\n cont=0;\n points={};\n for(var i=0;i<contAux;i++){\n points[cont]=aux[i];\n cont++;\n }\n }\n contAux=0;\n for(var i=0;i<cont;i++){\n aux[contAux]=points[i].Coord;\n contAux++;\n\n }\n var lin=0;\n var latlong=[];\n for(i=0;i<contAux;i++){\n var str= aux[i].split(\", \");\n var res=str[0].split(\"(\");\n var lat=res[1];\n res=str[1].split(\")\");\n var lng=res[0];\n\n latlong[lin]= new google.maps.LatLng(lat,lng);\n lin++;\n }\n return latlong;\n\n }\n}", "conjectureP2(x, y) {\n return 0;\n }", "function afase_luna(njd){\n\n // calcola l'angolo di fase della luna per la data (njd)\n // gennaio 2012\n\n var dati_luna=pos_luna(njd); // recupero fase/elongazione (1)\n var dati_sole=pos_sole(njd);\n\n var elongazione1=dati_luna[4]; // elongazione in gradi sessadecimali.\n var dist_luna=dati_luna[7]/149597870; \n var dist_sole=dati_sole[4]; // distanza del sole in UA.\n\n elongazione=Math.abs(elongazione1)*1;\n\n var dist_sl=dist_luna*dist_luna+dist_sole*dist_sole-2*dist_luna*dist_sole*Math.cos(Rad(elongazione)); // distanza sole-luna\n dist_sl=Math.sqrt(dist_sl);\n\n // calcolo dell'angolo di fase in gradi . \n\n var Dpt= dist_luna; // distanza pianeta-terra.\n var Dts= dist_sole; // distanza terra-sole.\n var Dps= dist_sl; // distanza pianeta-sole.\n\n // teorema del coseno\n\n var delta_fase=(Dts*Dts+Dps*Dps-Dpt*Dpt)/(2*Dps*Dts);\n delta_fase=Math.acos(delta_fase); \n delta_fase=Rda(delta_fase);\n\n var angolo_fase=180-elongazione-delta_fase; // angolo di fase in gradi.\n\n if(elongazione1<0) {angolo_fase=-angolo_fase; }\n\n return angolo_fase;\n\n}", "function dessiner_polygone() {\n\tfor (var p=0; p<18; p++) {\t\t/* recherche du point le plus haut */\n\t\tif (polygone[p][1] < polygone[premierpoint][1]) {\n\t\t\tpremierpoint = p\n\t\t}\n\t}\n\n\tctx.fillStyle = \"grey\";\n\tctx.strokeStyle = \"black\";\n\tctx.lineWidth = 10;\n\tctx.beginPath();\n\n\tctx.moveTo(pointhaut[0]*CoordJeux[0]/100,pointhaut[1]*CoordJeux[1]/100);\t/* côté gauche */\n\tfor (var p=0; p<18; p++) {\n\t\taux = (premierpoint + p)%18 ;\n\t\tctx.lineTo(polygone[aux][0]*CoordJeux[0]/100,polygone[aux][1]*CoordJeux[1]/100);\n\t}\n\tctx.lineTo(pointbas[0]*CoordJeux[0]/100,pointbas[1]*CoordJeux[1]/100);\n\tctx.lineTo((pointbas[0]+largeur)*CoordJeux[0]/100,pointbas[1]*CoordJeux[1]/100);\n\n\tfor (var p=0; p<18; p++) {\t\t\t\t\t\t\t/* côté droit */\n\t\taux = (premierpoint + 17 - p)%18;\n\t\tctx.lineTo((polygone[aux][0]+largeur)*CoordJeux[0]/100,polygone[aux][1]*CoordJeux[1]/100);\n\t}\n\tctx.lineTo((pointhaut[0]+largeur)*CoordJeux[0]/100,pointhaut[1]*CoordJeux[1]/100);\n\tctx.closePath();\n\tctx.stroke();\n\tctx.fill();\n\n\tctx.strokeStyle = \"white\";\t\t\t\t\t\t\t/* ligne centrale */\n\tctx.lineWidth = 5;\n\tctx.beginPath();\n\tctx.moveTo((pointhaut[0]+largeur/2)*CoordJeux[0]/100,pointhaut[1]*CoordJeux[1]/100);\n\tfor (var p=0; p<18; p++) {\n\t\taux = (premierpoint + p)%18 ;\n\t\tctx.lineTo((polygone[aux][0]+largeur/2)*CoordJeux[0]/100,polygone[aux][1]*CoordJeux[1]/100);\n\t}\n\tctx.lineTo((pointbas[0]+largeur/2)*CoordJeux[0]/100,pointbas[1]*CoordJeux[1]/100);\n\tctx.stroke();\n\n\tctx.fillStyle = \"#2F4F4F\";\t\t\t\t\t\t\t/* bandes qui cachent le haut et le bas */\n\tctx.fillRect(0,0,CoordJeux[0],CoordJeux[1]/5);\n\tctx.fillRect(0,CoordJeux[1]*4/5,CoordJeux[0],CoordJeux[1]/5);\n\n}", "function pos_sole(njd){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) dicembre 2009\n // funzione per il calcolo della posizione del sole.\n // njd= numero dei giorni giuliani per il T.U. di Greenwich.\n // la data di riferimento per gli elementi orbitali è l'equinozio della data.\n\n var T=(njd-2415020.0)/36525;\n\n // Elementi orbitali per l'equinozio della data.\n \n Long_epoca=279.69668+36000.76892*T+0.0003025*T*T;\n\n ecc_orbita=0.01675104-0.0000418*T-0.000000126*T*T;\n\n M=358.47583+35999.04975*T-0.000150*T*T-0.0000033*T*T*T;\n\n Long_perigeo=gradi_360(Long_epoca-M);\n\n \n // correzioni ***************\n\n var A=153.23+22518.7541*T;\n var B=216.57+45037.5082*T;\n var C=312.69+32964.3577*T;\n var D=350.74+445267.1142*T-0.00144*T*T;\n var E=231.19+20.20*T;\n var H=353.40+65928.7155*T;\n\n // angoli in radianti.\n\n A=Rad(A); \n B=Rad(B); \n C=Rad(C); \n D=Rad(D); \n E=Rad(E); \n H=Rad(H); \n\n // correzione per la longitudine.\n\n var delta_L=0.00134*Math.cos(A)\n +0.00154*Math.cos(B)\n +0.00200*Math.cos(C)\n +0.00179*Math.sin(D)\n +0.00178*Math.sin(E);\n\n // correzioni per il raggio vettore.\n\n var delta_R=0.00000543*Math.sin(A)\n +0.00001575*Math.sin(B)\n +0.00001627*Math.sin(C)\n +0.00003076*Math.cos(D) \n +0.00000927*Math.sin(H);\n \nvar semiasse=0.999996;\n\n // calcolo Equazione di Keplero\n\n M=gradi_360(M); // intervallo 0-360;\n\n var E=eq_keplero(M,ecc_orbita); // equazione di Keplero.\n\n var anomalia_vera =E[1]; // restituisce l'anomalia vera in radianti.\n\n // calcola il valore del raggio vettore. \n \n var distanzas=semiasse*(1-ecc_orbita*Math.cos(E[0])); \n distanzas=distanzas+delta_R; // correzione per il raggio vettore.\n\n // calcola il diametro apparente del Sole in secondi d'arco.\n\n var diam_app=1919.22/distanzas;\n diam_app=diam_app.toFixed(1);\n\n // parallasse diurna del Sole in gradi.\n\n var parallasse=(8.794/3600)/distanzas;\n\n var longitudine_sole=Rda(anomalia_vera)+Long_perigeo; \n\n longitudine_sole=gradi_360(longitudine_sole+delta_L); // longitudine ecclittica del sole + correzione.\n\n\n // coordinate ecclittiche: longitudine_sole,0 per la latitudine.\n \nvar coord_sole=trasf_ecli_equa(njd,longitudine_sole,0); // trasforma le coordinate ecclittiche in equatoriali: AR,DEC.\n\n // ELENCO delle variabili restituite dalla funzione [pos_sole]. \n\n // coord_sole[0]=ascensione retta in ore decimali (già diviso * 15). calcolate dalla funzione trasf_ecli_equa.\n // coord_sole[1]=declinazione in gradi sessadecimali.\n coord_sole[2]=longitudine_sole; // longitudine in gradi sessadecimali.\n coord_sole[3]=M; // anomalia media.\n coord_sole[4]=distanzas; // distanza in U.A.\n coord_sole[5]=diam_app; // diametro apparente del Sole.\n coord_sole[6]=parallasse; // parallasse diurna in gradi. \n\nreturn coord_sole;\n\n}", "function pos_app(njd,AR,DE){\n\n // calcola la posizione apparente di un astro -nutazione e aberrazione della luce\n \n var T=(njd-2415020.0)/36525;\n\n var obli_eclittica=23.452294-0.0130125*T-0.00000164*T*T+0.000000503*T*T*T;\n obli_eclittica=Rad(obli_eclittica); \n\n var nutaz=nutazione(njd);\n\n // effetto dovuto alla nutazione.\n\n var Delta_ar=(Math.cos(obli_eclittica)+Math.sin(obli_eclittica)*Math.sin(Rad(AR*15))*Math.tan(Rad(DE)))*nutaz[0]-(Math.cos(Rad(AR*15))*Math.tan(Rad(DE)))*nutaz[1];\n var Delta_de=(Math.sin(obli_eclittica)*Math.cos(Rad(AR*15)))*nutaz[0]+Math.sin(Rad(AR*15))*nutaz[1];\n\n // effetto dovuto all'aberrazione annua.\n\n var PSOLE=pos_sole(njd); // calcola la longitudine del Sole.\n var LSOLE=PSOLE[2]; // longitudine del Sole.\n\n var Delta_ar1=-20.49*(Math.cos(Rad(AR*15))*Math.cos(Rad(LSOLE))*Math.cos(obli_eclittica)+Math.sin(Rad(AR*15))*Math.sin(Rad(LSOLE)))/Math.cos(Rad(DE));\n var Delta_de1=-20.49*(Math.cos(Rad(LSOLE))*Math.cos(obli_eclittica)*(Math.tan(obli_eclittica)*Math.cos(Rad(DE))-Math.sin(Rad(AR*15))*Math.sin(Rad(DE)))+Math.cos(Rad(AR*15))*Math.sin(Rad(LSOLE))*Math.sin(Rad(DE)));\n\n // correzione coordinate equatoriali.\n\n var AR_C=AR+((Delta_ar+Delta_ar1)/15)/3600;\n var DE_C=DE+(Delta_de+Delta_de1)/3600;\n\n var RID_COORD=new Array(AR_C,DE_C); //coordinate equatoriali ridotte. \n\nreturn RID_COORD;\n\n}", "function calculDeDs(zmin,zmax,dt){\n\n var pas = (zmax - zmin)/dt;\n var zArr = [];\n var i = zmin;\n var daArr = [];\n var da;\n var dlArr = [];\n var dl;\n var dm1;\n var dmArr = [];\n var dlt;\n var dltArr = [];\n var max_graph;\n var min_graph;\n var integ_1;\n\n while (i<=zmax) {\n\n if (omegak0>0){\n integ_1 = Math.sqrt( Math.abs(omegak0)) * simpson(0, Number(i), fonction_dm, omegam0, Number(omegalambda0), Number(Or),Eps);\n dm1=(c/(H0parsec*Math.sqrt( Math.abs(omegak0) ))) * Math.sin(integ_1);\n }\n else if (omegak0==0){\n dm1=(c/(H0parsec) * simpson(0, Number(i), fonction_dm, omegam0, Number(omegalambda0), Number(Or),Eps));\n }\n else{\n integ_1 = Math.sqrt( Math.abs(omegak0)) * simpson(0, Number(i), fonction_dm, omegam0, Number(omegalambda0), Number(Or),Eps);\n dm1=(c/(H0parsec*Math.sqrt( Math.abs(omegak0) ))) * Math.sinh(integ_1);\n }\n\n\n temps_i= simpson_simple_degre2(fonction_integrale, Number(zmin), omegam0, Number(omegalambda0), Number(Or));\n temps_i = temps_i * H0enannee / H0parsec;\n temps = simpson_simple_degre2(fonction_integrale, Number(i), omegam0, Number(omegalambda0), Number(Or));\n temps = temps * H0enannee / H0parsec;\n\n dlt = (temps_i - temps) * c;\n dlt = dlt * LUMIERE_INV;\n\n dm1 = Math.abs(dm1); // distances positives\n\n dm1 = dm1 * LUMIERE_INV;\n\n dm1 = Number(dm1).toExponential(3);\n\n da = dm1 / (1 + i);\n dl = dm1 * (1 + i);\n\n da = Number(da).toExponential(3);\n dl = Number(dl).toExponential(3);\n\n dmArr.push(dm1);\n daArr.push(da);\n dlArr.push(dl);\n dltArr.push(dlt);\n\n zArr.push(i);\n\n i = i + pas;\n }\n\n return [dlArr,daArr,dmArr,zArr,dltArr];\n\n}", "fView(xnp) {\n let X = Math.sqrt(Math.pow(this.heigthFireBall(), 2) + Math.pow(xnp, 2))\n return Math.pow((this.diameterMax() / 2) / (X), 2)\n }", "function t4(){\n return (dataArray[numPoints-1][1]-dataArray[0][1])/(numPoints-1);\n }", "function SDPVTL(a, state) {\n const stack = state.stack;\n const p2i = stack.pop();\n const p1i = stack.pop();\n const p2 = state.z2[p2i];\n const p1 = state.z1[p1i];\n\n if (exports.DEBUG) console.log(state.step, 'SDPVTL[' + a + ']', p2i, p1i);\n\n let dx;\n let dy;\n\n if (!a) {\n dx = p1.x - p2.x;\n dy = p1.y - p2.y;\n } else {\n dx = p2.y - p1.y;\n dy = p1.x - p2.x;\n }\n\n state.dpv = getUnitVector(dx, dy);\n}", "function calcularPosicion (xMatriz, yMatriz) {\n\tvar x = xMatriz * anchoCelda;\n\tvar y = yMatriz * altoCelda;\n\treturn new Phaser.Point(x+Math.floor(anchoCelda*0.5),y+Math.floor(altoCelda*0.5));\n}", "function opp_cong(njd,np){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) maggio 2012.\n // funzione per il calcolo delle opposizioni/congiunzioni.\n // njd=numero del giorno giuliano.\n // np=numero identificativo pianeta.\n \n var x=100; // valore iniziale per le iterazioni\n \n var periodo= new Array(0.24085000, 0.6152100, 1.000040, 1.8808900, 11.8622400, 29.457710, 84.0124700, 164.7955800, 250.90000);\n\n // calcola il periodo sinodico del pianeta in giorni.\n \n var ps=Math.abs(periodo[2]*periodo[np]/(periodo[2]-periodo[np])); \n ps=ps*365.25636; // periodo sinodico in giorni.\n\n// ********************* PRIMA VERIFICA ************************** - INIZIO \n\n var le=pos_pianeti(njd,np); // trova le longitudini eliocentriche della Terra e del pianeta (np).\n var LT=gradi_360(le[7]+180); // longitudine eliocentrica della Terra.\n var LP=gradi_360(le[9]); // longitudine eliocentrica del pianeta (np).\n \n var delta_L1= Math.abs(LP-LT);\n var delta_L2= 360-Math.abs(LP-LT);\n \n// ******************************************************************* PER I PIANETI ESTERNI. \n\n if(LP>LT && periodo[np]>periodo[2]) { x=(delta_L1/360)*ps; }\n\n else if(LP<LT && periodo[np]>periodo[2]) { x=(delta_L2/360)*ps; }\n\n\n// ******************************************************************* PER I PIANETI INTERNI. \n\n if(LP>LT && periodo[np]<periodo[2]) { x=(delta_L2/360)*ps; }\n\n else if(LP<LT && periodo[np]<periodo[2]) { x=(delta_L1/360)*ps; }\n\n\n// ******************************************************************************************\n\n njd=njd+x; \n\n// inizia il ciclo delle iterazioni.\n\n while (Math.abs(x)>0.00001){\n\n le=pos_pianeti(njd,np); // trova le longitudini eliocentriche della terra e del pianeta (np). \n LT=gradi_360(le[7]+180); // longitudine eliocentrica della Terra.\n LP=gradi_360(le[9]); // longitudine eliocentrica del pianeta (np).\n\n // per i pianeti esterni.\n\n if (periodo[np]>periodo[2]){ x=((LP-LT)/360)*ps;} \n\n // per i pianeti interni.\n\n if (periodo[np]<periodo[2]){ x=((LT-LP)/360)*ps;} \n\n njd=njd+x; // giorno giuliano dell'evento.\n}\n\n // fine il ciclo di iterazioni.\n\n var dati=new Array (njd,LT,LP,ps); // risultati\n\nreturn dati;\n\n}", "function obli_ecli(njd){\n\n // calcola l'obliquità dell'eclittica.\n // per l'equinozio della data.\n // T= numero di secoli giuliani dallo 0.5 gennaio 1900.\n\n var T=(njd-2415020.0)/36525;\n\n var obli_eclittica=23.452294-0.0130125*T-0.00000164*T*T+0.000000503*T*T*T;\n\nreturn obli_eclittica; //obliquità in gradi\n\n}", "function sukeistiMasyvo2elementus(x,y) {\n var temp = prekiautojai[y];\n prekiautojai[y] = prekiautojai[x];\n prekiautojai[x] = temp;\n console.log( \"po sukeitimo prekybos centrai:\", prekiautojai );\n}", "function afase_pianeta(njd,AR,DE,dist_ps,dist_pt){\n\n // funzione per il calcolo dell'angolo di fase per un pianeta.\n // AR,DE sono le coordinate equatoriali decimali, del pianeta.\n // njd= numero del giorno giuliano.\n // dist_ps=distanza pianeta-sole in UA.\n // dist_pt=distanza pianeta-Terra in UA.\n // by Salvatore Ruiu - gennaio 2013.\n\n var coo_sole=pos_sole(njd); // coordinate equatoriali decimali del Sole.\n var Rs=coo_sole[4]; // distanza Terra-Sole. \n var elongaz=elong(AR,DE,coo_sole[0],coo_sole[1]); // elongazione in gradi dal Sole.\n\n // calcolo dell'angolo di fase in gradi . \n\n var Dpt= dist_pt; // distanza pianeta-terra.\n var Dts= Rs; // distanza terra-sole.\n var Dps= dist_ps; // distanza pianeta-sole.\n\n // risolve il teorema del coseno (noti i 3 lati del triangolo).\n\n var delta_fase=(Dts*Dts+Dps*Dps-Dpt*Dpt)/(2*Dps*Dts);\n delta_fase=Math.acos(delta_fase); \n delta_fase=Rda(delta_fase);\n\n var angolo_fase=180-Math.abs(elongaz)-delta_fase; // risultato: angolo di fase in gradi.\n\nreturn angolo_fase;\n\n}", "function porPantalla(x, y) {\n\tdocument.write(\"suma: \"+(x+y)+\"<br>\");\n\tdocument.write(\"resta: \"+(x-y)+\"<br>\");\n\tdocument.write(\"*******************\"+\"<br>\");\n}", "function pointLineaire() {\n\tpoint1 = board.create('point', [1, (ordonnee + pente)], {\n\t\tstyle : 6,\n\t\tname : 'p1'\n\t});\n\tpoint1.setAttribute({\n\t\tstrokeColor : 'blue',\n\t\tfillColor : 'yellow',\n\t\tsize : 4\n\t});\n\tpoint2 = board.create('point', [(ordonnee / -pente), 0], {\n\t\tstyle : 6,\n\t\tname : 'p2'\n\t});\n\tpoint2.setAttribute({\n\t\tstrokeColor : 'blue',\n\t\tfillColor : 'yellow',\n\t\tsize : 4\n\t});\n\tpoint3 = board.create('point', [0, (ordonnee)], {\n\t\tvisible : false,\n\t\tstyle : 6\n\t});\n\tvar ligne = board.create('line', [point1, point2]);\n\t// affichage dynamique de l'équation à l'extérieur du graphe\n\tboard.on('update', function() {\n\t\tdocument.getElementById('equationGraph').innerHTML = \"y = \" + dynamiqueA() + 'x + ' + dynamiqueB();\n\t});\n\t//creation triangle de la pente pour equation de premier degree/\n\ttriangle = board.create('slopetriangle', [ligne, point1], {\n\t\tvisible : false\n\t});\n\ttriangle.label.setAttribute({\n\t\tvisible : false\n\t});\n\taffichageEquationLineairePoint(point1, point2);\n\tdocument.getElementById(\"equationGraph\").innerHTML = \" Équation linéaire: y = \" + pente + \"x\" + \" + \" + ordonnee;\n\tmisajour();\n}", "function SDPVTL(a, state) {\n var stack = state.stack;\n var p2i = stack.pop();\n var p1i = stack.pop();\n var p2 = state.z2[p2i];\n var p1 = state.z1[p1i];\n\n if (DEBUG) console.log('SDPVTL[' + a + ']', p2i, p1i);\n\n var dx;\n var dy;\n\n if (!a) {\n dx = p1.x - p2.x;\n dy = p1.y - p2.y;\n } else {\n dx = p2.y - p1.y;\n dy = p1.x - p2.x;\n }\n\n state.dpv = getUnitVector(dx, dy);\n}", "function erfc2(y) {\n var xnum = P[1][8] * y;\n var xden = y;\n var i;\n\n for (i = 0; i < 7; i += 1) {\n xnum = (xnum + P[1][i]) * y;\n xden = (xden + Q[1][i]) * y;\n }\n var result = (xnum + P[1][7]) / (xden + Q[1][7]);\n var ysq = parseInt(y * 16) / 16;\n var del = (y - ysq) * (y + ysq);\n return Math.exp(-ysq*ysq) * Math.exp(-del) * result;\n }", "function erfc2(y) {\n var xnum = P[1][8] * y;\n var xden = y;\n var i;\n\n for (i = 0; i < 7; i += 1) {\n xnum = (xnum + P[1][i]) * y;\n xden = (xden + Q[1][i]) * y;\n }\n var result = (xnum + P[1][7]) / (xden + Q[1][7]);\n var ysq = parseInt(y * 16) / 16;\n var del = (y - ysq) * (y + ysq);\n return Math.exp(-ysq*ysq) * Math.exp(-del) * result;\n }", "function sk_linearInterp( x1, x2, y1, y2, x)\n{\n if( x1 == x2)\n throw \"x1 (\" + String(x1) + \") and x2 (\" + String(x2) + \") must NOT no equal.\"; \n\n return ( y1 * ( x2 - x) + y2 * ( x - x1)) / ( x2 - x1);\n}", "function forward(p) {\n var lon = p.x;\n var lat = p.y;\n var dlon = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common_adjust_lon__[\"a\" /* default */])(lon - this.long0);\n var us, vs;\n var con;\n if (Math.abs(Math.abs(lat) - __WEBPACK_IMPORTED_MODULE_3__constants_values__[\"b\" /* HALF_PI */]) <= __WEBPACK_IMPORTED_MODULE_3__constants_values__[\"a\" /* EPSLN */]) {\n if (lat > 0) {\n con = -1;\n }\n else {\n con = 1;\n }\n vs = this.al / this.bl * Math.log(Math.tan(__WEBPACK_IMPORTED_MODULE_3__constants_values__[\"f\" /* FORTPI */] + con * this.gamma0 * 0.5));\n us = -1 * con * __WEBPACK_IMPORTED_MODULE_3__constants_values__[\"b\" /* HALF_PI */] * this.al / this.bl;\n }\n else {\n var t = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common_tsfnz__[\"a\" /* default */])(this.e, lat, Math.sin(lat));\n var ql = this.el / Math.pow(t, this.bl);\n var sl = 0.5 * (ql - 1 / ql);\n var tl = 0.5 * (ql + 1 / ql);\n var vl = Math.sin(this.bl * (dlon));\n var ul = (sl * Math.sin(this.gamma0) - vl * Math.cos(this.gamma0)) / tl;\n if (Math.abs(Math.abs(ul) - 1) <= __WEBPACK_IMPORTED_MODULE_3__constants_values__[\"a\" /* EPSLN */]) {\n vs = Number.POSITIVE_INFINITY;\n }\n else {\n vs = 0.5 * this.al * Math.log((1 - ul) / (1 + ul)) / this.bl;\n }\n if (Math.abs(Math.cos(this.bl * (dlon))) <= __WEBPACK_IMPORTED_MODULE_3__constants_values__[\"a\" /* EPSLN */]) {\n us = this.al * this.bl * (dlon);\n }\n else {\n us = this.al * Math.atan2(sl * Math.cos(this.gamma0) + vl * Math.sin(this.gamma0), Math.cos(this.bl * dlon)) / this.bl;\n }\n }\n\n if (this.no_rot) {\n p.x = this.x0 + us;\n p.y = this.y0 + vs;\n }\n else {\n\n us -= this.uc;\n p.x = this.x0 + vs * Math.cos(this.alpha) + us * Math.sin(this.alpha);\n p.y = this.y0 + us * Math.cos(this.alpha) - vs * Math.sin(this.alpha);\n }\n return p;\n}", "function ActualiserPointsVie(){\n\t//les PDV diminuent si le joueur s'eloigne des artefacts (zoneSure) sans lumiere (torcheJoueur)\n\tif(transform.Find(\"torcheJoueur(Clone)\") == null && !zoneSure){\n\t\tif(vitesseCorruption < 0){\n\t\t\tvitesseCorruption = 0;\n\t\t}else{\n\t\t\tvitesseCorruption += Time.deltaTime/2;\n\t\t}\n\t\tpointsVie -= vitesseCorruption*Time.deltaTime;\n\t} else{\n\t\t//la vitesse de reduction des PDV diminue jusqu'a 0\n\t\tif(vitesseCorruption > 0){\n\t\t\tvitesseCorruption -= Time.deltaTime*2;\n\t\t}else{\n\t\t\tvitesseCorruption = 0;\n\t\t\t//soigne si la vitesse de corruption est 0 et le joueur a obtenu la potion\n\t\t\tif(Joueur.powerUpPotion){\n\t\t\t\tpointsVie += Time.deltaTime;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}\n\t//actualise l'element visuel\n\tbarreVie.fillAmount = pointsVie/pointsVieMax;\n}", "if(lineFirst[2]){ d = d2; p0 = tri.p0; p1 = tri.p2; }", "function n(e,r,t){const{x:o,y:s}=r;if(t<2){return {x:e[0]+o*e[2]+s*e[4],y:e[1]+o*e[3]+s*e[5]}}if(2===t){const r=o*o,t=s*s,i=o*s;return {x:e[0]+o*e[2]+s*e[4]+r*e[6]+i*e[8]+t*e[10],y:e[1]+o*e[3]+s*e[5]+r*e[7]+i*e[9]+t*e[11]}}const i=o*o,n=s*s,p=o*s,a=i*o,f=i*s,c=o*n,l=s*n;return {x:e[0]+o*e[2]+s*e[4]+i*e[6]+p*e[8]+n*e[10]+a*e[12]+f*e[14]+c*e[16]+l*e[18],y:e[1]+o*e[3]+s*e[5]+i*e[7]+p*e[9]+n*e[11]+a*e[13]+f*e[15]+c*e[17]+l*e[19]}}", "function erfc2(y) {\n var xnum = P[1][8] * y;\n var xden = y;\n var i;\n\n for (i = 0; i < 7; i += 1) {\n xnum = (xnum + P[1][i]) * y;\n xden = (xden + Q[1][i]) * y;\n }\n\n var result = (xnum + P[1][7]) / (xden + Q[1][7]);\n var ysq = parseInt(y * 16) / 16;\n var del = (y - ysq) * (y + ysq);\n return Math.exp(-ysq * ysq) * Math.exp(-del) * result;\n }", "function erfc2(y) {\n var xnum = P[1][8] * y;\n var xden = y;\n var i;\n\n for (i = 0; i < 7; i += 1) {\n xnum = (xnum + P[1][i]) * y;\n xden = (xden + Q[1][i]) * y;\n }\n\n var result = (xnum + P[1][7]) / (xden + Q[1][7]);\n var ysq = parseInt(y * 16) / 16;\n var del = (y - ysq) * (y + ysq);\n return Math.exp(-ysq * ysq) * Math.exp(-del) * result;\n }", "function differentiate (data) {\n for (var i = 1; i < data.length - 1; i++) {\n data[i].yDeriv = ((data[i + 1].y - data[i - 1].y) / (data[i + 1].x - data[i - 1].x)) * 86400000 //multiply by number of milliseconds per day to get daily rate of change\n }\n data[data.length - 1].yDeriv = ((data[data.length - 1].y - data[data.length - 2].y) / (data[data.length - 1].x - data[data.length - 2].x)) * 86400000\n return data\n }", "function _f(x, y) {\n return (g.tx - x) * (g.tx - x) + (g.ty - y) * (g.ty - y);\n}", "function calcularNovaPonta(conceitoContainer, ligacaoContainer){\r\n \tvar coordenadas = new Coordenadas(new Array(),new Array());\r\n \tvar coordenadasFinais = new Coordenadas(new Object(),new Object());\r\n \tvar conceitoX = parseFloat(conceitoContainer.x);\r\n \tvar conceitoY = parseFloat(conceitoContainer.y);\r\n \tvar ligacaoX = parseFloat(ligacaoContainer.x);\r\n \tvar ligacaoY = parseFloat(ligacaoContainer.y);\r\n \t\r\n \tvar larguraConceito = gerenciadorLigacao.getLargura(conceitoContainer);\r\n \tvar alturaConceito = gerenciadorLigacao.getAltura(conceitoContainer);\r\n \tvar larguraLigacao = gerenciadorLigacao.getLargura(ligacaoContainer);\r\n \tvar alturaLigacao = gerenciadorLigacao.getAltura(ligacaoContainer);\r\n \t\r\n \t\r\n \tfor(var i=0;i<8;i++){\r\n \t\tcoordenadas.conceito[i] = new Object();\r\n \t\tcoordenadas.ligacao[i] = new Object();\r\n \t}\r\n \t\r\n \t//para o conceito\r\n \tcoordenadas.conceito[0].x = conceitoX;\r\n \tcoordenadas.conceito[0].y = conceitoY;\r\n \t\r\n \tcoordenadas.conceito[1].x = conceitoX + (larguraConceito/2);\r\n \tcoordenadas.conceito[1].y = conceitoY;\r\n \t\r\n \tcoordenadas.conceito[2].x = conceitoX + (larguraConceito);\r\n \tcoordenadas.conceito[2].y = conceitoY;\r\n \t\r\n \tcoordenadas.conceito[3].x = conceitoX + (larguraConceito);\r\n \tcoordenadas.conceito[3].y = conceitoY + (alturaConceito/2);\r\n \t\r\n \tcoordenadas.conceito[4].x = conceitoX + (larguraConceito);\r\n \tcoordenadas.conceito[4].y = conceitoY + (alturaConceito);\r\n \t\r\n \tcoordenadas.conceito[5].x = conceitoX + (larguraConceito/2);\r\n \tcoordenadas.conceito[5].y = conceitoY + (alturaConceito);\r\n \t\r\n \tcoordenadas.conceito[6].x = conceitoX;\r\n \tcoordenadas.conceito[6].y = conceitoY + (alturaConceito);\r\n \t\r\n \tcoordenadas.conceito[7].x = conceitoX;\r\n \tcoordenadas.conceito[7].y = conceitoY + (alturaConceito/2);\r\n \t\r\n \t//para a ligacao\r\n \tcoordenadas.ligacao[0].x = ligacaoX;\r\n \tcoordenadas.ligacao[0].y = ligacaoY;\r\n \t\r\n \tcoordenadas.ligacao[1].x = ligacaoX + (larguraLigacao/2);\r\n \tcoordenadas.ligacao[1].y = ligacaoY;\r\n \t\r\n \tcoordenadas.ligacao[2].x = ligacaoX + (larguraLigacao);\r\n \tcoordenadas.ligacao[2].y = ligacaoY;\r\n \t\r\n \tcoordenadas.ligacao[3].x = ligacaoX + (larguraLigacao);\r\n \tcoordenadas.ligacao[3].y = ligacaoY + (alturaLigacao/2);\r\n \t\r\n \tcoordenadas.ligacao[4].x = ligacaoX + (larguraLigacao);\r\n \tcoordenadas.ligacao[4].y = ligacaoY + (alturaLigacao);\r\n \t\r\n \tcoordenadas.ligacao[5].x = ligacaoX + (larguraLigacao/2);\r\n \tcoordenadas.ligacao[5].y = ligacaoY + (alturaLigacao);\r\n \t\r\n \tcoordenadas.ligacao[6].x = ligacaoX;\r\n \tcoordenadas.ligacao[6].y = ligacaoY + (alturaLigacao);\r\n \t\r\n \tcoordenadas.ligacao[7].x = ligacaoX;\r\n \tcoordenadas.ligacao[7].y = ligacaoY + (alturaLigacao/2);\r\n \t\r\n \t\r\n \tif(ligacaoY >= coordenadas.conceito[6].y){ //pontaLigacao[1] � pontaConceito[5]\r\n \t\t\r\n \t\tcoordenadasFinais.conceito.x = coordenadas.conceito[5].x;\r\n \t\tcoordenadasFinais.conceito.y = coordenadas.conceito[5].y;\r\n \t\tcoordenadasFinais.ligacao.x = coordenadas.ligacao[1].x;\r\n \t\tcoordenadasFinais.ligacao.y = coordenadas.ligacao[1].y;\r\n \t\treturn coordenadasFinais;\r\n \t}\r\n \tif(ligacaoY < coordenadas.conceito[6].y && coordenadas.ligacao[4].x <= conceitoX){ //pontaLigacao[3] � pontaConceito[7]\r\n \t\t\r\n \t\tcoordenadasFinais.conceito.x = coordenadas.conceito[7].x;\r\n \t\tcoordenadasFinais.conceito.y = coordenadas.conceito[7].y;\r\n \t\tcoordenadasFinais.ligacao.x = coordenadas.ligacao[3].x;\r\n \t\tcoordenadasFinais.ligacao.y = coordenadas.ligacao[3].y;\r\n \t\treturn coordenadasFinais;\r\n \t}\r\n \tif(coordenadas.ligacao[5].y <= conceitoY){ //pontaLigacao[5] � pontaConceito[1]\r\n \t\t\r\n \t\tcoordenadasFinais.conceito.x = coordenadas.conceito[1].x;\r\n \t\tcoordenadasFinais.conceito.y = coordenadas.conceito[1].y;\r\n \t\tcoordenadasFinais.ligacao.x = coordenadas.ligacao[5].x;\r\n \t\tcoordenadasFinais.ligacao.y = coordenadas.ligacao[5].y;\r\n \t\treturn coordenadasFinais;\r\n \t}\r\n \tif(coordenadas.ligacao[6].y > conceitoY && coordenadas.ligacao[4].x >= conceitoX){ //pontaLigacao[3] � pontaConceito[7]\r\n \t\t\r\n \t\tcoordenadasFinais.conceito.x = coordenadas.conceito[3].x;\r\n \t\tcoordenadasFinais.conceito.y = coordenadas.conceito[3].y;\r\n \t\tcoordenadasFinais.ligacao.x = coordenadas.ligacao[7].x;\r\n \t\tcoordenadasFinais.ligacao.y = coordenadas.ligacao[7].y;\r\n \t\treturn coordenadasFinais;\r\n \t}\t\r\n }", "xToOverpressure(xTNT){\n const a1 = -0.214362789151;\n const b1 = 1.35034249993;\n const c01 = 2.78076916577;\n const c11 = -1.6958988741;\n const c21 = -0.154159376846;\n const c31 = 0.514060730593;\n const c41 = 0.0988554365274;\n const c51 = -0.293912623038;\n const c61 = -0.0268112345019;\n const c71 = 0.109097496421;\n const c81 = 0.001628467556311;\n const c91 = -0.0214631030242;\n const c101 = 0.0001456723382;\n const c111 = 0.00167847752266;\n \n //Calculo de Masa equivalente de TNT\n let masaEQTNT = (this.fe*this.hCombKJKG*this.mass)/DHCTNT;\n \n //Distancia Escalada (m/kg^1/3)\n let z = xTNT/Math.pow(masaEQTNT, 1.0/3.0);\n \n let ablog = a1+b1*Math.log10(z);\n let c = c01+c11*ablog+c21*Math.pow(ablog, 2)+c31*Math.pow(ablog, 3)+c41*Math.pow(ablog, 4)+c51*Math.pow(ablog, 5)+c61*Math.pow(ablog, 6)+c71*Math.pow(ablog, 7)+c81*Math.pow(ablog, 8)+c91*Math.pow(ablog, 9)+c101*Math.pow(ablog, 10)+c111*Math.pow(ablog, 11);\n let pres = Math.pow(10, c);\n return pres;\n\n }", "constructor(p1, p2) {\n if (p1.x == p2.x && p1.y == p2.y) {\n console.log(new Error(\"Points are the same\"));\n }\n this.p1 = {\n a: Number(p1.a),\n d: Number(p1.d),\n x: Number(p1.x),\n y: Number(p1.y)\n }\n this.p2 = {\n a: Number(p2.a),\n d: Number(p2.d),\n x: Number(p2.x),\n y: Number(p2.y),\n }\n let f = Line.getFormula(this.p1, this.p2);\n this.f = {\n m: f.m,\n b: f.b,\n x: f.x // if applicable\n }\n }", "densitateaDeRepartitieCazulRedus(x) {\n\t\t\treturn ( (1 / (Math.sqrt(2 * Math.PI))) * (Math.pow(Math.E, (Math.pow(x, 2) / 2))) );\n\t\t}", "function defline(p1, p2){\n var a = p1[1] - p2[1];\n var b = p1[0] - p2[0];\n return [a, -b, b * p1[1] - a * p1[0]];\n}", "function Oseen(x, y, fx, fy, vxy){\n var xx = x*x;\n var yy = y*y;\n var xy = x*y;\n var rr = xx + yy;\n var r = Math.sqrt(rr);\n\n vxy[0] = vxy[0] + (fx + (xx*fx + xy*fy)/rr)/r;\n vxy[1] = vxy[1] + (fy + (xy*fx + yy*fy)/rr)/r;\n}", "function trasf_ecli_equa(njd,long,lat){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) dicembre 2009\n // funzione per trasformare le coordinate eclittiche in equatoriali.\n // long e lat: coordinate ecclittiche dell'astro in gradi sessadecimali.\n // njd=numero del giorno giuliano.\n\nvar obli_eclittica=obli_ecli(njd);\n obli_eclittica=obli_eclittica/180*Math.PI; \n \nlong=long/180*Math.PI;\n lat= lat/180*Math.PI;\n\nvar y=Math.sin(long)*Math.cos(obli_eclittica)-Math.tan(lat)*Math.sin(obli_eclittica);\nvar x=Math.cos(long);\n\nvar ascensione_retta=quadrante(y,x)/15;\n\nvar declinazione=Math.sin(lat)*Math.cos(obli_eclittica)+Math.cos(lat)*Math.sin(obli_eclittica)*Math.sin(long);\n declinazione=Math.asin(declinazione);\n declinazione=declinazione*180/Math.PI;\n\nvar coord_equa= new Array(ascensione_retta,declinazione) ; // restituisce le variabili AR e DEC .\n\nreturn coord_equa;\n\n}", "decc() {\n\t\tlet maxvx = 0.0;\n\t\tlet maxvy = 0.0;\n\n\t\tif( this.vx < maxvx ){\n\t\t\tthis.vx += this.dc;\n\t\t} else if( this.vx > maxvx ){\n\t\t\tthis.vx -= this.dc;\n\t\t}\n\n\t\tif( this.vy < maxvy ){\n\t\t\tthis.vy += this.dc;\n\t\t} else if( this.vy > maxvy ){\n\t\t\tthis.vy -= this.dc;\n\t\t}\n\n\t\tif( Math.abs( this.vx ) < 0.001 ) {\n\t\t\tthis.vx = 0;\n\t\t}\n\t\tif( Math.abs( this.vy ) < 0.001 ) {\n\t\t\tthis.vy = 0;\n\t\t}\n\t}", "function pos_pianeti(njd,np){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) novembre 2010\n // calcola la posizione dei pianeti \n // njd= numero del giorno giuliano della data in T.U.\n // np= numero identificativo del pianeta 0,1,2,3,4,5,6,7,8 mercurio,venere... 2 per la Terra\n // coordinate geocentriche del pianeta riferite all'equinozio della data (njd).\n // calcola le principali perturbazioni planetarie.\n\n // new Array(Periodo , Long_media , Anomalia_media , Long_perielio , eccentr , Semiasse , Inclinazione , Long_nodo , dim_ang , magnitudine);\n // 0 1 2 3 4 5 6 7 8 9\n\n var tempo_luce=t_luce(njd,np);\n \n njd=njd-tempo_luce; // correzione per il tempo luce.\n\n var el_orb=orb_plan(njd,np); // recupera gli elementi orbitali del pianeta.\n\n var periodo= el_orb[0]; // periodo.\n var L= el_orb[1]; // longitudine media all'epoca.\n var AM_media= el_orb[2]; // anomalia media. \n var long_peri= el_orb[3]; // longitudine del perielio.\n var eccent= el_orb[4]; // eccentricità dell'orbita.\n var semiasse= el_orb[5]; // semiasse maggiore.\n var inclinaz= el_orb[6]; // inclinazione.\n var long_nodo= el_orb[7]; // longitudine del nodo.\n var dimens= el_orb[8]; // dimensioni apparenti.\n var magn= el_orb[9]; // magnitudine.\n\n \n var correzioni_orb=pos_pianeticr(njd,np); // calcolo delle correzioni per il pianeta (np).\n \n// Array(Delta_LP , Delta_R , Delta_LL , Delta_AS , Delta_EC , Delta_MM , Delta_LAT_ELIO);\n// 0 1 2 3 4 5 6 \n// lperiodo, rvett long. assemagg ecc M lat\n\n// CORREZIONI \n\n L=L+correzioni_orb[0]; // longitudine media.\n AM_media= AM_media+correzioni_orb[5]; // anomalia media + correzioni..\n semiasse= semiasse+correzioni_orb[3]; // semiasse maggiore.\n eccent= eccent+correzioni_orb[4]; // eccentricità.\n\n // LONGITUDINE ELIOCENTRICA DEL PIANETA ***************************************************** inizio:\n\n var M=AM_media; // anomalia media \n \n M=gradi_360(M); // intervallo 0-360;\n\n var E=eq_keplero(M,eccent); // equazione di Keplero.E[0]=Anomalia eccentrica E[1]=Anomalia vera in radianti.\n \n var rv=semiasse*(1-eccent*Math.cos(E[0])); // calcolo del raggio vettore (distanza dal Sole).\n rv=rv+correzioni_orb[1]; // raggio vettore più correzione.\n\n\n var U=gradi_360(L+Rda(E[1])-M-long_nodo); // argomento della latitudine.\n\n var long_eccliticay=Math.cos(Rad(inclinaz))*Math.sin(Rad(U));\n var long_eccliticax=Math.cos(Rad(U));\n\n var long_ecclitica=quadrante(long_eccliticay,long_eccliticax)+long_nodo;\n var l=gradi_360(long_ecclitica);\n l=l+correzioni_orb[2]; // longitudine del pianeta + correzione.\n\n // LONGITUDINE ELIOCENTRICA DEL PIANETA ********************************************************* fine: \n\n var b=Rda(Math.asin(Math.sin(Rad(U))*Math.sin(Rad(inclinaz)))); // latitudine ecclittica in gradi (b)\n\n // LONGITUDINE E RAGGIO VETTORE DEL SOLE *** inizio:\n\n njd=njd+tempo_luce; \n\n var eff_sole=pos_sole(njd);\n var LS=eff_sole[2]; // longitudine geocentrica del Sole.\n var RS=eff_sole[4]; // raggio vettore.\n \n // LONGITUDINE E RAGGIO VETTORE DEL SOLE *** fine: \n\n // longitudine geocentrica.\n\n var Y=rv*Math.cos(Rad(b))*Math.sin(Rad(l-LS));\n var X=rv*Math.cos(Rad(b))*Math.cos(Rad(l-LS))+RS;\n\n var long_geo=gradi_360(quadrante(Y,X)+LS); // longitudine geocentrica.\n\n var dist_p=Y*Y+X*X+(rv*Math.sin(Rad(b)))*(rv*Math.sin(Rad(b))); \n dist_p=Math.sqrt(dist_p); // distanza del pianeta dalla Terra.\n\n var beta=(rv/dist_p)*Math.sin(Rad(b));\n var lat_geo=Rda(Math.asin(beta));\n lat_geo=lat_geo+correzioni_orb[6]; // latitudine + correzione.\n\n \n// fase del pianeta.\n\nvar fase=0.5*(1+Math.cos(Rad(long_geo-long_ecclitica)));\n fase=fase.toFixed(2);\n\n// parallasse del pianeta in gradi.\n\nvar pa=(8.794/dist_p)/3600;\n\nvar coo_pl=trasf_ecli_equa(njd,long_geo,lat_geo); // coordinate equatoriali. \n\n // diametro apparente in secondi d'arco.\n\nvar diam_app=dimens/dist_p; \n\n// magnitudine del pianeta.\n\nvar magnitudine=(5*(Math.log(rv*dist_p/(magn*Math.sqrt(fase))))/2.302580)-27.7;\n magnitudine=magnitudine.toFixed(1);\n\nif (magnitudine==Infinity) {magnitudine=\"nd\"; }\n\nvar elongaz=elong(coo_pl[0],coo_pl[1],eff_sole[0],eff_sole[1]); // elongazione in gradi dal Sole.\n \n // calcolo dell'angolo di fase in gradi . \n\n var Dpt= dist_p; // distanza pianeta-terra.\n var Dts= RS; // distanza terra-sole.\n var Dps= rv; // distanza pianeta-sole.\n\n // teorema del coseno\n\n var delta_fase=(Dts*Dts+Dps*Dps-Dpt*Dpt)/(2*Dps*Dts);\n delta_fase=Math.acos(delta_fase); \n delta_fase=Rda(delta_fase);\n\n var angolo_fase=180-Math.abs(elongaz)-delta_fase; // angolo di fase in gradi.\n \nvar dati_pp= new Array(coo_pl[0],coo_pl[1],fase,magnitudine,dist_p,diam_app,elongaz,LS,RS,long_ecclitica,pa,rv,angolo_fase);\n// 0 1 2 3 4 5 6 7 8 9 10 11 12 \n\n\n\n// risultati: ARetta,Declinazione,fase,magnitudine,distanza pianeta,diametro apparente, elongazione, long. sole,raggio vettore Terra, longituddine elio. pianeta, parallase,dist sole-pianeta. \n\nreturn dati_pp;\n}", "function resolver(){\n A = Number(document.getElementById(\"valorA\").value);\n B = Number(document.getElementById(\"valorB\").value);\n C = Number(document.getElementById(\"valorC\").value);\n \n delta = B**2 - 4*A*C; \n if (delta <= 0){\n document.getElementById(\"msg\").innerHTML = \"NÃO EXISTE RAIZ REAL\";\n } else{\n resX1 = (-B + delta**0.5) / (2*A);\n resX2 = (-B - delta**0.5) / (2*A);\n x1.innerHTML = resX1.toFixed(2); \n x2.innerHTML = resX2.toFixed(2); \n }\n}", "function forward(p) {\n var lon = p.x;\n var lat = p.y;\n\n var delta_lon = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__common_adjust_lon__[\"a\" /* default */])(lon - this.long0);\n var con;\n var x, y;\n var sin_phi = Math.sin(lat);\n var cos_phi = Math.cos(lat);\n\n if (!this.es) {\n var b = cos_phi * Math.sin(delta_lon);\n\n if ((Math.abs(Math.abs(b) - 1)) < __WEBPACK_IMPORTED_MODULE_4__constants_values__[\"a\" /* EPSLN */]) {\n return (93);\n }\n else {\n x = 0.5 * this.a * this.k0 * Math.log((1 + b) / (1 - b)) + this.x0;\n y = cos_phi * Math.cos(delta_lon) / Math.sqrt(1 - Math.pow(b, 2));\n b = Math.abs(y);\n\n if (b >= 1) {\n if ((b - 1) > __WEBPACK_IMPORTED_MODULE_4__constants_values__[\"a\" /* EPSLN */]) {\n return (93);\n }\n else {\n y = 0;\n }\n }\n else {\n y = Math.acos(y);\n }\n\n if (lat < 0) {\n y = -y;\n }\n\n y = this.a * this.k0 * (y - this.lat0) + this.y0;\n }\n }\n else {\n var al = cos_phi * delta_lon;\n var als = Math.pow(al, 2);\n var c = this.ep2 * Math.pow(cos_phi, 2);\n var cs = Math.pow(c, 2);\n var tq = Math.abs(cos_phi) > __WEBPACK_IMPORTED_MODULE_4__constants_values__[\"a\" /* EPSLN */] ? Math.tan(lat) : 0;\n var t = Math.pow(tq, 2);\n var ts = Math.pow(t, 2);\n con = 1 - this.es * Math.pow(sin_phi, 2);\n al = al / Math.sqrt(con);\n var ml = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common_pj_mlfn__[\"a\" /* default */])(lat, sin_phi, cos_phi, this.en);\n\n x = this.a * (this.k0 * al * (1 +\n als / 6 * (1 - t + c +\n als / 20 * (5 - 18 * t + ts + 14 * c - 58 * t * c +\n als / 42 * (61 + 179 * ts - ts * t - 479 * t))))) +\n this.x0;\n\n y = this.a * (this.k0 * (ml - this.ml0 +\n sin_phi * delta_lon * al / 2 * (1 +\n als / 12 * (5 - t + 9 * c + 4 * cs +\n als / 30 * (61 + ts - 58 * t + 270 * c - 330 * t * c +\n als / 56 * (1385 + 543 * ts - ts * t - 3111 * t)))))) +\n this.y0;\n }\n\n p.x = x;\n p.y = y;\n\n return p;\n}", "enPosDeUbicacion(x, y) {\n let ubicacionY = this.getAltoFicha() * 2 - this.getRadioParaFicha();\n let ubicacionX = this.getAnchoFichero() + this.getCeldaParaUbicar()/2;\n for(let col = 0; col < this.columna; col ++) {\n let x_ = ubicacionX - x;\n let y_ = ubicacionY - y;\n if(Math.sqrt(x_ * x_ + y_ * y_) < (this.getRadioParaFicha() * 0.8)) {\n return true;\n }\n ubicacionX += this.getCeldaParaUbicar();\n }\n }", "function m_distancia(px, py, dx1, dy1, dx2, dy2) {\r\n\r\n\tif (dx2 == dx1) {\r\n\t\tdx2 += 0.00001;\r\n\t}\r\n\r\n\tvar a = (dy2 - dy1) / (dx2 - dx1);\r\n\tvar b = -1;\r\n\tvar c = dy1 - a * dx1;\r\n\r\n\tvar dis = Math.abs((a * px + b * py + c) / Math.sqrt(a * a + b * b));\r\n\r\n\treturn dis;\r\n\r\n}", "function dpos(ip,fp,t){\r\n return new Vec2((fp.x-ip.x)/t,(fp.y-ip.y)/t);\r\n}", "function determinant(v1, v2) {\n return v1.getX()*v2.getY() - v1.getY()*v2.getX();\n }", "function forward$j(p) {\n var lon = p.x;\n var lat = p.y;\n /* Forward equations\n -----------------*/\n var dlon = adjust_lon(lon - this.long0);\n var x = this.x0 + this.a * dlon;\n var y = this.y0 + this.a * Math.log(Math.tan((Math.PI / 4) + (lat / 2.5))) * 1.25;\n\n p.x = x;\n p.y = y;\n return p;\n}", "decrire() \n {\n return `${this.nom} a ${this.sante} points de vie, ${\n this.force\n } en force et ${this.xp} points d'expérience`;\n }", "dy(y) {\n return this.y(new SVGNumber_SVGNumber(y).plus(this.y()));\n }", "function obliczPunkty(dane)\n{\n var ro = 1.21; // gęstośc czynnika\n var stosunek_et = [0.86, 0.98, 1, 0.966, 0.86]; // stosunek sprawności izentropowych\n\n var mi0 = (1 - (Math.sqrt(Math.sin(dane.beta2 * (Math.PI / 180))) / (Math.pow(dane.z, 0.7)))).toPrecision(3); // współczynnik zmniejszenia mocy wentylatora\n var u2 = ((dane.D2 * Math.PI * dane.n) / 60).toPrecision(3); // prędkość obwodowa wirnika\n var c2u = ((dane.deltapzn * 1000) / (ro * u2 * dane.etazn)).toPrecision(3); // prędkość zależna od ułopatkowania wirnika\n var fi2r = ((c2u * Math.tan(dane.alfa2 * Math.PI / 180)) / u2).toPrecision(3); // wskaźnik prędkości koła wirnikowego\n var fi2r0 = ((mi0 * fi2r) / (mi0 - (c2u / u2))).toPrecision(3); // wartośc wskaznika prędkości koła wirnikowego dla wartości zerowej charakterystyki koła wirnikowego\n var Qmax = (dane.Qzn * (fi2r0 / fi2r)).toPrecision(3); // przepływ maksymalny\n\n var krok = 0.6;\n\n var daneDoWykresu = {};\n daneDoWykresu.deltap = []; // tablica wartości sprężu (deltap)\n daneDoWykresu.Q = []; // tablica wartości wydajności\n daneDoWykresu.Q = []; // tablica wartości wydajności\n daneDoWykresu.eta = []; // etazn * stosunek_et\n\tdaneDoWykresu.wspQ = []; //współczynnik Q: 1-Q/Qmax\n\tdaneDoWykresu.mp = [] ; // tablica wartości mocy pobieranej\n\t\n /* obliczanie punktów charakterystyk */\n\t\n for (var i = 0; i < 5; i++)\n\t{\n daneDoWykresu.Q[i] = krok * dane.Qzn;\n daneDoWykresu.wspQ[i] = 1 - (daneDoWykresu.Q[i] / Qmax);\n daneDoWykresu.eta[i] = dane.etazn * stosunek_et[i];\n\t\tdaneDoWykresu.deltap[i] =((293/(273+dane.tc))*((ro * (Math.pow(u2, 2)) * mi0 * daneDoWykresu.wspQ[i] * daneDoWykresu.eta[i])) / 1000); // kPa\n\t\tdaneDoWykresu.mp[i] = ((daneDoWykresu.Q[i]*daneDoWykresu.deltap[i])/(daneDoWykresu.eta[i]*dane.etas))/100; // kW/100\n krok += 0.2;\n }\n return daneDoWykresu;\n}", "function marcar_puente(contexto, dient_1, dient_2, color_pas){\n var ctx = contexto;\n console.log('Puente de Diente Numero '+dient_1+' a '+dient_2);\n // Definiendo puntos de dibujo\n med = medida;\n num_diente1 = dient_1 - 1;\n num_diente2 = dient_2 - 1;\n color_line = color_pas;\n if (num_diente1<16){\n inicio_y = 80;\n }\n else{\n num_diente1 = num_diente1 - 16;\n num_diente2 = num_diente2 - 16;\n inicio_y = med + 160;\n }\n //alert(num_diente);\n inicio_x = (num_diente1*med) + (separacion_x*num_diente1) + separacion_x + (med/2);\n fin_x = (num_diente2*med) + (separacion_x*num_diente2) + separacion_x + (med/2);\n ctx.fillStyle = color_line;\n ctx.beginPath();\n ctx.lineWidth = 4;\n ctx.moveTo(inicio_x,inicio_y);\n ctx.lineTo(fin_x,inicio_y);\n //ctx.moveTo(inicio_x+40,inicio_y);\n //ctx.lineTo(inicio_x,inicio_y+40);\n ctx.stroke();\n ctx.lineWidth = 1;\n }", "function fz(a,b){this.cf=[];this.Wg=a;this.Og=b||null;this.sd=this.Pc=!1;this.Yb=void 0;this.Wf=this.ph=this.of=!1;this.hf=0;this.ub=null;this.pf=0}", "function f1(points) {\n\tp1 = points[0];\n\tp2 = points[2];\n\treturn (p2.X - p1.X) / Distance(p1, p2);\n}", "function Tracador3DWGL (aExpressao, aDominioInicial, aDominioIntervalo, aDominioPontos, aCor)\r\n\r\n{\r\n\tthis.erro= '';\r\n\tthis.angulo= 45;\r\n\tthis.calculadora3D= new Calculadora (aExpressao, ['x', 'y']);\r\n\tthis.dominioInicial= parseFloat (aDominioInicial);\r\n\tthis.dominioIntervalo= parseFloat (aDominioIntervalo);\r\n\tthis.dominioPontos= parseInt (aDominioPontos, 10);\r\n\tthis.dominioFinal= this.dominioInicial + this.dominioIntervalo*(this.dominioPontos-1);\r\n\tthis.imagemInicial= 0;\r\n\tthis.imagemFinal= 0;\r\n\tthis.cor= aCor ? aCor : [0.25, 0.41, 0.88, 1];\r\n\tthis.wgl= 0;\r\n\tthis.operador= 0;\r\n\tthis.matrizProjection= 0;\r\n\r\n\tif (isNaN (this.dominioInicial))\r\n\t\tthis.erro= 'Dominio inicial deve ser um numero real';\r\n\telse if (isNaN (this.dominioFinal))\r\n\t\tthis.erro= 'Dominio final deve ser um numero real';\r\n\telse if (isNaN (this.dominioIntervalo) || (this.dominioIntervalo == 0) || (this.dominioIntervalo < -16384) || (this.dominioIntervalo > 16384))\r\n\t\tthis.erro= 'Intervalo entre pontos do dominio deve ser um numero real diferente de 0 entre -16384 e 16384';\r\n\telse if (isNaN (this.dominioPontos) || (this.dominioPontos < 2) || (this.dominioPontos > 16384))\r\n\t\tthis.erro= 'Qtd pontos do dominio deve ser um numero inteiro entre 2 e 16384';\r\n\telse if (this.dominioInicial >= this.dominioFinal)\r\n\t\tthis.erro= 'Dominio inicial (' + this.dominioInicial + ') deve ser menor que o final (' + this.dominioFinal + ')';\r\n\telse if (this.calculadora3D.erroExp != '')\r\n\t\tthis.erro= 'Expressao incorreta: ' + this.calculadora3D.erroExp;\r\n}", "function Y(e,t){var n,i;for(z=e.length;--z>=0;){n=z,(i=z-1)<0&&(i=e.length-1);//console.log('b', i,j, i-1, k,vertices.length);\nvar r=0,o=m+2*b;for(r=0;r<o;r++){var a=U*r,s=U*(r+1);J(t+n+a,t+i+a,t+i+s,t+n+s)}}}", "function forward(p) {\n var gfi, u, deltav, s, d, eps, ro;\n var lon = p.x;\n var lat = p.y;\n var delta_lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(lon - this.long0);\n /* Transformation */\n gfi = Math.pow(((1 + this.e * Math.sin(lat)) / (1 - this.e * Math.sin(lat))), (this.alfa * this.e / 2));\n u = 2 * (Math.atan(this.k * Math.pow(Math.tan(lat / 2 + this.s45), this.alfa) / gfi) - this.s45);\n deltav = -delta_lon * this.alfa;\n s = Math.asin(Math.cos(this.ad) * Math.sin(u) + Math.sin(this.ad) * Math.cos(u) * Math.cos(deltav));\n d = Math.asin(Math.cos(u) * Math.sin(deltav) / Math.cos(s));\n eps = this.n * d;\n ro = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n);\n p.y = ro * Math.cos(eps) / 1;\n p.x = ro * Math.sin(eps) / 1;\n\n if (!this.czech) {\n p.y *= -1;\n p.x *= -1;\n }\n return (p);\n}", "if(lineFirst[1]){ d = d1; p0 = tri.n; p1 = tri.n2; }", "function pos_pianeticr(njd,np){\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) settembre 2010\n // termini di correzione per i pianeti Giove e Saturno.\n // np=numero identificativo del pianeta.\n\n var T=(njd-2415020.0)/36525;\n\n M=358.47583+35999.049750*T-0.000150*T*T-0.0000033*T*T*T; // Sole.\n\n M1=102.27938+149472.51529*T+0.000007*T*T; // Mercurio.\n M2=212.60322+ 58517.80387*T+0.001286*T*T; // Venere.\n M4=319.51913+ 19139.85475*T+0.000181*T*T; // Marte.\n M5=225.32833+ 3034.69202*T-0.000722*T*T; // Giove.\n M6=175.46622+ 1221.55147*T-0.000502*T*T; // Saturno.\n \n \n \n var Delta_LP=0; // termini correzione di lungo periodo.\n //var Delta_L=0; // correzione per la longitudine.\n var Delta_R=0; // correzione per il raggio vettore.\n\n var Delta_LL=0; // correzione per la longitudine.\n var Delta_P=0; // correzione per il perielio.\n var Delta_AS=0; // correzione semiasse maggiore.\n var Delta_EC=0; // correzione eccentricità.\n var Delta_MM=0; // correzione anomalia media.\n var Delta_LAT_ELIO=0; // correzione latitudine eliocentrica.\n \n\n// Correzioni per Mercurio - Perturbazioni in longitudine.\n// Da aggiungere dopo aver risolto l'E.Keplero\n\n if (np==0) {\n\n // longitudine\n\n Delta_LL=0.00204*Math.cos(Rad(5*M2-2*M1+12.220))\n +0.00103*Math.cos(Rad(2*M2-M1-160.6920))\n +0.00091*Math.cos(Rad(2*M5-M1-37.00300))\n +0.00078*Math.cos(Rad(5*M2-3*M1+10.137));\n\n // perturbazioni in raggio vettore\n\n Delta_R=0.000007525*Math.cos(Rad(2*M5-M1+53.013))\n +0.000006802*Math.cos(Rad(5*M2-3*M1-259.918))\n +0.000005457*Math.cos(Rad(2*M2-2*M1-71.188))\n +0.000003569*Math.cos(Rad(5*M2-M1-77.75));\n \n }\n\n// Correzioni per Venere -Perturbazioni in longitudine. \n// Delta_LP da aggiungere alla longitudine e anomalia media prima di aver risolto l'E.Keplero.\n// gli altri 2 termini dopo aver risolto l'E.Keplero.\n\nelse if(np==1) {\n\n // longitudine e anomalia media\n\n Delta_LP=0.00077*Math.sin(Rad(237.24+150.27*T));\n Delta_MM=Delta_LP;\n\n // longitudine\n\n Delta_LL=0.00313*Math.cos(Rad(2*M-2*M2-148.225))\n +0.00198*Math.cos(Rad(3*M-3*M2+2.565))\n +0.00136*Math.cos(Rad(M-M2-119.107))\n +0.00096*Math.cos(Rad(3*M-2*M2-135.912))\n +0.00082*Math.cos(Rad(M5-M2-208.087));\n\n // perturbazioni in raggio vettore\n\n Delta_R=0.000022501*Math.cos(Rad(2*M-2*M2-58.208))\n +0.000019045*Math.cos(Rad(3*M-3*M2+92.577))\n +0.000006887*Math.cos(Rad(M5-M2-118.090))\n +0.000005172*Math.cos(Rad(M-M2-29.110))\n +0.000003620*Math.cos(Rad(5*M-4*M2-104.208))\n +0.000003283*Math.cos(Rad(4*M-4*M2+63.513))\n +0.000003074*Math.cos(Rad(2*M5-2*M2-55.167));\n\n}\n\n// Correzioni per la Terra\n\nelse if (np==2) {\n\n Delta_LP=0;\n\n // correzioni ***************\n\n var A=153.23+22518.7541*T;\n var B=216.57+45037.5082*T;\n var C=312.69+32964.3577*T;\n var D=350.74+445267.1142*T-0.00144*T*T;\n var E=231.19+20.20*T;\n var H=353.40+65928.7155*T;\n\n // angoli in radianti.\n\n A=Rad(A); \n B=Rad(B); \n C=Rad(C); \n D=Rad(D); \n E=Rad(E); \n H=Rad(H); \n\n // correzione per la longitudine.\n\n var Delta_LL=0.00134*Math.cos(A)\n +0.00154*Math.cos(B)\n +0.00200*Math.cos(C)\n +0.00179*Math.sin(D)\n +0.00178*Math.sin(E);\n\n // correzioni per il raggio vettore.\n\n var Delta_R=0.00000543*Math.sin(A)\n +0.00001575*Math.sin(B)\n +0.00001627*Math.sin(C)\n +0.00003076*Math.cos(D) \n +0.00000927*Math.sin(H);\n \n}\n\n// correzioni per il pianeta Marte ******************************** INIZIO .\n// Delta_LP da aggiungere alla longitudine e anomalia media prima di aver risolto l'E.Keplero.\n// gli altri 2 termini dopo aver risolto l'E.Keplero.\n\n\nif (np==3) {\n\n // longitudine e anomalia media\n\nDelta_LP=-0.01133*Math.sin(Rad(3*M5-8*M4+4*M))\n -0.00933*Math.cos(Rad(3*M5-8*M4+4*M)); // termine lungo periodo.\nDelta_MM=Delta_LP;\n\n // longitudine\n\nDelta_LL=0.00705*Math.cos(Rad(M5-M4-48.958))\n +0.00607*Math.cos(Rad(2*M5-M4-118.350))\n +0.00445*Math.cos(Rad(2*M5-2*M4-191.897))\n +0.00388*Math.cos(Rad(M-2*M4+20.495))\n +0.00238*Math.cos(Rad(M-M4+35.097))\n +0.00204*Math.cos(Rad(2*M-3*M4+158.638))\n +0.00177*Math.cos(Rad(3*M4-M2-57.602))\n +0.00136*Math.cos(Rad(2*M-4*M4+154.093))\n +0.00104*Math.cos(Rad(M5+17.618));\n\n // raggio vettore\n\nDelta_R=0.000053227*Math.cos(Rad(M5-M4+41.1306))\n +0.000050989*Math.cos(Rad(2*M5-2*M4-101.9847))\n +0.000038278*Math.cos(Rad(2*M5-M4-98.3292))\n +0.000015996*Math.cos(Rad(M-M4-55.555))\n +0.000014764*Math.cos(Rad(2*M-3*M4+68.622))\n +0.000008966*Math.cos(Rad(M5-2*M4+43.615))\n +0.000007914*Math.cos(Rad(3*M5-2*M4-139.737))\n +0.000007004*Math.cos(Rad(2*M5-3*M4-102.888))\n +0.000006620*Math.cos(Rad(M-2*M4+113.202)) \n +0.000004930*Math.cos(Rad(3*M5-3*M4-76.243))\n +0.000004693*Math.cos(Rad(3*M-5*M4+190.603))\n +0.000004571*Math.cos(Rad(2*M-4*M4+244.702))\n +0.000004409*Math.cos(Rad(3*M5-M4-115.828));\n}\n\n// correzioni per il pianeta Marte ******************************** FINE.\n\n// correzioni per il pianeta Giove ******************************* INIZIO.\n// tutti i termini di Giove sono da aggiungere prima dell'equazione di Keplero\n\n\nif (np==4) {\n\n var X=(T/5)+0.1;\n var P=237.47555+3034.9061*T;\n var Q=265.91650+1222.1139*T;\n var S=243.51721+428.46770*T;\n var V=5*Q-2*P;\n var W=2*P-6*Q+3*S;\n var Z=Q-P;\n\n // ************************* A\n // correzione per la longitudine media da aggiungere prima dell'equazione di Keplero\n // solo per la longitudine media.\n\n Delta_LL=(0.331364-0.010281*X-0.004692*X*X)*Math.sin(Rad(V)) \n +(0.003228-0.064436*X+0.002075*X*X)*Math.cos(Rad(V)) \n -(0.003083+0.000275*X-0.000489*X*X)*Math.sin(Rad(2*V))\n +0.002472*Math.sin(Rad(W))\n +0.013619*Math.sin(Rad(Z))\n +0.018472*Math.sin(Rad(2*Z))\n +0.006717*Math.sin(Rad(3*Z))\n +0.002775*Math.sin(Rad(4*Z))\n +(0.007275-0.001253*X)*Math.sin(Rad(Z))*Math.sin(Rad(Q))\n +0.006417*Math.sin(Rad(2*Z))*Math.sin(Rad(Q))\n +0.002439*Math.sin(Rad(3*Z))*Math.sin(Rad(Q)) \n -(0.033839+0.001125*X)*Math.cos(Rad(Z))*Math.sin(Rad(Q))\n -0.003767*Math.cos(Rad(2*Z))*Math.sin(Rad(Q))\n -(0.035681+0.001208*X)*Math.sin(Rad(Z))*Math.cos(Rad(Q))\n -0.004261*Math.sin(Rad(2*Z))*Math.cos(Rad(Q))\n +0.002178*Math.cos(Rad(Q))\n +(-0.006333+0.001161*X)*Math.cos(Rad(Z))*Math.cos(Rad(Q))\n -0.006675*Math.cos(Rad(2*Z))*Math.cos(Rad(Q))\n -0.002664*Math.cos(Rad(3*Z))*Math.cos(Rad(Q))\n -0.002572*Math.sin(Rad(Z))*Math.sin(Rad(2*Q))\n -0.003567*Math.sin(Rad(2*Z))*Math.sin(Rad(2*Q))\n +0.002094*Math.cos(Rad(Z))*Math.cos(Rad(2*Q))\n +0.003342*Math.cos(Rad(2*Z))*Math.cos(Rad(2*Q));\n\n // correzione per l'anomalia media -- più in fondo nel listato.\n\n // perturbazioni perielio da utilizzare per calcolare M. (vedi in fondo nel listato)\n\n Delta_P=(0.007192-0.003147*X)*Math.sin(Rad(V))\n +(-0.020428-0.000675*X+0.000197*X*X)*Math.cos(Rad(V))\n +(0.007269+0.000672*X)*Math.sin(Rad(Z))*Math.sin(Rad(Q))\n -0.004344*Math.sin(Rad(Q))\n +0.034036*Math.cos(Rad(Z))*Math.sin(Rad(Q))\n +0.005614*Math.cos(Rad(2*Z))*Math.sin(Rad(Q))\n +0.002964*Math.cos(Rad(3*Z))*Math.sin(Rad(Q))\n +0.037761*Math.sin(Rad(Z))*Math.cos(Rad(Q))\n +0.006158*Math.sin(Rad(2*Z))*Math.cos(Rad(Q))\n -0.006603*Math.cos(Rad(Z))*Math.cos(Rad(Q))\n -0.005356*Math.sin(Rad(Z))*Math.sin(Rad(2*Q))\n +0.002722*Math.sin(Rad(2*Z))*Math.sin(Rad(2*Q))\n +0.004483*Math.cos(Rad(Z))*Math.sin(Rad(2*Q))\n -0.002642*Math.cos(Rad(2*Z))*Math.sin(Rad(2*Q))\n +0.004403*Math.sin(Rad(Z))*Math.cos(Rad(2*Q))\n -0.002536*Math.sin(Rad(2*Z))*Math.cos(Rad(2*Q))\n +0.005547*Math.cos(Rad(Z))*Math.cos(Rad(2*Q))\n -0.002689*Math.cos(Rad(2*Z))*Math.cos(Rad(2*Q));\n\n // correzione per l'anomalia media da aggiungere prima dell'equazione di Keplero\n\n var el_orb=orb_plan(njd,4); // recupera l'eccentricità del pianeta.\n var eccent=el_orb[4]; // eccentricità non corretta.\n\n Delta_MM=Delta_LL-(Delta_P/eccent);\n\n\n // semiasse maggiore da aggiungere prima dell'equazione di Keplero.\n\n Delta_AS=-263*Math.cos(Rad(V))\n +205*Math.cos(Rad(Z))\n +693*Math.cos(Rad(2*Z))\n +312*Math.cos(Rad(3*Z))\n +147*Math.cos(Rad(4*Z))\n +299*Math.sin(Rad(Z))*Math.sin(Rad(Q))\n +181*Math.cos(Rad(2*Z))*Math.sin(Rad(Q))\n +204*Math.sin(Rad(2*Z))*Math.cos(Rad(Q))\n +111*Math.sin(Rad(3*Z))*Math.cos(Rad(Q))\n -337*Math.cos(Rad(Z))*Math.cos(Rad(Q))\n -111*Math.cos(Rad(2*Z))*Math.cos(Rad(Q));\n \n Delta_AS=Delta_AS/1000000;\n \n // eccentricità da aggiungere prima dell'equazione di Keplero\n\n Delta_EC=(3606+130*X-43*X*X)*Math.sin(Rad(V))\n +(1289-580*X)*Math.cos(Rad(V))\n -6764*Math.sin(Rad(Z))*Math.sin(Rad(Q))\n -1110*Math.sin(Rad(2*Z))*Math.sin(Rad(Q))\n -224*Math.sin(Rad(3*Z))*Math.sin(Rad(Q))\n -204*Math.sin(Rad(Q))\n +(1284+116*X)*Math.cos(Rad(Z))*Math.sin(Rad(Q))\n +188*Math.cos(Rad(2*Z))*Math.sin(Rad(Q))\n +(1460+130*X)*Math.sin(Rad(Z))*Math.cos(Rad(Q))\n +224*Math.sin(Rad(2*Z))*Math.cos(Rad(Q))\n -817*Math.cos(Rad(Q))\n +6074*Math.cos(Rad(Z))*Math.cos(Rad(Q))\n +992*Math.cos(Rad(2*Z))*Math.cos(Rad(Q))\n +508*Math.cos(Rad(3*Z))*Math.cos(Rad(Q))\n +230*Math.cos(Rad(4*Z))*Math.cos(Rad(Q))\n +108*Math.cos(Rad(5*Z))*Math.cos(Rad(Q))\n -(956+73*X)*Math.sin(Rad(Z))*Math.sin(Rad(2*Q))\n +448*Math.sin(Rad(2*Z))*Math.sin(Rad(2*Q))\n +137*Math.sin(Rad(3*Z))*Math.sin(Rad(2*Q))\n +(-997+108*X)*Math.cos(Rad(Z))*Math.sin(Rad(2*Q))\n +480*Math.cos(Rad(2*Z))*Math.sin(Rad(2*Q))\n +148*Math.cos(Rad(3*Z))*Math.sin(Rad(2*Q))\n +(-956+99*X)*Math.sin(Rad(Z))*Math.cos(Rad(2*Q))\n +490*Math.sin(Rad(2*Z))*Math.cos(Rad(2*Q))\n +158*Math.sin(Rad(3*Z))*Math.cos(Rad(2*Q))\n +179*Math.cos(Rad(2*Q))\n +(1024+75*X)*Math.cos(Rad(Z))*Math.cos(Rad(2*Q))\n -437*Math.cos(Rad(2*Z))*Math.cos(Rad(2*Q))\n -132*Math.cos(Rad(3*Z))*Math.cos(Rad(2*Q));\n\n Delta_EC=Delta_EC/10000000;\n}\n\n// correzioni per il pianeta Giove ********************************* FINE.\n\n// correzioni per il pianeta Saturno ****************************** INIZIO.\n// tutti i termini di Saturno sono da aggiungere prima dell'equazione di Keplero\n// tranne il termine della latitudine eliocentrica\n\n\nif (np==5) {\n\n var X=(T/5)+0.1;\n var P=237.47555+3034.9061*T;\n var Q=265.91650+1222.1139*T;\n var S=243.51721+428.46770*T;\n var V=5*Q-2*P;\n var W=2*P-6*Q+3*S;\n var Z=Q-P;\n var PS=S-Q;\n\n // perturbazioni in longitudine media\n\n Delta_LL=+(-0.814181+0.018150*X+0.016714*X*X)*Math.sin(Rad(V))\n +(-0.010497+0.160906*X-0.004100*X*X)*Math.cos(Rad(V))\n +0.007581*Math.sin(Rad(2*V))\n -0.007986*Math.sin(Rad(W))\n -0.148811*Math.sin(Rad(Z))\n -0.040786*Math.sin(Rad(2*Z))\n -0.015208*Math.sin(Rad(3*Z))\n -0.006339*Math.sin(Rad(4*Z))\n -0.006244*Math.sin(Rad(Q))\n +(0.008931+0.002728*X)*Math.sin(Rad(Z))*Math.sin(Rad(Q))\n -0.016500*Math.sin(Rad(2*Z))*Math.sin(Rad(Q))\n -0.005775*Math.sin(Rad(3*Z))*Math.sin(Rad(Q))\n +(0.081344+0.003206*X)*Math.cos(Rad(Z))*Math.sin(Rad(Q))\n +0.015019*Math.cos(Rad(2*Z))*Math.sin(Rad(Q))\n +(0.085581+0.002494*X)*Math.sin(Rad(Z))*Math.cos(Rad(Q))\n +(0.025328-0.003117*X)*Math.cos(Rad(Z))*Math.cos(Rad(Q))\n +0.014394*Math.cos(Rad(2*Z))*Math.cos(Rad(Q))\n +0.006319*Math.cos(Rad(3*Z))*Math.cos(Rad(Q))\n +0.006369*Math.sin(Rad(Z))*Math.sin(Rad(2*Q))\n +0.009156*Math.sin(Rad(2*Z))*Math.sin(Rad(2*Q))\n +0.007525*Math.sin(Rad(3*PS))*Math.sin(Rad(2*Q))\n -0.005236*Math.cos(Rad(Z))*Math.cos(Rad(2*Q))\n -0.007736*Math.cos(Rad(2*Z))*Math.cos(Rad(2*Q))\n -0.007528*Math.cos(Rad(3*PS))*Math.cos(Rad(2*Q));\n\n // eccentricità\n\n Delta_EC=+(-7927+2548*X+91*X*X)*Math.sin(Rad(V))\n +(13381+1226*X-253*X*X)*Math.cos(Rad(V))\n +(248-121*X)*Math.sin(Rad(2*V))\n -(305+91*X)*Math.cos(Rad(2*V))\n +412*Math.sin(Rad(Z))\n +12415*Math.sin(Rad(Q))\n +(390-617*X)*Math.sin(Rad(Z))*Math.sin(Rad(Q))\n +(165-204*X)*Math.sin(Rad(2*Z))*Math.sin(Rad(Q))\n +26599*Math.cos(Rad(Z))*Math.sin(Rad(Q))\n -4687*Math.cos(Rad(2*Z))*Math.sin(Rad(Q))\n -1870*Math.cos(Rad(3*Z))*Math.sin(Rad(Q))\n -821*Math.cos(Rad(4*Z))*Math.sin(Rad(Q))\n -377*Math.cos(Rad(5*Z))*Math.sin(Rad(Q))\n +497*Math.cos(Rad(2*PS))*Math.sin(Rad(Q))\n +(163-611*X)*Math.cos(Rad(Q))\n -12696*Math.sin(Rad(Z))*Math.cos(Rad(Q))\n -4200*Math.sin(Rad(2*Z))*Math.cos(Rad(Q))\n -1503*Math.sin(Rad(3*Z))*Math.cos(Rad(Q))\n -619*Math.sin(Rad(4*Z))*Math.cos(Rad(Q))\n -268*Math.sin(Rad(5*Z))*Math.cos(Rad(Q))\n -(282+1306*X)*Math.cos(Rad(Z))*Math.cos(Rad(Q))\n +(-86+230*X)*Math.cos(Rad(2*Z))*Math.cos(Rad(Q))\n +461*Math.sin(Rad(2*PS))*Math.cos(Rad(Q))\n -350*Math.sin(Rad(2*Q))\n +(2211-286*X)*Math.sin(Rad(Z))*Math.sin(Rad(2*Q)) \n -2208*Math.sin(Rad(2*Z))*Math.sin(Rad(2*Q))\n -568*Math.sin(Rad(3*Z))*Math.sin(Rad(2*Q))\n -346*Math.sin(Rad(4*Z))*Math.sin(Rad(2*Q))\n -(2780+222*X)*Math.cos(Rad(Z))*Math.sin(Rad(2*Q))\n +(2022+263*X)*Math.cos(Rad(2*Z))*Math.sin(Rad(2*Q))\n +248*Math.cos(Rad(3*Z))*Math.sin(Rad(2*Q))\n +242*Math.sin(Rad(3*PS))*Math.sin(Rad(2*Q))\n +467*Math.cos(Rad(3*PS))*Math.sin(Rad(2*Q))\n -490*Math.cos(Rad(2*Q))\n -(2842+279*X)*Math.sin(Rad(Z))*Math.cos(Rad(2*Q))\n +(128+226*X)*Math.sin(Rad(2*Z))*Math.cos(Rad(2*Q))\n +224*Math.sin(Rad(3*Z))*Math.cos(Rad(2*Q))\n +(-1594+282*X)*Math.cos(Rad(Z))*Math.cos(Rad(2*Q))\n +(2162-207*X)*Math.cos(Rad(2*Z))*Math.cos(Rad(2*Q))\n +561*Math.cos(Rad(3*Z))*Math.cos(Rad(2*Q))\n +343*Math.cos(Rad(4*Z))*Math.cos(Rad(2*Q))\n +469*Math.sin(Rad(3*PS))*Math.cos(Rad(2*Q))\n -242*Math.cos(Rad(3*PS))*Math.cos(Rad(2*Q))\n -205*Math.sin(Rad(Z))*Math.sin(Rad(3*Q))\n +262*Math.sin(Rad(3*Z))*Math.sin(Rad(3*Q))\n +208*Math.cos(Rad(Z))*Math.cos(Rad(3*Q))\n -271*Math.cos(Rad(3*Z))*Math.cos(Rad(3*Q))\n -382*Math.cos(Rad(3*Z))*Math.sin(Rad(4*Q))\n -376*Math.sin(Rad(3*Z))*Math.cos(Rad(4*Q));\n\n Delta_EC=Delta_EC/10000000; \n\n // correzione del perielio\n\n Delta_P=+(0.077108+0.007186*X-0.001533*X*X)*Math.sin(Rad(V))\n +(0.045803-0.014766*X-0.000536*X*X)*Math.cos(Rad(V))\n -0.007075*Math.sin(Rad(Z))\n -0.075825*Math.sin(Rad(Z))*Math.sin(Rad(Q))\n -0.024839*Math.sin(Rad(2*Z))*Math.sin(Rad(Q))\n -0.008631*Math.sin(Rad(3*Z))*Math.sin(Rad(Q))\n -0.072586*Math.cos(Rad(Q))\n -0.150383*Math.cos(Rad(Z))*Math.cos(Rad(Q))\n +0.026897*Math.cos(Rad(2*Z))*Math.cos(Rad(Q))\n +0.010053*Math.cos(Rad(3*Z))*Math.cos(Rad(Q))\n -(0.013597+0.001719*X)*Math.sin(Rad(Z))*Math.sin(Rad(2*Q))\n +(-0.007742+0.001517*X)*Math.cos(Rad(Z))*Math.sin(Rad(2*Q))\n +(0.013586-0.001375*X)*Math.cos(Rad(2*Z))*Math.sin(Rad(2*Q))\n +(-0.013667+0.001239*X)*Math.sin(Rad(Z))*Math.cos(Rad(2*Q))\n +0.011981*Math.sin(Rad(2*Z))*Math.cos(Rad(2*Q))\n +(0.014861+0.001136*X)*Math.cos(Rad(Z))*Math.cos(Rad(2*Q))\n -(0.013064+0.001628*X)*Math.cos(Rad(2*Z))*Math.cos(Rad(2*Q));\n\n\n // correzione per l'anomalia media da aggiungere prima dell'equazione di Keplero\n\n var el_orb=orb_plan(njd,5); // recupera l'eccentricità del pianeta.\n var eccent=el_orb[4]; // eccentricità senza correzione.\n\n Delta_MM=Delta_LL-(Delta_P/eccent);\n\n\n// semiasse maggiore.\n\n Delta_AS=572*X*Math.sin(Rad(V))\n +2933*Math.cos(Rad(V))\n +33629*Math.cos(Rad(Z))\n -3081*Math.cos(Rad(2*Z))\n -1423*Math.cos(Rad(3*Z))\n -671*Math.cos(Rad(4*Z))\n -320*Math.cos(Rad(5*Z))\n +1098*Math.sin(Rad(Q))\n -2812*Math.sin(Rad(Z))*Math.sin(Rad(Q))\n +688*Math.sin(Rad(2*Z))*Math.sin(Rad(Q))\n -393*Math.sin(Rad(3*Z))*Math.sin(Rad(Q))\n -228*Math.sin(Rad(4*Z))*Math.sin(Rad(Q))\n +2138*Math.cos(Rad(Z))*Math.sin(Rad(Q))\n -999*Math.cos(Rad(2*Z))*Math.sin(Rad(Q))\n -642*Math.cos(Rad(3*Z))*Math.sin(Rad(Q))\n -325*Math.cos(Rad(4*Z))*Math.sin(Rad(Q))\n -890*Math.cos(Rad(Q))\n +2206*Math.sin(Rad(Z))*Math.cos(Rad(Q))\n -1590*Math.sin(Rad(2*Z))*Math.cos(Rad(Q))\n -647*Math.sin(Rad(3*Z))*Math.cos(Rad(Q))\n -344*Math.sin(Rad(4*Z))*Math.cos(Rad(Q))\n +2885*Math.cos(Rad(Z))*Math.cos(Rad(Q))\n +(2172+102*X)*Math.cos(Rad(2*Z))*Math.cos(Rad(Q))\n +296*Math.cos(Rad(3*Z))*Math.cos(Rad(Q))\n -267*Math.sin(Rad(2*Z))*Math.sin(Rad(2*Q))\n -778*Math.cos(Rad(Z))*Math.sin(Rad(2*Q))\n +495*Math.cos(Rad(2*Z))*Math.sin(Rad(2*Q))\n +250*Math.cos(Rad(3*Z))*Math.sin(Rad(2*Q))\n -856*Math.sin(Rad(Z))*Math.cos(Rad(2*Q))\n +441*Math.sin(Rad(2*Z))*Math.cos(Rad(2*Q))\n +296*Math.cos(Rad(2*Z))*Math.cos(Rad(2*Q))\n +211*Math.cos(Rad(3*Z))*Math.cos(Rad(2*Q))\n -427*Math.sin(Rad(Z))*Math.sin(Rad(3*Q))\n +398*Math.sin(Rad(3*Z))*Math.sin(Rad(3*Q))\n +344*Math.cos(Rad(Z))*Math.cos(Rad(3*Q))\n -427*Math.cos(Rad(3*Z))*Math.cos(Rad(3*Q));\n \nDelta_AS=Delta_AS/1000000;\n\n\n\n// aggiungere alla latitudine eliocentrica.\n\n Delta_LAT_ELIO= +0.000747*Math.cos(Rad(Z))*Math.sin(Rad(Q))\n +0.001069*Math.cos(Rad(Z))*Math.cos(Rad(Q))\n +0.002108*Math.sin(Rad(2*Z))*Math.sin(Rad(2*Q))\n +0.001261*Math.cos(Rad(2*Z))*Math.sin(Rad(2*Q))\n +0.001236*Math.sin(Rad(2*Z))*Math.cos(Rad(2*Q))\n -0.002075*Math.cos(Rad(2*Z))*Math.cos(Rad(2*Q)); \n\n}\n\n// correzioni per il pianeta Saturno******************************** FINE.\n\n// correzioni per il pianeta Urano******************************** INIZIO.\n\nif (np==6) {\n\n var X=(T/5)+0.1;\n var P=237.47555+3034.9061*T;\n var Q=265.91650+1222.1139*T;\n var S=243.51721+428.46770*T;\n var W=2*P-6*Q+3*S;\n var G=83.76922+218.4901*T;\n var H=2*G-S;\n var Z=S-P;\n var N=S-Q;\n var OM=G-S;\n \n // perturbazioni in longitudine media A\n\n Delta_LP=+(0.864319-0.001583*X)*Math.sin(Rad(H))\n +(0.082222-0.006833*X)*Math.cos(Rad(H))\n +0.036017*Math.sin(Rad(2*H))\n -0.003019*Math.cos(Rad(2*H))\n +0.008122*Math.sin(Rad(W));\n\n var B=0.120303*Math.sin(Rad(H))\n +(0.019472-0.000947*X)*Math.cos(Rad(H))\n +0.006197*Math.sin(Rad(2*H));\n\n // correzione per l'anomalia media di Urano\n\n var el_orb=orb_plan(njd,6); // recupera l'eccentricità del pianeta.\n var eccent=el_orb[4]; // eccentricità senza correzione.\n\n Delta_MM=Delta_LP-(B/eccent);\n\n // eccentricità\n\nDelta_EC=+(-3349+163*X)*Math.sin(Rad(H)) \n +20981*Math.cos(Rad(H))\n +1311*Math.cos(Rad(2*H));\n\nDelta_EC=Delta_EC/10000000;\n\n // correzione semiasse maggiore.\n\nDelta_AS=-0.003825*Math.cos(Rad(H));\n\n // correzione per la longitudine vera.\n\n Delta_LL=+(0.010122-0.000988*X)*Math.sin(Rad(S+N))\n +(-0.038581+0.002031*X-0.001910*X*X)*Math.cos(Rad(S+N))\n +(0.034964-0.001038*X+0.000868*X*X)*Math.cos(Rad(2*S+N))\n +0.005594*Math.sin(Rad(S+3*OM))\n -0.014808*Math.sin(Rad(Z))\n -0.005794*Math.sin(Rad(N))\n +0.002347*Math.cos(Rad(N))\n +0.009872*Math.sin(Rad(OM))\n +0.008803*Math.sin(Rad(2*OM))\n -0.004308*Math.sin(Rad(3*OM));\n\n// aggiungere alla latitudine eliocentrica.\n\n Delta_LAT_ELIO=+(0.000458*Math.sin(Rad(N))-0.000642*Math.cos(Rad(N))-0.000517*Math.cos(Rad(4*OM)))*Math.sin(Rad(S))\n -(0.000347*Math.sin(Rad(N))+0.000853*Math.cos(Rad(N))+0.000517*Math.sin(Rad(4*N)))*Math.cos(Rad(S))\n +0.000403*(Math.cos(Rad(2*OM))*Math.sin(Rad(2*S))+Math.sin(Rad(2*OM))*Math.cos(Rad(2*S))); \n\n// correzione al raggio vettore.\n\nDelta_R=-25948+ (5795*Math.cos(Rad(S))-1165*Math.sin(Rad(S))+1388*Math.cos(Rad(2*S)))*Math.sin(Rad(N))\n +4985*Math.cos(Rad(Z))+(1351*Math.cos(Rad(S))+5702*Math.sin(Rad(S))+1388*Math.sin(Rad(2*S)))*Math.cos(Rad(N))\n -1230*Math.cos(Rad(S))+904*Math.cos(Rad(2*OM))\n +3354*Math.cos(Rad(N))+894*(Math.cos(Rad(OM))-Math.cos(Rad(3*OM)));\n\nDelta_R=Delta_R/1000000;\n \n \n\n}\n// correzioni per il pianeta Urano ************************************ FINE.\n\n// correzioni per il pianeta Nettuno ******************************** INIZIO.\n\nif (np==7) {\n\n var X=(T/5)+0.1;\n var P=237.47555+3034.9061*T;\n var Q=265.91650+1222.1139*T;\n var S=243.51721+428.46770*T;\n var W=2*P-6*Q+3*S;\n var G=83.76922+218.4901*T;\n var H=2*G-S;\n var Z=G-P;\n var N=G-Q;\n var OM=G-S;\n \n // perturbazioni in longitudine media A\n\n Delta_LP=+(-0.589833+0.001089*X)*Math.sin(Rad(H))\n +(-0.056094+0.004658*X)*Math.cos(Rad(H)) \n -0.024286*Math.sin(Rad(2*H));\n\n var B=0.024039*Math.sin(Rad(H))\n -0.025303*Math.cos(Rad(H))\n +0.006206*Math.sin(Rad(2*H))\n -0.005992*Math.cos(Rad(2*H));\n\n// correzione per l'anomalia media di Urano\n\n var el_orb=orb_plan(njd,7); // recupera l'eccentricità del pianeta.\n var eccent=el_orb[4]; // eccentricità senza correzione.\n\n Delta_MM=Delta_LP-(B/eccent);\n\n // eccentricità\n\n Delta_EC=+4389*Math.sin(Rad(H))\n +4262*Math.cos(Rad(H))\n +1129*Math.sin(Rad(2*H))\n +1089*Math.cos(Rad(2*H));\n\n Delta_EC=Delta_EC/10000000;\n\n// correzione semiasse maggiore.\n\n Delta_AS=-817*Math.sin(Rad(H))+8189*Math.cos(Rad(H))+781*Math.cos(Rad(2*H));\n\n Delta_AS=Delta_AS/1000000;\n\n // correzione per la longitudine vera.\n\n Delta_LL=-0.009556*Math.sin(Rad(Z))\n -0.005178*Math.sin(Rad(N))\n +0.002572*Math.sin(Rad(2*OM))\n -0.002972*Math.cos(Rad(2*OM))*Math.sin(Rad(G))\n -0.002833*Math.sin(Rad(2*OM))*Math.cos(Rad(G));\n \n // aggiungere alla latitudine eliocentrica.\n\n Delta_LAT_ELIO=+0.000336*Math.cos(Rad(2*OM))*Math.sin(Rad(G))\n +0.000364*Math.sin(Rad(2*OM))*Math.cos(Rad(G));\n\n // correzione al raggio vettore.\n\n Delta_R=-40596\n +4992*Math.cos(Rad(Z))\n +2744*Math.cos(Rad(N))\n +2044*Math.cos(Rad(OM))\n +1051*Math.cos(Rad(2*OM));\n\nDelta_R=Delta_R/1000000;\n \n\n}\n// correzioni per il pianeta Nettuno ******************************** FINE\n\n\n// variabili correzioni\n// lperiodo, rvett long. assemagg ecc M lat\n var correzioni=new Array(Delta_LP,Delta_R,Delta_LL,Delta_AS,Delta_EC,Delta_MM,Delta_LAT_ELIO);\n\n return correzioni;\n\n}", "doubleDensityRelaxation(deltaT){\n //first we compute the pressure and near pressure based on particle density per particle\n this.particles.forEach(particle => {\n //to calculate the pressure we use the constant k, which is a parameter describing the stiffness interactions between neighboring\n //particles\n P = this.container.stiffness * (particle.density - this.container.restDensity);\n nearP = this.container.nearStiffness * particle.nearDensity;\n\n const neighbors = this.hash.findNearestNeighbors(currParticle);\n\n //now we want to iterate through each nearest neighbor and create a vector from its position to the current particles\n neighbors.forEach(neighbor => {\n dx = 0\n //lets make a vector r_ij \n rij = p5.Vector.sub(currParticle.position, neighbor.position);\n\n //now we get the square magnitude of r by taking a dot product with itself\n squareMag = p5.Vector.dot(rij, rij);\n\n //we take the square root of this to get the magnitude \n rMag = Math.sqrt(squareMag);\n\n //we now normailze the vector rij by dividing by its magnitude. This effectively gives us a unit vector pointing in the direction \n //of rij\n rNorm = p5.Vector.scale(rij, 1.0 / rMag);\n\n //we set a parameter q to be the magnitude of rij divided by the support radius. we subtract this quantity from 1 \n // as we will need it later to calculate the impulse parameter in the algorithm\n q = rMag / constants.h;\n one_minus_q = 1 - q;\n\n if (q < 1){\n \n //now we apply displacements\n D = (deltaT**2)*((P * one_minus_q) + nearP * one_minus_q**2)*rNorm;\n\n halvedD = D / 2.0;\n neighbor.position = neighbor.position + halvedD;\n dx = dx - halvedD;\n currParticle.position = currParticle.postion + dx;\n\n }\n })\n });\n }", "function contaFoglie(t){\r\n if(t == undefined){\r\n return 0\r\n }\r\n if(t.sx==undefined && t.dx==undefined) {\r\n return 1;\r\n }else{ \r\n return contaFoglie(t.sx) + contaFoglie(t.dx);\r\n }\r\n}", "function dibujar_protesis_fija(canvas){\r\n\tif (i_inic<=i_final){\r\n\t//var px=87;\r\n\t//var py=129;\r\n\t//var numi=0;\r\n\t\r\n\tvar i= i_inic+1;\r\n\t var i_inic_s= i_inic+1;\r\n\t \r\n\t//dibujar diente sano antes de convencion\r\n\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic);\r\n\tdibujar_diente_sano (canvas,cara1,i_inic);\r\n\tdibujar_diente_sano (canvas,cara2,i_inic);\r\n\tdibujar_diente_sano (canvas,cara3,i_inic);\r\n\tdibujar_diente_sano (canvas,cara4,i_inic);\r\n\tdibujar_diente_sano (canvas,cara5,i_inic);\r\n \r\n\t//dibujar diente sano en dientes medios\r\n\tfor ( i_inic_s; i_inic_s<i_final; i_inic_s++) {\r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_inic_s);\r\n\t\t\r\n\t\t\r\n\t}\r\n\t//dibujar diente sano antes de convencion\r\n\tdibujar_diente_sano_alr(canvas,pxf, pyf,i_final);\r\n\tdibujar_diente_sano (canvas,cara1,i_final);\r\n\tdibujar_diente_sano (canvas,cara2,i_final);\r\n\tdibujar_diente_sano (canvas,cara3,i_final);\r\n\tdibujar_diente_sano (canvas,cara4,i_final);\r\n\tdibujar_diente_sano (canvas,cara5,i_final);\r\n\t\r\n\t//dibujar protesis fija en diente inicial\r\n\tdibujar_protesis_fija_inicial(canvas,protesisim,i_inic);\r\n\t\r\n\t//dibujar protesis fija en dientes medios\r\n\tfor ( i; i<i_final; i++) {\r\n\t\r\n\t\t//dibujar convencion\r\n\t\tdibujar_protesis_fija_media(canvas,protesisim,i);\r\n\t\t\r\n\t}\r\n\t\r\n\t//dibujar protesis fija en diente final\r\n\tdibujar_protesis_fija_final(canvas,protesisf,i_final);\r\n\t//\r\n\t\r\n\t\r\n\ti=0;\r\n\ti_inic=0;\r\n\ti_final=0;\r\n\tpxi=0;\r\n\tpxf=0;\r\n\tpyi=0;\r\n\tpyf=0;\r\n\tsw_punto_inic =false;\r\n\tsw_punto_final =false;\r\n\tsector_inicial=0;\r\n\tsector_final=0;\r\n\t//protesisf.length=0;\r\n\t//protesisim.length=0;\r\n\t\r\n\t\r\n\t}else{\r\n\t\tvar i= i_final+1;\r\n\t\tvar i_inic_s= i_final+1;\r\n\t\t \r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_inic);\r\n\t \r\n\t\t//dibujar diente sano en dientes medios\r\n\t\tfor ( i_inic_s; i_inic_s<i_inic; i_inic_s++) {\r\n\t\t\t//dibujar diente sano antes de convencion\r\n\t\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara1,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara2,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara3,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara4,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara5,i_inic_s);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxf, pyf,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_final);\r\n\t\t//dibujar protesis fija en diente inicial\r\n\t\tdibujar_protesis_fija_inicial(canvas,protesisim,i_final);\r\n\t\t\r\n\t\t//dibujar protesis fija en dientes medios\r\n\t\tfor ( i; i<i_inic; i++) {\r\n\t\t\tdibujar_protesis_fija_media(canvas,protesisim,i);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//dibujar protesis fija en diente final\r\n\t\tdibujar_protesis_fija_final(canvas,protesisf,i_inic);\r\n\t\ti=0;\r\n\t\ti_inic=0;\r\n\t\ti_final=0;\r\n\t\tpxi=0;\r\n\t\tpxf=0;\r\n\t\tpyi=0;\r\n\t\tpyf=0;\r\n\t\tsw_punto_inic =false;\r\n\t\tsw_punto_final =false;\r\n\t\tsector_inicial=0;\r\n\t\tsector_final=0;\r\n\t\t//protesisf.length=0;\r\n\t\t//protesisim.length=0;\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\r\n}", "traducir(ts) {\n const variable = ts.getVariable(this.id);\n //Si la variable no existe es un error\n if (!variable) {\n errores_1.Errores.push(new error_1.Error({ tipo: 'semantico', linea: this.linea, descripcion: `No se encontro la variable con el id: ${this.id}` }));\n return;\n }\n //Si la variable no es un arreglo\n if (!tipos_1.isTipoArray(variable.tipo)) {\n errores_1.Errores.push(new error_1.Error({ tipo: 'semantico', linea: this.linea, descripcion: `La variable con id ${this.id} no es de tipo ARRAY` }));\n return;\n }\n const temp_pos = temporal_1.Temporal.getSiguiente();\n const pos_inicial = temporal_1.Temporal.getSiguiente();\n //Si es una variable global\n if (variable.isGlobal()) {\n codigo3D_1.Codigo3D.add(`${temp_pos} = ${variable.posicion};`);\n codigo3D_1.Codigo3D.add(`${pos_inicial} = Heap[(int)${temp_pos}];`);\n }\n //Si es una variable local\n else {\n codigo3D_1.Codigo3D.add(`${temp_pos} = P + ${variable.posicion};`);\n codigo3D_1.Codigo3D.add(`${pos_inicial} = Stack[(int)${temp_pos}];`);\n }\n //Codigo valido para ambos casos\n const resp = temporal_1.Temporal.getSiguiente();\n const posicion_exacta = temporal_1.Temporal.getSiguiente();\n const aux_tam = temporal_1.Temporal.getSiguiente();\n const tamaño = temporal_1.Temporal.getSiguiente();\n codigo3D_1.Codigo3D.add(`${aux_tam} = ${pos_inicial} - 1;`);\n codigo3D_1.Codigo3D.add(`${tamaño} = Heap[(int)${aux_tam}];`);\n const lb_false = etiqueta_1.Etiqueta.getSiguiente();\n const lbl_end = etiqueta_1.Etiqueta.getSiguiente();\n for (const exp of this.lista_exps) {\n const control_pos = exp.traducir(ts);\n if (!control_pos) {\n errores_1.Errores.push(new error_1.Error({ tipo: 'semantico', linea: this.linea, descripcion: `No fue posible traducir una de las posiciones para el acceso de ${this.id}` }));\n return;\n }\n if (!tipos_1.isTipoNumber(control_pos.tipo)) {\n errores_1.Errores.push(new error_1.Error({ tipo: 'semantico', linea: this.linea, descripcion: `No se puede acceder a una posicion de tipo ${tipos_1.getNombreDeTipo(control_pos.tipo)}` }));\n return;\n }\n //Remuevo el tempora\n control_funcion_1.ControlFuncion.removerTemporal(control_pos.temporal);\n //Compruebo que sean posiciones validas\n codigo3D_1.Codigo3D.add(`if(${control_pos.temporal} < 0) goto ${lb_false};`);\n codigo3D_1.Codigo3D.add(`if(${control_pos.temporal} >= ${tamaño}) goto ${lb_false};`);\n codigo3D_1.Codigo3D.add(`${posicion_exacta} = ${pos_inicial} + ${control_pos.temporal};`);\n }\n codigo3D_1.Codigo3D.add(`${resp} = Heap[(int)${posicion_exacta}];`);\n codigo3D_1.Codigo3D.add(`goto ${lbl_end};`);\n codigo3D_1.Codigo3D.add(`${lb_false}:`);\n codigo3D_1.Codigo3D.add(`${resp} = -1;`);\n codigo3D_1.Codigo3D.add(`${lbl_end}:`);\n //GUARDO EL TEMPORAL\n control_funcion_1.ControlFuncion.guardarTemporal(resp);\n return new control_1.Control({ temporal: resp, tipo: variable.tipo_de_arreglo, posicion: posicion_exacta });\n }", "function cfasi_lunari(mese,anno,fase){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) Luglio 2010\n // funzione per il calcolo delle fasi lunari.\n // mese= numero del mese da 1 a 12.\n // anno=anno di riferimento.\n // k=0.00 per la luna nuova\n // k=0.25 per il primo quarto.\n // k=0.50 per la luna piena\n // k=0.75 per l'ultimo quarto.\n // fase= valore numerico per la fase 0 - 0.25 - 0.50 - 0.75 sono ammessi solo questi valori.\n \nvar anno_dec=anno+(mese/12);\nvar k=(anno_dec-1900)*12.3685; // calcolo della costante k. (parseInt) tronca la parte decimale\n k=parseInt(k)*1+fase*1;\n \nvar T=k/1236.85;\n\nvar fseno=166.56+132.87*T-0.009173*T*T;\n fseno=fseno/180*Math.PI;\n\nvar njd_fase =2415020.75933+29.53058868*k+0.0001178*T*T-0.000000155*T*T*T+0.00033*Math.sin(fseno);\n\n // calcolo anomalia media del sole.\n\nvar M=359.2242+29.10535608*k-0.0000333*T*T-0.00000347*T*T*T;\n M=gradi_360(M);\n M=M/180*Math.PI;\n\n // calcolo anomalia media della luna.\n\nvar M1=306.0253+385.81691806*k+0.0107306*T*T+0.00001236*T*T*T;\n M1=gradi_360(M1);\n M1=M1/180*Math.PI;\n\n // calcolo dell'argomento della latitudine della luna.\n\nvar F=21.2964+390.67050646*k-0.0016528*T*T-0.00000239*T*T*T;\n F=gradi_360(F);\n F=F/180*Math.PI;\n\n // calcolo correzioni per la luna nuova e piena.\n\nvar correzione1=0;\n\nif (fase==0 || fase==0.50) {\n \n correzione1= (0.1734-0.000393*T)*Math.sin(M)\n +0.0021*Math.sin(2*M)\n -0.4068*Math.sin(M1)\n +0.0161*Math.sin(2*M1)\n -0.0004*Math.sin(3*M1)\n +0.0104*Math.sin(2*F)\n -0.0051*Math.sin(M+M1)\n -0.0074*Math.sin(M-M1)\n +0.0004*Math.sin(2*F+M)\n -0.0004*Math.sin(2*F-M)\n -0.0006*Math.sin(2*F+M1)\n +0.0010*Math.sin(2*F-M1)\n +0.0005*Math.sin(M+2*M1); \n}\n\nelse if (fase==0.25 || fase==0.75) {\n \n correzione1= (0.1721-0.0004*T)*Math.sin(M)\n +0.0021*Math.sin(2*M)\n -0.6280*Math.sin(M1)\n +0.0089*Math.sin(2*M1)\n -0.0004*Math.sin(3*M1)\n +0.0079*Math.sin(2*F)\n -0.0119*Math.sin(M+M1)\n -0.0047*Math.sin(M-M1)\n +0.0003*Math.sin(2*F+M)\n -0.0004*Math.sin(2*F-M)\n -0.0006*Math.sin(2*F+M1)\n +0.0021*Math.sin(2*F-M1)\n +0.0003*Math.sin(M+2*M1)\n +0.0004*Math.sin(M-2*M1)\n -0.0003*Math.sin(2*M+M1); \n}\n\nelse {alert(\"Valore fase \"+fase+\" non valido!\");}\n\nvar njd_fase=njd_fase+correzione1; // per la luna nuova.\n\n // njd_fase= numero dei giorni giuliani.\nreturn njd_fase;\n\n}", "function GuardarPunto() {\n\t// this should work\nvar valor=capa_punto.features[0].geometry.getVertices()[0];\n//var valor1=valor\nvalor2= valor.transform(map.getProjectionObject(), new OpenLayers.Projection(\"EPSG:4326\"));\n\n//document.getElementById('formulario:punto_select_x');y\n\n//var toProjection = new OpenLayers.Projection(\"EPSG:4326\");\n//var lonLat = valor.transform(map.getProjectionObject(), toProjection);\n\n//alert (\"valor x \"+ valor.x + \" valor y \"+ valor.y);\n\nvar x =document.getElementById('formulario:punto_select_x');\nvar y=document.getElementById('formulario:punto_select_y');\n\nx.value=valor.x;\ny.value=valor.y;\n\n\n}" ]
[ "0.6515955", "0.61121005", "0.59558", "0.5853352", "0.57912505", "0.5749791", "0.56766474", "0.5664324", "0.5614045", "0.5611793", "0.5610217", "0.5551266", "0.5542541", "0.5510456", "0.5489727", "0.5483785", "0.5483785", "0.5482162", "0.5475941", "0.54691815", "0.54536736", "0.54375964", "0.54294634", "0.5393633", "0.5391506", "0.53868985", "0.53868985", "0.5380492", "0.53784597", "0.5362045", "0.535819", "0.53557223", "0.5355352", "0.5351877", "0.5348254", "0.53441787", "0.5343322", "0.53416777", "0.5340797", "0.53396297", "0.53343683", "0.53335464", "0.53328985", "0.5330229", "0.5330176", "0.53214246", "0.5319931", "0.5310427", "0.5309014", "0.5304828", "0.5303404", "0.5299403", "0.52971524", "0.528272", "0.52768195", "0.52666897", "0.5259963", "0.5259963", "0.52585316", "0.524836", "0.5245976", "0.52312595", "0.5225594", "0.5224241", "0.5224241", "0.5217575", "0.52019453", "0.5198837", "0.51967394", "0.51947665", "0.519071", "0.5190538", "0.5189522", "0.51873404", "0.5181613", "0.5180378", "0.5173114", "0.5159351", "0.5157807", "0.51576835", "0.51500183", "0.51487607", "0.51485384", "0.51435035", "0.51404136", "0.51394707", "0.51371974", "0.512835", "0.5127381", "0.5125512", "0.5121652", "0.51212984", "0.51181304", "0.5111077", "0.51043135", "0.51036006", "0.5102554", "0.5101252", "0.5101057", "0.50981146" ]
0.55861187
11
CODE A EXECUTER LORSQUE LA FENETRE EST REDIMENSIONNEE
function windowResized() { resizeCanvas(windowWidth, windowHeight); draw(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onresizeAnimaciones() {\n var sec=getUrlVars()['sec'];\n if(sec!=\"gestionProyecto\") { normalSectionElements(); ajustaHeight(); }\n normalAbreNP();\n normalAbrePE();\n}", "function resizedw(){\n\t\n}", "function SizeDependWidth() {\n wImageCur = va.wSlide;\n hImageCur = M.R(wImageCur / rateImage);\n }", "laitueDimension(start) {\n if (start !== true) {\n this.laitue.style.width = this.laitue.clientWidth - 2 + \"px\";\n this.laitue.style.height = this.laitue.clientHeight - 2 + \"px\";\n this.laitue.style.left = this.positionLeft(\"laitue\");\n this.laitue.style.top = this.laitue.offsetTop + 1 + \"px\";\n } else {\n this.laitue.style.width = \"100px\";\n this.laitue.style.height = \"100px\";\n this.laitue.style.opacity = \"\";\n this.laitue.style.visibility = \"visible\";\n this.laitue.style.top =\n this.course.offsetTop +\n (this.route.height - this.laitue.height) / 2 +\n \"px\";\n this.laitue.style.left = this.positionLeft(\"laitue\");\n }\n }", "function updateScreen(){\t//funcio (bucle) que s'executa per actualitzar l'estat de la pantalla del joc\n\tcuttingSegments();\t//mira si hi ha segments que es creuin\n\tdrawAll();\t\t\t//dibuixa al canvas\n\tupdateState();\t\t//reescriu el nivell i el % completat\n}", "redimPostIT(){\n if(resize == true){\n this.largeur = this.initlargeur + mouseX - this.initMouseX-10;\n this.longeur = this.initlongeur + mouseY - this.initmouseY-10;\n this.affPostIT();\n }\n }", "function resize () {\n console.log(\"acc resize\");\n }", "function RMXFViewer_SetSize()\n{\n var instText1 = \"You must install \";\n var instText2 = \"Vidicor View Component\";\n var instText3 = \"Click this link and run the file then follow his instructions.\";\n var instText4 = \"Press F5 since installation complete.\";\n var instText5 = \"Attention! This page requires additional component to work.\\n\" +\n \"Press OK and follow component installation instructions.\";\n if (lang == 'ru')\n {\n instText1 = \"Вам необходимо установить \";\n instText2 = \"компонент просмотра Vidicor\";\n instText3 = \"Нажмите на эту ссылку, запустите файл и следуйте его инструкциям.\";\n instText4 = \"После завершения установки нажмите F5.\";\n instText5 = \"Внимание! Эта страница требует для работы установки дополнительного компонента.\\n\" +\n \"Нажмите OK и следуйте появившимся инструкциям по установке компонента.\";\n }\n\n var w = -1;\n var h = -1;\n if (arguments.length == 2)\n {\n w = parseInt(arguments[0]);\n h = parseInt(arguments[1]);\n }\n else\n if (arguments.length == 1)\n {\n var str = new String(arguments[0]);\n var xi = str.indexOf('x', 0);\n if (xi < 0) xi = str.indexOf('X', 0);\n if (xi < 0) xi = str.indexOf('*', 0);\n if (xi >= 0)\n {\n w = parseInt(str.substring(0, xi));\n h = parseInt(str.substring(xi + 1));\n }\n }\n else\n if (arguments.length == 0)\n {\n w = this.reqW;\n h = this.reqH;\n }\n if ((w >= 0) && (h >= 0))\n {\n this.reqW = w;\n this.reqH = h;\n if ((this.rmxfobj != null) &&\n (this.rmxfobj.readyState >= 4))\n {\n if (this.rmxfobj.URL != null)\n window.setTimeout('RMXFCallSetVideoSize(' + this.rmxfidx + ', ' + w + ', ' + h + ')', 10);\n else\n {\n this.rmxftag.innerHTML = \"<TABLE id=instructions\" +\n \t\t\t \"width=\" + this.reqW + \n \t\t\t \" height=\" + this.reqH +\n \t\t\t \"border=0 cellpadding=0 cellspacing=0>\" +\n \"<TR><TD align=center valign=middle>\" +\n \"<FONT color=#D00000>\" + instText1 + \n \"<BR><A href='http://\" + this.rmxfhost +\n \"/activex_setup.exe'>\" + instText2 + \n \"</A></FONT><BR>\" +\n \"<LI>\" + instText3 +\n \"<LI>\" + instText4 +\n \"</TD></TR></TABLE>\";\n instructions.scrollIntoView(true);\n alert(instText5);\n }\n }\n }\n}", "function panelLayout(n, R) {\n\tlet params = n.params;\n\tlet num = n.children.length;\n\n\t//console.log('ich bin in panelLayout_!!!!!!!!!!!!',n.params)\n\n\tlet or = params.orientation ? params.orientation : DEF_ORIENTATION;\n\tmFlex(n.ui, or);\n\n\t//console.log(params, num, or);\n\n\t//setting split\n\tlet split = params.split ? params.split : DEF_SPLIT;\n\tif (split == 'min') {\n\t\tlet b = getBounds(n.ui, true); //n.sizeMeasured = { w: b.width, h: b.height };\n\t\treturn { w: b.width, h: b.height }; //n.sizeMeasured;\n\t}\n\n\tlet reverseSplit = false;\n\n\tif (split == 'equal') split = (1 / num);\n\telse if (isNumber(split)) reverseSplit = true;\n\n\tfor (let i = 0; i < num; i++) {\n\t\tlet d = R.uiNodes[n.children[i]].ui;\n\t\tmFlexChildSplit(d, split);\n\n\t\tif (reverseSplit) { split = 1 - split; }\n\t}\n\t// let b = getBounds(n.ui, true); n.sizeMeasured = { w: b.width, h: b.height };return n.sizeMeasured;\n\tlet b = getBounds(n.ui, true); //n.sizeMeasured = { w: b.width, h: b.height };\n\t//console.log('height',b.height);\n\t//n.ui.style.height=b.height+'px';\n\treturn { w: b.width, h: b.height }; //n.sizeMeasured;\n\n}", "_resizeHandler() {\n\n\t\tconst bounds= this.getBoundingClientRect();\n\n\t\tthis._dimens.width= bounds.width;\n\t\tthis._dimens.height= bounds.width;\n\n\t\tthis._root.querySelector('.wrapper').style.height= `${this._dimens.height}px`;\n\n\t\tfor(let row of this._grid) {\n\n\t\t\tfor(let col of row) {\n\n\t\t\t\tcol.$elem.style.width= (this._dimens.width/this.rows - 10) + 'px';\n\t\t\t\tcol.$elem.style.height= (this._dimens.height/this.cols - 10) + 'px';\n\t\t\t}\n\t\t}\n\t}", "function convertir(){\n \n \t\n \n\t\tvar countHijos = $('.content-list').children().length - 1; //21\n\t\tvar entran = countHijos / columna; // 3\n\t\tvar entran = parseInt(entran); // 3\n\t\tvar aumentar = ((entran + 1) * columna)-countHijos;\n\t\tvar func = (aumentar / columna)*100;\n\n\t\tif(columna == 1){\n\t\t\t$('.content-list .liunico').css('display', 'none');\n\t\t}else{\n\t\t\t$('.content-list .liunico').css(\"width\", func +\"%\");\n\t\t\tif(countHijos % columna == 0){\n\t\t\t\t$('.content-list .liunico').css('display', 'none');\n\t\t\t}else{\n\t\t\t\t$('.content-list .liunico').css('display', 'block')\n\t\t\t}\n\t\t}\n\n\t}", "function redimensionar(){\r\n\tif(!tela_dinamica && redimensionar_primeiro){\r\n\t\treturn true;\r\n\t}\r\n\tbotao_estilo();\r\n\t$(\"[fonte]\").each(function(){\r\n\t\tswitch($(this).attr(\"fonte\")){\r\n\t\t\tcase \"ppp\":\r\n\t\t\t\tvar fator = 140;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"pp\" :\r\n\t\t\t\tvar fator = 125;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"p\" :\r\n\t\t\t\tvar fator = 100;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"m\" :\r\n\t\t\t\tvar fator = 75;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"g\" :\r\n\t\t\t\tvar fator = 50;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"gg\" :\r\n\t\t\t\tvar fator = 25;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(tela_dinamica){\r\n\t\t\t$(this).css(\"font-size\", Math.floor(($(document).width() + $(document).height()) / fator) + \"px\");\r\n\t\t}else{\r\n\t\t\t$(this).css(\"font-size\", Math.floor(($(\"body\").width() + $(\"body\").height()) / fator) + \"px\");\r\n\t\t}\r\n\t});\r\n\t$(\"select[fonte]\").height(\"auto\");\r\n\r\n\tvar grade = $(\"#div_gradeitem\");\r\n\t$(grade).height(0).height($(grade).parent().height() + 50);\r\n\tredimensionar_primeiro = true;\r\n}", "function m(e,t,n){for(var r=0;r<D.length;r++)if(!isFinite(e)||D[r]._index===e){t=isFinite(e)&&r===e?t:Q(D[r]._index);var o=be(D[r],t);if(o){var i=S.getSourcePageSize(D[r]._index,t?t.rotation:0);o.clearRect(0,0,i.width,i.height),n&&w(o,t)}}}", "function panier() {\n for(i=0; i<objPanier.length; i++) {\n afficheCamera(i);\n }\n //affiche le prix total de la commande\n prixTotal();\n}", "function resize() {\n w.axis.setPosition(w.width / 2, w.height - 175);\n results.setPosition(20, 20);\n}", "function matteDim() {\t\n\tvar outer = document.getElementById('outer'); \n\tvar outerWidth = outer.clientWidth; \n\tvar outerHeight = outer.clientHeight; \n\tvar boxSize\n\tvar scale\n\tif (outerHeight > 2500 || outerWidth > 2500) {\n\t\tboxSize = 2500\n\t\tscale = 1\t\t\n\t} else {\n\t\tif (outerHeight < outerWidth) {\n\t\t\tboxSize = outerWidth\n\t\t} else {\n\t\t\tboxSize = outerHeight\n\t\t}\n\t\tscale = outerWidth/2500\n\t}\n\t//$('#scenesContainer').height(boxSize+'px')\n\t//$('#scenesContainer').width(boxSize+'px')\n\t//console.log('Outer Height: ' + outerHeight + ' Width: ' + outerWidth)\n\t//console.log('Scenes Height: ' + $('#scenesContainer').height() + ' Width: ' + $('#scenesContainer').width())\n\tvar hoffset = (outerWidth - boxSize)/2\n\tvar voffset = (outerHeight - boxSize)/2\n\t//console.log(hoffset)\n\t$('#scenesContainer').css({left:hoffset,top:voffset})\n\treturn(scale)\t\n}", "function _sh_workspace_count_changed( windexer, count ){\n\tplane_height = global.stage.height +\n\t\t( (count - 1) * sliding_height );\n\tfor( let i in subplanes )\n\t\tsubplanes[i].set_size( plane_width, plane_height );\n}", "function k(){setTimeout(function(){// IE7 needs this so dimensions are calculated correctly\n!la.start&&p()&&// !currentView.start makes sure this never happens more than once\ns()},0)}", "function resize() {}", "function execute(){\n hr = document.getElementsByTagName(\"header\")[0];\n window.addEventListener(\"resize\", resiz);/*Se ejecuta solo al redimencionar la ventana con el evento resize*/\n resize();/*Necesario para redimencionar el fondo de imagen al cargar la web*/\n \n \n window.addEventListener(\"scroll\", posit);/*efecto paralax*/\n }", "updateSize() {\n this.w = this.ent.width + this.wo;\n this.h = this.ent.height + this.ho;\n }", "function rebuildScreenOne() {\n\n // set attributes to start value\n totalRowWidth = 0;\n rowWidths = [];\n\n // get new container width\n containerWidth = getContainerWidth();\n\n // set new rows\n setRows(images);\n\n // get new last row index\n lastRowIndex = getLastRowIndex(images);\n\n // calculate new relative percentage of new rows\n calculateRelativePercentage(images);\n\n // scale\n scaleImages(images);\n\n // delete dots\n deleteDots();\n\n // make new dots\n makeDots();\n\n // check if dot of dotIndex still exists\n checkDotExistence(dotIndex);\n\n // show the content of dot dotIndex\n showContentDot(dotIndex);\n}", "function v(){var t=W.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||W[e]:t.height||W[e]}", "function ResizeGraph() {\n\n}", "function onResize() {\n updateSpanning();\n}", "function resizetable() {\n var elem = $('#boardGrid');\n var newGridWidth = elem.outerWidth();\n elem.outerHeight(newGridWidth);\n }", "function explotarDimensiones(estructuraFinal,nodoActual,listaDimensiones,nivelDimension,count,nivelArbol,valoresDimension) {\r\n if (!nodoActual || nodoActual == null)\r\n return;\r\n if(nodoActual.SubEstructuras && nodoActual.SubEstructuras != null && nodoActual.SubEstructuras.length > 0) {\r\n if(count['niveles'] < nivelArbol){\r\n count['niveles'] = nivelArbol;\r\n }\r\n for (var iMiembro = 0; iMiembro < nodoActual.SubEstructuras.length; iMiembro++) {\r\n count['totalNodos'] = count['totalNodos'] + 1;\r\n var nodoNuevo = {};\r\n if (listaDimensiones[nivelDimension].TipoDimension == \"Dimension\") {\r\n nodoNuevo.IdDimension = listaDimensiones[nivelDimension].IdConcepto;\r\n nodoNuevo.IdConcepto = nodoActual.SubEstructuras[iMiembro].IdConcepto;\r\n nodoNuevo.RolEtiquetaPreferido = nodoActual.SubEstructuras[iMiembro].RolEtiquetaPreferido;\r\n } else {\r\n nodoNuevo.IdDimension = \"Periodo\";\r\n nodoNuevo.TipoPeriodo = nodoActual.SubEstructuras[iMiembro].Tipo;\r\n nodoNuevo.Id = nodoActual.SubEstructuras[iMiembro].Id;\r\n nodoNuevo.FechaInstante = nodoActual.SubEstructuras[iMiembro].FechaInstante;\r\n nodoNuevo.FechaInicio = nodoActual.SubEstructuras[iMiembro].FechaInicio;\r\n nodoNuevo.FechaFin = nodoActual.SubEstructuras[iMiembro].FechaFin;\r\n }\r\n nodoNuevo.SubEstructuras = [];\r\n estructuraFinal[estructuraFinal.length] = nodoNuevo;\r\n \r\n \r\n explotarDimensiones(nodoNuevo.SubEstructuras, nodoActual.SubEstructuras[iMiembro], listaDimensiones, nivelDimension, count, nivelArbol + 1, valoresDimension);\r\n //Nodo llenado, combinar la siguiente dimensión\r\n valoresDimension[nivelDimension] = nodoNuevo;\r\n if ((nivelDimension+1) < listaDimensiones.length) {\r\n valoresDimension[nivelDimension] = nodoNuevo;\r\n explotarDimensiones(nodoNuevo.SubEstructuras, listaDimensiones[nivelDimension + 1], listaDimensiones, nivelDimension + 1, count, nivelArbol + 1, valoresDimension);\r\n count['totalNodos'] = count['totalNodos'] - 1;\r\n }else{\r\n //Copiar los valores dimensionales al nodo hoja\r\n nodoNuevo.ValoresDimension = [];\r\n for (var iDim = 0; iDim < valoresDimension.length; iDim++) {\r\n nodoNuevo.ValoresDimension[iDim] = valoresDimension[iDim];\r\n }\r\n }\r\n }\r\n }\r\n \r\n}", "removeDimension(propertyChangedHandler, changeValueDimensions) {\n const that = this,\n index = that._dimensions.length - 1;\n\n if (that._dimensions.length < 2) {\n return;\n }\n\n if (that._dimensions.length === 2) {\n const oldRowsCount = that.rows;\n\n that.rows = 1;\n that._changeRowsColumns('rows', oldRowsCount, 1, undefined, true);\n }\n\n that.$.indexerContainer.removeChild(that._dimensions[index].indexer);\n that._dimensions.pop();\n\n let indexerValue;\n\n if (that.arrayIndexingMode === 'LabVIEW') {\n indexerValue = that._coordinates[0];\n that._indexers.splice(0, 1);\n that._coordinates.splice(0, 1);\n }\n else {\n indexerValue = that._coordinates[index];\n that._indexers.pop();\n that._coordinates.pop();\n }\n\n if (that._suppressDimensionChange !== true) {\n that.dimensions -= 1;\n that.$.fireEvent('dimensionChange', { 'type': 'remove' });\n }\n\n if (changeValueDimensions !== false) {\n that._removeDimensionFromJSArray();\n\n if (that.arrayIndexingMode === 'LabVIEW') {\n that._filledUpTo.splice(0, 1);\n }\n else {\n that._filledUpTo.pop();\n }\n }\n\n if (that._absoluteSelectionStart !== undefined) {\n if (that.arrayIndexingMode === 'LabVIEW') {\n that._absoluteSelectionStart.splice(0, 1);\n }\n else {\n that._absoluteSelectionStart.pop();\n }\n }\n\n if (that._absoluteSelectionEnd !== undefined) {\n if (that.arrayIndexingMode === 'LabVIEW') {\n that._absoluteSelectionEnd.splice(0, 1);\n }\n else {\n that._absoluteSelectionEnd.pop();\n }\n }\n\n if (indexerValue > 0) {\n that._scroll();\n }\n\n if ((that.dimensions > 1 && that._suppressDimensionChange === false && that.showIndexDisplay === true && ((that.dimensions + 1) * (that.indexerHeight + 4) - 2 >= that._cachedHeight)) || that.dimensions === 1 && propertyChangedHandler !== true) {\n that._updateWidgetHeight('dimensions');\n if (that.dimensions === 1 && that.showVerticalScrollbar) {\n that._showVerticalScrollbar(false);\n }\n }\n }", "function W(){var t=l.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||l[e]:t.height||l[e]}", "exibe(){\n image(this.imagem, this.x1, 0, width, height); //exibe a imagem na tela\n image(this.imagem, this.x2, 0, width, height);\n }", "function fit(ventana){\n while(widthCanvas>=ventana){\n minus();\n // console.log(\"widthCanvas: \"+widthCanvas + \"\\nVentana : \"+ventana);\n }\n console.log(\"imagen con: \\n \"+widthCanvas+\" px,\"+heightCanvas+\" px\");\n }", "function S(){var e=le.getBoundingClientRect(),t=\"offset\"+[\"Width\",\"Height\"][n.ort];return 0===n.ort?e.width||le[t]:e.height||le[t]}", "function getDimCanavs() {\n w = canvas.width;\n h = canvas.height;\n }", "function findSize() {\n\t// pobiera wysokosc szerokosc okna\n\tvar height = $(window).height();\n\tvar width = $(window).width();\n\n\t// wysokosc i szerokosc 2panelow: na gorze i po prawej\n\tvar heightTopPanel = $(\".topPanelContainer\").height() + 70;\n\tvar widthInfoPanel = $(\".infoPanelContainer\").width() + 44;\n\n\t// ustawia wielkosci panelow mapy i info\n\t$(\".mapa\").height(height - heightTopPanel);\n\t$(\".infoPanelContainer\").height(height - heightTopPanel);\n\t$(\".mapa\").width(width - widthInfoPanel);\n}", "function posicionarRep(){\n\n var $anchoP=$('body').width();\n\n if($anchoP<1000){\n\n var $posicion=$anchoP-50;\n\n $('#reportes').css('left',$posicion+'px');\n $('#volverCam').css('left',$posicion+'px');\n\n }else if($anchoP>1000&&$anchoP<1200){\n\n var $posicion=$anchoP-80;\n\n $('#reportes').css('left',$posicion+'px');\n $('#volverCam').css('left',$posicion+'px');\n\n\n }else{\n\n var $posicion=($anchoP-1200)/2+1100;\n\n $('#reportes').css('left',$posicion+'px');\n $('#volverCam').css('left',$posicion+'px');\n\n }\n\n}", "function j(){var e=s.getBoundingClientRect(),r=\"offset\"+[\"Width\",\"Height\"][t.ort]\nreturn 0===t.ort?e.width||s[r]:e.height||s[r]}", "function magic_detour()\n {\n img = $('#dashboard .with_control IMG:eq(0)');\n\n c = document.createElement('canvas');\n if(c.getContext)\n {\n c.width = img[0].getAttribute('data-maxwidth');\n c.height = img[0].getAttribute('data-maxheight');\n\n ctx = c.getContext('2d');\n ctx.drawImage(img[0], 0, 0, c.width, c.height);\n\n var imgData = ctx.getImageData(0,0, c.width, c.height);\n\n var delta_pixel = (c.width + 1) * 4;\n\n var first_pixel = [imgData.data[delta_pixel], imgData.data[delta_pixel + 1], imgData.data[delta_pixel +2]];\n var last_pixel = [ imgData.data[imgData.data.length - 4 - delta_pixel], imgData.data[imgData.data.length - 3 - delta_pixel], imgData.data[imgData.data.length - 2 - delta_pixel]];\n\n // on calcule l'ecart entre la premiere pixel et la derniere pixel.. voir si y'a un gros decalage, et si ca merite le coup de vouloir detourer ou pas...\n var diff = Math.abs(first_pixel[0] - last_pixel[0]) + Math.abs(first_pixel[1] - last_pixel[1]) + Math.abs(first_pixel[2] - last_pixel[2]);\n\n if(diff < 50)\n {\n for(i = 0; i < imgData.width * imgData.height * 4; i += 4)\n {\n if(\n imgData.data[i] >= (first_pixel[0] - marge) && imgData.data[i] <= (first_pixel[0] + marge) &&\n imgData.data[i + 1] >= (first_pixel[1] - marge) && imgData.data[i] <= (first_pixel[1] + marge) &&\n imgData.data[i + 2] >= (first_pixel[2] - marge) && imgData.data[i] <= (first_pixel[2] + marge) &&\n imgData.data[i + 3] == \"255\")\n {\n imgData.data[i+3] = \"0\";\n }\n else\n {\n /* possibilité de colorisation de l'objet */\n /* imgData.data[i + 2] = imgData.data[i + 2] * 1.4; */\n /* imgData.data[i + 1] = imgData.data[i + 1] * 1.6;*/\n }\n }\n }\n ctx.putImageData(imgData,0,0);\n\n img[0].src = c.toDataURL(\"image/png\");\n }\n else\n {\n // bon, on peut pas utiliser le canvas, on le detruit\n\n delete c;\n window.alert('fonction non supporte par votre navigateur');\n //img[0].src = img[0].src.replace('.jpg', '.png');\n }\n img[0].setAttribute('data-png', 1);\n update_menu();\n }", "function _reCalculateDimensions(){\n keywordLookupTable = {\n '{{SCREEN_WIDTH}}' : screen.outerWidth(),\n '{{SCREEN_HEIGHT}}' : screen.outerHeight()\n };\n logger.logEvent({'msg': 'recalculated dimensions', 'new_table': keywordLookupTable});\n }", "function pcSizeOnly(){\n changeImgPc();\n }", "function spSizeOnly(){\n changeImgSp();\n }", "_onResize() {\n this.refresh();\n }", "function resizeView() {\n\n navWidth = document.getElementById('vis').clientWidth;\n navHeight = document.getElementById('vis').clientHeight;\n\n}", "function setSize(img, opt) {\n\n\n opt.width = parseInt(opt.container.width(), 0);\n opt.height = parseInt(opt.container.height(), 0);\n\n opt.bw = opt.width / opt.startwidth;\n opt.bh = opt.height / opt.startheight;\n\n if (opt.bh > 1) {\n opt.bw = 1;\n opt.bh = 1;\n }\n\n\n // IF IMG IS ALREADY PREPARED, WE RESET THE SIZE FIRST HERE\n if (img.data('orgw') != undefined) {\n img.width(img.data('orgw'));\n img.height(img.data('orgh'));\n }\n\n\n var fw = opt.width / img.width();\n var fh = opt.height / img.height();\n\n\n opt.fw = fw;\n opt.fh = fh;\n\n if (img.data('orgw') == undefined) {\n img.data('orgw', img.width());\n img.data('orgh', img.height());\n }\n\n\n\n if (opt.fullWidth == \"on\") {\n\n var cow = opt.container.parent().width();\n var coh = opt.container.parent().height();\n var ffh = coh / img.data('orgh');\n var ffw = cow / img.data('orgw');\n\n\n img.width(img.width() * ffh);\n img.height(coh);\n\n if (img.width() < cow) {\n img.width(cow + 50);\n var ffw = img.width() / img.data('orgw');\n img.height(img.data('orgh') * ffw);\n }\n\n if (img.width() > cow) {\n img.data(\"fxof\", (cow / 2 - img.width() / 2));\n\n img.css({ 'position': 'absolute', 'left': img.data('fxof') + \"px\" });\n }\n\n\n } else {\n\n img.width(opt.width);\n img.height(img.height() * fw);\n\n if (img.height() < opt.height && img.height() != 0 && img.height() != null) {\n\n img.height(opt.height);\n img.width(img.data('orgw') * fh);\n }\n }\n\n\n\n img.data('neww', img.width());\n img.data('newh', img.height());\n if (opt.fullWidth == \"on\") {\n opt.slotw = Math.ceil(img.width() / opt.slots);\n } else {\n opt.slotw = Math.ceil(opt.width / opt.slots);\n }\n opt.sloth = Math.ceil(opt.height / opt.slots);\n\n }", "function resizeShip(toChange1, toChange2, dimension, invert) {\n var secondPart;\n var thirdPart;\n var fourthPart;\n if (invert != true) {\n if (toChange2 != 0 && toChange2 != (mapSize - 1)) {\n secondPart = toChange2 - 1;\n thirdPart = toChange2 + 1;\n if (toChange2 < mapSize - 2) fourthPart = toChange2 + 2;\n else\n fourthPart = toChange2 - 2;\n } else if (toChange2 === 0) {\n secondPart = toChange2 + 1;\n thirdPart = toChange2 + 2;\n fourthPart = toChange2 + 3;\n\n } else if (toChange2 === mapSize - 1) {\n secondPart = toChange2 - 1;\n thirdPart = toChange2 - 2;\n fourthPart = toChange2 - 3;\n }\n switch (dimension) {\n case 4:\n if (checkShips(toChange1, secondPart) && checkShips(toChange1, thirdPart) && checkShips(toChange1, fourthPart)) {\n map[toChange1][secondPart] = \"ship\";\n map[toChange1][thirdPart] = \"ship\";\n map[toChange1][fourthPart] = \"ship\";\n shipsContainer[counterShips - 1].setShip([toChange1, secondPart]);\n shipsContainer[counterShips - 1].setShip([toChange1, thirdPart]);\n shipsContainer[counterShips - 1].setShip([toChange1, fourthPart]);\n break;\n }\n case 3:\n if (checkShips(toChange1, secondPart) && checkShips(toChange1, thirdPart)) {\n map[toChange1][secondPart] = \"ship\";\n map[toChange1][thirdPart] = \"ship\";\n shipsContainer[counterShips - 1].setShip([toChange1, secondPart]);\n console.log(\"Dodaje do\" + (counterShips - 1) + \" \" + toChange1 + \" i \" + secondPart);\n shipsContainer[counterShips - 1].setShip([toChange1, thirdPart]);\n console.log(\"Dodaje \" + (counterShips - 1) + \" \" + toChange1 + \" i \" + thirdPart);\n } else {\n resizeShip(toChange1, toChange2, 3, true);\n }\n break;\n case 2:\n if (checkShips(toChange1, secondPart)) {\n map[toChange1][secondPart] = \"ship\";\n shipsContainer[counterShips - 1].setShip([toChange1, secondPart]);\n } else {\n resizeShip(toChange1, toChange2, 2, true);\n }\n //console.log(\"Pierwszy element: \" + shipsContainer[2].position[0]);\n //console.log(\"Drugi element: \" + shipsContainer[2].position[1]);\n //console.log(\"Trzeci element: \" + shipsContainer[2].position[2]);\n //console.log(\"Czwarty element: \" + shipsContainer[0].position[3]);\n //for (i = 0; i < shipsContainer[9].position.length; i++)\n // console.log(\"Element: \" + i + \" = \" +\n // shipsContainer[9].position[i]);\n break;\n default:\n break;\n }\n\n } else {\n if (toChange1 != 0 && toChange1 != (mapSize - 1)) {\n secondPart = toChange1 - 1;\n thirdPart = toChange1 + 1;\n if (toChange1 < mapSize - 2)\n fourthPart = toChange1 + 2;\n else\n fourthPart = toChange1 - 2;\n } else if (toChange1 === 0) {\n\n secondPart = toChange1 + 1;\n thirdPart = toChange1 + 2;\n fourthPart = toChange1 + 3;\n\n } else if (toChange1 === mapSize - 1) {\n secondPart = toChange1 - 1;\n thirdPart = toChange1 - 2;\n fourthPart = toChange1 - 3;\n\n }\n switch (dimension) {\n case 4:\n if (checkShips(secondPart, toChange2) && checkShips(thirdPart, toChange2) && checkShips(fourthPart, toChange2)) {\n\n map[secondPart][toChange2] = \"ship\";\n map[thirdPart][toChange2] = \"ship\";\n map[fourthPart][toChange2] = \"ship\";\n shipsContainer[counterShips - 1].setShip([secondPart, toChange2]);\n shipsContainer[counterShips - 1].setShip([thirdPart, toChange2]);\n shipsContainer[counterShips - 1].setShip([fourthPart, toChange2]);\n\n }\n break;\n case 3:\n if (checkShips(secondPart, toChange2) && checkShips(thirdPart, toChange2)) {\n map[secondPart][toChange2] = \"ship\";\n map[thirdPart][toChange2] = \"ship\";\n shipsContainer[counterShips - 1].setShip([secondPart, toChange2]);\n console.log(\"Dodaje do\" + (counterShips - 1) + \" \" + secondPart + \" i \" + toChange2);\n shipsContainer[counterShips - 1].setShip([thirdPart, toChange2]);\n console.log(\"Dodaje do\" + (counterShips - 1) + \" \" + thirdPart + \" i \" + toChange2);\n\n } else {\n map[toChange1][toChange2] = \"\";\n shipsContainer[counterShips - 1].removeShip([toChange1, toChange2]);\n console.log(\"Usuwam z \" + (counterShips - 1) + toChange1 + \" i \" + toChange2);\n counterShips--;\n initPoints(3, 1);\n }\n break;\n case 2:\n if (checkShips(secondPart, toChange2)) {\n map[secondPart][toChange2] = \"ship\";\n shipsContainer[counterShips - 1].setShip([secondPart, toChange2]);\n\n } else {\n map[toChange1][toChange2] = \"\";\n shipsContainer[counterShips - 1].removeShip([toChange1, toChange2]);\n console.log(\"Usuwam z \" + (counterShips - 1) + toChange1 + \" i \" + toChange2);\n counterShips--;\n initPoints(2, 1);\n }\n default:\n {\n break;\n }\n\n }\n\n }\n}", "function dibujarFigura1(){\n //Limpiamos las areas para volver a dibujar\n figura1.clearRect(0,0,200,200);\n idFig1 = numeroAleatoreoFigura();\n console.log(\"id de la figura 1:\"+figura[idFig1]);\n if(idFig1 === 0){\n crearCuadroAleatoreo1();\n }\n if(idFig1 === 1){\n crearCirculoAleatoreo1();\n }\n if(idFig1 === 2){\n crearTrianguloAleatoreo1();\n }\n}", "function retrocederFoto() {\n if(posicionActual <= 0) {\n posicionActual = IMAGENES.length - 1;\n } else {\n posicionActual--;\n }\n renderizarImagen();\n }", "function retrocederFoto() {\n if(posicionActual <= 0) {\n posicionActual = imagenesp.length - 1;\n } else {\n posicionActual--;\n }\n renderizarImagen();\n }", "function resize() {\n getNewSize();\n rmPaint();\n}", "function eseguiProgrammaLife(nrows, ncols)\n{\n // salva il numero di righe e di colonne in due variabili\n // globali che saranno utilizzate nel seguito dal resto del Programma\n numeroRighe = parseInt(nrows);\n numeroColonne = parseInt(ncols);\n\n // nasconde i campi per la lettura delle dimensioni del campo\n MostraNascondi('N');\n\n // disegna il campo di gioco\n preparaCanvas();\n\n // Prepara la matrice Life\n allocaMemoriaPerMatrice(lifeA); // <-- aggiunta al passo 2\n allocaMemoriaPerMatrice(lifeB); // <-- aggiunta al passo 3\n\n // colora un po' di celle a casaccio\n inizializzaMatriceLifeACaso(lifeA); // <-- aggiunta al passo 2\n coloraCelleInBaseAMatrice(lifeA); // <-- aggiunta al passo 2\n\n\n // Codice nuovo inserito nel passo 3 ----------\n // Ciclo principale\n eseguiCicloDellaVita();\n\n}", "resized() {\n\t\tthis.position.y = this.halfSize.y;\n\t}", "function resizeIt(magnification)\r\n\r\n{var new_layout_width=(original_size.w*magnification)+layout_width_offset;\r\n layout.style.width=new_layout_width.toString()+\"px\";\r\n embed_tag.setAttribute(\"width\",original_size.w*magnification);\r\n\r\n embed_tag.setAttribute(\"height\",original_size.h*magnification);\r\n\r\n}", "updateDimensions() {\n this.props.w = this.getWidth();\n this.props.h = this.getHeight();\n }", "function X(){var t=c.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||c[e]:t.height||c[e]}", "function actualizarDatos(){\r\n centro1X = centroX-dist/2;\r\n centro2X = centroX +dist/2;\r\n console.log(centro1X-rad1);\r\n arrayMedidores[0].x = centro1X-rad1;\r\n arrayMedidores[1].x = centro1X-(-rad1);\r\n arrayMedidores[2].x = centro2X-rad2;\r\n arrayMedidores[3].x = centro2X-(-rad2);\r\n d=dist/PixelMet;\r\n\r\n arrayCargas=[];\r\n arrayCargas2=[];\r\n for(var i = 0;i < maxCargas ; i++){\r\n var posicion = calPosUno(i);\r\n var q = calCargaUno(i);\r\n arrayCargas.push(new CargaP(centro1X+posicion*PixelMet,centroY,10,q))\r\n }\r\n for(var i = 1;i < maxCargas ; i++){\r\n var posicion = calPosDos(i);\r\n var q = calCargaDos(i);\r\n arrayCargas2.push(new CargaP(centro2X-posicion*PixelMet,centroY,10,q))\r\n }\r\n\r\n\r\n\r\n var conta = sliderPas.value;\r\n for(var i = 0 ;i<arrayCargas.length;i++){\r\n if(i<conta){\r\n arrayCargas[i].Boolshow = 1;\r\n }\r\n else {\r\n arrayCargas[i].Boolshow = 0;\r\n }\r\n }\r\n\r\n for(var i = 0 ;i<arrayCargas2.length;i++){\r\n if(i<conta){\r\n \tarrayCargas2[i].Boolshow = 1;\t}\r\n else {\r\n \tarrayCargas2[i].Boolshow = 0; }\r\n }\r\n}", "function view_resources_resize() {\n\t\t\n\t}", "function apeEditor() {\n\t \t var zoom = detectZoom.zoom();\n\t var device = detectZoom.device();\n\n\t //console.log(zoom, device);\n\n\n\t\t$(\".gridstyle2 .grid-item2col\").each(function() {\n\n\t\t\tvar item = $(this).find(\".tiltWrapper\");\n\n\t\t\tvar svg = $(this).find(\".highlightContentBlur\");\n\n\t\t\tvar svginner = $(this).find(\".heroImageBlur\");\n\n\n\t\t\tvar containerHeight = $(item).height();\n\t\t\tvar containerWidth = $(item).width();\n\n\t\t\tcontainerHeight = containerHeight * zoom * device;\n\t\t\tcontainerWidth = containerWidth * zoom * device;\n\t\t\t//console.log(containerHeight);\n\t\t\t$(svg).height(containerHeight);\n\t\t\t$(svginner).width(containerWidth);\n\t\t});\n\t}", "changeDimension(){\n if( this.overlap ){\n this.overlap = false;\n // Changer le fond (changement de dimension)\n player.switchColor();\n\n this.scene.event.compareColor();\n\n // Desactiver la mort avec les bordures\n this.scene.space.desactive()\n \n player.body.velocity.y = player.body.velocity.y/1.5;\n \n setTimeout(() => {\n this.scene.cameras.main.fadeOut( 1000 );\n }, 3000);\n\n // Lancer la scene apres le fade out\n this.scene.cameras.main.on('camerafadeoutcomplete', ()=>{ \n\n // Variable pour initialiser le main menu\n gameState = 0;\n boutonReady = 1;\n onInitBouton = true;\n\n // Faire un fade in lorsque le fade out est fini\n ui.cameras.main.fadeIn( 1000 );\n\n // Lancer le main Menu\n this.scene.scene.stop( curLevel )\n if( indexLvl == 0){\n indexLvl = 1;\n }\n curLevel = dataBase.level[ indexLvl ];\n this.scene.scene.launch( curLevel )\n }, this);\n }\n }", "resizeFactor() {\n var i;\n for (i = 0; i < this.NUMBER_DIMENSIONS; i++) {\n this.resizeVec[i] = this.initialDimensions[i] / this.websiteDimensions[i];\n }\n }", "function navarraExtent() {\n \tvar izquierda = Number('-2.5');\n \tvar abajo = Number('42');\n \tvar derecha = Number('-0.725');\n \tvar arriba = Number('43.315');\n \t//el tipo extent representa una pareja de coordenadas\n \tvar nuevoExtent = ol.proj.transformExtent([izquierda, abajo, derecha, arriba], 'EPSG:4326', 'EPSG:3857');\n \t//creo una nueva vista con los mismo parametros que antes salvo centro y extent\n \t//-\tCentro: vamos a centrar el mapa en la coordenada del centro\n \t//del rect�ngulo especificado por el usuario\n \t//-\tExtent: asignamos la variable nuevoExtent\n \tvar nuevaView = new ol.View({\n \t\tzoom: 8.5,\n \t\tminZoom: 8.5,\n \t\t//media de long y media de lat\n \t\t//donde pone nuevoExtent ponia solo extent \n \t\tcenter: [0.5 * (nuevoExtent[0] + nuevoExtent[2]), 0.5 * (nuevoExtent[1] + nuevoExtent[3])],\n \t\textent: nuevoExtent\n \t});\n \t//asigno al mapa la nueva vista definida\n \tmapa1.setView(nuevaView);\n }", "function init_resize(){\n\n // add more here\n\n}", "[positionViews]() {\n\t\tconst self = this;\n\t\tconst viewSize = self[SIZE] === WIDTH ? self.borderWidth() : self.borderHeight();\n\t\tconst altViewSize = self[ALT_SIZE] === WIDTH ? self.borderWidth() : self.borderHeight();\n\t\tconst splitOffset = offsetToPixels(self.splitOffset(), viewSize);\n\n\t\tself[FIRST_VIEW][self[SIZE]](splitOffset)[self[ALT_SIZE]](altViewSize).resize(true);\n\n\t\tself[SECOND_VIEW][self[SIZE]](viewSize - splitOffset)[self[ALT_SIZE]](altViewSize)\n\t\t\t.css(self[SIZE_ORIGIN], splitOffset)\n\t\t\t.css(self[ALT_SIZE_ORIGIN], ZERO_PIXELS)\n\t\t\t.resize(true);\n\t}", "function resize() {\r\n \r\n // redefine width and height\r\n width = window.innerWidth; //canvas.offsetWidth;\r\n height = window.innerHeight; //canvas.offsetHeight;\r\n \r\n if (height > width * (3/4)) height = width * (3/4); // scale to meet the ratio of the fov\r\n //projmidx = width/2;\r\n //projmidy = height/2;\r\n\r\n // reset the canvas element's size\r\n canvas.width = width;\r\n canvas.height = height;\r\n //*/\r\n\r\n}", "function principal(){\n\n borraCanvas();\n\n console.log(ratonX + ' - ' + ratonY);\n\n for(i=0; i<numParticulas;i++){\n particulas[i].actualiza();\n }\n\n}", "function posCalc(){\n var width = document.innerWidth;\n var colLength = width/3;\n }", "function adaptToContainer() {\n const container = document.getElementById(sctNS.containerID);\n const scw = container.clientWidth;\n const sch = container.clientHeight;\n const sd = (scw > sch) ? sch : scw; // w/h relative to cw/ch;\n\n for (let [i, def] of sctNS.elsjsn.entries()) {\n const dims = {};\n dims.id = def.id;\n dims.left = Math.round(scw * def.posFactors.xF) + sctNS.posUnits;\n dims.top = Math.round(sch * def.posFactors.yF) + sctNS.posUnits;\n dims.width = Math.round(sd * def.posFactors.sF) + sctNS.posUnits;\n dims.height = Math.round(sd * def.posFactors.sF) + sctNS.posUnits;\n sctNS.scatteringElements.repositionElement(dims);\n }\n}", "function resize() {\n currentresid++;\n if (currentresid >= availableResolutions.length) {\n currentresid = 0;\n\n ipcRenderer.send(\"fullscreen\", true);\n document.getElementById(\"restext\").textContent = \"Fullscreen\";\n } else {\n ipcRenderer.send(\"fullscreen\", false);\n ipcRenderer.send(\"resize\", availableResolutions[currentresid][0], availableResolutions[currentresid][1]);\n document.getElementById(\"restext\").textContent = availableResolutions[currentresid][0] + \"x\" + availableResolutions[currentresid][1]\n }\n}", "function ruletaRedimension()\n{\n // By default set the margin to 40px, this can be overridden if needed.\n // This is to stop the canvas1 going right to the right edge of the screen and being overlayed by a scrollbar though\n // if the canvas1 is center aligned, half the magin will be applied to each side since the margin actually reduces the width of the canvas1.\n let margin = 40;\n\n // If a value has been specified for this then update the margin to it.\n if (typeof(ruletaParaDibujarDuranteAnimacion._responsiveMargin) !== 'undefined') {\n margin = ruletaParaDibujarDuranteAnimacion._responsiveMargin;\n }\n\n // Get the current width and also optional min and max width properties.\n let width = window.innerWidth - margin;\n let minWidth = ruletaParaDibujarDuranteAnimacion._responsiveMinWidth;\n let minHeight = ruletaParaDibujarDuranteAnimacion._responsiveMinHeight;\n\n // Adjust the width as it cannot be larger than the original size of the wheel and we don't want\n // the canvas1 and wheel inside it to be too small so check the min width.\n if (width < minWidth) {\n width = minWidth;\n } else if (width > ruletaParaDibujarDuranteAnimacion._originalCanvasWidth) {\n width = ruletaParaDibujarDuranteAnimacion._originalCanvasWidth;\n }\n\n // Work out the percent the new width is smaller than the original width.\n let percent = (width / ruletaParaDibujarDuranteAnimacion._originalCanvasWidth);\n\n // Set the canvas1 width to the width to a percentage of the original width.\n ruletaParaDibujarDuranteAnimacion.canvas1.width = (ruletaParaDibujarDuranteAnimacion._originalCanvasWidth * percent);\n\n // Scale the height if we are supposed to but ensure it does not go below the minHeight.\n if (ruletaParaDibujarDuranteAnimacion._responsiveScaleHeight) {\n let height = (ruletaParaDibujarDuranteAnimacion._originalCanvasHeight * percent);\n\n if (height < minHeight) {\n height = minHeight;\n } else if (height > ruletaParaDibujarDuranteAnimacion._originalCanvasHeight) {\n height = ruletaParaDibujarDuranteAnimacion._originalCanvasHeight;\n }\n\n ruletaParaDibujarDuranteAnimacion.canvas1.height = height;\n }\n\n // OK so now we have the percent, set the scalaFactor of the wheel to this.\n ruletaParaDibujarDuranteAnimacion.scalaFactor = percent;\n\n // Now re-draw the wheel to ensure the changes in size are rendered.\n ruletaParaDibujarDuranteAnimacion.draw();\n}", "function setCrepidoSize() {\n $('.crepido').width(function() {\n var boards = $(this).find('.board');\n var width = parseInt(boards.eq(1).width());\n var gutter = parseInt(boards.eq(1).css('marginLeft'));\n return parseInt(boards.length * width) + parseInt((boards.length - 1) * gutter) + 40;\n });\n }", "function dibujar_protesis_fija(canvas){\r\n\tif (i_inic<=i_final){\r\n\t//var px=87;\r\n\t//var py=129;\r\n\t//var numi=0;\r\n\t\r\n\tvar i= i_inic+1;\r\n\t var i_inic_s= i_inic+1;\r\n\t \r\n\t//dibujar diente sano antes de convencion\r\n\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic);\r\n\tdibujar_diente_sano (canvas,cara1,i_inic);\r\n\tdibujar_diente_sano (canvas,cara2,i_inic);\r\n\tdibujar_diente_sano (canvas,cara3,i_inic);\r\n\tdibujar_diente_sano (canvas,cara4,i_inic);\r\n\tdibujar_diente_sano (canvas,cara5,i_inic);\r\n \r\n\t//dibujar diente sano en dientes medios\r\n\tfor ( i_inic_s; i_inic_s<i_final; i_inic_s++) {\r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_inic_s);\r\n\t\t\r\n\t\t\r\n\t}\r\n\t//dibujar diente sano antes de convencion\r\n\tdibujar_diente_sano_alr(canvas,pxf, pyf,i_final);\r\n\tdibujar_diente_sano (canvas,cara1,i_final);\r\n\tdibujar_diente_sano (canvas,cara2,i_final);\r\n\tdibujar_diente_sano (canvas,cara3,i_final);\r\n\tdibujar_diente_sano (canvas,cara4,i_final);\r\n\tdibujar_diente_sano (canvas,cara5,i_final);\r\n\t\r\n\t//dibujar protesis fija en diente inicial\r\n\tdibujar_protesis_fija_inicial(canvas,protesisim,i_inic);\r\n\t\r\n\t//dibujar protesis fija en dientes medios\r\n\tfor ( i; i<i_final; i++) {\r\n\t\r\n\t\t//dibujar convencion\r\n\t\tdibujar_protesis_fija_media(canvas,protesisim,i);\r\n\t\t\r\n\t}\r\n\t\r\n\t//dibujar protesis fija en diente final\r\n\tdibujar_protesis_fija_final(canvas,protesisf,i_final);\r\n\t//\r\n\t\r\n\t\r\n\ti=0;\r\n\ti_inic=0;\r\n\ti_final=0;\r\n\tpxi=0;\r\n\tpxf=0;\r\n\tpyi=0;\r\n\tpyf=0;\r\n\tsw_punto_inic =false;\r\n\tsw_punto_final =false;\r\n\tsector_inicial=0;\r\n\tsector_final=0;\r\n\t//protesisf.length=0;\r\n\t//protesisim.length=0;\r\n\t\r\n\t\r\n\t}else{\r\n\t\tvar i= i_final+1;\r\n\t\tvar i_inic_s= i_final+1;\r\n\t\t \r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_inic);\r\n\t \r\n\t\t//dibujar diente sano en dientes medios\r\n\t\tfor ( i_inic_s; i_inic_s<i_inic; i_inic_s++) {\r\n\t\t\t//dibujar diente sano antes de convencion\r\n\t\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara1,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara2,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara3,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara4,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara5,i_inic_s);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxf, pyf,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_final);\r\n\t\t//dibujar protesis fija en diente inicial\r\n\t\tdibujar_protesis_fija_inicial(canvas,protesisim,i_final);\r\n\t\t\r\n\t\t//dibujar protesis fija en dientes medios\r\n\t\tfor ( i; i<i_inic; i++) {\r\n\t\t\tdibujar_protesis_fija_media(canvas,protesisim,i);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//dibujar protesis fija en diente final\r\n\t\tdibujar_protesis_fija_final(canvas,protesisf,i_inic);\r\n\t\ti=0;\r\n\t\ti_inic=0;\r\n\t\ti_final=0;\r\n\t\tpxi=0;\r\n\t\tpxf=0;\r\n\t\tpyi=0;\r\n\t\tpyf=0;\r\n\t\tsw_punto_inic =false;\r\n\t\tsw_punto_final =false;\r\n\t\tsector_inicial=0;\r\n\t\tsector_final=0;\r\n\t\t//protesisf.length=0;\r\n\t\t//protesisim.length=0;\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\r\n}", "function cambiarPorte(wi, hi){\n\tget('wcr_imagen').style.width = wi+'px';\n\tget('wcr_imagen').style.height = hi+'px';\n\tget('wcr_imagen').style.maxWidth = wi+'px';\n\tget('wcr_imagen').style.maxHeight = hi+'px';\n}", "static getDimension(callBack){\n Dimensions.addEventListener('change', () => {\n width = Dimensions.get(\"screen\").width\n height = Dimensions.get(\"screen\").height \n })\n\n \n // store the orientation, height and width in an object \n \n var object={\n \"height\":parseInt(height, 10),\n \"width\":parseInt(width, 10),\n \"orientation\":orientation = (Dimensions.get(\"screen\").width<Dimensions.get(\"screen\").height)?\"PORTRAIT\":\"LANDSCAPE\"\n } \n callBack(object);\n\n }", "function view_careers_resize() {\n\t\t\n\t}", "onLayoutReposition() {\n this.slider.find('.slick-slide').css('max-width', this.getSliderWidth());\n this.slider.find('.images-list__item').css('max-height', this.getSliderHeight());\n }", "function onResize() {\n positionContainer();\n}", "function setMapSize(){\n\t//si la fenetre est inferieur a x alors on met la carte en largeur max (typiquement on est sur un smartphone)\n\tif(window.innerWidth < 769){\n\t\tvar largeur_a_enlever_a_la_carte = 0;\n\t\tvar hauteur_a_rajouter_a_la_liste = 50;\n\t}\n\telse{\n\t\tvar largeur_a_enlever_a_la_carte = 300;\n\t\tvar hauteur_a_rajouter_a_la_liste = 0;\n\t}\n\t//si le navigateur est internet explorer\n\tif (MQA.browser.name == \"msie\"){\n\t\tdocument.getElementById('map').style.width = document.body.offsetWidth - 20 - largeur_a_enlever_a_la_carte;\n\t\tdocument.getElementById('map').style.height = document.body.offsetHeight - $('#offset').height() - 20;\n\t\talert(\"Internet Explorer ne permet pas d'afficher les équipes et leur parcours. Utilisez un navigateur plus récent comme Chrome ou Firefox.\");\n\t\t//meme chose pour la liste\n\t\tdocument.getElementById('userlist').style.height = document.body.offsetHeight - $('#offset').height() - 20;\n\t} else {\n\t\tdocument.getElementById('map').style.width = window.innerWidth - largeur_a_enlever_a_la_carte;\n\t\tdocument.getElementById('map').style.height = window.innerHeight - $('#offset').height();\n\t\t//meme chose pour la liste\n\t\tdocument.getElementById('userlist').style.height = window.innerHeight - $('#offset').height() + hauteur_a_rajouter_a_la_liste;\t\n\t}\n\t\n}", "function refreshView() {\nrefreshFlex()\n//two.width = flexWidth+200\n//two.height = flexLength+100\n\n//two.update()\n\n}", "function onResize() {\n\t\t$log.log(preDebugMsg + \"onResize called\");\n\n\t\tvar windowWidth = $(window).width();\n\t\tvar windowHeight = $(window).height() - 100;\n\n\t\tvar dataLeft = 250;\n\t\tvar dataTop = 10;\n\t\tvar vizLeft = 5;\n\t\tvar vizTop = 105;\n\t\tif(windowHeight < windowWidth) {\n\t\t\tdataLeft = 5;\n\t\t\tdataTop = 105\n\t\t\tvizLeft = 250;\n\t\t\tvizTop = 10\n\t\t}\n\n\t\tvar fontSize = 11;\n\n\t\tif(loadedChildren[\"DigitalDashboardSmartDataSource\"].length > 0) {\n\t\t\tvar datasrc = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardSmartDataSource\"][0]);\n\t\t\tdatasrc.scope().set(\"root:top\", dataTop);\n\t\t\tdatasrc.scope().set(\"root:left\", dataLeft);\n\t\t}\n\n\t\tif(loadedChildren[\"DigitalDashboardPlugin3DDensityPlotAdv\"].length > 0) {\n\t\t\tvar n = 256;\n\t\t\tvar cw = Math.max(1, Math.min(Math.ceil((windowWidth - vizLeft - 50) / 2 / (2*n)), Math.floor((windowHeight - vizTop - 60) / (2*n))));\n\t\t\tvar zoom = Math.max(200, Math.min(windowWidth - vizLeft - 2*cw * 256 - 50, windowHeight - vizTop - 60));\n\n\t\t\tvar viz = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardPlugin3DDensityPlotAdv\"][0]);\n\t\t\tviz.scope().set(\"root:top\", vizTop);\n\t\t\tviz.scope().set(\"root:left\", vizLeft);\n\t\t\tviz.scope().set(\"DrawingArea:width\", cw * 256 * 2 + 20);\n\t\t\tviz.scope().set(\"DrawingArea:height\", cw * 256 * 2 + 20);\n\t\t\tviz.scope().set(\"CellWidth\", cw);\n\t\t\tviz.scope().set(\"ZoomSpace\", zoom);\n\n\t\t\t$log.log(preDebugMsg + \"viz moved and set to \" + vizTop + \" \" + vizLeft + \" \" + cw + \" \" + zoom);\n\t\t}\n\t}", "function index_inicializarGaleria() {\n\tvar wCliente = $(window).width();\n\tvar altura = ($(window).width() * parseInt($(\".galeria\").attr(\"data-height\"))) / parseInt($(\".galeria\").attr(\"data-width\"));\n\t$(\".galeria\").css(\"height\", altura.toFixed(2)+\"px\");\n\t$(\".galeria .desplazamiento\").css(\"width\", $(\".galeria .desplazamiento .bloque\").length+\"00%\");\n\t$(\".galeria .desplazamiento .bloque\").css(\"width\", (100 / $(\".galeria .desplazamiento .bloque\").length)+\"%\");\n\t$(\".galeria .desplazamiento\").attr(\"data-pos\", 0);\n\t\n\tindex_galeria_timer = setTimeout(\"index_desplazamiento_direccion(1)\", index_galeria_desp);\n}", "function resizeImg(){\n\t\t\t\t//console.log('Slide '+idx+' is resized');\n\t\t\t\tif (imgAR>panelAR) { //wider/shorter than default\n\t\t\t\t\tnImgW = panelW; //match by width\n\t\t\t\t\tnImgH = Math.round(panelW/imgAR); \n\t\t\t\t\tpositionImg(); //positon image vertically\n\t\t\t\t} else if (imgAR==panelAR) { //same AR\n\t\t\t\t\tnImgW = panelW; //match width\n\t\t\t\t\tnImgH = panelH; //match height\n\t\t\t\t\t//logImgData();\n\t\t\t\t} else { //higher/narrower than default\n\t\t\t\t\tnImgW = Math.round(panelH*imgAR);\n\t\t\t\t\tnImgH = panelH; //match by height\n\t\t\t\t\t//logImgData();\n\t\t\t\t}\n\t\t\t\t$img //apply resized dimensions to image using CSS\n\t\t\t\t\t.css('width',nImgW)\n\t\t\t\t\t.css('height',nImgH);\n\t\t\t\t\t//.attr('width',nImgW)\n\t\t\t\t\t//.attr('height',nImgH)\n\t\t\t}", "function updateContainers() {\n\n\t\tvar width = editor.duration * scale;\n\n\t\telements.setWidth( width + 'px' );\n\t\t// curves.setWidth( width + 'px' );\n\n\t}", "atualizaCentroideX() {\r\n if (this.centroidesX.length <= 0) {\r\n this.centroidesX[0] = this.eixoX[this.indice1];\r\n for (let i = 1; i < this.grupos; i++) {\r\n this.centroidesX[i] = this.eixoX[this.indice2];\r\n }\r\n } else {\r\n for (let i = 0; i < this.grupos; i++) {\r\n this.centroidesX[i] = this.mediaGrupoX(\r\n this.grupoID_Anterior,\r\n i\r\n );\r\n }\r\n }\r\n }", "updateGeometry() {\n this.cols = this.engine.getCols();\n this.rows = this.engine.getRows();\n let maxWidth = displayContainer.clientWidth;\n let maxHeight = displayContainer.clientHeight;\n console.log(\"maxWidth: \" + maxWidth + \"maxHeight\" + maxHeight);\n let displayAspectRatio = this.cols / this.rows;\n let containerAspectRatio = maxWidth / maxHeight;\n if (displayAspectRatio > containerAspectRatio) { \n this.canvas.width = maxWidth;\n this.canvas.height = (this.rows / this.cols)* maxWidth;\n this.cellSize = this.canvas.width / this.cols;\n } else {\n this.canvas.height = maxHeight;\n this.canvas.width = (this.cols / this.rows) * maxHeight;\n this.cellSize = this.canvas.height / this.rows;\n }\n this.top = this.canvas.offsetTop;\n this.left = this.canvas.offsetLeft;\n }", "function xResizeTo(e,w,h)\r\n{\r\n xWidth(e,w);\r\n xHeight(e,h);\r\n}", "function setExecuteSize(g) {\n $('#panel').height($(window).height());\n var h = 2*$(window).height() - $(document).height();\n $('#panel').height(h);\n if (g) {\n\t$('#panel').width($('#panel').data('origWidth'));\n\t$('#canvas').css('display','block');\n\tvar w = $('#container').width();\n\tw -= $('#panel').outerWidth() + 30;\n\t$('#canvas').height(h);\n\t$('#cvs').attr('width',w);\n\t$('#cvs').attr('height',h - 6); // not sure why 6 here\n\t$('#restart').css('display','inline');\n\t$('#pause').css('display','inline');\n\t$('#paramdiv').css('display','block');\n\t$('#outdiv').css('height','50%');\n } else {\n\t$('#canvas').css('display','none');\n\t$('#panel').width($('#container').width() - 40);\n\t$('#restart').css('display','inline');\n\t$('#pause').css('display','none');\n\t$('#paramdiv').css('display','none');\n\t$('#outdiv').css('height','100%');\n }\n}", "function calElementPos(){\n\t\tcalSize();\n\t\tcalPie();\n\t\tcalGraph();\n\t}", "function view_home_resize() {\n\t\t\n\t}", "function verifHorizontal(){\n\tvar contH = 0;\n\tfor(var x=1;x<8;x++){\n\t\tfor(var y=1;y<6;y++){\n\t\t\tvar q = $(\".col-\"+y).children(\"img:nth-last-child(\"+x+\")\").attr(\"src\")\n\t\t\tvar w = $(\".col-\"+(y+1)).children(\"img:nth-last-child(\"+x+\")\").attr(\"src\")\n\t\t\tvar e = $(\".col-\"+(y+2)).children(\"img:nth-last-child(\"+x+\")\").attr(\"src\")\n\t\t\tif((q==w) && (w==e) && (q!=null) && (w!=null) && (e!=null)){\n\t\t\t\t$(\".col-\"+y).children(\"img:nth-last-child(\"+(x)+\")\").attr(\"class\", \"elemento borrar\")\n\t\t\t\t$(\".col-\"+(y+1)).children(\"img:nth-last-child(\"+(x)+\")\").attr(\"class\", \"elemento borrar\")\n\t\t\t\t$(\".col-\"+(y+2)).children(\"img:nth-last-child(\"+(x)+\")\").attr(\"class\", \"elemento borrar\")\n\t\t\t\tcontH = 1;\n\t\t\t}\n\t\t}\n\t}\n\treturn contH;\n}", "_refreshCostume () {\n if (this.costume) {\n this.width = this.costume.visibleWidth\n this.height = this.costume.visibleHeight\n }\n\n this.element ? this.element.update(this) : null\n }", "function galerijRechts(){\r\n\tlengthExtensie = getImgPad(\"plaatjeFrame\");\r\n\tif (Number(lengthExtensie[3]) < totaalPlaatjes){\r\n\t\tplaatjeNummer = Number(lengthExtensie[3]) + 1;\r\n\t}\r\n\telse{\r\n\t\tplaatjeNummer = 1;\r\n\t}\r\n\tsetPlaatjeNaam(lengthExtensie, plaatjeNummer, \"plaatjeFrame\");\r\n\treturn\r\n}", "_onResize () {\n }", "function resize() {\r\n \t$(\".docInformation\").css(\"opacity\", 1);\r\n var targetWidth = parseInt(container.style(\"width\"));\r\n svg.attr(\"width\", targetWidth);\r\n svg.attr(\"height\", Math.round(targetWidth / aspect));\r\n }", "function retrocederFoto() {\n if(posicionActual <= 0) {\n posicionActual = imagenes.length -1;\n\n } else {\n posicionActual--;\n }\n renderizarImagen();\n }", "function H(){var t=f.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][n.ort];return 0===n.ort?t.width||f[e]:t.height||f[e]}", "function gridRedraw() {\n rowHeight = 700 / config.numRows;\n colWidth = 700 / config.numCols;\n }", "function ajustaFundo(){\r\n\tvar altura = new String();\r\n\tvar largura = new String();\r\n\t\r\n\taltura = window.screen.availHeight + 'px';\r\n\tlargura = window.screen.availWidth + 'px';\r\n\t\r\n\tdocument.styleSheets[0][rulesName][3].style.width = largura;\r\n\tdocument.styleSheets[0][rulesName][3].style.height = altura;\r\n\t\r\n\treturn true;\r\n}", "function ondea(){\n /* REFIERE AL TÍTULO */ \n var titulo = document.querySelector(\"h1\"); \n /* CAPTURA EL CONTENIDO DEL TÍTULO */\n var texto = titulo.innerHTML; \n /* MIDE EL TAMAÑO DEL TÍTULO */\n var ancho = 700; \n var alto = 120; \n\n /*SIEMPRE AJUSTA EL ancho COMO MÚLTIPLO DE anchoFaja EN PIXELES*/\n ancho = ancho+(anchoFaja-ancho%anchoFaja); \n /* FIJA EL TAMAÑO DEL TÍTULO */\n titulo.style.width = ancho+\"px\"; \n titulo.style.height = alto+\"px\"; \n\n /* LA CANTIDAD DE BANDAS ES EL ANCHO DE TÍTULO SOBRE ANCHO DE CLIP */\n var totalFajas = ancho/1.4; \n\n /* VACÍA EL TÍTULO CONTENEDOR DE TEXTO */\n titulo.innerHTML = \"\"; \n\n /* CREA LAS BANDAS Y LES DA FORMATO */\n for(i=0; i<totalFajas; i++) {\n /* UN DIV PARA CADA FAJA */\n faja = document.createElement(\"div\"); \n // $(\"div\").addClass( \"fulljit\" );\n /* LE ASIGNA LA MISMA ALTURA DEL TÍTULO */\n faja.style.height = alto+\"px\"; \n faja.style.width = ancho+\"px;\"\n /* PONE EL MISMO TEXTO ORIGINAL */\n faja.innerHTML = texto; \n /* DEJA VISIBLE UN CLIP DE 2px DE ANCHO, CADA UNO 2px A LA IZQUIERDA DEL ANTERIOR PARA QUE PAREZCA UNA IMAGEN DE TÍTULO COMPLETA SIN CORTES */\n faja.style.clip = \"rect(0, \"+((i+1)*anchoFaja)+\"px, \"+alto+\"px, \"+(i*anchoFaja)+\"px)\"; \n /* RETRASA LA ANIMACIÓN CSS DE CADA FAJA SIGUIENDO UNA ONDA DE TIEMPO SENOIDE */\n faja.style.animationDelay = (Math.cos(i)+i*anchoOnda)+\"ms\"; \n /* AGREGA LA CAPA AL CONTENEDOR */\n titulo.appendChild(faja);\n }\n}", "function setSliderElementsSize($item,i){\n if($window_width > responsive_breakpoint_set[0]) {\n slider_graphic_coefficient = coefficients_graphic_array[0];\n slider_title_coefficient = coefficients_title_array[0];\n slider_subtitle_coefficient = coefficients_subtitle_array[0];\n slider_text_coefficient = coefficients_text_array[0];\n slider_button_coefficient = coefficients_button_array[0];\n }else if($window_width > responsive_breakpoint_set[1]){\n slider_graphic_coefficient = coefficients_graphic_array[1];\n slider_title_coefficient = coefficients_title_array[1];\n slider_subtitle_coefficient = coefficients_subtitle_array[1];\n slider_text_coefficient = coefficients_text_array[1];\n slider_button_coefficient = coefficients_button_array[1];\n }else if($window_width > responsive_breakpoint_set[2]){\n slider_graphic_coefficient = coefficients_graphic_array[2];\n slider_title_coefficient = coefficients_title_array[2];\n slider_subtitle_coefficient = coefficients_subtitle_array[2];\n slider_text_coefficient = coefficients_text_array[2];\n slider_button_coefficient = coefficients_button_array[2];\n }else if($window_width > responsive_breakpoint_set[3]){\n slider_graphic_coefficient = coefficients_graphic_array[3];\n slider_title_coefficient = coefficients_title_array[3];\n slider_subtitle_coefficient = coefficients_subtitle_array[3];\n slider_text_coefficient = coefficients_text_array[3];\n slider_button_coefficient = coefficients_button_array[3];\n }else if ($window_width > responsive_breakpoint_set[4]) {\n slider_graphic_coefficient = coefficients_graphic_array[4];\n slider_title_coefficient = coefficients_title_array[4];\n slider_subtitle_coefficient = coefficients_subtitle_array[4];\n slider_text_coefficient = coefficients_text_array[4];\n slider_button_coefficient = coefficients_button_array[4];\n }else if ($window_width > responsive_breakpoint_set[5]){\n slider_graphic_coefficient = coefficients_graphic_array[5];\n slider_title_coefficient = coefficients_title_array[5];\n slider_subtitle_coefficient = coefficients_subtitle_array[5];\n slider_text_coefficient = coefficients_text_array[5];\n slider_button_coefficient = coefficients_button_array[5];\n }\n else{\n slider_graphic_coefficient = coefficients_graphic_array[6];\n slider_title_coefficient = coefficients_title_array[6];\n slider_subtitle_coefficient = coefficients_subtitle_array[6];\n slider_text_coefficient = coefficients_text_array[6];\n slider_button_coefficient = coefficients_button_array[6];\n }\n\n // letter-spacing decrease quicker\n var slider_title_coefficient_letter_spacing = slider_title_coefficient;\n var slider_subtitle_coefficient_letter_spacing = slider_subtitle_coefficient;\n var slider_text_coefficient_letter_spacing = slider_text_coefficient;\n if($window_width <= responsive_breakpoint_set[0]) {\n slider_title_coefficient_letter_spacing = slider_title_coefficient/2;\n slider_subtitle_coefficient_letter_spacing = slider_subtitle_coefficient/2;\n slider_text_coefficient_letter_spacing = slider_text_coefficient/2;\n }\n\n $item.find('.thumb').css({\"width\": Math.round(window[\"slider_graphic_width_\" + i][0]*slider_graphic_coefficient) + 'px'}).css({\"height\": Math.round(window[\"slider_graphic_height_\" + i][0]*slider_graphic_coefficient) + 'px'});\n $item.find('.qode_slide-svg-holder svg').css({\"width\": Math.round(window[\"slider_svg_width_\" + i][0]*slider_graphic_coefficient) + 'px'}).css({\"height\": Math.round(window[\"slider_svg_height_\" + i][0]*slider_graphic_coefficient) + 'px'});\n\n $item.find('.q_slide_title').css({\"font-size\": Math.round(window[\"slider_title_\" + i][0]*slider_title_coefficient) + 'px'});\n $item.find('.q_slide_title').css({\"line-height\": Math.round(window[\"slider_title_\" + i][1]*slider_title_coefficient) + 'px'});\n $item.find('.q_slide_title').css({\"letter-spacing\": Math.round(window[\"slider_title_\" + i][2]*slider_title_coefficient_letter_spacing) + 'px'});\n $item.find('.q_slide_title').css({\"margin-bottom\": Math.round(window[\"slider_title_\" + i][3]*slider_title_coefficient) + 'px'});\n\n $item.find('.q_slide_subtitle').css({\"font-size\": Math.round(window[\"slider_subtitle_\" + i][0]*slider_subtitle_coefficient) + 'px'});\n $item.find('.q_slide_subtitle').css({\"line-height\": Math.round(window[\"slider_subtitle_\" + i][1]*slider_subtitle_coefficient) + 'px'});\n $item.find('.q_slide_subtitle').css({\"letter-spacing\": Math.round(window[\"slider_subtitle_\" + i][2]*slider_subtitle_coefficient_letter_spacing) + 'px'});\n $item.find('.q_slide_subtitle').css({\"margin-bottom\": Math.round(window[\"slider_subtitle_\" + i][3]*slider_subtitle_coefficient) + 'px'});\n\n $item.find('.q_slide_text').css({\"font-size\": Math.round(window[\"slider_text_\" + i][0]*slider_text_coefficient) + 'px'});\n $item.find('.q_slide_text').css({\"line-height\": Math.round(window[\"slider_text_\" + i][1]*slider_text_coefficient) + 'px'});\n $item.find('.q_slide_text').css({\"letter-spacing\": Math.round(window[\"slider_text_\" + i][2]*slider_text_coefficient_letter_spacing) + 'px'});\n\n $item.find('.qbutton:eq(0)').css({\"font-size\": Math.round(window[\"slider_button1_\" + i][0]*slider_button_coefficient) + 'px'});\n $item.find('.qbutton:eq(1)').css({\"font-size\": Math.round(window[\"slider_button2_\" + i][0]*slider_button_coefficient) + 'px'});\n $item.find('.qbutton:eq(0)').css({\"line-height\": Math.round(window[\"slider_button1_\" + i][1]*slider_button_coefficient) + 'px'});\n $item.find('.qbutton:eq(1)').css({\"line-height\": Math.round(window[\"slider_button2_\" + i][1]*slider_button_coefficient) + 'px'});\n $item.find('.qbutton:eq(0)').css({\"letter-spacing\": Math.round(window[\"slider_button1_\" + i][2]*slider_button_coefficient) + 'px'});\n $item.find('.qbutton:eq(1)').css({\"letter-spacing\": Math.round(window[\"slider_button2_\" + i][2]*slider_button_coefficient) + 'px'});\n $item.find('.qbutton:eq(0)').css({\"height\": Math.round(window[\"slider_button1_\" + i][3]*slider_button_coefficient) + 'px'});\n $item.find('.qbutton:eq(1)').css({\"height\": Math.round(window[\"slider_button2_\" + i][3]*slider_button_coefficient) + 'px'});\n if(window[\"slider_button1_\" + i][4] != 0) {\n $item.find('.qbutton:eq(0)').css({\"width\": Math.round(window[\"slider_button1_\" + i][4]*slider_button_coefficient) + 'px'});\n }else{\n $item.find('.qbutton:eq(0)').css({\"width\": 'auto'});\n }\n if(window[\"slider_button2_\" + i][4] != 0) {\n $item.find('.qbutton:eq(1)').css({\"width\": Math.round(window[\"slider_button2_\" + i][4]*slider_button_coefficient) + 'px'});\n }else{\n $item.find('.qbutton:eq(1)').css({\"width\": 'auto'});\n }\n $item.find('.qbutton:eq(0)').css({\"padding-left\": Math.round(window[\"slider_button1_\" + i][5]*slider_button_coefficient) + 'px'});\n $item.find('.qbutton:eq(1)').css({\"padding-left\": Math.round(window[\"slider_button2_\" + i][5]*slider_button_coefficient) + 'px'});\n $item.find('.qbutton:eq(0)').css({\"padding-right\": Math.round(window[\"slider_button1_\" + i][6]*slider_button_coefficient) + 'px'});\n $item.find('.qbutton:eq(1)').css({\"padding-right\": Math.round(window[\"slider_button2_\" + i][6]*slider_button_coefficient) + 'px'});\n\n $item.find('.separator').css({\"margin-top\": Math.round(window[\"slider_separator_\" + i][0]*slider_title_coefficient) + 'px'});\n $item.find('.separator').css({\"margin-bottom\": Math.round(window[\"slider_separator_\" + i][1]*slider_title_coefficient) + 'px'});\n\n }", "function tamaño_normal(){\n reducir.style.width = \"1280px\";\n reducir.style.height = \"720px\";\n\n }", "resize(width, height) {\n\n let dd2 = (width > height) ? width / 2 : height / 2;\n \n m4_ortho_res(this.projectionMatrix, width, height, -dd2, dd2); \n\n this.near = -dd2;\n this.far = dd2;\n }", "function onResize() {\n\t\t$log.log(preDebugMsg + \"onResize called\");\n\n\t\tvar windowWidth = $(window).width();\n\t\tvar windowHeight = $(window).height() - 100;\n\n\t\tvar vizLeft = 255;\n\t\tvar vizTop = 10;\n\t\tvar vizH = Math.max(100, Math.floor((windowHeight - vizTop - 55) / 3));\n\t\tvar vizW = Math.max(200, Math.floor((windowWidth - vizLeft - 60) / 2));\n\t\tvar oneRow = false;\n\n\t\tif(vizH*2 < vizW) {\n\t\t\toneRow = true;\n\t\t\tvizH = Math.max(100, Math.floor((windowHeight - vizTop - 5) / 2));\n\t\t\tvizW = Math.max(200, Math.floor((windowWidth - vizLeft - 30) / 3));\n\t\t}\n\n\t\tif(oneRow) {\n\t\t\tif(loadedChildren[\"DigitalDashboardPluginMap\"].length > 0) {\n\t\t\t\tvar par = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardPluginMap\"][0]);\n\t\t\t\tpar.scope().set(\"root:top\", vizTop);\n\t\t\t\tpar.scope().set(\"root:left\", vizLeft);\n\t\t\t\tpar.scope().set(\"mapDrawingArea:width\", vizW);\n\t\t\t\tpar.scope().set(\"mapDrawingArea:height\", vizH * 2);\n\t\t\t}\n\n\t\t\tif(loadedChildren[\"DigitalDashboardPluginMap\"].length > 1) {\n\t\t\t\tvar par = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardPluginMap\"][1]);\n\t\t\t\tpar.scope().set(\"root:top\", vizTop);\n\t\t\t\tpar.scope().set(\"root:left\", vizLeft + vizW + 10);\n\t\t\t\tpar.scope().set(\"mapDrawingArea:width\", vizW);\n\t\t\t\tpar.scope().set(\"mapDrawingArea:height\", vizH * 2);\n\t\t\t}\n\n\t\t\tif(loadedChildren[\"DigitalDashboardPluginBarChart\"].length > 0) {\n\t\t\t\tvar viz = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardPluginBarChart\"][0]);\n\t\t\t\tviz.scope().set(\"root:top\", vizTop);\n\t\t\t\tviz.scope().set(\"root:left\", vizLeft + (vizW + 10) * 2);\n\t\t\t\tviz.scope().set(\"DrawingArea:width\", vizW - 25);\n\t\t\t\tviz.scope().set(\"DrawingArea:height\", vizH * 2 / 3 - 10);\n\t\t\t}\n\n\t\t\tif(loadedChildren[\"DigitalDashboardPluginBarChart\"].length > 1) {\n\t\t\t\tvar viz = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardPluginBarChart\"][1]);\n\t\t\t\tviz.scope().set(\"root:top\", vizTop + vizH * 2 / 3);\n\t\t\t\tviz.scope().set(\"root:left\", vizLeft + (vizW + 10) * 2);\n\t\t\t\tviz.scope().set(\"DrawingArea:width\", vizW - 25);\n\t\t\t\tviz.scope().set(\"DrawingArea:height\", vizH * 2 / 3 - 10);\n\t\t\t}\n\n\t\t\tif(loadedChildren[\"DigitalDashboardPluginBarChart\"].length > 2) {\n\t\t\t\tvar viz = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardPluginBarChart\"][2]);\n\t\t\t\tviz.scope().set(\"root:top\", vizTop + vizH * 2 / 3 * 2);\n\t\t\t\tviz.scope().set(\"root:left\", vizLeft + (vizW + 10) * 2);\n\t\t\t\tviz.scope().set(\"DrawingArea:width\", vizW - 25);\n\t\t\t\tviz.scope().set(\"DrawingArea:height\", vizH * 2 / 3 - 10);\n\t\t\t}\n\t\t} else {\n\t\t\tif(loadedChildren[\"DigitalDashboardPluginMap\"].length > 0) {\n\t\t\t\tvar par = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardPluginMap\"][0]);\n\t\t\t\tpar.scope().set(\"root:top\", vizTop);\n\t\t\t\tpar.scope().set(\"root:left\", vizLeft);\n\t\t\t\tpar.scope().set(\"mapDrawingArea:width\", vizW);\n\t\t\t\tpar.scope().set(\"mapDrawingArea:height\", vizH * 2);\n\t\t\t}\n\n\t\t\tif(loadedChildren[\"DigitalDashboardPluginMap\"].length > 1) {\n\t\t\t\tvar par = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardPluginMap\"][1]);\n\t\t\t\tpar.scope().set(\"root:top\", vizTop);\n\t\t\t\tpar.scope().set(\"root:left\", vizLeft + vizW + 10);\n\t\t\t\tpar.scope().set(\"mapDrawingArea:width\", vizW);\n\t\t\t\tpar.scope().set(\"mapDrawingArea:height\", vizH * 2);\n\t\t\t}\n\n\t\t\tif(loadedChildren[\"DigitalDashboardPluginBarChart\"].length > 0) {\n\t\t\t\tvar viz = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardPluginBarChart\"][0]);\n\t\t\t\tviz.scope().set(\"root:top\", vizTop + 15 + vizH * 2);\n\t\t\t\tviz.scope().set(\"root:left\", vizLeft + vizW + 10);\n\t\t\t\tviz.scope().set(\"DrawingArea:width\", vizW);\n\t\t\t\tviz.scope().set(\"DrawingArea:height\", vizH / 2 - 10);\n\t\t\t}\n\n\t\t\tif(loadedChildren[\"DigitalDashboardPluginBarChart\"].length > 1) {\n\t\t\t\tvar viz = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardPluginBarChart\"][1]);\n\t\t\t\tviz.scope().set(\"root:top\", vizTop + 15 + vizH * 2 + vizH / 2);\n\t\t\t\tviz.scope().set(\"root:left\", vizLeft + vizW + 10);\n\t\t\t\tviz.scope().set(\"DrawingArea:width\", vizW);\n\t\t\t\tviz.scope().set(\"DrawingArea:height\", vizH / 2 - 10);\n\t\t\t}\n\n\t\t\tif(loadedChildren[\"DigitalDashboardPluginBarChart\"].length > 2) {\n\t\t\t\tvar viz = $scope.getWebbleByInstanceId(loadedChildren[\"DigitalDashboardPluginBarChart\"][2]);\n\t\t\t\tviz.scope().set(\"root:top\", vizTop + 15 + vizH * 2);\n\t\t\t\tviz.scope().set(\"root:left\", vizLeft);\n\t\t\t\tviz.scope().set(\"DrawingArea:width\", vizW);\n\t\t\t\tviz.scope().set(\"DrawingArea:height\", vizH);\n\t\t\t}\n\t\t}\n\t}", "function view_partners_resize() {\n\t\t\n\t}" ]
[ "0.58799905", "0.5874289", "0.58718127", "0.58690083", "0.58026284", "0.580028", "0.5657156", "0.5630124", "0.5622383", "0.5614363", "0.55978733", "0.5592979", "0.55886674", "0.55863434", "0.55797786", "0.5572748", "0.5571445", "0.5562874", "0.55586463", "0.5545539", "0.553467", "0.54969245", "0.54890054", "0.5478151", "0.5474776", "0.5463686", "0.5460446", "0.54468197", "0.5429446", "0.54259473", "0.5421122", "0.5411587", "0.54033625", "0.5397479", "0.53910923", "0.53905815", "0.53815204", "0.5374856", "0.53747064", "0.53745157", "0.5374207", "0.53611326", "0.5355987", "0.5350761", "0.5349584", "0.5349445", "0.5346699", "0.53452694", "0.53449506", "0.53319114", "0.53301173", "0.5329351", "0.5328474", "0.5328472", "0.5319347", "0.53176844", "0.5310172", "0.53083134", "0.52993506", "0.5298165", "0.5291452", "0.5287163", "0.5284971", "0.5281902", "0.5280246", "0.5279204", "0.5274277", "0.52709264", "0.5270018", "0.52697444", "0.5268555", "0.52681977", "0.52665293", "0.5264958", "0.5262777", "0.5262164", "0.52568805", "0.5251082", "0.5245188", "0.5244442", "0.52431947", "0.5240706", "0.5232614", "0.5231662", "0.5228744", "0.5227518", "0.52272284", "0.5220237", "0.52171695", "0.5215045", "0.52138436", "0.5212976", "0.5212966", "0.52054715", "0.52037674", "0.5203301", "0.52025515", "0.5197881", "0.51954484", "0.5194269", "0.5192848" ]
0.0
-1
get the selected base color and color the first div background
function setBaseColor(){ //set the default color to be the picked value let defaultColor = colorPicker.value; console.log(defaultColor); //for testing //style the first div in picked color baseColor.style.backgroundColor = defaultColor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorSelCurrent() {\r\n if(nOrU(document.getElementById(ICON_ID + currentDiv))) return;\r\n document.getElementById(ICON_ID + currentDiv).style.backgroundColor = BMDIV_BG_SEL;\r\n document.getElementById(TITLE_ID + currentDiv).style.backgroundColor = BMDIV_BG_SEL;\r\n document.getElementById(URL_ID + currentDiv).style.backgroundColor = BMDIV_BG_SEL;\r\n}", "function getFirstReferenceColor(context) {\n\t// Error handling\n\tif(!selectionErrorHandling(context)) return null;\n\n\tvar selectedLayer = context.selection.firstObject();\n\tif (selectedLayer.class() == MSShapeGroup){\n \tvar color = firstVisibleFill(selectedLayer).color();\n \tif (color != undefined) {\n\t\t\treturn color;\n \t}\n\t}\n}", "function getColor() {\n const colorNode = document.getElementsByClassName(\"selected\")[0];\n rgbString = colorNode.style.backgroundColor;\n return rgbString\n .substr(4, rgbString.length - 5)\n .replace(\" \", \"\")\n .split(\",\");\n}", "function gradinit() {\n let str1 = \"\";\n\n $(\".boxTp1\").each(\n function() {\n str1 = $(this).css(\"background-color\");\n $(this).css(\"background-color\", convToRGBA(str1) );\n }\n );\n}", "function colorFirstDiv() {\n const colorForDiv = generateRandomColor();\n console.log(56, colorForDiv);\n // Setting BGC for third divLevel2 - for changing it\n const colorToChange = document.querySelector(\"#colorToChange\");\n colorToChange.style.backgroundColor = colorForDiv;\n // Changing first divLevel2 - below\n const generatedBGC = document.querySelector(\"#generatedBGC\");\n generatedBGC.style.backgroundColor = colorForDiv;\n const HEXvalue = document.querySelector(\"#HEXvalue\");\n HEXvalue.innerHTML = `HEX Value: <span>${colorForDiv}</span>`;\n //HEX to RGB converter\n let red = parseInt(colorForDiv.substring(1, 3), 16);\n let green = parseInt(colorForDiv.substring(3, 5), 16);\n let blue = parseInt(colorForDiv.substring(5, 7), 16);\n console.log(69, red, green, blue);\n RGBvalue.innerHTML = `RGB Values: <span>${red} ${green} ${blue}</span>`;\n //RGB to HSL converter\n let r = red / 255;\n let g = green / 255;\n let b = blue / 255;\n let cmin = Math.min(r, g, b);\n let cmax = Math.max(r, g, b);\n let delta = cmax - cmin;\n let h = 0;\n let s = 0;\n let l = 0;\n // console.log(81, r, b, g);\n // console.log(82, cmin, cmax, delta);\n if (delta === 0) {\n h = 0;\n } else if (cmax === r) {\n h = ((g - b) / delta) % 6;\n } else if (cmax === g) {\n h = (b - r) / delta + 2;\n } else {\n h = (r - g) / delta + 4;\n }\n h = Math.round(h * 60);\n // console.log(93, h);\n if (h < 0) {\n h = h + 360;\n }\n // console.log(97, h);\n l = (cmax + cmin) / 2;\n s = delta === 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));\n l = (l * 100).toFixed(1);\n s = +(s * 100).toFixed(1);\n console.log(102, `HSL: ${h}°, ${s}%, ${l}%`);\n HSLvalue = document.querySelector(\"#HSLvalue\");\n HSLvalue.innerHTML = `HSL Values: <span>${h}°, ${s}%, ${l}%</span>`;\n findColorHTML();\n}", "function getEltBackgroundColor (elt) \n{\n if (is.nav4) return (elt.bgColor);\n else if (is.ie4up) \n {\n var colorVal = elt.style.backgroundColor;\n if (isColorName(colorVal)) return colorNameToNumber (colorVal);\n else if (typeof(colorVal) == \"string\") \n return ((\"0x\" + colorVal.substring(1)) - 0);\n else return colorVal;\n }\n else if (is.gecko) {\n var colorVal = elt.style.backgroundColor;\n \n\t if (typeof(colorVal) == \"string\")\n\t { \t\n\t\tif (isColorName(colorVal)) \t\n\t\t{\n\t\t\treturn colorNameToNumber (colorVal);\n\t\t}\n\t\telse if (colorVal.indexOf([\"rgb\"]) != -1) \n\t\t{\t\n\t\t\tvar sR,sG,sB;\n\t\t\tvar iR,iG,iB;\n\t\t\tvar i=0;\n\n\t\t\tColorString = (elt.style.backgroundColor);\n\t\t\t//ColorString = \"rgb(255,20,255)\";\n\t\t\tColorString = ColorString.slice(4,-1);\n\n\t\t\twhile(ColorString[i] != ',' && i < 20){i++;}\n\t\t\tsR = ColorString.slice(0,-(ColorString.length - i));\n\t\t\ti++;\n\t\t\tj = i;\n\t\t\twhile(ColorString[j] != ',' && j < 20){j++;}\n\t\t\tsG = ColorString.slice(i,0-(ColorString.length - j));\n\t\t\tj++;\n\t\t\tsB = ColorString.slice(j);\n\t\t\tiR = stringToNumber(sR);\n\t\t\tiG = stringToNumber(sG);\n\t\t\tiB = stringToNumber(sB);\n\t\t\tsR = iR.toString(16);if(sR.length < 2)sR = \"0\" + sR;if(sR.length < 2)sR = \"0\" + sR;\n\t\t\tsG = iG.toString(16);if(sG.length < 2)sG = \"0\" + sG;if(sG.length < 2)sG = \"0\" + sG;\n\t\t\tsB = iB.toString(16);if(sB.length < 2)sB = \"0\" + sB;if(sB.length < 2)sB = \"0\" + sB;\n\n\t\t\tsRGB = sR.toUpperCase()+sG.toUpperCase()+sB.toUpperCase();\n\t\t\treturn ((\"0x\" + sRGB)-0);\n\t\t}\n\t }\n else return colorVal;\n }\n}", "function get_background_color(element) {\n\t\t\tvar rgb = $(element).css('background-color');\n\t\t\trgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n\t\t function hex(x) {return (\"0\" + parseInt(x).toString(16)).slice(-2);}\n\t\t return \"0x\" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);\n\t\t}", "function drawCurrentColor() {\n\t$('#selected').html(' ');\n\tlet div = '<div id=\"colorSelected\"></div>';\n\t$('#selected').append(div);\n\t$('#colorSelected').css('background', SQUARE_COLORS_ARRAY[colorIndexWeAreDrawing]);\n}", "function segColor(c){ \n return selectedColorObj[c]; \n }", "function chooseProjectColor(){\n\n const style = getComputedStyle(this);\n chosenColor = style.backgroundColor;\n \n}", "function readColor(){\n var color=$('div#output1').css(\"background-color\");\n\tvar patt=/([0-9]+), ([0-9]+), ([0-9]+)/;\n\tcolor=patt.exec(color);\n\tred=Number(color[1]);\n\tgreen=Number(color[2]);\n\tblue=Number(color[3]);\n\t//read others\n\thsv=rgbToHsv(red,green,blue);\n\thsl=rgbToHsl(red,green,blue);\n\tcmyk=rgbToCmyk(red,green,blue);\n\t}", "get backgroundColor() {}", "function getCurrentColor(curPer, bottomVal, topVal, bottomColor, topColor) {\n var rgbAryTop = topColor.indexOf('#') !== -1 ? hexToRgb(topColor) : topColor.match(/\\d+/g)\n var rgbAryBottom = bottomColor.indexOf('#') !== -1 ? hexToRgb(bottomColor) : bottomColor.match(/\\d+/g)\n var perShift = topVal - bottomVal\n var curShift = curPer - bottomVal\n\n if (!rgbAryTop || !rgbAryBottom) return null\n\n return 'rgb(' + getPropVal(curShift, perShift, rgbAryBottom[0], rgbAryTop[0]) + ',' + getPropVal(curShift, perShift, rgbAryBottom[1], rgbAryTop[1]) + ',' + getPropVal(curShift, perShift, rgbAryBottom[2], rgbAryTop[2]) + ')'\n}", "function colorForCurrent(){\n\n}", "function getBgColors (tab) {\n // But for now, let's just make sure what we have so\n // far is working as expected.\n alert('Selected text: ' + tab);\n}", "function get_background_color( elem ) {\n var result = '#fff';\n \n elem.add( elem.parents() ).each(function(){\n var c = $(this).css('background-color');\n if ( c !== 'transparent' && c !== 'rgba(0, 0, 0, 0)' ) {\n result = c;\n return false;\n }\n });\n \n return result;\n }", "getBackgroundColor(){return this.__background.color}", "function bs_findBackgroundColor(elm) {\n\tif (typeof(elm) == 'string') {\n\t\telm = document.getElementById(elm);\n\t}\n\tif (typeof(elm) == 'undefined') return false;\n\tif (moz) {\n\t\ttry {\n\t\t\tvar col = document.defaultView.getComputedStyle(elm, null).getPropertyValue(\"background-color\");\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\tif (typeof(elm.currentStyle) == 'undefined') return false;\n\t\tvar col = elm.currentStyle.backgroundColor;\n\t}\n\tif ((typeof(col) != 'undefined') && (col != 'transparent') && (col != '')) {\n\t\treturn col;\n\t} else {\n\t\treturn bs_findBackgroundColor(elm.parentNode);\n\t}\n}", "current_color() {\n return this._color;\n }", "function colorUnselCurrent() {\r\n if(nOrU(document.getElementById(ICON_ID + currentDiv))) return;\r\n document.getElementById(ICON_ID + currentDiv).style.backgroundColor = BMDIV_BG_UNSEL;\r\n document.getElementById(TITLE_ID + currentDiv).style.backgroundColor = BMDIV_BG_UNSEL;\r\n document.getElementById(URL_ID + currentDiv).style.backgroundColor = BMDIV_BG_UNSEL;\r\n}", "mainColor (prm, opt) {\n try {\n\t return this.frame().header().baseColor(prm,opt);\n\t} catch (e) {\n console.error(e.stack);\n throw e;\n }\n }", "function getStartColor() {\n var editor = vscode.window.activeTextEditor;\n if (!editor) {\n return; // No open text editor\n }\n\n var sel = editor.selection;\n var selection = editor.document.getText(sel);\n\n if (selection.length === 7) {\n selection = selection.slice(1);\n }\n\n if (selection.length === 6) {\n return isValidColor(selection.toLowerCase()) ? [ '-startColor', selection.toLowerCase() ] : undefined;\n }\n}", "get color () {\n return this.el.style.backgroundColor;\n }", "get color() { return this._color || this.selectionList.color; }", "get color() { return this._color || this.selectionList.color; }", "function bgColor(color) {\n $element.find('div').css(\"background-color\", color);\n }", "function manualBackgroundColorSetter(e) {\n var bc = e.srcElement.value;\n var latestBGC = \"\";\n if (bc != \"\") {\n try {\n if (isNaN(bc)) {\n latestBGC = tooltipBackgroundColourChanger(bc);\n }\n if (LastFocusedBC != latestBGC) {\n LastFocusedBC = undefined;\n finalizedColor = zdttEditorBGColorFinder(zdttContainers.zdtt_sidepanelSwitchingComp.querySelector(\".KB_Editor_iframe\").contentDocument.body);\n lastSelectedColorOptionNode.style.borderColor = \"\";\n }\n } catch (error) {\n console.log(error);\n }\n }\n}", "getCurRGB() {\n return Helpers.hslToRgb(\n this.hue,\n this.saturation,\n this.brightness\n );\n }", "function colorFull(element) {\n let color = pickColor.val();\n $(element).css(\"background-color\",color);\n}", "function swapColors() {\n var $thisDiv = $(this).parent();\n if ($thisDiv.css('background-color') === 'rgb(255, 0, 0)'){\n $thisDiv.css('background-color','yellow');\n } else {\n $thisDiv.css('background-color','red');\n }\n}", "_onGetSublayerColor(cell) {\n return this.state.cpuAggregator.getAccessor('fillColor')(cell);\n }", "get backgroundColor() {\n if (!(this.fields.backgroundColor instanceof pass_color_1.PassColor))\n return undefined;\n return this.fields.backgroundColor;\n }", "function pickColor(event) {\n getColor = event.target.style.backgroundColor;\n}", "function getColors($e){\n\tvar tmp\n\t, undef\n\t, frontcolor = $e.css('color')\n\t, backcolor\n\t, e = $e[0];\n\n\tvar toOfDOM = false;\n\twhile(e && !backcolor && !toOfDOM){\n\t\ttry{\n\t\t\ttmp = $(e).css('background-color');\n\t\t} catch (ex) {\n\t\t\ttmp = 'transparent';\n\t\t}\n\t\tif (tmp !== 'transparent' && tmp !== 'rgba(0, 0, 0, 0)'){\n\t\t\tbackcolor = tmp;\n\t\t}\n\t\ttoOfDOM = e.body;\n\t\te = e.parentNode;\n\t}\n\n\tvar rgbaregex = /rgb[a]*\\((\\d+),\\s*(\\d+),\\s*(\\d+)/ // modern browsers\n\t, hexregex = /#([AaBbCcDdEeFf\\d]{2})([AaBbCcDdEeFf\\d]{2})([AaBbCcDdEeFf\\d]{2})/ // IE 8 and less.\n\t, frontcolorcomponents;\n\n\t// Decomposing Front color into R, G, B ints\n\ttmp = undef;\n\ttmp = frontcolor.match(rgbaregex);\n\tif (tmp){\n\t\tfrontcolorcomponents = {'r':parseInt(tmp[1],10),'g':parseInt(tmp[2],10),'b':parseInt(tmp[3],10)};\n\t} else {\n\t\ttmp = frontcolor.match(hexregex);\n\t\tif (tmp) {\n\t\t\tfrontcolorcomponents = {'r':parseInt(tmp[1],16),'g':parseInt(tmp[2],16),'b':parseInt(tmp[3],16)};\n\t\t}\n\t}\n//\t\tif(!frontcolorcomponents){\n//\t\t\tfrontcolorcomponents = {'r':255,'g':255,'b':255}\n//\t\t}\n\n\tvar backcolorcomponents\n\t// Decomposing back color into R, G, B ints\n\tif(!backcolor){\n\t\t// HIghly unlikely since this means that no background styling was applied to any element from here to top of dom.\n\t\t// we'll pick up back color from front color\n\t\tif(frontcolorcomponents){\n\t\t\tif (Math.max.apply(null, [frontcolorcomponents.r, frontcolorcomponents.g, frontcolorcomponents.b]) > 127){\n\t\t\t\tbackcolorcomponents = {'r':0,'g':0,'b':0};\n\t\t\t} else {\n\t\t\t\tbackcolorcomponents = {'r':255,'g':255,'b':255};\n\t\t\t}\n\t\t} else {\n\t\t\t// arg!!! front color is in format we don't understand (hsl, named colors)\n\t\t\t// Let's just go with white background.\n\t\t\tbackcolorcomponents = {'r':255,'g':255,'b':255};\n\t\t}\n\t} else {\n\t\ttmp = undef;\n\t\ttmp = backcolor.match(rgbaregex);\n\t\tif (tmp){\n\t\t\tbackcolorcomponents = {'r':parseInt(tmp[1],10),'g':parseInt(tmp[2],10),'b':parseInt(tmp[3],10)};\n\t\t} else {\n\t\t\ttmp = backcolor.match(hexregex);\n\t\t\tif (tmp) {\n\t\t\t\tbackcolorcomponents = {'r':parseInt(tmp[1],16),'g':parseInt(tmp[2],16),'b':parseInt(tmp[3],16)};\n\t\t\t}\n\t\t}\n//\t\t\tif(!backcolorcomponents){\n//\t\t\t\tbackcolorcomponents = {'r':0,'g':0,'b':0}\n//\t\t\t}\n\t}\n\n\t// Deriving Decor color\n\t// THis is LAZY!!!! Better way would be to use HSL and adjust luminocity. However, that could be an overkill.\n\n\tvar toRGBfn = function(o){return 'rgb(' + [o.r, o.g, o.b].join(', ') + ')'}\n\t, decorcolorcomponents\n\t, frontcolorbrightness\n\t, adjusted;\n\n\tif (frontcolorcomponents && backcolorcomponents){\n\t\tvar backcolorbrightness = Math.max.apply(null, [frontcolorcomponents.r, frontcolorcomponents.g, frontcolorcomponents.b]);\n\n\t\tfrontcolorbrightness = Math.max.apply(null, [backcolorcomponents.r, backcolorcomponents.g, backcolorcomponents.b]);\n\t\tadjusted = Math.round(frontcolorbrightness + (-1 * (frontcolorbrightness - backcolorbrightness) * 0.75)); // \"dimming\" the difference between pen and back.\n\t\tdecorcolorcomponents = {'r':adjusted,'g':adjusted,'b':adjusted}; // always shade of gray\n\t} else if (frontcolorcomponents) {\n\t\tfrontcolorbrightness = Math.max.apply(null, [frontcolorcomponents.r, frontcolorcomponents.g, frontcolorcomponents.b]);\n\t\tvar polarity = +1;\n\t\tif (frontcolorbrightness > 127){\n\t\t\tpolarity = -1;\n\t\t}\n\t\t// shifting by 25% (64 points on RGB scale)\n\t\tadjusted = Math.round(frontcolorbrightness + (polarity * 96)); // \"dimming\" the pen's color by 75% to get decor color.\n\t\tdecorcolorcomponents = {'r':adjusted,'g':adjusted,'b':adjusted}; // always shade of gray\n\t} else {\n\t\tdecorcolorcomponents = {'r':191,'g':191,'b':191}; // always shade of gray\n\t}\n\n\treturn {\n\t\t'color': frontcolor\n\t\t, 'background-color': backcolorcomponents? toRGBfn(backcolorcomponents) : backcolor\n\t\t, 'decor-color': toRGBfn(decorcolorcomponents)\n\t};\n}", "function extractRGB(event) {\n let currentDivColor = event.target.style.backgroundColor;\n rgbExtract = currentDivColor.slice(4,currentDivColor.length - 1);\n indexOfSpace = rgbExtract.indexOf(\" \");\n rgbExtract = rgbExtract.split(\", \");\n return rgbExtract;\n}", "function Div1ColorClicked(){\n\t\tbgColor = document.getElementById(\"txtDiv1\").value;\n\t\tdocument.getElementById(\"div1\").style.backgroundColor = bgColor;\n\t}", "function getSelectedColor(type) {\n\tvar selected = $('#' + type + '_options .selected');\n\tvar color = [];\n\n\t// default is Other\n\tif (selected.length == 0) {\n\t\tcolor = 6\n\t} else {\n\t\tfor (var i = 0; i < selected.length; i++) {\n\t\t\tcolor.push(parseInt(selected.eq(i).attr('value')));\n\t\t}\t\n\t}\n\treturn color;\n}", "function backgroundColor() {\n return Math.floor(Math.random() * 256);\n}", "function selectColor(hex, j) {\r\n console.log(\"hex:::\", hex);\r\n color[j].style.setProperty(\"--bk\", hex);\r\n hexCode = hex;\r\n return hexCode;\r\n}", "function Colorer (cursor, base) {\n this.current = null\n this.cursor = cursor\n this.base = base\n}", "function Colorer (cursor, base) {\n this.current = null\n this.cursor = cursor\n this.base = base\n}", "function Colorer (cursor, base) {\n this.current = null\n this.cursor = cursor\n this.base = base\n}", "pickColor() {\n const bgColor = Math.floor(Math.random() * 16777215).toString(16);\n this.color = '#' + ('000000' + bgColor).slice(-6);\n }", "function selectionIncrementColors(){\n if(selectionIndex - 1 == selectionSmallest){\n setClass(nodes[selectionIndex - 1], 2, \"Special\"); //if the previous class is the current smallest, set it to the smallest color\n }else{\n setClass(nodes[selectionIndex - 1], 2, \"Default\"); //otherwise, set to default color\n }\n}", "function generateShadeColorDiv(colorShade) {\n tintColorWrapper.innerHTML = ''\n shadeColorWrapper.innerHTML = ''\n if (colorShade) {\n for (let i = 0; i <= 100; i++) {\n if (i % 10 === 0) {\n let colorTints = `<div class=\"tint-color\" style=\"background-color:${modifyColor(colorShade, i)};\"></div>`\n let colorShades = `<div class=\"tint-color\" style=\"background-color:${modifyColor(colorShade, -i)};\"></div>`\n tintColorWrapper.innerHTML += colorTints;\n shadeColorWrapper.innerHTML += colorShades;\n }\n }\n\n let tintBackgroundColor = Array.from(tintAndShadesW.children[0].childNodes);\n let shadesBackgroundColor = Array.from(tintAndShadesW.children[1].childNodes);\n let tintAndShades = tintBackgroundColor.concat(shadesBackgroundColor);\n\n tintAndShades.forEach(element => {\n element.addEventListener('click', function () {\n let currentBgColor = element.style.backgroundColor\n selectedCode.textContent = currentBgColor\n hoveredColor.style.backgroundColor = currentBgColor\n selectedColor.style.backgroundColor = currentBgColor\n hoveredCode.textContent = rgbToHexConverter(currentBgColor)\n hoveredCode1.textContent = rgbToHslConverter(currentBgColor)\n hoveredColor1.style.backgroundColor = currentBgColor\n });\n });\n\n tintAndShades.forEach(element => {\n element.addEventListener('mouseover', function () {\n let currentBgColor = element.style.backgroundColor\n preview.style.backgroundColor = currentBgColor\n });\n });\n }\n}", "get backgroundColor() { return this._backgroundColor; }", "get backgroundColor() { return this._backgroundColor; }", "function setMatchColor() {\n var random = randomNumber(0, numDivs - 1);\n matchColor1 = $cb.eq(random).data('color');\n $('#color-to-pick').data('matchcolor', matchColor1);\n var substring1 = matchColor1.substr(1,2);\n var substring2 = matchColor1.substr(3,2);\n var substring3 = matchColor1.substr(5,2);\n $('#red').text(substring1).css('background-color', '#fff');\n $('#green').text(substring2).css('background-color', '#fff');\n $('#blue').text(substring3).css('background-color', '#fff');\n\n }", "function pickColor() {\n color = this.id;\n doc.querySelector('.selected').classList.remove('selected');\n this.classList.add('selected');\n }", "function extractColor(element){\n\t\tvar color;\n\t\t/**\n\t\t * Loop until we find an element with a background color and stop when we hit the body element. \n\t\t */\n\t\tdo{\n\t\t\tcolor = element.getStyle('background-color').toLowerCase();\n\t\t\tif (color != '' && color != 'transparent') break;\t\t\t\n\t\t\telement = element.up(0);\n\t\t}while(element.nodeName.toLowerCase() != 'body');\n\n\t\t/**\n\t\t * Catch Safari's way of signalling transparent\n\t\t */ \n\t\tif(color == 'rgba(0, 0, 0, 0)') return 'transparent';\t\t\n\t\treturn color;\n\t}", "setDefaultBackround(){\n \t$(this.element).css(\"background-color\",\"#fafafa\");\n\t}", "function getBackground() {\n var selectColor = [\"BlueViolet\", \"BlanchedAlmond\", \"CornflowerBlue\",\n \"DarkCyan\", \"DeepPink\", \"IndianRed\"\n ];\n var theColor = selectColor[Math.floor(Math.random() * 6)];\n document.body.style.backgroundColor = theColor;\n}", "function ChangeBGUI(val) {\n var previewDiv = document.querySelector(\"#preview\");\n previewDiv.style.backgroundColor = val;\n}", "function highLight(div) {\n\n /*if(memEletSelect != div && memEletSelect != undefined && div.getAttribute(\"id\") !=\"g5k.\"){\n \n for( var i = 1; i < div.childNodes.length-1; i++){\n \n //in safari and chrome\n var color =div.childNodes[i].style.fill;\n if(color[0] === \"#\"){\n color = hexToRgb(color);\n color.r -= 50;\n color.g -= 50;\n color.b -= 50;\n div.childNodes[i].style.fill= \"rgb(\"+color.r+\",\"+color.g+\",\"+color.b+\")\";\n }\n //in opera and firefox\n if(color[0]===\"r\"){\n color=color.split(\",\");\n var r = parseInt(color[0].slice(4))-50;\n var g= parseInt(color[1]) -50;\n var b = parseInt(color[2].slice(0,color[2].length-1)) -50;\n div.childNodes[i].style.fill= \"rgb(\"+r+\",\"+g+\",\"+b+\")\";\n \n \n }\n }\n \n div.childNodes[i].style.border=\" solid 1px rgb(230,230,230)\";\n div.childNodes[i].style.backgroundColor=\"rgb(230,230,230)\";\n \n \n }*/\n\n if (memEletSelect === undefined && div.getAttribute(\"id\") != \"g5k.\") {\n\n for (var i = 1; i < (div.childNodes.length - 1) / 2; i++) {\n //in safari and chrome\n var color = div.childNodes[i].style.fill;\n if (color[0] === \"#\") {\n color = hexToRgb(color);\n color.r -= 50;\n color.g -= 50;\n color.b -= 50;\n div.childNodes[i].style.fill = \"rgb(\" + color.r + \",\" + color.g + \",\" + color.b + \")\";\n }\n //in opera and firefox\n if (color[0] === \"r\") {\n color = color.split(\",\");\n var r = parseInt(color[0].slice(4)) - 50;\n var g = parseInt(color[1]) - 50;\n var b = parseInt(color[2].slice(0, color[2].length - 1)) - 50;\n div.childNodes[i].style.fill = \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\n\n\n }\n }\n\n div.style.border = \" solid 1px rgb(230,230,230)\";\n div.style.backgroundColor = \"rgb(230,230,230)\";\n memEletSelect = div;\n }\n}", "function bgOrange() {\r\n let bg1 = \"#FF9900\";\r\n document.getElementById(\"profileContainer\").style.backgroundColor = bg1;\r\n document.getElementById(\"profileContainer\").style.color = \"black\";\r\n document.getElementById(\"bgCurrent\").innerHTML = \"Your current background colour code is: \" + bg1;\r\n}", "getBackgroundColor(index) {\n const colors = [\"#FF5154\", \"#50C9CE\", \"#8093F1\", \"292F36\", \"CB48B7\"];\n return colors[index];\n }", "selectColor(x, y, wd, ht){\n this.colorSec = this.colorPromedio(x, y, wd, ht);\n if (this.colorG){\n let tempG = this.colorSec.reduce((a, b) => a+b);\n this.colorSec = this.colorSec.map(t => tempG/3);\n }\n this.ctx.fillStyle = 'rgb('+this.colorSec[0]+\n ','+ this.colorSec[1]+\n ','+ this.colorSec[2]+')';\n }", "function getRandomColorIncrementValueForBackground() {\n return calcRndGenMinMax(1, 2);\n }", "function getColor(divId) {\n // Get index for the given division ID.\n var index = divIdToIndex[divId];\n var colors = _getColors();\n\n return colors[index - 1];\n }", "function jqColorClicked() {\n var selectedColor = $(\"#div2color_input\").val();\n //alert('color value is' + selectedColor);\n $(\"#div2\").css(\"background-color\", selectedColor);\n}", "function currentColor() {\n var r = $(\"#red\").val();\n var g = $(\"#green\").val();\n var b = $(\"#blue\").val();\n var color = \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\n\n return color;\n }", "getBackgroundColor( hue, layer, topLayer, hueOffset = 0 ) {\n if ( this.cfg.mode == 'transparent' ) return this.getTransparent(); //XXX: Still not sure about the 'transparent' mode\n\n let color = this._getBackgroundColorObject( hue, layer, topLayer );\n\n return this.getColorFromPalette( color.palette, color.hue, color.alpha, hueOffset );\n }", "function selectColor(){\n return easy.classList.contains(\"selected\") ? squares[Math.floor(Math.random() * 3)].style.backgroundColor : squares[Math.floor(Math.random() * 6)].style.backgroundColor\n}", "function choosecolor(event) {\n var currentColor=document.getElementById(\"current-color\");\n currentColor.style.backgroundColor = this.style.backgroundColor;\n}", "function bgColor () {\n if (color == 'black')\n {\n this.style.backgroundColor = 'black';\n }\n else if (color == 'rainbow')\n {\n let randomColor = Math.floor(Math.random()*16777215).toString(16);\n this.style.backgroundColor = \"#\" + randomColor;\n }\n else if (color == 'shader')\n {\n shade = this.style.opacity;\n shade = shade - 0.1;\n this.style.opacity = shade;\n }\n else if (color == 'eraser')\n {\n this.style.backgroundColor = 'white';\n this.style.opacity = 1;\n }\n}", "function GetCheerColorInfo(a){/* exported GetCheerColorInfo */var b=a,c=\"color\",d=\"style\",e=\"color\";return a.startsWith(\"bg-\")&&(b=a.substr(3),c=\"bgcolor\",d=\"wstyle\",e=\"background-color\"),ColorNames.hasOwnProperty(b)?[c,d,e,ColorNames[b]]:b.match(/^#[0-9a-f]{6}/i)?[c,d,e,b]:[null,null,null,null]}", "function bgBoxColors() {\r\n for (let i = 0; i < document.box_colors.children.length; i++) {\r\n\r\n document.box_colors.children[i].style.backgroundColor = document.box_colors.elements[i].value;\r\n\r\n\r\n }\r\n}", "function backgroundColor(div) {\n document.body.style.backgroundColor = \"pink\";\n }", "function getElementBG(elm) {\n\tvar bg\t= getComputedStyle(elm).backgroundColor;\n\t\tbg\t= bg.match(/\\((.*)\\)/)[1];\n\t\tbg\t= bg.split(\",\");\n\tfor (var i = 0; i < bg.length; i++) {\n\t\tbg[i] = parseInt(bg[i], 10);\n\t}\n\tif (bg.length > 3) { bg.pop(); }\n\treturn bg;\n}", "get selectedColor() {\n return this._selectedColor;\n }", "getBackgroundColor() {\n switch (this.config.background) {\n case Config_1.Background.BLACK:\n return exports.BLACK_BACKGROUND;\n case Config_1.Background.AUTHENTIC:\n default:\n return exports.AUTHENTIC_BACKGROUND;\n }\n }", "function color_pick () {\n\tif (current_profile() == null)\n\t\treturn (\"#ffffff\");\n\telse if (current_profile() == \"bw\")\n\t\treturn (\"#ffffff\");\n\telse if (current_profile() == \"antique\")\n\t\treturn (\"#f4ecd9\");\n\telse if (current_profile() == \"blue\")\n\t\treturn (\"#eeeeff\");\n\telse if (current_profile() == \"gray\")\n\t\treturn (\"#eeeeee\");\n\telse if (current_profile() == \"white\")\n\t\treturn (\"#ffffff\");\n\telse if (current_profile() == \"low\")\n\t\treturn (\"#f9e2e3\");\n\telse\n\t\treturn (\"#ffffff\");\n\n}", "function getPickingColor(index) {\n return [index + 1 & 255, index + 1 >> 8 & 255, index + 1 >> 8 >> 8 & 255];\n}", "pickBG(){\n\t\tif (!(this.isDay())){\n\t\t\treturn bg[1];\n\t\t}\n\t\telse if (SRegex.test(this.state.cond)){\n\t\t\treturn bg[1];\n\t\t}\n\t\telse if (DRegex.test(this.state.cond)||RRegex.test(this.state.cond)||CLRegex.test(this.state.cond)||TSRegex.test(this.state.cond)){\n\t\t\treturn bg[0];\n\t\t}\n\t\telse{\n\t\t\treturn bg[3];\n\t\t}\n\t}", "getBg(index) {\n return this._data[index * CELL_SIZE + 2 /* BG */];\n }", "function cambiarColor() {\n $('#cp8Fondo').colorpicker().on('changeColor', function(e) {\n $('#colmenaDiv').css(\"background\", e.color.toString('rgba'));\n });\n}", "function selectColor(el){\n for(var i=0;i<document.getElementsByClassName(\"palette\").length;i++){\n document.getElementsByClassName(\"palette\")[i].style.borderColor = \"#777\";\n document.getElementsByClassName(\"palette\")[i].style.borderStyle = \"solid\";\n }\n el.style.borderColor = \"#fff\";\n el.style.borderStyle = \"dashed\";\n color = window.getComputedStyle(el).backgroundColor;\n //ctx.beginPath();\n ctx.strokeStyle = color;\n //ctx.lineWidth = 15;\n}", "function cambiarColor(){\n\tvar negro=$('div.col');\n\tnegro.style.background=\"blue\";\n}", "getColor() {\n const result = ColorPicker.colors[this.index];\n this.index++;\n this.index %= ColorPicker.colors.length;\n return result;\n }", "function internalizeBackgroundColor() {\n var background_color = $('body').css('backgroundColor');\n $(\".tdcss-dom-example\").css('backgroundColor', background_color);\n }", "get colorValue() {}", "background(r, g, b) {\n this.ctx.canvas.style.backgroundColor = getColorString(this.palette, r, g, b);\n }", "function getBg(value){\n if(value < 0.85) return \"rgba(255, 0, 0, 0.3)\"\n if(value < 0.91) return \"rgba(255, 255, 0, 0.3)\"\n return \"rgba(0, 255, 0, 0.3)\"\n}", "function getBGColor(num){\n switch (num) {\n case 2:return \"#eee4da\";break;\n case 4:return \"#ede0c8\";break;\n case 8:return \"#f2b179\";break;\n case 16:return \"#f59563\";break;\n case 32:return \"#f67c5f\";break;\n case 64:return \"#f65e3b\";break;\n case 128:return \"#edcf72\";break;\n case 256:return \"#edcc61\";break;\n case 512:return \"#9c0\";break;\n case 1024:return \"#33b5e5\";break;\n case 2048:return \"#09c\";break;\n case 4096:return \"#a6c\";break;\n case 8192:return \"#93c\";break;\n }\n }", "async function getBgColor() {\n const {view, layer} = state;\n try {\n // make sure there's a layerView, then\n var bgColor = view.whenLayerView(layer).then(\n // get and return the theme\n async () => await viewColorUtils.getBackgroundColorTheme(view).then(theme => theme));\n } catch(e) {\n console.warn(`Couldn't detect basemap color theme - tab must be in foreground. Choosing \"light.\"\\n`, e)\n bgColor = \"light\"; // set default bgColor\n }\n return bgColor;\n }", "get color() {\n\n\t}", "function pickRGB(squares, numOfSquares){\n return $(squares[randomNum(numOfSquares)]).css(\"backgroundColor\");\n}", "static DefaultBackgroundColor(){return \"#FFFFFFFF\";}", "function bgColor(index) {\n return this.selectedIndex() === index\n ? \"yellow\"\n : (index%2 ? \"#fdfdfe\" : \"#efeff2\");\n}", "function getBackgroundColor(row, i){\n\tvar squareBackground;\n\tif( Math.floor(row%2)===0 ){\n\t\tsquareBackground = Math.floor(i%2)===0?\"black\":\"grey\";\n\t} else {\n\t\tsquareBackground = Math.floor(i%2)===0?\"grey\":\"black\";\n\t}\n\treturn squareBackground;\n}", "function getBackColor(pId, newColor, oldColor)\r\n{\r\n\tvar pId\t\t\t= pId;\r\n\tvar newColor\t= newColor;\r\n\tvar divId\t\t= \"breadCrumb_\" + pId;\r\n\t\r\n\tfor(i=1; i<=5; i++)\r\n\t{\r\n\t\tvar divId\t\t= \"breadCrumb_\" + i;\r\n\t\tdocument.getElementById(divId).style.backgroundColor\t= oldColor;\r\n\t\t\r\n\t\tif(pId == i)\r\n\t\t{\r\n\t\t\tdocument.getElementById(divId).style.backgroundColor\t= newColor;\r\n\t\t}\r\n\t}\r\n\t\r\n}", "get selectcolor() {\n return this.divCheckBox.style.color;\n }", "function getColor(){\n //var colors = [ \"rgba(237, 106, 90, 1)\", \"rgba(247, 244, 205, 1)\", \"rgba(155, 193, 188, 1)\", \"rgba(92, 164, 169, 1)\", \"rgba(230, 235, 224, 1)\"];\n var colors = cscheme;\n\n //generates random n to select a color from the array above\n //if new color (colors[n]) is equal to last color selected, it loops again to not repeat colors\n do{\n n = Math.floor(Math.random() * colors.length);\n }while( colors[n] === color );\n\n return colors[n];\n }", "function colorCurrent() {\n $(\".current\").removeClass(\"current\");\n $(\"#progress-table > div:nth-child(\"+position+\")\").addClass(\"current\");\n }", "get color(){\n return this.getPalette(this.currentColor);\n }", "function backgroundColor(color) {\n $(\".preview\").css(\"background\", color);\n}", "function randomFinalColor (){\n let colorR = randomColor();\n let colorG = randomColor();\n let colorB = randomColor();\n //once red, green, and blue variables have been assigned an intensity we need to concatenate these values into the rgb combination \n let mixColor = `rgb(${colorR},${colorG},${colorB})`;\n //which is then returned directly to the background-color value in CSS\n return document.body.style.setProperty('background-color', mixColor);\n}", "handle_choice_color(index) {\n for (let i = -1; i < this.state.sub_container.length; i++) {\n $(\".section\" + i).css(\"background-color\", \"\")\n $(\".section\" + i).css(\"color\", \"\")\n }\n //$(\".section\"+index).css(\"background-color\",\"#577C90\")\n $(\".section\" + index).css(\"color\", \"#fff\")\n }", "function selectColor(generation){\n if((generation) > (palette.length-1)){\n return palette[palette.length-1];\n }\n else{\n return palette[generation];\n }\n }", "function setRandomBackground(){\n color1.value = colorRandom();\n color2.value = colorRandom();\n setGradient();\n // console.log(colorRandom());\n}" ]
[ "0.68651825", "0.6468404", "0.6437869", "0.64103955", "0.63976157", "0.63712305", "0.63007134", "0.628789", "0.62636477", "0.6208685", "0.6199307", "0.6167975", "0.61314017", "0.61178833", "0.6116648", "0.6115207", "0.6112702", "0.6102904", "0.6099102", "0.6094357", "0.6091563", "0.6088109", "0.6062809", "0.6040365", "0.6040365", "0.6013054", "0.60038614", "0.58902526", "0.58857864", "0.58619523", "0.5857167", "0.5844378", "0.5831473", "0.5830075", "0.58291143", "0.5819933", "0.58153856", "0.5815367", "0.58019835", "0.58003736", "0.58003736", "0.58003736", "0.5794638", "0.5779883", "0.57782316", "0.57722145", "0.57722145", "0.5771275", "0.57654554", "0.5765226", "0.5745056", "0.5742954", "0.5738225", "0.57381654", "0.57155615", "0.57139057", "0.57058114", "0.57053953", "0.57005525", "0.56938744", "0.5683538", "0.56733", "0.56718", "0.566968", "0.5660768", "0.5660018", "0.56551665", "0.56405425", "0.5639003", "0.56296366", "0.5624079", "0.5623653", "0.56220305", "0.56201494", "0.56180185", "0.5613207", "0.5609281", "0.5599161", "0.5598386", "0.5594512", "0.55919445", "0.5588032", "0.55863446", "0.5585936", "0.5581656", "0.5576663", "0.5571962", "0.5571635", "0.55637944", "0.5557902", "0.55573654", "0.55557376", "0.5552644", "0.55492276", "0.5549099", "0.5543166", "0.55428755", "0.5540789", "0.553951", "0.5535377" ]
0.70195574
0
create Harmony color style by changing the harmony button
function createHarmony(event){ let color1 = event.target.value; if (color1){ colorOne.style.backgroundColor = "green"; colorTwo.style.backgroundColor = "red"; colorThree.style.backgroundColor = "black"; colorFour.style.backgroundColor = "pink"; console.log("working"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeColorScheme() {\n\n}", "function setDark(button) {\n button.style.background=\"rgb(94, 131, 186)\";\n button.style.color=\"rgb(194, 210, 233)\";\n}", "function changeColor(e){\n if (colorScheme == \"BLACK\"){\n e.target.style.backgroundColor = \"BLACK\";\n e.target.style.opacity = 1;\n } else if (colorScheme == \"RAINBOW\"){\n e.target.style.backgroundColor = \"#\" + Math.floor(Math.random() * 4096).toString(16);\n e.target.style.opacity = 1;\n } else if (colorScheme == \"DARKEN\"){\n let darken = Number(e.target.style.opacity);\n e.target.style.opacity = darken += 0.1;\n e.target.style.backgroundColor = '#000';\n }\n}", "function setLight(button) {\n button.style.background=\"rgb(194, 210, 233)\";\n button.style.color=\"rgb(58, 78, 122)\";\n button.style.borderWidth=\"0px\";\n button.style.padding=\"15px\";\n}", "function changeButtonColor(button) {\n button.style.backgroundColor = __WEBPACK_IMPORTED_MODULE_0__config_js__[\"a\" /* buttonColor */];\n}", "function changeColorPm() {\n producer.style.color = 'transparent';\n producer.style.webkitTextStroke = '1.5px black';\n designer.style.color = 'transparent';\n designer.style.webkitTextStroke = '1.5px black';\n project.style.color = 'black';\n project.style.webkitTextStroke = '0';\n}", "function ChangeColor(n){\n noteBackground = n;\n let button = document.getElementById(\"add\");\n if(n==='white' || n===\"yellow\"){\n button.style.background=n;\n button.style.color='black'\n }\n else{\n button.style.background=n;\n button.style.color='white'\n }\n \n }", "function setButtonStyles () {\n // OPACITY VALUES FOR BUTTON STYLES\n var a1 = 0.08;\n var a2 = 0.16;\n var a3 = 0.25;\n\n // SET CUSTOM CSS PROPERTIES OF BUTTON STYLES\n document.documentElement.style.setProperty('--button-color-default', 'rgba(' + cc + ', ' + a1 + ')');\n document.documentElement.style.setProperty('--button-color-hover', 'rgba(' + cc + ', ' + a2 + ')');\n document.documentElement.style.setProperty('--button-color-active', 'rgba(' + cc + ', ' + a3 + ')');\n}", "function setButtonStyles () {\n // OPACITY VALUES FOR BUTTON STYLES\n var a1 = 0.08;\n var a2 = 0.16;\n var a3 = 0.25;\n\n // SET CUSTOM CSS PROPERTIES OF BUTTON STYLES\n document.documentElement.style.setProperty('--button-color-default', 'rgba(' + cc + ', ' + a1 + ')');\n document.documentElement.style.setProperty('--button-color-hover', 'rgba(' + cc + ', ' + a2 + ')');\n document.documentElement.style.setProperty('--button-color-active', 'rgba(' + cc + ', ' + a3 + ')');\n}", "function onColorUpdate(e){\n current.color = e.target.className.split(' ')[1];\n }", "function buttonRainbowMode() {\n randomBirdsColourChange();\n}", "updateButtonColor() {\n // get button\n const shadow = this.shadowRoot;\n const buttonInput = shadow.querySelector(\"button\");\n\n // get the type of the element\n const elemType = this.getAttribute(\"type\");\n const isPlain = this.hasAttribute(\"plain\");\n var elemTypeString = elemType;\n if (\n elemType != \"primary\" &&\n elemType != \"success\" &&\n elemType != \"info\" &&\n elemType != \"warning\" &&\n elemType != \"danger\"\n ) {\n elemTypeString = \"default\";\n }\n\n if (!isPlain) {\n buttonInput.style.setProperty(\n \"--bg-color\",\n types[elemTypeString][\"bg-color\"]\n );\n buttonInput.style.setProperty(\n \"--txt-color\",\n types[elemTypeString][\"txt-color\"]\n );\n buttonInput.style.setProperty(\n \"--border-color\",\n types[elemTypeString][\"border-color\"]\n );\n buttonInput.style.setProperty(\n \"--hover-bg\",\n types[elemTypeString][\"hover-bg\"]\n );\n buttonInput.style.setProperty(\n \"--hover-txt\",\n types[elemTypeString][\"hover-txt\"]\n );\n buttonInput.style.setProperty(\n \"--hover-border\",\n types[elemTypeString][\"hover-border\"]\n );\n } else {\n buttonInput.style.setProperty(\n \"--bg-color\",\n types[elemTypeString][\"plain-bg-color\"]\n );\n buttonInput.style.setProperty(\n \"--txt-color\",\n types[elemTypeString][\"plain-txt-color\"]\n );\n buttonInput.style.setProperty(\n \"--border-color\",\n types[elemTypeString][\"plain-border-color\"]\n );\n buttonInput.style.setProperty(\n \"--hover-bg\",\n types[elemTypeString][\"plain-hover-bg\"]\n );\n buttonInput.style.setProperty(\n \"--hover-txt\",\n types[elemTypeString][\"plain-hover-txt\"]\n );\n buttonInput.style.setProperty(\n \"--hover-border\",\n types[elemTypeString][\"plain-hover-border\"]\n );\n }\n }", "function newColorButton(){\n var r=Math.floor(Math.random()*256);\n var g=Math.floor(Math.random()*256);\n var b=Math.floor(Math.random()*256);\n\n rrggbb= `rgb(` + r + `,` + g + `,` + b + `)`;\n\n document.style.getElementById(\"loadQuote\").id.background = rrggbb;\n\n\n}", "apagaColor(color) {\n this.colores[color].classList.remove(\"light\");\n }", "function changeColor() {\n firstP.style('color', '#ff68bd');//style() a DOM element with CSS from within P5\n firstP.style('font-size', '34px');//style() a DOM element with CSS from within P5\n }", "function changeScribbleColor(e){\n pureweb.getFramework().getState().setValue('ScribbleColor', document.getElementById('color').value);\n}", "function setColor(){\n\tconsole.log(\"Using color-theme: \" + col);\n\t$(\".color-theme\").html(\n\t\t\"body, .scroll-btn {\" +\n\t\t\t\"color: \" + col + \";\" +\n\t\t\"}\" +\n\t\t\".swipe-down-menu-blur, .circle-fromMiddle, .scroll-btn i, .input-range::-webkit-slider-thumb {\" +\n\t\t\t\"border: 2px solid \" + col + \";\" +\n\t\t\"}\" +\n\t\t\".swipe-down-menu-blur {\" +\n\t\t\t\"border-top: none;\" +\n\t\t\"}\" +\n\t\t\".pace .pace-progress, .input-range::-webkit-slider-thumb, .input-range::-webkit-slider-runnable-track, .settings>li:after, .circle-fromMiddle span, .circle-fromMiddle:before, .circle-fromMiddle:after, .scroll-btn i:before, .swipe-down-menu:hover>.scroll-btn i, .swipe-down-menu:hover>.swipe-down-menu-blur, .swipe-down-menu:active>.swipe-down-menu-blur {\" +\n\t\t\t\"background-color: \" + col + \";\" +\n\t\t\"}\" +\n\t\t\".settings>li:after, .pace .pace-progress {\" +\n\t\t\t\"box-shadow: 0px 2px 2px \" + col + \";\" +\n\t\t\"}\" +\n\t\t\"@-webkit-keyframes textColour {0% {color: #fff;}100% {color: \" + col + \";}}@-moz-keyframes textColour {0% {color: #fff;}100% {color: \" + col + \";}}@-o-keyframes textColour {0% {color: #fff;}100% {color: \" + col + \";}}@keyframes textColour {0% {color: #fff;}100% {color: \" + col + \";}}\" +\n\t\t\".swipe-down-menu:hover>.swipe-down-menu-blur, .swipe-down-menu:active>.swipe-down-menu-blur {\" +\n\t\t\t\"box-shadow: 0px 0px 5px \" + col + \";\" +\n\t\t\t\"background-color: rgba(\" + rgbCol.r + \", \" + rgbCol.g + \", \" + rgbCol.b + \", 0.1);\" +\n\t\t\"}\" +\n\t\t\".e-loadholder .m-loader .e-text {border: 5px solid \" + col + \";}.e-loadholder .m-loader {border: 5px solid hsl(\" + curColorTheme[0] + \", \" + curColorTheme[1] + \"%, \" + (curColorTheme[2] + 10) + \"%);}.e-loadholder {border: 5px solid hsl(\" + curColorTheme[0] + \", \" + curColorTheme[1] + \"%, \" + (curColorTheme[2] + 20) + \"%);}\" +\n\t\t\".switch {\" +\n\t\t\t\"--uiSwitchButtonBgColor: \" + col + \";\" +\n\t\t\t\"--uiSwitchBgColorActive: \" + col + \";\" +\n\t\t\"}\"\n\t);\n}", "function changeColor(e) {}", "changeColor(color){\n this.circleBasic.set('fill', ColorLuminance(color, -0.1));\n this.circleBasicEtx.set('fill', ColorLuminance(color, 0.1));\n this.text.set({\n fill : ColorLuminance(color, -0.15),\n stroke : ColorLuminance(color, -0.20)\n });\n }", "apagarColor(color) {\n this.colores[color].classList.remove('light');\n }", "apagarColor(color) {\n this.colores[color].classList.remove(\"light\");\n }", "function colorForCurrent(){\n\n}", "apagarColor(color) {\n this.colores[color].classList.remove('light')\n }", "function colorChange() {\n let newColor = '#' + Math.floor(Math.random() * 16777215).toString(16);\n document.body.style.backgroundColor = newColor;\n document.getElementById(\"text\").style.color = newColor;\n document.getElementById(\"author\").style.color = newColor;\n document.getElementById(\"tweet-quote\").style.backgroundColor = newColor;\n document.getElementById(\"twitter\").style.color = \"white\";\n button.style.backgroundColor = newColor;\n button.style.color = \"white\";\n }", "brighter(){\n\t\tthis.addColorValue(\"red\", 30);\n\t\tthis.addColorValue(\"green\", 30);\n\t\tthis.addColorValue(\"blue\", 30);\n\t}", "function addGreen(className) {\n if(className === 'why-android-wrapper') {\n document.getElementsByClassName(className)[0].children[0].style.cssText = 'color: #6ab344;';\n document.getElementsByClassName(className)[0].children[1].style.cssText = 'fill: #6ab344;';\n } else {\n document.getElementsByClassName(className)[0].children[0].children[0].style.cssText = 'fill: #6ab344;';\n document.getElementsByClassName(className)[0].children[1].style.cssText = 'color: #6ab344;';\n }\n}", "function eraser() {\r\n color_stock = \"#FFFFFF\";\r\n}", "function oldColor() {\n if (ALaxis === 'distanceSpot')\n return '#ff0000';\n else if (ALaxis === 'angleSpot')\n return '#0000ff';\n else if (ALaxis === 'colorRing' || ALaxis === 'lightnessRing')\n return '#888';\n}", "tag(){return\"simple-colors-shared-styles\"}", "function newColor1()\n{\n\tIN.doFocus();\n\tIN.clr=\"#109FA6\";\n\trcCookie.set(\"c\",IN.clr,365);\n\tIN.ec(\"ForeColor\",false,IN.clr);\n\tIN.tBC();\n}", "function refreshSwatch2() {\n var cyan = $( \"#cyan\" ).slider( \"value\" ),\n magenta = $( \"#magenta\" ).slider( \"value\" ),\n yellow = $( \"#yellow\" ).slider( \"value\" ),\n key = $( \"#key\" ).slider( \"value\" ),\n hex = CMYK2RGB( cyan, magenta, yellow, key );\n\t document.getElementById('swatch2').innerHTML = '<div style=\"background-color:#' + hex +'\"><div onclick=\"aplikal(\\''+hex+'\\');\" class=\"aplikalo\" title=\"Activate\">&nearr;</div><input onClick=\"this.select();\" value=#' + hex + ' /> </div>';\n }", "oncolor() {\n let color = Haya.Utils.Color.rgbHex($.color.red, $.color.green, $.color.blue, \"0x\");\n this.target.sprite.color = color;\n this.target.sprite.tint = color;\n }", "function changeToLightBlue(event){\n pHeader.innerText='1';\n //Remove the red background\n header.classList.remove('lightRed');\n //add the blue background\n header.classList.add('lightBlue');\n\n}", "function changeStylesTuT() {\n document.querySelector(\".classNames\").classList.remove(\"hidden\");\n\n // document.querySelector(\".classname\").style.color = \"black\";\n // document.querySelector(\".classname\").style.backgroundColor = \"yellow\";\n // change multipöe in one line:\n // document.querySelector(\".classname\").style.cssText = \"background-color: orange; color: dark blue;\";\n document.querySelector(\".classname\").setAttribute(\"style\",\"background-color: black; color: white;\");\n \n }", "function changeColor() {\n\t// Create random RGB values (used 180 instead of 256 to keep colors darker)\n\tvar red = Math.floor(Math.random() * 180 );\n\tvar green = Math.floor(Math.random() * 180 );\n\tvar blue = Math.floor(Math.random() * 180 );\n\t// Create variable that stores the random values in a string: rgb(x, y, z)\n\tvar rgbcolor = \"rgb(\" + red + \", \" + green + \", \" + blue + \")\";\n\t//change the body background to the rgb color\n\tdocument.body.style.backgroundColor = rgbcolor;\n\t//change the button background to the rgb color\n\tdocument.getElementById('loadQuote').style.backgroundColor = rgbcolor;\n}", "darker(){\n\t\tthis.addColorValue(\"red\", -30);\n\t\tthis.addColorValue(\"green\", -30);\n\t\tthis.addColorValue(\"blue\", -30);\n\t}", "function setINITIALcolour() {\n neonlightcolor = \"#222222\";\n root.style.setProperty(\"--neonlightcolor\", neonlightcolor);\n}", "function updateColour() {\n document.documentElement.style.setProperty('--' + this.name, this.value); //update the css variables\n}", "function colorgenerator() {\n let colours = [],\n i;\n for (i = 0; i < 372; i++){\n colours[i] = 'hsl(' + i + ', 100%, 50%)';\n if (i > 359) {\n colours[i] = 'hsl(0, 100%, 100%)';\n }\n }\n colours = colours.toString();\n //console.log(colours);\n root.style.setProperty(\"--colours\", colours);\n}", "updateColor(hsv){\n this.color = hsv;\n }", "function onbuttoncolor()\n {\n \tvar on=document.getElementById(\"imgbttn\");\n \ton.style.backgroundColor = \"#009688\";\n \ton.style.color=\"white\";\n }", "function hoverButtonColorOn(e) {\n e.target.style.background = '#c4941c';\n}", "function newColor() {\n this.style.background = colorPicker.value;\n }", "function coloredButtons() {\r\n\r\n\t\t\t\t$('.nectar-button.see-through[data-color-override], .nectar-button.see-through-2[data-color-override], .nectar-button.see-through-3[data-color-override]').each(function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $usingMaterialSkin = ($('body.material[data-button-style^=\"rounded\"]').length > 0) ? true : false;\r\n\t\t\t\t\t$(this).css('visibility', 'visible');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($(this).hasClass('see-through-3') && $(this).attr('data-color-override') == 'false') {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $color;\r\n\t\t\t\t\tvar $that;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($(this).attr('data-color-override') != 'false') {\r\n\t\t\t\t\t\t$color = $(this).attr('data-color-override');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($(this).parents('.dark').length > 0) {\r\n\t\t\t\t\t\t\t$color = '#000000';\r\n\t\t\t\t\t\t}\telse {\r\n\t\t\t\t\t\t\t$color = '#ffffff';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!$(this).hasClass('see-through-3')) {\r\n\t\t\t\t\t\t$(this).css('color', $color);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(this).find('i').css('color', $color);\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar colorInt = parseInt($color.substring(1), 16);\r\n\t\t\t\t\tvar $hoverColor = ($(this).has('[data-hover-color-override]')) ? $(this).attr('data-hover-color-override') : 'no-override';\r\n\t\t\t\t\tvar $hoverTextColor = ($(this).has('[data-hover-text-color-override]')) ? $(this).attr('data-hover-text-color-override') : '#fff';\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar R = (colorInt & 0xFF0000) >> 16;\r\n\t\t\t\t\tvar G = (colorInt & 0x00FF00) >> 8;\r\n\t\t\t\t\tvar B = (colorInt & 0x0000FF) >> 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $opacityStr = ($(this).hasClass('see-through-3')) ? '1' : '0.75';\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(this).css('border-color', 'rgba(' + R + ',' + G + ',' + B + ',' + $opacityStr + ')');\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Material theme skin buttons w/ icons starting\r\n\t\t\t\t\tif ($usingMaterialSkin) {\r\n\t\t\t\t\t\t$(this).find('i').css({\r\n\t\t\t\t\t\t\t'background-color': 'rgba(' + R + ',' + G + ',' + B + ',1)',\r\n\t\t\t\t\t\t\t'box-shadow': '0px 8px 15px rgba(' + R + ',' + G + ',' + B + ',0.24)'\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($(this).hasClass('see-through')) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that = $(this);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).on('mouseenter touchstart', function () {\r\n\t\t\t\t\t\t\t$that.css('border-color', 'rgba(' + R + ',' + G + ',' + B + ',1)');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).on('mouseleave touchtouchend', function () {\r\n\t\t\t\t\t\t\t$that.css('border-color', 'rgba(' + R + ',' + G + ',' + B + ',1)');\r\n\t\t\t\t\t\t\t$opacityStr = ($(this).hasClass('see-through-3')) ? '1' : '0.75';\r\n\t\t\t\t\t\t\t$that.css('border-color', 'rgba(' + R + ',' + G + ',' + B + ',' + $opacityStr + ')');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).find('i').css('color', $hoverTextColor);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($hoverColor != 'no-override') {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$that = $(this);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$(this).on('mouseenter touchstart', function () {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t\t\t'border-color': $hoverColor,\r\n\t\t\t\t\t\t\t\t\t'background-color': $hoverColor,\r\n\t\t\t\t\t\t\t\t\t'color': $hoverTextColor\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Material buttons w/ icons over\r\n\t\t\t\t\t\t\t\tif ($usingMaterialSkin) {\r\n\t\t\t\t\t\t\t\t\t$that.find('i').css({\r\n\t\t\t\t\t\t\t\t\t\t'background-color': '',\r\n\t\t\t\t\t\t\t\t\t\t'box-shadow': ''\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$(this).on('mouseleave touchtouchend', function () {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$opacityStr = ($(this).hasClass('see-through-3')) ? '1' : '0.75';\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($usingMaterialSkin) {\r\n\t\t\t\t\t\t\t\t\t$that.find('i').css({\r\n\t\t\t\t\t\t\t\t\t\t'background-color': 'rgba(' + R + ',' + G + ',' + B + ',1)',\r\n\t\t\t\t\t\t\t\t\t\t'box-shadow': '0px 8px 15px rgba(' + R + ',' + G + ',' + B + ',0.24)'\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (!$that.hasClass('see-through-3')) {\r\n\t\t\t\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t\t\t\t'border-color': 'rgba(' + R + ',' + G + ',' + B + ',' + $opacityStr + ')',\r\n\t\t\t\t\t\t\t\t\t\t'background-color': 'transparent',\r\n\t\t\t\t\t\t\t\t\t\t'color': $color\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t\t\t\t'border-color': 'rgba(' + R + ',' + G + ',' + B + ',' + $opacityStr + ')',\r\n\t\t\t\t\t\t\t\t\t\t'background-color': 'transparent'\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$that = $(this);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$(this).on('mouseenter touchstart', function () {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t\t\t'border-color': $hoverColor,\r\n\t\t\t\t\t\t\t\t\t'color': $hoverTextColor\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$(this).on('mouseleave touchtouchend', function () {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$opacityStr = ($that.hasClass('see-through-3')) ? '1' : '0.75';\r\n\t\t\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t\t\t'border-color': 'rgba(' + R + ',' + G + ',' + B + ',' + $opacityStr + ')',\r\n\t\t\t\t\t\t\t\t\t'color': $hoverTextColor\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t$('.nectar-button:not(.see-through):not(.see-through-2):not(.see-through-3)[data-color-override]').each(function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(this).css('visibility', 'visible');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($(this).attr('data-color-override') != 'false') {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $color = $(this).attr('data-color-override');\r\n\r\n\t\t\t\t\t\t$(this)\r\n\t\t\t\t\t\t\t.removeClass('accent-color')\r\n\t\t\t\t\t\t\t.removeClass('extra-color-1')\r\n\t\t\t\t\t\t\t.removeClass('extra-color-2')\r\n\t\t\t\t\t\t\t.removeClass('extra-color-3')\r\n\t\t\t\t\t\t\t.css('background-color', $color);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Solid color tilt \r\n\t\t\t\tif ($('.swiper-slide .solid_color_2').length > 0 || $('.tilt-button-inner').length > 0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $tiltButtonCssString = '';\r\n\t\t\t\t\tvar $color;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.swiper-slide .solid_color_2 a').each(function (i) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).addClass('instance-' + i);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($(this).attr('data-color-override') != 'false') {\r\n\t\t\t\t\t\t\t$color = $(this).attr('data-color-override');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif ($(this).parents('.dark').length > 0) {\r\n\t\t\t\t\t\t\t\t$color = '#000000';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t$color = '#ffffff';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).css('color', $color);\r\n\t\t\t\t\t\t$(this).find('i').css('color', $color);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $currentColor = $(this).css('background-color'),\r\n\t\t\t\t\t\t$topColor = shadeColor($currentColor, 0.13),\r\n\t\t\t\t\t\t$bottomColor = shadeColor($currentColor, -0.15);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$tiltButtonCssString += '.swiper-slide .solid_color_2 a.instance-' + i + ':after { background-color: ' + $topColor + '; }' + ' .swiper-slide .solid_color_2 a.instance-' + i + ':before { background-color: ' + $bottomColor + '; } ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.tilt-button-wrap a').each(function (i) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).addClass('instance-' + i);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $currentColor = $(this).css('background-color');\r\n\t\t\t\t\t\tvar $color;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($(this).attr('data-color-override') != 'false') {\r\n\t\t\t\t\t\t\t$color = $(this).attr('data-color-override');\r\n\t\t\t\t\t\t\t$(this).css('background-color', $color);\r\n\t\t\t\t\t\t\t$currentColor = $color;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $topColor = shadeColor($currentColor, 0.13),\r\n\t\t\t\t\t\t$bottomColor = shadeColor($currentColor, -0.15);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$tiltButtonCssString += '.tilt-button-wrap a.instance-' + i + ':after { background-color: ' + $topColor + '; }' + ' .tilt-button-wrap a.instance-' + i + ':before { background-color: ' + $bottomColor + '; } ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Style\r\n\t\t\t\t\tnectarCreateStyle($tiltButtonCssString, 'tilt-button');\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Transparent 3D\r\n\t\t\t\tif ($('.nectar-3d-transparent-button').length > 0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $3dTransButtonCssString = '';\r\n\t\t\t\t\t$('.nectar-3d-transparent-button').each(function (i) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $that = $(this),\r\n\t\t\t\t\t\t$size \t\t= $that.attr('data-size'),\r\n\t\t\t\t\t\t$padding \t= 0,\r\n\t\t\t\t\t\tv1 \t\t\t\t= 1.5,\r\n\t\t\t\t\t\tv2 \t\t\t\t= 1.65,\r\n\t\t\t\t\t\t$font_size;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Size\r\n\t\t\t\t\t\tif ($size == 'large') {\r\n\t\t\t\t\t\t\t$padding \t\t= 46;\r\n\t\t\t\t\t\t\t$font_size \t= 16;\r\n\t\t\t\t\t\t\tv1 \t\t\t\t\t= 1.5;\r\n\t\t\t\t\t\t\tv2 \t\t\t\t\t= 1.7;\r\n\t\t\t\t\t\t} else if ($size == 'medium') {\r\n\t\t\t\t\t\t\t$padding \t\t= 30;\r\n\t\t\t\t\t\t\t$font_size \t= 16;\r\n\t\t\t\t\t\t} else if ($size == 'small') {\r\n\t\t\t\t\t\t\t$padding \t\t= 20;\r\n\t\t\t\t\t\t\t$font_size \t= 12;\r\n\t\t\t\t\t\t} else if ($size == 'jumbo') {\r\n\t\t\t\t\t\t\t$padding \t\t= 54;\r\n\t\t\t\t\t\t\t$font_size \t= 24;\r\n\t\t\t\t\t\t\tv1 \t\t\t\t\t= 1.5;\r\n\t\t\t\t\t\t\tv2 \t\t\t\t\t= 1.68;\r\n\t\t\t\t\t\t} else if ($size == 'extra_jumbo') {\r\n\t\t\t\t\t\t\t$padding \t\t= 100;\r\n\t\t\t\t\t\t\t$font_size \t= 64;\r\n\t\t\t\t\t\t\tv1 \t\t\t\t\t= 1.6;\r\n\t\t\t\t\t\t\tv2 \t\t\t\t\t= 1.6;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that.find('svg text').attr('font-size', $font_size);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $boundingRect = $(this).find('.back-3d .button-text')[0].getBoundingClientRect(),\r\n\t\t\t\t\t\t$text_width = $boundingRect.width,\r\n\t\t\t\t\t\t$text_height = $font_size * 1.5;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t'width': ($text_width + $padding * 1.5) + 'px',\r\n\t\t\t\t\t\t\t'height': ($text_height + $padding) + 'px'\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that.find('> a').css({\r\n\t\t\t\t\t\t\t'height': ($text_height + $padding) + 'px'\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that.find('.back-3d svg, .front-3d svg').css({\r\n\t\t\t\t\t\t\t'width': ($text_width + $padding * 1.5) + 'px',\r\n\t\t\t\t\t\t\t'height': ($text_height + $padding) + 'px'\r\n\t\t\t\t\t\t}).attr('viewBox', '0 0 ' + ($text_width + $padding) + ' ' + ($text_height + $padding));\r\n\r\n\t\t\t\t\t\t$that.find('svg text').attr('transform', 'matrix(1 0 0 1 ' + ($text_width + $padding * v1) / 2 + ' ' + (($text_height + $padding) / v2) + ')');\r\n\t\t\t\t\t\t$that.find('.front-3d, .back-3d').css('transform-origin', '50% 50% -' + ($text_height + $padding) / 2 + 'px');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Mask\r\n\t\t\t\t\t\t$(this).find('.front-3d svg > rect').attr('id', 'masked-rect-id-' + i);\r\n\t\t\t\t\t\t$(this).find('.front-3d defs mask').attr('id', 'button-text-mask-' + i);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that.css('visibility', 'visible');\r\n\t\t\t\t\t\t$3dTransButtonCssString += '#masked-rect-id-' + i + ' { mask: url(#button-text-mask-' + i + '); -webkit-mask: url(#button-text-mask-' + i + ')} ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Extra jumbo resize\r\n\t\t\t\t\tcreateExtraJumboSize();\r\n\t\t\t\t\t$window.on('smartresize', createExtraJumboSize);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Style\r\n\t\t\t\t\tnectarCreateStyle($3dTransButtonCssString, 'nectar-td-button');\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Gradient btn init\r\n\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t$('.nectar-button[class*=\"color-gradient\"] .start').removeClass('loading');\r\n\t\t\t\t}, 150);\r\n\t\t\t\t// No grad for ff\r\n\t\t\t\tif (navigator.userAgent.toLowerCase().indexOf('firefox') > -1 || \r\n\t\t\t\tnavigator.userAgent.indexOf(\"MSIE \") > -1 || \r\n\t\t\t\tnavigator.userAgent.match(/Trident\\/7\\./)) {\r\n\t\t\t\t\t$('.nectar-button[class*=\"color-gradient\"] .start').addClass('no-text-grad');\r\n\t\t\t\t}\r\n\t\t\t}", "refreshPalette() {\n // Remove old palette buttons.\n this.shadowRoot.querySelectorAll('my-palette-button').forEach((button) => {\n button.remove();\n });\n\n // Create and add new palette buttons.\n this.createHSLColorArray(10, this.saturation, this.lightness).forEach(\n (color) => {\n let button = document.createElement('my-palette-button');\n button.color = color;\n this.shadowRoot.prepend(button);\n }\n );\n }", "function dualColor (){\n \n\tcounter += 1;\n\tdocument.getElementById('model__baseC').getAttribute('color');\n\tswitch (counter) {\n\t\tcase 1:\n\t\tdocument.getElementById('model__baseC').setAttribute('color', '0.4627 0.4627 0.4627 0.3549 0.3549 0.3549');\n\t\t\t\n\t\t\tbreak;\n\t\tcase 2:\n\t\tdocument.getElementById('model__baseC').setAttribute('color', '0.003922 0.1255 0.3059 0.1294 0.1294 0.1294');\n\t\t\tbreak;\n\t\tcase 3:\n\t\tdocument.getElementById('model__baseC').setAttribute('color', '0.2549 -0.5529 -0.5529 0.1294 0.1294 0.1294');\n\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\tdocument.getElementById('model__baseC').setAttribute('color', '0.003922 0.5333 0.4275 0.1725 0.04314 0.09412');\n\t\t\tbreak;\n\n\t\tcase 5:\n\t\t\tcounter = 0;\n\t\t\tdocument.getElementById('model__baseC').setAttribute('color', '0.003922 0.003922 0.003922 0.1294 0.1294 0.1294');\n\t\t\tbreak;\n\t}\n\t\t\t\n\n}", "changeColor() {\n this.elem.style.backgroundColor = buttonStates[this.state].color;\n if (this.state !== 0) {\n this.elem.style.boxShadow = '0px 0px 20px -5px' + buttonStates[this.state].color;\n } else {\n this.elem.style.boxShadow = 'none';\n }\n }", "function editTintColor() {\n createAlert (\n \"Edit Tint Color\",\n \"Edit Main Accent Color\",\n \"editTintColorUI\",\n null\n )\n}", "function changeHSLColor() {\n // Randomly generate the 1st value of HSL code, hues can range from 0 to 360\n let hue = Math.ceil(Math.random() * Math.floor(360));\n // Randomly generate the 2nd value of HSL code, saturation can range from 0 to 100\n let saturation = Math.ceil(Math.random() * Math.floor(100));\n // Randomly generate the 3rd value of HSL code, lightness can range from 0 to 100\n let lightness = Math.ceil(Math.random() * Math.floor(100));\n // Concatenate the full HSL code together, formatted with percents and parentheses\n let fullHSLCode = 'hsl(' + hue + ', ' + saturation + '%, ' + lightness + '%)';\n // Set the body's style of cssText to contain the new hex code that will change the color\n body.style.cssText = 'background-color: ' + fullHSLCode;\n // Change this line of text to show the user what color hex code they're viewing for the body's background\n p2.innerText = fullHSLCode;\n // Find the first line of text in my HTML\n let title = document.querySelector('.first-paragraph');\n // Change it to reflect the fact that it's a hex code, not a standardized HTML color code\n title.innerText = 'hsl color code:';\n // Determine if lightness is below 50\n if (lightness < 50) {\n // Add the CSS class of light-text to the title & p2\n title.classList.add('light-text');\n p2.classList.add('light-text');\n // If lightness is greater than 50\n } else if (lightness >= 50) {\n // Remove light-text CSS from title & p2\n title.classList.remove('light-text');\n p2.classList.remove('light-text');\n // Add dark-text CSS to title & p2\n title.classList.add('dark-text');\n p2.classList.add('dark-text');\n }\n}", "function addColour(parent, colour){\n\t \t\t\n\t \t\tvar colourButton;\n\t \t\tcolourButton = document.createElement(\"div\");\n\t \t\tcolourButton.className = \"colour\";\n\t \t\tcolourButton.style.backgroundColor = colour;\n\t \t\tcolourButton.style.cursor = 'pointer';\n\t\t\t\n\t\t\tcolourButton.onclick = function() {\n \t\t\tworm_colour = colour;\n\t\t\t};\n\t \t\t\n\t \t\tparent.appendChild(colourButton);\t\n\t \t\t\n\t \t}", "function changeColor (event){\n event.currentTarget.style.color = rgb(); //se llama a la primera función\n}", "function ChangeColor(){\n selected_object.material.color.setHex(shape_params.color);\n }", "function sketchClick(e) {\n\n if (eraser) {\n e.target.style.backgroundColor = '';\n console.log(e.target.style.backgroundColor);\n } else if (rainbow) {\n e.target.style.backgroundColor = randomColor();\n\n } else if (shading) {\n e.target.style.backgroundColor = adjust(RGBToHex, e.target.style.backgroundColor, -15);\n\n } else if (lighten) {\n e.target.style.backgroundColor = adjust(RGBToHex, e.target.style.backgroundColor, +15);\n\n } else {\n e.target.style.backgroundColor = ink;\n }\n}", "function turnButtonRed (){\n element.style.backgroundColor = \"red\";\n element.style.color = \"white\";\n element.innerHTML = \"X\"; \n \n}", "function colorButton(button) {\n d3.selectAll('button')\n .transition()\n .style('background-color', blue3);\n button\n .transition()\n .style('background-color', blue2);\n }", "set color(value) {}", "function addSwatchColorClassName(el, color) {\n el.className += ' hss-x-' + color.toLowerCase().replace(/\\s+/g, '-');\n}", "function rainbowColor() {\n updatePenMode(\"random\");\n}", "function buttonColorIn(ev) {\n ev.target.style.backgroundColor = \"orange\";\n}", "function updateColor() {\n bOpts['color'] = ('rgba(' + parseInt(r) + ', ' + parseInt(g) + ', '\n + parseInt(b) + ', ' + bOpts['opacity'] + ')');\n }", "function makeDay(){\n bgColor = '#87ceeb';\n grassColor= \"#7cfc00\";\n}", "function changeColor(data){\n //Changes Color of Button\n let sequencerIndex = parseInt(data.sequencerIndex);\n let presetIndex = parseInt(data.presetIndex);\n let voteCount = parseInt(data.voteCount);\n\n voteCountPercentage = voteCount/255\n console.log(voteCountPercentage)\n \n let redColor = (voteCountPercentage * 2) * 255\n let greenColor = 255\n\n if (voteCountPercentage > 0.5) {\n redColor = 255\n greenColor = 255 - (255 * ((voteCountPercentage - 0.5) * 2))\n }\n let displayColor = '#' + redColor.toString(16) + greenColor.toString(16) + '00'\n mainPresetButtons[sequencerIndex][presetIndex-1].style('background-color', displayColor)\n\n //Vote Procedure\n if (voteCount === 0){\n let whichButton = {...mainPresets[sequencerIndex+1][presetIndex]};\n\n // deep clone an array of arrays\n let setSequence = whichButton.sequence.map(i => ([...i]));\n let setEnvelope = {...whichButton.envelope};\n\n let setAttack = setEnvelope.attack\n let setDecay = setEnvelope.decay\n let setSustain = setEnvelope.sustain\n let setRelease = setEnvelope.release\n\n let setWaveform = whichButton.waveform;\n let setPitchScheme = whichButton.pitchArray;\n\n mainSynth[sequencerIndex].set({\n 'oscillator': {\n 'type': setWaveform\n },\n 'envelope': {\n 'attack': setAttack,\n 'decay': setDecay,\n 'sustain': setSustain,\n 'release': setRelease\n }\n });\n mainSequencer[sequencerIndex].polyMatrix = setSequence;\n mainSequencer[sequencerIndex].polyNotes = setPitchScheme;\n\n mainSequencer[sequencerIndex].drawMatrix();\n mainSequencer[sequencerIndex].polyMatrixNotes();\n console.log('changed!')\n }\n \n \n}", "color (pad, color) {\n return this.set(0x10, pad, colors[color.toUpperCase()])\n }", "changeColor(r,g,b,a) {\n this.setState({primaryColor: {\n r: r, g: g, b: b, a: a}})\n }", "function Tab_svelte_add_css() {\n\tvar style = (0,internal/* element */.bG)(\"style\");\n\tstyle.id = \"svelte-o2wbpy-style\";\n\tstyle.textContent = \"button.svelte-o2wbpy{background:none;border:none;border-bottom:2px solid white;border-radius:0;margin:0;color:#ccc}.selected.svelte-o2wbpy{border-bottom:2px solid teal;color:#333}\";\n\t(0,internal/* append */.R3)(document.head, style);\n}", "function eleccion_color(){\r\n\r\n }", "function colorChanger(color){\n\n mouse.color = color;\n hold.style.background = color;\n\n\n\n\n}", "_setCurrentColor ([r, g, b]) {\n\t\tthis.currentColor = [r, g, b];\n\t\tthis.shadowRoot.host.setAttribute(\"style\", `background: rgb(${Math.round(r)}, ${Math.round(g)}, ${Math.round(b)})`);\n\t}", "function changeColorSwatchColor(){\ndocument.getElementById('g0ukulele0').style.background = 'red';\ndocument.getElementById('g0ukulele1').style.background = 'green';\ndocument.getElementById('g0ukulele2').style.background = 'yellow';\ndocument.getElementById('g0ukulele3').style.background = 'black';\ndocument.getElementById('g1ukulele0').style.background = 'brown';\ndocument.getElementById('g1ukulele1').style.background = 'pink';\ndocument.getElementById('g1ukulele2').style.background = 'orange';\ndocument.getElementById('g1ukulele3').style.background = 'blue';\ndocument.getElementById('g2ukulele0').style.background = 'gray';\ndocument.getElementById('g2ukulele1').style.background = 'fuchsia';\ndocument.getElementById('g2ukulele2').style.background = 'white';\ndocument.getElementById('g2ukulele3').style.background = 'cyan';\ndocument.getElementById('g3ukulele0').style.background = 'firebrick';\ndocument.getElementById('g3ukulele1').style.background = 'violet';\ndocument.getElementById('g3ukulele2').style.background = 'chartreuse';\ndocument.getElementById('g3ukulele3').style.background = 'darkmagenta';\n\n\n }", "function switchColor(){\n\tif (currentColor === \"red\"){\n\t\tcurrentColor = \"black\";\n\t}\telse {\n\t\t\tcurrentColor = \"red\";\n\t\t}\n}", "render() {\n const { colors } = this.props;\n return(<Helmet>\n <style type='text/css'>{`\n .ui.button {\n background-color: ${colors.default};\n }\n\n .ui.primary.button {\n background-color: ${colors.primary};\n color: #111111;\n }\n\n .ui.basic.button {\n background-color: ${colors.basic};\n }\n\n .ui.positive.button {\n background-color: ${colors.positive};\n }\n\n .ui.negative.button {\n background-color: ${colors.negative};\n }\n `}\n </style>\n </Helmet>\n )\n }", "function change_background(){\r\n\r\n for(x=0;x<6;x++){\r\n generated = hexa[color_generator()];\r\n color += generated;\r\n\r\n };\r\n body.style.backgroundColor = color;\r\n span.innerText = color;\r\n color = \"#\"; // reinitialize the value of color to '#'\r\n \r\n\r\n \r\n\r\n \r\n}", "function changeColorFaded() {\n\n temp = 330;\n cont1 = 0;\n cont2 = 125;\n cont3 = 254;\n\n function cycler(cont) {\n if(cont >= 255) \n op = 'decr';\n else\n op = 'incr';\n\n switch(op) {\n case 'decr':\n cont--;\n break;\n case 'incr':\n cont++;\n break;\n }\n return cont;\n }\n\n var r = cycler(cont1);\n var g = cycler(cont2);\n var b = cycler(cont3);\n // Costruisco un colore RGB utilizzando i 3 numeri creati sopra \n \n colore_rgb = \"rgb(\" + r + \",\" + g + \", \" + b + \")\";\n \n // Applico il colore al tag span id->letterN\n letterN.style.color = colore_rgb;\n }", "function changeCss(buttonElem) {\n // Search the parent element of the button for the text inside h3\n // Use this for property\n let rawProperty = buttonElem.parentElement.firstChild.nextElementSibling.innerHTML\n // remove additional text\n let property = rawProperty.split(\":\")[0]\n // Grab the text inside the button for value, and clean it up\n let rawValue = buttonElem.innerHTML\n let value = rawValue.split(\" \")[0]\n // Determine which element to style based on property\n if (property == \"flex-grow\" || property == \"flex-shrink\") {\n boxSeven.style[property] = value\n } else {\n flexParent.style[property] = value\n }\n // Update the color of the button text currently applying styling to green\n // and change the colors of all other buttons in that div to black\n updateButtonColors(buttonElem, property, value)\n}", "changeColors() {\n // Creates an object that represents the underlying pixel data for the area of the canvas\n // denoted by the rectangle specified in the arguments - x/y position and width/height\n let rgbValues = canvas.getContext('2d').getImageData(bpm, 0, 1, 1).data;\n // concatenate color data into rbg string\n let bkgColor = \"rgb(\" + rgbValues[0] + \", \" + rgbValues[1] + \", \" + rgbValues[2] + \")\";\n // calculate color value for button hit effect\n let hitEffect = \"rgba(\" + rgbValues[0] + 5 + \", \" + rgbValues[1] + 5 + \", \" + rgbValues[2] + 5 + \" ,.4)\";\n\n // Set Button Color\n _playController.style.backgroundColor = bkgColor;\n _playController.style.borderColor = hitEffect;\n\n // This is a feature check to determine whether or not the browzer in use is firefox\n if (typeof InstallTrigger !== 'undefined') {\n // if fire fox: assert styling for slider\n let styleSheet = document.styleSheets[1]; // grab 2nd stylesheet (our main) - make sure you are grabbing the right stylesheet!\n styleSheet.insertRule('input[type=range]::-moz-range-thumb { background: ' + bkgColor + ' }', styleSheet.cssRules.length);\n } else {\n // if webkit: insert slider styling\n document.styleSheets[0].addRule('input[type=range]::-webkit-slider-thumb', 'background-color: ' + bkgColor);\n }\n }", "function changeColor(){\n\tif(colorRGB === 0xFFFFFF){ //white\n\t\tcolorRGB = 0xC0C0C0; //ltgrey\n\t\tcolorSel.classList.toggle(\"whiteRGB\");\n\t\tcolorSel.classList.toggle(\"greyRGB\");\n\n\t} else if (colorRGB === 0xC0C0C0){ //ltgrey\n\t\tcolorRGB = 0xFFC0CB; //pink\n\t\tcolorSel.classList.toggle(\"greyRGB\");\n\t\tcolorSel.classList.toggle(\"pinkRGB\");\n\n\n\t} else if (colorRGB === 0xFFC0CB){ //pink\n\t\tcolorRGB = 0xFFFFFF; //white\n\t\tcolorSel.classList.toggle(\"whiteRGB\");\n\t\tcolorSel.classList.toggle(\"pinkRGB\");\n\t}\n\t// colorSel.classList.add(\"pinkRGB\");\n\t// classList.remove\n\t\n}", "function makeRGB() {\n const boxes = container.querySelectorAll('.box');\n rgb.textContent = \"RGB\";\n rgb.addEventListener('click', () => {\n boxes.forEach(box => box.addEventListener('mouseover', () => {\n let R = Math.floor(Math.random() * 256);\n let G = Math.floor(Math.random() * 256);\n let B = Math.floor(Math.random() * 256);\n const RGB = `rgb(${R},${G},${B})`;\n box.style.background = RGB;\n }))\n })\n buttons.appendChild(rgb).classList.add('btn');\n}", "function changerStyle(){\n\tparagraphe.style.color = 'white';\n\tparagraphe.style.backgroundColor = 'black';\n\tparagraphe.style.border = '10px dashed red';\n\tparagraphe.style.padding = '5px';\n}", "function fromOctClicked(){colorFrom(3); fromOct = true, fromBin =false, fromDec = false, fromHex = false;}", "function colorChange() {\r\n let randomColor = 'rgb(' + randomNumber(255) + ',' + randomNumber(255) + ',' + randomNumber(255) + ')';\r\n event.target.style.backgroundColor = randomColor; \r\n event.target.innerHTML = randomColor;\r\n \r\n}", "function changeColor(){\n play1button.style.backgroundColor = allColors[getRndInteger(0, allColors.length)]\n play2button.style.backgroundColor = allColors[getRndInteger(0, allColors.length)]\n play3button.style.backgroundColor = allColors[getRndInteger(0, allColors.length)]\n play4button.style.backgroundColor = allColors[getRndInteger(0, allColors.length)]\n play5button.style.backgroundColor = allColors[getRndInteger(0, allColors.length)]\n play6button.style.backgroundColor = allColors[getRndInteger(0, allColors.length)]\n play7button.style.backgroundColor = allColors[getRndInteger(0, allColors.length)]\n play8button.style.backgroundColor = allColors[getRndInteger(0, allColors.length)]\n play9button.style.backgroundColor = allColors[getRndInteger(0, allColors.length)]\n colordiv.style.color = (allButtons[getRndInteger(0, allColors.length)]).style.backgroundColor;\n }", "function setColor(jscolor){\n\tcolor = \"#\" + jscolor;\n}", "function coloring(event) {\n event.target.style.backgroundColor = pickColor();\n}", "function changeColor(){\n// giving jobs for the button to do when clicked.\n// set variables of each red, green, and blue and grab the value.\n// because the value is a string, make them change to numbers.\n\tvar redValue = document.getElementById('red').value;\n\t\tredValue = parseInt(redValue);\n\tvar greenValue = document.getElementById('green').value;\n\t\tgreenValue = parseInt(greenValue);\n\tvar blueValue = document.getElementById('blue').value;\n\t\tblueValue = parseInt(blueValue);\n\t\n\tvar colorStr = 'rgb(' + redValue + ',' + greenValue + ',' + blueValue + ')';\n// set a new variable that concatenate all 3 values\n\tdocument.getElementById('colorful-text').innerHTML = colorStr;\n// grab the text element, and re-write it with colorStr\t\n\tvar backgroundColor = document.getElementById('wrapper');\n\tbackgroundColor.style.background= colorStr;\n\tconsole.log(colorStr);\n// grabbing the whole wrapper - setting it to a variable so you know what is going on, \n// and changing the css of the element to reflect the new rgb values \n// ex: background-color: (rgb(255, 0, 4))\n}", "setColor(c){\n\t\tthis.color=c;\n\t}", "function changeBackgound(button, another_button)\n{ \n button.css(\"background-color\",\"rgb(232, 234, 237)\");\n button.css(\"color\",\"rgb(32, 33, 36)\");\n \n another_button.css(\"background-color\",\"rgb(32, 33, 36)\");\n another_button.css(\"color\",\"rgb(232, 234, 237)\");\n}", "function changeColor(element, event) {\n let red = Math.floor(Math.random(Date.now) * 256);\n let blue = Math.floor(Math.random(Date.now) * 256);\n let green = Math.floor(Math.random(Date.now) * 256);\n\n element.style.color = `#${red.toString(16)}${green.toString(16)}${blue.toString(16)}`;\n}", "function bgColor () {\n if (color == 'black')\n {\n this.style.backgroundColor = 'black';\n }\n else if (color == 'rainbow')\n {\n let randomColor = Math.floor(Math.random()*16777215).toString(16);\n this.style.backgroundColor = \"#\" + randomColor;\n }\n else if (color == 'shader')\n {\n shade = this.style.opacity;\n shade = shade - 0.1;\n this.style.opacity = shade;\n }\n else if (color == 'eraser')\n {\n this.style.backgroundColor = 'white';\n this.style.opacity = 1;\n }\n}", "function chcolor(){if(v_chcolor == 1){ document.getElementById(\"sgb\").style.color=color[x];(x < color.length-1) ? x++ : x = 0;}}", "greener(){\n\t\tthis.multiplyColorValue(\"green\", 1.2);\n\t}", "function updateColor(button, value) {\n button.style.backgroundColor =\n value == \"1\" ? \"#b786f0\" : \"#525aff\" /* blue */;\n}", "function carouselSwitchColorDark(element){\r\n element.style.color = 'black';\r\n element.style.transition = 'all 0.6s';\r\n element.style.textShadow = '';\r\n}", "function changeColor(c) {\n block.style.color = c;\n}", "function setBtnColor(btn, press) {\n\tif (press)\n\t\tbtn.style.backgroundColor = '#e74c3c';\n\telse\n\t\tbtn.style.backgroundColor = '#3d4450';\n}", "changeColor() {\n //this.color = \n }", "function itsClicked1(event) {\n r = r + 1;\n result.style.backgroundColor = \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\n color.innerHTML = `${r},${g},${b}`;\n}", "function lightMode() {\n change(\n \"rgb(255 255 255 / 50%)\",\n \"rgb(0 0 0 / 50%)\",\n \"Light Mode\",\n \"fa-moon\",\n \"fa-sun\",\n \"img/undraw_proud_coder_light.svg\",\n \"img/undraw_feeling_proud_light.svg\",\n \"img/undraw_conceptual_idea_light.svg\"\n );\n \n}", "function applyColorScheme(ghostName, color) {\n switch (color) {\n case 'blue':\n document.getElementById(ghostName).style.backgroundColor = '#0B24FB';\n document.getElementById(ghostName + '.leftEye').style.backgroundColor = '#FFF';\n document.getElementById(ghostName + '.rightEye').style.backgroundColor = '#FFF';\n document.getElementById(ghostName + '.leftEyeball').style.backgroundColor = 'transparent';\n document.getElementById(ghostName + '.rightEyeball').style.backgroundColor = 'transparent';\n document.getElementById(ghostName + '.mouth').style.borderColor = '#FFF';\n document.getElementById(ghostName + '.mouth1').style.borderColor = '#FFF';\n break;\n case 'normal':\n document.getElementById(ghostName).style.backgroundColor = getComputedStyle(document.documentElement).getPropertyValue('--' + ghostName + 'Color');\n document.getElementById(ghostName + '.leftEye').style.backgroundColor = '#305198';\n document.getElementById(ghostName + '.rightEye').style.backgroundColor = '#305198';\n document.getElementById(ghostName + '.leftEyeball').style.backgroundColor = '#FFF';\n document.getElementById(ghostName + '.rightEyeball').style.backgroundColor = '#FFF';\n document.getElementById(ghostName + '.mouth').style.borderColor = 'transparent';\n document.getElementById(ghostName + '.mouth1').style.borderColor = 'transparent';\n break;\n case 'eyes':\n document.getElementById(ghostName).style.backgroundColor = 'transparent';\n document.getElementById(ghostName + '.leftEye').style.backgroundColor = '#305198';\n document.getElementById(ghostName + '.rightEye').style.backgroundColor = '#305198';\n document.getElementById(ghostName + '.leftEyeball').style.backgroundColor = '#FFF';\n document.getElementById(ghostName + '.rightEyeball').style.backgroundColor = '#FFF';\n document.getElementById(ghostName + '.mouth').style.borderColor = 'transparent';\n document.getElementById(ghostName + '.mouth1').style.borderColor = 'transparent';\n break;\n case 'transparent':\n document.getElementById(ghostName).style.backgroundColor = 'transparent';\n document.getElementById(ghostName + '.leftEye').style.backgroundColor = 'transparent';\n document.getElementById(ghostName + '.rightEye').style.backgroundColor = 'transparent';\n document.getElementById(ghostName + '.leftEyeball').style.backgroundColor = 'transparent';\n document.getElementById(ghostName + '.rightEyeball').style.backgroundColor = 'transparent';\n document.getElementById(ghostName + '.mouth').style.borderColor = 'transparent';\n document.getElementById(ghostName + '.mouth1').style.borderColor = 'transparent';\n break;\n case 'flash red':\n document.getElementById(ghostName).style.backgroundColor = '#FFF';\n document.getElementById(ghostName + '.leftEye').style.backgroundColor = '#FE2502';\n document.getElementById(ghostName + '.rightEye').style.backgroundColor = '#FE2502';\n document.getElementById(ghostName + '.mouth').style.borderColor = '#FE2502';\n document.getElementById(ghostName + '.mouth1').style.borderColor = '#FE2502';\n break;\n case 'flash blue':\n document.getElementById(ghostName).style.backgroundColor = '#0B24FB';\n document.getElementById(ghostName + '.leftEye').style.backgroundColor = '#FFF';\n document.getElementById(ghostName + '.rightEye').style.backgroundColor = '#FFF';\n document.getElementById(ghostName + '.mouth').style.borderColor = '#FFF';\n document.getElementById(ghostName + '.mouth1').style.borderColor = '#FFF';\n break;\n }\n }", "function updateThemeWithAppSkinInfo(appSkinInfo) {\r\n //Update the background color of the panel\r\n var panelBackgroundColor = appSkinInfo.panelBackgroundColor.color;\r\n document.body.bgColor = toHex(panelBackgroundColor);\r\n \r\n document.body.style.color=reverseColor(appSkinInfo.panelBackgroundColor);\r\n\r\n document.styleSheets[0].addRule(\"button.fw\",\"background-color:#\"+document.body.bgColor+\";color:\"+document.body.style.color+\";\");\r\n document.styleSheets[0].addRule(\"button.hw\",\"background-color:#\"+document.body.bgColor+\";color:\"+document.body.style.color+\";\");\r\n document.styleSheets[0].addRule(\"button.qw\",\"background-color:#\"+document.body.bgColor+\";color:\"+document.body.style.color+\";\");\r\n document.styleSheets[0].addRule(\"A\",\"background-color:#\"+document.body.bgColor+\";color:\"+document.body.style.color+\";\");\r\n}", "function revertColor(button) {\n button.style.backgroundColor = \"white\";\n}" ]
[ "0.70218265", "0.69491595", "0.6933238", "0.6742239", "0.6656326", "0.6597753", "0.65559864", "0.6526904", "0.6526904", "0.6488959", "0.6443221", "0.64218557", "0.6407189", "0.637831", "0.637658", "0.6328086", "0.63208467", "0.6315124", "0.6311696", "0.6304723", "0.6300955", "0.6295618", "0.6270011", "0.62685585", "0.6262325", "0.6239519", "0.62334263", "0.62305725", "0.6203445", "0.6199347", "0.6198548", "0.6190462", "0.61895996", "0.6188719", "0.6186686", "0.61796784", "0.6172863", "0.6165708", "0.61648023", "0.6161865", "0.6159303", "0.6155861", "0.6149826", "0.61403346", "0.6136826", "0.6136448", "0.6128972", "0.61281794", "0.6125843", "0.6116903", "0.6106824", "0.609468", "0.6086313", "0.6083564", "0.6081818", "0.60657525", "0.60570747", "0.6053538", "0.6052258", "0.6051588", "0.6043651", "0.6042419", "0.6042081", "0.603981", "0.6039164", "0.6036997", "0.6036368", "0.60320187", "0.60271454", "0.6021833", "0.60212255", "0.60197127", "0.6017293", "0.6006684", "0.6006523", "0.6003417", "0.600018", "0.6000077", "0.5994936", "0.5993426", "0.59831727", "0.597997", "0.597549", "0.59753424", "0.59723955", "0.59691834", "0.59675914", "0.5965927", "0.5963118", "0.5952383", "0.59521264", "0.5947965", "0.59461415", "0.5944278", "0.5938579", "0.59358186", "0.5932527", "0.59322494", "0.5929184", "0.5927135" ]
0.7001339
1
TODO: We should use the portfolio socket event instead once it's implemented
async watchCurrencies() { if (!this.stopWatchingCurrencies) { this.stopWatchingCurrencies = await fireEvery(async () => { const {price: kmdPriceInUsd} = this.coinPrices.find(x => x.symbol === 'KMD'); let {portfolio: currencies} = await this.api.portfolio(); // TODO(sindresorhus): Move the returned `mm` currency info to a sub-property and only have cleaned-up top-level properties. For example, `mm` has too many properties for just the balance. // Mixin useful data for the currencies currencies = currencies.map(currency => { const {price, percentChange24h} = this.coinPrices.find(x => x.symbol === currency.coin); if (price) { currency.cmcPriceUsd = price; currency.cmcBalanceUsd = currency.balance * price; } else { // We handle coins not on CMC // `currency.price` is the price of the coin in KMD currency.cmcPriceUsd = currency.price * kmdPriceInUsd; currency.cmcBalanceUsd = currency.balance * currency.cmcPriceUsd; } currency.symbol = currency.coin; // For readability currency.name = coinlist.get(currency.symbol, 'name') || currency.symbol; currency.cmcPercentChange24h = percentChange24h; currency.balanceFormatted = roundTo(currency.balance, 8); currency.cmcPriceUsdFormatted = formatCurrency(currency.cmcPriceUsd); currency.cmcBalanceUsdFormatted = formatCurrency(currency.cmcBalanceUsd); return currency; }); if (!_.isEqual(this.state.currencies, currencies)) { this.setState({currencies}); } }, 1000); } return this.stopWatchingCurrencies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "socket_customEventFromServer(_, payload) {\n console.log(\"customEventFromServer\", payload);\n }", "static listenSocketEvents() {\n Socket.shared.on(\"wallet:updated\", (data) => {\n let logger = Logger.create(\"wallet:updated\");\n logger.info(\"enter\", data);\n\n Redux.dispatch(Wallet.actions.walletUpdatedEvent(data));\n });\n }", "function socketEvent(data){\n data = socketResponse(data);\n var Context = pageContext( null,null, null, data.param.route );\n tiny.pub(Context.page.eventDone, [ data, Context, data.param.route ] );\n }", "function OnChannelOpen()\n{\n}", "networkQueryOffersCollected() {\n this.socket.emit('networkQueryOffersCollected');\n }", "addMessageChannelEventListener() {\n\t\tself.addEventListener('message', event => {\n\t\t\tif (!this.clientId.isApproved() && event.ports[0]) {\n\t\t\t\t//console.log('@serviceworker !!!ready');\n\t\t\t\tthis.clientId.approved = this.clientId.recent;\n\t\t\t\t// save messageChannel\n\t\t\t\tthis.messageChannel = event.ports[0];\n\t\t\t\tthis.doIntercept.push(event.data); // location.origin\n\t\t\t\tthis.messageChannel.postMessage('!!!ready');\n\t\t\t} else if (event.data && Array.isArray(event.data[0])) {\n\t\t\t\t// execute resolving function\n\t\t\t\t//console.log('@serviceworker got response:', event.data);\n\t\t\t\tconst resolveFuncs = this.resolveMap.get(event.data[0][1]); // key\n\t\t\t\tif (resolveFuncs) {\n\t\t\t\t\tevent.data[1] && Array.isArray(event.data[1]) ? resolveFuncs[0](event.data[1]) : resolveFuncs[1]();\n\t\t\t\t\tthis.resolveMap.delete(event.data[0][1]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "_runSocketServer() {\n const socketServer = new ws.Server({ port: SOCKET_SERVER_PORT });\n\n socketServer.on('connection', socket => {\n this._connectedSockets = [...this._connectedSockets, socket];\n\n socket.send(JSON.stringify(this._getProjectContent()));\n\n socket.on('close', () => {\n this._connectedSockets = this._connectedSockets.filter(\n _socket => _socket !== socket\n );\n });\n });\n }", "onopen() {\n // clear old subs\n this.cleanup();\n // mark as open\n this._readyState = \"open\";\n this.emitReserved(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on(socket, \"ping\", this.onping.bind(this)), on(socket, \"data\", this.ondata.bind(this)), on(socket, \"error\", this.onerror.bind(this)), on(socket, \"close\", this.onclose.bind(this)), on(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }", "function newConnection(socket) { // create a new socket everytime there is a connection\n\n console.log ('new connetion: ' + socket.id); // print the id of socket cloent\n // when receive mesege called 'mouse', trigger function called MouseMsg\n // just printing data\n socket.on('mouse', mouseMsg);\n\n\n \n}", "onopen() {\n debug(\"open\");\n // clear old subs\n this.cleanup();\n // mark as open\n this._readyState = \"open\";\n super.emit(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on_1.on(socket, \"ping\", this.onping.bind(this)), on_1.on(socket, \"data\", this.ondata.bind(this)), on_1.on(socket, \"error\", this.onerror.bind(this)), on_1.on(socket, \"close\", this.onclose.bind(this)), on_1.on(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }", "handleCoinClickedEvent(data) {\n console.log('in handleCoinClickedEvent method ' + JSON.stringify(data));\n this.changePlayerTurnToNextPlayer();\n let dataObj;\n let positionChangeEventDataObj = {};\n let currentPlayerType = this.playerType;\n if(!data || !data.data) {\n console.error(' no data value or data.data value');\n }\n dataObj = JSON.parse(data.data);\n let positionValue = parseInt(dataObj.positionFrom);\n let currentPlayerCoinsList = this.coinObjectList.find(function(indCoin) {\n return (indCoin.playerType === currentPlayerType && indCoin.position === positionValue);\n });\n if(!positionValue) {\n console.error('positionValue is empty , currentPlayerType : ' \n + currentPlayerType + ' position ' + positionValue);\n console.error(' current coinObjectList : '+ this.coinObjectList);\n }\n // render move the element position\n if(data.firePlatformEvent) {\n positionChangeEventDataObj['positionFrom'] = dataObj['positionFrom'];\n positionChangeEventDataObj['positionTo'] = dataObj['positionTo'];\n positionChangeEventDataObj['coinId'] = dataObj['coinId'];\n positionChangeEventDataObj['isHome'] = dataObj['isHome'];\n console.log('before calling publish event '+ this.playerBoardId);\n this.publishPlatformEventHelper(positionChangeEventDataObj, PLATFORMEVENTTYPESMAP.POSITIONCHANGEEVENT, \n this.playerType, this.playerBoardId, null);\n }\n }", "function booDJ(e) {\n\tsocket.emit('boo', {\n\t});\n}", "onopen() {\n debug(\"open\"); // clear old subs\n\n this.cleanup(); // mark as open\n\n this._readyState = \"open\";\n this.emitReserved(\"open\"); // add new subs\n\n const socket = this.engine;\n this.subs.push(on_1.on(socket, \"ping\", this.onping.bind(this)), on_1.on(socket, \"data\", this.ondata.bind(this)), on_1.on(socket, \"error\", this.onerror.bind(this)), on_1.on(socket, \"close\", this.onclose.bind(this)), on_1.on(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }", "function bind() {\r\n\r\n socket = new io.Socket(postmile.api.domain, { port: postmile.api.port, rememberTransport: false });\r\n\r\n socket.on('connect', function () {\r\n Y.log('Connected!');\r\n });\r\n\r\n socket.on('message', function (message) {\r\n handleStreamMessage(message);\r\n });\r\n\r\n socket.connect();\r\n\r\n Y.on(\"postmile:subscribeProject\", function (project) {\r\n subscribe(project);\r\n });\r\n\r\n }", "setSocket(socket) {\n this.socket = socket;\n if (debug) console.log('socket on port ${this.port} established.');\n this.ready = true;\n while(this.queue.length) {\n let entry = this.queue.splice(0,1)[0];\n this[entry.op](entry.eventName, entry.handler || entry.payload, entry.afterwards);\n }\n }", "function sliderChange(e) {\n socket.emit('data request', dataRequestPayload());\n}", "run() {\n this.reset();\n this.socket = net.createConnection({\n 'host': this.host.address, \n 'port': this.port,\n }).setKeepAlive(true); // .setNoDelay(true)\n this.socket.on('connect', this.onConnect);\n this.socket.on('error', this.onError);\n this.socket.on('data', this.onData);\n this.socket.on('close', this.onClose);\n }", "onopen() {\n debug(\"open\");\n // clear old subs\n this.cleanup();\n // mark as open\n this.readyState = \"open\";\n super.emit(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on_1.on(socket, \"data\", component_bind_1.default(this, \"ondata\")));\n this.subs.push(on_1.on(socket, \"ping\", component_bind_1.default(this, \"onping\")));\n this.subs.push(on_1.on(socket, \"error\", component_bind_1.default(this, \"onerror\")));\n this.subs.push(on_1.on(socket, \"close\", component_bind_1.default(this, \"onclose\")));\n this.subs.push(on_1.on(this.decoder, \"decoded\", component_bind_1.default(this, \"ondecoded\")));\n }", "onopen() {\n debug(\"open\");\n // clear old subs\n this.cleanup();\n // mark as open\n this._readyState = \"open\";\n super.emit(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on_1.on(socket, \"ping\", this.onping.bind(this)), on_1.on(socket, \"data\", this.ondata.bind(this)), on_1.on(socket, \"error\", this.onerror.bind(this)), on_1.on(socket, \"close\", this.onclose.bind(this)), on_1.on(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }", "function webSocket_onopen()\n\t{\n\t\tlogger_.log(\"webSocket_onopen\", \"WebSocket Verbindung geoeffnet\");\n\t\treadValueList();\n\t\tstatusChange();\n\t}", "onMarketDepth100Event(fn) {\n\n this.eventEmitter.on(settings.socket.marketDepth100Event, (data) => {\n\n fn(data);\n\n });\n }", "attachChannelEvents() {\n this.channel.onmessage = this.handleChannelMessage;\n\n this.channel.onopen = e => {\n this.channel.send('ping');\n }\n\n this.channel.onerror = e => {\n console.log('channel error', e);\n }\n\n this.channel.onclose = e => {\n console.log('channel closed');\n }\n\n this.channel.onbufferedamountlow = e => {\n this.resumeTransfers();\n }\n }", "[net.onConnect](evt) {\n console.log('SC:connected', evt);\n }", "function portfolio(response){\n console.log(\"Request for handler for portfolio was called.\")\n response.writeHead(200, {\"Content-type\": \"text/plain\"});\n response.write(\"These are some of our portfolio projects\");\n response.end();\n }", "function createChannel() {\n\tchannel = new goog.appengine.Channel(server_token);\n socket = channel.open();\n socket.onopen = channelOnOpen;\n socket.onmessage = channelOnMessage;\n socket.onerror = channelOnError;\n socket.onclose = channelOnClose;\n}", "setUpSocketEventListeners() {}", "connected() {\n event();\n }", "onPlayerConnected(socket) {\n let that = this;\n\n // save player\n this.connectedPlayers[socket.id] = {\n socket: socket,\n state: 'new',\n roomName: this.DEFAULT_ROOM_NAME\n };\n\n let playerId = this.getPlayerId(socket);\n if (!playerId) {\n playerId = v4();\n }\n socket.playerId = playerId;\n\n socket.lastHandledInput = null;\n socket.joinTime = (new Date()).getTime();\n this.resetIdleTimeout(socket);\n \n let playerEvent = { id: socket.id, playerId, joinTime: socket.joinTime, disconnectTime: 0 };\n this.gameEngine.emit('server__playerJoined', playerEvent);\n this.gameEngine.emit('playerJoined', playerEvent);\n socket.emit('playerJoined', playerEvent);\n\n socket.on('disconnect', function() {\n playerEvent.disconnectTime = (new Date()).getTime();\n that.onPlayerDisconnected(socket.id, playerId);\n that.gameEngine.emit('server__playerDisconnected', playerEvent);\n that.gameEngine.emit('playerDisconnected', playerEvent);\n });\n\n // todo rename, use number instead of name\n socket.on('move', function(data) {\n that.onReceivedInput(data, socket);\n });\n\n socket.on('_ping', function() {\n socket.emit('_pong');\n });\n\n // we got a packet of trace data, write it out to a side-file\n socket.on('trace', function(traceData) {\n traceData = JSON.parse(traceData);\n let traceString = '';\n traceData.forEach(t => { traceString += `[${t.time}]${t.step}>${t.data}\\n`; });\n fs.appendFile(`${that.options.tracesPath}client.${playerId}.trace`, traceString, err => { if (err) throw err; });\n });\n\n this.networkMonitor.registerPlayerOnServer(socket);\n }", "setupSocket() {\n const _self = this;\n const google = window.google;\n socket.on('dronepositionupdate', (data) => {\n // find a marker by id\n const marker = _.find(_self.markers, { id: data.id });\n if (marker) {\n marker.setPosition(new google.maps.LatLng(data.currentLocation[0], data.currentLocation[1]));\n // repaint the cluster\n _self.markerCluster.repaint();\n }\n });\n }", "onConnect() {\n console.log(\"STretch Connected\");\n }", "onopen() {\n debug(\"open\");\n // clear old subs\n this.cleanup();\n // mark as open\n this._readyState = \"open\";\n this.emitReserved(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on_js_1.on(socket, \"ping\", this.onping.bind(this)), on_js_1.on(socket, \"data\", this.ondata.bind(this)), on_js_1.on(socket, \"error\", this.onerror.bind(this)), on_js_1.on(socket, \"close\", this.onclose.bind(this)), on_js_1.on(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }", "function stasisStart(event, channel) {\n\n // console.log(util.format('status start ', channel.name));\n \n\n // console.log(util.format('Channel %s just entered application', channel.name));\n \n \n // console.log(util.format( 'Channel %s just entered application ID', channel.id));\n \n //var socketidvar = '';\n //var currentbridge = '';\n \n}", "function addSocket(socket){\n\n //al.info('adding Socket');\n //console.log(this);\n //var foo = handleQuickJoin.bind(this);\n //var bar = handleCancelQuickJoin.bind(this)\n //socket.removeAllListeners('quick-join');\n //socket.removeAllListeners('cancel-quick-join');\n //socket.on('cancel-quick-join', () => this.handleCancelQuickJoin(socket));\n\n socket.on('quick-join',(msg) => { this.handleQuickJoin(socket,msg)});\n\n}", "function webSocket_onopen()\n\t{\n\t\tstatusChange();\n\t\tconsole.log(\"[ASNeG_Client] WebSocket Verbindung geoeffnet\");\n\t\treadValueList();\n\t}", "onOpenInterestEvent(fn) {\n\n this.eventEmitter.on(settings.socket.openInterestEvent, (data) => {\n\n fn(data);\n\n });\n }", "onMarketDepthEvent(fn) {\n\n this.eventEmitter.on(settings.socket.marketDepthEvent, (data) => {\n\n fn(data);\n\n });\n }", "messageHandler(self, e) {\n let msg = ( (e.data).match(/^[0-9]+(\\[.+)$/) || [] )[1];\n if( msg != null ) {\n let msg_parsed = JSON.parse(msg);\n let [r, data] = msg_parsed;\n self.socketEventList.forEach(e=>e.run(self, msg_parsed))\n }\n }", "function addEventListener(socket) {\n socket.on('message', function (data, rinfo){\n var jsonData = BSON.parse(data);\n if (utils.hasFileIndex(jsonData)) {\n var blockID = jsonData[\"index\"];\n var readStream = fs.createReadStream(\n source_file, {\n start: blockID * BLOCK_SIZE,\n end: blockID * BLOCK_SIZE + BLOCK_SIZE - 1,\n autoClose: true\n }\n );\n readStream.on('data', function(data) {\n console.log('transfer data....', blockID);\n var toSend = BSON.serialize({\n header: \"media\",\n index: blockID,\n content: data,\n checksum: utils.get_checksum(data)\n });\n socket.send(toSend, 0, toSend.length, rinfo.port, rinfo.address);\n });\n\n readStream.on('end', function () {\n// console.log('transfer data end....');\n });\n }\n else{\n console.log(\"Waning: BSON is not a file content...\");\n }\n });\n socket.on('close', function(){\n console.log('close....');\n });\n socket.on('error', function(){\n console.log('\\033[96m error occur. \\033[39m');\n });\n}", "function sensorPub() {\n\t//Publish sensor data\n\ttemperatureData = temperature.getTemperature();\n\tsocket.send(['Grove_temperatureandhumiditysensor_temperature_1_0-1', JSON.stringify({\"name\": \"Grove_temperatureandhumiditysensor_temperature_1_0-1\", \"datapoints\":[[timeMS.getTime(), temperatureData, quality]]})]);\n\tconsole.log(temperatureData + \" degrees Celsius\");\n\thumidityData = humidity.getHumidity();\n\tsocket.send(['Grove_temperatureandhumiditysensor_humidity_1_0-1', JSON.stringify({\"name\": \"Grove_temperatureandhumiditysensor_humidity_1_0-1\", \"datapoints\":[[timeMS.getTime(), humidityData, quality]]})]);\n\tconsole.log(humidityData + \" RH\");\n\tbuttonData = button.value();\n\tsocket.send(['Grove_button_1_1-1', JSON.stringify({\"name\": \"Grove_button_1_1-1\", \"datapoints\":[[timeMS.getTime(), buttonData, quality]]})]);\n\tconsole.log(buttonData + \" value for button\");\n\tlightData = light.raw_value();\n\tsocket.send(['Grove_light_1_1-1', JSON.stringify({\"name\": \"Grove_light_1_1-1\", \"datapoints\":[[timeMS.getTime(), lightData, quality]]})]);\n\tconsole.log(lightData + \" raw light value\");\n\tmotionData = motion.value();\n\tsocket.send(['Grove_motionsensor_1_4-1', JSON.stringify({\"name\": \"Grove_motionsensor_1_4-1\", \"datapoints\":[[timeMS.getTime(), motionData, quality]]})]);\n\tconsole.log(motionData + \" motion boolean\");\n\tconsole.log(\"-------------------------\");\n\n}", "_setDefaultListeners () {\n this.io.on('connection', (objSocket) => {\n console.log('Socket client connected', this.io.engine.clientsCount);\n objSocket.on('join_room', (strRoom) => {\n console.log('Joining room', strRoom);\n objSocket.join(strRoom);\n });\n })\n }", "function onOpen() {\n\t\tconsole.log('Client socket: Connected');\n\t\tcastEvent('onOpen', event);\n\t}", "listenForData() {\n this.socket.on(EVENT_DATA, data => this.handleData(data))\n }", "SOCKET_ONMESSAGE(state, message) {\n state.socket.message = message;\n console.log(\"SOCKET_ONMESSAGE\");\n }", "function newConnection(socket){\n\tconsole.log('New connection: ' + socket.id);\n\t//socket.on('clickEvent', mouseMsg);\n\t//function mouseMsg(data){\n\t\t//socket.broadcast.emit('clickEvent', data);\n\t\t//following line refers to sending data to all\n\t\tio.sockets.emit('buttonEvent', buttonPress);\n\t//\tconsole.log(data);\n\t//}\n}", "customSocketRender(socket){\n return null;\n }", "function initSockets(){\n //connect to the io opened tunnel in the server\n var socket = io();\n socket.on(\"Order Status\", function(obj){\n createReadyOrders(obj.nowServing);\n createToBeCooked(obj.kitchen);\n });\n\n}", "function HttpSentEvent() { }", "function HttpSentEvent() { }", "function HttpSentEvent() { }", "function broadcast(req, res, addedSocketAddress){\n globalView.forEach(element => {\n if(element != process.env.SOCKET_ADDRESS && element != addedSocketAddress)\n {\n let forward_address = element\n let {url, options} = makeRequestObject(forward_address, req)\n fetch(url, options)\n .then(f_res => f_res.json().then(json_f_res => console.log(json_f_res)))\n .catch(error => console.log(error))\n }\n })\n}", "function on_socket_get(message){}", "function onevent(args) {\n console.log('connected')\n console.log(\"Event:\", args[0]);\n }", "_onConnected() {\n this.emit(\"connected\");\n for (let marketSymbol of this._tickerSubs.keys()) {\n this._sendSubTicker(marketSymbol);\n }\n for (let marketSymbol of this._tradeSubs.keys()) {\n this._sendSubTrades(marketSymbol);\n }\n for (let marketSymbol of this._level2SnapshotSubs.keys()) {\n this._sendSubLevel2Snapshots(marketSymbol);\n }\n for (let marketSymbol of this._level2UpdateSubs.keys()) {\n this._sendSubLevel2Updates(marketSymbol);\n }\n for (let marketSymbol of this._level3UpdateSubs.keys()) {\n this._sendSubLevel3Updates(marketSymbol);\n }\n this._watcher.start();\n }", "function proxySocket() {\n\t\tproxyEvents.forEach(function(event){\n\t\t\tsocket.on(event, function(data) {\n\t\t\t\tamplify.publish('socket:'+event, data || null);\n\t\t\t});\n\t\t});\n\t\tsocket.on('connect', function() {\n\t\t\tsocket.emit('subscribe', user.token);\n\t\t\tamplify.publish('socket:connect');\n\t\t});\n\t\n\t}", "function onConnect(socket) {\n // When the client emits 'info', this listens and executes\n socket.on('info', function (data) {\n console.info('[%s] %s', socket.address, JSON.stringify(data, null, 2));\n });\n\n //When the document is delete(active status is changed) 'Document:Delete' is emitted\n socket.on('Document:Delete', function (data) {\n socket.broadcast.emit('Document:Delete', data);\n});\n\n socket.on('onDisconnect', function (data) {\n socket.disconnect();\n });\n require('../api/photo/photo.socket').register(socket);\n require('../api/stamp/stamp.socket').register(socket);\n require('../api/signature/signature.socket').register(socket);\n require('../api/mobilelink/mobilelink.socket').register(socket);\n require('../api/links/links.socket').register(socket);\n require('../api/department/department.socket').register(socket);\n require('../api/otp/otp.socket').register(socket);\n require('../api/folder/folder.socket').register(socket);\n require('../api/document/document.socket').register(socket);\n require('../api/sharingpeople/sharingpeople.socket').register(socket);\n require('../api/notification/notification.socket').register(socket);\n require('../api/chat/chat.socket').register(socket);\n require('../api/onlineuser/onlineuser.socket').register(socket);\n require('../api/comment/comment.socket').register(socket);\n require('../api/fieldvalue/fieldvalue.socket').register(socket);\n require('../api/fieldoption/fieldoption.socket').register(socket);\n require('../api/documentlogs/documentlogs.socket').register(socket);\n require('../api/user/user.socket').register(socket);\n require('../api/favorite/favorite.socket').register(socket);\n}", "function onSocketMessage(event) {\r\n\tappendContent(\"theMessages\", \"Received: \" + event.data + \"<br/>\");\r\n}", "function go(e) {\n e.preventDefault();\n // create socket\n socket = new WebSocket(process.env.SOCKET_URL);\n socket.onmessage = ((event) => {\n const msg = JSON.parse(event.data);\n const id = parseInt(msg.id);\n\n // !! NEW !!\n if (msg.warning) {\n // Warnings can come for many reasons, here we are dealing \n // with headset connections\n data_obj['warning'] = msg.warning;\n return;\n }\n\n // !! NEW !!\n if(msg.sid && response_funcs.has(msg.sid)) {\n // handle subscription data...\n response_funcs.get(msg.sid)(msg);\n return\n }\n\n if (!response_funcs.has(id)) { \n console.log(\"Got a bad message??\");\n console.log(event.data);\n return\n }\n response_funcs.get(id)(msg); // send the data to the callback\n });\n socket.onerror = (() => {\n alert(\"Web socket got an error?!?\");\n });\n socket.onopen = (() => {\n requestAccess();\n });\n }", "function onOpen(){\n console.log('Open connections!');\n}", "function StartSocket (socket, io) {\n\n socket.on('getBlocksAndTxns', () => {\n PushBlockInfo.getCacheData(socket, 'getBlocksAndTxns')\n })\n\n\n socket.on('getPrice', (req) => {\n ChartsPrice.Price(socket, req, 'getPrice')\n })\n\n socket.on('transaction', (req) => {\n Txns.List(socket, req, 'transaction')\n })\n \n socket.on('blocks', (req) => {\n Blocks.List(socket, req, 'blocks')\n })\n\n socket.on('transferDtil', (req) => {\n Txns.Dtil(socket, req, 'transferDtil')\n })\n socket.on('transferPage', (req) => {\n Txns.Page(socket, req, 'transferPage')\n })\n \n socket.on('txnsDexList', (req) => {\n TxnsDex.List(socket, req, 'txnsDexList')\n })\n socket.on('txnsDexDtil', (req) => {\n TxnsDex.Dtil(socket, req, 'txnsDexDtil')\n })\n socket.on('txnsDexPage', (req) => {\n TxnsDex.Page(socket, req, 'txnsDexPage')\n })\n\n socket.on('txnsPending', (req) => {\n TxnsPending.pendingList(socket, req, 'txnsPending')\n })\n socket.on('txnsPendingDtil', (req) => {\n TxnsPending.pendingDtil(socket, req, 'txnsPendingDtil')\n })\n socket.on('txnsPendingPage', (req) => {\n TxnsPending.pendingPage(socket, req, 'txnsPendingPage')\n })\n\n\n socket.on('getAvgData', (req) => {\n getAvgData.Avg(socket, req, 'getAvgData')\n })\n \n socket.on('blockNum', (req) => {\n Blocks.Dtil(socket, req, 'blockNum')\n })\n\n\n socket.on('getOrders', (req) => {\n Orders.List(socket, req, 'getOrders')\n })\n socket.on('OrdersPage', (req) => {\n Orders.List(socket, req, 'OrdersPage')\n })\n\n socket.on('topAccounts', (req) => {\n AccountOther.TopA(socket, req, 'topAccounts')\n })\n socket.on('getAccounts', (req) => {\n AccountOther.TopA(socket, req, 'getAccounts')\n })\n socket.on('accountTxn', (req) => {\n AccountOther.ATxn(socket, req, 'accountTxn')\n })\n socket.on('accountLiloTxn', (req) => {\n AccountOther.ATxn(socket, req, 'accountLiloTxn')\n })\n\n socket.on('transactionChart', (req) => {\n ChartsTxns(socket, req, 'transactionChart')\n })\n socket.on('addressChart', (req) => {\n ChartsAccount(socket, req, 'addressChart')\n })\n\n // socket.on('sendTxns', (req) => {\n // sendTxns.sendTxns(socket, req, 'sendTxns')\n // })\n}", "function HttpSentEvent() {}", "function HttpSentEvent() {}", "messageHandler(socket) \n\t{\n \t\tsocket.on('message', message => {\n \t\tconst data = JSON.parse(message);\n \t\t\tswitch(data.type) \n\t\t\t{\n\t\t\t\t//when another user has a more updated chain.\t\n \t\t\tcase MESSAGE_TYPES.chain:\n \t\t\t\tthis.blockchain.replaceChain(data.chain);\n \t\t\t\tbreak;\n\t\t\t\t//when another user adds to the transaction pool.\n \t\t\tcase MESSAGE_TYPES.transaction:\n \t\t\t\tthis.transactionPool.updateOrAddTransaction(data.transaction);\n \t\t\t\tbreak;\n\t\t\t\t//when another user clears the transaction pool(only happends when mine completes).\n\t\t\t\tcase MESSAGE_TYPES.clear_transactions:\n\t\t\t\t\tthis.transactionPool.clear();\n\t\t\t\t\tbreak;\n \t\t\t}\t\n\t\t});\n\t}", "constructor() {\n super();\n this.openworld = function(name){\n if ( name === ''){\n var sock = new ws('ws://www.yourworldoftext.com/ws/');\n }\n else {\n var sock = new ws(`ws://www.yourworldoftext.com/${name}/ws/`);\n }\n //var sock = new ws(`ws://www.yourworldoftext.com/ws/`);\n var world = new World(name, this);\n sock.on('open', () => {\n world.setsock(sock)\n })\n return world;\n }\n var pushqueue = [];\n this.newpush = function(world){\n pushqueue.push(world);\n }\n this.emptyqueue = function(world){\n pushqueue = pushqueue.filter(item => {return item == world;});\n console.log('queue emptied');\n }\n setInterval(()=>{\n if (pushqueue.length > 0){\n pushqueue.shift().servpush();\n console.log('server communications remaining:', pushqueue.length, '; time:', +new Date());\n }\n else{\n this.emit('free');\n }\n }, 800)\n }", "listen (pack, event, params) {\n const __callbacks = {};\n const __eventCallback = (event) => __callbacks[event] || function () {};\n\n const user_id = `${pack}.${event}_${this.project}:${this.key}`;\n request({\n uri: `${RapidAPI.callbackBaseURL()}/api/get_token?user_id=${user_id}`,\n method: 'GET',\n headers: {\n \"Content-Type\": \"application/json\"\n },\n auth: {\n 'user': this.project,\n 'pass': this.key,\n 'sendImmediately': true\n }\n }, (error, response, body) => {\n const { token } = JSON.parse(body);\n const sock_url = `${RapidAPI.websocketBaseURL()}/socket/websocket?token=${token}`;\n const socket = new Socket.Socket(sock_url, {\n params: {token}\n });\n socket.connect();\n const channel = socket.channel(`users_socket:${token}`, params);\n channel.join()\n .receive('ok', msg => { __eventCallback('join')(msg); })\n .receive('error', reason => { __eventCallback('error')(reason); })\n .receive('timeout', () => { __eventCallback('timeout'); });\n\n channel.on('new_msg', msg => {\n if (!msg.token) {\n __eventCallback('error')(msg.body);\n } else {\n __eventCallback('message')(msg.body);\n }\n });\n channel.onError(() => __eventCallback('error'));\n channel.onClose(() => __eventCallback('close'));\n });\n const r = {\n on: (event, func) => {\n if (typeof func !== 'function') throw \"Callback must be a function.\";\n if (typeof event !== 'string') throw \"Event must be a string.\";\n __callbacks[event] = func;\n return r;\n }\n };\n return r;\n }", "socketMessage(message) {\n\n let msg = JSON.parse(message.data);\n if (!msg.event) throw \"Invalid message format: \" + msg;\n\n switch (msg.event) {\n case 'startApp':\n console.log('Application launched')\n this.viewHandler.onStartApplication();\n break;\n\n case 'appDisconnected':\n console.log('app disconnected');\n\n GlobalVars.reset();\n this.reset();\n break;\n\n case 'bodyJoints':\n this.eventsHandler.onReceiveBodyJoints(msg);\n break;\n }\n }", "_onListening() {\n /* Called after socket.bind */\n let address = this.socket.address()\n log.info(`server listening ${address.address}:${address.port}`)\n }", "onCandleDataEvent(fn) {\n\n this.eventEmitter.on(settings.socket.candleDataEvent, (data) => {\n\n fn(data);\n\n });\n }", "handleEvents(){\n this.io.on('connection', (socket) => {\n this.handleJoinEvent(socket);\n this.handleLeaveEvent(socket);\n this.handleSendMsgEvent(socket);\n this.handleAddNotificationEvent(socket);\n });\n }", "initSocketEvents() {\n const { socketReducer } = this.props;\n const { socket } = socketReducer;\n\n socket.on('PUT/api/v1/contacts/:contactId/', (payload) => {\n const contactId = this.props.match.params.contactId;\n\n // We'll directory dispatch the event here instead of calling\n // this.getContact, since this.getContact has other checks which we\n // won't be able to pass using sockets\n if (payload.contactId.toString() === contactId.toString()) {\n this.context.store.dispatch(getContact(contactId));\n }\n });\n }", "_BindPeer( peerSocket )\n {\n\n peerSocket.BindEvent( \"open\", this.Open.bind(this) );\n peerSocket.BindEvent( \"close\", this.Close.bind(this) );\n peerSocket.BindEvent( \"error\", this.Error.bind(this) );\n peerSocket.BindEvent( \"message\", this.Message.bind(this) );\n\n }", "onTick() {\n super.onTick();\n this.socket.send(\n {\n points: this.state.count_ups,\n party_member: this.props.application_store.current_member,\n }\n );\n }", "function newConnection(socket) {\n console.log('Connnected: ' + socket.id);\n player_id.push(socket.id);\n players++;\n //function if this socket ever disconnects\n socket.on(\"disconnect\", (reason) => {\n\n console.log(reason);\n Disconnect(socket);\n\n });\n socket.emit('number_of_players', player_id);\n socket.broadcast.emit('updated_player_length', player_id);\n socket.on('player_data', playerdata);\n socket.on('shoot', Shoot);\n socket.on('Player_got_hit',PlayerHit);\n socket.on('i_hit_someone', hit)\n socket.on('increase_kill_count', increaseKillCount);\n\n function Shoot(shoot_data) {\n socket.broadcast.emit('shoot', shoot_data);\n //console.log(shoot_data);\n }\n\n function playerdata(all_data) {\n socket.broadcast.emit('player_data', all_data);\n //console.log(all_data);\n }\n\n function PlayerHit(hit_data){\n socket.broadcast.emit('someone_got_hit',hit_data);\n }\n\n function increaseKillCount(pid) {\n socket.to(pid).emit('kills_badhao_mera');\n }\n\n function hit(hit_data) {\n //console.log(hit_data[0])\n socket.broadcast.emit('someone_hit_me',hit_data);\n }\n}", "function SandboxSocketOpen()\n{\n ws.onmessage = SandboxSocketMessageHandler;\n}", "function wssPriceFeed(){\n\tlet socket = new WebSocket(process.env.PRICES_URL);\n\tsocket.onclose = () => { setTimeout(() => { wssPriceFeed() }, 2000); };\n\tsocket.onerror = () => { socket.close(); };\n\tsocket.onmessage = async (msg) => {\n\t\tconst p = JSON.parse(msg.data);\n\t\tif(p.closes === undefined) return;\n\t\t\n\t\tprices = p.closes;\n\n\t}\n\n}", "function newConnection(socket) {\n\tconsole.log('New Connection: ' + socket.id);\n\tconsole.log(io.engine.clientsCount);\n\t//console.log(socket); // A lot of information written to console\n\n\t// Receives Data From Client\n\tsocket.on('ball', ballMessage); \n\t// Log and Emit data\n\tfunction ballMessage(data) {\n\t\tsocket.broadcast.emit('ball', data);\n\t\t//console.log(data);\n\t}\n\t// trigger mouseMessage function from 'mouse'\n\t//function mouseMessage() { console.log(data); }\n\t// socket.broadcast.emit('mouse', data);\n}", "function callbackFunctionToCallWhenNewClientHasArrived(socket) { \n socket.write(JSON.stringify(auditor.getArrayMusicians()));\n socket.end();\n\n}", "async handlePeerEvent() {\n try {\n this\n .peer\n .on('signal', (data) => this.onSignal(data))\n .on('connect', () => this.emit('connect', this.peer))\n .on('data', (data) => this.emit(data.type, data))\n .on('error', (error) => {\n this.peer.error = true\n\n this.emit('error', error)\n })\n\n // .on('data', (data) => this.emit('data', data))\n // .on('stream', (stream) => this.emit('stream', stream))\n } catch (error) {\n this.emit('error', error)\n }\n }", "_handleChannel(channel) {\n const emitter = this._eventEmitter;\n\n channel.onopen = () => {\n logger.info(`${this._mode} channel opened`); // Code sample for sending string and/or binary data.\n // Sends string message to the bridge:\n // channel.send(\"Hello bridge!\");\n // Sends 12 bytes binary message to the bridge:\n // channel.send(new ArrayBuffer(12));\n\n emitter.emit(_service_RTC_RTCEvents__WEBPACK_IMPORTED_MODULE_1___default.a.DATA_CHANNEL_OPEN);\n };\n\n channel.onerror = event => {\n // WS error events contain no information about the failure (this is available in the onclose event) and\n // the event references the WS object itself, which causes hangs on mobile.\n if (this._mode !== 'websocket') {\n logger.error(`Channel error: ${event.message}`);\n }\n };\n\n channel.onmessage = ({\n data\n }) => {\n // JSON object.\n let obj;\n\n try {\n obj = JSON.parse(data);\n } catch (error) {\n _util_GlobalOnErrorHandler__WEBPACK_IMPORTED_MODULE_4___default.a.callErrorHandler(error);\n logger.error('Failed to parse channel message as JSON: ', data, error);\n return;\n }\n\n const colibriClass = obj.colibriClass;\n\n switch (colibriClass) {\n case 'DominantSpeakerEndpointChangeEvent':\n {\n // Endpoint ID from the Videobridge.\n const dominantSpeakerEndpoint = obj.dominantSpeakerEndpoint;\n logger.info('Channel new dominant speaker event: ', dominantSpeakerEndpoint);\n emitter.emit(_service_RTC_RTCEvents__WEBPACK_IMPORTED_MODULE_1___default.a.DOMINANT_SPEAKER_CHANGED, dominantSpeakerEndpoint);\n break;\n }\n\n case 'EndpointConnectivityStatusChangeEvent':\n {\n const endpoint = obj.endpoint;\n const isActive = obj.active === 'true';\n logger.info(`Endpoint connection status changed: ${endpoint} active ? ${isActive}`);\n emitter.emit(_service_RTC_RTCEvents__WEBPACK_IMPORTED_MODULE_1___default.a.ENDPOINT_CONN_STATUS_CHANGED, endpoint, isActive);\n break;\n }\n\n case 'EndpointMessage':\n {\n emitter.emit(_service_RTC_RTCEvents__WEBPACK_IMPORTED_MODULE_1___default.a.ENDPOINT_MESSAGE_RECEIVED, obj.from, obj.msgPayload);\n break;\n }\n\n case 'LastNEndpointsChangeEvent':\n {\n // The new/latest list of last-n endpoint IDs.\n const lastNEndpoints = obj.lastNEndpoints;\n logger.info('Channel new last-n event: ', lastNEndpoints, obj);\n emitter.emit(_service_RTC_RTCEvents__WEBPACK_IMPORTED_MODULE_1___default.a.LASTN_ENDPOINT_CHANGED, lastNEndpoints, obj);\n break;\n }\n\n case 'SelectedUpdateEvent':\n {\n const isSelected = obj.isSelected;\n logger.info(`SelectedUpdateEvent isSelected? ${isSelected}`);\n emitter.emit(_service_RTC_RTCEvents__WEBPACK_IMPORTED_MODULE_1___default.a.IS_SELECTED_CHANGED, isSelected);\n break;\n }\n\n default:\n {\n logger.debug('Channel JSON-formatted message: ', obj); // The received message appears to be appropriately formatted\n // (i.e. is a JSON object which assigns a value to the\n // mandatory property colibriClass) so don't just swallow it,\n // expose it to public consumption.\n\n emitter.emit(`rtc.datachannel.${colibriClass}`, obj);\n }\n }\n };\n\n channel.onclose = event => {\n logger.info(`Channel closed by ${this._closedFromClient ? 'client' : 'server'}`);\n\n if (this._mode === 'websocket') {\n if (!this._closedFromClient) {\n logger.error(`Channel closed: ${event.code} ${event.reason}`);\n\n this._retryWebSocketConnection(event);\n }\n } // Remove the channel.\n\n\n this._channel = null;\n }; // Store the channel.\n\n\n this._channel = channel;\n }", "handleSocketMessage(event) {\n console.log(event);\n //let response = JSON.parse(event.data);\n //console.log(response.type);\n\n //this.emit(response.type, response.value);\n }", "setHostSocketAndNotify(socket) {\n this.hostSocket = socket;\n this.hostSocket.emit('playerBecomeHost', {});\n }", "function handleOpen() {\n $log.info('Web socket open - ', url);\n vs && vs.hide();\n\n if (fs.debugOn('txrx')) {\n $log.debug('Sending ' + pendingEvents.length + ' pending event(s)...');\n }\n pendingEvents.forEach(function (ev) {\n _send(ev);\n });\n pendingEvents = [];\n\n connectRetries = 0;\n wsUp = true;\n informListeners(host, url);\n }", "function recv_join(message) {\n print_msg(\"[12][Push] add listener...\");\n Subscribe(['push', 'publish']);\n Subscribe(hickey.subscribe);\n //self.syncChange(hickey.subscribe);\n\n\n //right now, push connect is successful, then display devices on main panel.\n _connected = true;\n\n if (hickey.handler.device_list != null) {\n hickey.handler.device_list(_deviceList);\n }\n\n print_msg(\"[13][Push] now main panel can show device list...\");\n\n //inform client that there are some old data on server, get it by data\n if (message.length > 0) {\n getHistoryData(message);\n }\n\n //if join success\n sync_control();\n }", "setupDataHandlers() {\n this.dc.onmessage = (e) => {\n var msg = JSON.parse(e.data);\n console.log(\"received message over data channel:\" + msg);\n };\n this.dc.onclose = () => {\n this.remoteStream.getVideoTracks()[0].stop();\n console.log(\"The Data Channel is Closed\");\n };\n }", "processData(socket, data) {\n\n rideProcess.listen(socket, data);\n\n\n }", "SOCKET_ONMESSAGE (state, message) {\n // console.log(message)\n state.socket.message = message\n }", "function setupDataChannel() {\n\t\tcheckDataChannelState();\n\t\tdataChannel.onopen = checkDataChannelState;\n\t\tdataChannel.onclose = checkDataChannelState;\n\t\tdataChannel.onmessage = Reversi.remoteMessage;\n\t}", "function setup_log_listing(socket) {\n socket.on('update_log', log_data => {\n update_log(log_data);\n });\n}", "connectedCallback(){\n this._root = this.attachShadow({mode: 'open'});\n\n let sheet = utils.CSSToStyleSheet('./css/02-organisms/chart-module.css');\n this.adoptedStyleSheets = [sheet];\n this._root.adoptedStyleSheets = [sheet];\n\n let header = document.createElement(\"chart-header\");\n this.chartItem = document.createElement(\"chart-item\");\n this._root.appendChild(header);\n this._root.appendChild(this.chartItem);\n \n this.request = new XMLHttpRequest();\n this.covidData = {};\n covidTrack.connectToCovidTracking(this.onCovidDataLoad.bind(this), this.request);\n\n this._root.addEventListener(\"remove-chart-click\", e => this.onRemoveChart(e));\n this._root.addEventListener(\"menu-form-submit\", e => this.onMenuFormSubmit(e));\n }", "function clickGold() {\n socket.emit(\"clickGold\");\n}", "async registerEvents() {\n xtsMarketDataWS.onConnect((connectData) => {\n console.log(connectData, \"connectData\");\n });\n\n xtsMarketDataWS.onJoined((joinedData) => {\n console.log(joinedData, \"joinedData\");\n });\n\n xtsMarketDataWS.onMarketDepthEvent((marketDepthData) => {\n console.log(marketDepthData, \"marketDepthData\");\n });\n\n xtsMarketDataWS.onError((errorData) => {\n console.log(errorData, \"errorData\");\n });\n\n xtsMarketDataWS.onDisconnect((disconnectData) => {\n console.log(disconnectData, \"disconnectData\");\n });\n\n xtsMarketDataWS.onLogout((logoutData) => {\n console.log(logoutData, \"logoutData\");\n });\n }", "createChannel() {\n\t\t// Set the depends - add self aggs query as well with depends\n\t\tlet depends = this.props.depends ? this.props.depends : {};\n\t\tdepends['aggs'] = {\n\t\t\tkey: this.props.inputData,\n\t\t\tsort: this.props.sort,\n\t\t\tsize: this.props.size\n\t\t};\n\t\t// create a channel and listen the changes\n\t\tvar channelObj = manager.create(depends);\n\t\tchannelObj.emitter.addListener(channelObj.channelId, function(res) {\n\t\t\tlet data = res.data;\n\t\t\tlet rawData;\n\t\t\tif(res.method === 'stream') {\n\t\t\t\trawData = this.state.rawData;\n\t\t\t\trawData.hits.hits.push(res.data);\n\t\t\t} else if(res.method === 'historic') {\n\t\t\t\trawData = data;\n\t\t\t}\n\t\t\tthis.setState({\n\t\t\t\trawData: rawData\n\t\t\t});\n\t\t\tthis.setData(rawData);\n\t\t}.bind(this));\n\t}", "function init() {\n console.log(\"init\")\n\n socketStuffs();\n\n // when mouse moves\n document.addEventListener('mousemove', sendPos);\n function sendPos(e) {\n // store psotion of my mouse\n var mousePos = {\n x: e.clientX,\n y: e.clientY\n }\n socket.emit('sendingMousePos', mousePos);\n }\n}", "function onOpen(evt) {\n\tconsole.log(\"opened\")\n\t$(\"#disconnected-ws\").css(\"display\", \"none\");\n doSend('{\"client\":\"web\",\"realtimedata\":' + receive_winddata + '}');\n try {\n getChartOfToday();\n } catch (e) {}\n}", "send(eventName, ...args) {\n this.socket.emit(eventName, ...args);\n }", "setupWebSocket() {\n\n let self = this;\n let filterImsi = self._nconf.get(\"udpRelayService:filterImsi\");\n self.socket.on('connect', function () {\n console.log(\"Connected to NB-IoT relay service\");\n });\n self.socket.on('message', function (data) {\n data.msgStr = new Buffer(data.data, 'base64').toString(\"ascii\");\n data.msgJSON = safelyParseJSON(data.msgStr) || {};\n\n // if set in the config.jsom the messages are filtered bei an imsi\n if (filterImsi === '' || filterImsi === data.imsi) {\n log.L2(dl, '########################');\n log.L2(dl, 'Received from: ' + data.imsi);\n log.L2(dl, \"Reveiced at: \" + data.timestamp);\n log.L2(dl, \"Direction: \" + data.direction);\n log.L2(dl, \"Message_raw: \" + data.msgStr);\n log.L2(dl, \"Message_json: \" + JSON.stringify(data.msgJSON, null, 4));\n log.L2(dl, '########################\\n\\n\\n');\n\n self.emit('jsonData', data);\n }\n });\n\n self.socket.on('disconnect', function () {\n log.L1(dl,\"Disconnected from NB-IoT relay service\");\n });\n\n self.socket.on('error', (error) => {\n log.Err(dl, error);\n });\n\n }", "function onConnect(socket) {\n // When the client emits 'info', this listens and executes\n socket.on('info', data => {\n socket.log(JSON.stringify(data, null, 2));\n });\n socket.on('sendSocket', function(data){\n console.log('sendSocket')\n data.socket=socket.id\n User.findOne({name:data.name},function(err,user){\n user.socket=data.socket;\n user.save();\n })\n })\n\n socket.on('sendSocketQQ', function(data){\n data.socket=socket.id\n User.findOne({name:data.name},function(err,user){\n user.socket=data.socket;\n user.save();\n //QQArtist.createAsync(data)\n QqSystem.QQNewArtist(data)\n })\n });\n\n // Insert sockets below\n require('../api/regularrequest/regularrequest.socket').register(socket);\n //require('../api/privaterequest/privaterequest.socket').register(socket);\n //require('../api/publicrequest/publicrequest.socket').register(socket);\n require('../api/currentrequest/currentrequest.socket').register(socket);\n //require('../api/qqartist/qqartist.socket').register(socket);\n //require('../api/qqrequest/qqrequest.socket').register(socket);\n require('../api/thing/thing.socket').register(socket);\n\n}", "connect() {\n return super.connect().then(() => {\n this.socket.on('disconnect', () => {\n document.body.classList.add('disconnected');\n document.body.classList.remove('gameActive');\n });\n\n this.socket.on('metaDataUpdate', (e) => {\n this.gameEngine.metaData = e;\n this.renderer.onMetaDataUpdate();\n });\n });\n }", "function createFeature() {\n socket.emit('message', 'Sent an event from the client!');\n createBubble(\"Creating Feature File\");\n}", "listen(){\n this.namespace.on('connection', (socket)=>{\n socket.on('teacher start exit', (teacherSocketId, quiz) => {\n this.handleStartQuiz(teacherSocketId, quiz);\n });\n\n socket.on('student submit exit', (sessionId, firstname, answersInfo) =>{\n console.log(\"Student\" + firstname);\n console.log(\"Student responded \" + answersInfo);\n this.handleSubmitExit(sessionId,firstname,answersInfo);\n\n })\n });\n }", "_constructSocketListeners () {\n /* Handles our open event */\n this._ws.addEventListener('open', evt => {\n setInterval(() => {\n this._sendArray([{ m: '+ls' }])\n }, this._roomScanMS)\n this._isConnected = true\n this._sendArray([{ m: 'hi' }])\n this._heartbeatInterval = setInterval(() => {\n this._sendArray([{ m: 't', e: Date.now() }])\n }, this._heartbeatMS)\n this.emit('connected')\n this.setChannel('lobby')\n this._noteFlushInterval = setInterval(() => {\n if (this._noteBufferTime && this._noteBuffer.length > 0) {\n this._sendArray([{ m: 'n', t: this._noteBufferTime + this._serverTimeOffset, n: this._noteBuffer }])\n this._noteBufferTime = 0\n this._noteBuffer = []\n }\n }, this._noteFlushIntervalMS)\n })\n\n /* Handles our close event */\n this._ws.addEventListener('close', evt => {\n clearInterval(this._heartbeatInterval)\n clearInterval(this._noteFlushInterval)\n if (!this.hasErrored) this.emit('disconnected')\n })\n\n /* Handles our errors */\n this._ws.addEventListener('error', error => {\n if (error.message === 'WebSocket was closed before the connection was established') return\n this.emit('error', new Error(error))\n this._ws.close()\n })\n\n /* Handles generic messages */\n this._ws.addEventListener('message', evt => {\n if (typeof evt.data !== 'string') return\n try {\n const transmission = JSON.parse(evt.data)\n for (var i = 0; i < transmission.length; i++) {\n var msg = transmission[i]\n if (msg.m === 'hi') {\n this._recieveServerTime(msg.t, msg.e || undefined)\n }\n if (msg.m === 't') {\n this._recieveServerTime(msg.t, msg.e || undefined)\n }\n if (msg.m === 'a') {\n this.emit('message', {\n content: msg.a,\n user: {\n id: msg.p.id,\n name: msg.p.name,\n color: msg.p.color\n },\n time: msg.t\n })\n }\n if (msg.m === 'ch') {\n this.room.name = msg.ch._id\n this._channelHasJoined = true\n if (this.room.users.length !== 0) return\n msg.ppl.forEach(person => {\n this.room.users.push({\n id: person.id,\n name: person.name,\n color: person.color\n })\n })\n }\n if (msg.m === 'p') {\n const formattedUser = {\n id: msg.id,\n name: msg.name,\n color: msg.color\n }\n this.emit('userJoined', formattedUser)\n this.room.users.push(formattedUser)\n }\n if (msg.m === 'bye') {\n const user = this.room.users.filter(e => e.id === msg.p)[0]\n this.room.users = this.room.users.filter(e => e.id !== msg.p)\n this.emit('userLeave', user)\n }\n if (msg.m === 'ls') {\n this.rooms = []\n msg.u.forEach(room => {\n this.rooms.push({\n name: room._id,\n count: room.count\n })\n })\n this._sendArray([{ m: '-ls' }])\n }\n if (msg.m === 'n') {\n this.emit('notePress', {\n note: msg.n,\n user: msg.p\n })\n }\n }\n } catch (error) {\n this.emit('error', error)\n }\n })\n }", "connectedCallback() {\n \n }" ]
[ "0.58833224", "0.5867788", "0.5721929", "0.5710225", "0.56489605", "0.5592588", "0.5587047", "0.5574208", "0.5541309", "0.55411273", "0.5540741", "0.55172706", "0.5493239", "0.54896414", "0.54725903", "0.5457013", "0.54412794", "0.544021", "0.54390174", "0.54366565", "0.54355633", "0.5431304", "0.54198194", "0.5417402", "0.54168564", "0.5411746", "0.53971255", "0.53910035", "0.5366894", "0.53662384", "0.53598666", "0.5357533", "0.5354522", "0.5335939", "0.5330853", "0.5327464", "0.5324625", "0.53061134", "0.529655", "0.5291626", "0.528714", "0.5286713", "0.5275034", "0.5270069", "0.52668095", "0.5258611", "0.5258369", "0.5258369", "0.5258369", "0.5253967", "0.5244135", "0.5229978", "0.5228662", "0.5226251", "0.5225266", "0.52182585", "0.5215503", "0.5211207", "0.5211147", "0.5210608", "0.5210608", "0.52043486", "0.52004844", "0.51998746", "0.51968926", "0.51948786", "0.51947933", "0.5185154", "0.51827526", "0.51798713", "0.5178429", "0.51769876", "0.5176342", "0.517585", "0.5173071", "0.5171126", "0.5168376", "0.51655906", "0.5162155", "0.51617324", "0.51593786", "0.51587534", "0.5157398", "0.5156017", "0.5153013", "0.51474655", "0.514424", "0.51352787", "0.5135227", "0.51330835", "0.5123303", "0.51204556", "0.5120232", "0.51199985", "0.51170546", "0.51146317", "0.51142496", "0.5107567", "0.51068294", "0.5106606", "0.5106374" ]
0.0
-1
Funzione per creazione oggetto di info addizionali nel array additional info
get_add_infos(movie, five_actors){ let new_id = movie.id; let new_genres = this.get_genres(movie.genre_ids); let new_actors = five_actors let add_info_obj ={ id: new_id, genres: new_genres, main_actors: new_actors }; return add_info_obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createInfo (typeOfContent, title, header, content){\n var id = ((app.info.length) + 1) *4;\n var item ={};\n item.id = id;\n item.title = title;\n item.header = header;\n item.content = content;\n item.typeOfContent = typeOfContent;\n console.log(item, \"new itmeeeee\");\n app.info.push(item);\n return item;\n}", "function add(info) {\n for (let i of info) {\n let p = makePerson(i[0], i[1], i[2], i[3]);\n people.push(p);\n }\n }", "function setExtraInfo(){}", "function addAntInfo(numId,flag){\n if(flag!=0){\n var antId=\"id\"+numId;\n var panel1_line_add=$(\".panel1-line\").eq(2).clone();\n $(\".panel1\").append(panel1_line_add);\n ant={id:antId,speed:1,dirt:2,distX:1,pos:ant_postfix};\n ants[antId]=ant;\n }\n else{\n var antId=\"id\"+numId;\n ant={id:antId,speed:1,dirt:2,distX:1,pos:0};\n ants[antId]=ant;\n }\n }", "function saveContactInfo(name, nilai1, nilai2, nilai3, nilai4, message) {\n let newContactInfo = contactInfo.push();\n\n newContactInfo.set({\n name: name,\n nilai1: nilai1,\n nilai2: nilai2,\n nilai3: nilai3,\n nilai4: nilai4,\n message: message,\n });\n}", "function informacionPokemones(datos){\n const objetoInformacion = {\n nombre: datos.name,\n url_imagen : datos.sprites.other.dream_world.front_default,\n id_pokemon : datos.id\n }\n\n pokemonesData.push(objetoInformacion);\n}", "addExtraInfoElement(info, node, withContainer = false) {\n // Don't create if there's nothing to show\n if (info.length == 0) return;\n\n let container;\n if (withContainer) {\n container = document.createElement('div');\n container.classList.add('TWPT-extrainfo-container');\n } else {\n container = node;\n }\n\n let tooltips = [];\n\n for (const i of info) {\n let chip = document.createElement('material-chip');\n chip.classList.add('TWPT-extrainfo-chip');\n\n let chipCont = document.createElement('div');\n chipCont.classList.add('TWPT-chip-content-container');\n\n let content = document.createElement('div');\n content.classList.add('TWPT-content');\n\n const [badge, badgeTooltip] = createExtBadge();\n\n let span = document.createElement('span');\n span.append(i);\n\n content.append(badge, span);\n chipCont.append(content);\n chip.append(chipCont);\n container.append(chip);\n\n tooltips.push(badgeTooltip);\n }\n\n if (withContainer) node.append(container);\n\n for (const tooltip of tooltips) new MDCTooltip(tooltip);\n }", "function addImageInfo(file, info) {\r\n object.push({\r\n file: file,\r\n info: info\r\n })\r\n fs.readFileSync('weaponList.json');\r\n fs.writeFileSync('weaponList.json', JSON.stringify(object, null, 4));\r\n}", "function createStepsInfo(stepsArray) {\n\tvar stepObj = [];\n\tstepsArray.forEach(function(step){\n\t\tstepObj = [];\n\t\tvar action = step[\"action\"];\n\t\tvar id = step[\"id\"];\n\t\t\n\t\tidArray.push(id);\n\t\tif (action.type == \"closeScenario\") {\n\t stepObj.push(\"closeScenario\")\n\t \n\t\t} else if (action.type == \"tip\") {\n\t\t\tstepObj.push(\"tip\")\n\t\t\t selector = action[\"selector\"]\n\t\t\t contents = action[\"contents\"];\n\t\t\t content = contents[\"#content\"];\n\t\t\t placement = action[\"placement\"];\n\t\t\t stepObj.push(selector);\n\t\t\t stepObj.push(content);\n\t\t\t stepObj.push(placement);\n\t\t}\n\t\t//stepsInfo.push(stepObj);\n\t\tstepsInfo[id] = stepObj ;\n\t\t\n\t})\n\n\n}", "function makeArray(info) {\n let contactArray = {name: inputn, phone: inputp, email: inpute}\n return contactArray\n}", "function agregarTipo(arrayTipos){\n var indice = arrayTipos.length;\n var nuevoTipo = {\n \"id\": indice,\n \"nombre\": \"todos\"\n }\n arrayTipos.push(nuevoTipo);\n }", "function agregarTipo(arrayTipos){\n var indice = arrayTipos.length;\n var nuevoTipo = {\n \"id\": indice,\n \"nombre\": \"todos\"\n }\n arrayTipos.push(nuevoTipo);\n }", "createDeliveryMethodArray(array) {\n const deliveryMethods = [];\n array.map((item) => {\n deliveryMethods.push({\n label: `${item.name} : ${item.deliveryCost.formattedValue}`,\n value: item.code,\n // deliveryDetails: item.description,\n });\n });\n return deliveryMethods;\n }", "function costruttoreDatiVenditori(array) {\n var objIntermedio = {};\n var labelsPC = [];\n var dataPC = [];\n for (var i = 0; i < array.length; i++) {\n var oggettoSingolo = array[i];\n var venditore = oggettoSingolo.salesman;\n if (objIntermedio[venditore] === undefined) {\n objIntermedio[venditore] = 0;\n }\n objIntermedio[venditore] += parseInt(oggettoSingolo.amount);\n }\n for (var key in objIntermedio) {\n labelsPC.push(key);\n dataPC.push(objIntermedio[key]);\n }\n return {\n data: dataPC,\n labels: labelsPC\n }\n}", "function PlayerInfo(){\n var infos = ['NOM : ', 'PV : ', 'MP : ', 'OR : '];\n var infos_nbr = [classe_perso.nom, classe_perso.pv, classe_perso.mp, classe_perso.or];\n for (i = 0; i< infos.length; i++){\n $(\"#div_infos\").append(`<p class=\"p-div-infos\"> ${infos[i]} ${infos_nbr[i]} </p>`);\n }\n}", "createDeliveryMethodArray() {\n this.shippingMethodDetails.deliveryModes.map((item) => {\n let label = '';\n if (this.globals.siteConfig.showDeliveryCost) {\n label = `${item.name} : ${item.deliveryCost.formattedValue}`;\n } else {\n label = item.name;\n }\n this.deliveryMethods.push({\n label,\n value: item.code,\n // deliveryDetails: item.description,\n name: item.name,\n cost: item.deliveryCost.formattedValue,\n });\n });\n this.dataLoaded = true;\n }", "function extraParams(templateInfo, params) {\n /** Todo: Switch */\n if (templateInfo.template_code == \"F1_116\") {\n\n params.otherPartyContactid = [];\n params.otherPartyContacttype = [];\n _.forEach(templateInfo.multiselectcontactid, function (currentItem, index) {\n params.otherPartyContactid.push(parseInt(currentItem.contactid));\n params.otherPartyContacttype.push(currentItem.contact_type);\n });\n }\n return params;\n }", "function addTaxonData(taxonName, field, idx, tP) { //console.log(\"addTaxonData called. taxonName = \", taxonName);\n if (taxonName in tP.taxaObjs) { fillInAnyNewData(taxonName, field, idx, tP);\n } else { buildTaxonObj(taxonName, field, idx, tP); }\n }", "function pushInfo(cb){\n datesArr.push(day);\n countsArr.push(count);\n cb();\n }", "function build_extra(adhoc_data_obj, contents){\n\t\tif (extra_container != null) {\n\t\t\tif (adhoc_data_obj != null) {\n\t\t\t\t_build_section(adhoc_data_obj, contents, null, \"extra\");\n\t\t\t}\n\t\t}\n\t}", "function fInitgArStateInfo() {\n var i=0, j=0, sStateName=\"\", iNumberOfStates=0;\n var iMaxLength=0, iLength=0;\n var oldNumber=0;\n \n for (i=0;i<gLngNumberCountries;i++) {\n // i is selected country\n iNumberOfStates=aStates[i].split(\"|\").length+1;\n gLngNumberStates=gLngNumberStates+iNumberOfStates;\n gArStateInfo[i]=new Array(iNumberOfStates);\n iMaxLength=0;\n \n // Add the additional information\n for (j=0;j<iNumberOfStates;j++) {\n if (iLength>iMaxLength) {\n iMaxLength=iLength;\n gArStateInfo[i][j][0]=sStateName;\n }\n }\n gArCountryInfo[i][3]=parseInt(iMaxLength);\n }\n return;\n}", "addNote(info) {\n const { title, text } = info;\n const newNote = { title, text, id: uuid() };\n return this.getInfo()\n .then ((info) => [...info, newNote])\n .then((updateInfo)=> this.write(updateInfo))\n .then(() => newNote);\n }", "function insertTypes(tipos) {\n for (var i = 0, n = tipos.length; i < n; i++) {\n\n var propriedades = [];\n\n // inserir propriedades com base no tipo de componente\n switch (tipos[i]['nome'].toLowerCase()) {\n case 'amp':\n propriedades.push({nome: 'atenuador', label: 'Atenuador', tipo: 'number', unidades: 'dB'});\n propriedades.push({nome: 'atenuador1', label: 'Atenuador 1', tipo: 'number', unidades: 'dB'});\n propriedades.push({nome: 'atenuador2', label: 'Atenuador 2', tipo: 'number', unidades: 'dB'});\n propriedades.push({nome: 'equalizador', label: 'Equalizador', tipo: 'number', unidades: 'dB'});\n propriedades.push({nome: 'ganho', label: 'Ganho', tipo: 'number', unidades: 'dB'});\n propriedades.push({nome: 'ganho1', label: 'Ganho 1', tipo: 'number', unidades: 'dB'});\n propriedades.push({nome: 'ganho2', label: 'Ganho 2', tipo: 'number', unidades: 'dB'});\n propriedades.push({nome: 'nivelSaida', label: 'Nível de saída', tipo: 'number', unidades: 'dB µV'});\n propriedades.push({\n nome: 'nivelSaidaRetorno',\n label: 'Nível de saída de retorno',\n tipo: 'number',\n unidades: 'dB µV'\n });\n propriedades.push({nome: 'preAcentuador', label: 'Pré-acentuador', tipo: 'number', unidades: 'dB'});\n break;\n case 'ati':\n case 'cc':\n propriedades.push({nome: 'amplificacao', label: 'Amplificação', tipo: 'number', unidades: 'dB'});\n propriedades.push({nome: 'nivelSinal', label: 'Nível de sinal', tipo: 'number', unidades: 'dB µV'});\n break;\n case 'derivador':\n propriedades.push({\n nome: 'atenuacaoDerivacao',\n label: 'Atenuação de derivação',\n tipo: 'number',\n unidades: 'dB'\n });\n propriedades.push({\n nome: 'atenuacaoInsercao',\n label: 'Atenuação de inserção',\n tipo: 'number',\n unidades: 'dB'\n });\n break;\n }\n\n tiposComponente.push({\n default: null,\n description: tipos[i]['descricao'],\n hidden: (vertical && tipos[i]['esconderVertical']) || (!vertical && tipos[i]['esconderHorizontal']),\n id: tipos[i]['id'],\n name: tipos[i]['nome'],\n properties: propriedades,\n svg: tipos[i]['svg']\n });\n }\n\n buildDraggables();\n}", "addUlExampleItem() {\r\n const fileMetaInfoGroupLengthTag = ['0x02', '0x00', '0x00', '0x00'];\r\n const length = ['0x04', '0x00', '0x00', '0x00'];\r\n const item = ['0x04', '0x00', '0x00', '0x00'];\r\n\r\n this.itemArray = this.itemArray.concat(fileMetaInfoGroupLengthTag);\r\n this.itemArray = this.itemArray.concat(length);\r\n this.itemArray = this.itemArray.concat(item);\r\n\r\n }", "function inicializarArrayResultados() {\r\n for(var i=1;i<=totalPreguntas;i++) {\r\n resultadoEncuesta[\"p\"+i+\"-alt\"]=[0,0,0,0];\r\n }\r\n}", "function create_infos(r) {\n p = {};\n p.bib = r.value && r.value.bib;\n p.lap = r.value && r.value.lap;\n p.ts = r.key[1];\n p.time_hour = time_to_hour_string(p.ts);\n\n p.nom = r.infos && r.infos.nom;\n p.prenom = r.infos && r.infos.prenom;\n p.course = r.infos && r.infos.course;\n\n return p;\n }", "function AddData() {\n var i;\n for (i = 0; i < app.entries.length; i++) {\n myEmotionalData.push(app.entries[i].slider);\n myDateData.push(app.entries[i].date);\n }\n}", "function organizeData(newArray, macro) {\n for (let i = 0; i < json.length; i++) newArray.push({\n label: json[i][\"name\"],\n y: json[i][macro]\n });\n console.log(newArray);\n }", "function nuovoMembro(){\n// la funzione prende i valori e ci crea un oggetto\nconst nuovoMembro =\n{\nimmagine : document.getElementById(\"image\").value,\nnome : document.getElementById(\"name\").value,\nruolo : document.getElementById(\"role\").value\n};\n\n//Pushiamo l'oggetto nell'array membri\nmembri.push(nuovoMembro)\n\n//inception di funzione printatrice\nprintatrice(nuovoMembro)\n}", "_updateInfo(quadrant, info) {\n info.hasSupernova = quadrant.hasSupernova;\n info.klingons = quadrant.container.getCountOfGameObjects(AbstractKlingon);\n info.bases = quadrant.container.getCountOfGameObjects(StarBase);\n info.stars = quadrant.container.getCountOfGameObjects(Star);\n info.scanned = true;\n }", "function pullInfo(){\n for(var i = 0 ; i < imageObjects.length; i++){\n lablesArr.push(imageObjects[i].alt);\n clicksArr.push(imageObjects[i].clicks);\n looksArr.push(imageObjects[i].looks);\n }\n}", "function generObj(obj){\n //gener elArr new pos\n obj.i += gDirec.i;\n obj.j += gDirec.j;\n // insert obj to gArr\n gArr[obj.i][obj.j] = obj.type;;\n}", "function setInfoDA(data, idrowDA) {\n globalDAData = {\n idrow:idrowDA,\n id:data[0],\n bdc:data[1],\n emetteur:data[2],\n typedemande:data[3],\n codetypedemande:onSearchTypeDemandeWithLabel(data[3]),\n statut:data[4],\n nature:data[5],\n fournisseur:data[6],\n contactfournisseur:data[7],\n emailcontactfournisseur:data[8],\n telcontactfournisseur:data[9],\n buimputation:data[10],\n codeprojet:data[11],\n nomprojet:data[12],\n quantite:data[13],\n prixtjmachat:data[14],\n prixtjmvendu:data[15],\n marge:data[16],\n collaborateur:data[17],\n datedebutlivraison:data[18],\n datefinlivraison:data[19],\n adresselivraison:data[20],\n conditionreglement:data[21],\n managerBU:GetManagerBU(data[10]),\n managerEntrepriseParis:GetManagerBU(BU_ENTREPRISE_PARIS),\n acteurComptaFournisseur:GetManagerBU(BU_COMPTA_FOURNISSEUR),\n managerDirectionFinanciere:GetManagerBU(BU_DIRECTION_FINANCIERE),\n assistantes:GetManagerBU(BU_ASSISTANTE_ENTREPRISE_PARIS)\n };\n}", "function structureObjectData(array) \r\n {\r\n let newArray = array.map( item => ({symbol: item.symbol,name: item.name, id:item.iexId}));\r\n console.log(newArray);\r\n return newArray\r\n }", "function add_extra() {\n Personals.add_extra(vm.uid, {\n \"extra_client\": vm.new_extra.id,\n }).then(clntAddExtraSuccessFn, clntAddExtraErrorFn);\n function clntAddExtraSuccessFn(data, status, headers, config) {\n activate();\n }\n function clntAddExtraErrorFn(data, status, headers, config) {\n console.log(data);\n }\n }", "function addFields(){\n var fields=[\"id\",\"query2\", \"sameAs\"];\n \n var ftag='<input class=\"object\" type=\"text\" ondrop=\"drop(event)\" onndragover=\"allowDrop(event)\" size=\"50\" placeholder=\"..escribe o arrastra etiqueta..\"'\n \n \n for(var i in fields){\n $(\"#fieldsarea\").append('<label for=\"'+fields[i]+'\">'+id2json(fields[i])+' </label><br>')\n .append(ftag+\" id='\"+fields[i]+\"'>\")\n .append('<br>');\n }\n}", "function save(name, company, email, phone, message){\n let newInfo = info.push(); \n \n newInfo.set({\n name,\n company,\n email,\n phone,\n message\n })\n}", "get informations() {\n return this.pseudo + ' (' + this.classe + ') a ' + this.sante + ' points de vie et est au niveau ' + this.niveau + '.'\n }", "function CreateOtherData(ppl_object)\n{\n//name and title\n\tvar string=\"\";\n\tfor ( key in ppl_object)\n\t{\n\t\tstring+=\"<br> <b>\"+ ppl_object[key][\"title\"] + \": </b>\" +ppl_object[ key][\"name\"];\n\t}\n\treturn string;\n}", "function addToAdmin(newObject){\n var line = {};\n line.Brand = newObject.brand;\n line.skuCode = newObject.skuCode;\n var supplierCode = newObject.supplierCodeList; \n line.attribute = newObject.attribute;\n line.attributeCount = newObject.attributeCount;\n line.ohmies = newObject.ohmies;\n line.wholesale = newObject.wholesale;\n line.msrp = newObject.msrp;\n var supplierRow = searchString(supplierCode);\n addNewRows(\"ADMIN_INFO\", supplierRow, 1, line)\n \n}", "formatArray(arrayInfo) {\n // To store the final, desired string displaying all the author names\n let stringInfo = '';\n\n if (arrayInfo === undefined) {\n stringInfo = 'Unknown'\n } else if (arrayInfo.length === 1) {\n stringInfo = arrayInfo[0]\n } else if (arrayInfo.length === 2) {\n stringInfo = `${arrayInfo[0]} and ${arrayInfo[1]}`\n } else {\n for (let i=0; i<arrayInfo.length-1; i++) {\n stringInfo += `${arrayInfo[i]}, `;\n }\n stringInfo += `and ${arrayInfo[arrayInfo.length-1]}`\n }\n\n return stringInfo;\n }", "function addContactInfo() {\n if (_.isEmpty($scope.contactInfo)) {\n $scope.contactInfoCssClass = 'state-filling';\n }\n\n $scope.contactInfo.push({type: ContactInfoTypeEnum.PHONE, value: ''});\n }", "function ajouterMarker(superHero) {\n\n var marker = new google.maps.Marker({\n position: superHero.position,\n map: gmap,\n title: superHero.nom,\n icon : {\n url : superHero.icon,\n // size : new google.maps.Size(151, 171),\n origin\t: new google.maps.Point(0, 0),\n anchor\t: new google.maps.Point(17, 34),\n // scaledSize\t: new google.maps.Size(60, 160),\n labelOrigin : new google.maps.Point(33, 15)\n },\n label : {\n text : superHero.saved.toString(),\n\t color : 'black',\n\t fontSize\t: '11px'\n }\n\n\n });\n\n markers.push(marker);\n \n \n marker.addListener('click', function () {\n \n var content;\n \n content = document.createElement('div');\n \n var title = document.createElement('h3');\n title.style.paddingBottom = \"10px\";\n title.innerHTML = superHero.nom;\n \n var couv = document.createElement('img');\n couv.style.paddingBottom = \"10px\";\n couv.setAttribute(\"src\", superHero.couv);\n \n var description = document.createElement('p');\n description.style.textAlign = \"justify\";\n description.style.paddingBottom = \"10px\";\n description.innerHTML = superHero.content;\n \n var sauvetage = document.createElement('p');\n sauvetage.style.textAlign = \"justify\";\n sauvetage.innerHTML = \"<strong>Personnes sauvées : </strong>\"+superHero.saved;\n \n content.appendChild(title);\n content.appendChild(couv);\n content.appendChild(description);\n content.appendChild(sauvetage);\n \n\n infowindow.setContent(content);\n infowindow.open(gmap, marker);\n \n if(gmap.getZoom()== 17)\n {\n gmap.panTo(marker.getPosition());\n }\n else {\n gmap.setCenter(marker.getPosition());\n gmap.setZoom(17);\n }\n \n console.log(marker);\n \n \n \n \n });\n \n \n }", "function ajouter(Anew,Atype,Atexte,Aimage,Alien) {\r\n if (Anew<0) {\r\n \tnumpere+=Anew;\r\n \tif (numpere!=0) {\r\n \t Apere=oldpere[numpere];\r\n \t Alevel=level[Apere]+1;\r\n \t}\r\n \telse {\r\n \t Apere=0;numpere=0;Alevel=1;\r\n \t}\r\n }\r\n if (Anew==1) {\r\n\t Apere=0;numpere=0;Alevel=1;\r\n }\r\n type[nb]=Atype;\r\n level[nb]=Alevel;\r\n pere[nb]=Apere;\r\n status[nb]=0;\r\n texte[nb]=Atexte;\r\n image[nb]=Aimage;\r\n lien[nb]=Alien; \r\n if (Atype==1) {oldpere[numpere]=Apere;Apere=nb;numpere+=1;Alevel+=1;}\t\r\n nb+=1;\r\n}", "function buildToonArray()\n {\n toons.push(mickeyObj);\n toons.push(donaldObj);\n toons.push(goofyObj);\n toons.push(peteObj);\n }", "function tempAddPCInfo(components, satinAlinanAdet, pcID, tedarikciID, satinAlanID, callback) {\n const queryString = 'SELECT NOW() AS now'\n global.db.query(queryString, (err, result) => {\n let newArr = [];\n for (let i = 0; i < components.length; i++) {\n let temp = [];\n for (let j = 0; j < components[i].length; j++) {\n //this loop helps type casting operations of components array.\n if (j) {\n temp.push(parseInt(components[i][j]));\n } else {\n temp.push(components[i][j]);\n }\n }\n //here we attach pc information to its components.\n temp = temp.concat([tedarikciID, satinAlinanAdet, satinAlinanAdet, 0, pcID, result[0]['now'], satinAlanID]);\n newArr.push([...temp]);\n }\n callback(newArr);\n });\n}", "function objectBuildData(displayType, displayInLegend, dotType, arr_colors, arr_names, arr_datas, askJoint) {\n var data = [];\n //parcours du tableau de données pour chaque pays\n for (var i = 0; i < arr_datas.length; i++) {\n var objectData = {\n type : displayType,\n showInLegend : displayInLegend,\n name : arr_names[i],\n markerType : dotType,\n color : arr_colors[i],\n dataPoints: objectBuildDataPoints(arr_datas[i])\n };\n data.push(objectData);\n }\n //If the user wants to display Joint, let's return it else just delete the first elem which represents Joint data serie\n if (askJoint) {\n return data;\n } else {\n data.shift();\n return data;\n }\n}", "function _addDetail() {\n for (var i = 0; i < vm.items.length; i++) {\n vm.items[i].actions = [{\n label: vm.items[i].description\n }];\n vm.items[i].startsAt = new Date(vm.items[i].startsAt); //as per requirement of bootstrap calendar\n vm.items[i].endsAt = new Date(vm.items[i].endsAt); //as per requirement of bootstrap calendar\n }\n }", "function addAllMarkers(arr, pmap) {\n var _this = this;\n for (var i = 0; i < arr.length; i++) {\n var location = new google.maps.LatLng(arr[i].lat, arr[i].lng);\n var mm = new google.maps.Marker({\n map: pmap,\n position: location,\n label: { text: arr[i].name, color: \"#00ff00\", fontWeight: \"bold\" },// newly added\n title: arr[i].name,\n draggable: true\n });\n //this.bounds.extend(location);\n var addMarkers = [];\n var actualMarkers = [];\n\n mm.metadata = { type: \"marker\", id: addMarkers.length + 1 };\n var m = {\n };\n\n m.lat = location.lat();\n m.lng = location.lng();\n mm.id = m.id = addMarkers.length + 1;\n actualMarkers.push(mm);\n addMarkers.push(m);\n google.maps.event.addListener(mm, 'dragend', function (marker, b, c) {\n var _this = this;\n changeDesc(_this.metadata.id, marker.latLng.lat(), marker.latLng.lng());\n })\n console.log(addMarkers);\n\n\n }\n }", "addFieldValue() {\n this.add = this.add + 1;\n this.fieldArray.push(this.newAttribute);\n this.newAttribute = {};\n console.log(this.fieldArray);\n }", "function mapEmployees(id,nome,cognome,livello,salario){\n var impiegato ={\n id : id,\n name : nome,\n surname : cognome,\n level : livello,\n salary: salario\n }\n employee.push(impiegato);\n}", "function cariData(){\r\n var cariNim = prompt('Masukkan NIM: ')\r\n var nilai = prompt('Masukkan nilai: ')\r\n\r\n var index = array.findIndex(function(data){\r\n return data['nim'] == cariNim;\r\n })\r\n array[index]['grade'] = Grade(nilai)\r\n}", "getDetails(){\n return [ this.search,\n this.cost,\n this.state,\n this.children]\n }", "function myContractDetails(array){\n var cts = [];\n for(var i = 0, l = array.length; i < l; i++){\n cts.push(array[i]);\n cts[i].imServiceProv = cts[i].foreignIot.uid[0].id.toString() === $scope.uid.toString();\n cts[i].serviceAgreed = cts[i].foreignIot.termsAndConditions;\n cts[i].infrastructureAgreed = cts[i].iotOwner.termsAndConditions;\n cts[i].numberOfItems = cts[i].iotOwner.items.length;\n }\n return cts;\n }", "tvInfo(){\n this.tvSeries = this.tvSeries.map(function(obj) {\n obj['title'] = obj['name']; // Assign new key\n delete obj['name']; // Delete old key\n\n obj['original_title'] = obj['original_name']; // Assign new key\n delete obj['original_name']; // Delete old key\n\n obj['release_date'] = obj['first_air_date']; // Assign new key\n delete obj['first_air_date']; // Delete old key\n\n\n\n return obj;\n });\n }", "function tt2addToArray(object){\n\t\t//console.log(\"addToArray information: \" + object.getFill() + \", \" + object.getId());\n\t\tif(!tt2cirleArray.contains(object)){\n\t\t\t\ttt2cirleArray.push(object);\n\t\t}\n\t\tvar objectId = object.getId();\n\n\t\tif(objectId==\"4x1\"||objectId==\"4x2\"||objectId==\"4x3\"||objectId==\"4x4\"||objectId==\"4x5\"||objectId==\"4x6\"||objectId==\"4x7\"||objectId==\"4x8\"){\n\t\t\tif(!tt2cirle4Array.contains(object)){\n\t\t\t\t//console.log(\"pushing to tt2cirle4Array\" + objectId + \" \" + object.getFill());\n\t\t\t\ttt2cirle4Array.push(object);\n\t\t\t}\n\t\t}\n\t\telse if(objectId==\"5x1\"||objectId==\"5x2\"||objectId==\"5x3\"||objectId==\"5x4\"||objectId==\"5x5\"||objectId==\"5x6\"||objectId==\"5x7\"||objectId==\"5x8\"){\n\t\t\tif(!tt2cirle5Array.contains(object)){\n\t\t\t\t//console.log(\"pushing to tt2cirle5Array\" + objectId + \" \" + object.getFill());\n\t\t\t\ttt2cirle5Array.push(object);\n\t\t\t}\n\t\t}\n\t\telse if(objectId==\"6x1\"||objectId==\"6x2\"||objectId==\"6x3\"||objectId==\"6x4\"||objectId==\"6x5\"||objectId==\"6x6\"||objectId==\"6x7\"||objectId==\"6x8\"){\n\t\t\tif(!tt2cirle6Array.contains(object)){\n\t\t\t\t//console.log(\"pushing to tt2cirle6Array\" + objectId + \" \" + object.getFill());\n\t\t\t\ttt2cirle6Array.push(object);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t//console.log(\"pushing to tt2trashArray\" + objectId + \" \" + object.getFill());\n\t\t\ttt2trashArray.push(object);\n\t\t}\n\t\t\n\t}", "function createData(sym, wgt, reg1, vol1, price1,price2,vol2,reg2) {\n // id += 1;\n return { sym, wgt, reg1, vol1, price1,price2,vol2,reg2} ;\n}", "function makeInsertArray(array, dataForm){\n for(var i=0;i<array.length;i++){\n dataForm.append(array[i].name, array[i].value);\n }\n //console.debug(dataForm);\n return dataForm;\n}", "function buildSpoonData(a)\n{\n let spoonData = { };\n for (let i = 0; i < a.length; i++)\n {\n let spoonType = a[i][0];\n let spoonVal = a[i][1];\n spoonData[spoonType] = spoonVal;\n }\n return spoonData;\n}", "createColumn() {\n const first = this.data[0];\n this.fields = Reflect.ownKeys(first);\n this.caricaFlussi();\n \n this.fields.map((col) => {\n \tswitch (col) {\n \tcase \"id\":\n\t \tthis.myJson = {\n\t \t\t data: col,\n\t \t\t title: col,\n\t \t\t type: \"readonly\"\t \t\t \n\t \t};\n\t \tbreak;\n \tcase \"flusso\":\n\t \tthis.myJson = {\n \t\t data: col,\n \t\t title: col,\n \t\t type: \"select\", \n \t\t options: this.arrOpt\t \t\t \n \t};\n\t \tbreak;\n \tcase \"data\":\n\t \tthis.myJson = {\n \t\t data: col,\n \t\t title: col,\n \t\t datepicker: true\t \t\t \n \t};\n\t \tbreak;\n \tdefault:\n\t \tthis.myJson = {\n\t \t\t data: col,\n\t \t\t title: col \t\t\t\n\t \t};\n \t}\n \tthis.ArrCol.push(this.myJson);\n } );\n\t}", "function addItem(details){\n var item = {};\n var name = details.name;\n $.extend(item,this.defaults);\n $.extend(item,this.list[name]);\n item.life = item.hitPoints;\n $.extend(item,details);\n return item;\n}", "function ajoutInfo()\n{ \tvar nom=$( \"#nom option:selected\" ).val();\n \t//var fimage=$( \"#image option:selected\" ).val();\n\t\tvar cap=$(\"#cap option:selected\").val();\n\t\tvar acc=$('input[name=\"acc\"]:first').val();\n\t\tvar env=$('input[name=\"env\"]:first').val();\n\t\tvar date=$('input[name=\"date\"]:first').val();\n\n\tlireBdJson();\n\tvar descJsonObjects=bd.descriptions;\n\tvar jsonObject={ //creation de json\n\t\t\"nom\":nom,\n\t\t//\"image\":fimage,\n\t\t\"capacite\":cap,\n\t\t\"acces\":acc,\n\t\t\"environemment\":env,\n\t\t\"date\":date,\n\t};\n\tdescJsonObjects.push(jsonObject);//ajout dans le tableau des description\n\tbd.descriptions=descJsonObjects;\n\tlocalStorage.setItem('bdjson', JSON.stringify(bd));\t\n\treturn(true);\n\t}", "getInfo(){\n var info = new Array(6)\n info[0] = this.y;\n info[1]= this.x;\n info[2] = this.CanvasX - this.x;\n info[3] = this.CanvasY - this.y;\n info[4] = this.foodLocalX - this.x;\n info[5] = this.foodLocalY - this.y;\n return info;\n }", "function addFeatBonuses(numberArray, featArgs, nameArray) {\n // check for recognized race\n // else validate length of array\n addValues(numberArray, featArgs);\n return pointArrayMessage('', numberArray, nameArray);\n}", "function getAllAudioInfo(){\n let obj = track_collection.track;\n for(let i = 0; i < obj.length; i++) {\n audio_utility.audio_general_info.push([...obj[i].url]);\n }\n}", "function registrarDatos(ancho,grueso,varas,precioP) {\n datos[0].push(ancho);\n datos[1].push(grueso);\n datos[2].push(varas);\n datos[3].push(precioP);\n }", "function registerInfo(event) {\n\tif (event === undefined) { //get caller element in IE8\n\t\tevent = window.event;\n\t}\n\tvar callerElement = event.target || event.srcElement;\n\tvar infoName = callerElement.value;\n\t\n\tif (callerElement.checked) { //when box is checked\n\t\tgenreInfo.push(infoName); //add checkbox value to infoName array\n\t}\n\telse { //if checkbox is unchecked\n\t\tfor (var i = 0; i < langInfo.length; i++) {\n\t\t\tif (callerElement.value === genreInfo[i]){\n\t\t\t\tgenreInfo.splice(i, 1);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}", "helpInfo () {\n\t\tlet me = this;\n\n\t\treturn [\n\t\t\t$('<h3>').append(\n\t\t\t\tt('Adicionar um novo equipamento à aventura')\n\t\t\t),\n\t\t\tEquipament.helpTypeMeaning()\n\t\t];\n\t}", "_appendSpecificMetaData(meta) {\n return meta;\n }", "function buildDataAtti() {\n\tdata_attiInfo = require(file_data_attiInfo);\n\tdata_attiTerms = require(file_data_attiTerms);\n\t\n\tattiDataMerger(data_attiInfo, data_attiTerms, path_tmp);\n}", "function makeData(md,x) {nextData.push({md});}", "addInfo(data) {\n document.getElementById('ip-address').textContent = `${data.ip}`;\n document.getElementById('location').textContent = `${data.location.region}, ${data.location.country}`;\n document.getElementById('timezone').textContent = `UTC ${data.location.timezone}`;\n document.getElementById('isp').textContent = `${data.isp}`;\n }", "function buildDataTagsArray() {\n var data = [];\n var tags = [];\n\n // gps data\n if (form.querySelector(\"#longlat\").checked) {\n data.push(\"GPSLatLong\");\n //tags.push(\"GPSVersionID\");\n tags.push(\"GPSLatitudeRef\");\n tags.push(\"GPSLatitude\");\n tags.push(\"GPSLongitudeRef\");\n tags.push(\"GPSLongitude\");\n }\n if (form.querySelector(\"#altitude\").checked) {\n data.push(\"GPSAltitude\");\n tags.push(\"GPSAltitudeRef\");\n tags.push(\"GPSAltitude\");\n }\n\n // data is probably always needed but we'll give them\n // an option to omit it\n var datestamp = false;\n if (form.querySelector(\"#week\").checked) {\n data.push(\"Week\");\n datestamp = true;\n }\n if (form.querySelector(\"#month\").checked) {\n data.push(\"Month\");\n datestamp = true;\n }\n if (form.querySelector(\"#year\").checked) {\n data.push(\"Year\");\n datestamp = true;\n }\n if (datestamp) {\n tags.push(\"DateTimeOriginal\");\n }\n\n // \n if (form.querySelector(\"#keywords\").checked) {\n tags.push(\"Copyright\");\n data.push(\"Copyright\");\n }\n\n return {\"data\": data, \"tags\": tags};\n }", "function createInfoData(i)\n{\n var content = \"\";\n content = \"<font face='Tahoma'><small>\" +\n \"<b><a href=\\\"javascript:openWindow('../displaymap.html?zoom=11&latitude=\" + pointarray[i].latitude + \"&longitude=\" + pointarray[i].longitude + \"&end', '\" + pointarray[i].text + \"', 640, 480);\\\">\" +\n pointarray[i].text + \n \"</a></b><br>\" +\n pointarray[i].latstr + \"<br>\" +\n pointarray[i].lngstr + \"</small></font>\";\n//GLog.write(\"Content:\" + content);\n return content;\n}", "function createProductInfo() {\n getMediaInfo(); // get media information\n getCategoryInfo(); // get category information\n}", "function addDetails( el ) {\n var details = mk.substr(3);\n var number = el.parent().parent().attr('id').substr(6);\n var info = el.parent().parent().children('.details').text();\n if ( info.indexOf(details)> -1 ) {\n // nothing to do if already in text\n } else {\n info += '\\n' + details;\n }\n el.parent().parent().children(\".details\").text(info);\n console.log('details: ' + details + ' / number: ' + number);\n var pos = el.attr(\"class\").split(\" \", 1);\n console.log(\"pos: \" + pos);\n var top = \"\", left = \"\", center = \"\", right = \"\", bottom = \"\";\n // put data into corresponding position\n switch (pos[0]) {\n case \"top\":\n top = details;\n break;\n case \"left\":\n left = details;\n break;\n case \"center\":\n center = details;\n break;\n case \"right\":\n right = details;\n case \"bottom\":\n bottom = details;\n break;\n default:\n // statements_def\n break;\n }\n\n // save as object\n var mark = {\n \"tooth\": number,\n \"details\": {\n \"top\": top,\n \"left\": left,\n \"center\": center,\n \"right\": right,\n \"bottom\": bottom,\n },\n };\n if(details != '') {\n data.push(mark);\n }\n // for debugging\n console.log('current mark: ' + mark);\n}", "function addInfo (g, d) {\n const addressLink = 'https://www.google.com/maps/search/?api=1&query=SAQ+' + d.ville + '+' + d.adresse\n const phoneLink = 'tel:' + d.tel\n\n g.append('div')\n .text(d.type)\n .style('margin-bottom', '20px')\n .style('font-size', '16px')\n .style('font-weight', 'bold')\n g.append('div')\n .text('🌐 ' + d.region)\n .style('margin-bottom', '20px')\n g.append('text')\n .text('📍 ')\n g.append('a')\n .attr('href', addressLink)\n .attr('target', '_blank')\n .attr('rel', 'noopener noreferrer')\n .html(d.adresse + ', ' + d.ville)\n .style('margin-bottom', '20px')\n g.append('div')\n .style('margin-top', '20px')\n g.append('text')\n .text('☎️ ')\n g.append('a')\n .attr('href', phoneLink)\n .html(d.tel)\n .style('margin-bottom', '20px')\n}", "function agregar() { \n \n // Máximo pueden haber 4 personas a cargo\n if (props.personasaCargo.length < 4){ \n let result = [...props.personasaCargo];\n result.push([,\"\", \"\",])\n cambiarPersonasaCargo(result);\n }\n }", "function MakeInfo(org) {\n var items = org.items_neededs;\n\n var contentString = '';\n contentString += '<div class=\"\">';\n contentString += '<h4><b>' + org.org_name + '</b></h4>';\n contentString += '<p>' + org.description + '</p>';\n\n contentString += '<b>Want:</b>';\n contentString += '<ul>'\n items.forEach((item) => {\n contentString += '<li>' + item.item + ' x' + item.quantity_needed + '</li>';\n });\n contentString += '</ul>'\n\n contentString += '</div>'\n\n var infowindow = new google.maps.InfoWindow({\n content: contentString,\n maxWidth: 200\n });\n return infowindow;\n }", "function addIncome(titleVal, typeVal, totalVal) {\n var data = createObject(titleVal, typeVal, totalVal);\n console.log(data);\n income.push(data);\n console.log(`\"${titleVal.title}\" has been added!`);\n}", "function addEmptyContactInfo(contactInfos) {\n contactInfos.push({ isNew: true, language: $scope.language.id, id: 0 });\n }", "function getInfo() {\n let tmp = document.getElementById('OpenAirIRnames');\n if (tmp === undefined) {\n return;\n }\n\n const ind = tmp.selectedIndex;\n\n tmp = document.getElementById('tainfo');\n if (tmp === undefined) {\n return;\n }\n let infobj = {};\n\n // ADJUST FOR LIVE TEST: OFF/MIC\n if (ind === 0) {\n infobj.mode = 'OFF';\n } else if (ind === 1) {\n infobj.mode = 'MIC';\n } else {\n infobj = myArr[ind - 2];\n }\n\n const infotxt = formInfo(infobj); // get text from obj\n tmp.innerText = infotxt;\n }", "function reorgDetails (data) {\r\n \r\n var estData = {};\r\n estData.estId = data[0].estId;\r\n estData.estName = data[0].estName;\r\n estData.estStatusCd = data.estStatusCd;//TODO.. fix this when api is fixed\r\n estData.address = data[0].addressFull;\r\n estData.services = {};\r\n $.each(data, function(i, item) {\r\n if (!estData.services[item.serviceTypeDesc]) {\r\n estData.services[item.serviceTypeDesc] = {\r\n inspections : {}\r\n };\r\n }\r\n \r\n var insObj = {date: item.inspectionDate, status: item.inspectionStatusText, statusCd : item.inspectionStatusCd,infractions : []};\r\n if (!estData.services[item.serviceTypeDesc].inspections[item.inspectionDate]) {\r\n estData.services[item.serviceTypeDesc].inspections[item.inspectionDate] = insObj;\r\n } \r\n //estData.services[item.serviceTypeDesc].inspections[item.inspectionDate] = insObj;\r\n /* for passed items.. all of these will be null */\r\n if (item.infractionTypeDesc !== null) {\r\n estData.services[item.serviceTypeDesc].inspections[item.inspectionDate].infractions.push( {\r\n infraction: item.infractionTypeDesc,\r\n action: item.actionDesc,\r\n amountFined: item.amountFined,\r\n outcome: item.outcome,\r\n convictionDate: item.convictionDate\r\n });\r\n }\r\n // estData.services[item.serviceTypeDesc].inspections.push( {\r\n // date : item.inspectionDate,\r\n // status : item.inspectionStatusText,\r\n // statusCd : item.inspectionStatusCd,\r\n // infraction: item.infractionTypeDesc,\r\n /// action: item.actionDesc,\r\n // amountFined: item.amountFined,\r\n /// outcome: item.outcome,\r\n // convictionDate: item.convictionDate\r\n \r\n // });\r\n });\r\n \r\n return estData;\r\n}", "renderInformationAdditional() {\n document.getElementsByClassName('pk-name')[0].innerHTML = this.pokemonSelected.Name;\n document.getElementsByClassName('pk-image')[0].setAttribute('src', pathImages + this.pokemonSelected.Image);\n /** Load Information Additional.**/\n document.getElementsByClassName('pk-description-no')[0].innerHTML = this.pokemonSelected.Data.Position;\n document.getElementsByClassName('pk-description-level')[0].innerHTML = this.pokemonSelected.Data.Level;\n document.getElementsByClassName('pk-description-type')[0].innerHTML = this.pokemonSelected.Data.Type;\n document.getElementsByClassName('pk-description-ability')[0].innerHTML = this.pokemonSelected.Data.Ability;\n document.getElementsByClassName('pk-description-height')[0].innerHTML = this.pokemonSelected.Data.Height;\n document.getElementsByClassName('pk-description-weight')[0].innerHTML = this.pokemonSelected.Data.Weight;\n }", "function addCart(nome, valor, info){\n let list = {\n nome: nome,\n valor: valor,\n informacao: info\n };\n setPedido(oldArray => [...oldArray, list])\n setAcao(!acao)\n //await AsyncStorage.setItem('@pedido', JSON.stringify(pedido));\n }", "function add_name(){\n arr[count]=temp[count];\n count++;\n }", "function creaGeneri(){\r\n var i,j;\r\n for (i=0; i<filmografia.length; i++){\r\n var gens = filmografia[i].genere;\r\n for (j=0; j<gens.length; j++){\r\n if (!(gens[j] in generi))\r\n generi[gens[j]]=[];\r\n generi[gens[j]].push(filmografia[i]);\r\n }\r\n }\r\n window.generi=generi;\r\n console.log(generi);\r\n console.log(\"end\");\r\n}", "function formatLineData(inArray) {\n let outJson = [];\n for (let i = 0; i < inArray.length; i++) {\n let crimeType = inArray[i][0];\n let attrs = inArray[i][1];\n\n // let attr = attrs.reduce((a, c) => {\n // a[c] = c;\n // return a;\n // }, {});\n // console.log('attr-----', attr);\n\n let yearAttrs = [];\n let obj = { id: crimeType, data: yearAttrs };\n\n for (let j = 0; j < attrs.length; j++) {\n let childObj = { x: attrs[j][0], y: attrs[j][1] };\n\n yearAttrs.push(childObj);\n }\n outJson.push(obj);\n }\n return outJson;\n }", "function PutArraysInJsonObject() {\n var nodeConcret = [{}];\n if (o.BlocAssembly.AllPoints) {\n if (!Array.isArray(o.BlocAssembly.AllPoints.ProcessPoint)) {\n nodeConcret[0] = o.BlocAssembly.AllPoints.ProcessPoint;\n delete o.BlocAssembly.AllPoints.ProcessPoint;\n o.BlocAssembly.AllPoints.ProcessPoint = nodeConcret;\n }\n }\n\n //--Bloc\n nodeConcret = [{}];\n if (!Array.isArray(o.BlocAssembly.AllBlocs.Bloc)) {\n nodeConcret[0] = o.BlocAssembly.AllBlocs.Bloc;\n delete o.BlocAssembly.AllBlocs.Bloc;\n o.BlocAssembly.AllBlocs.Bloc = nodeConcret;\n }\n\n //--GraphicProfileDescription\n for (var i = 0; i < o.BlocAssembly.AllBlocs.Bloc.length; i++) {\n nodeConcret = [{}];\n if (o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions) {\n if (o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions.GraphicProfileDescription) {\n if (!Array.isArray(o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions.GraphicProfileDescription)) {\n nodeConcret[0] = o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions.GraphicProfileDescription;\n if (nodeConcret[0].pointsDescriptions == null) {\n var pdAux = {\n PointGUI: []//pGUIAux\n };\n nodeConcret[0].pointsDescriptions = pdAux;\n }\n delete o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions.GraphicProfileDescription;\n o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions.GraphicProfileDescription = nodeConcret;\n }\n for (var j = 0; j < o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions.GraphicProfileDescription.length; j++) {\n if (o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions.GraphicProfileDescription[j].pointsDescriptions) {\n var nodeConcret2 = [{}];\n if (!Array.isArray(o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions.GraphicProfileDescription[j].pointsDescriptions.PointGUI)) {\n nodeConcret2[0] = o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions.GraphicProfileDescription[j].pointsDescriptions.PointGUI;\n delete o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions.GraphicProfileDescription[j].pointsDescriptions.PointGUI;\n o.BlocAssembly.AllBlocs.Bloc[i].ProfilesDescriptions.GraphicProfileDescription[j].pointsDescriptions.PointGUI = nodeConcret2;\n }\n }\n }\n }\n }\n\n //-- Connection\n nodeConcret = [{}];\n if (o.BlocAssembly.AllBlocs.Bloc[i].Connections) {\n if (!Array.isArray(o.BlocAssembly.AllBlocs.Bloc[i].Connections.Connection)) {\n nodeConcret[0] = o.BlocAssembly.AllBlocs.Bloc[i].Connections.Connection;\n delete o.BlocAssembly.AllBlocs.Bloc[i].Connections.Connection;\n o.BlocAssembly.AllBlocs.Bloc[i].Connections.Connection = nodeConcret;\n }\n }\n\n //-- BlocsReferences\n nodeConcret = [{}]; //reset the nodeConcret[]\n if (o.BlocAssembly.AllBlocs.Bloc[i].BlocsReferences) {\n if (o.BlocAssembly.AllBlocs.Bloc[i].BlocsReferences.int) {\n if (!Array.isArray(o.BlocAssembly.AllBlocs.Bloc[i].BlocsReferences.int)) {\n nodeConcret[0] = o.BlocAssembly.AllBlocs.Bloc[i].BlocsReferences.int;\n delete o.BlocAssembly.AllBlocs.Bloc[i].BlocsReferences.int;\n o.BlocAssembly.AllBlocs.Bloc[i].BlocsReferences.int = nodeConcret;\n }\n }\n }\n\n //-- PointsReferences\n //-- BlocsReferences\n nodeConcret = [{}];\n if (o.BlocAssembly.AllBlocs.Bloc[i].PointsReferences) {\n if (o.BlocAssembly.AllBlocs.Bloc[i].PointsReferences.int) {\n if (!Array.isArray(o.BlocAssembly.AllBlocs.Bloc[i].PointsReferences.int)) {\n nodeConcret[0] = o.BlocAssembly.AllBlocs.Bloc[i].PointsReferences.int;\n delete o.BlocAssembly.AllBlocs.Bloc[i].PointsReferences.int;\n o.BlocAssembly.AllBlocs.Bloc[i].PointsReferences.int = nodeConcret;\n }\n }\n }\n\n //-- SequenceDescriptions.AllItems.ItemGUI\n nodeConcret = [{}];\n if (o.BlocAssembly.AllBlocs.Bloc[i].SequenceDescriptions.AllItems) {\n if (o.BlocAssembly.AllBlocs.Bloc[i].SequenceDescriptions.AllItems.ItemGUI) {\n if (!Array.isArray(o.BlocAssembly.AllBlocs.Bloc[i].SequenceDescriptions.AllItems.ItemGUI)) {\n nodeConcret[0] = o.BlocAssembly.AllBlocs.Bloc[i].SequenceDescriptions.AllItems.ItemGUI;\n delete o.BlocAssembly.AllBlocs.Bloc[i].SequenceDescriptions.AllItems.ItemGUI;\n o.BlocAssembly.AllBlocs.Bloc[i].SequenceDescriptions.AllItems.ItemGUI = nodeConcret;\n }\n }\n }\n }\n\n //-- AssemblyIDs\n nodeConcret = [{}];\n if (o.BlocAssembly.AssemblyIDs) {\n if (o.BlocAssembly.AssemblyIDs.int) {\n if (!Array.isArray(o.BlocAssembly.AssemblyIDs.int)) {\n nodeConcret[0] = o.BlocAssembly.AssemblyIDs.int;\n delete o.BlocAssembly.AssemblyIDs.int;\n o.BlocAssembly.AssemblyIDs.int = nodeConcret;\n }\n }\n }\n nodeConcret = [{}];\n if (o.BlocAssembly.ChildrenBlocsIds) {\n if (o.BlocAssembly.ChildrenBlocsIds.int) {\n if (!Array.isArray(o.BlocAssembly.ChildrenBlocsIds.int)) {\n nodeConcret[0] = o.BlocAssembly.ChildrenBlocsIds.int;\n delete o.BlocAssembly.ChildrenBlocsIds.int;\n o.BlocAssembly.ChildrenBlocsIds.int = nodeConcret;\n }\n }\n }\n}", "function createElementsForAllUsers(arr) {\n for (let ob in arr) {\n console.log('work', arr[ob]);\n const liId = document.createElement('li');\n const liName = document.createElement('li');\n const liAge = document.createElement('li');\n liId.innerHTML = `id, ${arr[ob].id}`;\n liName.innerHTML = `name ${arr[ob].name}`;\n liAge.innerHTML = `age ${arr[ob].age}`;\n info.appendChild(liId);\n info.appendChild(liName)\n info.appendChild(liAge)\n\n }\n}", "add(info) {\n this.contacts.push(new Contact(...info));\n }", "function createElements(data) {\n const count = 3;\n const arr = ['id', 'name', 'age'];\n arr[0] = data.data.id !== undefined ? 'id' : '_id';\n for (let index = 0; index < count; index++) {\n const li = document.createElement('li');\n li.innerHTML = `${arr[index]} = ${data.data[arr[index]]}`;\n info.appendChild(li);\n }\n}", "function forstorData() {\n\t\t//how many clockans are we dealing with?\n\t\tvar amount = $('.clokan').length;\n\t\t\n\t\t//create an array for each clokan that will store the data on time\n\t\tfor (var i = 0; i < amount; i++) {\n\t\t\t//store this in a global variable with a special name\n\t\t\t\t//I want to know a better way, bc Paul will always tell me to avoid global variables at all cost\n\t\t\tvar nameThis = 'clockan' + i;\n\t\t\tinformadata[i] = [];\n\t\t}\n\t}", "function addFeatures(featureArray,layerName,event) {\n let featureNumber = 1;\n if (document.getElementsByClassName('feature-details').length > 0) {\n featureNumber = document.getElementsByClassName('feature-details').length + 1 ;\n }\n featureArray.forEach(feature => {\n let node = createNode('.featureinfo-body', 'details', [`feature-${featureNumber}`,'feature-details']);\n createNode(`.feature-${featureNumber}`, 'summary', ['feature-summary'], `${layerName}`);\n createNode(`.feature-${featureNumber}`, 'table', ['feature-table'], `<tbody></tbody>`);\n for (let key in feature) {\n createNode(`.feature-${featureNumber} table tbody`, 'tr', [], `<td>${key}</td><td>${feature[key]}</td>`);\n }\n featureNumber === 1 ? node.setAttribute('open',true) : false;\n featureNumber++;\n });\n }", "function upgradeInfoSec(obj){\n var newRows = obj.newRows;\n var angScope = angular.element(document.getElementById(\"infoTab\")).scope();\n angScope.removeLastRow();\n for (var i = 0; i < newRows.length; i++) {\n angScope.addRow(newRows[i].row,newRows[i].type);\n }\n }", "function addObject(objectData) {\n var currentTitle = objectData.objectName;\n var currentArtist = objectData.artistDisplayName;\n var currentDate = objectData.objectBeginDate;\n var imgUrl = objectData.objectUrl;\n var index = myArray.length;\n \n // myArray[index] = {};\n // myArray[index][\"title\"] = currentTitle;\n // myArray[index][\"artist\"] = currentArtist;\n // myArray[index][\"date\"] = currentDate;\n // myArray[index][\"url\"] = imgUrl;\n\n \n myArray.push({\n title: objectData.objectName, \n artist: objectData.artistDisplayName,\n date: objectData.objectBeginDate,\n url: objectData.objectUrl\n })\n \n console.log(\"object at index\", index, myArray[index]);\n}", "function generateEthnicityChartData(newEntry) {\n if (newEntry != null) {\n ethnicityData.push(newEntry);\n //console.log(\"**** ethnicityData now has: \" + JSON.stringify(ethnicityData) + \" ****\");\n }\n return ethnicityData;\n }", "async addInfo(login, info) {\n const user = new Account(login, ...info);\n fs.appendFile('data/info', JSON.stringify(user) + '\\n', err => {\n this.checkError(err);\n });\n }", "function saveContactInfo(name, email, message){\n let newContactInfo = contactInfo.push();\n\n\n newContactInfo.set({\n name : name,\n email: email,\n message: message,\n });\n}", "function createPolygonInfos() {\n var hiddenfield = getPolygonInfosHidddenField();\n var polygonInfos = new Array();\n\n var index = 0;\n for (var i = 0; i < map.graphics.graphics.length; ++i) {\n var polygonGraphic = map.graphics.graphics[i];\n if (polygonGraphic.geometry instanceof DatashopPolygon) {\n var polygonCenter = polygonGraphic.geometry.getCenterPoint();\n var rotation = polygonGraphic.geometry.rotationInDegrees;\n\n var scale = polygonGraphic.geometry.plotScale;\n var plotTemplate = polygonGraphic.geometry.plotTemplate;\n var id = polygonGraphic.geometry.id;\n polygonInfos[index] = '{ \"Id\": ' + id + ', \"X\": ' + polygonCenter.x + ', \"Y\": ' + polygonCenter.y + ', \"Scale\": ' + scale + ', \"Rotation\": ' + rotation + ', \"PlotTemplate\": \"' + plotTemplate + '\" }';\n index++;\n }\n }\n\n hiddenfield.value = \"[\" + polygonInfos + \"]\";\n console.log(hiddenfield.value);\n}" ]
[ "0.6497563", "0.62351894", "0.618422", "0.59359396", "0.5831174", "0.5767636", "0.57488537", "0.5730857", "0.5701731", "0.56975406", "0.569095", "0.569095", "0.56055975", "0.55616647", "0.55604917", "0.5535216", "0.55251753", "0.5507636", "0.550194", "0.54817355", "0.5478715", "0.54729", "0.5463924", "0.54629564", "0.5452597", "0.5445976", "0.54394156", "0.5427891", "0.5405344", "0.5395465", "0.53833556", "0.537699", "0.5369555", "0.5367398", "0.53380996", "0.5333529", "0.5328141", "0.5327681", "0.5325457", "0.5312528", "0.53100574", "0.52967125", "0.5286259", "0.5283474", "0.52798", "0.5273727", "0.52678084", "0.5259758", "0.52493674", "0.5244056", "0.5229154", "0.5228273", "0.5225484", "0.52231294", "0.5216721", "0.5215734", "0.521219", "0.52121633", "0.5207071", "0.5199135", "0.5193393", "0.5192117", "0.5189751", "0.518818", "0.5185475", "0.51794934", "0.5175089", "0.5170884", "0.5167557", "0.51655406", "0.51517814", "0.5149312", "0.5148489", "0.51477706", "0.5138244", "0.5137395", "0.51321495", "0.51286906", "0.5124503", "0.51241475", "0.5118709", "0.5114285", "0.51141304", "0.51129025", "0.511111", "0.51060146", "0.51013887", "0.5097769", "0.5091141", "0.5089218", "0.508882", "0.50884527", "0.50873697", "0.5084805", "0.5076085", "0.5075085", "0.50725186", "0.50707483", "0.50703156", "0.50678855" ]
0.57898384
5
Funzione per recupero dei generi del film in formato stringa
get_genres(genre_ids){ // Esempio di genre_ids = [ 100 , 45 ] let genres = []; genre_ids.forEach(genre_id => { this.all_genres.forEach((genre, index) => { // Confronta ogni id del film con l array del genere if(genre_id == genre.id){ // Quando trova corrispondenza aggiunge il nome del genre alla stringa genres.push(genre.name); }; }); }); return genres; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildString(movie){\n\tvar results = \"Key Value Pairs - You have \";\n\tif (movie.hasWatched){\n\t\t\tresults += \"watched \\\"\";\n\t\t} else {\n\t\t\tresults += \"not seen \\\"\";\n\t\t};\n\tresults += movie.title\n\tresults += \"\\\" \" + movie.rating + \" stars\"\t\n\treturn results;\n\t}", "function buildString(movie){\n var result = \"You have \";\n if(movie.hasWatched){\n result += \"watched \";\n }\n else{\n result += \"not seen \";\n }\n result += \"\\\"\" + movie.title + \"\\\" \";\n result += \" - \" + movie.rating + \" stars\";\n return result;\n }", "function buildString(movie){\n\tvar result = \"You have \";\n\tif(movie.seenit){\n\t\tresult += \"watched \";\n\t}\n\telse{\n\t\tresult += \"not seen \";\n\t}\n\tresult += \"\\\"\" + movie.name + \"\\\" - \";\n\tresult += movie.rating + \" stars\";\n\treturn result;\n}", "function assembelFilmography (movieList) {\n let madFragment = document.createDocumentFragment();\n\n let year = 0;\n let yearParse = 0;\n\n madTimeline.innerHTML = \"\";\n\n for (let i = 0; i < movieList.length; i++) {\n if (i == 0) { madFragment.appendChild(addFilmographyStart()) }\n\n yearParse = parseFloat(movieList[i].release_date);\n\n if (yearParse != year) {\n year = yearParse;\n madFragment.appendChild(addFilmographyYear(yearParse))\n }\n\n madFragment.appendChild(addFilmographyContent(movieList[i].title, movieList[i].id))\n\n if (i == movieList.length - 1) {\n madFragment.appendChild(addFilmographyEmpty());\n madFragment.appendChild(addFilmographyEnd());\n }\n\n }\n\n madTimeline.appendChild(madFragment);\n\n}", "function buildString(movie) {\n\n var result = \" You have \";\n if (movie.Watched) {\n result += \"watched \";\n }\n else {\n result += \"not seen \";\n }\n result += \"\\\"\" + movie.Name + \"\\\"\";\n result += \" which has a \" + movie.Rating + \" star rating\";\n return result; // entire string is put together in return\n \n}", "function getTitle(film) {\n let tytul = film.split(\" (\")[0]; // tniemy po \" (\"\n return tytul;\n}", "function buildSentence(movie){ //for input of \"movie\", needs to do following:\n var result = \"You have \";\n if(movie.hasWatched){\n result += \"watched \";\n } else {\n result += \"not seen \";\n }\n result += \"\\\"\" + movie.title + \"\\\" - \";\n result += movie.rating + \" stars\";\n return result; //different from the console.log above\n //return will be made each time function is called (number of items in array)\n}", "function movieBuilder(movie){\nvar result = \"You have\"\n\tif(movie.seen){\n\t\tresult += \" have seen\";\n\t}\n\telse\n\t{\n\t\tresult += \" not seen\";\n\t}\n\tresult += \" \\\"\"+movie.name + \"\\\" \" +\" - \"+movie.rating + \" star\";\t\n\n\treturn result;\n}", "function stampa_film (movies){\n for (var i = 0; i < movies.length; i++) {\n var movie = movies[i];\n var titolo = movie.title;\n var titolo_originale = movie.original_title;\n var lingua = disegna_bandiere(movie.original_language);\n var voto = movie.vote_average;\n var voto_ridotto = arrotonda_voto(voto);\n var voto_in_stelle = disegna_stelle(voto_ridotto);\n //per evitare i casi in qui il campo è vuoto\n if(typeof movie.type !=='undefined'){\n var tipo = movie.type;\n }\n if(movie.poster_path == null){\n var url_poster = 'image-not-available.jpg'\n } else{\n var url_poster = img_url_base + dimensione_poster + movie.poster_path;\n }\n\n // inizializzo le variabili di handlebars\n var handlebars_variable = {\n 'title' : titolo,\n 'original_title' : titolo_originale,\n 'language' : lingua,\n 'rating' : voto_in_stelle,\n 'type' : tipo,\n 'image_cover' : url_poster\n }\n var html_locandina = template_function(handlebars_variable);\n $('#locandine').append(html_locandina);\n }\n }", "function buildString(movie) {\n var result = null;\n if (movie.hasWatched) {\n result = 'You Have Watched ' + movies[i].title + ' - ' + movies[i].rating + ' stars';\n } else {\n result = 'You havn\\'t seen ' + movies[i].title + ' - ' + movies[i].rating + ' stars';\n }\n return result;\n}", "function showMovie(response) {\n let movie = response;\n\n //neki filmovi/serije imaju vise rezisera, glumaca i zanrova i da bi ljepse mogli da ih prikazemo na stranici od stringa koji dobijemo napravimo niz elemenata\n var str = movie.Actors;\n var str2 = movie.Director;\n var str3 = movie.Genre;\n\n var stars = str.split(\", \");\n var directors = str2.split(\", \");\n var genres = str3.split(\", \");\n\n //ukoliko nemamo podatke o slici prikazemo default sliku iz foldera\n if (movie.Poster == \"N/A\") {\n movie.Poster = \"./Images/default.jpg\";\n }\n\n //prikazujemo redom podatke\n $(\"#movie-title-name\").append(movie.Title + ' <span id=\"movie-year\"></span>');\n $(\"#movie-year\").append(movie.Year);\n\n //ukoliko IMDb ocjene nisu dostupne, prikazemo odgovarajucu poruku\n if (movie.imdbRating === 'N/A') {\n $(\"#movie-rating\").append('<span>Ratings are not available<span>');\n } else {\n $(\"#movie-rating\").append(movie.imdbRating + '/10 <span>' + movie.imdbVotes + ' votes </span>');\n }\n\n $(\"#img\").append('<img src=' + movie.Poster + ' alt=\"\">');\n\n if (movie.Plot === 'N/A') {\n $('#movie-description').append('Plot is not available at this moment. :)');\n } else {\n $('#movie-description').append(movie.Plot);\n }\n\n directors.forEach(director => {\n $('#movie-director').append('<p>' + director + '</p>');\n });\n\n stars.forEach(star => {\n $('#movie-stars').append('<p>' + star + '</p>');\n });\n\n genres.forEach(genre => {\n $('#movie-genre').append('<p>' + genre + '</p>');\n });\n\n $('#movie-released').append(movie.Released);\n $('#movie-runtime').append(movie.Runtime);\n\n //ukoliko je Type -> serija onda prikazemo ukupan broj sezona \n //prikazemo i select sa svim sezonama te serije gdje na klik mozemo prikazati sve epizode odredjene sezone\n //po defaultu je selectovana poslednja sezona serije, kako bi odmah pri ulasku u seriju imali izlistane epizode \n if (movie.Type == 'series') {\n $('#movie-seasons').append('<h3>Seasons:</h3><p>' + movie.totalSeasons + '</p>');\n\n $('#series-season').append(\n '<p class=\"heading-des\">Episodes> ' +\n '<select onchange=\"getSeason(\\'' + movie.Title + '\\')\" id=\"select-episodes\">' +\n '</select>' +\n '</p>' +\n '<hr class=\"about\">' +\n '<div class=\"description\">' +\n '<div id=\"episodes\">' +\n '</div>' +\n '</div>'\n )\n }\n\n $('#movie-cast').append(\n '<p>Director: ' + movie.Director + '</p>' +\n '<p>Writer: ' + movie.Writer + '</p>' +\n '<p>Stars: ' + movie.Actors + '</p>'\n )\n\n if (movie.Ratings.length == 0) {\n $('#movie-reviews').append('<p>Ratings are not available at this moment. :)</p>')\n } else {\n movie.Ratings.forEach(rating => {\n $('#movie-reviews').append('<p>' + rating.Source + ' --> ' + rating.Value + '</p>')\n });\n }\n\n if (movie.Awards === 'N/A') {\n $('#movie-awards').append('Awards are not available at this moment. :)');\n } else {\n $('#movie-awards').append(movie.Awards);\n }\n\n $('#movie-imdb-btn').append(\n '<button onClick=\"openImdbPage(\\'' + movie.imdbID + '\\')\" class=\"btn-imdb\">' +\n '<i class=\"fab fa-imdb\"></i> IMDb' +\n '</button>'\n )\n\n //za ukupan broj sezona serije ispunimo select sa tolikim brojem opcija\n for (i = 1; i <= movie.totalSeasons; i++) {\n $('#select-episodes').append(\n '<option selected=\"selected\" value=\"\\'' + i + '\\'\">Season ' + i + '</option>'\n )\n }\n\n if (movie.Type === \"series\") {\n\n //prikazemo sve epizode selektovane sezone\n getSeason(movie.Title);\n\n }\n\n //ukoliko smo otvorili epizodu prikazemo na stranici na kojoj smo epizodi i sezoni \n //i prikazemo dugme za povratak na seriju\n if (movie.Type === \"episode\") {\n $(\"#episode-details\").append(\n '<span class=\"episode-span\">Season ' + movie.Season + ' </span>' +\n '<span class=\"season-span\">Episode ' + movie.Episode + '</span>'\n )\n $(\"#button-tvshow\").append(\n '<button onClick=\"openMovie(\\'' + movie.seriesID + '\\')\" class=\"btn-search\">' +\n '<i class=\"fas fa-chevron-left\"></i>' +\n ' Back to TV Show' +\n '</button>'\n )\n }\n}", "printMovieInfo(data) {\n const rottenTomatoes = this.rottenTomatoesRating(data);\n const output = [\n `Title: ${data.Title}`,\n `Year: ${data.Year}`,\n `Rating: IMDb ${data.imdbRating}`,\n ` Rotten Tomatoes ${rottenTomatoes}`,\n `Country: ${data.Country}`,\n `Language: ${data.Language}`,\n `Plot: ${data.Plot}`,\n `Actors: ${data.Actors}`\n ];\n\n console.log(output.join(\"\\n\"));\n }", "function getYear(film) {\n let rok = film.split(\" (\")[1]; // tu bedzie z nawiasem zamykajacym\n rok = rok.split(\")\")[0];\t // a tu wywalamy ten nawias zamykajacy\n return rok;\n}", "print_genres_string(id){\r\n let genres_string = \"\";\r\n\r\n for (var i = 0; i < this.additional_infos.length; i++) {\r\n if(id == this.additional_infos[i].id){\r\n genres_string = this.additional_infos[i].genres.join(\" / \");\r\n };\r\n };\r\n return genres_string;\r\n }", "movieDataStructuring(data, keyName) {\n let string = []\n data.forEach(str => {\n string.push(` ${str[keyName]}`)\n })\n return string\n }", "function stampa_serie(film){\n //template per i film\n var source = $(\"#template_film\").html();\n var template = Handlebars.compile(source);\n var film = film.results;\n\n //ciclo for lungo quanto tutto l'array\n for(var i=0; i<film.length; i++){\n //context si rifa all'handlebars e gli metto dentro le proprietà da stampare\n var context = {\n 'titolo':film[i].name,\n 'titolo_originale':film[i].original_name,\n 'lingua':flag_show(film[i].original_language),\n 'voto': film[i].vote_average,\n 'stelle': stelle(film[i].vote_average),\n 'copertina': copertina(film[i].poster_path),\n 'overview': overview(film[i].overview)\n };\n //creo l'html contenente il template\n var html = template(context);\n //appendo tutto al contenitore delle carte\n $('.container_film').append(html);\n }\n\n }", "function movieInfoTempate(movie) {\n const ratings = movie.Ratings.map(rating => {\n return `<li>${rating.Source}: ${rating.Value}</li>`\n })\n const movieInfo = \n `\n <div class=\"movie__info\" id=\"info${movie.imdbID}\">\n <p><i>${movie.Genre}</i></p>\n <h3>Director</h3>\n <p>${movie.Director}</p>\n <h3>Written by</h3>\n <p>${movie.Writer}</p>\n <h3>Cast</h3>\n <p>${movie.Actors}</p>\n <h3>Synopsis</h3>\n <p>${movie.Plot}</p>\n <h3>Accolades</h3>\n <p>${movie.Awards}</p>\n <h3>Ratings</h3>\n <ul>${ratings.join().replace(/,/g, \" \")}</ul>\n <h3>Run Time</h3>\n <p>${movie.Runtime}</p>\n </div>\n `;\n appendMovieInfo(movieInfo, movie);\n\n}", "function utworzRok(film) {\n \n let rok = document.createElement(\"div\");\n rok.classList.add(\"rok\");\n rok.innerHTML = getYear(film);\n \n return rok;\n}", "function buildText(data, i){\n var textContainer = document.createElement('div'),\n displayName = document.createElement('h4'),\n stats = document.createElement('p'),\n streamDescription = document.createElement('p'),\n maturity = data.streams[i].channel.mature;\n\n textContainer.setAttribute(\"class\", \"six columns\");\n displayName.innerHTML += data.streams[i].channel.display_name;\n stats.setAttribute(\"class\", \"results-subtitle\");\n stats.innerHTML += \"Game name: \\\"\" + data.streams[i].game;\n stats.innerHTML += \"\\\" | Viewers: \" + data.streams[i].viewers;\n\n //build stream description\n if(maturity === null){\n maturity = \"unknown\";\n }\n //format date and time\n var d = new Date(data.streams[i].created_at);\n var creationDate = d.getMonth() + \"\\/\" + d.getDate() + \"\\/\" + d.getFullYear() + \" at \" + d.getHours() +\":\"+ d.getMinutes();\n\n streamDescription.innerHTML += \"This stream was created on \" + creationDate;\n streamDescription.innerHTML += \". The channel's status is: \\\"\" + data.streams[i].channel.status;\n streamDescription.innerHTML += \"\\\". The channel's maturity rating is \" +maturity +\".\";\n\n textContainer.appendChild(displayName);\n textContainer.appendChild(stats);\n textContainer.appendChild(streamDescription);\n\n return textContainer;\n}", "function videoName(){\n var artistName = document.getElementById(\"name\").value;\n var artistName2 = document.getElementById(\"name2\").value;\n var descriptiveItem = document.getElementById(\"mood\").value;\n var descriptiveItem2 = document.getElementById(\"instrument\").value;\n var songName = document.getElementById(\"songName\").value;\n var genre = document.getElementById(\"genre\").value;\n var title = `[FREE] ${descriptiveItem} ${descriptiveItem2} ${artistName} x ${artistName2} Type Beat - \"${songName}\" | ${genre} Beat/Instrumental 2021`;\n var titleNode = document.createTextNode(title);\n titleParagraph.appendChild(titleNode);\n}", "function videoName(){\n var artistName = document.getElementById(\"name\").value;\n var artistName2 = document.getElementById(\"name2\").value;\n var descriptiveItem = document.getElementById(\"mood\").value;\n var descriptiveItem2 = document.getElementById(\"instrument\").value;\n var songName = document.getElementById(\"songName\").value;\n var genre = document.getElementById(\"genre\").value;\n var title = `[FREE] ${descriptiveItem} ${descriptiveItem2} ${artistName} x ${artistName2} Type Beat - \"${songName}\" | ${genre} Beat/Instrumental 2021`;\n var titleNode = document.createTextNode(title);\n titleParagraph.appendChild(titleNode);\n}", "function videoName(){\n var artistName = document.getElementById(\"name\").value;\n var artistName2 = document.getElementById(\"name2\").value;\n var descriptiveItem = document.getElementById(\"mood\").value;\n var descriptiveItem2 = document.getElementById(\"instrument\").value;\n var songName = document.getElementById(\"songName\").value;\n var genre = document.getElementById(\"genre\").value;\n var title = `[FREE] ${descriptiveItem} ${descriptiveItem2} ${artistName} x ${artistName2} Type Beat - \"${songName}\" | ${genre} Beat/Instrumental 2021`;\n var titleNode = document.createTextNode(title);\n titleParagraph.appendChild(titleNode);\n}", "function makehtml(fi) {//makes an html file which will contain the lyrics for the song designated by the file named 'fi' a string of html code\n var ht=\"<!DOCTYPE html>\\n<html>\\n<head lang=\\\"en\\\">\\n<meta charset=\\\"UTF-8\\\">\\n<title>\"+ fi + \"</title>\\n</head>\\\"\\n<body>\\n<p id=\\\"demo\\\"></p>\";\n ht+=formatlyrics(fi);\n ht+= \"</body>\\n</html>\";\n return ht;\n\n}", "function stringShow(allShows) {\n let stringShows = \"\";\n if (allShows) {\n let shows = JSON.parse(allShows);\n\n for (var i = 0; i < shows.length; i++) {\n stringShows += \"עיתון: \" + shows[i].type + \" = \" + shows[i].shows + \" מופעים.\\r\\n\"\n }\n }\n return (stringShows);\n}", "function getVideos(str, tipo){\n return str\n .replace('<ul>','')\n .replace('</ul>','')\n .replace('</l','asd') \n .split('<li')\n .map( video =>(\n {\n duracion: video.split('\"')[1], \n tipo: video.split('>')[1]\n } \n )); \n}", "function renderMovieListing(movies){\n let filmstrip = '';\n let movieGenres = [];\n\n let availableGenres = localStorage.getItem(\"currentGenres\") ? JSON.parse(localStorage.getItem(\"currentGenres\")) : getGenres();\n\n for(let movie of movies){\n movieGenres.push(... new Set(movie.genre_ids));\n const filmGenres = filterArray(\"id\", availableGenres, movie.genre_ids);\n filmstrip += `\n <figure class=\"movie\">\n <img class=\"movie--poster\" srcset=\"https://image.tmdb.org/t/p/w342/${movie.poster_path} 320w, https://image.tmdb.org/t/p/w500/${movie.poster_path} 480w, https://image.tmdb.org/t/p/original/${movie.poster_path} 800w\" sizes=\"(max-width: 320px) 280px, (max-width: 480px) 440px, 800px\" src=\"https://image.tmdb.org/t/p/w92/${movie.poster_path}\" alt=\"${movie.title} Poster\" />\n <figcaption class=\"movie--credits\">\n <h2 class=\"movie--title\">${movie.title}</h2>\n <h3 class=\"movie--rating\">Rating: ${movie.vote_average}</h3>\n <ul class=\"movie--genres tags\">\n ${filmGenres.map(genre => (`<li class=\"genre tag\"><span class=\"tag-label\">${genre.name}</span></li>`)).join('')}\n </ul>\n </figcaption>\n </figure>\n `;\n }\n//set the cinema content to the template strings\n document.getElementById('cinema').innerHTML = filmstrip;\n//get unique set of genres to filter against available genres from api\n const currentGenres = [...new Set(movieGenres)];\n//filter the current genres to create a new object\n const filmGenres = filterArray(\"id\", availableGenres,currentGenres);\n\n let genres = '';\n\n for(let genre of filmGenres ){\n let name = genre.name.replace(\" \",\"_\").toLowerCase();\n let id = genre.id;\n genres += `\n <li class=\"genre tag\">\n <input class=\"genre--selector\" type=\"checkbox\" id=\"${name}-${id}\" name=\"genre-tags\" value=\"${id}\">\n <label class=\"tag-label\" for=\"${name}-${id}\" name=\"${name}-label\">${genre.name}</label>\n </li>`;\n }\n document.getElementById('genres').innerHTML = genres;\n\n}", "static createCustomDescription(replayEpisode) {\n let descriptionArr = ['Custom'];\n // Main Segment\n // If only one game in main segment\n if (replayEpisode.mainSegmentGamesAdv.length == 1) {\n descriptionArr.push(replayEpisode.mainSegmentGamesAdv[0].title + ' is the featured game in the '\n + this.numOrdinalSuffix(replayEpisode.episodeNumber) + ' episode of Replay.');\n }\n else { // Else more than one game in main segment\n let mainSegmentGamesTitleArray = [];\n replayEpisode.mainSegmentGamesAdv.forEach(function (item, index, arr) {\n mainSegmentGamesTitleArray.push(item.title);\n });\n descriptionArr.push('The ' + this.numOrdinalSuffix(replayEpisode.episodeNumber) + ' episode of Replay is '\n + replayEpisode.episodeTitle.replace('Replay: ', '') + ', featuring '\n + this.listArrayAsString(mainSegmentGamesTitleArray) + '.');\n }\n // Middle Segment\n // If episode has segment name\n if (replayEpisode.hasOwnProperty('middleSegment') && replayEpisode.middleSegment.length) {\n let str = 'The middle segment is an installment of ' + this.getSegmentTitle(replayEpisode.middleSegment);\n // If episode has segment content\n if (replayEpisode.hasOwnProperty('middleSegmentContent') && replayEpisode.middleSegmentContent.length)\n str += ' featuring ' + this.listArrayAsString(replayEpisode.middleSegmentContent);\n descriptionArr.push(str + '.');\n }\n // Else If episode has segment content (should NOT have segment name)\n else if (replayEpisode.hasOwnProperty('middleSegmentContent')) {\n descriptionArr.push('The middle segment features '\n + this.listArrayAsString(replayEpisode.middleSegmentContent + '.'));\n }\n\n // Second Segment\n if (replayEpisode.hasOwnProperty('secondSegment') && replayEpisode.secondSegment.length) {\n if (replayEpisode.secondSegment == 'RR')\n descriptionArr.push('The Replay Roulette for this episode features ' +\n this.listArrayAsString(replayEpisode.secondSegmentGames) + '.');\n else {\n descriptionArr.push('The second segment for this episode is an installment of ' +\n this.getSegmentTitle(replayEpisode.secondSegment) + ' featuring ' +\n this.listArrayAsString(replayEpisode.secondSegmentGames) + '.');\n }\n }\n // Host/Featuring\n if (replayEpisode.hasOwnProperty('host')) {\n descriptionArr.push('This episode is hosted by ' + this.listArrayAsString(replayEpisode.host)\n + ' and features ' + this.listArrayAsString(replayEpisode.featuring) + '.');\n }\n // Return array of strings\n return descriptionArr;\n\n /*\n * Ex. 1 (if one game and one Replay Roulette)\n * 'Armored Core' is the featured game in the '460th' episode of Replay. \n * The 'Replay Roulette' for this episode features 'Rayman Rush'.\n * \n * This episode is hosted by 'Andrew Reiner' and features 'Jeff Marchiafava, \n * Kyle Hilliard, and Ben Hanson'.\n * \n * Ex. 2 (special episode)\n * The '458th' episode of Replay is 'The 2018 Halloween Spooktacular', featuring \n * 'Fatal Frame II: Crimson Butterfly'.\n * \n * Ex. 3\n * 'Spyro the Dragon' is the name of the 'eleventh' episode of Replay. \n * The 'Replay Roulette' is 'Future Cop LAPD'.\n * \n * Ex. 4\n * The second segment for this episode is an installment of 'RePorted' featuring 'Rune Caster'.\n * \n * Ex. 5\n * The episodes second segment is 'Reported'.\n */\n }", "function mostarTodosLosTagsEnPelicula(movieTags){\n var tags = \"\";\n var espacio = \" \";\n movieTags.forEach(function(tag){\n tags += espacio + tag.name;\n });\n return tags;\n}", "function generateContent(index) {\n var spec_event, content;\n if(mode == 0) {\n spec_event = films_array[index];\n content = '<h2 align=\"center\">' + spec_event.title + '<br/><br/>' +\n '<img src=\"'+spec_event.imageURL+'\" /><br/>' + '</h2><br/>' +\n '<b>Description: </b>' + spec_event.description + '<br/><br/>'+\n '<b>Tagline: </b>' + spec_event.tagline + '<br/>' +\n '<b>Genre: </b>' + spec_event.genre + '<br/>' +\n '<b>Director: </b>' + spec_event.director + '<br/>' +\n '<b>Producer: </b>' + spec_event.producer + '<br/>' +\n '<b>Writer: </b>' + spec_event.writer + '<br/>' +\n '<b>Cinematographer: </b>' + spec_event.cinematographer +'<br/>' +\n '<b>Editor: </b>' + spec_event.editor + '<br/>' +\n '<b>Cast: </b>' + spec_event.cast + '<br/>' +\n '<b>Country: </b>' + spec_event.country + '<br/>' +\n '<b>Language: </b>' + spec_event.language + '<br/>' +\n '<b>Film Info: </b>' + spec_event.film_info + '<br/>';\n \n } else if(mode == 1 || mode == 2) {\n if(mode == 1) spec_event = events_array[index];\n else if(mode == 2) spec_event = forums_array[index];\n content = '<h2 align=\"center\">' + spec_event.title + '</h2><br/><br/>';\n content += spec_event.description + '<br/>';\n content += spec_event.start_time + '<br/>';\n content += spec_event.end_time + '<br/>';\n content += spec_event.venue + '<br/>';\n }\n return content;\n}", "function printFilmTvSeries(arrayFilmTV, type) {\r\n var source = $(\"#film-template\").html();\r\n var template = Handlebars.compile(source);\r\n\r\n for (var i = 0; i < arrayFilmTV.length; i++) {\r\n var singoloFilmTv = arrayFilmTV[i];\r\n\r\n var singleId = singoloFilmTv.id\r\n //stampa solo film e serietv\r\n // stampo con handlebars le chiavi che mi interessano\r\n var context =\r\n {\r\n poster: posterOrNot(singoloFilmTv.poster_path),\r\n title: singoloFilmTv.title || singoloFilmTv.name,\r\n titleOriginal: singoloFilmTv.original_title || singoloFilmTv.original_name,\r\n language: flags(singoloFilmTv.original_language),\r\n vote: starsVote(singoloFilmTv.vote_average),\r\n overview: singoloFilmTv.overview,\r\n movie_id: singoloFilmTv.id\r\n };\r\n var html = template(context);\r\n $('.list-film').append(html);\r\n\r\n getGenere(singleId, type);\r\n }\r\n\r\n}", "function showallfilms(films) {\n items.innerHTML = \"\";\n for (var i=0;i<films.length;i++){\n items.innerHTML += defLa[0] + i + defLa[1] + i + defLa[2] + films[i].image + defLa[3] + \" Title: \" +films[i].title + \" <br>Genre: \" + films[i].genre + defLa[4] + films[i].rating + defLa[5];\n }\n}", "function afficherVedette(film, filmDiv) {\n const section = document.createElement('section');\n\n const Vedette = film['vedette']; //Emmagasiner la valeur de la propriété JSON 'Vedette' dans la varaible tableau heroes \n // Récupérer les éléments du tableau Vedette pour remplir notre page html\n for (var i = 0; i < Vedette.length; i++) {\n const myArticle = document.createElement('article');// Pour chaque vedette, créer un article ('article'), une entête h2 ('h2'), 1 paragraphe ('p')\n const myH2 = document.createElement('h2');\n const myPara1 = document.createElement('p');\n\n myH2.textContent = Vedette[i].Nom; // Utiliser la valeur de la propriété JSON 'Nom' retourné par le serveur pour initialiser le texte de notre entête h2\n myPara1.textContent = 'Personnage: ' + Vedette[i].personnage + '\\n age: ' + Vedette[i].age; // Utiliser la valeur de la propriété JSON 'Personnage' retourné par le serveur pour initialiser le paragraphe\n\n // Assigner(associer) l'entête myH2 et le paragraphes myPara1 à l'article myArticle\n myArticle.appendChild(myH2);\n myArticle.appendChild(myPara1);\n\n filmDiv.appendChild(myArticle); // Associer notre article a notre section de la page HTML\n }\n}", "function computeStringMovimentoGestione(movgestName, subName, capitoloName, source) {\n var res = '';\n var movgest = source[movgestName];\n var sub = source[subName];\n var capitolo = source[capitoloName];\n\n if(capitolo) {\n res += (capitolo.bilancio ? capitolo.bilancio.anno : capitolo.annoCapitolo) + '/';\n }\n if(movgest) {\n res += movgest.annoMovimento + '/' + movgest.numero;\n }\n if(sub) {\n res += '-' + sub.numero;\n }\n return res;\n }", "function movie_item(title, poster_path, release_date, popularity, vote_average, vote_count) {\n return \"\" +\n \"<li class=\\\"movies__item\\\">\" +\n \" <a class=\\\"movies__link\\\" href=\\\"https://www.themoviedb.org/search?language=fr&query=\" + title + \"\\\" target='_blank'>\" +\n \" <div class=\\\"movies__infos\\\">\" +\n \" <div class=\\\"movies__release_date\\\">Sortie il y a \" + formatDistance(new Date(release_date), new Date(), {locale: fr}) + \"</div>\" +\n \" <div class=\\\"movies__popularity\\\">Popularité de <b>\" + popularity + \"</b></div>\" +\n \" <div class=\\\"movies__votes\\\">\" +\n \" <div class=\\\"movies__vote_average\\\">Moyenne de <b>\" + vote_average + \"</b></div>\" +\n \" <div class=\\\"movies__vote_count\\\">avec <b>\" + vote_count + \"</b> votes</div>\" +\n \" </div>\" +\n \" </div>\"\n + \"<figure class='movies__figure'>\" +\n \" <img src=\\\"http://image.tmdb.org/t/p/w500\" + poster_path + \"\\\"\" +\n \" alt=\\\"Elephant at sunset\\\"\" +\n \" class='movies__img'>\" +\n \" <figcaption class='movies__caption'>\" + title + \"</figcaption>\" +\n \" </figure>\"\n +\"</a>\"\n +\"</li>\";\n}", "function drawTableFilms(film){\n\t\tinfoFilms = $('#tableContent').html();\n\t\tinfoFilms += \"<tr>\"+\n\t\t\t\"<td><img src='/img/Films/\"+ IgnoreSpecialCharactersFromString(film.title)+ \".jpg' class='charactersIMG center-block'</td>\"+\n\t\t\t\"<td><b>Title: </b>\"+ film.title+\"</td>\"+\n\t\t\t\"<td><b>Director: </b>\"+ film.director+\"</td>\"+\n\t\t\t\"<td><b>Producer: </b>\"+ film.producer+\" Years</td>\"+\n\t\t\t\"<td><b>Release Date: </b>\"+ film.release_date+\"</td>\"+\n\t\t\t// \"<td><b>Created: </b>\"+ film.created+\"</td>\"+\n\t\t\t// \"<td><b>Edited: </b>\"+ film.edited+\" </td>\"+\n\t\t\t\"<td><b>Characters: </b>\"+drawModal(film.characters, film.title+\"Characters\", 'people')+\"</td>\"+\n\t\t\t\"<td><b>Species: </b>\"+drawModal(film.species, film.title+\"Species\", 'species')+\"</td>\"+\n\t\t\t\"<td><b>Starships: </b>\"+drawModal(film.starships, film.title+\"Starships\", 'starships')+\"</td>\"+\n\t\t\t\"<td><b>Vehicles: </b>\"+drawModal(film.vehicles, film.title+\"Vehicles\", 'vehicles')+\"</td>\"+\n\t\t\t\"</tr>\";\n\n\t\t$table.html(infoFilms);\n\t}", "function videoName(){\n var artistName = document.getElementById(\"name\").value;\n var artistName2 = document.getElementById(\"name2\").value;\n var descriptiveItem = document.getElementById(\"mood\").value;\n var descriptiveItem2 = document.getElementById(\"instrument\").value;\n var songName = document.getElementById(\"songName\").value.toUpperCase();\n // var genre = document.getElementById(\"genre\").value;\n var title = `(FREE) ${artistName} x ${artistName2} Type Beat - ${songName}`;\n var titleNode = document.createTextNode(title);\n titleParagraph.appendChild(titleNode);\n}", "function generateTitle(ref, enfermedad) {\n var tituloFormat = '<h4 class=\"page-head-line\">DATOS DE LA ENFERMEDAD ' + '(' + enfermedad.name + ')</h4>';\n ref.innerHTML = tituloFormat;\n}", "function CreateOtherData(ppl_object)\n{\n//name and title\n\tvar string=\"\";\n\tfor ( key in ppl_object)\n\t{\n\t\tstring+=\"<br> <b>\"+ ppl_object[key][\"title\"] + \": </b>\" +ppl_object[ key][\"name\"];\n\t}\n\treturn string;\n}", "function getFilmoviGlumca(data) {\n var broj = data.id;\n var ruta = \"http://localhost:8080/glumci/film\";\n\n var data = {};\n data.glumac_id = \"\"+broj+\"\";\n data.name = \"Jackie\";\n data.lastname = \"Chan\";\n data.nationality = \"Chinese\";\n data.birthyear = \"1954\";\n var json = JSON.stringify(data);\n \n\n var httprequest = new XMLHttpRequest();\n\n httprequest.onreadystatechange = function() {\n if (httprequest.readyState == 4) {\n\n // ova linija 412 cisti prethodno dovucenog glumca\n document.getElementById(\"content\").innerHTML = httprequest.responseType; \n \n var ourFilmData = JSON.parse(httprequest.responseText);\n renderFilmHTML(ourFilmData);\n console.log(ourFilmData);\n }\n }\n\n httprequest.open(\"POST\", ruta, true);\n httprequest.setRequestHeader(\"Content-type\", \"application/json\");\n httprequest.send(json);\n}", "function displayMoreInformationAboutMovie(theId) {\n let displayMoreInformation = `\n <h2>${theId.Title}</h2>\n <div class=\"moviePoster\"><img src=\"${theId.Poster}\" alt=\"Picture of the movie\"></div>\n <p><span class=\"plot\">\"${theId.Plot}\"</span></p>\n <p><span class=\"bold\">Imdb rating: </span> ${theId.imdbRating}</p>\n <p><span class=\"bold\">Actors: </span>${theId.Actors}</p>\n <p><span class=\"bold\">Genres: </span>${theId.Genre}</p>\n <p><span class=\"bold\">Runtime: </span>${theId.Runtime}</p>\n <p><span class=\"bold\">Writer(s): </span>${theId.Writer}</p>\n <p><span class=\"bold\">Released: </span>${theId.Released}</p>\n \n`;\n\n movieInformation.innerHTML = displayMoreInformation;\n}", "function pokazListeFilmow(msg) {\n listaFilmow = msg;\n var wiersze = document.querySelectorAll(\".filmStyle\");\n $('#result').addClass(\"active\");\n for (var i = 0; i < wiersze.length; i++) {\n var kontener = document.createDocumentFragment();\n var zdjecie = document.createElement(\"img\");\n var wiecej = document.createElement(\"div\");\n wiecej.className = \"filmWiecej\";\n var tytul = document.createElement(\"h2\");\n tytul.appendChild(document.createTextNode(msg[i].movieTitle));\n wiecej.appendChild(tytul);\n zdjecie.setAttribute(\"src\", msg[i].linkDoZdjecia);\n zdjecie.className += 'img-rounded';\n zdjecie.style.width = '300px';\n zdjecie.style.height = '300px';\n kontener.appendChild(zdjecie);\n var dane = document.createElement(\"h5\");\n dane.appendChild(document.createTextNode(msg[i].country + \", \" + msg[i].releaseDate + \", \" + msg[i].movieType));\n wiecej.appendChild(dane);\n var opis = document.createElement(\"p\");\n opis.appendChild(document.createTextNode(msg[i].shortDescription));\n wiecej.appendChild(opis);\n\n kontener.appendChild(wiecej)\n wiersze[i].textContent = \"\";\n wiersze[i].appendChild(kontener);\n }\n}", "function getAuthorAndYearString (i) {\n var authoryear='This speech was written by ' + speechesArray[i].author + ' in ' + speechesArray[i].year + '<br>';\n document.getElementById('ConsoleDisplay').innerHTML = authoryear;\n}", "function printFilm(array, append, type ) {\r\n for (var i= 0; i < array.length; i++) {\r\n var source = $(\"#entry-template\").html();\r\n var template = Handlebars.compile(source); \r\n var film = array[i];\r\n var vote = Math.ceil(film.vote_average)/2;\r\n var title;\r\n var original_title; \r\n var num = i; \r\n \r\n if (type == 'film') {\r\n title = film.title;\r\n original_title= film.original_title;\r\n } else if (type == 'serie') {\r\n title = film.name;\r\n original_title= film.original_name;\r\n };\r\n\r\n if (append == 'film') {\r\n append = $('#film');\r\n } else if (append == 'filmPop') {\r\n append = $('#film-popular'); \r\n } else if (append == 'serie') {\r\n append = $('#serie');\r\n } else if (append == 'seriePop') {\r\n append = $('#serie-popular'); \r\n };\r\n\r\n var image;\r\n var urlBaseImage = 'https://image.tmdb.org/t/p/w185';\r\n if(film.poster_path == null) {\r\n image = '<img src=\"img/unnamed.png\" alt=\"'+ title + '\"></img>';\r\n } else {\r\n image = '<img src=\"' + urlBaseImage + film.poster_path + '\" alt=\"'+ title + '\"></img>';\r\n }\r\n \r\n var imgBig;\r\n var urlBaseImageBig = 'https://image.tmdb.org/t/p/w342';\r\n if (film.poster_path == null) {\r\n imgBig = '<img src=\"img/unnamed.png\" alt=\"' + title + '\"></img>';\r\n } else {\r\n imgBig = '<img src=\"' + urlBaseImageBig + film.poster_path + '\" alt=\"' + title + '\"></img>';\r\n }\r\n\r\n var context = { \r\n title: title,\r\n img: image,\r\n imgBig: imgBig,\r\n original_title: original_title,\r\n lang: printFlag (film.original_language),\r\n overview: film.overview,\r\n vote_average: vote,\r\n star: printStar (vote),\r\n id: film.id,\r\n genreId: film.genre_ids,\r\n num\r\n }; \r\n \r\n var html = template(context); \r\n append.append(html); \r\n }\r\n}", "function getMovieData(num) {\r\n // These three strings encode placeholder images. You will want to set the\r\n // backgroundImage property in your real data to be URLs to images.\r\n var darkGray = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXY3B0cPoPAANMAcOba1BlAAAAAElFTkSuQmCC\";\r\n var lightGray = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXY7h4+cp/AAhpA3h+ANDKAAAAAElFTkSuQmCC\";\r\n var mediumGray = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXY5g8dcZ/AAY/AsAlWFQ+AAAAAElFTkSuQmCC\";\r\n\r\n var groupImage = \"http://t.douban.com/img/biz/poster-1357728694.jpg\";\r\n\r\n var movieGroups = [\r\n {\r\n key: \"movieGroup0\",\r\n title: \"本周口碑榜\",\r\n subtitle: \"数据来自豆瓣电影\",\r\n backgroundImage: groupImage,\r\n description: \"口碑榜是豆瓣根据用户最近一周收藏的不低于7分的新片、依据算法按“评分+热度”排序的结果。\"\r\n },\r\n {\r\n key: \"movieGroup1\",\r\n title: \"豆瓣电影TOP250\",\r\n subtitle: \"数据来自豆瓣电影\",\r\n backgroundImage: groupImage,\r\n description: \"豆瓣用户每天都在对“看过”的电影进行“很差”到“力荐”的评价,豆瓣根据每部影片看过的人数以及该影片所得的评价等综合数据,通过算法分析产生豆瓣电影250。\"\r\n },\r\n {\r\n key: \"movieGroup2\",\r\n title: \"Harry Potter Collection\",\r\n subtitle: \"合集由「看过」团队制作\",\r\n backgroundImage: groupImage,\r\n description: \"此合集收纳了「哈利波特」系列的八部电影。\"\r\n // todo: 根据豆列内容显示合集\r\n }\r\n ]\r\n\r\n var movieItems = [];\r\n var movieCollection = [];\r\n\r\n movieCollection.push(getWeeklyMovies());\r\n movieCollection.push(getMovies(\"/v2/movie/top250?count=\" + num.toString())); //array of douban movie objects\r\n movieCollection.push(getMovies(\"/v2/movie/search?q=harry%20potter&count=8\").sort(\r\n function (a, b) {\r\n return a.year - b.year;\r\n }\r\n ));\r\n\r\n \r\n\r\n for (var a = 0; a < movieCollection.length; a++) {\r\n for (var i = 0; i < (num <= movieCollection[a].length ? num : movieCollection[a].length) ; i++) {\r\n movieCollection[a][i] = formatMovieItem(movieCollection[a][i], movieGroups[a]);\r\n movieCollection[a][i].doubanSort = \"#\" + (i + 1).toString();\r\n movieItems.push(movieCollection[a][i]);\r\n }\r\n }\r\n\r\n return movieItems;\r\n }", "function movieInfo() {\n let tit = document.getElementById(\"title\")\n tit.innerText = allFilms[0].title\n\n let rntm = document.getElementById(\"runtime\")\n rntm.innerText = `${allFilms[0].runtime} minutes`\n\n let desc = document.getElementById(\"film-info\")\n desc.innerText = allFilms[0].description\n\n let shwt = document.getElementById(\"showtime\")\n shwt.innerText = allFilms[0].showtime\n\n let tix = document.getElementById(\"ticket-num\")\n let tixRem = (allFilms[0].capacity - allFilms[0].tickets_sold)\n tix.innerText = `${parseInt(tixRem)}`\n}", "function movieFormatResult(movie) {\n var markup = \"<table class='movie-result'><tr>\";\n if (movie.posters !== undefined && movie.posters.thumbnail !== undefined) {\n markup += \"<td class='movie-image'><img src='\" + movie.posters.thumbnail + \"'/></td>\";\n }\n markup += \"<td class='movie-info'><div class='movie-title'>\" + movie.title + \"</div>\";\n if (movie.critics_consensus !== undefined) {\n markup += \"<div class='movie-synopsis'>\" + movie.critics_consensus + \"</div>\";\n }\n else if (movie.synopsis !== undefined) {\n markup += \"<div class='movie-synopsis'>\" + movie.synopsis + \"</div>\";\n }\n markup += \"</td></tr></table>\";\n return markup;\n }", "function main(total, numReqs, movies) {\r\n\r\n var output = \"9 19 29 31 13 72 58 73 10 7 64 69 83 73 33 79 28 0 66 65 77 18 12 39 0 66 55 15 26 55 73 67 38 65 29 47 80 69 27 82 53 55 47 31 31 62 51 29 15 83 43 44 0 28 80 0 76 11 3 79 59 33 83 29 11 20 8 83 52 49 61 69 66 32 17 41 2 57 21 45 10 3 18 77 79 27 76 43 7 5 81 57 11 28 74 60 64 38 72 55 22 1 82 42 28 41 27 14 83 39 70 43 6 67 69 76 7 12 76 11 37 10 2 70 1 77 51 59 21 80 46 21 52 22 74 15 12 32 57 16 40 81 2 5 61 44 14 66 1 56 40 6 49 82 31 56 27 38 6 42 35 51 36 40 82 36 67 69 16 73 20 42 53 0 2 66 26 29 8 17 33 12 54 0 67 8 56 67 6 24 77 81 21 37 28 16 21 45 68 16 74 13 51 73 16 21 78 72 56 12 71 50 46 82 37 32 61 50 13 76 48 79 21 6 10 34 68 63 72 43 65 28 51 36 17 12 56 11 11 78 17 35 58 47 65 81 24 68 68 47 0 73 23 48 82 77 40 79 66 30 49 15 10 44 37 65 67 62 25 45 29 22 26 60 18 3 72 31 45 30 57 67 45 76 55 70 73 24 59 53 66 21 49 59 12 61 25 71 78 26 2 32 59 80 56 77 78 41 74 9 74 44 56 31 43 43 41 37 10 13 74 65 36 25 56 19 12 24 4 81 18 75 81 10 14 68 25 55 26 42 69 56 24 73 56 62 43 10 51 38 26 55 31 23 71 2 64 14 2 0 40 42 24 33 78 8 22 32 6 39 54 51 74 22 39 17 42 46 76 31 29 42 19 7 71 71 5 50 76 22 77 71 39 28 44 13 75 66 69 12 26 39 23 52 34 7 81 41 17 71 60 15 45 0 64 11 54 72 49 25 16 72 38 73 42 22 82 35 47 25 10 42 22 38 82 38 50 49 44 57 53 22 35 7 24 82 82 2 56 41 58 17 24 7 60 47 55 70 10 30 55 25 8 8 3 8 52 39 65 72 20 32 45 70 34 2 72 19 67 62 65 4 8 72 16 78 24 71 0 1 36 8 50 78 12 76 37 50 18 80 21 15 79 83 35 3 32 41 47 37 6 4 62 69 42 82 72 72 10 39 47 25 7 59 79 0 35 23 14 57 5 58 35 70 59 26 47 7 75 42 26 7 36 79 48 55 47 49 24 65 40 56 18 83 56 60 21 26 16 35 0 50 6 33 19 74 23 11 4 67 66 46 54 47 75 77 5 62 49 61 33 41 56 21 23 2 72 5 27 5 10 4 21 2 13 29 8 10 40 63 23 12 55 79 5 82 42 5 83 83 56 39 54 45 29 29 33 2 12 83 72 12 77 69 61 66 79 51 33 12 20 74 75 81 67 24 57 63 24 6 45 70 14 39 51 74 70 21 66 78 62 31 83 54 55 15 29 20 5 58 29 79 69 32 17 17 25 26 51 33 34 54 83 43 52 62 10 7 31 17 75 47 75 36 67 63 60 81 38 31 48 40 47 67 71 25 7 23 32 38 76 42 45 50 3 70 16 33 1 78 1 35 30 59 31 10 53 78 19 0 25 80 42 76 15 71 31 0 9 13 5 50 20 63 82 49 41 37 27 24 70 77 24 28 69 35 82 17 7 13 8 34 38 79 34 31 35 47 13 42 35 38 4 35 39 77 10 5 27 37 82 29 7 16 20 43 70 4 58 82 54 13 62 66 70 35 46 75 49 18 71 4 10 62 56 24 78 35 13 6 18 16 44 79 78 11 13 15 5 60 75 13 83 9 48 66 53 63 79 27 80 74 47 30 8 5 29 61 6 38 61 66 56 51 47 33 20 27 53 83 36 31 67 48 21 27 47 29 55 35 62 2 56 61 31 16 65 50 23 78 30 51 28 58 5 22 71 5 44 3 4 73 37 33 78 10 33 13 75 11 47 4 49 64 6 27 36\";\r\n var fs = require('fs');\r\n var _ = require('lodash');\r\n var moviesArr = getMovies(total);\r\n var requests = movies.split(' ');\r\n var result = [];\r\n\r\n for (var i = 0; i < requests.length; i++) {\r\n var cnt = 0;\r\n //fs.writeFileSync(\"log\" + requests[i] + \".json\", JSON.stringify(moviesArr));\r\n for (var j = 0; j < moviesArr.length; j++) {\r\n\r\n if (moviesArr[j].value === parseInt(requests[i])) {\r\n // console.log(moviesArr[j].index);\r\n for (var k = 0; k < moviesArr.length; k++) {\r\n\r\n if (moviesArr[k].index < moviesArr[j].index) {\r\n moviesArr[k].index++;\r\n } else if (moviesArr[k].index === moviesArr[j].index) {\r\n // console.log(moviesArr[k]);\r\n cnt = moviesArr[k].index - 1;\r\n moviesArr[k].index = 1;\r\n moviesArr = _.orderBy(moviesArr, 'index');\r\n break;\r\n }\r\n }\r\n break;\r\n }\r\n else {\r\n // cnt++;\r\n }\r\n\r\n }\r\n\r\n\r\n result.push(cnt);\r\n }\r\n\r\n console.log(result.join(' ') === output);\r\n return result.join(' ');\r\n}", "function printFilm(json){\n var titolo = json.titolo.toUpperCase();\n $(\"#titleText\").text(titolo);\n $(\"#tramaText\").text(json.trama);\n $(\"#annoText\").text(json.anno);\n $(\"#durataText\").text(json.durata+\"'\");\n $(\"#prezzoText\").text(json.prezzo+\"€\");\n $(\"#genereText\").text(json.genere);\n var name = json.titolo.replace(/\\s/g, '').replace(\"?\", '').replace(\"!\", '').toLowerCase();\n $(\"#imgFilm\").attr(\"src\",'../img/film/'+name+'.jpg');\n $(\"#buttonNoleggia\").on({\n click: noleggia\n });\n $(\"#buttonCarrello\").on({\n click: aggiungiCarrello\n });\n $(\"#buttonPreferiti\").on({\n click: aggiungiPreferiti\n });\n\n $(\".btn\").on({\n mouseover: function(){\n $(this).css(\"background-color\", \"rgba(4, 43, 170, 0.418)\");\n $(this).css('cursor','pointer');\n }, \n mouseout: function(){\n $(this).css(\"background-color\", \"\");\n },\n });\n\n $(\".nol\").on({\n mouseover: function(){\n $(this).css('cursor','pointer');\n $(this).css(\"background-color\", \"rgb(1, 21, 88)\");\n }, \n click: function(){\n $(this).css(\"color\", \"yellow\");\n },\n mouseout: function(){\n $(this).css(\"background-color\", \"blue\");\n }\n \n });\n\n\n\n $(\"#buttonPreferiti\").click(function(){$(this).attr(\"src\", \"../img/prefN.png\")});\n $(\"#buttonCarrello\").click(function(){$(this).attr(\"src\", \"../img/carrelloN.png\")});\n\n\n}", "function utworzTytul(film) {\n \n let tytul = document.createElement(\"div\");\n tytul.classList.add(\"tytul\");\n tytul.innerHTML = getTitle(film);\n\n return tytul;\n}", "function Movie(movieTitle, movieLength, movieGenre) {\n this.movieTitle = movieTitle;\n this.movieLength = movieLength;\n this.movieGenre = movieGenre;\n\n this.getAbb = function () {\n var firstIndex = 0;\n var lastIndex = this.movieGenre.length - 1;\n var output = this.movieGenre.charAt(firstIndex) + this.movieGenre.charAt(lastIndex);\n return output.toUpperCase();\n }\n\n this.getData = function () {\n var c = \"\";\n\n c = this.movieTitle + \" \" + this.movieLength + \"min\" + \" \" + this.getAbb();\n return c;\n }\n}", "function udskriveData(jsondata) {\n\n //Variabel til et at rumme filmresultatet i loopen\n var filmresultat = \"\";\n\n // Loop gennem jsondata\n for (var x in jsondata.FilmList) {\n\n //style det gerne lidt med en div rundtt om eller andet\n filmresultat += \"<div>\" + jsondata.FilmList[x].Title + \"(\" + jsondata.FilmList[x].ReleaseYear + \")</div>\";\n }\n\n //Udskriv i html\n document.getElementById(\"resultat\").innerHTML = filmresultat;\n\n}", "function buildCardMovie(movies, baseindex=0){\n let htmlMovieInfo = movies.map((movie, index ) => `<div class=\"gallery-item\">\n <img src=\"img/${movie.cardImg}\" alt=\"${movie.titulo}\" data-set=\"${baseindex+ index}\">\n </div>`).join('');\n\n return htmlMovieInfo;\n}", "addGenresNamesForAllMovies () {\n this.data.movies.forEach(movie => {\n movie.genres = movie.genre_ids.map((val, i, arr) => {\n let genreName = '';\n\n for (let i = 0; i < this.data.genres.length; i++) {\n if (val === this.data.genres[i].id) {\n genreName = this.data.genres[i].name;\n\n // End the cycle to avoid unnecessary loops.\n i = this.data.genres.length;\n }\n }\n\n // Wrapping each genre to a span so white space can be controlled (to not break multi word genres).\n return `<span>${genreName}</span>`;\n }).join(', ');\n });\n }", "function skuespillere() {\n var movie_details = movie_object;\n var skuespillere = document.createElement(\"p\");\n content = movie_details[\"folk\"];\n \n if (content == null) {\n content = \" [ Ingen beskrivelse ] \";\n }\n else {\n skuespillere.textContent = content;\n folk.appendChild(skuespillere);\n }\n }", "function getData(genre, idName) {\n // CONVERTI LE FICHIER MINIFIER EN JSON POUR LIRE LE DATA\n fetch(genre).then((reponse) => {\n return reponse.json();\n }).then((data) => {\n //STOCKER LES DONNÉES DANS MA VARIABLE\n const content = data.results;\n // console.log(content); \n // PARCOURIR TOUS LES FILMS PAR GENRE ET INSERER LA BALISE IMG POUR AFFICHER LES IMG\n content.forEach(movie => {\n document.getElementById(\"\" + idName + \"\").insertAdjacentHTML(\"beforeend\", `<img data-id=\"${movie['id']}\" src=\"${posterUrl}${movie['poster_path']}\" class=\"posters\"/>`);\n });\n });\n}", "function aggiungiDettagli(id,type,api_key,context) {\n var url;\n if (type === \"Film\") {\n url = 'https://api.themoviedb.org/3/movie/' + id;\n }else if (type === \"Serie TV\") {\n url = 'https://api.themoviedb.org/3/tv/' + id;\n }\n $.ajax({\n url : url,\n data : {\n \"api_key\" : api_key,\n \"language\" : \"it-IT\"\n },\n method : \"GET\",\n success : function (data) {\n var genres = [];\n // console.log(data);\n var arrayGeneri = data.genres;\n for (var i = 0; i < arrayGeneri.length; i++) {\n genres.push(arrayGeneri[i].name);\n }\n context.genres = genres;\n aggiungiDettagliAutori(url,api_key,context,type)\n },\n error : function() {\n errore(\"Si è verificato un errore\");\n }\n });\n }", "function convertToString() {\n\tarrayString = genreInfo.toString();\n\tobjectString = JSON.stringify(userInfo);\n}", "function renderMovies(title, desc, year, id, pic, movieSection) {\n let movieCard = `<div class=\"row justify-content-center\">`;\n\n for (let i = 0; i < id.length; i++) {\n movieCard += `<div class=\"card movie_card\">\n <img src=\"${pic[i]}\" class=\"card-img-top\" alt=\"${title[i]}\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${title[i]}</h5>\n <p class=\"card-text\">${desc[i]}</p>\n \n </div>\n <div class=\"card-footer\">\n <span class=\"movie_info\">${year[i]}</span><span class=\"movie_info float-end\">&#9733 9 / 10</span>\n </div>\n </div>`;\n }\n movieCard += \"</div>\";\n movieSection.innerHTML = movieCard;\n}", "function domBuilder(movie){\n let movieobj = {\n title : [],\n id : [],\n posterpath : []\n };\n\n movie.forEach((data)=>{\n movieobj.title.push(data.original_title);\n movieobj.id.push(data.id);\n movieobj.posterpath.push(data.poster_path);\n });\n // console.log(\"obj from domBuilder\", movie);\n $(\".row\").html('');\n movie.forEach((item,index) => {\n // console.log(\"castiss?\", item.cast);\n \n if (item.poster_path!==null) {\n \n \n \n $(\".row\").append(cards(item));\n \n // console.log(\"BIGASS ITEM\", item.id);\n let realid = item.id;\n \n \n\n\n }\n // if (item.cast !==undefined) {\n \n // }\n \n\n });\n\n}", "function printGenres(objectGeneri, id) {\r\n var source = $(\"#genere-template\").html();\r\n var template = Handlebars.compile(source);\r\n\r\n var dataId = $('.film[data-id=\"'+ id +'\"]');\r\n var arrayGenres = [];\r\n\r\n for (var i = 0; i < objectGeneri.length; i++) {\r\n var singleGenre = objectGeneri[i];\r\n var genre = singleGenre.name;\r\n arrayGenres.push(genre)\r\n }\r\n var context =\r\n {\r\n generi: arrayGenres\r\n };\r\n\r\n var html = template(context);\r\n dataId.find('.genere').append(html);\r\n}", "function wordToText(words){\n var text=\"\";\n for(var i in words){\n text = text+ words[i].word+\",\"+words[i].width+\",\"+words[i].length+\"<br>\";\n } \n return text;\n}", "function readTitles(_aMoviesArr) {\r\n var _stringToShow = \"The names of the movies are: \";\r\n\r\n for (var i = 0; i < _aMoviesArr.length; i++) {\r\n if (i < _aMoviesArr.length - 1) {\r\n _stringToShow += _aMoviesArr[i].Title + \", \";\r\n } else \r\n {\r\n _stringToShow += _aMoviesArr[i].Title;\r\n }\r\n }\r\n _stringToShow += \".\";\r\n return _stringToShow;\r\n\r\n}", "format(audiogramId, jsonObj) {\n var resp = `\n <div id=\"filters display_animal_details\">\n ${this._format_vernacular_selector(jsonObj.ott_id)}\n ${this._format_name_input(jsonObj.individual_name)}\n ${this._format_sex_selector(jsonObj.sex)}\n ${this._format_liberty_selector(jsonObj.liberty_status)}\n ${this._format_lifestage_selector(jsonObj.life_stage)}\n ${this._format_age_input(jsonObj.age_in_month)}\n ${this._format_captivity_input(jsonObj.captivity_duration_in_month)}\n </div>`;\n return resp;\n }", "function displayOneFilmMore(film){\n\tconsole.log(\"Display film:\")\n\tconsole.log(film)\n\tvar filmHTML = \t$(\"<li></li>\").text(\n\t\t\tfilm['titre'] + ' (' \n\t\t\t+ film['duree'] + 'min)'\n\t\t\t)\n\t$(\"#listFilm\").append(filmHTML)\n}", "function Display_Movie_Bios(film)\n{\n var indexNumber = movieIndex.indexOf(film);\n document.getElementById(\"Movie_Name\").innerHTML = film;\n document.getElementById(\"Movie_Description\").innerHTML = movies[indexNumber][0];\n\n var img = document.createElement('img');\n img.setAttribute('src', movies[indexNumber][1]);\n document.getElementById('Movie_Poster').appendChild(img);\n}", "function createFile() {\r\n const iterator1 = stories[Symbol.iterator]();\r\n var combos = \"\";\r\n for (const item of iterator1) {\r\n combos = combos + item[0] + '\\n' + splitConstant + '\\n' + item[1] + '\\n' + splitConstant + '\\n';\r\n }\r\n var text = combos;\r\n var filename = 'stories.txt';\r\n var element = document.createElement('a');\r\n element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));\r\n element.setAttribute('download', filename);\r\n element.style.display = 'none';\r\n document.body.appendChild(element);\r\n element.click();\r\n document.body.removeChild(element);\r\n}", "function filmRequire() {\n const requestFilms = JSON.parse(this.responseText);\n const movieTitles = requestFilms.title;\n console.log(requestFilms);\n let li = document.createElement('li');\n li.innerHTML = movieTitles;\n movieFilms.appendChild(li);\n\n}", "function movieThis(){\n var movie = process.argv[3];\n if(!movie){\n movie = \"Wonder Woman\";\n }\n params = movie\n request(\"http://www.omdbapi.com/?&t=\" + params + \"&apikey=40e9cece\", function (error, response, body) {\n if (!error && response.statusCode == 200) {\n var movieObject = JSON.parse(body);\n //console.log(movieObject)\n var movieResults =\n (\"Title: \" + movieObject.Title);\n (\"Year: \" + movieObject.Year);\n (\"Imdb Rating: \" + movieObject.imdbRating);\n (\"Country: \" + movieObject.Country);\n (\"Language: \" + movieObject.Language);\n (\"Plot: \" + movieObject.Plot);\n (\"Actors: \" + movieObject.Actors);\n (\"Rotten Tomatoes Rating: \" + movieObject.tomatoRating);\n (\"Rotten Tomatoes URL: \" + movieObject.tomatoURL);\n\n console.log(movieResults);\n log(movieResults); // calling log function\n } else {\n console.log(\"Error :\"+ error);\n return;\n }\n });\n }", "function loadMovieDescription(pos) {\n $('.movie-plot').text(movies[pos].summary);\n // $('#moviegenres').text(movies[pos].Genres);\n //$('#moviedirector').text(movies[pos].director);\n $('.movie-cast').text(movies[pos].cast);\n $(\".movie_img\").show();\n}", "constructext(item) {\r\n var returntext =\r\n item.day +\r\n \" \" +\r\n item.startTime +\r\n \" - \" +\r\n item.endTime +\r\n \" - Grade \" +\r\n item.grade +\r\n \" - \" +\r\n item.courseDescription;\r\n return returntext;\r\n }", "function printMovieDetail() {\n if (movie.bkgimage != null) {\n bkgImageElt.css('background-image', `url(${movie.bkgimage})`);\n }\n else {\n bkgImageElt.css('background-image', `linear-gradient(rgb(81, 85, 115), rgb(21, 47, 123))`);\n }\n\n titleElt.text(movie.title);\n modalTitle.text(movie.title);\n originaltitleElt.text(movie.originaltitle);\n resumeElt.text(movie.resume);\n dateElt.text(printDateFr(movie.date));\n durationElt.text(printDuration(movie.duration));\n imgElt.attr('src', movie.image);\n iframe.attr('src', movie.traileryt + \"?version=3&enablejsapi=1\");\n // Afficher la liste des acteurs\n var actorsStr = '';\n for (var actor of movie.actors) {\n actorsStr += actor + ' | ';\n }\n actorsElt.text(actorsStr);\n // afficher le réalisteur\n directorElt.text(movie.director);\n}", "function dodajFilm() {\n\n // resetowanie pola jesli tam wczesniej bylo cos wpisane\n parWalidacjaDodanegoFilmu.innerHTML = \"\";\n \n let filmDoDodania = \"\";\n let FilmZweryfikowany = weryfikujFilm();\n \n // weryfikacja dodanego filmu\n // sprawdza czy wczesniej bylo sortowanie\n // jesli nie to film dodawany jest na koniec listy filmow i kafelkow\n if (FilmZweryfikowany && ostatnioSortowanePo === \"\"){\n\t// dodanie zweryfikowanego filmu na koniec listy filmow\n\tfilmDoDodania += poleDodajTytul.value + \" (\" + poleDodajRok.value + \")\";\n\tlistOfMovies.push(filmDoDodania);\n\n\t// wyswietlenie wiadomosci o dodaniu filmu\n\tparWalidacjaDodanegoFilmu.innerHTML = \"Pomyślnie dodano film do \" +\n\t \"końca listy filmów\";\n\tparWalidacjaDodanegoFilmu.style.color = \"green\";\n\t\n\n\tusunListeKafelkow(); \t// usuwa liste kafelkow\n\t// a teraz ja odtwarza\n\toutput.appendChild(utworzListeKafelkow(listOfMovies));\n\t\n\t// updateujemy i wyswietlamy liczbe filmow i liczbe filmow widocznych\n\tupdateFilmyWszystkieIwidoczne();\n\twyswietlFilmyWszystkieIwidoczne();\n\t\n\t// update listyTagow\n\tupdateListaTagow();\n\n\t// sprawdza czy wczesniej bylo sortowanie\n\t// jesli tak (po roku) to film dodawany jest w odp. miejsce listy i kafelkow\n } else if (FilmZweryfikowany && ostatnioSortowanePo === \"rok\") {\n\trokRosnaco = !rokRosnaco; // zamieniamy do stanu poprzedniego sortowania\n\n\t// dodanie zweryfikowanego filmu na koniec listy filmow\n\tfilmDoDodania += poleDodajTytul.value + \" (\" + poleDodajRok.value + \")\";\n\tlistOfMovies.push(filmDoDodania);\n\n\t// sortujemy po roku\n\t// (tu jest usuwanie i tworzenie listy kafelkow, \n\t// update liczby filmow i filmow widocznych)\n\tsortujPoRoku();\n\n\t// updateujemy tagi\n\tupdateListaTagow();\n\n\t// wyswietlenie wiadomosci o dodaniu filmu\n\t// tu film zostal wstawiony we wlasciwe miejsce a nie na koniec kafelkow\n\tparWalidacjaDodanegoFilmu.innerHTML = \"Pomyślnie dodano film do listy.\";\n\tparWalidacjaDodanegoFilmu.style.color = \"green\";\n\t\n\t// sprawdza czy wczesniej bylo sortowanie\n\t// jesli tak (po tytule) to film dodawany jest w odp. miejsce listy i kafelkow\n } else if (FilmZweryfikowany && ostatnioSortowanePo === \"tytul\"){\n\n\ttytulRosnaco = !tytulRosnaco; // zamieniamy do stanu poprzedniego sortowania\n\n\t// dodanie zweryfikowanego filmu na koniec listy filmow\n\tfilmDoDodania += poleDodajTytul.value + \" (\" + poleDodajRok.value + \")\";\n\tlistOfMovies.push(filmDoDodania);\n\n\t// sortujemy po tytule\n\t// (tu jest usuwanie i tworzenie listy kafelkow,\n\t// update liczby filmow i filmow widocznych)\n\tsortujPoTytule();\n\t\n\t// updateujemy tagi\n\tupdateListaTagow();\n\n\t// wyswietlenie wiadomosci o dodaniu filmu\n\t// tu film zostal wstawiony we wlasciwe miejsce a nie na koniec kafelkow\n\tparWalidacjaDodanegoFilmu.innerHTML = \"Pomyślnie dodano film do listy.\";\n\tparWalidacjaDodanegoFilmu.style.color = \"green\";\n\t\n }\n \n // resetowanie zawartosci poleDodajTytul i poleDodajRok\n // po dodaniu nowego filmu\n poleDodajTytul.value = \"\";\n poleDodajRok.value = \"\";\n \n}", "function descriptionCreature(Creature) {\n if (Creature.gender == \"женщина\") {t0 = \"ась\"; t1 = \"Она\"; t2=\"я\"; t3=\"ла\" } else {t0 = \"ся\"; t1=\"Он\"; t2=\"й\";; t3=\"л\" }\n count0 = allCreatures.length>1 ? `И стало их ${allCreatures.length} на планете.` : ``;\n let txt = `Родил${t0} ${Creature.subType}-${Creature.gender} ${Creature.name} в год ${Creature.generation}-й. `;\n txt += `${t1} - ${Creature.id+1}-${t2} из всех. ${count0} ${t1} говори${t3}: ${Creature.mood}`;\n Log(txt,\"Born\");\n /* let txt = `A ${Creature.subType}-${Creature.gender} ${Creature.name} was born in generation ${Creature.generation}. `;\n txt1 = Creature.gender == \"female\" ? \"She\" : \"Hi\";\n txt += `${txt1} was № ${Creature.id} of all. Now their ${allCreatures.length}. ${txt1} said: ${Creature.mood}`; */\n}", "function convertidor(text) {\n let convrtm = text.toLowerCase();\n let frLett = convrtm.charAt(0);\n let convrtM = frLett.toUpperCase();\n let restTxt = convrtm.substr(1,9999);\n console.log(`Your converted phrase is: ${convrtM}${restoTxt}`);\n // console.log(`Su frase convertida es: ${convrtM}${restoTxt}`);\n // console.log(`Sua frase convertida é: ${convrtM}${restoTxt}`);\n // console.log(`Sa phrase convertie est: ${convrtM}${restoTxt}`);\n }", "function buildOutlook(tvjson) {\r\n var newFilm = document.getElementById(\"newShows\");\r\n var tbl = document.createElement(\"table\");\r\n var tblbody = document.createElement(\"tbody\");\r\n for (var i = 0; i < tvjson.length; i++) {\r\n var row = document.createElement(\"tr\");\r\n var cellOne = document.createElement(\"td\");\r\n var cellTwo = document.createElement(\"td\");\r\n var cellThree = document.createElement(\"td\");\r\n var cellFour = document.createElement(\"td\");\r\n cellOne.textContent = tvjson[i].series.title;\r\n cellTwo.textContent = tvjson[i].title;\r\n cellThree.textContent = \"s\" + tvjson[i].seasonNumber + \"E\" + tvjson[i].episodeNumber;\r\n cellFour.textContent = tvjson[i].airDate + \" \" + tvjson[i].series.airTime;\r\n row.appendChild(cellOne);\r\n row.appendChild(cellTwo);\r\n row.appendChild(cellThree);\r\n row.appendChild(cellFour);\r\n tblbody.appendChild(row);\r\n tbl.appendChild(tblbody);\r\n }\r\n tbl.setAttribute(\"class\", \"w3-table w3-striped w3-white\");\r\n newFilm.appendChild(tbl); \r\n}", "function filmRequire() {\n const requestFilms = JSON.parse(this.responseText);\n const movieTitles = requestFilms.title;\n console.log(requestFilms);\n let li = document.createElement('li');\n li.innerHTML = movieTitles;\n movieFilms.appendChild(li);\n }", "function movieThis(movie) {\n \n // In case of empty movie, it will use this one as default\n if (movie === \"\") {\n movie = \"Mr. Nobody\";\n }\n\n var description = \"These are the information about the movie \" + movie.toUpperCase() + \":\\n\\n\";\n\n var queryUrl = \"http://www.omdbapi.com/?t=\" + movie + \"&y=&plot=short&apikey=trilogy\";\n\n axios.get(queryUrl).then(\n function (response) {\n\n var divider = \"\\n------------------------------------------------------------\\n\\n\";\n var data = response.data;\n var movieData;\n\n // If data comes empty\n if (data == 0) { //need to review this one\n movieData = \"There's no movie like this.\\n\";\n } else {\n\n // To get the data from Rotten Tomatoes\n var rottenTomatoes = \"\";\n\n for (var i = 0; i < data.Ratings.length; i++) {\n if (data.Ratings[i].Source == \"Rotten Tomatoes\") {\n rottenTomatoes = data.Ratings[i].Value;\n }\n }\n\n // Creating a variable with all data required to use on print/save\n movieData = [\n \"\\tMovie: \" + data.Title,\n \"\\tYear Released: \" + data.Year,\n \"\\tiMDB Rating: \" + data.imdbRating,\n \"\\tRotten Tomatoes Rating: \" + rottenTomatoes,\n \"\\tCountry: \" + data.Country,\n \"\\tLanguage: \" + data.Language,\n \"\\tActors: \" + data.Actors,\n \"\\tPlot: \" + data.Plot\n ].join(\"\\n\");\n }\n\n // Saving data in file\n fs.appendFile(\"log.txt\", divider + description + movieData + \"\\n\", function (err) {\n console.log(divider + description + movieData + \"\\n\");\n if (err) throw err;\n });\n\n })\n\n .catch(function (error) {\n if (error.response) {\n console.log(error.response);\n }\n });\n}", "function showMovies(){\n let memory = localStorage.getItem(\"MyMovies\");\n console.log(memory);\n let parsedMemory = JSON.parse(memory);\n console.log(parsedMemory);\n\n\n parsedMemory.forEach(movie => {\n \n let cast = movie.cast;\n let castArray = cast.split(\",\");\n \n // append cards\n $(\"#movie-cards\").append(\n `<div class=card><img class=card-img-top src=\"\"></img><div class=card-body><div class=text-center id=card-text><p id = card-title>${movie.title} ${movie.year}</p><p class=card-text id=genre>genre: ${movie.genre}<p class=card-text id=director>dir: ${movie.director}</p><p class=card-text id=cast>top-billed: ${castArray[0]}, ${castArray[1]},</p><p class=card-text id=cast>${castArray[2]}, ${castArray[3]}.</p><p class=card-text id=plot>${movie.plot}</p></div><div class=my-info> <p id=rating>${movie.rating}/5</p><p id=review>${movie.review}</p></div>`\n );\n\n })}", "function weryfikujFilm() {\n \n let czyOk = true;\n\n // + 1900 bo:\n // https://www.tutorialspoint.com/javascript/date_getyear.htm\n let aktualny_rok = new Date().getYear() + 1900;\n // wg. https://en.wikipedia.org/wiki/Film najstarszy znany film pochodzi z 1888\n \n // dodanie koloru czerwonego do czcionki z ostrzezeniem\n parWalidacjaDodanegoFilmu.style.color = \"firebrick\";\n\n if (poleDodajTytul.value === \"\") {\n\tparWalidacjaDodanegoFilmu.innerHTML = \"Pole 'dodaj tytuł' nie może być puste!\";\n\tczyOk = false;\n }\n if (poleDodajRok.value === \"\") {\n\tparWalidacjaDodanegoFilmu.innerHTML += \" Pole 'dodaj rok' nie może być puste!\";\n\tczyOk = false;\n } else if (!czyTylkoCyfry(poleDodajRok.value)) {\n\tparWalidacjaDodanegoFilmu.innerHTML += \" Pole 'dodaj rok' musi zawierać 4 cyfry\";\n\tczyOk = false;\n } else if (poleDodajRok.value < 1888 || // patrzy wczesniejszy komentarz\n\t poleDodajRok.value > aktualny_rok) {\n\tparWalidacjaDodanegoFilmu.innerHTML += \" Pole 'dodaj rok' musi zawierać wartość\" +\n\t \" pomiędzy rokiem 1888 a rokiem bieżącym.\";\n\tczyOk = false;\n } else if (czyFilmJestWbazie(poleDodajTytul.value, poleDodajRok.value)) {\n\tparWalidacjaDodanegoFilmu.innerHTML = \"Podany film znajduje się już w bazie.\";\n\tczyOk = false;\n }\n return czyOk;\n}", "function print_don() {\n // quando il metodo mi deve ritornare qualcosa per prima cosa inizializzo la variabile e in fondo\n // metto il \"return nomevariabile;\"\n let text = \"\";\n\n //let miosaldo = 0;\n\n //let maxver = 0;\n\n\n for (i = 0; i < ar_numeri.length; i++) {\n // In questo modo tutte le linee vengono generate con uno span con un id univoco, quindi possono essere gestiti anche singolarmenti\n text += \"<span id'don\" + i + \"'>\" + ar_numeri[i]+\"</span><br/>\";\n\n }\n\n\n return text;\n}", "function movie() {\n\n\tvar movieName = '';\n\n\tif(process.argv.length >= 4){\n\t\tfor (var i = 3; i < dataArr.length; i++){\n\t\t\tif (i > 3 && i < dataArr.length) {\n\t\t\t\tmovieName = movieName + \"+\" + dataArr[i];\n\t\t\t} else {\n\t\t\t\tmovieName += dataArr[i];\n\t\t\t}\n\t\t} // closes for loop for dataArr\n\t} else {\n\t\tmovieName = 'Mr Nobody';\n\t}\n\n\tvar queryUrl = \"http://www.omdbapi.com/?t=\" + movieName + \"&y=&plot=short&tomatoes=true&r=json\";\n\n\tconsole.log(queryUrl);\n\n\trequest(queryUrl, function(error, response, body){\n\n\t\tif (!error && response.statusCode === 200) {\n\n\t \tconsole.log(\"\");\n\t\t\tconsole.log(\"Title: \" + JSON.parse(body).Title);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Release Year: \" + JSON.parse(body).Released);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Rating: \" + JSON.parse(body).imdbRating);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Produced In: \" + JSON.parse(body).Country);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Language: \" + JSON.parse(body).Language);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Plot: \" + JSON.parse(body).Plot);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Actors: \" + JSON.parse(body).Actors);\n\t\t\tconsole.log(\"\");\n\t \tconsole.log(\"Rotten Tomatoes Rating: \" + JSON.parse(body).Ratings[1].Value);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Rotten Tomatoes URL: \" + JSON.parse(body).tomatoURL);\n\n\t\t}\n\t});\t\t\t\n\n}", "function generateMovieList(emotionChar) {\n console.log(\"Did i make it to generateMoveList?\");\n var emotions = {\n anger: { genre: \"War\", ID: 10752 },\n contempt: { genre: \"Adventure\", ID: 12 },\n disgust: { genre: \"Horror\", ID: 27 },\n fear: { genre: \"Horror\", ID: 27 },\n happiness: { genre: \"Comedy\", ID: 35 },\n neutral: { genre: \"Animation\", ID: 16 },\n sadness: { genre: \"Drama\", ID: 18 },\n surprise: { genre: \"Science Fiction\", ID: 878 },\n\n }\n\n var uriBase = \"https://api.themoviedb.org/3/discover/movie\";\n var apikey = \"56b80906dca0b429c04477c6b950ad7f\";\n var genreID = emotions[emotionChar]['ID'];\n\n\n // Request parameters.\n var params = {\n api_key: apikey,\n language: \"en-US\",\n sort_by: \"popularity.desc\",\n include_adult: false,\n include_video: false,\n page: 1,\n with_genres: genreID,\n }\n\n // full movieURL request\n var movieURL = uriBase + '?' + $.param(params);\n console.log(\"moveURL: \", movieURL);\n\n // Perform the REST API call.\n $.ajax({\n url: uriBase + '?' + $.param(params),\n type: 'GET',\n })\n .done(function (data) {\n console.log(\"output of AJAX\", data);\n // Show formatted JSON on webpage.\n // $('#responseTextArea').val(JSON.stringify(data, null, 2));\n console.log(\"in ajax movietb: \", data['results']);\n renderPosters(data['results']);\n\n // unlock button\n $(\"#uploadImg\").html(\"Analyze the Face\");\n $(\"#uploadImg\").removeAttr(\"disabled\");\n })\n\n .fail(function (jqXHR, textStatus, errorThrown) {\n // Display error message.\n var errorString =\n errorThrown === ''\n ? 'Error. '\n : errorThrown + ' (' + jqXHR.status + '): '\n errorString +=\n jqXHR.responseText === ''\n ? ''\n : jQuery.parseJSON(jqXHR.responseText).message\n ? jQuery.parseJSON(jqXHR.responseText).message\n : jQuery.parseJSON(jqXHR.responseText).error.message\n // alert(errorString)\n\n // open error module for message\n let movieAPIError = errorString;\n $(\".imgResultsMsg\").html(movieAPIError);\n $(\"#errorModal\").modal(\"open\"); // material uses modal(\"open\"), bootstrap uses modal(\"show\")\n // alert(\"This should be a bootstrap module in the endstate. \"+imageError);\n\n // unlock button\n $(\"#uploadImg\").html(\"Analyze the Face\");\n $(\"#uploadImg\").removeAttr(\"disabled\");\n })\n}", "get_add_infos(movie, five_actors){\r\n\r\n let new_id = movie.id;\r\n let new_genres = this.get_genres(movie.genre_ids);\r\n let new_actors = five_actors\r\n\r\n let add_info_obj ={\r\n id: new_id,\r\n genres: new_genres,\r\n main_actors: new_actors\r\n };\r\n\r\n return add_info_obj;\r\n }", "function generateSampleData() {\n var itemContent = \"<p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat\";\n var itemDescription = \"Item Description: Pellentesque porta mauris quis interdum vehicula urna sapien ultrices velit nec venenatis dui odio in augue cras posuere enim a cursus convallis neque turpis malesuada erat ut adipiscing neque tortor ac erat\";\n var groupDescription = \"Group Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tempor scelerisque lorem in vehicula. Aliquam tincidunt, lacus ut sagittis tristique, turpis massa volutpat augue, eu rutrum ligula ante a ante\";\n\n // These three strings encode placeholder images. You will want to set the\n // backgroundImage property in your real data to be URLs to images.\n var darkGray = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXY3B0cPoPAANMAcOba1BlAAAAAElFTkSuQmCC\";\n var lightGray = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXY7h4+cp/AAhpA3h+ANDKAAAAAElFTkSuQmCC\";\n var mediumGray = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXY5g8dcZ/AAY/AsAlWFQ+AAAAAElFTkSuQmCC\";\n\n \n \n\n var sampleGroups = [\n{key: \"group52\", title: \"Food\", subtitle: \"Places for food!\", backgroundImage: darkGray, description: \"Places for food!\" },\n{key: \"group53\", title: \"Media\", subtitle: \"Media \", backgroundImage: darkGray, description: \"Media \" },\n{key: \"group55\", title: \"Lifestyle\", subtitle: \"Lifestyle\", backgroundImage: darkGray, description: \"Lifestyle\" },\n{key: \"group56\", title: \"Technology\", subtitle: \"\", backgroundImage: darkGray, description: \"\" },\n{key: \"group60\", title: \"Confectionery\", subtitle: \"\", backgroundImage: darkGray, description: \"\" },\n{key: \"group61\", title: \"Entertainment\", subtitle: \"Entertainment\", backgroundImage: darkGray, description: \"Entertainment\" },\n{key: \"group66\", title: \"Fashion\", subtitle: \"Fashion\", backgroundImage: darkGray, description: \"Fashion\" },\n{key: \"group67\", title: \"Home\", subtitle: \"\", backgroundImage: darkGray, description: \"\" },\n];\nvar sampleItems = [\n{ group: sampleGroups[0], title: \"Mrs G the Greengrocer\", subtitle: \"www.lancashireproduce.com\", description: itemDescription, content: \"<p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Traditional family greengrocer specialising in quality, freshly harvested local produce.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>We offer free delivery within the Southport area and a wholesale service for the catering trade</p>\", backgroundImage: \"/images/noimage.jpg\" },\n{ group: sampleGroups[0], title: \"Blackhursts Quality Butchers\", subtitle: \"\", description: itemDescription, content: \"<span style='color:#333333;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;text-align:justify;'>Blackhursts Quality Butchers are proud to have been serving both the local community and visitors to Southport for 35 years and look forward to welcoming you to their new stall within Southport Market Hall.</span>\", backgroundImage: \"/images/noimage.jpg\" },\n{ group: sampleGroups[0], title: \"Double Dutch Pancakes\", subtitle: \"www.bountyhouse.co.uk\", description: itemDescription, content: \"<p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Ben and Sharon Vogelenzang, ex proprietors of Bounty House Hotel, Aintree have now launched a brand new venture – DOUBLE DUTCH pancake kitchen, located in Stall no 4, within Southport Market.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>We serve a tasty range of savory and sweet pancakes, as well as other Dutch treats such as our Snert (Dutch Pea Soup) Appel Gebak (Dutch Apple Pie), Appelflappen (Dutch Apple Fritters) and Boeren Ommelet (healthy vegetable omelette) All complimented by our rich Dutch Coffee.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>We Look forward to serving you!</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>DOUBLE DUTCH Foods Ltd is a subsidiary of Bounty House TLC –a Community Interest Company – see our website –&nbsp;<a href='http://www.bountyhouse.co.uk/' style='margin:0px;padding:0px;border:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;color:#3a6999;text-decoration:initial;outline:none;' target='_blank'>www.bountyhouse.co.uk</a></p>\", backgroundImage: \"/images/noimage.jpg\" },\n{ group: sampleGroups[0], title: \"Peets Plaice\", subtitle: \"www.peetsplaice.co.uk\", description: itemDescription, content: \"<p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Local fishmonger, Kevin Peet from Peets Plaice providing quality fresh fish and seafood.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Kevin is a well known local fisherman supplying hotels, restaurants along with private functions.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Kevin has over 30 years experience as a local fisherman.</p>\", backgroundImage: \"/images/noimage.jpg\" },\n{ group: sampleGroups[0], title: \"Liverpool Cheese Company Ltd\", subtitle: \"www.liverpoolcheesecompany.co.uk\", description: itemDescription, content: \"<p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Visit us for around 200 speciality cheeses, locally produced chutney and jam, fine olives, yoghurt, farmhouse butter, selected biscuits and other accompaniments. We offer a wide range of local and British cheeses, continental cheeses and a good choice of goat and sheep milk cheeses.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>We mature cheeses from small farms and dairies across the country in our maturing room in an old dairy in Woolton Village, Liverpool, so if there is a particular cheese you want – just ask us as we may well have it!</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>We also have a wide range of gift boxes and hampers produced to order for the perfect gift. We have been trading for over 6 years and during that time have won several awards, we are particularly proud of the notoriety we have won for our cheese celebration cakes. If you are planning a wedding or party, come and talk to us.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Our staff know a lot about cheese and are happy to answer your questions and allow you to try the cheese, they can also help you put together a great cheese board, so don’t be afraid to ask.</p>\", backgroundImage: \"/images/noimage.jpg\" },\n{ group: sampleGroups[0], title: \"Holmes-Smith Specialty Foods\", subtitle: \"\", description: itemDescription, content: \"<p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>The best Chacuterie offer in Lancashire. – Established butcher in Southport since 2002.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Fantastic range of special recipe Pork Pies and Quiche – Massive selection of homemade sausages and pate.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Ready to cook marinated meats from Stuffed Portobello Mushrooms to Rosemary and Mint Lamb Shanks.</p>\", backgroundImage: \"/images/noimage.jpg\" },\n{ group: sampleGroups[2], title: \"Rock-a-Bye baby\", subtitle: \"\", description: itemDescription, content: \"<p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Rock-a-bye-baby boutique 0 – toddler (including pre-mature) offering affordable top quality baby wear and accessories, hand knitted and handmade clothes and toys and accessories for those extra special gifts for any new arrival.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Rock-a-Bye baby also offer an all year round savings club – anyone can join, with payments of your choice, when you want, to spend when you’re ready! A perfect way to save for&nbsp;a new arrival or even just a special event.</p>\", backgroundImage: \"/images/noimage.jpg\" },\n{ group: sampleGroups[6], title: \"Shoemaster\", subtitle: \"\", description: itemDescription, content: \"<p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Shoemaster Quality Shoe Repairs and Key Cutting Services at sensible prices, established since 1985.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Now in our new shop Market Enterance or King Street Entrance</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Look out for our ½ price Vouchers!</p>\", backgroundImage: \"/images/noimage.jpg\" },\n{ group: sampleGroups[7], title: \"Fairfield Plants\", subtitle: \"\", description: itemDescription, content: \"<p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Fairfield Plants is a family business, supplying excellent quality plants, shrubs, ornamental trees and garden sundries across the northwest.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>All our stock is sourced locally were possible, with plants, shrubs and trees sourced from Cheshire, Lancashire and Merseyside.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Fairfield Plants attend car boot sales, seasonal fairs, bazaars and charitable fundraising events. Supporting such charities as Lydiate Scouts, Greenbank Sports Academy, Zoe’s Place, Hoylake Cottage, Gladstone Theatre and many schools,</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>You can book us to attend your fundraising event by contacting us (see below).</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>Free local Deliveries ensure you get the quantity as well as quality, and any bulky items right to your door.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>We look forward to meeting you at our new venue, ‘Unit 10’ at the entrance to Southport Market.</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>T: 07804357274</p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>E:&nbsp;<a href='https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]' style='margin:0px;padding:0px;border:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;color:#3a6999;text-decoration:initial;outline:none;' target='_blank'>[email protected]</a></p><p style='margin-bottom:1.5em;padding-right:0px;padding-left:0px;border:0px;font-family:Helvetica, Arial, 'Lucida Grande', Verdana, sans-serif;vertical-align:baseline;text-align:justify;clear:both;color:#333333;'>W:&nbsp;<a href='http://www.fairfieldplants.co.uk/' style='margin:0px;padding:0px;border:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;color:#3a6999;text-decoration:initial;outline:none;' target='_blank'>www.fairfieldplants.co.uk</a></p>\", backgroundImage: \"/images/noimage.jpg\" },\n\n];\n\n\n\n\n\n\n return sampleItems;\n }", "function generateSampleData() {\n var itemContent = \"<p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat</p><p>Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat\";\n var itemDescription = \"Item Description: Pellentesque porta mauris quis interdum vehicula urna sapien ultrices velit nec venenatis dui odio in augue cras posuere enim a cursus convallis neque turpis malesuada erat ut adipiscing neque tortor ac erat\";\n var groupDescription = \"Group Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tempor scelerisque lorem in vehicula. Aliquam tincidunt, lacus ut sagittis tristique, turpis massa volutpat augue, eu rutrum ligula ante a ante\";\n\n // These three strings encode placeholder images. You will want to set the\n // backgroundImage property in your real data to be URLs to images.\n var darkGray = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXY3B0cPoPAANMAcOba1BlAAAAAElFTkSuQmCC\";\n var lightGray = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXY7h4+cp/AAhpA3h+ANDKAAAAAElFTkSuQmCC\";\n var mediumGray = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXY5g8dcZ/AAY/AsAlWFQ+AAAAAElFTkSuQmCC\";\n\n // Each of these sample groups must have a unique key to be displayed\n // separately.\n var sampleGroups = [\n { key: \"group1\", title: \"Group Title: 1\", subtitle: \"Group Subtitle: 1\", backgroundImage: darkGray, description: groupDescription },\n { key: \"group2\", title: \"Group Title: 2\", subtitle: \"Group Subtitle: 2\", backgroundImage: lightGray, description: groupDescription },\n { key: \"group3\", title: \"Group Title: 3\", subtitle: \"Group Subtitle: 3\", backgroundImage: mediumGray, description: groupDescription },\n { key: \"group4\", title: \"Group Title: 4\", subtitle: \"Group Subtitle: 4\", backgroundImage: lightGray, description: groupDescription },\n { key: \"group5\", title: \"Group Title: 5\", subtitle: \"Group Subtitle: 5\", backgroundImage: mediumGray, description: groupDescription },\n { key: \"group6\", title: \"Group Title: 6\", subtitle: \"Group Subtitle: 6\", backgroundImage: darkGray, description: groupDescription }\n ];\n\n // Each of these sample items should have a reference to a particular\n // group.\n var sampleItems = [\n { group: sampleGroups[0], title: \"Item Title: 1\", subtitle: \"Item Subtitle: 1\", description: itemDescription, content: itemContent, backgroundImage: lightGray },\n { group: sampleGroups[0], title: \"Item Title: 2\", subtitle: \"Item Subtitle: 2\", description: itemDescription, content: itemContent, backgroundImage: darkGray },\n { group: sampleGroups[0], title: \"Item Title: 3\", subtitle: \"Item Subtitle: 3\", description: itemDescription, content: itemContent, backgroundImage: mediumGray },\n { group: sampleGroups[0], title: \"Item Title: 4\", subtitle: \"Item Subtitle: 4\", description: itemDescription, content: itemContent, backgroundImage: darkGray },\n { group: sampleGroups[0], title: \"Item Title: 5\", subtitle: \"Item Subtitle: 5\", description: itemDescription, content: itemContent, backgroundImage: mediumGray },\n\n { group: sampleGroups[1], title: \"Item Title: 1\", subtitle: \"Item Subtitle: 1\", description: itemDescription, content: itemContent, backgroundImage: darkGray },\n { group: sampleGroups[1], title: \"Item Title: 2\", subtitle: \"Item Subtitle: 2\", description: itemDescription, content: itemContent, backgroundImage: mediumGray },\n { group: sampleGroups[1], title: \"Item Title: 3\", subtitle: \"Item Subtitle: 3\", description: itemDescription, content: itemContent, backgroundImage: lightGray },\n\n { group: sampleGroups[2], title: \"Item Title: 1\", subtitle: \"Item Subtitle: 1\", description: itemDescription, content: itemContent, backgroundImage: mediumGray },\n { group: sampleGroups[2], title: \"Item Title: 2\", subtitle: \"Item Subtitle: 2\", description: itemDescription, content: itemContent, backgroundImage: lightGray },\n { group: sampleGroups[2], title: \"Item Title: 3\", subtitle: \"Item Subtitle: 3\", description: itemDescription, content: itemContent, backgroundImage: darkGray },\n { group: sampleGroups[2], title: \"Item Title: 4\", subtitle: \"Item Subtitle: 4\", description: itemDescription, content: itemContent, backgroundImage: lightGray },\n { group: sampleGroups[2], title: \"Item Title: 5\", subtitle: \"Item Subtitle: 5\", description: itemDescription, content: itemContent, backgroundImage: mediumGray },\n { group: sampleGroups[2], title: \"Item Title: 6\", subtitle: \"Item Subtitle: 6\", description: itemDescription, content: itemContent, backgroundImage: darkGray },\n { group: sampleGroups[2], title: \"Item Title: 7\", subtitle: \"Item Subtitle: 7\", description: itemDescription, content: itemContent, backgroundImage: mediumGray },\n\n { group: sampleGroups[3], title: \"Item Title: 1\", subtitle: \"Item Subtitle: 1\", description: itemDescription, content: itemContent, backgroundImage: darkGray },\n { group: sampleGroups[3], title: \"Item Title: 2\", subtitle: \"Item Subtitle: 2\", description: itemDescription, content: itemContent, backgroundImage: lightGray },\n { group: sampleGroups[3], title: \"Item Title: 3\", subtitle: \"Item Subtitle: 3\", description: itemDescription, content: itemContent, backgroundImage: darkGray },\n { group: sampleGroups[3], title: \"Item Title: 4\", subtitle: \"Item Subtitle: 4\", description: itemDescription, content: itemContent, backgroundImage: lightGray },\n { group: sampleGroups[3], title: \"Item Title: 5\", subtitle: \"Item Subtitle: 5\", description: itemDescription, content: itemContent, backgroundImage: mediumGray },\n { group: sampleGroups[3], title: \"Item Title: 6\", subtitle: \"Item Subtitle: 6\", description: itemDescription, content: itemContent, backgroundImage: lightGray },\n\n { group: sampleGroups[4], title: \"Item Title: 1\", subtitle: \"Item Subtitle: 1\", description: itemDescription, content: itemContent, backgroundImage: lightGray },\n { group: sampleGroups[4], title: \"Item Title: 2\", subtitle: \"Item Subtitle: 2\", description: itemDescription, content: itemContent, backgroundImage: darkGray },\n { group: sampleGroups[4], title: \"Item Title: 3\", subtitle: \"Item Subtitle: 3\", description: itemDescription, content: itemContent, backgroundImage: lightGray },\n { group: sampleGroups[4], title: \"Item Title: 4\", subtitle: \"Item Subtitle: 4\", description: itemDescription, content: itemContent, backgroundImage: mediumGray },\n\n { group: sampleGroups[5], title: \"Item Title: 1\", subtitle: \"Item Subtitle: 1\", description: itemDescription, content: itemContent, backgroundImage: lightGray },\n { group: sampleGroups[5], title: \"Item Title: 2\", subtitle: \"Item Subtitle: 2\", description: itemDescription, content: itemContent, backgroundImage: darkGray },\n { group: sampleGroups[5], title: \"Item Title: 3\", subtitle: \"Item Subtitle: 3\", description: itemDescription, content: itemContent, backgroundImage: mediumGray },\n { group: sampleGroups[5], title: \"Item Title: 4\", subtitle: \"Item Subtitle: 4\", description: itemDescription, content: itemContent, backgroundImage: darkGray },\n { group: sampleGroups[5], title: \"Item Title: 5\", subtitle: \"Item Subtitle: 5\", description: itemDescription, content: itemContent, backgroundImage: lightGray },\n { group: sampleGroups[5], title: \"Item Title: 6\", subtitle: \"Item Subtitle: 6\", description: itemDescription, content: itemContent, backgroundImage: mediumGray },\n { group: sampleGroups[5], title: \"Item Title: 7\", subtitle: \"Item Subtitle: 7\", description: itemDescription, content: itemContent, backgroundImage: darkGray },\n { group: sampleGroups[5], title: \"Item Title: 8\", subtitle: \"Item Subtitle: 8\", description: itemDescription, content: itemContent, backgroundImage: lightGray }\n ];\n\n return sampleItems;\n }", "function renderData(data) {\n let listMovies = \"\";\n\n data.forEach((el) => {\n const nameEl = el.name || el.title;\n const imgUrl = \"https://image.tmdb.org/t/p/w500/\";\n const releaseDate = el.release_date || \"Неизвестен\";\n const poster = el.poster_path != null ? imgUrl + el.poster_path : \"./img/no_poster.jpg\";\n listMovies += `\n <article class=\"card-films\">\n <h1>${nameEl}</h1>\n <img class=\"img-responsive\" src=\"${poster}\">\n <div class=\"descript\">\n <strong class=\"year\">Год: ${releaseDate.slice(0,4)}</strong> \n <strong class=\"rating\">Рейтинг: ${el.vote_average}</strong> \n </div>\n </article>\n `;\n });\n\n movies.insertAdjacentHTML('afterbegin', listMovies);\n}", "function getGenere(id, type) {\r\n $.ajax({\r\n url: 'https://api.themoviedb.org/3/'+ type +'/' + id,\r\n method: 'GET',\r\n data: {\r\n api_key: '9223e97f95bb1fdb0b5ae958392fe3c8',\r\n language: 'it-IT'\r\n },\r\n success: function(data) {\r\n var objectGenre = data.genres;\r\n printGenres(objectGenre, id)\r\n },\r\n error: function() {\r\n alert('Errore')\r\n }\r\n });\r\n}", "function redditData(content){\n\t\n\tvar data = content.data;\t\n\tvar time = timeConverter(data.created);\n\tvar mediaElement = createNewMediaElement();\t\n\t\n\t//Überprüfen ob Text Inhalt hat oder nicht\n\tmediaElement.id \t\t= data.id;\n\tif (data.selftext == \"\"){\n\t\tmediaElement.text\t= data.title;\n\t} else {\n\t\tmediaElement.text = data.selftext;\n\t}\t\n\n\t//Speicherung des Contents abhängig vom Typ\n\tif(data.hasOwnProperty('url')){\t \n\t if(data.hasOwnProperty('domain')){\n\t \tif (data.domain == 'imgur.com' || data.domain == 'i.imgur.com'){\n\t \t mediaElement.content.type = 'image';\n\t \t mediaElement.content.thumbnail = data.thumbnail;\n\t \t \n\t \t if(getFileExtension(data.url) == \"jpg\" || getFileExtension(data.url) == \"jpeg\" || getFileExtension(data.url) == \"png\" ){\n\t \t \tmediaElement.content.url = data.url;\t \t \t\n\t \t } \n\t \t} else if(data.domain == 'youtube.com'){\n\t \t\tmediaElement.content.type = 'video';\t \t\t\n\t \t} else {\n\t \t\tmediaElement.content.type = 'text';\t\n\t \t}\n\t }\n\t mediaElement.content.url = data.url;\n\t} \t\n\n\t//Speicherung von simplen Daten\t\n\tmediaElement.username\t= data.author;\n\tmediaElement.date \t\t= time;\t\n\tmediaElement.source \t= content.id;\t\n\t\n\t//Speichen der Votings, evtl werden zukünftigt wieder Up- und Downvotes mit der API geliefert\n\tmediaElement.votes.upvotes = data.ups;\n\tmediaElement.votes.downvotes = data.downs;\n\tmediaElement.votes.score = data.score;\n\t\n\treturn storeMediaElement(mediaElement);\n}", "function appendProductsByGenre(productsByGenre) {\n let htmlTemplate = \"\";\n\n for (let product of productsByGenre) {\n htmlTemplate += `\n <article>\n <div class=\"card\">\n <div class=\"card-image waves-effect waves-block waves-light\">\n <img class=\"activator\" src=\"${product.acf.img}\">\n </div>\n <div class=\"card-content\">\n <span class=\"card-title activator grey-text text-darken-4\">${product.title.rendered}<i class=\"material-icons right\">more_vert</i></span>\n <p>${product.acf.indeholder}</p><p>${product.acf.kategori}</p>\n </div>\n <div class=\"card-reveal\">\n <span class=\"card-title grey-text text-darken-4\">${product.title.rendered}<i class=\"material-icons right\">close</i></span>\n <p>${product.acf.tags}</p><a href=\"${product.acf.kob}\">KØB</a>\n <div> <h4>Anvendelse</h4>\n <p>${product.acf.beskrivelse}</p></div>\n <div> <h4>Ingrediensliste</h4>\n <p>${product.acf.ingrediensliste}</p></div>\n <p>${product.acf.andet}</p>\n </div>\n</div>\n </article>\n `;\n }\n\n // if no movies, display feedback to the user\n if (productsByGenre.length === 0) {\n htmlTemplate = `\n <p>Der er inge produkter i denne kategori</p>\n `;\n }\n\n document.querySelector('#products-by-genre-container').innerHTML = htmlTemplate;\n}", "createSlideText(\n {\n tipe,\n judul,\n teks,\n }\n ){ \n const newSlide = {\n id:this.uniqid(),\n tipe,\n judul,\n teks,\n }\n slides.push(newSlide);\n console.log(slides);\n this.rendering();\n return true;\n }", "function populateModal(movie){\n document.title = movie['movieName'] + \" - FilmDags\";\n $('#posterTitle').text(movie['movieName']);\n $('#genreAge').text(movie['genreName'] + \", \" + movie['age'] + \" - \" + movie['formattedLength']);\n $('.embed-responsive-item').attr('src', movie['highQualityTrailerLink']);\n var actorList = \"\";\n for (i = 0; i <= movie['actors'].length-1; i++){\n if(i != movie['actors'].length-1){\n actorList += movie['actors'][i]['name'] + \", \";\n }\n else{\n actorList += movie['actors'][i]['name']\n }\n }\n $('#actors').text(actorList);\n $('#desc').text(movie['shortDescription']);\n $('#directors').text(movie['directors'][0]['name']);\n}", "function ConvertMedia(media)\n{\n switch (media)\n {\n case 'movies' : media = \"Movies\";\n break;\n \n case 'sets' : media = \"Movie Sets\";\n break; \n \n case 'tvshows' : media = \"TV Shows\";\n break;\n \n case 'seasons' : media = \"Seasons\";\n break; \n \n case 'episodes': media = \"Episodes\";\n break; \n\n case 'albums' : media = \"Albums\";\n break; \n \n case 'songs' : media = \"Songs\";\n break; \n \n case 'music' : media = \"Music\";\n break;\n \n case 'system' : media = \"System\";\n break;\n \n default : break;\n }\n \n return media;\n}", "function buildString(element) {\n\tvar result = \"You have \";\n\tif(element.hasWatched == true) {\n\t\tresult += \"watched \"\n\t\t// console.log(result + element.title + \" - \" + element.rating + \" stars\");\n\t} else {\n\t\tresult += \"not watched \"\n\t\t// console.log(result + element.title + \" - \" + element.rating + \" stars\");\n\t}\n\tresult += \"\\\"\" + element.title + \"\\\" - \";\n\tresult += element.rating + \" stars\"\n\treturn result;\n}", "function download2(filename, text) {\r\ndump = \" \"\t\r\nfilename = 'Randomclasses_Two.c4m'\r\ntext = \"\"\r\ntext += 'icon \"Randomclass/Randombanner_a.tga\"' + '\\n'\r\ntext += 'description \"The world has gone mad!\"' + '\\n'\t\r\ntext += '# All Done <3' + '\\n \\n'\r\n\r\ntext += 'newmonster \"Hidden Freak\" \\n'\t\r\ntext += 'descr \"Who knows what horrors dwell in the random chaos of Elysium?\" \\n'\t\r\ntext += 'copystats \"Troglodyte\" \\n'\t\r\ntext += 'hp 40\\n'\r\ntext += 'mr 5 \\n'\r\ntext += 'spr1 \"Randomclass/gog_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/gog_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 5 \"Beak\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'spellweapon 10 1 \\n'\r\ntext += 'spellweapon 50 1 \\n'\r\ntext += 'flying \\n'\r\ntext += 'size2x2 \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Python\" \\n'\t\r\ntext += 'descr \"Who knows what horrors dwell in the random chaos of Elysium?\" \\n'\t\r\ntext += 'copystats \"Troglodyte\" \\n'\t\r\ntext += 'hp 150\\n'\r\ntext += 'mr 8 \\n'\r\ntext += 'str 8 \\n'\r\ntext += 'mor 20 \\n'\r\ntext += 'spr1 \"Randomclass/2791_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/2791_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 25 42 \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'water \\n'\r\ntext += 'fastheal \\n'\r\ntext += 'coldblood \\n'\r\ntext += 'tunnel \\n'\r\ntext += 'fear 1\\n'\r\ntext += 'huge \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Ormr\" \\n'\t\r\ntext += 'descr \"Who knows what horrors dwell in the random chaos of Elysium?\" \\n'\t\r\ntext += 'copystats \"Troglodyte\" \\n'\t\r\ntext += 'hp 150\\n'\r\ntext += 'mr 9 \\n'\r\ntext += 'str 8 \\n'\r\ntext += 'mor 20 \\n'\r\ntext += 'spr1 \"Randomclass/2800_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/2800_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 25 42 \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'water \\n'\r\ntext += 'fastheal \\n'\r\ntext += 'coldblood \\n'\r\ntext += 'fear 1\\n'\r\ntext += 'huge \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Runner\" \\n'\r\ntext += 'name \"Runner\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'spr1 \"Randomclass/0173_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/0173_2.tga\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'coldblood \\n'\r\ntext += 'fast \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Weirdo\" \\n'\r\ntext += 'name \"Weirdo\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Strange Thing\" \\n'\r\ntext += 'copyspr \"Strange Thing\" \\n'\r\ntext += 'clearmove \\n'\r\ntext += 'slow \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Lizardman\" \\n'\r\ntext += 'name \"Lizardman\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'hp 8 \\n'\r\ntext += 'spr1 \"Randomclass/0171_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/0171_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 0 \"Trident\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += 'coldblood \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Lizardman Warrior\" \\n'\r\ntext += 'name \"Lizardman Warrior\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'hp 9 \\n'\r\ntext += 'armor 1 \\n'\r\ntext += 'spr1 \"Randomclass/0172_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/0172_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 1 \"Trident\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += 'coldblood \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Caveman\" \\n'\r\ntext += 'name \"Caveman\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'hp 6 \\n'\r\ntext += 'armor 0 \\n'\r\ntext += 'spr1 \"Randomclass/1615_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/1615_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 0 \"Club\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Caveman Chief\" \\n'\r\ntext += 'name \"Caveman Chief\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'hp 7 \\n'\r\ntext += 'armor 0 \\n'\r\ntext += 'spr1 \"Randomclass/1616_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/1616_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 0 \"Club\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Voi Spearman\" \\n'\r\ntext += 'name \"Voi Spearman\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'armor 0 \\n'\r\ntext += 'spr1 \"Randomclass/1929_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/1929_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 0 \"Spear\" \\n'\r\ntext += 'rangedweapon 0 \"Javelin\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'shield \\n'\r\ntext += 'allitemslots \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Peshti Spearman\" \\n'\r\ntext += 'name \"Peshti Spearman\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'armor 1 \\n'\r\ntext += 'spr1 \"Randomclass/1928_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/1928_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 1 \"Spear\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'shield \\n'\r\ntext += 'allitemslots \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Voi Axeman\" \\n'\r\ntext += 'name \"Voi Axeman\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'armor 0 \\n'\r\ntext += 'spr1 \"Randomclass/1930_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/1930_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 0 \"Axe\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'shield \\n'\r\ntext += 'allitemslots \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Voi Archer\" \\n'\r\ntext += 'name \"Voi Archer\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Archer\" \\n'\r\ntext += 'spr1 \"Randomclass/1931_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/1931_2.tga\" \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Lizardman Shaman\" \\n'\r\ntext += 'name \"Lizardman Shaman\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'hp 8 \\n'\r\ntext += 'mr 6 \\n'\r\ntext += 'spr1 \"Randomclass/0170_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/0170_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 0 \"Club\" \\n'\r\ntext += 'spellweapon 21 1 \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += 'coldblood \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Freak Lord\" \\n'\r\ntext += 'name \"Freak Lord\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'hp 15 \\n'\r\ntext += 'mr 7 \\n'\r\ntext += 'str 5 \\n'\r\ntext += 'spr1 \"Randomclass/0246_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/0246_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 4 \"fist\" \\n'\r\ntext += 'meleeweapon 4 \"fist\" \\n'\r\ntext += 'spellweapon 10 2 \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += 'fear 1 \\n'\r\ntext += 'newmonster \"Freak Lord\" \\n'\r\ntext += 'name \"Freak Lord\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'hp 15 \\n'\r\ntext += 'mr 7 \\n'\r\ntext += 'str 5 \\n'\r\ntext += 'spr1 \"Randomclass/0246_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/0246_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 4 \"fist\" \\n'\r\ntext += 'meleeweapon 4 \"fist\" \\n'\r\ntext += 'spellweapon 10 2 \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += 'fear 1 \\n'\r\ntext += 'trample 2 \\n'\r\ntext += 'tramplexsize 1\\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Militia\" \\n'\r\ntext += 'name \"Militia\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Levy\" \\n'\r\ntext += 'copyspr \"Levy\" \\n'\r\ntext += 'clearmove \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Commander\" \\n'\r\ntext += 'name \"Commander\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Captain\" \\n'\r\ntext += 'spr1 \"Randomclass/0034_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/0034_2.tga\" \\n'\r\ntext += 'shield \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Heavy Spearman\" \\n'\r\ntext += 'name \"Heavy Spearman\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Heavy Infantry\" \\n'\r\ntext += 'spr1 \"Randomclass/0038_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/0038_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 2 \"Spear\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'shield \\n'\r\ntext += 'allitemslots \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Light Cavalry\" \\n'\r\ntext += 'name \"Light Cavalry\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Barbarian Lancer\" \\n'\r\ntext += 'spr1 \"Randomclass/0024_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/0024_2.tga\" \\n'\r\ntext += 'hp 8 \\n'\r\ntext += 'armor 0 \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 2 \"Spear\" \\n'\r\ntext += 'rangedweapon 0 \"Javelin\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Mounted Commander\" \\n'\r\ntext += 'name \"Mounted Commander\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Barbarian Lancer\" \\n'\r\ntext += 'spr1 \"Randomclass/0046_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/0046_2.tga\" \\n'\r\ntext += 'hp 10 \\n'\r\ntext += 'armor 1 \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 0 \"Broadsword\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Heavy Cavalry\" \\n'\r\ntext += 'name \"Heavy Cavalry\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Barbarian Lancer\" \\n'\r\ntext += 'spr1 \"Randomclass/0020_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/0020_2.tga\" \\n'\r\ntext += 'hp 10 \\n'\r\ntext += 'armor 2 \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Priest\" \\n'\r\ntext += 'name \"Priest\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Bishop\" \\n'\r\ntext += 'spr1 \"Randomclass/2276_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/2276_2.tga\" \\n'\r\ntext += 'hp 4 \\n'\r\ntext += 'mr 5 \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newweapon \"Soul Leech\" \\n'\r\ntext += 'clearwspec \\n'\r\ntext += 'trgrank 1 \\n'\r\ntext += 'range 7 \\n'\r\ntext += 'dmgtype 7 \\n'\r\ntext += 'dmg 0 \\n'\r\ntext += 'aoe 1 \\n'\r\ntext += 'sound 18 \\n'\r\ntext += 'look 75 \\n'\r\ntext += 'init 3 \\n'\r\ntext += 'nostr \\n'\r\ntext += 'an \\n'\r\ntext += 'hardmr \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Hidden Aboleth\" \\n'\r\ntext += 'name \"Hidden Aboleth\" \\n'\r\ntext += 'descr \"Aboleths are ancient beings sprung from the depths of the ocean. They resemble huge mud-crawling fish with tentacles and large, dark eyes covering their foreheads. As they grow in size, they shed the scales of their Giboleth form and become paler and softer. Aboleths have the ability to project their will on others and can dominate lesser beings with sheer strength of mind. Through their superior minds, the Aboleths have enslaved other water-dwelling races and built an underwater slave-based empire. The larger and older an Aboleth is, the more powerful his powers of domination.\" \\n'\r\ntext += 'copystats \"Ogre\" \\n'\r\ntext += 'hp 50 \\n'\r\ntext += 'armor 1 \\n'\r\ntext += 'mor 20 \\n'\r\ntext += 'str 1 \\n'\r\ntext += 'mr 8 \\n'\r\ntext += 'spr1 \"Randomclass/1520_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/1520_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'rangedweaponbonus 15 \"Soul Leech\" \\n'\r\ntext += 'rangedweaponbonus 15 \"Soul Leech\" \\n'\r\ntext += 'rangedweaponbonus 1 \"Mind Blast\" \\n'\r\ntext += 'spellweapon 42 2 \\n'\r\ntext += 'spellweapon 61 2 \\n'\r\ntext += 'spellweapon 43 2 \\n'\r\ntext += 'voidsanity 10 \\n'\r\ntext += 'water \\n'\r\ntext += 'slow \\n'\r\ntext += 'saner 5 \\n'\r\ntext += 'rank -1 \\n'\r\ntext += 'miscslots \\n'\r\ntext += 'nametype 17 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Miracle Eye\" \\n'\r\ntext += 'name \"Miracle Eye\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Floating Eye\" \\n'\r\ntext += 'hp 8 \\n'\r\ntext += 'copyspr \"Floating Eye\" \\n'\r\ntext += 'spellweaponbonus 36 1 \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'ethereal \\n'\r\ntext += 'spiritsight \\n'\r\ntext += 'clearmove \\n'\r\ntext += 'float \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Preacher\" \\n'\r\ntext += 'name \"Preacher\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Saint\" \\n'\r\ntext += 'copyspr \"Saint\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += 'clearmove \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Missionary\" \\n'\r\ntext += 'name \"Missionary\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Pilgrim\" \\n'\r\ntext += 'copyspr \"Pilgrim\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += 'clearmove \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Inquisitor Leader\" \\n'\r\ntext += 'name \"Inquisitor Leader\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Inquisitor\" \\n'\r\ntext += 'copyspr \"Inquisitor\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += 'clearmove \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"High Inquisitor Leader\" \\n'\r\ntext += 'name \"Hign Inquisitor Leader\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"High Inquisitor\" \\n'\r\ntext += 'copyspr \"High Inquisitor\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'allitemslots \\n'\r\ntext += 'clearmove \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Angel Captain\" \\n'\r\ntext += 'name \"Angel Captain\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Angel\" \\n'\r\ntext += 'copyspr \"Angel\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'awe 1 \\n'\r\ntext += 'allitemslots \\n'\r\ntext += 'clearmove \\n'\r\ntext += 'flying \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Man Trap\" \\n'\r\ntext += 'name \"Man Trap\" \\n'\r\ntext += 'descr \" A carnivorous plant. Its feet-like roots allow it to move around as it looks for victims. When a victom comes within range, the Man Trap strikes out with its deadly teeth. The Man Trap moves slowly, but its attack is nothing to be laughed at. If used wisely, the long-lasting Man Trap can be very helpful.\" \\n'\r\ntext += 'copystats \"Venus Trap\" \\n'\r\ntext += 'copyspr \"Venus Trap\" \\n'\r\ntext += 'clearmove \\n'\r\ntext += 'slow \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Stone Trap\" \\n'\r\ntext += 'name \"Stone Trap\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Living Boulder\" \\n'\r\ntext += 'copyspr \"Living Boulder\" \\n'\r\ntext += 'clearmove \\n'\r\ntext += 'slow \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Moldwynd\" \\n'\r\ntext += 'name \"Moldwynd\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Troglodyte\" \\n'\r\ntext += 'hp 22 \\n'\r\ntext += 'mr 5 \\n'\r\ntext += 'spr1 \"Randomclass/ugly_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/ugly_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 5 \"Bite\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'spellweapon 58 1 \\n'\r\ntext += 'flying \\n'\r\ntext += 'rank 0\t\\n'\r\ntext += ' \\n'\t\r\n\r\n\r\ntext += 'newmonster \"Headless Horseman\" \\n'\r\ntext += 'name \"Headless Horseman\" \\n'\r\ntext += 'descr \"Only in the darkest dreams of the few remaining Nemedian elders do the memories of the Nuckelavee roam free. Being a demon so foul, they brought death to world in the wake of their thunderous hooves. The Nuckelavee were both powerful demons and fey of nature, hailing the northern shores of the world. Considered cruel even among the vindictive dryads and hags, the Nucklelavee would eagerly kill and torture all those who despoiled various sacred bodies of water. Though long banished from both the mortal planes and the afterlife, the remains of their legacy live on in the blackest of forests. Only the Fomorians dare bring back these deadly monsters of yore to the world of living so that they may ride and slaughter again. Fortunately for the mortals of Elysium, the Fomorians are poor mages, and cannot fully restore the demon to its full glory. Rather, the Nuckelavee is returned in the form of a headless black rider, now called to prowl the forests. The headless horseman, though he bears a mere fraction of the Nuckelavee soul, is free to hunt and play amongst the lonely backroads.\" \\n'\r\ntext += 'copystats \"Spectral Horseman\" \\n'\r\ntext += 'spr1 \"Randomclass/headless_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/headless_2.tga\" \\n'\r\ntext += 'fear 2 \\n'\r\ntext += 'stupid \\n'\r\ntext += 'forest2 \\n'\r\ntext += 'regeneration \\n'\r\ntext += 'stealth \\n'\r\ntext += 'noleader \\n'\r\n text += '\\n'\r\ntext += 'newmonster \"Barghest\" \\n'\r\ntext += 'name \"Barghest\" \\n'\r\ntext += 'descr \"Barghest are huge, black fey hounds from the Fomorian plains. Some say they are the manifestation of darkness and ill fates. Peasants living near overgrown forests or bleak highlands would do well to stay indoors after night, less the black dog of the moors develop the urge to investigate the encroachments of man.\" \\n'\r\ntext += 'copystats \"Wolf\" \\n'\r\ntext += 'hp 25 \\n'\r\ntext += 'str 6 \\n'\r\ntext += 'mr 5 \\n'\r\ntext += 'spr1 \"Randomclass/1768_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/1768_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 9 42 \\n'\r\ntext += 'spiritsight \\n'\r\ntext += 'animal \\n'\r\ntext += 'stealth \\n'\r\ntext += 'regeneration \\n'\r\ntext += 'forest2 \\n'\r\ntext += 'stupid \\n'\r\n text += '\\n'\r\n\r\ntext += 'newmonster \"Black Dog\"\\n'\r\ntext += 'name \"Black Dog\"\\n'\r\ntext += 'descr \"Black dogs are huge fey hounds from the Fomorian plains. Some say they are the manifestation of darkness and ill fates. Peasants living near overgrown forests or bleak highlands would do well to stay indoors after night, less the black dog of the moors develop the urge to investigate the encroachments of man.\"\\n'\r\ntext += 'copystats \"Wolf\"\\n'\r\ntext += 'hp 7\\n'\r\ntext += 'mr 4\\n'\r\ntext += 'spr1 \"Randomclass/1769_1.tga\"\\n'\r\ntext += 'spr2 \"Randomclass/1769_2.tga\"\\n'\r\ntext += 'spiritsight\\n'\r\ntext += 'animal\\n'\r\ntext += 'forest2\\n'\r\ntext += 'stealth\\n'\r\ntext += '\\n'\r\n\r\ntext += 'newmonster \"Cath Sith\"\\n'\r\ntext += 'name \"Cath Sith\"\\n'\r\ntext += 'descr \"A witch who dares assume the form of a cat nine times bears the risk of becoming a Cath Sith permanently. Cath Sith are black fey cats of the highlands and moors. Although they are not as dire as the black dogs of the moors, they are still powerful masters of magic, regardless of their fluffy new form. Cath Sith often mean to do harm, such as killing a farmers hens, or rubbing up against a millers leg, cursing him to contract the plague the very next day. However, a Cath Sith is not completely heartless, one could possibly be appeased by gifts of gold or food. A lost little boy in the moors might even find his way back to his parents if he catches the eye of a lonely Cath Sith.\"\\n'\r\ntext += 'copystats \"Black Cat Familiar\"\\n'\r\ntext += 'copyspr \"Black Cat Familiar\"\\n'\r\ntext += 'hp 15\\n'\r\ntext += 'mor 7\\n'\r\ntext += 'mr 8\\n'\r\ntext += 'clearweapons\\n'\r\ntext += 'meleeweapon 4 \"Claw\"\\n'\r\ntext += 'spellweaponbonus 37 2\\n'\r\ntext += 'spellweaponbonus 40 2\\n'\r\ntext += 'stealth\\n'\r\ntext += 'forest2\\n'\r\ntext += 'stupid\\n'\r\ntext += 'lucky\\n'\r\ntext += '\\n'\r\n\r\ntext += 'newmonster \"Witch Elm\"\\n'\r\ntext += 'name \"Witch Elm\"\\n'\r\ntext += 'descr \"Every once in awhile, a terrified peasant will stumble upon the corpse of a young girl in the hollow of an Elm tree trunk. Though perplexing, some have have theorized that this the work of witch covens dumping failed apprentices in some form of execution. More likely, it is the work of the Fomorians stealing children for their druidic spells. Fomorians can increase their power over the land if they plant the body of a budding young witch in the trunk of a rotting tree and curse its roots with toads blood. It is unknown why some Witch Elms fail to inflict any form of malady upon their intended target. Perhaps the Formorians are unable to tell which girls are developing into witchs, so they simply blindly kidnap and kill a random child for the ritual, hoping for some form of success.\"\\n'\r\ntext += 'copystats \"Shadow Tree\"\\n'\r\ntext += 'copyspr \"Shadow Tree\"\\n'\r\ntext += 'stealth\\n'\r\ntext += 'spawn1d6mon 35\\n'\r\ntext += '\\n'\r\n\r\ntext += 'newmonster \"Wild Black Dog\"\\n'\r\ntext += 'name \"Wild Black Dog\"\\n'\r\ntext += 'descr \"Black dogs are huge fey hounds from the Fomorian plains. Some say they are the manifestation of darkness and ill fates. Peasants living near overgrown forests or bleak highlands would do well to stay indoors after night, less the black dog of the moors develop the urge to investigate the encroachments of man.\"\\n'\r\ntext += 'copystats \"Wolf\"\\n'\r\ntext += 'hp 15\\n'\r\ntext += 'mr 4\\n'\r\ntext += 'spr1 \"Randomclass/1769_1.tga\"\\n'\r\ntext += 'spr2 \"Randomclass/1769_2.tga\"\\n'\r\ntext += 'clearweapons\\n'\r\ntext += 'meleeweapon 8 \"Bite\"\\n'\r\ntext += 'spiritsight\\n'\r\ntext += 'animal\\n'\r\ntext += 'stealth\\n'\r\ntext += 'stupid\\n'\r\ntext += 'regeneration\\n'\r\ntext += '\\n'\r\n\r\ntext += 'newmonster \"Fomorian King\"\\n'\r\ntext += 'name \"Fomorian King\"\\n'\r\ntext += 'descr \"The Fomorian King is a king of the giants who once guarded the realms of the watery dead. Under their rule the Fomorians emerged from the depths and sailed to distant shores to plunder and ravage the land with plague and gale. Punished for their sins, the Fomorians were banished and forced to find a new home. The Fomorian Kings are powerful storm crafters and death mages. They protected their land from the invading Patholonians and their descendants with plagues and further doomed their race. Fomorian Kings are cursed with a monsterous appearance and have only one eye. They are formidable shipwrights and can enter the ocean realms.\"\\n'\r\ntext += 'copystats \"Hill Giant\"\\n'\r\ntext += 'armor 1\\n'\r\ntext += 'mr 7\\n'\r\ntext += 'spr1 \"Randomclass/1803_1.tga\"\\n'\r\ntext += 'spr2 \"Randomclass/1803_2.tga\"\\n'\r\ntext += 'clearweapons\\n'\r\ntext += 'meleeweapon 15 \"Spear\"\\n'\r\ntext += 'rangedweaponbonus 15 \"Javelin\"\\n'\r\ntext += 'spellweapon 5 2\\n'\r\ntext += 'spellweapon 59 3\\n'\r\ntext += 'power 0 3\\n'\r\ntext += 'shield\\n'\r\ntext += 'badsight\\n'\r\ntext += 'spiritsight\\n'\r\ntext += 'water\\n'\r\ntext += 'rank -1\\n'\r\ntext += 'nametype 42\\n'\r\ntext += '\\n'\r\n\r\ntext += 'newmonster \"Balor\"\\n'\r\ntext += 'name \"Balor\"\\n'\r\ntext += 'descr \"The Eye of Balor is dreadful curse upon the land. Where ever the lumbering giant goes, his baleful gaze falls upon the enemies of his divine rule. Forest fires and droughts are all attributed to the beams firing from his cursed eye.\"\\n'\r\ntext += 'copystats \"Hill Giant\"\\n'\r\ntext += 'hp 400\\n'\r\ntext += 'armor 3\\n'\r\ntext += 'mr 7\\n'\r\ntext += 'spr1 \"Randomclass/1899_1.tga\"\\n'\r\ntext += 'spr2 \"Randomclass/1899_2.tga\"\\n'\r\ntext += 'clearweapons\\n'\r\ntext += 'meleeweapon 20 \"Spear\"\\n'\r\ntext += 'rangedweaponbonus 20 \"Javelin\"\\n'\r\ntext += 'spellweapon 5 2\\n'\r\ntext += 'spellweapon 59 3\\n'\r\ntext += 'spellweapon 50 3\\n'\r\ntext += 'power 0 3\\n'\r\ntext += 'shield\\n'\r\ntext += 'badsight\\n'\r\ntext += 'spiritsight\\n'\r\ntext += 'water\\n'\r\ntext += 'rank -1\\n'\r\ntext += 'nametype 42\\n'\r\ntext += '\\n'\r\n\r\ntext += 'newmonster \"Nemedian Sorceress\"\\n'\r\ntext += 'name \"Nemedian Sorceress\"\\n'\r\ntext += 'descr \"The Nemedians have merged the old magical traditions of their Partholonian ancestors and the magic of their Fomorian masters. Sorceresses skilled in death and air magic hide in the dark spires of Rath Chimbalth where they summon whispering shades of mist and darkness.\"\\n'\r\ntext += 'copystats \"Archer\"\\n'\r\ntext += 'armor 0\\n'\r\ntext += 'mr 4\\n'\r\ntext += 'spr1 \"Randomclass/1792_1.tga\"\\n'\r\ntext += 'spr2 \"Randomclass/1792_2.tga\"\\n'\r\ntext += 'clearweapons\\n'\r\ntext += 'meleeweapon 0 \"Staff\"\\n'\r\ntext += 'spellweapon 43 1\\n'\r\ntext += 'spellweapon 59 2\\n'\r\ntext += 'spiritsight\\n'\r\ntext += 'rank -1\\n'\r\ntext += 'nametype 43\\n'\r\ntext += '\\n'\r\n\r\ntext += 'newmonster \"Nemedian Warrior\"\\n'\r\ntext += 'name \"Nemedian Warrior\"\\n'\r\ntext += 'descr \"Nemedians are the descendants of the Sauromatian Partholonians. They are a highly magical race far surperior to ordinary men, but they were few in number. With the arrival of the Witch Kings, they left Sauromatia for a better place. The Nemedians followed in the footsteps of their Partolonian ancestors and arrived in the rich land of the Fomorians. Soon war broke out. The Nemedians were victorious until the plague that once eradicated the Partholonians struck them a wiped out half the population. The war ended with the subjugation of the Nemedians. After a bloody rebellion, most of them fled the land, but a few of them still linger in the old fortress of Rath Chimbalth.\"\\n'\r\ntext += 'copystats \"Heavy Infantry\"\\n'\r\ntext += 'hp 10\\n'\r\ntext += 'spr1 \"Randomclass/1790_1.tga\"\\n'\r\ntext += 'spr2 \"Randomclass/1790_2.tga\"\\n'\r\ntext += 'clearweapons\\n'\r\ntext += 'meleeweapon 5 \"Golden Spear\"\\n'\r\ntext += 'meleeweapon 2 \"Javelin\"\\n'\r\ntext += 'shield\\n'\r\ntext += 'spiritsight\\n'\r\ntext += '\\n'\r\n\r\ntext += 'newweapon \"Morrigan Spear\" \\n'\r\ntext += 'clearwspec \\n'\r\ntext += 'trgrank 1 \\n'\r\ntext += 'range 1 \\n'\r\ntext += 'dmgtype 7 \\n'\r\ntext += 'dmg 0 \\n'\r\ntext += 'aoe 1 \\n'\r\ntext += 'sound 1 \\n'\r\ntext += 'init 3 \\n'\r\ntext += 'dispossess \\n'\r\n\r\ntext += 'newmonster \"Morrigan\" \\n'\r\ntext += 'name \"Morrigan\" \\n'\r\ntext += 'descr \"The Morrigans are heralds of death, collectors of souls, and bringers of strife. They are the fates of the battleground, weaving threads of entrails with arrows for needles. Their chant colors the skies red before battle. In the shapes of crows, they pick out the eyes of the dead. The Morrigans are horrible beings of death and destruction. They appear as grisly warrior women armed with spears enchanted to kill.\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'hp 35 \\n'\r\ntext += 'armor 1 \\n'\r\ntext += 'mr 5 \\n'\r\ntext += 'mor 30 \\n'\r\ntext += 'spr1 \"Randomclass/1821_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/1821_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 15 \"Morrigan Spear\" \\n'\r\ntext += 'shield \\n'\r\ntext += 'spiritsight \\n'\r\ntext += 'stealth \\n'\r\ntext += 'fear 1 \\n'\r\ntext += 'poisonres 25 \\n'\r\ntext += 'undead \\n'\r\ntext += 'flying \\n'\t\r\ntext += '\\n'\r\n\r\ntext += 'newmonster \"Spine of Babylon\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Ogre\" \\n'\r\ntext += 'hp 25 \\n'\r\ntext += 'mr 4 \\n'\r\ntext += 'str 5 \\n'\r\ntext += 'armor 1 \\n'\r\ntext += 'mor 15 \\n'\r\ntext += 'spr1 \"Randomclass/qi.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/qi2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'rangedweaponbonus 8 \"Flick Barb\" \\n'\r\ntext += 'spellweaponbonus 50 1 \\n'\r\ntext += 'rangedweaponbonus 1 \"Charm\" \\n'\r\ntext += 'rangedweaponbonus 1 \"Weakness\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Amanra\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Ogre\" \\n'\r\ntext += 'hp 18 \\n'\r\ntext += 'mr 9 \\n'\r\ntext += 'str 4 \\n'\r\ntext += 'armor 0 \\n'\r\ntext += 'mor 15 \\n'\r\ntext += 'spr1 \"Randomclass/kitty_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/kitty_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 2 \"Bite\" \\n'\r\ntext += 'spellweaponbonus 38 2 \\n'\r\ntext += 'spellweaponbonus 6 1 \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Ophanlot\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Ogre\" \\n'\r\ntext += 'hp 35 \\n'\r\ntext += 'mr 7 \\n'\r\ntext += 'str 4 \\n'\r\ntext += 'armor 2 \\n'\r\ntext += 'mor 15 \\n'\r\ntext += 'spr1 \"Randomclass/kitty_3.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/kitty_4.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 10 \"Bite\" \\n'\r\ntext += 'rangedweapon 2 \"Invulnerability\" \\n'\r\ntext += 'spellweaponbonus 49 2 \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'holy \\n'\r\ntext += 'rank 1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Evil Toy\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Ogre\" \\n'\r\ntext += 'hp 6 \\n'\r\ntext += 'mr 7 \\n'\r\ntext += 'str 4 \\n'\r\ntext += 'armor 0 \\n'\r\ntext += 'mor 8 \\n'\r\ntext += 'spr1 \"Randomclass/teddy_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/teddy_2.tga\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 6 \"Bite\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'float \\n'\r\ntext += 'inanimate \\n'\r\ntext += 'poisonres 100 \\n'\r\ntext += 'fireres -50 \\n'\r\ntext += 'bluntres \\n'\r\ntext += 'stealth \\n'\r\ntext += 'rank 1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Convulser\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Maker of Ruins\" \\n'\r\ntext += 'hp 180 \\n'\r\ntext += 'mr 5 \\n'\r\ntext += 'str 8 \\n'\r\ntext += 'armor 1 \\n'\r\ntext += 'mor 15 \\n'\r\ntext += 'copyspr \"Maker of Ruins\" \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 1 \"Earthquake\" \\n'\r\ntext += 'meleeweapon 20 \"Crush\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'spiritsight \\n'\r\ntext += 'fireres 50 \\n'\r\ntext += 'coldres 50 \\n'\r\ntext += 'huge \\n'\r\ntext += 'slow \\n'\r\ntext += 'trample 5 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'newmonster \"Plague Rat\" \\n'\r\ntext += 'name \"Plague Rat\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'spr1 \"Randomclass/rat_1.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/rat_2.tga\" \\n'\r\ntext += 'hp 3 \\n'\r\ntext += 'str 3 \\n'\r\ntext += 'armor 0 \\n'\r\ntext += 'mor 4 \\n'\r\ntext += 'mr 7 \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 4 \"Poison Cloud\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += 'poisonexpl 4 \\n'\r\ntext += 'poisonres 100 \\n'\r\ntext += 'diseaseres \\n'\r\ntext += ' \\n'\r\n\r\n\r\ntext += 'newmonster \"Monster\" \\n'\r\ntext += 'name \"Monster\" \\n'\r\ntext += 'descr \"\" \\n'\r\ntext += 'copystats \"Spearman\" \\n'\r\ntext += 'spr1 \"Randomclass/mon4.tga\" \\n'\r\ntext += 'spr2 \"Randomclass/mon5.tga\" \\n'\r\ntext += 'hp 10 \\n'\r\ntext += 'str 4 \\n'\r\ntext += 'armor 0 \\n'\r\ntext += 'mor 4 \\n'\r\ntext += 'mr 7 \\n'\r\ntext += 'clearweapons \\n'\r\ntext += 'meleeweapon 5 \"Claw\" \\n'\r\ntext += 'clearspec \\n'\r\ntext += ' \\n'\r\n\r\n\r\n\r\ndescrroll =\t'descr \"' + randomItem(team9) + ' ' + randomItem(team10) + ' ' + randomItem(team11) + ' ' + randomItem(team12) + '\" \\n'\r\n\r\nx = 0\r\ny = 0\r\nz = 0\r\nw = 0\r\nv = 0\r\nunitnumber = parseInt(document.getElementById(\"unitnumber\").value, 10);\r\ncomnumber = parseInt(document.getElementById(\"comnumber\").value, 10);\r\nanimalcheck = document.getElementById(\"animalcheck\").checked;\t\r\ndruidcheck = document.getElementById(\"druidcheck\").checked;\r\ntrollcheck = document.getElementById(\"trollcheck\").checked;\r\nelcheck = document.getElementById(\"elcheck\").checked;\r\nbakemonocheck = document.getElementById(\"bakemonocheck\").checked;\r\nbarbariancheck = document.getElementById(\"barbariancheck\").checked;\r\nhoburgcheck = document.getElementById(\"hoburgcheck\").checked;\r\ndwarfcheck = document.getElementById(\"dwarfcheck\").checked;\r\ndryadcheck = document.getElementById(\"dryadcheck\").checked;\r\ncultcheck = document.getElementById(\"cultcheck\").checked;\r\nenchantercheck = document.getElementById(\"enchantercheck\").checked;\r\nbaalcheck = document.getElementById(\"baalcheck\").checked;\r\npaleonecheck = document.getElementById(\"paleonecheck\").checked;\r\nhomarkcheck = document.getElementById(\"homarkcheck\").checked;\r\nwarlockcheck = document.getElementById(\"warlockcheck\").checked;\r\nundeadcheck = document.getElementById(\"undeadcheck\").checked;\r\ndemoncheck = document.getElementById(\"demoncheck\").checked;\r\npriestcheck = document.getElementById(\"priestcheck\").checked;\r\nsenatorcheck = document.getElementById(\"senatorcheck\").checked;\r\nwitchcheck = document.getElementById(\"witchcheck\").checked;\r\nweirdcheck = document.getElementById(\"weirdcheck\").checked;\r\npokemon = document.getElementById(\"pokemon\").checked;\r\nsaneshuffle = document.getElementById(\"saneshuffle\").value;\r\n\r\nlet team1_melee_empty = [\r\n\t{name: \"Spearman\", num: 5, gold: 50, iron: 0, chance: 100},\r\n\t{name: \"Swordsman\", num: 5, gold: 50, iron: 5, chance: 100},\t\r\n\t{name: \"Heavy Infantry\", num: 5, gold: 50, iron: 25, chance: 100},\r\n\t{name: \"Bandit\", num: 5, gold: 50, iron: 0, chance: 100},\r\n\t{name: \"Halberdier\", num: 5, gold: 50, iron: 5, chance: 100},\t\r\n\t{name: \"Pikeneer\", num: 5, gold: 50, iron: 5, chance: 100},\t\r\n\t{name: \"War Dog\", num: 4, gold: 25, iron: 0, chance: 100},\t\r\n\t{name: \"Zweihander\", num: 5, gold: 50, iron: 10, chance: 100},\r\n\t{name: \"Militia\", num: 5, gold: 50, iron: 0, chance: 100},\t\r\n\t{name: \"Heavy Spearman\", num: 5, gold: 50, iron: 25, chance: 100},\r\n\t{name: \"Light Cavalry\", num: 4, gold: 50, iron: 0, chance: 100},\r\n\t{name: \"Heavy Cavalry\", num: 4, gold: 50, iron: 20, chance: 100},\r\n\t{name: \"Lion Tribe Warrior\", num: 5, gold: 50, iron: 0, chance: 100},\t\r\n\t{name: \"Hyena Tribe Warrior\", num: 5, gold: 50, iron: 0, chance: 100},\t\r\n\t{name: \"War Elephant\", num: 1, gold: 65, iron: 0, chance: 10},\t\t\r\n\t{name: \"Wolf Tribe Warrior\", num: 5, gold: 50, iron: 0, chance: 100},\t\r\n]\r\nlet team1_ranged_empty = [\r\n\t{name: \"Crossbowman\", num: 5, gold: 50, iron: 5, chance: 100},\r\n\t{name: \"Slinger\", num: 5, gold: 50, iron: 5, chance: 100},\r\n\t{name: \"Tower Guard\", num: 5, gold: 50, iron: 5, chance: 100},\t\r\n\t{name: \"Archer\", num: 5, gold: 50, iron: 5, chance: 100},\t\r\n\t{name: \"Scout\", num: 5, gold: 50, iron: 0, chance: 100},\r\n\t{name: \"Catapult\", num: 1, gold: 25, iron: 50, chance: 100},\t\r\n\t{name: \"Trebuchet\", num: 1, gold: 50, iron: 50, chance: 100},\r\n\t{name: \"Ballista\", num: 2, gold: 25, iron: 50, chance: 100},\t\r\n]\t\r\nlet team2_empty = [\r\n\t{name: \"Captain\", gold: 40, iron: 0, chance: 10, goldplus: 10},\r\n\t{name: \"Commander\", gold: 40, iron: 0, chance: 10, goldplus: 10},\r\n\t{name: \"Mounted Commander\", gold: 40, iron: 0, chance: 10, goldplus: 10},\r\n\t{name: \"Priest\", gold: 50, iron: 0, chance: 5, goldplus: 10},\r\n\t{name: \"Alchemist\", gold: 40, iron: 0, chance: 10, goldplus: 5},\r\n\t{name: \"Court Mage\", gold: 40, iron: 0, chance: 10, goldplus: 5},\r\n\t{name: \"High Lord\", gold: 50, iron: 0, chance: 10, goldplus: 5},\r\n\t{name: \"Monk\", gold: 40, iron: 0, chance: 10, goldplus: 5},\t\r\n]\r\nlet team3_empty = [\r\n\t\"Old Wizard\",\"White Wizard\",\"Dark Wizard\",\"Golden Wizard\",\"King\"\t\r\n]\r\nlet team3_2_empty = [\r\n\t\"Animist\",\"Astrologer\",\"Pyromancer\",\"Sea Father\",\"Ice Druid\",\"War Elephant\"\r\n]\r\nlet team3_3_empty = [\r\n\t\"Spearman\",\"Captain\",\"Priest\",\"Mounted Commander\",\"Commander\",\"Hedge Wizard\",\"Monk\",\"Court Mage\",\r\n\t\"Knight\",\"Scout\",\"Alchemist\",\"Princess\",\"Assassin\",\"Lion King\"\r\n]\r\n\r\n\r\nif(animalcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_animal)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_animal)\r\nteam2_empty = team2_empty.concat(team2_animal)\r\nteam3_empty = team3_empty.concat(team3_animal)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_animal)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_animal)\r\n}\r\nif(trollcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_troll)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_troll)\r\nteam2_empty = team2_empty.concat(team2_troll)\r\nteam3_empty = team3_empty.concat(team3_troll)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_troll)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_troll)\r\n}\r\nif(elcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_el)\r\nteam2_empty = team2_empty.concat(team2_el)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_el)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_el)\r\n\r\n}\r\nif(bakemonocheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_bakemono)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_bakemono)\r\nteam2_empty = team2_empty.concat(team2_bakemono)\r\nteam3_empty = team3_empty.concat(team3_bakemono)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_bakemono)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_bakemono)\r\n}\r\nif(barbariancheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_barbarian)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_barbarian)\r\nteam2_empty = team2_empty.concat(team2_barbarian)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_barbarian)\r\n}\r\nif(dwarfcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_dwarf)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_dwarf)\r\nteam2_empty = team2_empty.concat(team2_dwarf)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_dwarf)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_dwarf)\r\n}\r\n\r\nif(druidcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_druid)\r\nteam2_empty = team2_empty.concat(team2_druid)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_druid)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_druid)\r\n\r\n}\r\n\r\nif(hoburgcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_hoburg)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_hoburg)\r\nteam3_empty = team3_empty.concat(team3_hoburg)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_hoburg)\r\n}\r\nif(dryadcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_dryad)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_dryad)\r\nteam2_empty = team2_empty.concat(team2_dryad)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_dryad)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_dryad)\r\n}\r\nif(cultcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_cult)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_cult)\r\nteam2_empty = team2_empty.concat(team2_cult)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_cult)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_cult)\r\n}\r\n\r\nif(enchantercheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_enchanter)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_enchanter)\r\nteam2_empty = team2_empty.concat(team2_enchanter)\r\nteam3_empty = team3_empty.concat(team3_enchanter)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_enchanter)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_enchanter)\r\n}\r\n\r\nif(baalcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_baal)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_baal)\r\nteam3_empty = team3_empty.concat(team3_baal)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_baal)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_baal)\r\n}\r\n\r\nif(paleonecheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_paleone)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_paleone)\r\nteam2_empty = team2_empty.concat(team2_paleone)\r\nteam3_empty = team3_empty.concat(team3_paleone)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_paleone)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_paleone)\r\n}\r\n\r\nif(homarkcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_homark)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_homark)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_homark)\r\n}\r\nif(warlockcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_warlock)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_warlock)\r\nteam2_empty = team2_empty.concat(team2_warlock)\r\nteam3_empty = team3_empty.concat(team3_warlock)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_warlock)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_warlock)\r\n}\r\n\r\nif(senatorcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_senator)\r\nteam2_empty = team2_empty.concat(team2_senator)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_senator)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_senator)\r\n}\r\n\r\nif(undeadcheck === true){\t\r\nteam3_empty = team3_empty.concat(team3_undead)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_undead)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_undead)\r\n}\r\n\r\nif(demoncheck === true){\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_demon)\t\r\nteam3_empty = team3_empty.concat(team3_demon)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_demon)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_demon)\r\n}\r\n\r\nif(weirdcheck === true){\t\r\nteam1_melee_empty = team1_melee_empty.concat(team1_melee_weird)\r\nteam1_ranged_empty = team1_ranged_empty.concat(team1_ranged_weird)\r\nteam2_empty = team2_empty.concat(team2_weird)\r\nteam3_empty = team3_empty.concat(team3_weird)\r\nteam3_2_empty = team3_2_empty.concat(team3_2_weird)\r\nteam3_3_empty = team3_3_empty.concat(team3_3_weird)\r\n}\r\n\r\nif(pokemon === false){\t\r\nteam3_2_empty = team3_2_empty.concat(team3_3_empty)\r\nteam3_empty = team3_empty.concat(team3_2_empty)\r\n}\r\n\r\nlimit = (Math.floor(Math.random() * unitnumber)) + 1\r\nlimit2 = Math.floor(Math.random() * comnumber) + 1\r\nlimit3 = Math.floor(Math.random() * 4)\r\n\r\nif(limit2 <= 0){\r\nlimit2 = 4\t\r\n}\t\t\r\nshuffle = randomItem(team8)\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonsterstore = 'newmonster \"' + mymonster + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonsterstore = 'newmonster \"' + mymonster + '\" \\n'\t\r\n}\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster2 = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonster2store = 'newmonster \"' + mymonster2 + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster2 =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonster2store = 'newmonster \"' + mymonster2 + '\" \\n'\t\r\n}\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster3 = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonster3store = 'newmonster \"' + mymonster3 + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster3 =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonster3store = 'newmonster \"' + mymonster3 + '\" \\n'\t\r\n}\r\nleader = randomItem(team3_3_empty)\r\n\r\ntext += mymonsterstore\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 6 1 \\n'\t\t\r\n\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 1 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\ntext += 'mastery 1 \\n'\r\ntext += ' \\n'\r\n\r\nleader = randomItem(team3_2_empty)\t\r\ntext += mymonster2store\t\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 6 2 \\n'\r\n\t\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 2 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\ntext += 'mastery 1 \\n'\r\ntext += ' \\n'\r\n\r\nleader = randomItem(team3_empty)\t\r\ntext += mymonster3store\t\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 6 3 \\n'\r\n\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 3 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\n\r\ntext += ' \\n'\r\n\r\ntext += 'selectclass 1 \\n'\r\ntext += 'clearrec \\n'\r\n\r\nshuffle3 = Math.floor(Math.random() * 17) + 1\r\n\r\nif(saneshuffle === \"swap\"){\r\n\r\nif(shuffle3 === 1){\t\r\ntext += 'addunitrec \"Longbowman\" 100 4 50 0 0 \\n' \r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Zweihander\" 100 5 50 0 10 \\n'\r\ntext += 'addunitrec \"Tower Guard\" 100 5 50 0 15 \\n'\r\ntext += 'addunitrec \"Cavalryman\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"War Dog\" 100 4 25 0 0 \\n' \r\ntext += 'addunitrec \"Ballista\" 100 2 25 0 50 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addunitrec \"Trebuchet\" 100 1 50 0 50 \\n'\r\ntext += 'addunitrec \"Spearman\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 5 10 70 0 7 \\n' \r\ntext += 'addunitrec \"Swordsman\" 5 10 70 0 7 \\n'\r\ntext += 'addunitrec \"Trebuchet\" 10 2 75 0 75 \\n' \r\ntext += 'addcomrec \"High Lord\" 20 50 10 10 \\n' \r\ntext += 'reclimiter \"+Hedge Wizard\" \\n'\r\ntext += 'addcomrec \"Court Mage\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Alchemist\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Monk\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 2){\t\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 3 && witchcheck === true){\t\r\ntext += 'addunitrec \"Androphag Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Androphag Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Androphag Cavalry\" 100 5 50 0 5 \\n' \r\ntext += 'addcomrec \"Androphag Lord\" 5 50 10 0 \\n'\r\ntext += 'addcomrec \"Manflayer\" 2 70 20 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 3 && witchcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck === true){\t\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Ba' + illapp + 'alite Spearman\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Zealot\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Heavy infantry\" 100 5 50 0 25 \\n' \r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck === true){\t\r\ntext += 'addunitrec \"Bakemono Archer\" 100 5 25 0 1 \\n' \r\ntext += 'addunitrec \"Bakemono Soldier\" 100 5 25 0 1 \\n'\r\ntext += 'addunitrec \"Bakemono Swordsman\" 100 5 25 0 3 \\n'\r\ntext += 'addunitrec \"Dai Bakemono\" 25 3 50 0 15 \\n'\r\ntext += 'addunitrec \"Dai Bakemono Archer\" 25 3 50 0 15 \\n'\r\ntext += 'addunitrec \"O Bakemono\" 25 1 25 0 0 \\n'\r\ntext += 'addunitrec \"Bakemono Bowman\" 100 5 25 0 0 \\n'\r\ntext += 'addunitrec \"Bakemono Sho\" 100 5 25 0 0 \\n'\r\ntext += 'addcomrec \"Bakemono General\" 5 50 10 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck === true){\t\r\ntext += 'addunitrec \"Barbarian Warrior\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Bowman\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Swordsman\" 100 7 50 0 10 \\n'\r\ntext += 'addunitrec \"Barbarian Cavalry\" 100 4 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Lancer\" 100 4 50 0 10 \\n'\r\ntext += 'addunitrec \"Barbarian Werebear\" 10 1 25 0 0 \\n'\r\ntext += 'addcomrec \"Spirit Guide\" 8 75 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Soothsayer\" 8 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Barbarian Leader\" 100 25 10 0 \\n'\r\ntext += 'reclimiter \"-Barbarian Leader\" \\n'\r\ntext += 'addcomrec \"Mounted Chief\" 10 25 10 0 \\n'\r\ntext += 'addmercrec \"Mounted Scout\" 15 1 15 10 0 \\n'\r\ntext += 'addcomrec \"Crystal Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Crystal Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Crystal Priestess\" \\n'\r\ntext += 'addunitrec \"Crystal Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Crystal Priestess\" \\n'\r\ntext += 'addcomrec \"Garnet Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Garnet Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Garnet Priestess\" \\n'\r\ntext += 'addunitrec \"Garnet Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Garnet Priestess\" \\n'\r\ntext += 'addcomrec \"Jade Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Jade Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Jade Priestess\" \\n'\r\ntext += 'addunitrec \"Jade Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Jade Priestess\" \\n'\r\ntext += 'addcomrec \"Onyx Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Onyx Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Onyx Priestess\" \\n'\r\ntext += 'addunitrec \"Onyx Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Onyx Priestess\" \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck === true){\t\r\ntext += 'addunitrec \"Veles\" 100 5 40 0 0 \\n'\r\ntext += 'addunitrec \"Hastatus\" 100 5 45 0 5 \\n'\r\ntext += 'addunitrec \"Princeps\" 100 5 50 0 10 \\n'\r\ntext += 'addunitrec \"Princeps Solaris\" 100 5 55 0 10 \\n'\r\ntext += 'reclimiter \"+Leo\" \\n'\r\ntext += 'addunitrec \"Triarius\" 100 5 55 0 20 \\n'\r\ntext += 'addunitrec \"Praetorian Guard\" 5 5 60 0 20 \\n'\r\n\r\ntext += 'addunitrec \"Ballista\" 100 2 25 0 50 \\n'\r\ntext += 'addunitrec \"Hastatus\" 5 10 65 0 5 \\n'\r\ntext += 'addmercrec \"Standard\" 50 1 20 0 0 \\n' \r\ntext += 'addmercrec \"Archer\" 20 5 50 0 0 \\n'\r\ntext += 'addmercrec \"Gladiator\" 20 2 25 0 0 \\n'\r\ntext += 'addmercrec \"Retiarius\" 1 2 25 0 0 \\n'\r\n\r\ntext += 'addcomrec \"Centurion\" 25 35 10 0 \\n'\r\ntext += 'addcomrec \"Leo\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Heliodromus\" 1 90 20 0 \\n'\r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Renata\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Renatus\" 1 110 20 0 \\n'\r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Serpent Acolyte\" 5 50 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Serpent Priest\" 2 90 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Reveler\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Augur\" 5 50 20 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck === true){\t\r\n\r\ntext += 'addunitrec \"Pale One\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Pale One Soldier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Cavern Guard\" 100 5 50 0 20 \\n'\r\ntext += 'addunitrec \"Ancient Hurler\" 25 1 40 0 0 \\n'\r\ntext += 'addunitrec \"Ancient Pale One\" 25 1 40 0 15 \\n'\r\ntext += 'addunitrec \"Seal Guard\" 25 1 50 0 25 \\n'\r\n\r\ntext += 'addcomrec \"Ancient Commander\" 5 60 20 15 \\n'\r\ntext += 'addcomrec \"Pale One Commander\" 10 40 10 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck === true){\t\r\n\r\ntext += 'addunitrec \"Barechested Slinger\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Barechested Swordsman\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Barechested Warrior\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Beast Cavalry\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Boar Warrior\" 15 4 50 0 10 \\n'\r\n\r\ntext += 'addcomrec \"Chieftain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Hornblower\" 5 25 10 0 \\n'\r\ntext += 'addcomrec \"Vergobret\" 5 30 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck === true){\t\r\n\r\ntext += 'addunitrec \"Hoburg Militia\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Slinger\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Soldier\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Pikeneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Crossbow\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Guard\" 100 10 40 0 10 \\n'\r\ntext += 'addunitrec \"Hoburg Defender\" 100 15 50 0 10 \\n'\r\ntext += 'addunitrec \"Hog Knight\" 100 5 50 0 10 \\n'\r\n\r\ntext += 'addcomrec \"Hogmeister\" 10 25 5 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\n\r\nif(shuffle3 === 11 && priestcheck ===true){\t\r\n\r\ntext += 'addunitrec \"Tribal Warrior\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Jungle Warrior\" 100 6 50 0 0 \\n'\r\ntext += 'addunitrec \"Feathered Warrior\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Jaguar Warrior\" 30 5 50 0 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck === true){\t\r\n\r\ntext += 'addunitrec \"Goblin\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Ogre\" 100 1 25 0 0 \\n'\r\ntext += 'addunitrec \"Goblin Spearman\" 40 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Goblin Archer\" 20 10 50 0 0 \\n'\r\ntext += 'addunitrec \"Wolf Kin\" 20 10 50 0 0 \\n'\r\ntext += 'addunitrec \"Wolf Kin Reaver\" 20 7 50 0 10 \\n'\r\ntext += 'addunitrec \"Rock Troll\" 20 1 50 0 60 \\n'\r\ntext += 'addunitrec \"Troll\" 30 1 50 0 20 \\n'\r\ntext += 'addunitrec \"Forest Troll\" 40 1 40 0 10 \\n'\r\ntext += 'addunitrec \"Hill Giant\" 5 1 100 0 0 \\n'\r\ntext += 'addunitrec \"Ettin\" 10 1 75 0 0 \\n'\r\ntext += 'addcomrec \"Goblin Chieftain\" 7 25 20 0 \\n'\r\ntext += 'addcomrec \"Ogre Chief\" 3 35 20 0 \\n'\r\ntext += 'addcomrec \"Forest Giant\" 5 70 20 0 \\n'\r\n\r\ntext += 'addmercrec \"Goblin Murderer\" 3 1 10 40 0 \\n'\r\ntext += 'addcomrec \"Goblin Hero\" 3 10 50 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck === true){\r\n\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n'\t\r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n' \t\r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Temple Guard\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Templar\" 100 5 50 0 15 \\n' \r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\n\r\ntext += 'addcomrec \"Missionary\" 5 20 10 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck === true){\r\ntext += 'addunitrec \"Dwarf Worker\" 100 5 30 0 0 \\n'\r\n\r\ntext += 'addunitrec \"Dwarf\" 100 5 0 0 20 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Warrior\" 100 5 0 0 30 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Guard\" 100 5 0 0 40 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Arbarlest\" 100 5 0 0 30 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Outdoor Dwarf\" 100 2 10 0 10 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarven Ballista\" 100 1 0 0 40 \\n'\r\n\r\ntext += 'addmercrec \"Archer\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Crossbowman\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Pikeneer\" 3 10 150 0 10 \\n' \r\ntext += 'addmercrec \"Pikeneer\" 3 20 250 0 10 \\n' \r\ntext += 'addmercrec \"Spearman\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Swordsman\" 3 10 150 0 10 \\n' \r\n\r\ntext += 'addcomrec \"Dwarf Commander\" 15 20 10 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck === true){\r\n\t\r\ntext += 'addunitrec \"Hoburg Militia\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Slinger\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hobmark Soldier\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Pikeneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Hammerer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Pickaneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Crossbow\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Markgraf Guard\" 100 10 40 0 10 \\n'\r\ntext += 'addunitrec \"Hobmark Defender\" 100 15 50 0 10 \\n'\r\ntext += 'addunitrec \"Hog Hussar\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 25 \\n'\r\n\r\ntext += 'addcomrec \"Hogmeister\" 10 25 5 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck === true){\r\n\r\ntext += 'addunitrec \"Satyr \" 100 5 50 0 0 \\n'\t\r\ntext += 'addunitrec \"Satyr Javelinist\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Warrior\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Hoplite\" 100 5 25 0 15 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Steel Hoplite\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Sniper\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\n\r\ntext += 'addunitrec \"Centaur\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Centaur Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Centaur Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Steel Cataphract\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\n\r\ntext += 'addunitrec \"Minotaur\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Minotaur Warrior\" 100 3 50 0 0 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Bronze Bull\" 100 3 50 0 25 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Steel Bull\" 100 3 50 0 50 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\n\r\ntext += 'addunitrec \"Harpy\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Stymphalian Bird\" 100 5 15 0 25 \\n'\r\ntext += 'reclimiter \"=Harpy\" \\n'\r\n\r\ntext += 'addcomrec \"Satyr Commander\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Hoplite Commander\" 5 40 10 5 \\n'\r\ntext += 'addcomrec \"Centaur Commander\" 5 50 15 5 \\n'\r\ntext += 'addcomrec \"Cataphract Commander\" 3 50 15 10 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 17){\r\ntext += 'addunitrec \"Militia\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Slinger\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Light Cavalry\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Tower Guard\" 100 5 50 0 15 \\n'\r\ntext += 'addunitrec \"Cavalryman\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"Heavy Cavalry\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"Heavy Infantry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Heavy Spearman\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addunitrec \"Spearman\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 5 10 70 0 0 \\n' \r\n\r\ntext += 'addcomrec \"Court Mage\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Alchemist\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"White Wizard\" 0 100 100 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Monk\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Priest\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Commander\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Mounted Commander\" 5 40 10 0 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n}\r\n\r\ntext += 'addcomrec \"'+ mymonster +'\" 5 60 30 0 \\n'\r\ntext += 'clearstartunits \\n'\r\nif(shuffle3 === 1){\t\r\ntext += 'addstartunits \"Cavalryman\" 5 \\n'\r\ntext += 'addstartunits \"Spearman\" 6 \\n'\r\ntext += 'addstartunits \"Archer\" 5 \\n'\r\n}\r\nif(shuffle3 === 2){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\nif(shuffle3 === 3 && witchcheck === true){\t\r\ntext += 'addstartunits \"Androphag Spearman\" 5 \\n'\r\ntext += 'addstartunits \"Androphag Archer\" 5 \\n'\r\ntext += 'addstartunits \"Androphag Cavalry\" 1 \\n'\r\n}\r\nif(shuffle3 === 3 && witchcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\nif(shuffle3 === 4 && baalcheck === true){\t\r\ntext += 'addstartunits \"Ba' + illapp + 'alite Spearman\" 10 \\n'\r\ntext += 'addstartunits \"Ba' + illapp + 'alite Archer\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck === true){\t\r\ntext += 'addstartunits \"Bakemono Spearman\" 15 \\n'\r\ntext += 'addstartunits \"Bakemono Sho\" 15 \\n'\r\ntext += 'addstartunits \"Bakemono Bowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck === true){\t\r\ntext += 'addstartunits \"Barbarian Warrior\" 15 \\n'\r\ntext += 'addstartunits \"Barbarian Bowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck === true){\t\r\ntext += 'addstartunits \"Velite\" 10 \\n'\r\ntext += 'addstartunits \"Hastati\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck === true){\t\r\ntext += 'addstartunits \"Pale One\" 10 \\n'\r\ntext += 'addstartunits \"Pale One Soldier\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck === true){\t\r\ntext += 'addstartunits \"Barechested Warrior\" 10 \\n'\r\ntext += 'addstartunits \"Barechested Slinger\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck ===true){\t\r\ntext += 'addstartunits \"Hoburg Crossbow\" 10 \\n'\r\ntext += 'addstartunits \"Hoburg Defender\" 5 \\n'\r\ntext += 'addstartunits \"Hoburg Soldier\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck === true){\t\r\ntext += 'addstartunits \"Tribal Warrior\" 10 \\n'\r\ntext += 'addstartunits \"Jungle Warrior\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck === true){\t\r\ntext += 'addstartunits \"Goblin\" 15 \\n'\r\ntext += 'addstartunits \"Rock Troll\" 1 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck === true){\t\r\ntext += 'addstartunits \"Spearman\" 10 \\n'\r\ntext += 'addstartunits \"Halberdier\" 8 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck === true){\t\r\ntext += 'addstartunits \"Dwarf Worker\" 12 \\n'\r\ntext += 'addstartunits \"Dwarf\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck === true){\t\r\ntext += 'addstartunits \"Hobmark Soldier\" 10 \\n'\r\ntext += 'addstartunits \"Hobmark Defender\" 5 \\n'\r\ntext += 'addstartunits \"Hobmark Crossbow\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck === true){\t\r\ntext += 'addstartunits \"Satyr Warrior\" 5 \\n'\r\ntext += 'addstartunits \"Satyr Javelinist\" 5 \\n'\r\ntext += 'addstartunits \"Harpy\" 1 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 17){\t\r\ntext += 'addstartunits \"Militia\" 10 \\n'\r\ntext += 'addstartunits \"Slinger\" 10 \\n'\r\n}\r\n}\r\n\r\nif(saneshuffle !== \"swap\"){\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addunitrec \"' + team1_ranged_empty[roll].name + '\" '+ team1_ranged_empty[roll].chance + ' ' + team1_ranged_empty[roll].num + ' ' + team1_ranged_empty[roll].gold + ' 0 ' + team1_ranged_empty[roll].iron + ' \\n'\r\nstartstore = roll\r\nstartstore3 = roll\r\n\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\ntext += 'addunitrec \"' + team1_melee_empty[roll].name + '\" '+ team1_melee_empty[roll].chance + ' ' + team1_melee_empty[roll].num + ' ' + team1_melee_empty[roll].gold + ' 0 ' + team1_melee_empty[roll].iron + ' \\n'\r\nstartstore2 = roll\r\nlimit = limit - 2 \r\n\r\nif(limit <= 0){\r\nlimit = 1\t\r\n}\r\n\r\n\r\nwhile (x <= limit){\t\r\nx++\r\ncoin = Math.floor(Math.random() * 2)\r\nif(coin === 1){\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\nstartstore3 = roll\r\ntext += 'addunitrec \"' + team1_melee_empty[roll].name + '\" '+ team1_melee_empty[roll].chance + ' ' + team1_melee_empty[roll].num + ' ' + team1_melee_empty[roll].gold + ' 0 ' + team1_melee_empty[roll].iron + ' \\n'\r\n\r\n\r\nif (team1_melee_empty[roll].name=== \"Satyr\"){\r\ntext += 'addunitrec \"Satyr Javelinist\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Warrior\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Hoplite\" 100 5 25 0 15 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Steel Hoplite\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Sniper\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\n}\r\nif (team1_melee_empty[roll].name === \"Centaur\"){\r\ntext += 'addunitrec \"Centaur Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Centaur Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Steel Cataphract\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\n}\r\nif (team1_melee_empty[roll].name === \"Minotaur\"){\r\ntext += 'addunitrec \"Minotaur Warrior\" 100 3 50 0 0 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Bronze Bull\" 100 3 50 0 25 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Steel Bull\" 100 3 50 0 50 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\n\r\n}\r\nif (team1_melee_empty[roll].name === \"Harpy\"){\r\ntext += 'addunitrec \"Stymphalian Bird\" 100 5 15 0 25 \\n'\r\ntext += 'reclimiter \"=Harpy\" \\n'\r\n}\r\n}\r\nif(coin === 0){\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addunitrec \"' + team1_ranged_empty[roll].name + '\" '+ team1_ranged_empty[roll].chance + ' ' + team1_ranged_empty[roll].num + ' ' + team1_ranged_empty[roll].gold + ' 0 ' + team1_ranged_empty[roll].iron + ' \\n'\r\n\r\n\r\n\r\nif (team1_ranged_empty[roll].name === \"Centauride\"){\r\ntext += 'addunitrec \"Centauride Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\ntext += 'addunitrec \"Centauride Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\ntext += 'addunitrec \"Centauride Crossbow\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\n}\r\n}\r\n}\r\nwhile (y <= limit2){\t\r\ny++\r\nroll = Math.floor(Math.random() * team2_empty.length)\r\ntext += 'addcomrec \"' + team2_empty[roll].name + '\" '+ team2_empty[roll].chance + ' ' + team2_empty[roll].gold + ' ' + team2_empty[roll].goldplus + ' ' + team2_empty[roll].iron + ' \\n'\r\n\r\n}\r\ntext += 'addcomrec \"'+ mymonster +'\" 5 60 30 0 \\n'\r\ntext += 'addcomrec \"'+ mymonster2 +'\" 100 150 0 0 \\n'\r\ntext += 'reclimiter \"='+ mymonster +'\" \\n'\r\ntext += 'addcomrec \"'+ mymonster3 +'\" 100 400 0 0 \\n'\r\ntext += 'reclimiter \"='+ mymonster2 +'\" \\n'\r\ntext += 'clearstartunits \\n'\r\n\r\nhasunits = 0\r\n\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\ntext += 'addstartunits \"' + team1_melee_empty[startstore2].name + '\" '+ team1_melee_empty[startstore2].num +' \\n'\r\nhasunits += team1_melee_empty[startstore2].num\r\n\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addstartunits \"' + team1_ranged_empty[startstore].name + '\" '+ team1_ranged_empty[startstore].num +' \\n'\r\nhasunits += team1_ranged_empty[startstore].num\r\n\r\nif(hasunits < 9){\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\t\r\ntext += 'addstartunits \"' + team1_melee_empty[startstore3].name + '\" '+ team1_melee_empty[startstore3].num +' \\n'\r\nhasunits += team1_melee_empty[startstore3].num\r\n}\r\n}\r\nroll = Math.floor(Math.random() * team2_empty.length)\r\n\t\t\r\nrit2 = document.getElementById(\"rit2\").checked;\t\r\n\r\nif(rit2 === false){\t\r\ntext += 'setmaincom \"' + mymonster + '\" \\n'\r\n}\r\nif(rit2 === true){\t\r\ntext += 'setmaincom \"' + mymonster2 + '\" \\n'\r\n}\r\n\r\ntext += 'addstartcom \"' + team2_empty[roll].name + '\" \\n'\r\ntext += 'addstartcom \"Tattle\" \\n'\r\ntext += 'hometerr 30 \\n'\r\ncoin = Math.floor(Math.random() * 4)\r\ntext += 'clearstartterr \\n'\r\ntext += 'addstartterr '+ randomItem(team8) + '\\n'\t\r\ntext += ' \\n'\t\t\r\ndescrroll =\t'descr \"' + randomItem(team9) + ' ' + randomItem(team10) + ' ' + randomItem(team11) + ' ' + randomItem(team12) + '\" \\n'\t\r\n\r\nx = 0\r\ny = 0\r\nz = 0\r\nw = 0\r\nv = 0\r\n\r\nlimit = (Math.floor(Math.random() * unitnumber)) + 1\r\nlimit2 = Math.floor(Math.random() * comnumber) + 1\r\nlimit3 = Math.floor(Math.random() * 4)\r\n\r\nif(limit2 <= 0){\r\nlimit2 = 4\t\r\n}\t\t\r\nshuffle = randomItem(team8)\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonsterstore = 'newmonster \"' + mymonster + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonsterstore = 'newmonster \"' + mymonster + '\" \\n'\t\r\n}\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster2 = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonster2store = 'newmonster \"' + mymonster2 + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster2 =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonster2store = 'newmonster \"' + mymonster2 + '\" \\n'\t\r\n}\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster3 = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonster3store = 'newmonster \"' + mymonster3 + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster3 =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonster3store = 'newmonster \"' + mymonster3 + '\" \\n'\t\r\n}\r\nleader = randomItem(team3_3_empty)\r\n\r\ntext += mymonsterstore\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 22 1 \\n'\t\r\ntext += 'gatherfungus \\n'\t\r\n\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 1 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\ntext += 'mastery 1 \\n'\r\ntext += ' \\n'\r\n\r\nleader = randomItem(team3_2_empty)\t\r\ntext += mymonster2store\t\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 22 2 \\n'\r\ntext += 'gatherfungus \\n'\r\n\t\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 2 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\ntext += 'mastery 1 \\n'\r\ntext += ' \\n'\r\n\r\nleader = randomItem(team3_empty)\t\r\ntext += mymonster3store\t\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 22 3 \\n'\r\ntext += 'gatherfungus \\n'\r\n\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 3 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\ntext += ' \\n'\r\n\r\ntext += 'selectclass 14 \\n'\r\ntext += 'clearrec \\n'\r\n\r\n\r\nshuffle3 = Math.floor(Math.random() * 17) + 1\r\n\r\nif(saneshuffle === \"swap\"){\r\n\r\nif(shuffle3 === 1){\t\r\ntext += 'addunitrec \"Longbowman\" 100 4 50 0 0 \\n' \r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Zweihander\" 100 5 50 0 10 \\n'\r\ntext += 'addunitrec \"Tower Guard\" 100 5 50 0 15 \\n'\r\ntext += 'addunitrec \"Cavalryman\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"War Dog\" 100 4 25 0 0 \\n' \r\ntext += 'addunitrec \"Ballista\" 100 2 25 0 50 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addunitrec \"Trebuchet\" 100 1 50 0 50 \\n'\r\ntext += 'addunitrec \"Spearman\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 5 10 70 0 7 \\n' \r\ntext += 'addunitrec \"Swordsman\" 5 10 70 0 7 \\n'\r\ntext += 'addunitrec \"Trebuchet\" 10 2 75 0 75 \\n' \r\ntext += 'addcomrec \"High Lord\" 20 50 10 10 \\n' \r\ntext += 'reclimiter \"+Hedge Wizard\" \\n'\r\ntext += 'addcomrec \"Court Mage\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Alchemist\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Monk\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 2){\t\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 3 && witchcheck === true){\t\r\ntext += 'addunitrec \"Androphag Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Androphag Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Androphag Cavalry\" 100 5 50 0 5 \\n' \r\ntext += 'addcomrec \"Androphag Lord\" 5 50 10 0 \\n'\r\ntext += 'addcomrec \"Manflayer\" 2 70 20 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 3 && witchcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck === true){\t\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Ba' + illapp + 'alite Spearman\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Zealot\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Heavy infantry\" 100 5 50 0 25 \\n' \r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck === true){\t\r\ntext += 'addunitrec \"Bakemono Archer\" 100 5 25 0 1 \\n' \r\ntext += 'addunitrec \"Bakemono Soldier\" 100 5 25 0 1 \\n'\r\ntext += 'addunitrec \"Bakemono Swordsman\" 100 5 25 0 3 \\n'\r\ntext += 'addunitrec \"Dai Bakemono\" 25 3 50 0 15 \\n'\r\ntext += 'addunitrec \"Dai Bakemono Archer\" 25 3 50 0 15 \\n'\r\ntext += 'addunitrec \"O Bakemono\" 25 1 25 0 0 \\n'\r\ntext += 'addunitrec \"Bakemono Bowman\" 100 5 25 0 0 \\n'\r\ntext += 'addunitrec \"Bakemono Sho\" 100 5 25 0 0 \\n'\r\ntext += 'addcomrec \"Bakemono General\" 5 50 10 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck === true){\t\r\ntext += 'addunitrec \"Barbarian Warrior\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Bowman\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Swordsman\" 100 7 50 0 10 \\n'\r\ntext += 'addunitrec \"Barbarian Cavalry\" 100 4 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Lancer\" 100 4 50 0 10 \\n'\r\ntext += 'addunitrec \"Barbarian Werebear\" 10 1 25 0 0 \\n'\r\ntext += 'addcomrec \"Spirit Guide\" 8 75 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Soothsayer\" 8 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Barbarian Leader\" 100 25 10 0 \\n'\r\ntext += 'reclimiter \"-Barbarian Leader\" \\n'\r\ntext += 'addcomrec \"Mounted Chief\" 10 25 10 0 \\n'\r\ntext += 'addmercrec \"Mounted Scout\" 15 1 15 10 0 \\n'\r\ntext += 'addcomrec \"Crystal Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Crystal Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Crystal Priestess\" \\n'\r\ntext += 'addunitrec \"Crystal Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Crystal Priestess\" \\n'\r\ntext += 'addcomrec \"Garnet Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Garnet Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Garnet Priestess\" \\n'\r\ntext += 'addunitrec \"Garnet Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Garnet Priestess\" \\n'\r\ntext += 'addcomrec \"Jade Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Jade Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Jade Priestess\" \\n'\r\ntext += 'addunitrec \"Jade Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Jade Priestess\" \\n'\r\ntext += 'addcomrec \"Onyx Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Onyx Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Onyx Priestess\" \\n'\r\ntext += 'addunitrec \"Onyx Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Onyx Priestess\" \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck === true){\t\r\ntext += 'addunitrec \"Veles\" 100 5 40 0 0 \\n'\r\ntext += 'addunitrec \"Hastatus\" 100 5 45 0 5 \\n'\r\ntext += 'addunitrec \"Princeps\" 100 5 50 0 10 \\n'\r\ntext += 'addunitrec \"Princeps Solaris\" 100 5 55 0 10 \\n'\r\ntext += 'reclimiter \"+Leo\" \\n'\r\ntext += 'addunitrec \"Triarius\" 100 5 55 0 20 \\n'\r\ntext += 'addunitrec \"Praetorian Guard\" 5 5 60 0 20 \\n'\r\n\r\ntext += 'addunitrec \"Ballista\" 100 2 25 0 50 \\n'\r\ntext += 'addunitrec \"Hastatus\" 5 10 65 0 5 \\n'\r\ntext += 'addmercrec \"Standard\" 50 1 20 0 0 \\n' \r\ntext += 'addmercrec \"Archer\" 20 5 50 0 0 \\n'\r\ntext += 'addmercrec \"Gladiator\" 20 2 25 0 0 \\n'\r\ntext += 'addmercrec \"Retiarius\" 1 2 25 0 0 \\n'\r\n\r\ntext += 'addcomrec \"Centurion\" 25 35 10 0 \\n'\r\ntext += 'addcomrec \"Leo\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Heliodromus\" 1 90 20 0 \\n'\r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Renata\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Renatus\" 1 110 20 0 \\n'\r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Serpent Acolyte\" 5 50 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Serpent Priest\" 2 90 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Reveler\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Augur\" 5 50 20 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck === true){\t\r\n\r\ntext += 'addunitrec \"Pale One\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Pale One Soldier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Cavern Guard\" 100 5 50 0 20 \\n'\r\ntext += 'addunitrec \"Ancient Hurler\" 25 1 40 0 0 \\n'\r\ntext += 'addunitrec \"Ancient Pale One\" 25 1 40 0 15 \\n'\r\ntext += 'addunitrec \"Seal Guard\" 25 1 50 0 25 \\n'\r\n\r\ntext += 'addcomrec \"Ancient Commander\" 5 60 20 15 \\n'\r\ntext += 'addcomrec \"Pale One Commander\" 10 40 10 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck === true){\t\r\n\r\ntext += 'addunitrec \"Barechested Slinger\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Barechested Swordsman\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Barechested Warrior\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Beast Cavalry\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Boar Warrior\" 15 4 50 0 10 \\n'\r\n\r\ntext += 'addcomrec \"Chieftain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Hornblower\" 5 25 10 0 \\n'\r\ntext += 'addcomrec \"Vergobret\" 5 30 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck === true){\t\r\n\r\ntext += 'addunitrec \"Hoburg Militia\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Slinger\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Soldier\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Pikeneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Crossbow\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Guard\" 100 10 40 0 10 \\n'\r\ntext += 'addunitrec \"Hoburg Defender\" 100 15 50 0 10 \\n'\r\ntext += 'addunitrec \"Hog Knight\" 100 5 50 0 10 \\n'\r\n\r\ntext += 'addcomrec \"Hogmeister\" 10 25 5 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\n\r\nif(shuffle3 === 11 && priestcheck ===true){\t\r\n\r\ntext += 'addunitrec \"Tribal Warrior\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Jungle Warrior\" 100 6 50 0 0 \\n'\r\ntext += 'addunitrec \"Feathered Warrior\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Jaguar Warrior\" 30 5 50 0 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck === true){\t\r\n\r\ntext += 'addunitrec \"Goblin\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Ogre\" 100 1 25 0 0 \\n'\r\ntext += 'addunitrec \"Goblin Spearman\" 40 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Goblin Archer\" 20 10 50 0 0 \\n'\r\ntext += 'addunitrec \"Wolf Kin\" 20 10 50 0 0 \\n'\r\ntext += 'addunitrec \"Wolf Kin Reaver\" 20 7 50 0 10 \\n'\r\ntext += 'addunitrec \"Rock Troll\" 20 1 50 0 60 \\n'\r\ntext += 'addunitrec \"Troll\" 30 1 50 0 20 \\n'\r\ntext += 'addunitrec \"Forest Troll\" 40 1 40 0 10 \\n'\r\ntext += 'addunitrec \"Hill Giant\" 5 1 100 0 0 \\n'\r\ntext += 'addunitrec \"Ettin\" 10 1 75 0 0 \\n'\r\ntext += 'addcomrec \"Goblin Chieftain\" 7 25 20 0 \\n'\r\ntext += 'addcomrec \"Ogre Chief\" 3 35 20 0 \\n'\r\ntext += 'addcomrec \"Forest Giant\" 5 70 20 0 \\n'\r\n\r\ntext += 'addmercrec \"Goblin Murderer\" 3 1 10 40 0 \\n'\r\ntext += 'addcomrec \"Goblin Hero\" 3 10 50 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck === true){\r\n\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n'\t\r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n' \t\r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Temple Guard\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Templar\" 100 5 50 0 15 \\n' \r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\n\r\ntext += 'addcomrec \"Missionary\" 5 20 10 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck === true){\r\ntext += 'addunitrec \"Dwarf Worker\" 100 5 30 0 0 \\n'\r\n\r\ntext += 'addunitrec \"Dwarf\" 100 5 0 0 20 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Warrior\" 100 5 0 0 30 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Guard\" 100 5 0 0 40 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Arbarlest\" 100 5 0 0 30 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Outdoor Dwarf\" 100 2 10 0 10 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarven Ballista\" 100 1 0 0 40 \\n'\r\n\r\ntext += 'addmercrec \"Archer\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Crossbowman\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Pikeneer\" 3 10 150 0 10 \\n' \r\ntext += 'addmercrec \"Pikeneer\" 3 20 250 0 10 \\n' \r\ntext += 'addmercrec \"Spearman\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Swordsman\" 3 10 150 0 10 \\n' \r\n\r\ntext += 'addcomrec \"Dwarf Commander\" 15 20 10 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck === true){\r\n\t\r\ntext += 'addunitrec \"Hoburg Militia\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Slinger\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hobmark Soldier\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Pikeneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Hammerer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Pickaneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Crossbow\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Markgraf Guard\" 100 10 40 0 10 \\n'\r\ntext += 'addunitrec \"Hobmark Defender\" 100 15 50 0 10 \\n'\r\ntext += 'addunitrec \"Hog Hussar\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 25 \\n'\r\n\r\ntext += 'addcomrec \"Hogmeister\" 10 25 5 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck === true){\r\n\r\ntext += 'addunitrec \"Satyr \" 100 5 50 0 0 \\n'\t\r\ntext += 'addunitrec \"Satyr Javelinist\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Warrior\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Hoplite\" 100 5 25 0 15 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Steel Hoplite\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Sniper\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\n\r\ntext += 'addunitrec \"Centaur\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Centaur Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Centaur Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Steel Cataphract\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\n\r\ntext += 'addunitrec \"Minotaur\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Minotaur Warrior\" 100 3 50 0 0 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Bronze Bull\" 100 3 50 0 25 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Steel Bull\" 100 3 50 0 50 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\n\r\ntext += 'addunitrec \"Harpy\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Stymphalian Bird\" 100 5 15 0 25 \\n'\r\ntext += 'reclimiter \"=Harpy\" \\n'\r\n\r\ntext += 'addcomrec \"Satyr Commander\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Hoplite Commander\" 5 40 10 5 \\n'\r\ntext += 'addcomrec \"Centaur Commander\" 5 50 15 5 \\n'\r\ntext += 'addcomrec \"Cataphract Commander\" 3 50 15 10 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 17){\r\ntext += 'addunitrec \"Militia\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Slinger\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Light Cavalry\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Tower Guard\" 100 5 50 0 15 \\n'\r\ntext += 'addunitrec \"Cavalryman\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"Heavy Cavalry\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"Heavy Infantry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Heavy Spearman\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addunitrec \"Spearman\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 5 10 70 0 0 \\n' \r\n\r\ntext += 'addcomrec \"Court Mage\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Alchemist\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"White Wizard\" 0 100 100 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Monk\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Priest\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Commander\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Mounted Commander\" 5 40 10 0 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n}\r\n\r\nif(shuffle2 === 11){\r\ntext += 'addcomrec \"Oracle of Subterranean Fire\" 0 150 30 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Oracle of Subterranean Waters\" 0 150 30 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Oracle of the Dead\" 0 150 30 0 \\n'\r\ntext += 'templerec \\n'\r\n}\r\nif(shuffle2 === 9){\r\ntext += 'addcomrec \"Sun Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Blood Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Sky Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Rain Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Moon Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Death Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\n}\r\nif (shuffle2 === 13){\t\r\ntext += 'addmercrec \"Mirror\" 100 1 10 0 0\\n'\r\ntext += 'addmercrec \"Large Mirror\" 100 1 25 0 0\\n'\r\ntext += 'addmercrec \"Silver Mirror\" 100 1 50 0 0\\n'\r\ntext += 'addmercrec \"Golden Mirror\" 100 1 150 0 0\\n'\r\n}\r\nif (shuffle2 === 14){\t\r\ntext += 'addunitrec \"Dwarf Warrior\" 100 5 0 0 30\\n'\r\ntext += 'reclimiter \"=Dwarf Worker\"\\n'\r\ntext += 'addunitrec \"Dwarf Guard\" 100 5 0 0 40\\n'\r\ntext += 'reclimiter \"=Dwarf Worker\"\\n'\r\n}\r\nif(shuffle2 === 15){\r\ntext += 'addcomrec \"Warlock'+ illapp +'s Apprentice\" 5 55 20 0 \\n'\r\n}\r\n\r\ntext += 'addcomrec \"'+ mymonster +'\" 5 60 30 0 \\n'\r\ntext += 'clearstartunits \\n'\r\nif(shuffle3 === 1){\t\r\ntext += 'addstartunits \"Cavalryman\" 5 \\n'\r\ntext += 'addstartunits \"Spearman\" 6 \\n'\r\ntext += 'addstartunits \"Archer\" 5 \\n'\r\n}\r\nif(shuffle3 === 2){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\nif(shuffle3 === 3 && witchcheck === true){\t\r\ntext += 'addstartunits \"Androphag Spearman\" 5 \\n'\r\ntext += 'addstartunits \"Androphag Archer\" 5 \\n'\r\ntext += 'addstartunits \"Androphag Cavalry\" 1 \\n'\r\n}\r\nif(shuffle3 === 3 && witchcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\nif(shuffle3 === 4 && baalcheck === true){\t\r\ntext += 'addstartunits \"Ba' + illapp + 'alite Spearman\" 10 \\n'\r\ntext += 'addstartunits \"Ba' + illapp + 'alite Archer\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck === true){\t\r\ntext += 'addstartunits \"Bakemono Spearman\" 15 \\n'\r\ntext += 'addstartunits \"Bakemono Sho\" 15 \\n'\r\ntext += 'addstartunits \"Bakemono Bowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck === true){\t\r\ntext += 'addstartunits \"Barbarian Warrior\" 15 \\n'\r\ntext += 'addstartunits \"Barbarian Bowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck === true){\t\r\ntext += 'addstartunits \"Velite\" 10 \\n'\r\ntext += 'addstartunits \"Hastati\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck === true){\t\r\ntext += 'addstartunits \"Pale One\" 10 \\n'\r\ntext += 'addstartunits \"Pale One Soldier\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck === true){\t\r\ntext += 'addstartunits \"Barechested Warrior\" 10 \\n'\r\ntext += 'addstartunits \"Barechested Slinger\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck ===true){\t\r\ntext += 'addstartunits \"Hoburg Crossbow\" 10 \\n'\r\ntext += 'addstartunits \"Hoburg Defender\" 5 \\n'\r\ntext += 'addstartunits \"Hoburg Soldier\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck === true){\t\r\ntext += 'addstartunits \"Tribal Warrior\" 10 \\n'\r\ntext += 'addstartunits \"Jungle Warrior\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck === true){\t\r\ntext += 'addstartunits \"Goblin\" 15 \\n'\r\ntext += 'addstartunits \"Rock Troll\" 1 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck === true){\t\r\ntext += 'addstartunits \"Spearman\" 10 \\n'\r\ntext += 'addstartunits \"Halberdier\" 8 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck === true){\t\r\ntext += 'addstartunits \"Dwarf Worker\" 12 \\n'\r\ntext += 'addstartunits \"Dwarf\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck === true){\t\r\ntext += 'addstartunits \"Hobmark Soldier\" 10 \\n'\r\ntext += 'addstartunits \"Hobmark Defender\" 5 \\n'\r\ntext += 'addstartunits \"Hobmark Crossbow\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck === true){\t\r\ntext += 'addstartunits \"Satyr Warrior\" 5 \\n'\r\ntext += 'addstartunits \"Satyr Javelinist\" 5 \\n'\r\ntext += 'addstartunits \"Harpy\" 1 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 17){\t\r\ntext += 'addstartunits \"Militia\" 10 \\n'\r\ntext += 'addstartunits \"Slinger\" 10 \\n'\r\n}\r\n}\r\n\r\nif(saneshuffle !== \"swap\"){\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addunitrec \"' + team1_ranged_empty[roll].name + '\" '+ team1_ranged_empty[roll].chance + ' ' + team1_ranged_empty[roll].num + ' ' + team1_ranged_empty[roll].gold + ' 0 ' + team1_ranged_empty[roll].iron + ' \\n'\r\nstartstore = roll\r\nstartstore3 = roll\r\n\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\ntext += 'addunitrec \"' + team1_melee_empty[roll].name + '\" '+ team1_melee_empty[roll].chance + ' ' + team1_melee_empty[roll].num + ' ' + team1_melee_empty[roll].gold + ' 0 ' + team1_melee_empty[roll].iron + ' \\n'\r\nstartstore2 = roll\r\n\r\n\r\nlimit = limit - 2 \r\n \r\n\r\nif(limit <= 0){\r\nlimit = 1\t\r\n}\r\n\r\n\r\nwhile (x <= limit){\t\r\nx++\r\ncoin = Math.floor(Math.random() * 2)\r\nif(coin === 1){\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\nstartstore3 = roll\r\ntext += 'addunitrec \"' + team1_melee_empty[roll].name + '\" '+ team1_melee_empty[roll].chance + ' ' + team1_melee_empty[roll].num + ' ' + team1_melee_empty[roll].gold + ' 0 ' + team1_melee_empty[roll].iron + ' \\n'\r\n\r\n\r\nif (team1_melee_empty[roll].name=== \"Satyr\"){\r\ntext += 'addunitrec \"Satyr Javelinist\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Warrior\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Hoplite\" 100 5 25 0 15 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Steel Hoplite\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Sniper\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\n}\r\nif (team1_melee_empty[roll].name === \"Centaur\"){\r\ntext += 'addunitrec \"Centaur Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Centaur Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Steel Cataphract\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\n}\r\nif (team1_melee_empty[roll].name === \"Minotaur\"){\r\ntext += 'addunitrec \"Minotaur Warrior\" 100 3 50 0 0 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Bronze Bull\" 100 3 50 0 25 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Steel Bull\" 100 3 50 0 50 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\n\r\n}\r\nif (team1_melee_empty[roll].name === \"Harpy\"){\r\ntext += 'addunitrec \"Stymphalian Bird\" 100 5 15 0 25 \\n'\r\ntext += 'reclimiter \"=Harpy\" \\n'\r\n}\r\n}\r\nif(coin === 0){\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addunitrec \"' + team1_ranged_empty[roll].name + '\" '+ team1_ranged_empty[roll].chance + ' ' + team1_ranged_empty[roll].num + ' ' + team1_ranged_empty[roll].gold + ' 0 ' + team1_ranged_empty[roll].iron + ' \\n'\r\n\r\n\r\n\r\nif (team1_ranged_empty[roll].name === \"Centauride\"){\r\ntext += 'addunitrec \"Centauride Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\ntext += 'addunitrec \"Centauride Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\ntext += 'addunitrec \"Centauride Crossbow\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\n}\r\n}\r\n}\r\nwhile (y <= limit2){\t\r\ny++\r\nroll = Math.floor(Math.random() * team2_empty.length)\r\ntext += 'addcomrec \"' + team2_empty[roll].name + '\" '+ team2_empty[roll].chance + ' ' + team2_empty[roll].gold + ' ' + team2_empty[roll].goldplus + ' ' + team2_empty[roll].iron + ' \\n'\r\n\r\n}\r\ntext += 'addcomrec \"'+ mymonster +'\" 5 60 30 0 \\n'\r\ntext += 'clearstartunits \\n'\r\nhasunits = 0\r\n\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\ntext += 'addstartunits \"' + team1_melee_empty[startstore2].name + '\" '+ team1_melee_empty[startstore2].num +' \\n'\r\nhasunits += team1_melee_empty[startstore2].num\r\n\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addstartunits \"' + team1_ranged_empty[startstore].name + '\" '+ team1_ranged_empty[startstore].num +' \\n'\r\nhasunits += team1_ranged_empty[startstore].num\r\n\r\nif(hasunits < 9){\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\t\r\ntext += 'addstartunits \"' + team1_melee_empty[startstore3].name + '\" '+ team1_melee_empty[startstore3].num +' \\n'\r\nhasunits += team1_melee_empty[startstore3].num\r\n}\r\n}\r\nroll = Math.floor(Math.random() * team2_empty.length)\r\n\t\r\nrit2 = document.getElementById(\"rit2\").checked;\t\r\n\r\nif(rit2 === false){\t\r\ntext += 'setmaincom \"' + mymonster + '\" \\n'\r\n}\r\nif(rit2 === true){\t\r\ntext += 'setmaincom \"' + mymonster2 + '\" \\n'\r\n}\r\ntext += 'addstartcom \"' + team2_empty[roll].name + '\" \\n'\r\ntext += 'hometerr ' + randomItem(team4) + ' \\n'\r\ncoin = Math.floor(Math.random() * 4)\r\ntext += 'clearstartterr \\n'\t\r\ntext += ' \\n'\r\n\r\nx = 0\r\ny = 0\r\nz = 0\r\nw = 0\r\nv = 0\r\n\r\nlimit = (Math.floor(Math.random() * unitnumber)) + 1\r\nlimit2 = Math.floor(Math.random() * comnumber) + 1\r\nlimit3 = Math.floor(Math.random() * 4)\r\n\r\nif(limit2 <= 0){\r\nlimit2 = 4\t\r\n}\t\r\nshuffle = randomItem(team8)\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonsterstore = 'newmonster \"' + mymonster + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonsterstore = 'newmonster \"' + mymonster + '\" \\n'\t\r\n}\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster2 = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonster2store = 'newmonster \"' + mymonster2 + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster2 =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonster2store = 'newmonster \"' + mymonster2 + '\" \\n'\t\r\n}\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster3 = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonster3store = 'newmonster \"' + mymonster3 + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster3 =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonster3store = 'newmonster \"' + mymonster3 + '\" \\n'\t\r\n}\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster4 = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonster4store = 'newmonster \"' + mymonster4 + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster4 =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonster4store = 'newmonster \"' + mymonster4 + '\" \\n'\t\r\n}\r\nleader = randomItem(team3_3_empty)\r\n\r\ntext += mymonsterstore\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 25 1 \\n'\t\r\ntext += 'gatherrelics \\n'\t\r\n\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 1 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\ntext += 'mastery 1 \\n'\r\ntext += ' \\n'\r\n\r\nleader = randomItem(team3_2_empty)\t\r\ntext += mymonster2store\t\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 25 2 \\n'\r\ntext += 'gatherrelics \\n'\r\n\t\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 2 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\ntext += 'mastery 1 \\n'\r\ntext += ' \\n'\r\n\r\nleader = randomItem(team3_empty)\t\r\ntext += mymonster3store\t\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 25 3 \\n'\r\ntext += 'gatherrelics \\n'\r\n\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 3 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\ntext += 'mastery 1 \\n'\r\ntext += ' \\n'\r\n\r\nleader = randomItem(team3_empty)\t\r\ntext += mymonster4store\t\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 25 4 \\n'\r\ntext += 'gatherrelics \\n'\r\n\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 3 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\n\r\ntext += ' \\n'\r\n\r\n\r\ntext += 'selectclass 21 \\n'\r\ntext += 'clearrec \\n'\r\n\r\n\r\nshuffle3 = Math.floor(Math.random() * 17) + 1\r\n\r\nif(saneshuffle === \"swap\"){\r\n\r\nif(shuffle3 === 1){\t\r\ntext += 'addunitrec \"Longbowman\" 100 4 50 0 0 \\n' \r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Zweihander\" 100 5 50 0 10 \\n'\r\ntext += 'addunitrec \"Tower Guard\" 100 5 50 0 15 \\n'\r\ntext += 'addunitrec \"Cavalryman\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"War Dog\" 100 4 25 0 0 \\n' \r\ntext += 'addunitrec \"Ballista\" 100 2 25 0 50 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addunitrec \"Trebuchet\" 100 1 50 0 50 \\n'\r\ntext += 'addunitrec \"Spearman\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 5 10 70 0 7 \\n' \r\ntext += 'addunitrec \"Swordsman\" 5 10 70 0 7 \\n'\r\ntext += 'addunitrec \"Trebuchet\" 10 2 75 0 75 \\n' \r\ntext += 'addcomrec \"High Lord\" 20 50 10 10 \\n' \r\ntext += 'reclimiter \"+Hedge Wizard\" \\n'\r\ntext += 'addcomrec \"Court Mage\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Alchemist\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Monk\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 2){\t\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 3 && witchcheck === true){\t\r\ntext += 'addunitrec \"Androphag Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Androphag Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Androphag Cavalry\" 100 5 50 0 5 \\n' \r\ntext += 'addcomrec \"Androphag Lord\" 5 50 10 0 \\n'\r\ntext += 'addcomrec \"Manflayer\" 2 70 20 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 3 && witchcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck === true){\t\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Ba' + illapp + 'alite Spearman\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Zealot\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Heavy infantry\" 100 5 50 0 25 \\n' \r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck === true){\t\r\ntext += 'addunitrec \"Bakemono Archer\" 100 5 25 0 1 \\n' \r\ntext += 'addunitrec \"Bakemono Soldier\" 100 5 25 0 1 \\n'\r\ntext += 'addunitrec \"Bakemono Swordsman\" 100 5 25 0 3 \\n'\r\ntext += 'addunitrec \"Dai Bakemono\" 25 3 50 0 15 \\n'\r\ntext += 'addunitrec \"Dai Bakemono Archer\" 25 3 50 0 15 \\n'\r\ntext += 'addunitrec \"O Bakemono\" 25 1 25 0 0 \\n'\r\ntext += 'addunitrec \"Bakemono Bowman\" 100 5 25 0 0 \\n'\r\ntext += 'addunitrec \"Bakemono Sho\" 100 5 25 0 0 \\n'\r\ntext += 'addcomrec \"Bakemono General\" 5 50 10 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck === true){\t\r\ntext += 'addunitrec \"Barbarian Warrior\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Bowman\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Swordsman\" 100 7 50 0 10 \\n'\r\ntext += 'addunitrec \"Barbarian Cavalry\" 100 4 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Lancer\" 100 4 50 0 10 \\n'\r\ntext += 'addunitrec \"Barbarian Werebear\" 10 1 25 0 0 \\n'\r\ntext += 'addcomrec \"Spirit Guide\" 8 75 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Soothsayer\" 8 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Barbarian Leader\" 100 25 10 0 \\n'\r\ntext += 'reclimiter \"-Barbarian Leader\" \\n'\r\ntext += 'addcomrec \"Mounted Chief\" 10 25 10 0 \\n'\r\ntext += 'addmercrec \"Mounted Scout\" 15 1 15 10 0 \\n'\r\ntext += 'addcomrec \"Crystal Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Crystal Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Crystal Priestess\" \\n'\r\ntext += 'addunitrec \"Crystal Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Crystal Priestess\" \\n'\r\ntext += 'addcomrec \"Garnet Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Garnet Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Garnet Priestess\" \\n'\r\ntext += 'addunitrec \"Garnet Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Garnet Priestess\" \\n'\r\ntext += 'addcomrec \"Jade Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Jade Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Jade Priestess\" \\n'\r\ntext += 'addunitrec \"Jade Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Jade Priestess\" \\n'\r\ntext += 'addcomrec \"Onyx Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Onyx Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Onyx Priestess\" \\n'\r\ntext += 'addunitrec \"Onyx Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Onyx Priestess\" \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck === true){\t\r\ntext += 'addunitrec \"Veles\" 100 5 40 0 0 \\n'\r\ntext += 'addunitrec \"Hastatus\" 100 5 45 0 5 \\n'\r\ntext += 'addunitrec \"Princeps\" 100 5 50 0 10 \\n'\r\ntext += 'addunitrec \"Princeps Solaris\" 100 5 55 0 10 \\n'\r\ntext += 'reclimiter \"+Leo\" \\n'\r\ntext += 'addunitrec \"Triarius\" 100 5 55 0 20 \\n'\r\ntext += 'addunitrec \"Praetorian Guard\" 5 5 60 0 20 \\n'\r\n\r\ntext += 'addunitrec \"Ballista\" 100 2 25 0 50 \\n'\r\ntext += 'addunitrec \"Hastatus\" 5 10 65 0 5 \\n'\r\ntext += 'addmercrec \"Standard\" 50 1 20 0 0 \\n' \r\ntext += 'addmercrec \"Archer\" 20 5 50 0 0 \\n'\r\ntext += 'addmercrec \"Gladiator\" 20 2 25 0 0 \\n'\r\ntext += 'addmercrec \"Retiarius\" 1 2 25 0 0 \\n'\r\n\r\ntext += 'addcomrec \"Centurion\" 25 35 10 0 \\n'\r\ntext += 'addcomrec \"Leo\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Heliodromus\" 1 90 20 0 \\n'\r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Renata\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Renatus\" 1 110 20 0 \\n'\r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Serpent Acolyte\" 5 50 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Serpent Priest\" 2 90 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Reveler\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Augur\" 5 50 20 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck === true){\t\r\n\r\ntext += 'addunitrec \"Pale One\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Pale One Soldier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Cavern Guard\" 100 5 50 0 20 \\n'\r\ntext += 'addunitrec \"Ancient Hurler\" 25 1 40 0 0 \\n'\r\ntext += 'addunitrec \"Ancient Pale One\" 25 1 40 0 15 \\n'\r\ntext += 'addunitrec \"Seal Guard\" 25 1 50 0 25 \\n'\r\n\r\ntext += 'addcomrec \"Ancient Commander\" 5 60 20 15 \\n'\r\ntext += 'addcomrec \"Pale One Commander\" 10 40 10 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck === true){\t\r\n\r\ntext += 'addunitrec \"Barechested Slinger\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Barechested Swordsman\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Barechested Warrior\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Beast Cavalry\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Boar Warrior\" 15 4 50 0 10 \\n'\r\n\r\ntext += 'addcomrec \"Chieftain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Hornblower\" 5 25 10 0 \\n'\r\ntext += 'addcomrec \"Vergobret\" 5 30 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck === true){\t\r\n\r\ntext += 'addunitrec \"Hoburg Militia\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Slinger\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Soldier\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Pikeneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Crossbow\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Guard\" 100 10 40 0 10 \\n'\r\ntext += 'addunitrec \"Hoburg Defender\" 100 15 50 0 10 \\n'\r\ntext += 'addunitrec \"Hog Knight\" 100 5 50 0 10 \\n'\r\n\r\ntext += 'addcomrec \"Hogmeister\" 10 25 5 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\n\r\nif(shuffle3 === 11 && priestcheck ===true){\t\r\n\r\ntext += 'addunitrec \"Tribal Warrior\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Jungle Warrior\" 100 6 50 0 0 \\n'\r\ntext += 'addunitrec \"Feathered Warrior\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Jaguar Warrior\" 30 5 50 0 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck === true){\t\r\n\r\ntext += 'addunitrec \"Goblin\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Ogre\" 100 1 25 0 0 \\n'\r\ntext += 'addunitrec \"Goblin Spearman\" 40 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Goblin Archer\" 20 10 50 0 0 \\n'\r\ntext += 'addunitrec \"Wolf Kin\" 20 10 50 0 0 \\n'\r\ntext += 'addunitrec \"Wolf Kin Reaver\" 20 7 50 0 10 \\n'\r\ntext += 'addunitrec \"Rock Troll\" 20 1 50 0 60 \\n'\r\ntext += 'addunitrec \"Troll\" 30 1 50 0 20 \\n'\r\ntext += 'addunitrec \"Forest Troll\" 40 1 40 0 10 \\n'\r\ntext += 'addunitrec \"Hill Giant\" 5 1 100 0 0 \\n'\r\ntext += 'addunitrec \"Ettin\" 10 1 75 0 0 \\n'\r\ntext += 'addcomrec \"Goblin Chieftain\" 7 25 20 0 \\n'\r\ntext += 'addcomrec \"Ogre Chief\" 3 35 20 0 \\n'\r\ntext += 'addcomrec \"Forest Giant\" 5 70 20 0 \\n'\r\n\r\ntext += 'addmercrec \"Goblin Murderer\" 3 1 10 40 0 \\n'\r\ntext += 'addcomrec \"Goblin Hero\" 3 10 50 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck === true){\r\n\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n'\t\r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n' \t\r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Temple Guard\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Templar\" 100 5 50 0 15 \\n' \r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\n\r\ntext += 'addcomrec \"Missionary\" 5 20 10 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck === true){\r\ntext += 'addunitrec \"Dwarf Worker\" 100 5 30 0 0 \\n'\r\n\r\ntext += 'addunitrec \"Dwarf\" 100 5 0 0 20 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Warrior\" 100 5 0 0 30 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Guard\" 100 5 0 0 40 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Arbarlest\" 100 5 0 0 30 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Outdoor Dwarf\" 100 2 10 0 10 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarven Ballista\" 100 1 0 0 40 \\n'\r\n\r\ntext += 'addmercrec \"Archer\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Crossbowman\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Pikeneer\" 3 10 150 0 10 \\n' \r\ntext += 'addmercrec \"Pikeneer\" 3 20 250 0 10 \\n' \r\ntext += 'addmercrec \"Spearman\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Swordsman\" 3 10 150 0 10 \\n' \r\n\r\ntext += 'addcomrec \"Dwarf Commander\" 15 20 10 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck === true){\r\n\t\r\ntext += 'addunitrec \"Hoburg Militia\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Slinger\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hobmark Soldier\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Pikeneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Hammerer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Pickaneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Crossbow\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Markgraf Guard\" 100 10 40 0 10 \\n'\r\ntext += 'addunitrec \"Hobmark Defender\" 100 15 50 0 10 \\n'\r\ntext += 'addunitrec \"Hog Hussar\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 25 \\n'\r\n\r\ntext += 'addcomrec \"Hogmeister\" 10 25 5 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck === true){\r\n\r\ntext += 'addunitrec \"Satyr \" 100 5 50 0 0 \\n'\t\r\ntext += 'addunitrec \"Satyr Javelinist\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Warrior\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Hoplite\" 100 5 25 0 15 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Steel Hoplite\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Sniper\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\n\r\ntext += 'addunitrec \"Centaur\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Centaur Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Centaur Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Steel Cataphract\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\n\r\ntext += 'addunitrec \"Minotaur\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Minotaur Warrior\" 100 3 50 0 0 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Bronze Bull\" 100 3 50 0 25 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Steel Bull\" 100 3 50 0 50 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\n\r\ntext += 'addunitrec \"Harpy\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Stymphalian Bird\" 100 5 15 0 25 \\n'\r\ntext += 'reclimiter \"=Harpy\" \\n'\r\n\r\ntext += 'addcomrec \"Satyr Commander\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Hoplite Commander\" 5 40 10 5 \\n'\r\ntext += 'addcomrec \"Centaur Commander\" 5 50 15 5 \\n'\r\ntext += 'addcomrec \"Cataphract Commander\" 3 50 15 10 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 17){\r\ntext += 'addunitrec \"Militia\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Slinger\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Light Cavalry\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Tower Guard\" 100 5 50 0 15 \\n'\r\ntext += 'addunitrec \"Cavalryman\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"Heavy Cavalry\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"Heavy Infantry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Heavy Spearman\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addunitrec \"Spearman\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 5 10 70 0 0 \\n' \r\n\r\ntext += 'addcomrec \"Court Mage\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Alchemist\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"White Wizard\" 0 100 100 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Monk\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Priest\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Commander\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Mounted Commander\" 5 40 10 0 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n}\r\n\r\nif(shuffle2 === 11){\r\ntext += 'addcomrec \"Oracle of Subterranean Fire\" 0 150 30 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Oracle of Subterranean Waters\" 0 150 30 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Oracle of the Dead\" 0 150 30 0 \\n'\r\ntext += 'templerec \\n'\r\n}\r\nif(shuffle2 === 9){\r\ntext += 'addcomrec \"Sun Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Blood Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Sky Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Rain Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Moon Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Death Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\n}\r\nif (shuffle2 === 13){\t\r\ntext += 'addmercrec \"Mirror\" 100 1 10 0 0\\n'\r\ntext += 'addmercrec \"Large Mirror\" 100 1 25 0 0\\n'\r\ntext += 'addmercrec \"Silver Mirror\" 100 1 50 0 0\\n'\r\ntext += 'addmercrec \"Golden Mirror\" 100 1 150 0 0\\n'\r\n}\r\nif (shuffle2 === 14){\t\r\ntext += 'addunitrec \"Dwarf Warrior\" 100 5 0 0 30\\n'\r\ntext += 'reclimiter \"=Dwarf Worker\"\\n'\r\ntext += 'addunitrec \"Dwarf Guard\" 100 5 0 0 40\\n'\r\ntext += 'reclimiter \"=Dwarf Worker\"\\n'\r\n}\r\nif(shuffle2 === 15){\r\ntext += 'addcomrec \"Warlock'+ illapp +'s Apprentice\" 5 55 20 0 \\n'\r\n}\r\n\r\ntext += 'addcomrec \"'+ mymonster +'\" 5 60 30 0 \\n'\r\ntext += 'clearstartunits \\n'\r\nif(shuffle3 === 1){\t\r\ntext += 'addstartunits \"Cavalryman\" 5 \\n'\r\ntext += 'addstartunits \"Spearman\" 6 \\n'\r\ntext += 'addstartunits \"Archer\" 5 \\n'\r\n}\r\nif(shuffle3 === 2){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\nif(shuffle3 === 3 && witchcheck === true){\t\r\ntext += 'addstartunits \"Androphag Spearman\" 5 \\n'\r\ntext += 'addstartunits \"Androphag Archer\" 5 \\n'\r\ntext += 'addstartunits \"Androphag Cavalry\" 1 \\n'\r\n}\r\nif(shuffle3 === 3 && witchcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\nif(shuffle3 === 4 && baalcheck === true){\t\r\ntext += 'addstartunits \"Ba' + illapp + 'alite Spearman\" 10 \\n'\r\ntext += 'addstartunits \"Ba' + illapp + 'alite Archer\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck === true){\t\r\ntext += 'addstartunits \"Bakemono Spearman\" 15 \\n'\r\ntext += 'addstartunits \"Bakemono Sho\" 15 \\n'\r\ntext += 'addstartunits \"Bakemono Bowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck === true){\t\r\ntext += 'addstartunits \"Barbarian Warrior\" 15 \\n'\r\ntext += 'addstartunits \"Barbarian Bowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck === true){\t\r\ntext += 'addstartunits \"Velite\" 10 \\n'\r\ntext += 'addstartunits \"Hastati\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck === true){\t\r\ntext += 'addstartunits \"Pale One\" 10 \\n'\r\ntext += 'addstartunits \"Pale One Soldier\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck === true){\t\r\ntext += 'addstartunits \"Barechested Warrior\" 10 \\n'\r\ntext += 'addstartunits \"Barechested Slinger\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck ===true){\t\r\ntext += 'addstartunits \"Hoburg Crossbow\" 10 \\n'\r\ntext += 'addstartunits \"Hoburg Defender\" 5 \\n'\r\ntext += 'addstartunits \"Hoburg Soldier\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck === true){\t\r\ntext += 'addstartunits \"Tribal Warrior\" 10 \\n'\r\ntext += 'addstartunits \"Jungle Warrior\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck === true){\t\r\ntext += 'addstartunits \"Goblin\" 15 \\n'\r\ntext += 'addstartunits \"Rock Troll\" 1 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck === true){\t\r\ntext += 'addstartunits \"Spearman\" 10 \\n'\r\ntext += 'addstartunits \"Halberdier\" 8 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck === true){\t\r\ntext += 'addstartunits \"Dwarf Worker\" 12 \\n'\r\ntext += 'addstartunits \"Dwarf\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck === true){\t\r\ntext += 'addstartunits \"Hobmark Soldier\" 10 \\n'\r\ntext += 'addstartunits \"Hobmark Defender\" 5 \\n'\r\ntext += 'addstartunits \"Hobmark Crossbow\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck === true){\t\r\ntext += 'addstartunits \"Satyr Warrior\" 5 \\n'\r\ntext += 'addstartunits \"Satyr Javelinist\" 5 \\n'\r\ntext += 'addstartunits \"Harpy\" 1 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 17){\t\r\ntext += 'addstartunits \"Militia\" 10 \\n'\r\ntext += 'addstartunits \"Slinger\" 10 \\n'\r\n}\r\n}\r\n\r\nif(saneshuffle !== \"swap\"){\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addunitrec \"' + team1_ranged_empty[roll].name + '\" '+ team1_ranged_empty[roll].chance + ' ' + team1_ranged_empty[roll].num + ' ' + team1_ranged_empty[roll].gold + ' 0 ' + team1_ranged_empty[roll].iron + ' \\n'\r\nstartstore = roll\r\nstartstore3 = roll\r\n\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\ntext += 'addunitrec \"' + team1_melee_empty[roll].name + '\" '+ team1_melee_empty[roll].chance + ' ' + team1_melee_empty[roll].num + ' ' + team1_melee_empty[roll].gold + ' 0 ' + team1_melee_empty[roll].iron + ' \\n'\r\nstartstore2 = roll\r\n\r\nlimit = limit - 2 \r\n\r\n\r\nif(limit <= 0){\r\nlimit = 1\t\r\n}\r\n\r\n\r\nwhile (x <= limit){\t\r\nx++\r\ncoin = Math.floor(Math.random() * 2)\r\nif(coin === 1){\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\nstartstore3 = roll\r\ntext += 'addunitrec \"' + team1_melee_empty[roll].name + '\" '+ team1_melee_empty[roll].chance + ' ' + team1_melee_empty[roll].num + ' ' + team1_melee_empty[roll].gold + ' 0 ' + team1_melee_empty[roll].iron + ' \\n'\r\n\r\nif (team1_melee_empty[roll].name=== \"Satyr\"){\r\ntext += 'addunitrec \"Satyr Javelinist\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Warrior\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Hoplite\" 100 5 25 0 15 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Steel Hoplite\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Sniper\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\n}\r\nif (team1_melee_empty[roll].name === \"Centaur\"){\r\ntext += 'addunitrec \"Centaur Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Centaur Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Steel Cataphract\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\n}\r\nif (team1_melee_empty[roll].name === \"Minotaur\"){\r\ntext += 'addunitrec \"Minotaur Warrior\" 100 3 50 0 0 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Bronze Bull\" 100 3 50 0 25 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Steel Bull\" 100 3 50 0 50 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\n\r\n}\r\nif (team1_melee_empty[roll].name === \"Harpy\"){\r\ntext += 'addunitrec \"Stymphalian Bird\" 100 5 15 0 25 \\n'\r\ntext += 'reclimiter \"=Harpy\" \\n'\r\n}\r\n}\r\nif(coin === 0){\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addunitrec \"' + team1_ranged_empty[roll].name + '\" '+ team1_ranged_empty[roll].chance + ' ' + team1_ranged_empty[roll].num + ' ' + team1_ranged_empty[roll].gold + ' 0 ' + team1_ranged_empty[roll].iron + ' \\n'\r\n\r\n\r\n\r\nif (team1_ranged_empty[roll].name === \"Centauride\"){\r\ntext += 'addunitrec \"Centauride Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\ntext += 'addunitrec \"Centauride Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\ntext += 'addunitrec \"Centauride Crossbow\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\n}\r\n}\r\n}\r\ntext += 'addunitrec \"Temple Guard\" 100 5 50 0 5 \\n'\r\ntext += 'recxcost 12 5 \\n'\r\ntext += 'addunitrec \"Templar\" 25 5 50 0 15 \\n'\r\ntext += 'recxcost 12 5 \\n'\r\nwhile (y <= limit2){\t\r\ny++\r\nroll = Math.floor(Math.random() * team2_empty.length)\r\ntext += 'addcomrec \"' + team2_empty[roll].name + '\" '+ team2_empty[roll].chance + ' ' + team2_empty[roll].gold + ' ' + team2_empty[roll].goldplus + ' ' + team2_empty[roll].iron + ' \\n'\r\n\r\n}\r\ntext += 'addcomrec \"'+ mymonster +'\" 5 60 30 0 \\n'\r\ntext += 'addcomrec \"'+ mymonster2 +'\" 100 100 0 0 \\n'\r\ntext += 'reclimiter \"='+ mymonster +'\" \\n'\r\ntext += 'addcomrec \"'+ mymonster3 +'\" 100 250 0 0 \\n'\r\ntext += 'reclimiter \"='+ mymonster2 +'\" \\n'\r\ntext += 'addcomrec \"'+ mymonster4 +'\" 100 600 0 0 \\n'\r\ntext += 'reclimiter \"='+ mymonster3 +'\" \\n'\r\ntext += 'clearstartunits \\n'\r\nhasunits = 0\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\ntext += 'addstartunits \"' + team1_melee_empty[startstore2].name + '\" '+ team1_melee_empty[startstore2].num +' \\n'\r\nhasunits += team1_melee_empty[startstore2].num\r\n\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addstartunits \"' + team1_ranged_empty[startstore].name + '\" '+ team1_ranged_empty[startstore].num +' \\n'\r\nhasunits += team1_ranged_empty[startstore].num\r\n\r\nif(hasunits < 9){\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\t\r\ntext += 'addstartunits \"' + team1_melee_empty[startstore3].name + '\" '+ team1_melee_empty[startstore3].num +' \\n'\r\nhasunits += team1_melee_empty[startstore3].num\r\n}\r\n}\r\nroll = Math.floor(Math.random() * team2_empty.length)\r\nrit2 = document.getElementById(\"rit2\").checked;\t\r\n\r\nif(rit2 === false){\t\r\ntext += 'setmaincom \"' + mymonster + '\" \\n'\r\n}\r\nif(rit2 === true){\t\r\ntext += 'setmaincom \"' + mymonster2 + '\" \\n'\r\n}\r\ntext += 'addstartcom \"' + team2_empty[roll].name + '\" \\n'\r\ntext += 'hometerr ' + randomItem(team4) + ' \\n'\r\ncoin = Math.floor(Math.random() * 4)\r\ntext += 'clearstartterr \\n'\t\r\ntext += ' \\n'\r\ndescrroll =\t'descr \"' + randomItem(team9) + ' ' + randomItem(team10) + ' ' + randomItem(team11) + ' ' + randomItem(team12) + '\" \\n'\r\n\r\nx = 0\r\ny = 0\r\nz = 0\r\nw = 0\r\nv = 0\r\n\r\nlimit = (Math.floor(Math.random() * unitnumber)) + 1\r\nlimit2 = Math.floor(Math.random() * comnumber) + 1\r\nlimit3 = Math.floor(Math.random() * 4)\r\n\r\nif(limit2 <= 0){\r\nlimit2 = 4\t\r\n}\t\t\r\nshuffle = randomItem(team8)\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonsterstore = 'newmonster \"' + mymonster + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonsterstore = 'newmonster \"' + mymonster + '\" \\n'\t\r\n}\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster2 = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonster2store = 'newmonster \"' + mymonster2 + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster2 =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonster2store = 'newmonster \"' + mymonster2 + '\" \\n'\t\r\n}\r\n\r\ncoin = Math.floor(Math.random() * 4)\r\nif(coin === 3){\r\nmymonster3 = randomItem(team5) + \" \" + randomItem(team6) + ' of ' + randomItem(team7)\t\r\nmymonster3store = 'newmonster \"' + mymonster3 + '\" \\n'\t\r\n}\t\r\nif(coin != 3){\r\nmymonster3 =\t randomItem(team5) + \" \" + randomItem(team6)\r\nmymonster3store = 'newmonster \"' + mymonster3 + '\" \\n'\t\r\n}\r\nleader = randomItem(team3_3_empty)\r\n\r\ntext += mymonsterstore\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 47 1 \\n'\t\r\ntext += 'gatherherbs \\n'\t\r\n\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 1 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\ntext += 'mastery 1 \\n'\r\ntext += ' \\n'\r\n\r\nleader = randomItem(team3_2_empty)\t\r\ntext += mymonster2store\t\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 47 2 \\n'\r\ntext += 'gatherherbs \\n'\r\n\t\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 2 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\ntext += 'mastery 1 \\n'\r\ntext += ' \\n'\r\n\r\nleader = randomItem(team3_empty)\t\r\ntext += mymonster3store\t\r\ntext += descrroll\r\ntext += 'copystats \"' + leader + '\" \\n'\r\ntext += 'copyspr \"' + leader + '\" \\n'\r\n\r\nhproll = Math.floor(Math.random() * 28) + 5\r\n\r\nif(leader === \"Black Cat Familiar\" || \r\n leader === \"Rabbit\" ||\r\n leader === \"Dog\" || \r\n leader === \"Wolf\" || \r\n leader === \"Snake\" || \r\n leader === \"Ape\" ||\r\n leader === \"Dancing Sword\" || \r\n leader === \"Living Bow\" || \r\n leader === \"Imp\" || \r\n leader === \"Goblin\" || \r\n leader === \"Goat\" || \r\n leader === \"Bear\" || \r\n leader === \"Boar\" ||\r\n leader === \"Serpent\" || \r\n leader === \"Giant Snail\" || \r\n leader === \"Large Spider\" || \r\n leader === \"Harpy\" ||\r\n leader === \"Giant Scorpion\" ){\r\ntext += 'hp ' + hproll + ' \\n'\t\r\n}\r\n\r\ntext += 'power 47 3 \\n'\r\ntext += 'gatherherbs \\n'\r\n\r\ncoin2 = Math.floor(Math.random() * 2)\r\nspell = Math.floor(Math.random() * 62)\r\n\r\nif(coin2 === 1){\r\ntext += 'spellweaponbonus ' + spell + ' 3 \\n'\t\r\n}\r\ntext += 'rank -1 \\n'\r\n\r\ntext += ' \\n'\r\n\r\ntext += 'selectclass 24 \\n'\r\ntext += 'clearrec \\n'\r\n\r\n\r\nshuffle3 = Math.floor(Math.random() * 17) + 1\r\n\r\nif(saneshuffle === \"swap\"){\r\n\r\nif(shuffle3 === 1){\t\r\ntext += 'addunitrec \"Longbowman\" 100 4 50 0 0 \\n' \r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Zweihander\" 100 5 50 0 10 \\n'\r\ntext += 'addunitrec \"Tower Guard\" 100 5 50 0 15 \\n'\r\ntext += 'addunitrec \"Cavalryman\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"War Dog\" 100 4 25 0 0 \\n' \r\ntext += 'addunitrec \"Ballista\" 100 2 25 0 50 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addunitrec \"Trebuchet\" 100 1 50 0 50 \\n'\r\ntext += 'addunitrec \"Spearman\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 5 10 70 0 7 \\n' \r\ntext += 'addunitrec \"Swordsman\" 5 10 70 0 7 \\n'\r\ntext += 'addunitrec \"Trebuchet\" 10 2 75 0 75 \\n' \r\ntext += 'addcomrec \"High Lord\" 20 50 10 10 \\n' \r\ntext += 'reclimiter \"+Hedge Wizard\" \\n'\r\ntext += 'addcomrec \"Court Mage\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Alchemist\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Monk\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 2){\t\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 3 && witchcheck === true){\t\r\ntext += 'addunitrec \"Androphag Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Androphag Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Androphag Cavalry\" 100 5 50 0 5 \\n' \r\ntext += 'addcomrec \"Androphag Lord\" 5 50 10 0 \\n'\r\ntext += 'addcomrec \"Manflayer\" 2 70 20 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 3 && witchcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck === true){\t\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Ba' + illapp + 'alite Spearman\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Zealot\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Ba' + illapp + 'alite Heavy infantry\" 100 5 50 0 25 \\n' \r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck === true){\t\r\ntext += 'addunitrec \"Bakemono Archer\" 100 5 25 0 1 \\n' \r\ntext += 'addunitrec \"Bakemono Soldier\" 100 5 25 0 1 \\n'\r\ntext += 'addunitrec \"Bakemono Swordsman\" 100 5 25 0 3 \\n'\r\ntext += 'addunitrec \"Dai Bakemono\" 25 3 50 0 15 \\n'\r\ntext += 'addunitrec \"Dai Bakemono Archer\" 25 3 50 0 15 \\n'\r\ntext += 'addunitrec \"O Bakemono\" 25 1 25 0 0 \\n'\r\ntext += 'addunitrec \"Bakemono Bowman\" 100 5 25 0 0 \\n'\r\ntext += 'addunitrec \"Bakemono Sho\" 100 5 25 0 0 \\n'\r\ntext += 'addcomrec \"Bakemono General\" 5 50 10 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck === true){\t\r\ntext += 'addunitrec \"Barbarian Warrior\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Bowman\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Swordsman\" 100 7 50 0 10 \\n'\r\ntext += 'addunitrec \"Barbarian Cavalry\" 100 4 50 0 0 \\n'\r\ntext += 'addunitrec \"Barbarian Lancer\" 100 4 50 0 10 \\n'\r\ntext += 'addunitrec \"Barbarian Werebear\" 10 1 25 0 0 \\n'\r\ntext += 'addcomrec \"Spirit Guide\" 8 75 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Soothsayer\" 8 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Barbarian Leader\" 100 25 10 0 \\n'\r\ntext += 'reclimiter \"-Barbarian Leader\" \\n'\r\ntext += 'addcomrec \"Mounted Chief\" 10 25 10 0 \\n'\r\ntext += 'addmercrec \"Mounted Scout\" 15 1 15 10 0 \\n'\r\ntext += 'addcomrec \"Crystal Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Crystal Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Crystal Priestess\" \\n'\r\ntext += 'addunitrec \"Crystal Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Crystal Priestess\" \\n'\r\ntext += 'addcomrec \"Garnet Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Garnet Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Garnet Priestess\" \\n'\r\ntext += 'addunitrec \"Garnet Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Garnet Priestess\" \\n'\r\ntext += 'addcomrec \"Jade Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Jade Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Jade Priestess\" \\n'\r\ntext += 'addunitrec \"Jade Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Jade Priestess\" \\n'\r\ntext += 'addcomrec \"Onyx Priestess\" 3 40 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Onyx Sorceress\" 3 80 20 0 \\n'\r\ntext += 'reclimiter \"+Onyx Priestess\" \\n'\r\ntext += 'addunitrec \"Onyx Amazon\" 25 8 50 0 0 \\n'\r\ntext += 'reclimiter \"+Onyx Priestess\" \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck === true){\t\r\ntext += 'addunitrec \"Veles\" 100 5 40 0 0 \\n'\r\ntext += 'addunitrec \"Hastatus\" 100 5 45 0 5 \\n'\r\ntext += 'addunitrec \"Princeps\" 100 5 50 0 10 \\n'\r\ntext += 'addunitrec \"Princeps Solaris\" 100 5 55 0 10 \\n'\r\ntext += 'reclimiter \"+Leo\" \\n'\r\ntext += 'addunitrec \"Triarius\" 100 5 55 0 20 \\n'\r\ntext += 'addunitrec \"Praetorian Guard\" 5 5 60 0 20 \\n'\r\n\r\ntext += 'addunitrec \"Ballista\" 100 2 25 0 50 \\n'\r\ntext += 'addunitrec \"Hastatus\" 5 10 65 0 5 \\n'\r\ntext += 'addmercrec \"Standard\" 50 1 20 0 0 \\n' \r\ntext += 'addmercrec \"Archer\" 20 5 50 0 0 \\n'\r\ntext += 'addmercrec \"Gladiator\" 20 2 25 0 0 \\n'\r\ntext += 'addmercrec \"Retiarius\" 1 2 25 0 0 \\n'\r\n\r\ntext += 'addcomrec \"Centurion\" 25 35 10 0 \\n'\r\ntext += 'addcomrec \"Leo\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Heliodromus\" 1 90 20 0 \\n'\r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Renata\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Renatus\" 1 110 20 0 \\n'\r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Serpent Acolyte\" 5 50 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Serpent Priest\" 2 90 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Reveler\" 5 50 20 0 \\n'\r\ntext += 'addcomrec \"Augur\" 5 50 20 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck === true){\t\r\n\r\ntext += 'addunitrec \"Pale One\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Pale One Soldier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Cavern Guard\" 100 5 50 0 20 \\n'\r\ntext += 'addunitrec \"Ancient Hurler\" 25 1 40 0 0 \\n'\r\ntext += 'addunitrec \"Ancient Pale One\" 25 1 40 0 15 \\n'\r\ntext += 'addunitrec \"Seal Guard\" 25 1 50 0 25 \\n'\r\n\r\ntext += 'addcomrec \"Ancient Commander\" 5 60 20 15 \\n'\r\ntext += 'addcomrec \"Pale One Commander\" 10 40 10 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck === true){\t\r\n\r\ntext += 'addunitrec \"Barechested Slinger\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Barechested Swordsman\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Barechested Warrior\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Beast Cavalry\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Boar Warrior\" 15 4 50 0 10 \\n'\r\n\r\ntext += 'addcomrec \"Chieftain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Hornblower\" 5 25 10 0 \\n'\r\ntext += 'addcomrec \"Vergobret\" 5 30 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck === true){\t\r\n\r\ntext += 'addunitrec \"Hoburg Militia\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Slinger\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Soldier\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Pikeneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Crossbow\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Guard\" 100 10 40 0 10 \\n'\r\ntext += 'addunitrec \"Hoburg Defender\" 100 15 50 0 10 \\n'\r\ntext += 'addunitrec \"Hog Knight\" 100 5 50 0 10 \\n'\r\n\r\ntext += 'addcomrec \"Hogmeister\" 10 25 5 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\n\r\nif(shuffle3 === 11 && priestcheck ===true){\t\r\n\r\ntext += 'addunitrec \"Tribal Warrior\" 100 7 50 0 0 \\n'\r\ntext += 'addunitrec \"Jungle Warrior\" 100 6 50 0 0 \\n'\r\ntext += 'addunitrec \"Feathered Warrior\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Jaguar Warrior\" 30 5 50 0 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck === true){\t\r\n\r\ntext += 'addunitrec \"Goblin\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Ogre\" 100 1 25 0 0 \\n'\r\ntext += 'addunitrec \"Goblin Spearman\" 40 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Goblin Archer\" 20 10 50 0 0 \\n'\r\ntext += 'addunitrec \"Wolf Kin\" 20 10 50 0 0 \\n'\r\ntext += 'addunitrec \"Wolf Kin Reaver\" 20 7 50 0 10 \\n'\r\ntext += 'addunitrec \"Rock Troll\" 20 1 50 0 60 \\n'\r\ntext += 'addunitrec \"Troll\" 30 1 50 0 20 \\n'\r\ntext += 'addunitrec \"Forest Troll\" 40 1 40 0 10 \\n'\r\ntext += 'addunitrec \"Hill Giant\" 5 1 100 0 0 \\n'\r\ntext += 'addunitrec \"Ettin\" 10 1 75 0 0 \\n'\r\ntext += 'addcomrec \"Goblin Chieftain\" 7 25 20 0 \\n'\r\ntext += 'addcomrec \"Ogre Chief\" 3 35 20 0 \\n'\r\ntext += 'addcomrec \"Forest Giant\" 5 70 20 0 \\n'\r\n\r\ntext += 'addmercrec \"Goblin Murderer\" 3 1 10 40 0 \\n'\r\ntext += 'addcomrec \"Goblin Hero\" 3 10 50 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck === true){\r\n\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n'\t\r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n' \t\r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Temple Guard\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Templar\" 100 5 50 0 15 \\n' \r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\n\r\ntext += 'addcomrec \"Missionary\" 5 20 10 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck === true){\r\ntext += 'addunitrec \"Dwarf Worker\" 100 5 30 0 0 \\n'\r\n\r\ntext += 'addunitrec \"Dwarf\" 100 5 0 0 20 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Warrior\" 100 5 0 0 30 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Guard\" 100 5 0 0 40 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarf Arbarlest\" 100 5 0 0 30 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Outdoor Dwarf\" 100 2 10 0 10 \\n'\r\ntext += 'reclimiter \"=Dwarf Worker\" \\n'\r\ntext += 'addunitrec \"Dwarven Ballista\" 100 1 0 0 40 \\n'\r\n\r\ntext += 'addmercrec \"Archer\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Crossbowman\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Pikeneer\" 3 10 150 0 10 \\n' \r\ntext += 'addmercrec \"Pikeneer\" 3 20 250 0 10 \\n' \r\ntext += 'addmercrec \"Spearman\" 3 10 150 0 0 \\n' \r\ntext += 'addmercrec \"Swordsman\" 3 10 150 0 10 \\n' \r\n\r\ntext += 'addcomrec \"Dwarf Commander\" 15 20 10 0 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck === true){\r\n\t\r\ntext += 'addunitrec \"Hoburg Militia\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hoburg Slinger\" 100 15 50 0 0 \\n'\r\ntext += 'addunitrec \"Hobmark Soldier\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Hoburg Pikeneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Hammerer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Pickaneer\" 100 10 30 0 5 \\n'\r\ntext += 'addunitrec \"Hobmark Crossbow\" 100 15 50 0 5 \\n'\r\ntext += 'addunitrec \"Markgraf Guard\" 100 10 40 0 10 \\n'\r\ntext += 'addunitrec \"Hobmark Defender\" 100 15 50 0 10 \\n'\r\ntext += 'addunitrec \"Hog Hussar\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 25 \\n'\r\n\r\ntext += 'addcomrec \"Hogmeister\" 10 25 5 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck === true){\r\n\r\ntext += 'addunitrec \"Satyr \" 100 5 50 0 0 \\n'\t\r\ntext += 'addunitrec \"Satyr Javelinist\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Warrior\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Hoplite\" 100 5 25 0 15 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Steel Hoplite\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Sniper\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\n\r\ntext += 'addunitrec \"Centaur\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Centaur Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Centaur Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Steel Cataphract\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\n\r\ntext += 'addunitrec \"Minotaur\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Minotaur Warrior\" 100 3 50 0 0 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Bronze Bull\" 100 3 50 0 25 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Steel Bull\" 100 3 50 0 50 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\n\r\ntext += 'addunitrec \"Harpy\" 100 5 50 0 0 \\n'\r\ntext += 'addunitrec \"Stymphalian Bird\" 100 5 15 0 25 \\n'\r\ntext += 'reclimiter \"=Harpy\" \\n'\r\n\r\ntext += 'addcomrec \"Satyr Commander\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Hoplite Commander\" 5 40 10 5 \\n'\r\ntext += 'addcomrec \"Centaur Commander\" 5 50 15 5 \\n'\r\ntext += 'addcomrec \"Cataphract Commander\" 3 50 15 10 \\n'\r\n\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck !== true){\r\ntext += 'addunitrec \"Spearman\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Crossbowman\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Swordsman\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Heavy Infatry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\n}\r\n\r\nif(shuffle3 === 17){\r\ntext += 'addunitrec \"Militia\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Slinger\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 100 5 50 0 0 \\n' \r\ntext += 'addunitrec \"Light Cavalry\" 100 3 50 0 0 \\n'\r\ntext += 'addunitrec \"Pikeneer\" 100 5 50 0 5 \\n' \r\ntext += 'addunitrec \"Halberdier\" 100 5 50 0 5 \\n'\r\ntext += 'addunitrec \"Tower Guard\" 100 5 50 0 15 \\n'\r\ntext += 'addunitrec \"Cavalryman\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"Heavy Cavalry\" 100 3 50 0 20 \\n'\r\ntext += 'addunitrec \"Heavy Infantry\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Heavy Spearman\" 100 5 50 0 25 \\n'\r\ntext += 'addunitrec \"Catapult\" 100 1 25 0 50 \\n'\r\ntext += 'addunitrec \"Spearman\" 5 10 70 0 0 \\n' \r\ntext += 'addunitrec \"Archer\" 5 10 70 0 0 \\n' \r\n\r\ntext += 'addcomrec \"Court Mage\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Alchemist\" 3 45 15 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"White Wizard\" 0 100 100 0 \\n' \r\ntext += 'libraryrec \\n'\r\ntext += 'addcomrec \"Monk\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Priest\" 3 45 15 0 \\n' \r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Scout\" 5 15 10 0 \\n'\r\ntext += 'addcomrec \"Captain\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Commander\" 10 40 10 0 \\n'\r\ntext += 'addcomrec \"Mounted Commander\" 5 40 10 0 \\n'\r\ntext += 'addcomrec \"Assassin\" 2 80 30 0 \\n'\r\n}\r\n\r\nif(shuffle2 === 11){\r\ntext += 'addcomrec \"Oracle of Subterranean Fire\" 0 150 30 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Oracle of Subterranean Waters\" 0 150 30 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Oracle of the Dead\" 0 150 30 0 \\n'\r\ntext += 'templerec \\n'\r\n}\r\nif(shuffle2 === 9){\r\ntext += 'addcomrec \"Sun Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Blood Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Sky Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Rain Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Moon Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\ntext += 'addcomrec \"Death Temple Attendant\" 3 45 20 0 \\n'\r\ntext += 'templerec \\n'\r\n}\r\nif (shuffle2 === 13){\t\r\ntext += 'addmercrec \"Mirror\" 100 1 10 0 0\\n'\r\ntext += 'addmercrec \"Large Mirror\" 100 1 25 0 0\\n'\r\ntext += 'addmercrec \"Silver Mirror\" 100 1 50 0 0\\n'\r\ntext += 'addmercrec \"Golden Mirror\" 100 1 150 0 0\\n'\r\n}\r\nif (shuffle2 === 14){\t\r\ntext += 'addunitrec \"Dwarf Warrior\" 100 5 0 0 30\\n'\r\ntext += 'reclimiter \"=Dwarf Worker\"\\n'\r\ntext += 'addunitrec \"Dwarf Guard\" 100 5 0 0 40\\n'\r\ntext += 'reclimiter \"=Dwarf Worker\"\\n'\r\n}\r\nif(shuffle2 === 15){\r\ntext += 'addcomrec \"Warlock'+ illapp +'s Apprentice\" 5 55 20 0 \\n'\r\n}\r\n\r\ntext += 'addcomrec \"'+ mymonster +'\" 5 60 30 0 \\n'\r\ntext += 'clearstartunits \\n'\r\nif(shuffle3 === 1){\t\r\ntext += 'addstartunits \"Cavalryman\" 5 \\n'\r\ntext += 'addstartunits \"Spearman\" 6 \\n'\r\ntext += 'addstartunits \"Archer\" 5 \\n'\r\n}\r\nif(shuffle3 === 2){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\nif(shuffle3 === 3 && witchcheck === true){\t\r\ntext += 'addstartunits \"Androphag Spearman\" 5 \\n'\r\ntext += 'addstartunits \"Androphag Archer\" 5 \\n'\r\ntext += 'addstartunits \"Androphag Cavalry\" 1 \\n'\r\n}\r\nif(shuffle3 === 3 && witchcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\nif(shuffle3 === 4 && baalcheck === true){\t\r\ntext += 'addstartunits \"Ba' + illapp + 'alite Spearman\" 10 \\n'\r\ntext += 'addstartunits \"Ba' + illapp + 'alite Archer\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 4 && baalcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck === true){\t\r\ntext += 'addstartunits \"Bakemono Spearman\" 15 \\n'\r\ntext += 'addstartunits \"Bakemono Sho\" 15 \\n'\r\ntext += 'addstartunits \"Bakemono Bowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 5 && bakemonocheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck === true){\t\r\ntext += 'addstartunits \"Barbarian Warrior\" 15 \\n'\r\ntext += 'addstartunits \"Barbarian Bowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 6 && barbariancheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck === true){\t\r\ntext += 'addstartunits \"Velite\" 10 \\n'\r\ntext += 'addstartunits \"Hastati\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 7 && senatorcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck === true){\t\r\ntext += 'addstartunits \"Pale One\" 10 \\n'\r\ntext += 'addstartunits \"Pale One Soldier\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 8 && paleonecheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck === true){\t\r\ntext += 'addstartunits \"Barechested Warrior\" 10 \\n'\r\ntext += 'addstartunits \"Barechested Slinger\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 9 && druidcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck ===true){\t\r\ntext += 'addstartunits \"Hoburg Crossbow\" 10 \\n'\r\ntext += 'addstartunits \"Hoburg Defender\" 5 \\n'\r\ntext += 'addstartunits \"Hoburg Soldier\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 10 && hoburgcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck === true){\t\r\ntext += 'addstartunits \"Tribal Warrior\" 10 \\n'\r\ntext += 'addstartunits \"Jungle Warrior\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 11 && priestcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck === true){\t\r\ntext += 'addstartunits \"Goblin\" 15 \\n'\r\ntext += 'addstartunits \"Rock Troll\" 1 \\n'\r\n}\r\n\r\nif(shuffle3 === 12 && trollcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck === true){\t\r\ntext += 'addstartunits \"Spearman\" 10 \\n'\r\ntext += 'addstartunits \"Halberdier\" 8 \\n'\r\n}\r\n\r\nif(shuffle3 === 13 && elcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck === true){\t\r\ntext += 'addstartunits \"Dwarf Worker\" 12 \\n'\r\ntext += 'addstartunits \"Dwarf\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 14 && dwarfcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck === true){\t\r\ntext += 'addstartunits \"Hobmark Soldier\" 10 \\n'\r\ntext += 'addstartunits \"Hobmark Defender\" 5 \\n'\r\ntext += 'addstartunits \"Hobmark Crossbow\" 10 \\n'\r\n}\r\n\r\nif(shuffle3 === 15 && homarkcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck === true){\t\r\ntext += 'addstartunits \"Satyr Warrior\" 5 \\n'\r\ntext += 'addstartunits \"Satyr Javelinist\" 5 \\n'\r\ntext += 'addstartunits \"Harpy\" 1 \\n'\r\n}\r\n\r\nif(shuffle3 === 16 && dryadcheck !== true){\t\r\ntext += 'addstartunits \"Swordsman\" 8 \\n'\r\ntext += 'addstartunits \"Crossbowman\" 5 \\n'\r\n}\r\n\r\nif(shuffle3 === 17){\t\r\ntext += 'addstartunits \"Militia\" 10 \\n'\r\ntext += 'addstartunits \"Slinger\" 10 \\n'\r\n}\r\n}\r\n\r\nif(saneshuffle !== \"swap\"){\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addunitrec \"' + team1_ranged_empty[roll].name + '\" '+ team1_ranged_empty[roll].chance + ' ' + team1_ranged_empty[roll].num + ' ' + team1_ranged_empty[roll].gold + ' 0 ' + team1_ranged_empty[roll].iron + ' \\n'\r\nstartstore = roll\r\nstartstore3 = roll\r\n\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\ntext += 'addunitrec \"' + team1_melee_empty[roll].name + '\" '+ team1_melee_empty[roll].chance + ' ' + team1_melee_empty[roll].num + ' ' + team1_melee_empty[roll].gold + ' 0 ' + team1_melee_empty[roll].iron + ' \\n'\r\nstartstore2 = roll\r\n\r\nlimit = limit - 2 \r\n\r\n\r\nif(limit <= 0){\r\nlimit = 1\t\r\n}\r\n\r\n\r\nwhile (x <= limit){\t\r\nx++\r\ncoin = Math.floor(Math.random() * 2)\r\nif(coin === 1){\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\ntext += 'addunitrec \"' + team1_melee_empty[roll].name + '\" '+ team1_melee_empty[roll].chance + ' ' + team1_melee_empty[roll].num + ' ' + team1_melee_empty[roll].gold + ' 0 ' + team1_melee_empty[roll].iron + ' \\n'\r\nstartstore3 = roll\r\n\r\nif (team1_melee_empty[roll].name=== \"Satyr\"){\r\ntext += 'addunitrec \"Satyr Javelinist\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Warrior\" 100 5 25 0 0 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Hoplite\" 100 5 25 0 15 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Steel Hoplite\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\ntext += 'addunitrec \"Satyr Sniper\" 100 5 25 0 25 \\n'\r\ntext += 'reclimiter \"=Satyr\" \\n'\r\n}\r\nif (team1_melee_empty[roll].name === \"Centaur\"){\r\ntext += 'addunitrec \"Centaur Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Centaur Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\ntext += 'addunitrec \"Steel Cataphract\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centaur\" \\n'\r\n}\r\nif (team1_melee_empty[roll].name === \"Minotaur\"){\r\ntext += 'addunitrec \"Minotaur Warrior\" 100 3 50 0 0 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Bronze Bull\" 100 3 50 0 25 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\ntext += 'addunitrec \"Steel Bull\" 100 3 50 0 50 \\n'\r\ntext += 'reclimiter \"=Minotaur\" \\n'\r\n\r\n}\r\nif (team1_melee_empty[roll].name === \"Harpy\"){\r\ntext += 'addunitrec \"Stymphalian Bird\" 100 5 15 0 25 \\n'\r\ntext += 'reclimiter \"=Harpy\" \\n'\r\n}\r\n}\r\nif(coin === 0){\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addunitrec \"' + team1_ranged_empty[roll].name + '\" '+ team1_ranged_empty[roll].chance + ' ' + team1_ranged_empty[roll].num + ' ' + team1_ranged_empty[roll].gold + ' 0 ' + team1_ranged_empty[roll].iron + ' \\n'\r\n\r\n\r\n\r\nif (team1_ranged_empty[roll].name === \"Centauride\"){\r\ntext += 'addunitrec \"Centauride Warrior\" 100 3 25 0 0 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\ntext += 'addunitrec \"Centauride Cataphract\" 100 3 25 0 25 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\ntext += 'addunitrec \"Centauride Crossbow\" 100 3 25 0 50 \\n'\r\ntext += 'reclimiter \"=Centauride\" \\n'\r\n}\r\n}\r\n}\r\nwhile (y <= limit2){\t\r\ny++\r\nroll = Math.floor(Math.random() * team2_empty.length)\r\ntext += 'addcomrec \"' + team2_empty[roll].name + '\" '+ team2_empty[roll].chance + ' ' + team2_empty[roll].gold + ' ' + team2_empty[roll].goldplus + ' ' + team2_empty[roll].iron + ' \\n'\r\n\r\n}\r\ntext += 'addcomrec \"'+ mymonster +'\" 5 60 30 0 \\n'\r\ntext += 'clearstartunits \\n'\r\nhasunits = 0\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\r\ntext += 'addstartunits \"' + team1_melee_empty[startstore2].name + '\" '+ team1_melee_empty[startstore2].num +' \\n'\r\nhasunits += team1_melee_empty[startstore2].num\r\n\r\nroll = Math.floor(Math.random() * team1_ranged_empty.length)\r\ntext += 'addstartunits \"' + team1_ranged_empty[startstore].name + '\" '+ team1_ranged_empty[startstore].num +' \\n'\r\nhasunits += team1_ranged_empty[startstore].num\r\n\r\nif(hasunits < 9){\r\nroll = Math.floor(Math.random() * team1_melee_empty.length)\t\r\ntext += 'addstartunits \"' + team1_melee_empty[startstore3].name + '\" '+ team1_melee_empty[startstore3].num +' \\n'\r\nhasunits += team1_melee_empty[startstore3].num\r\n}\r\n}\r\nroll = Math.floor(Math.random() * team2_empty.length)\r\nrit2 = document.getElementById(\"rit2\").checked;\t\r\n\r\nif(rit2 === false){\t\r\ntext += 'setmaincom \"' + mymonster + '\" \\n'\r\n}\r\nif(rit2 === true){\t\r\ntext += 'setmaincom \"' + mymonster2 + '\" \\n'\r\n}\r\ntext += 'addstartcom \"' + team2_empty[roll].name + '\" \\n'\r\ntext += 'hometerr 236 \\n'\r\ncoin = Math.floor(Math.random() * 4)\r\ntext += 'clearstartterr \\n'\t\r\ntext += ' \\n'\r\n\r\ndump += text\r\nreturn dump\r\n var element = document.createElement('a');\r\n element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));\r\n element.setAttribute('download', filename);\r\n\r\n element.style.display = 'none';\r\n document.body.appendChild(element);\r\n\r\n element.click();\r\n\r\n document.body.removeChild(element);\r\n}", "function howManyMovies(arrayOfMovieObjects){\n if(arrayOfMovieObjects.length ===0){return}//this is the same as return undefined\n let dramasBySteven = arrayOfMovieObjects.filter((eachMovie)=>{\n return eachMovie.director === \"Steven Spielberg\" && eachMovie.genre.includes('Drama');\n })\n return `Steven Spielberg directed ${dramasBySteven.length} drama movies!`; \n}", "function applyFormat(identifier, file, episode, anime, group) {\r\n\tvar originalIdentifier = identifier;\r\n\tvar dropIfNull = false;\r\n\tif (identifier.indexOf('<') >= 0) { \r\n\t\toriginalIdentifier = originalIdentifier.substr(originalIdentifier.indexOf('<')+1,originalIdentifier.indexOf('>')-1);\r\n\t\tidentifier = identifier.match(/(\\%[A-Z]+)/i)[0];\r\n\t\toriginalIdentifier = originalIdentifier.replace(identifier,\"%replaceme\");\r\n\t\tdropIfNull = true;\r\n\t}\r\n\t//alert('identifier: '+identifier+' ('+originalIdentifier+') exists? '+checkIdentifiers(identifier));\r\n\tif (!checkIdentifiers(identifier)) return (\"\");\r\n\tidentifier = identifier.replace(\"%ant\",anime.getTitle());\r\n\tidentifier = identifier.replace(\"%anat\",anime.getAltTitle());\r\n\tidentifier = identifier.replace(\"%ept\",episode.getTitle());\r\n\tidentifier = identifier.replace(\"%epat\",episode.getAltTitle());\r\n\tif (identifier.indexOf(\"%enr\") >= 0) {\r\n\t\tvar epLen = String((anime.eps) ? anime.eps : anime.epCount);\r\n\t\tvar epFmt = '0000'+episode.epno;\r\n\t\tepFmt = epFmt.slice(epFmt.length-epLen.length);\r\n\t\tidentifier = identifier.replace(\"%enr\",episode.typeChar+epFmt); \r\n\t}\r\n\tidentifier = identifier.replace(\"%pn\",(anime.type == 'movie') ? \"PA\" : \"EP\");\r\n\tidentifier = identifier.replace(\"%fpn\",(anime.type == 'movie') ? \"Part\" : \"Episode\");\r\n\tif (identifier.indexOf(\"%raw\") >= 0) {\r\n\t\tif (file.type == 'video' && file.subtitleTracks.length == 0)\r\n\t\t\tidentifier = identifier.replace(\"%raw\",(file.audioTracks.length == 1 && file.audioTracks[0].lang == 'ja') ? \"RAW\" : \"\");\r\n\t\telse identifier = identifier.replace(\"%raw\",\"\");\r\n\t}\r\n\tidentifier = identifier.replace(\"%crc\",(file.crcStatus == 'invalid') ? \"INVALID\" : file.crc32);\r\n\tidentifier = identifier.replace(\"%CRC\",(file.crcStatus == 'invalid') ? \"INVALID\" : file.crc32.toUpperCase());\r\n\tidentifier = identifier.replace(\"%ver\",(file.version != 'v1') ? file.version : \"\");\r\n\tidentifier = identifier.replace(\"%cen\",(file.isCensored) ? \"cen\" : \"\");\r\n\tidentifier = identifier.replace(\"%uncen\",(file.isUncensored) ? \"uncen\" : \"\");\r\n\tif (identifier.indexOf(\"%dub\") >= 0) {\r\n\t\tvar dub = new Array();\r\n\t\tfor (var i = 0; i < file.audioTracks.length; i++) dub.push(file.audioTracks[i].lang);\r\n\t\tidentifier = identifier.replace(\"%dub\",(dub.length) ? dub.join(',') : \"\");\r\n\t}\r\n\tif (identifier.indexOf(\"%sub\") >= 0) {\r\n\t\tvar sub = new Array();\r\n\t\tfor (var i = 0; i < file.subtitleTracks.length; i++) sub.push(file.subtitleTracks[i].lang);\r\n\t\tidentifier = identifier.replace(\"%sub\",(sub.length) ? sub.join(',') : \"\");\r\n\t}\r\n\tif (identifier.indexOf(\"%lang\") >= 0 || identifier.indexOf(\"%flang\") >= 0) {\r\n\t\tvar dub = new Array();\r\n\t\tfor (var i = 0; i < file.audioTracks.length; i++) {\r\n\t\t\tif (file.audioTracks[i].lang == \"ja\") continue;\r\n\t\t\tif (identifier.indexOf(\"%lang\") >= 0 && dub.length > 1) { dub.push(\"+\"); break; }\r\n\t\t\tdub.push(file.audioTracks[i].lang);\r\n\t\t}\r\n\t\tvar sub = new Array();\r\n\t\tfor (var i = 0; i < file.subtitleTracks.length; i++) {\r\n\t\t\tif (file.subtitleTracks[i].lang == \"en\") continue;\r\n\t\t\tif (identifier.indexOf(\"%lang\") >= 0 && sub.length > 1) { sub.push(\"+\"); break; }\r\n\t\t\tsub.push(file.subtitleTracks[i].lang);\r\n\t\t}\r\n\t\tvar langs = \"\";\r\n\t\tif (dub.length) langs += 'dub';\r\n\t\tif (dub.length && sub.length) langs += '.';\r\n\t\tif (sub.length) langs += 'sub';\r\n\t\tif (dub.length || sub.length) langs += '_';\r\n\t\tlangs += dub.join();\r\n\t\tif (dub.length && sub.length) langs += '.';\r\n\t\tlangs += sub.join();\r\n\t\tif (langs == 'dub.sub_ja.en') langs = \"\";\r\n\t\tif (identifier.indexOf(\"%lang\") >= 0) identifier = identifier.replace(\"%lang\",langs);\r\n\t\tif (identifier.indexOf(\"%flang\") >= 0) identifier = identifier.replace(\"%flang\",langs);\r\n\t}\r\n\tidentifier = identifier.replace(\"%grp\",(group) ? group.shortName : '');\r\n\tidentifier = identifier.replace(\"%grn\",(group) ? group.name : '');\r\n\tidentifier = identifier.replace(\"%qual\",(file.quality != 'unknown') ? file.quality : \"\");\r\n\tidentifier = identifier.replace(\"%src\",file.source);\r\n\tidentifier = identifier.replace(\"%vcodec\",(file.type == 'video') ? file.videoTracks[0].codec : \"\");\r\n\tidentifier = identifier.replace(\"%acodec\",(file.type == 'video' || file.type == 'audio') ? file.audioTracks[0].codec : \"\");\r\n\tidentifier = identifier.replace(\"%achans\",((file.type == 'video' || file.type == 'audio') && file.audioTracks[0].chan != 'unknown') ? mapAudioChannels(file.audioTracks[0].chan) : \"\");\r\n\tidentifier = identifier.replace(\"%res\",(file.type == 'video' && file.resolution != 'unknown') ? file.resolution : \"\");\r\n\tidentifier = identifier.replace(\"%eps\",anime.eps);\r\n\tidentifier = identifier.replace(\"%atype\",(anime.type != 'unknown') ? mapAnimeType(anime.type) : \"\");\r\n\tidentifier = identifier.replace(\"%fid\",file.id);\r\n\tidentifier = identifier.replace(\"%gid\",file.groupId);\r\n\tidentifier = identifier.replace(\"%eid\",file.episodeId);\r\n\tidentifier = identifier.replace(\"%aid\",file.animeId);\r\n\tidentifier = identifier.replace(\"%flen\",file.size);\r\n\tidentifier = identifier.replace(\"%dlen\",formatFileSize(file.size,false));\r\n\tidentifier = identifier.replace(\"%hlen\",formatFileSize(file.size,true));\r\n\tidentifier = identifier.replace(\"%ext\",file.fileType);\r\n\tidentifier = identifier.replace(\"%ed2k\",file.ed2k);\r\n\tif (dropIfNull) {\r\n\t\tif (identifier != '') identifier = originalIdentifier.replace(\"%replaceme\",identifier);\r\n\t\telse identifier = \"\";\r\n\t}\r\n\treturn (identifier);\r\n}", "function howManyMovies(oldarr) {\r\n if (oldarr.length > 0) {\r\n let mitjaDrama = oldarr.filter((e) => {\r\n if ((e.genre.indexOf('Drama') !== -1) && (e.director.indexOf('Steven Spielberg') !== -1))\r\n return e\r\n });\r\n if (mitjaDrama.length >= 0) { return `Steven Spielberg directed ${mitjaDrama.length} drama movies!`; }\r\n } else return undefined;\r\n}", "function getMovieTitle() {\r\n\t\tvar title = new String ( document.title.replace(' on All Consuming', '') );\r\n\t\t/* get rid of subtitles and editions. they just get in the way of the search */\r\n\t\ttitle = title.replace(/ - .*/gi, '');\r\n\t\ttitle = title.replace(/ \\(\\w*screen edition\\)/gi, '');\r\n\t\treturn title;\r\n\t}", "function trainDescriptionString(train) {\n let stationsList = parseStations2();\n let trainDestinationName = stationsList[train.destination].name;\n return train.id + \" \" + train.line + \" \" + trainDestinationName;\n}", "function itemToHTML(item,type) {\n\n // console.log(item);\n // console.log(type);\n\n var theString = \"<p style=\\\"color: black;\\\">\"\n switch (type) {\n case 1:\n var date = new Date(item[\"date\"]);\n theString += \"<u>Crime</u>\" + \"<br/>\" +\n item[\"description\"] + \"<br/>\" +\n item[\"location_description\"] + \"<br/>\" +\n dateToString(date) +\n \"</p>\";\n break;\n case 2:\n var date = new Date(item[\"violation_date\"]);\n theString += \"<u>Building Violation</u>\" + \"<br/>\" +\n item[\"address\"] + \"<br/>\" +\n item[\"inspection_category\"] + \" (\" + item[\"inspection_status\"] + \")<br/>\" +\n dateToString(date) + \"<br/>\" +\n item[\"violation_ordinance\"] +\n \"</p>\"\n break;\n case 3:\n theString += \"<u>Library</u>\" + \"<br/>\" +\n item[\"name_\"] + \"<br/>\" +\n item[\"address\"] + \"<br/>\" +\n \"Open: \" + item[\"hours_of_operation\"] + \"<br/>\" +\n \"<a target=\\\"_blank\\\" href=\\\"\" + item[\"website\"] + \"\\\">Website</a>\" + \"<br/>\" +\n \"Phone: \" + item[\"phone\"] +\n \"</p>\"\n break;\n case 4:\n theString += \"<u>Christmas Tree Recycling Location</u>\" + \"<br/>\" +\n item[\"address\"] + \"<br/>\" +\n \"Free mulch: \" + item[\"free_mulch\"] + \"<br/>\" +\n \"</p>\";\n break;\n case 5:\n var creationDate = new Date(item[\"creation_date\"]);\n var completionDate = new Date(item[\"completion_date\"]);\n theString += \"<u>311 Service Request - Tree Trim</u>\" + \"<br/>\" +\n item[\"location_of_trees\"] + \"<br/>\" +\n item[\"status\"] + \"<br/>\" +\n \"Creation date: \" + dateToString(creationDate) + \"<br/>\" +\n \"Completion date: \" + dateToString(completionDate) + \"<br/>\" +\n \"</p>\";\n break;\n case 6:\n var creationDate = new Date(item[\"creation_date\"]);\n var completionDate = new Date(item[\"completion_date\"]);\n theString += \"<u>311 Service Request - Tree Debris</u>\" + \"<br/>\" +\n item[\"type_of_service_request\"] + \"<br/>\" +\n item[\"most_recent_action\"] + \"<br/>\" +\n item[\"status\"] + \"<br/>\" +\n \"Creation date: \" + dateToString(creationDate) + \"<br/>\" +\n \"Completion date: \" + dateToString(completionDate) + \"<br/>\" +\n \"</p>\";\n break;\n case 7:\n theString += \"<u>Police Station</u>\" + \"<br/>\" +\n item[\"address\"] + \"<br/>\" +\n item[\"phone\"] + \"<br/>\" +\n \"District: \" + item[\"district_name\"] + \"<br/>\" +\n \"<a target=\\\"_blank\\\" href=\\\"\" + item[\"website\"] + \"\\\">Website</a>\" + \"<br/>\" +\n \"</p>\";\n break;\n case 8:\n theString += \"<u>Park</u>\" + \"<br/>\" +\n item[\"park_name\"] + \"<br/>\" +\n item[\"street_address\"] + \"<br/>\" +\n \"Acres: \" + item[\"acres\"] + \"<br/>\" +\n \"Tennis Courts: \" + item[\"tennis_courts\"] +\n \"</p>\";\n break;\n case 9:\n var creationDate = new Date(item[\"creation_date\"]);\n var completionDate = new Date(item[\"completion_date\"]);\n theString += \"<u>311 Service Request - Pot Holes</u>\" + \"<br/>\" +\n item[\"type_of_service_request\"] + \"<br/>\" +\n \"Potholes Filled on Block: \" + item[\"number_of_potholes_filled_on_block\"] + \"<br/>\" +\n item[\"status\"] + \"<br/>\" +\n \"Creation date: \" + dateToString(creationDate) + \"<br/>\" +\n \"Completion date: \" + dateToString(completionDate) + \"<br/>\" +\n \"</p>\";\n break;\n case 10:\n theString += \"<u>L Stop</u>\" + \"<br/>\" +\n item[\"station_descriptive_name\"] + \"<br/>\" +\n \"Direction: \" + item[\"direction_id\"] + \"<br/>\" +\n \"</p>\";\n break;\n default:\n theString += \"Sorry, no information available.\" + \"</p>\";\n break;\n }\n\n return theString;\n}" ]
[ "0.61028415", "0.6101329", "0.60713917", "0.60530627", "0.6033109", "0.5989063", "0.5981828", "0.59581035", "0.5859815", "0.57870305", "0.57549006", "0.5647446", "0.56299955", "0.5571663", "0.555399", "0.5549661", "0.55399853", "0.5494202", "0.5488845", "0.547462", "0.547462", "0.547462", "0.5468026", "0.5461823", "0.54274315", "0.54209626", "0.54084295", "0.54079634", "0.53980684", "0.5390403", "0.5351651", "0.5336936", "0.5336529", "0.5327696", "0.5317368", "0.53033555", "0.52912074", "0.52870125", "0.52627295", "0.525374", "0.52364606", "0.5223158", "0.5223035", "0.5222093", "0.5218346", "0.5212611", "0.5198704", "0.5188787", "0.5174533", "0.5159568", "0.5156649", "0.5153399", "0.51453704", "0.51401883", "0.51330966", "0.5125911", "0.51221603", "0.5118819", "0.51024926", "0.5080787", "0.5077318", "0.50702596", "0.5066784", "0.5062994", "0.50616074", "0.50602424", "0.50447404", "0.5041036", "0.50399095", "0.5036055", "0.50112426", "0.50078094", "0.5004941", "0.49987236", "0.49983478", "0.49898246", "0.49887887", "0.49723965", "0.49683145", "0.49656206", "0.4961232", "0.49567223", "0.49531978", "0.49529657", "0.49529657", "0.4942391", "0.49403128", "0.49380317", "0.49365562", "0.49292877", "0.49275666", "0.4925393", "0.49204528", "0.49149662", "0.4910682", "0.49084294", "0.49084163", "0.49079683", "0.49062562", "0.4901167" ]
0.50753057
61
Funzione per la stampa a video dell array dei generi
print_genres_string(id){ let genres_string = ""; for (var i = 0; i < this.additional_infos.length; i++) { if(id == this.additional_infos[i].id){ genres_string = this.additional_infos[i].genres.join(" / "); }; }; return genres_string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playVideo() {\n playVideoSegments(transcripts)\n}", "function arrVideo(name, emotions, times) {\n this.name = name;\n this.emotions = emotions;\n this.times = times;\n}", "function arrVideo(name, emotions, times) {\n this.name = name;\n this.emotions = emotions;\n this.times = times;\n}", "render(){\n\n //hardcoded array \n let vidArray=[];\n\n //hardcoded data\n vidArray.push( new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\",\"Oct 14, 2015\", \"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"], \"./Assets/Images/920x920.jpg\"));\n vidArray.push(new vid(\"Jose Bautista hammers go-ahead three-run shot in ALDS Game 5, delivers epic bat flip\",\"Oct 14, 2015\", \"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"2,304,189 views\",[\"wow\",\"ye-haw\"],\"./Assets/Images/maxresdefault.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\",[\"wow\",\"ye-haw\"],\"./Assets/Images/american-league-wild-card-game---minnesota-twins-v-new-york-yankees-8119099224ebf5b5.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\",[\"wow\",\"ye-haw\"],\"./Assets/Images/BASEBALL-MLB-HOU-LAD-.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\",[\"wow\",\"ye-haw\"],\"./Assets/Images/Big-Read-Vladimir-Guerrero-Jr-Swings-470x264.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/donaldson.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/hqdefault.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/maxresdefault.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/PR6AGOQ7XREI5B7UMKM3KAGWFA.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/r241851_600x400_3-2.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/THKMOYWFLWJCPXQ.20170430201114.jpg\"));\n\n \n //index of current video\n let currentVid = 1;\n let current = vidArray.splice(currentVid,1);\n//\n return(\n <div className=\"video-container margin\">\n <Video current={current[0]}></Video>\n <VidList vidArray={vidArray}></VidList>\n </div>\n );\n\n }", "function feedPlayer(videoArrays, videoSrcData, video, mediaSource, visibleTopLimit = 7){\n\n\tconst containerPn = document.getElementsByClassName('pn')[0];\n\tconst references = document.getElementsByClassName('info-display-references')[0];\n\n\t//when mediaSource is ready to recieve files/video segments\n\tmediaSource.addEventListener('sourceopen', function(){\n\n\t\t//Add files/video segments codec and allow playback order indep. of file's timestamp\n\t const sourceBuffer = mediaSource.addSourceBuffer(videoSrcData.mimeCodec);\n\t sourceBuffer.mode = 'sequence';\n\n\t //Check total files size and alert developers\n\t let totalMBytes = 0;\n\n\t for(let i = 0; i < videoArrays.length; i++){\n\t \ttotalMBytes += videoArrays[i].files.reduce( (running, video) => running + video.buffer.byteLength, 0);\n\t }\n\t\t \n\t\ttotalMBytes = Number((totalMBytes / (1024 * 1024)).toFixed(2)); //size in MB\n\n\t\tif(totalMBytes * 2 > videoSrcData.bufferQuota.size){\n\t\t\tconsole.error(`Files total size (${totalMBytes} MB) will exceed the buffer size \"Pn=n!\" needs to work properly (${Math.round(totalMBytes * 2)} MB). ${videoSrcData.bufferQuota.browser}'s buffer quota is ${videoSrcData.bufferQuota.size}MB. Reduce file sizes or append files in smaller batches (and change the appendBuffer logic!!!)`);\n\t\t}else{\n\t\t\t//simulate Flash buffer empty before loading new squence\n\t\t\tconst updateDisplay = updateDisplayInfo();\n\t\t\tupdateDisplay.buffer('empty');\n\t\t\t\n\t\t\tconst track = video.addTextTrack(\"metadata\");\n\t\t\tnextSequence(videoSrcData, videoArrays, video, sourceBuffer, null, track);\t\t\t\t\t\n\t\t\tcueListener(track, video, sourceBuffer, sequenceData);\n }\n\n \t \tconst sequenceLimitCSS = Number(window.getComputedStyle(document.querySelector('body'),'::before').getPropertyValue('content').replace(/\\\"/g, ''));\n\t\tsequenceData.visible = (sequenceLimitCSS > 0 && sequenceLimitCSS < visibleTopLimit) ? sequenceLimitCSS : visibleTopLimit;\n\n\t containerPn.insertBefore(video, references);\n\n\t});\n\n}", "function drawVedio() {\n setTimeout(() => {\n canvas.getContext(\"2d\").drawImage(video, 0, 0, 100, 100);\n drawVedio();\n }, 0);\n }", "SaveForMovie() {\n var d = new Date();\n var t = d.getTime();\n var tmp = [this.currentColour, this.otherColour, this.pieces, this.pickedPiece];\n this.movieArray.push(tmp);\n console.log(\"saved for movie, frame \" + (this.movieArray.length));\n }", "async function handleStop(e) {\n resultuploadvideomateri.innerHTML = \"\";\n let blob = new Blob(recordedChunks, { 'type': 'video/mp4;' });\n recordedChunks = [];\n let videoURL = window.URL.createObjectURL(blob);\n vidSave.src = videoURL;\n\n spanstatus.innerHTML = \"Ukuran Video \" + formatBytes(blob.size, 2);\n spanstatus2.innerHTML += \"Ukuran Video \" + formatBytes(blob.size, 2);\n //---------------------------------------------------\n var reader = new FileReader();\n reader.readAsDataURL(blob);\n\n reader.onload = function (e) {\n let urlbs64 = e.target.result;\n // console.log(urlbs64);\n var inputbase64 = document.createElement(\"input\");\n inputbase64.setAttribute(\"name\", \"videodata\");\n inputbase64.setAttribute(\"id\", \"videodata\");\n inputbase64.value = urlbs64.replace(/^.*,/, '');\n\n inputbase64.setAttribute(\"style\", \"display:none\");\n\n var inputfilename = document.createElement(\"input\");\n inputfilename.setAttribute(\"name\", \"videofilename\");\n inputfilename.setAttribute(\"id\", \"videofilename\");\n inputfilename.setAttribute(\"style\", \"display:none\");\n inputfilename.value = \"Kelas_\" + idJenjang + \"_\" + StringTanggal(new Date()) + \"_id_\" + new Date().getTime();;// + namebantukirim.value.toUpperCase().replace(/\\s+/, \"_\");\n\n var inputmimetype = document.createElement(\"input\");\n inputmimetype.setAttribute(\"name\", \"videomimeType\")\n inputmimetype.setAttribute(\"id\", \"videomimeType\")\n inputmimetype.setAttribute(\"style\", \"display:none\")\n\n inputmimetype.value = \"video/mp4\";//srcEncoded.match(/^.*(?=;)/)[0];;//\"data:image/jpeg\";;// \n\n resultuploadvideomateri.innerHTML = \"\"\n resultuploadvideomateri.appendChild(inputbase64);\n resultuploadvideomateri.appendChild(inputfilename);\n resultuploadvideomateri.appendChild(inputmimetype);\n }\n //---------------------------------------------------\n recordedChunks = [];\n //vidlayar.src = \"\";\n tanda = 0;\n tutupkamera();\n\n\n}", "function vitoria()\n{\n\n estado = 6;\n som_vitoria.play();\n for (i = 0; i < 5; i++)\n {\n descarta_objecto(i);\n }\n\n move_obj($('comida_img'),-1000,0);\n move_obj($('comida_pw_img'),-1000,0);\n setTimeout(\"move_obj($('mapa_jogo_img'),-1000,0); move_obj($('mapa_jogo_flash'),23,48); \", 1000);\n setTimeout(\"move_obj($('mapa_jogo_flash'),-1000,0); move_obj($('mapa_jogo_img'),23,48); \", 1500);\n setTimeout(\"move_obj($('mapa_jogo_img'),-1000,0); move_obj($('mapa_jogo_flash'),23,48); \", 2000);\n setTimeout(\"move_obj($('mapa_jogo_flash'),-1000,0); move_obj($('mapa_jogo_img'),23,48); \", 2500);\n setTimeout(\"move_obj($('mapa_jogo_img'),-1000,0); move_obj($('mapa_jogo_flash'),23,48); \", 3000);\n setTimeout(\"move_obj($('mapa_jogo_flash'),-1000,0); move_obj($('mapa_jogo_img'),23,48); \", 3500);\n setTimeout(\"move_obj($('mapa_jogo_img'),-1000,0); move_obj($('mapa_jogo_flash'),23,48); \", 4000);\n setTimeout(\"move_obj($('mapa_jogo_flash'),-1000,0); move_obj($('mapa_jogo_img'),23,48); \", 4500);\n\n Nivel_jogador[jog_activo]++;\n for (j = 0; j < mapa_comida.length; j++)\n {\n jogador_mapa_comida[jog_activo][j] = mapa_comida[j].split(\"\");\n }\n jogador_total_comida[jog_activo] = 244;\n objectos_comida();\n\n setTimeout(\"move_obj($('comida_img'),0,50); move_obj($('comida_pw_img'),0,50); nascer(); \", 5000);\n}", "function getVideos() {\n let videoArray = [];\n for (let mediaIndexer = 0; mediaIndexer < 3; mediaIndexer += 1) {\n //screenShot[0] === thumbnail\n //screenShot[1] === videoUrl\n const screenShot = {\n thumbnail: `'https://steam-content-videos.s3-us-west-2.amazonaws.com/steam_screenshot${mediaIndexer}.png'`,\n videoUrl: `'https://steam-content-videos.s3-us-west-2.amazonaws.com/steam_content_video${mediaIndexer}.mp4'`\n }\n\n videoArray.push(screenShot)\n }\n return JSON.stringify(videoArray);\n}", "function buildPn(videoSrcData, videoArrays){\n\n\t/* Create video elements */\t\t\n\tconst [video, mediaSource] = createMediaSource();\n\n\t/* Start sourceBuffer */\t\n\tfeedPlayer(videoArrays, videoSrcData, video, mediaSource);\n}", "function paintToCanvas() { //to display webcame live in a specified canvas with videos actual height and width\n\n const width = video.videoWidth; //getting actual height and width of video\n const height = video.videoHeight;\n canvas.width = width; //setting the canvas width and height accordingly \n canvas.height = height;\n return setInterval(() => { //by setintertval method we are drawing the recieved video's image in after every 16milli sec \n ctx.drawImage(video, 0, 0, width, height); //here we are drawing the image recieved in canvas\n let pixels = ctx.getImageData(0, 0, width, height) //here we are getting the canvas image to make some effect\n // console.log(pixels)\n // debugger;\n // pixels = redeffect(pixels) //here redeffect is called\n // console.log(hola);\n pixels = rgbsplit(pixels) // we are calling rgb split to make some changes in the pixels thats is the image we get from canvas\n ctx.globalAlpha=0.8; \n // pixels = greenscreen(pixels)\n ctx.putImageData(pixels, 0, 0); //after we get the changed pixels we put it back in the canvas\n }, 16);\n}", "function generateVideo(framesArray, id){\n const rawVideoFile = `./result/raw_${id}.mp4`;\n\n let audioFile;\n if (p5Program.configs.hasAudio){\n const audioBuffer = Buffer.from(p5Program.configs.audioBlob64.split(\"data:audio/mp3;base64,\").pop(), \"base64\");\n fs.writeFileSync(`./audio/audio_${id}.mp3`, audioBuffer, {encoding: \"base64\"});\n\n audioFile = `./audio/audio_${id}.mp3`;\n }\n\n const finalVideoFile = `./result/final_${id}.mp4`;\n\n mjpeg({ fileName: rawVideoFile, ignoreIdenticalFrames: 0 })\n .then( (recorder) => {\n \n console.log(\"Adding all frames...\");\n // adding all frames\n (function addNextFrame(framesList){\n if (framesList.length === 0) finalize();\n else {\n recorder.appendImageDataUrl( framesList.shift() )\n .then( () => {\n addNextFrame(framesList);\n })\n .catch(handleError)\n }\n })(framesArray)\n\n function finalize(){\n recorder.finalize()\n .then( () => {\n // video successfully created\n console.log(\"video finalized...\");\n \n let command = new ffmpegCommand();\n command.input(rawVideoFile);\n if (audioFile) command.input(audioFile);\n\n command.videoCodec(\"libx264\");\n command.videoBitrate(\"1000k\", true);\n command.on(\"end\", function() {\n isGenerating = false;\n console.log(\"mp4 ready!\");\n // remove file input video and audio files\n try {\n fs.unlinkSync(rawVideoFile)\n if (audioFile) fs.unlinkSync(audioFile);\n } catch(err) {\n console.error(err)\n }\n });\n command.on(\"error\", handleError);\n command.output(finalVideoFile);\n command.run();\n })\n .catch(handleError)\n }\n })\n .catch(handleError)\n\n function handleError(err){\n console.log(err);\n isGenerating = false;\n }\n}", "function reproductor(video0,video, video2,video3,video4,video6,video7,video8,video9,video10){\n\n\tvideo6.style.opacity = \"0\";\n\tvideo7.style.opacity = \"0\";\n\tvideo8.style.opacity = \"0\";\n\tvideo9.style.opacity = \"0\";\n\tvideo10.style.opacity = \"0\";\n\n\tvideo0.load();\n\tvideo.load();\n\tvideo2.load();\n\tvideo3.load();\n\tvideo4.load();\n\t\n\n\tvideo.addEventListener('loadeddata', function() {\n\t\tvideo0.currentTime = 0;\n\t\tvideo0.play();\n\n\t\tvideo.currentTime = 0;\n\t\tvideo.style.opacity = \"1\";\n\t\tvideo.play();\n\n\t\tvideo2.currentTime = 0;\n\t\tvideo2.style.opacity = \"1\";\n\t\tvideo2.play(); \n\n\t\t\n\t\tvideo3.currentTime = 0;\n\t\tvideo3.style.opacity = \"1\";\n\t\tvideo3.play();\n\n\t\n\t\tvideo4.currentTime = 0;\n\t\tvideo4.style.opacity = \"1\";\n\t\tvideo4.play();\t })\t\t\t\t\n\n\tvar i = 0;\n\tvar x = 0;\n\tvar y = 0;\n\tvar z = 0;\n\tvar v = 0;\n\tvar w = 0;\n\tvar times=0;\n\tvar cadena=0;\n\n\tvideo.onended = function() {\t\t\n\t\tif (i < times){\n\t\t\ti++;\n\t\t\tvideo.play(); \n\t\t}else{ \n\t\t\tvideo.style.opacity = \"0\";\n\t\t\tvideo2.style.opacity = \"0\";\n\t\t\tvideo3.style.opacity = \"0\";\n\t\t\tvideo4.style.opacity = \"0\";\n\n\t\t\t\n\t\t\tvideo6.load();\n\t\t\tvideo7.load();\n\t\n\t\t\tvideo6.currentTime = 0;\n\t\t\tvideo6.style.opacity = \"1\";\n\t\t\tvideo6.play()\n\n\t\t\tvideo7.currentTime = 0;\n\t\t\tvideo7.style.opacity = \"1\";\n\t\t\tvideo7.play()\n\t\n\t\t}\n\t};\n\tvideo7.onended = function() {\n\t\tvideo7.currentTime = 0;\n\t\tvideo6.currentTime = 0;\n\t\tvideo6.style.opacity = \"0\";\n\t\tvideo7.style.opacity = \"0\";\n\n\t\tvideo8.load();\t\n\t\tvideo8.currentTime = 0;\n\t\tvideo8.style.opacity = \"1\";\n\t\tvideo8.play()\n\n\t\t\t\n\t};\n\tvideo8.onended = function() {\n\t\tvideo8.currentTime = 0;\n\t\tvideo8.style.opacity = \"0\";\n\n\t\tvideo10.load();\t\n\t\tvideo10.currentTime = 0;\n\t\tvideo10.style.opacity = \"1\";\n\t\tvideo10.play()\t\n\t};\n\tvideo9.onended = function() {\n\t\tvideo9.currentTime = 0;\n\t\tvideo9.style.opacity = \"0\";\n\n\t\tvideo10.load();\t\n\t\tvideo10.currentTime = 0;\n\t\tvideo10.style.opacity = \"1\";\n\t\tvideo10.play()\t\t\n\t};\n\tvideo10.onended = function() {\n\t\tvideo10.currentTime = 0;\n\t\tvideo10.style.opacity = \"0\";\n\t};\n\n\tvideo.onerror = function() {\n\t\talert(\"Chrome blocks Shia on this page:( Try on another one!\");\n\t};\n}", "getAllVideoURLs() {\n return this.completeRecordings.map((recording) => {\n //gerando um arquivo blbo de cada gravação\n const superBuffer = new Blob(recording, { type: this.videoType });\n //gerando a url de download\n return window.URL.createObjectURL(superBuffer);\n });\n }", "function ver() { //funcion que recorrera las imagenes y las mostrara\n let contenido=\"\";\n\n for(let i=0;i<fileVal.length;i++){\n let imgtemporal=fileVal[i].name;\n insetar(imgtemporal);\n \n }\n\n}", "function createSequence(videoSrcData, videoArrays){\n\n\t//shuffle arrays for each role\n\tconst rolesArrays = videoArrays.map( (array, i) => {\n\t\treturn FYshuffle(array.files, i);\n\t});\n\n\t//create a new array with shuffled arrays for each role\n\tconst sequenceMix = [];\n\tfor(let i = 0; i < videoSrcData.total; i++){\n\t\tsequenceMix.push(rolesArrays[0][i], rolesArrays[1][i], rolesArrays[2][i]);\n\t}\n\t\n\treturn sequenceMix;\n}", "function sketch(p) {\n let canvas;\n let program = {};\n let framesData;\n\n p5Program.start = function(){\n isGenerating = true;\n framesData = [];\n\n program.wordsListsArray = p5Program.configs.wordsListsArray;\n program.lineIndex = 0;\n program.wordIndex = -1; // before 1st word\n program.goingToNextLine = false;\n program.waitCountdown = END_LINE_WAIT*3; // initial wait\n program.horizontalScrollMark = 0;\n program.previousScrollMark = 0;\n program.scrollProgress = 999;\n\n // setup configs\n p.createCanvas(_WIDTH, _WIDTH * p5Program.configs.canvasHeightFactor); \n p.textFont(p5Program.configs.fFamily, 10);\n\n p.loop();\n }\n\n function stopAndPassFrames(){\n p.noLoop();\n\n generateVideo(\n framesData,\n p5Program.configs.id\n )\n }\n\n p.setup = () => {\n canvas = p.createCanvas(480, 480);\n p.frameRate(999);\n p.noStroke();\n\n p.noLoop();\n }\n function _(num, isHeight) { return num/100 * (isHeight? p.height : p.width); }\n p.draw = () => {\n if (!p5Program.configs) {\n p.noLoop();\n return;\n }\n\n p.textSize(_(p5Program.configs.fSize));\n p.textAlign(p.LEFT, p.TOP);\n\n p.background(p5Program.configs.bgColor);\n\n p.push();\n renderTextsPlaying();\n p.pop();\n\n renderFader();\n renderName();\n\n framesData.push(canvas.canvas.toDataURL(\"image/jpeg\"));\n };\n\n function renderFader(){\n p.strokeWeight(1);\n for (let i = p.height/2; i >= 0; i -= 0.5){\n const strokeColor = p.color(p5Program.configs.bgColor);\n strokeColor.setAlpha(255 - p.map(i, 0, p.height/2, 0, 255));\n p.stroke(strokeColor);\n p.line(0, i, p.width, i);\n }\n p.noStroke();\n }\n\n function renderTextsPlaying() {\n const masterArr = program.wordsListsArray;\n let currentLine = masterArr[program.lineIndex];\n p.textSize(_(p5Program.configs.fSize));\n\n // vertical scroll animation\n if (program.goingToNextLine){\n const animationProgress = p.map(\n program.waitCountdown, \n 0, GET_NEXT_LINE_DURATION(p5Program.configs.scrollSpeed),\n 0, Math.PI/2\n );\n p.translate(0, -_(p.cos(animationProgress) * p5Program.configs.verticalSpacing * program.scrollLinesAmount));\n }\n\n // horizontal scroll animation\n const nextHorizontalScrollDuration = GET_NEXT_LINE_DURATION(p5Program.configs.scrollSpeed, true);\n if (program.scrollProgress < nextHorizontalScrollDuration) program.scrollProgress++;\n const animationProgress = p.map(\n nextHorizontalScrollDuration - program.scrollProgress, \n 0, nextHorizontalScrollDuration,\n 0, Math.PI/2\n );\n const DISTANCE = program.horizontalScrollMark - program.previousScrollMark;\n p.translate(-p.cos(animationProgress) * DISTANCE, 0);\n\n // static horizontal & vertical scroll\n p.translate(-program.previousScrollMark, _(50, true));\n\n const lastLineWidth = p.textWidth(currentLine.slice(0, program.wordIndex + 1).join(\" \"));\n // popping text is out of screen? => update mark\n if (lastLineWidth > program.horizontalScrollMark + _(LIMIT_WIDTH + 5)) {\n program.previousScrollMark = program.horizontalScrollMark; // going next\n program.horizontalScrollMark = p.min(\n p.textWidth(currentLine) - _(LIMIT_WIDTH - 5), \n program.horizontalScrollMark + _(60)\n );\n program.scrollProgress = 0;\n }\n\n // render\n p.fill(p5Program.configs.textColor);\n for (let i=0; i <= program.lineIndex; i++){\n const wordsList = masterArr[program.lineIndex - i]; // inversed order\n let textLine;\n\n if (i === 0){ // current line?\n let blinkingLine = (p.frameCount % BLINK_DURATION < BLINK_DURATION/2) ? \"|\" : \"\";\n textLine = wordsList.slice(0, program.wordIndex + 1).join(\" \") + blinkingLine;\n }\n else textLine = wordsList.join(\" \");\n\n textLine = textLine.replace(/_/g, ''); // remove all _\n p.text(\n textLine,\n _(LEFT_PADDING),\n - _(p5Program.configs.verticalSpacing * i)\n );\n }\n\n // done waiting? => next action\n if (--program.waitCountdown <= 0){\n // just moved to a new line?\n if (program.goingToNextLine){\n program.goingToNextLine = false; // reset\n program.lineIndex += program.scrollLinesAmount;\n program.wordIndex = -1;\n program.horizontalScrollMark = 0;\n program.previousScrollMark = 0;\n }\n\n // still has more words?\n else if (program.wordIndex < currentLine.length - 1){\n program.wordIndex++; // next word\n const word = currentLine[program.wordIndex];\n const customeWaitAmount = word.split(\"_\").length-1;\n const lettersAmount = word.length;\n const enders = [\",\", \".\", \";\", \"?\", \"!\"];\n const periodWait = (enders.includes(word[word.length - 1])) ? END_LINE_WAIT : 0;\n const LDF = GET_LETTER_DURATION_FACTOR(p5Program.configs.textSpeed);\n program.waitCountdown = periodWait + (4 + lettersAmount) * LDF + (customeWaitAmount * LDF * 10);\n\n // extra wait if is last word in the line\n if (program.wordIndex === currentLine.length - 1){\n program.waitCountdown += END_LINE_WAIT;\n\n // another extra wait if is last line\n if (program.lineIndex === masterArr.length - 1) program.waitCountdown += END_LINE_WAIT*3;\n }\n }\n\n // still has more lines? => set up next line animation\n else if (program.lineIndex < masterArr.length - 1){\n program.waitCountdown = GET_NEXT_LINE_DURATION(p5Program.configs.scrollSpeed);\n program.goingToNextLine = true;\n \n // count empty lines to scroll past\n program.scrollLinesAmount = 1;\n let leadingToEmptiness = true;\n for (let i = program.lineIndex + 1; i < masterArr.length; i++){\n if (masterArr[i][0].length === 0) program.scrollLinesAmount++;\n else {\n leadingToEmptiness = false;\n break;\n }\n }\n // prevent crash\n if (leadingToEmptiness) program.scrollLinesAmount--;\n }\n\n // end of animation\n else stopAndPassFrames();\n }\n }\n\n function renderName(){\n let nameString = p5Program.configs.author;\n if (nameString.length !== 0) {\n p.textAlign(p.RIGHT, p.BOTTOM);\n p.textSize(_(5));\n p.fill(p5Program.configs.textColor);\n p.text(nameString, _(100 - _PADDING_), _(100 - _PADDING_, true));\n }\n }\n\n}", "function inmueble_videoInmuebleCampos(posit, datos_json) {\n\tvar contenedorDatos = $(\"#contenedorInmuebleVideos\");\n\tcontenedorDatos.html(\"\");\n\t\n\tinmueble_positions = Array();\n\tinmueble_pos_comp = -1;\n\t\t\t\n\tfor (var x = 0; x < datos_json.length; x++) {\n\t\tdivImagen = document.createElement(\"div\");\n\t\tdivImagen.className = \"thumbImg\";\n\t\t\n\t\tdivImagen.innerHTML =\n\t\t\t\"<table>\"+\n\t\t\t\t\"<tr>\"+\n\t\t\t\t\t\"<td style='text-align:left;'><a href='\"+datos_json[x].campo2+\"' target='_blank'>\"+datos_json[x].campo2+\"</a></td>\"+\n\t\t\t\t\t\"<td width='15'>\"+\n\t\t\t\t\t\t(isBorrarTuplas ? (\"<img src='images/btnCerrar.png' width='12' style='cursor:pointer; position:relative;' onclick='bool_borrar = true; inmueble_abrirModificarVideos(\"+posit+\", \"+datos_json[x].campo1+\");' />\") : \"\")+\n\t\t\t\t\t\"</td>\"+\n\t\t\t\t\"</tr>\"+\n\t\t\t\"</table>\";\n\t\t\t\n\t\tcontenedorDatos.append(divImagen);\n\t\tinmueble_positions.push(Array(datos_json[x].campo1, datos_json[x].campo2));\n\t}\n}", "function inmueble_videoInmuebleCampos(posit, datos_json) {\n\tvar contenedorDatos = $(\"#contenedorInmuebleVideos\");\n\tcontenedorDatos.html(\"\");\n\t\n\tinmueble_positions = Array();\n\tinmueble_pos_comp = -1;\n\t\t\t\n\tfor (var x = 0; x < datos_json.length; x++) {\n\t\tdivImagen = document.createElement(\"div\");\n\t\tdivImagen.className = \"thumbImg\";\n\t\t\n\t\tdivImagen.innerHTML =\n\t\t\t\"<table>\"+\n\t\t\t\t\"<tr>\"+\n\t\t\t\t\t\"<td style='text-align:left;'><a href='\"+datos_json[x].campo2+\"' target='_blank'>\"+datos_json[x].campo2+\"</a></td>\"+\n\t\t\t\t\t\"<td width='15'>\"+\n\t\t\t\t\t\t(isBorrarTuplas ? (\"<img src='images/btnCerrar.png' width='12' style='cursor:pointer; position:relative;' onclick='bool_borrar = true; inmueble_abrirModificarVideos(\"+posit+\", \"+datos_json[x].campo1+\");' />\") : \"\")+\n\t\t\t\t\t\"</td>\"+\n\t\t\t\t\"</tr>\"+\n\t\t\t\"</table>\";\n\t\t\t\n\t\tcontenedorDatos.append(divImagen);\n\t\tinmueble_positions.push(Array(datos_json[x].campo1, datos_json[x].campo2));\n\t}\n}", "function cambiarImagenes() { \n\n var arrayimagenesbatalla = new Array();\n arrayimagenesbatalla[0] = \"./assets/images/batallaindex.jpg\";\n arrayimagenesbatalla[1] = \"./assets/images/batallaindex2.jpg\";\n arrayimagenesbatalla[2] = \"./assets/images/batallaindex3.jpg\";\n arrayimagenesbatalla[3] = \"./assets/images/batallaindex4.jpg\"; \n arrayimagenesbatalla[4] = \"./assets/images/batallaindex5.jpg\"; \n arrayimagenesbatalla[5] = \"./assets/images/batallaindex6.jpg\"; \n\n var arrayimagenesviaje = new Array();\n arrayimagenesviaje[0] = \"./assets/images/travelindex.jpg\";\n arrayimagenesviaje[1] = \"./assets/images/travelindex2.jpg\";\n arrayimagenesviaje[2] = \"./assets/images/travelindex3.jpg\";\n arrayimagenesviaje[3] = \"./assets/images/travelindex4.jpg\";\n arrayimagenesviaje[4] = \"./assets/images/travelindex5.jpg\";\n \n var arrayimagenescomunidad = new Array();\n arrayimagenescomunidad[0] = \"./assets/images/fasecomunidadindex.jpg\";\n arrayimagenescomunidad[1] = \"./assets/images/fasecomunidadindex2.jpg\";\n arrayimagenescomunidad[2] = \"./assets/images/fasecomunidadindex3.jpg\";\n arrayimagenescomunidad[3] = \"./assets/images/fasecomunidadindex4.jpg\";\n arrayimagenescomunidad[4] = \"./assets/images/fasecomunidadindex.jpg\";\n\n var imagenBatallaAleatoria = ObtenerimagenAletaria(arrayimagenesbatalla, arrayimagenesbatalla.length);\n var imagenViajeAleatoria = ObtenerimagenAletaria(arrayimagenesviaje, arrayimagenesviaje.length);\n var imagenComunidadAleatoria = ObtenerimagenAletaria(arrayimagenescomunidad, arrayimagenescomunidad.length);\n\n document.getElementById(\"imagenmenubatalla\").setAttribute(\"src\", imagenBatallaAleatoria);\n document.getElementById(\"imagenmenuviaje\").setAttribute(\"src\", imagenViajeAleatoria);\n document.getElementById(\"imagenmenucomunidad\").setAttribute(\"src\",imagenComunidadAleatoria);\n}", "function obtenerSegundos(frame){\r\n return frame/fpsVideo;\r\n}", "function WeBack(theMode) {\n Mode = theMode;\n ModeCheck(Mode);\n\n areAnimated = [false, false, false, false];\n document.getElementById(\"nextVid\").style.display = \"none\";\n Learn_video.currentTime = 0;\n Learn_video.src = arrVideoList[0].name;\n Learn_video.play();\n console.log(arrVideoList[0].emotions);\n}", "function createVideoTemplate(data,content){\n content.innerHTML='<p id=\"content-close\">X</p>';\n console.log(\"hey bhaiu\",data);\n const videos=data.results;\n const length=videos.length > 4 ? 4 : videos.length;// 4 return hoganhi to km h to jitne h wo\n // console.log(length);\n const iframeContainer=document.createElement('div');\n \n for(let i=0;i<length;i++){\n const video=videos[i];//video\n const iframe=createIFrame(video);\n iframeContainer.appendChild(iframe);\n content.appendChild(iframeContainer);\n \n }\n }", "function draw() {\n background(0);\n video.loadPixels();\n for (y = 0; y < video.height; y++) {\n for (x = 0; x < video.width; x++) {\n index = (x + y * video.width) * 4;\n r = video.pixels[index];\n g = video.pixels[index + 1];\n b = video.pixels[index + 2];\n bright = int((r + g + b) / 3);\n sizing = map(bright, 0, 255, 0, vScale);\n jmpX = x * vScale;\n jmpY = y * vScale;\n push();\n translate(jmpX + vScale/2, jmpY + vScale/2);\n rotate(angle);\n stroke(r, g, b);\n strokeWeight(sizing);\n createX();\n pop();\n }\n }\n angle += PI/speed;\n}", "function putInRectangularFrame (arr) {\n let frameLength = arr[0];\n for (i = 0; i < arr.length; i++) {\n if (frameLength < arr[i]) {\n frameLength = arr[i];\n }\n }\n\n for (i = 0; i < frameLength; i++) {\n console.log(\"* \");\n }\n\n for (i = 0; i < arr.length; i++) {\n console.log(\"* \" + arr[i] + \" *\");\n }\n}", "function playback() {\n for (let frame of recorder) {\n s.line(frame.x1, frame.y1, frame.x2, frame.y2);\n }\n }", "function setup() {\n noCanvas(400, 400);\n\n vid = createVideo(\n ['roadworkahead.mp4'],\n vidLoad\n );\n\n vid2 = createVideo(\n ['theycall.mp4'],\n vidLoad\n );\n \n vid3 = createVideo(\n ['bible.mp4'], \n vidLoad\n );\n \n vid4 = createVideo(\n ['2bros.mp4'], \n vidLoad\n );\n \n vid5 = createVideo(\n ['eve.mp4'], \n vidLoad\n );\n \n vid6 = createVideo(\n ['chip.mp4'], \n vidLoad\n );\n \n vid7 = createVideo(\n ['RedDress.mp4'], \n vidLoad\n );\n vid8 = createVideo(\n ['Sprite.mp4'],\n vidLoad\n );\n\n vid9 = createVideo(\n ['mouse.mp4'],\n vidLoad\n );\n \n vid10 = createVideo(\n ['Backstreet.mp4'], \n vidLoad\n );\n \n vid11 = createVideo(\n ['eep.mp4'], \n vidLoad\n );\n \n vid12 = createVideo(\n ['pizza.mp4'], \n vidLoad\n );\n \n vid13 = createVideo(\n ['wakeup.mp4'], \n vidLoad\n );\n \n vid14 = createVideo(\n ['raccoon.mp4'], \n vidLoad\n );\n vid15 = createVideo(\n ['who-are.mp4'],\n vidLoad\n );\n\n vid16 = createVideo(\n ['whoWant.mp4'],\n vidLoad\n );\n \n vid17 = createVideo(\n ['run.mp4'], \n vidLoad\n );\n \n vid18 = createVideo(\n ['church.mp4'], \n vidLoad\n );\n \n vid19 = createVideo(\n ['morning.mp4'], \n vidLoad\n );\n \n vid20 = createVideo(\n ['scream-kid.mp4'], \n vidLoad\n );\n \n vid21 = createVideo(\n ['dance-luke.mp4'], \n vidLoad\n );\n \n vid22 = createVideo(\n ['adel-luke.mp4'],\n vidLoad\n );\n\n vid23 = createVideo(\n ['taco.mp4'],\n vidLoad\n );\n \n vid24 = createVideo(\n ['hello.mp4'], //replace with new video file\n vidLoad\n );\n \n vid25 = createVideo(\n ['vodka.mp4'], //replace with new video file\n vidLoad\n );\n \n vid26 = createVideo(\n ['Ah-mouse.mp4'], //replace with new video file\n vidLoad\n );\n \n vid27 = createVideo(\n ['drop.mp4'], //replace with new video file\n vidLoad\n );\n \n vid28 = createVideo(\n ['kush.mp4'], \n vidLoad\n );\n \n vid29 = createVideo(\n ['kevin.mp4'], \n vidLoad\n );\n \n vid30 = createVideo(\n ['kermit.mp4'], \n vidLoad\n );\n \n vid31 = createVideo(\n ['fresh.mp4'], \n vidLoad\n );\n \n vid32 = createVideo(\n ['dance.mp4'],\n vidLoad\n );\n\n vid33 = createVideo(\n ['chill.mp4'],\n vidLoad\n );\n \n vid34 = createVideo(\n ['wow.mp4'], \n vidLoad\n );\n \n vid35 = createVideo(\n ['tort.mp4'], \n vidLoad\n );\n \n vid36 = createVideo(\n ['mole.mp4'], \n vidLoad\n );\n //create video refrence page\n \n \n //Matt helped me create some arrays, I was using Python logic for Lists before he corrected me.\n h = hour();\n s = second();\n list1 = [vid6, vid14, vid23, vid25, vid28, vid31, vid35, vid36, vid33]; \n //list1 is noon\n list2 = [vid, vid4, vid2, vid3, vid9, vid16, vid13, vid11, vid15, vid17, vid18, vid19, vid20, vid22]; \n //list2 is morning\n list3 = [vid5, vid7, vid8, vid10, vid12, vid21, vid24, vid26, vid27, vid29, vid30, vid32, vid34]; \n //list3 is evening\n \n vid.size(400, 400);\n \n //with Matts help I can now hide the videos, also kfrajer on Processing Forum helped with hiding and loading up the videos. https://forum.processing.org/two/discussion/23870/p5js-problem-with-asynchronous-video-loading-playing\n \n vid.hide();\n vid2.hide();\n vid3.hide();\n vid4.hide(); \n vid5.hide(); \n vid6.hide(); \n vid7.hide(); \n vid8.hide();\n vid9.hide();\n vid10.hide();\n vid11.hide(); \n vid12.hide(); \n vid13.hide(); \n vid14.hide(); \n vid15.hide();\n vid16.hide();\n vid17.hide();\n vid18.hide(); \n vid19.hide(); \n vid20.hide(); \n vid21.hide(); \n vid22.hide();\n vid23.hide();\n vid24.hide();\n vid25.hide(); \n vid26.hide(); \n vid27.hide(); \n vid28.hide(); \n vid29.hide(); \n vid30.hide(); \n vid31.hide();\n vid32.hide();\n vid33.hide();\n vid34.hide(); \n vid35.hide(); \n vid36.hide(); \n \n vid.volume(0);\n vid2.volume(0);\n vid3.volume(0);\n vid4.volume(0);\n vid5.volume(0);\n vid6.volume(0);\n vid7.volume(0);\n vid8.volume(0);\n vid9.volume(0);\n vid10.volume(0);\n vid11.volume(0);\n vid12.volume(0);\n vid13.volume(0);\n vid14.volume(0);\n vid15.volume(0);\n vid16.volume(0);\n vid17.volume(0);\n vid18.volume(0);\n vid19.volume(0);\n vid20.volume(0);\n vid21.volume(0);\n vid22.volume(0);\n vid23.volume(0);\n vid24.volume(0);\n vid25.volume(0);\n vid26.volume(0);\n vid27.volume(0);\n vid28.volume(0);\n vid29.volume(0);\n vid30.volume(0);\n vid31.volume(0);\n vid32.volume(0);\n vid33.volume(0);\n vid34.volume(0);\n vid35.volume(0);\n vid36.volume(0);\n \n //The hour function and a bit of tweaking with Matts help now the hour is specific to what time of day a video will load\n \n //below is more than 12, pm\n if (hour() > 12) {\n currentVideo = random(list3);\n }\n//below is less than 12, am\n if (hour() < 12) {\n currentVideo = random(list2);\n }\n //currentVideo.show();\n //below is equal to 12, noon\n if (hour() == 12) {\n currentVideo = random(list1);\n }\n currentVideo.show(); \n currentVideo.loop();\n currentVideo.volume(1);\n \n }", "function sprawdz(){\n n++;\n i = n-1;\n n=n%tImg.length;\n i=i%tImg.length;\n }", "toArray() {\n throw new Error('Can not convert infinite video stream to array.');\n }", "toArray() {\n throw new Error('Can not convert infinite video stream to array.');\n }", "function subDataGenerator(second, inputArray, inputfps){\n\t\tvar output = [];\n\t\tfor(var i = 0; i < (inputfps * second) -1; i++){\n\t\t\toutput.push(inputArray[i]);\n\t\t}\n\n\t\toutput = arraySmoothing(output);\n\t\treturn output;\n\t}", "createPlayField() {\n const playField = [];\n\n for (let y = 0; y < 20; y++) {\n playField[y] = [];\n\n for (let x = 0; x < 10; x++) {\n playField[y][x] = 0;\n }\n }\n\n return playField;\n }", "function encryptFiles(filePath) {\n //deklarasi variabel split data\n const h = 2;\n let file = getVideoBit(filePath);\n let encryptFile = [file];\n let rnd = Math.round(Math.random() * 10);\n let result = [];\n //end\n\n //ravi\n while (result.length < Math.pow(2, h)) {\n result = [];\n for (let i = 0; i < encryptFile.length; i++) {\n let arrayBit1 = [];\n let arrayBit2 = [];\n // baca data olah\n encryptFile[i].forEach(bit => {\n let bitElement1 = \"\";\n let bitElement2 = \"\";\n for (let j = 0; j < 8; j++) {\n //pecah data olah dengan menjadi 2 dan assign perBit ke setiap elemen data\n let randomBoolean = Boolean(Math.round(Math.random()));\n if (bit[j] == 0) {\n if (randomBoolean) {\n bitElement1 += '0';\n bitElement2 += '0';\n } else {\n bitElement1 += '1';\n bitElement2 += '1';\n }\n } else if (bit[j] == 1) {\n if (randomBoolean) {\n bitElement1 += '0';\n bitElement2 += '1';\n } else {\n bitElement1 += '1';\n bitElement2 += '0';\n }\n }\n }\n arrayBit1.push(bitElement1);\n arrayBit2.push(bitElement2);\n });\n result.push(arrayBit1, arrayBit2);\n }\n encryptFile = result;\n }\n return result;\n //end\n}", "_getShadedOutputVideoFrame() {\n const videoBufferShaded = new Uint8Array(this.dmdPageSize).fill(0);\n\n for (let n = 0; n < 16; n++) {\n this._drawChar(videoBufferShaded, n * CHAR_WITH, this.displayDataLatched[n]);\n }\n for (let n = 16; n < 32; n++) {\n this._drawChar(videoBufferShaded, OFFSET_LINE * 16 + n * CHAR_WITH, this.displayDataLatched[n]);\n }\n\n return videoBufferShaded;\n }", "function PushToArr(VideoTitle,VideoSRC){\r\n AllVideoArr[AllVideoArr.length] = {\"Title\":VideoTitle,\"Src\":VideoSRC}\r\n //Remove videos from list\r\n var clearDiv = document.getElementById(\"results\")\r\n clearDiv.querySelectorAll('*').forEach(n=>n.remove())\r\n\r\n ArrChanges(VideoTitle)\r\n}", "function draw() {\n background(0);\n push();\n translate(width, 0);\n scale(-1, 1);\n image(video, 0, 0, 600, 700);\n pop();\n}", "function spawnAllVideos() {\n createVideo(new THREE.Vector3(0,0,0), \"field\", \"edited\");\n}", "function start(){\r\n ba_cnvs=document.createElement(\"canvas\");\r\n ba_ctx=ba_cnvs.getContext(\"2d\");\r\n ba_vid=document.createElement(\"video\");\r\n \r\n ba_vid.crossOrigin=\"Anonymous\";\r\n\r\n ba_vid.src=ba_url;\r\n \r\n // target element\r\n ba_targ=document.querySelector(\".js-calendar-graph-svg\");\r\n ba_targ.setAttribute(\"width\",grid_w*14); //14 and 13 are from svg (github follows this )\r\n ba_targ.setAttribute(\"height\",grid_h*13); \r\n ba_targ=ba_targ.children[0];\r\n window.removeEventListener(\"click\",start);\r\n \r\n document.querySelector(\".js-calendar-graph-svg\").innerHTML=createElement(grid_w,grid_h);\r\n //initialize the grid\r\n for(var y=0;y<grid_h;y++){\r\n el_arr[y]=[];\r\n for(var x=0;x<grid_w;x++){\r\n el_arr[y].push(getElemAt(x,y));\r\n }\r\n }\r\n \r\n \r\n ba_vid.oncanplaythrough=playBadApple;\r\n \r\n}", "function win(arr){\n controlAudio(2);\narr[0].classList.add('opacity');\narr[1].classList.add('opacity');\n arrView=[];\n count++;\nif(count==imageCount) endGameWin();\n}", "function draw(){\n\n ctx.drawImage(zonaimg,0,0)\n\n for( let i = 0; i < serpiente.length ; i++){\n ctx.fillStyle = ( i == 0 )? \"green\" : \"white\";\n ctx.fillRect(serpiente[i].x,serpiente[i].y,caja,caja);\n \n ctx.strokeStyle = \"red\";\n ctx.strokeRect(serpiente[i].x,serpiente[i].y,caja,caja);\n }\n \n ctx.drawImage(bolaimg, Bola.x, Bola.y);\n \n // Antigua posición de la cabeza\n let serpienteX = serpiente[0].x;\n let serpienteY = serpiente[0].y;\n \n // Hacia qué dirección\n if( d == \"IZQUIERDA\") serpienteX -= caja;\n if( d == \"ARRIBA\") serpienteY -= caja;\n if( d == \"DERECHA\") serpienteX += caja;\n if( d == \"ABAJO\") serpienteY += caja;\n \n // En caso de que la serpiente coma\n // Si la cabeza de la serpiente está en la misma posición que la bola -->\n if(serpienteX == Bola.x && serpienteY == Bola.y){//Posición X de la serpiente = posición x de la bola y lo mismo con la posición y\n puntuación++;\n comer.play();\n Bola = {\n x : Math.floor(Math.random()*17+1) * caja,\n y : Math.floor(Math.random()*15+3) * caja\n }\n // No le quitamos la cola\n }else{\n // Le quitamos la cola (El código pop elimina la última entrada del array) para que no siga creciendo\n serpiente.pop();\n }\n \n // Añadir otra cabeza\n \n let nuevacabeza = {\n x : serpienteX,\n y : serpienteY\n }\n \n // Fin del juego\n \n if(serpienteX < caja || serpienteX > 17 * caja || serpienteY < 3*caja || serpienteY > 17*caja || collision(nuevacabeza,serpiente)){\n clearInterval(juego);\n fin.play();\n }\n \n serpiente.unshift(nuevacabeza);//unshift sirve para añadir la entrada definida al principio del array\n \n ctx.fillStyle = \"white\";\n ctx.font = \"45px Changa one\";\n ctx.fillText(puntuación,2*caja,1.6*caja);\n}", "function showStreams(streamsArr) {\n console.log(streamsArr);\n \n $streamArea\n .empty();\n\n for (var i = 0; i < streamsArr.length; i++) {\n // build a row with columns of iframes inside\n\n var $stream = $(\"<div>\")\n .addClass(\"col\");\n\n var $title = $(\"<h6>\")\n .text(streamsArr[i].title)\n .addClass(\"mt-3\");\n\n var $iframe = $(\"<iframe>\")\n .attr(\"id\", streamsArr[i].id)\n .attr(\"width\", \"420\")\n .attr(\"height\", \"315\")\n .attr(\"src\", streamsArr[i].embed_url + \"&autoplay=false\");\n\n $stream\n .append($title)\n .append($iframe);\n\n $streamArea\n .append($stream);\n }\n}", "function ArrChanges(VidTitle){\r\n var ArrNR = AllVideoArr.length-1\r\n\r\n //Main\r\n var Main = document.createElement(\"Main\")\r\n Main.setAttribute(\"id\",\"VidResult\"+AllVideoArr.length)\r\n Main.setAttribute(\"class\",\"resultVid\")\r\n\r\n //Control Div\r\n var ControlDiv = document.createElement(\"Main\")\r\n ControlDiv.setAttribute(\"id\",\"VidCtrl_\"+AllVideoArr.length)\r\n ControlDiv.setAttribute(\"class\",\"VidCtrl\")\r\n\r\n //iframe\r\n var ifrm = document.createElement(\"iframe\");\r\n ifrm.setAttribute(\"id\", \"VidID_\"+AllVideoArr.length)\r\n ifrm.setAttribute(\"class\",\"VideIframe\")\r\n ifrm.setAttribute(\"src\",AllVideoArr[ArrNR].Src);\r\n //title\r\n var VidTxt = document.createElement(\"h4\")\r\n VidTxt.innerHTML = VidTitle\r\n\r\n\r\n\r\n // 3 Control Buttons\r\n var playBtn = document.createElement(\"button\")\r\n playBtn.setAttribute(\"id\",\"playBtn_\"+AllVideoArr.length)\r\n playBtn.setAttribute(\"onclick\",\"YTcontrol(this.id)\")\r\n playBtn.setAttribute(\"class\",\"PlayBtn\")\r\n playBtn.innerHTML=\"Play\"\r\n\r\n var pauseBtn = document.createElement(\"button\")\r\n pauseBtn.setAttribute(\"id\",\"pauseBtn_\"+AllVideoArr.length)\r\n pauseBtn.setAttribute(\"onclick\",\"YTcontrol(this.id)\")\r\n pauseBtn.setAttribute(\"class\",\"PauseBtn\")\r\n pauseBtn.innerHTML=\"Pause\"\r\n\r\n var stopBtn = document.createElement(\"button\")\r\n stopBtn.setAttribute(\"id\",\"stopBtn_\"+AllVideoArr.length)\r\n stopBtn.setAttribute(\"onclick\",\"YTcontrol(this.id)\")\r\n stopBtn.setAttribute(\"class\",\"StopBtn\")\r\n stopBtn.innerHTML=\"Stop\"\r\n\r\n var RemoveBtn = document.createElement(\"button\")\r\n RemoveBtn.setAttribute(\"onclick\",\"removeVid(this.id)\")\r\n RemoveBtn.setAttribute(\"id\",\"removeBtn_\"+AllVideoArr.length)\r\n RemoveBtn.setAttribute(\"class\",\"RemoveBtn\")\r\n RemoveBtn.innerHTML=\"X\"\r\n\r\n //append child\r\n ControlDiv.appendChild(playBtn)\r\n ControlDiv.appendChild(pauseBtn)\r\n ControlDiv.appendChild(stopBtn)\r\n ControlDiv.appendChild(RemoveBtn)\r\n Main.appendChild(ifrm)\r\n Main.appendChild(VidTxt)\r\n Main.appendChild(ControlDiv)\r\n document.getElementById(\"YT_Playlist\").appendChild(Main)\r\n\r\n console.log(AllVideoArr)\r\n}", "function playSqOfSegments(transcripts) {\n videoSrc = transcripts[counter]['src']\n inPoint = transcripts[counter]['inPoint']\n outPoint = transcripts[counter]['outPoint']\n playOneSegment(videoSrc, inPoint, outPoint)\n }", "_bufferDataTexture(){\n return (async() => {\n const _data = await getData(this.csvUrl);\n this.width = Math.max(..._data.map(p => p.X), 0) + 1;\n this.height = Math.max(..._data.map(p => p.Y), 0) + 1;\n const _depth = Math.max(..._data.map(p => p.Z), 0); // +1 is not required for Z values since seeking for data max value\n \tconst _Zmin = Math.min(..._data.map(p => p.Z));\n \tconst _size = this.height * this.width;\n \t\t\t\n const _buffer = new Uint8Array ( _size * 3 );\n \n for ( let i = 0; i < _data.length; i++ ) {\n let stride = i * 3;\n //if ( parseInt(_data[i]['X']) !== 0 && parseInt(_data[i]['Y']) !== 0 && parseInt(_data[i]['Y']) !== this.height-1 && parseInt(_data[i]['X']) !== this.width -1) {\n \t\t//_buffer[ stride ] = Math.floor((255 * ( _data[i]['Y'] / _depth))); //normalize 0 to 255\n _buffer[ stride ] = _data[i]['Z'] ; //normalize 0 to 255\n //_buffer[ stride + 1 ] = _data[i]['Y'];\n //_buffer[ stride + 2 ] = _data[i]['Z'];\n //} else {\n // \t\t_buffer[ stride ] = Math.floor((255 * (_Zmin / _depth)));\n // }\n } \n console.log(_buffer);\n return _buffer;\n \n })()\n \t}", "function draw() {\n background(0);\n fill(col);\n for (var i = 0; i < streams.length; i++) {\n streams[i].update();\n streams[i].render();\n }\n}", "function shoot(){\n\t var video = document.getElementById(videoId);\n\t var output = document.getElementById('output');\n\t var canvas = capture(video, scaleFactor);\n\t canvas.onclick = function(){\n\t window.open(this.toDataURL());\n\t };\n\t snapshots.unshift(canvas);\n\t output.innerHTML = '';\n\t for(var i=0; i<4; i++){\n\t output.appendChild(snapshots[i]);\n\t }\n\t}", "_transform(chunk,encoding,cb) {\n\n const uint8_view = new Uint8Array(chunk, 0, chunk.length);\n var dataView = new DataView(uint8_view.buffer);\n\n let iFloat = Array(this.sz*2);\n let asComplex = Array(this.sz);\n\n\n // for(let i = 0; i < this.sz*2; i+=1) {\n // iFloat[i] = dataView.getFloat64(i*8, true);\n // }\n\n for(let i = 0; i < this.sz*2; i+=2) {\n let re = dataView.getFloat64(i*8, true);\n let im = dataView.getFloat64((i*8)+8, true);\n\n asComplex[i/2] = mt.complex(re,im);\n\n iFloat[i] = re;\n iFloat[i+1] = im;\n\n // if( i < 16 ) {\n // console.log(re);\n // }\n\n }\n\n let iShort = mutil.IFloatToIShortMulti(iFloat);\n\n if( this.onFrameIShort !== null ) {\n this.onFrameIShort(iShort);\n }\n\n // console.log(\"iFloat length \" + iFloat.length);\n // console.log(iFloat.slice(0,16));\n\n // console.log(\"iShort length \" + iShort.length);\n // console.log(iShort.slice(0,16));\n\n\n this.handleDefaultStream(iFloat,iShort,asComplex);\n this.handleFineSync(iFloat,iShort,asComplex);\n this.handleAllSubcarriers(iFloat,iShort,asComplex);\n this.handleDemodData(iFloat,iShort,asComplex);\n\n\n // for(x of iFloat) {\n // console.log(x);\n // }\n\n\n this.uint.frame_track_counter++;\n cb();\n }", "function createVideo(position, location, videoName) {\n //CREATE VIDEO ELEMENT\n var video_element = document.createElement(\"video\");\n video_element.src = \"ASSETS/\"+location+\"/Videos/\"+videoName+\".mp4\";\n video_element.id = location+\"_\"+videoName;\n video_element.autoplay = true;\n video_element.loop = true;\n video_element.volume = 0;\n video_element.muted = true;\n document.body.appendChild(video_element);\n\n //CREATE VIDEO MESH\n var video_plane = new THREE.PlaneGeometry(60, 34, 1, 1);\n var video_elem = document.getElementById(location+\"_\"+videoName);\n var video_texture = new THREE.VideoTexture(video_elem);\n video_texture.minFilter = THREE.LinearFilter;\n video_texture.magFilter = THREE.LinearFilter;\n video_texture.format = THREE.RGBFormat;\n var video_material = new THREE.MeshLambertMaterial( { color: 0xffffff, map: video_texture } );\n var video_plane_mesh = new THREE.Mesh(video_plane, video_material);\n video_plane_mesh.material.side = THREE.DoubleSide;\n video_plane_mesh.name = \"ARTSTATION_VideoPlane\";\n video_plane_mesh.position.x = position.x;\n video_plane_mesh.position.y = position.y;\n video_plane_mesh.position.z = position.z;\n scene.add(video_plane_mesh);\n\n //GET VIDEO POSITION DATA\n var video_position_data = [];\n var video_position_data_path = \"API/gps_parser.php?location=\" + location + \"&srt=\" + videoName; //REMOTE\n //var video_position_data_path = \"API/gps_parser.json\"; //LOCAL\n $.getJSON(video_position_data_path, function(data) {\n $.each(data, function(key, val) {\n video_position_data.push(val);\n });\n });\n\n //ADD VIDEO TO GLOBAL VIDEO ARRAY\n var video_data = {\n Name: videoName,\n ElementID: location+\"_\"+videoName,\n Location: location, \n UUID: video_plane_mesh.uuid,\n PositionArray: video_position_data\n };\n VIDEO.push(video_data);\n var video_index = VIDEO.length - 1;\n\n //MOVE VIDEO FROM GPS\n moveVideoFromGPS(video_index);\n}", "function paintToCanvas() {\n // get the width and height of the actual live feed video\n const width = video.videoWidth;\n const height = video.videoHeight;\n\n // set canvas width and height to be the same as the live feed video\n canvas.width = width;\n canvas.height = height;\n\n // every 16ms, take the image from the webcam and put it into the canvas\n return setInterval(() => {\n ctx.drawImage(video, 0, 0, width, height);\n\n // take the pixels out\n let pixels = ctx.getImageData(0, 0, width, height);\n\n // mess with them\n // pixels = redEffect(pixels);\n\n // pixels = redSplit(pixels);\n // ctx.globalAlpha = 0.8;\n\n pixels = greenScreen(pixels);\n\n // put them back\n ctx.putImageData(pixels, 0, 0);\n }, 16);\n}", "generateLines()\n{\n var numTris=this.fBuffer.length/3;\n for(var f=0;f<numTris;f++)\n {\n var fid=f*3;\n this.eBuffer.push(this.fBuffer[fid]);\n this.eBuffer.push(this.fBuffer[fid+1]);\n \n this.eBuffer.push(this.fBuffer[fid+1]);\n this.eBuffer.push(this.fBuffer[fid+2]);\n \n this.eBuffer.push(this.fBuffer[fid+2]);\n this.eBuffer.push(this.fBuffer[fid]);\n }\n \n}", "generateLines()\n{\n var numTris=this.fBuffer.length/3;\n for(var f=0;f<numTris;f++)\n {\n var fid=f*3;\n this.eBuffer.push(this.fBuffer[fid]);\n this.eBuffer.push(this.fBuffer[fid+1]);\n \n this.eBuffer.push(this.fBuffer[fid+1]);\n this.eBuffer.push(this.fBuffer[fid+2]);\n \n this.eBuffer.push(this.fBuffer[fid+2]);\n this.eBuffer.push(this.fBuffer[fid]);\n }\n \n}", "generateLines()\n{\n var numTris=this.fBuffer.length/3;\n for(var f=0;f<numTris;f++)\n {\n var fid=f*3;\n this.eBuffer.push(this.fBuffer[fid]);\n this.eBuffer.push(this.fBuffer[fid+1]);\n \n this.eBuffer.push(this.fBuffer[fid+1]);\n this.eBuffer.push(this.fBuffer[fid+2]);\n \n this.eBuffer.push(this.fBuffer[fid+2]);\n this.eBuffer.push(this.fBuffer[fid]);\n }\n \n}", "function generateThumbnail() {\n c = document.createElement(\"canvas\");\n c.width = width;\n c.height = height;\n c.style.width = width;\n c.style.height = height;\n ctx = c.getContext(\"2d\");\n ctx.canvas.width = width;\n ctx.canvas.height = height;\n ctx.drawImage(video, 0, 0, width, height);\n var pixel = ctx.getImageData(x, y, 1, 1);\n var newx = video.currentTime; // or i for frame #?\n var newy = pixel.data[0] + pixel.data[1] + pixel.data[2];\n if (newy > 0) Plotly.extendTraces('plot', { x: [[newx]], y: [[newy]] }, [0])\n}", "function paintToCanvas() {\n // first we need the width and height\n const width = video.videoWidth;\n const height = video.videoHeight;\n // make sure now that the canvas is the same size as the video before we paint into it\n canvas.width = width;\n canvas.height = height;\n\n // now ever x seconds we're going to snap a picture\n setInterval(() => {\n ctx.drawImage(video, 0, 0, width, height); // paint with the video, starting at the left top of the canvas, with the width and height specified above;\n // take the pixels out\n let pixels = ctx.getImageData(0, 0, width, height); // we get an array of millions of pixel values with each one it's own color value\n // messing with the pixels\n //pixels = redEffect(pixels); // the function redEffect is all the way down below\n pixels = rgbSplit(pixels); // I'm choosing to play with this one instead of the two other functions\n ctx.globalAlpha = 0.8;\n //pixels = greenScreen(pixels);\n // putting the pixels back back\n ctx.putImageData(pixels, 0, 0);\n }, 16); // here every 16 milliseconds a picture is taken from the video\n}", "generateVerticlesArray() {\n // to all laser points starts in that same place\n for (let i = 0; i < this.particlesCount * 3; i += 3) {\n this.verticesArray[i] = this.startPos.x;\n this.verticesArray[i + 1] = this.startPos.y;\n this.verticesArray[i + 2] = this.startPos.z;\n }\n }", "debug_multi()\n {\n let pos = 0;\n for (let video in this._videoDivs)\n {\n if (pos != 0)\n {\n this.assignToSecondary(Number(video));\n }\n pos++;\n }\n }", "function pintarArray0F (ficha){\r\ncolores(ficha.color);\r\n\r\nif(ficha.color===\"rojo\"){\r\n rect(ficha.x1, ficha.y1, 50, 50);\r\n rect(ficha.x2, ficha.y2, 50, 50);\r\n rect(ficha.x3, ficha.y3, 50, 50);\r\n}\r\nelse if(ficha.color===\"azul\"){\r\n\r\n rect(ficha.x1, ficha.y1, 50, 50);\r\n rect(ficha.x2, ficha.y2, 50, 50);\r\n rect(ficha.x3, ficha.y3, 50, 50);\r\n}else if(ficha.color===\"verde\"){\r\n rect(ficha.x1, ficha.y1, 50, 50);\r\n rect(ficha.x2, ficha.y2, 50, 50);\r\n rect(ficha.x3, ficha.y3, 50, 50);\r\n rect(ficha.x4, ficha.y4, 50, 50);\r\n}\r\nelse if(ficha.color===\"morado\"){\r\n rect(ficha.x1, ficha.y1, 50, 50);\r\n rect(ficha.x2, ficha.y2, 50, 50);\r\n rect(ficha.x3, ficha.y3, 50, 50);\r\n rect(ficha.x4, ficha.y4, 50, 50);\r\n}\r\n}", "function Learn_show() {\n console.log('Learn_show()');\n\n setInterval(Learn_onVideoUpdate, 50);\n\n Learn_setGreenLights();\n Learn_setVideoControls();\n\n Learn_setInteractionCallbacksLearn();\n CheckClick(clickCount);\n NextButtonClick();\n\n console.log(arrVideoList[0].emotions);\n\n videoCounter = arrVideoList.length;\n\n window.onresize = Learn_onResize;\n\n //Learn_setFullscreen();\n\n Learn_video.play();\n}", "function populatePage(data, type) {\r\n //for all items in the array from 0 to the end of the array\r\n for (let i = 0; i < data.hits.length; i++) {\r\n \r\n //create Element, a div called newCol to append the other elements too\r\n var newCol = document.createElement(\"div\");\r\n //it should be bootstrap responsive because we are setting the class and have used cols and rows in the HTML\r\n newCol.className = \"col\";\r\n \r\n // amend element\r\n var newVid = document.createElement(\"video\"); // create new div in the doc\r\n var newSource = document.createElement(\"source\");//new video source\r\n //set newVid.id to hold the ids of the objects from the JSON data in our array\r\n newVid.id = data.hits[i].id;\r\n // creating a new element to store an image\r\n var newImg = document.createElement(\"img\");\r\n\r\n // only need source container for a video // var newImage = document.createElement(\"source\"\r\n newImg.id = data.hits[i].id;\r\n //log out the array to the console to find how the objects are structured\r\n console.log(data.hits[i]);\r\n // Load the image and its tags / must change the array options to suit the array for example Pixabay uses data.hits and iTunes uses data.results\r\n \r\n //set URL in tiny size, width, height and controls on the videos\r\n //Create loop for picture or video\r\n if(type === \"videos\"){\r\n newSource.setAttribute(\"src\", data.hits[i].videos.tiny.url);\r\n newVid.setAttribute(\"width\", \"320\");\r\n newVid.setAttribute(\"height\", \"240\");\r\n newVid.setAttribute(\"controls\", true);\r\n \r\n //set tags to show \r\n newVid.setAttribute(\"alt\", data.hits[i].tags);\r\n //make space for the videos and append them into place\r\n newVid.appendChild(newSource);\r\n cards.appendChild(newVid); // appending the new div node into the imgDiv element\r\n //creating a p element to hold the text we take from the array\r\n var newTags = document.createElement(\"p\");\r\n //style the p element using bootstrap classes\r\n newTags.className = \"badge bg-secondary\"\r\n //pull the text from the array into the new text each time\r\n var newPText = document.createTextNode(data.hits[i].tags); \r\n // create a place to save the tags and append each bit of structure to its parent\r\n newTags.appendChild(newPText);\r\n newCol.appendChild(newTags);\r\n newCol.appendChild(newVid);\r\n cards.appendChild(newCol); \r\n\r\n \r\n \r\n }\r\n //if the search type is photo we use the null field I have used in the html to run the following for picture type items\r\n else if(type === \"\"){\r\n //set a div and attributes for the image, process is same as videos, but we use a different endpoint from the array. Attributes include height , width and alt tags\r\n newImg.setAttribute(\"src\", data.hits[i].webformatURL);\r\n newImg.setAttribute(\"width\", \"320\");\r\n newImg.setAttribute(\"height\", \"250\");\r\n newImg.setAttribute(\"alt\", data.hits[i].tags);\r\n // removed because was duplicating the container newImg.appendChild(newImage);\r\n cards.appendChild(newImg);\r\n\r\n var newPicTags = document.createElement(\"p\");\r\n //set the styling for I.D data\r\n newPicTags.className = \"badge bg-info\"\r\n var newPicText = document.createTextNode(data.hits[i].tags);\r\n\r\n newPicTags.appendChild(newPicText);\r\n newCol.appendChild(newPicTags);\r\n newCol.appendChild(newImg);\r\n cards.appendChild(newCol);\r\n\r\n }\r\n \r\n \r\n \r\n \r\n }\r\n}", "constructor() {\n var stage = new Stage2D(window.innerWidth, window.innerHeight);\n var contener = new Group2D();\n contener.x = 300;\n contener.y = 100;\n stage.appendChild(contener);\n //contener.rotation = -45\n var c0 = new SolidColor(0xff0000);\n var gradient = new GradientColor([c0, new SolidColor(0x0000ff)], null, true);\n //var gradient = new RadialGradientColor();\n //gradient.setColorStep([new SolidColor(0xff0000),new SolidColor(0x0000ff)]);\n var bd = new Img(\"assets/mire.jpg\");\n //bd.loadImage(\"assets/mire.jpg\",true,false)\n //bd.loadImage(\"assets/tile.jpg\",true,true)\n var video = new Video(192 * 4, 108 * 4, \"assets/video2.mp4\");\n var alphaBd = new Img(\"assets/alpha.png\");\n alphaBd.addEventListener(BitmapData.IMAGE_LOADED, function () {\n var bitmapPath = new BitmapPath(alphaBd);\n var vecto = new Display2D(400, 500);\n vecto.x = -200;\n vecto.stack(bitmapPath);\n vecto.stack(new PatternFill(video));\n //console.log(\"vecto = \",Path.fromDataString(bitmapPath.dataString));\n contener.appendChild(vecto);\n ObjectLibrary.instance.save();\n });\n //alphaBd.loadImage(,true,false)\n //ObjectLibrary.instance.load(\"test.txt\");\n var fill, stroke, textFill, textStroke;\n var textStyle = new TextStyle(\"Arial\", 100, \"px\");\n textStyle.lineStyle = new LineStyle(3);\n var solid = new SolidFill(\"#000000\");\n fill = new PatternFill(bd, true, false);\n //fill = new GradientFill(gradient);\n //fill = new BitmapFill(bd,true);\n //fill.filter = new CssFilter().halo(25,\"#ff0000\")\n var glow = new GlowFilter(25, \"#ff0000\");\n var filters = new FilterStack().add(glow);\n fill.filters = glow; //filters;\n //textFill = new PatternText(textStyle,bd);\n //textFill = new GradientText(textStyle,gradient);\n textFill = new SolidTextStroke(textStyle, c0);\n //stroke = new SolidStroke(\"#0000ff\");\n //stroke = new PatternStroke(bd,true);\n stroke = new GradientStroke(gradient);\n //stroke.filter = \"blur(5px)\"\n var lineOption = stroke.lineStyle = new LineStyle();\n lineOption.lineWidth = 15;\n //lineOption.dashLineDist = 10;\n //lineOption.dashHoleDist = 10;\n lineOption.cap = \"round\";\n lineOption.join = \"round\";\n //fill.x = 300\n //fill.scaleX = 4;\n //fill.rotation = Math.PI/4\n var redQuad = new RenderStack();\n redQuad.push(SquarePath.instance);\n redQuad.push(new SolidFill(c0));\n var shape = new Shape(50, 450, 50, 100, redQuad);\n var mcs = [];\n var nbMc = 1;\n var i;\n var alpha = 1;\n for (i = 0; i < nbMc; i++) {\n var mc = new Display2D(400, 400);\n mcs[i] = mc;\n //mc.stack(SquarePath.instance);\n mc.stack(CirclePath.instance);\n mc.stack(fill);\n mc.stack(stroke);\n mc.stack(new TextPath(\"Youpi !\"));\n mc.stack(textFill);\n mc.stack(shape);\n mc.align(Align.CENTER);\n mc.x = 200 + i * 20;\n mc.y = 200;\n mc.rotation = 50 + (360 / nbMc) * i;\n //mc.scaleX = 2.5;\n contener.appendChild(mc);\n mc.alpha = alpha;\n //mc.scaleX = 1.5;\n mc.addEventListener(Display2D.MOUSE_OVER, function (e) {\n //console.log(\"over\");\n e.alpha = 0.5; //alpha - 0.25;\n });\n mc.addEventListener(Display2D.MOUSE_OUT, function (e) {\n //console.log(\"out\");\n e.alpha = alpha;\n });\n }\n document.body.onclick = function () {\n for (i = 0; i < nbMc; i++) {\n mcs[i].cacheAsBitmap = !mcs[i].cacheAsBitmap;\n }\n };\n //ObjectLibrary.print();\n var a = 0;\n function animate() {\n a += 0.01;\n //stroke.lineStyle.dashOffset = (Math.sin(a*0.05))*300\n var pct = Math.sin(a * 5);\n c0.g = Math.abs(pct * 255);\n //mc.scaleX = mc.scaleY = 1 + (Math.sin(a*0.1))*0.5\n //mc.rotation += 1\n //glow.radius = 10 + 25 * pct;\n for (i = 0; i < nbMc; i++) {\n //mcs[i].rotation = -a*100;\n //mcs[i].scaleX = 1 + 1-(c0.g / 255)*(i+1)*(1/nbMc) ;\n }\n //lineOption.dashOffset=pct\n //lineOption.dashLineDist = 5+pct*100;\n //lineOption.dashHoleDist = 10+pct*100;\n //mc.x = 500 + Math.sin(a*0.05)*300\n //fill.rotation -= 0.1;\n stroke.rotation += 0.01;\n //\n //fill.rotation -= 0.01;\n //fill.scaleX = fill.scaleY = 0.5+Math.abs(Math.sin(a)*1.5);\n //fill.x= Math.sin(a * Math.PI/180);\n //gradient.needsUpdate = true;\n stage.drawElements();\n //mc.updateCache()\n //mc.updateCacheWithoutRotation()\n //stage.context.beginPath()\n requestAnimationFrame(animate);\n }\n animate();\n }", "function videoSoundSampler1Loader(){\n blobVideoLoad(0, 5, \"gore.mp4\", true, {'postLoadFunc': () => 5});\n videoUploadResponder = function(videoFile){\n var blobURL = URL.createObjectURL(videoFile);\n var oldVid = videos[0];\n // videos[0].pause(); //todo - delete the underlying video element to free memory\n createVideoElement(blobURL, 0, 5, true);\n oldVid.pause();\n URL.revokeObjectURL(oldVid.src);\n oldVid.removeAttribute(\"src\");\n oldVid.load();\n\n }\n var deviations = arrayOf(1000).map((elem, i) => i + Math.random());\n var baseInd = 0;\n var moveDownNote = 48;\n var moveUpNote = 48 + 24;\n var midiNoteFunction = function(note, vel){\n if(note == moveDownNote) baseInd = Math.max(baseInd-1, 0);\n else if(note == moveUpNote) baseInd++;\n else videos[0].currentTime = deviations[baseInd + (note-37)];\n } \n midiEventHandlers[\"on\"] = midiNoteFunction;\n}", "function pintarDatos(canciones) {\n\n let contenedorPadre = document.getElementById(\"contenedorPadre\");\n\n //Recorremos el arreglo de canciones:\n canciones.map(function (cancion) {\n\n //CREO UN DIV CON LA CLASE COL\n let columna = document.createElement('div');\n columna.classList.add(\"col\");\n\n //CREO UN DIV CON LA CLASE CARD H-100\n let tarjeta = document.createElement('div');\n tarjeta.classList.add(\"card\");\n tarjeta.classList.add(\"h-100\");\n\n //IMAGEN DE LA TARJETA\n let imagen = document.createElement('img');\n imagen.classList.add(\"card-img-top\");\n imagen.src = cancion.album.images[0].url;\n\n //TITULO DE LA TARJETA\n let titulo = document.createElement('h3');\n titulo.classList.add(\"text-center\");\n titulo.textContent = cancion.name;\n\n //CANCION DE LA TARJETA\n let audio = document.createElement('audio');\n audio.classList.add(\"w-100\");\n audio.setAttribute(\"controls\", \"\");\n audio.src = cancion.preview_url;\n\n //ANIDAMOS COMPONENTES\n\n //EL TITULO ESTA POR DENTRO DE LA TARJETA\n tarjeta.appendChild(titulo);\n\n //LA FOTO ESTA POR DENTRO DE LA TARJETA\n tarjeta.appendChild(imagen);\n\n //EL AUDIO ESTA DENTRO DE LA TARJETA\n tarjeta.appendChild(audio);\n\n //LA TARJETA ESTA POR DENTRO DE LA COLUMNA\n columna.appendChild(tarjeta);\n\n //LA COLUMNA ESTA POR DENTRO DE LA FILA\n contenedorPadre.appendChild(columna);\n\n\n\n });\n\n\n\n}", "function preload() {\n for (var x = 0; x < lato; x++) {\n cards[x] = []\n for (var y = 0; y < altezza; y++) {\n cards[x][y] = new Card((x * 350) + 180, (y * 350) + 130, x + '' + y + '.mp3', x + '' + y + '.png')\n }\n }\n}", "function generate_story(){\r\n var images_and_frames = document.getElementById(\"images_and_frames\").childNodes;\r\n console.log(images_and_frames);\r\n images_and_frames = Array.prototype.slice.call(images_and_frames);\r\n console.log(images_and_frames);\r\n var framesList = [];\r\n for (let i=0; i<images_and_frames.length; i++){\r\n // image_and_frames is a div with a image and its corresponding frames\r\n const image_and_frames = images_and_frames[i];\r\n frames = image_and_frames.getElementsByClassName('single_frame');\r\n var arr = [];\r\n for (let j=0; j<frames.length; j++){\r\n frame = frames[j]\r\n frame_string = frame.innerHTML.split('<div>')[0].split('<button')[0];\r\n \r\n if (frame.classList.contains(\"noun_type\")) {\r\n frame_string += \"_NOUN\";\r\n }\r\n else if (frame.classList.contains(\"frame_type\")) {\r\n frame_string += \"_Frame\";\r\n }\r\n \r\n arr.push(frame_string);\r\n }\r\n framesList.push(arr);\r\n }\r\n socket.emit(\"frames\", framesList);\r\n $(\"#waiting_img\").css(\"display\", \"block\");\r\n $(\"#images_and_frames_and_buttons\").css('opacity', 0.25);\r\n}", "generateLines()\r\n{\r\n var numTris=this.fBuffer.length/3;\r\n for(var f=0;f<numTris;f++)\r\n {\r\n var fid=f*3;\r\n this.eBuffer.push(this.fBuffer[fid]);\r\n this.eBuffer.push(this.fBuffer[fid+1]);\r\n \r\n this.eBuffer.push(this.fBuffer[fid+1]);\r\n this.eBuffer.push(this.fBuffer[fid+2]);\r\n \r\n this.eBuffer.push(this.fBuffer[fid+2]);\r\n this.eBuffer.push(this.fBuffer[fid]);\r\n }\r\n \r\n}", "function actualitzarVides(current){\n document.getElementById(\"vida\").innerHTML = \"\";\n let vidas = \"\";\n\n for(let i = 0; i < (VIDA_MAX - current); i++){\n vidas += \"<img class='broken-heart' alt='corazon-roto' src='./resources/heart/heart-3.png'>\";\n }\n\n if(VIDA_MAX < current) {\n vidas = \"\";\n //console.log(current);\n //console.log(VIDA_MAX);\n for(let i = VIDA_MAX; i < current; i++){\n vidas += \"<img class='golden-heart' alt='corazon' src='./resources/heart/heart.png'>\";\n }\n\n for(let i = 0; i < VIDA_MAX; i++){\n vidas += \"<img alt='corazon' src='./resources/heart/heart.png'>\";\n }\n } else {\n for(let i = 0; i < current; i++){\n vidas += \"<img alt='corazon' src='./resources/heart/heart.png'>\";\n }\n }\n\n document.getElementById(\"vida\").innerHTML += vidas;\n\n \n}", "function makeCSVPictures(){\r\n var text = \"X,Y,Width,Window,Path\\n\"\r\n var i = 0;\r\n while(i < pictureArray.length){\r\n text = text + pictureArray[i][0] + \",\" + pictureArray[i][1] + \",\" + pictureArray[i][2] + \",\" + pictureArray[i][3] + \",\" + pictureArray[i][4] + \"\\n\"\r\n i++;\r\n }\r\n return text;\r\n}", "function stampa(arrayOggetti,tipo,api_key) {\n if (arrayOggetti.length === 0) {\n errore(tipo);\n }else {\n for (var i = 0; i < arrayOggetti.length; i++) {\n //trasfotmo prima il voto per visualizzare stelle\n var voto = trasformaVoto(arrayOggetti[i].vote_average);\n //trasformo lingua con bandiera corrispondente\n bandiera = trasformaLingua(arrayOggetti[i].original_language);\n var titolo;\n var titolo_originale;\n var id = arrayOggetti[i].id;\n if (tipo === \"Film\") {\n titolo = arrayOggetti[i].title;\n titolo_originale = arrayOggetti[i].original_title\n }else if (tipo === \"Serie TV\") {\n titolo = arrayOggetti[i].name;\n titolo_originale = arrayOggetti[i].original_name\n }\n var context = {\n \"copertina\" : stampaCopertina(arrayOggetti[i].poster_path),\n \"title\" : titolo,\n \"original_title\" : titolo_originale,\n \"original_language\" : bandiera,\n \"vote_average\" : voto,\n \"overview\" : arrayOggetti[i].overview\n };\n aggiungiDettagli(id,tipo,api_key,context)\n }\n }\n //pulisco la barra di ricerca\n $('#search').val('');\n }", "generateLines()\r\n{\r\n var numTris=this.fBuffer.length/3;\r\n for(var f=0;f<numTris;f++)\r\n {\r\n var fid=f*3;\r\n this.eBuffer.push(this.fBuffer[fid]);\r\n this.eBuffer.push(this.fBuffer[fid+1]);\r\n\r\n this.eBuffer.push(this.fBuffer[fid+1]);\r\n this.eBuffer.push(this.fBuffer[fid+2]);\r\n\r\n this.eBuffer.push(this.fBuffer[fid+2]);\r\n this.eBuffer.push(this.fBuffer[fid]);\r\n }\r\n\r\n}", "function renderActual() {\n options.start = ee.Date.fromYMD(startYear, 1, 1)\n options.stop = ee.Date.fromYMD(stopYear, 1, 1)\n \n var videoFrames = getImages(options)\n .sort('system:time_start')\n .map(function(i) {\n var image = i.visualize({min: 0.05, max: [0.4, 0.4, 0.5], gamma: 1.4, forceRgbOutput: true})\n \n var strDate = ee.Date(i.get('system:time_start')).format('YYYY-MM-dd')\n var str = ee.String('Date: ').cat(strDate)\n var textDate = Text.draw(str, pt1, scale, {fontSize:16})\n \n return ee.ImageCollection.fromImages([\n image,\n textDate\n ]).mosaic().set('name', strDate)\n });\n \n return videoFrames; \n}", "function createMetronome() {\n for (i = 0; i < bar; i++) {\n playback.push({position: i, sound: 'm'});\n }\n }", "function createMetronome() {\n for (i = 0; i < bar; i++) {\n playback.push({position: i, sound: 'm'});\n }\n }", "function streamRegularizer(hoa) {\n for(let i=0; i<hoa.length; i++) {\n // find streams where 3 notes close to each other\n if((hoa[i].type & 1) && hoa[i+2] && hoa[i+2].time - hoa[i].time <= getTickLen(hoa[i].time) * 0.53\n && (hoa[i+1].type & 1) && isWhiteLine2(hoa[i].time, 2)) {\n var vec = vecMulNum(vecSub([hoa[i+2].x, hoa[i+2].y], [hoa[i].x, hoa[i].y]), 0.5);\n var vecRotated = vecRotate(vec, Math.random() - 0.5);\n var vecFinal = vecAdd([hoa[i].x, hoa[i].y], vecRotated).map(Math.floor);\n hoa[i+1].x = vecFinal[0];\n hoa[i+1].y = vecFinal[1];\n }\n }\n return hoa;\n}", "function updateCanvas(gbstream) {\n var dv = new DataView(gbstream);\n var canvas = document.getElementById(\"gamescreen\");\n var canvasWidth = canvas.width;\n var canvasHeight = canvas.height;\n var ctx = canvas.getContext(\"2d\");\n var canvasData = ctx.getImageData(0, 0, canvasWidth, canvasHeight);\n\n\n\n for (var row = 0; row < 144; row++) {\n for (var col = 0; col < 160; col++) {\n var index = (row * 160) + col;\n switch (dv.getInt8(index)) {\n case 0: drawPixel(canvasData, col, row, 255, 255, 255, 255); break;\n case 1: drawPixel(canvasData, col, row, 192, 192, 192, 255); break;\n case 2: drawPixel(canvasData, col, row, 96, 96, 96, 255); break;\n case 3: drawPixel(canvasData, col, row, 0, 0, 0, 255); break;\n }\n }\n }\n ctx.putImageData(canvasData, 0, 0);\n }", "function draw () {\n let WIDTH = visualizer.width\n let HEIGHT = visualizer.height\n\n // loop this\n window.requestAnimationFrame(draw)\n\n // get the current Data (gets placed into array arg)\n player.getAnalyzerTimeBytes(1, f1visualData)\n player.getAnalyzerTimeBytes(2, f2visualData)\n player.getAnalyzerTimeBytes(3, f3visualData)\n\n // set the canvas style\n vCtx.fillStyle = '#EEE'\n vCtx.fillRect(0, 0, WIDTH, HEIGHT)\n vCtx.lineWidth = 2\n\n // now that we have the current Data for each wave, loop\n // through each and draw each point value\n drawWave(player.getAnalyzerFFTSize(1), '#26a69a', f1visualData)\n drawWave(player.getAnalyzerFFTSize(2), '#ec407a', f2visualData)\n drawWave(player.getAnalyzerFFTSize(3), '#29b6f6', f3visualData)\n\n function drawWave (bufferLength, color, dataArray) {\n // draw the path - loop through\n // the Uint8Array and draw each pt\n vCtx.beginPath()\n vCtx.strokeStyle = color\n\n // space between each point\n let sliceWidth = WIDTH * 0.75 / bufferLength\n\n // x position to draw current pt\n // incremented by sliceWidth\n let x = 0\n\n dataArray.forEach(soundVal => {\n // (0, 255) / 256.0 -> (0.0, 1.0]\n let y = (dataArray[soundVal] / 256.0) * HEIGHT\n\n // on first value, go to beginning\n soundVal === 0\n ? vCtx.moveTo(x, y)\n : vCtx.lineTo(x, y)\n\n x += sliceWidth\n })\n\n vCtx.lineTo(WIDTH, HEIGHT / 2)\n vCtx.stroke()\n }\n }", "function strt(){\n start = true;\n imgArray = [];\n\n // storing the orginal array in imgArray.\n for(var i =0; i<orgImgArray.length; i++){\n imgArray.push(orgImgArray[i]);\n }\n //calling function to chnage the position of array randomly.\n suffelArray(imgArray);\n \n}", "next(arrayMedias) {\n $('.right-arrow-carousel').on('click', () => {\n this.currentIndex += 1;\n if (this.currentIndex > arrayMedias.length - 1) {\n this.currentIndex = 0;\n }\n let nextMedia = getMedia(arrayMedias[this.currentIndex])\n $('#carousel-media').html(nextMedia);\n })\n }", "toUint8Array() {\n let [pausePoint] = this.pausePoints;\n if (pausePoint === undefined)\n pausePoint = this.size;\n return new Uint8Array(this.buffer, 0, pausePoint);\n }", "function writeData(){\n var chadtechCanvas = document.getElementById(\"Chadtech-v0.5\").getContext(\"2d\");\n documentAsData=[];\n // (A)\n for (var documentItem=0;documentItem<rawDocument.length;documentItem++){\n var firstByte=Math.floor(rawDocument[documentItem][0]/256);\n var secondByte=rawDocument[documentItem][0]%256;\n documentAsData.push(firstByte);\n documentAsData.push(secondByte);\n }\n\n // (B)\n var bunchaPixels=[];\n var singlePixel=[];\n bunchaPixels.push([2,1,3,255]);\n for (var datum=0;datum<documentAsData.length;datum++){\n singlePixel.push(documentAsData[datum]);\n if(singlePixel.length==3){\n bunchaPixels.push(singlePixel);\n singlePixel=[];\n }\n }\n\n // (C)\n if (singlePixel.length>0 && 3>singlePixel.length){\n while (3>singlePixel.length){\n singlePixel.push(83);\n }\n }\n else{\n singlePixel=[83,83,83];\n }\n bunchaPixels.push(singlePixel);\n\n // (D)\n for (var pixel=0;pixel<bunchaPixels.length;pixel++){\n var singleCanvasSpot=chadtechCanvas.createImageData(1,1);\n var colorValues=singleCanvasSpot.data;\n colorValues[0]=bunchaPixels[pixel][0];\n colorValues[1]=bunchaPixels[pixel][1];\n colorValues[2]=bunchaPixels[pixel][2];\n colorValues[3]=255;\n chadtechCanvas.putImageData(singleCanvasSpot,Math.floor(pixel/((arrayOfLines.length*(16+lineSpace))+64)),pixel%((arrayOfLines.length*(16+lineSpace))+64));\n }\n}", "function TweetVideo()\r\n{\r\n T.postMediaChunked({ file_path: path }, function (err, data, response) {\r\n tempData = data;\r\n console.log(data)\r\n setTimeout(PushVid, 1000);\r\n })\r\n}", "function shoot(){\n var output = document.getElementById('output');\n var canvas = capture(video, scaleFactor);\n canvas.onclick = function(){\n window.open(this.toDataURL());\n };\n snapshots.unshift(canvas);\n output.innerHTML = '';\n for(var i=0; i<1; i++){\n output.appendChild(snapshots[i]);\n }\n}", "function updateIntroLoader(item, arrayNum, videoArrays){\n\n\tconst videoElement = item.getElementsByTagName('video')[0];\n\n\tconst fileName = item.getElementsByTagName('img')[0].getAttribute('src').split(\"/\")[2].split(\".\")[0] + \".mp4\";\n const videoSrc = videoArrays[arrayNum].files.find( video => video.name === fileName );\n\n\tconst blob = new Blob([videoSrc.buffer], { type: \"video/mp4\" });\n\tvideoElement.src = window.URL.createObjectURL(blob);\n\tvideoElement.mute = \"mute\";\n\tvideoElement.loop = \"loop\";\n\tvideoElement.play();\n\tvideoElement.addEventListener(\"playing\", removeLoading);\n\n\tfunction removeLoading(){\n\t\titem.classList.add('intro-description-loading-list-item_loaded');\n\t\tvideoElement.removeEventListener(\"playing\", removeLoading);\n\t}\n\n}", "function update(){\n\n context.drawImage(video, 0, 0, cWidth, cHeight);\n\n //acquire bitmap\n var imageData = context.getImageData(0, 0, cWidth, cHeight);\n\n if(!oldImageData){\n \n oldImageData = imageData;\n }\n\n traverseBitmap(imageData.data, oldImageData.data);\n\n oldImageData = context.getImageData(0, 0, cWidth, cHeight);\n\n // Draw the ImageData at the given (x,y) coordinates.\n context.putImageData(imageData, 0, 0);\n \n for(let i =0; i< balls.length; i++){\n\n balls[i].update(i);\n }\n}", "function createVideosVideos() {\t\r\n\tfor (var i = 1; i < 21; i++) {\r\n\t var aVideo = [\r\n '<div class=\"video\">',\r\n\t\t\t'<a href=\"#\"><img class=\"videoThumb topVidThumb\" src=\"\"></a>',\r\n\t\t\t'<img class=\"quickListAddGreen vid' + i,\r\n\t\t\t'\" src=\"misc_images/quick_list_button_green.png\">',\r\n\t\t\t'<a href=\"#.html\" class=\"quickListAddGray vid' + i,\r\n\t\t\t'\" onclick=\"addQuickList' + \"('vid\" + i + \"'\" + ')\"' + '\"><img src=\"misc_images/quick_list_button_gray.png\"></a>',\r\n\t\t\t'<div class=\"inQuickList vid' + i + '\"><a href=\"#\">in QuickList</a></div>',\r\n\t\t\t'<div class=\"vidTitle vid' + i + '\">',\r\n\t\t\t\t'<h3><a href=\"#\" class=\"videoTitle\"></a></h3>',\r\n\t\t\t'</div>',\r\n\t\t\t'<div class=\"vidMisc\">',\r\n\t\t\t\t'<div class=\"from\"><font color=\"#606060\">From: </font><a class = \"uploader\" href=\"#\">Username1</a></div>',\r\n\t\t\t\t'<div class=\"views\"><font color=\"#606060\">Views: </font>42,381</div>',\r\n\t\t\t\t'<div class=\"length\">01:43</div>',\r\n\t\t\t\t'<div class=\"stars\">',\r\n\t\t\t\t'</div>',\r\n\t\t\t\t'<div class=\"clearLeft\"></div>',\r\n\t\t\t'</div>',\r\n\t\t'</div>',\r\n ].join('\\n');\r\n\t\t \r\n\t\tdocument.getElementsByClassName('videoListBlock')[0].innerHTML += aVideo;\r\n }\r\n \r\n document.getElementsByClassName('videoListBlock')[0].innerHTML += '<div class=\"clearLeft\"></div>'\r\n}", "function paintToCanvas() {\n // you will find that the canvas height is bigger than the current window size even though its size is set to 640*480\n // because the width of the canvas is set to 100% which means it will take 100% of the space availabe of its parent container (photobooth)\n // Since the width of the photobooth is appx 1330px \n // the canvas will also take width of 1330px\n // since the width is 1330px the height will be 999px in order to maintain the aspect ratio (640*480)\n // the canvas is taking aspect ratio from our defined size (i.e 640 * 480)\n // therefore you can change the aspect ratio by changing the width and height of the canvas\n // if you remove the width 100% from its css , it will regain the size of 640*480\n\n // width and height = 640 * 480 \n // because the resolution we get from the video feed is by default 640*480 and is pre-defined by the system webcam\n // setting canvas width and height = 640*480\n const width = video.videoWidth;\n const height = video.videoHeight;\n [canvas.width, canvas.height] = [width, height];\n\n // the video playing in the canvas is not a actual video\n // but rather a image showing every few millisecond (giving us a video like visual)\n // So every 16ms the image captured from the video feed will be pasted/drawed on the canvas.\n // So we can say our video on canvas is showing 1 frame every 16 milliseconds\n return setInterval(() => {\n // ctx.drawImage will draw the image captured from the video feed\n // 0,0 are the x and y coordinate of the top left corner of the canvas\n // it will indicate that from which point the image drawing will start\n // width and height is of the destination contex(canvas)\n ctx.drawImage(video, 0, 0, width, height);\n\n // FROM HERE AFTERWARDS pixels MEANS VARIABLE\n\n // ctx.getImageData will give the data of the image(from the video playing on the canvas) \n // pixels will store the image data in form of array of rgb values for individual pixels\n let pixels = ctx.getImageData(0, 0, width, height);\n\n // Rendering different effects for the pixels\n // Every image captured from the video feed every 16ms will go through these function everytime\n // The pixels returned by these function will have different rgb values as compared to the original pixels\n\n // This is for red filter\n // pixels = redEffect(pixels);\n\n // This is for rgbSplit(tiktok) filter\n // pixels = rgbSplit(pixels);\n\n // This is for green screen\n pixels = greenScreen(pixels);\n\n // globalAlpha will determine how transparent will be the filters (0 - fully transparent, 1-opaque)\n // ctx.globalAlpha = 0.8\n\n // this will put the modified pixels back into the canvas\n // thus showing the filter on the video\n ctx.putImageData(pixels, 0, 0)\n }, 16);\n}", "function generatePipes(){\n if(!(frames % 400 === 0))return;\n var ventanita = 150;\n var randomHeight = Math.floor(Math.random()* 200)+50;\nvar pipe = new Pipe(0, randomHeight);\nvar pipe2 = new Pipe(randomHeight + ventanita, canvas.height-(randomHeight+ventanita));\npipes.push(pipe);\npipes.push(pipe2);\n\n}", "function videoSoundSampler2Loader(){\n var videoSnapshotTexture;\n blobVideoLoad(0, 5, \"gore.mp4\", false, {'postLoadFunc': () => {\n videoSnapshotTexture = mInputs[6] = createVideoSnapshotTexture(gl, videos[0])\n }});\n\n videoSnapshot = function(){\n if(videoSnapshotTexture && videoSnapshotTexture.globject) updateVideoTexture(gl, videoSnapshotTexture.globject, videos[0]);\n }\n\n sliderConfig = videoBlendSliderVals;\n\n videoUploadResponder = function(videoFile){\n var blobURL = URL.createObjectURL(videoFile);\n var oldVid = videos[0];\n // videos[0].pause(); //todo - delete the underlying video element to free memory\n createVideoElement(blobURL, 0, 5, true);\n oldVid.pause();\n URL.revokeObjectURL(oldVid.src);\n oldVid.removeAttribute(\"src\");\n oldVid.load();\n\n }\n var players = arrayOf(10);\n audioFilesSelected = function(audioFiles){\n console.log(audioFiles);\n players.forEach(player => player ? player.dispose() : 0);\n for(var i = 0; i < Math.min(10, audioFiles.length); i++){\n var objUrl = URL.createObjectURL(audioFiles[i]);\n players[i] = new Tone.Player(objUrl).toMaster();\n }\n }\n var deviations = arrayOf(1000).map((elem, i) => i + Math.random());\n var baseInd = 0;\n var midiNoteFunction = function(note, vel){\n var moveDownNote = lowestKeyboardNote;\n var moveUpNote = lowestKeyboardNote + 24; //62\n if(note == moveDownNote) baseInd = Math.max(baseInd-12, 0);\n else if(note == moveUpNote) baseInd+=12;\n else if(moveDownNote < note && note < moveUpNote ){\n videos[0].currentTime = deviations[baseInd + (note-(lowestKeyboardNote+1))];\n }\n } \n midiEventHandlers[\"on\"] = midiNoteFunction;\n\n var midiCCFunction = function(ccNum, val){\n sliders[ccNum].value = val/128;\n }\n midiEventHandlers[\"cc\"] = midiCCFunction;\n}", "function VideoPlayerData() {}", "function nextSequence(videoSrcData, videoArrays, video, sourceBuffer, offset, track){\n\n\t//create new sequence\n\tsequenceData.sequence = createSequence(videoSrcData, videoArrays);\n\n\t//append from the beginning of sourceBuffer\n\tif(offset === 0){\n\t\tsourceBuffer.timestampOffset = offset;\n\t}\n\n\t//get arrayBuffers using the references created in the sequence array\n\tconst role = sequenceData.sequence[0].role;\n\tconst position = sequenceData.sequence[0].position;\n\n\t//Append the first file in sequence manually to trigger updateEnd event \n\tsourceBuffer.appendBuffer(videoArrays[role].files[position].buffer);\n sourceBuffer.onupdateend = appendSequenceFiles(video, sourceBuffer, sequenceData, track);\n\n}", "function visualizeArray(array, canvas){\n var ee = \">>visualizeArray: \"; //console log cursor\n if (!(array instanceof Array)){\n alert(\"input error: visualizeArray\")\n return;\n }\n \n //todo: check for valid canvas obj\n \n var context = canvas.getContext(\"2d\");\n \n var arrlen = array.length; \n \n // calc num of cols and rows in approx ratio 3:4\n var cols = Math.ceil(Math.sqrt((3/3)*(arrlen)))\n var rows = Math.ceil(arrlen/cols)\n \n //console.log(ee+\"cols: \"+ cols + \" rows: \" + rows);\n \n var boxwidth = canvas.width/cols\n var boxheight = canvas.height/rows\n \n var d = Date.now();\n \n var count=0;\n clearCanvas(context, canvas)// clear canvas\n for (var r=0;r<rows;r++){\n for (var c=0;c<cols;c++){\n if (count<arrlen){\n count++;\n var red, green, blue;\n if (array[count]==-1){ //white\n red = 255; green=255; blue =255; \n }else if (array[count] ==0){ //yellow\n red = 255; green=255; blue =0;\n }else if (array[count] ==1){ //green\n red = 0; green=255; blue =0;\n }else if (array[count] ==2){ //red\n red = 255; green=0; blue =0;\n }\n \n context.fillStyle=\"rgb(\"+red+\",\"+green+\",\"+blue+\")\"; //function that returns color\n context.fillRect(c*boxwidth, r*boxheight, boxwidth-1, boxheight-1)\n }\n }\n }\n //console.log(ee+ \"drawtime: \"+(Date.now()-d)+\" ms\"); \n \n // erases all the content on canvas\n function clearCanvas(context, canvas) {\n \"use strict\"\n context.clearRect(0, 0, canvas.width, canvas.height);\n var w = canvas.width;\n canvas.width = 1;\n canvas.width = w;\n }\n}", "createVideo(scripture,cb) {\n // RegEx: /something_BOOKNUM_BOOKSYMBOL_something_CHAPTER_r999p.ext\n if( scripture.valid() ) {\n var booknum=(scripture.book.num<10?\"0\":\"\")+scripture.book.num.toString();\n var chapter=(scripture.chapter<10?\"0\":\"\")+scripture.chapter.toString();\n var baseFileRegex=\n escapeStringRegexp(path.sep)+\"\\\\w+_\"+\n booknum+\"_\"+\n scripture.book.symbol+\"_\"+\n \"\\\\w+_\"+\n chapter+\"_\"+\n \"r\\\\d{3}p\\\\.\\\\w{3}\";\n var videoRegex=new RegExp(baseFileRegex+\"$\",\"i\");\n var videoFile=this.videos.find(value=>videoRegex.test(value));\n var webvttFile=this.cacheManager.findWebvttFile(videoFile);\n if( !videoFile ) {\n // If no video file for the chapter, try looking for the verses\n let versevideos=[];\n for( var v of scripture.verses ) {\n videoRegex=new RegExp(\n escapeStringRegexp(path.sep)+\"\\\\w+_\\\\w+_\"+\n \"0{0,1}\"+booknum+\"-\"+\n \"0{0,2}\"+chapter+\"-\"+\n \"0{0,2}\"+v+\"_\"+\n \"r\\\\d{3}p\\\\.\\\\w{3}$\",\"i\");\n videoFile=this.videos.find(value=>videoRegex.test(value));\n if( videoFile ) {\n console.log(`For verse ${v}, I found \"${videoFile}\"`);\n // TODO: Using getInfoSync() significantly reduces performance. Can we use promises/fibers to keep it asynchronous?\n let info=this.videoApp.getInfoSync(videoFile);\n let webvtt=[{\n id: 0,\n start: info.start,\n end: info.duration,\n name: `${scripture.book.name} ${scripture.chapter}:${v}`\n }];\n let scrip=new Scripture(scripture.book,scripture.chapter,v);\n console.log(`Verse ${v} should be at position ${scripture.verses.indexOf(v)}.`);\n versevideos.push(new ScriptureVideo(scrip,videoFile,webvtt));\n }\n }\n // Send videos, or if still no video file found, return error indicating no video file.\n if( versevideos.length==scripture.verses.length ) {\n cb(null,versevideos);\n } else {\n console.log(`No video file for ${scripture.toString()}.`);\n cb({code:\"novideo\",tag:\"Not Found\",message:\"Video file could not be found!\"},new ScriptureVideo(scripture));\n }\n } else if( !webvttFile ) {\n // If no webvtt file, then create one and send stuff.\n console.log(`No webvtt file for ${videoFile}. Make one now.`);\n if( this.videoApp ) {\n this.videoApp.createWebVTT(videoFile,(err,webvtt)=>{\n if( err ) {\n console.error(err.toString());\n cb({code:\"indexerr\",tag:\"Index Error\",message:err.toString()},new ScriptureVideo(scripture,videoFile));\n } else {\n var webvttpath=this.cacheManager.saveWebvttFile(videoFile,webvtt.toString());\n console.log(`Created ${webvttpath}!`);\n cb(null,new ScriptureVideo(scripture,videoFile,webvtt));\n } \n });\n } else {\n cb({code:\"indexerr\",tag:\"Index Error\",message:\"No application available to index video!\"},new ScriptureVideo(scripture,videoFile));\n }\n } else {\n // All is well. Read the webvtt file and send stuff.\n fs.readFile(webvttFile,{encoding:\"UTF-8\"},(err,webvtt)=>{\n console.log(`Read ${webvttFile}.`);\n cb(null,new ScriptureVideo(scripture,videoFile,webvtt));\n });\n }\n }\n }", "function tirandoFotos() {\r\n let ctx;\r\n let intervaloDeTempo = setInterval(function() {\r\n if (i < qtdCaptura) {\r\n let imagem = $(\"#imagem\" + i);\r\n mostraImagem(imagem);\r\n contagemCapturaFotos.textContent = i + 1 + \" fotos capturadas.\";\r\n\r\n //Deixando as imagens em escala de cinza\r\n let pl = null;\r\n pl = new SimpleImage(imagem);\r\n for (let pixel of pl.values()) {\r\n let avg = (pixel.getRed() + pixel.getGreen() + pixel.getBlue()) / 3;\r\n pixel.setRed(avg);\r\n pixel.setGreen(avg);\r\n pixel.setBlue(avg);\r\n }\r\n pl.drawTo(imagem);\r\n i++;\r\n } else {\r\n i = 0;\r\n stopIntervaloDeTempo();\r\n enviandoDados();\r\n }\r\n }, 100);\r\n\r\n //Intervalo de Tempo\r\n function stopIntervaloDeTempo() {\r\n clearInterval(intervaloDeTempo);\r\n }\r\n}", "tracksForPlaylist(genres , duration){\n let tracks = this.getTracksMatchingGenres(genres);\n let res = [];\n for(let i=0;this.sumarTiempoDeTracks(res)<duration && i<tracks.length;i++){ \n res[i]=tracks[i];\n }\n return res;\n}", "generateTexture() {\n const canvas = document.getElementById('debugcanvas');\n const c = canvas.getContext('2d');\n c.fillStyle = 'black';\n c.fillRect(0,0,canvas.width, canvas.height);\n \n for(let i=0; i<canvas.width; i++) {\n for(let j=0; j<canvas.height; j++) {\n let v = this.octave(i/canvas.width,j/canvas.height,16);\n const per = (100*v).toFixed(2)+'%';\n c.fillStyle = `rgb(${per},${per},${per})`;\n c.fillRect(i,j,1,1);\n }\n }\n return c.getImageData(0,0,canvas.width,canvas.height);\n }", "function printFrame(arr)\n{\n // Code goes here\n console.log(arr);\n}", "function addThumbnails(data) {\n for (let i = 0, len = data.length; i < len; i++) {\n let $elementString = $(createImageElementString(data[i][0]));\n\n $elementString.on('click', function() { \n let startFrame = data[i][2] || 0;\n playVideo(data[i][1], startFrame); \n });\n\n $('.thumbnail-list').append($elementString);\n }\n}", "function copy(){\n /*Videodaten von Video1 auf Buffer zeichnen und danach abfragen */\n bufferCanvasContext.drawImage(video1, 0, 0, 640, 480);\n bilddaten = bufferCanvasContext.getImageData(0,0,640, 480);\n /*Filterzustände abfragen und Bilddaten entsprechend manipulieren*/\n if(negativeFilter1){\n setNegative(bilddaten,bufferCanvasWidth,bufferCanvasHeight,video1Red,video1Green,video1Blue,video1Opacity);\n }\n else if(greyFilter1){\n setGrey(bilddaten,bufferCanvasWidth,bufferCanvasHeight,video1Red,video1Green,video1Blue,video1Opacity); \n }\n else{\n setColor(bilddaten,bufferCanvasWidth,bufferCanvasHeight,video1Red,video1Green,video1Blue,video1Opacity); \n }\n /*Manipulierte Bilddaten auf sichtbares Canvas Rendern*/\n drawCanvasContext.putImageData(bilddaten,0,0);\n \n\n /* Videodaten von Video 2 auf zweiten Buffer zeichnen und danach abfragen*/\n bufferCanvas2Context.drawImage(video2, 0, 0, 640, 480);\n bilddaten2 = bufferCanvas2Context.getImageData(0,0,640, 480);\n /* Filterzustände für Video 2 abfragen und Bilddaten entsprechend manipulieren*/\n if(negativeFilter2){\n setNegative(bilddaten2,bufferCanvas2Width,bufferCanvas2Height,video2Red,video2Green,video2Blue,video2Opacity);\n }\n else if(greyFilter2){\n setGrey(bilddaten2,bufferCanvas2Width,bufferCanvas2Height,video2Red,video2Green,video2Blue,video2Opacity); \n }\n else{\n setColor(bilddaten2,bufferCanvas2Width,bufferCanvas2Height,video2Red,video2Green,video2Blue,video2Opacity); \n }\n /*Manipulierte Bilddaten von Video 2 auf sichtbares Canvas Rendern*/\n drawCanvas2Context.putImageData(bilddaten2,0,0);\n\n\n /*Copy nach 25 ms erneut aufrufen, höhere Werte verringen FPS sowie benötigte Rechenleistung */\n setTimeout(copy,25);\n}", "function urediYoutube(sporocilo){\n //inicializiraj in isprazni seznam\n youtubeElementi = [];\n //dobi youtube link iz sporocila\n //var regularExpression = new RegExp(\"^(https\\:/\\/www\\.youtube\\.com\\/watch)\",\"gi\");\n var regularExpression = new RegExp(\"\\\\bhttps\\:/\\/www\\.youtube\\.com\\/watch\\\\S{13,15}\\\\b\",\"gi\");\n var linki = sporocilo.match(regularExpression);\n //pusti presledke na mestih linkov\n sporocilo = sporocilo.replace(regularExpression, function() {\n return \" \";\n });\n //console.log(\"sporocilo: \" + sporocilo);\n //console.log(\"linki: \" + linki );\n //iz youtube linkov dobi id-je \n // spremeni v iframe elemente\n for(var i in linki){\n //ta link je sedaj id\n linki[i] = idFromYoutubeLink(linki[i]);\n if(linki[i]==false) continue;\n //kreiramo iframe element\n var iframe = document.createElement('iframe');\n iframe.src = 'https://www.youtube.com/embed/'+linki[i];\n iframe.setAttribute('allowFullScreen', '');\n iframe.style.width = \"200px\";\n iframe.style.height = \"150px\";\n var currDiv = document.createElement('div');\n currDiv.style.paddingLeft = \"20px\";\n currDiv.appendChild(iframe);\n youtubeElementi.push(currDiv);\n }\n \n return sporocilo;\n\n}", "function printFilmTvSeries(arrayFilmTV, type) {\r\n var source = $(\"#film-template\").html();\r\n var template = Handlebars.compile(source);\r\n\r\n for (var i = 0; i < arrayFilmTV.length; i++) {\r\n var singoloFilmTv = arrayFilmTV[i];\r\n\r\n var singleId = singoloFilmTv.id\r\n //stampa solo film e serietv\r\n // stampo con handlebars le chiavi che mi interessano\r\n var context =\r\n {\r\n poster: posterOrNot(singoloFilmTv.poster_path),\r\n title: singoloFilmTv.title || singoloFilmTv.name,\r\n titleOriginal: singoloFilmTv.original_title || singoloFilmTv.original_name,\r\n language: flags(singoloFilmTv.original_language),\r\n vote: starsVote(singoloFilmTv.vote_average),\r\n overview: singoloFilmTv.overview,\r\n movie_id: singoloFilmTv.id\r\n };\r\n var html = template(context);\r\n $('.list-film').append(html);\r\n\r\n getGenere(singleId, type);\r\n }\r\n\r\n}", "function pieWalk(WonderGums) {\n\trandom_index = Math.floor(Math.random() * (vid_array.length-1)) + 1;\n\tswitchToVideo(random_index);\n}" ]
[ "0.6238002", "0.61796933", "0.61796933", "0.6152342", "0.5983068", "0.59442747", "0.5937449", "0.5928376", "0.59096265", "0.5900606", "0.5887462", "0.58520234", "0.5756241", "0.5737774", "0.57361275", "0.57350826", "0.5717736", "0.5714275", "0.57121336", "0.57121336", "0.5707095", "0.57058483", "0.570372", "0.567562", "0.56714225", "0.56697345", "0.56509346", "0.5644405", "0.5566363", "0.5544029", "0.5544029", "0.5528505", "0.5524616", "0.55224013", "0.5520181", "0.5510905", "0.5498919", "0.54943997", "0.54913014", "0.54853576", "0.5481734", "0.54789567", "0.54769695", "0.547491", "0.5465487", "0.54537165", "0.5446589", "0.5440336", "0.5440231", "0.54386973", "0.5434186", "0.5434186", "0.5434186", "0.5432559", "0.5426485", "0.5418715", "0.5409752", "0.54085773", "0.5401626", "0.53983444", "0.5394817", "0.539269", "0.53903717", "0.53900856", "0.5389196", "0.5387494", "0.5383443", "0.53809655", "0.53617924", "0.53580374", "0.53522515", "0.5351409", "0.5351409", "0.5342203", "0.5337403", "0.53333473", "0.5331994", "0.533047", "0.5325631", "0.53231", "0.5322498", "0.53210485", "0.5316935", "0.53131396", "0.5311351", "0.5277425", "0.5274957", "0.52529997", "0.52485853", "0.524333", "0.52419144", "0.52396417", "0.52382326", "0.52353656", "0.5226004", "0.52202946", "0.52193785", "0.52173746", "0.52156126", "0.52122825", "0.52058285" ]
0.0
-1
Stampa a video della stringa di attori
print_actors_string(id){ let actors_string = ""; for (var i = 0; i < this.additional_infos.length; i++) { if(id == this.additional_infos[i].id){ actors_string = this.additional_infos[i].main_actors.join(", "); }; }; return actors_string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function video(source){\n return '<div style=\"margin-top : 10px;\"><p style=\"font-weight : bold\">Video explicativo</p></div><video width=\"500\" height=\"500\" controls>' + \n '<source src=\"' + source + '\" type=\"video/webm\"> Tu navegador no soporta video' +\n '</video>';\n }", "function playVideo() {\n playVideoSegments(transcripts)\n}", "async function handleStop(e) {\n resultuploadvideomateri.innerHTML = \"\";\n let blob = new Blob(recordedChunks, { 'type': 'video/mp4;' });\n recordedChunks = [];\n let videoURL = window.URL.createObjectURL(blob);\n vidSave.src = videoURL;\n\n spanstatus.innerHTML = \"Ukuran Video \" + formatBytes(blob.size, 2);\n spanstatus2.innerHTML += \"Ukuran Video \" + formatBytes(blob.size, 2);\n //---------------------------------------------------\n var reader = new FileReader();\n reader.readAsDataURL(blob);\n\n reader.onload = function (e) {\n let urlbs64 = e.target.result;\n // console.log(urlbs64);\n var inputbase64 = document.createElement(\"input\");\n inputbase64.setAttribute(\"name\", \"videodata\");\n inputbase64.setAttribute(\"id\", \"videodata\");\n inputbase64.value = urlbs64.replace(/^.*,/, '');\n\n inputbase64.setAttribute(\"style\", \"display:none\");\n\n var inputfilename = document.createElement(\"input\");\n inputfilename.setAttribute(\"name\", \"videofilename\");\n inputfilename.setAttribute(\"id\", \"videofilename\");\n inputfilename.setAttribute(\"style\", \"display:none\");\n inputfilename.value = \"Kelas_\" + idJenjang + \"_\" + StringTanggal(new Date()) + \"_id_\" + new Date().getTime();;// + namebantukirim.value.toUpperCase().replace(/\\s+/, \"_\");\n\n var inputmimetype = document.createElement(\"input\");\n inputmimetype.setAttribute(\"name\", \"videomimeType\")\n inputmimetype.setAttribute(\"id\", \"videomimeType\")\n inputmimetype.setAttribute(\"style\", \"display:none\")\n\n inputmimetype.value = \"video/mp4\";//srcEncoded.match(/^.*(?=;)/)[0];;//\"data:image/jpeg\";;// \n\n resultuploadvideomateri.innerHTML = \"\"\n resultuploadvideomateri.appendChild(inputbase64);\n resultuploadvideomateri.appendChild(inputfilename);\n resultuploadvideomateri.appendChild(inputmimetype);\n }\n //---------------------------------------------------\n recordedChunks = [];\n //vidlayar.src = \"\";\n tanda = 0;\n tutupkamera();\n\n\n}", "function drawVedio() {\n setTimeout(() => {\n canvas.getContext(\"2d\").drawImage(video, 0, 0, 100, 100);\n drawVedio();\n }, 0);\n }", "function VidLinkGen(RawLink) {\r\n\tvar myString = \"<video id='genVid' width='100%' height='480' controls='true' autoplay='true' loop='true' src='\" + RawLink + \"' type='video/mp4'>Your browser does not support mp4 video. </video>\"\r\n return myString\r\n}", "function sendVideo() \r\n{\r\n\tsocketSend('V' + mediaFilePath + nextSlideName);\r\n}", "buildHTML() {\n\n let attribs = '';\n\n if(this.autoplay == true) {\n attribs += 'autoplay ';\n }\n\n if(this.controls == true) {\n attribs += 'controls ';\n }\n\n if(this.loop == true) {\n attribs += 'loop ';\n }\n\n attribs = attribs.trim();\n\n\n return `<video poster=\"${this.poster}\" ${attribs} class=\"responsive-video\">\n <source src=\"${this.src}\" type=\"video/mp4\">\n Your browser does not support the video tag.\n </video>`;\n\n }", "function firstPlay() {\r\n document.getElementsByTagName(\"video\")[0].innerHTML =\r\n '<source id=\"mp4\" src=\"' +\r\n movieInfo[0].src +\r\n '\" type=\"video/mp4\">' +\r\n '<source id=\"ogg\" src=\"' +\r\n movieInfo[0].src.substring(0, movieInfo[0].src.length - 3) +\r\n 'ogg\" type=\"video/ogg\">' +\r\n \"<h4>Your browser does not support the video tag.</h4>\";\r\n}", "function file_video(path) {\n const url = window.location.origin + path;\n const content = `\n <link href=\"https://cdn.jsdelivr.net/gh/jscdn/css@master/video-js/video-js.min.css\" rel=\"stylesheet\">\n <script src=\"https://cdn.jsdelivr.net/gh/jscdn/js@master/video-js/video-js.min.js\"></script>\n <div class=\"container\"><br>\n <div class=\"card\">\n <div class=\"card-body text-center\">\n <div class=\"alert alert-danger\" id=\"folderne\" role=\"alert\"></div><script>document.getElementById(\"folderne\").innerHTML=decodeURI(this.window.location.href.substring(window.location.href.lastIndexOf('/',window.location.href.lastIndexOf('/')+1))).replace('/','').replace('?a=view','');</script>\n <video width=\"100%\" height=\"auto\" controls>\n <source src=\"${url}\" type=\"video/mp4\" />\n <source src=\"${url}\" type=\"video/webm\" />\n </video>\n </div>\n <p class=\"card-text text-center\"><a href=\"${url}\" class=\"btn btn-primary\">Download</a></p><br>\n </div>\n </div>\n `;\n $('#content').html(content);\n}", "function send (blob) {\n socket.emit('video', blob)\n }", "function inizializza_video() {\n navigator.getUserMedia( {'audio':true, 'video':true}, \n function(stream) {\n\n video_locale.src = URL.createObjectURL(stream);\n peer = new RTCPeerConnection(peer_config);\n peer.onicecandidate = onIceCandidate;\n peer.onaddstream = function(event){\n video_remoto.src = URL.createObjectURL(event.stream);\n };\n\n peer.addStream(stream);\n if (chiamante)\n peer.createOffer(sdpcreato, null, mediaConstraints);\n }\n );\n}", "function manipulatevideo(){\n if( cameravideo || capturevideo ){\n cameravideo = false;\n capturevideo = false;\n capturestream = null;\n buttonOff(document.querySelector('.app__system--button.video'));\n camerastream.getVideoTracks()[0].enabled = cameravideo;\n document.getElementById('localvideo').srcObject = camerastream;\n //-------------------CREATE NEW PRODUCER-------------------------------------------\n removeOldVideoProducers();\n let videoProducer = mediasouproom.createProducer(camerastream.getVideoTracks()[0]);\n videoProducer.send(sendTransport);\n updatevideo();\n }\n}", "videoComponent(videoSrc) {\n if (!videoSrc || videoSrc.length === 0 || !videoSrc[0].url)\n return ''; //if src not exist or empty\n\n const video = videoSrc[0].url;\n return `<video width=\"100%\" controls>\n <source src=\"${video}\" type=\"video/mp4\">\n Your browser does not support HTML5 video.\n </video>`;\n }", "getAllVideoURLs() {\n return this.completeRecordings.map((recording) => {\n //gerando um arquivo blbo de cada gravação\n const superBuffer = new Blob(recording, { type: this.videoType });\n //gerando a url de download\n return window.URL.createObjectURL(superBuffer);\n });\n }", "function playVideo(){\n const html = `\n <i class=\"stopVideo fas fa-video-slash\"></i>\n <span> Play Video </span>\n `\n document.querySelector('.video').innerHTML = html;\n\n}", "function downloadRecordedVideo(){\n const blob = new Blob(recordedBlobs, {type: 'video/webm'});\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = 'test.webm';\n document.body.appendChild(a);\n a.click();\n setTimeout(() => {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 100);\n}", "showLocalVideo() {}", "function videoHTML(token) {\n var src = token.attrGet(\"src\");\n var origSrc = token.attrGet(\"data-orig-src\");\n var dataOrigSrcAttr = origSrc !== null ? \"data-orig-src=\\\"\".concat(origSrc, \"\\\"\") : \"\";\n return \"<div class=\\\"video-container\\\">\\n <video width=\\\"100%\\\" height=\\\"100%\\\" preload=\\\"metadata\\\" controls>\\n <source src=\\\"\".concat(src, \"\\\" \").concat(dataOrigSrcAttr, \">\\n <a href=\\\"\").concat(src, \"\\\">\").concat(src, \"</a>\\n </video>\\n </div>\");\n }", "function mostrarMensaje(img,lng_sign,sonido){\n\tsetTimeout(function(){\n\t\t$.blockUI({ message: '<img src=\"'+img+'\" class=\"img-mensaje\" />' });\n\n\t\t$(\".guia\").hide();\n\n\t\t$(\".video\").fadeIn(100);\n\n\t\tcargarVideo(lng_sign);\n\t}, 500);\n\n\t/*setTimeout(function(){\n\t\t$.blockUI({ message: '<video class=\"video-mensaje\" autoplay=\"autoplay\"><source src=\"'+lng_sign+'\" type=\"video/mp4\" /></video>' });\n\t}, 500);*/\n\n\tvar snd = new Audio(sonido); // buffers automatically when created\n\tsnd.play();\n\n\tsetTimeout(function(){\n\t\t$.unblockUI();\n\t\t$(\".video\").hide();\n\n\t\t$(\".guia\").fadeIn(500);\n\t}, 5000);\n\n}", "function mostrarMensaje(img,lng_sign,sonido){\n\tsetTimeout(function(){\n\t\t$.blockUI({ message: '<img src=\"'+img+'\" class=\"img-mensaje\" />' });\n\n\t\t$(\".guia\").hide();\n\n\t\t$(\".video\").fadeIn(100);\n\n\t\tcargarVideo(lng_sign);\n\t}, 500);\n\n\t/*setTimeout(function(){\n\t\t$.blockUI({ message: '<video class=\"video-mensaje\" autoplay=\"autoplay\"><source src=\"'+lng_sign+'\" type=\"video/mp4\" /></video>' });\n\t}, 500);*/\n\n\tvar snd = new Audio(sonido); // buffers automatically when created\n\tsnd.play();\n\n\tsetTimeout(function(){\n\t\t$.unblockUI();\n\t\t$(\".video\").hide();\n\n\t\t$(\".guia\").fadeIn(500);\n\t}, 5000);\n\n}", "function getStreamAndRecord() {\n navigator.mediaDevices\n .getUserMedia({\n audio: false,\n video: {\n height: { max: 720 },\n }, //navigator trae todo lo referente a la maquina\n })\n .then(function (stream) {\n video.srcObject = stream;\n video.play();\n let recorder = RecordRTC(stream, {\n type: \"gif\",\n frameRate: 1,\n quality: 10,\n });\n //crear gif\n document\n .querySelector(\".button_capture\")\n .addEventListener(\"click\", function () {\n titleBox.textContent=\"Capturando Tu Guifo\";\n recorder.startRecording();\n document.querySelector(\".button_capture\").style.display = \"none\";\n document.querySelector(\".button_stop\").style.display = \"block\";\n timerInput.style.display=\"block\";\n timer();\n });\n //stop gif\n document\n .querySelector(\".button_stop\")\n .addEventListener(\"click\", function () {\n recorder.stopRecording();\n document.querySelector(\".upload_gif\").style.display = \"block\";\n document.querySelector(\".replay_gif\").style.display = \"block\";\n document.querySelector(\".button_stop\").style.display = \"none\";\n let blob = recorder.getBlob();\n const objectURL = URL.createObjectURL(blob);\n console.log(objectURL);\n console.log((video2.src = objectURL));\n video.style.display = \"none\";\n video2.style.display = \"block\";\n titleBox.textContent=\"Vista Previa\"\n stop();\n });\n\n //subir gif\n document\n .querySelector(\".upload_gif\")\n .addEventListener(\"click\", function () {\n titleBox.textContent=\"Subiendo Guifo\"\n bodyVideo.style.display = \"none\";\n loadGif.style.display = \"flex\";\n loadCancel.style.display=\"block\";\n timerInput.style.display = \"none\";\n document.querySelector(\".upload_gif\").style.display = \"none\";\n document.querySelector(\".replay_gif\").style.display = \"none\";\n move();\n let blob = recorder.getBlob();\n let form = new FormData();\n form.append(\"file\", blob, \"gif.gif\");\n fetch(urlUpload, {\n method: \"POST\",\n body: form,\n })\n .then((resp) => resp.json())\n .then((data) => {\n console.log(data.meta.status)\n if (data.error) {\n alert(data.errors);\n } else {\n localStorageGif(data);\n }\n if(data.meta.status == 200){\n sectionCreateGif.style.display=\"flex\";\n containerVideo.style.display = \"none\";\n document.querySelector(\"#section3\").style.display = \"flex\";\n document.querySelector(\".title_my_gifos\").style.display = \"flex\";\n }\n let idGif = JSON.parse(localStorage.getItem(\"id\"));\n let id = idGif[idGif.length-1];\n let urlGif = \"https://media.giphy.com/media/\" + id + \"/giphy.gif\";\n lastGif.src = urlGif;\n });\n });\n\n //repetir captura\n document\n .querySelector(\".replay_gif\")\n .addEventListener(\"click\", function () {\n document.querySelector(\".button_capture\").style.display = \"block\";\n document.querySelector(\".replay_gif\").style.display = \"none\";\n document.querySelector(\".upload_gif\").style.display = \"none\";\n video2.style.display = \"none\";\n video.style.display = \"block\";\n window.location.assign(\"upload.html\");\n });\n //download gif\n document.querySelector(\".download-button\").addEventListener(\"click\", function(){\n let blob = recorder.getBlob();\n invokeSaveAsDialog(blob);\n });\n document.querySelector(\".download-link\").addEventListener(\"click\", function(){\n let idGif = JSON.parse(localStorage.getItem(\"id\"));\n let id = idGif[idGif.length - 1];\n let urlGif = \"https://media.giphy.com/media/\" + id + \"/giphy.gif\";\n console.log(urlGif );\n var aux = document.createElement('input');\n aux.setAttribute('value', urlGif );\n document.body.appendChild(aux);\n aux.select();\n document.execCommand('copy');\n document.body.removeChild(aux);\n });\n // local storage\n function localStorageGif(data) {\n if (localStorage.getItem(\"id\") === null) {\n idGif = [];\n } else {\n idGif = JSON.parse(localStorage.getItem(\"id\"));\n }\n idGif.push(data.data.id);\n localStorage.setItem(\"id\", JSON.stringify(idGif));\n }\n });\n}", "function mergeVideo() {\n execSync(`ffmpeg -f concat -safe 0 -i ${tempFileList} -c copy output.mp4`);\n}", "function pauseVideo_01() { \r\n var video = \"video/PSICOALIANZA_SITP_Testimonial_evaluación_psicotécnica.mp4\";\r\n $(\"#video-01\").attr(\"src\",\"\");\r\n $(\"#video-01\").attr(\"src\",video);\r\n}", "function generateVideo(framesArray, id){\n const rawVideoFile = `./result/raw_${id}.mp4`;\n\n let audioFile;\n if (p5Program.configs.hasAudio){\n const audioBuffer = Buffer.from(p5Program.configs.audioBlob64.split(\"data:audio/mp3;base64,\").pop(), \"base64\");\n fs.writeFileSync(`./audio/audio_${id}.mp3`, audioBuffer, {encoding: \"base64\"});\n\n audioFile = `./audio/audio_${id}.mp3`;\n }\n\n const finalVideoFile = `./result/final_${id}.mp4`;\n\n mjpeg({ fileName: rawVideoFile, ignoreIdenticalFrames: 0 })\n .then( (recorder) => {\n \n console.log(\"Adding all frames...\");\n // adding all frames\n (function addNextFrame(framesList){\n if (framesList.length === 0) finalize();\n else {\n recorder.appendImageDataUrl( framesList.shift() )\n .then( () => {\n addNextFrame(framesList);\n })\n .catch(handleError)\n }\n })(framesArray)\n\n function finalize(){\n recorder.finalize()\n .then( () => {\n // video successfully created\n console.log(\"video finalized...\");\n \n let command = new ffmpegCommand();\n command.input(rawVideoFile);\n if (audioFile) command.input(audioFile);\n\n command.videoCodec(\"libx264\");\n command.videoBitrate(\"1000k\", true);\n command.on(\"end\", function() {\n isGenerating = false;\n console.log(\"mp4 ready!\");\n // remove file input video and audio files\n try {\n fs.unlinkSync(rawVideoFile)\n if (audioFile) fs.unlinkSync(audioFile);\n } catch(err) {\n console.error(err)\n }\n });\n command.on(\"error\", handleError);\n command.output(finalVideoFile);\n command.run();\n })\n .catch(handleError)\n }\n })\n .catch(handleError)\n\n function handleError(err){\n console.log(err);\n isGenerating = false;\n }\n}", "async function download_recording() {\n const blob = new Blob(recordedBlobs, { type: 'video/webm' });\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = 'test.webm';\n document.body.appendChild(a);\n a.click();\n setTimeout(() => {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 100);\n}", "async function handleStop(e) {\n const blob = new Blob(recordedChunks, {\n type: 'video/webm; codecs=vp9'\n });\n\n const buffer = Buffer.from(await blob.arrayBuffer());\n\n const { filePath } = await dialog.showSaveDialog({\n buttonLabel: 'Save video',\n defaultPath: `vid-${Date.now()}.webm`\n });\n\n if (filePath) {\n writeFile(filePath, buffer, () => console.log('video saved successfully!'));\n }\n\n}", "doVideo( stream ) {\n this.root.src = window.URL.createObjectURL( stream );\n }", "function addVideo (data) {\n var element = document.createElement('div');\n element.innerHTML = '<video controls autoplay src=\"' + data + '\">Your user agent does not support the HTML5 Video element</video>';\n\n var container = document.getElementById('data--container');\n container.appendChild(element);\n }", "function screenshot (video, hash) {\n const commend = `-v error -y -i ${video} -ss 2 -vf scale=\\'-1:720\\' -qscale:v 4 -frames:v 1 ${basePath}/${hash}.jpg`;\n console.log(commend);\n return new Promise((resolve, reject) => {\n const analyse = spawn('ffmpeg', commend.split(' '));\n // ffmpeg -y -i IMG_0434.MOV -ss 2 -qscale:v 4 -vf \"scale=-1:720\" -frames:v 1 1.jpg\n analyse.stderr.on('data', (data) => {\n console.log('--------------ffmpeg===============')\n reject(data.toString());\n });\n \n analyse.on('exit', (code) => {\n resolve(`${basePath}/${hash}.jpg`);\n });\n })\n}", "function getVideos() {\n let videoArray = [];\n for (let mediaIndexer = 0; mediaIndexer < 3; mediaIndexer += 1) {\n //screenShot[0] === thumbnail\n //screenShot[1] === videoUrl\n const screenShot = {\n thumbnail: `'https://steam-content-videos.s3-us-west-2.amazonaws.com/steam_screenshot${mediaIndexer}.png'`,\n videoUrl: `'https://steam-content-videos.s3-us-west-2.amazonaws.com/steam_content_video${mediaIndexer}.mp4'`\n }\n\n videoArray.push(screenShot)\n }\n return JSON.stringify(videoArray);\n}", "function TweetVideo()\r\n{\r\n T.postMediaChunked({ file_path: path }, function (err, data, response) {\r\n tempData = data;\r\n console.log(data)\r\n setTimeout(PushVid, 1000);\r\n })\r\n}", "function pushVideoInfo(li){\r\n // recupere l'url directe de la video a partir de l'url de la page contenant la video\r\n\t\tfunction getUrlVideo(urlPage){\r\n // recupere l'url directe de la video dans le contenu de la page de la video\r\n // plusieurs urls sont définies en général dans des tag \"<source\" sur la page de la video\r\n // on suppose que l'url de la video HD est celle contenant \"HD\" dans son nom et de type \"mp4\"\r\n\t\t\tfunction extractionUrlVideo(txtPage){\r\n\t\t\t\tvar tab=txtPage.match(/<source src=\".*HD([^\\\"]+)\".*type=\"video\\/mp4\"/ig);\r\n if (!tab || tab.length==0) throw [typeof tab,\"La structure a changé : pas de chaine'<source src=' dans la page :\",urlPage].join(\" \");\r\n\t\t\t\tvar urls=[]\r\n\t\t\t\tforEach (tab, function (elt){\r\n\t\t\t\t\tvar url=(elt.match(/src=\"(.*)\"/))[1];\r\n\t\t\t\t\turls.push(url);\r\n\t\t\t\t});\r\n\t\t\t\tif (urls.length==0) throw [\"Aucune url de vidéo dans la page :\",urlPage].join(\" \");\r\n\t\t\t\treturn urls.pop();\r\n\t\t\t}\r\n \r\n // lance l'extraction en récupérant le contenu de la page de la video par une requete http synchrone\r\n\t\t return extractionUrlVideo(httpSync(urlPage));\r\n\t\t}\r\n \r\n // récupération du titre, categorie et url de la page conteant la video\r\n\t\ttry {\r\n //url de la page video est dans le 'href' du lien du 'li' courant\r\n\t\t\tvar urlPageVideo=trim(tags(li,'a')[0].attributes[\"href\"].value);\r\n //categorie est dans le 'span' du 'h3' du 'li' courant\r\n\t\t\tvar categorieVideo=trim(tags(tags(li,'h3')[0], 'span')[0].firstChild.nodeValue);\r\n // titre video est l'element texte du h3\r\n\t\t\tvar titreVideo=trim(tags(li,'h3')[0].lastChild.nodeValue);\r\n\t\r\n\t\t vids.push ({categorie:categorieVideo,titre:titreVideo,url:getUrlVideo(urlPageVideo)});\r\n\t\t} catch (erreur) {\r\n\t\t alert(\"Impossible de récupérer les infos d'une des vidéos. exception : \"+erreur);\r\n\t\t throw \"Traitement interrompu sur erreur.\";\r\n\t\t}\r\n\t}", "function updateBlob(){\n\t\tvar video = document.querySelector('video');\n\t\tsocket.emit('updateBlob', video.src);\n\t}", "function shoot(){\n\t var video = document.getElementById(videoId);\n\t var output = document.getElementById('output');\n\t var canvas = capture(video, scaleFactor);\n\t canvas.onclick = function(){\n\t window.open(this.toDataURL());\n\t };\n\t snapshots.unshift(canvas);\n\t output.innerHTML = '';\n\t for(var i=0; i<4; i++){\n\t output.appendChild(snapshots[i]);\n\t }\n\t}", "function paintToCanvas() { //to display webcame live in a specified canvas with videos actual height and width\n\n const width = video.videoWidth; //getting actual height and width of video\n const height = video.videoHeight;\n canvas.width = width; //setting the canvas width and height accordingly \n canvas.height = height;\n return setInterval(() => { //by setintertval method we are drawing the recieved video's image in after every 16milli sec \n ctx.drawImage(video, 0, 0, width, height); //here we are drawing the image recieved in canvas\n let pixels = ctx.getImageData(0, 0, width, height) //here we are getting the canvas image to make some effect\n // console.log(pixels)\n // debugger;\n // pixels = redeffect(pixels) //here redeffect is called\n // console.log(hola);\n pixels = rgbsplit(pixels) // we are calling rgb split to make some changes in the pixels thats is the image we get from canvas\n ctx.globalAlpha=0.8; \n // pixels = greenscreen(pixels)\n ctx.putImageData(pixels, 0, 0); //after we get the changed pixels we put it back in the canvas\n }, 16);\n}", "async function createThumbnail(videofile, newFilePath, fileName) {\n const imageFileName = \"thumbnail\";\n const fileType = \".jpg\";\n const numberOfImages = 8;\n let duration = 0;\n let numberOfCreatedScreenshots = 0;\n const videoDetails = await videoData.findVideosByID(fileName);\n const ffmpegAvaiable = ffmpegPath.checkIfFFmpegFFprobeExits();\n if (ffmpegAvaiable == \"ffmpeg-ffprobe-exits\") { \n if (videoDetails !== undefined) {\n ffmpeg.ffprobe(videofile, (error, metadata) => {\n try { // get video duration \n duration = metadata.format.duration;\n } catch (error) { // duration = 0\n duration = 0;\n } \n console.log(`${fileName} duration: ${duration}`);\n // if video duration greater then 0\n if (duration > 0) {\n const command = new ffmpeg();\n command.addInput(videofile)\n .on(\"start\", () => {\n console.log(\"start createThumbnail\");\n })\n \n .on(\"progress\", (data) => {\n console.log(\"progress\", data);\n // update numberOfCreatedScreenshots\n numberOfCreatedScreenshots = data.frames; \n \n if(data.percent < 0){ // if data.percent is less then 0 then show 0.00%\n videoData.updateVideoData([`${fileName}`, \"thumbnail\", \"download\"], 0.00);\n currentDownloadVideos.updateCurrentDownloadVideos([`${fileName}`, \"thumbnail\", \"download-status\"], \"0.00%\");\n }else{ //update data with with data.percent\n try {\n videoData.updateVideoData([`${fileName}`, \"thumbnail\", \"download\"], data.percent);\n currentDownloadVideos.updateCurrentDownloadVideos([`${fileName}`, \"thumbnail\", \"download-status\"], `${data.percent.toFixed(2)}%`);\n } catch (error) {\n videoData.updateVideoData([`${fileName}`, \"thumbnail\", \"download\"], data.percent);\n currentDownloadVideos.updateCurrentDownloadVideos([`${fileName}`, \"thumbnail\", \"download-status\"], `${data.percent}%`);\n }\n }\n \n })\n .on(\"end\", () => {\n // encoding is complete\n for (let i = 0; i < numberOfCreatedScreenshots + 1; i++) {\n if (i == 0){\n try {\n if (availableVideos.getAvailableVideos([`${fileName}`, \"info\"])) {\n availableVideos.updateAvailableVideoData([`${fileName}`, \"info\", \"thumbnailLink\"], {});\n } else { \n availableVideos.updateAvailableVideoData([`${fileName}`], {\n info:{\n title: fileName,\n videoLink: {\n src : `/video/${fileName}`,\n type : \"video/mp4\"\n },\n thumbnailLink: {\n }\n }\n });\n }\n } catch (error) {\n availableVideos.updateAvailableVideoData([`${fileName}`], {\n info:{\n title: fileName,\n videoLink: {\n src : `/video/${fileName}`,\n type : \"video/mp4\"\n },\n thumbnailLink: {\n }\n }\n });\n }\n } else if (i < 10) {\n videoData.updateVideoData([`${fileName}`, \"thumbnail\", \"path\", i], `${newFilePath}${fileName}-${imageFileName}00${i}${fileType}`);\n availableVideos.updateAvailableVideoData([`${fileName}`, \"info\", \"thumbnailLink\", i], `/thumbnail/${fileName}/${i}`);\n } else if (i < 100) {\n videoData.updateVideoData([`${fileName}`, \"thumbnail\", \"path\", i], `${newFilePath}${fileName}-${imageFileName}0${i}${fileType}`);\n availableVideos.updateAvailableVideoData([`${fileName}`, \"info\", \"thumbnailLink\", i], `/thumbnail/${fileName}/${i}`);\n } else {\n videoData.updateVideoData([`${fileName}`, \"thumbnail\", \"path\", i], `${newFilePath}${fileName}-${imageFileName}${i}${fileType}`);\n availableVideos.updateAvailableVideoData([`${fileName}`, \"info\", \"thumbnailLink\", i], `/thumbnail/${fileName}/${i}`);\n }\n if (i == numberOfCreatedScreenshots) {\n videoData.updateVideoData([`${fileName}`, \"thumbnail\", \"download\"], \"completed\");\n }\n }\n \n if(currentDownloadVideos.getCurrentDownloads([`${fileName}`, \"compression\"]) === undefined || currentDownloadVideos.getCurrentDownloads([`${fileName}`, \"compression\", \"download-status\"]) === \"completed\") { \n currentDownloadVideos.deleteSpecifiedCurrentDownloadVideosData(fileName);\n } else { \n currentDownloadVideos.updateCurrentDownloadVideos([`${fileName}`, \"thumbnail\", \"download-status\"], \"completed\");\n } \n \n })\n .on(\"error\", (error) => {\n /// error handling\n console.log(`Encoding Error: ${error.message}`);\n })\n .outputOptions([`-vf fps=${numberOfImages}/${duration}`])\n .output(`${newFilePath}${fileName}-${imageFileName}%03d${fileType}`)\n .run();\n } else { // duration less or equal to 0\n try { // delete data\n if (videoData.getVideoData([`${fileName}`]) || currentDownloadVideos.getCurrentDownloads()[`${fileName}`]) { // if videodata and currentDownloadVideos is avaiable \n // delete all data\n deleteData.deleteAllVideoData(fileName);\n } \n } catch (error) { // an error has occurred\n console.log(error);\n } \n }\n }); \n } else { \n return \"videoDetails dosnet exists\";\n }\n } else if(ffmpegAvaiable == \"Cannot-find-ffmpeg-ffprobe\"){\n currentDownloadVideos.updateCurrentDownloadVideos([`${fileName}`, \"thumbnail\", \"download-status\"], \"ffmpeg and ffprobe unavailable\");\n } else if(ffmpegAvaiable == \"Cannot-find-ffmpeg\"){ \n currentDownloadVideos.updateCurrentDownloadVideos([`${fileName}`, \"thumbnail\", \"download-status\"], \"ffmpeg unavailable\");\n } else if(ffmpegAvaiable == \"Cannot-find-ffprobe\"){ \n currentDownloadVideos.updateCurrentDownloadVideos([`${fileName}`, \"thumbnail\", \"download-status\"], \"ffprobe unavailable\");\n }\n}", "static mergeMedia(aud, vid, output, callback) {\n ffmpeg()\n .input(aud)\n .input(vid)\n .output(output)\n .outputOptions(\n '-strict', '-2',\n '-map', '0:0',\n '-map', '1:0'\n ).on('end', function() { \n console.log('conversion ended');\n callback(null);\n }).on('error', function(err){\n console.log('error: ', err);\n callback(err);\n }).run();\n }", "function addVideoTracking1() {\n // Add in the video files.\n // These are 3 different codecs due to different browser specifications ; we recommend you have all 3 filetypes.\n var srcNode = document.createElement('source');\n srcNode.setAttribute('type', 'video/webm');\n srcNode.setAttribute('src', Enabler.getUrl('videoPP0.webm'));\n creative.dom.video1.vid.appendChild(srcNode);\n\n srcNode = document.createElement('source');\n srcNode.setAttribute('type', 'video/mp4');\n srcNode.setAttribute('src', Enabler.getUrl('videoPP0.mp4'));\n creative.dom.video1.vid.appendChild(srcNode);\n\n creative.dom.video1.vid.appendChild(srcNode);\n\n Enabler.loadModule(studio.module.ModuleId.VIDEO, function() {\n studio.video.Reporter.attach('Video Report 1', creative.dom.video1.vid);\n }.bind(this));\n}", "function WeBack(theMode) {\n Mode = theMode;\n ModeCheck(Mode);\n\n areAnimated = [false, false, false, false];\n document.getElementById(\"nextVid\").style.display = \"none\";\n Learn_video.currentTime = 0;\n Learn_video.src = arrVideoList[0].name;\n Learn_video.play();\n console.log(arrVideoList[0].emotions);\n}", "function playback() {\n for (let frame of recorder) {\n s.line(frame.x1, frame.y1, frame.x2, frame.y2);\n }\n }", "function makevid(preformer){\r\n\r\n// image\r\n\tprefimg='<img class=\"png\" width=\"180\" height=\"148\" src=\"http://cdn-i.highwebmedia.com/roomimage/'+preformer+'.jpg\" img style=\"float:right;margin-right:100px;margin-top:10px;border-width:5px;border-style:double; \">';\r\n\tFversion=readCookie(\"CBversion\")\r\n\tif(!Fversion){Fversion=\"http://ccstatic.highwebmedia.com/static/flash/CBV_2p644.swf\"}\r\n\tvideodata2 = videodata2.replace(\"ladroop\",preformer);\r\n\tnewvid=document.createElement('div');\r\n\tnewvid.style.clear=\"both\";\r\n\tnewvid.innerHTML=prefimg+videodata1+Fversion+videodata2;\r\n\tdocument.getElementsByClassName('block')[0].appendChild(newvid)}", "function trim(a, b) {\n blobs = blobs.slice(a, b);\n var superBuffer = new Blob(blobs, {\n type: 'video/webm'\n });\n var url = window.URL.createObjectURL(superBuffer);\n $(\"#video\").attr(\"src\", url+\"#t=\"+blobs.length);\n updateRanges(blobs);\n }", "function Start() \n{\t\n\t/*si se repite*/\n\t//if(Loopiando){\n\t\t//movTexture.loop = Loopiando;\n\t//}\n\t/*setea la textura al objeto*/\n\t//renderer.material.mainTexture = movTexture;\n\t/*le da play a la textura*/\n\t//movTexture.Play();\n\t//Handheld.PlayFullScreenMovie (Application.streamingAssetsPath+\"/cargando.mp4\", Color.black , FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFit);\n\tHandheld.PlayFullScreenMovie (\"Pinos.mp4\", Color.black , FullScreenMovieControlMode.CancelOnInput);\n\t\n\t//Debug.Log(Application.streamingAssetsPath+\"/cargando.mp4\");\n}", "async function broadcast (mediaStream, opts) {\n var archive = await DatArchive.create({\n title: 'Hypercast Video Stream',\n description: 'An encoded WebM video stream.'\n })\n\n var enc = mtw.EncodedStream(mediaStream, opts)\n var chunkCount = 0\n enc.on('data', (chunk) => {\n archive.writeFile(chunkCount + '.buffer', chunk.buffer, 'binary')\n archive.writeFile('currentChunk.txt', chunkCount + '', 'utf8')\n archive.commit()\n console.log('committed ', chunkCount + '.buffer')\n chunkCount++\n })\n\n return archive.url\n}", "function makeVideo(id) {\n var video = document.createElement('video')\n var source = document.createElement('source')\n\n video.width = '400'\n video.height = '200'\n video.controls = true\n\n source.src='./video/' + id +'.mp4'\n source.type='video/mp4'\n\n video.appendChild(source)\n\n return video\n}", "function newVideo(url) {\n media = document.getElementById(\"video\");\n media.setAttribute(\"src\", url)\n\n // Getting the Duration of the Video.\n media.addEventListener('canplay', function (e) {\n duration = Math.round(media.duration);\n try { document.getElementById(\"progress-bar\").style.width = `${0}%`; }\n catch (err) { }\n });\n // Callback to Play Function\n play();\n}", "function chargueVideos(response){\n if(response['results'] != \"error\"){\n var iteratorjson = JSON.parse(response['message']);\n for(var i=1; i<11; i++){\n if(iteratorjson.hasOwnProperty(i.toString())){\n json = JSON.parse(iteratorjson[i.toString()]);\n if(json.hasOwnProperty(\"thumbnail\")){\n var img = document.getElementById(\"img\"+i.toString());\n var jsonThumbnail = JSON.parse(json['thumbnail']);\n img.src = getPath() + \"video?user=\"+json['username']+\"&name=\"+\n jsonThumbnail['name']+\".\"+jsonThumbnail['type'];\n img.hidden = false;\n }\n var hrefvideo = document.getElementById(i.toString());\n var textp = document.getElementById(\"text\"+i)\n var textvideo = json['username'] + \" - \" + json['name'];\n hrefvideo.setAttribute('href', getPath() + \"video?user=\"+json['username']+\"&name=\"+\n json['name']+\".\"+json['type']);\n textp.innerHTML = textvideo;\n\n }\n }\n }\n}", "function DOMtoString(document_root) {\n var html = '',\n node = document_root.firstChild;\n\n var arr = [], /*l = document_root.links;*/ l = document_root.getElementsByTagName(\"video\");\nfor(var i=0; i<l.length; i++) {\n console.log(l[i]);\n var temp = l[i].href;\n temp = l[i].currentSrc;\n\n //alert(temp);\n\n var ext = temp.split('.').pop();\n //alert(ext);\n if(ext==\"mp3\" || ext==\"mp4\")\n {\n var link = document.createElement('a');\n link.href = temp;\n link.setAttribute('download', temp);\n document.getElementsByTagName(\"body\")[0].appendChild(link);\n // Firefox\n if (document.createEvent) {\n var event = document.createEvent(\"MouseEvents\");\n event.initEvent(\"click\", true, true);\n link.dispatchEvent(event);\n }\n //alert(link);\n link.click();\n link.parentNode.removeChild(link);\n \n }\n arr.push(l[i].href);\n}\nreturn \"Success\";\n\n while (node) {\n html+=node+\"<br/>\";\n node = node.nextSibling;\n }\n return html;\n}", "function displayStaticVideo(cameraName, port) {\n let socket = io.connect('http://127.0.0.1:' + port);\n socket.on('frame', function (data) {\n const base64String = btoa(new Uint8Array(data.buffer).reduce(function(data, byte) {\n return data + String.fromCharCode(byte);\n }, ''));\n if (!$('#block-button-' + cameraName).is(':disabled')) {\n $('#canvas-image-' + cameraName).attr('src', 'data:image/png;base64,' + base64String);\n }\n });\n}", "addVideoAttachment(browser, test, outputDir) {\n if (!test.passed || config.saveAllVideos) {\n const filename = browser.globals.videoFilename;\n const videoPath = path.resolve(outputDir, filename + '.mp4');\n reporter.addAttachment('Execution video', videoPath, 'video/mp4');\n }\n }", "function generateThumbnail() {\n c = document.createElement(\"canvas\");\n c.width = width;\n c.height = height;\n c.style.width = width;\n c.style.height = height;\n ctx = c.getContext(\"2d\");\n ctx.canvas.width = width;\n ctx.canvas.height = height;\n ctx.drawImage(video, 0, 0, width, height);\n var pixel = ctx.getImageData(x, y, 1, 1);\n var newx = video.currentTime; // or i for frame #?\n var newy = pixel.data[0] + pixel.data[1] + pixel.data[2];\n if (newy > 0) Plotly.extendTraces('plot', { x: [[newx]], y: [[newy]] }, [0])\n}", "function play(e){\n var id = e.id;\n var arr = byId(\"i\"+id ).value.split(\";\");\n \n // var jsonObj = JSON.parse(jsonStr);\n $(\"#h1\").html(id);\n $(\"#list\").hide();\n $(\"#video\").show();\n \n //config the video tag property\n $(\"#video\").attr({\n \"src\":arr[0],\n \"controls\":true,\n \"loop\":true,\n \"autoplay\":true,\n \"type\":arr[1]\n });\n}", "function mostrar(e) {\n\n zonaDatos.innerHTML = e.target.responseText;\n\n // si tenemos un video por ej:\n //zonaDatos.innerHTML = \"Archivo leído!\";\n\n}", "function get_video(path) {\n //with camera stream, only working if we use video here not with 'var video', but before this point video doesn't exist\n video = video2;\n \n //need to be careful here: in use_webcam() the src Object is set with video.srcObject = stream; not with video.setAttribute(). If we don't reset\n //it to null it seems to override the attributes that are set with setAttribute.\n video.srcObject = null;\n //first I created a seperate source object here, which is complete nonesense\n //it's totally dufficient to add the path from the file picker <video src=\"path\" ...>\n video.setAttribute('src', path);\n video.load();\n video.play();\n\n //add an update, as soon as the video is running loop is called constantly\n video.ontimeupdate = function() {loop()};\n\n}", "sendVideoMessage( recipientId ) {\n var messageData = {\n recipient: {\n id: recipientId\n },\n message: {\n attachment: {\n type: \"video\",\n payload: {\n url: envVars.SERVER_URL + \"/assets/allofus480.mov\"\n }\n }\n }\n };\n\n this.callSendAPI( messageData );\n }", "function startStream() {\n let url = 'http://' + ipAddress + '/webcam/?action=stream'\n var video = document.getElementById('video')\n\n video.setAttribute('src', url)\n\n}", "function playVideo() {\r\n video.play();\r\n play.innerHTML = '<i class=\"fas fa-pause fa-2x\"></i>';\r\n}", "function showCopyLink() {\r\n if( s['fmt_map'].indexOf('22/2000000/9/0/115') > -1 ) {\r\n i = 22;\r\n m = 'High Definition';\r\n } else {\r\n i = 18;\r\n m = 'for iPod';\r\n }\r\n url_command\r\n = 'prompt('\r\n + '\\'Copy & Past the MP4('+m+') URL\\','\r\n + 'document.getElementById(\\'watch-url-field\\').value+\\'&fmt='+i+'\\''\r\n + ');'\r\n + 'void(0);';\r\n embed_command\r\n = 'prompt('\r\n + '\\'Copy & Past the MP4('+m+') tag\\','\r\n + 'document.getElementById(\\'embed_code\\').value.replace(/(http:\\\\/\\\\/[a-zA-Z0_-]*\\\\.youtube\\\\.com\\\\/[-_.a-zA-Z0-9\\\\/?&=%]+)/g,\\'$1&ap=%252526fmt%253D'+i+'\\')'\r\n + ');'\r\n + 'void(0);';\r\n // Create Links Block\r\n d.getElementById('watch-url-div').innerHTML\r\n += '<div id=\"URL-YT-video\" style=\"text-align:right;padding-right:30px;\">'\r\n + '<a href=\"javascript:'+url_command+'\">[ Highest-Quality-URL ]</a>'\r\n + '</div>';\r\n d.getElementById('watch-embed-div').innerHTML\r\n += '<div id=\"EMBED-YT-video\" style=\"text-align:right;padding-right:30px;\">'\r\n + '<a href=\"javascript:'+embed_command+'\">[ Highest-Quality-Embed ]</a>'\r\n + '</div>';\r\n }", "function showCopyLink() {\r\n if( s['fmt_map'].indexOf('22/2000000/9/0/115') >= 0 ) {\r\n i = 22;\r\n m = 'High Definition';\r\n } else {\r\n i = 18;\r\n m = 'for iPod';\r\n }\r\n url_command\r\n = 'prompt('\r\n + '\\'Copy & Past the MP4('+m+') URL\\','\r\n + 'document.getElementById(\\'watch-url-field\\').value+\\'&fmt='+i+'\\''\r\n + ');'\r\n + 'void(0);';\r\n embed_command\r\n = 'prompt('\r\n + '\\'Copy & Past the MP4('+m+') tag\\','\r\n + 'document.getElementById(\\'embed_code\\').value.replace(/(http:\\\\/\\\\/[a-zA-Z0_-]*\\\\.youtube\\\\.com\\\\/[-_.a-zA-Z0-9\\\\/?&=%]+)/g,\\'$1&ap=%252526fmt%253D'+i+'\\')'\r\n + ');'\r\n + 'void(0);';\r\n // Create Links Block\r\n d.getElementById('watch-url-div').innerHTML\r\n += '<div id=\"URL-YT-video\" style=\"text-align:right;padding-right:30px;\">'\r\n + '<a href=\"javascript:'+url_command+'\">[ Highest-Quality-URL ]</a>'\r\n + '</div>';\r\n d.getElementById('watch-embed-div').innerHTML\r\n += '<div id=\"EMBED-YT-video\" style=\"text-align:right;padding-right:30px;\">'\r\n + '<a href=\"javascript:'+embed_command+'\">[ Highest-Quality-Embed ]</a>'\r\n + '</div>';\r\n }", "function getUrlVideo(urlPage){\r\n // recupere l'url directe de la video dans le contenu de la page de la video\r\n // plusieurs urls sont définies en général dans des tag \"<source\" sur la page de la video\r\n // on suppose que l'url de la video HD est celle contenant \"HD\" dans son nom et de type \"mp4\"\r\n\t\t\tfunction extractionUrlVideo(txtPage){\r\n\t\t\t\tvar tab=txtPage.match(/<source src=\".*HD([^\\\"]+)\".*type=\"video\\/mp4\"/ig);\r\n if (!tab || tab.length==0) throw [typeof tab,\"La structure a changé : pas de chaine'<source src=' dans la page :\",urlPage].join(\" \");\r\n\t\t\t\tvar urls=[]\r\n\t\t\t\tforEach (tab, function (elt){\r\n\t\t\t\t\tvar url=(elt.match(/src=\"(.*)\"/))[1];\r\n\t\t\t\t\turls.push(url);\r\n\t\t\t\t});\r\n\t\t\t\tif (urls.length==0) throw [\"Aucune url de vidéo dans la page :\",urlPage].join(\" \");\r\n\t\t\t\treturn urls.pop();\r\n\t\t\t}\r\n \r\n // lance l'extraction en récupérant le contenu de la page de la video par une requete http synchrone\r\n\t\t return extractionUrlVideo(httpSync(urlPage));\r\n\t\t}", "function VideoPlayerData() {}", "function autoVideo() {\r\n // Reloop the list of videos from the first movie\r\n if (position == movieInfo.length) {\r\n position = 0;\r\n document.getElementsByTagName(\"video\")[0].onended = function () {\r\n setTimeout(autoVideo, 2000);\r\n };\r\n }\r\n\r\n document.getElementById(\"mp4\").src = movieInfo[position].src;\r\n document.getElementById(\"ogg\").src =\r\n movieInfo[position].src.substring(0, movieInfo[position].src.length - 3) +\r\n \"ogg\";\r\n document.getElementsByTagName(\"video\")[0].load();\r\n\r\n position++;\r\n}", "async function setUpVideo(v) {\n const stream = await navigator.mediaDevices.getUserMedia({\n video: true,\n });\n v.srcObject = stream;\n v.play();\n}", "function setup() {\n noCanvas(400, 400);\n\n vid = createVideo(\n ['roadworkahead.mp4'],\n vidLoad\n );\n\n vid2 = createVideo(\n ['theycall.mp4'],\n vidLoad\n );\n \n vid3 = createVideo(\n ['bible.mp4'], \n vidLoad\n );\n \n vid4 = createVideo(\n ['2bros.mp4'], \n vidLoad\n );\n \n vid5 = createVideo(\n ['eve.mp4'], \n vidLoad\n );\n \n vid6 = createVideo(\n ['chip.mp4'], \n vidLoad\n );\n \n vid7 = createVideo(\n ['RedDress.mp4'], \n vidLoad\n );\n vid8 = createVideo(\n ['Sprite.mp4'],\n vidLoad\n );\n\n vid9 = createVideo(\n ['mouse.mp4'],\n vidLoad\n );\n \n vid10 = createVideo(\n ['Backstreet.mp4'], \n vidLoad\n );\n \n vid11 = createVideo(\n ['eep.mp4'], \n vidLoad\n );\n \n vid12 = createVideo(\n ['pizza.mp4'], \n vidLoad\n );\n \n vid13 = createVideo(\n ['wakeup.mp4'], \n vidLoad\n );\n \n vid14 = createVideo(\n ['raccoon.mp4'], \n vidLoad\n );\n vid15 = createVideo(\n ['who-are.mp4'],\n vidLoad\n );\n\n vid16 = createVideo(\n ['whoWant.mp4'],\n vidLoad\n );\n \n vid17 = createVideo(\n ['run.mp4'], \n vidLoad\n );\n \n vid18 = createVideo(\n ['church.mp4'], \n vidLoad\n );\n \n vid19 = createVideo(\n ['morning.mp4'], \n vidLoad\n );\n \n vid20 = createVideo(\n ['scream-kid.mp4'], \n vidLoad\n );\n \n vid21 = createVideo(\n ['dance-luke.mp4'], \n vidLoad\n );\n \n vid22 = createVideo(\n ['adel-luke.mp4'],\n vidLoad\n );\n\n vid23 = createVideo(\n ['taco.mp4'],\n vidLoad\n );\n \n vid24 = createVideo(\n ['hello.mp4'], //replace with new video file\n vidLoad\n );\n \n vid25 = createVideo(\n ['vodka.mp4'], //replace with new video file\n vidLoad\n );\n \n vid26 = createVideo(\n ['Ah-mouse.mp4'], //replace with new video file\n vidLoad\n );\n \n vid27 = createVideo(\n ['drop.mp4'], //replace with new video file\n vidLoad\n );\n \n vid28 = createVideo(\n ['kush.mp4'], \n vidLoad\n );\n \n vid29 = createVideo(\n ['kevin.mp4'], \n vidLoad\n );\n \n vid30 = createVideo(\n ['kermit.mp4'], \n vidLoad\n );\n \n vid31 = createVideo(\n ['fresh.mp4'], \n vidLoad\n );\n \n vid32 = createVideo(\n ['dance.mp4'],\n vidLoad\n );\n\n vid33 = createVideo(\n ['chill.mp4'],\n vidLoad\n );\n \n vid34 = createVideo(\n ['wow.mp4'], \n vidLoad\n );\n \n vid35 = createVideo(\n ['tort.mp4'], \n vidLoad\n );\n \n vid36 = createVideo(\n ['mole.mp4'], \n vidLoad\n );\n //create video refrence page\n \n \n //Matt helped me create some arrays, I was using Python logic for Lists before he corrected me.\n h = hour();\n s = second();\n list1 = [vid6, vid14, vid23, vid25, vid28, vid31, vid35, vid36, vid33]; \n //list1 is noon\n list2 = [vid, vid4, vid2, vid3, vid9, vid16, vid13, vid11, vid15, vid17, vid18, vid19, vid20, vid22]; \n //list2 is morning\n list3 = [vid5, vid7, vid8, vid10, vid12, vid21, vid24, vid26, vid27, vid29, vid30, vid32, vid34]; \n //list3 is evening\n \n vid.size(400, 400);\n \n //with Matts help I can now hide the videos, also kfrajer on Processing Forum helped with hiding and loading up the videos. https://forum.processing.org/two/discussion/23870/p5js-problem-with-asynchronous-video-loading-playing\n \n vid.hide();\n vid2.hide();\n vid3.hide();\n vid4.hide(); \n vid5.hide(); \n vid6.hide(); \n vid7.hide(); \n vid8.hide();\n vid9.hide();\n vid10.hide();\n vid11.hide(); \n vid12.hide(); \n vid13.hide(); \n vid14.hide(); \n vid15.hide();\n vid16.hide();\n vid17.hide();\n vid18.hide(); \n vid19.hide(); \n vid20.hide(); \n vid21.hide(); \n vid22.hide();\n vid23.hide();\n vid24.hide();\n vid25.hide(); \n vid26.hide(); \n vid27.hide(); \n vid28.hide(); \n vid29.hide(); \n vid30.hide(); \n vid31.hide();\n vid32.hide();\n vid33.hide();\n vid34.hide(); \n vid35.hide(); \n vid36.hide(); \n \n vid.volume(0);\n vid2.volume(0);\n vid3.volume(0);\n vid4.volume(0);\n vid5.volume(0);\n vid6.volume(0);\n vid7.volume(0);\n vid8.volume(0);\n vid9.volume(0);\n vid10.volume(0);\n vid11.volume(0);\n vid12.volume(0);\n vid13.volume(0);\n vid14.volume(0);\n vid15.volume(0);\n vid16.volume(0);\n vid17.volume(0);\n vid18.volume(0);\n vid19.volume(0);\n vid20.volume(0);\n vid21.volume(0);\n vid22.volume(0);\n vid23.volume(0);\n vid24.volume(0);\n vid25.volume(0);\n vid26.volume(0);\n vid27.volume(0);\n vid28.volume(0);\n vid29.volume(0);\n vid30.volume(0);\n vid31.volume(0);\n vid32.volume(0);\n vid33.volume(0);\n vid34.volume(0);\n vid35.volume(0);\n vid36.volume(0);\n \n //The hour function and a bit of tweaking with Matts help now the hour is specific to what time of day a video will load\n \n //below is more than 12, pm\n if (hour() > 12) {\n currentVideo = random(list3);\n }\n//below is less than 12, am\n if (hour() < 12) {\n currentVideo = random(list2);\n }\n //currentVideo.show();\n //below is equal to 12, noon\n if (hour() == 12) {\n currentVideo = random(list1);\n }\n currentVideo.show(); \n currentVideo.loop();\n currentVideo.volume(1);\n \n }", "async function selectMediaToStream() {\n try {\n const mediaStream = await navigator.mediaDevices.getDisplayMedia();\n videoElement.srcObject = mediaStream;\n playVideo();\n } catch (error) {\n console.log(error);\n }\n}", "function queueVideo(filename, transitionIn, transitionOut, transitionMargin) {\n\tif (filename.endsWith(\".gif\")) {\n\t\tlet video = dmd.NewVideo(String(filename), String(filename));\n\t\tlet id = udmd.RegisterVideo(2, false, filename);\n\t\tudmd.DisplayScene00(id.toString(), \"\", 15, \"\", 15, transitionIn, video.Length * 1000 - transitionMargin, transitionOut);\n\t} else {\n\t\tudmd.DisplayScene00(filename, \"\", 15, \"\", 15, transitionIn, 5000 - transitionMargin, transitionOut);\n\t}\n}", "function initializeVideo() {\n const videoDuration = Math.round(video.duration);\n seek.setAttribute('max', videoDuration);\n progressBar.setAttribute('max', videoDuration);\n const time = formatTime(videoDuration);\n duration.innerText = `${time.minutes}:${time.seconds}`;\n duration.setAttribute('datetime', `${time.minutes}m ${time.seconds}s`)\n}", "async function handleStop(e) {\n // blob is a data structure to handle raw data, here video file\n const blob = new Blob(recordedChunks, {\n type: 'video/webm; codecs=vp9'\n });\n \n // it is also an object to save raw data, this is the format needed for saving to file\n const buffer = Buffer.from(await blob.arrayBuffer());\n \n // To show save dialog box in native os UI\n const { filePath } = await dialog.showSaveDialog({\n \n buttonLabel: 'Save video',\n // Default naming convention to save video\n defaultPath: `vid-${Date.now()}.webm`\n });\n \n console.log(filePath);\n \n // File path and buffer passed to save data finally\n writeFile(filePath, buffer, () => console.log('video saved successfully!'));\n }", "function video_panel_function() {\r\n //container\r\n document.getElementById('crear_GIF').innerHTML = \"\";\r\n document.getElementById('crear_GIF').appendChild(document.createElement(\"div\")).className = \"confirm_crear_GIF phase2\";\r\n //video\r\n document.getElementsByClassName('confirm_crear_GIF phase2')[0].appendChild(document.createElement(\"video\")).className = \"video\";\r\n //title\r\n document.getElementsByClassName('confirm_crear_GIF phase2')[0].appendChild(document.createElement(\"div\")).className = \"confirm_crear_GIF_title\";\r\n document.getElementsByClassName('confirm_crear_GIF phase2')[0].appendChild(document.createElement(\"img\")).id = \"close_GIF\";\r\n document.getElementById('close_GIF').setAttribute(`src`, `./images/button3.svg`);\r\n document.getElementsByClassName('confirm_crear_GIF_title')[0].appendChild(document.createElement(\"p\")).innerHTML = \"Un chequeo antes de empezar\";\r\n //buttom\r\n document.getElementsByClassName('confirm_crear_GIF phase2')[0].appendChild(document.createElement(\"button\")).className = \"buton_comenzar capturar\";\r\n document.getElementsByClassName('buton_comenzar capturar')[0].innerHTML = \"Capturar\";\r\n document.getElementsByClassName('capturar')[0].addEventListener('click', record_gif_function);\r\n document.getElementsByClassName('confirm_crear_GIF phase2')[0].appendChild(document.createElement(\"button\")).className = \"buton_comenzar camera\";\r\n document.getElementsByClassName('buton_comenzar camera')[0].appendChild(document.createElement(\"object\")).id = \"camera_object\";\r\n document.getElementById('camera_object').setAttribute(`data`, `./images/camera.svg`);\r\n document.getElementById('camera_object').setAttribute(`type`, `image/svg+xml`);\r\n document.getElementsByClassName('camera')[0].addEventListener('click', record_gif_function);\r\n return document.getElementsByClassName('video')[0];\r\n }", "function record (stream){\n video.srcObject = stream;\n video.play()\n// propiedades del giff\n recorder = RecordRTC(stream, {\n type: 'gif',\n frameRate: 190,\n quality: 30,\n width: 360,\n hidden: 240,\n \n onGifRecordingStarted: function() {\n console.log('started')\n }, // cierro onGifRecordingStarted\n }); // cierro RecordRTC\n\n\n\n \n\n// Empiezo a grabar con el boton de capturar\n document.querySelector(\"#grabar\").addEventListener(\"click\",function(ev){\n tituloescondido.style.display = \"block\";\n titulonoescondido.style.display = \"none\";\n recorder.startRecording();\n console.log(recorder.state);\n empiezareloj = new Date().getTime(); \n tiempoGrabacion();\n\n})\n\n\n// Empiezo con la imagen\nimgcamara.addEventListener(\"click\",function(ev){\n tituloescondido.style.display = \"block\";\n titulonoescondido.style.display = \"none\";\n recorder.startRecording();\n console.log(recorder.state);\n empiezareloj = new Date().getTime(); \n tiempoGrabacion();\n})\n\n\n\nfunction tiempoGrabacion() {\n if (!recorder) {\n return;\n }\n // Cuento cada 1 seg, trate de hacerlo por milesimas pero hace salteos en el tiempo y no queda bien\n tiempo.innerText = reproducirSegundos((new Date().getTime() - empiezareloj) / 1000);\n setTimeout(tiempoGrabacion, 1000); \n}\n\n\n\n // Cuento cada 1 seg, trate de hacerlo por milesimas pero hace salteos en el tiempo y no queda bien\nstop.addEventListener(\"click\", () => { \n recorder.stopRecording(function() {\n videosave.style.display = \"block\";\n video.style.display = \"none\";\n blob = recorder.blob;\n let url = URL.createObjectURL(blob);\n videosave.src = url \n subir.addEventListener(\"click\", subircapptura)\n }) //Final StopRecording\n })//Final Evento Stop\n\n\n\n\niconostop.addEventListener(\"click\", () => { \n recorder.stopRecording(function() {\n videosave.style.display = \"block\";\n video.style.display = \"none\";\n blob = recorder.blob;\n let url = URL.createObjectURL(blob);\n videosave.src = url \n\n subir.addEventListener(\"click\", subircapptura)\n }) //Final StopRecording\n})\n\n\n } // final de la funcion Record", "function getVideo() {\n\tnavigator.mediaDevices.getUserMedia({video: true, audio: false})\n\t\t.then(localMediaStream => {\n\t\t\tconsole.log(localMediaStream);\n\t\t\tvideo.src = window.URL.createObjectURL(localMediaStream);\n\t\t\t//MediaStream is an object and needs to be changed to be a URL\n\t\t\tvideo.play();\n\t\t\t//this updates so that the camera shouldn't just be one frame\n\t\t\t//if inspected, blob is the video being caught\n\t\t})\n\t\t.catch(err => {\n\t\t\tconsole.error(`WELP ERROR`, err);\n\t\t});\n}", "constructor(video, filename = this.#filename, mimeType = this.#mimeType, options = this.#options) {\n this.#video = video;\n this.#filename = filename;\n this.#options = options;\n\n // HTMLVideoElements can stall on slow connections, be paused etc.\n // on chrome i was running into issues with these pauses being recorded\n // added listeners to video events to pause recording when needed\n video.addEventListener('playing', this.#onPlayingEvent);\n video.addEventListener('pause', this.#onPauseEvent);\n video.addEventListener('stalled', this.#onStalledEvent);\n video.addEventListener('ended', this.#onEndedEvent);\n }", "function manifestVideo() {\n return gManifestNavigatorSource.contentDocument.createElement('video');\n}", "function playVideoContent() {\n videoFrame.style.visibility = 'hidden';\n videoFrame.type = contents[contents.index].type;\n videoFrame.src = contents[contents.index].src;\n videoFrame.play();\n videoFrame.style.visibility = 'visible';\n videoFrame.removeAttribute(\"controls\"); \n}", "function takepicture() {\n var context = canvas.getContext('2d');\n console.log(context);\n if (width && height) {\n canvas.width = width;\n canvas.height = height;\n context.drawImage(video, 0, 0, width, height);\n \n var data = canvas.toDataURL('image/png');\n\n\n var content = data;\n\t//content = content.replace('data:image/jpeg;base64,', 'hi');\n\tconsole.log(typeof content)\n\tconsole.log(content);\n\t//salert('adf')\n\tconsole.log('asdfa')\n\t sendFileToCloudVision(content.replace('data:image/png;base64,', ''));\n\n //sendFileToCloudVision(content);\n //console.log(data);\n photo.setAttribute('src', data);\n } else {\n clearphoto();\n }\n }", "function sendVideoMessage(recipientId) {\n var messageData = {\n recipient: {\n id: recipientId\n },\n message: {\n attachment: {\n type: \"video\",\n payload: {\n url: SERVER_URL + \"/assets/allofus480.mov\"\n }\n }\n }\n };\n\n callSendAPI(messageData);\n}", "function GetVideoSentence(){\n\t$('#videoContainer video').remove();\n\tvar text = $('#textToTranslate').val();\n\tvar url_api = ruta + 'video/';\n\tevent.preventDefault();\n\n\tvar data = new FormData();\n\tdata.append(\"Texto\", text)\n\n\tfetch(url_api, {\n\t method: \"POST\",\n\t mode:'cors',\n\t body: data\n\t})\n\t.then(handleErrors)\n\t.then( \n\t\tfunction(response){\n\n\t\t\tif(response.status != 200)\n\t\t\t{\n\t\t\t\tconsole.log('Error: ' + response.status);\n\t\t\t\treturn response.text();\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar url = window.URL || window.webkitURL; \n\t\t\t\tresponse.blob().then(function(video) {\n\t\t\t\t\tvar objectUrl = url.createObjectURL(video);\n\t\t\t\t\t$('body').removeClass('disableGrey');\n\t\t\t\t\t$('#spinner').hide();\n\t\t\t\t\t$('#videoContainer').show();\n\t\t\t\t\t$('#videoContainer').html('<video id=\"video\" class=\"embeb-responsive-item\" autoplay controls><source id=\"source\" src=\"' + objectUrl + '\" type=video/mp4></video>');\t\n\t\t\t\t})\n\t\t\t}\n\t\t\t\n\t\t})\n\t.then(function(body){\n\t\t\t// $('#textoError').text(JSON.parse(body).message);\n\t\t\t// $('body').removeClass('disableGrey');\n\t\t\t// $('#spinner').hide();\n\t\t\t// $('#errorModal').modal('show');\n\t\t}\n\t)\n\t.catch(\n\t\tfunction(error){\n\t\t\tconsole.log(error);\n\t\t});\n\n}", "function feedPlayer(videoArrays, videoSrcData, video, mediaSource, visibleTopLimit = 7){\n\n\tconst containerPn = document.getElementsByClassName('pn')[0];\n\tconst references = document.getElementsByClassName('info-display-references')[0];\n\n\t//when mediaSource is ready to recieve files/video segments\n\tmediaSource.addEventListener('sourceopen', function(){\n\n\t\t//Add files/video segments codec and allow playback order indep. of file's timestamp\n\t const sourceBuffer = mediaSource.addSourceBuffer(videoSrcData.mimeCodec);\n\t sourceBuffer.mode = 'sequence';\n\n\t //Check total files size and alert developers\n\t let totalMBytes = 0;\n\n\t for(let i = 0; i < videoArrays.length; i++){\n\t \ttotalMBytes += videoArrays[i].files.reduce( (running, video) => running + video.buffer.byteLength, 0);\n\t }\n\t\t \n\t\ttotalMBytes = Number((totalMBytes / (1024 * 1024)).toFixed(2)); //size in MB\n\n\t\tif(totalMBytes * 2 > videoSrcData.bufferQuota.size){\n\t\t\tconsole.error(`Files total size (${totalMBytes} MB) will exceed the buffer size \"Pn=n!\" needs to work properly (${Math.round(totalMBytes * 2)} MB). ${videoSrcData.bufferQuota.browser}'s buffer quota is ${videoSrcData.bufferQuota.size}MB. Reduce file sizes or append files in smaller batches (and change the appendBuffer logic!!!)`);\n\t\t}else{\n\t\t\t//simulate Flash buffer empty before loading new squence\n\t\t\tconst updateDisplay = updateDisplayInfo();\n\t\t\tupdateDisplay.buffer('empty');\n\t\t\t\n\t\t\tconst track = video.addTextTrack(\"metadata\");\n\t\t\tnextSequence(videoSrcData, videoArrays, video, sourceBuffer, null, track);\t\t\t\t\t\n\t\t\tcueListener(track, video, sourceBuffer, sequenceData);\n }\n\n \t \tconst sequenceLimitCSS = Number(window.getComputedStyle(document.querySelector('body'),'::before').getPropertyValue('content').replace(/\\\"/g, ''));\n\t\tsequenceData.visible = (sequenceLimitCSS > 0 && sequenceLimitCSS < visibleTopLimit) ? sequenceLimitCSS : visibleTopLimit;\n\n\t containerPn.insertBefore(video, references);\n\n\t});\n\n}", "function defaultVideo() {\n return { data : [ { images : { preview : { mp4 :\n 'https://media2.giphy.com/media/JIX9t2j0ZTN9S/giphy-preview.mp4'\n } } } ] }\n}", "function formatVideoInformation(){\n\t\tconsole.log(\"FUNCTION: formatVideoInformation()\");\n\t\tfor(var x = 0; x < REQUEST_LIMIT/2; x++){\n\t\t\tvar video_url = video_base + video_id[x];\n\t\t\tconsole.log(video_url);\n\t\t\t/*document.getElementById(VIDEO_DOMS[x]).innerHTML += \"<p>\" + video_title[x] +\"</p> <br>\";\n\t\t\tdocument.getElementById(VIDEO_DOMS[x]).innerHTML += \"<p>\" + video_description[x] +\"</p> <br>\";\n\t\t\tdocument.getElementById(VIDEO_DOMS[x]).innerHTML += \"<a href=\" + video_base + video_id[x] + \">\" + \"URL: \" + video_base + video_id[x] + \"</a> <br>\";\n\t\t\tdocument.getElementById(VIDEO_DOMS[x]).innerHTML += \"<img href=\" + video_url + \" src=\" + video_thumb[x] + \"> <br>\";*/\n\t\t\t\n\t\t\t//document.getElementById(IMAGE_CONTAINERS[x]).src = video_thumb[x];\n\t\t\tdocument.querySelector('#'+IMAGE_CONTAINERS[x]).setAttribute('src', video_thumb[x]);\n\t\t\tdocument.querySelector('#'+TITLE_CONTAINERS[x]).setAttribute('value', video_title[x]);\n\t\t\tdocument.querySelector('#'+DESCRIPTION_CONTAINERS[x]).setAttribute('value', video_description[x]);\n\t\t\tdocument.querySelector('#'+HYPERLINK_CONTAINERS[x]).setAttribute('value', video_url);\n\t\t}\t\n\t}", "function addVideo (video) {\n try {\n let videoFrame = document.createElement('iframe')\n videoFrame.setAttribute('id','iFrame');\n videoFrame.height = '600'\n videoFrame.width = '600'\n let divIframe2 = document.querySelector('#divIframe2')\n divIframe2.height = '400'\n divIframe2.width = '400'\n divIframe2.appendChild(videoFrame)\n // Assign a variable to call the return video (line 48)\n let youTube = `https://www.youtube.com/embed/${video.id.videoId}`\n videoFrame.setAttribute('src',youTube)\n let p1 = document.createElement('p'); \n let titleDescrip = video.snippet.description \n p1.textContent = titleDescrip \n divIframe2.appendChild(p1)\n\n } catch (err) {\n console.log(error)\n }\n}", "function createVideoTemplate(data,content){\n content.innerHTML='<p id=\"content-close\">X</p>';\n console.log(\"hey bhaiu\",data);\n const videos=data.results;\n const length=videos.length > 4 ? 4 : videos.length;// 4 return hoganhi to km h to jitne h wo\n // console.log(length);\n const iframeContainer=document.createElement('div');\n \n for(let i=0;i<length;i++){\n const video=videos[i];//video\n const iframe=createIFrame(video);\n iframeContainer.appendChild(iframe);\n content.appendChild(iframeContainer);\n \n }\n }", "function welUitgewerkt() {\r\n omschakelen();\r\n filmpje.removeAttribute('src');\r\n video.load();\r\n filmpje = document.createElement('source');\r\n\r\n if (stap == \"boven-of-beneden\") {\r\n filmpje.src = 'videos/3+4.mp4';\r\n stap = 'naar-binnen-of-niet';\r\n knop1.textContent = 'Ga terug. W.I.P';\r\n knop2.textContent = 'Ga naar binnen.';\r\n\r\n\r\n } else if (stap == \"naar-binnen-of-niet\") {\r\n filmpje.src = 'videos/5+6.mp4';\r\n stap = 'zwaard-of-pistool';\r\n knop1.textContent = 'Pak het zwaard.';\r\n knop2.textContent = 'Pak het pistool. W.I.P';\r\n\r\n\r\n } else if (stap == \"zwaard-of-pistool\") {\r\n filmpje.src = 'videos/7+8.mp4';\r\n stap = 'terug-of-naar-rechts';\r\n knop1.textContent = 'Zoek verder. W.I.P';\r\n knop2.textContent = 'Ga naar links';\r\n\r\n } else if (stap == \"terug-of-naar-rechts\") {\r\n filmpje.src = 'videos/9+10.mp4';\r\n stap = 'boven-of-beneden-zwaard';\r\n knop1.textContent = 'Zoek boven verder. W.I.P';\r\n knop2.textContent = 'Ga naar beneden';\r\n\r\n } else if (stap == \"boven-of-beneden-zwaard\") {\r\n filmpje.src = 'videos/11+12.mp4';\r\n stap = 'steken-of-stilstaan';\r\n knop1.textContent = 'Val het aan!';\r\n knop2.textContent = 'Blijf stilstaan. W.I.P';\r\n\r\n\r\n } else if (stap == \"steken-of-stilstaan\") {\r\n filmpje.src = 'videos/13.mp4';\r\n stap = 'dood';\r\n }\r\n\r\n filmpje.type = 'video/mp4';\r\n video.appendChild(filmpje);\r\n video.play();\r\n}", "function arrVideo(name, emotions, times) {\n this.name = name;\n this.emotions = emotions;\n this.times = times;\n}", "function arrVideo(name, emotions, times) {\n this.name = name;\n this.emotions = emotions;\n this.times = times;\n}", "function RenderTitleImageOrVideo(path, color){\n var parent = $(\"#title-shower\");\n\n var filename = path.split('/').pop();\n var extension = filename.split('.').pop();\n\n /* Render image */\n if(extension.toLowerCase() == \"jpg\" ||\n extension.toLowerCase() == \"png\" ){\n $(parent).css({\n \"background\":\"url('\" + path + \"')\",\n \"height\": \"100vh\",\n \"background-repeat\": \"no-repeat\",\n \"background-position\": \"center\",\n \"background-size\": \"cover\",\n \"filter\": \"brightness(90%)\",\n \"background-attachment\": \"fixed\"\n });\n }\n /* Render video */\n if(extension.toLowerCase() == \"mp4\"){\n\n $(parent).replaceWith(\"<video id='title-shower' autoplay></video>\");\n\n parent = $(\"#title-shower\");\n\n $(parent).css({\n \"height\": \"100vh\",\n \"background-color\": color,\n \"background-repeat\": \"no-repeat\",\n \"background-position\": \"center\",\n \"background-size\": \"cover\",\n \"filter\": \"brightness(90%)\",\n \"background-attachment\": \"fixed\"\n });\n\n var sourceElement = document.createElement(\"source\");\n\n $(parent).attr(\"width\", \"100%\");\n $(parent).attr(\"height\", \"100%\");\n\n $(sourceElement).attr(\"src\", path);\n $(sourceElement).attr(\"type\", \"video/\" + extension.toLowerCase());\n\n $(parent).append(sourceElement);\n\n $(parent).attr(\"loop\", \"loop\");\n }\n}", "function mainVideo(id) {\n $('#video').html(`\n <iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/${id}?rel=0&modestbranding=1&autohide=1&mute=1&showinfo=0&controls=0&autoplay=1\" frameborder=\"0\" allow=\"accelerometer; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n `);\n }", "generateVideo( video ) {\n // Add video for trailer to page by embedding it\n const showVideo = document.getElementById( \"movieTrailer\" );\n const youtube = showVideo;\n const videoId = video;\n\n // Find YouTube thumbnail using given id\n const img = document.createElement( \"img\" );\n img.setAttribute( \"src\", \"http://i.ytimg.com/vi/\"\n + videoId + \"/hqdefault.jpg\" );\n img.setAttribute( \"class\", \"thumb\" );\n\n\n // Overlay the Play icon to make it look like a video player\n const circle = document.createElement( \"div\" );\n circle.setAttribute( \"class\",\"circle\" );\n\n youtube.appendChild( img );\n youtube.appendChild( circle );\n\n // Attach an onclick event to the YouTube Thumbnail\n youtube.onclick = function() {\n // Create an iFrame with autoplay set to true\n const iframe = document.createElement( \"iframe\" );\n iframe.setAttribute( \"src\",\n \"https://www.youtube.com/embed/\" + videoId\n + \"?autoplay=1&autohide=1&border=0&wmode=opaque&enablejsapi=1\" );\n\n // The height and width of the iFrame should be the same as parent\n iframe.style.width = this.style.width;\n iframe.style.height = this.style.height;\n\n // Replace the YouTube thumbnail with YouTube HTML5 Player\n this.parentNode.replaceChild( iframe, this ); \n }\n }", "function paintToCanvas() {\n // get the width and height of the actual live feed video\n const width = video.videoWidth;\n const height = video.videoHeight;\n\n // set canvas width and height to be the same as the live feed video\n canvas.width = width;\n canvas.height = height;\n\n // every 16ms, take the image from the webcam and put it into the canvas\n return setInterval(() => {\n ctx.drawImage(video, 0, 0, width, height);\n\n // take the pixels out\n let pixels = ctx.getImageData(0, 0, width, height);\n\n // mess with them\n // pixels = redEffect(pixels);\n\n // pixels = redSplit(pixels);\n // ctx.globalAlpha = 0.8;\n\n pixels = greenScreen(pixels);\n\n // put them back\n ctx.putImageData(pixels, 0, 0);\n }, 16);\n}", "function handleVideo(stream) {\n\t\tvar url = window.URL.createObjectURL(stream);\n\t videoElem.src = url;\n\t}", "function getVideoLink(item) {\n var videoID = item.id.videoId;\n var thumb = item.snippet.thumbnails.high.url;\n //build output string\n var output = '<iframe auto src=\"https://youtube.com/embed/' + videoID + '?rel=0\"></iframe>' + '<div class=\"clearfix\"></div>' + '';\n return output;\n }", "async function videoMediaStream() {\n try {\n const mediaStream = await navigator.mediaDevices.getDisplayMedia();\n videoElement.srcObject = mediaStream;\n videoElement.onloadedmetadata = () => {\n videoElement.play();\n }\n } catch (error) {\n //Error\n }\n}", "function videoStarter() {\n\n\t$('#hero').vide({\n\t\tmp4:'videos/headerloop4.mp4',\n\t\togv:'videos/headerloop4.ogv',\n\t\twebm:'videos/headerloop4.webm'\n\t\t}, {\n\t\tloop: true,\n\t\tmuted: true,\n\t\tautoplay: true,\n\t\tposterType: \"jpg\",\n\t\tclassName: \"tn-video\"\n\t});\n\n}", "function receiveStream(stream,elemid){\n\n var video=document.getElementById(elemid);\n\n video.srcObject=stream;\n\n window.peer_stream=stream;\n\n}", "function makeFrames(){\n console.log(\"Splitting Video Frames\".green);\n var p = spawn(\"ffmpeg\", [\"-i\", input, Path.join(tmp,outputLocation, \"raw\", \"frame.%4d.png\")])\n .progress(function (childProcess) {\n // console.log('[spawn] childProcess.pid: ', childProcess.pid);\n childProcess.stdout.on('data', function (data) {\n console.log('[spawn ffmpeg] stdout: ', data.toString());\n });\n childProcess.stderr.on('data', function (data) {\n //console.log('[spawn ffmpeg] stderr: ', data.toString());\n });\n })\n .fail(function (err) {\n console.error('[spawn ffmpeg] ERROR: '.red, err);\n });\n return p;\n}", "function copy() {\r\n var eName = encodeURIComponent(document.getElementById(\"naam\").value);\r\n var eStad = encodeURIComponent(document.getElementById(\"stad\").value); \r\n var copyText = \"https://erasmushogeschoolb0zz0v.hippovideo.io/video/embed/x9uNnABZNWoMho7_aGO-c1wn8jZJY7-zfRzKW55xzUQ?Email=outro%40erasmus.com&First%20Name=\" + eName +\"&City=\" + eStad +\"&utm_source=hv-campaigns&hreferer=private&_=1592511058592&;\";\r\n var el = document.createElement('textarea');\r\n el.value = copyText;\r\n el.setAttribute('readonly', '');\r\n el.style = {\r\n position: 'absolute',\r\n left: '-9999px'\r\n };\r\n document.body.appendChild(el);\r\n el.select();\r\n document.execCommand('copy');\r\n document.body.removeChild(el);\r\n}", "function loadMyMedia(stream) {\n\n console.log(\"Access granted to audio / video\");\n document.body.style.backgroundImage = \"none\";\n getId(\"loadingDiv\").style.display = \"none\";\n\n myMediaStream = stream;\n\n const videoWrap = document.createElement(\"div\");\n\n // my peer name video audio status\n const myHeader = document.createElement(\"div\");\n const myCallTimeImg = document.createElement(\"i\");\n const myCallTime = document.createElement(\"p\");\n const myInfoImg = document.createElement(\"i\");\n const myInfo = document.createElement(\"h4\");\n const myHandStatusIcon = document.createElement(\"button\");\n const myVideoStatusIcon = document.createElement(\"button\");\n const myAudioStatusIcon = document.createElement(\"button\");\n const myVideoImg = document.createElement(\"img\");\n\n // header\n myHeader.setAttribute(\"id\", \"myHeader\");\n myHeader.className = \"header\";\n // time\n myCallTimeImg.setAttribute(\"id\", \"callTimeImg\");\n myCallTimeImg.className = \"fas fa-clock\";\n myCallTime.setAttribute(\"id\", \"callTime\");\n tippy(myCallTime, { content: \"Session Time\", });\n // my name\n myInfoImg.setAttribute(\"id\", \"myInfoImg\");\n myInfoImg.className = \"fas fa-user\";\n myInfo.setAttribute(\"id\", \"myInfo\");\n myInfo.className = \"videoPeerName\";\n tippy(myInfo, { content: \"My name\", });\n // my hand status \n myHandStatusIcon.setAttribute(\"id\", \"myHandStatusIcon\");\n myHandStatusIcon.className = \"fas fa-hand-paper\";\n myHandStatusIcon.style.setProperty(\"color\", \"#9477CB\");\n tippy(myHandStatusIcon, { content: \"Raised\", });\n // my video status \n myVideoStatusIcon.setAttribute(\"id\", \"myVideoStatusIcon\");\n myVideoStatusIcon.className = \"fas fa-video\";\n tippy(myVideoStatusIcon, { content: \"On\", });\n // my audio status \n myAudioStatusIcon.setAttribute(\"id\", \"myAudioStatusIcon\");\n myAudioStatusIcon.className = \"fas fa-microphone\";\n tippy(myAudioStatusIcon, { content: \"On\", });\n // my video image\n myVideoImg.setAttribute(\"id\", \"myVideoImg\");\n myVideoImg.className = \"videoImg\";\n\n // add elements to myHeader div\n myHeader.appendChild(myCallTimeImg);\n myHeader.appendChild(myCallTime);\n myHeader.appendChild(myInfoImg);\n myHeader.appendChild(myInfo);\n myHeader.appendChild(myVideoStatusIcon);\n myHeader.appendChild(myAudioStatusIcon);\n myHeader.appendChild(myHandStatusIcon);\n // add elements to video wrap div\n videoWrap.appendChild(myHeader);\n videoWrap.appendChild(myVideoImg);\n\n // hand display none on default menad is raised == false\n myHandStatusIcon.style.display = \"none\";\n\n const myMedia = document.createElement(\"video\");\n videoWrap.className = \"video\";\n videoWrap.setAttribute(\"id\", \"myVideoWrap\");\n videoWrap.appendChild(myMedia);\n myMedia.setAttribute(\"id\", \"myVideo\");\n myMedia.setAttribute(\"playsinline\", true);\n myMedia.className = \"mirror\";\n myMedia.autoplay = true;\n myMedia.muted = true;\n myMedia.volume = 0;\n myMedia.controls = false;\n document.body.appendChild(videoWrap);\n\n // attachMediaStream is a part of the adapter.js library\n attachMediaStream(myMedia, myMediaStream);\n setVideos();\n setElements();\n setUsersBtn();\n setAudioBtn();\n setVideoBtn();\n setChatRoomBtn();\n setMyHandBtn();\n setMoreBtn();\n setLeaveRoomBtn();\n showBottomButtonsAndHeader();\n onMouseMove();\n setShareRoomBtn();\n setScreenShareBtn();\n setRecordStreamBtn();\n setFileShareBtn();\n setMuteEveryoneBtn();\n setHideEveryoneBtn();\n calculateCallTime();\n fullScreenVideoPlayer(\"myVideo\"); // full screen mode\n}", "function reproductor(video0,video, video2,video3,video4,video6,video7,video8,video9,video10){\n\n\tvideo6.style.opacity = \"0\";\n\tvideo7.style.opacity = \"0\";\n\tvideo8.style.opacity = \"0\";\n\tvideo9.style.opacity = \"0\";\n\tvideo10.style.opacity = \"0\";\n\n\tvideo0.load();\n\tvideo.load();\n\tvideo2.load();\n\tvideo3.load();\n\tvideo4.load();\n\t\n\n\tvideo.addEventListener('loadeddata', function() {\n\t\tvideo0.currentTime = 0;\n\t\tvideo0.play();\n\n\t\tvideo.currentTime = 0;\n\t\tvideo.style.opacity = \"1\";\n\t\tvideo.play();\n\n\t\tvideo2.currentTime = 0;\n\t\tvideo2.style.opacity = \"1\";\n\t\tvideo2.play(); \n\n\t\t\n\t\tvideo3.currentTime = 0;\n\t\tvideo3.style.opacity = \"1\";\n\t\tvideo3.play();\n\n\t\n\t\tvideo4.currentTime = 0;\n\t\tvideo4.style.opacity = \"1\";\n\t\tvideo4.play();\t })\t\t\t\t\n\n\tvar i = 0;\n\tvar x = 0;\n\tvar y = 0;\n\tvar z = 0;\n\tvar v = 0;\n\tvar w = 0;\n\tvar times=0;\n\tvar cadena=0;\n\n\tvideo.onended = function() {\t\t\n\t\tif (i < times){\n\t\t\ti++;\n\t\t\tvideo.play(); \n\t\t}else{ \n\t\t\tvideo.style.opacity = \"0\";\n\t\t\tvideo2.style.opacity = \"0\";\n\t\t\tvideo3.style.opacity = \"0\";\n\t\t\tvideo4.style.opacity = \"0\";\n\n\t\t\t\n\t\t\tvideo6.load();\n\t\t\tvideo7.load();\n\t\n\t\t\tvideo6.currentTime = 0;\n\t\t\tvideo6.style.opacity = \"1\";\n\t\t\tvideo6.play()\n\n\t\t\tvideo7.currentTime = 0;\n\t\t\tvideo7.style.opacity = \"1\";\n\t\t\tvideo7.play()\n\t\n\t\t}\n\t};\n\tvideo7.onended = function() {\n\t\tvideo7.currentTime = 0;\n\t\tvideo6.currentTime = 0;\n\t\tvideo6.style.opacity = \"0\";\n\t\tvideo7.style.opacity = \"0\";\n\n\t\tvideo8.load();\t\n\t\tvideo8.currentTime = 0;\n\t\tvideo8.style.opacity = \"1\";\n\t\tvideo8.play()\n\n\t\t\t\n\t};\n\tvideo8.onended = function() {\n\t\tvideo8.currentTime = 0;\n\t\tvideo8.style.opacity = \"0\";\n\n\t\tvideo10.load();\t\n\t\tvideo10.currentTime = 0;\n\t\tvideo10.style.opacity = \"1\";\n\t\tvideo10.play()\t\n\t};\n\tvideo9.onended = function() {\n\t\tvideo9.currentTime = 0;\n\t\tvideo9.style.opacity = \"0\";\n\n\t\tvideo10.load();\t\n\t\tvideo10.currentTime = 0;\n\t\tvideo10.style.opacity = \"1\";\n\t\tvideo10.play()\t\t\n\t};\n\tvideo10.onended = function() {\n\t\tvideo10.currentTime = 0;\n\t\tvideo10.style.opacity = \"0\";\n\t};\n\n\tvideo.onerror = function() {\n\t\talert(\"Chrome blocks Shia on this page:( Try on another one!\");\n\t};\n}", "function sendVideoMessage(recipientId) {\n var messageData = {\n recipient: {\n id: recipientId\n },\n message: {\n attachment: {\n type: \"video\",\n payload: {\n url: SERVER_URL + \"/assets/allofus480.mov\"\n }\n }\n }\n };\n\n callSendAPI(messageData);\n}", "function sendVideoMessage(recipientId) {\n var messageData = {\n recipient: {\n id: recipientId\n },\n message: {\n attachment: {\n type: \"video\",\n payload: {\n url: SERVER_URL + \"/assets/allofus480.mov\"\n }\n }\n }\n };\n\n callSendAPI(messageData);\n}", "function downloadVideo(url) {\n var video = youtubedl(url, ['--format=22/17/18'], {\n cwd: __dirname\n })\n video.on('info', function(info) {\n video.pipe(fs.createWriteStream(info.title + '.mp4'))\n })\n}" ]
[ "0.6566566", "0.6302902", "0.6218157", "0.6053233", "0.6029902", "0.5943593", "0.5885158", "0.58656824", "0.5847874", "0.5843263", "0.5823236", "0.5821692", "0.57712317", "0.5728013", "0.5727365", "0.57139486", "0.56872654", "0.56702375", "0.5642739", "0.5642739", "0.5626808", "0.56128305", "0.55846226", "0.55843645", "0.5582708", "0.5556033", "0.5552508", "0.55494726", "0.55363756", "0.5511297", "0.5508997", "0.54926825", "0.5489394", "0.547743", "0.5476957", "0.5473055", "0.54720336", "0.546902", "0.5448224", "0.54451", "0.5442819", "0.54355454", "0.54348624", "0.54340935", "0.5433301", "0.54303116", "0.5421423", "0.54111046", "0.54062074", "0.538507", "0.53735626", "0.53653747", "0.53652745", "0.5354889", "0.5353412", "0.5351341", "0.534127", "0.53408957", "0.5339346", "0.5337541", "0.53341836", "0.53290975", "0.53270054", "0.5326842", "0.5326675", "0.5316376", "0.53138185", "0.5301847", "0.53006464", "0.52953905", "0.52924794", "0.52904403", "0.5287751", "0.5282449", "0.5282268", "0.5280716", "0.52778447", "0.5264661", "0.5261626", "0.52567065", "0.52469486", "0.52424264", "0.5240512", "0.52387834", "0.52387834", "0.5238016", "0.52330923", "0.5231397", "0.5230316", "0.5228706", "0.5226626", "0.5225569", "0.5221174", "0.5217865", "0.52165717", "0.5208975", "0.5194673", "0.5190768", "0.51862764", "0.51862764", "0.51784986" ]
0.0
-1
Convert numbers to strings of floats so GLSL doesn't barf on "1" instead of "1.0"
function glslifyNumber (n) { return n === (n | 0) ? n + '.0' : n + ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flow_ecma_string_of_float(num) {\n return caml_new_string(caml_js_from_float(num).toString());\n}", "function float32String(v) {\n return Math.abs(v) > 1e-37 ? v : 0;\n } // Create matrix array for looping", "function float32String(v) {\n return Math.abs(v) > 1e-37 ? v : 0\n}", "function float32String(v) {\n return Math.abs(v) > 1e-37 ? v : 0;\n } // Create matrix array for looping", "function float32String(v) {\n return Math.abs(v) > 1e-37 ? v : 0;\n }", "function flow_shortest_string_of_float(num) {\n // TODO: shorten string (drop +, leading 0, shift ., etc)\n return caml_new_string(caml_js_from_float(num).toString());\n}", "function float(num) {\n return num * 0.1 * 10;\n}", "function float32String(v){return Math.abs(v)>1e-37?v:0;}// Create matrix array for looping", "function float32String(v){return Math.abs(v)>1e-37?v:0;}// Create matrix array for looping", "function fs() {\n return \"\\n precision highp float;\\n uniform sampler2D uSampler;\\n varying vec4 vColor;\\n varying vec2 vTexCoord;\\n void main(void) {\\n vec4 color = texture2D( uSampler, vec2( vTexCoord.s, vTexCoord.t ) ) * vec4( vColor.rgb, 1.0 );\\n \\tif ( color.a < 0.1 ) discard;\\n \\tgl_FragColor = vec4( color.rgb, vColor.a );\\n }\\n\";\n}", "function flow_g_fmt(num) {\n // TODO: shorten string\n return caml_new_string(caml_js_from_float(num).toString());\n}", "function floatFmt(value) { //# str(float)\r\n\tvar precision = 1; //#\r\n\tvar power = Math.pow(10, precision || 0); //#\r\n\treturn String(Math.round(value * power) / power); //#\r\n} //#", "function numToFloat(num)\n{\n\tif(num == \"\")\n\t\tnum = \"0.0\";\n\t\t\n\tif(isNaN(num))\n\t{\n\t\tdebug(num+\"Ϊ֣...\");\n\t\treturn \"\";\t\n\t}\n\tvar rule = \"^(-?\\\\d+)(\\\\.\\\\d+)$\";\n\tvar result = num.match(rule);\n\tif(null == result){\n\t\tnum += \".0\"\n\t}\n\treturn num;\n}", "function toCfloat(n) {\n\tlet s = (+n).toString();\n\t// add point if needed:\n\tif (s.includes(\"e\")) {\n\t\treturn s;\n\t} else if (s.includes(\".\")) {\n\t\treturn s + \"f\";\n\t} else {\n\t\treturn s + \".f\";\n\t}\n}", "toFloat(value){\n return parseFloat(value.replace(/,/g, ''));\n }", "function StringToFloat(str){\n if (str.length==0){\n return 0;\n }\n try {\n return parseFloat(desformatnum (str));\n }\n catch(e){\n }\n return 0;\n}", "enterFloatLiteral(ctx) {\n }", "function float(v) {\n\treturn v ? parseFloat(v.toString().replace(/[^\\d.-]/g, '')) || 0 : 0;\n}", "function Fmt(x) { \n var v\n if(x>0) { v=''+(x+0.00000001) } else { v=''+(x-0.00000000) };\n return v.substring(0,v.indexOf('.')+8)\n}", "function arrayStringToFloat(table) {\n data = [];\n for (i = 0; i < table.length; i++) {\n table[i] = table[i].replace(\",\", \".\");\n data.push(table[i]);\n }\n return data;\n}", "function _processGLSL(str, inputs, textureSlot) {\n return str\n .replace(/%\\d/g, function (s) {\n return _makeLabel(inputs[s[1]-1]);\n })\n .replace(/\\$TEXTURE/, 'u_textures[' + textureSlot + ']');\n}", "function finiteNumberString() {\n var finiteNumberDelegate = number_1.finiteNumber();\n return operator_1.pipe(floatingPointFormatString(), function (name, str) {\n return finiteNumberDelegate(\"parseFloat(\" + name + \")\", parseFloat(str)).toString();\n });\n}", "function paramThreeToGL ( p ) {\n\n\t\tvar extension;\n\n\t\tif ( p === THREE.RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === THREE.ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === THREE.MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === THREE.NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === THREE.NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === THREE.NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === THREE.LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === THREE.LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === THREE.LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === THREE.UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === THREE.UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === THREE.UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === THREE.UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === THREE.ByteType ) return _gl.BYTE;\n\t\tif ( p === THREE.ShortType ) return _gl.SHORT;\n\t\tif ( p === THREE.UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === THREE.IntType ) return _gl.INT;\n\t\tif ( p === THREE.UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === THREE.FloatType ) return _gl.FLOAT;\n\n\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.HalfFloatType ) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif ( p === THREE.AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === THREE.RGBFormat ) return _gl.RGB;\n\t\tif ( p === THREE.RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === THREE.LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === THREE.LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\n\t\tif ( p === THREE.AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === THREE.SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === THREE.ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === THREE.ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === THREE.OneFactor ) return _gl.ONE;\n\t\tif ( p === THREE.SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === THREE.OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === THREE.SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === THREE.OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === THREE.DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === THREE.OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === THREE.DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === THREE.OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === THREE.SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t}\n\n\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\tif ( p === THREE.RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\tif ( p === THREE.RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\tif ( p === THREE.RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t}\n\n\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.MinEquation ) return extension.MIN_EXT;\n\t\t\tif ( p === THREE.MaxEquation ) return extension.MAX_EXT;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function paramThreeToGL ( p ) {\n\n\t\tvar extension;\n\n\t\tif ( p === THREE.RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === THREE.ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === THREE.MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === THREE.NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === THREE.NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === THREE.NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === THREE.LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === THREE.LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === THREE.LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === THREE.UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === THREE.UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === THREE.UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === THREE.UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === THREE.ByteType ) return _gl.BYTE;\n\t\tif ( p === THREE.ShortType ) return _gl.SHORT;\n\t\tif ( p === THREE.UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === THREE.IntType ) return _gl.INT;\n\t\tif ( p === THREE.UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === THREE.FloatType ) return _gl.FLOAT;\n\n\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.HalfFloatType ) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif ( p === THREE.AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === THREE.RGBFormat ) return _gl.RGB;\n\t\tif ( p === THREE.RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === THREE.LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === THREE.LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\tif ( p === THREE.DepthFormat ) return _gl.DEPTH_COMPONENT;\n\n\t\tif ( p === THREE.AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === THREE.SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === THREE.ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === THREE.ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === THREE.OneFactor ) return _gl.ONE;\n\t\tif ( p === THREE.SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === THREE.OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === THREE.SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === THREE.OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === THREE.DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === THREE.OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === THREE.DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === THREE.OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === THREE.SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t}\n\n\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\tif ( p === THREE.RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\tif ( p === THREE.RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\tif ( p === THREE.RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t}\n\n\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.RGB_ETC1_Format ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t}\n\n\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.MinEquation ) return extension.MIN_EXT;\n\t\t\tif ( p === THREE.MaxEquation ) return extension.MAX_EXT;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function paramThreeToGL ( p ) {\n\n\t\tvar extension;\n\n\t\tif ( p === THREE.RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === THREE.ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === THREE.MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === THREE.NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === THREE.NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === THREE.NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === THREE.LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === THREE.LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === THREE.LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === THREE.UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === THREE.UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === THREE.UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === THREE.UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === THREE.ByteType ) return _gl.BYTE;\n\t\tif ( p === THREE.ShortType ) return _gl.SHORT;\n\t\tif ( p === THREE.UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === THREE.IntType ) return _gl.INT;\n\t\tif ( p === THREE.UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === THREE.FloatType ) return _gl.FLOAT;\n\n\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.HalfFloatType ) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif ( p === THREE.AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === THREE.RGBFormat ) return _gl.RGB;\n\t\tif ( p === THREE.RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === THREE.LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === THREE.LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\tif ( p === THREE.DepthFormat ) return _gl.DEPTH_COMPONENT;\n\n\t\tif ( p === THREE.AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === THREE.SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === THREE.ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === THREE.ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === THREE.OneFactor ) return _gl.ONE;\n\t\tif ( p === THREE.SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === THREE.OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === THREE.SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === THREE.OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === THREE.DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === THREE.OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === THREE.DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === THREE.OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === THREE.SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t}\n\n\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\tif ( p === THREE.RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\tif ( p === THREE.RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\tif ( p === THREE.RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t}\n\n\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.RGB_ETC1_Format ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t}\n\n\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.MinEquation ) return extension.MIN_EXT;\n\t\t\tif ( p === THREE.MaxEquation ) return extension.MAX_EXT;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function paramThreeToGL ( p ) {\n\n\t\tvar extension;\n\n\t\tif ( p === THREE.RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === THREE.ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === THREE.MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === THREE.NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === THREE.NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === THREE.NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === THREE.LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === THREE.LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === THREE.LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === THREE.UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === THREE.UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === THREE.UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === THREE.UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === THREE.ByteType ) return _gl.BYTE;\n\t\tif ( p === THREE.ShortType ) return _gl.SHORT;\n\t\tif ( p === THREE.UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === THREE.IntType ) return _gl.INT;\n\t\tif ( p === THREE.UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === THREE.FloatType ) return _gl.FLOAT;\n\n\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.HalfFloatType ) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif ( p === THREE.AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === THREE.RGBFormat ) return _gl.RGB;\n\t\tif ( p === THREE.RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === THREE.LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === THREE.LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\n\t\tif ( p === THREE.AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === THREE.SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === THREE.ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === THREE.ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === THREE.OneFactor ) return _gl.ONE;\n\t\tif ( p === THREE.SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === THREE.OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === THREE.SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === THREE.OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === THREE.DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === THREE.OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === THREE.DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === THREE.OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === THREE.SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t}\n\n\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\tif ( p === THREE.RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\tif ( p === THREE.RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\tif ( p === THREE.RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t}\n\n\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tif ( p === THREE.MinEquation ) return extension.MIN_EXT;\n\t\t\tif ( p === THREE.MaxEquation ) return extension.MAX_EXT;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function formatFloat(num,js) {\n var originalValue=num; \n var p = match(num,\"[.]\"); var d = \"0\"; if (p >= 0) { d = num.substring(p+1,num.length+1); num = num.substring(0,p); }\n if ((num == \"\") || (isNaN(num))) num = \"0\";\n if ((d == \"\") || (isNaN(d))) d = \"0\"; \n d = \"\" + (parseFloat(\"0.\"+d)+Math.pow(0.1,10)); \n var newNum=parseInt(num,10); \n var numStr=\"\";\n if((originalValue>-1) && (originalValue<0))\n {\n numStr=\"-\" + newNum; \n }\n else\n {\n numStr=newNum; \n }\n var result=(numStr+ \".\" + d.substring(2,2+js)); \n return result; \n}", "function paramThreeToGL ( p ) {\r\n\r\n\t\t\tvar extension;\r\n\r\n\t\t\tif ( p === THREE.RepeatWrapping ) return _gl.REPEAT;\r\n\t\t\tif ( p === THREE.ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\r\n\t\t\tif ( p === THREE.MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\r\n\r\n\t\t\tif ( p === THREE.NearestFilter ) return _gl.NEAREST;\r\n\t\t\tif ( p === THREE.NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\r\n\t\t\tif ( p === THREE.NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\r\n\r\n\t\t\tif ( p === THREE.LinearFilter ) return _gl.LINEAR;\r\n\t\t\tif ( p === THREE.LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\r\n\t\t\tif ( p === THREE.LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\r\n\r\n\t\t\tif ( p === THREE.UnsignedByteType ) return _gl.UNSIGNED_BYTE;\r\n\t\t\tif ( p === THREE.UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\r\n\t\t\tif ( p === THREE.UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\r\n\t\t\tif ( p === THREE.UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\r\n\r\n\t\t\tif ( p === THREE.ByteType ) return _gl.BYTE;\r\n\t\t\tif ( p === THREE.ShortType ) return _gl.SHORT;\r\n\t\t\tif ( p === THREE.UnsignedShortType ) return _gl.UNSIGNED_SHORT;\r\n\t\t\tif ( p === THREE.IntType ) return _gl.INT;\r\n\t\t\tif ( p === THREE.UnsignedIntType ) return _gl.UNSIGNED_INT;\r\n\t\t\tif ( p === THREE.FloatType ) return _gl.FLOAT;\r\n\r\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\r\n\r\n\t\t\tif ( extension !== null ) {\r\n\r\n\t\t\t\tif ( p === THREE.HalfFloatType ) return extension.HALF_FLOAT_OES;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif ( p === THREE.AlphaFormat ) return _gl.ALPHA;\r\n\t\t\tif ( p === THREE.RGBFormat ) return _gl.RGB;\r\n\t\t\tif ( p === THREE.RGBAFormat ) return _gl.RGBA;\r\n\t\t\tif ( p === THREE.LuminanceFormat ) return _gl.LUMINANCE;\r\n\t\t\tif ( p === THREE.LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\r\n\r\n\t\t\tif ( p === THREE.AddEquation ) return _gl.FUNC_ADD;\r\n\t\t\tif ( p === THREE.SubtractEquation ) return _gl.FUNC_SUBTRACT;\r\n\t\t\tif ( p === THREE.ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\r\n\r\n\t\t\tif ( p === THREE.ZeroFactor ) return _gl.ZERO;\r\n\t\t\tif ( p === THREE.OneFactor ) return _gl.ONE;\r\n\t\t\tif ( p === THREE.SrcColorFactor ) return _gl.SRC_COLOR;\r\n\t\t\tif ( p === THREE.OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\r\n\t\t\tif ( p === THREE.SrcAlphaFactor ) return _gl.SRC_ALPHA;\r\n\t\t\tif ( p === THREE.OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\r\n\t\t\tif ( p === THREE.DstAlphaFactor ) return _gl.DST_ALPHA;\r\n\t\t\tif ( p === THREE.OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\r\n\r\n\t\t\tif ( p === THREE.DstColorFactor ) return _gl.DST_COLOR;\r\n\t\t\tif ( p === THREE.OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\r\n\t\t\tif ( p === THREE.SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\r\n\r\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\r\n\r\n\t\t\tif ( extension !== null ) {\r\n\r\n\t\t\t\tif ( p === THREE.RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\r\n\t\t\t\tif ( p === THREE.RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\r\n\t\t\t\tif ( p === THREE.RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\r\n\t\t\t\tif ( p === THREE.RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\r\n\r\n\t\t\t}\r\n\r\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\r\n\r\n\t\t\tif ( extension !== null ) {\r\n\r\n\t\t\t\tif ( p === THREE.RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\r\n\t\t\t\tif ( p === THREE.RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\r\n\t\t\t\tif ( p === THREE.RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\r\n\t\t\t\tif ( p === THREE.RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\r\n\r\n\t\t\t}\r\n\r\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\r\n\r\n\t\t\tif ( extension !== null ) {\r\n\r\n\t\t\t\tif ( p === THREE.RGB_ETC1_Format ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\r\n\r\n\t\t\t}\r\n\r\n\t\t\textension = extensions.get( 'EXT_blend_minmax' );\r\n\r\n\t\t\tif ( extension !== null ) {\r\n\r\n\t\t\t\tif ( p === THREE.MinEquation ) return extension.MIN_EXT;\r\n\t\t\t\tif ( p === THREE.MaxEquation ) return extension.MAX_EXT;\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn 0;\r\n\r\n\t\t}", "function paramThreeToGL ( p ) {\r\n\r\n\t\tvar extension;\r\n\r\n\t\tif ( p === THREE.RepeatWrapping ) return _gl.REPEAT;\r\n\t\tif ( p === THREE.ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\r\n\t\tif ( p === THREE.MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\r\n\r\n\t\tif ( p === THREE.NearestFilter ) return _gl.NEAREST;\r\n\t\tif ( p === THREE.NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\r\n\t\tif ( p === THREE.NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\r\n\r\n\t\tif ( p === THREE.LinearFilter ) return _gl.LINEAR;\r\n\t\tif ( p === THREE.LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\r\n\t\tif ( p === THREE.LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\r\n\r\n\t\tif ( p === THREE.UnsignedByteType ) return _gl.UNSIGNED_BYTE;\r\n\t\tif ( p === THREE.UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\r\n\t\tif ( p === THREE.UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\r\n\t\tif ( p === THREE.UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\r\n\r\n\t\tif ( p === THREE.ByteType ) return _gl.BYTE;\r\n\t\tif ( p === THREE.ShortType ) return _gl.SHORT;\r\n\t\tif ( p === THREE.UnsignedShortType ) return _gl.UNSIGNED_SHORT;\r\n\t\tif ( p === THREE.IntType ) return _gl.INT;\r\n\t\tif ( p === THREE.UnsignedIntType ) return _gl.UNSIGNED_INT;\r\n\t\tif ( p === THREE.FloatType ) return _gl.FLOAT;\r\n\r\n\t\textension = extensions.get( 'OES_texture_half_float' );\r\n\r\n\t\tif ( extension !== null ) {\r\n\r\n\t\t\tif ( p === THREE.HalfFloatType ) return extension.HALF_FLOAT_OES;\r\n\r\n\t\t}\r\n\r\n\t\tif ( p === THREE.AlphaFormat ) return _gl.ALPHA;\r\n\t\tif ( p === THREE.RGBFormat ) return _gl.RGB;\r\n\t\tif ( p === THREE.RGBAFormat ) return _gl.RGBA;\r\n\t\tif ( p === THREE.LuminanceFormat ) return _gl.LUMINANCE;\r\n\t\tif ( p === THREE.LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\r\n\r\n\t\tif ( p === THREE.AddEquation ) return _gl.FUNC_ADD;\r\n\t\tif ( p === THREE.SubtractEquation ) return _gl.FUNC_SUBTRACT;\r\n\t\tif ( p === THREE.ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\r\n\r\n\t\tif ( p === THREE.ZeroFactor ) return _gl.ZERO;\r\n\t\tif ( p === THREE.OneFactor ) return _gl.ONE;\r\n\t\tif ( p === THREE.SrcColorFactor ) return _gl.SRC_COLOR;\r\n\t\tif ( p === THREE.OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\r\n\t\tif ( p === THREE.SrcAlphaFactor ) return _gl.SRC_ALPHA;\r\n\t\tif ( p === THREE.OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\r\n\t\tif ( p === THREE.DstAlphaFactor ) return _gl.DST_ALPHA;\r\n\t\tif ( p === THREE.OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\r\n\r\n\t\tif ( p === THREE.DstColorFactor ) return _gl.DST_COLOR;\r\n\t\tif ( p === THREE.OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\r\n\t\tif ( p === THREE.SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\r\n\r\n\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\r\n\r\n\t\tif ( extension !== null ) {\r\n\r\n\t\t\tif ( p === THREE.RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\r\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\r\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\r\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\r\n\r\n\t\t}\r\n\r\n\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\r\n\r\n\t\tif ( extension !== null ) {\r\n\r\n\t\t\tif ( p === THREE.RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\r\n\t\t\tif ( p === THREE.RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\r\n\t\t\tif ( p === THREE.RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\r\n\t\t\tif ( p === THREE.RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\r\n\r\n\t\t}\r\n\r\n\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\r\n\r\n\t\tif ( extension !== null ) {\r\n\r\n\t\t\tif ( p === THREE.RGB_ETC1_Format ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\r\n\r\n\t\t}\r\n\r\n\t\textension = extensions.get( 'EXT_blend_minmax' );\r\n\r\n\t\tif ( extension !== null ) {\r\n\r\n\t\t\tif ( p === THREE.MinEquation ) return extension.MIN_EXT;\r\n\t\t\tif ( p === THREE.MaxEquation ) return extension.MAX_EXT;\r\n\r\n\t\t}\r\n\r\n\t\treturn 0;\r\n\r\n\t}", "function convertToFloat(str) {\n return parseFloat(str);\n}", "function paramThreeToGL( p ) {\n\t\n\t\t\t\tvar extension;\n\t\n\t\t\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\t\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\t\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\t\n\t\t\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\t\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\t\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\t\n\t\t\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\t\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\t\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\t\n\t\t\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\t\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\t\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\t\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\t\n\t\t\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\t\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\t\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\t\t\tif ( p === IntType ) return _gl.INT;\n\t\t\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\t\t\tif ( p === FloatType ) return _gl.FLOAT;\n\t\n\t\t\t\tif ( p === HalfFloatType ) {\n\t\n\t\t\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\t\n\t\t\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\t\n\t\t\t\t}\n\t\n\t\t\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\t\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\t\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\t\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\t\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\t\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\t\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\t\n\t\t\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\t\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\t\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\t\n\t\t\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\t\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\t\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\t\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\t\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\t\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\t\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\t\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\t\n\t\t\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\t\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\t\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\t\n\t\t\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\t\n\t\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\t\n\t\t\t\t\tif ( extension !== null ) {\n\t\n\t\t\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\t\n\t\t\t\t\t}\n\t\n\t\t\t\t}\n\t\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\t\t\t p === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\t\n\t\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\t\n\t\t\t\t\tif ( extension !== null ) {\n\t\n\t\t\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\t\n\t\t\t\t\t}\n\t\n\t\t\t\t}\n\t\n\t\t\t\tif ( p === RGB_ETC1_Format ) {\n\t\n\t\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\t\n\t\t\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\t\n\t\t\t\t}\n\t\n\t\t\t\tif ( p === MinEquation || p === MaxEquation ) {\n\t\n\t\t\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\t\n\t\t\t\t\tif ( extension !== null ) {\n\t\n\t\t\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\t\n\t\t\t\t\t}\n\t\n\t\t\t\t}\n\t\n\t\t\t\tif ( p === UnsignedInt248Type ) {\n\t\n\t\t\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\t\n\t\t\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\t\n\t\t\t\t}\n\t\n\t\t\t\treturn 0;\n\t\n\t\t\t}", "function setValue1f( gl, v ) {\n\n\tgl.uniform1f( this.addr, v );\n\n}", "function paramThreeToGL( p ) {\n\n\t \t\tvar extension;\n\n\t \t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t \t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t \t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t \t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t \t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t \t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t \t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t \t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t \t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t \t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t \t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t \t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t \t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t \t\tif ( p === ByteType ) return _gl.BYTE;\n\t \t\tif ( p === ShortType ) return _gl.SHORT;\n\t \t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t \t\tif ( p === IntType ) return _gl.INT;\n\t \t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t \t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t \t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t \t\tif ( extension !== null ) {\n\n\t \t\t\tif ( p === HalfFloatType ) return extension.HALF_FLOAT_OES;\n\n\t \t\t}\n\n\t \t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t \t\tif ( p === RGBFormat ) return _gl.RGB;\n\t \t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t \t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t \t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t \t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t \t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t \t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t \t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t \t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t \t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t \t\tif ( p === OneFactor ) return _gl.ONE;\n\t \t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t \t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t \t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t \t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t \t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t \t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t \t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t \t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t \t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t \t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t \t\tif ( extension !== null ) {\n\n\t \t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t \t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t \t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t \t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t \t\t}\n\n\t \t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t \t\tif ( extension !== null ) {\n\n\t \t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t \t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t \t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t \t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t \t\t}\n\n\t \t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t \t\tif ( extension !== null ) {\n\n\t \t\t\tif ( p === RGB_ETC1_Format ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t \t\t}\n\n\t \t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t \t\tif ( extension !== null ) {\n\n\t \t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t \t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t \t\t}\n\n\t \t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t \t\tif ( extension !== null ){\n\n\t \t\t\tif ( p === UnsignedInt248Type ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t \t\t}\n\n\t \t\treturn 0;\n\n\t \t}", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function setValue1f( gl, v ) { gl.uniform1f( this.addr, v ); }", "function shaderString (uv, method, inputs, shaderParams) {\n const str = inputs.map((input) => {\n if (input.isUniform) {\n return input.name\n } else if (input.value && input.value.transforms) {\n // this by definition needs to be a generator, hence we start with 'st' as the initial value for generating the glsl fragment\n return `${generateGlsl(input.value.transforms, shaderParams)('st')}`\n }\n return input.value\n }).reduce((p, c) => `${p}, ${c}`, '')\n\n return `${method}(${uv}${str})`\n}", "function floatToString(n) {\n if (isNegativeZero(n)) {\n return '-0';\n } else if (n === parseInt(n)) {\n return n.toString();\n } else if (n === Infinity) {\n return 'inf';\n } else if (n === -Infinity) {\n return '-inf';\n } else if (n !== n) {\n return 'nan';\n }\n var expStr = n.toExponential(16);\n var found = expStr.match(/e([-+]?\\d+)$/);\n var exponent = parseInt(found[1]);\n if (exponent < -4 || exponent >= 17) {\n // force two-digit exponent\n if (Math.abs(exponent) < 10) {\n expStr = expStr.replace(/\\d$/, '') + \"0\" + Math.abs(exponent).toString();\n }\n // strip trailing zeros\n expStr = expStr.replace(/\\.0+e/, 'e');\n return expStr;\n } else {\n var prec17 = n.toPrecision(17);\n if (!prec17.includes(\".\") || (prec17.includes(\"e\") || prec17.includes(\"E\"))) {\n return prec17;\n } else {\n // Trim trailing fractional 0's, but always leave a digit after the '.'\n var result = prec17;\n while (result.endsWith('0') && !result.endsWith('.0')) {\n result = result.slice(0, -1);\n }\n return result;\n }\n }\n }", "function Column_FLOAT() {}", "toUnsafeFloat() { return parseFloat(this.toString()); }", "function paramThreeToGL( p ) {\n\n\t\t\tvar extension;\n\n\t\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\t\tif ( p === IntType ) return _gl.INT;\n\t\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\t\tif ( p === HalfFloatType ) {\n\n\t\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t\t}\n\n\t\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t\t}\n\n\t\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t\t}\n\n\t\t\treturn 0;\n\n\t\t}", "function paramThreeToGL( p ) {\n\n\t\t\tvar extension;\n\n\t\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\t\tif ( p === IntType ) return _gl.INT;\n\t\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\t\tif ( p === HalfFloatType ) {\n\n\t\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t\t}\n\n\t\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t\t}\n\n\t\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t\t}\n\n\t\t\treturn 0;\n\n\t\t}", "function paramThreeToGL( p ) {\n\n\t\t\tvar extension;\n\n\t\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\t\tif ( p === IntType ) return _gl.INT;\n\t\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\t\tif ( p === HalfFloatType ) {\n\n\t\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t\t}\n\n\t\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t\t}\n\n\t\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t\t}\n\n\t\t\treturn 0;\n\n\t\t}", "function paramThreeToGL( p ) {\n\n\t\t\tvar extension;\n\n\t\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\t\tif ( p === IntType ) return _gl.INT;\n\t\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\t\tif ( p === HalfFloatType ) {\n\n\t\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t\t}\n\n\t\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t\t}\n\n\t\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t\t}\n\n\t\t\treturn 0;\n\n\t\t}", "function paramThreeToGL( p ) {\n\n\t\t\tvar extension;\n\n\t\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\t\tif ( p === IntType ) return _gl.INT;\n\t\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\t\tif ( p === HalfFloatType ) {\n\n\t\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t\t}\n\n\t\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t\t}\n\n\t\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t\t}\n\n\t\t\treturn 0;\n\n\t\t}", "function paramThreeToGL( p ) {\n\n\t\tvar extension;\n\n\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === IntType ) return _gl.INT;\n\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\tif ( p === HalfFloatType ) {\n\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t}\n\n\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function paramThreeToGL( p ) {\n\n\t\tvar extension;\n\n\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === IntType ) return _gl.INT;\n\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\tif ( p === HalfFloatType ) {\n\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t}\n\n\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function paramThreeToGL( p ) {\n\n\t\tvar extension;\n\n\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === IntType ) return _gl.INT;\n\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\tif ( p === HalfFloatType ) {\n\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t}\n\n\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function paramThreeToGL( p ) {\n\n\t\tvar extension;\n\n\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === IntType ) return _gl.INT;\n\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\tif ( p === HalfFloatType ) {\n\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t}\n\n\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function paramThreeToGL( p ) {\n\n\t\tvar extension;\n\n\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === IntType ) return _gl.INT;\n\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\tif ( p === HalfFloatType ) {\n\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t}\n\n\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function paramThreeToGL( p ) {\n\n\t\tvar extension;\n\n\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === IntType ) return _gl.INT;\n\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\tif ( p === HalfFloatType ) {\n\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t}\n\n\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function paramThreeToGL( p ) {\n\n\t\tvar extension;\n\n\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === IntType ) return _gl.INT;\n\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\tif ( p === HalfFloatType ) {\n\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t}\n\n\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function substringEnergyToFloat(value) {\n\tif (value != null) {\n\t\tvar grab = parseFloat(\n\t\t\t\tvalue.substring(value.indexOf('=') + 1, value.indexOf('H') - 1))\n\t\t\t\t.toPrecision(12); // Energy = -5499.5123027313 Hartree\n\t\tgrab = grab * 2625.50;\n\t\tgrab = Math.round(grab * 1000000000000) / 1000000000000;\n\t}\n\treturn grab;\n}", "function paramThreeToGL( p ) {\n\n\t\t\t\tvar extension;\n\n\t\t\t\tif ( p === RepeatWrapping ) return _gl.REPEAT;\n\t\t\t\tif ( p === ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\t\t\tif ( p === MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\t\t\tif ( p === NearestFilter ) return _gl.NEAREST;\n\t\t\t\tif ( p === NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\t\t\tif ( p === NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\t\t\tif ( p === LinearFilter ) return _gl.LINEAR;\n\t\t\t\tif ( p === LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\t\t\tif ( p === LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\t\t\tif ( p === UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\t\t\tif ( p === UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\t\t\tif ( p === UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\t\t\tif ( p === UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\t\t\tif ( p === ByteType ) return _gl.BYTE;\n\t\t\t\tif ( p === ShortType ) return _gl.SHORT;\n\t\t\t\tif ( p === UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\t\t\tif ( p === IntType ) return _gl.INT;\n\t\t\t\tif ( p === UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\t\t\tif ( p === FloatType ) return _gl.FLOAT;\n\n\t\t\t\tif ( p === HalfFloatType ) {\n\n\t\t\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\t\t\tif ( extension !== null ) return extension.HALF_FLOAT_OES;\n\n\t\t\t\t}\n\n\t\t\t\tif ( p === AlphaFormat ) return _gl.ALPHA;\n\t\t\t\tif ( p === RGBFormat ) return _gl.RGB;\n\t\t\t\tif ( p === RGBAFormat ) return _gl.RGBA;\n\t\t\t\tif ( p === LuminanceFormat ) return _gl.LUMINANCE;\n\t\t\t\tif ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\t\t\t\tif ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;\n\t\t\t\tif ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;\n\n\t\t\t\tif ( p === AddEquation ) return _gl.FUNC_ADD;\n\t\t\t\tif ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\t\t\tif ( p === ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\t\t\tif ( p === ZeroFactor ) return _gl.ZERO;\n\t\t\t\tif ( p === OneFactor ) return _gl.ONE;\n\t\t\t\tif ( p === SrcColorFactor ) return _gl.SRC_COLOR;\n\t\t\t\tif ( p === OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\t\t\tif ( p === SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\t\t\tif ( p === OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\t\t\tif ( p === DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\t\t\tif ( p === OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\t\t\tif ( p === DstColorFactor ) return _gl.DST_COLOR;\n\t\t\t\tif ( p === OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\t\t\tif ( p === SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\t\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\t\t\tif ( extension !== null ) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t\t\t}\n\n\t\t\t\tif ( p === MinEquation || p === MaxEquation ) {\n\n\t\t\t\t\textension = extensions.get( 'EXT_blend_minmax' );\n\n\t\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\t\tif ( p === MinEquation ) return extension.MIN_EXT;\n\t\t\t\t\t\tif ( p === MaxEquation ) return extension.MAX_EXT;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\t\t\tif ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t\t\t}\n\n\t\t\t\treturn 0;\n\n\t\t\t}", "function setValueV1f(gl, v) {\n const cache = this.cache;\n if (cache[0] === v) return;\n gl.uniform1f(this.addr, v);\n cache[0] = v;\n} // Single float vector (from flat array or THREE.VectorN)", "function sc_string2real(s) {\n return parseFloat(s);\n}", "function binaryToFloat(str){\n return parseFloat(parseInt(str, 2));\n}", "function setValueV1f(gl, v) {\n var cache = this.cache;\n if (cache[0] === v) return;\n gl.uniform1f(this.addr, v);\n cache[0] = v;\n} // Single float vector (from flat array or THREE.VectorN)", "function EncodeFloatRGB(f)\n{\n\tvar enc = new THREE.Vector4( f * 1.0, f*255.0, f*65025.0, 0);\n\tenc.x = frac(enc.x);\n\tenc.y = frac(enc.y);\n\tenc.z = frac(enc.z);\n\t\n\tenc.x -= enc.y * (1.0/255.0);\n\tenc.y -= enc.z * (1.0/255.0);\n\tenc.z -= enc.w * 0;//(1.0/255.0);\n\t//enc -= enc.yzww * new THREE.Vector4(1.0/255.0,1.0/255.0,1.0/255.0,0.0);\n\treturn enc;\n}", "function intToFloat(k) {\n intView[0] = k;\n return floatView[0];\n}", "function pxToFloat(pxMeasure) \r\n\t{ return parseFloat(pxMeasure.slice(0,-2)); }", "function toGLSL(returnType, name, fn){\n\n var glsl = returnType + ' ' +\n name + '(' + applyEnvParameters(fn.toString())\n .replace(\n /var\\s+([\\w|\\d]+)\\s*=\\s*new\\s+([\\w|\\d]+)\\((.*)\\)/g,\n function(expr, name, dtype, value){\n var parts;\n if(value)\n parts = [dtype.toLowerCase(), name, '=', value];\n else\n parts = [dtype.toLowerCase(), name];\n\n return parts.join(' ')\n }\n )\n .replace(/for\\s*\\(\\s*var\\s+/g, 'for(int ')\n .replace(/(var|let)\\s/g, 'float ')\n // .replace(/(\\.0)([^\\d])/g, '$10000000001 $2 ')\n .replace(/this./g, '')\n .replace(/\\$(.*)\\((.*)\\)\\s*(=|;)/g, \"$1 $2 $3\");\n // .replace(/\\$(.*?)\\./g, \"$1 \")\n\n if(name == \"main\") {\n glsl = glsl.replace(/\\(.*(function|\\w).*\\(\\s*([\\s\\S]*?)\\s*{/, '(){') + \"\\n\";\n } else {\n var args = glsl.match(/function|\\w.*\\(\\s*([\\s\\S]*?)\\s*\\)/)[1];\n var isObject = args.match(/{([\\s\\S]*)}/);\n if(isObject) {\n args = isObject[1].split(',')\n .map(d=>d.split('='))\n .map(d=> d[1].replace(/(\\'|\\\")/g, '') + ' ' + d[0])\n .join(', ')\n } else if(args != \"\") {\n args = args.replace(/\\$([\\w|\\d]+)_/g, \"$1 \");\n }\n \n glsl = glsl.replace(/\\(.*(function|\\w).*\\(\\s*([\\s\\S]*?)\\s*\\)/, '(' + args+')') + \"\\n\";\n }\n return glsl;\n }", "function floatSetter(gl, location) {\n return function(v) {\n gl.uniform1f(location, v);\n };\n }", "function numberToString(value) {\n // TODO handle Infinity and -Infinity\n if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__[\"isNaN\"](value)) {\n return \"NaN\";\n }\n if (value === Infinity) {\n return \"Infinity\";\n }\n if (value === -Infinity) {\n return \"-Infinity\";\n }\n // Negative 0\n if ((value === 0) && (1 / value === -Infinity)) {\n return \"-0\";\n }\n // Preserve negative and deal with absoute values\n var negative = value < 0;\n value = Math.abs(value);\n // TODO test this\n var parsed = _utils_Type__WEBPACK_IMPORTED_MODULE_3__[\"getValue\"](/^([0-9]+)(?:\\.([0-9]+))?(?:e[\\+\\-]([0-9]+))?$/.exec(\"\" + value));\n var digits = parsed[1];\n var decimals = parsed[2] || \"\";\n var res;\n // Leave the nummber as it is if it does not use exponents\n if (parsed[3] == null) {\n res = (decimals === \"\" ? digits : digits + \".\" + decimals);\n }\n else {\n var exponent = +parsed[3];\n // Deal with decimals\n if (value < 1) {\n var zeros = exponent - 1;\n res = \"0.\" + _String__WEBPACK_IMPORTED_MODULE_4__[\"repeat\"](\"0\", zeros) + digits + decimals;\n // Deal with integers\n }\n else {\n var zeros = exponent - decimals.length;\n if (zeros === 0) {\n res = digits + decimals;\n }\n else if (zeros < 0) {\n res = digits + decimals.slice(0, zeros) + \".\" + decimals.slice(zeros);\n }\n else {\n res = digits + decimals + _String__WEBPACK_IMPORTED_MODULE_4__[\"repeat\"](\"0\", zeros);\n }\n }\n }\n return negative ? \"-\" + res : res;\n}", "function toFloat(value) {\n return typeof value === 'number' ? value : parseFloat(value);\n}", "function paramThreeToGL ( p ) {\n\n if ( p === THREE.RepeatWrapping ) return _gl.REPEAT;\n if ( p === THREE.ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n if ( p === THREE.MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n if ( p === THREE.NearestFilter ) return _gl.NEAREST;\n if ( p === THREE.NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n if ( p === THREE.NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n if ( p === THREE.LinearFilter ) return _gl.LINEAR;\n if ( p === THREE.LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n if ( p === THREE.LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n if ( p === THREE.UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n if ( p === THREE.UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n if ( p === THREE.UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n if ( p === THREE.UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n if ( p === THREE.ByteType ) return _gl.BYTE;\n if ( p === THREE.ShortType ) return _gl.SHORT;\n if ( p === THREE.UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n if ( p === THREE.IntType ) return _gl.INT;\n if ( p === THREE.UnsignedIntType ) return _gl.UNSIGNED_INT;\n if ( p === THREE.FloatType ) return _gl.FLOAT;\n\n if ( p === THREE.AlphaFormat ) return _gl.ALPHA;\n if ( p === THREE.RGBFormat ) return _gl.RGB;\n if ( p === THREE.RGBAFormat ) return _gl.RGBA;\n if ( p === THREE.LuminanceFormat ) return _gl.LUMINANCE;\n if ( p === THREE.LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\n if ( p === THREE.AddEquation ) return _gl.FUNC_ADD;\n if ( p === THREE.SubtractEquation ) return _gl.FUNC_SUBTRACT;\n if ( p === THREE.ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n if ( p === THREE.ZeroFactor ) return _gl.ZERO;\n if ( p === THREE.OneFactor ) return _gl.ONE;\n if ( p === THREE.SrcColorFactor ) return _gl.SRC_COLOR;\n if ( p === THREE.OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n if ( p === THREE.SrcAlphaFactor ) return _gl.SRC_ALPHA;\n if ( p === THREE.OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n if ( p === THREE.DstAlphaFactor ) return _gl.DST_ALPHA;\n if ( p === THREE.OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n if ( p === THREE.DstColorFactor ) return _gl.DST_COLOR;\n if ( p === THREE.OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n if ( p === THREE.SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n if ( _glExtensionCompressedTextureS3TC !== undefined ) {\n\n if ( p === THREE.RGB_S3TC_DXT1_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGB_S3TC_DXT1_EXT;\n if ( p === THREE.RGBA_S3TC_DXT1_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n if ( p === THREE.RGBA_S3TC_DXT3_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n if ( p === THREE.RGBA_S3TC_DXT5_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n }\n\n return 0;\n\n }", "function setValue1f( gl, v ) {\n\n\t\tgl.uniform1f( this.addr, v );\n\n\t}", "function setValue1f( gl, v ) {\n\n\t\tgl.uniform1f( this.addr, v );\n\n\t}", "function setValue1f( gl, v ) {\n\n\t\tgl.uniform1f( this.addr, v );\n\n\t}", "supportsFloatValues() {\n return true;\n }", "set floatValue(value) {}", "function floatSetter(gl, location) {\n\t return function (v) {\n\t gl.uniform1f(location, v);\n\t };\n\t }", "function paramThreeToGL ( p ) {\n\n\t\tif ( p === THREE.RepeatWrapping ) return _gl.REPEAT;\n\t\tif ( p === THREE.ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\n\t\tif ( p === THREE.MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\n\n\t\tif ( p === THREE.NearestFilter ) return _gl.NEAREST;\n\t\tif ( p === THREE.NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif ( p === THREE.NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif ( p === THREE.LinearFilter ) return _gl.LINEAR;\n\t\tif ( p === THREE.LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif ( p === THREE.LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif ( p === THREE.UnsignedByteType ) return _gl.UNSIGNED_BYTE;\n\t\tif ( p === THREE.UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === THREE.UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif ( p === THREE.UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif ( p === THREE.ByteType ) return _gl.BYTE;\n\t\tif ( p === THREE.ShortType ) return _gl.SHORT;\n\t\tif ( p === THREE.UnsignedShortType ) return _gl.UNSIGNED_SHORT;\n\t\tif ( p === THREE.IntType ) return _gl.INT;\n\t\tif ( p === THREE.UnsignedIntType ) return _gl.UNSIGNED_INT;\n\t\tif ( p === THREE.FloatType ) return _gl.FLOAT;\n\n\t\tif ( p === THREE.AlphaFormat ) return _gl.ALPHA;\n\t\tif ( p === THREE.RGBFormat ) return _gl.RGB;\n\t\tif ( p === THREE.RGBAFormat ) return _gl.RGBA;\n\t\tif ( p === THREE.LuminanceFormat ) return _gl.LUMINANCE;\n\t\tif ( p === THREE.LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\n\n\t\tif ( p === THREE.AddEquation ) return _gl.FUNC_ADD;\n\t\tif ( p === THREE.SubtractEquation ) return _gl.FUNC_SUBTRACT;\n\t\tif ( p === THREE.ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif ( p === THREE.ZeroFactor ) return _gl.ZERO;\n\t\tif ( p === THREE.OneFactor ) return _gl.ONE;\n\t\tif ( p === THREE.SrcColorFactor ) return _gl.SRC_COLOR;\n\t\tif ( p === THREE.OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif ( p === THREE.SrcAlphaFactor ) return _gl.SRC_ALPHA;\n\t\tif ( p === THREE.OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif ( p === THREE.DstAlphaFactor ) return _gl.DST_ALPHA;\n\t\tif ( p === THREE.OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif ( p === THREE.DstColorFactor ) return _gl.DST_COLOR;\n\t\tif ( p === THREE.OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif ( p === THREE.SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\n\n\t\tif ( _glExtensionCompressedTextureS3TC !== undefined ) {\n\n\t\t\tif ( p === THREE.RGB_S3TC_DXT1_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT1_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT3_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT5_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "get floatValue() {}", "function paramThreeToGL ( p ) {\r\n\r\n\t\tif ( p === THREE.RepeatWrapping ) return _gl.REPEAT;\r\n\t\tif ( p === THREE.ClampToEdgeWrapping ) return _gl.CLAMP_TO_EDGE;\r\n\t\tif ( p === THREE.MirroredRepeatWrapping ) return _gl.MIRRORED_REPEAT;\r\n\r\n\t\tif ( p === THREE.NearestFilter ) return _gl.NEAREST;\r\n\t\tif ( p === THREE.NearestMipMapNearestFilter ) return _gl.NEAREST_MIPMAP_NEAREST;\r\n\t\tif ( p === THREE.NearestMipMapLinearFilter ) return _gl.NEAREST_MIPMAP_LINEAR;\r\n\r\n\t\tif ( p === THREE.LinearFilter ) return _gl.LINEAR;\r\n\t\tif ( p === THREE.LinearMipMapNearestFilter ) return _gl.LINEAR_MIPMAP_NEAREST;\r\n\t\tif ( p === THREE.LinearMipMapLinearFilter ) return _gl.LINEAR_MIPMAP_LINEAR;\r\n\r\n\t\tif ( p === THREE.UnsignedByteType ) return _gl.UNSIGNED_BYTE;\r\n\t\tif ( p === THREE.UnsignedShort4444Type ) return _gl.UNSIGNED_SHORT_4_4_4_4;\r\n\t\tif ( p === THREE.UnsignedShort5551Type ) return _gl.UNSIGNED_SHORT_5_5_5_1;\r\n\t\tif ( p === THREE.UnsignedShort565Type ) return _gl.UNSIGNED_SHORT_5_6_5;\r\n\r\n\t\tif ( p === THREE.ByteType ) return _gl.BYTE;\r\n\t\tif ( p === THREE.ShortType ) return _gl.SHORT;\r\n\t\tif ( p === THREE.UnsignedShortType ) return _gl.UNSIGNED_SHORT;\r\n\t\tif ( p === THREE.IntType ) return _gl.INT;\r\n\t\tif ( p === THREE.UnsignedIntType ) return _gl.UNSIGNED_INT;\r\n\t\tif ( p === THREE.FloatType ) return _gl.FLOAT;\r\n\r\n\t\tif ( p === THREE.AlphaFormat ) return _gl.ALPHA;\r\n\t\tif ( p === THREE.RGBFormat ) return _gl.RGB;\r\n\t\tif ( p === THREE.RGBAFormat ) return _gl.RGBA;\r\n\t\tif ( p === THREE.LuminanceFormat ) return _gl.LUMINANCE;\r\n\t\tif ( p === THREE.LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;\r\n\r\n\t\tif ( p === THREE.AddEquation ) return _gl.FUNC_ADD;\r\n\t\tif ( p === THREE.SubtractEquation ) return _gl.FUNC_SUBTRACT;\r\n\t\tif ( p === THREE.ReverseSubtractEquation ) return _gl.FUNC_REVERSE_SUBTRACT;\r\n\r\n\t\tif ( p === THREE.ZeroFactor ) return _gl.ZERO;\r\n\t\tif ( p === THREE.OneFactor ) return _gl.ONE;\r\n\t\tif ( p === THREE.SrcColorFactor ) return _gl.SRC_COLOR;\r\n\t\tif ( p === THREE.OneMinusSrcColorFactor ) return _gl.ONE_MINUS_SRC_COLOR;\r\n\t\tif ( p === THREE.SrcAlphaFactor ) return _gl.SRC_ALPHA;\r\n\t\tif ( p === THREE.OneMinusSrcAlphaFactor ) return _gl.ONE_MINUS_SRC_ALPHA;\r\n\t\tif ( p === THREE.DstAlphaFactor ) return _gl.DST_ALPHA;\r\n\t\tif ( p === THREE.OneMinusDstAlphaFactor ) return _gl.ONE_MINUS_DST_ALPHA;\r\n\r\n\t\tif ( p === THREE.DstColorFactor ) return _gl.DST_COLOR;\r\n\t\tif ( p === THREE.OneMinusDstColorFactor ) return _gl.ONE_MINUS_DST_COLOR;\r\n\t\tif ( p === THREE.SrcAlphaSaturateFactor ) return _gl.SRC_ALPHA_SATURATE;\r\n\r\n\t\tif ( _glExtensionCompressedTextureS3TC !== undefined ) {\r\n\r\n\t\t\tif ( p === THREE.RGB_S3TC_DXT1_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGB_S3TC_DXT1_EXT;\r\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT1_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGBA_S3TC_DXT1_EXT;\r\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT3_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGBA_S3TC_DXT3_EXT;\r\n\t\t\tif ( p === THREE.RGBA_S3TC_DXT5_Format ) return _glExtensionCompressedTextureS3TC.COMPRESSED_RGBA_S3TC_DXT5_EXT;\r\n\r\n\t\t}\r\n\r\n\t\treturn 0;\r\n\r\n\t}", "function getVariables() {\n let res = \"\";\n for (let e in data.variables) {\n res += `uniform float ${e};\\n`;\n }\n return res;\n }", "function setValue1f(gl, v) {\n\n\tgl.uniform1f(this.addr, v);\n}", "function tofloat2(x){\r\n var f = parseFloat(x);\r\n f = Math.round(f*100)/100;\r\n return f;\r\n}", "function flipQuad(value) {\r\n if (typeof value === 'string') {\r\n var parts = value.split(' ');\r\n if (parts.length === 4) {\r\n return parts[0] + \" \" + parts[3] + \" \" + parts[2] + \" \" + parts[1];\r\n }\r\n }\r\n return value;\r\n}", "function PublicFunction_isFloat(sValue){\r\n if (sValue== null) return false;\r\n var vsValue= this.trim(sValue+ \"\");\r\n var vsResult= \"\";\r\n vsResult= vsValue.replace(this.RE_FLOAT01, \"\");\r\n if (vsResult.length== 0) return true;\r\n vsResult= vsValue.replace(this.RE_FLOAT02, \"\");\r\n if (vsResult.length== 0) return true;\r\n vsResult= vsValue.replace(this.RE_FLOAT03, \"\");\r\n if (vsResult.length== 0) return true;\r\n return false;\r\n}", "function paramThreeToGL(_gl, p) {\n\n\t\tlet extension;\n\n\t\tif (p === RepeatWrapping) return _gl.REPEAT;\n\t\tif (p === ClampToEdgeWrapping) return _gl.CLAMP_TO_EDGE;\n\t\tif (p === MirroredRepeatWrapping) return _gl.MIRRORED_REPEAT;\n\n\t\tif (p === NearestFilter) return _gl.NEAREST;\n\t\tif (p === NearestMipMapNearestFilter) return _gl.NEAREST_MIPMAP_NEAREST;\n\t\tif (p === NearestMipMapLinearFilter) return _gl.NEAREST_MIPMAP_LINEAR;\n\n\t\tif (p === LinearFilter) return _gl.LINEAR;\n\t\tif (p === LinearMipMapNearestFilter) return _gl.LINEAR_MIPMAP_NEAREST;\n\t\tif (p === LinearMipMapLinearFilter) return _gl.LINEAR_MIPMAP_LINEAR;\n\n\t\tif (p === UnsignedByteType) return _gl.UNSIGNED_BYTE;\n\t\tif (p === UnsignedShort4444Type) return _gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif (p === UnsignedShort5551Type) return _gl.UNSIGNED_SHORT_5_5_5_1;\n\t\tif (p === UnsignedShort565Type) return _gl.UNSIGNED_SHORT_5_6_5;\n\n\t\tif (p === ByteType) return _gl.BYTE;\n\t\tif (p === ShortType) return _gl.SHORT;\n\t\tif (p === UnsignedShortType) return _gl.UNSIGNED_SHORT;\n\t\tif (p === IntType) return _gl.INT;\n\t\tif (p === UnsignedIntType) return _gl.UNSIGNED_INT;\n\t\tif (p === FloatType) return _gl.FLOAT;\n\n\t\tif (p === HalfFloatType) {\n\n\t\t\textension = extensions.get('OES_texture_half_float');\n\n\t\t\tif (extension !== null) return extension.HALF_FLOAT_OES;\n\n\t\t}\n\n\t\tif (p === AlphaFormat) return _gl.ALPHA;\n\t\tif (p === RGBFormat) return _gl.RGB;\n\t\tif (p === RGBAFormat) return _gl.RGBA;\n\t\tif (p === LuminanceFormat) return _gl.LUMINANCE;\n\t\tif (p === LuminanceAlphaFormat) return _gl.LUMINANCE_ALPHA;\n\t\tif (p === DepthFormat) return _gl.DEPTH_COMPONENT;\n\t\tif (p === DepthStencilFormat) return _gl.DEPTH_STENCIL;\n\n\t\tif (p === AddEquation) return _gl.FUNC_ADD;\n\t\tif (p === SubtractEquation) return _gl.FUNC_SUBTRACT;\n\t\tif (p === ReverseSubtractEquation) return _gl.FUNC_REVERSE_SUBTRACT;\n\n\t\tif (p === ZeroFactor) return _gl.ZERO;\n\t\tif (p === OneFactor) return _gl.ONE;\n\t\tif (p === SrcColorFactor) return _gl.SRC_COLOR;\n\t\tif (p === OneMinusSrcColorFactor) return _gl.ONE_MINUS_SRC_COLOR;\n\t\tif (p === SrcAlphaFactor) return _gl.SRC_ALPHA;\n\t\tif (p === OneMinusSrcAlphaFactor) return _gl.ONE_MINUS_SRC_ALPHA;\n\t\tif (p === DstAlphaFactor) return _gl.DST_ALPHA;\n\t\tif (p === OneMinusDstAlphaFactor) return _gl.ONE_MINUS_DST_ALPHA;\n\n\t\tif (p === DstColorFactor) return _gl.DST_COLOR;\n\t\tif (p === OneMinusDstColorFactor) return _gl.ONE_MINUS_DST_COLOR;\n\t\tif (p === SrcAlphaSaturateFactor) return _gl.SRC_ALPHA_SATURATE;\n\n\t\tif (p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format) {\n\n\t\t\textension = extensions.get('WEBGL_compressed_texture_s3tc');\n\n\t\t\tif (extension !== null) {\n\n\t\t\t\tif (p === RGB_S3TC_DXT1_Format) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\tif (p === RGBA_S3TC_DXT1_Format$1) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\tif (p === RGBA_S3TC_DXT3_Format) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\tif (p === RGBA_S3TC_DXT5_Format$1) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format) {\n\n\t\t\textension = extensions.get('WEBGL_compressed_texture_pvrtc');\n\n\t\t\tif (extension !== null) {\n\n\t\t\t\tif (p === RGB_PVRTC_4BPPV1_Format) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif (p === RGB_PVRTC_2BPPV1_Format) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif (p === RGBA_PVRTC_4BPPV1_Format) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif (p === RGBA_PVRTC_2BPPV1_Format) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (p === RGB_ETC1_Format) {\n\n\t\t\textension = extensions.get('WEBGL_compressed_texture_etc1');\n\n\t\t\tif (extension !== null) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t}\n\n\t\tif (p === MinEquation || p === MaxEquation) {\n\n\t\t\textension = extensions.get('EXT_blend_minmax');\n\n\t\t\tif (extension !== null) {\n\n\t\t\t\tif (p === MinEquation) return extension.MIN_EXT;\n\t\t\t\tif (p === MaxEquation) return extension.MAX_EXT;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (p === UnsignedInt248Type) {\n\n\t\t\textension = extensions.get('WEBGL_depth_texture');\n\n\t\t\tif (extension !== null) return extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "function writeFloat(writer, val, precisionMultiplier) {\n StringWriter.writeSafe(writer, '' + Math.round(precisionMultiplier * val) / precisionMultiplier + ' ');\n }", "function pF(num) {\n num=parseFloat(num);\n if (typeof num=='number' && isFinite(num)) return num;\n return null;\n }", "function floatToFloat(value) {\n return new Float(value);\n }" ]
[ "0.67264694", "0.66337025", "0.6623568", "0.6609518", "0.65403897", "0.6378591", "0.6234288", "0.6197407", "0.6197407", "0.61373985", "0.6011263", "0.59416556", "0.5934193", "0.5902741", "0.5873191", "0.58708847", "0.57795316", "0.5747997", "0.5725125", "0.57215285", "0.5699446", "0.5687131", "0.55730975", "0.55730975", "0.55730975", "0.55730975", "0.5549523", "0.55439985", "0.553816", "0.55174756", "0.55093443", "0.55060685", "0.5494573", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5482924", "0.5477334", "0.54730517", "0.54717875", "0.5469702", "0.546619", "0.546619", "0.546619", "0.546619", "0.546619", "0.5454339", "0.5454339", "0.5454339", "0.5454339", "0.5454339", "0.5454339", "0.5454339", "0.5442986", "0.54404217", "0.54281133", "0.5425679", "0.54155177", "0.54133916", "0.54062486", "0.539809", "0.5390627", "0.53646255", "0.536261", "0.53428227", "0.5341953", "0.5339879", "0.53381246", "0.53381246", "0.53381246", "0.53375113", "0.5337079", "0.5336923", "0.5334243", "0.53208655", "0.5312016", "0.53045547", "0.53039306", "0.530221", "0.52991873", "0.5295943", "0.52922434", "0.5290485", "0.5286498", "0.5260614" ]
0.5983309
11
local node digest function
async function digest (algo, data) { const hash = crypto.createHash(algo) hash.update(data) return new Uint8Array(hash.digest()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function digest() {\n // Pad\n write(0x80);\n if (offset > 14 || (offset === 14 && shift < 24)) {\n processBlock();\n }\n offset = 14;\n shift = 24;\n\n // 64-bit length big-endian\n write(0x00); // numbers this big aren't accurate in javascript anyway\n write(0x00); // ..So just hard-code to zero.\n write(totalLength > 0xffffffffff ? totalLength / 0x10000000000 : 0x00);\n write(totalLength > 0xffffffff ? totalLength / 0x100000000 : 0x00);\n for (var s = 24; s >= 0; s -= 8) {\n write(totalLength >> s);\n }\n\n // At this point one last processBlock() should trigger and we can pull out the result.\n return toHex(h0) +\n toHex(h1) +\n toHex(h2) +\n toHex(h3) +\n toHex(h4);\n }", "function digest() {\n // Pad\n write(0x80);\n if (offset > 14 || (offset === 14 && shift < 24)) {\n processBlock();\n }\n offset = 14;\n shift = 24;\n\n // 64-bit length big-endian\n write(0x00); // numbers this big aren't accurate in javascript anyway\n write(0x00); // ..So just hard-code to zero.\n write(totalLength > 0xffffffffff ? totalLength / 0x10000000000 : 0x00);\n write(totalLength > 0xffffffff ? totalLength / 0x100000000 : 0x00);\n for (var s = 24; s >= 0; s -= 8) {\n write(totalLength >> s);\n }\n\n // At this point one last processBlock() should trigger and we can pull out the result.\n return toHex(h0) +\n toHex(h1) +\n toHex(h2) +\n toHex(h3) +\n toHex(h4);\n }", "function digest() {\n // Pad\n write(0x80);\n if (offset > 14 || (offset === 14 && shift < 24)) {\n processBlock();\n }\n offset = 14;\n shift = 24;\n\n // 64-bit length big-endian\n write(0x00); // numbers this big aren't accurate in javascript anyway\n write(0x00); // ..So just hard-code to zero.\n write(totalLength > 0xffffffffff ? totalLength / 0x10000000000 : 0x00);\n write(totalLength > 0xffffffff ? totalLength / 0x100000000 : 0x00);\n for (var s = 24; s >= 0; s -= 8) {\n write(totalLength >> s);\n }\n\n // At this point one last processBlock() should trigger and we can pull out the result.\n return toHex(h0) +\n toHex(h1) +\n toHex(h2) +\n toHex(h3) +\n toHex(h4);\n }", "function createNode() {\n var shasum = crypto.createHash('sha1');\n return {\n update: function (buffer) {\n return shasum.update(buffer);\n },\n digest: function () {\n return shasum.digest('hex');\n }\n };\n}", "function createNode() {\n var shasum = crypto.createHash('sha1');\n return {\n update: function (buffer) {\n return shasum.update(buffer);\n },\n digest: function () {\n return shasum.digest('hex');\n }\n };\n}", "function createNode() {\n var shasum = crypto.createHash('sha1');\n return {\n update: function (buffer) {\n return shasum.update(buffer);\n },\n digest: function () {\n return shasum.digest('hex');\n }\n };\n}", "static digestFn (hashType, data) {\r\n\r\n if (typeof data !== 'string') data = JSON.stringify(data);\r\n const hash = crypto.createHash(hashType);\r\n hash.update(data);\r\n return hash.digest('hex');\r\n }", "function digest(data) {\n sha256_init();\n sha256_update(data, data.length);\n sha256_final();\n return sha256_encode_hex();\n}", "function digest(data) {\n sha256_init();\n sha256_update(data, data.length);\n sha256_final();\n return sha256_encode_hex();\n}", "calculateHash(nonce) {\n // Your code here\n\n }", "function calcDigest(){\n\n var digestM = hex_sha1(document.SHAForm.SourceMessage.value);\n\n document.SHAForm.MessageDigest.value = digestM;\n\n }", "function digestMessage(message) {\n return sha1(serializeNodes(message.nodes).join('') + (\"[\" + message.meaning + \"]\"));\n}", "function computeDigest(message) {\n return sha1(serializeNodes(message.nodes).join('') + \"[\".concat(message.meaning, \"]\"));\n}", "function computeDigest(message) {\n return sha1(serializeNodes(message.nodes).join('') + `[${message.meaning}]`);\n}", "function computeDigest(message) {\n return sha1(serializeNodes(message.nodes).join('') + `[${message.meaning}]`);\n}", "digest() {\n return crypto\n .createHash(\"md5\")\n .update(JSON.stringify(this, (key, val) =>\n val instanceof Set ? [...val].sort() : val))\n .digest(\"hex\");\n }", "_generateHash() {\n\n }", "function _digest(nkp) {\n var reg = /(\\.[^\\.]+|\\[([^\\[\\]])+\\])$/\n if (!reg.exec(nkp)) return ''\n return nkp.replace(reg, '')\n}", "function getNodeObjectHashFunction() {\n return (args) => nodeObjectHasher.hash(args);\n}", "function md5_test(){\r\n var a = \"\";\r\n var a1 = \"D41D8CD98F00B204E9800998ECF8427E\";\r\n var b = \"a\";\r\n var b1 = \"0CC175B9C0F1B6A831C399E269772661\";\r\n var c = \"abc\";\r\n var c1 = \"900150983CD24FB0D6963F7D28E17F72\";\r\n var d = \"message digest\";\r\n d1 = \"F96B697D7CB7938D525A2F31AAF161D0\";\r\n var e = \"abcdefghijklmnopqrstuvwxyz\";\r\n var e1 = \"C3FCD3D76192E4007DFB496CCA67E13B\";\r\n var f = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n var f1 = \"D174AB98D277D9F5A5611C2C9F419D9F\";\r\n \r\n var g = \"12345678901234567890123456789012345678901234567890123456789012345678901234567890\";\r\n var g1 = \"57EDF4A22BE3C955AC49DA2E2107B67A\";\r\n \r\n md5_test_func(a, a1);\r\n md5_test_func(b, b1);\r\n md5_test_func(c, c1);\r\n md5_test_func(d, d1);\r\n md5_test_func(e, e1);\r\n md5_test_func(f, f1);\r\n md5_test_func(g, g1);\r\n \r\n}", "getSignatureDigest() {\n const buffer = new Serialize.SerialBuffer({\n textEncoder: this.textEncoder,\n textDecoder: this.textDecoder,\n });\n // protocol version + utf8 \"request\"\n buffer.pushArray([this.version, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74]);\n buffer.pushArray(this.getData());\n return sha256(buffer.asUint8Array());\n }", "function rawMD5(s){return rstrMD5(str2rstrUTF8(s));}", "hash(input) {\n var hash = crypto.createHash('SHA256').update(input).digest('base64');\n return hash;\n }", "function hex_md5(s){return rstr2hex(rstr_md5(str2rstr_utf8(s)));}", "function raw_md5(s) {\r\n\t\t return rstr_md5(str2rstr_utf8(s));\r\n\t\t }", "calculateHash(){\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)+this.nonce).toString();\n }", "function md5_vm_test() \n{ \nreturn hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\"; \n}", "function core_md5(x, len) { \n /* append padding */ \n x[len >> 5] |= 0x80 << ((len) % 32); \n x[(((len + 64) >>> 9) << 4) + 14] = len; \n \n var a = 1732584193; \n var b = -271733879; \n var c = -1732584194; \n var d = 271733878; \n \n for(var i = 0; i < x.length; i += 16) { \n var olda = a; \n var oldb = b; \n var oldc = c; \n var oldd = d; \n \n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); \n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); \n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); \n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); \n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); \n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); \n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); \n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); \n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); \n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); \n c = md5_ff(c, d, a, b, x[i+10], 17, -42063); \n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); \n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); \n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); \n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); \n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); \n \n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); \n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); \n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); \n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); \n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); \n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); \n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); \n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); \n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); \n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); \n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); \n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); \n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); \n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); \n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); \n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); \n \n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); \n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); \n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); \n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); \n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); \n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); \n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); \n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); \n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); \n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); \n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); \n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); \n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); \n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); \n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); \n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); \n \n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); \n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); \n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); \n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); \n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); \n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); \n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); \n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); \n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); \n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); \n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); \n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); \n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); \n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); \n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); \n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); \n \n a = safe_add(a, olda); \n b = safe_add(b, oldb); \n c = safe_add(c, oldc); \n d = safe_add(d, oldd); \n } \n return Array(a, b, c, d); \n}", "calculateHash(){\n return SHA256(this.index + this.prevHash + this.timestamp + JSON.stringify(this.data));\n }", "function core_md5(x,len){/* append padding */x[len>>5]|=0x80<<len%32;x[(len+64>>>9<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);}return[a,b,c,d];}", "function core_md5(x,len){/* append padding */x[len>>5]|=0x80<<len%32;x[(len+64>>>9<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);}return Array(a,b,c,d);}", "function SHA256() {\n\n}", "function md5cycle(e,t){var n=e[0],r=e[1],i=e[2],s=e[3];n=ff(n,r,i,s,t[0],7,-680876936);s=ff(s,n,r,i,t[1],12,-389564586);i=ff(i,s,n,r,t[2],17,606105819);r=ff(r,i,s,n,t[3],22,-1044525330);n=ff(n,r,i,s,t[4],7,-176418897);s=ff(s,n,r,i,t[5],12,1200080426);i=ff(i,s,n,r,t[6],17,-1473231341);r=ff(r,i,s,n,t[7],22,-45705983);n=ff(n,r,i,s,t[8],7,1770035416);s=ff(s,n,r,i,t[9],12,-1958414417);i=ff(i,s,n,r,t[10],17,-42063);r=ff(r,i,s,n,t[11],22,-1990404162);n=ff(n,r,i,s,t[12],7,1804603682);s=ff(s,n,r,i,t[13],12,-40341101);i=ff(i,s,n,r,t[14],17,-1502002290);r=ff(r,i,s,n,t[15],22,1236535329);n=gg(n,r,i,s,t[1],5,-165796510);s=gg(s,n,r,i,t[6],9,-1069501632);i=gg(i,s,n,r,t[11],14,643717713);r=gg(r,i,s,n,t[0],20,-373897302);n=gg(n,r,i,s,t[5],5,-701558691);s=gg(s,n,r,i,t[10],9,38016083);i=gg(i,s,n,r,t[15],14,-660478335);r=gg(r,i,s,n,t[4],20,-405537848);n=gg(n,r,i,s,t[9],5,568446438);s=gg(s,n,r,i,t[14],9,-1019803690);i=gg(i,s,n,r,t[3],14,-187363961);r=gg(r,i,s,n,t[8],20,1163531501);n=gg(n,r,i,s,t[13],5,-1444681467);s=gg(s,n,r,i,t[2],9,-51403784);i=gg(i,s,n,r,t[7],14,1735328473);r=gg(r,i,s,n,t[12],20,-1926607734);n=hh(n,r,i,s,t[5],4,-378558);s=hh(s,n,r,i,t[8],11,-2022574463);i=hh(i,s,n,r,t[11],16,1839030562);r=hh(r,i,s,n,t[14],23,-35309556);n=hh(n,r,i,s,t[1],4,-1530992060);s=hh(s,n,r,i,t[4],11,1272893353);i=hh(i,s,n,r,t[7],16,-155497632);r=hh(r,i,s,n,t[10],23,-1094730640);n=hh(n,r,i,s,t[13],4,681279174);s=hh(s,n,r,i,t[0],11,-358537222);i=hh(i,s,n,r,t[3],16,-722521979);r=hh(r,i,s,n,t[6],23,76029189);n=hh(n,r,i,s,t[9],4,-640364487);s=hh(s,n,r,i,t[12],11,-421815835);i=hh(i,s,n,r,t[15],16,530742520);r=hh(r,i,s,n,t[2],23,-995338651);n=ii(n,r,i,s,t[0],6,-198630844);s=ii(s,n,r,i,t[7],10,1126891415);i=ii(i,s,n,r,t[14],15,-1416354905);r=ii(r,i,s,n,t[5],21,-57434055);n=ii(n,r,i,s,t[12],6,1700485571);s=ii(s,n,r,i,t[3],10,-1894986606);i=ii(i,s,n,r,t[10],15,-1051523);r=ii(r,i,s,n,t[1],21,-2054922799);n=ii(n,r,i,s,t[8],6,1873313359);s=ii(s,n,r,i,t[15],10,-30611744);i=ii(i,s,n,r,t[6],15,-1560198380);r=ii(r,i,s,n,t[13],21,1309151649);n=ii(n,r,i,s,t[4],6,-145523070);s=ii(s,n,r,i,t[11],10,-1120210379);i=ii(i,s,n,r,t[2],15,718787259);r=ii(r,i,s,n,t[9],21,-343485551);e[0]=add32(n,e[0]);e[1]=add32(r,e[1]);e[2]=add32(i,e[2]);e[3]=add32(s,e[3])}", "calcHash () {\n var addr_h = sha512(this.address).substr(0, 32)\n var data = new Identicon(addr_h).toString()\n return 'data:image/png;base64,' + data\n }", "async function prngHash (seed, blockHashes) {\n// let sum = blockHashes(numBlocks)\n let sum = await web3.utils.soliditySha3(blockHashes, seed)\n// console.log('prngHash', sum)\n return (sum)\n}", "function hex_md5(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); }", "function hex_md5(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); }", "function hex_md5(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); }", "function hex_md5(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); }", "function hex_md5(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); }", "function hex_md5(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); }", "function hex_md5(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); }", "function hex_md5(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); }", "function core_md5 (x, len) {\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32)\n\t x[(((len + 64) >>> 9) << 4) + 14] = len\n\t\n\t var a = 1732584193\n\t var b = -271733879\n\t var c = -1732584194\n\t var d = 271733878\n\t\n\t for (var i = 0; i < x.length; i += 16) {\n\t var olda = a\n\t var oldb = b\n\t var oldc = c\n\t var oldd = d\n\t\n\t a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)\n\t d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n\t c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n\t b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n\t a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n\t d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n\t c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n\t b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n\t a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n\t d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n\t c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n\t b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n\t a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n\t d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n\t c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n\t b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\t\n\t a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n\t d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n\t c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n\t b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)\n\t a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n\t d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n\t c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n\t b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n\t a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n\t d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n\t c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n\t b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n\t a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n\t d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n\t c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n\t b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\t\n\t a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n\t d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n\t c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n\t b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n\t a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n\t d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n\t c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n\t b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n\t a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n\t d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)\n\t c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n\t b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n\t a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n\t d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n\t c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n\t b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\t\n\t a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)\n\t d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n\t c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n\t b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n\t a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n\t d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n\t c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n\t b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n\t a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n\t d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n\t c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n\t b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n\t a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n\t d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n\t c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n\t b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\t\n\t a = safe_add(a, olda)\n\t b = safe_add(b, oldb)\n\t c = safe_add(c, oldc)\n\t d = safe_add(d, oldd)\n\t }\n\t\n\t return [a, b, c, d]\n\t}", "function addDigest(/* ByteBuffer */ src) {\n\n // Process the message in successive 512-bit (64 byte) chunks:\n // break message into 512-bit (64 byte) chunks\n // Break chunk into sixteen 32-bit big-endian words w[i], 0 <= i <= 15.\n let i = 0;\n for (i = 0; i < 16; i++) {\n w[i] = src.getInt(i*4);\n }\n\n for (i = 16; i < 80; i++) {\n w[i] = 0;\n }\n\n // Compute/add 1 digest line.\n // Extend the sixteen 32-bit (4 byte) words into eighty 32-bit (4 byte) words:\n for (i = 16; i < 80; i++) {\n w[i] = Integer.rotateLeft(w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16], 1);\n }\n\n // Initialize hash value for this chunk:\n f = k = temp = 0;\n a = h0;\n b = h1;\n c = h2;\n d = h3;\n e = h4;\n\n for (i = 0; i < 20; i++) {\n f = (b & c) | ((~b) & d);\n k = 0x5A827999;\n finishValues(i);\n }\n\n for (i = 20; i < 40; i++) {\n f = b ^ c ^ d;\n k = 0x6ED9EBA1;\n finishValues(i);\n }\n\n for (i = 40; i < 60; i++) {\n f = (b & c) | (b & d) | (c & d);\n k = 0x8F1BBCDC;\n finishValues(i);\n }\n\n for (i = 60; i < 80; i++) {\n f = b ^ c ^ d;\n k = 0xCA62C1D6;\n finishValues(i);\n }\n\n // Add this chunk's hash to result so far:\n h0 += a;\n h1 += b;\n h2 += c;\n h3 += d;\n h4 += e;\n checkNum(a, b, c, d, e);\n }", "calculateHash(){ \r\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\r\n }", "function core_md5(x, len) \n{ \n/* append padding */ \nx[len >> 5] |= 0x80 << ((len) % 32); \nx[(((len + 64) >>> 9) << 4) + 14] = len;\n\nvar a = 1732584193; \nvar b = -271733879; \nvar c = -1732584194; \nvar d = 271733878;\n\nfor(var i = 0; i < x.length; i += 16) \n{ \nvar olda = a; \nvar oldb = b; \nvar oldc = c; \nvar oldd = d;\n\na = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); \nd = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); \nc = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); \nb = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); \na = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); \nd = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); \nc = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); \nb = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); \na = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); \nd = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); \nc = md5_ff(c, d, a, b, x[i+10], 17, -42063); \nb = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); \na = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); \nd = md5_ff(d, a, b, c, x[i+13], 12, -40341101); \nc = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); \nb = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\na = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); \nd = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); \nc = md5_gg(c, d, a, b, x[i+11], 14, 643717713); \nb = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); \na = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); \nd = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); \nc = md5_gg(c, d, a, b, x[i+15], 14, -660478335); \nb = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); \na = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); \nd = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); \nc = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); \nb = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); \na = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); \nd = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); \nc = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); \nb = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\na = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); \nd = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); \nc = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); \nb = md5_hh(b, c, d, a, x[i+14], 23, -35309556); \na = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); \nd = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); \nc = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); \nb = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); \na = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); \nd = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); \nc = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); \nb = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); \na = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); \nd = md5_hh(d, a, b, c, x[i+12], 11, -421815835); \nc = md5_hh(c, d, a, b, x[i+15], 16, 530742520); \nb = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\na = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); \nd = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); \nc = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); \nb = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); \na = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); \nd = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); \nc = md5_ii(c, d, a, b, x[i+10], 15, -1051523); \nb = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); \na = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); \nd = md5_ii(d, a, b, c, x[i+15], 10, -30611744); \nc = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); \nb = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); \na = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); \nd = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); \nc = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); \nb = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\na = safe_add(a, olda); \nb = safe_add(b, oldb); \nc = safe_add(c, oldc); \nd = safe_add(d, oldd); \n} \nreturn Array(a, b, c, d);\n\n}", "calculateHash(){\r\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\r\n }", "function core_md5(x, len) {\n\t\t/* append padding */\n\t\tx[len >> 5] |= 0x80 << len % 32;\n\t\tx[(len + 64 >>> 9 << 4) + 14] = len;\n\t\tvar a = 1732584193;\n\t\tvar b = -271733879;\n\t\tvar c = -1732584194;\n\t\tvar d = 271733878;\n\t\tfor (var i = 0; i < x.length; i += 16) {\n\t\t\tvar olda = a;\n\t\t\tvar oldb = b;\n\t\t\tvar oldc = c;\n\t\t\tvar oldd = d;\n\t\t\ta = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);\n\t\t\td = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n\t\t\ta = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n\t\t\td = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n\t\t\ta = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n\t\t\td = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n\t\t\ta = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n\t\t\td = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\t\t\ta = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n\t\t\td = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n\t\t\tb = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);\n\t\t\ta = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n\t\t\td = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n\t\t\tb = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n\t\t\ta = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n\t\t\td = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n\t\t\tb = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n\t\t\ta = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n\t\t\td = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n\t\t\tb = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\t\t\ta = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n\t\t\td = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n\t\t\ta = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n\t\t\td = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n\t\t\ta = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n\t\t\td = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n\t\t\ta = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n\t\t\td = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\t\t\ta = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);\n\t\t\td = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n\t\t\ta = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n\t\t\td = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n\t\t\ta = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n\t\t\td = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n\t\t\ta = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n\t\t\td = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\t\t\ta = safe_add(a, olda);\n\t\t\tb = safe_add(b, oldb);\n\t\t\tc = safe_add(c, oldc);\n\t\t\td = safe_add(d, oldd);\n\t\t}\n\t\treturn Array(a, b, c, d);\n\t}", "static computeMD5(path) {\n return new Promise((resolve, reject) => {\n let hash = crypto_1.createHash('md5');\n fs_1.createReadStream(path)\n .on('data', data => hash.update(data, 'utf8'))\n .on('end', () => resolve(hash.digest('hex'))) // md5 checksum\n .on('error', reject);\n });\n }", "calculateHash(){\n\t\treturn SHA256(this.index + this.previousHash + this.timestamp + this.data + this.nonce).toString();\n\n\t}", "async function prngHash (seed, blockHashes) {\n // let sum = blockHashes(numBlocks)\n let sum = await web3.utils.soliditySha3(blockHashes, seed)\n // console.log('prngHash', sum)\n return (sum)\n }", "function __hsbase_MD5Update(ctx, s, n) {\n ctx.md5 = md51(s, n);\n}", "function md5_vm_test()\r\n{\r\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n}", "function md5_vm_test()\r\n{\r\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n}", "function md5_vm_test()\r\n{\r\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n}", "function md5_vm_test()\r\n{\r\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n}", "function md5_vm_test()\r\n{\r\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n}", "function md5_vm_test()\r\n{\r\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n}", "function md5_vm_test()\r\n{\r\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n}", "function md5_vm_test()\r\n{\r\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n}", "function raw_md5(s) {\n\t return rstr_md5(str2rstr_utf8(s));\n\t }", "function hash_to_fingerprint( hash ) {\n return `${encode_chunk( hash, 0 )} ${encode_chunk( hash, 5 )} ${encode_chunk( hash, 10 )} ` +\n `${encode_chunk( hash, 15 )} ${encode_chunk( hash, 20 )} ${encode_chunk( hash, 25 )} `;\n }", "hash_function(base_string, key) {\n return crypto.createHmac('sha256', key).update(base_string).digest('base64');\n }", "function core_md5(x, len) {\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << len % 32;\n\t x[(len + 64 >>> 9 << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for (var i = 0; i < x.length; i += 16) {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);\n\t d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n\t d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n\t d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n\t d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n\t d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n\t c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n\t d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n\t c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n\t d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n\t c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n\t d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n\t c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n\t d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n\t d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n\t d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n\t d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);\n\t d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n\t d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n\t d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n\t d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t}", "function md5_vm_test()\n{\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\n}", "function md5_vm_test()\n{\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\n}", "function core_md5(x, len) {\r\n /* append padding */\r\n x[len >> 5] |= 0x80 << ((len) % 32);\r\n x[(((len + 64) >>> 9) << 4) + 14] = len;\r\n\r\n var a = 1732584193;\r\n var b = -271733879;\r\n var c = -1732584194;\r\n var d = 271733878;\r\n\r\n for (var i = 0; i < x.length; i += 16) {\r\n var olda = a;\r\n var oldb = b;\r\n var oldc = c;\r\n var oldd = d;\r\n\r\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);\r\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\r\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\r\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\r\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\r\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\r\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\r\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\r\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\r\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\r\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\r\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\r\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\r\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\r\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\r\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\r\n\r\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\r\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\r\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\r\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);\r\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\r\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\r\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\r\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\r\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\r\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\r\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\r\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\r\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\r\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\r\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\r\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\r\n\r\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\r\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\r\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\r\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\r\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\r\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\r\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\r\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\r\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\r\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);\r\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\r\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\r\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\r\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\r\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\r\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\r\n\r\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);\r\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\r\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\r\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\r\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\r\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\r\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\r\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\r\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\r\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\r\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\r\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\r\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\r\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\r\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\r\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\r\n\r\n a = safe_add(a, olda);\r\n b = safe_add(b, oldb);\r\n c = safe_add(c, oldc);\r\n d = safe_add(d, oldd);\r\n }\r\n return Array(a, b, c, d);\r\n\r\n }", "function core_md5(x, len) {\n\t\t\t/* append padding */\n\t\t\tx[len >> 5] |= 0x80 << ((len) % 32);\n\t\t\tx[(((len + 64) >>> 9) << 4) + 14] = len;\n\n\t\t\tvar a = 1732584193;\n\t\t\tvar b = -271733879;\n\t\t\tvar c = -1732584194;\n\t\t\tvar d = 271733878;\n\n\t\t\tfor(var i = 0; i < x.length; i += 16) {\n\t\t\t\tvar olda = a;\n\t\t\t\tvar oldb = b;\n\t\t\t\tvar oldc = c;\n\t\t\t\tvar oldd = d;\n\n\t\t\t\ta = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);\n\t\t\t\td = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n\t\t\t\tc = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n\t\t\t\tb = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n\t\t\t\ta = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n\t\t\t\td = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n\t\t\t\tc = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n\t\t\t\tb = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n\t\t\t\ta = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n\t\t\t\td = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n\t\t\t\tc = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n\t\t\t\tb = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n\t\t\t\ta = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n\t\t\t\td = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n\t\t\t\tc = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n\t\t\t\tb = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n\t\t\t\ta = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n\t\t\t\td = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n\t\t\t\tc = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n\t\t\t\tb = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);\n\t\t\t\ta = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n\t\t\t\td = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n\t\t\t\tc = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n\t\t\t\tb = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n\t\t\t\ta = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n\t\t\t\td = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n\t\t\t\tc = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n\t\t\t\tb = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n\t\t\t\ta = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n\t\t\t\td = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n\t\t\t\tc = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n\t\t\t\tb = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n\t\t\t\ta = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n\t\t\t\td = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n\t\t\t\tc = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n\t\t\t\tb = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n\t\t\t\ta = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n\t\t\t\td = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n\t\t\t\tc = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n\t\t\t\tb = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n\t\t\t\ta = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n\t\t\t\td = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);\n\t\t\t\tc = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n\t\t\t\tb = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n\t\t\t\ta = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n\t\t\t\td = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n\t\t\t\tc = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n\t\t\t\tb = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n\t\t\t\ta = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);\n\t\t\t\td = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n\t\t\t\tc = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n\t\t\t\tb = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n\t\t\t\ta = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n\t\t\t\td = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n\t\t\t\tc = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n\t\t\t\tb = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n\t\t\t\ta = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n\t\t\t\td = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n\t\t\t\tc = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n\t\t\t\tb = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n\t\t\t\ta = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n\t\t\t\td = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n\t\t\t\tc = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n\t\t\t\tb = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n\t\t\t\ta = safe_add(a, olda);\n\t\t\t\tb = safe_add(b, oldb);\n\t\t\t\tc = safe_add(c, oldc);\n\t\t\t\td = safe_add(d, oldd);\n\t\t\t}\n\t\t\treturn Array(a, b, c, d);\n\t\t}", "function Hash() {}", "function Hash() {}", "calculateHash(){\n\t\treturn SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\n\t}", "calculateHash(){\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\n }", "function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b);}", "function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b);}", "function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b);}", "hash() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`;\n }", "function raw_md5(s) {\n return rstr_md5(str2rstr_utf8(s));\n }", "calculateHash(){\n \n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\n\n }", "function raw_md5(s) {\n return rstr_md5(str2rstr_utf8(s));\n}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n }", "function calcMD5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}", "function computeHash (source, salt) { \n\t//get hashing algorithm\n\tvar hmac = crypto.createHmac(\"sha1\", salt);\n\t//create the hash number\t\n\tvar hash = hmac.update(source);\n\t//get the hash as hex string\n\treturn hash.digest(\"hex\");\n}", "function hash(txt) {\n\t\t// Because of how it was originally implemented the string to be hashed has to be reversed first\n\t\tvar txtReversed = txt.split(\"\").reverse().join(\"\");\n\t\treturn b64_md5(txtReversed).substring(0,10); // This function is defined in b64_md5.js\n\t}", "function core_md5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a\n var oldb = b\n var oldc = c\n var oldd = d\n\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safe_add(a, olda)\n b = safe_add(b, oldb)\n c = safe_add(c, oldc)\n d = safe_add(d, oldd)\n }\n\n return [a, b, c, d]\n}", "function core_md5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a\n var oldb = b\n var oldc = c\n var oldd = d\n\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safe_add(a, olda)\n b = safe_add(b, oldb)\n c = safe_add(c, oldc)\n d = safe_add(d, oldd)\n }\n\n return [a, b, c, d]\n}", "function core_md5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a\n var oldb = b\n var oldc = c\n var oldd = d\n\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safe_add(a, olda)\n b = safe_add(b, oldb)\n c = safe_add(c, oldc)\n d = safe_add(d, oldd)\n }\n\n return [a, b, c, d]\n}", "function core_md5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a\n var oldb = b\n var oldc = c\n var oldd = d\n\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safe_add(a, olda)\n b = safe_add(b, oldb)\n c = safe_add(c, oldc)\n d = safe_add(d, oldd)\n }\n\n return [a, b, c, d]\n}", "function core_md5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a\n var oldb = b\n var oldc = c\n var oldd = d\n\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safe_add(a, olda)\n b = safe_add(b, oldb)\n c = safe_add(c, oldc)\n d = safe_add(d, oldd)\n }\n\n return [a, b, c, d]\n}", "function core_md5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a\n var oldb = b\n var oldc = c\n var oldd = d\n\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safe_add(a, olda)\n b = safe_add(b, oldb)\n c = safe_add(c, oldc)\n d = safe_add(d, oldd)\n }\n\n return [a, b, c, d]\n}", "function core_md5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a\n var oldb = b\n var oldc = c\n var oldd = d\n\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safe_add(a, olda)\n b = safe_add(b, oldb)\n c = safe_add(c, oldc)\n d = safe_add(d, oldd)\n }\n\n return [a, b, c, d]\n}", "function core_md5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a\n var oldb = b\n var oldc = c\n var oldd = d\n\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safe_add(a, olda)\n b = safe_add(b, oldb)\n c = safe_add(c, oldc)\n d = safe_add(d, oldd)\n }\n\n return [a, b, c, d]\n}", "function core_md5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a\n var oldb = b\n var oldc = c\n var oldd = d\n\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safe_add(a, olda)\n b = safe_add(b, oldb)\n c = safe_add(c, oldc)\n d = safe_add(d, oldd)\n }\n\n return [a, b, c, d]\n}" ]
[ "0.6882936", "0.6882936", "0.6882936", "0.67158175", "0.67158175", "0.67158175", "0.6524656", "0.6487698", "0.6487698", "0.6470773", "0.63964", "0.63439596", "0.6320234", "0.6297155", "0.6297155", "0.6261069", "0.6199223", "0.6140325", "0.60956365", "0.6031878", "0.59764165", "0.5892616", "0.58588785", "0.58521366", "0.5826093", "0.57966864", "0.579593", "0.57956165", "0.5784648", "0.5779202", "0.5779202", "0.5752529", "0.57405096", "0.5736236", "0.57319003", "0.57275075", "0.57275075", "0.57275075", "0.57275075", "0.57275075", "0.57275075", "0.57275075", "0.57275075", "0.57263064", "0.5721252", "0.5719479", "0.5693099", "0.56920964", "0.5691475", "0.56681037", "0.5666056", "0.5664597", "0.56321174", "0.5626187", "0.5626187", "0.5626187", "0.5626187", "0.5626187", "0.5626187", "0.5626187", "0.5626187", "0.562505", "0.5623362", "0.5620191", "0.56165", "0.5612551", "0.5612551", "0.5610262", "0.560931", "0.56083655", "0.56083655", "0.55941755", "0.5591874", "0.55892754", "0.55892754", "0.55892754", "0.55885047", "0.55834436", "0.5578943", "0.55773824", "0.55766326", "0.55766326", "0.55766326", "0.55766326", "0.55766326", "0.55766326", "0.55766326", "0.55764174", "0.5574471", "0.55717254", "0.5563956", "0.5555176", "0.5555176", "0.5555176", "0.5555176", "0.5555176", "0.5555176", "0.5555176", "0.5555176", "0.5555176" ]
0.5728765
35
handle an incomming cgi request, making a similar interface to node's http server
async function handleCGI (handler) { const url = new URL(process.env.REQUEST_URI || `${process.env.SCRIPT_NAME}?${process.env.QUERY_STRING}`, `http://${process.env.HTTP_HOST || process.env.SERVER_NAME}/`) url.protocol = process.env.HTTPS ? 'https' : 'http' const request = { method: process.env.REQUEST_METHOD, headers: {}, url } Object.entries(process.env).forEach(([key, value]) => { if (key.startsWith('HTTP_')) { request.headers[key.slice(5).toLowerCase().replace('_', '-')] = value } }) const respond = async (status, headers, body) => { if (!Buffer.isBuffer(body)) body = Buffer.from(body, 'utf-8') const finalHeaders = { Status: status, 'Content-Length': Buffer.byteLength(body), 'Content-Type': 'text/plain; charset=utf-8', ...headers } const write = util.promisify(process.stdout.write).bind(process.stdout) await write(Object.entries(finalHeaders).map(([key, value]) => { return `${key}: ${value}\n` }).join('') + '\n') await write(body) } await handler(request, respond) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handle_incoming_request(req, res) {\r\n // get the path of the file to served\r\n var path = url.parse(req.url).pathname;\r\n // get a query (true makes sure the query string is parsed into an object)\r\n var queryObj = url.parse(req.url,\"true\").query;\r\n if (req.method.toLowerCase() == \"get\") \r\n processGet(path,queryObj,res);\r\n else if (req.method.toLowerCase() == \"post\") \r\n processPost(queryObj,req,res);\r\n else\r\n utils.sendText(res,400,\"Server accepts only GET ans POST requests\"); \r\n}", "function handleRequest(request, response){\n\t\t//console.log(request);\n\t\tif(request.url.indexOf('/api/') === -1) {\n\t\t\t// request.url = '/'\n\t\t\t// request.url = '/client.js'\n\n\t\t\tvar filename = request.url.substr(1);\n\n\t\t\t// old line: if(request.url === '/') { new line:\n\t\t\tif(request.url === '/' || (filename.length > 0 && filename[0] === '/') ||\n\t\t\tfilename.indexOf('..') !== -1) {\n\t\t\t\tfilename = 'index.html';\n\t\t\t}\n\n\t\t\tfs.readFile(filename, 'utf8', function (err,data) {\n\t \t\tif (err) {\n\t \t\t return console.log(err);\n\t \t\t}\n\t \t\tconsole.log(data);\n\t \t\tresponse.end(data);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif(request.url.indexOf('/api/send/') > -1) {\n\t\t\t//viestit.push()\n\t\t\tvar postDataString = \"\";\n\t\t\trequest.on('data', function(chunk) {\n\t postDataString = postDataString + chunk.toString();\n\t });\n\n\t request.on('end', function() {\n\t \tviestit.push(postDataString)\n\t // empty 200 OK response for now\n\t response.writeHead(200, \"OK\", {'Content-Type': 'text/html'});\n\t response.end();\n\n\t });\n\t\t}\n\n\t\tif(request.url.indexOf('/api/get/') > -1) {\n\t\t\tresponse.end(JSON.stringify(viestit));\n\t\t}\n}", "function handleRequest(request, response){\n\t//below statements are triggered (user side) when the user visits the PORT url\n\tresponse.end(\"It works. Path hit: \" + request.url);\n\n}", "function onRequest(c_req, c_res) {\n \n var parsedURL = url.parse(c_req.url);\n //console.log(\"parsed\")\n var reqOptions = {\n host: options.server,\n path: parsedURL.path,\n port: options.port,\n localport: options.local_port,\n //header: {}\n };\n console.log('Method used: ' + c_req.method);\n \n if (c_req.method == 'GET') { // When the request method is 'GET'\n \n console.log('Path used: ' + reqOptions.path);\n\n var webProxyServer = http.request(reqOptions, function (res) { // A proxy to send a request to the target server\n console.log('Requesting from: ' + reqOptions.host + reqOptions.path);\n \n if (res.statusCode >= 300 && res.statusCode <= 399) { \n console.log('300 Level Status Code.');\n c_res.end('Redirect error: ' + res.statusCode); \n } else { \n console.log('Returning response: ' + res.statusCode); // Pipe the whole server response to the client response\n res.pipe(c_res, { end: true }); \n }\n });\n // pipe the proxy to the client request\n c_req.pipe(webProxyServer, { end: true });\n console.log('Piping content...');\n } else {\n // Any request method other than 'GET' will be rejected\n c_res.end('Not \\'GET\\' method.');\n console.log('Not \\'GET\\' method requested.');\n }\n}", "function requestHandler(req, res){\n var path = url.parse(req.url).pathname; // get file path from URL\n var queryObj = url.parse(req.url,\"true\").query; // parse query in URL into an object\n\n // if given a path then call the module file server and passes it\n if (path && path.length > 1) { \n fileServer.readAndSendFile(res, \"public_html\"+path);\n }\n \n // if given a query request then it will call the corresponding server funtion\n if (queryObj.request) {\n query.processQuery(queryObj, res);\n }\n}", "function connection_handler(req, res){\n\tconsole.log(`New Request for ${req.url} from ${req.socket.remoteAddress}`);\n\tif (req.url === \"/\"){\n\t\tconst main = fs.createReadStream(\"html/main.html\");\n\t\tres.writeHead(200, {\"Content-Type\":\"text/html\"});\n\t\tmain.pipe(res);\n\t}\n\telse if (req.url.startsWith(\"/search\")){\n\t\tconst user_input = url.parse(req.url, true).query; //take an url object return a js object \n\t\tconsole.log(\"Performing PetFinder API request\");\n\t\t//POST method \n\t\tconst authentication_cache = \"./cache/authentication-res.json\";\n\t\tcache_access_token(authentication_cache, user_input, res);\n\t}\n\telse {\n\t\tres.writeHead(404, {\"Content-Type\":\"text/plain\"});\n\t\tres.write(\"404 Not Found\");\n\t\tres.end();\n\t}\n}", "function handleRequest(request, response){\n response.write(request.method + \"\\n\");\n if (request.method === \"POST\") {\n request.on('data', function(data) {\n response.write(data);\n });\n request.on('end', function() {\n response.end('\\nWorker worked');\n })\n } else {\n for (var h in request.headers) {\n response.write(h);\n response.write(\": \");\n response.write(request.headers[h]);\n response.write(\"\\n\");\n }\n response.end('\\nWorker worked?');\n }\n}", "function handleRequest(request, response){\n \n\tpodatki+= \" I \";\n\tif((request.url)=='/reset'){\n\t\tpodatki=\"\";\n\t}\n\tif((request.url).indexOf('/send/')>-1){\n\t\tvar parts= (request.url).split(\"/\");\n\t\tpodatki=parts[parts.length-1];\n\t\tif(podatki.localeCompare(\"true\")==0){\n\t\t\tstatusi[0]=\"true\";\n\t\t}\n\t\telse{\n\t\t\tstatusi[0]=\"false\";\n\t\t}\n\t\tresponse.end();\n \n\t\n } \n\n if(request.url!='/'){\n console.log(\"Request handler random was called.\");\n response.writeHead(200, {\"Content-Type\": \"application/json\"});\n var indeks = -1;\n\t\tfor(var i = 0; i<clienti.length;i++){\n\t\t\tif((request.url).indexOf(clienti[i])==1){\n\t\t\t\tindeks = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//hello\n\t\tif(indeks==-1){\n\t\t\tresponse.end('Nisem nasel ' + request.url);\n\t\t}\n\t\telse{\n\t\t\tvar otherArray = { Ime: clienti[indeks], Status: statusi[indeks], Cas: \"pred 9h\"};\n\t\t\t \n\t\t\t var json = JSON.stringify({ \n\t\t\t\tOseba: otherArray, \n\t\t\t\t\n\t\t\t });\n\t\t\t response.end(json);\n\t\t}\n }\n\telse{\n\t\tresponse.end(\"Listening on \" + server_ip_address + \", server_port \" + server_port +\" \" + podatki + test2);\n\t}\n}", "function ProcessRequest(req, res) {\n if (req.method == 'POST' && req.url === '/DispatchInterface') { \n var buffer = '';\n req.on('data', function(chunk) {\n // receive the complete request\n buffer += chunk;\n });\n req.on('end', function () {\n // process the request\n func.ProcessIncomingMessage(Appts, Sess, sio, buffer, function(error,response) {\n if (error) {\n l.error(sprintf('app.js: Error from ProcessIncomingMessage: %s', error));\n res.writeHead(200, { 'content-type': 'text/plain' });\n res.end(error);\n } else {\n l.all(sprintf('app.js: ProcessIncomingMessage: %s', response));\n res.writeHead(200, {\n 'Content-Length': response.length,\n 'Content-Type': 'text/plain'}\n );\n res.end(response);\n }\n });\n });\n }\n if (req.method == 'GET' && req.url === '/DispatchInterface') {\n res.writeHead(200, { 'content-type': 'text/plain' });\n res.end('Interface ready.');\n }\n if (req.url !== '/DispatchInterface') {\n res.writeHead(401, { 'content-type': 'text/plain' });\n res.end('Not found.');\n }\n}", "function handler(request, response)\n{\n let urlObj = url.parse(request.url, true, false)\n \n\n let receivedData = \"\"\n\n //attached event handlers to collect the message data\n request.on(\"data\", function(chunk) {\n receivedData += chunk\n })\n\n //event handler for the end of the message\n request.on(\"end\", function() {\n \n\n if (request.method == \"GET\") {\n //handle GET requests as static file requests\n fs.readFile(ROOT_DIR + urlObj.pathname, (err, data)=> {\n if (err) {\n //report error to console\n console.log(\"ERROR: \" + JSON.stringify(err))\n //respond with not found 404 to client\n response.writeHead(404)\n response.end(JSON.stringify(err))\n return\n }\n response.writeHead(200, {\n \"Content-Type\": get_mime(urlObj.pathname)\n })\n response.end(data)\n })\n }\n })\n }", "function handleRequest(request, response) {\n\n // Send the below string to the client when the user visits the PORT URL\n response.end(\"It Works!! Path Hit: \" + request.url + \"YOU ROCK!\");\n}", "function requestHandler(request, response) {\n if (request.url == \"/\") {\n response.end(\"Welcome!\");\n } else if (request.url == \"/urls\") {\n response.end(\"www.lighthouselabs.ca\\nwww.google.com\");\n } else {\n response.statusCode = 404;\n response.end(\"Unknown Path\");\n }\n} //this send the URL and REquest method which is in our case '/'' and 'GET'", "function requestHandler1(req,res)\n{\n console.log(req.url); // return request url or searching url\n\n res.writeHead(200,{'content-type':'text/html'});\n res.end('hello browser'); // send simple response to browser\n res.end('<h1>hello browser</h1>'); // send html response to the browser\n}", "process(req, res){}", "function onRequest(request, response) {\n var postData = \"\";\n\n // if request url ends with .css\n if (request.url.indexOf('.css') != -1) {\n // then send styles.css file to user\n fs.readFile(\n __dirname + '/../view/styles.css',\n function (error, data) {\n if (error) throw error;\n response.writeHead(200, {'Content-Type': 'text/css'});\n response.write(data);\n response.end();\n }\n );\n }\n\n // if request url ends with .js\n if (request.url.indexOf('.js') != -1) {\n // then send javascript file to user\n fs.readFile(\n __dirname + '/../view/scripts.js',\n function (error, data) {\n if (error) throw error;\n response.writeHead(200, {'Content-Type': 'text/javascript'});\n response.write(data);\n response.end();\n }\n );\n }\n\n // get pathname part from request url\n var pathname = url.parse(request.url).pathname;\n\n // if request is an image file\n if (pathname.indexOf('.jpg') != -1 || pathname.indexOf('.png') != -1 || pathname.indexOf('.gif') != -1) {\n // send it to user\n fs.readFile(\n __dirname + '/../view' + pathname,\n function (error, data) {\n if (error) throw error;\n response.writeHead(200, {'Content-Type': 'text/image'});\n response.write(data);\n response.end();\n }\n );\n }\n\n // if we handle a POST request\n if (request.method == 'POST') {\n\n // assign event listener to get POST data\n request.addListener(\"data\", function (chunk) {\n postData += chunk;\n });\n\n // assign event listener to process received POST data\n request.addListener(\"end\", function () {\n // get POST data as query string\n var data = querystring.parse(postData);\n // get cookies of the current user\n var cookies = utils.parseCookies(request);\n\n // save session id to POST data\n data['sid'] = cookies['sessionid'];\n\n // invoke request handler for request path\n route(handle, pathname, response, request, data);\n });\n } else {\n // all other request are GET requests, so process them with\n // no additional tasks\n route(handle, pathname, response, request, null);\n }\n }", "function handleRequest(req, res) {\n var endpoints = {\n '/': handleAppHtml,\n '/appjs': handleAppJs,\n '/appcss': handleAppCss,\n '/clearDrawing': handleClearDrawing,\n '/connect': handleConnect,\n '/favicon.ico': handleFavicon,\n '/name': handleName,\n '/message': handleMessage,\n '/notifier': handleNotifier,\n '/point': handlePoint\n };\n\n // Determine the client's id, if it has one, and look up the 'client' object\n // which represents it.\n var id = req.headers['user-identity'];\n if (id) {\n var client = clients[id];\n if (!client) {\n client = makeClient(id);\n clients[id] = client;\n }\n client.requestCount++;\n }\n\n // Lookup and call a handler for this request.\n callHandler();\n\n\n function callHandler() {\n var handler = endpoints[req.url];\n if (handler) {\n debug('Handling ', req.url);\n\n if (req.method == 'POST') {\n parseIncomingJson(function(err, obj) {\n if (!err) {\n handler(obj);\n }\n else {\n emitJson({error: true, message: 'Server error handling request.'});\n }\n });\n }\n else {\n handler();\n } \n }\n else {\n handlerNotFound();\n } \n }\n\n function handlerNotFound() {\n debug('Handler not found for ', req.url);\n res.writeHead(404, {'content-type': 'text/plain'});\n res.end('These are not the droids you are looking for: ' + req.url);\n }\n\n // --- begin handlers ---\n\n function handleAppCss() {\n emitFile(appCssPath, 'text/css');\n }\n\n function handleAppHtml() {\n emitFile(appHtmlPath, 'text/html');\n }\n\n function handleAppJs() {\n emitFile(appJsPath, 'application/javascript');\n }\n\n function handleClearDrawing() {\n currentPoints = [];\n notifyAllClients({message: client.name + ' cleared the canvas.'});\n notifyAllClients({clearCanvas: true});\n emitJson({ok: true});\n }\n\n function handleConnect() {\n var msg = {ok: true, message: 'Connected to server as ' + client.name, presentation: 'log'};\n if (currentPoints.length) {\n msg.queue = [];\n currentPoints.forEach(function(point) {\n msg.queue.push({drawPoint: point});\n });\n }\n emitJson(msg);\n notifyAllClients({message: client.name + ' connected!'});\n }\n\n function handleFavicon() {\n // Just emit a simple 404 when the browser requests favicon.ico.\n res.writeHead(404);\n res.end();\n }\n\n function handleMessage(obj) {\n var notifyText = '<b>' + client.name + '</b>: ' + obj.text;\n emitJson({ok: true});\n notifyAllClients({message: notifyText});\n }\n\n function handleName(obj) {\n var oldName = client.name;\n client.name = obj.name;\n emitJson({ok: true});\n notifyAllClients({message: oldName + ' is now known as ' + client.name});\n }\n\n function handleNotifier() {\n client.response = res;\n processMessageQueue(client);\n }\n\n function handlePoint(obj) {\n emitJson({ok: true});\n currentPoints.push(obj.point);\n notifyAllClients({drawPoint: obj.point}, client);\n }\n\n // --- end handlers ---\n\n // --- begin output helpers ---\n\n function emitFile(filename, mimetype) {\n fs.readFile(filename, function(err, data) {\n res.writeHead(200, {'content-type': mimetype});\n res.end(data);\n });\n }\n\n function emitJson(obj) {\n res.writeHead(200, {'content-type': 'application/json'});\n res.end(JSON.stringify(obj));\n }\n\n function notifyAllClients(obj, except) {\n //debug('Notifying all clients: ', obj);\n\n for (var key in clients) {\n var cli = clients[key];\n if (cli === except) {\n cli.messageQueue.push('{}');\n }\n else {\n cli.messageQueue.push(obj);\n }\n processMessageQueue(cli);\n }\n }\n\n function processMessageQueue(cli) { \n if (cli.response && cli.messageQueue.length > 0) {\n if (cli.messageQueue.length == 1) {\n var msg = cli.messageQueue[0];\n cli.messageQueue = [];\n }\n else {\n var msg = {queue: cli.messageQueue};\n cli.messageQueue = [];\n }\n\n debug('Notifying ', cli.id, ' that ', msg);\n\n cli.response.writeHead({'content-type': 'application/json'});\n cli.response.end(JSON.stringify(msg));\n cli.response = null;\n }\n }\n\n // --- end output helpers ---\n\n // --- begin other helpers ---\n function parseIncomingJson(cb) {\n var data = '';\n\n req\n .on('data', function(chunk) {\n data += chunk;\n })\n .on('end', function() {\n debug('Data: ', data);\n try {\n cb(null, JSON.parse(data));\n }\n catch(e) { \n debug('Error parsing incoming JSON data: ', data);\n cb('Error parsing incoming JSON data');\n }\n });\n }\n}", "function serverHandler(request, response) {\n try {\n console.log('request received: ' + request.url);\n\n if(request.url === '/') {\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end(fs.readFileSync('../client/index.html'));\n } else if(request.url === '/webrtc.js') {\n response.writeHead(200, {'Content-Type': 'application/javascript'});\n response.end(fs.readFileSync('../client/webrtc.js'));\n }else if(request.url === '/index2.css') {\n response.writeHead(200, {'Content-Type': 'application/javascript'});\n response.end(fs.readFileSync('../client/index2.css'));\n }\n else{\n request.end();\n }\n } catch (e) {\n response.writeHead(404, {\n 'Content-Type': 'text/plain'\n });\n response.write('<h1>Unexpected error:</h1><br><br>' + e.stack || e.message || JSON.stringify(e));\n response.end();\n }\n}", "function handleRequest(request, response){\n response.end('It Works!! Path Hit: ' + request.url);\n\tconsole.log(request);\n\tconsole.log(response);\n\tcontact_remote();\n}", "function onRequest(request, response) {\n\t\t// fill out a simple 'hello world'.\n\t\t/*\n\t\tres.writeHead(200, {\"Content-Type\": \"text/plain\"});\n\t\tres.write(\"Hello World\");\n\t\tres.end();\n\t\t*/\n\t\tif (!router.resolve(request, response))\n\t\t\tfileServer(request, response);\n\t}", "function onRequest ( request, response ){\n\n response.writeHead(200, {'Content-type': 'text/plain'});\n response.write('hello world alex into a server');\n response.end();\n}", "function HandleClientRequest(request)\n{\n try {\n var connection = request.accept(\"cute\", request.origin);\n\n // add new connection to our list\n conn[conn.length] = connection;\n connection.cuteName = GetAddr(request);\n\n // define a few member functions\n connection.Activate = Activate;\n connection.SendData = function(str) { this.send(str, function ack(error) { }) };\n connection.Respond = function() {\n this.SendData('C <span class=res>'+EscapeHTML(Array.from(arguments).join(' '))+'</span><br/>');\n };\n connection.Log = function() {\n Log('['+this.cuteName+'] '+Array.from(arguments).join(' '));\n };\n connection.HandleServerCommand = HandleServerCommand;\n\n // handle all messages from users here\n connection.on('message', function(message) { this.HandleServerCommand(message) });\n\n connection.on('close', function(reason) {\n // close user connection\n for (var i=0; i<conn.length; ++i) {\n if (conn[i] == this) {\n this.Log('Closed connection');\n conn.splice(i,1); // remove from list\n break;\n }\n }\n });\n\n // send opening message to our client\n connection.Respond(kBanner);\n connection.Respond('(' + foundAVRs, 'AVRs connected)');\n\n connection.Log('Connected'); // log this connection\n\n // send message indicating whether or not we are active\n connection.SendData('D ' + active);\n // send current motor state\n connection.SendData('E ' + lastSpd);\n\n // send measurement history (packet \"B\")\n for (var i=history.length-1; i>=0; --i) {\n if (history[i].length < 3) continue; // (don't send empty entries)\n connection.SendData('B ' + ((historyTime - i) % kPosHisLen) +\n ' ' + history[i].join(' '));\n }\n }\n catch (err) {\n Log('Error handling client request');\n }\n}", "function homeRoute(request, response) {\n if(request.url === \"/\"){\n if(request.method.toLowerCase() === \"get\"){\n response.writeHead(200, {'Content-Type' : 'text/plain'});\n //setInterval(function () {\n response.write(\"1 \\n\");\n response.write(\"2 \\n\");\n response.write(\"3 \\n\");\n response.end('end get');\n } else{\n response.writeHead(200, {'Content-Type' : 'text/plain'});\n request.on(\"data\", function(postBody){\n console.log(postBody.toString());\n });\n response.end('end post');\n //console.log(response.head);//\n \n }\n\n\n }\n\n}", "function handleRequest1(request, response) {\n\n // Send the below string to the client when the user visits the PORT URL\n response.end(\"That hat looks great on you!\");\n}", "function onRequest(sekiRequest, sekiResponse) {\n\tverbosity(\"SEKI REQUEST HEADERS \" + JSON.stringify(sekiRequest.headers));\n\tverbosity(\"REQUEST URL = \" + sekiRequest.url);\n\tverbosity(\"REQUEST METHOD = \" + sekiRequest.method);\n\n\t// check for corresponding files on the filesystem\n\tif (sekiRequest.method == \"GET\") {\n\t\tfile.serve(sekiRequest, sekiResponse, function(err, res) {\n\t\t\tif (err) { // the file doesn't exist, leave it to Seki\n\t\t\t} else { // The file was served successfully\n\t\t\t\tverbosity(sekiRequest.url + \" - \" + res.message);\n\t\t\t}\n\t\t});\n\t}\n\n\tverbosity(\"got past file server\");\n\n\t// handle admin requests/commands\n\tif (sekiRequest.method == \"POST\") {\n\t\tif (sekiRequest.url.substring(0, 7) == \"/admin/\") {\n\t\t\tvar command = sekiRequest.url.substring(7);\n\t\t\tvar admin = new Admin(sekiRequest, sekiResponse);\n\t\t\tif (admin[command]) {\n\t\t\t\tsekiResponse.writeHead(202, sekiHeaders);\n\t\t\t\tsekiResponse.end(\"202 Accepted for command '\" + command + \"'\");\n\t\t\t\tadmin[command](); // perhaps this should spawn a separate OS\n\t\t\t\t\t\t\t\t\t// process?\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tsekiResponse.writeHead(404, sekiHeaders);\n\t\t\t\tsekiResponse.end(\"404 Not Found. Admin command '\" + command\n\t\t\t\t\t\t+ \"' unknown\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// the client that will talk to the SPARQL server\n\tvar client = http.createClient(config.sparqlPort, config.sparqlHost);\n\n\t// the URI used in the RDF\n\tvar resource = config.uriBase + sekiRequest.url;\n\tvar accept = sekiRequest.headers[\"accept\"];\n\n\tif (accept && accept.indexOf(\"application/json\") == 0) {\n\t\tvar handler = new JSONHandler();\n\t\treturn handler[sekiRequest.method]();\n\t}\n\t// verbosity(\"Accept header =\" + accept\n\t// + accept.indexOf(\"application/rdf+xml\" == 0));\n\n\t// TODO pull these out into separate per-media type handlers\n\t// use pattern as for JSONHandler\n\tif (sekiRequest.method == \"GET\") {\n\n\t\tif (accept && accept.indexOf(\"text/turtle\") == 0) {\n\t\t\tverbosity(\"text/turtle requested\");\n\t\t\tvar handler = new TurtleHandler();\n\t\t\thandler.GET(resource, sekiResponse);\n\t\t\treturn;\n\t\t}\n\n\t\t// Assume HTML is acceptable\n\n\t\t// build the query\n\t\tvar queryTemplater = templater(sparqlTemplates.itemTemplate);\n\t\tvar replaceMap = {\n\t\t\t\"uri\" : resource\n\t\t};\n\t\tvar sparql = queryTemplater.fillTemplate(replaceMap);\n\n\t\t// build the URL from the query\n\t\tvar queryPath = config.sparqlQueryEndpoint + \"?query=\" + escape(sparql);\n\n\t\t// make the request to the SPARQL server\n\t\tvar clientRequest = client.request(\"GET\", queryPath, sparqlHeaders);\n\n\t\t// verbosity(\"QUERY = \"+sparql);\n\n\t\t// handle the response from the SPARQL server\n\t\tclientRequest.on('response', function(queryResponse) {\n\t\t\tserveHTML(resource, sekiResponse, queryResponse);\n\t\t});\n\n\t\t// finish up\n\t\tsekiRequest.on('end', function() {\n\t\t\t// verbosity(\"End of sekiRequest\");\n\t\t\tclientRequest.end();\n\t\t});\n\t\treturn;\n\t}\n\n\tif (sekiRequest.method == \"POST\") {\n\t\t// verbosity(\"Start of POST\");\n\n\t\t/*\n\t\t * start building query - but it needs the data supplied in the body of\n\t\t * the request by the browser\n\t\t */\n\t\tvar queryTemplater = templater(sparqlTemplates.insertTemplate);\n\t\tvar post_body = '';\n\n\t\t// request body may come in chunks, join them together\n\t\tsekiRequest.on('data', function(chunk) {\n\t\t\tpost_body += chunk;\n\t\t});\n\n\t\t// now received body of request\n\t\tsekiRequest.on('end', function() {\n\n\t\t\t// turn the POST parameters into JSON\n\t\t\tvar replaceMap = qs.parse(post_body);\n\t\t\treplaceMap[\"date\"] = new Date().toJSON();\n\n\t\t\t// verbosity(\"ReplaceMap = \"+JSON.stringify(replaceMap));\n\n\t\t\t// can now make the query\n\t\t\tvar sparql = queryTemplater.fillTemplate(replaceMap);\n\n\t\t\t/*\n\t\t\t * make the request to the SPARQL server the update has to be POSTed\n\t\t\t * to the SPARQL server\n\t\t\t */\n\t\t\tvar clientRequest = client.request(\"POST\",\n\t\t\t\t\tconfig.sparqlUpdateEndpoint, postHeaders);\n\n\t\t\t// send the update query as POST parameters\n\t\t\tclientRequest.write(qs.stringify({\n\t\t\t\t\"update\" : sparql\n\t\t\t}));\n\n\t\t\t// verbosity(queryPath);\n\t\t\t// verbosity(post_body);\n\t\t\t// verbosity(sparql);\n\n\t\t\tclientRequest.end();\n\n\t\t\t// handle the response from the SPARQL server\n\t\t\tclientRequest.on('response', function(queryResponse) {\n\n\t\t\t\tvar relativeUri = replaceMap.uri\n\t\t\t\t\t\t.substring(config.uriBase.length);\n\n\t\t\t\t// do a redirect to the new item\n\t\t\t\tsekiHeaders2[\"Location\"] = relativeUri;\n\t\t\t\tsekiResponse.writeHead(303, sekiHeaders2);\n\t\t\t\t// all done\n\t\t\t\tsekiResponse.end();\n\t\t\t});\n\t\t});\n\t}\n}", "async send(request, response) {}", "function handleGetRequest(request, response){ \n var dataAfterIndex = request.url.indexOf(\"?\");\n var cutDownUrl = request.url; \n var getObject = null;\n\n // Get the data send with the url\n if(dataAfterIndex != -1) {\n var getObject = queryParser.parse(cutDownUrl.substring(dataAfterIndex + 1));\n cutDownUrl = cutDownUrl.substring(0, dataAfterIndex);\n }\n\n switch(cutDownUrl)\n {\n // Do a homepage request\n case \"/\" : fileManager.loadFile(homepage, response);\n break;\n // Do a arduino request for the weather (close response when data is collected)\n case \"/arduino/weather\": recieveWeatherData(response, getObject);\n return;\n // Do a request for all the boat names\n case \"/client/boats\": dbRoute.getBoatNames(response);\n break;\n // Do a request for location information about one boat\n case \"/client/boatlocation\": loadCacheAndRespond(response, getObject);\n break;\n // Do a request for the status of the boat (by checking distance)\n case \"/client/boatstatus\": getDistanceBetweenBoatAndBase(response, getObject)\n break;\n // Do a request for all the routes that have been done today\n case \"/client/boatroutes\": dbRoute.getDailyRoutes(response);\n break;\n // Do a request for all locations of a route\n case \"/client/completeroute\": getAllLocationsOfRoute(response, getObject);\n break;\n // Do a request for specific resources\n default : fileManager.loadFile(request.url.substring(1), response);\n }\n}", "function handleRequest(request,response){\n response.end(\"It works!!! Path Hit: \" + request.url);\n}", "requestReceived(request,response){\n if(this.config.log){\n const logData={\n method : request.method,\n url : request.url,\n headers : request.headers\n };\n\n this.config.logFunction(\n logData\n );\n }\n\n let uri = url.parse(request.url);\n uri.protocol='http';\n uri.host=uri.hostname=request.headers.host;\n uri.port=80;\n uri.query=querystring.parse(uri.query);\n\n if(request.connection.encrypted){\n uri.protocol='https';\n uri.port=443;\n }\n\n (\n function(){\n if(!uri.host){\n return;\n }\n const host=uri.host.split(':');\n\n if(!host[1]){\n return;\n }\n uri.host=uri.hostname=host[0];\n uri.port=host[1];\n }\n )();\n\n for(let key in uri){\n if(uri[key]!==null){\n continue;\n }\n uri[key]='';\n }\n\n request.uri=uri;\n\n if(\n this.onRawRequest(\n request,\n response,\n completeServing.bind(this)\n )\n ){\n return;\n };\n\n uri=uri.pathname;\n\n if (uri=='/'){\n uri=`/${this.config.server.index}`;\n }\n\n let hostname= [];\n\n if (request.headers.host !== undefined){\n hostname = request.headers.host.split(':');\n }\n\n let root = this.config.root;\n\n if(this.config.verbose){\n console.log(`${this.config.logID} REQUEST ###\\n\\n`,\n request.headers,'\\n',\n uri,'\\n\\n',\n hostname,'\\n\\n'\n );\n }\n\n if(this.config.domain!='0.0.0.0' && hostname.length > 0 && hostname[0]!=this.config.domain){\n if(!this.config.domains[hostname[0]]){\n if(this.config.verbose){\n console.log(`${this.config.logID} INVALID HOST ###\\n\\n`);\n }\n this.serveFile(hostname[0],false,response);\n return;\n }\n root=this.config.domains[hostname[0]];\n }\n\n\n if(this.config.verbose){\n console.log(`${this.config.logID} USING ROOT : ${root}###\\n\\n`);\n }\n\n if(uri.slice(-1)=='/'){\n uri+=this.config.server.index;\n }\n\n request.url=uri;\n request.serverRoot=root;\n\n request.body='';\n\n request.on(\n 'data',\n function(chunk){\n request.body+=chunk;\n }.bind(this)\n ).on(\n 'end',\n function(){\n if(this.config.verbose){\n console.log(`###REQUEST BODY :\n ${request.body}\n ###\n `);\n }\n\n requestBodyComplete.bind(this,request,response)();\n }.bind(this)\n );\n }", "function handleRequest(request, response) {\n\n // Send the below string to the client when the user visits the PORT URL\n response.end(\"It Works!! Path Hit: \" + request.url + \"YOU LUCKED OUT\");\n }", "function onRequest(request, response){\n\tvar command = \trequest.headers[\"command\"]\n\tvar deviceIP = \trequest.headers[\"tuyapi-ip\"]\n\t\n\tvar cmdRcvd = \"\\n\\r\" + new Date() + \"\\r\\nIP: \" + deviceIP + \" sent command \" + command\n\t//var cmdRcvd = \"\\n\\r\" + new Date() + \"\\r\\n sent command \" + command\n\tconsole.log(\" \")\n\tconsole.log(cmdRcvd)\n\t\t\n\tswitch(command) {\n\t\t//---- (BridgeDH - Poll for Server APP ------------------\n\t\tcase \"pollServer\":\n\t\t\tresponse.setHeader(\"cmd-response\", \"ok\")\n\t\t\tresponse.end()\n\t\t\tvar respMsg = \"Server Poll response sent to SmartThings\"\n\t\t\tconsole.log(respMsg)\n\t\tbreak\n\n\t\t//---- Device Command ---------------------------\n\t\tcase \"deviceCommand\":\n\t\t\tprocessDeviceCommand(request, response)\n\t\t\tbreak\n\t\n\t\tdefault:\n\t\t\tresponse.setHeader(\"cmd-response\", \"InvalidHubCmd\")\n\t\t\tresponse.end(\"no command\")\n\t\t\tvar respMsg = \"#### Invalid Command ####\"\n\t\t//\tvar respMsg = new Date() + \"\\n\\r#### Invalid Command from IP\" + deviceIP + \" ####\\n\\r\"\n\t\t\tconsole.log(respMsg)\n\t\t\tlogResponse(respMsg)\n\t}\n}", "function handleRequest(request, response){\n\tvar urlData = url.parse(request.url, true);\n\tvar parameters = urlData.query;\n\n\t//check if the url is valid \n\t//we activate the server\n\t//we connect to a page called http://localhost:8080/chat.html\n\tif(urlData.pathname == \"/chat.html\"){\n\t\tresponse.writeHead(200, {'Content-Type': 'text/html'});\n\t\t//this is us telling the server this is good! ayayay\n\n\t\t//ask for a nickname if there is no nickname, show the HTML form thats gets\n\t\t//the nickname\n\t\tif(parameters.nick == undefined || parameters.nick == \"\"){\n\t\t\tvar page = \n\t\t\t\"<form>\\n\" +\n\t\t\t\"<div>Nickname:</div>\" + \n\t\t\t\"<div><input type=\\\"text\\\" name=\\\"nick\\\" autofocus>&nbsp;<button>Chat!</button></div>\\n\" +\n\t\t\t\"</form>\";\n\t\t\tresponse.end(formatAsHtml(page));\n\t\t}//end if nickname check\n\t\t//if there is already a nickname then proceed to else below\n\t\telse{\n\t\t\t//if there is already a nickname then proceed with chat but we need to check\n\t\t\t//if there is a message, add it to the array \n\t\t\tif(parameters.msg !== undefined && parameters.msg !== \"\")\n\t\t\t\tmessages.push(parameters.nick + \": \" + parameters.msg);\n\t\t\t // Jordan: hello? \n\t\t\t //Jordan is nick hello? is the msg\n\n\t\t\t //we need to display the contents of the array \n\t\t\t var page = \"\";\n\t\t\t //we use a for loop to display the contents of the array of messages \n\t\t\t for(var i = messages.length; i< 20; i++)\n\t\t\t \t//this creates the new line when a message pops up\n\t\t\t \tpage += \"<div>&nbsp;</div>\\n\";\n\t\t\t var startIndex = 0;\n\t\t\t if(messages.length > 20)\n\t\t\t \tstartIndex = messages.length - 20;\n\t\t\t //iterate through the messages inside the array \n\t\t\t for(var i = startIndex; i < messages.length; i++)\n\t\t\t \tpage += \"<div>\" + messages[i] + \"</div>\\n\";\n\t\t\t page +=\n\t\t\t\t \"<form>\\n\" +\n\t \t\t\"<input type=\\\"hidden\\\" name=\\\"nick\\\" value=\\\"\" + parameters.nick + \"\\\">\\n\" +\n\t \t\t\"<div>Message:&nbsp;<input type=\\\"text\\\" name=\\\"msg\\\" autofocus>&nbsp;\" +\n\t \t\t\"<button>Send</button></div>\\n\" +\n\t \t\t\"</form>\\n\" +\n\t \t\t\"<div><a href=\\\"/chat.html\\\">Log out</a></div>\";\n \t\tresponse.end(formatAsHtml(page));\n\t\t}//end else nickname check nickname is already there \n\t}//end if urldatapathname\n\telse{\n\t\tresponse.writeHead(404,{'Content-Type': 'text/html'});\n\t\tresponse.write(formatAsHtml(\"<div>Page not found awee! </div>\"));\n\t\tresponse.end();\n\t}//end else\n}//end function handleRequest", "function getCGI(response, filename){\n \tchild_process(response, filename);\n}", "function processIncoming(req, res, next) {\n relay(req.params);\n // send back something to the client\n res.send('{ \"ok\" : \"true\" }');\n}", "function handleRequest1(request, response){\n\n //send the below string to the client when the user visits the PORT1 URL\n response.end(\"You are awesome! This works: \" + request.url);\n}", "function handleRequest(request, response){\n\ttry {\n\t\tif(request.url==\"/\"){\n\t\t\tresponse.end(\"AUTHY SERVER RUNNING....\");\n\t\t\treturn;\n\t\t}\n //log the request on console\n console.log(request.url);\n //Disptach the request to handle different URL paths\n dispatcher.dispatch(request, response);\n } catch(err) {\n console.log(err);\n response.end(\"ERROR \"+err.message);\n }\n}", "parseRequest(req, res) {\r\n let data = [];\r\n req.on('data', (chunk) => {\r\n data.push(chunk);\r\n }).on('end', () => {\r\n const body = Buffer.concat(data).toString();\r\n this.handleRequest(body, res);\r\n });\r\n }", "function onRequest(request, response){\n //The '/' means the homepage\n if(request.method == 'GET' && request.url == '/'){\n response.writeHead(200, {\"Content-Type\": \"text/html\"});\n //sends out response through pipe\n fs.createReadStream('./index.html').pipe(response);\n }\n else{\n send404(response);\n }\n}", "function handler( request, response ){\n // Request the Index\n if( request.url == '/' || request.url == '/index' ){\n fs.readFile( __dirname + '/index.html', \n function( err, data ){\n if( err ){\n response.writeHead( 500 );\n return response.end( 'Error loading index.html' );\n }\n\n // Write page to client\n response.writeHead( 200 );\n response.end( data );\n });\n }\n else if(request.url == '/client_room.js' ){\n fs.readFile( __dirname + '/client_room.js', \n function( err, data ){\n if( err ){\n response.writeHead( 500 );\n return response.end( 'Error loading client_room.js' );\n }\n\n // Write page to client\n response.writeHead( 200 );\n response.end( data );\n });\n }\n else if(request.url == '/style.css' ){\n fs.readFile( __dirname + '/style.css', \n function( err, data ){\n if( err ){\n response.writeHead( 500 );\n return response.end( 'Error loading style.css' );\n }\n\n // Write page to client\n response.writeHead( 200 );\n response.end( data );\n });\n }\n}", "function reqHandler (req, res){\n console.log(\"Incoming request on:\" + req.url);\n res.end(\"Hello, Hiu!\");\n}", "function handleRequest(request, response){\n // response.end('It Works!! Path Hit: ' + request.url);\n var parts = url.parse(request.url, true);\n \tconsole.log(parts);\n \t\n \tvar query = parts.query;\n \n \t// console.log(query);\n\n\n \tif (1==2){//{parts.partname.substr(1,parts.partname.length -1) == 'favicon.ico'){\n\n \t}else{\n \t\tvar routeHandle = require(\"./route/routeHandle\");\n\t var routepath = parts.pathname;\n\t// console.log('routepath %s', routepath);\n\t// console.log(parts);\n\t// // \tconsole.log(routepath); \n\t \troutearr = routepath.split('/');\n\t // console.log(\"controller %s action %s\", routearr[1], routearr[2]);\n\t var controller = routearr[1],\n\t \taction = routearr[2];\n\t routeHandle.route(request, response, controller, action, parts.query);\n\t \n\t \t// response.writeHead(200, {'Content-Type': 'text/html'});\n\t // response.end(\"<html><body>Hello Node</body></html>\");\n\t}\n}", "function handleRequestOne(request, response) { //whats the request? req to the url.\n//\n // Send the below string to the client when the user visits the PORT URL\n response.end(\"You are a javascript wizard! \" + request.url);\n} //creates the strung & sends it back to the browser.", "function httpReqHandler (req, res) {\r\n\tres.writeHead(200);\r\n\tvar url = require('url') ;\r\n\tvar query = url.parse(req.url,true).query;\r\n\t// Kill all games.\r\n\tif (query.killall == 1) {\r\n\t\tGameManager.closeAll();\r\n\t}\r\n\tvar now = Date.now();\r\n\tvar status = '<h1>This server hosts JBM Space!</h1>';\r\n\tstatus += '<p>Currently hosting ' + Object.keys(GameManager.games).length + ' games:</p>';\r\n\tstatus += '<ul>';\r\n\tfor (var g in GameManager.games) {\r\n\t\tvar game = GameManager.games[g];\r\n\t\tstatus += '<li>' + game.name + ' by \"' +game.host.name+'\" with players ';\r\n\t\tfor (var p in game.players)\r\n\t\t\tstatus += p + ' ';\r\n\t\tstatus += '- Inactive for ' + (now-game.lastActivity) + 'ms';\r\n\t}\r\n\tstatus += '</ul>';\r\n\treturn res.end(status);\r\n}", "function start(route, handle){\n\n\tfunction onRequest(request, response) {\n\t\t var postData = \"\";\n\t\t var pathname = url.parse(request.url).pathname;\n\t\t console.log(\"Request for \" + pathname + \" received.\");\n\n\t\t route(handle, pathname, response, request);\n\t\t // request.setEncoding(\"utf8\"); REQUIRED for TEXT UPLOAD not file\n\n\t\t //REQUIRED for TEXT UPLOAD not file\n\t\t // request.addListener(\"data\", function(postDataChunk) {\n\t\t\t// postData += postDataChunk;\n\t\t\t// console.log(\"Received POST data chunk '\"+\n\t\t\t// postDataChunk + \"'.\");\n\t\t // });\n\n\t\t // REQUIRED for TEXT UPLOAD not file\n\t\t // request.addListener(\"end\", function() {\n\t\t // route(handle, pathname, response, postData);\n\t\t // });\n\t\t // route(handle, pathname, response); // To solve blocking and non-blocking problem\n\n\t\t // response.writeHead(200, {\"Content-Type\": \"text/plain\"})\n\t\t // response.write(\"Hello World\");\n\t\t // response.end();\n\t\t }\n\t\t http.createServer(onRequest).listen(3000);\n\n\t\t console.log(\"Server has started.\");\n\n}", "function start(route, handle) {\n\tfunction onRequest(request, response) {\n\t\t\n\t\tvar thissession = ++sessionid;\n\t\t\n\t\tvar pathname1 = url.parse(request.url).pathname;\n\t\tconsole.log(pathname1);\n\t\tvar postData=\"\";\n\t\t//var ss = new Array();\n\n\t\tvar ss = pathname1.split(\"/\");\n\t\tvar urlData = \"\";\n\t\tvar pathname = ss[1];\n\n\n\t\tif (ss.length > 1) {\n\t\t\t//postData = ss[2]; //assumes alternate delimiter of not \"/\"\n\t\t\tss.splice(1, 1);//more [/segment/segment/]\n\t\t\turlData = ss.join(\"/\");\n\t\t}\n\t\telse if (ss.length > 0)\n\t\t\turlData = ss[1];\n\n\t\tconsole.log(++concurrent + \" - Request for \" + pathname + \" postData - \" + urlData);\n\n\n\t\trequest.setEncoding(\"utf8\");\n\t\t\n\t\trequest.addListener(\"data\", function (postDataChunk) {\n\t\t\tpostData += postDataChunk;\n\t\t\t//console.log(\"Received POST data chunk len='\" + postDataChunk.length + \"'.\");\n\t\t});\n\t\t\n\t\trequest.addListener(\"end\", function () {\n\t\t\t//route(handle, pathname, response, request, urlData, JSON.parse(JSON.stringify(postData)), thissession);\n\t\t\ttry{\n\t\t\t\tvar js;\n\t\t\t\tif(postData.length>0)\n\t\t\t\t\tjs = JSON.parse(postData);\n\t\t\t\troute(handle, pathname, response, request, urlData, js, thissession);\n\t\t\t\tconsole.log(--concurrent + \" - Request for \" + pathname + \" END.\");\n\n\t\t\t\t//else{\n\t\t\t\t//\tconsole.log(--concurrent + \" - FAILED REQUEST for \" + pathname + \" No POST data END.\");\n\n\t\t\t}\n\t\t\tcatch(err){\n\t\t\t\tconsole.log(--concurrent + \" - FAILED REQUEST for \" + pathname + \"\\n\"+err+\"\\n END.\");\n\t\t\t}\n\n\t\t\t\n\t\t});\n\t\t\n\t}\n\t\n\thttp.createServer(onRequest).listen(8888);\n\tconsole.log(\"Server has started.\");\n}", "function handleRequest(request, response){\n let param = request.url.split(\"/\");\n let action = param[param.length - 1];\n if(action == \"serverInfo\") {\n let server_config = JSON.parse(g_server.config);\n let server_info = GetServer();\n\n let data = {\n name: server_info.serverName,\n maxPlayers: server_info.maxPlayers,\n serverMode: server_config.mode,\n serverMap: server_config.map,\n playersOnline: g_players.length\n };\n return response.end(JSON.stringify(data));\n return response.end(msg);\n }\n else if(action == \"playersList\") {\n let players = [];\n let msg = \"\";\n for(let p of g_players) {\n players.push({id: p.client.networkId, name: p.name});\n }\n return response.end(JSON.stringify(players));\n return response.end(msg);\n }\n return response.end(\"/serverInfo - Server info\\n/playerList - List of players\");\n }", "function onRequest(request, response){\n\tif(request.method == 'GET' && request.url =='/') {\n\t\tresponse.writeHead(200, {\"Content-Type\" : \"text/html\"});\n\t\tfs.createReadStream(\"./index.html\").pipe(response);\n\t} else {\n\t\tsend404Response(response);\n\t}\n}", "function processRequest(req, res){\n // Message string.\n var body = \"This is going to work!!!\";\n var contentLength = body.length;\n res.writeHead(200,{\n 'Content-Length':contentLength,\n 'Content-type':'text/plain'\n });\n res.end(body);\n}", "function processGetRequest(req, res) {\n console.log(\"incoming get request, serving...\");\n res.writeHead(200, {\n 'Access-Control-Allow-Origin': 'http://localhost:63342',\n 'Content-Type': 'text/event-stream',\n 'cache-control': \"no-cache\"\n });\n let currTime = new Date().getTime();\n\n // 'loop' using recursion (cannot use while loop with sleep in node.js)\n sendEvent(res, currTime);\n }", "function handleRequest(request, response){\n response.setHeader('Connection', 'Transfer-Encoding');\n response.setHeader('Content-Type', 'text/html; charset=utf-8');\n response.setHeader('Transfer-Encoding', 'chunked');\n\t\n\t//response.write('Response started, will wait 5 seconds now...<br/>');\n sleep.sleep(15)//sleep for 15 seconds\n response.write('It Works!!<br/><br/> Path Hit: ' + request.url);\n\tresponse.end();\n}", "function onRequest(req, res) {\n\n //console.log(\"Received request\\n\");\n\n var postData = '';\n \n res.writeHead(200, {'Content-Type': 'text/plain'});\n\n req.setEncoding(\"utf8\"); // post data encoding is now UTF8\n\n req.addListener(\"data\", function(postDataChunk) { // listens for the data\n postData += postDataChunk; // when a new chunk ('part') of the sent data arrives it's appended to \"postData\"\n console.log(\"Received POST data chunk:\\n'\" + postDataChunk + \"'\\n\");\n });\n\n req.addListener(\"end\", function() { // when the whole data has arrived:\n \n var requestType='', userID='', name='', message='';\n requestType = querystring.parse(postData).requestType;\n userID = querystring.parse(postData).userID;\n name = encodeHTML(querystring.parse(postData).name);\n message = encodeHTML(querystring.parse(postData).message);\n \n if (requestType && userID && name && message) {\n console.log(\"Received valid POST data:\\nrequestType='\" + requestType + \"'\\nuserID='\" + userID + \"'\\nname='\" + name + \"'\\nmessage='\" + message + \"'\\n\");\n \tif (requestType == 'save') save(userID, name, message);\n \tif (requestType == 'remove') remove(userID);\n }\n \n // function via http://css-tricks.com/snippets/javascript/htmlentities-for-javascript/ - encodes HTML tags\n function encodeHTML(text) {\n\t return String(text).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;');\n\t }\n\n \n });\n \n response(res);\n\n}", "function requestHandler (request, response) {\n\n // http responses have \"headers\" which tell the browser what kind of information to expect\n response.writeHead(200, {'Content-Type': 'text/plain'});\n\n var requestInfo = url.parse(request.url);\n if(requestInfo.path === '/')\n {\n rootHandler(request, response);\n }\n else if(requestInfo.path === '/time')\n {\n timeHandler(request, response);\n }\n}", "function onRequest(request, response) {\n //Returns the page, css, js, and favicon when requested\n if(request.url === \"/\") {\n response.writeHead(200, { \"Content-Type\" : \"text/html\"} );\n response.write(index);\n response.end();\n return;\n } else if (request.url === \"/landingstyles.css\") {\n response.writeHead(200, { \"Content-Type\" : \"text/css\"} );\n response.write(styles);\n response.end();\n return;\n } else if (request.url === \"/landing.js\") {\n response.writeHead(200, { \"Content-Type\" : \"application/javascript\"} );\n response.write(landingjs);\n response.end();\n return;\n } else if (request.url === \"/resources/favicon.png\") {\n response.writeHead(200, {\"Content-Type\" : \"image/png\"});\n response.write(favicon);\n response.end();\n return;\n }\n\n //Split after the ? mark to get the query string (key=value pairs)\n var query = request.url.split('?')[1];\n var params = queryString.parse(query);\n\n if(!params.url) {\n response.writeHead(400, responseHeaders);\n\n var responseMessage = {\n message: \"Missing url parameter in request\"\n };\n\n response.write(JSON.stringify(responseMessage));\n response.end();\n return;\n }\n\n try{\n response.writeHead(200, responseHeaders);\n requestHandler(params.url).pipe(response);\n }\n catch(exception) {\n console.dir(exception);\n response.writeHead(500, responseHeaders);\n\n var responseMessage = {\n message: \"Error connecting to server. Check url and arguments for proper formatting\"\n }\n\n response.write(JSON.stringify(responseMessage));\n response.end();\n }\n\n}", "function onRequest(c_req, c_res) {\n\n console.log('Method used: ' + c_req.method);\n\n //sleep.msleep(options.delay);\n var parsedURL = url.parse(c_req.url);\n\n var reqOptions = {\n\n host: options.server,\n path: parsedURL.path,\n port: options.port,\n localport: options.local_port,\n max_requests: options.max_requests\n };\n\n // get clients browser record\n var br_rec = c_req.headers[\"user-agent\"];\n\n // ensure this browser has its record in our browserRecords\n if (browserRecords[br_rec] === undefined) {\n browserRecords[br_rec] = [];\n }\n\n // delete the timestamps older than 10 minutes (= 10 * 60 * 1000 miliseconds)\n if (browserRecords[br_rec].length > 0 && browserRecords[br_rec][0] <= (Date.now() - (10 * 60 * 1000))) {\n browserRecords[br_rec].shift();\n }\n\n // if browser exceeds max_requests\n if (browserRecords[br_rec].length >= reqOptions['max_requests']) {\n console.log(\"Max Request limit exceeded! Connection Refused!\");\n c_res.statusCode = 429; // TOO MANY REQUESTS\n c_res.end(\"429 - MAX REQUEST EXCEEDED!\"); // end response\n return;\n }\n\n // add timestamp for the new request to browserRecords\n browserRecords[br_rec].push(Date.now());\n\n var c_data = \"\";\n\n c_req.setEncoding('binary');// allows us to get all kinds of data\n\n //storing data coming in client request in a string\n c_req.on('data', function (chunk) {\n c_data += chunk;\n });\n\n // processing the data in an event handler\n c_req.on('end', function () {\n\n reqOptions.method = c_req.method;\n reqOptions.headers = c_req.headers;\n\n reqOptions.headers['host'] = reqOptions.host + \":\" + reqOptions.port;\n\n var s_data = \"\";\n\n callbackFunc = function (res) {\n\n res.setEncoding('binary');\n\n res.on('data', function (chunk) {\n s_data += chunk;\n });\n\n res.on('end', function () {\n\n // Handling Redirect errors by parsing the new URL\n if (res.statusCode == 301 || res.statusCode == 302 || res.statusCode == 303 || res.statusCode == 307 || res.statusCode == 308) {\n var temp = url.parse(res.headers.location);\n console.log(res.headers.location);\n\n if (temp.protocol.startsWith(\"https\")) {\n\n c_res.statusCode = 405;// Method not allowed\n c_res.end(\"405 - HTTPS REDIRECT DENIED!\");// end response\n\n return;\n }\n\n reqOptions.host = temp.hostname;\n reqOptions.path = temp.path;\n reqOptions.port = temp.port;\n reqOptions.headers['host'] = temp.host + \":\" + ((temp.port == null) ? '80' : temp.port);\n\n //Since 303 error makes it a compulsion to use GET instead of POST request\n if (res.statusCode == 303) {\n reqOptions.method = \"GET\";\n c_data = \"\";\n }\n\n s_data = \"\";\n var s_req = http.request(reqOptions, callbackFunc).end(c_data, 'binary');\n }\n else {\n // No redirect ERROR\n var ext = require('path').extname(reqOptions.path);\n \n c_res.writeHead(res.statusCode, res.headers);\n c_res.end(s_data, 'binary');\n }\n });\n }\n var request = http.request(reqOptions, callbackFunc).end(c_data, 'binary');\n });\n}", "function handleRequest(request, response){\n response.end('It Works: ' + request.url);\n}", "function handleRequest(req, res) {\n\n var self = this;\n\n console.log('=======================================');\n\n var perf = (new util.performance());\n console.log('Request: ', req.method, req.url);\n req.setEncoding('utf8');\n\n // console.log(req.headers);\n\n function endRequest(){\n parseQS();\n }\n req.on('end', endRequest);\n\n function endResponse(){\n console.log('Request took ' + perf.end('ms') + ' ms');\n console.log('=======================================');\n }\n res.on('finish', endResponse);\n\n function serverError(message) {\n message = (message || \"The server experienced an internal error\\n\") + \"\";\n res.writeHead(404, {\n \"Content-Type\": \"text/plain\",\n \"Content-Length\": message.length\n });\n if (req.method !== \"HEAD\") {\n res.write(message);\n }\n self.emit('serverError');\n\n res.end();\n // console.log('=======================================');\n }\n req.on('error', serverError);\n\n var refreshCache = false;\n if (req.headers['cache-control'] == 'max-age=0') {\n refreshCache = true;\n }\n req.searchCache = require.searchCache;\n req.uncache = require.uncache;\n\n //========================== Request\n\n\n this.params = {};\n this.headers = [];\n this.body = '';\n\n var uri = url_parse(req.url);\n var path = uri.pathname;\n if (path.length > 1 && path.charAt(path.length-1) == '/') {\n path = path.slice(0, path.length - 1);\n }\n if (!path) {\n path = '/';\n }\n\n // console.log(path);\n\n var content_type = mime.getMime(path);\n // console.log(content_type);\n\n function parseQS() {\n var query = typeof uri.query == 'string' ? qs.parse(uri.query) : uri.query;\n for (var key in query) {\n if (self.params[key] !== undefined) {\n if (typeof self.params[key] != 'array') {\n self.params[key] = [self.params[key]];\n }\n self.params[key].push(query[key]);\n } else {\n self.params[key] = query[key];\n }\n }\n req.params = self.params;\n\n // console.log(self.params);\n }\n\n //Checks a Javascript object if the key exists and if the value is a match on that key. 'value' can be an array (OR query). Will partially match. Returns true || false;\n req.queryObject = function(key, value, obj){\n function test(obj, key, value) {\n if (key in obj && obj[key].indexOf(value) > -1) {\n return true\n } else {\n return false;\n }\n }\n var include = false;\n if (typeof value == 'array') {\n for (var j = 0; j < value.length; ++j) {\n if (test(obj, key, value[j])) {\n include = true;\n break;\n }\n }\n } else {\n if (test(obj, key, value)) {\n include = true;\n }\n }\n return include;\n }\n\n function onData(data) {\n console.log(\"Data received\", data);\n self.body += data;\n // Too much POST data, kill the connection!\n if (self.body.length > 1e6) {\n req.connection.destroy();\n }\n self.emit('onData');\n }\n\n function onReadable(){\n var ret = '';\n while (ret += req.read()){\n console.log(\"Readable received\", ret);\n }\n self.body += ret;\n return ret;\n }\n\n function onEnd() {\n // console.log(\"Request ending\");\n self.params = !!self.body ? qs.parse(self.body) : {};\n // console.log(self.params);\n // use self.params['blah'], etc.\n self.emit('onEnd');\n self.body = '';\n\n parseQS();\n emitResponse.call(self, req, res);\n }\n\n if (req.url === '/favicon.ico') {\n res.writeHead(200, {'Content-Type': 'image/x-icon'} );\n res.end();\n // console.log('favicon requested');\n return;\n }\n\n if (req.method == 'POST') {\n req.on('data', onData);\n // req.on(\"readable\", onReadable);\n req.on('end', onEnd);\n } else {\n parseQS();\n emitResponse.call(self, req, res);\n }\n\n //========================== Response\n\n res.redirect = function redirect(location) {\n res.writeHead(302, {\"Location\": location});\n res.end();\n }\n\n function emitResponse(req, res) {\n\n // console.log(\"Emitting response\");\n\n var self = this;\n\n function notFound(message) {\n message = (message || \"Not Found\\n\") + \"\";\n res.writeHead(404, {\n \"Content-Type\": \"text/plain\",\n \"Content-Length\": message.length\n });\n if (req.method !== \"HEAD\") {\n res.write(message);\n }\n self.emit('notFound');\n\n res.end();\n // console.log('=======================================');\n }\n\n function simpleResponse(code, body, content_type, extra_headers) {\n body = body || \"\";\n res.writeHead(code, (extra_headers || []).concat(\n [ [\"Content-Type\", content_type],\n [\"Content-Length\", Buffer.byteLength(body, 'utf8')]\n ]));\n if (req.method !== \"HEAD\")\n res.write(body, 'utf8');\n res.end();\n }\n\n res.simpleText = function (code, body, extra_headers) {\n simpleResponse(code, body, \"text/plain\", (extra_headers || []).concat(self.headers));\n };\n\n res.simpleHtml = function (code, body, extra_headers) {\n simpleResponse(code, body, \"text/html\", (extra_headers || []).concat(self.headers));\n };\n\n res.simpleJson = function (code, json, extra_headers) {\n simpleResponse(code, JSON.stringify(json), \"application/json\", (extra_headers || []).concat(self.headers));\n };\n\n res.notFound = function (message) {\n notFound(message);\n };\n\n res.onlyHead = function (code, extra_headers) {\n res.writeHead(code, (extra_headers || [])\n .concat(self.headers)\n .concat(\n [[\"Content-Type\", content_type]]\n )\n );\n res.end();\n }\n\n // console.log(util.inspect(self, { showHidden: true, depth: 4 }));\n // res.simpleJson(200, {test:true});\n // return;\n\n var controllerPath = '';\n var resourceId = 0;\n controllerPath = path.split('/');\n\n if (!!controllerPath[controllerPath.length-1]\n && !isNaN(parseInt(controllerPath[controllerPath.length-1]))) {\n resourceId = parseInt(controllerPath[controllerPath.length-1]);\n controllerPath = controllerPath.slice(0, controllerPath.length-1).join('/');\n } else {\n controllerPath = path;\n resourceId = 0;\n }\n\n // console.log(controllerPath);\n\n var RESPONSE_TYPE = {\n JSON : 1,\n MODULE : 2,\n HTML : 3,\n CONTROLLER : 4,\n OTHER : 5\n }\n\n var resourcePath = '';\n var resourceType = 0;\n\n if (req.method == \"GET\" && fs.existsSync('.' + path + '.json')) {\n resourcePath = '.' + path + '.json';\n resourceType = RESPONSE_TYPE.JSON;\n } else if (fs.existsSync('./public' + path) && fs.statSync('./public' + path).isFile()) {\n resourcePath = './public' + path;\n resourceType = RESPONSE_TYPE.HTML;\n } else if (fs.existsSync('.' + path + '.js')) {\n resourcePath = '.' + path + '.js';\n resourceType = RESPONSE_TYPE.MODULE;\n } else if (req.method != \"GET\" && fs.existsSync('.' + controllerPath + '.js')) {\n resourcePath = '.' + controllerPath + '.js';\n req.params.resourceId = resourceId;\n resourceType = RESPONSE_TYPE.MODULE;\n } else if (path.charAt(path.length-1) == '/') {\n if (fs.existsSync('./public' + path + 'index.html')) {\n resourcePath = './public' + path + 'index.html';\n resourceType = RESPONSE_TYPE.HTML;\n } else {\n self.body = \"<h1>No index file found. Please place an index.html file in \"+'./public' + path+\"</h1>\";\n res.simpleHtml(200, self.body);\n return;\n }\n }\n\n if (refreshCache) {\n // require.uncache(resourcePath);\n console.log('Cache max-age set to 0');\n }\n\n if (path.indexOf('lib/') > -1) {\n resourcePath = '';\n resourceType = 0;\n // console.log(\"whoops\")\n }\n\n switch(resourceType) {\n case RESPONSE_TYPE.JSON :\n res.simpleJson(200, require(resourcePath));\n break;\n case RESPONSE_TYPE.MODULE :\n var controller = require(resourcePath).Controller;\n // console.log(controller);\n res.simpleJson(200, controller[req.method.toLowerCase()](req, res) );\n break;\n case RESPONSE_TYPE.HTML :\n var content_type = mime.getMime(resourcePath);\n self.body = fs.readFileSync(resourcePath, {encoding: 'utf8'});\n simpleResponse(200, self.body, content_type);\n break;\n case RESPONSE_TYPE.OTHER :\n break;\n default :\n res.notFound('That resource doesn\\'t exist');\n break;\n }\n }\n}", "function requestHandler(req, res){ // function handles request givin to server\r\n \r\n console.log(req.url); // req.url gives the url requested by client ex.-> /profile\r\n res.writeHead(200, {'content-type':'text/html'}); // 200 is number tag for sucesssful, 404 for errors.... object contains data for output \r\n\r\n let pageloc; //we will location of the required page here\r\n switch(req.url){\r\n case \"/\" :\r\n pageloc= 'index.html';\r\n break;\r\n case \"/profile\":\r\n pageloc= 'profile.html';\r\n break;\r\n default:\r\n pageloc= 'error.html'\r\n }\r\n\r\n fs.readFile(pageloc, function(error, data){ // reading the file index.html (error for an error in reading)\r\n if(error){\r\n return res.end('<h1>no page location found</h1>'); //return this html to it if wrong file \r\n }\r\n else{\r\n return res.end(data); // return data containing html from the location \r\n }\r\n });\r\n}", "function handleRequest(req, res){\n try {\n // if the request is POST and has the right URL pass to next function to process further\n if(req.method === 'POST' && req.url === '/allocatestream') {\n var buffer = '';\n var requestBody;\n //as data comes read the buffer and store to jsonString\n req.on('data', function(data) {\n buffer += data;\n });\n\n req.on('end', function () {\n try {\n requestBody = JSON.parse(buffer);\n }\n catch (ex) {\n requestBody = \"\";\n }\n //response will always be encoded as json\n res.setHeader('Content-Type', 'application/json');\n // first check if request is parsed correctly\n if(requestBody != \"\") {\n //passRequest takes request body and the response\n passRequest(requestBody, res);\n }\n // return 400 and error message for malformed or null request body\n else {\n res.statusCode = 400;\n res.end(JSON.stringify(inValidRequestErrorMessage));\n }\n });\n }\n } catch (error) {\n console.log(error);\n }\n}", "function on_request(request, response) {\n console.log(\"Hey! I got a request\");\n console.log(request.url);\n let text = \"Hello World!\";\n // This writes data I want to send back to browser.\n response.write(text);\n // This tells that response has ended. Now send that data.\n response.end();\n}", "function onRequest(request,response) {\n response.writeHead(200, {'Content-Type': 'text/plain'});\n response.write('Hello World');\n response.end();\n}", "function onRequest(request,response) {\n console.log(\"A user has made a request \" + request);\n response.writeHead(202, {\"Context-Type\":\"text/plain\"});\n response.write(\"Here is your response\");\n response.end();\n}", "function requestPORT(request, response) {\n response.end(\"Good request! Path hit: \" + request.url);\n}", "function onRequest(request, response){\n // request and response are objects. this function is called whenever a request\n // is received.\n console.log(\"Request received.\")\n var pathname = url.parse(request.url).pathname\n console.log(\"Request for \" + pathname + \"received\");\n var postData = \"\";\n // to handle post data in a non blocking fashin, we need to add listeners. for post data\n // we need to add listerners corresponding to \"data\" and end.\n request.setEncoding(\"utf8\");\n request.addListener(\"data\", function(postDataChunk){\n postData += postDataChunk;\n console.log(\"Recived POST data\" + postDataChunk);\n });\n request.addListener(\"end\", function(){\n route(handle, pathname, response, postData);\n });\n }", "function handleRequest (request, response) {\n response.end(\"it works!! Path Hit: \" + request.url);\n}", "function handleRequest(request, response){\n var responseString = '';\n request.on('data', function (chunk) {\n responseString += chunk;\n });\n request.on('end', function () {\n writeToLog(JSON.stringify(qs.parse(responseString)));\n });\n\n response.end('It Works!! Path Hit: ' + request.url);\n}", "function onRequest(request, response) {\n \n var parsedreq = urlparser.parse(request.url, true);\n console.log(parsedreq.query);\n var req = parsedreq.pathname.split(\"/\");\n\n //var req = urlparser.parse(request.url).pathname.split(\"/\");\n var requestBody = '';\n var space = req[1];\n var thing = req[2];\n var action = req[3];\n console.log(\"Space: \" + space);\n console.log(\"Thing: \" + thing);\n console.log(\"Action: \" + action);\n \n try {\n if(request.method == \"GET\") {\n \n if (space.length == 0) {\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end(\"<META http-equiv=\\\"refresh\\\" content=\\\"60\\\"><body>\" + userPage() + \"</body>\");\n } else {\n if (thing === \"service\") {\n \n if (parsedreq.query.hasOwnProperty(\"user\")) {\n logEventToDb({'raw': {user: parsedreq.query.user, name: parsedreq.query.name}, 'space':space, 'message': parsedreq.query.name + \" ran service \" + action + \" in space \" + spaceName(space)});\n }\n \n if (action == \"here\") {\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end(\"<META http-equiv=\\\"refresh\\\" content=\\\"60\\\"><body>\" + services.hereService(context, space, request, response)+\"</body>\");\n } else if (action == \"speak\") {\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end(services.speakService(context, space, request, response));\n } else if (action == \"hal\") {\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end(services.halService(context, space, request, response));\n } else if (action == \"stlights\") {\n response.writeHead(200, {'Content-Type': 'text/html'});\n services.stLightsService(context, space, request, response);\n } else if (action == \"athome\") {\n services.atHomeService(context, space, request, response);\n } else {\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end(services.unknownService(context, space, request, response));\n }\n } else if (space === \"allbrains\") {\n allbrains(response);\n } else if (space === \"spaces\") {\n response.writeHead(200, {'Content-Type': 'application/json'});\n response.end(JSON.stringify(spacemetadata,\n undefined, 1));\n \n } else if (thing === \"users\") {\n response.writeHead(200, {'Content-Type': 'application/json'});\n response.end(JSON.stringify({\"users\": spacemap.hasOwnProperty(space) ? spacemap[space] : new Array(),\n }, undefined, 1));\n } else {\n response.writeHead(400, \"No Space Supplied\", {'Content-Type': 'text/html'});\n response.end('<html><head><title>400</title></head><body>400: URI should end in /Channel</body></html>');\n }\n }\n } else {\n if (request.method == \"PUT\") {\n \n if (space.length == 0) {\n //bad post\n response.writeHead(400, \"No Space Supplied\", {'Content-Type': 'text/html'});\n response.end('<html><head><title>400</title></head><body>400: URI should end in /Channel</body></html>');\n } else {\n request.on('data', function (data) {\n requestBody += data;\n if (requestBody.length > 1e7) {\n response.writeHead(413, \"Request Entity Too Large\", { 'Content-Type': 'text/html' });\n response.end('<html><head><title>413</title></head><body>413: Request Entity Too Large</body></html>');\n }\n });\n request.on('end', processPut);\n \n function processPut() {\n \n // debugging\n console.log(\"Data: \" + requestBody);\n \n var rec = JSON.parse(requestBody);\n \n \n if (action.length > 0) {\n if (action == \"leave\") {\n logEventToDb({'raw': rec, 'space':space, 'message': rec.name + \" left \" + spaceName(space) + \" space\"});\n doExitHooks(space, rec);\n } else if (action == \"enter\") {\n logEventToDb({'raw': rec, 'space':space, 'message': rec.name + \" entered \" + spaceName(space) + \" space\"});\n doEnterHooks(space, rec);\n } else if (action == \"refresh\") {\n logEventToDb({'raw': rec, 'space':space, 'message': rec.name + \" refreshed presence in \" + spaceName(space) + \" space\"});\n doRefreshHooks(space, rec);\n } else if (action == \"signoff\") {\n // space is ignored it should be \"all\"\n doGlobalSpaceExit(rec);\n } else {\n \n // error\n }\n \n // return current space user list on entry or exit\n response.writeHead(200, {'Content-Type': 'application/json'});\n response.end(JSON.stringify({\"users\": spacemap.hasOwnProperty(space) ? spacemap[space] : new Array(),\n }, undefined, 1));\n } else {\n // bad req\n response.writeHead(400, request.method + \" not supported without action\", {'Content-Type': 'text/html'});\n response.end('<html><head><title>400</title></head><body>400: Use GET</body></html>');\n }\n }\n \n \n }\n \n } else {\n //bad post\n response.writeHead(400, request.method + \" not supported\", {'Content-Type': 'text/html'});\n response.end('<html><head><title>400</title></head><body>400: Wait, What?</body></html>');\n }\n }\n }\n catch (e) {\n console.log(e);\n console.log(e.stack);\n response.writeHead(400, request.method + \" not supported\", {'Content-Type': 'text/html'});\n response.end('<html><head><title>400</title></head><body>400: OOPS!</body></html>');\n \n }\n \n \n }", "function handleRequest(request, response){\n response.end('It Works!! Path Hit: ' + request.url);\n}", "function handleRequest(request, response){\n response.end('It Works!! Path Hit: ' + request.url);\n}", "function handleRequest(request, response){\n response.end('It Works!! Path Hit: ' + request.url);\n}", "function reqHandler(req, res){\n console.log(\"We have a server request from \" + req.url);\n if(req.url === \"/\"){\n res.end(\"Welcome to my Hompage!\");\n }\n else if(req.url === \"/about\"){\n res.end(\"This is the about page\");\n }\n else if(req.url === \"/contact\"){\n res.end(message + randomNum());\n }\n else{\n res.end(\"Page not found\");\n }\n}", "function handle(request, response) {\n // First, tell the client that we will be sending HTML.\n response.writeHead(200, {\"Content-Type\": \"text/html\"});\n\n // Next, write the HTML document.\n response.write('<!DOCTYPE html>'\n + '<html>'\n + '<head>'\n + '<title>Hello, 6.170 World!</title>'\n + '<meta charset=\"UTF-8\">'\n + '<script type=\"text/javascript\">'\n + 'var counter = 0;'\n + 'function changeit() {'\n + 'var text = document.getElementById(\"text\");'\n + 'var changeto = document.getElementById(\"changeto\");'\n + 'text.innerHTML = \"#\" + counter + \": \" + changeto.value;'\n + 'counter++;'\n + '}'\n + '</script>'\n + '</head>'\n + '<body>'\n + '<h1>Hello, <a href=\"https://stellar.mit.edu/S/course/6/fa14/6.170/\">6.170</a> World!</h1>'\n + '<button onclick=\"changeit()\">Set text to:</button> <input type=\"text\" id=\"changeto\">'\n + '<p id=\"text\">I\\'m <i>waiting</i>!</p>'\n + '</body>'\n + '</html>');\n\n // Indicate that the response is fully determined now.\n response.end();\n}", "function processRequest(req, res) {\n var body = \"Welcome to the page!\";\n\n var contentLength = body.length;\n res.writeHead(200, {\n 'Content-Length':contentLength,\n 'Content-Type': 'text/plain'\n });\n res.end(body);\n}", "function handleRequest(request, response){\n response.end(\"It worked!!! Path Hit: \" + request.url);\n}", "function forwardRequest(server, request, response, data) {\n\n var split_url = server.replace(\"http://\", \"\").split(\":\");\n var server_host = split_url[0];\n var server_port = split_url[1] ? split_url[1] : \"80\";\n\n var options = {\n host: server_host,\n port : server_port,\n method: request.method,\n path: request.url,\n headers: request.headers\n };\n\n var newReq = http.request(options, function(newRes) {\n newRes.content = \"\";\n newRes.on(\"data\", function(data) {\n newRes.content += data;\n });\n\n newRes.on(\"end\", function() {\n response.writeHead(newRes.statusCode, newRes.headers);\n\n if(newRes.content) {\n response.write(newRes.content);\n }\n\n response.end();\n });\n \n });\n\n newReq.on(\"error\", function(e) {\n console.log(\" Error: problem with request \" + e.message);\n user_util.notFound(response);\n });\n\n if(request.content) {\n newReq.write(request.content);\n }\n\n newReq.end();\n\n}", "httpGet(path, on_response, data = null) {\n const client = new net.Socket();\n let buffer = \"\";\n client.connect(this._server.port, this._server.host, function() {\n client.write(data ? `GET /${path}?${data} HTTP/1.1\\r\\n` : `GET /${path} HTTP/1.1\\r\\n`);\n client.write(\"Content-Type:charset=UTF-8\\r\\n\");\n client.write(\"Connection: Close\\r\\n\\r\\n\");\n });\n client.on('data', function(response) {\n buffer += response\n });\n client.on('end', function() {\n _on_response(client, buffer, on_response);\n });\n client.on('close', empty_fun);\n }", "function handleRequest(request, response) {\n console.log(\"Request Made!\");\n response.end(`It works! Path hit: ${request.url}`)\n}", "requestReceived(_request, _response)\r\n {\r\n this.logVerbose(\"Request received: \" + _request.method + \" \" + _request.url);\r\n var parsedUrl = Url.parse(_request.url);\r\n\r\n // simply soak up system requests of browsers or other clients\r\n if(parsedUrl.pathname.startsWith(\"/favicon.ico\"))\r\n return\r\n\r\n // if we are on the '/raumserver/controller/' or '/raumserver/data/' path we can handle the requests\r\n // otherwise they are no requests to the raumserver.\r\n if( parsedUrl.pathname.startsWith(\"/raumserver/controller/\") ||\r\n parsedUrl.pathname.startsWith(\"/raumserver/data/\"))\r\n {\r\n this.logDebug(\"Request to raumserver recognized: \" + _request.url);\r\n var pathArray = parsedUrl.pathname.split(\"/\");\r\n var queryObject = QueryString.parse(parsedUrl.query);\r\n if(pathArray.length === 4)\r\n this.handleRequestObject(pathArray[3], queryObject, _request, _response);\r\n else\r\n this.handleUnknownPath(_request, _response);\r\n }\r\n else\r\n {\r\n // show the static html \"player\" page\r\n if( parsedUrl.pathname.startsWith\"/raumserver/player/\")\r\n {\r\n _response.writeHead(200, {'Content-Type': 'text/plain'});\r\n _response.end('Hello World!');\r\n }\r\n else\r\n this.handleUnknownPath(_request, _response);\r\n }\r\n }", "function handleRequestONE(request, response) {\n\n // The below statement is triggered (client-side) when the user visits the PORT URL\n response.end(\"something bad about yourself \" + request.url);\n}", "function onRequest(request, response){\n var my_path = url.parse(request.url).pathname;\n var full_path = path.join(process.cwd(),my_path);\n var url_parts = url.parse(request.url, true);//??true\n\n //\"http://monserveur.com/hello?name=xxxx\"\n //Format of GET\n if(request.url == \"/\"){\n response.writeHeader(200, {\"Content-Type\": \"text/html\"});\n response.write(\"Welcome to the home page! \\n\");\n response.end();\n }\n else if(my_path == \"/hello\"){\n //查询字符串: name=xxxx\n var query = url_parts.query;\n fs.readFile(\"record.txt\",function(err,file){\n console.log(file);\n });\n nameData = nameData + \", \" + query.name;\n response.writeHeader(200, {\"Content-Type\": \"text/html\"});\n response.write(\"Bonjour \" + nameData);\n response.end();\n\n //Open a txt.file and write the name in the file\n fs.open('record.txt','w','777',function(err,fd){\n if(err) console.log(\"Open file error!\");\n fs.appendFile('record.txt', nameData, function(err){\n if(err) console.log(\"Append name Error!\");\n });\n })\n }\n else{\n response.writeHeader(200, {\"Content-Type\": \"text/html\"});\n response.write(\"Other\");\n response.end();\n }\n}", "function handler(request, response) {\n var uri = url.parse(request.url);\n console.log(uri.pathname, 'was requested');\n response.writeHead(200, {'Content-Type': 'text/plain'});\n response.end('Hello World!');\n}", "function handleRequest( request, response ) {\n\n // handle 'OPTION' requests\n if ( request.method === 'OPTIONS' ) {\n response.setHeader( 'Access-Control-Allow-Origin', '*' );\n response.setHeader( 'Access-Control-Allow-Headers', 'Content-Type' );\n response.statusCode = 200;\n response.end();\n return;\n }\n\n // receive HTTP parameter data\n if ( request.method === 'POST' ) {\n let body = '';\n request.on( 'data', data => {\n body += data;\n if ( body.length > configs.max_data_size )\n request.shouldKeepAlive = false;\n } );\n request.on( 'end', () => {\n if ( body.length > configs.max_data_size ) {\n response.statusCode = 413;\n response.end();\n }\n else {\n try {\n proceed( JSON.parse( body ) );\n } catch ( e ) {\n response.statusCode = 403;\n response.end();\n }\n }\n } );\n }\n else\n proceed( deparam( request.url.substr( 2 ) ) );\n\n /** @param {*} data - received data */\n function proceed( data ) {\n\n // support cross domain requests via CORS\n response.setHeader( 'Access-Control-Allow-Origin', '*' );\n\n // received invalid data? => abort and send 'Forbidden'\n if ( !checkReceivedData( data ) ) return sendForbidden();\n\n // no database operation? => abort and send 'Forbidden'\n if ( !data.get && !data.set && !data.del ) return sendForbidden();\n\n // perform database operation\n performDatabaseOperation( data ).then(\n result => {\n // send result to client\n result === undefined ? sendForbidden() : send( data.get ? result : ( data.set ? result.key : true ) );\n },\n reason => { sendForbidden( reason ); }\n );\n\n /**\n * sends response to client\n * @param {*} response_data\n */\n function send( response_data ) {\n\n // response is not a string? => transform data to JSON string\n response_data = typeof response_data !== 'string' ? JSON.stringify( response_data ) : response_data;\n\n // set response HTTP header\n response.writeHead( 200, { 'content-type': 'application/json; charset=utf-8' } );\n\n // send response data to client\n response.end( response_data );\n\n }\n\n /** sends 'Forbidden' status code */\n function sendForbidden( message ) {\n message = typeof message !== 'string' ? JSON.stringify( message ) : message;\n response.writeHead( 403, { 'content-type': 'application/json; charset=utf-8' } );\n response.end( message );\n }\n }\n\n }", "function onRequest(request, response){\n\tconsole.log(\" \")\n\tconsole.log(new Date())\n\tvar command = request.headers[\"command\"]\n\tif(command == \"restartPC\"){\n\t\tconsole.log(\"Bridge restarting\")\n\t\tresponse.setHeader(\"cmd-response\", \"restart\")\n\t\tresponse.end()\n\t\tbridgeExec('shutdown /r /t 005')\n\t} else if(command == \"pollBridge\"){\n\t\tresponse.setHeader(\"cmd-response\", \"ok\")\n\t\tconsole.log(\"Bridge poll response sent to SmartThings\")\n\t\tresponse.end()\n\t} else {\n\t\tconsole.log(\"Unexpected command received from SmartThings\")\n\t\tresponse.end()\n\t}\n}", "function unifiedServer(req, res) {\n const parsedUrl = new URL(req.url, `http://${req.headers.host}`);\n\n const path = parsedUrl.pathname;\n const trimmedPath = path.replace(/^\\/+|\\/$/g, '');\n\n const method = req.method;\n const requestQuery = parsedUrl.searchParams;\n\n const headers = req.headers;\n\n // decoder for decoding buffers\n const decoder = new StringDecoder('utf8');\n let buffer = '';\n\n // called only for requests with body to handle incomming chunks from the stream\n req.on('data', (chunk) => {\n buffer += decoder.write(chunk); // decode each chunk and append to the earlier received chunks\n });\n\n // called for all requests regardless if they contain a body\n req.on('end', () => {\n buffer += decoder.end();\n\n // check if request path is among the available routes\n const selectedCallback = handlers[trimmedPath] || handlers.notFound\n\n // construct data to be sent to all handlers\n const data = {\n 'path': trimmedPath,\n 'method': method,\n 'query': requestQuery,\n headers,\n 'payload': buffer\n }\n\n selectedCallback(data, function(statusCode = 200, payload = {}) {\n const responseData = JSON.stringify(payload);\n\n res.setHeader('Content-Type', 'application/json')\n res.writeHead(statusCode);\n res.end(responseData);\n })\n })\n}", "function onRequest(request,response) {\n // We send a HTTP status of 200 and content-type in the response header\n response.writeHead(200, {'Content-Type': 'text/plain'});\n // Set the HTTP resonse body to 'Hello World'\n response.write('Hello World');\n // We finish the response\n response.end();\n}", "function handleRequestOne(request, response) {\n\n // The below statement is triggered (client-side) when the user visits the PORT URL\n response.end(\"You are awesome!!!\" + request.url);\n}", "function respond() {\r\n // Now we do the cool stuff!!\r\n var request = JSON.parse(this.req.chunks[0]);\r\n var user = JSON.parse;\r\n\r\n // Hey, something happened!\r\n if (request.text) {\r\n // HELP OUT USER\r\n if (helpRegex.test(request.text)) {\r\n console.log(\"!help\");\r\n this.res.writeHead(200);\r\n postMessage(getHelpText);\r\n this.res.end();\r\n }\r\n \r\n\r\n // GET ACCOUNTS\r\n else if (accountsRegex.test(request.text) || passEmptyRegex.test(request.text)) {\r\n console.log(\"!accounts\");\r\n this.res.writeHead(200);\r\n postMessage(getAccounts);\r\n this.res.end();\r\n }\r\n // GET PASSWORD\r\n else if (passwordRegex.test(request.text)) {\r\n account = request.text.slice(10); //!password\r\n console.log(\"!password \" + account);\r\n this.res.writeHead(200);\r\n postMessage(getPassword, account);\r\n this.res.end();\r\n }\r\n // GET ACTIVES\r\n else if (activesRegex.test(request.text)) {\r\n console.log(\"!actives\");\r\n this.res.writeHead(200);\r\n postMessage(getActives);\r\n this.res.end();\r\n }\r\n \r\n // GET SPECIFIC ACTIVE\r\n else if (sigmaRegex.test(request.text) || capitalizedsigmaRegex.test(request.text)) {\r\n sigmaNumber = request.text.slice(7); //!sigma\r\n console.log(\"!sigma \" + sigmaNumber);\r\n this.res.writeHead(200);\r\n postMessage(getSigma, sigmaNumber);\r\n this.res.end();\r\n }\r\n // GET PLEDGES\r\n else if (pledgesRegex.test(request.text)) {\r\n console.log(\"!pledges\");\r\n this.res.writeHead(200);\r\n postMessage(getPledges);\r\n this.res.end();\r\n }\r\n // GET CALENDAR\r\n else if (calendarRegex.test(request.text)) {\r\n console.log(\"!calendar\");\r\n this.res.writeHead(200);\r\n postMessage(getCalendarText);\r\n this.res.end();\r\n }\r\n\r\n else if (cockRegex.test(request.text)) {\r\n console.log(\"!cock\");\r\n this.res.writeHead(200);\r\n postMessage(getCock);\r\n this.res.end();\r\n }\r\n\r\n // GET STUDY\r\n else if (studyRegex.test(request.text)) {\r\n console.log(\"!study\");\r\n this.res.writeHead(200);\r\n postMessage(getStudyImage);\r\n this.res.end();\r\n }\r\n // GET USERNAME\r\n else if (usernameRegex.test(request.text)) {\r\n console.log(\"!username\");\r\n this.res.writeHead(200);\r\n postMessage(getUsername);\r\n this.res.end();\r\n }\r\n // GET REASONABLE\r\n else if (reasonableRegex.test(request.text)) {\r\n console.log(\"!reasonable\");\r\n this.res.writeHead(200);\r\n postMessage(getReasonable);\r\n this.res.end();\r\n }\r\n \r\n // GET CLEANUP\r\n else if (cleanupRegex.test(request.text)) {\r\n console.log(\"!cleanup\");\r\n this.res.writeHead(200);\r\n postMessage(getCleanup);\r\n this.res.end();\r\n }\r\n\r\n // GET BAR\r\n else if (barRegex.test(request.text)) {\r\n console.log(\"!bar\");\r\n this.res.writeHead(200);\r\n postMessage(getBar);\r\n this.res.end();\r\n }\r\n\r\n // GET DOOR\r\n else if (doorRegex.test(request.text)) {\r\n console.log(\"!door\");\r\n this.res.writeHead(200);\r\n postMessage(getDoor);\r\n this.res.end();\r\n }\r\n \r\n //post link to the google drive\r\n else if (driveRegex.test(request.txt)) {\r\n console.log(\"!drive\");\r\n this.res.writeHead(200);\r\n postMessage(getDrive);\r\n this.res.end();\r\n }\r\n\r\n // GET STANDARDS FORM\r\n else if (standardsRegex.test(request.text)) {\r\n console.log(\"!standards\");\r\n this.res.writeHead(200);\r\n postMessage(getStandardsForm);\r\n this.res.end();\r\n }\r\n\r\n // GET FIX FORM\r\n else if (fixRegex.test(request.text)) {\r\n console.log(\"!fix\");\r\n this.res.writeHead(200);\r\n postMessage(getFixForm);\r\n this.res.end();\r\n }\r\n\r\n // GET THANKS\r\n else if (thanksRegex.test(request.text)) {\r\n console.log(\"!thanks\");\r\n this.res.writeHead(200);\r\n postMessage(getThanks);\r\n this.res.end();\r\n }\r\n\r\n // GET MOON\r\n else if (moonRegex.test(request.text)) {\r\n console.log(\"!moon\");\r\n this.res.writeHead(200);\r\n postMessage(getMoon);\r\n this.res.end();\r\n }\r\n\r\n // GET risk\r\n else if (riskRegex.test(request.text)) {\r\n console.log(\"!risk\");\r\n this.res.writeHead(200);\r\n postMessage(getRisk);\r\n this.res.end();\r\n }\r\n\r\n // GET BUDGET\r\n else if (budgetRegex.test(request.text)) {\r\n console.log(\"!budget\");\r\n this.res.writeHead(200);\r\n postMessage(getBudget);\r\n this.res.end();\r\n }\r\n\r\n //no gay shit\r\n else if (gazeRegex.test(request.text)) {\r\n console.log(\"!pd\");\r\n this.res.writeHead(200);\r\n postMessage(getPD);\r\n this.res.end();\r\n }\r\n\r\n //beat the clock\r\n else if (socialRegex.test(request.text)) {\r\n console.log(\"!social\");\r\n this.res.writeHead(200);\r\n postMessage(getBTC);\r\n this.res.end();\r\n }\r\n\r\n //ban the R word\r\n else if (retardRegex.test(request.text)) {\r\n console.log(\"retard\");\r\n this.res.writeHead(200);\r\n postMessage(getRetard);\r\n this.res.end();\r\n }\r\n \r\n\t// GET NUKE (to be used to spam group chat if it all goes hell)\r\n else if (nukeRegex.test(request.txt)){\r\n\tconsole.log(\"!nuke\");\r\n\t//this.res.writeHead(200); // uncomment this to purge\r\n\t//postMessage(getNuke);\r\n\t//this.res.writeHead(200);\r\n\t//postMessage(getNukeCountdown);\r\n\tthis.res.writeHead(200);\r\n postMessage(getDrop);\r\n\tthis.res.end();\r\n }\r\n \r\n //return the frat's positive covid dates\r\n else if (covidRegex.test(request.text)) {\r\n console.log(\"!covid\");\r\n this.res.writeHead(200);\r\n postMessage(getCovid);\r\n this.res.end();\r\n }\r\n\r\n else if (hornyRegex.test(request.text)) {\r\n console.log(\"!horny\");\r\n this.res.writeHead(200);\r\n postMEssage(getHorny);\r\n this.res.end();\r\n }\r\n \r\n //roll a six sided die\r\n else if (dieRegex.test(request.text)) {\r\n console.log(\"!die\");\r\n this.res.writeHead(200);\r\n postMessage(rollDie);\r\n this.res.end();\r\n }\r\n // NOT IMPORTANT...\r\n else {\r\n console.log(\"don't care\");\r\n this.res.writeHead(200);\r\n this.res.end();\r\n }\r\n }\r\n // Boring......\r\n else {\r\n console.log(\"don't care\");\r\n this.res.writeHead(200);\r\n this.res.end();\r\n }\r\n}", "function handleRequestTwo(request, response) { //whats the request? req to the url.\n//console.log(request.url);\n // Send the below string to the client when the user visits the PORT URL\n response.end(\"I guess javasccript is not your forte! \" + request.url);\n} //creates the strung & sends it back to the browser.", "httpPost(path, on_response, data = null) {\n const client = new net.Socket();\n let buffer = \"\";\n client.connect(this._server.port, this._server.host, function() {\n client.write(\"POST /\" + path + \" HTTP/1.1\\r\\n\");\n //console.log({data, l:_raw_size(data)})\n if(null != data) {\n client.write(\"Content-Type: application/x-www-form-urlencoded; charset=UTF-8\\r\\n\");\n client.write(\"Content-Length: \" + _raw_size(data) + \"\\r\\n\");\n \n client.write(\"Connection: Close\\r\\n\");\n client.write(\"\\r\\n\");\n client.write(data);\n } else {\n client.write(\"Content-Type: charset=UTF-8\\r\\n\");\n client.write(\"Connection: Close\\r\\n\");\n client.write(\"\\r\\n\");\n }\n });\n client.on('data', function(response) {\n buffer += response\n });\n client.on('end', function() {\n _on_response(client, buffer, on_response);\n });\n client.on('close', empty_fun);\n }", "function start(route, handle){\n // we could have passed an entire router object to use it's route method. we don't however need to do that.\n // we only need the route method of it. so we'll pass the function only.\n function onRequest(request, response){\n // request and response are objects. this function is called whenever a request\n // is received.\n console.log(\"Request received.\")\n var pathname = url.parse(request.url).pathname\n console.log(\"Request for \" + pathname + \"received\");\n var postData = \"\";\n // to handle post data in a non blocking fashin, we need to add listeners. for post data\n // we need to add listerners corresponding to \"data\" and end.\n request.setEncoding(\"utf8\");\n request.addListener(\"data\", function(postDataChunk){\n postData += postDataChunk;\n console.log(\"Recived POST data\" + postDataChunk);\n });\n request.addListener(\"end\", function(){\n route(handle, pathname, response, postData);\n });\n }\n http.createServer(onRequest).listen(8888)\n console.log(\"the server is running now...\") \n}", "requestListener(req, res)\r\n {\r\n //console.log(\"\\nRequest received: \", req.url);\r\n\r\n switch (req.url) {\r\n case \"/style.css\":\r\n res.writeHead(200, {\"Content-Type\": \"text/css\"});\r\n res.end(this.cssFile);\r\n break;\r\n case \"/main.js\":\r\n res.writeHead(200, {\"Content-Type\": \"text/javascript\"});\r\n res.end(this.jsFile);\r\n break;\r\n \r\n default:\r\n res.writeHead(200, {\"Content-Type\": \"text/html\"});\r\n res.end(this.htmlFile);\r\n this.updateMpsData(this.mpsData);\r\n this.updateParsafixData(this.parsafixData);\r\n this.updateSpoofaxData(this.spoofaxData);\r\n }\r\n }", "function handleRequest(request, response){\n\tresponse.end('You are beautiful! Path Hit: ' + request.url); \n}", "function handleRequest(request, response){\n console.log(\"Path Hit: \" + request.url);\n if(request.url === '/'){\n fs.readFile(__dirname + \"/index.html\", function (err, data) {\n if (err) {\n response.writeHead(500);\n return response.end(\"Error loading index.html\");\n }\n response.writeHead(200);\n response.end(data);\n });\n }\n else{\n fs.readFile(__dirname + request.url, function (err, data) {\n if (err) {\n response.writeHead(500);\n return response.end(\"Error in loading page\");\n }\n response.writeHead(200);\n response.end(data);\n });\n }\n}", "function handleRequest(request, response) {\n\tresponse.end(\"It works Path Hit: \" + request.url);\n}", "function start() {\n console.log(\"Request handler 'start' was called.\");\n // new exec block\n var content = \"empty\"; \n // without intialisation it will break the line 12 of server.js response.write(content); with following error\n // _http_outgoing.js:595 throw new ERR_INVALID_ARG_TYPE('first argument',TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string or Buffer. Received type undefined\n exec(\"ls -lah\", function (error, stdout, stderr) {\n content = stdout;\n // simply assigning the stdout to content is not going to return the actual data to client\n // as this is an sync process and it will not be completed before the response.end is called.\n // so we need to pass response object here and do response object manipulation here\n });\n return content;\n}", "function onRequest(request, response)\n{\n var pathname = url.parse(request.url).pathname;\n var query = url.parse(request.url).query;\n\n if (pathname == '/') pathname += 'index.html';\n var filePath = \".\" + pathname;\n\n var extname = path.extname(filePath);\n var contentType = 'text/html';\n switch (extname)\n {\n case '.js':\n contentType = 'text/javascript';\n break;\n case '.css':\n contentType = 'text/css';\n break;\n case '.json':\n contentType = 'application/json';\n break;\n case '.png':\n contentType = 'image/png';\n break;\n case '.jpg':\n contentType = 'image/jpg';\n break;\n }\n\n fs.readFile(filePath, function(error, content) {\n if (error)\n {\n response.writeHead(500);\n response.end(\"Error: \" + error.code + \"\\n\");\n response.end();\n }\n else\n {\n response.writeHead(200, { 'Content-Type': contentType });\n response.end(content, 'utf-8');\n }\n });\n}", "function handleRequest(req, res) {\n var path = req.url;\n\n switch (path) {\n case ('/'):\n displayIndex(path, request);\n break;\n\n case ('/table'):\n displayTable(path, request);\n break;\n\n case ('/reserve'):\n displayReserve(path, request)\n\n default:\n return fs.readFile(__dirname + \"/index.html\", function (err, data) {\n res.writeHead(200, {\n \"Content-Type\": \"text/html\"\n });\n res.end(data);\n })\n }\n}", "function doProxy(self, args, callback)\n{\n if(!args || !args.path ||!args.hashname) return callback(\"no path or hashname\");\n self.doLine(args.hashname, function(err){\n if(err) return callback(\"line failed\");\n\n // create stream and handle responses\n var res = {};\n var body = new Buffer(0);\n var stream = doStream(self, args.hashname, function(err, packet, cbStream){\n if(packet.body) body = Buffer.concat([body, packet.body]);\n if(packet.js.res)\n {\n res.statusCode = packet.js.res.s || 500;\n res.headers = packet.js.res.h || {};\n }\n if(packet.js.end) callback(null, res, body);\n cbStream();\n });\n \n // send request, TODO support a streaming interface\n var js = {end:true, req:{}};\n js.req.p = args.path;\n js.req.m = args.method || \"GET\";\n if(args.headers) js.req.h = args.headers;\n stream.send(js, args.body);\n });\n}", "function handleRequest(request, response) {\n\n // this is the response if query worked, and produces response\n response.end(\"It Works!! Path Hit: \" + request.url);\n}", "handleRequest(req, res) {\n if (req.method == 'GET') {\n this.handleGet.bind(this)(req, res);\n } else if (req.method == 'POST') {\n this.handlePost.bind(this)(req, res);\n }\n }", "async function handle(request, response) {\n console.log('request coming!!');\n let content;\n let paras = parseUrl(request.url);\n if(!Object.keys(paras).includes('tag')){\n //no tag -> page request\n let url = '../client' + request.url;\n // console.log(url);\n if (url.endsWith(\"/\")) url = url + \"index.html\";\n if (! url.endsWith(\".html\")) return fail(response, BadType, \"Not .html\");\n let file = \"\" + url;\n let content;\n try { content = await FS.readFile(file); }\n catch (err) { return fail(response, NotFound, file + \" Not found\"); }\n }\n else {\n switch (paras.tag) {\n case 'login':\n content = '0';\n users_info_data.checkUsersBasicValid((result) => {\n if (result) {\n content = '1';\n }\n reply(response, content);\n }, paras.username, paras.password);\n break;\n case 'signup':\n content = '0';\n users_info_data.insertUsersBasic(-1, '\\'' + paras.username + '\\'', '\\'' + paras.password + '\\'', '\\'' + paras.email + '\\'', (result) => {\n if (result) {\n content = '1';\n }\n reply(response, content);\n });\n break;\n }\n }\n}", "function handleRequest(request, response){\n var content = \"\";\n\n try {\n content = getFile(request.url).toString()\n } catch (e) {\n content = \"404\";\n }\n\n response.setHeader('Content-Type', getContentType(request.url))\n console.log(\"SERVER: Loaded: \" + request.url)\n response.end(content);\n}" ]
[ "0.7065143", "0.6951491", "0.6950262", "0.68950486", "0.686603", "0.6852835", "0.6806736", "0.675156", "0.67448664", "0.6742888", "0.66691893", "0.66454566", "0.662783", "0.66045475", "0.6594396", "0.65798134", "0.65416116", "0.65365773", "0.6531683", "0.6531616", "0.6518163", "0.6516335", "0.6498342", "0.6495511", "0.6491473", "0.64911866", "0.647554", "0.64746374", "0.647406", "0.64636606", "0.6457098", "0.6446979", "0.6445584", "0.64408135", "0.64396757", "0.64366525", "0.6424175", "0.6417041", "0.63978183", "0.63927174", "0.63868695", "0.63807315", "0.6379875", "0.6375128", "0.6370918", "0.6365512", "0.63533026", "0.6351443", "0.6349966", "0.6349616", "0.63446236", "0.6337947", "0.6332237", "0.63211524", "0.6316591", "0.63160527", "0.6313943", "0.63108826", "0.6310003", "0.6309022", "0.63052434", "0.6302488", "0.6302024", "0.6296374", "0.62834376", "0.6281448", "0.6281448", "0.6281448", "0.6273696", "0.6267754", "0.62663454", "0.62627786", "0.62593055", "0.62415016", "0.62338954", "0.62333995", "0.6230091", "0.62265056", "0.6213273", "0.6210993", "0.62053674", "0.6203642", "0.6197343", "0.6181563", "0.6174942", "0.6173409", "0.61725634", "0.6166826", "0.6155103", "0.6137967", "0.6137322", "0.6130701", "0.6118076", "0.61164856", "0.6114644", "0.6077482", "0.60732394", "0.6073172", "0.6072898", "0.6064769" ]
0.64108855
38
run the cgibin script
async function handleRequest (request, respond) { const document = new HTMLDocument({ ...signSearchConfig, disable: { javascript: true, analytics: true } }) try { // initialise search engine const engine = new SearchEngine({ vectorLibraryPath: arp.resolve('datasets/cc-en-300-8bit'), searchLibraryPath: arp.resolve('datasets/search-index'), libraryConfig: { fs, digest, webURL: 'datasets/search-index' } }) // load any data needed to make it queryable await engine.load() // grab content from query string that we need const query = document.query = request.url.searchParams.get('query') || '' const offset = parseInt(request.url.searchParams.get('offset')) || 0 if (query.trim() === '') throw new Error('Please enter a search query') // set document query string to fill search box const results = await engine.query(query) if (results.length === 0) throw new Error('No results found') await document.setBody(new ResultsPage({ results, offset, query })) } catch (err) { await document.setBody(new ErrorPage(err.message)) } await respond(200, { 'Content-Type': 'text/html; charset=utf-8' }, document.toHTML().toString()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\n doCbaam()\n doEcb()\n updateGraphFile()\n}", "function runBrython(cb) {\n exec(BRYTHON_CLI_CMD, {cwd: DIR_APP}, cb)\n}", "function run() {}", "function startRun()\n{\n initCompSyntaxTools();\n initMemVars();\n cleanShell();\n initializeAgain();\n initCanvas();\n cleanCanvas();\n}", "function runProgram() {\n console.log(\"\\n~~~~~~~~~~~~~~~~WELCOME TO LIRI!~~~~~~~~~~~~~~~~~~~\")\n console.log(\"~~~~~~~~~~~~~~~TO START, TYPE IN~~~~~~~~~~~~~~\" + \"\\n1. node liri.js concert-this\" + \"\\n2. node liri.js spotify-this-song\" + \"\\n3. node liri.js movie-this, or \" + \"'\\n4. node liri.js do-what-it-says'\")\n\n}", "function run() {\n\n }", "function run() {\n }", "function run() {\n\n // connection.connect(function (err) {\n // if (err) throw err;\n\n // //run basic start program function to display bamazon table \n // start();\n // // purchase();\n // });\n start();\n}", "function runit() {\n var prog = simple_coding.getTextArea().value;\n console.log(\"************code\"+prog)\n var mypre = document.getElementById(\"output\");\n console.log(\"************mypre \"+mypre)\n\n mypre.innerHTML = '';\n Sk.pre = \"output\";\n // console.log(\"-----------------1\")\n Sk.configure({output:outf, read:builtinRead});\n // console.log(\"-----------------2\" +Sk.TurtleGraphics)\n // console.log(\"-----------------3\" +Sk.TurtleGraphics)\n\n (Sk.TurtleGraphics || (Sk.TurtleGraphics = {})).target = 'mycanvas';\n var myPromise = Sk.misceval.asyncToPromise(function() {\n return Sk.importMainWithBody(\"<stdin>\", false, prog, true);\n });\n myPromise.then(function(mod) {\n console.log('success');\n },\n function(err) {\n console.log(err.toString());\n });\n }", "function run(source,chan) {\n var brainfuck = this;\n var code = source.replace(/[^-+<>.,[\\]]/g, '').split(''); // program code\n var loop = findLoops(code); // loop start and end positions\n var data = []; // array of data cells stored by the program code\n var cell = 0; // index in the data array representing one \"cell\" of data\n var next = 0; // index in the code array of the next instruction to run \n var operation = {\n '>': function () { ++cell; },\n '<': function () { --cell; },\n '+': function () { data[cell] = (data[cell] || 0) + 1; },\n '-': function () { data[cell] = (data[cell] || 0) - 1; },\n '.': function () { brainfuck.write(data[cell],chan); },\n ',': function () { data[cell] = brainfuck.read(); },\n '[': function () { if (!data[cell]) { next = loop.end[next]; } },\n ']': function () { if (data[cell]) { next = loop.start[next]; } }\n };\n \n while (next < code.length) {\n operation[code[next]]();\n next++;\n }\n \n if (brainfuck.end) {\n brainfuck.end(chan);\n }\n }", "run () {\n }", "function runGoogle(Console, UI, fileId) {\n initBrython();\n loadGoogletoScript(UI, fileId, function() {\n setMainValue(maincontent);\n if (mainscript) {\n runBrython(Console);\n }\n });\n }", "async function main() {\n // Build the program.\n program\n .version(VERSION)\n .arguments(\"<source> [project]\")\n .description(\"bridge\", {\n source: \"source packages directory\",\n project: \"destination project directory\",\n })\n .option(\"-n, --dry-run\", \"perform a trial run with no changes made\")\n .action(runBridge);\n\n // Run the program.\n await program.parseAsync();\n}", "function run() {\n\n}", "function start() {\n\n gw_job_process.UI();\n\n }", "function start() {\n\n gw_job_process.UI();\n\n }", "function start() {\n\n gw_job_process.UI();\n\n }", "function start() {\n\n gw_job_process.UI();\n\n }", "function start() {\n\n gw_job_process.UI();\n\n }", "function start() {\n\n gw_job_process.UI();\n\n }", "function start() {\n\n gw_job_process.UI();\n\n }", "function start() {\n\n gw_job_process.UI();\n\n }", "function start() {\n\n gw_job_process.UI();\n\n }", "function start() {\n\n gw_job_process.UI();\n\n }", "function gibson(script){\n\tvar toks = lex(script);\n\tvar results = parser(toks);\n\t//Node.js, write a JavaScript file of the compiledFile in addition to executing program.\n\tfs.writeFile(process.argv[2].replace(/\\.(.*)/g,\".js\"), compiledFile, (err) =>{\n\t if(err){\n\t console.log(err);\n\t }\n\t});\n\t//For retrieving any values from GibsonScript back into JS.\n\treturn results.reduce((a,b) => {\n\t\t\tif(b != undefined){\n\t\t\t\ta.push(b);\n\t\t\t}\n\t\t\treturn a;\n\t},[]);\n}", "function main() {\r\n\t// Init the myGM functions.\r\n\tmyGM.init();\r\n\r\n\t// If the script was already executed, do nothing.\r\n\tif(myGM.$('#' + myGM.prefix + 'alreadyExecutedScript'))\treturn;\r\n\r\n\t// Add the hint, that the script was already executed.\r\n\tvar alreadyExecuted\t\t= myGM.addElement('input', myGM.$('#container'), 'alreadyExecutedScript');\r\n\talreadyExecuted.type\t= 'hidden';\r\n\r\n\t// Init the language.\r\n\tLanguage.init();\r\n\r\n\t// Init the script.\r\n\tGeneral.init();\r\n\r\n\t// Call the function to check for updates.\r\n\tUpdater.init();\r\n\r\n\t// Call the function to enhance the view.\r\n\tEnhancedView.init();\r\n}", "Run() {\n\n }", "function run() {\n\t \tvar count = 0;\n\t \tfor (var i=0; count < 2; i++) {\t\n\t\t\tnpm install -g bundler;\n\t\t\tnpm install -g bundle;\n\t \t\tcount++;\n\t \t} //for\n\t \tconsole.log(\"Im done\");\n\n\t}", "function main() {\n\n try {\n\n const args = [...process.argv];\n\n checkCommands(args);\n\n const { filePath, fileName } = getFileDetails(args);\n\n const fileStream = readFile(filePath);\n\n const hash = generateMD5(fileStream);\n\n scan(fileName, fileStream, hash);\n\n } catch (e) {\n console.error(e);\n }\n}", "function runScript() {\n\tconsole.time(\"index\");\n var job = tabs.activeTab.attach({\n \tcontentScriptFile: [self.data.url(\"models_50_wif/benign/CompositeBenignCountsA.js\"),\n \t\t\t\t\t\tself.data.url(\"models_50_wif/benign/CompositeBenignCountsAB.js\"),\n\t\t\t\t\t\tself.data.url(\"models_50_wif/benign/CompositeBenignTotal.js\"),\n\t\t\t\t\t\tself.data.url(\"models_50_wif/malicious/CompositeMaliciousTotal.js\"),\n \t\t\t\t\t\tself.data.url(\"models_50_wif/malicious/CompositeMaliciousCountsA.js\"),\n \t\t\t\t\t\tself.data.url(\"models_50_wif/malicious/CompositeMaliciousCountsAB.js\"),\n self.data.url(\"CompositeWordTransform.js\"),\n \t\t\t\t\t\tself.data.url(\"DetectComposite.js\")]\n \n \n });\n \n job.port.on(\"script-response\", function(response) {\n\t\n\tconsole.log(response);\n });\n}", "function runMain(cargs) {\n let preprocessed;\n let lineNumber;\n\n try {\n fs.mkdirSync(tmpDir);\n try {\n var preprocessedOutput = preprocess(cargs.cPath, cargs);\n preprocessed = preprocessedOutput.program;\n\t\t\tlineNumber = preprocessedOutput.lineNumber;\n } catch (e) {\n printAndExit(\"Exiting with preprocessor error\");\n }\n\n if (cargs.preprocessOnly)\n printAndExit(preprocessed);\n\n let results = jam.compile(preprocessed, fs.readFileSync(cargs.jsPath).toString(),\n lineNumber, cargs.yieldPoint);\n\n cargs.cSideEffectTable = results.C_SideEffectTable;\n cargs.jsSideEffectTable = results.JS_SideEffectTable;\n\n if (cargs.callGraphFlag) {\n fs.writeFileSync(\"callgraph.html\", callGraph.createWebpage());\n fs.writeFileSync(\"callgraph.dot\", callGraph.createDOT());\n }\n\n if (!cargs.noCompile) {\n let task = nativeCompile(results.C, cargs);\n task.then(function (value) {\n results.manifest = createManifest(cargs.outPath, results.maxLevel, results.hasJdata);\n createZip(\n results.JS,\n results.manifest,\n results.jstart,\n tmpDir,\n cargs\n );\n if (!cargs.debug) {\n for (var i = 0; i < value.length; i++) {\n console.log(value[i]);\n }\n deleteFolderRecursive(tmpDir);\n }\n }).catch(function (error) {\n console.log(error);\n });\n }\n } catch (e) {\n console.log(\"ERROR:\");\n console.log(e);\n }\n}", "function RunTaskCbk(cliPath) {\n let dotnetCommand = tl.getInput('command', true);\n switch (dotnetCommand) {\n case 'restore':\n performDotnetRestore(cliPath);\n break;\n case 'push':\n performDotnetNugetPush(cliPath);\n break;\n }\n}", "function runAll() {\r\n\tfor(let bldg in IO.buildings) run(bldg);\r\n}", "function run () {\n socket.emit('run', {version: config.version, body: myCodeMirror.getValue()})\n $('#runButton').text('Compiling...').addClass('loading')\n\n if (runTimeout) {\n clearTimeout(runTimeout)\n }\n runTimeout = setTimeout(function () {\n $('#runButton').text('Run').removeClass('loading');\n }, 10000);\n}", "function run() {\n console.log(chalker.blue.bold(`SCRIPT STARTED : ---------------------------------------------------------------`));\n\n var params = {};\n\n async.waterfall([\n _enterSnapShotIds(params),\n _enterRemarks,\n _fetchInventories,\n _executeCorrection\n ], function (err, result) {\n if (err) {\n console.log(chalker.red.bold(`Error Occured , Terminating Script ------------------------------------------ `, err));\n process.exit(1);\n } else {\n console.log(chalker.green.bold(`Script Completed Successfully -----------------------------------------------`));\n process.exit();\n }\n });\n}", "function main(argc, argv) {\n\n //\n // Process arguments\n //\n process_args(argc, argv);\n\n // \n // Let's print out a welcome screen displaying the \n // application name and version\n // \n print_welcome();\n\n //\n // Wait until database initialization is complete\n //\n wait_for_database(function() {\n\n // \n // Start the Master worker\n // \n start_master();\n\n //\n // Prevent process from ending\n //\n Cpu.loop();\n\n });\n\n}", "static init(evt){\n // ghci must be working \n this.ghciSafeRun(evt, () => {\n // get buffer text\n GHCI_PROCESS.init(str => {\n // send the text (\"ghci version...\")\n IpcResponder.respond(evt, \"ghci\", {str});\n });\n });\n }", "function runBrython(console, argdict) {\n console.clear();\n __EXECUTE__BRYTHON__();\n }", "function runBrython(console, argdict) {\n console.clear();\n __EXECUTE__BRYTHON__();\n }", "function main()\n{\n init();\n loop();\n}", "function runGithub(Console, UI, data) {\n initBrython();\n loadGithubtoScript(UI, data, function(result){\n setMainValue(maincontent);\n if (mainscript) {\n $( \"#loading\" ).hide();\n $(\"#navigation\").show();\n runBrython(Console, {debug:0, ipy_id:[__MAIN__]});\n }\n });\n }", "function Main() {\n buildinterface();\n interfaceLogic();\n }", "run() {\n this.turtleCmd.beeper.enableBeep() // for Safari\n const src = this.getProgramFromEditor()\n if (src === '')\n return\n\n if (this.isSafari)\n this.evalSrc(src)\n else\n this.runSrc(src)\n }", "function runGithub(Console, UI, data) {\n initBrython();\n loadGithubtoScript(UI, data, function(result) {\n setMainValue(maincontent);\n if (mainscript) {\n $(\"#loading\").hide();\n $(\"#navigation\").show();\n runBrython(Console, { debug: 0, ipy_id: [__MAIN__] });\n }\n });\n }", "function main() {\r\n mainLoop()\r\n}", "coolantMistOn() {\n this.sendMessage('command', this.options.port, 'gcode', 'M7');\n }", "runCommand (cmd, clbk) {\n var arch = MatlabEditor.getArch()\n var pathToMatlab = MatlabEditor.getMatlabPath()\n var pathToLib = path.join(atom.config.getUserConfigPath().replace('config.cson', ''), 'packages', 'atom-matlab-editor', 'lib', 'java')\n var matlabJava = path.join(pathToMatlab, 'sys', 'java', 'jre', arch, 'jre', 'bin', 'java')\n\n var command = '\"' + matlabJava + '\" -cp .;\"' + path.join(pathToMatlab, 'extern', 'engines', 'java', 'jar', 'engine.jar') + '\" javaMatlabConnect'\n var args = ['\"' + cmd + '\"', -1]\n var options = {\n cwd: pathToLib,\n shell: true\n }\n var stdout = (out) => { MatlabEditor.lastOutput = out }\n var exit = (code) => {\n MatlabEditor.logToConsole(code, cmd)\n if (clbk !== null) {\n clbk(code)\n }\n }\n\n MatlabEditor.process = new BufferedProcess({ command, args, options, stdout, exit })\n }", "function Gb(){}", "function compile(args, cb) {\n var child = grunt.util.spawn({\n cmd: args.shift(),\n args: args\n }, function (err, result, code) {\n var success = code === 0;\n\n if (code === 127) {\n return grunt.warn(\n 'You need to have Ruby and Chop RB Builder installed ' +\n 'and in your system PATH for this task to work. ' \n );\n }\n\n // `compass compile` exits with 1 and outputs \"Nothing to compile\"\n // on stderr when it has nothing to compile.\n // https://github.com/chriseppstein/compass/issues/993\n // Don't fail the task in this situation.\n if (code === 1 && /Nothing to compile/g.test(result.stderr)) {\n success = true;\n }\n\n cb(success);\n });\n child.stdout.pipe(process.stdout);\n child.stderr.pipe(process.stderr);\n }", "function runOnBrick() {\n if (!GUISTATE_C.isRobotConnected()) {\n MSG.displayMessage(\"POPUP_ROBOT_NOT_CONNECTED\", \"POPUP\", \"\");\n return;\n } else if (GUISTATE_C.robotState === 'busy' && GUISTATE_C.getConnection() === 'token') {\n MSG.displayMessage(\"POPUP_ROBOT_BUSY\", \"POPUP\", \"\");\n return;\n // } else if (ROBOT_C.handleFirmwareConflict()) {\n // $('#buttonCancelFirmwareUpdate').css('display', 'none');\n // $('#buttonCancelFirmwareUpdateAndRun').css('display', 'inline');\n // return;\n }\n LOG.info('run ' + GUISTATE_C.getProgramName() + 'on brick');\n var xmlProgram = Blockly.Xml.workspaceToDom(blocklyWorkspace);\n var xmlTextProgram = Blockly.Xml.domToText(xmlProgram);\n var xmlTextConfiguration = GUISTATE_C.getConfigurationXML();\n\n switch (GUISTATE_C.getConnection()) {\n case 'token':\n if (CONFIG.getIsiPad()) {\n connectBeforeRunOnBrick(function () {\n GUISTATE.gui.blocklyWorkspace.robControls.disable('runOnBrick');\n $('#run-on-brick-button').addClass('disabled');\n setTimeout(function () {\n GUISTATE.gui.blocklyWorkspace.robControls.enable('runOnBrick');\n $('#run-on-brick-button').removeClass('disabled');\n PROGRAM.runOnBrick(GUISTATE_C.getProgramName(), GUISTATE_C.getConfigurationName(), xmlTextProgram, xmlTextConfiguration, function (result) {\n GUISTATE_C.setState(result);\n if (result.rc == \"ok\") {\n MSG.displayMessage(\"MESSAGE_EDIT_START\", \"TOAST\", GUISTATE_C.getProgramName());\n } else {\n MSG.displayInformation(result, \"\", result.message, \"\");\n }\n reloadProgram(result);\n });\n }, 2000);\n });\n }\n else{\n PROGRAM.runOnBrick(GUISTATE_C.getProgramName(), GUISTATE_C.getConfigurationName(), xmlTextProgram, xmlTextConfiguration, function(result) {\n GUISTATE_C.setState(result);\n if (result.rc == \"ok\") {\n MSG.displayMessage(\"MESSAGE_EDIT_START\", \"TOAST\", GUISTATE_C.getProgramName());\n } else {\n MSG.displayInformation(result, \"\", result.message, \"\");\n }\n reloadProgram(result);\n });\n }\n break;\n case 'autoConnection':\n GUISTATE_C.setAutoConnectedBusy(true);\n PROGRAM.runOnBrickBack(GUISTATE_C.getProgramName(), GUISTATE_C.getConfigurationName(), xmlTextProgram, xmlTextConfiguration, function(result) {\n GUISTATE_C.setState(result);\n if (result.rc == \"ok\") {\n if (GUISTATE_C.isProgramToDownload()) {\n var filename = GUISTATE_C.getProgramName() + '.hex';\n UTIL.download(filename, result.compiledCode);\n GUISTATE_C.setAutoConnectedBusy(false);\n } else {\n //create link with content\n var programLink = \"<div id='programLink' style='text-align: center;'><br><a style='font-size:36px; padding: 20px' download='\"\n + GUISTATE_C.getProgramName() + \".hex' href='data:Application/octet-stream;content-disposition:attachment;charset=utf-8,\"\n + encodeURIComponent(result.compiledCode) + \"'>\" + GUISTATE_C.getProgramName() + \"</a></div>\";\n if (navigator.userAgent.indexOf('Edge') < 0) {\n $(\"#liA\").css('background-image', 'url(\\'data:image/svg+xml;charset=UTF-8,'\n + '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"102\" height=\"77\" viewBox=\"0 0 77 102\">'\n + '<text fill=\"%23337ab7\" x=\"3\" y=\"34\" style=\"font-family:Arial;font-size:20px;text-decoration:underline\">'\n + GUISTATE_C.getProgramName()\n + '</text><rect x=\"1\" y=\"1\" stroke=\"%23BBBBBB\" width=\"100\" height=\"75\" rx=\"2\" ry=\"2\" style=\"fill:none;stroke-width:3\"/><g fill=\"%23DF01D7\"><path d=\"M33.2 34.9h2.2c-0.2 0.3-0.3 0.6-0.3 1h-1.9c-0.3 0-0.5-0.2-0.5-0.5s0.2-0.5 0.5-0.5ZM39.1 29c0-0.3 0.2-0.5 0.5-0.5 0.3 0 0.5 0.2 0.5 0.5v1.7c-0.4 0.1-0.7 0.2-1 0.4v-2.1ZM34.8 31.3c-0.1-0.2-0.1-0.5 0-0.7s0.5-0.2 0.7 0l1.6 1.6c-0.2 0.3-0.4 0.5-0.6 0.8l-1.7-1.7ZM47.5 37.3c0-3.2-2.6-5.7-5.7-5.7 0 0 0 0-0.1 0 0 0 0 0 0 0s0 0 0 0c-0.3 0-0.5 0-0.8 0.1 0 0-0.1 0-0.1 0 -2.5 0.3-4.5 2.3-4.8 4.9 0 0 0 0 0 0.1 0 0.2 0 0.5 0 0.7 0 0 0 0 0 0v7.1c0 3.2 2.6 5.8 5.8 5.8 3.2 0 5.8-2.6 5.8-5.8l-0.1-7.2c0 0 0 0 0 0ZM41.7 36.6c0.4 0 0.8 0.6 0.8 1.3 0 0.7-0.3 1.3-0.8 1.3s-0.8-0.6-0.8-1.3c0.1-0.8 0.4-1.3 0.8-1.3ZM45.5 44.5c0 2.1-1.7 3.8-3.8 3.8s-3.8-1.7-3.8-3.8v-5.3h2.4c0.3 0.5 0.8 0.9 1.4 0.9 1 0 1.7-1 1.7-2.3 0-1.1-0.5-1.9-1.2-2.2v-2c1.9 0.2 3.3 1.8 3.3 3.8v7.1Z\" transform=\"matrix(-2.40165 0 0 2.44495 146.371 -56.5809)\" fill=\"%23ff0000\"/></g></svg>\\')');\n $(\"#liA\").css('background-repeat', 'no-repeat');\n $('#trA').removeClass('hidden');\n } else {\n $('#trA').addClass('hidden');\n var filename = GUISTATE_C.getProgramName() + '.hex';\n UTIL.download(filename, result.compiledCode);\n GUISTATE_C.setAutoConnectedBusy(false);\n }\n $(\"#liB\").css('background-image', 'url(\\'data:image/svg+xml;charset=UTF-8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"102\" height=\"77\" viewBox=\"0 0 77 102\"><rect x=\"0\" y=\"0\" width=\"102\" height=\"77\" fill=\"%23dddddd\"/><text fill=\"%23333333\" x=\"3\" y=\"34\" style=\"font-family:Arial;font-size:14\">'\n + Blockly.Msg.POPUP_DOWNLOAD_SAVE_AS\n + '</text><rect x=\"1\" y=\"1\" stroke=\"%23BBBBBB\" width=\"100\" height=\"75\" rx=\"2\" ry=\"2\" style=\"fill:none;stroke-width:2\"/><g fill=\"%23DF01D7\"><path d=\"M33.2 34.9h2.2c-0.2 0.3-0.3 0.6-0.3 1h-1.9c-0.3 0-0.5-0.2-0.5-0.5s0.2-0.5 0.5-0.5ZM39.1 29c0-0.3 0.2-0.5 0.5-0.5 0.3 0 0.5 0.2 0.5 0.5v1.7c-0.4 0.1-0.7 0.2-1 0.4v-2.1ZM34.8 31.3c-0.1-0.2-0.1-0.5 0-0.7s0.5-0.2 0.7 0l1.6 1.6c-0.2 0.3-0.4 0.5-0.6 0.8l-1.7-1.7ZM47.5 37.3c0-3.2-2.6-5.7-5.7-5.7 0 0 0 0-0.1 0 0 0 0 0 0 0s0 0 0 0c-0.3 0-0.5 0-0.8 0.1 0 0-0.1 0-0.1 0 -2.5 0.3-4.5 2.3-4.8 4.9 0 0 0 0 0 0.1 0 0.2 0 0.5 0 0.7 0 0 0 0 0 0v7.1c0 3.2 2.6 5.8 5.8 5.8 3.2 0 5.8-2.6 5.8-5.8l-0.1-7.2c0 0 0 0 0 0ZM41.7 36.6c0.4 0 0.8 0.6 0.8 1.3 0 0.7-0.3 1.3-0.8 1.3s-0.8-0.6-0.8-1.3c0.1-0.8 0.4-1.3 0.8-1.3ZM45.5 44.5c0 2.1-1.7 3.8-3.8 3.8s-3.8-1.7-3.8-3.8v-5.3h2.4c0.3 0.5 0.8 0.9 1.4 0.9 1 0 1.7-1 1.7-2.3 0-1.1-0.5-1.9-1.2-2.2v-2c1.9 0.2 3.3 1.8 3.3 3.8v7.1Z\" transform=\"matrix(2.44495 0 0 2.44495 -47.8835 -56.5809)\" fill=\"%239400D3\"/></g></svg>\\')');\n $(\"#liB\").css('background-repeat', 'no-repeat');\n var usb;\n if (GUISTATE_C.getGuiRobot().indexOf(\"calliope\") >= 0) {\n usb = \"MINI\";\n } else {\n usb = GUISTATE_C.getGuiRobot().toUpperCase();\n }\n $(\"#liC\").css('background-image', 'url(\\'data:image/svg+xml;charset=UTF-8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"102\" height=\"77\" viewBox=\"0 0 77 102\"><rect x=\"0\" y=\"0\" width=\"102\" height=\"77\" fill=\"%23dddddd\"/><text fill=\"%23333333\" x=\"3\" y=\"34\" style=\"font-family:Arial;font-size:14\">'\n + usb\n + '</text><rect x=\"1\" y=\"1\" stroke=\"%23BBBBBB\" width=\"100\" height=\"75\" rx=\"2\" ry=\"2\" style=\"fill:none;stroke-width:2\"/><g fill=\"%23DF01D7\"><path d=\"M33.2 34.9h2.2c-0.2 0.3-0.3 0.6-0.3 1h-1.9c-0.3 0-0.5-0.2-0.5-0.5s0.2-0.5 0.5-0.5ZM39.1 29c0-0.3 0.2-0.5 0.5-0.5 0.3 0 0.5 0.2 0.5 0.5v1.7c-0.4 0.1-0.7 0.2-1 0.4v-2.1ZM34.8 31.3c-0.1-0.2-0.1-0.5 0-0.7s0.5-0.2 0.7 0l1.6 1.6c-0.2 0.3-0.4 0.5-0.6 0.8l-1.7-1.7ZM47.5 37.3c0-3.2-2.6-5.7-5.7-5.7 0 0 0 0-0.1 0 0 0 0 0 0 0s0 0 0 0c-0.3 0-0.5 0-0.8 0.1 0 0-0.1 0-0.1 0 -2.5 0.3-4.5 2.3-4.8 4.9 0 0 0 0 0 0.1 0 0.2 0 0.5 0 0.7 0 0 0 0 0 0v7.1c0 3.2 2.6 5.8 5.8 5.8 3.2 0 5.8-2.6 5.8-5.8l-0.1-7.2c0 0 0 0 0 0ZM41.7 36.6c0.4 0 0.8 0.6 0.8 1.3 0 0.7-0.3 1.3-0.8 1.3s-0.8-0.6-0.8-1.3c0.1-0.8 0.4-1.3 0.8-1.3ZM45.5 44.5c0 2.1-1.7 3.8-3.8 3.8s-3.8-1.7-3.8-3.8v-5.3h2.4c0.3 0.5 0.8 0.9 1.4 0.9 1 0 1.7-1 1.7-2.3 0-1.1-0.5-1.9-1.2-2.2v-2c1.9 0.2 3.3 1.8 3.3 3.8v7.1Z\" transform=\"matrix(2.44495 0 0 2.44495 -47.8835 -56.5809)\" fill=\"%239400D3\"/></g></svg>\\')');\n $(\"#liC\").css('background-repeat', 'no-repeat');\n $(\"#liD\").css('background-image', 'url(\\'data:image/svg+xml;charset=UTF-8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"102\" height=\"77\" viewBox=\"0 0 77 102\"><rect x=\"0\" y=\"0\" width=\"102\" height=\"77\" fill=\"%23dddddd\"/><text fill=\"%23333333\" x=\"3\" y=\"40\" style=\"font-family:Arial;font-size:20px\">'\n + Blockly.Msg.POPUP_DOWNLOAD_SAVE\n + '</text><rect x=\"1\" y=\"1\" stroke=\"%23BBBBBB\" width=\"100\" height=\"75\" rx=\"2\" ry=\"2\" style=\"fill:none;stroke-width:2\"/><g fill=\"%23DF01D7\"><path d=\"M33.2 34.9h2.2c-0.2 0.3-0.3 0.6-0.3 1h-1.9c-0.3 0-0.5-0.2-0.5-0.5s0.2-0.5 0.5-0.5ZM39.1 29c0-0.3 0.2-0.5 0.5-0.5 0.3 0 0.5 0.2 0.5 0.5v1.7c-0.4 0.1-0.7 0.2-1 0.4v-2.1ZM34.8 31.3c-0.1-0.2-0.1-0.5 0-0.7s0.5-0.2 0.7 0l1.6 1.6c-0.2 0.3-0.4 0.5-0.6 0.8l-1.7-1.7ZM47.5 37.3c0-3.2-2.6-5.7-5.7-5.7 0 0 0 0-0.1 0 0 0 0 0 0 0s0 0 0 0c-0.3 0-0.5 0-0.8 0.1 0 0-0.1 0-0.1 0 -2.5 0.3-4.5 2.3-4.8 4.9 0 0 0 0 0 0.1 0 0.2 0 0.5 0 0.7 0 0 0 0 0 0v7.1c0 3.2 2.6 5.8 5.8 5.8 3.2 0 5.8-2.6 5.8-5.8l-0.1-7.2c0 0 0 0 0 0ZM41.7 36.6c0.4 0 0.8 0.6 0.8 1.3 0 0.7-0.3 1.3-0.8 1.3s-0.8-0.6-0.8-1.3c0.1-0.8 0.4-1.3 0.8-1.3ZM45.5 44.5c0 2.1-1.7 3.8-3.8 3.8s-3.8-1.7-3.8-3.8v-5.3h2.4c0.3 0.5 0.8 0.9 1.4 0.9 1 0 1.7-1 1.7-2.3 0-1.1-0.5-1.9-1.2-2.2v-2c1.9 0.2 3.3 1.8 3.3 3.8v7.1Z\" transform=\"matrix(2.44495 0 0 2.44495 -47.8835 -56.5809)\" fill=\"%239400D3\"/></g></svg>\\')');\n $(\"#liD\").css('background-repeat', 'no-repeat');\n var textH\n var textC;\n $(\"#save-client-compiled-program\").one(\"shown.bs.modal\", function(e) {\n if (navigator.userAgent.indexOf('Edge') < 0) {\n $('#downloadLink').append(programLink);\n } else {\n $('#downloadLink').append(\"<div id='programLink' style='text-align: center;'><br><span style='font-size:36px; padding: 20px'>\"\n + GUISTATE_C.getProgramName() + \"</span></div>\");\n }\n $('#download-instructions tr').each(function(i) {\n $(this).delay(750 * i).animate({\n opacity : 1\n }, 1000);\n });\n });\n $('#save-client-compiled-program').one('hidden.bs.modal', function(e) {\n if ($('#label-checkbox').is(':checked')) {\n GUISTATE_C.setProgramToDownload();\n }\n $('#programLink').remove();\n $('#download-instructions tr').each(function(i) {\n $(this).css('opacity', '0');\n });\n if (textC) {\n $(\"#download-instructions\").find(\"tr\").eq(2).find(\"td\").eq(1).html(textC);\n }\n if (textH) {\n $(\"#popupDownloadHeader\").text(textH);\n }\n GUISTATE_C.setAutoConnectedBusy(false);\n });\n var robotRealName;\n var list = GUISTATE_C.getRobots();\n\n for ( var robot in list) {\n if (!list.hasOwnProperty(robot)) {\n continue;\n }\n if (list[robot].name == GUISTATE_C.getGuiRobot()) {\n robotRealName = list[robot].realName;\n }\n }\n // fix header$(selector).attr(attribute)\n textH = $(\"#popupDownloadHeader\").text();\n $(\"#popupDownloadHeader\").text(textH.replace(\"$\", $.trim(robotRealName)));\n textC = $(\"#download-instructions\").find(\"tr\").eq(2).find(\"td\").eq(1).html();\n $(\"#download-instructions\").find(\"tr\").eq(2).find(\"td\").eq(1).html(textC.replace(\"$\", usb));\n $('#save-client-compiled-program').modal('show');\n }\n } else {\n MSG.displayInformation(result, \"\", result.message, \"\");\n GUISTATE_C.setAutoConnectedBusy(false);\n }\n reloadProgram(result);\n });\n break;\n case 'arduinoAgent':\n GUISTATE_C.setAutoConnectedBusy(true);\n $('#head-navi-icon-robot').addClass('busy');\n PROGRAM.runOnBrickBack(GUISTATE_C.getProgramName(), GUISTATE_C.getConfigurationName(), xmlTextProgram, xmlTextConfiguration, function(result) {\n GUISTATE_C.setState(result);\n if (result.rc == \"ok\") {\n \tMSG.displayMessage(Blockly.Msg[\"MESSAGE_EDIT_START\"], 'TOAST', GUISTATE_C.getProgramName());\n console.log(result.compiledCode);\n console.log(GUISTATE_C.getRobotPort());\n SOCKET_C.uploadProgram(result.compiledCode, GUISTATE_C.getRobotPort());\n GUISTATE_C.setAutoConnectedBusy(false);\n $('#head-navi-icon-robot').removeClass('busy');\n } else {\n console.log('result not ok');\n MSG.displayInformation(result, \"\", result.message, \"\");\n GUISTATE_C.setAutoConnectedBusy(false);\n $('#head-navi-icon-robot').removeClass('busy');\n }\n });\n break;\n case 'arduinoAgentOrToken':\n \tif (GUISTATE_C.getIsAgent() == true){\n GUISTATE_C.setAutoConnectedBusy(true);\n $('#head-navi-icon-robot').addClass('busy');\n PROGRAM.runOnBrickBack(GUISTATE_C.getProgramName(), GUISTATE_C.getConfigurationName(), xmlTextProgram, xmlTextConfiguration, function(result) {\n GUISTATE_C.setState(result);\n if (result.rc == \"ok\") {\n \tMSG.displayMessage(Blockly.Msg[\"MESSAGE_EDIT_START\"], 'TOAST', GUISTATE_C.getProgramName()); console.log(result.compiledCode);\n console.log(GUISTATE_C.getRobotPort());\n SOCKET_C.uploadProgram(result.compiledCode, GUISTATE_C.getRobotPort());\n GUISTATE_C.setAutoConnectedBusy(false);\n $('#head-navi-icon-robot').removeClass('busy');\n } else {\n console.log('result not ok');\n MSG.displayInformation(result, \"\", result.message, \"\");\n GUISTATE_C.setAutoConnectedBusy(false);\n $('#head-navi-icon-robot').removeClass('busy');\n }\n });\n \t}\n \telse{\n PROGRAM.runOnBrick(GUISTATE_C.getProgramName(), GUISTATE_C.getConfigurationName(), xmlTextProgram, xmlTextConfiguration, function(result) {\n GUISTATE_C.setState(result);\n if (result.rc == \"ok\") {\n MSG.displayMessage(\"MESSAGE_EDIT_START\", \"TOAST\", GUISTATE_C.getProgramName());\n } else {\n MSG.displayInformation(result, \"\", result.message, \"\");\n }\n reloadProgram(result);\n });\n break;\n \t}\n break;\n default:\n break;\n }\n }", "function Main()\n{\n StartGame();\n GA();\n\n console.log(\"END AI\");\n}", "function main() {\n const opts = {\n clientEmail: config.get('google.analyticsEmail'),\n // privateKey: analyticsConfig.private_key.replace(/\\\\n/g, '\\n'),\n viewID: config.get('google.analyticsViewId'),\n dbUrl: config.get('db.url'),\n };\n const goolgeAnalyticsController = new GoolgeAnalyticsController(opts);\n goolgeAnalyticsController.execute();\n}", "function runSCADAProgram() {\n console.log('run');\n\n const spirt = spawn(processpath);\n\n spirt.on('exit', () => {\n stopReading();\n ifFirstStart=true;\n });\n}", "function shellRun(args)\n{\n if(args.length > 0)\n {\n krnRunProgram(args[0]);\n }\n else\n {\n _StdIn.putText(\"Please supply a program id.\");\n }\n}", "function runProgram() {\n\t// Clear the canvas\n\tbackground(255);\n\n\t// TODO: Get the phrase in the text box and convert it to upper case\n\tvar words;\n\t//... add your code here.\n\n // Draw the Matrix\n\tdrawMatrix(words)\n}", "function runScript() {\n var entry = ProjectManager.getSelectedItem();\n if (entry === undefined) {\n entry = DocumentManager.getCurrentDocument().file;\n }\n var path = entry.fullPath,\n args = [],\n text = DocumentManager.getCurrentDocument().getText(),\n argsmatch = text.match(/brackets-xunit:\\s*args=\\S+/),\n argsstr = '',\n argsout = '';\n \n if (argsmatch !== null && argsmatch.length > 0) {\n argsstr = argsmatch[0].substring(argsmatch[0].indexOf(\"=\") + 1);\n args = argsstr.split(',');\n argsout = '';\n var i;\n for (i = 0; i < args.length; i++) {\n argsout = argsout + args[i] + \" \";\n }\n }\n nodeConnection.domains.process.spawnSession({executable: path, args: args, cacheTime: 100}).done(function (status) {\n var template = require(\"text!templates/process.html\"),\n html = Mustache.render(template, { path: path, title: \"script - \" + path, args: argsout}),\n newWindow = window.open(\"about:blank\", null, \"width=600,height=200\");\n newWindow.document.write(html);\n newWindow.document.getElementById(\"exitcode\").innerHTML = \"running with pid \" + status.pid;\n newWindow.focus();\n _windows[status.pid] = {window: newWindow, startTime: new Date(), type: \"script\"};\n });\n }", "static ghciSafeRun(evt, task){\n if(!GHCI_PROCESS.isAvailable){\n // ghci is down, respond\n IpcResponder.respondNoGhci(evt);\n return false;\n }\n \n // ghci is running\n try{\n task();\n }\n catch(err){\n IpcResponder.respond(evt, \"ghci-error\", {err: err.message});\n }\n }", "run() {\n console.log('running');\n }", "function start() {\n init();\n run();\n }", "function runEditorCode() {\n\n if (!finalBoss){\n return;\n }\n hasSubmit = true;\n\n if(aceeditorObj.getValue() === 'yo') {\n // cheat\n finalBoss.say('aaaah~ Bluemix the Holy one, save me~');\n killBoss(finalBoss);\n return;\n }\n\n // check syntax first\n var annotations = aceeditorObj.getSession().getAnnotations()\n if(annotations.length > 0) {\n for(var i = 0; i < annotations.length; i++) {\n var foo = annotations[i];\n if(foo.type !== \"warning\") { // ignore warnings\n finalBoss.say('The Code doesn\\'t even compile.');\n playerGetAttackByZombie(finalBoss);\n return;\n }\n }\n }\n\n // TODO check function name, function name must match\n var inputArray = currentCodeQuestion.theinputArray;\n var functionName = currentCodeQuestion.functionName;\n var expectedOutput = currentCodeQuestion.expectedOutput;\n\n var postfix = currentCodeQuestion.getFunctionCallString();\n var runcode = aceeditorObj.getValue() + '\\n' + postfix + ';';\n\n finalBoss.say('Nice! Checking your code with the holy Bluemix ...');\n console.log('before sending to Bluemix runcode:' + runcode);\n\n // no more bluemix server, just win anyway.\n finalBoss.say('aaaah~ Bluemix the Holy one, save me~~');\n killBoss(finalBoss);\n\n /*\n $.ajax({\n type: \"POST\",\n url: BLUEMIX_JS_SANDBOX_SERVER_URL,\n data: {'jscode':encodeURIComponent(runcode)},\n dataType: 'json',\n timeout: 5000,\n error: function(x, t, m) {\n // error handler\n finalBoss.say('Bluemix is not here, try again ... (error when loading service...)');\n if(bmerrorCount++ >= 2) {\n game.time.events.add(Phaser.Timer.SECOND , function() {\n finalBoss.say('Fine! I will let you pass!');\n game.time.events.add(Phaser.Timer.SECOND*2, function() {\n killBoss(finalBoss);\n }, this);\n }, this);\n }\n }\n }).done(function(data) {\n // {\"result\":\"TimeoutError\",\"console\":[]}\n // {\"result\":\"null\",\"console\":[123]}\n // {\"result\":\"'SyntaxError: Unexpected token )'\",\"console\":[]}\n console.log('return from bluemix ' + JSON.stringify(data));\n if(data.result === 'TimeoutError') {\n // taking too long\n finalBoss.say('Your code takes too long to run! Shame!');\n playerGetAttackByZombie(finalBoss);\n } else if(data.result === 'null') {\n // return null!\n finalBoss.say('It returns NULL! LMAO!!!!');\n playerGetAttackByZombie(finalBoss);\n } else if(data.result.indexOf('SyntaxError') > -1) {\n // sytax error\n finalBoss.say('The Code doesn\\'t even compile.');\n playerGetAttackByZombie(finalBoss);\n } else if (JSON.stringify(data.result) === JSON.stringify(expectedOutput)) {\n // answer is currect!\n finalBoss.say('aaaah~ Bluemix the Holy one, save me~~');\n killBoss(finalBoss);\n } else {\n // wrong answer\n finalBoss.say('WRONG! your code return ' + JSON.stringify(data.result) + ' with input ' + JSON.stringify(inputArray));\n playerGetAttackByZombie(finalBoss);\n }\n });\n */\n }", "async function execute() {\n let init_content;\n if (initfile !== null) {\n init_content = await load_init_file(initfile);\n } else {\n init_content = \"\";\n }\n\n let editor_code = await editor.getValue();\n let script = start_script + init_content + editor_code + end_script;\n let resp = await run_code(script);\n\n fillOutput(resp);\n displayOrHideOutputs(resp);\n\n }", "start () {}", "function Main() {\n console.log(`%c Main Function`, \"color: grey; font-size: 14px; font-weight: bold;\");\n buildInterface();\n interfaceLogic();\n }", "function testGMC()\n{\n var numbSet = []\n for (var cD=0;cD<11;cD++)\n {\n numbSet.push([cD])\n }\n\n var ans = generateMultipleCombins(numbSet.length,[1,3,2,1,4],numbSet)\n// var map =[]\n// dimensionRecurse(ans,map);\n\n var int = 5;\n}", "execute_program(){\n\t// execution loop\n\twhile(!this.step()){}\n}", "async main() {\n try {\n // gets the input file name by command line\n const input = argv._[constants.FIRST_ITEM];\n // checks if it was received\n this.checkInputParameter(input);\n\n logger.debug('In about to start reading the input file. Environment: %s', env);\n\n // calls AreaCodeService to read the input, validate it and create the output file\n await areaCodeService.countNumbersByAreaCode(input);\n logger.info('Output file generated successfully with the results...');\n } catch (e) {\n logger.error(e);\n }\n }", "function runBasic() {\n initMap();\n initActors();\n display(); \n}", "function Main()\n {\n \n }", "function main() {\n\t// process.argv array stores command-line arguments\n\tif (process.argv.length !== 3) {\n\t\tconsole.log(\"Incorrect number of arguments to the program\");\n\t\tconsole.log(\"Usage: node GameOfLife.js inputfilename\");\n\t\tconsole.log(\"Example: node GameOfLife.js blinker.gol\");\n\t\tprocess.exit(1);\n\t}\n\n\t// instantiate GameOfLife object\n\tlet gol = new GameOfLife();\n\n\t// load grid with data from file given on command line\n //the parameter passed into this load grid argument is\n //the filename and is argument 2\n\tgol.loadGrid(process.argv[2]);\n\n\tconsole.log(\"Beginning with grid size \" + gol.rows + \",\" + gol.cols);\n\tconsole.log(gol.toString());\n\n\t// play game\n\twhile (true) {\n\t\tlet line = readlineSync.question(\"Press n (or return) for next generation, i to iterate multiple times,\\n\"\n\t\t\t\t\t\t\t+ \"w to save grid to disk, or q to quit? \");\n\t\tline = line.trim().toLowerCase();\n\n\t\tswitch (line) {\n\t\t\tcase \"n\":\n\t\t\tcase \"\":\n\t\t\t\tgol.mutate();\n\t\t\t\tconsole.log(gol.toString());\n\t\t\t\tbreak;\n\n\t\t\tcase \"i\":\n\t\t\t\tlet num = parseInt(readlineSync.question(\"How many iterations? \"));\n\t\t\t\tfor (let i = 0; i < num; i++) {\n\t\t\t\t\tgol.mutate();\n\t\t\t\t\tconsole.log(gol.toString());\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"w\":\n\t\t\t\tlet filename = readlineSync.question(\"Enter a filename: \");\n\t\t\t\tgol.saveGrid(filename.trim());\n\t\t\t\tconsole.log(\"Grid saved to file \" + filename + \"\\n\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"q\":\n\t\t\t\tconsole.log(\"Exiting program\");\n\t\t\t\tprocess.exit(0);\n\t\t\t\tbreak;\n\t\t}\n\t}\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}", "function run(args) {\n initRuntime();\n}" ]
[ "0.6283401", "0.5752504", "0.5603618", "0.55797863", "0.5578637", "0.55252385", "0.55128413", "0.5501874", "0.5476007", "0.5413574", "0.5400769", "0.5263207", "0.5253439", "0.52494496", "0.5249269", "0.5249269", "0.5249269", "0.5249269", "0.5249269", "0.5249269", "0.5249269", "0.5249269", "0.5249269", "0.5249269", "0.5241902", "0.52414495", "0.5239517", "0.52184194", "0.5193642", "0.5189357", "0.51794016", "0.5107327", "0.5103316", "0.5095004", "0.5090498", "0.50892645", "0.50786096", "0.5041813", "0.5041813", "0.50324017", "0.50290346", "0.50265235", "0.4987351", "0.4978096", "0.4972152", "0.4970988", "0.49667886", "0.49593118", "0.49538177", "0.494725", "0.4938715", "0.493451", "0.49230582", "0.4922224", "0.49094284", "0.4908636", "0.48932728", "0.48914292", "0.48879611", "0.48852238", "0.48796782", "0.48783153", "0.48680577", "0.48633626", "0.4847151", "0.48428082", "0.4838813", "0.4825127", "0.48246866", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898", "0.48245898" ]
0.0
-1
Set up connection with signaling server
function connect(failureCB) { failureCB = ((typeof failureCB === 'function') && failureCB) || doNothing; if(typeof(WebSocket) === "undefined") { console.log("您的浏览器不支持WebSocket"); }else { console.log("您的浏览器支持WebSocket"); socket = new WebSocket("ws://"+location.host+"/websocket/" + key); //打开事件 socket.onopen = function () { status = "waiting"; waitingHandler(); // socket.send("这是来自客户端的消息" + location.href + new Date()); }; //获得消息事件 socket.onmessage = function(msg) { console.log(msg.data); // $("#message").val(msg.data) //发现消息进入 开始处理前端触发逻辑 var res = JSON.parse(msg.data); // if messages property exists, then we are connected if (status !== "connected") { // switch status to connected since it is now! status = "connected"; connectedHandler(); } handleMessage(res) }; //关闭事件 socket.onclose = function() { console.log("Socket已关闭"); // $("#close").val("Socket已关闭") }; //发生了错误事件 socket.onerror = function() { failureCB("Socket发生了错误"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "connect() {\n this.hub = signalhub(this.channel, [ CONSTANTS.SIGNAL_SERVER ]);\n this.sw = swarm(this.hub, this.options);\n }", "constructor() {\n this.url = serverLocation + \"/signalr\";\n this.connection = $.hubConnection(this.url, {\n useDefaultPath: false\n });\n this.notificationProxy = this.connection.createHubProxy(\"NotificationHub\");\n this.allNotifications = [];\n this.observers = {\n onMessage: []\n };\n this.startConnection();\n }", "connect() {}", "onConnect() {\n console.log(\"STretch Connected\");\n }", "connect() {\n if (this.dead) return;\n if (this.ws) this.reset();\n if (this.attempts >= 5) {\n this.emit('debug', new Error(`Too many connection attempts (${this.attempts}).`));\n return;\n }\n\n this.attempts++;\n\n /**\n * The actual WebSocket used to connect to the Voice WebSocket Server.\n * @type {WebSocket}\n */\n this.ws = new WebSocket(`wss://${this.voiceConnection.authentication.endpoint}`);\n this.ws.onopen = this.onOpen.bind(this);\n this.ws.onmessage = this.onMessage.bind(this);\n this.ws.onclose = this.onClose.bind(this);\n this.ws.onerror = this.onError.bind(this);\n }", "function initConn() {\n\tws = new SockJS(\"/twitter\");\n\tclient = Stomp.over(ws);\n\tvar headers = {};\n\tvar callback = {};\n\tclient.connect(headers, callback);\n}", "function createConnection () {\n connection = App.models.endpoint({\n id: options.connectTo,\n client: client,\n onMessage: renderReply\n });\n }", "function setupRpcConnection () {\n pull(phoenix.ssb.phoenix.createEventStream(), pull.drain(function (event) {\n if (event.type == 'message')\n setNewMessageCount(getNewMessageCount() + 1)\n }))\n}", "function initWebSocket() {\n\t\t// Create a connection to Server\n\t\tconnect();\n\t}", "function initWebSocket() {\n\t\t// Create a connection to Server\n\t\tconnect();\n\t}", "init() {\n this.socket.emit('init', 'ooga');\n }", "_setup() {\n this.setHeaderFunc({\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache, no-transform',\n 'Connection': 'keep-alive'\n })\n this._writeKeepAliveStream(true)\n this._setRetryInterval()\n this.send(this.connectEventName, this.uid)\n\n const timer = setInterval(this._writeKeepAliveStream.bind(this), this.heartBeatInterval)\n\n this.stream.on('close', () => {\n clearInterval(timer)\n connectionMap.delete(this.uid)\n this.transformStream.destroy()\n })\n connectionMap.set(this.uid, this)\n }", "function start(){\n// will start the connection\n}", "async connect(){}", "function connect() {\n var socket = new SockJS(URL_SERVER + '/short_url');\n stompClient = Stomp.over(socket);\n stompClient.connect({}, function (frame) {\n console.info('Connected: ' + frame);\n stompClient.subscribe('/user/url_shortener/short_url', function (response) {\n dealMessageFromServer(JSON.parse(response.body));\n });\n });\n}", "function initConn(){\nnode.warn(\"LINE 15: node.path= \" + node.path);\n var socket = require('socket.io-client')(node.host, { path: node.path, multiplex:false });\n node.server = socket; // keep for closing\n handleConnection(socket);\n }", "connect() {\n log.info('connection constructing.');\n const WebSocketServer = WebSocket.Server;\n const wss = new WebSocketServer({\n port: PORT\n });\n\n wss.on('connection', (ws) => {\n log.info('connection established.');\n this.ws = ws;\n ws.on('message', this.handleMessage);\n });\n\n listener.subscribe('_send', this.send.bind(this));\n }", "function connect(){\n connection.connect(function(err) {\n // console.log(\"connected as id \" + connection.threadId);\n if (err) throw err;\n });\n }", "function connect(){\n connection.connect(function(err) {\n // console.log(\"connected as id \" + connection.threadId);\n if (err) throw err;\n });\n }", "start() {\n this.setupDoorbellSocket();\n this.setupMQTT();\n this.initLogin();\n }", "function connect() {\n $scope.socket = io.connect(constants.backendUrlEcran);\n\n $scope.socket.io.on('connect_error', function (err) {\n console.log('Error connecting to server');\n });\n }", "setupSocket() {\n this.socket = io('/gameroom');\n this.socket.on('connect', () => {\n this.socket.emit('setup_client')\n });\n this.socket.on('packet', this.handleSocketMessages)\n }", "_setup (data) {\n if (data.id) {\n this.id = data.id\n } else {\n // generate an unique ID for this connection\n this.id = this._generateID()\n }\n\n // set the connection timestamp\n this.connectedAt = new Date().getTime()\n\n let requiredFields = [ 'type', 'rawConnection' ]\n\n requiredFields.forEach(req => {\n if (data[ req ] === null || data[ req ] === undefined) {\n throw new Error(`${req} is required to create a new connection object`)\n }\n this[ req ] = data[ req ]\n })\n\n let enforcedConnectionProperties = [ 'remotePort', 'remoteIP' ]\n\n enforcedConnectionProperties.forEach(req => {\n if (data[ req ] === null || data[ req ] === undefined) {\n if (this.api.config.general.enforceConnectionProperties === true) {\n throw new Error(`${req} is required to create a new connection object`)\n } else {\n data[ req ] = 0 // could be a random uuid as well?\n }\n }\n this[ req ] = data[ req ]\n })\n\n // set connection defaults\n let connectionDefaults = {\n error: null,\n params: {},\n rooms: [],\n fingerprint: null,\n pendingActions: 0,\n totalActions: 0,\n messageCount: 0,\n canChat: false\n }\n\n for (let i in connectionDefaults) {\n if (this[ i ] === undefined && data[ i ] !== undefined) { this[ i ] = data[ i ] }\n if (this[ i ] === undefined) { this[ i ] = connectionDefaults[ i ] }\n }\n\n this.api.i18n.invokeConnectionLocale(this)\n }", "connect() {\n if (this.status !== Constants.VoiceStatus.RECONNECTING) {\n if (this.sockets.ws) throw new Error('There is already an existing WebSocket connection.');\n if (this.sockets.udp) throw new Error('There is already an existing UDP connection.');\n }\n\n if (this.sockets.ws) this.sockets.ws.shutdown();\n if (this.sockets.udp) this.sockets.udp.shutdown();\n\n this.sockets.ws = new VoiceWebSocket(this);\n this.sockets.udp = new VoiceUDP(this);\n\n const { ws, udp } = this.sockets;\n\n ws.on('error', err => this.emit('error', err));\n udp.on('error', err => this.emit('error', err));\n ws.on('ready', this.onReady.bind(this));\n ws.on('sessionDescription', this.onSessionDescription.bind(this));\n ws.on('startSpeaking', this.onStartSpeaking.bind(this));\n }", "function initConnection() {\n if (typeof (this.driver) != undefined) {\n this.driver.setBackendDriver();\n }\n }", "function connectionInitialzation(opts, connection, attributes){\n\n var connID = connection.id;\n\n debug(\"Initializing IPC Subscription!!!\", core.uuid, opts.groups, connID);\n\n attributes.force(\"ipc\");\n\n connection.symbolicOwners = {};\n redisClient.incr(\"totalCurrentCount\");\n addRoute(\"ntvMsg\"+connID, \"NTV:\"+connID+\":MSG\", handleMessageToNativeConnection);\n\n redisClient.hset(\"samsaara:connectionOwners\", connID, core.uuid, function (err, reply){\n attributes.initialized(null, \"ipc\");\n }); \n}", "async init() {\n // are we logged in?\n await this.setLoginState();\n\n // initialize signalR hub (websockets connection)\n let connection = new signalR.HubConnectionBuilder().withUrl(\"/api\").build();\n\n // receives the \"colorChanged\" web socket event\n connection.on(\"colorChanged\", (hex, userName, identityProvider) => {\n // add a color circle\n this.updateColor(hex, userName, identityProvider);\n });\n\n // start the websocket connection\n await connection.start();\n\n goButton.addEventListener(\"click\", async () => {\n const color = colorInput.value;\n this.setColor(color);\n });\n\n // double-clicking the bulb puts the app in presentation mode\n // where usernames will not be shown\n bulb.addEventListener(\"dblclick\", () => {\n this.presentationMode = !this.presentationMode;\n localStorage.setItem(\"presentationMode\", this.presentationMode);\n alert(`Presentation mode is ${this.presentationMode ? \"ON\" : \"OFF\"}`);\n });\n }", "connect() {\n if (this.status !== Constants.VoiceStatus.RECONNECTING) {\n if (this.sockets.ws) throw new Error('There is already an existing WebSocket connection.');\n if (this.sockets.udp) throw new Error('There is already an existing UDP connection.');\n }\n\n if (this.sockets.ws) this.sockets.ws.shutdown();\n if (this.sockets.udp) this.sockets.udp.shutdown();\n\n this.sockets.ws = new VoiceWebSocket(this);\n this.sockets.udp = new VoiceUDP(this);\n\n const { ws, udp } = this.sockets;\n\n ws.on('error', err => this.emit('error', err));\n udp.on('error', err => this.emit('error', err));\n ws.on('ready', this.onReady.bind(this));\n ws.on('sessionDescription', this.onSessionDescription.bind(this));\n ws.on('speaking', this.onSpeaking.bind(this));\n }", "Connect() {\r\n this._MistyWebSocket.Connect(function (event) {\r\n //\talert(\"Connected to websockets\");\r\n });\r\n }", "function onConnect() {\r\n // Once a connection has been made, make a subscription and send a message.\r\n console.log(\"onConnect\");\r\n client.subscribe(\"State\", { qos: Number(1) });\r\n client.subscribe(\"Content\", { qos: Number(1) });\r\n\r\n }", "function spConnect() {\n\n // use 'PushManager' to request a new PushServer URL endpoint for 'Mail' notifications:\n endpointRequest = navigator.push.register();\n // the DOMRequest returns 'successfully':\n endpointRequest.onsuccess = function( event ) {\n // extract the endpoint object from the event:\n endpoint = event.target.result;\n\n // if it is the first registration, need to register\n // the 'pushEndpoint' with the UnifiedPush server.\n if ( endpoint.pushEndpoint ) {\n // assemble the metadata for registration with the UnifiedPush server\n var metadata = {\n deviceToken: mailEndpoint.channelID,\n simplePushEndpoint: mailEndpoint.pushEndpoint\n };\n\n var settings = {\n success: function() {\n //success handler\n alert('Success')\n },\n error: function() {\n //error handler\n }\n };\n\n settings.metadata = metadata;\n\n // register with the server\n UPClient.registerWithPushServer(settings);\n } else {\n console.log(\"'Endpoint' was already registered!\");\n }\n };\n // set the notification handler:\n navigator.setMessageHandler( \"push\", function( message ) {\n if ( message.channelID === mailEndpoint.channelID ) {\n // let's react on the endpoint\n }\n });\n }", "async function connect_init() {\n return connect.server({\n root: configs.connect.root,\n port: configs.connect.port,\n livereload: configs.connect.live\n });\n}", "function setup() {\n // server.authenticate = authenticate;\n // server.authorizePublish = authorizePublish;\n // server.authorizeSubscribe = authorizeSubscribe;\n log.info('Mosca server is up and running on '+env.mhost+':'+env.mport+' for mqtt and '+env.mhost+':'+env.hport+' for websocket');\n\n}", "function connect(){\n\tconsole.log('Attempting to connect to ' + Config.url());\n\tsocket = new io.connect(Config.url());\n\tsocket.on('start',onStart);\n\tsocket.on('disconnect',onDisconnect);\n\tsocket.on('connect',onConnect);\n}", "async onReady() {\n // Initialize your adapter here\n // Reset the connection indicator during startup\n this.setState('info.connection', false, true);\n if (!this.config.host) {\n this.log.error(`No host is configured, will not start anything!`);\n return;\n }\n await this.cleanupObjects();\n this.createWebSocket();\n if (this.config.luxPort) {\n await this.createLuxTreeAsync();\n this.createLuxtronikConnection(this.config.host, this.config.luxPort);\n }\n this.watchdogInterval = setInterval(() => this.handleWatchdog(), this.config.refreshInterval * 1000);\n }", "function connect() {\n // Create a new WebSocket to the SERVER_URL (defined above). The empty\n // array ([]) is for the protocols, which we are not using for this\n // demo.\n ws = new WebSocket(SERVER_URL, []);\n // Set the function to be called when we have connected to the server.\n ws.onopen = handleConnected;\n // Set the function to be called when an error occurs.\n ws.onerror = handleError;\n\n\n ws.onmessage = MsjRecibido;\n // Set the function to be called when we have connected to the server.\n }", "start(cb) {\n let app = require('../pomelo').app;\n let self = this;\n\n let gensocket = function(socket) {\n let hybridsocket = new HybridSocket(curId++, socket);\n hybridsocket.on('handshake', self.handshake.handle.bind(self.handshake, hybridsocket));\n hybridsocket.on('heartbeat', self.heartbeat.handle.bind(self.heartbeat, hybridsocket));\n hybridsocket.on('disconnect', self.heartbeat.clear.bind(self.heartbeat, hybridsocket.id));\n hybridsocket.on('closing', Kick.handle.bind(null, hybridsocket));\n self.emit('connection', hybridsocket);\n };\n\n this.connector = app.components.__connector__.connector;\n this.dictionary = app.components.__dictionary__;\n this.protobuf = app.components.__protobuf__;\n this.decodeIO_protobuf = app.components.__decodeIO__protobuf__;\n\n if(!this.ssl) {\n this.listeningServer = net.createServer();\n } else {\n this.listeningServer = tls.createServer(this.ssl);\n }\n this.switcher = new Switcher(this.listeningServer, self.opts);\n\n this.switcher.on('connection', function(socket) {\n gensocket(socket);\n });\n\n if(!!this.distinctHost) {\n this.listeningServer.listen(this.port, this.host);\n } else {\n this.listeningServer.listen(this.port);\n }\n\n process.nextTick(cb);\n }", "function init(){\n wss.on('connection', onConnection);\n}", "async connect() {\n this._mav = await this._getMavlinkInstance();\n this._socket = await this._getSocket();\n this._registerMessageListener();\n this._registerSocketListener();\n }", "init() {\n module_utils.patchModule(\n 'nats',\n 'connect',\n wrapNatsConnectFunction\n );\n }", "async function init() {\n try {\n console.log('connect to KV service...');\n await kv.connect();\n console.log('KV connected');\n console.log('connect to orm....');\n await connect([WorkerSchema, TaskSchema], {\n type: 'mysql',\n host: 'localhost',\n port: 3306,\n username: 'root',\n password: '',\n database: 'dubnium',\n });\n console.log('database connected');\n console.log('connect to nats...');\n await nats.connect();\n console.log('nats connected');\n } catch (err) {\n console.error('database connection failed');\n return;\n }\n}", "function setSignalRClient(signalRConnection) { this.signalRConnection = signalRConnection; }", "initSockets() {\n this.relay.on('requests satisfied', (data) => {\n const sockets = this.channel('relay');\n\n if (!sockets)\n return;\n\n this.to('relay', 'relay requests satisfied', data);\n });\n }", "start () {\n\t\tthis._logger.info(`Connecting to ${this.host}...`)\n\t\tthis._params.host = this.host\n\t\tthis._connection.connect(this._params)\n\t\tthis.started = true\n\t}", "connect() {\n this.ws = new WebSocket(this.host);\n this.ws.on('open', this.onConnect.bind(this));\n this.ws.on('close', this.onDisconnect.bind(this));\n this.ws.on('error', this.onError.bind(this));\n }", "_onConnecting() {\n this.emit(\"connecting\");\n }", "function setup() {\n var IPTiddler = $tw.wiki.getTiddler(\"$:/ServerIP\");\n var IPAddress = IPTiddler.fields.text;\n $tw.socket = new WebSocket(`ws://${IPAddress}:8000`);\n $tw.socket.onopen = openSocket;\n $tw.socket.onmessage = parseMessage;\n $tw.socket.binaryType = \"arraybuffer\";\n\n addHooks();\n }", "function makeConnection () {\n console.log('makeConnection');\n client.connect(port, host);\n }", "async connect(){\n\t\ttry {\n\t\t\tthis.token = await Global.key('token');\n\t\t\tLogger.info(\"Connecting to Ably message service...\");\n\t\t\tthis.client = new Ably.Realtime({\n\t\t\t\tclientId: Global.mac, \n\t\t\t\ttoken: this.token,\n\t\t\t\tauthUrl: 'https://mystayapp.ngrok.io/devices/v1/tokens', \n\t\t\t\tauthMethod: 'POST',\n\t\t\t\tauthHeaders: {\n\t\t\t\t\t'x-device-id': Global.mac\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Here we are setting up the various listeners for Ably realtime\n\t\t\t// client connection state events:\n\t\t\t// https://ably.com/documentation/realtime/connection\n\t\t\t// These should all be bound to this class in order\n\t\t\t// to call methods on the class itself:\n\n\t\t\tthis.client.connection.on(this.stateChange.bind(this));\n\t\t\tthis.client.connection.on('connected', this.connected.bind(this));\n\t\t\tthis.client.connection.on('disconnected', this.disconnected.bind(this));\n\n\t\t} catch(err){\n\t\t\tLogger.error(err);\n\t\t}\n\t}", "run() {\n this.reset();\n this.socket = net.createConnection({\n 'host': this.host.address, \n 'port': this.port,\n }).setKeepAlive(true); // .setNoDelay(true)\n this.socket.on('connect', this.onConnect);\n this.socket.on('error', this.onError);\n this.socket.on('data', this.onData);\n this.socket.on('close', this.onClose);\n }", "function preInititiation(){\n\tsignalServer = new WebSocket(signalServerURL); // Set to local websocket for now\n\tsignalServer.binaryType = \"arraybuffer\";\n\n\tvar peerMediaElements = document.getElementById(\"peer-media-banner\");\n\tvar peerMediaDiv = document.createElement(\"div\");\n\tvar peerMediaVideo = document.createElement(\"img\");\n\tpeerMediaVideo.setAttribute(\"class\", \"z-depth-5\");\n\tpeerMediaVideo.setAttribute(\"height\", \"150\");\n\tpeerMediaVideo.src = avatarPath;\n\tpeerMediaVideo.id = \"user-media-\"+peerID;\n\tpeerMediaDiv.setAttribute(\"class\", \"col s4\");\n\tpeerMediaDiv.appendChild(peerMediaVideo);\n\tpeerMediaElements.appendChild(peerMediaDiv);\n\n\t\tif (peerID != senderID){\n\t\t\tcurrentPeer = 0; // Since server ID of the host will always be 0 for a new room\n\t\t\t// addPeer(); // Will resume this function while on the feature of video calling\n\t\t\tconsole.log(\"initiating connection with host peer\")\n\t\t\t// initiatePeerConnection(peerID);\n\t\t}else{\n\t\t\tnavigator.getUserMedia(constraints, function(stream){\n\t\t\t\tlocalStream = stream;\n\t\t\t\tconsole.log(localStream);\n\t\t\t\tgotLocalStream(localStream, currentPeer);\n\t\t\t}, fallbackUserMedia);\n\t\t\tconsole.log(signalServer.readyState);\n\t\t\t// signalServer.send(JSON.stringify({\"addRoom\": true, \"roomID\": peerID}));\n\t\t}\n\t// };\n\t// }, 2000);\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"bdcc/itaxi\");\n}", "async onReady() {\n // Initialize your adapter here\n // Subsribe to all state changes\n this.subscribeStates('*');\n this.axiosInstance = axios_1.default.create({\n baseURL: `http://${this.config.host}/api/v1/`,\n timeout: 1000\n });\n // try to ping volumio\n const connectionSuccess = await this.pingVolumio();\n if (this.config.checkConnection) {\n let interval = this.config.checkConnectionInterval;\n if (!interval || !isNumber(interval)) {\n this.log.error(`Invalid connection check interval setting. Will be set to 30s`);\n interval = 30;\n }\n this.checkConnectionInterval = setInterval(this.checkConnection, interval * 1000, this);\n }\n // get system infos\n if (connectionSuccess) {\n this.apiGet('getSystemInfo').then(sysInfo => {\n this.setStateAsync('info.id', sysInfo.id, true);\n this.setStateAsync('info.host', sysInfo.host, true);\n this.setStateAsync('info.name', sysInfo.name, true);\n this.setStateAsync('info.type', sysInfo.type, true);\n this.setStateAsync('info.serviceName', sysInfo.serviceName, true);\n this.setStateAsync('info.systemversion', sysInfo.systemversion, true);\n this.setStateAsync('info.builddate', sysInfo.builddate, true);\n this.setStateAsync('info.variant', sysInfo.variant, true);\n this.setStateAsync('info.hardware', sysInfo.hardware, true);\n });\n // get inital player state\n this.updatePlayerState();\n }\n if (this.config.subscribeToStateChanges && this.config.subscriptionPort && connectionSuccess) {\n this.log.debug('Subscription mode is activated');\n try {\n this.httpServerInstance = this.httpServer.listen(this.config.subscriptionPort);\n this.log.debug(`Server is listening on ${ip_1.default.address()}:${this.config.subscriptionPort}`);\n this.subscribeToVolumioNotifications();\n }\n catch (error) {\n this.log.error(`Starting server on ${this.config.subscriptionPort} for subscription mode failed: ${error.message}`);\n }\n }\n else if (this.config.subscribeToStateChanges && !this.config.subscriptionPort) {\n this.log.error('Subscription mode is activated, but port is not configured.');\n }\n else if (!this.config.subscribeToStateChanges && connectionSuccess) {\n this.unsubscribeFromVolumioNotifications();\n }\n this.httpServer.post('/volumiostatus', (req, res) => {\n this.onVolumioStateChange(req.body);\n res.sendStatus(200);\n });\n }", "constructor(t){const e={...t};this.connectionState=new h,this.server=\"https://hub-server-2.heatgenius.co.uk\",this.username=\"\",this.signature=\"\",this.auth={header:{}},this.lastQueryTime=null,this._axios=i.a.create({}),this.logger=e.logger?e.logger:console,this.debug=!!e.debug&&e.debug}", "constructor () {\r\n // run super\r\n super ();\r\n\r\n // bind methods\r\n this.room = this.room.bind (this);\r\n this.user = this.user.bind (this);\r\n this.emit = this.emit.bind (this);\r\n this.session = this.session.bind (this);\r\n\r\n // setup redis conn\r\n let conn = config.get ('redis');\r\n\r\n // add key\r\n conn.key = config.get ('domain') + '.socket';\r\n }", "function makeConnection() {\n client.connect(config.port, config.host);\n}", "function initPeer() {\n // Do we get a response\n client.gotRespond = false;\n // Getting the init peer\n var peer = constructor('init');\n // Peer signal\n // Send a request for connection\n peer.on('signal', (data) => {\n if (!client.gotRespond) {\n socket.emit('Request', data);\n }\n })\n client.peer = peer;\n }", "async connect () {\n this.connection = new Connection(this.options.api_url, this.options)\n this.connection.connect()\n await this.connecting()\n }", "async connect () {\n return this.setConnection(this.setClient())\n }", "onSignal (packet) {\n const uuid = packet.uuid\n\n if (packet.initiator) {\n if (this.peers[uuid]) {\n // oh sweet race condition, i'll try cancel my initiated\n // connection, but this is probably going to result in\n // undefined behaviour.\n\n // (We both tried to initiate to each other at the same\n // time, shouldn't be possible but may be)\n\n this.peers[uuid].destroy()\n delete this.peers[uuid]\n }\n\n var p = new Peer({\n initiator: false,\n trickle: false,\n stream: this.stream\n })\n\n p.on('error', (err) => {\n console.log('error', err)\n })\n\n p.on('signal', (data) => {\n fetch(`${this.endpoint}/${uuid}/signal`, {\n method: 'POST',\n headers: this.headers,\n body: JSON.stringify({\n initiator: false,\n data: data,\n uuid: this.uuid\n })\n })\n })\n\n p.signal(packet.data)\n\n this.addPeer(uuid, p)\n } else {\n if (!this.peers[uuid]) {\n console.error('Response signal from peer we didnt try and connect to')\n return\n }\n\n this.peers[uuid].signal(packet.data)\n }\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n\n}", "async startServer (server) {\n // Setup Websockets\n this.socket = SocketIO(server, {\n cors: {\n origin: \"*\",\n methods: ['GET', 'POST']\n }\n })\n\n this.socket.on('connection', (client) => this._onConnection(client))\n }", "_setup() {\n this.self.ipc.register(this.returnID, data => {\n this._handleResponse(data)\n });\n\n let data = {}\n\n data.globalType = this.globalType;\n data.clusterID = this.clusterID;\n data.responseID = this.returnID;\n data.data = this.broadcastString\n\n this.self.ipc.broadcast('advancedIPCListen', data);\n\n\n this.timeout = setTimeout(() => {\n if (this.responses.length < this.expectedReturns) {\n return this.emit('failed', 'Timeout waiting for all responses.');\n }\n }, 30000);\n }", "startConnection() {\n this.connection.start().done(function (e) {\n console.log(e);\n }).fail(function (e, f, g) {\n console.log(e, f, g);\n });\n this.notificationProxy.on(\"receiveSolution\", function (s) {\n var sol = new Solution(s);\n console.log(sol);\n runtimeManager.addSolution(sol);\n });\n }", "function init () {\n log.info('Hyperion Remote starting...')\n createSSDPHandler()\n createWebsocketHandler()\n createWindow()\n}", "function init(p) {\n port = p;\n io = io.listen(port);\n io.sockets.on('connection', acceptConnection);\n}", "function runServer() {\n server.listen(port);\n server.on('error', onError);\n server.on('listening', onListening);\n /**\n * Signaling Server\n */\n require('../Signaling-Server.js')(server);\n}", "connect() {\n\t\tthis.log.info('webOS - connected to TV');\n\t\tthis.getTvInformation();\n\t\tthis.connected = true;\n\t\tthis.subscribeToServices();\n\t}", "connect() {\n if(!this.username || !this.password) {\n return;\n }\n slsk.connect({\n user: this.username,\n pass: this.password,\n }, (err, client) => this.onConnected(err, client));\n }", "async prepareServer() {\n this.options.server && (this.server = await this.addService('server', new this.ServerTransport(this.options.server))); \n }", "connect() {\n communicator.sendMessage('connected');\n }", "function init() {\n kalmServer = setServer();\n\n kalmServer.on('connection', function(client) {\n redisService.getLastPosts().then((tweets) => {\n client.send('tweets', tweets);\n });\n });\n\n console.log('Server is up');\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n }", "async init() {\n // initialize signalR hub (websockets connection)\n let connection = new signalR.HubConnectionBuilder()\n .withUrl(API_BASE)\n .build();\n\n // receives the \"colorChanged\" web socket event\n connection.on(\"colorChanged\", hex => {https://nodejs.org/en/\n // update the bulb color\n bulb.style = `fill: #${currentColor};`;\n currentColor.textContent = `#${currentColor}`;\n });\n\n // start the websocket connection\n await connection.start();\n\n goButton.addEventListener(\"click\", async () => {\n const color = colorInput.value;\n this.setColor(color);\n });\n\n goButton.addEventListener(\"click\", async () => {\n const color = colorInput.value;\n this.setColor(color);\n });\n }", "__broker_setup() {\n this.mqttServer.authenticate = this.__broker_auth;\n this.mqttServer.authorizePublish = this.__broker_allow_pub;\n this.mqttServer.authorizeSubscribe = this.__broker_allow_sub;\n this.mqttServer.on('clientConnected', this.__broker_connected);\n this.mqttServer.on('published', this.__broker_published);\n this.mqttServer.on('subscribed', this.__broker_subscribed);\n this.mqttServer.on('unsubscribed', this.__broker_unsubscribed); \n this.mqttServer.on('clientDisconnecting', this.__broker_disconnecting);\n this.mqttServer.on('clientDisconnected', this.__broker_disconnected);\n if (this.readyCallback != null) {\n this.readyCallback(); // indicates that we are ready\n }\n console.log('[MQTT] Mosca server is up and running on port ' + this.mqttPort);\n }", "function connect() {\n\tif(!conn || !conn.connected) {\n\t\tclient.connect('ws://'+ config.address + ':' + config.port + '/', 'echo-protocol');\n\t}\n}", "setup() {\n\n // create the settings object\n var settings = {\n port: this.mqttPort,\n backend: {\n type: 'mongo',\n url: 'mongodb://localhost:' + this.mongodbPort + '/mqtt',\n pubsubCollection: this.mongoPersistanceName,\n mongo: {}\n },\n logger: {\n name: this.logName,\n level: this.logLevel,\n }\n };\n\n // create the instance\n this.mqttServer = new mqttBroker.Server(settings);\n\n var self = this;\n\n var moscaPersistenceDB = new mqttBroker.persistence.Mongo({\n url: 'mongodb://localhost:' + this.mongodbPort + '/moscaPersistence',\n ttl: {\n subscriptions: this.ttlSub,\n packets: this.ttlPacket\n }\n },\n function () {\n console.log('[HubManager] server persistence is ready on port ' + self.mongodbPort)\n }\n );\n moscaPersistenceDB.wire(this.mqttServer);\n this.mqttServer.on('ready', function(){\n // TODO fix this because it's ugly\n // but cheers Time Kadel ([email protected]) <-- this guy is world class! grab him whilst you can\n self.__broker_setup(self)\n }); // engage the broker setup procedure\n }", "initServerSideClient() {\n this._serverSideClient = this._bayeux.getClient();\n this._serverSideClient.subscribe('/chat', (message) => {\n try {\n const msg = JSON.parse(message);\n if (msg) {\n this.events.emit('message', msg);\n }\n else {\n throw new Error('Message bad format');\n }\n }\n catch (e) {\n logger_1.logger.info(`Receive bad message : ${message}`);\n }\n });\n }", "async function init() {\n // Configure plug-ins.\n await server.register([\n require('vision'),\n require('inert'),\n require('lout')\n ]);\n\n await server.register(require('blipp'));\n\n // Configure logging.\n await server.register({\n plugin: require('hapi-pino'),\n options: {\n prettyPrint: true\n }\n });\n\n // Start the server.\n await server.start();\n console.log(`Server running at ${server.info.uri}`);\n}", "function connectionOpen() {\n //socket.send(\"Connection with Server. Подключение установлено обоюдно, отлично!\");\n console.log(\"Connected\");\n main();\n}", "init(connection) {\n super.init(connection);\n Strophe.addNamespace('PING', 'urn:xmpp:ping');\n }", "init(connection) {\n super.init(connection);\n Strophe.addNamespace('PING', 'urn:xmpp:ping');\n }", "async connect() {\n logger.debug('connect()');\n }", "init() {\n // Setup event handlers for the socket\n this._setListeners(() => {\n // Check that connection limit is not exceeded\n if (this._server.options.maxClients && this._server.connections.size > this._server.options.maxClients) {\n return this.send(421, this.name + ' Too many connected clients, try again in a moment');\n }\n\n // Keep a small delay for detecting early talkers\n setTimeout(() => this.connectionReady(), 100);\n });\n }", "init(connection) {\n super.init(connection);\n strophe_js__WEBPACK_IMPORTED_MODULE_1__[\"Strophe\"].addNamespace('PING', 'urn:xmpp:ping');\n }", "function init() {\n //Create and open the socket\n leap = new WebSocket(\"ws://localhost:6437/\");\n\n // On successful connection\n leap.onopen = function (event) {\n $log.info(\"Connected to Leap WebSocket!\");\n };\n\n // On message received\n leap.onmessage = function (event) {\n $rootScope.$broadcast('leapData', $.parseJSON(event.data));\n };\n\n // On socket close\n leap.onclose = function (event) {\n leap = null;\n $log.info(\"WebSocket connection closed\");\n }\n\n //On socket error\n leap.onerror = function (event) {\n alert(\"Received error\");\n };\n }", "function connect() {\n sb = new SendBird({appId: APP_ID.value});\n sb.connect(USER_ID.value, (user, error) => {\n if (error) {\n alert(error);\n } else {\n setChannelHandler();\n connected = true;\n recordingArea.style.display = 'inline-block';\n butConnect.style.display = 'none';\n }\n });\n}", "connect() { socket_connect(this) }", "initConnection() {\n\t\tconsole.debug(\"Attempting to connect to {url}...\".formatUnicorn({\n\t\t\t\"url\": this.url,\n\t\t}));\n\t\tthis.socket = new WebSocket(this.url);\n\t\tthis.addListeners(this.callbacks);\n\n\t\t// Add listener to attempt reconnect after set delay.\n\t\t// Makes for an autorepeat because failure will trigger the 'close' event.\n\t\tthis.addListeners({\n\t\t\t\"close\": function(event) {\n\t\t\t\tconsole.debug(\"Connection to {url} closed/failed, trying to reconnect in {delay} seconds.\"\n\t\t\t\t\t.formatUnicorn({\n\t\t\t\t\t\t\"url\": this.url,\n\t\t\t\t\t\t\"delay\": this.closed_repeat_delay\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t\twindow.setTimeout(\n\t\t\t\t\tthis.initConnection.bind(this),\n\t\t\t\t\tthis.closed_repeat_delay * 1000\n\t\t\t\t);\n\t\t\t}.bind(this)\n\t\t});\n\t}", "fireUpEngines() {\n const httpServer = http.createServer(this.app);\n httpServer.listen(this.configuration.port);\n console.log(`TreeHouse HTTP NodeJS Server listening on port ${this.configuration.port}`);\n\n // HTTPS - Optional\n if (this.configuration.https) {\n const httpsServer = https.createServer(this.getHttpsCredentials(), this.app);\n httpsServer.listen(this.configuration.https.port);\n console.log(`TreeHouse HTTPS NodeJS Server listening on port ${this.configuration.https.port}`);\n }\n }", "async _start() {\n const options = {\n host: this.host,\n port: this.port,\n secure: this.secure,\n useHostName: this.useHostName,\n alterPath: this.alterPath\n };\n try {\n // fetch the WebSocket debugger URL\n const url = await this._fetchDebuggerURL(options);\n // allow the user to alter the URL\n const urlObject = parseUrl(url);\n urlObject.pathname = options.alterPath(urlObject.pathname);\n this.webSocketUrl = formatUrl(urlObject);\n // update the connection parameters using the debugging URL\n options.host = urlObject.hostname;\n options.port = urlObject.port || options.port;\n // fetch the protocol and prepare the API\n const protocol = await this._fetchProtocol(options);\n api.prepare(this, protocol);\n // finally connect to the WebSocket\n await this._connectToWebSocket();\n // since the handler is executed synchronously, the emit() must be\n // performed in the next tick so that uncaught errors in the client code\n // are not intercepted by the Promise mechanism and therefore reported\n // via the 'error' event\n process.nextTick(() => {\n this._notifier.emit('connect', this);\n });\n } catch (err) {\n this._notifier.emit('error', err);\n }\n }", "function setup() {\n console.log('Mosca server is up and running')\n console.log(moscaSettings.port);\n // server.authenticate = authenticate;\n //server.authorizePublish = authorizePublish;\n //server.authorizeSubscribe = authorizeSubscribe;\n}", "init() {\n this.signalRHub = $.connection.signalRHub;\n\n this.client = this.signalRHub.client;\n\n\n let isInit = false;\n this.client.startBrodcastClient = (prevConnections, connectionid, userName, color) => {\n if (game == null) {\n return true;\n }\n const startNewGame = () => {\n if (!isInit) {\n isInit = true;\n $('#startGame').hide();\n $('#snakes').show();\n game.start();\n }\n };\n \n /*if (this.connectionid == connectionid || (this.game === null && this.connectionid != connectionid)) {\n startNewGame();\n }*/\n\n startNewGame();\n\n prevConnections.forEach((otherClient) => {\n if (otherClient.connectionid != connectionid) {\n game.joinSnake(otherClient.connectionid, 'gray');\n }\n });\n\n //if (this.connectionid != connectionid) {\n // game.joinSnake(connectionid, color);\n //}\n };\n\n //this.client.joinPrevSnake = (connectionid, clientJoinedConnectionid, userName, color) => {\n // if (connectionid == this.connectionid) {\n // game.joinSnake(connectionid, color);\n // }\n //};\n\n this.client.setRemoteDirectionCallBack = (snakeId, direction) => {\n if (game !== null && snakeId != this.connectionid) {\n game.updateDirection(snakeId, direction);\n }\n };\n\n $.connection.hub.start().done(() => {\n this.server = this.signalRHub.server;\n this.startNewClient = this.server.startNewClient;\n this.setRemoteDirection = this.server.setRemoteDirection;\n this.connectionid = $.connection.hub.id;\n //$.connection.$user(this.connectionid);\n }).fail((a) => {\n\n });\n }", "function initSocksConnection(middleware) {\n\t// keep log of connected clients\n\tclients.push(this);\n\t// remove from clients on disconnect\n\tthis.on('end', function() {\n\t\tvar idx = clients.indexOf(this);\n\t\tif (idx != -1) {\n\t\t\tclients.splice(idx, 1);\n\t\t}\n\t});\n\tthis.on('error', function(e) {\n\t\terrorLog('%j', e);\n\t});\n\n\t// do a handshake\n\tthis.handshake = handshake.bind(this);\n\tthis.on('data', this.handshake);\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and save a message to a txt.\n client.subscribe(\"mebaris01/nurusallam/\");\n \n}", "function bind() {\r\n\r\n socket = new io.Socket(postmile.api.domain, { port: postmile.api.port, rememberTransport: false });\r\n\r\n socket.on('connect', function () {\r\n Y.log('Connected!');\r\n });\r\n\r\n socket.on('message', function (message) {\r\n handleStreamMessage(message);\r\n });\r\n\r\n socket.connect();\r\n\r\n Y.on(\"postmile:subscribeProject\", function (project) {\r\n subscribe(project);\r\n });\r\n\r\n }", "init() {\n this.io.on('connection', function (socket) {\n /**\n * Triggered when a socket disconnects\n */\n socket.on('disconnect', function () {\n console.log(`[SOCKET] Client disconnected! ID: ${socket.id}`);\n });\n\n console.log(`[SOCKET] New client connected! ID: ${socket.id}`);\n });\n\n /**\n * Start listening on the right port/host for the Socket.IO server\n */\n console.log('[SYSTEM] Socket.IO started !');\n }", "openBackendCommunication(){\n var connectionController = this;\n return new Promise( function( resolv,reject ){\n connectionController.backendConnection = \n new WebSocket( connectionController.backendConfiguration.ssl+\"://\"+\n connectionController.backendConfiguration.ip+\":\"+\n connectionController.backendConfiguration.port );\n\n connectionController.backendConnection.on('message', function(data) {\n this.pipeline.receive(data);\n }.bind(connectionController));\n \n connectionController.backendConnection.on('open', function(){\n this.pipeline.setBackendConnection( this.backendConnection );\n resolv(\"Backend connection established\");\n }.bind(connectionController));\n\n connectionController.backendConnection.on('error',function(err){\n reject(err);\n });\n });\n }", "function onConnect() {\r\n // Once a connection has been made, make a subscription and send a message.\r\n console.log(\"Conectado...\");\r\n\r\n client.subscribe(\"[email protected]/IoT\");\r\n\r\n\r\n}", "connect() {\n window.addEventListener('message', this.onConnectionMessageHandler);\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"#\");\n}" ]
[ "0.8081422", "0.6714845", "0.6668794", "0.6519293", "0.64199823", "0.63882166", "0.6302238", "0.6300816", "0.6300783", "0.6300783", "0.6296815", "0.62775517", "0.6276423", "0.624778", "0.62200797", "0.6213121", "0.61652726", "0.6159301", "0.6159301", "0.61510557", "0.6150417", "0.6145577", "0.61440706", "0.61168444", "0.61147344", "0.61064297", "0.610474", "0.60977614", "0.6095785", "0.6092859", "0.6090726", "0.6064586", "0.6060802", "0.6049172", "0.6048068", "0.60371804", "0.6025147", "0.60218906", "0.6015408", "0.60008544", "0.59978265", "0.5984982", "0.59842235", "0.59824526", "0.59494406", "0.5947829", "0.5946532", "0.5942735", "0.59393203", "0.5939194", "0.5937893", "0.5935613", "0.5935047", "0.59331787", "0.59325296", "0.5930041", "0.59272504", "0.5926778", "0.59263194", "0.5914886", "0.59143144", "0.59018785", "0.58978325", "0.5883839", "0.5881004", "0.58755666", "0.5873312", "0.5863276", "0.58598393", "0.5856714", "0.5843956", "0.584001", "0.58383435", "0.58350754", "0.5833803", "0.58305943", "0.5830238", "0.58281416", "0.58189917", "0.58116823", "0.58086824", "0.58086824", "0.58081126", "0.5803268", "0.5802324", "0.5801549", "0.58000374", "0.57963866", "0.5795176", "0.5795017", "0.5790945", "0.5789283", "0.57891697", "0.5786465", "0.57825685", "0.5780783", "0.5773833", "0.57731473", "0.576935", "0.5769096", "0.5765642" ]
0.0
-1
Schedule incoming messages for asynchronous handling.
function handleMessage(msg) { // process message asynchronously setTimeout(function () { messageHandler(msg); }, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_scheduleSendResponseMessage() {\n\n }", "async triggerOutgoingHandlers() {\n let buffer;\n do {\n if (this.executingOutgoingHandlers >= this.concurrency) {\n return;\n }\n buffer = this.outgoing.shift();\n if (buffer) {\n this.triggerOutgoingHandler(buffer);\n }\n } while (buffer);\n }", "async triggerOutgoingHandlers() {\n let buffer;\n do {\n if (this.executingOutgoingHandlers >= this.concurrency) {\n return;\n }\n buffer = this.outgoing.shift();\n if (buffer) {\n this.triggerOutgoingHandler(buffer);\n }\n } while (buffer);\n }", "function Start_Messaging_App() {\r\n ////sequence\r\n log_info('(I) Start_Messaging_App() : <Start> ');\r\n accounts_connect_all_p()\r\n .then(res0=>{\r\n /*\r\n log_warn('---------->schedule_messages_p');\r\n schedule_messages_periodic_p().then(res1=>{});\r\n log_warn('---------->send_bulk_messages_p');\r\n send_bulk_messages_p().then(res2=>{});\r\n log_warn('---------->accounts_auto_responder_periodic_p');\r\n accounts_auto_responder_periodic_p().then(res3=>{});\r\n */\r\n\r\n setInterval(schedule_messages_periodic_p , GSchedulerTimeMSec);\r\n setInterval(send_bulk_messages_p , GBulkMsgTimeMSec);\r\n setInterval(accounts_auto_responder_periodic_p, GAutoRespTimeMSec);\r\n \r\n \r\n /*\r\n Promise.all(\r\n [ schedule_messages_periodic_p()\r\n ,send_bulk_messages_p()\r\n\t ,accounts_auto_responder_periodic_p()\r\n ]\r\n ).then(([result1, result2, result3]) => {\r\n \r\n })\r\n .catch(err => {\r\n // Receives first rejection among the Promises\r\n log_error('err ='+err);\r\n });*/\r\n })\r\n \r\n /*\r\n async1.waterfall([\r\n accounts_connect_all_p,\r\n //send_bulk_messages,\r\n\t\taccounts_auto_responder,\r\n\t\tschedule_messages_p, \r\n ], function(err, result) {\r\n // result now equals 'done'\r\n if(err) {\r\n log_error('Start_Messaging_App Err:'+err);\r\n }else{\r\n log_info('(I) Start_Messaging_App() : <End>');\r\n }\r\n\r\n });\r\n */\r\n}", "async pollForMessages() {\n while (true) {\n await new Promise((resolve) => setTimeout(resolve, 3000)); // wrapping setTimeout in a promise so it can be used with await\n await this.getNewMessages(this.state.activeRoomId);\n }\n }", "function manualSchedule() {\r\n streamController_.manualSchedule();\r\n }", "function scheduler(self) {\n // Check state\n switch (self.state) {\n case \"running\":\n\n if (self.queue.length) {\n // Execute\n var msg = self.queue.shift();\n self.onMessage(msg);\n\n // Clear existing timeouts and Set timeout\n var timeoutPeriod = getNextInterval(msg, self.queue[0], self);\n clearTimeout(self.timeoutInstance);\n self.timeoutInstance = setTimeout(function () {\n scheduler(self);\n }, timeoutPeriod);\n } else {\n self.state = \"stopped\";\n self.onComplete();\n }\n\n break;\n\n case \"reset\":\n self.queue = JSON.parse(JSON.stringify(self.conversation));\n self.state = \"running\";\n clearTimeout(self.timeoutInstance);\n scheduler(self);\n break;\n\n case \"stopped\":\n self.queue.length = 0;\n clearTimeout(self.timeoutInstance);\n break;\n\n case \"paused\":\n default:\n break;\n }\n }", "async __receiveMsg() {\n let msg;\n try {\n msg = await this.sqs.receiveMessage({\n QueueUrl: this.queueUrl,\n MaxNumberOfMessages: this.maxNumberOfMessages,\n WaitTimeSeconds: this.waitTimeSeconds,\n VisibilityTimeout: this.visibilityTimeout,\n }).promise();\n } catch (err) {\n this.emit('error', err, 'api');\n return;\n }\n\n let msgs = [];\n if (msg.Messages) {\n if (!Array.isArray(msg.Messages)) {\n this.emit('error', new Error('SQS Api returned non-list'), 'api');\n return;\n }\n msgs = msg.Messages;\n }\n this.debug('received %d messages', msgs.length);\n\n // We never want this to actually throw. The __handleMsg function should\n // take care of emitting the error event\n try {\n if (this.sequential) {\n for (let msg of msgs) {\n await this.__handleMsg(msg);\n }\n } else {\n await Promise.all(msgs.map(x => this.__handleMsg(x)));\n }\n } catch (err) {\n let error = new Error('__handleMsg is rejecting when it ought not to. ' +\n 'This is a programming error in QueueListener.__handleMsg()');\n error.underlyingErr = err;\n error.underlyingStack = err.stack || '';\n this.debug('This really should not happen... %j', error);\n this.emit('error', error, 'api');\n }\n\n if (this.running) {\n // Same as the call in .start(), but here we do a small timeout of 50ms\n // just to make sure that we're not totally starving eveything\n setTimeout(async () => {\n await this.__receiveMsg();\n }, 50);\n } else {\n this.emit('stopped');\n }\n }", "scheduleWatchMessages() {\n this.cronJob = schedule(checkFrequency, this.checkNewMessages.bind(this), {});\n }", "function fireAsync() {\n\t\tif (!scheduled) {\n\t\t\tscheduled = true\n\t\t\t// TODO: just do `mountRedraw00.redraw1()` here and elide the timer\n\t\t\t// dependency. Note that this will muck with tests a *lot*, so it's\n\t\t\t// not as easy of a change as it sounds.\n\t\t\tcallAsync(resolveRoute)\n\t\t}\n\t}", "async function processSubscribers() {\n await sendSubscriberEmails()\n console.log('Sent all emails, sleeping.')\n}", "function continueListeningForMessages(){\n\n //go back and listen for more message for the duration of this task\n var currentDate = new Date();\n var currentSeconds = currentDate.getTime() / 1000;\n\n console.log('currentSeconds ' + currentSeconds);\n console.log('startSeconds ' + startSeconds);\n\n //compute the seconds between when we started this scheduled task and now.\n //this is the time that we will long-poll the service bus.\n var newTimeout = Math.round((c_Timeout - (currentSeconds - startSeconds)));\n if(newTimeout > 0){\n //note: the recieveQueueMessage function takes ints no decimals!!\n listenForMessages(newTimeout);\n }\n\n }", "start() {\n this.debug('starting listening to queue');\n this.running = true;\n // Using setTimeout instead of nextTick because we want this to happen\n // after all the other jazz in the event loop happens, rather than starving\n // it by always forcing it to happen before using nextTick\n setTimeout(async () => {\n this.emit('starting');\n await this.__receiveMsg();\n }, 0);\n }", "async loop () {\n while (true) {\n const events = await this.getMessages()\n this.processQueue()\n\n events.forEach(element => {\n try {\n const parsedElement = JSON.parse(element.payload.body)\n this.emit(`message:${parsedElement.recipe}`, parsedElement)\n this.emit('message', parsedElement)\n } catch (_e) {\n console.log(_e)\n this.emit('warning', 'element unknown')\n }\n })\n }\n }", "async _handler(event, processMsg, concurrent) {\n console.log('Handling %s', event);\n\n await this._channel.assertExchange('app', 'topic', { durable: false, alternateExchange: 'deadletter' });\n await this._channel.assertQueue(event, { durable: false, autoDelete: true, deadLetterExchange: 'deadletter' });\n await this._channel.bindQueue(event, 'app', event);\n\n if(concurrent > 0)\n await this._channel.prefetch(concurrent);\n\n this._channel.consume(event, (msg) => this._handleMsg(event, msg, processMsg).catch(err => console.log(err.stack)));\n }", "PlayQueued() {}", "function enqueue(msg)\n\t {\n\t queue.push(msg);\n\t if (!tickUpcoming) {\n\t setImmediate(tick);\n\t }\n\t }", "function enqueue(msg)\n\t {\n\t queue.push(msg);\n\t if (!tickUpcoming) {\n\t setImmediate(tick);\n\t }\n\t }", "async run() {\n while (true) {\n const userInput = await this.getMessage();\n const response = this.handleMessage(userInput);\n this.handleResponse(response);\n }\n }", "async poll() {\n while (!this.stopping) {\n var messages = await this.queueService.pollClaimQueue();\n debug('Fetched %s messages', messages.length);\n\n await Promise.all(messages.map(async (message) => {\n // Don't let a single task error break the loop, it'll be retried later\n // as we don't remove message unless they are handled\n try {\n await this.handleMessage(message);\n } catch (err) {\n this.monitor.reportError(err, 'warning');\n }\n }));\n\n if (messages.length === 0 && !this.stopping) {\n // Count that the queue is empty, we should have this happen regularly.\n // otherwise, we're not keeping up with the messages. We can setup\n // alerts to notify us if this doesn't happen for say 40 min.\n this.monitor.count('claim-queue-empty');\n await this.sleep(this.pollingDelay);\n }\n }\n }", "handleBusMessages() {\n const bus = this.runtime.bus();\n\n Object.values(REQUESTS).forEach((msgType) => {\n bus.on(msgType, (msgData) => {\n this.sendCommMessage(msgType, msgData);\n });\n });\n }", "processMessages() {\n if (this._currentlyProcessing) {\n // Prevent bloating the call stack.\n return;\n }\n this._currentlyProcessing = true;\n while (this._messageQueue.size > 0) {\n let [sender, descriptor, body, target] = this._messageQueue.dequeue(1);\n for (let listenerKey of this._descriptors.getAnscIt(descriptor)) {\n let {\n name: subscriberName, handler, source: senderName\n } = this._listeners[listenerKey];\n if (target !== undefined && target !== subscriberName) {\n continue;\n }\n if (senderName !== undefined && senderName !== sender) {\n continue;\n }\n \n handler(body, descriptor, sender);\n }\n }\n this._currentlyProcessing = false;\n }", "onMessageActivity(context) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.handle(context, 'Message', this.defaultNextEvent(context));\n });\n }", "scheduleRequest(handle, callback = () => 0) {\n // Allows throttling to be disabled\n if (!this.props.throttleRequests) {\n return Promise.resolve(handle);\n }\n\n const promise = new Promise((resolve, reject) => {\n this.requestQueue.push({handle, callback, resolve, reject});\n });\n\n this._issueNewRequests();\n return promise;\n }", "callback() {\n if (this.stop) {this.is_running=false;return;}\n this.debuglog(\"Stage:\",this.stage);\n this.debuglog(\"Async:\",this.async_requests);\n this.debuglog(\"ID:\",this.id);\n //Don't check for more processing until the last task called is done\n if (this.async_requests !== 0) {\n if (this.last_logged != this.async_requests) {\n this.alllog(`Requests remaining: ${this.async_requests}`);\n this.last_logged = this.async_requests;\n }\n var me = this;\n setTimeout(()=>{me.callback();},polling_interval);\n this.debuglog(\"Rescheduled\");\n } else {\n this.processList();\n }\n }", "_firePendingState () {\n const promise = new Promise((resolve, reject) => {\n setTimeout(() => {\n resolve()\n }, 2000)\n })\n const event = new CustomEvent('pending-state', {\n detail: {\n title: 'Async task',\n promise\n }\n })\n this.dispatchEvent(event)\n }", "async start() {\n if (this.status == QueueStatus.running)\n return;\n this.status = QueueStatus.running;\n let msg = '';\n do {\n try {\n msg = await this.bzpopmin(this.qName, 0); // Monitor queue forever\n // Proceed only on incoming message and re-monitor for next\n msg = JSON.parse(msg[1]); // msg:>> [queueName, msgContent]\n this.onMessage(msg);\n this.queueLimit && this.checkQueueLimit();\n } catch (error) {\n await this.handleQueueErrors(msg, error)\n }\n } while (this.status == QueueStatus.running);\n\n }", "dispatchAsync() {\r\n this._dispatch(true, this, arguments);\r\n }", "function pollMessages() {\n getNewMessages();\n setTimeout(pollMessage, pollInterval);\n }", "startNotificationTask() {\n // Set up listeners on `bind` and `unbind` for notifications\n this.setupNotification('bind', 'unbind');\n // Create an async iterator for the `notification` event as a queue\n this.notificationQueue = (0, p_event_1.iterator)(this, 'notification', {\n // Do not end the iterator if an error event is emitted on the\n // subscription manager\n rejectionEvents: [],\n });\n return this.processNotifications();\n }", "_issueNewRequestsAsync() {\n this._deferredUpdate = null;\n\n const freeSlots = Math.max(this.props.maxRequests - this.activeRequestCount, 0);\n\n if (freeSlots === 0) {\n return;\n }\n\n this._updateAllRequests();\n\n // Resolve pending promises for the top-priority requests\n for (let i = 0; i < freeSlots; ++i) {\n if (this.requestQueue.length > 0) {\n const request = this.requestQueue.shift();\n this._issueRequest(request);\n }\n }\n\n // Uncomment to debug\n // console.log(`${freeSlots} free slots, ${this.requestQueue.length} queued requests`);\n }", "async processTxQueue() {\n let wsData = this.wsTxQueue.dequeue();\n\n while (wsData !== undefined) {\n // process wsData like it just arrived\n await this.onNewTx(wsData);\n wsData = this.wsTxQueue.dequeue();\n // We should release the event loop for other threads\n // This effectively awaits 0 seconds, but it schedule the next iteration to run after other threads.\n await new Promise(resolve => { setTimeout(resolve, 0) });\n }\n }", "function runAndScheduleTask () {\n\t\ttask( scheduleNextExecution );\n\t}", "_issueNewRequestsAsync() {\n this._deferredUpdate = null;\n\n const freeSlots = Math.max(this.props.maxRequests - this.activeRequestCount, 0);\n\n if (freeSlots === 0) {\n return;\n }\n\n this._updateAllRequests();\n\n // Resolve pending promises for the top-priority requests\n for (let i = 0; i < freeSlots; ++i) {\n if (this.requestQueue.length > 0) {\n const request = this.requestQueue.shift();\n request.resolve(true);\n }\n }\n\n // Uncomment to debug\n // console.log(`${freeSlots} free slots, ${this.requestQueue.length} queued requests`);\n }", "function notifyAll(fnSms, fnEmail) { \n setTimeout(function() { \n console.log('starting notification process'); \n fnEmail();\n fnSms(); \n \n }, 2000); \n }", "playQueue() {\n // must set delay property to false!!! otherwise the message\n // will be delayed continually...\n this.queue.forEach( m => { m.data.delay = false; this.handleMessage( m ) } )\n this.queue.length = 0\n }", "function schedule(msgs) {\n var tuple0 = { ctor: \"_Tuple0\" }; \n function scheduleForce(thunk) {\n setTimeout(thunk, 0);\n return tuple0;\n }\n return A2( Signal.map, scheduleForce, msgs );\n }", "_processMessages() {\n let connection;\n let i, len;\n\n // do nothing if already closed\n if (this._closed) {\n return;\n }\n\n // do nothing if queue is empty\n if (!this._queue.length) {\n if (!this.idling) {\n // no pending jobs\n this.idling = true;\n this.emit('idle');\n }\n return;\n }\n\n // find first available connection\n for (i = 0, len = this._connections.length; i < len; i++) {\n if (this._connections[i].available) {\n connection = this._connections[i];\n break;\n }\n }\n\n if (!connection && this._connections.length < this.options.maxConnections) {\n connection = this._createConnection();\n }\n\n if (!connection) {\n // no more free connection slots available\n this.idling = false;\n return;\n }\n\n // check if there is free space in the processing queue\n if (!this.idling && this._queue.length < this.options.maxConnections) {\n this.idling = true;\n this.emit('idle');\n }\n\n let entry = (connection.queueEntry = this._queue.shift());\n entry.messageId = (connection.queueEntry.mail.message.getHeader('message-id') || '').replace(/[<>\\s]/g, '');\n\n connection.available = false;\n\n this.logger.debug(\n {\n tnx: 'pool',\n cid: connection.id,\n messageId: entry.messageId,\n action: 'assign'\n },\n 'Assigned message <%s> to #%s (%s)',\n entry.messageId,\n connection.id,\n connection.messages + 1\n );\n\n if (this._rateLimit.limit) {\n this._rateLimit.counter++;\n if (!this._rateLimit.checkpoint) {\n this._rateLimit.checkpoint = Date.now();\n }\n }\n\n connection.send(entry.mail, (err, info) => {\n // only process callback if current handler is not changed\n if (entry === connection.queueEntry) {\n try {\n entry.callback(err, info);\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback',\n cid: connection.id\n },\n 'Callback error for #%s: %s',\n connection.id,\n E.message\n );\n }\n connection.queueEntry = false;\n }\n });\n }", "_processMessages() {\n let connection;\n let i, len;\n\n // do nothing if already closed\n if (this._closed) {\n return;\n }\n\n // do nothing if queue is empty\n if (!this._queue.length) {\n if (!this.idling) {\n // no pending jobs\n this.idling = true;\n this.emit('idle');\n }\n return;\n }\n\n // find first available connection\n for (i = 0, len = this._connections.length; i < len; i++) {\n if (this._connections[i].available) {\n connection = this._connections[i];\n break;\n }\n }\n\n if (!connection && this._connections.length < this.options.maxConnections) {\n connection = this._createConnection();\n }\n\n if (!connection) {\n // no more free connection slots available\n this.idling = false;\n return;\n }\n\n // check if there is free space in the processing queue\n if (!this.idling && this._queue.length < this.options.maxConnections) {\n this.idling = true;\n this.emit('idle');\n }\n\n let entry = (connection.queueEntry = this._queue.shift());\n entry.messageId = (connection.queueEntry.mail.message.getHeader('message-id') || '').replace(/[<>\\s]/g, '');\n\n connection.available = false;\n\n this.logger.debug(\n {\n tnx: 'pool',\n cid: connection.id,\n messageId: entry.messageId,\n action: 'assign'\n },\n 'Assigned message <%s> to #%s (%s)',\n entry.messageId,\n connection.id,\n connection.messages + 1\n );\n\n if (this._rateLimit.limit) {\n this._rateLimit.counter++;\n if (!this._rateLimit.checkpoint) {\n this._rateLimit.checkpoint = Date.now();\n }\n }\n\n connection.send(entry.mail, (err, info) => {\n // only process callback if current handler is not changed\n if (entry === connection.queueEntry) {\n try {\n entry.callback(err, info);\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback',\n cid: connection.id\n },\n 'Callback error for #%s: %s',\n connection.id,\n E.message\n );\n }\n connection.queueEntry = false;\n }\n });\n }", "_processMessages() {\n let connection;\n let i, len;\n\n // do nothing if already closed\n if (this._closed) {\n return;\n }\n\n // do nothing if queue is empty\n if (!this._queue.length) {\n if (!this.idling) {\n // no pending jobs\n this.idling = true;\n this.emit('idle');\n }\n return;\n }\n\n // find first available connection\n for (i = 0, len = this._connections.length; i < len; i++) {\n if (this._connections[i].available) {\n connection = this._connections[i];\n break;\n }\n }\n\n if (!connection && this._connections.length < this.options.maxConnections) {\n connection = this._createConnection();\n }\n\n if (!connection) {\n // no more free connection slots available\n this.idling = false;\n return;\n }\n\n // check if there is free space in the processing queue\n if (!this.idling && this._queue.length < this.options.maxConnections) {\n this.idling = true;\n this.emit('idle');\n }\n\n let entry = (connection.queueEntry = this._queue.shift());\n entry.messageId = (connection.queueEntry.mail.message.getHeader('message-id') || '').replace(/[<>\\s]/g, '');\n\n connection.available = false;\n\n this.logger.debug(\n {\n tnx: 'pool',\n cid: connection.id,\n messageId: entry.messageId,\n action: 'assign'\n },\n 'Assigned message <%s> to #%s (%s)',\n entry.messageId,\n connection.id,\n connection.messages + 1\n );\n\n if (this._rateLimit.limit) {\n this._rateLimit.counter++;\n if (!this._rateLimit.checkpoint) {\n this._rateLimit.checkpoint = Date.now();\n }\n }\n\n connection.send(entry.mail, (err, info) => {\n // only process callback if current handler is not changed\n if (entry === connection.queueEntry) {\n try {\n entry.callback(err, info);\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback',\n cid: connection.id\n },\n 'Callback error for #%s: %s',\n connection.id,\n E.message\n );\n }\n connection.queueEntry = false;\n }\n });\n }", "enqueueAllRecurrentJobs (callback) {\n let self = this\n let jobs = []\n let loadedTasks = []\n\n Object.keys(self.tasks).forEach(taskName => {\n // get task object\n let task = self.tasks[ taskName ]\n\n if (task.frequency > 0) {\n jobs.push(done => {\n self.enqueue(taskName, (error, toRun) => {\n if (error) { return done(error) }\n if (toRun === true) {\n self.api.log(`enqueuing periodic task ${taskName}`, self.api.config.tasks.schedulerLogging.enqueue)\n loadedTasks.push(taskName)\n }\n\n return done()\n })\n })\n }\n })\n\n async.series(jobs, error => {\n if (error) { return callback(error) }\n return callback(null, loadedTasks)\n })\n }", "_queue () {\n var _this = this;\n async.whilst(\n function condition () {\n return !!_this._queueTasks.length || _this._break;\n },\n function iterator (next) {\n var task = _this._queueTasks.shift();\n task.consumer(next);\n },\n function end () {\n setTimeout(_this._queue.bind(_this), 100);\n }\n );\n }", "async poll() {\n while(!this.stopping) {\n var messages = await this.queueService.pollDeadlineQueue();\n debug(\"Fetched %s messages\", messages.length);\n\n await Promise.all(messages.map((message) => {\n // Don't let a single task error break the loop, it'll be retried later\n // as we don't remove message unless they are handled\n return this.handleMessage(message).catch((err) => {\n debug(\"[alert-operator] Failed to handle message: %j\" +\n \", with err: %s, as JSON: %j\", message, err, err, err.stack);\n });\n }));\n\n if(messages.length === 0 && !this.stopping) {\n await this.sleep(this.pollingDelay);\n }\n }\n }", "function listenForMessages() {\n \n var date = new Date();\n var time = date.getTime();\n //get the current unix time in seconds\n var startSeconds = time / 1000;\n\n\t//create the service bus\n\tconsole.log(process.env.ServiceBusConnString);\n\tvar sb = azure.createServiceBusService(process.env.ServiceBusConnString);\n\n\tfunction listenForMessages(seconds) {\n\t\t console.log('Listening for new messages with timeout: ' + seconds);\n\t\t sb.receiveQueueMessage('mobileservice', {timeoutIntervalInS: seconds },\n function(err, data){\n\n \tvar continueRecieveMessages = function(){\n\t\t\t\t //go back and listen for more message for the duration of this task\n\t\t\t\t var currentDate = new Date();\n\t\t\t\t var currentSeconds = currentDate.getTime() / 1000;\n\t\t\t\t \n\t\t\t\t console.log('currentSeconds ' + currentSeconds);\n\t\t\t\t console.log('startSeconds ' + startSeconds);\n\t\t\t\t var newTimeout = Math.round((c_Timeout - (currentSeconds - startSeconds)));\n\t\t\t\t if(newTimeout > 0){\n\t\t\t\t\t //note: the recieveQueueMessage function takes ints no decimals!\n\t\t\t\t\t //start this routine for the new computed timeout\n\t\t\t\t\t listenForMessages(newTimeout);\n\t\t\t\t }\n\t\t\t }\n\n \tif(!err){\n \t //we recieved a message within the timeout.\n\t\t var dataObj = JSON.parse(data.body);\n\t\t \n\t\t if(dataObj.message){\n\t\t\t console.log('Recieved message from SB: ' + dataObj.message);\n\t\t }\n\t\t else{\n\t\t\t console.error('Recieved a malformed json object');\n\t\t }\n \t}\n \telse{\n \t\t//we didn't recieve a message in the specified timeout.\n \t\tconsole.log(err);\n \t}\n\n\t\t//go back and continue listening for messages\n \tcontinueRecieveMessages();\n });\n }\n listenForMessages(c_Timeout);\n}", "function requestqueue() {\n\t\t// If the queue is already running, abort.\n\t\tif(requesting) return;\n\t\trequesting = true;\n\t\tlink.request({\n\t\t\turl: \"api/events\",\n\t\t\tmethod: \"POST\",\n\t\t\tparams: {\n\t\t\t\tsid: gSessionID\n\t\t\t},\n\t\t\tcallback: queuecallback\n\t\t});\n\t}", "function handlePendingTasks() {\n\n if (tasksInProgress)\n return;\n\n tasksInProgress = true;\n\n // Draw all pending tasks.\n var task;\n while ((task = tasks[0]) != null && !task.blocked) {\n tasks.shift();\n if (task.handler) task.handler();\n }\n\n tasksInProgress = false;\n\n }", "function sendPendingMessage(handler) {\n getDispatcher(handler).sendPendingMessage(handler);\n}", "async function consumeMessages(messagingChannel, queueName, handler) {\n function consumeCallback(msg) {\n console.log(\"Handling \" + queueName);\n\n const messagePayload = JSON.parse(msg.content.toString())\n\n try {\n const promise = handler(messagePayload);\n if (promise) {\n promise.then(() => {\n messagingChannel.ack(msg); //TODO: Need to understand how ack works.\n console.log(queueName + \" async handler done.\");\n })\n .catch(err => {\n console.error(queueName + \" async handler errored.\");\n console.error(err && err.stack || err);\n });\n }\n else {\n messagingChannel.ack(msg);\n console.log(queueName + \" handler done.\");\n }\n }\n catch (err) {\n console.error(queueName + \" handler errored.\");\n console.error(err && err.stack || err);\n }\n };\n\n console.log(\"Receiving messages for queue \" + queueName);\n\n await messagingChannel.consume(queueName, consumeCallback);\n}", "async tick(msg) {\n ticks += 1;\n log(`@@ tick:${ticks}${msg ? `: ${msg}` : ''} @@`);\n if (schedule.has(ticks)) {\n await Promise.allSettled(\n schedule.get(ticks).map(h => {\n log(`&& running a task scheduled for ${ticks}. &&`);\n return E(h).wake(ticks);\n }),\n );\n }\n }", "dispatchAsync() {\r\n this._dispatchAsPromise(true, this, arguments);\r\n }", "function scheduleNextPolledProcess() {\n\n setTimeout( performPolledProcess, pollInterval );\n\n}", "function setupQueueFunctionQueued() {\n // Generate all currently queued functions.\n generateAvailableQueued();\n }", "async asyncConstruct() {\n // In single process mode, we flush the redis on startup.\n this.getRedis().flushallAsync();\n }", "static async _schedule() {\n\t\t// Register the task definition first\n\t\tconsole.log(\"SCHEDULE 1) Register Task Definition\");\n\t\tconst taskDefinition = await ECSManager.registerTaskDefinition();\n\t\tconst taskDefinitionArn = taskDefinition.taskDefinition.taskDefinitionArn;\n\n\t\t// Register a Cloudwatch event for this task definition as a cron job\n\t\tconsole.log(\"SCHEDULE 2) Register CloudWatch event\")\n\t\tconst targetSchedule = await CloudWatchManager.registerEvent(taskDefinitionArn);\n\t\treturn targetSchedule;\n\t}", "_issueNewRequests() {\n if (!this._deferredUpdate) {\n this._deferredUpdate = setTimeout(() => this._issueNewRequestsAsync(), 0);\n }\n }", "_issueNewRequests() {\n if (!this._deferredUpdate) {\n this._deferredUpdate = setTimeout(() => this._issueNewRequestsAsync(), 0);\n }\n }", "async _fsm_process_events() {\n\t\tthis._fsm.mEventInProgress = true;\n\t\twhile ( this._fsm.mEventQueue.length > 0 ) {\n\t\t\t// process event\n\t\t\tlet rc = await this._fsm_process_event( this._fsm.mEventQueue.shift() );\n\n\t\t\t// check deferred queue after successful state change\n\t\t\tif ( rc === this._fsm.mFlags.external && this._fsm.mDeferredEventQueue.length > 0 ) {\n\t\t\t\tthis._fsmst.log('deferred events in queue: ' + this._fsm.mDeferredEventQueue.length );\n\t\t\t\tlet temp_deferred = this._fsm.mDeferredEventQueue.slice();\n\t\t\t\tthis._fsm.mDeferredEventQueue = [];\n\t\t\t\tdo {\n\t\t\t\t\tawait this._fsm_process_event( temp_deferred.shift() );\n\t\t\t\t} while( temp_deferred.length > 0 );\n\t\t\t}\n\n\t\t}\n\n\t\tthis._fsm.mEventInProgress = false;\n\t}", "receiveMessage(message) {\n return new Promise((resolve, reject) => {\n if (message instanceof Message){\n this.messageEventCallbacks.forEach(cb=>{\n cb(message);\n });\n }\n resolve();\n })\n }", "subscribeToQueue(queueName, handler, callback) {\n throw new Error('Not Implemented');\n }", "run(){\n //Determining right strategy for getting messages from topic\n let getter = this.lastId ? new MessageGetterBeforeLastIDStrategy(this.topic, this.lastId, this.howMany):\n new MessageGetterLastStrategy(this.topic, this.howMany)\n\n //Getting messages\n let messages = getter.get()\n\n //updating remaining messages count\n this.howMany -= messages.length;\n\n //if there are any messages at all\n if(messages.length > 0){\n //Giving them to writer\n let writer = this.outWriterFactory.make()\n\n let response = {\n pkfp: this.topic.pkfp,\n messages: messages,\n before: this.lastId,\n topic: this.topic\n }\n\n writer.output(response)\n\n //Updating last written message id\n this.lastId = messages[messages.length-1].header.id;\n }\n\n //Checking whether request is fulfilled\n if(new FulfilledCondition(this.topic, this.howMany).isFulfilled()){\n //If request fulfilled - unsubscribing from bus and terminating\n console.log(\"Request fulfilled!\");\n this.uxBus.off(this);\n }\n }", "function messageUpdatedAsync() {\n if (updateMessagesTimer !== undefined) {\n $timeout.cancel(updateMessagesTimer);\n }\n updateMessagesTimer = $timeout(messagesUpdated, 100);\n }", "async listen() {\n\t\tconsole.log(\"listening to events\")\n\t\tthis.bizNetworkConnection.on('event', async (evt) => {\n\n\t\t\tif (evt.getFullyQualifiedType() == \"top.nextnet.gnb.NewIntentionEvent\") {\n\n\n\t\t\t\tconsole.log(\"new intention received \" + evt.target.getIdentifier())\n\t\t\t\tvar intention = await this.intentionRegistry.get(evt.target.getIdentifier());\n\t\t\t\tthis.intentionTimeoutMap.set(intention.getIdentifier(), []);\n\n\n\t\t\t\tvar services = this.generate_services(intention);\n\t\t\t\tawait this.serviceRegistry.addAll(services)\n\t\t\t\tfor (let service of services) {\n\n\t\t\t\t\tvar service_id = service.getIdentifier();\n\t\t\t\t\tvar newServiceEvent = this.factory.newEvent(\"top.nextnet.gnb\", \"NewServiceEvent\");\n\t\t\t\t\tnewServiceEvent.target = this.factory.newRelationship(\"top.nextnet.gnb\", \"Service\", service_id);\n\t\t\t\t\t//this.bizNetworkConnection.emit(newServiceEvent);\n\t\t\t\t\tvar publishServiceTransaction = this.factory.newTransaction(\"top.nextnet.gnb\", \"PublishService\");\n\t\t\t\t\tpublishServiceTransaction.service = this.factory.newRelationship(\"top.nextnet.gnb\", \"Service\", service_id);\n\n\t\t\t\t\tawait this.bizNetworkConnection.submitTransaction(publishServiceTransaction);\n\t\t\t\t\tconsole.log(\"a Service has been published \" + publishServiceTransaction.getIdentifier());\n\t\t\t\t};\n\n\n\t\t\t\tsetTimeout(this.arbitrateIntention.bind(this), timeoutIntentArbitrate, intention);\n\n\n\t\t\t}\n\t\t\telse if (evt.getFullyQualifiedType() == \"top.nextnet.gnb.NewServiceFragmentEvent\") {\n\t\t\t\tconsole.log(\"New service Fragment \" + evt.target.getIdentifier());\n\n\t\t\t\tvar fragment = evt.target;\n\t\t\t\t//no timeout so far, we create it\n\t\t\t\tif (this.intentionTimeoutMap.get(evt.target.getIdentifier()) == undefined) {\n\n\t\t\t\t\tvar timeout = setInterval(this.arbitrateServiceFragment.bind(this), timeoutSFArbitrate, fragment.getIdentifier());;\n\t\t\t\t\tthis.intentionTimeoutMap.set(fragment.getIdentifier(), { intention: fragment.intention.getIdentifier(), timeout: timeout });\n\t\t\t\t}\n\n\n\t\t\t\tvar dummyDeal = this.factory.newConcept(\"top.nextnet.gnb\", \"BestFragmentDeal\")\n\t\t\t\tdummyDeal.fragment = this.factory.newRelationship(\"top.nextnet.gnb\", \"ServiceFragment\", fragment.getIdentifier());\n\t\t\t\tvar status = { bestDeal: dummyDeal, updated: false };\n\n\n\t\t\t\tthis.updatedFragments.set(fragment.getIdentifier(), status);\n\n\n\n\t\t\t}\n\t\t\telse if (evt.getFullyQualifiedType() == \"top.nextnet.gnb.PlaceBidEvent\") {\n\t\t\t\tconsole.log(\"new PlaceBidEvent \" + evt.target.fragment.getIdentifier());\n\t\t\t\tvar status = this.updatedFragments.get(evt.target.fragment.getIdentifier())\n\t\t\t\tif (status == undefined) {//should not happend, since the broker is aware of the new fragment before the providers\n\t\t\t\t\tvar dummyDeal = this.factory.newConcept(\"top.nextnet.gnb\", \"BestFragmentDeal\")\n\t\t\t\t\tdummyDeal.fragment = this.factory.newRelationship(\"top.nextnet.gnb\", \"ServiceFragment\", evt.target.fragment.getIdentifier());\n\t\t\t\t\tstatus = { bestDeal: dummyDeal, updated: true }\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstatus.updated = true;\n\t\t\t\t}\n\n\n\n\n\t\t\t}\n\t\t\telse if (evt.getFullyQualifiedType() == \"top.nextnet.gnb.NewServiceFragmentDealEvent\") {\n\t\t\t\tconsole.log(\"NewServiceFragmentDealEvent \" + evt.target.fragment.getIdentifier());\n\t\t\t\tvar deal = evt.target;\n\t\t\t\tvar status = this.updatedFragments.get(deal.fragment.getIdentifier());\n\t\t\t\tstatus.bestDeal = deal;\n\n\n\n\t\t\t}\n\n\t\t});\n\n\t}", "function schedule(){\n console.log(Date());\n cron.schedule('0 9 * * *', function(){\n knex.select('users.first_name', 'users.phone_number', 'tasks.title', 'tasks.description', 'due_date').from('tasks').leftJoin('users', 'tasks.user_id', 'users.id').where('due_date', new Date().toISOString().slice(0,10)).andWhere('tasks.is_complete', 'false')\n .then(function(data){\n console.log('cron');\n var messages =[];\n for(var i = 0; i < data.length; i++){\n messages.push(sendMessage(data[i].phone_number, data[i].title));\n }\n\n Promise.all(messages).then(function(results){\n console.log(results);\n })\n .catch(function(err){\n console.log(err);\n });\n });\n });\n}", "sendMsg(msg) {\n this.messages.next(msg);\n }", "runPending_() {\n if (this.tasks_.length === 0) {\n // All done - go back to idle.\n this.active_ = false;\n if (this.idleCallback_) {\n this.idleCallback_();\n }\n return;\n }\n\n if (!this.active_) {\n // If the queue is currently idle, transition to active state.\n this.active_ = true;\n if (this.activeCallback_) {\n this.activeCallback_();\n }\n }\n\n const nextTask = this.tasks_[0];\n nextTask.run();\n }", "async onIdle() {\n // Instantly resolve if none pending and if nothing else is queued\n if (this._pendingCount === 0 && this._queue.size === 0) {\n return;\n }\n return new Promise(resolve => {\n const existingResolve = this._resolveIdle;\n this._resolveIdle = () => {\n existingResolve();\n resolve();\n };\n });\n }", "async onIdle() {\n // Instantly resolve if none pending and if nothing else is queued\n if (this._pendingCount === 0 && this._queue.size === 0) {\n return;\n }\n return new Promise(resolve => {\n const existingResolve = this._resolveIdle;\n this._resolveIdle = () => {\n existingResolve();\n resolve();\n };\n });\n }", "async onIdle() {\n // Instantly resolve if none pending and if nothing else is queued\n if (this._pendingCount === 0 && this._queue.size === 0) {\n return;\n }\n\n return new Promise(resolve => {\n const existingResolve = this._resolveIdle;\n\n this._resolveIdle = () => {\n existingResolve();\n resolve();\n };\n });\n }", "function asap(task){queue.push(task);if(!semaphore){suspend();flush();}}", "function doPoll(){\n getMessages();\n setTimeout(doPoll,5000);\n}", "function requestMessage() {\n asbService.receiveQueueMessage((queureName + '-recieve'), handleMessage);\n}", "function requestMessage() {\n asbService.receiveQueueMessage((queureName + '-recieve'), handleMessage);\n}", "function EventsQueue() {}", "function sendQueuedMessages() {\n while (queuedMessages.length > 0) {\n try {\n __gCrWeb.common.sendWebKitMessage(\n 'NavigationEventMessage', queuedMessages[0]);\n queuedMessages.shift();\n } catch (e) {\n // 'NavigationEventMessage' message handler is not currently registered.\n // Send the message later when possible.\n break;\n }\n }\n}", "whenReadyToRecieve(callback) {\r\n callback();\r\n\r\n // ALSO, reprocess messages recieved before we got notify_id\r\n // in case the readyToRecieve callback was expecting them\r\n console.log(\"RE-PROCESSING MESSAGES: \")\r\n for (let i = 0; i < this.recievedMessages.length; i++) {\r\n this.process_message(this.recievedMessages[i]);\r\n }\r\n\r\n // wait until all ready callbacks are done (give a timeout)\r\n // to stop logging recieved messages (to save on memory)\r\n window.clearTimeout(this.stopLoggingRecievedMessagesTimer);\r\n this.stopLoggingRecievedMessagesTimer = window.setTimeout(() => {\r\n this.logRecievedMessages = false;\r\n console.log(\"Stopped storing messages for late readyToRecieve callbacks\")\r\n }, this.STOP_LOGGING_RECIEVED_MESSAGES_TIMEOUT);\r\n }", "async processNotifications() {\n const events = this.notificationQueue;\n if (events == null)\n return;\n for await (const { type, binding, context, observers } of events) {\n // The loop will happen asynchronously upon events\n try {\n // The execution of observers happen in the Promise micro-task queue\n await this.notifyObservers({ type, binding, context }, observers);\n this.pendingNotifications--;\n this._debug('Observers notified for %s of binding %s', type, binding.key);\n this.emitEvent('observersNotified', { type, binding, context });\n }\n catch (err) {\n // Do not reduce the pending notification count so that errors\n // can be captured by waitUntilPendingNotificationsDone\n this._debug('Error caught from observers', err);\n // Errors caught from observers.\n if (this.listenerCount('error') > 0) {\n // waitUntilPendingNotificationsDone may be called\n this.emitError(err);\n }\n else {\n // Emit it to the current context. If no error listeners are\n // registered, crash the process.\n this.handleNotificationError(err);\n }\n }\n }\n }", "sendEventSchedule(message, nextEventName) {\n\t\treturn this.sendSchedule(message, {\n\t\t\tqueryType: QUERY_TYPE.ALL,\n\t\t\tnextEventName\n\t\t});\n\t}", "publish() {\n _callbacks.forEach(callback => callback());\n }", "_issueNewRequestsAsync() {\n this._updateNeeded = false;\n\n const freeSlots = Math.max(this.props.maxRequests - this.activeRequestCount, 0);\n\n if (freeSlots === 0) {\n return;\n }\n\n this._updateAllRequests();\n\n // Resolve pending promises for the top-priority requests\n for (let i = 0; i < freeSlots; ++i) {\n if (this.requestQueue.length > 0) {\n const request = this.requestQueue.shift();\n request.resolve(true);\n }\n }\n\n // Uncomment to debug\n // console.log(`${freeSlots} free slots, ${this.requestQueue.length} queued requests`);\n }", "function schedule_read_push(now, cust_message) {\n var interval = (now ? 0 : config.get('read_push_interval'))\n log.info((cust_message ? cust_message + ' - ' : '') + 'Scheduling next read/push cycle in %s minute(s)', interval);\n return setTimeout(read_push_cycle, interval * 60000);\n}", "function sched () {\n pub()\n .then(function() {\n return Useful.handyTimer(ns.settings.redisSyncFrequency);\n }) \n .then(function() {\n sched();\n });\n }", "function processQueue () {\n queue.forEach(function (func) { $mdUtil.nextTick(func); });\n queue = [];\n }", "function processQueue () {\n queue.forEach(function (func) { $mdUtil.nextTick(func); });\n queue = [];\n }", "function processQueue () {\n queue.forEach(function (func) { $mdUtil.nextTick(func); });\n queue = [];\n }", "function processQueue () {\n queue.forEach(function (func) { $mdUtil.nextTick(func); });\n queue = [];\n }", "function emitAsync(args){\n\t\tsetTimeout(function(){\n\t\t\temit.apply(evented, args);\n\t\t}, 0);\n\t}", "async function ReminderProcess() {\r\n if (!cursedConfig.hasReminders) {\r\n return;\r\n }\r\n if (cursedConfig.isRunning && cursedConfig.reminders.length > 0 && CurrentScreen == \"ChatRoom\" && ChatRoomSpace != \"LARP\") {\r\n TryPopTip(30);\r\n let reminder = cursedConfig.reminders[Math.floor(Math.random() * cursedConfig.reminders.length)];\r\n popChatSilent(reminder, \"Reminder\");\r\n }\r\n if (cursedConfig.reminderInterval < 60000) {\r\n cursedConfig.reminderInterval = 60000;\r\n }\r\n setTimeout(ReminderProcess, cursedConfig.reminderInterval);\r\n}", "queue(action){\n Mediator.queue.push(action);\n }", "waitForMessage_() {\n this.wait_(4, buffer => {\n this.wait_(buffer.readUInt32BE(0), buffer => {\n this.push(this.getMessage_(buffer));\n process.nextTick(() => this.waitForMessage_());\n });\n });\n }", "function processQueue(){\n\t\trequestAnimFrame(processQueue);\n\t\tvar now = Date.now();\n\t\twhile (msgQueue.length > 0 && msgQueue[0].timetag < now){\n\t\t\tvar first = msgQueue.shift();\n\t\t\tif (first.address === \"_set\"){\n\t\t\t\tfirst.data();\n\t\t\t} else {\n\t\t\t\t_send(first);\n\t\t\t}\n\t\t}\n\t\t//send an update message to all the listeners\n\t\tupdateMessage.data = now - lastUpdate;\n\t\t_send(updateMessage);\n\t\tlastUpdate = now;\n\t}", "function onQueueReady(exchange){\n\tconsole.log(\"queue binding done...........................\");\n}", "function loadMsgsForCal() {\n var msgs\n socket.emit('requestScheduledMsg', {data: org})\n }", "async postProcess () {\n\t\t// grant permissions for all added users to subscribe to the stream channel,\n\t\t// revoke permissions for all removed users to subscribe to the stream channel\n\t\tawait awaitParallel([\n\t\t\tthis.grantUserMessagingPermissions,\n\t\t\tthis.revokeUserMessagingPermissions\n\t\t], this);\n\n\t\t// publish the update as needed, and \n\t\t// explicitly publish to any users added to a stream\n\t\tawait awaitParallel([\n\t\t\tthis.publishStream,\n\t\t\tthis.publishToUsers,\n\t\t\tthis.publishUserUpdates\n\t\t], this);\n\t}", "async function handleMessage(message){\n\t\tconsole.debug(\"[DEBUG] Message from: \", message);\n\t\tif (message.request === \"GETACTIVETASKS\"){ // get all tasks and return them\n console.debug(\"[BACKEND] Message received: \", message);\n\t\t\tawait returnActiveTasks(message, sendResponse);\t\t\t\n } \n else if (message.request === 'ADDNEWTASK'){ // add the payload as new data\n let payload = message.payload;\n let hash = \"\" + payload.title + payload.creationDate;\n payload.hash = hash;\n saveNewTaskToDatabase(payload);\n }\n else if (message.request === 'DELETETASK'){ // delete task from database\n await delteTaskFromDatabase(message);\n }\n else if (message.request === 'RESOLVETASK'){ // move task from active to resolved store\n await resolveTask(message);\n }\n else if (message.request === 'GETRESOLVEDTASKS'){ // get all removed tasks and return them\n await returnResolvedTasks(message, sendResponse);\n }\n else if (message.request === 'GETRESOLVEDTASKBYHASH'){\n await returnResolvedTaskByHash(message, sendResponse);\n }\n \n else {\n\t\t\tconsole.error(\"[ERROR] Unable to handle request from: \", message);\n\t\t}\n\t}", "function broadcast(){\n while ( listeners.length ) listeners.shift()()\n listeners = null\n jobsDone = true\n }", "function scheduleMicrotask(fn) {\n es6Promise._asap(this.bind(fn));\n}", "async function notifyNewMessages(auth){\n try{\n // Get all the new filtered messages\n const newMessages=await getNewFilteredMessages(auth);\n\n // Notify the user, desktop & console\n notify(newMessages);\n }\n catch(err){\n console.log(\"Error in notifyNewMessages\")\n throw err;\n }\n \n}", "async function receiveMessage() {\n const sqs = new AWS.SQS();\n\n try {\n // to simplify running multiple workers in parallel, \n // fetch one message at a time\n const data = await sqs.receiveMessage({\n QueueUrl: config.queue.url,\n VisibilityTimeout: config.queue.visibilityTimeout,\n MaxNumberOfMessages: 1\n }).promise();\n\n if (data.Messages && data.Messages.length > 0) {\n const message = data.Messages[0];\n const params = JSON.parse(message.Body);\n\n // while processing is not complete, update the message's visibilityTimeout\n const intervalId = setInterval(_ => sqs.changeMessageVisibility({\n QueueUrl: config.queue.url,\n ReceiptHandle: message.ReceiptHandle,\n VisibilityTimeout: config.queue.visibilityTimeout\n }), 1000 * 60);\n\n // processMessage should return a boolean status indicating success or failure\n const status = await processMessage(params);\n clearInterval(intervalId);\n \n // if message was not processed successfully, send it to the\n // error queue (add metadata in future if needed)\n if (!status) {\n await sqs.sendMessage({\n QueueUrl: config.queue.errorUrl,\n MessageBody: JSON.stringify(params),\n }).promise();\n }\n\n // remove original message from queue once processed\n await sqs.deleteMessage({\n QueueUrl: config.queue.url,\n ReceiptHandle: message.ReceiptHandle\n }).promise();\n }\n } catch (e) {\n // catch exceptions related to sqs\n logger.error(e);\n } finally {\n // schedule receiving next message\n setTimeout(receiveMessage, config.queue.pollInterval);\n }\n}", "consume() {\n Object.keys(this._queues).forEach((identifier) => {\n if (!this._queues[identifier].consuming) {\n this._queues[identifier].consuming = true;\n this._takeNext(identifier);\n }\n });\n }", "function sendMessageAsync() {\n return dispatch => {\n setTimeout(() => {\n dispatch(updateMessagesRead({ userId: activeUserId, chatId: Number(dialogId), numberOfMessages: chat.length + 1 }))\n console.log('Bot Message: Message Added')\n }, 1500)\n }\n }" ]
[ "0.58753175", "0.58669794", "0.58669794", "0.5831426", "0.5799583", "0.5703491", "0.56666535", "0.56146896", "0.56095016", "0.55863136", "0.55809706", "0.5518698", "0.55060315", "0.54944295", "0.546897", "0.5463283", "0.5459955", "0.5459955", "0.5444643", "0.54382133", "0.5394697", "0.53464735", "0.53097266", "0.5266351", "0.5258406", "0.5247535", "0.5224735", "0.5213607", "0.5212447", "0.51996964", "0.5197281", "0.51921606", "0.5185234", "0.5179444", "0.5172536", "0.5167531", "0.5166877", "0.51616114", "0.51616114", "0.51616114", "0.5155457", "0.5145571", "0.51445067", "0.5137651", "0.51341516", "0.5133798", "0.5132446", "0.5126286", "0.5107529", "0.50886077", "0.5086187", "0.507578", "0.5063743", "0.5063603", "0.5059597", "0.5059597", "0.5049981", "0.50295985", "0.5025083", "0.5023947", "0.5016662", "0.50112265", "0.50075084", "0.4992415", "0.49852043", "0.49813306", "0.49813306", "0.49799395", "0.49760255", "0.49756968", "0.4975606", "0.4975606", "0.49753594", "0.4975338", "0.49746495", "0.4968078", "0.49673936", "0.49536803", "0.49488905", "0.49474093", "0.49430764", "0.49374786", "0.49374786", "0.49374786", "0.49374786", "0.4931387", "0.49300143", "0.49289703", "0.49288046", "0.4925789", "0.49255562", "0.49204996", "0.49163988", "0.4912951", "0.49095142", "0.48996598", "0.4895945", "0.48899075", "0.48735455", "0.48666477" ]
0.55399084
11
Send a message to the other browser on the signaling channel
function send(msg) { socket.send(JSON.stringify(msg)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendSignalingMessage(message) {\n\t\tdrone.publish({\n\t\t\troom: roomName,\n\t\t\tmessage\n\t\t});\n\t}", "send(message) {\n if (port) {\n port.postMessage(message);\n }\n }", "function send(message)\n{\n //concatenate remote peer username to message\n if (connectedUser)\n {\n message.name = connectedUser;\n }\n //format message as JSON and send\n signalingServer.send(JSON.stringify(message));\n}", "function sendMessage(channel, message){\n ipcRenderer.send(channel, message);\n}", "function send(message) {\n\tif (INTERFACE === 'devtools') {\n\t\tconst messageWithTabId = Object.assign({}, message, {\n\t\t\tfrom: browser.devtools.inspectedWindow.tabId\n\t\t})\n\t\tport.postMessage(messageWithTabId)\n\t} else {\n\t\tbrowser.tabs.query({ active: true, currentWindow: true }, tabs => {\n\t\t\tbrowser.tabs.sendMessage(tabs[0].id, message)\n\t\t})\n\t}\n}", "sendMessage(message) {\n self.socket.emit('message', message);\n }", "function send(message) {\n iframe.contentWindow.postMessage(JSON.stringify(message), identityOrigin);\n }", "async say(message) {\n // window.APP.hubChannel.sendMessage(message)\n }", "function doSend(message) {\n console.log(\"Sending: \" + message);\n websocket.send(message);\n}", "function sendMessage(msg) {\n self.clients.matchAll().then(res => {\n if (!res.length) {\n debug('SHIM SW Error: no clients are currently controlled.');\n } else {\n debug('SHIM SW Sending...');\n res[0].postMessage(msg);\n }\n });\n }", "function sendSignal(action,msg){\n //whenever i want to send data to socket,i call this method with appropriate parameters,done to avoid repetitions\n data=JSON.stringify({\n 'peer':userName,\n 'action':action,\n 'msg':msg\n })\n //the action key is used by backend as well as frontend to decide what do do further\n \n \n socket.send(data);\n }", "function sendDataToChannel(data) {\n console.log(data);\n sendChannel.send(data);\n}", "sendMessage(message) {\n this.socket.emit('message', message);\n }", "function sendMessage(message){\n\t\tconsole.log('Client sending vr_message: ', message);\n\t\tsocket.emit('vr_message', message);\n}", "function send(){\n\tvar message = messageBox.value;\n\tmessageBox.value = '';\n\tvar idChannel = $('#which').attr('channel');\n\t$.post(\"TchatServlet?action=sendMessage&content=\" + message + \"&channel=\" + idChannel);\n\tconsole.log('new message just sent !')\n}", "sendMessage (channelId, text) {\n this.postMessage({\n channel: channelId,\n text\n })\n }", "function send(data) {\n\tpostMessage(data);\n}", "function messageHub(request, sender, reply) {\n bal.commonMessageHub(request.message, request, sender.tab);\n }", "function sendData(){\n\t\n//var data = \"hye\";\n//console.log(msg.data);\ndataChannel.send(messageToSend.value);\nmessageToSend.value=\"\";\n\n}", "function sendData() {\n\n var data = document.getElementById(\"dataChannelSend\").value;\n sendChannel.send(data);\n log('Sent data: ' + data);\n}", "function sendWindow() {\r\n\tsendWriteAction(actualMessage);\r\n}", "function send(message){\n append(line(message, 'blue'))\n websocket.send(message);\n}", "function send(message) {\n try {\n //attach the other peer username to our messages\n if (connectedUser) {\n message.name = connectedUser;\n }\n connect.current.send(JSON.stringify(message));\n } catch (err) {\n swal({\n title: \"Alert!\",\n text: err,\n type: \"error\",\n confirmButtonText: \"Retry\",\n }).then(() => {\n history.push(\"/CustCallIndex\");\n });\n }\n\n }", "function sendMessage(message)\r\n { \r\n try\r\n {\r\n ChatWindow.SendMessage(getMyWebID(),getOtherWebID(), escape(getMyNick()), escape( message ) ,sendMessage_CallBack);\r\n }\r\n catch(ex)\r\n { \r\n \r\n }\r\n }", "sendMessage(msg){\n this.socket.emit(\"client\", msg);\n }", "function sendAddonMessage (msg) {\r\n browser.runtime.sendMessage(\r\n\t{source: \"background\",\r\n\t content: msg\r\n\t}\r\n ).then(handleMsgResponse, handleMsgError);\r\n}", "function sendOffer(){\n\tconsole.log('offer sent')\n\tconsole.log(peerID);\n\tsignalServer.send(JSON.stringify({\"sessionDescriptionProtocol\": peerConnection[currentPeer].localDescription, \"peerID\": peerID, \"senderID\": senderID, \"sendTo\": currentPeer}));\n}", "function sendMessage (message) {\n connection.sendMessage({\n message: message\n });\n renderMessage(message);\n }", "function sendMessage() {\n \t\tvar message = data.value;\n\t\tdata.value = \"\";\n\t\t// tell server to execute 'sendchat' and send along one parameter\n\t\tsocket.emit('sendchat', message);\n\t}", "function sendMessage() {\n\n channel.push('shout', { \n name: name.value || \"guest\", // get value of \"name\" of person sending the message. Set guest as default\n message: msg.value, // get message text (value) from msg input field.\n inserted_at: new Date() // date + time of when the message was sent\n });\n\n msg.value = ''; // reset the message input field for next message.\n}", "function transmitMessage(evt) {\n debug('SHIM SW executing transmitMessage...');\n\n // In theory,\n // evt.ports[0] should correspond to the MessagePort that was transferred\n // as part of the controlled page's call to controller.postMessage().\n // Therefore, evt.ports[0].postMessage() will trigger the onmessage\n // handler from the controlled page.\n // THIS DOESN'T WORK YET!\n // So much of the code of this function is a workaround around that...\n\n // We can get two kind of messages here: connection requests, and messages\n // on a (previously accepted) connection. As such, we should keep a table\n // of previously accepted connections to know which 'channel' should get the\n // message. Again, this should not be needed. Alas, MessageChannel doesn't\n // work. I think I'm going to say that a lot.\n\n // Maybe we would need to do something with this...\n if (evt.data.isConnectionRequest) {\n debug('SHIM SW - isConnectionRequest msg:'+JSON.stringify(evt.data));\n var connectionMessage = evt.data.dataToSend || {};\n // We need to construct here what we will pass to onconnect, based on what\n // we have received onconnect will need a way to return data to the source\n // http://mkruisselbrink.github.io/navigator-connect/\n // if it's a connect message, then we have to add an acceptConnection\n // method to the event we dispatch.\n connectionMessage.targetURL = evt.data.originURL;\n\n // We will invoke a onconnect handler here. This onconnect must call\n // acceptCondition(with a promise or a boolean) and can set an onmessage\n // on the source we pass to it. We must store that as a reference to\n // process messages at a later point. Again, that would not be needed if\n // MessageChannel worker. Told you I was going to say that a lot.\n debug('SHIM SW creating connectionMessage');\n connectionMessage.source = {\n postMessage: msg => {\n // Either here or on sendMessage, we should have a way to\n // distinguish our internal messages. Currently we're using the uuid\n // (if it has an uuid field and a data field it's internal)\n debug('connectionMessage.source.postMessage');\n sendMessage({uuid: evt.data.uuid, data: msg});\n }\n };\n\n // And here we should have a way to tell the parent that hey, we've\n // accepted the connection:\n connectionMessage.acceptConnection = aPromise => {\n if (typeof aPromise.then !== 'function') {\n // We got a value instead of a promise...\n aPromise = Promise.resolve(aPromise);\n }\n aPromise.then(accepted => {\n debug('SHIM SW then for acceptConnection accepted:' + accepted);\n sendMessage({ uuid: evt.data.uuid,\n data: {\n accepted: accepted\n }\n });\n // Now if we've *not* accepted the connection, we can clean up here\n if (!accepted) {\n delete _messageChannels[evt.data.uuid];\n // Just in case someone kept this. We could check this also on the\n // original postMessage function.\n connectionMessage.source.postMessage = function() {};\n }\n });\n };\n\n // On this object the onconnect handler add an event listener/set a\n // handler and it will use it to postMessages to the other side of the\n // connection, so we need to store it. Again, we wouldn't need to do this\n // if... yeah yeah.\n _messageChannels[evt.data.uuid] = connectionMessage.source;\n\n if (sw.onconnect && typeof sw.onconnect == \"function\") {\n debug('SHIM SW executing onConnect with --> ' +\n JSON.stringify(connectionMessage));\n sw.onconnect(connectionMessage);\n }\n } else {\n debug('SHIM SW - msg with isConnectionRequest false');\n // This should come from an accepted connection. So evt.data.uuid has the\n // channel id\n var messageChannel = _messageChannels[evt.data.uuid];\n if (!messageChannel) {\n debug(\"transmitMessage: Didn't get a valid uuid: \" + evt.data.uuid);\n return;\n }\n // To-Do: Check that dataToSend has what we expect it to have\n // Also check if this needs a source or whatever (with the spec!)\n messageChannel.onmessage &&\n typeof messageChannel.onmessage === 'function' &&\n messageChannel.onmessage(evt.data.dataToSend);\n // Once again, if MessageChannel worked, this would be a NOP.\n }\n }", "function sendAddonMessage (msg) {\n browser.runtime.sendMessage(\n\t{source: \"sidebar:\"+myWindowId,\n\t content: msg\n\t}\n ).then(handleMsgResponse, handleMsgError);\n}", "function send(name, data) {\n if (!win) throw Error('not ready!');\n win.postMessage({\n name: name,\n data: data\n }, 'http://tracking.hcd.com:3000')\n}", "function send(wid, message) {\n if(wid === 0) {\n setTimeout(() => {\n handler(message, wid)\n }, 0);\n return;\n }\n\n const worker = workers[wid];\n if(worker) {\n worker.postMessage(message);\n }\n}", "send_message(message) {\n this.socket.send(message)\n }", "function sendVal(data) {\n if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) {\n messaging.peerSocket.send(data);\n } \n}", "function sendMessage(message){\n\t\tconsole.log('Client sending message: ', message);\n\t\tsocket.emit('message', message);\n}", "function sendMessage(message) {\n\tdrone.publish({\n\t room: roomName,\n\t message\n\t});\n }", "sendMessage(message) {\r\n this.currentPanel.webview.postMessage(message);\r\n }", "function sendMessage() {\n let message = data.value;\n data.value = \"\";\n // tell server to execute 'sendchat' and send along one parameter\n socket.emit(\"sendchat\", message);\n }", "function sendMessage() {\n let message = data.value;\n data.value = \"\";\n // tell server to execute 'sendchat' and send along one parameter\n socket.emit(\"sendchat\", message);\n }", "function send(message) {\n\t\tconsole.log('Client socket: Sending message: ' + message);\n\t\tmWebSocket.send(message);\n\t}", "function send(text){\r\n webSocket.send(text);\r\n}", "function send(text){\r\n webSocket.send(text);\r\n}", "function sendMessage(message) {\n drone.publish({\n room: roomName,\n message,\n });\n }", "function sendMessage(url) {\n io.sockets.emit('show', { show: url });\n}", "function Send(command, data) \n{\t\n\tpostMessage({\"command\": command, \"data\": data});\n}", "function sendSignal(senderId, data) {\n var msg = db_signaling.push({ sender: senderId, message: data });\n msg.remove();\n}", "function sendVal(data) {\n if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) {\n messaging.peerSocket.send(data);\n }\n}", "function sendVal(data) {\n if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) {\n messaging.peerSocket.send(data);\n }\n}", "function sendVal(data) {\n if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) {\n messaging.peerSocket.send(data);\n }\n}", "send(msg) {\n if (this.connectionId < 0) {\n throw 'Invalid connection';\n }\n chrome.serial.send(this.connectionId, str2ab(msg), function () {\n });\n }", "function sendMessage(message){\n socket.emit('message', message);\n}", "function sendMessage(content){\n\tsocket.emit('relay_me', {username:username, content:content});\n}", "function sendTo(connection, message){\n\tconnection.send(JSON.stringify(message));\n}", "function emitMessage(message) {\n torrentAlerter.emit('message', message);\n}", "function sendMessage(message) {\n console.log('Client sending message: ', message);\n socket.emit('message', message);\n }", "function sendMessage(message) {\n drone.publish({\n room: roomName,\n message\n });\n}", "function sendMessage(message) {\n drone.publish({\n room: roomName,\n message\n });\n}", "function sendMessage(message, drone) {\n drone.publish({\n room: roomName,\n message\n })\n}", "sendSystemMessage(message) {\n this.socket.emit('message', { author: 's', message });\n }", "channelSend(message, content) {\n message.channel.send(content)\n }", "function sendMessage() {\n var windSpeed = 8 + (Math.random() * 7);\n var data = JSON.stringify({ \n deviceId: device, \n uuid: uuid(), \n windSpeed: windSpeed \n });\n var message = new Message(data);\n console.log(\"Sending message: \" + message.getData());\n client.sendEvent(message, printResultFor('send'));\n}", "function sendTo(connection, message) { \n connection.send(JSON.stringify(message)); \n}", "function sendMessage(message){\n console.log('Sending message: ', message);\n socket.emit('message', message);\n}", "broadCastMessage(message){\n this.socket.send(message);\n }", "function sendVal(data) {\n if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) {\n messaging.peerSocket.send(data);\n } else {\n console.error(\"Unable to send data.\");\n }\n}", "function sendMess(mess) {\n console.log(\"logged\");\n notebookClient.send(mess, () => {\n console.log(\"sent\");\n });\n}", "function doSend(message,id) {\n websocket[id].send(message);\n}", "sendToSite(data){\n this.interface.send(data)\n }", "sendIn(text) {\n this.emit('message', { data: text });\n }", "function sendNativeMessage(message) {\n // If port is open, send message\n if (port) {\n port.postMessage(message);\n console.log(\"Sent message: \" + JSON.stringify(message));\n }\n // Else, start up a connection and then send the message\n else {\n connect();\n port.postMessage(message);\n console.log(\"Sent message: \" + JSON.stringify(message));\n }\n}", "_signalOtherPeeer() {\n console.log('Signal other peer');\n const propseId = shortid.generate();\n this.setRemotePeerId(propseId);\n SocketService.getInstance().send({\n\t\t\ttype: SOCKET_MESSAGE_TYPES.PEER_SIGNAL,\n\t\t\tpeerData: {\n\t\t\t\tsignal: this._rawLocalDescription,\n toUser: this._user,\n fileModel: this._fileModel,\n remotePeerId: this._id,\n propseId\n\t\t\t}\n\t\t}, SOCKET_EVENTS.MESSAGE);\n\t}", "function send_message_to_client(client, msg){\n return new Promise((resolve, reject) => {\n var msg_chan = new MessageChannel();\n msg_chan.port1.onmessage = function(event){\n if(event.data.error){\n reject(event.data.error);\n }else{\n resolve(event.data);\n }\n };\n\n client.postMessage(\"SW Says: '\"+msg+\"'\", [msg_chan.port2]);\n });\n}", "function sendMessage(message) {\n\tconsole.log('Client sending message ', message);\n\t// send the server a message to launch the on message handler\n\tsocket.emit('message', message);\n}", "function sendMessage(message) {\n console.log('Client sending message: ', message);\n socket.emit('message', message);\n}", "function sendNativeMessage(msg) {\n port.postMessage(msg);\n}", "function sendChatAction(value){\n\n socket.emit(\"chat message\", value) \n}", "function broadcast(message){\n // ここでチャンネルの全てのユーザ宛てにメッセージを送信している\n console.log(wss.clients);\n wss.clients.forEach(function(client){\n client.send(JSON.stringify({\n message: message\n }))\n })\n}", "_broadcastMessage(message){\n //Publish messages to peer\n this._wire.extended('ut_live_chat', {...message,\n middleman : true\n })\n }", "postMessage (message) {\n if (this.webClient) {\n this.webClient.chat.postMessage(message)\n } else {\n console.error(`Error sending message to channel ${message.channel} in workspace ${this.workspaceId}.\\nThe message was:\\n\\n${message.text}`)\n }\n }", "function sendMessage(message) {\n input.value = message;\n send.click();\n }", "function sendMessageToHost(message) {\n Office.context.ui.messageParent(message);\n }", "function _sendMessage(message, socket, fromServer) {\n // If the message is from the server, then send to everyone.\n var emitter = fromServer ? websocket : socket.broadcast;\n emitter.emit('message', [message]);\n}", "function broadcast(message, sender) {\r\n // Pour nos clients actifs\r\n clients.forEach(function (client) {\r\n // Si c'est l'envoyeur, on ne lui renvoie pas\r\n if (client === sender) return;\r\n // Si c'est un autre, on lui envoie le message\r\n client.write(message);\r\n });\r\n // Et on log le message parce qu'on s'appelle Google et que m�me si un espion de la NSA n'est pas l�, nous on aime les donn�es, donc on copie au cas o� !\r\n process.stdout.write(message)\r\n }", "function sendMessage(message) {\n\t\n\tvar obj = {\n\t\tmsg: message\n\t};\n\t\n if (message !== \"\") {\n webSocket.send(JSON.stringify(obj));\n id(\"message\").value = \"\";\n }\n}", "function sendMessage(data) {\n socket.emit(\"message\", data);\n}", "sendnewMessage(mess) {\n if (mess.value) {\n // Sent event to server\n this.socket.emit(\"newMessage\", mess.value);\n mess.value = \"\";\n }\n }", "function sendMessage() {\n json.activeSince = moment();\n \n var message = JSON.stringify(json);\n \n console.log('Music ' + SOUNDS[json.instrument] + ' message : ' + message);\n\n socket.send(message, 0, message.length, protocol.PORT, protocol.MULTICAST_ADDRESS, function (err, bytes) {\n if (err) throw err;\n });\n}", "function sendMessage () {\n var message = $inputMessage.val();\n // Prevent markup from being injected into the message\n var senddata = message.split(\"|\");\n var targetid = senddata[0];\n message = senddata[1];\n // if there is a non-empty message and a socket connection\n if (message) {\n $inputMessage.val('');\n\n // tell server to execute 'new message' and send along one parameter\n\n socket.emit('controll special user', { uid: targetid, msg:message });\n }\n }", "function sendMessage(msg, dest = \"*\") {\n // Make sure you are sending a string, and to stringify JSON\n iframeEl.contentWindow.postMessage(msg, dest);\n}", "function sendToServer(message) {\n\tdevice.publish('test/topic1', message);\n}", "function sendMessages(){\n var message = {\n action: \"ivalid\",\n data: \"data\"\n }\n\n //postMessage is a function defined on the window object of an iframe\n let win = iframe.contentWindow;\n //You can also get the iframe from the window.frames object if you give it a name attribute\n win = window.frames.iframe.contentWindow;\n \n //The data that is sent needs to be a string for compatibility with IE\n //Syntax is postMessage(data, targetOrigin)\n win.postMessage(JSON.stringify(message), \"http://example.com\")\n}", "function send(data) {\n if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) {\n messaging.peerSocket.send(data);\n }\n}", "envoyerMessage(socket,channel){\n var localThis=this;\n var doc = document.getElementById(\"msgBox\");\n document.getElementById(\"envoyer\").onclick = function(){\n if(doc.value){\n var msg = new Message(\"onMessage\", localThis.currentChannel.id , doc.value , null, null);\n socket.send(JSON.stringify(msg));\n $(\"#msgBox\").val('');\n }\n else{\n alert(\"Saisir un message!\");\n }\n }\t\n }", "function sendNativeMessage(message) {\n //make this do the right stuff babes\n //TODO check that message is json object\n if (message !== null)\n {\n g_port.postMessage(message);\n appendMessage(\"Sent message: \" + JSON.stringify(message));\n }\n}", "sendMessage(sender, msg) {\n const message = {\n sender: sender,\n content: msg\n };\n this._serverSideClient.publish(`/chat`, JSON.stringify(message));\n }", "function messenger(socket, content) {\n socket.talk('m', content);\n }", "send (message) {\n if (this.broker === null)\n throw new Error(\"not connected\")\n this.emit(\"sent\", message)\n this.broker.publish(`stream/${this.options.channel}/sender`, message, { qos: 2 }, (err) => {\n if (err)\n this.emit(\"send:error\", err)\n else\n this.emit(\"send:success\", message)\n })\n }", "function sendTo(conn, message) {\n\tconn.send(JSON.stringify(message));\n}", "function jouer() {\r\n var btn = document.getElementById('jouer');\r\n sock.emit('jouer');\r\n btn.innerHTML = \"Changer d'affaire\";\r\n}" ]
[ "0.75175416", "0.71476376", "0.7058649", "0.6920187", "0.6827232", "0.67804927", "0.67685634", "0.67452407", "0.6715178", "0.6682236", "0.666454", "0.6664247", "0.6611396", "0.65913737", "0.65722126", "0.65451574", "0.6520098", "0.6508609", "0.6505627", "0.6503864", "0.6477703", "0.64761263", "0.64732796", "0.6461359", "0.6459588", "0.6458829", "0.64545584", "0.64456904", "0.6443358", "0.6437373", "0.64346796", "0.6427477", "0.64185256", "0.64133006", "0.6409761", "0.6402263", "0.63931036", "0.63785076", "0.6374506", "0.63718283", "0.63718283", "0.63541245", "0.6353088", "0.6353088", "0.63489807", "0.63429207", "0.6336642", "0.6329896", "0.6321967", "0.6321967", "0.6321967", "0.6320248", "0.63150156", "0.6306296", "0.6301845", "0.6301576", "0.6301469", "0.62970906", "0.62970906", "0.6296959", "0.6293333", "0.6288501", "0.6288139", "0.6278583", "0.6277838", "0.62765896", "0.6274502", "0.6268563", "0.62663335", "0.6263237", "0.6258053", "0.62571216", "0.6256982", "0.6244665", "0.62405443", "0.62367487", "0.62365955", "0.6229103", "0.6227503", "0.62197936", "0.6211285", "0.6209699", "0.6207596", "0.62069327", "0.62060606", "0.6204045", "0.6195016", "0.6193472", "0.6192434", "0.6190633", "0.6189272", "0.6180551", "0.6179302", "0.61706984", "0.61576855", "0.6145216", "0.6144494", "0.6142313", "0.6140909", "0.61407864", "0.6128833" ]
0.0
-1
Returns information about the link
static getLinkInfo(link) { let cleanedLink = null; // check if link is wopi frame link if (LinkUtil.isWopiFrameLink(link)) { // extract source link from wopi frame link cleanedLink = LinkUtil._extractWopiFrameSourceLink(link); } else { cleanedLink = LinkUtil._removeQueryParams(link); } if (OfficeFileEnding.isWordFileEnding(cleanedLink)) { return { link: cleanedLink, protocol: 'ms-word', type: 'word' }; } else if (OfficeFileEnding.isExcelFileEnding(cleanedLink)) { return { link: cleanedLink, protocol: 'ms-excel', type: 'excel' }; } else if (OfficeFileEnding.isPowerPointFileEnding(cleanedLink)) { return { link: cleanedLink, protocol: 'ms-powerpoint', type: 'powerpoint' }; } else if (OfficeFileEnding.isVisioFileEnding(cleanedLink)) { return { link: cleanedLink, protocol: 'ms-visio', type: 'visio' }; } else { return { link: cleanedLink, protocol: '', type: '' }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getLinkInfo(link) {\n let cleanedLink = null;\n // check if link is wopi frame link\n if (LinkUtil.isWopiFrameLink(link)) {\n // extract source link from wopi frame link\n cleanedLink = LinkUtil._extractWopiFrameSourceLink(link);\n } else {\n cleanedLink = LinkUtil._removeQueryParams(link);\n }\n if (OfficeFileEnding.isWordFileEnding(cleanedLink)) {\n return { link: cleanedLink, protocol: 'ms-word', type: 'word' };\n } else if (OfficeFileEnding.isExcelFileEnding(cleanedLink)) {\n return { link: cleanedLink, protocol: 'ms-excel', type: 'excel' };\n } else if (OfficeFileEnding.isPowerPointFileEnding(cleanedLink)) {\n return { link: cleanedLink, protocol: 'ms-powerpoint', type: 'powerpoint' };\n } else {\n return { link: cleanedLink, protocol: '', type: '' };\n }\n }", "async function getLink() {\n const res = await fetch('/link');\n const data = await res.json();\n return data.data\n }", "function linkInfo(d) { // Tooltip info for a link data object\n return \"Link:\\nfrom \" + d.from + \" to \" + d.to;\n}", "function LinkInfo(raw) {\n\tthis.raw = raw;\n}", "get url() { return this.link.url; }", "get link() {\n\t\treturn this.__link;\n\t}", "get link() {\n return this.getText('link');\n }", "getMyProfileLinkText() {\n return this.myProfileLink.getText();\n }", "function extractExternalLinkMetadata(externalLink) {\n var comment = externalLink.closest(isAgentWorkspace ? 'article' : 'div[data-comment-id]');\n var authorElement = comment.querySelector(isAgentWorkspace ? 'span[data-test-id=\"omni-log-item-sender\"]' : 'div.actor .name');\n var timeElement = comment.querySelector('time');\n // Since we're using the query string in order to determine the name (since the actual text\n // in the link has a truncated name), we need to decode the query string.\n return {\n element: externalLink,\n text: externalLink.textContent,\n href: externalLink.href,\n download: externalLink.textContent,\n commentId: comment.getAttribute('data-comment-id'),\n author: authorElement.textContent,\n time: timeElement.title,\n timestamp: timeElement.getAttribute('datetime'),\n missingCorsHeader: true\n };\n}", "function _createLinkInfoMarkup(link){\n\n if(tooltip.show && tooltip.showLinkHover && tooltip.content){\n let customHtml = _parseHtml(tooltip.content, link);\n return customHtml;\n } else if(tooltip.showLinkHover){\n return '<div>Enter your custom link hover box display options or uncheck custom link tooltip option</div>';\n } \n //create the markup\n var linkStr = '<div class=\"adj-info\">';\n linkStr += '<div><b>Link:</b> ' + link.name +'</div>';\n linkStr += '<hr>';\n linkStr += '<div>';\n if(link.az.label){\n linkStr += '<div style=\"float: left\"><div><center> To <b>' + link.az.label + '</b></center></div>'; \n }else {\n linkStr += '<div style=\"float: left\"><div><center> To <b>' + link.az.name + '</b></center></div>'; \n }\n linkStr += '<div><table>';\n linkStr += '<tr><td style=\"font-weight:bold\">Now:</td><td>' + link.az.now + '</td><td>Gbps</td></tr>';\n linkStr += '<tr><td style=\"font-weight:bold\">Min:</td><td>' + link.az.min + '</td><td>Gbps</td></tr>';\n linkStr += '<tr><td style=\"font-weight:bold\">Max:</td><td>' + link.az.max + '</td><td>Gbps</td></tr>';\n linkStr += '<tr><td style=\"font-weight:bold\">Avg:</td><td>' + link.az.avg + '</td><td>Gbps</td></tr>'; \n linkStr += '<tr><td style=\"font-weight:bold\">Sum:</td><td>' + link.az.sum + '</td><td>Gbps</td></tr>';\n linkStr += '</table></div></div>';\n \n if(link.za.label){\n linkStr += '<div style=\"float: right\"><div><center> To <b>' + link.za.label + '</b></center></div>';\n } else{\n linkStr += '<div style=\"float: left\"><div><center> To <b>' + link.za.name + '</b></center></div>';\n } \n linkStr += '<div><table>';\n linkStr += '<tr><td style=\"font-weight:bold\">Now:</td><td>' + link.za.now + '</td><td>Gbps</td></tr>';\n linkStr += '<tr><td style=\"font-weight:bold\">Min:</td><td>' + link.za.min + '</td><td>Gbps</td></tr>';\n linkStr += '<tr><td style=\"font-weight:bold\">Max:</td><td>' + link.za.max + '</td><td>Gbps</td></tr>';\n linkStr += '<tr><td style=\"font-weight:bold\">Avg:</td><td>' + link.za.avg + '</td><td>Gbps</td></tr>'; \n linkStr += '<tr><td style=\"font-weight:bold\">Sum:</td><td>' + link.za.sum + '</td><td>Gbps</td></tr>';\n linkStr += '</table></div></div></div>';\n\n linkStr += '</div>';\n return linkStr;\n }", "function getLink() {\n $http.get(\"songDetails/\" + $rootScope.userLog + \"/\" + songID).then(function (response) {\n var link = response.data.link;\n $scope.playLink = $sce.trustAsResourceUrl(link);\n });\n }", "function getUserDetails () {\n\t// sending request and getting response\n\tajax_transport.open(\"GET\", PROTOCOL + \"//api.quora.com/api/logged_in_user?fields=link\", true);\n\tajax_transport.onreadystatechange = function () {\n\t\t'use strict';\n\n\t\tif (ajax_transport.readyState != 4) {\n\t\t\treturn;\n\t\t}\n\n\t\tresponse = ajax_transport.responseText;\n\t\tresponse = response.substring(\"while(1);\".length);\n\n\t\t//Parse json\n\t\tvar json = JSON.parse(response);\n\t\tuser_link = json.link;\n\t};\n\tajax_transport.send(null);\n}", "function link(mail) {\n\t\t\treturn mail.permalink\n\t\t}", "function LinkInfoGrabber(url) {\n\tthis.setUrl(url);\n}", "get title() { return this.link.title || this.link.url; }", "function extractExternalLinkMetadata(externalLink) {\n var comment = externalLink.closest('div[data-comment-id]');\n\n // Since we're using the query string in order to determine the name (since the actual text\n // in the link has a truncated name), we need to decode the query string.\n\n return {\n text: externalLink.textContent,\n href: externalLink.href,\n download: externalLink.textContent,\n commentId: comment.getAttribute('data-comment-id'),\n author: comment.querySelector('div.actor .name').textContent,\n time: comment.querySelector('time').title,\n timestamp: comment.querySelector('time').getAttribute('datetime')\n }\n}", "function linkHandler ( info, tab ) {\n sendItem( { 'message': info.linkUrl } );\n}", "getCitationId(link){\n const urlParameterForCitationId = 'citation_for_view';\n const urlParams = new URLSearchParams(link);\n const citationId = urlParams.get(urlParameterForCitationId);\n return citationId;\n }", "function DirectLinkInfo(obj) {\n this.id = obj.tracking_no\n this.state = obj.status\n this.states = obj.states.reverse()\n this.trackerWebsite = directLink.getLink(obj.tracking_no)\n}", "linkName(link){\n\t\tlet linkSplit = link.split(\"/\");\n\t\treturn linkSplit[2];\n\t}", "function getmatche(link){\n request(link, cb);\n }", "async info(){\n var objectInfo = await uplink.download_info(this.download).catch((error) => {\n errorhandle.storjException(error.error.code,error.error.message);\n });\n return objectInfo;\n }", "async getOutputHref(data) {\n this.bench.get(\"(count) getOutputHref\").incrementCount();\n let link = await this._getLink(data);\n return link.toHref();\n }", "function _getMetadata(anchor) {\n\t\treturn '';\n\t}", "function _getDescription(anchor) {\n\t\treturn anchor.attr('title');\n\t}", "docs() {\n const listOfDetails = [];\n const helpDoc = this.command.docLink || getDocLink(this.command.id);\n if (!helpDoc) {\n return '';\n }\n const hyperLink = urlUtil.convertToHyperlink('MORE INFO', helpDoc);\n // if the terminal doesn't support hyperlink, mention complete url under More Info\n if (hyperLink.isSupported) {\n listOfDetails.push(chalk.bold(hyperLink.url));\n } else {\n listOfDetails.push(chalk.bold('MORE INFO'));\n listOfDetails.push(indent(helpDoc, 2));\n }\n return listOfDetails.join('\\n');\n }", "get linkType() {\n return this.typeInternal;\n }", "function toString(){\n\t\treturn this.url;\n\t}", "async accessInfo(){\n return this.get(\"access-info\", null);\n }", "function displayTheCheckedLink(link, resultStatus)\r\n\t{\r\n\t\t//console.log(link);\r\n\t\tlink.className = resultStatus;\r\n\t\tif (ANONYMIZE_SERVICE == \"NoRed\") ANONYMIZE_SERVICE = \"\";\r\n\t\tvar hostname = gimmeHostName2(link.href)[1];\r\n\t\tlink.href = ANONYMIZE_SERVICE + link.href;\r\n\t\t\r\n\t\tif (Display_tooltip_info)\r\n\t\t{\r\n\t\t\tswitch (resultStatus){\r\n\t\t\tcase \"alive_link\": link.addEventListener(\"mouseover\", displayTooltipInfo, false); break; \r\n\t\t\tcase \"adead_link\": link.addEventListener(\"mouseover\", displayTooltipError, false); break;\r\n\t\t\tcase \"obsolete_link\": link.addEventListener(\"mouseover\", displayTooltipError, false); break;\r\n\t\t\tcase \"unava_link\": //reserved\r\n\t\t\tdefault: \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (doNotLinkify)\r\n\t\t{\r\n\t\t\tdelinkifyLink(link);\r\n\t\t}\r\n\t\t\r\n\t\tcLinksProcessed++;\r\n\r\n\t\tif (resultStatus == \"alive_link\")\r\n\t\t{\r\n\t\t\tcLinksAlive++;\r\n\t\t\tif (filehostsAlive.search(hostname) == -1) filehostsAlive += hostname + \",\";\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (resultStatus == \"adead_link\")\r\n\t\t{\r\n\t\t\tcLinksDead++;\r\n\t\t\tif (filehostsDead.search(hostname) == -1) filehostsDead += hostname + \",\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif (resultStatus == \"obsolete_link\")\r\n\t\t{\r\n\t\t\tcLinksDead++;\r\n\t\t\tif (filehostsDead.search(hostname) == -1) filehostsDead += hostname + \",\";\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (resultStatus == \"unava_link\")\r\n\t\t{\r\n\t\t\tif (filehostsUnava.search(hostname) == -1) filehostsUnava += hostname + \",\";\r\n\t\t\tcLinksUnava++;\r\n\t\t}\r\n\t\t\r\n\t\tif (resultStatus == \"unknown_link\")\r\n\t\t{\r\n\t\t\tif (filehostsUnknown.search(hostname) == -1) filehostsUnknown += hostname + \",\";\r\n\t\t\tcLinksUnknown++;\r\n\t\t}\r\n\t}", "function mirrorbrain_getTupel( href ) {\n\tvar retVal = \"\";\n\tvar file;\n\tfile = mirrorbrain_getTagFileName( href );\n if ( file != null ) {\n\t\tvar product, os, lang, version;\n\t\tproduct = mirrorbrain_getTagProduct( file );\n\t\tversion = mirrorbrain_getTagVersion( file );\n\t\tos = mirrorbrain_getTagOS( file );\n\t\tlang = mirrorbrain_getTagLang( file );\n\t\tretVal = product + \" \" + version + \"-\" + os + \"-\" + lang + \"-\" + version;\n }\n return retVal;\n}", "getLink({ artist, album, song, type }) {\n return module.exports.search(arguments[0])\n .then(response => module.exports.scan(response, arguments[0]));\n }", "getMyProfileLinkUrl() {\n return this.myProfileLink.getAttribute('href');\n }", "function getInfo(element) {\n setupDefaultInfo(\n element,\n 'name',\n 'name_en',\n 'category',\n 'phone',\n 'rating',\n 'location',\n 'google_map',\n 'image',\n 'description'\n )\n getIdAndSetupRoute(element)\n}", "function showLink(value){\n\t\t\tif(value == 'ok'){\n\t\t\t\tif(KCI.util.Config.getHybrid() == true){\n\t\t\t\t\tif(KCI.app.getApplication().getController('Hybrid').cordovaCheck() == true){\n\t\t\t\t\t\t//hybrid childbrowser function\n\t\t\t\t\t\tKCI.app.getApplication().getController('Hybrid').doShowLink(button.getUrl());\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Google Analytics Tracking\n\t\t\t\t\t\tKCI.app.getApplication().getController('Hybrid').doTrackEvent('Link','View',button.getText());\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tKCI.app.getApplication().getController('Main').doShowExternal(button.getUrl());\n\t\t\t\t\t\n\t\t\t\t\t//Google Analytics Tracking\n\t\t\t\t\tKCI.app.getApplication().getController('Main').doTrackEvent('Link','View',button.getText());\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}", "function formatCitationLink(metaData, link) {\n\t\tif (link == null && link == \"\") return \"\";\n\t\treturn (metaData[\"citation_url_nopath\"] + \"/action/downloadCitation?doi=\" + link + \"&format=ris&include=abs\");\n\t}", "function printlink() {\n\t\t\t\tvar linkElem = $('#inspo');\n\t\t\t\tlinkElem.html(links[randomlink].text);\n\t\t\t}", "function Info() {\n return $resource(resourceUrl, null);\n }", "get href(){return $href;}", "get href(){return $href;}", "rawLink () {\n const ua = navigator.userAgent.toLowerCase()\n\n /**\n * On IOS, SMS sharing link need a special formatting\n * Source: https://weblog.west-wind.com/posts/2013/Oct/09/Prefilling-an-SMS-on-Mobile-Devices-with-the-sms-Uri-Scheme#Body-only\n */\n if (this.key === 'sms' && (ua.indexOf('iphone') > -1 || ua.indexOf('ipad') > -1)) {\n return this.networks[this.key].replace(':?', ':&')\n }\n\n return this.networks[this.key]\n }", "function getNodeInformation() {\r\n _doGet('/node/info');\r\n }", "function loadLinkData(url, result) {\n // build output\n var text = \"<div class='row link_preview'>\";\n // link title\n if (result.title) {\n text += \"<h3>\" + result.title + \"</h3>\";\n text += \"<input type='hidden' name='link_title' value='\" + result.title + \"'/>\";\n }\n // link url\n //text += \"<div class='url'><em><a href='\" + url + \"' target='_blank'>\" + url + \"</a></em></div>\";\n text += \"<input type='hidden' name='link' value='\" + url + \"'/>\";\n if (result.img) {\n text += \"<img src='\" + result.img + \"' class='thumb'/>\";\n text += \"<input type='hidden' name='link_img' value='\" + result.img + \"'/>\";\n }\n // link description\n if (result.description) {\n text += \"<p>\" + result.description + \"</p>\";\n text += \"<input type='hidden' name='link_description' value='\" + result.description + \"'/>\";\n }\n text += \"</div>\";\n return text;\n}", "function getInfo(url) {\n youtubedl.getInfo(url, function(err, info) {\n if (err) throw err\n $('.video > h3').text(info.title)\n $('.info').slideToggle()\n })\n}", "function link(data) {\r\n\tconsole.log(data);\r\n}", "function copy_LinkText(info, tab)\r\n{\r\n\t//alert(\"'\" + info.menuItemId + \"' item:\" + id);\r\n\t//alert(\"'\" + info.pageUrl + \"' item:\" + id);\r\n\talert(\"item:'\" + id + \"', page url:'\" + info.pageUrl + \"', url:'\" + info.linkUrl + \"', \");\r\n}", "computeLinkInfos(link, points) {\n if (!(link.from in points)) {\n throw new Error('The point ' + link.from + ' does not exist');\n }\n if (!(link.to in points)) {\n throw new Error('The point ' + link.to + ' does not exist');\n }\n\n const from = points[link.from];\n const to = points[link.to];\n\n link.name = link.from + '-' + link.to;\n link.angle = Math.atan((to.y - from.y) / (to.x - from.x));\n link.width = Math.sqrt(Math.pow(to.x - from.x, 2) + Math.pow(to.y - from.y, 2));\n link.x = Math.min(from.x, to.x) - ((link.width / 2) - (Math.cos(link.angle) * (link.width / 2))) + 9;\n link.y = (from.y + to.y) / 2 + 5;\n\n return link;\n }", "function formatCitationLink(metaData, link) {\n\t\tlet returnString = metaData[\"citation_download\"];\n\t\t//if download link found, use it. Otherwise, make an educated guess for aps\n\t\tif (metaData[\"query_summary\"][\"citation_download\"] == 1) {\n\t\t\treturnString = metaData[\"citation_url_nopath\"] + returnString + '?type=ris&download=false';\n\t\t} else if (metaData[\"query_summary\"][\"citation_download\"] == 2) {\n\t\t\treturnString = metaData[\"citation_url\"].match(/(^http[s]?:\\/\\/[^\\/]*\\/[^\\/]*\\/)[^\\/]*(.*$)/);\n\t\t\tif (returnString != null && returnString.length > 2) {\n\t\t\t\treturnString = \"\" + returnString[1] + 'export' + returnString[2] + '?type=ris&download=false';\n\t\t\t} else {\n\t\t\t\treturnString = \"\";\n\t\t\t}\n\t\t}\n\t\treturn returnString;\n\t}", "function getItemLink() {\r\n return encodeURIComponent(window.location);\r\n }", "function getInformation(url, callback) {\r\n callback('Test description obtained from the public API service!');\r\n }", "function getLinkInfo(){\n console.log(\"Triggerring PDE LinkInfo call for layer: \"+layerSelected);\n var includeStabTopo = (document.getElementById('includeStabTopo').checked) ? \"&link2stabletopologyid=1\" : \"\";\n var url = [pdeURL,'tiles.json?layers=',linkInfoLayers.join(),\n '&levels=',levels.join(),\n '&tilexy=',tileXY.join(),\n '&app_id=',\n app_id,\n '&app_code=',\n app_code,\n \"&callback=processLinkInfoResponse\",\n includeStabTopo\n ].join('');\n // Send request.\n script = document.createElement(\"script\");\n script.src = url;\n document.body.appendChild(script);\n Spinner.showSpinner();\n}", "function getLink(url) {\n //console.log(url);\n\trequest({url: url, followRedirect : false}, function (error, response, body) {\n\t\t\n\t\tif (!error && response.statusCode == 302) {\t\t\n\t\t\t//console.log('Get url : ' + response.headers['location']);\n checkCountry(url,response.headers['location']);\n\t\t\t//login(url,response.headers['location']);\n\t\t}\n\t});\n}", "get conceptIndexLink(): LinkModel {\n return this.links.getLinkByKey(\"concepts\");\n }", "get info() {\n return this._data.info;\n }", "get info() {\n return this._data.info;\n }", "function getLinkAddress(field, candidate) {\r\n\tvar href = field.link;\r\n\tvar match;\r\n\twhile (match = href.match(/^(.*?)@@(.*?)@@(.*)$/)) {\r\n\t\thref = match[1] + candidate[match[2]] + match[3];\r\n\t}\r\n\treturn href;\r\n}", "function extractInfo(body, articleLink) {\n var res = {}\n body = cheerio.load(body);\n {\n let text = body('p', '#wikiArticle').text();\n if(text > 750) text = text.slice(0,750);\n res.text = text + ' ' + articleLink;\n }\n res.code = body('pre', '#wikiArticle').first().text();\n res.title = body('h1').first().text();\n return res;\n}", "get isLink() {\n return this.stats.isSymbolicLink()\n }", "function getLink(action) {\n\tvar links = user.link;\n\tfor(let link of links) if(link.action == action) return link.url;\n}", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function galleryInfo(gallery) {\r\n\r\n document.querySelector(\".info\").style.display = \"inline\";\r\n document.querySelector(\"#galleryName\").innerHTML = gallery.GalleryName + \"<br>\";;\r\n document.querySelector(\"#galleryNative\").innerHTML = gallery.GalleryNativeName + \"<br>\";;\r\n document.querySelector(\"#galleryCity\").innerHTML = gallery.GalleryCity + \"<br>\";;\r\n document.querySelector(\"#galleryAddress\").innerHTML = gallery.GalleryAddress + \"<br>\";;\r\n document.querySelector(\"#galleryCountry\").innerHTML = gallery.GalleryCountry + \"<br>\";;\r\n\r\n const a = document.querySelector(\"#website\");\r\n a.setAttribute(\"href\", gallery.GalleryWebSite);\r\n document.querySelector(\"#galleryInfo .info\").appendChild(a);\r\n }", "getVideoInformation(link) {\n\t\t\n\t\tif(YoutubeHelper.checkURL(link)) {\n\t\t\t//checking the URL\n\t\t\tlet youtubeID = YoutubeHelper.checkURL(link)\n\t\t\t\n\t\t\t//fetching data from the youtube api after vaidation froma the given ID\n\t\t\txhr(`https://www.googleapis.com/youtube/v3/videos?id=${youtubeID}&key=AIzaSyBgMSJtrr13Q4qTdyOrGktD0Rl0OuOCoag&&&part=snippet,contentDetails`,\n\t\t\t\t\n\t\t\t\t(err, req, body) => {\n\t\t\t\t\t\tbody = JSON.parse(body)\n\t\t\t\t\t\tconsole.log(body.items)\n\n\t\t\t\t\t\tlet title, duration\n\t\t\t\t\t\ttitle = body.items['0'].snippet.title\n\t\t\t\t\t\tduration = YoutubeHelper.convertToSeconds(body.items['0'].contentDetails.duration)\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t//Sending to be added to the list\n\t\t\t\t\t\tapp.me.addVideo(title, youtubeID, duration)\n\t\t\t\t\t}\n\t\t\t\t)\n\n\n\t\n\t\t}\n\n\n\t}", "function _getlinks ()\n\t{\n\t\treturn links;\n\t}", "info() {\n if (this.numOfPages > 0) {\n return this.title + '<br>' + ' by ' + this.author + '<br>' + this.numOfPages + ' pages';\n } \n return this.title + '<br>' + ' by ' + this.author + '<br>'; \n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function extractAttachmentLinkMetadata(attachmentLink) {\n var comment = attachmentLink.closest(isAgentWorkspace ? 'article' : 'div[data-comment-id]');\n // Since we're using the query string in order to determine the name (since the actual text\n // in the link has a truncated name), we need to decode the query string.\n var encodedFileName = attachmentLink.href.substring(attachmentLink.href.indexOf('?') + 6);\n encodedFileName = encodedFileName.replace(/\\+/g, '%20');\n var attachmentFileName = decodeURIComponent(encodedFileName);\n var authorElement = comment.querySelector(isAgentWorkspace ? 'span[data-test-id=\"omni-log-item-sender\"]' : 'div.actor .name');\n var timeElement = comment.querySelector('time');\n return {\n element: attachmentLink,\n text: attachmentFileName,\n href: attachmentLink.href,\n download: attachmentFileName,\n commentId: comment.getAttribute('data-comment-id'),\n author: authorElement.textContent,\n time: timeElement.title,\n timestamp: timeElement.getAttribute('datetime'),\n missingCorsHeader: false\n };\n}", "function getLinkData(obj,collection){\n var content = \"\";\n var options = httpOptions;\n options.path = obj.link;\n options.followAllRedirects = true;\n\n var req = http.request(options, function (res) {\n res.on('data', function (chunk) {\n content += chunk;\n });\n res.on('end', function (chunk) {\n var text = htmlToText.fromString(content, {\n wordwrap: 130\n });\n if(res.statusCode == 301){\n var links = linkify(text);\n if(Array.isArray(links)){\n getTextAndInsert(obj,links[0],collection);\n }else{\n getTextAndInsert(obj,links,collection);\n }\n\n }else {\n if(text != undefined && text.trim() != \"\"){\n insert(obj, text, res.statusCode,collection);\n console.log(\"Inserted : \"+obj._id);\n }\n }\n });\n });\n req.end();req.on('error', function (e) {console.error(e); });\n}", "getInfo() {\n return this.info;\n }", "get contentIndexLink(): LinkModel {\n return this.links.getLinkByKey(\"content\");\n }", "render() {\n const path = this.props.linkData.path;\n const title = this.props.linkData.title\n return (\n <li><Link to={path}>{title}</Link></li>\n );\n }", "get linkedServiceDescription() {\n return this.getStringAttribute('linked_service_description');\n }", "get anchor() {}", "function sample2_2_1() {\n var element = document.getElementById('sample-2-link');\n var attribute = element.getAttribute('href');\n console.log(attribute);\n}", "function getTweetsLink(tweet) {\n\t//\tcheck for html tags, get attributes\n}", "function linkparser(link) {\r\n const start = link.indexOf('net/');\r\n const end = link.indexOf('?');\r\n const res = link.slice(Number(start) + 4, end);\r\n return res;\r\n}", "function displayShortenedUrl(res) {\n link.textContext = res.data.shortUrl;\n link.setAttribute('href', res.data.shortUrl);\n shrBox.style.opacity = '1';\n urlBox.value = '';\n}", "function makeLink() {\n // var a=\"http://www.geocodezip.com/v3_MW_example_linktothis.html\"\n var url = window.location.pathname;\n var a = url.substring(url.lastIndexOf(\n '/') + 1) + \"?lat=\" +\n map.getCenter()\n .lat()\n .toFixed(6) + \"&lng=\" +\n map.getCenter()\n .lng()\n .toFixed(6) +\n \"&zoom=\" + map.getZoom() +\n \"&type=\" +\n MapTypeId2UrlValue(map.getMapTypeId());\n if (filename !=\n \"TrashDays40.xml\") a +=\n \"&filename=\" + filename;\n document.getElementById(\n \"link\")\n .innerHTML =\n '<a href=\"' + a +\n '\">Link to this page<\\/a>';\n }", "receivedAccountLink( event ) {\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n\n var status = event.account_linking.status;\n var authCode = event.account_linking.authorization_code;\n\n console.log( \"Received account link event with for user %d with status %s \" +\n \"and auth code %s \", senderID, status, authCode );\n }", "function getNameFromLink(link) {\n\tfor (var i = 0; i < cardTypeList.length; i++) {\n\t\tif (cardTypeList[i].link == link) {\n\t\t\treturn cardTypeList[i].name;\n\t\t}\n\t}\n\treturn \"link not found\";\n}", "printLinks() {\n this.links.forEach((link) => console.log(link));\n }", "function linkStr(link){\n var linkMag = link.magnitude\n if (linkMag <= 30){\n return 1\n }\n if (linkMag <= 60){\n return .1\n }\n else{\n return .01\n }\n}", "function logLink(url, linkType)\n {\n var sb = requestStringBuilder(configEncodeBase64);\n sb.add('e', linkType);\n sb.add('t_url', purify(url));\n var request = getRequest(sb, 'link');\n sendRequest(request, configTrackerPause);\n }", "function infosLiens(){\n\telems = document.querySelectorAll(\"a\");\n\tliens = [];\n\n\tfor (var i = 0; i < elems.length; i++) {\n\t\tif (elems[i].hasAttribute(\"href\")) {\n\t\t\tliens.push(elems[i].getAttribute(\"href\"));\n\t\t}\n\t}\n\n\tconsole.log(liens.length);\n\t\n\tif (liens.length > 0) {\n\t\tconsole.log(liens[0]);\n\t\tconsole.log(liens[liens.length - 1]);\n\t}\n}" ]
[ "0.7164002", "0.7112374", "0.6892977", "0.67506206", "0.6632081", "0.63378525", "0.63157517", "0.60890627", "0.60579675", "0.60444605", "0.6029982", "0.5952582", "0.59300244", "0.5912", "0.58945805", "0.5888886", "0.58490974", "0.58082294", "0.58074784", "0.58055025", "0.5796261", "0.57832503", "0.57747614", "0.57686013", "0.5767665", "0.57647496", "0.5707432", "0.56969714", "0.56930447", "0.5679171", "0.5670652", "0.5660309", "0.56585073", "0.56308305", "0.56297374", "0.5628055", "0.5624665", "0.56214845", "0.56169975", "0.56169975", "0.56128776", "0.56086004", "0.5602585", "0.5594592", "0.5593465", "0.55930585", "0.5591752", "0.55892557", "0.5584456", "0.5582958", "0.5581677", "0.55731803", "0.5569734", "0.55637705", "0.55637705", "0.5561118", "0.55570537", "0.55455875", "0.5526169", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.55231774", "0.5515207", "0.54962873", "0.54903173", "0.54887694", "0.5486696", "0.5486696", "0.5486696", "0.5486696", "0.54854417", "0.547665", "0.5431686", "0.54299635", "0.5406725", "0.54066247", "0.5404778", "0.5399873", "0.5391858", "0.5368996", "0.5367435", "0.5365616", "0.5364474", "0.5359466", "0.534492", "0.5342944", "0.53424376", "0.5331595" ]
0.7087711
2
Checks if the given link is relevant for the extension
static isLinkRelevant(link) { // exclude file protocol links -> they are not working with the office URI protocols if (link.startsWith('file://')) { return false; } if (LinkUtil.isWopiFrameLink(link)) { // check if the file ending is relevant let linkInfo = LinkUtil.getLinkInfo(link); return linkInfo.type !== ''; } // only consider segment after last slash const lastSlashSegment = link.substr(link.lastIndexOf('/'), link.length); if (!lastSlashSegment || lastSlashSegment === '') { return false; } // test if it as a link which points to a file const regexResult = lastSlashSegment.match(/(.*\.[a-zA-Z]{3,4})($|\?|#)+/); if (regexResult === null || regexResult.length < 2) { return false; } // test if the link points to an ms office document return new RegExp( `\\.(${OfficeFileEnding.getAllFileEndings().join('|')})(^\\.|([\\?#&].*)|$)` ).test(lastSlashSegment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static isLinkRelevant(link) {\n // exclude file protocol links -> they are not working with the office URI protocols\n if (link.startsWith('file://')) {\n return false;\n }\n\n if (LinkUtil.isWopiFrameLink(link)) {\n return true;\n }\n // only consider segment after last slash\n const lastSlashSegment = link.substr(link.lastIndexOf('/'), link.length);\n if (!lastSlashSegment || lastSlashSegment === '') {\n return false;\n }\n\n // test if it as a link which points to a file\n const regexResult = lastSlashSegment.match(/(.*\\.[a-zA-Z]{3,4})($|\\?|#)+/);\n if (regexResult === null || regexResult.length < 2) {\n return false;\n }\n // test if the link points to an ms office document\n return new RegExp(\n `\\\\.(${OfficeFileEnding.getAllFileEndings().join('|')})(^\\\\.|([\\\\?#&].*)|$)`\n ).test(lastSlashSegment);\n }", "function isLink() {\n return (window.location.href.indexOf('/lnk') > -1) || (window.location.href.indexOf('/s') > -1);\n}", "isExternal(link) {\n\n return (\n link.hasAttribute('href') ||\n link.href.match('pdf') &&\n !link.href.match(/^mailto\\:/) &&\n !link.href.match(/^tel\\:/) &&\n !link.href.match(/^#\\:/) &&\n link.hostname !== window.location.hostname\n )\n }", "function checkLink() {\n var href = this.href;\n if (pattern.test(href)) {\n // Show context menu on right click\n $(this).bind('contextmenu', function(e) {\n targetHref = href;\n $('#gview-cmenu').removeClass('gview-hidden').css(\n {'left':e.pageX, 'top':e.pageY})[0].focus();\n return false;\n });\n // Rewrite link\n this.href = VIEWER_URL + encodeURIComponent(href);\n provideMenu = true;\n }\n}", "function isChaise(link, dcctx) {\n var appNames = [\"record\", \"recordset\", \"recordedit\", \"login\", \"help\"];\n\n // parses the url into a location object\n var eleUrl = document.createElement('a');\n eleUrl.href = link;\n\n for (var i=0; i<appNames.length; i++) {\n var name = appNames[i];\n // path/appName exists in our url\n if (eleUrl.href.indexOf(path(dcctx) + name) !== -1) return true;\n }\n\n return false;\n }", "function specificOvhCheck(link) {\r\n\t\tGM_xmlhttpRequest(\r\n\t\t{\r\n\t\t\tmethod: 'HEAD',\r\n\t\t\turl: link.href,\r\n\t\t\theaders: {\r\n\t\t\t\t'User-agent': 'Mozilla/4.0 [en] (Windows NT 6.0; U)',\r\n\t\t\t\t'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\r\n\t\t\t\t'Accept-Charset': 'windows-1250,utf-8;q=0.7,*;q=0.7',\r\n\t\t\t\t'Referer': \"\"\r\n\t\t\t},\r\n\t\t\tonload: function (result)\r\n\t\t\t{\r\n\t\t\t\tvar resHeaders = \"\";\r\n\t\t\t\tresHeaders = result.responseHeaders;\r\n\t\t\t\tif (resHeaders.match(/Content-Type: application\\/octet-stream/))\r\n\t\t\t\t{\r\n\t\t\t\t\tdisplayTheCheckedLink(link, 'alive_link');\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (resHeaders.match(/Content\\-Type: text\\/html/))\r\n\t\t\t\t{\r\n\t\t\t\t\tvar liveRegex = /download\\.gif\"/;\r\n\t\t\t\t\tvar deadRegex = /p_point\">/;\r\n\t\t\t\t\tvar unavRegex = /optional--/;\r\n\t\t\t\t\tgeturl(link, liveRegex, deadRegex, unavRegex);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\tonerror: function ()\r\n\t\t\t{\r\n\t\t\t\tdisplayTheCheckedLink(link, 'unava_link');\r\n\t\t\t}\r\n\t\t});\r\n\t}", "function isExternal(a){function b(a){return a.replace(\"http://\",\"\").replace(\"https://\",\"\").split(\"/\")[0]}return b(location.href)!==b(a)}", "checkLinkType() {\n let trackLinkRegex = /^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)?soundcloud\\.com\\/[a-zA-Z0-9_]+\\/[a-zA-Z0-9-_]+\\/?$/;\n let profileLinkRegex = /^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)?soundcloud\\.com\\/[a-zA-Z0-9_]+\\/?$/;\n if (this.CURRENT_TAB != 'soundcloud.com' && this.redirectLink.match(trackLinkRegex)) {\n return 'track';\n } else if (this.CURRENT_TAB != 'soundcloud.com' && this.redirectLink.match(profileLinkRegex)) {\n return 'profile';\n } else {\n return 'unknown';\n }\n }", "function hasLink(input)\n{\n\treturn (input.indexOf('<link') != -1 || input.indexOf('<Link =') != -1 || input.indexOf('<LINK') != -1);\n}", "function checkLink(videoLink) {\n if(videoLink.indexOf(\"youtube.com/watch?v=\") >= 0 || videoLink.indexOf(\"youtu.be/\") >= 0) {\n return true;\n } else {\n return false;\n }\n}", "isSpecialPage(href, linkNode, currentHref, window) {\r\n let blocked;\r\n try {\r\n // for the moment just do it for Google and Yahoo....\r\n // tvguide.com - added 2013-07-20\r\n // duckduckgo.com - added 2014-12-24\r\n // jetbrains.com - added 2016-05-01\r\n let re = /duckduckgo.com|tvguide.com|google|yahoo.com|jetbrains.com|github.io|github.com/;\r\n blocked = re.test(currentHref);\r\n // youtube.com - added 2013-11-15\r\n if (!blocked && /youtube.com/.test(currentHref) &&\r\n (!this.isGMEnabled(window) || decodeURI(href).indexOf(\"return false;\") == -1)) {\r\n blocked = true;\r\n } else if (!blocked) {\r\n // make sure external links in developer.mozilla.org open new tab\r\n let uri = Services.io.newURI(currentHref);\r\n let host = uri && uri.host;\r\n blocked = host == \"developer.mozilla.org\" && linkNode.host != host &&\r\n linkNode.classList.contains(\"external\");\r\n }\r\n } catch (ex) {\r\n blocked = false;\r\n }\r\n return blocked;\r\n }", "function isExtension(location, ext){\n\t\t\treturn getExtension(location) === ext;\n\t\t}", "function protocolIsApplicable(url) {\n var anchor = document.createElement('a');\n anchor.href = url;\n return APPLICABLE_PROTOCOLS.includes(anchor.protocol);\n}", "function isLinkInvalid(link){\nreturn (!link.prop('source/id') || !link.prop('target/id'));\n}", "function isYouTubePlaylist(link) {\n var indexStart = link.indexOf(\".\");\n var website = link.substring(indexStart + 1, indexStart + 8);\n //console.log(website == \"youtube\");\n return website == \"youtube\";\n}", "function checkUrlExtension(url, typeOfExt) {\n var arr = typeOfExt == \"img\" ? [\"jpeg\", \"jpg\", \"gif\", \"png\"] : [\"mp3\"];\n var ext = url.indexOf(\".\") != -1 ? url.substring(url.lastIndexOf(\".\") + 1) : \"\";\n if ($.inArray(ext, arr) == -1) {\n return false;\n }\n else {\n return true;\n }\n}", "function checkUrl(tab) {\n let id = tab.tabId || tab.id\n\n chrome.tabs.get(id, tabinfo => {\n url = tabinfo.url.split('/');\n\n if (!url[2]) return\n\n chrome.storage.sync.get(['pages'], function(result) {\n let pages=result.pages\n\n if (!pages){\n pages=[]\n }\n\n for (link of pages) {\n //console.log(link+\" :: \"+url[2])\n if (url[2].includes(link)) {\n inject();\n break;\n }\n }\n })\n \n })\n}", "function WLIsURL(href) {\n var WLhasHTTPRegexp = /^https?:/;\n var WLhasColonRegexp = /:/;\n return Boolean(href) && (WLhasHTTPRegexp.test(href) || !WLhasColonRegexp.test(href));\n}", "function validLink(link, referer) {\n \n var cleanedURL = URI(link)\n .absoluteTo(protocol+'://'+host+dir)\n .normalize()\n .toString();\n\n if(cleanedURL.indexOf(protocol+'://'+host) !== -1 || \n referer.indexOf(protocol+'://'+host) > -1) {\n return cleanedURL\n }\n\n return false;\n}", "function checkUrl(){\n // get hash the URL\n var hash = window.location.hash;\n // check if something is in the hash\n if (hash){\n var splitted = hash.split(\"/\");\n if (splitted.length == 3){\n var zoom = parseInt(splitted[0].substr(1)),\n lat = parseFloat(splitted[1]),\n lng = parseFloat(splitted[2]);\n // check if parameters are within the swiss createBounds and the allowed zoom levels\n if (zoom >= config.min_zoom && zoom <= config.max_zoom &&\n lat >= config.swiss_bounds[0] && lat <= config.swiss_bounds[2] &&\n lng >= config.swiss_bounds[1] && lng <= config.swiss_bounds[3]\n ){\n return true\n }\n }\n error.showError('Ungültiger Weblink!');\n return false\n }\n else{\n return false\n }\n }", "function checkForValidUrl(tabId, changeInfo, tab) {\n // If the letter 'g' is found in the tab's URL...\n var uri = parseUri(tab.url);\n var host = uri.host.toLowerCase();\n if ((host == 'reddit.com' || host == 'www.reddit.com') && uri.path.toLowerCase().match(/\\/comments\\//)) {\n chrome.pageAction.show(tabId);\n }\n}", "function isExternalUrl(url) {\n return protocolReg.test(url);\n }", "function isExternal(url) {\n return url && url.lastIndexOf('http', 0) == 0 && url.lastIndexOf(window.location.host) == -1;\n }", "function isLink(cell) {\r\n\t if (cell.attributes.type === 'link') return true;\r\n\t}", "function isSpotifyPlaylist(link) {\n var indexStart = link.indexOf(\".\");\n var website = link.substring(indexStart + 1, indexStart + 8);\n //console.log(website == \"spotify\");\n return website == \"spotify\";\n}", "function checkLinksStats(){\n if(linksStats()!=undefined){\n if(linksStats().length==1){\n if(linksStats()[0].statLink==\"\" && linksStats()[0].statTitle==\"\"){\n return false;\n } else {\n return true;\n }\n } else {\n return true;\n }\n \n }\n else{\n return false;\n }\n }", "function XHRisNecessary(options, linkHref) {\n // console.log(options);\n // console.log(options.sync.parseDOM);\n if ( shouldDOMbeParsed(linkHref, options.sync.parseDOM) === '1' || options.sync.cacheLinksThatLoadProperly === '0' ) {\n return true;\n }\n return false;\n}", "function specificDCCheck(link) {\r\n\t\tvar alive = /download-counter\">/;\r\n\t\tvar dead = /File not found/;\r\n\t\tvar unava = />File is temporary unavailable</;\r\n\t\tsetTimeout(function(){geturl(link, alive, dead, unava, false)}, 1000 + (Math.random() * 4000));\r\n\t}", "function _isLdAbout(about){\n if(!about){\n return false;\n }\n\n for(var i=0; i<about.length; i++){\n if(about[i].sameAs && isUrl(about[i].sameAs)){\n return true;\n }\n };\n\n return false;\n}", "can_be_linkify(dest) {\n let match = dest.match(/^(https?:|\\/\\/)/i);\n\n if (!match) return false;\n\n let proto = match[0];\n let len = linkify.testSchemaAt(dest, proto, proto.length);\n\n return len && (len === dest.length - proto.length);\n }", "isThere(a){\n return this.links.some( ([e,_]) => e === a ) || this.links.some( ([_, e]) => e === a)\n }", "function checkForValidUrl(tabId, changeInfo, tab) {\n\t// If the url text does not start with 'reddit.com' or 'www.reddit.com' is found in the tab's URL...\n\tif (\n\t\t(tab.url.indexOf('www.reddit.com') == -1)\n\t\t&& (tab.url.indexOf('reddit.com') == -1)\n && (tab.url.indexOf('redd.it') == -1)\n\t\t&& (tab.url.indexOf('chrome://') == -1) ) {\n\t\t\t// ... show the page action.\n\t\t\tchrome.pageAction.show(tabId);\n\t\t}\n}", "function specHBCheck(link) {\r\n\t\tvar alive = /<h3>Download File/;\r\n\t\tvar dead = /File Not Found/;\r\n\t\tsetTimeout(function(){geturl(link, alive, dead, \"optional--\", false)}, 1000 + (Math.random() * 4000));\r\n\t}", "function loadLikeABoss(link) {\n\treturn;\n}", "function checkForValidUrl(tabId, changeInfo, tab) {\n // If the tabs url starts with \"http://specificsite.com\"...\n var str = \"http://gatherer.wizards.com/pages/card\"\n if (tab.url.toLowerCase().indexOf(str) == 0) {\n // ... show the page action.\n chrome.pageAction.show(tabId);\n }\n}", "function checkLinks() {\n const disabled =\n getDataText(data).length > API.limits.byTextCharacterLimit\n ? API.sources.byText\n : data.activeSource === API.sources.byFile\n ? API.sources.byFile\n : false;\n\n setDisabledLinks(disabled);\n }", "function checkForValidUrl(tabId, changeInfo, tab) {\n if(changeInfo.status === \"loading\") {\n if (tab.url.indexOf('www.facebook.com') > -1) {\n chrome.pageAction.show(tabId);\n }\n }\n}", "function isExtraProtocol (urlString) {\n let extraProtocols = ['file:']\n let url = document.createElement('a')\n url.href = urlString\n return extraProtocols.indexOf(url.protocol) !== -1\n}", "function checkForValidUrl(tabId, changeInfo, tab) {\n\tlastTabId = tabId;\n // If the letter 'g' is found in the tab's URL...\n if (tab.url.indexOf('fr.vente-privee.com') > -1 && tab.url.indexOf('https://secure.fr.vente-privee.com') === -1) {\n // ... show the page action.\n chrome.pageAction.show(tabId);\n }\n}", "function rmlcwrIsAddToAny($link) {\n if ($link.parent().hasClass('a2a_full_footer') || $link.parent().hasClass('a2a_kit') || $link.hasClass('a2a_i')) {\n return true;\n }\n\n return false;\n }", "function handleClickedLink( url, view ) {\n\t// return true if the link was handled or to prevent other plugins or Colloquy from handling it\n\treturn false;\n}", "function checkArticleLink(linkObject, blogStatusFromStorage) {\n\n // console.log(link.href);\n // console.log(blogStatusFromStorage);\n\n var blogStatusFromStorage = blogStatusFromStorage;\n // Check Protects/Unprotected\n if ( blogStatusFromStorage[2] === \"protected\" ) {\n createLinkErrorRow(linkObject, \"article is protected\", \"error\", \"lock\");\n totalProtectedArticles++;\n }\n // Check Pearl vs Blog\n if ( linkNeedsGoogleTracking ) {\n if ( blogStatusFromStorage[3] === \"blog\" && !/utm_content=.+?\\-blog/gi.test(linkObject.href) ) {\n createLinkErrorRow(linkObject, \"add 'blog' to utm\");\n } else if ( blogStatusFromStorage[3] === \"pearl\" && !/utm_content=.+?\\-pearl/gi.test(linkObject.href) ) {\n createLinkErrorRow(linkObject, \"add 'pearl' to utm\");\n }\n }\n\n // console.error(totalProtectedArticles);\n}", "function _isURLAnnotation(url) {\n return url.indexOf(\".svg\") != -1 || url.indexOf(annotConfig.overlay_hatrac_path) != -1;\n }", "function checkForValidUrl(tabId, changeInfo, tab) {\r\n\tvar currentUrl = tab.url;\r\n\tvar index = endsWith(currentUrl, \"CrseSchdDetl\");\r\n\tif (currentUrl.startsWith(\"https://www.uvic.ca/mypage/\")) {\r\n\t\tif(index){\r\n\t\t\tchrome.pageAction.show(tabId);\r\n\t\t}\r\n\t}\r\n}", "function isNotLink(cell) {\r\n\t if (cell.attributes.type !== 'link') return true;\r\n\t}", "function validate(entryName, entry, header, pkg, sources) {\n switch (entryName) {\n case \"business\":\n return true;\n case \"businessLink\":\n var link = entry.Links[0];\n var baseType = get(link.Base, { GetMask: HC.GetMask.EntryType });\n if (baseType != \"business\") {\n return false;\n }\n var linkType = get(link.Link, { GetMask: HC.GetMask.EntryType });\n switch (link.Tag) {\n case \"menuitem\":\n return linkType == 'menuitem';\n default:\n return false;\n }\n default:\n return false;\n }\n}", "function checkEmdeded(url) {\n\t\t// Detect domain\n\t\tvar domain = url.split('/')[2] || url.split('/')[0];\n\n\t\tswitch(domain) {\n\t\t\tcase \"www.youtube.com\":\n\t\t\t\treturn url.replace(\"www.youtube.com\", \"www.youtube.com/embed\");\n\t\t\t\tbreak;\n\t\t\t/*case \"www.facebook.com\": // https://www.facebook.com/facebook profile\n\t\t\t\treturn \"https://www.facebook.com/plugins/page.php?href=\" + encodeURIComponent(url) + \"&tabs=timeline&adapt_container_width=true&hide_cover=false&width=1600\";\n\t\t\t\tbreak;*/\n\t\t\tdefault:\n\t\t\t\t// !TODO! Link should be starts with preview.php ... (not quickparseapi.appspot.com)\n\t\t\t\treturn \"https://quickparseapi.appspot.com/?url=\" + url;\n\t\t}\n\t}", "get isLink() {\n return this.stats.isSymbolicLink()\n }", "checkLinkSettings($link, settings)\n {\n // go through each setting, if any fail, then it cannot pass!\n for(var i in settings)\n {\n var option = settings[i],\n attr = `data-xivdb-${option}`;\n\n // IF the settings are false, then pass is false\n if (XIVDBTooltips.getOption(option) === false) {\n return false;\n }\n\n // IF the attribute is not undefined\n // AND the attribute is false\n if (typeof $link.attr(attr) !== 'undefined' && ($link.attr(attr) == '0' || $link.attr(attr).toLowerCase() == 'false')) {\n return false;\n }\n }\n\n return true;\n }", "function returnFalse(){ var detectHREF = $(this).attr('href'); if(detectHREF.match(/.html/)){isOffline(); return false; } }", "function verifyLink(linkName: LinkType): LinkType {\r\n\treturn linkName;\r\n}", "function checkForValidUrl(tabId, changeInfo, tab) {\n// If the letter 'g' is found in the tab's URL...\n _.each(window.tobitabi_sites, function(selector, rege) {\n var re = new RegExp(rege);\n if (tab.url.match(re)) {\n // ... show the page action.\n chrome.pageAction.show(tabId);\n CUR_HOSTNAME = rege;\n chrome.storage.local.get(CUR_HOSTNAME, function(res) {\n TO_TOB[CUR_HOSTNAME] = res[CUR_HOSTNAME];\n });\n\n }\n });\n}", "function isExtensionInstalled() {\n // Get the article tag data set.\n let article = document.querySelector('#surveyArticle');\n let data = article.dataset;\n return data.browserExtensionVersion === currentBrowserExtensionVersionNumber;\n}", "async checkLink(link, statusCache=new Map()) {\n var normalizedLink = Paths.normalizePath(link.link, link.url)\n console.log(\"[fileindex] checkLink \" + link.url + \" -> \" +normalizedLink)\n var status = statusCache.get(normalizedLink)\n if (!status) {\n status = await this.validateLink(normalizedLink)\n statusCache.set(normalizedLink, status)\n }\n if (status == \"broken\") {\n console.warn(\"[fileindex ] broken link \" + link.url + \" -> \" + link.link)\n }\n await this.db.transaction(\"rw\", this.db.links, () => {\n this.db.links.where({url: link.url, link: link.link}).modify({status: status})\n })\n return status\n }", "function checkForSupportedURL(tabID, changeInfo, tab) {\n\n\tif ((typeof tab.url === 'string') && (tab.url.indexOf('https://www.twitch.tv') === 0)) {\n\n\t\tchrome.pageAction.show(tabID);\n\t}\n}", "function isForbiddenUrl(url) {\n return /^chrome:\\/\\/.*/.test(url)\n}", "function checkUrl(){\n\t\n\tvar task = getUrlVar('task');\n\tvar id = getUrlVar('id');\n\tvar radius_simplify = getUrlVar('rs');\n\t//if the id is a number\n\tif (!isNaN(id)){\t\t\n\t\t$('#tabs').tabs('select', 1);\n\t\tswitch(task){\n\t\t\tcase 'ego-centric': \t\n\t\t\t\tviewerControl.displayNetwork('CONTRIBUTOR', id, 0);\n\t\t\t\tbreak;\n\t\t\tcase 'event-centric':\n\t\t\t\tviewerControl.displayNetwork('EVENT', id, 0, radius_simplify) \n\t\t\t\tbreak;\t\t\t\t\n\t\t}\n\t}\n}", "function checkURL(url) {\n return url.match(/\\.(jpeg|jpg|gif|png)$/) != null;\n}", "function test(url) {\n // begin switch statement to elimintate exclusions\n switch (true) {\t\n // begin case statement to test for exclusions\n case links[i].host !== location.host:\n // console.log(\"Matched a url that is an external link\");\n totalLinksExternal = totalLinksExternal + 1\n totalLinksExcluded = totalLinksExcluded + 1\n linkInfoExternal = linkInfoExternal + '<span class=\"external\">' + totalLinksExternal.toString() + ') <strong>External</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoExcluded = linkInfoExcluded + '<span class=\"external\">' + totalLinksExcluded.toString() + ') <strong>External</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoTotal = linkInfoTotal + '<span class=\"external\" style=\"background-color:plum\">' + (i+1).toString() + ') <strong>External</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n break;\n case /layouts/gi.test(url):\n // console.log(\"Matched a url that contains 'layouts'\");\n totalLinksExcluded = totalLinksExcluded + 1\n linkInfoExcluded = linkInfoExcluded + '<span class=\"excluded\">' + totalLinksExcluded.toString() + ') <strong>Excluded</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoTotal = linkInfoTotal + '<span class=\"excluded\" style=\"background-color:yellow\">' + (i+1).toString() + ') <strong>Excluded</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n break;\n case /file/gi.test(url):\n // console.log(\"Matched a url that contains 'file'\");\n totalLinksExcluded = totalLinksExcluded + 1\n linkInfoExcluded = linkInfoExcluded + '<span class=\"excluded\">' + totalLinksExcluded.toString() + ') <strong>Excluded</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoTotal = linkInfoTotal + '<span class=\"excluded\" style=\"background-color:yellow\">' + (i+1).toString() + ') <strong>Excluded</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n break;\n default:\n // console.log(\"this link is okay to test\");\n // console.log(url);\n \n // the next line opens the link and gets the status of the http request. Comment out when testing or working on visual design\n var http = new XMLHttpRequest();\n http.open('HEAD', url, false);\n \n // begin try catch block to test for error on send\n try {\n http.send();\n var response = http.status;\n console.log(response);\n \n if (http.status == 200){\n // console.log(\"found a good link\");\n // console.log(response);\n totalLinksGood = totalLinksGood + 1\n linkInfoGood = linkInfoGood + '<span class=\"good\">' + totalLinksGood.toString() + ') <strong>Good</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoTotal = linkInfoTotal + '<span class=\"good\" style=\"background-color:LightGreen\">' + (i+1).toString() + ') <strong>Good</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n var linksTested = parseInt(linksTested);\n var linksTested = linksTested++;\n \n } else if (http.status == 404) {\n // console.log(\"found a broken link\");\n // console.log(response);\n totalLinksBad = totalLinksBad + 1\n linkInfoBad = linkInfoBad + '<span class=\"broken\">' + totalLinksBad.toString() + ') <strong>Broken</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoTotal = linkInfoTotal + '<span class=\"broken\" style=\"background-color:LightCoral\">' + (i+1).toString() + ') <strong>Broken</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n var linksTested = parseInt(linksTested);\n var linksTested = linksTested++;\n \n } else {\n \n // console.log(\"something else is happening here\");\n // console.log(response);\n linkInfoTotal = linkInfoTotal + '<span class=\"something else\" style=\"background-color:LightBlue\">' + (i+1).toString() + ') <strong>Something Else</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n var linksTested = parseInt(linksTested);\n var linksTested = linksTested++;\n \n // end if statement to test http status\n }\n \n } catch (e) {\n \n console.log(e);\n // end try catch block to test for error on send\n // linkInfoTotal = linkInfoTotal + '<span class=\"something else\">' + i.toString() + ') ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n // var linksTested = parseInt(linksTested);\n // var linksTested = linksTested++;\n \n // end try catch block to test for error on send\n }\n \n break;\n // end case statement to test for exclusions\n \n // end switch statement to elimintate exclusions\n }\n // end enclosing function to test url to see if it contains some restricted locations, then open up a http request to the page and see if the page exists\n }", "function checkLinks() {\n const disabled =\n getShexText(shex).length > API.limits.byTextCharacterLimit\n ? API.sources.byText\n : shex.activeSource === API.sources.byFile\n ? API.sources.byFile\n : false;\n\n setDisabledLinks(disabled);\n }", "function isRelative (linkData) {\n let routeIdentifier = _.get(linkData, 'routeIdentifier'),\n publicHandle = _.get(linkData, 'routeParams.publicHandle'),\n wid = _.get(linkData, 'routeParams.wid');\n\n return (routeIdentifier === 'workspace.open') && publicHandle && wid;\n}", "function checkForValidUrl(tabId, changeInfo, tab) { \n var url = tab.url;\n // Prevent twice loading, check SO thread: http://goo.gl/fF0iS\n if (url !== undefined && changeInfo.status == \"complete\") { \n if (in_array(tab.url, siteList, tab)) {\n injection(tabId); \n //console.log(\"CheatSheet for this URL are available in DB\");\n }\n }\n}", "function checkForValidUrl(tabId, changeInfo, tab) {\n// If the tabs url starts with \"http://specificsite.com\"...\nif (tab.url.indexOf(\"https://timetable.iit.artsci.utoronto.ca/\") == 0) {\n// ... show the page action.\nchrome.pageAction.show(tabId);\n}\n}", "function hrefCheck(currentLocation) {\r\n if (window.location.href.includes(currentLocation)) {\r\n console.log(\"Applying script for: \" + currentLocation);\r\n iCurrentHref = currentLocation;\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "isValidFeed(aLink, aPrincipal, aIsFeed) {\n if (!aLink || !aPrincipal)\n return false;\n\n var type = aLink.type.toLowerCase().replace(/^\\s+|\\s*(?:;.*)?$/g, \"\");\n if (!aIsFeed) {\n aIsFeed = (type == \"application/rss+xml\" ||\n type == \"application/atom+xml\");\n }\n\n if (aIsFeed) {\n try {\n let href = BrowserUtils.makeURI(aLink.href, aLink.ownerDocument.characterSet)\n BrowserUtils.urlSecurityCheck(href, aPrincipal,\n Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL);\n return type || \"application/rss+xml\";\n } catch (ex) {\n }\n }\n\n return null;\n }", "function returnFalse(){\n var detectHREF = $(this).attr('href');\n if(detectHREF.match(/.html/)){\n isOffline();\n return false;\n } \n }", "canReadlink() {\n if (this.#linkTarget)\n return true;\n if (!this.parent)\n return false;\n // cases where it cannot possibly succeed\n const ifmt = this.#type & IFMT;\n return !((ifmt !== UNKNOWN && ifmt !== IFLNK) ||\n this.#type & ENOREADLINK ||\n this.#type & ENOENT);\n }", "checkUrl(/* e */) {\n if (this.location.pathname === this.fragment) {\n return false\n }\n\n this.loadUrl()\n }", "function checkForValidUrl(tabId, changeInfo, tab) {\n // If we are inside of a question\n var url = tab.url;\n var proceed = !(typeof(url) === 'undefined');\n\n if (proceed && tab.url.match(QA_REGEX)){\n // ... show the page action.\n lastTabId = tabId;\n lastUrl = tab.url;\n chrome.pageAction.show(tabId);\n } else {\n lastUrl = null;\n }\n}", "function isExternalURLFunction(node) {\n\treturn node.type === 'func' && node.value === 'url' && Object(node.nodes).length && (/^(?!data:)/).test(node.nodes[1].value);\n}", "function isHideLink(anObject){\n try\n {\n var currentObject = anObject;\n return (currentObject.name.indexOf(\"noLink_\") != -1); //\tIf noLink_ exists in the name, return true.\n }\n catch(err)\n {\n console.log(\"Excception: \" + err);\n }\n}", "static _isFileURL(url) {\nreturn (url.substring(0, 5)) === \"file:\";\n}", "function isExternal(href) {\n try {\n return Boolean(url.parse(href).protocol);\n } catch(err) {\n return false;\n }\n}", "function checkUrl(url) {\n if ((url.match(DOC_REGEX) != null) &&\n (url.match(DOC_REGEX) != undefined) &&\n (url.match(DOC_REGEX)[0] == url)) {\n return true;\n }\n return false;\n}", "function checkLink(base_url, div_to_update, txt_link_url){\n\tvar b_valid = true;\n\t// Validate the link url\n\tif($(txt_link_url).value == '' || $(txt_link_url).value == 'http://'){\n\t\talert('You must enter a link to be validated.');\n\t\tb_valid = false;\n\t}\n\telse if(!isValidUrl($(txt_link_url).value)){\n\t\talert('You must enter a valid link.');\n\t\tb_valid = false;\n\t}\n\n\t// If everything is all good -> submit the link\n\tif(b_valid){\n\t\tpars = 'type=38&action=ajax_validate_link&txtStoryURL='+encodeURIComponent($(txt_link_url).value);\n\n\t\t// AJAX > Go get all comments associated to this story/link\n\t\tvar myAjax = new Ajax.Updater(\n\t\t\t\t\t\t div_to_update,\n\t\t\t\t\t\t base_url, {\n\t\t\t\t\t\t\tmethod: 'get',\n\t\t\t\t\t\t\tparameters: pars,\n\t\t\t\t\t\t\tonComplete:function(){\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t });\n\t}\n}", "function checkForValidUrl(tabId, changeInfo, tab) {\n // If the letter 'g' is found in the tab's URL...\n if (tab.url.indexOf('www.pivotaltracker.com/s/projects') > -1) {\n chrome.pageAction.show(tabId);\n //Default hide\n PVhidden = toggleStory(tab, PVhidden);\n }\n}", "function IsYouTube_fed(url) {\n\t\tvar YouTubeLink_regEx = /^(https?\\:)?(\\/\\/)?(www\\.)?(youtu\\.be\\/|youtube(\\-nocookie)?\\.([A-Za-z]{2,4}|[A-Za-z]{2,3}\\.[A-Za-z]{2})\\/)(watch|embed\\/|vi?\\/)?(\\?vi?\\=)?([^#\\&\\?\\/]{11}).*$/;\n\t\tif(YouTubeLink_regEx.test(url.toString()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t\t}\n\t}", "function checkForCorrectURLStructure(data) {\n\t\tvar urlCheck = data.url.split('/');\n\t\treturn Boolean(urlCheck[1] === 'c');\n\t}", "function checkForValidUrl(tabId, changeInfo, tab) {\n\tgetConfig(function (config) {\n\t\t// If the letter 'g' is found in the tab's URL...\n\t\tvar rtcUrl = config.rtcURL;\n\t\tvar regexp = 'http.*' + rtcUrl + '.*runSavedQuery.*';\n\t\tif (tab.url.match(regexp)) {\n\t\t\t// ... show the page action icon.\n\t\t\tchrome.pageAction.show(tabId);\n\t\t\tif (changeInfo.status === 'complete') {\n\t\t\t\tif (callbacks.length > 0) {\n\t\t\t\t\tvar index = callbacks.indexOf(tab.url);\n\t\t\t\t\tif (index > -1) {\n\t\t\t\t\t\texecuteScripts(config, chrome.tabs, tabId);\n\t\t\t\t\t\tcallbacks.splice(index, 1);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tregexp = /.*&buildVMS/i;\n\t\t\t\t\tif (tab.url.match(regexp)) {\n\t\t\t\t\t\tif (skipBuild === true) {\n\t\t\t\t\t\t\tskipBuild = false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\texecuteScripts(config, chrome.tabs, tabId);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (config.rrcFullscreenIndicator === true) {\n\t\t\tvar rrcUrl = rtcUrl.replace(/rtc/, 'rrc');\n\t\t\tregexp = 'http.*' + rrcUrl + '.*showArtifact.*';\n\t\t\tif (tab.url.match(regexp)) {\n\t\t\t\tchrome.pageAction.setIcon({tabId: tabId, path: chrome.extension.getURL('fullscreen.png')});\n\t\t\t\tchrome.pageAction.setTitle({tabId: tabId, title: 'Go FullScreen!'});\n\t\t\t\tchrome.pageAction.show(tabId);\n\t\t\t}\n\t\t}\n\t});\n}", "function isReviewPage() {\n return window.location.href.match(/^(http|https):\\/\\/www.stumbleupon.com\\/url/i);\n}", "function hasFileExt(url)\n{\n var filename = url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('?'));\n return filename.lastIndexOf('.') >= 0;\n}", "hasExtension(fileName) {\n return (new RegExp('(' + appConstants.actionPicture.extensions.join('|').replace(/\\./ig, '\\\\.') + ')$')).test(fileName) ||\n (new RegExp('(' + appConstants.actionPicture.extensions.join('|').replace(/\\./ig, '\\\\.') + ')$')).test(fileName.toLowerCase());\n }", "function suffixCheck () {\n const prohibitedTypes = [\n /\\.xml$/,\n /\\.pdf$/,\n ];\n const currentUrl = window.location.pathname;\n for (const type of prohibitedTypes) {\n if (type.test(currentUrl)) {\n return false;\n }\n }\n return true;\n}", "hasUrl(): boolean {\n return this.url != null;\n }", "function CButtonvue_type_script_lang_js_isLink(props) {\n return Boolean(props.href || props.to);\n}", "function isUrl(line) {\r\n\tif (line != null) {\r\n\t\tif (line.search('http')==0) return true;\r\n\t}\r\n\treturn false;\r\n}", "function url_exists(url)\n{\n var http = new XMLHttpRequest();\n http.open('HEAD', url, false);\n http.send();\n return http.status!=404;\n}", "hasExtension(extensionName) {\n return Boolean(this._extensionsUsed && this._extensionsUsed.indexOf(extensionName) > -1);\n }", "function doesURLContainMatch(url, word){\n if(url.contains(word)){\n return true;\n }\n}", "function checkURL(url) {\n return(url.match(/\\.(jpg)$/) != null);\n}", "function isNotQuiz() {\r\n var quiz = \"www1.spiegel.de\";\r\n var isQuiz = document.URL.indexOf(quiz) != -1;\r\n \r\n return (!(isQuiz));\r\n}", "function checkLinksParticipants(){\n if(linksLogos()!=undefined){\n if(linksLogos().length==1){\n if(linksLogos()[0].logoLink==\"\" && linksLogos()[0].logoTitle==\"\"){\n return false;\n } else {\n return true;\n }\n } else {\n return true;\n }\n \n }\n else{\n return false;\n }\n }", "function checkUrl(url)\n {\n //regular expression for URL\n var pattern = /^(http|https)?:\\/\\/[a-zA-Z0-9-\\.]+\\.[a-z]{2,4}/;\n\n if(pattern.test(url)){\n return true;\n } else {\n return false;\n }\n }", "function URLCheck(text) \n{\n var urlRegex =/(\\b(https?|ftp|file):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/ig;\n if(urlRegex.test(text))\n {\n \treturn true;\n }\n else\n {\n \treturn false;\n }\n}", "function doesStyleExist(aURL) {\n for (var url in elements.styles)\n {\n if (aURL.trim().indexOf(url) != -1) {\n return true;\n }\n }\n\n return false;\n}", "function urlExists(url) {\n var http = new XMLHttpRequest();\n http.open('HEAD', url, false);\n http.send();\n return http.status==200;\n}", "isExternalURL(url) {\n const parsed = parseURL(url);\n // A mismatched host is obviously external; also reject anything that\n // looks like it might be an attempt at a protocol relative URL\n // (i.e. two //, or something tricky like /\\) Also consider anything\n // with a /. or .. in it to be external\n return (\n parsed.host !== document.location.host ||\n new RegExp(`^[\\\\\\\\/.]{2,}`).test(parsed.pathname)\n );\n }", "function checkIfSpecialCase() {\n var vreturn = false;\n $.each( specialCases, function(index, spec){\n if(isFunction(spec.url)){\n if(spec.url()) {\n vreturn = spec;\n console.log(\"spec.url is \", spec);\n }\n return false; // break out of each loop\n } else if(window.location.host.search(spec.url) != -1){\n // We have a special case!\n vreturn = spec;\n return false; // break out of each loop\n }\n });\n return vreturn;\n }", "function hostIsApplicable(url) {\n var anchor = document.createElement('a');\n anchor.href = url;\n var pattern;\n for (var i = 0; i < APPLICABLE_HOSTS.length; i++) {\n pattern = new RegExp(APPLICABLE_HOSTS[i]);\n if (pattern.test(anchor.hostname)) {\n return true;\n }\n }\n return false;\n}", "menuContainsLink(menu, link)\n {\n for (let i in menu.items)\n {\n if (i === \"each\" || i === \"forEach\") continue;\n // noinspection JSUnfilteredForInLoop\n let itemParamObject = this.hash2Object(menu.items[i].link);\n let linkParamObject = this.hash2Object(link);\n let itemParamCount = 0;\n let matchCount = 0;\n // Parse through current item params\n for (let j in itemParamObject) {\n \tif (j === \"each\" || j === \"forEach\") continue;\n \titemParamCount++;\n \t// Parse through link params\n\t for (let k in linkParamObject) {\n\t if (k === \"each\" || k === \"forEach\") continue;\n // noinspection JSUnfilteredForInLoop\n\t if (j === k && itemParamObject[j] === linkParamObject[k]) {\n\t \tmatchCount++;\n\t }\n\t }\n }\n if (itemParamCount === matchCount) {\n // noinspection JSUnfilteredForInLoop\n return menu.items[i];\n }\n }\n \n return undefined;\n }" ]
[ "0.77332306", "0.693763", "0.6699203", "0.6681272", "0.6667972", "0.6581005", "0.6490158", "0.6436702", "0.63746285", "0.637371", "0.62824374", "0.621289", "0.61907035", "0.615818", "0.60663325", "0.6042344", "0.5918723", "0.5915121", "0.5910403", "0.5879281", "0.5871354", "0.5835921", "0.5835148", "0.5827179", "0.582388", "0.5818931", "0.58183146", "0.5795734", "0.57871884", "0.5774217", "0.57603", "0.5759443", "0.5749589", "0.57407254", "0.57383436", "0.57207114", "0.57158047", "0.5714831", "0.5710604", "0.568449", "0.5672296", "0.5668137", "0.56670666", "0.56654704", "0.56647974", "0.5661367", "0.56607276", "0.56339395", "0.56301564", "0.5619222", "0.5616783", "0.55996186", "0.5595633", "0.55864286", "0.55841845", "0.5580598", "0.556834", "0.55620325", "0.5555568", "0.55508715", "0.5550058", "0.55445427", "0.55443704", "0.5544299", "0.55280775", "0.55227035", "0.5518111", "0.5515877", "0.55114746", "0.5510474", "0.5492174", "0.54862225", "0.54807293", "0.54781663", "0.5456914", "0.54526156", "0.5432816", "0.5429283", "0.54036826", "0.54027796", "0.5379992", "0.5377628", "0.53695166", "0.5357436", "0.5352334", "0.5351879", "0.5348168", "0.5347812", "0.53440857", "0.53345495", "0.53060216", "0.53040534", "0.5302714", "0.5296519", "0.5293141", "0.5287511", "0.5286364", "0.5272188", "0.52713776", "0.526828" ]
0.77588123
0
Removes all url query parameters from the given link
static _removeQueryParams(link) { const regexResult = link.match(/(.*\.[a-zA-Z]{3,4})($|\?|#)+/); if (regexResult !== null && regexResult.length > 1) { let matchWithLink = regexResult[1]; if (/[\\?#&]+/.test(matchWithLink)) { throw Error('Link does not match'); } else { return matchWithLink; } } else { throw Error('Link does not match'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeAllURLQueryString() {\n delete this.urlObj.search;\n }", "function removeQS(url, parameter) {\n //prefer to use l.search if you have a location/link object\n var urlparts = url.split('?'); \n if (urlparts.length >= 2) {\n\n var prefix = encodeURIComponent(parameter)+'=';\n var pars = urlparts[1].split(/[&;]/g);\n //reverse iteration as may be destructive\n for (var i = pars.length; i-- > 0;) { \n //idiom for string.startsWith\n if (pars[i].lastIndexOf(prefix, 0) !== -1) { \n pars.splice(i, 1);\n }\n }\n url = urlparts[0]+'?'+pars.join('&');\n return url;\n } else {\n return url;\n }\n}", "removeQuery(url) {\n return url ? url.replace(/\\?.*$/, '') : '';\n }", "function clearUrlQuery() {\n if (window.location.search && window.history && window.history.pushState) {\n window.history.pushState({}, document.title, window.location.pathname);\n }\n}", "deleteURLQueryString(key) {\n const searchParams = new URL.URLSearchParams(this.urlObj.search);\n searchParams.delete(key);\n this.urlObj.search = searchParams.toString();\n }", "function stripInternalParams(url) {\n url.search = url.search.replace(/([?&])(_pjax|_)=[^&]*/g, '')\n return url.href.replace(/\\?($|#)/, '$1')\n }", "function remove_query_arg(key, sourceURL) {\r\n\r\n var rtn = sourceURL.split(\"?\")[0],\r\n param,\r\n params_arr = [],\r\n queryString = (sourceURL.indexOf(\"?\") !== -1) ? sourceURL.split(\"?\")[1] : \"\";\r\n\r\n if (queryString !== \"\") {\r\n params_arr = queryString.split(\"&\");\r\n for (var i = params_arr.length - 1; i >= 0; i -= 1) {\r\n param = params_arr[i].split(\"=\")[0];\r\n if (param === key) {\r\n params_arr.splice(i, 1);\r\n }\r\n }\r\n\r\n rtn = rtn + \"?\" + params_arr.join(\"&\");\r\n\r\n }\r\n\r\n if (rtn.split(\"?\")[1] == \"\") {\r\n rtn = rtn.split(\"?\")[0];\r\n }\r\n\r\n return rtn;\r\n }", "function stripInternalParams(url) {\n url.search = url.search.replace(/([?&])(_pjax|_)=[^&]*/g, '').replace(/^&/, '');\n return url.href.replace(/\\?($|#)/, '$1');\n }", "function removeURLParameter(url, parameter) { //prefer to use l.search if you have a location/link object\n var urlparts = url.split('?');\n if (urlparts.length >= 2) {\n\n var prefix = encodeURIComponent(parameter) + '=';\n var pars = urlparts[1].split(/[&;]/g);\n\n //reverse iteration as may be destructive\n for (var i = pars.length; i-- > 0; ) {\n //idiom for string.startsWith\n if (pars[i].lastIndexOf(prefix, 0) !== -1) {\n pars.splice(i, 1);\n }\n }\n url = urlparts[0] + (pars.length > 0 ? '?' + pars.join('&') : \"\");\n return url;\n } else {\n return url;\n }\n}", "function stripInternalParams(url) {\n url.search = url.search.replace(/([?&])(_pjax|_)=[^&]*/g, '')\n return url.href.replace(/\\?($|#)/, '$1')\n}", "function stripInternalParams(url) {\n url.search = url.search.replace(/([?&])(_pjax|_)=[^&]*/g, '')\n return url.href.replace(/\\?($|#)/, '$1')\n}", "function removeParamsFromUrl(paramKey) {\n\n\n var nextUrl = window.location.origin + window.location.pathname;\n\n var params = getUrlVars(); //Get all the query params as an ARRAY\n params[paramKey] = '';\n var size = Object.keys(params).length;\n var i = 0;\n if (size == 0) {\n window.location.href = window.location.origin + window.location.pathname;\n } else {\n nextUrl += '?'; // ? for started to attach the query string to url\n\n // This is for search,selection by any one of ways => BRAND or SEARCH Keyword\n if (paramKey == 'search' && params['brand'] != undefined) {\n params['brand'] = '';\n }\n if (paramKey == 'brand' && params['search'] != undefined) {\n params['search'] = '';\n }\n\n // Attach the query params to the nextURL \n $.each(params, function(key, value) {\n if (value != '') {\n if (i == size) {\n nextUrl += key + '=' + value;\n } else {\n nextUrl += key + '=' + value + '&';\n }\n }\n\n i++;\n });\n\n window.location.href = nextUrl;\n }\n}", "function removeQueryParameter(_url, parameter) {\n const parsed = url.parse(_url, true, true)\n\n if (parameter in parsed.query) {\n delete parsed.search\n delete parsed.query[parameter]\n }\n\n return url.format(parsed)\n}", "function stripUrlParams(url, paramsToStrip){\n var urlSplit = url.match(/^([\\w\\.]*\\??)([\\w\\W]*)$/);\n var urlHead = urlSplit[1];\n var queries = urlSplit[2];\n if (queries === \"\") return urlHead;\n if (typeof paramsToStrip === \"undefined\") {\n queries = queries.split(\"&\").uniqueQuery().join(\"&\");\n } else {\n queries = queries.split(\"&\").uniqueQuery(paramsToStrip).join(\"&\");\n }\n return urlHead + queries;\n}", "function pff_removeURLParams( urlTmp ){\n\tvar firstQuesMark = urlTmp.indexOf('?');\n\t// On essai de retirer tous les param�tres URL \n\tif(firstQuesMark != -1){\n var tmp = urlTmp.substring(0,firstQuesMark );\n return tmp;\n\t}\n\treturn urlTmp;\n}", "function removeURLParameter(url, parameter) {\n\t //prefer to use l.search if you have a location/link object\n\t var urlparts= url.split('?'); \n\t if (urlparts.length>=2) {\n\n\t var prefix= encodeURIComponent(parameter)+'=';\n\t var pars= urlparts[1].split(/[&;]/g);\n\n\t //reverse iteration as may be destructive\n\t for (var i= pars.length; i-- > 0;) { \n\t //idiom for string.startsWith\n\t if (pars[i].lastIndexOf(prefix, 0) !== -1) { \n\t pars.splice(i, 1);\n\t }\n\t }\n\n\t url= urlparts[0] + (pars.length > 0 ? '?' + pars.join('&') : \"\");\n\t return url;\n\t } else {\n\t return url;\n\t }\n\t}", "function stripUrlParams(url, paramsToStrip){\n\n var arr = url.split(\"?\");\n\n if (arr[1]) {\n var params = arr[1].split(\"&\");\n\n //if there was params to remove then remove them\n if (paramsToStrip) {\n var paramsToStripObj = {};\n paramsToStrip.forEach(function (item) {\n paramsToStripObj[item] = true;\n });\n var filteredParamsOnce = params.filter(function (item) {\n if (!paramsToStripObj[item[0]]) {\n return item;\n }\n });\n params = filteredParamsOnce;\n }\n\n //now loop through and remove the duplicates\n var seen = {};\n var remDups = params.filter(function (item,i) {\n if (!seen[item[0]]) {\n seen[item[0]] = true;\n return item;\n }\n }).join(\"&\");\n\n return arr[0] + \"?\" + remDups;\n }\n\n return url;\n}", "function maskQueryStringInURL(url) {\n url = url || '';\n return url.replace(/\\?.*?$/, '');\n}", "function clearQueryString() { // jshint ignore:line\n const newurl = window.location.protocol + \"//\" + window.location.host + window.location.pathname;\n window.history.pushState && window.history.pushState({\n path: newurl\n }, \"\", newurl);\n }", "function removeParam(key, sourceURL) {\n let rtn = sourceURL.split(\"?\")[0],\n param,\n params_arr = [],\n queryString = (sourceURL.indexOf(\"?\") !== -1) ? sourceURL.split(\"?\")[1] : \"\";\n if (queryString !== \"\") {\n params_arr = queryString.split(\"&\");\n for (var i = params_arr.length - 1; i >= 0; i -= 1) {\n param = params_arr[i].split(\"=\")[0];\n if (param === key) {\n params_arr.splice(i, 1);\n }\n }\n rtn = rtn + \"?\" + params_arr.join(\"&\");\n }\n return rtn;\n}", "function cleanLink(link) {\n // if it's a rel iq link\n if(link.indexOf('relate') > 0) {\n link = link.replace(/^(.*?)%2F%2F/,'');\n link = link.replace(/&.*$/,'');\n // now clean up the encoded URL pieces and remove junk at the end\n link = 'https://' + decodeURIComponent(link.replace(/\\+/g, '%20'));\n }\n // take off any UTM codes at the end\n if(link.indexOf('?utm') > 0) {\n link = link.substring(0, link.indexOf('?utm'));\n }\n return link;\n}", "function stripUrlParams(url, paramsToStrip) {\n var params = {};\n paramsToStrip = paramsToStrip || [];\n\n return url.replace(/((\\?)|&)([^=])+=([^&]+)/g, function (match, qe, q, name, value) {\n if (params[name] || paramsToStrip.indexOf(name) >= 0) {\n return q || '';\n }\n\n params[name] = value;\n return match;\n });\n}", "function removeQueryStringParm(parm, saveStateInd) {\r\n\r\n var parms = [];\r\n if (typeof parm === \"string\") {\r\n parms.push(parm);\r\n } else {\r\n parms = parm;\r\n }\r\n var qs = convertQueryStringToObj();\r\n $.each(parms, function(i, item) {\r\n delete qs[item];\r\n });\r\n \r\n var newqs = convertObjToQueryString(qs);\r\n if (saveStateInd) {\r\n var currURL = window.location.protocol + \"//\" + window.location.host + window.location.pathname + newqs;\r\n if (history.pushState) {\r\n history.pushState({}, \"ignored title\", currURL); \r\n }\r\n }\r\n\r\n return ;\r\n}", "function removeValueQuery(key, value) {\n\tarray = urlParams.getAll(key).filter((el) => el != value);\n\turlParams.delete(key);\n\tarray.forEach((el) => {\n\t\turlParams.append(key, el.replaceAll(' ', '-'));\n\t});\n}", "function noSWParam(url) {\n const url2 = new URL(url);\n if (url2.searchParams.has(CACHE_SEARCH_PARAM)) {\n url2.searchParams.delete(CACHE_SEARCH_PARAM);\n return url2.href;\n }\n return url;\n}", "function removeFromLink(str){\n var presentLink = $( \"#your_link\" ).val();\n if(presentLink == link){//original link\n } \n // has '\\\\w?' for TID removing\n var regExp1 = new RegExp('[\\\\?|\\\\&]'+str+'\\\\w?');\n var regExp2 = new RegExp('[\\\\?]'+str+'\\\\w?\\&?');\n var regExp3 = new RegExp('[\\\\&]'+str+'\\\\w?');\n var mutchSumm=presentLink.match('&');\n// console.log(mutchSumm);\n if(mutchSumm){//if more than 1 param\n var newLink = '';\n if(presentLink.match(regExp3)){\n newLink = presentLink.replace(regExp3, ''); \n }\n if(presentLink.match(regExp2)){\n newLink = presentLink.replace(regExp2, '?');\n }\n// console.log(newLink);\n $( \"#your_link\" ).val(newLink);\n \n }else{\n var newLink = presentLink.replace(regExp1, '');\n $( \"#your_link\" ).val(newLink);\n// console.log(newLink);\n// console.log(regExp1);\n }\n return newLink;\n \n}", "url({ url }) {\n const removeKeysStartingWith = [\"utm_\", \"uta_\"]; // Remove all query parameters beginning with these strings\n const removeKeys = [\"fblid\", \"gclid\"]; // Remove all query parameters matching these keys\n\n const search = url.search\n .split(\"&\")\n .map((parameter) => parameter.split(\"=\"))\n .filter(([key]) => !removeKeysStartingWith.some((startingWith) => key.startsWith(startingWith)))\n .filter(([key]) => !removeKeys.some((removeKey) => key === removeKey));\n\n return {\n ...url,\n search: search.map((parameter) => parameter.join(\"=\")).join(\"&\"),\n };\n }", "removeParamFromURL(event) {\n if (this.props.showArticleFinder) { return; }\n const viewer = document.getElementsByClassName('article-viewer')[0];\n if (!viewer || event) {\n if (window.location.search) {\n window.history.replaceState(null, null, window.location.pathname);\n }\n }\n }", "function remove_param(name) {\n var params = get_params();\n var index = params.search('&' + name + '=');\n if (index === -1) {\n return;\n }\n var start = index + ('&' + name + '=').length;\n var end_index = params.substr(start).search('&');\n if (end_index < 0) {\n params = params.substr(0, index);\n } else {\n params = params.substr(0, index) + params.substr(start + end_index);\n }\n set_cookie('params', params);\n}", "function wipeUrlProps(options) {\n\t for (var i = 0, l = urlProps.length; i < l; ++i) {\n\t options[urlProps[i]] = null;\n\t }\n\t}", "function stripGatewayAuthenticationParameter (aUrl) {\n if (aUrl.query && aUrl.query.useGateway) {\n delete aUrl.query.useGateway\n }\n if (aUrl.query.nextUrl) {\n var theNextUrl = decodeURIComponent(aUrl.query.nextUrl)\n aUrl.query.nextUrl = decodeURIComponent(theNextUrl)\n }\n var theUrl = url.format(aUrl)\n\n return theUrl\n}", "function removeParamInUrl(url, param){\n var indexOfParam = url.indexOf(\"?\" + param);\n indexOfParam = indexOfParam == -1? url.indexOf(\"&\" + param): indexOfParam;\n var indexOfAndSign = url.indexOf(\"&\", indexOfParam + 1);\n var urlBeforeParam = url.substr(0, indexOfParam);\n var urlAfterParamValue = indexOfAndSign == -1? \"\": url.substr(indexOfAndSign);\n return urlBeforeParam + urlAfterParamValue;\n}", "function cleanLink(a) {\n // remove all attributes except for href,\n // target (to support \"Open each selected result in a new browser window\"),\n // class, style and ARIA attributes\n for (let i = a.attributes.length - 1; i >= 0; --i) {\n const attr = a.attributes[i];\n if (attr.name !== 'href' && attr.name !== 'target' &&\n attr.name !== 'class' && attr.name !== 'style' &&\n !attr.name.startsWith('aria-')) {\n a.removeAttribute(attr.name);\n }\n }\n a.rel = \"noreferrer noopener\";\n\n // block event listeners on the link\n a.addEventListener(\"click\", function (e) { e.stopImmediatePropagation(); }, true);\n a.addEventListener(\"mousedown\", function (e) { e.stopImmediatePropagation(); }, true);\n}", "clearQueryParams() {\n this.queryParams = {};\n }", "clearQueryString () {\n window.history.replaceState({}, null, this._getPathFromUrl())\n }", "function removeParam() {\n window.history.pushState({}, document.title, \"/trade\");\n }", "function delete2Params(param1, param2) {\n var searchParams = new URLSearchParams(url.search.slice(1))\n\n //delete the param\n searchParams.delete(param1)\n searchParams.delete(param2)\n\n //load up new url\n var newUrl = \"?\" + searchParams.toString()\n toNewURL(newUrl)\n }", "function stripUrl(url) {\n\t\"use strict\";\n\tif (url.indexOf('?') !== -1 || url.indexOf('//') !== -1 || url.indexOf(';') !== -1) {\n\t\t// remove parameters\n\t\tif (url.indexOf('?') !== -1) {\n\t\t\turl = url.split('?')[0];\n\t\t}\n\t\tif (url.indexOf(';') !== -1) {\n\t\t\turl = url.split(';')[0];\n\t\t}\n\t\t// remove protocol & host (server) name\n\t\tif (url.indexOf('//') !== -1) {\n\t\t\turl = url.replace(location.protocol + '//' + location.host, '').trim();\n\t\t}\n\t}\n\treturn url;\n}", "function searchParamsOrEmpty(url) {\r\n if (!(url === null || url === void 0 ? void 0 : url.includes('?'))) {\r\n return {};\r\n }\r\n const [_, ...rest] = url.split('?');\r\n return (0,_firebase_util__WEBPACK_IMPORTED_MODULE_1__.querystringDecode)(rest.join('?'));\r\n}", "function trimReferrer(args) {\n var referrerInput = args.formElement.querySelector(\"#referrer\");\n var withoutQueryParams = referrerInput.value.split(\"?\")[0];\n referrerInput.value = withoutQueryParams;\n}", "function removePath(url) {\r\n var arr = url.split('?');\r\n arr.pop();\r\n return( arr.join('/') );\r\n}", "function fixURLs(){\n for (let link of document.links) {\n var urlParams;\n\n // Sometimes \"q\" will be the first parameter\n if (link.href.includes(\"?q\")) {\n urlParams = new URLSearchParams(link.href);\n console.log(urlParams.get(\"https://www.youtube.com/redirect?q\"));\n var pURL = urlParams.get(\"https://www.youtube.com/redirect?q\");\n link.href = pURL;\n link.innerText = pURL;\n };\n\n // Other times it will appear later in the URL\n if (link.href.includes(\"&q\")) {\n urlParams = new URLSearchParams(link.href);\n console.log(urlParams.get(\"q\"));\n pURL = urlParams.get(\"q\");\n link.href = pURL;\n link.innerText = pURL;\n };\n\n // Some YouTube URLs may also have truncated URLs. This fixes that\n if (link.innerText.includes(\"...\") && !link.innerText.includes(\" \")){\n link.innerText = link.href;\n };\n };\n }", "function removeSearchFilter(link) {\n link = jQuery(link);\n var form = link.parents(\"form\");\n link.parent(\".search_filter\").remove();\n\n form[0].onsubmit();\n}", "function removeParam(url, attr) { // Wrapper function (has verb/noun naming)\n return paramRemove(url, attr);\n}", "function removeSearchFilter(link) {\n link = jQuery(link);\n link.parent().parent(\"li\").remove();\n submitSearchFilterForm();\n}", "function putSearchQuery(link) {\n\t// Clear previous search pattern from link's address\n\tvar cleanLink = link.href.replace(/\\?.*/, '');\n\n\t// Insert new string query link's address\n\tlink.href = cleanLink + '?' + filterQuery(document.getElementById(\"searchBar\").value);\n}", "function stripUrlQueryAndFragment(urlPath) {\n\t // eslint-disable-next-line no-useless-escape\n\t return urlPath.split(/[\\?#]/, 1)[0];\n\t}", "function replaceParams() {\n var href = $(this).attr(\"href\") || $(this).serialize()\n href = PlaceGuide.cleanParamString(href)\n var state = href.match(/[\\?\\&]/) ? $.deparam.querystring(href) : {}\n $.bbq.pushState(state, PlaceGuide.REPLACE_EXISTING)\n return false\n }", "function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n }", "function removeFilter(searchUri, key) {\n var uri = '?tags=';\n var filters = searchUri.replace(uri,\"\").split('+');\n var filterCounter = 0;\n\n filters.forEach(function(entry) {\n if(entry != key){\n if(!endsWith(uri,'=')){uri = uri + '+'}\n uri = uri + entry;\n filterCounter++;\n }\n });\n\n return filterCounter > 0 ? uri : '';\n}", "function truncUrlFromParameter(page,param) {\r\n if (page.indexOf(\"?\"+param+\"=\") > 0) {\r\n page=page.substring(0,page.indexOf(\"?\"+param+\"=\"));\r\n } else if (page.indexOf(\"&\"+param+\"=\") > 0) {\r\n page=page.substring(0,page.indexOf(\"&\"+param+\"=\"));\r\n }\r\n return page;\r\n}", "function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}", "function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}", "function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}", "function removeUrlAnchor(url) {\n return url.replace(/#.+/, \"\");\n}", "function stripPjaxParam(url) {\n return url\n .replace(/\\?_pjax=[^&]+&?/, '?')\n .replace(/_pjax=[^&]+&?/, '')\n .replace(/[\\?&]$/, '')\n}", "function stripPjaxParam(url) {\n return url\n .replace(/\\?_pjax=[^&]+&?/, '?')\n .replace(/_pjax=[^&]+&?/, '')\n .replace(/[\\?&]$/, '')\n}", "function stripPjaxParam(url) {\n return url\n .replace(/\\?_pjax=[^&]+&?/, '?')\n .replace(/_pjax=[^&]+&?/, '')\n .replace(/[\\?&]$/, '')\n}", "function stripPjaxParam(url) {\n return url\n .replace(/\\?_pjax=[^&]+&?/, '?')\n .replace(/_pjax=[^&]+&?/, '')\n .replace(/[\\?&]$/, '')\n}", "function stripPjaxParam(url) {\n return url\n .replace(/\\?_pjax=[^&]+&?/, '?')\n .replace(/_pjax=[^&]+&?/, '')\n .replace(/[\\?&]$/, '')\n}", "function stripPjaxParam(url) {\n return url\n .replace(/\\?_pjax=[^&]+&?/, '?')\n .replace(/_pjax=[^&]+&?/, '')\n .replace(/[\\?&]$/, '')\n}", "function d(e){return e.search=e.search.replace(/([?&])(_pjax|_)=[^&]*/g,\"\").replace(/^&/,\"\"),e.href.replace(/\\?($|#)/,\"$1\")}", "function stripHash(href) {\n return href.replace(/#.*/, '');\n }", "function stripHash(href) {\n return href.replace(/#.*/, '');\n }", "function stripRequest(request) {\n const url = new URL(request.url);\n if (url.hash || url.search) {\n url.hash = '';\n url.search = '';\n return new Request(url.toString())\n } else {\n return request\n }\n}", "function urlFix(url){\r\n var _url = url;\r\n\r\n //delete params\r\n _url = url.replace(delParamReg, '');\r\n\r\n //overwrite and add params\r\n _url = _url.replace(overwriteParamReg, '').replace(/&$/, '');\r\n _url += '&' + addParams.join('&') + '&urlfixed=1';\r\n\r\n return _url;\r\n}", "function updateQuery() {\n var newUrl = window.location.href;\n // clean out valueless parameters to simplify ensuing matching\n newUrl = newUrl.replace(/(.*[?&])param1(&(.*))?$/, \"$1$3\");\n if (param1 !== default1) {\n if (newUrl.match(/[?&]param1=/)) {\n newUrl = newUrl.replace(/(.*[?&]param1=)[^&]*(.*)/, '$1' + param1 + '$2');\n } else if (newUrl.indexOf('?') > 0) {\n newUrl = newUrl + '&param1=' + param1;\n } else {\n newUrl = newUrl + '?param1=' + param1;\n }\n } else {\n newUrl = newUrl.replace(/(.*[?&])param1=[^&]*&?(.*)/, '$1$2');\n }\n\n // tidy up\n if (newUrl.match(/[?&]$/)) {\n newUrl = newUrl.slice(0, -1);\n } \n window.history.pushState('', '', newUrl);\n}", "function removeHash(url) {\n var link = url;\n if (!url.href) {\n link = document.createElement('A');\n link.href = url;\n }\n return link.href.replace(link.hash, '');\n}", "function strip(url) {\n return url.replace(/(\\?|&)?forcedownload=\\d/g, \"\");\n }", "function removeParamFromLocationHashParams(param) {\n const params = getLocationHashParams();\n delete params[param];\n setLocationHashParams(params);\n}", "function urlWithoutEmbed() {\n if (window.location.href.includes(\"?embed=true&\")) {\n return window.location.href.replace(\"embed=true&\", \"\");\n } else if (window.location.href.includes(\"?embed=true\")) {\n return window.location.href.replace(\"?embed=true\", \"\");\n }\n if (window.location.href.includes(\"&embed=true\")) {\n return window.location.href.replace(\"&embed=true\", \"\");\n }\n return window.location.href\n }", "function cleanLink(link) {\n if(link===undefined) return '';\n\n if(link.indexOf('mailto:') > -1 || \n link.indexOf('tel:') > -1 ||\n link.indexOf('javascript:') > -1 ||\n link.indexOf('file:') > -1 ||\n link.indexOf('data:') > -1) {\n link = ''\n return link;\n }\n return link;\n}", "function set_url_params(query, init_query) {\n var base_url = script_vars.current_url;\n var base_url_depaged = script_vars.current_url_depaged;\n var url = '';\n\n Object.keys(query).forEach(function(key) {\n console.log(query[key])\n // Go through each query key and set/delete url param\n if (typeof query[key] != 'undefined') {\n if(url) {\n url += '&';\n }\n url+= key + '=' + query[key];\n }\n })\n\n if(url) {\n url = '?' + url;\n }\n\n // If query has changed navigate to depaged base url (reset the page)\n if (query !== init_query) {\n // TODO - determine whether we need to detect page has not changed\n base_url = base_url_depaged;\n }\n\n window.location = base_url + url;\n }", "function remove_hash_from_url() {\n var uri = window.location.toString();\n\n if (uri.indexOf(\"#\") > 0) {\n var clean_uri = uri.substring(0, uri.indexOf(\"#\"));\n\n window.history.replaceState({}, document.title, clean_uri);\n }\n}", "function relay_parameters () {\n\n parameters = getURLParameters();\n\n $('a[href]:not(a[href^=\"javascript\"]):not(a[href^=\"mailto\"])').each( function () {\n\n for (var name in parameters) {\n var hash = $(this).attr('href').split('#')[1] ? ( '#' + $(this).attr('href').split('#')[1] ) : '';\n $(this).attr('href', updateURLParameter( $(this).attr('href').split('#')[0], name, parameters[name] ) + hash );\n\n }\n });\n\n}", "function updateURLWithParams(paramsToUpdate, doReplace) {\n const url = new URL(window.location);\n for (const [param, val] of Object.entries(paramsToUpdate)) {\n if (val != undefined && (!val.trim || val.trim() !== \"\")) {\n url.searchParams.set(param, val);\n }\n else {\n url.searchParams.delete(param);\n }\n }\n updateURLTo(url, doReplace);\n}", "function removeHash () { \n history.pushState(\"\", document.title, window.location.pathname + window.location.search);\n}", "function clearDynamoArtifacts(uri) {\n var url = uri.split(\"?\");\n var params = [];\n if (url.length > 1) {\n var preparams = url[1].split(\"&\");\n url = url[0];\n params = preparams.reduce(function(p, n) {\n var param = n.split(\"=\");\n if (param[0] != \"_DARGS\") {\n p.push(param[0] + \"=\" + param[1]);\n }\n return p;\n }, params)\n }\n if (params.length > 0) {\n url += \"?\" + params.join(\"&\");\n }\n return url;\n }", "function removeUrlAnchor(url){\n \n let result = '';\n //iterate over the input url pushing each character to the result as long as the current index is not '#'\n for (let i = 0; i < url.length; i++) {\n if (url[i] === '#') {\n return result;\n }\n result+= url[i];\n }\n return result;\n}", "function cleanUpLink(link) {\n return link.replace('http:', 'https:');\n}", "function removeUrlAnchor(url){\n if (url.includes('#')) {\n let place = url.indexOf('#');\n return url.slice(0, place);\n } else {\n return url \n }\n}", "function delete_param(category, value){\n let params = deserialize_params(); //invokes the deserialize function again to get params because objects can't be passed to this via HTML\n let newparams = params[category]; //look at only array of params of same type (q, a, or n)\n newparams.splice(value,1); //remove param to be deleted\n params[category] = newparams;\n serialize_params(params); //serialize params with changes\n}", "function reset(){\n\t/* MAKE URL */\n\tselected.clear();\n\twindow.location.href = makeQueryString();\n}", "function updateURL () {\n var newSearch = \"?\" + Object.keys(parameters).filter(function (key) {\n return Boolean(parameters[key])\n }).map(function (key) {\n return encodeURIComponent(key) + \"=\" + encodeURIComponent(parameters[key])\n }).join(\"&\");\n history.replaceState(null, null, newSearch)\n }", "function purify(url)\n {\n var targetPattern;\n\n if (configDiscardHashTag)\n {\n targetPattern = new RegExp('#.*');\n return url.replace(targetPattern, '');\n }\n return url;\n }", "function cleanHash(hash) {\n var r = new RegExp('.*:')\n var r2 = new RegExp('&.*')\n return hash.replace(r, '').replace(r2, '')\n}", "function get_querystring( url ) {\n return url.replace( /(?:^[^?#]*\\?([^#]*).*$)?.*/, '$1' );\n }", "function removeProtocol(href) {\n return href.replace(/.*?:\\/\\//g, \"\");\n }", "function removeProtocol(href) {\n return href.replace(/.*?:\\/\\//g, \"\");\n }", "function unloadParams() {\r\n try {\r\n var cur_params = window.location.search.replace(/%20/g, \" \").split(\"?\").join(\"\").split(\",\");\r\n var cclParams = \"^MINE^\";\r\n \t// Get Application and Personnel details\r\n \t\tAjaxHandler.ajax_request({\r\n\t\t\t\trequest : {\r\n\t\t\t\t\ttype : \"XMLCCLREQUEST\",\r\n\t\t\t\t\ttarget : \"inn_mp_get_app_prsnl\",\r\n\t\t\t\t\tparameters : cclParams,\r\n\t\t\t\t\tsynchronous: true\r\n\t\t\t\t},\r\n\t\t\t\tresponse : {\r\n\t\t\t\t\ttype : \"JSON\",\r\n\t\t\t\t\ttarget : function(scriptResponse){\r\n\t\t\t\t\t\tvar recordData = scriptResponse.response.RECORD_DATA;\r\n\t\t\t\t\t\t// set criterion values if empty/not specified\r\n\t\t\t\t\t\tif(criterion.application_id == 0){\t\t\r\n\t\t\t\t \tcriterion.application_id = recordData.APPLICATION_NBR;\r\n\t\t\t\t }\r\n\t\t\t\t if(criterion.personnel_id == 0){\t\t\r\n\t\t\t\t \tcriterion.personnel_id = recordData.PERSONNEL_ID;\r\n\t\t\t\t }\r\n\t\t\t\t if(criterion.position_cd == 0){\t\t\t\t\t \t\r\n\t\t\t\t \tcriterion.position_cd = recordData.PERSONNEL_POSITION_CD;\r\n\t\t\t\t }\r\n \t\t\t\t// set criterion values based on parameters\r\n\t\t\t\t\t\tsetCriterion(cur_params);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n } catch (e) {\r\n errmsg(e.message, \"unloadParams()\");\r\n }\r\n }", "clearInitialSearch() {\n const params = this.params();\n delete params.q;\n\n m.route(app.route(this.searchRoute, params));\n }", "function get_all_url_params(exclude_params) {\n var params = {};\n\n if (location.search) {\n var parts = location.search.substring(1).split('&');\n\n for (var i = 0; i < parts.length; i++) {\n var nv = parts[i].split('=');\n if (!nv[0] || exclude_params.includes(nv[0])) continue;\n params[nv[0]] = nv[1] || true;\n }\n }\n\n return params;\n }", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n}", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n}", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n}", "get queryString(){\n\t\tconst qm = this._href.lastIndexOf('?');\n\t\tif(qm < 0){\n\t\t\treturn '';\n\t\t}\n\t\treturn this._href.substring(qm);\n\t}", "function removeIDfromParamList(id, paramName){\n var searchParams = new URLSearchParams(url.search.slice(1))\n var paramValue = searchParams.get(paramName)\n var arrayOfIDs = JSON.parse(paramValue)\n var index = arrayOfIDs.indexOf(id)\n arrayOfIDs.splice(index, 1)\n \n if(arrayOfIDs.length != 0){\n setOrAppendParam(paramName, JSON.stringify(arrayOfIDs))\n }\n else deleteParam(paramName)\n }", "function updateURL() {\n var filters = window.getPostFilterValues();\n var params = '';\n for(let key in filters){\n var val = filters[key];\n if (typeof val === 'object') {\n params += key + '=' + val.join(',') + \"&\";\n }else{\n params += key + '=' + val + \"&\";\n }\n }\n params = params.length > 0 ? params.substr(0, params.length - 1) : params;\n var newUrl = window.location.href;\n newUrl = newUrl.split('?')[0] + ('?' + params);\n window.history.pushState(null, null, newUrl);\n }", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n }" ]
[ "0.75693554", "0.71417236", "0.7094664", "0.7046632", "0.701989", "0.69929963", "0.6969232", "0.69487154", "0.6945759", "0.6942361", "0.6942361", "0.6907091", "0.68087864", "0.6751832", "0.6737145", "0.67225957", "0.6665413", "0.6604238", "0.6602128", "0.6519905", "0.65150905", "0.6445235", "0.64373285", "0.63987076", "0.638487", "0.6342419", "0.6336497", "0.628983", "0.6256844", "0.62037605", "0.6166637", "0.61169857", "0.61062604", "0.6091993", "0.6087936", "0.6083728", "0.60789645", "0.60030293", "0.5974857", "0.5974694", "0.5962824", "0.5960795", "0.5946269", "0.59296644", "0.5926496", "0.5922969", "0.58848554", "0.58680314", "0.5847406", "0.58355916", "0.58111864", "0.5775554", "0.5775554", "0.5769457", "0.57380366", "0.57379234", "0.57379234", "0.57379234", "0.57379234", "0.57379234", "0.57379234", "0.5721495", "0.5656052", "0.5656052", "0.56517863", "0.5643103", "0.562791", "0.5615234", "0.5610443", "0.5588322", "0.55860084", "0.55646414", "0.55334574", "0.55187917", "0.550871", "0.54882157", "0.5468713", "0.54472905", "0.5445225", "0.54136944", "0.5411095", "0.53941435", "0.5387602", "0.53813356", "0.53724146", "0.53623945", "0.5360838", "0.5358459", "0.5358459", "0.53529817", "0.53505063", "0.53366905", "0.53327185", "0.53327185", "0.53327185", "0.5325625", "0.5323429", "0.5323212", "0.5319351" ]
0.74867326
2
Functions handeling requests about identified encounters to API server
async function addIdentifiedEncounter(identifiedEncounter) { if (identifiedEncounter) { return HttpService.post( `/api/addIdentifiedEncounter`, identifiedEncounter ).then((res) => res.data.newIdentifiedEncounter); } else { return "no identifiedEncounter data"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(environment, state) {\n /**\n * @category Utility\n */\n this.units = lib_1.units;\n\n const _state = typeof state == \"string\" ? {\n serverUrl: state\n } : state; // Valid serverUrl is required!\n\n\n (0, lib_1.assert)(_state.serverUrl && _state.serverUrl.match(/https?:\\/\\/.+/), \"A \\\"serverUrl\\\" option is required and must begin with \\\"http(s)\\\"\");\n this.state = _state;\n this.environment = environment;\n this._refreshTask = null;\n const client = this; // patient api ---------------------------------------------------------\n\n this.patient = {\n get id() {\n return client.getPatientId();\n },\n\n read: requestOptions => {\n const id = this.patient.id;\n return id ? this.request({ ...requestOptions,\n url: `Patient/${id}`\n }) : Promise.reject(new Error(\"Patient is not available\"));\n },\n request: (requestOptions, fhirOptions = {}) => {\n if (this.patient.id) {\n return (async () => {\n const options = await contextualize(requestOptions, this);\n return this.request(options, fhirOptions);\n })();\n } else {\n return Promise.reject(new Error(\"Patient is not available\"));\n }\n }\n }; // encounter api -------------------------------------------------------\n\n this.encounter = {\n get id() {\n return client.getEncounterId();\n },\n\n read: requestOptions => {\n const id = this.encounter.id;\n return id ? this.request({ ...requestOptions,\n url: `Encounter/${id}`\n }) : Promise.reject(new Error(\"Encounter is not available\"));\n }\n }; // user api ------------------------------------------------------------\n\n this.user = {\n get fhirUser() {\n return client.getFhirUser();\n },\n\n get id() {\n return client.getUserId();\n },\n\n get resourceType() {\n return client.getUserType();\n },\n\n read: requestOptions => {\n const fhirUser = this.user.fhirUser;\n return fhirUser ? this.request({ ...requestOptions,\n url: fhirUser\n }) : Promise.reject(new Error(\"User is not available\"));\n }\n }; // fhir.js api (attached automatically in browser)\n // ---------------------------------------------------------------------\n\n this.connect(environment.fhir);\n }", "function startAPIRequests()\t{\n // Get app configuration.\n loadConfig().then(() => {\n // -> Get save data.\n afterConfigLoaded();\n loadVideoInformation().then(() => {\n // -> start requesting subs.\n requestSubs();\n });\n });\n}", "function checkForLookupRequests(data, callback) {\n console.log('checkForLookupRequests');\n\n if (data.context && data.context.action && data.context.action.lookup && data.context.action.lookup != 'complete') {\n const payload = {\n workspace_id: workspaceID,\n context: data.context,\n input: data.input\n };\n\n } else {\n callback(null, data);\n return;\n }\n }", "function listenForAPICalls (port) {\n \n // Create a coap server with a callback handling all requests\n var coapServer = coap.createServer(function(request, response) {\n console.log(' Received request: ' + request.url + ' method: ' + request.method + ' CODE: ' + request.code + ' Observe flag (0 states Observe) ' +\n request.headers['Observe'] + ' Payload: ' + request.payload + ' Remote Socket: ' + JSON.stringify(request.rsinfo) );\n\n var parsedURL = url.parse (request.url); \n // console.log ('href = ' + parsedURL.href + ' pathname = ' + parsedURL.pathname + ' query string = ' + parsedURL.search); \n \n \n // Handle call to test API \n if (parsedURL.pathname == '/test') {\n \n // Normal GET request. Respond immediately that no fall has been detected\n if (request.headers['Observe'] !== 0) {\n response.end('test vakue');\n }\n \n // Observe\n else {\n // console.log ('Falldetect Observe GET request received');\n \n // First ACK that request has been received \n response.write('1st observe response, Ack on /test');\n console.log ('1st observe response sent, Ack on /test');\n \n // Then after 3 seconds send message that fall has been detected\n setTimeout(function() {\n response.write('2nd observe response'); \n console.log ('2nd observe response sent');\n }, 3000); \n \n } \n } \n \n // Illegal request \n else {\n console.log ('Illegal request. Pathname= ' + parsedURL.pathname);\n response.end('Illegal request. Pathname= ' + parsedURL.pathname); \n \n } \n \n\n\n }); \n \n // Setup the CoAP-server to listen to a port\n coapServer.listen(port, function() {\n console.log(' CoAP server is listening on port ' + port);\n });\n \n}", "function handleDiscovery(event, context) {\n var devicetype = 'Insteon';\n\n var headers = {\n messageID: event.header.messageId,\n namespace: event.header.namespace,\n name: event.header.name.replace(\"Request\",\"Response\"),\n payloadVersion: '2'\n };\n\n var appliances = [];\n\n getHSDevices(devicetype,function(devices){\n\n // Loop through the devices and populate applicances\n for(var i=0;i<devices.length;i++){\n var device = devices[i];\n \n var devactions = [\"turnOn\", \"turnOff\"];\n \n if (device.dimmable) {\n devactions.push(\"setPercentage\",\"incrementPercentage\",\"decrementPercentage\");\n }\n \n var applianceDiscovered = {\n actions: devactions,\n additionalApplianceDetails: {},\n applianceId: device.id,\n manufacturerName: devicetype,\n modelName: device.type,\n version: \"1\",\n friendlyName: device.name,\n friendlyDescription: device.name+\" located in \"+device.room,\n isReachable: true\n };\n appliances.push(applianceDiscovered);\n }\n\n appliances.sort(function(a, b) {\n return a.friendlyName.localeCompare(b.friendlyName);\n });\n var payloads = {\n discoveredAppliances: appliances\n };\n var result = {\n header: headers,\n payload: payloads\n };\n\n // Warning! Logging this in production might be a security problem.\n log('Discovery', JSON.stringify(result));\n\n context.succeed(result);\n });\n}", "listenRequests() {\n this.request(event.detail.request);\n }", "function handleAPIRequests(apiQuery)\n{\n //Find the location the user entered\n geocode(apiQuery.location);\n \n let mapOptions = {\n zoom: 14,\n center: coords\n };\n \n //Initialize the map\n initMap(mapOptions);\n\n //Set the options for the google places textsearch api.\n let options = [apiQuery.sport];\n\n if(apiQuery.extraQuery.restaurants)\n {\n options.push('restaurant');\n }\n\n if(apiQuery.extraQuery.parking)\n {\n options.push('parking');\n }\n\n if(apiQuery.extraQuery.hotel)\n {\n options.push('hotel');\n }\n\n options.forEach(option => \n {\n \n let request = \n {\n query: option,\n location: coords,\n radius: '250'\n };\n\n //Make google textsearch api call\n searchPlaces(request);\n \n });\n \n //Make EventBrite API Call\n eventSearch(apiQuery);\n\n}", "listenRequests() {\n this.request(event.detail.request);\n }", "function reqListener() {\n let apiResponse = JSON.parse(this.responseText);\n queryResult(apiResponse)\n /*Sends a request if there are at least hundred issues left and if the maximum number of requests has not yet been reached:*/\n if (apiResponse.length >= 100 && requestPage <= maxRequest) {\n elemById(\"requestStatus\").innerHTML = `Requests:${requestPage} von ${maxRequest}<br>Gesammelte Issues:${dataToBeStored.size}<br><br>`;\n ++requestPage\n sendRequest(username, reponame, getAllLabels())\n } else {\n let name = `${username}_${reponame}`;\n if (elemById(\"toLbl0\").value != \"\") {\n name += \"_\" + elemById(\"toLbl0\").value;\n }\n /*Downloads the JSON file with the issues:*/\n download(JSON.stringify([...dataToBeStored]), `${name}.json`, \"text/plain\");\n gotoPage(0);\n }\n}", "async fromRNARequestOtherAPIs(dispatch, id) {\n if (getters.siretFromRNA()) {\n await store.dispatch('executeSearchBySiret', { siret: getters.siretFromRNA(), api: 'SIRENE' })\n } else {\n await store.dispatch('executeSearchByIdAssociation', { id: id, api: 'SIRENE' })\n }\n }", "async fromSireneRequestOtherAPIs(dispatch, siret) {\n if (getters.idAssociationFromSirene()) {\n await store.dispatch('executeSearchByIdAssociation', { id: getters.idAssociationFromSirene(), api: 'RNA' })\n } else {\n await store.dispatch('executeSearchBySiret', { siret: siret, api: 'RNA' })\n }\n }", "function identification(agent){\n var body=JSON.stringify(request.body);\n console.log(body);\n var obj = JSON.parse(body);\n let fever=obj.queryResult.parameters.number2;\n let fracture=obj.queryResult.parameters.Fracture;\n let precon=obj.queryResult.parameters.Precondition;\n let headInj=obj.queryResult.parameters.Head_Injury; \n console.log(fracture);\n let insuranceNumber=obj.queryResult.parameters.Insurance_Number;\n console.log(insuranceNumber);\n\tlet data = '';\n let url = `https://hook.integromat.com/eyucscywke51f6tnpjmapr5h6t2lcd1q?InsuranceNumber=` + insuranceNumber;\n\treturn new Promise((resolve, reject) => { \n const request = https.get(url, (res) => {\n res.on('data', (d) => {\n data += d;\n \tconsole.log(JSON.stringify(data)); \n \t\tvar name=JSON.stringify(data);\n \tname = name.substr(13);\n \tname = name.replace(/[^a-zA-Z ]/g, \"\");\n \tif (name === ''){\n \tagent.add(`Looks like we have never met before. Please tell me your full name.`);\n }else{\n \t\tconsultationNeededPrompt(agent, name, fever, precon, headInj, fracture);\n }\n });\n res.on('end', resolve);\n });\n request.on('error', reject);\n });\n }", "requestDetails(shard, endpoint, params) {\n return new Promise((resolve, reject) => {\n\n let qParams = '';\n\n if (params) {\n Object.keys(params).forEach((key) => {\n qParams += qParams.length ? `&${key}=${params[key]}` : `?${key}=${params[key]}`;\n });\n }\n\n const headers = {\n \n Accept: 'application/vnd.api+json',\n Authorization: `Bearer ${this.apiKey}`\n\n };\n\n let resData = '';\n\n const apiRequest = https.get({\n hostname: this.apiURL,\n path: `/shards/${shard}/${endpoint}${qParams}`,\n headers\n\n }, (apiResponse) => {\n apiResponse.setEncoding('utf8');\n apiResponse.on('data', data => {\n resData += data;\n });\n\n apiResponse.on('end', () => {\n try {\n const parsedRESdata = JSON.parse(resData);\n if(apiResponse.statusCode >= 400){\n return resolve(parsedRESdata); // if playerName is incorrect, send response not found.\n }\n return resolve(parsedRESdata);\n } catch (err) {\n return reject(err);\n }\n });\n apiRequest.on('error', e => reject(e));\n });\n\n });\n\n }", "function solveRequest() {\n\n }", "function getPartnerEventInvitations() {\n request(GET_LINK, (err, res, body) => {\n const partners = JSON.parse(body).partners;\n const countries = parsePartners(partners);\n request.post(POST_LINK, {json: {countries : countries}}, (err, httpResponse, body) => {\n console.log(httpResponse.statusCode)\n });\n });\n}", "async function getRequest(urlFinal){\n console.log('Recibiendo respuestas de todos')\n for (const server in servers) {\n try {\n console.log(`${servers[server].path}${urlFinal}`)\n response = await axios(`${servers[server].path}${urlFinal}`)\n console.log(response.data)\n if(urlFinal ==='id_server'){\n if(response.data > id){\n serversHiguer.push({path: servers[server].path, id: servers[server].id})\n }\n }\n servers[server].alive = true;\n } catch(err) {\n console.log('err.Error')\n servers[server].alive = false;\n servers[server].isLeader = false;\n }\n }\n}", "async index(request, response){\n const ong_id = request.headers.authorization;\n\n const incidents = await connection('incidents') //seleciona todos os registros da tabela incidents\n .where('ong_id', ong_id) //onde ong_id da tabela seja igual ao ong_id coletado do\n .select('*'); // headers.authorization pego acima.\n\n return response.json(incidents); //retorna os incidents cadastrados\n }", "function getEvents(req, res){\n lookupData(req.query.data, 'events')\n .then(location => {\n\n if (location){\n //if exists send the object as response\n res.send(location);\n console.log (\"events db data used\");\n }\n\n //if doesn't exists go to go to Eventbrite api\n else\n {//req.query.data gives us\n searchEventsEventbrite(req, res)\n .then(location =>{\n console.log('EVEtbrite DATA used');\n res.send(location);\n });\n }\n });\n}", "function serverLookup(input) {\n fetch(\"http://localhost:3000/movies\")\n .then( response => response.json() )\n .then( data => searchObj(data, input) )\n}", "initializeQueryResponses()\n {\n let self = this;\n this.express.get(\"/orders\", function(_request, _response){\n self.queryResponse(_request, _response, \"orders\");\n });\n\n this.express.get(\"/customers\", function(_request, _response){\n self.queryResponse(_request, _response, \"customers\");\n });\n\n this.express.get(\"/case-workers\", function(_request, _response){\n self.queryResponse(_request, _response, \"caseWorkers\");\n });\n\n this.express.get(\"/shippers\", function(_request, _response){\n self.queryResponse(_request, _response, \"shippers\");\n });\n\n this.express.get(\"/date-range\", function(_request, _response){\n self.queryResponse(_request, _response, \"dateRange\");\n });\n\n this.express.get(\"/order-details\", function(_request, _response){\n let orderId = _request.query.orderId;\n if (orderId)\n {\n self.queryResponse(_request, _response, \"orderDetails\", { orderId: parseInt(orderId) });\n }\n else _response.status(400).send(\"Could not fetch order details: No order id specified\");\n });\n\n this.express.get(\"/articles\", function(_request, _response){\n self.queryResponse(_request, _response, \"articles\");\n });\n }", "async function getCODStats(ctx){\n // Get username and platform that will be needed for request\n var username = ctx.request.body.username;\n var platform = ctx.request.body.platform;\n // Store HTTP Get to API with url and headers required to make call\n var options = {\n method: 'GET',\n url: `https://call-of-duty-modern-warfare.p.rapidapi.com/warzone/${username}/${platform}`,\n headers: {\n 'x-rapidapi-host': 'call-of-duty-modern-warfare.p.rapidapi.com',\n 'x-rapidapi-key': 'd08f4aa168msh70aa02d0584b683p1ac8bcjsnaa334409768f'\n }\n };\n \n // Try to make request with all options specified above and store/display data to user\n try{\n await axios.request(options).then(function (response) {\n ctx.status = 200\n ctx.body = response.data\n // Key Values we want to store for user from request\n if(ctx.params.id){\n let values = {ID: ctx.params.id, wins: response.data.br.wins, kills: response.data.br.kills,\n kd: response.data.br.kdRatio, kpm: response.data.br.kills / response.data.br.gamesPlayed,\n userID: parseInt(ctx.params.id)}\n saveData(values)\n } else {\n console.log(\"No Data\")\n }\n })\n // If there was an error in the request display simple error message\n } catch(error){\n ctx.status = 404\n ctx.body = \"Unable to perform action\"\n console.log(error)\n }\n}", "function getMatch(link){\n // async function\n console.log(\"sending request !!!\" , count);\n count++;\n request(link , cb); //node api => 48 request functions\n}", "function processOurAPI(req, res) {\n var query = require('url').parse(req.url,true).query;\n\n //\n // when we set a new test value, we clear all other\n // leftover flags! this makes sure that we get a fresh start\n //\n pendingActions = [];\n\n for (var property in query) {\n if (Object.keys(actionTable).indexOf(property) < 0) {\n res.writeHead(400, {\n 'Content-Type': 'text/plain'\n });\n\n res.end(property + ' is not a valid action');\n return;\n }\n\n if (isNaN(query[property]) || query[property] < 1 || query[property] > 10000) {\n res.writeHead(400, {\n 'Content-Type': 'text/plain'\n });\n\n res.end(property + '=' + query[property] + ' is a valid value');\n return;\n }\n\n // add the action to the pending fifo\n pendingActions.push({count : Math.floor(query[property]),\n callback : actionTable[property]});\n }\n\n res.writeHead(200, {\n 'Content-Type': 'application/json'\n });\n\n res.end(JSON.stringify(pendingActions));\n}", "async function requestId() {\n const res = await fetch(`http://pets-v2.dev-apis.com/pets?id=${id}`);\n const json = await res.json();\n setIds(json.pets);\n }", "async index (request, response){\n const ong_id = request.headers.authorization;\n\n //buscar todos os incidents de uma ong especifica (da que estiver logada no caso e que criou)\n const incidents = await connection('incidents')\n .where('ong_id', ong_id)\n .select('*');\n\n //retorno do metodo\n return response.json(incidents);\n }", "handleResponse(status, _headers, json) {\n if (status !== 200) {\n if(json.error){\n\n }\n }\n if(json.total_pages >= 0 && !json.inspections){\n json.inspections = []\n }\n if(json.inspections) {\n this.get('store').unloadAll('inspection');\n for(var i = 0; i < json.inspections.length; i++) {\n var inspection = json.inspections[i];\n //Now, set the embedded inspection attrs\n inspection.inspector_id = inspection.inspector.id;\n inspection.inspector_name = inspection.inspector.name;\n }\n return json;\n }\n else {\n if(json.inspector) {\n json.inspector_name = json.inspector.name;\n json.inspector_id = json.inspector.id;\n }\n //In proper JSON API, a singular request is encased with the type\n return {inspection: json};\n }\n }", "function checkIngressList() {\n console.log(\"requesting ingress list from \" + KUBE_API);\n\n var authObj = {user:KUBE_API_USER,pass:KUBE_API_PASSWORD};\n\n // call kubernetes API\n request({uri:KUBE_API,auth:authObj}, function (error, response, body) {\n\n if (!error && response.statusCode == 200) {\n var ingresses = parseJSON(JSON.parse(body));\n\n console.log(ingresses);\n\n // add service into etcd backend for vulcand\n for(var i = 0; i < ingresses.length;i++) {\n\n publishServiceToConsul(ingresses[i]);\n\n }\n\n } else {\n var statusCodeMessage = response ? ('HTTP '+response.statusCode) : \"\";\n console.log(statusCodeMessage +'error calling kubernetes API '+error)\n }\n\n })\n\n\n\n}", "function processRequest(request, response) {\n let action = (request.body.queryResult.action) ? request.body.queryResult.action : 'default';\n let parameters = request.body.queryResult.parameters || {};\n let inputContexts = request.body.queryResult.contexts;\n let requestSource = (request.body.originalDetectIntentRequest) ? request.body.originalDetectIntentRequest.source : undefined;\n let session = (request.body.session) ? request.body.session : undefined;\n let userId = (request.body.originalDetectIntentRequest) ? request.body.originalDetectIntentRequest.payload.user.userId : undefined;\n let conversationId = (request.body.originalDetectIntentRequest) ? request.body.originalDetectIntentRequest.payload.conversation.conversationId : undefined;\n\n // We can't proceed if we can't identify the user\n if (!userId) {\n // TODO: use the 'session' to allow the user to identify itself and the recover the user from there.\n return sendResponse(response, 'Very sorry, but I can\\'t recognize you. Without knowing who you are, I can\\'t be a good pet for you');\n }\n\n // Database references\n return getOrCreateUser(userId).then(userRef => {\n return getOrCreatePet(userRef).then(petRef => {\n return {\n userRef,\n petRef\n };\n }).then(({userRef, petRef}) => {\n console.info(`User: ${userRef.key}, pet: ${petRef.key}`);\n return computeReaction(userRef, petRef, action, parameters, conversationId).then(responseToUser => {\n console.info(`Computed response: ${responseToUser.message}`);\n const outputContexts = responseToUser.context ? [\n {\n name: `${session}/contexts/${responseToUser.context}`,\n lifespanCount: 1\n } ] : null;\n return sendResponse(response, {\n fulfillmentText: responseToUser.message,\n outputContexts\n // TODO: Add reach messages and finishing the conversation.\n });\n });\n });\n }).catch(ex => {\n console.error('Something went wrong', ex);\n return sendResponse(response, 'Something went wrong: ' + ex);\n });\n}", "function apiPOKEMONcb(apiCall,callback) {\n // API Reference @ https://pokeapi.co\n console.log(\"API Request [POKE]: \" + apiCall);\n var req = http.get(apiCall, function(res) {\n let body = \"\";\n res.on('data', function (chunk) { body += chunk });\n res.on('end', function() {\n if (body == 'Not Found') {\n console.log('^^^^^^^^^^^^^^^^^^^^ DUD'); // TO DO\n callback();\n } else {\n if (apiCall.includes('evolution')) {\n let poke = JSON.parse(body);\n var evoChain = [];\n var evoData = poke.chain;\n let nest = -1;\n let evoChainNarrative = [];\n let evoNarrative = '';\n do {\n nest = nest + 1;\n let numberOfEvolutions = evoData['evolves_to'].length;\n var evoDetails = evoData['evolution_details'][0];\n let pokeEvoDetailsLoop = 0;\n if (typeof evoData['evolution_details'][0] != 'undefined') {\n //console.table(evoDataNest['evolution_details'][nestLoop]);\n evoChainNarrative = [];\n for (pokeEvoDetailsLoop = 0; pokeEvoDetailsLoop < pokeEvoDetails.length; pokeEvoDetailsLoop++) {\n var holder = evoData['evolution_details'][0][pokeEvoDetails[pokeEvoDetailsLoop]];\n if (typeof holder != 'undefined' && holder != null && holder != '') {\n if (typeof holder == 'object') { holder = holder.name };\n holder = '' + holder;\n if (holder != '-1') {holder = holder.replace(/-/g, ' ')};\n holder = strTitleCase(holder);\n if (pokeEvoDetails[pokeEvoDetailsLoop] == 'trigger') {\n evoNarrative = holder;\n } else {\n if (pokeEvoDetails[pokeEvoDetailsLoop] == 'relative_physical_stats') {\n if (holder == '1') { holder = 'Attack > Defence' };\n if (holder == '-1') { holder = 'Defence > Attack' };\n };\n if (holder == 'True') { holder = 'while raining'};\n holder = pokeEvoPrefix[pokeEvoDetailsLoop] + holder + pokeEvoSuffix[pokeEvoDetailsLoop];\n evoChainNarrative.push(holder);\n }; // if (pokeEvoDetails[pokeEvoDetailsLoop]\n //console.log(\"DEBUG [apiPOKEMONcb]> Evolution parameters: \" + pokeEvoDetails[pokeEvoDetailsLoop] + ' = ' + holder);\n }; // if (typeof holder\n }; // for (pokeEvoDetailsLoop\n }; // if (typeof evoData\n //if (typeof evoData['evolution_details'][0] != 'undefined') { console.table(evoData['evolution_details'][0]) };\n var evoPhraseCnt = evoChainNarrative.length;\n var super_prefix = ' and '; // switch to or?\n if (evoPhraseCnt == 0) {\n // Only trigger\n } else if (evoPhraseCnt == 1) {\n evoNarrative = evoNarrative + ' ' + evoChainNarrative[0];\n } else if (evoPhraseCnt == 2) {\n evoNarrative = evoNarrative + ' ' + evoChainNarrative[0] + super_prefix + evoChainNarrative[1];\n } else { // >2 e.g. 3.... 0,1,2 (length -1)\n let narLoop = 1;\n for (narLoop = 0; narLoop < evoPhraseCnt.length; narLoop++) {\n if (narLoop == (evoPhraseCnt-1)) {\n super_prefix = ' and ';\n } else if (narLoop == 0) {\n super_prefix = ' ';\n } else {\n super_prefix = ', ';\n }; // if (narLoop\n evoNarrative = evoNarrative + super_prefix + evoChainNarrative[narLoop];\n }; // for (narLoop = 0;\n }; // if (evoPhraseCnt\n evoChain.push({\n \"Root\": '*',\n \"Sequence\": nest,\n \"Species\": strTitleCase(evoData.species.name),\n \"Evolution\": evoNarrative\n }); // evoChain.push({\n //console.log(\"DEBUG [apiPOKEMONcb]> Pokemon: \" + evoData .species.name + '; Evolution: ' + evoNarrative);\n if (numberOfEvolutions > 1) {\n for (let i = 1;i < numberOfEvolutions; i++) {\n evoChainNarrative = [];\n var evoDataNest = evoData.evolves_to[i];\n var evoDetailsNest = evoDataNest['evolution_details'][0];\n let nestLoop = 0;\n let reached = -1;\n for (nestLoop = 0; nestLoop < evoDataNest['evolution_details'].length; nestLoop++) {\n if (typeof evoDataNest['evolution_details'][nestLoop] != 'undefined') {\n for (pokeEvoDetailsLoop = 0; pokeEvoDetailsLoop < pokeEvoDetails.length; pokeEvoDetailsLoop++) {\n var holder = evoDataNest['evolution_details'][nestLoop][pokeEvoDetails[pokeEvoDetailsLoop]];\n if (typeof holder != 'undefined' && holder != null && holder != '') {\n if (typeof holder == 'object') { holder = holder.name };\n holder = '' + holder;\n if (holder != '-1') {holder = holder.replace(/-/g, ' ')};\n holder = strTitleCase(holder);\n if (pokeEvoDetails[pokeEvoDetailsLoop] == 'trigger') {\n evoNarrative = holder;\n } else {\n if (pokeEvoDetails[pokeEvoDetailsLoop] == 'relative_physical_stats') {\n if (holder == '1') { holder = 'Attack > Defence' };\n if (holder == '-1') { holder = 'Defence > Attack' };\n };\n if (holder == 'True') { holder = 'while raining'};\n holder = pokeEvoPrefix[pokeEvoDetailsLoop] + holder + pokeEvoSuffix[pokeEvoDetailsLoop];\n evoChainNarrative.push(holder);\n };\n //console.log(\"DEBUG [apiPOKEMONcb]> Evolution parameters (nested): \" + pokeEvoDetails[pokeEvoDetailsLoop] + ' = ' + holder);\n }; // if (typeof holder\n }; // for (pokeEvoDetailsLoop\n }; // if (typeof evoDataNest\n reached = nestLoop;\n }; // for (nestLoop\n var evoPhraseCnt = evoChainNarrative.length;\n var super_prefix = ' and '; // switch to or?\n if (reached > 0) { var super_prefix = ' or ' }\n if (evoPhraseCnt == 0) {\n // Only trigger\n } else if (evoPhraseCnt == 1) {\n evoNarrative = evoNarrative + ' ' + evoChainNarrative[0];\n } else if (evoPhraseCnt == 2) {\n evoNarrative = evoNarrative + ' ' + evoChainNarrative[0] + super_prefix + evoChainNarrative[1];\n } else { // >2 e.g. 3.... 0,1,2 (length -1)\n let narLoop = 0;\n for (narLoop = 0; narLoop < evoPhraseCnt; narLoop++) {\n if (narLoop == (evoPhraseCnt-1)) {\n super_prefix = ' and ';\n if (reached > 0) { var super_prefix = ' or ' }\n } else if (narLoop == 0) {\n super_prefix = ' ';\n } else {\n super_prefix = ', ';\n }; // if (narLoop\n evoNarrative = evoNarrative + super_prefix + evoChainNarrative[narLoop];\n }; // for (narLoop\n }; // if (evoPhraseCnt\n evoChain.push({\n \"Sequence\": nest,\n \"Species\": strTitleCase(evoDataNest.species.name),\n \"Evolution\": evoNarrative\n }); // evoChain.push({\n //console.log(\"DEBUG [apiPOKEMONcb]> Pokemon: \" + evoDataNest .species.name + '; Evolution: ' + evoNarrative);\n }; // for (let i = 1;i < numberOfEvolutions; i++) {\n }; // if (numberOfEvolutions > 1)\n evoData = evoData['evolves_to'][0];\n } while (!!evoData && evoData.hasOwnProperty('evolves_to'));\n //console.log(\"DEBUG [apiPOKEMONcb]> Results:\"); console.table(evoChain);\n let evoChainCnt = evoChain.length;\n let evoSequence = '';\n if (evoChainCnt == 0) {\n evoSequence = 'Sorry, unable to find evolution chain';\n } else if (evoChainCnt == 1) {\n evoSequence = evoChain[0]['Species'] + \" does not evolve\";\n } else {\n let evoLoop = 0;\n let pokePrevious = '';\n let pokeFirst = false;\n for (evoLoop = 0; evoLoop < evoChainCnt; evoLoop++) {\n if (evoChain[evoLoop]['Root'] == '*' && evoLoop == 0 ) { // 0\n pokePrevious = evoChain[evoLoop]['Species'];\n } else if (evoChain[evoLoop]['Root'] == '*' && evoLoop != (evoChainCnt - 1)) { // 1\n evoSequence = evoSequence + pokePrevious + ' ➡️ ';\n // Poliwag >\n pokePrevious = evoChain[evoLoop]['Species'];\n evoSequence = evoSequence + pokePrevious + ' 📶 ' + evoChain[evoLoop]['Evolution'] + '\\n';\n // Poliwag > Poliwhirl [Level Up with Level 25+]\n //\n } else if (evoChain[evoLoop]['Root'] != '*') { // 2\n evoSequence = evoSequence + pokePrevious + ' ➡️ ';\n evoSequence = evoSequence + evoChain[evoLoop]['Species'] + ' 📶 ' + evoChain[evoLoop]['Evolution'] + '\\n';\n\n } else if (evoChain[evoLoop]['Root'] == '*') { // Final evolution 3\n evoSequence = evoSequence + pokePrevious + ' ➡️ ';\n // Poliwag > Poliwhirl [Level Up with Level 25+]\n // Poliwhirl >\n evoSequence = evoSequence + evoChain[evoLoop]['Species'] + ' 📶 ' + evoChain[evoLoop]['Evolution'];\n // Poliwag > Poliwhirl [Level Up with Level 25+]\n // Poliwhirl > Poliwrath [Use Item Water Stone]\n };\n }; // for (evoLoop = 0\n }; // if (evoChainCnt == 0)\n pokeEvolution.push({\n \"Evolution URL\": apiCall,\n \"Evolution Narrative\": evoSequence\n }); //\n console.log(\"DEBUG [apiPOKEMONcb]> Evolution sequence: \\n\" + evoSequence);\n callback();\n } else if (apiCall.includes('species')) {\n let poke = JSON.parse(body);\n let description = 'No description'\n let flavCount = poke.flavor_text_entries.length;\n let flavLoop = 0;\n for (flavLoop = 0; flavLoop < flavCount; flavLoop++) {\n let flavEntry = poke.flavor_text_entries[flavLoop];\n if (flavEntry.language.name == 'en' && flavEntry.version.name == 'red') {\n description = flavEntry.flavor_text;\n }; // if\n }; // for (flavLoop\n description = strReplaceAll(description,'\\n',' ');\n description = strReplaceAll(description,'\\f',' ');\n description = description.replace(/^((\\S+\\s+){7}\\S+)\\s+/, '$1\\n');\n let eggs = poke.egg_groups.map((element) => strTitleCase(element.name)).join(', ');\n eggs = eggs.replace(/,([^,]*)$/,' &$1'); // last comma for and\n let hatch_after = (poke.hatch_counter+1)*255;\n let habitat = \"No Habitat\";\n if (poke.habitat != null) { habitat = poke.habitat.name };\n let hatch_steps = hatch_after + ' Steps';\n let female_eighth = poke.gender_rate; // in 1/8th female proportion i.e. 2=25% female\n let gender = '';\n if (female_eighth == -1) {\n gender = 'None';\n } else {\n var female_proportion = (female_eighth/8)*100;\n var male_proportion = 100 - female_proportion;\n gender = '♀️' + female_proportion.toFixed(1) + '% ♂️' + male_proportion.toFixed(1) + '%'; //ToFixed is string\n }\n pokeSpecies.push({\n \"Species URL\": apiCall,\n \"Description\": description,\n \"Egg Groups\": eggs,\n \"Steps to Hatch\": hatch_steps,\n \"Gender Distribution\": gender,\n \"Colour\": poke.color.name,\n \"Shape\": poke.shape.name,\n \"Growth Rate\": poke.growth_rate.name,\n \"Habitat\": habitat,\n \"Base Happiness\": poke.base_happiness,\n \"Capture Rate\": poke.capture_rate,\n \"Evolution URL\": poke.evolution_chain.url\n }); // pokeSpecies.push\n console.log(\"DEBUG [apiPOKEMONcb]> Species: \\n\");\n console.table(pokeSpecies[pokeSpecies.length - 1])\n callback();\n } else { // pokemon URL\n let poke = JSON.parse(body);\n let types = poke.types.map((type) => strTitleCase(type.type.name)).join(', ');\n types = types.replace(/,([^,]*)$/, ' &$1'); // last comma for and\n let abilities = poke.abilities.map((ability) => strTitleCase(ability.ability.name)).join(', ');\n abilities = abilities.replace(/,([^,]*)$/, ' &$1');\n let moves = poke.moves.map((move) => strTitleCase(move.move.name)).join(', ');\n moves = moves.replace(/,([^,]*)$/, ' &$1');\n pokeDex.push({\n \"ID\": poke.id,\n \"Name\": poke.species.name,\n \"Species URL\": poke.species.url,\n \"Height\": poke.height/10 + 'm',\n \"Weight\": poke.weight/10 + 'kg',\n \"Sprite\": poke.sprites.front_default,\n \"Speed\": poke.stats[0].base_stat,\n \"Defence\": poke.stats[1].base_stat,\n \"Attack\": poke.stats[2].base_stat,\n \"Sp. Defence\": poke.stats[3].base_stat,\n \"Sp. Attack\": poke.stats[4].base_stat,\n \"HP\": poke.stats[5].base_stat,\n \"Total\": (poke.stats[5].base_stat + poke.stats[4].base_stat + poke.stats[3].base_stat +\n poke.stats[2].base_stat + poke.stats[1].base_stat + poke.stats[0].base_stat),\n \"Base Experience\": poke.base_experience,\n \"Type(s)\": types,\n \"Abilities\": abilities,\n \"Moves\": moves\n }); // pokeDex.push\n console.log(\"DEBUG [apiPOKEMONcb]> Pokemon: \\n\");\n console.table(pokeDex[pokeDex.length - 1]);\n callback();\n }; // else { // pokemon URL\n }; // if (body == 'Not Found')\n }); // res.on('end'\n }); // http.get(url\n req.on('error', function(e) { // Catches failures to connect to the API\n console.log(\"ERROR [apiPOKEMONcb]> Error getting to API: \" + e);\n callback();\n }); // req.on('error'\n}", "function initialRequests() {\n socketService.getUserData()\n .success(function (resp) {\n $rootScope.main.responseStatusHandler(resp);\n $scope.userData = globals.userData(resp.userData);\n $rootScope.main.broadcastUserData();\n\n if ($scope.userData.isRegistered) {\n //join a socketRoom for websocket connection, equivalent to user's uniqueCuid\n socket.emit('joinRoom', {\n room: resp.userData.uniqueCuid\n });\n }\n })\n .error(function (errResponse) {\n $rootScope.main.responseStatusHandler(errResponse);\n });\n }", "function onRequest() {\n req = new Request(head, body);\n res = new Response();\n\n return runLayer(0).then(onResponse);\n }", "function getHome(request, response){\n var findPopularArticles = function getPopularArticles() {\n return new Promise((resolve, reject) => {\n // get 5 most popular articles\n Home.findMostViewed(5, (err, data) => {\n if (err) {\n if (err.kind === \"not_found\") {\n reject(`Not found popular articles`);\n } else {\n reject(\"Error retrieving popular articles\");\n }\n }\n else {\n resolve(data);\n }\n })\n })\n }\n var findTopFeatured = function getTopFeatured() {\n return new Promise((resolve, reject) => {\n Home.findRecentFeatured((err, data) => {\n if (err) {\n if (err.kind === \"not_found\") {\n reject(`Not found recent featured`);\n } else {\n reject(\"Error retrieving recent featured\");\n }\n }\n else {\n resolve(data);\n }\n })\n })\n }\n var findOtherArticles = function getOtherArticles(featuredEntry) {\n return new Promise((resolve, reject) => {\n Home.findRecentArticles(featuredEntry, (err, data) => {\n if (err) {\n if (err.kind === \"not_found\") {\n reject(`Not found recent articles`);\n } else {\n reject(\"Error retrieving recent articles\");\n }\n }\n else {\n resolve(data);\n }\n })\n })\n }\n findPopularArticles().then(popularArticles => {\n findTopFeatured().then(featuredArticle => {\n findOtherArticles(featuredArticle.articleid).then(otherArticles => {\n var buildArticle = function buildArticle(articleEntry){\n let hasPhoto = (articleEntry.photoFilename) ? true : false;\n article_to_add = {\n articleImage: `/images/images/${articleEntry.photoFilename}`,\n articleTitle: articleEntry.headline,\n articleLink: `/article/${articleEntry.articleid}`,\n articleCategory: articleEntry.section,\n articleBlurb: articleEntry.teaser,\n hasPhoto: hasPhoto\n }\n return article_to_add;\n }\n let mostViewedArticles = popularArticles.map(buildArticle);\n let listArticles = otherArticles.map(buildArticle);\n let featuredPic = `/images/images/${featuredArticle.photoFilename}`;\n let hasFeaturedPic = (featuredArticle.photoFilename) ? true : false;\n let featuredTitle = featuredArticle.headline;\n let featuredCategory = featuredArticle.section;\n let featuredBlurb = featuredArticle.teaser;\n let featuredLink = `/article/${featuredArticle.articleid}`;\n \n response.render('home', {\n title: 'Home',\n featuredPic: featuredPic,\n hasFeaturedPic: hasFeaturedPic,\n featuredTitle: featuredTitle,\n featuredCategory: featuredCategory,\n featuredBlurb: featuredBlurb,\n featuredLink: featuredLink,\n listArticles: listArticles,\n mostViewedArticles: mostViewedArticles\n });\n })\n \n })\n })\n \n}", "function handleRequests(reqs) {\n // Process board request here, then give appropriate info to each function.\n let targetPlayerName = reqs[0];\n\n let gameStateData = JsonToComponent.createGameState(reqs[1]);\n let numRounds = Number.parseInt(reqs[2]);\n\n let gameState = gameStateData[0];\n // Map of Workers (ex. \"one1\", \"p2\") to their WorkerId in the game\n let workerNameToId = gameStateData[1];\n\n // Array of player names (ex. \"one\", \"p\") where index is their PlayerId in the game\n let playerNameToId = gameStateData[2];\n let targetPlayerId = playerNameToId.indexOf(targetPlayerName);\n\n // After creating the game state and placing workers on it,\n // ensure that its current turn is set to the player we are playing for.\n if (gameState.getWhoseTurn() !== targetPlayerId) {\n gameState.flipTurn();\n }\n\n switch(reqs.length) {\n case 3:\n handleBoardOnly(gameState, targetPlayerId, numRounds);\n break;\n case 4:\n handleWinningMove();\n break;\n case 5:\n handleBoardAndTurn(gameState, workerNameToId, playerNameToId,\n numRounds, reqs.slice(3));\n break;\n default:\n throw 'Invalid test case given';\n }\n}", "reportToMatchmaking() {\n // Todo: Keep this logic within the backend.\n // Todo: Triodor has not yet deployed the preflight request update, so no JSON!\n // Todo: This should be a GET request.\n const videoCounterData = `publisherId=${this.options.publisherId}&url=${encodeURIComponent(this.options.url)}&title=${this.options.title}&gameId=${this.options.gameId}&category=${this.options.category}&langCode=${this.options.langCode}`;\n const videoCounterUrl = 'https://api.tubia.com/api/player/find/';\n const videoCounterRequest = new Request(videoCounterUrl, {\n method: 'POST',\n body: videoCounterData, // JSON.stringify(videoCounterData),\n headers: new Headers({\n 'Content-Type': 'application/x-www-form-urlencoded', // application/json\n }),\n });\n fetch(videoCounterRequest).then((response) => {\n const contentType = response.headers.get('content-type');\n if (!contentType || !contentType.includes('application/json')) {\n throw new TypeError('Oops, we didn\\'t get JSON!');\n }\n }).catch(() => {\n // TODO: Report this issue to honeybadger.\n });\n }", "function onRequest(request, response, modules) {\n // Extract modules.\n var ca = modules.collectionAccess;\n var images = ca.collection('images');\n var logger = modules.logger;\n var req = modules.request;\n var utils = modules.utils;\n\n // Extract the reference.\n var id = request.body._id;\n var reference = request.body.reference;\n\n // Lookup locally.\n images.findOne({ gpid: id }, function(err, doc) {\n // If the lookup succeeded, return the response.\n if(null != doc) {\n response.body = { URL: doc.url };\n return response.complete();\n }\n\n // Log any errors, then continue looking.\n if(null != err) {\n logger.error(err);\n }\n logger.info(\"Lookup reference: \" + reference);\n\n // Lookup using Google Places.\n req.get({\n uri: [\n 'https://maps.googleapis.com/maps/api/place/photo?sensor=false&maxheight=100&maxwidth=200',\n 'key=' + GOOGLE_PLACES_API_KEY,\n 'photoreference=' + reference,\n 'sensor=false'\n ].join('&'),\n followRedirect: false\n }, function(err, res) {\n // Log any errors.\n if(null != err) {\n logger.error(err);\n }\n\n // Extract the URL.\n var url = res.headers ? (res.headers.location || null) : null;\n\n // Save it.\n var data = utils.kinveyEntity({ gpid: id, url: url });\n images.save(data, {}, function(err) {\n // Log any errors.\n if(null != err) {\n logger.error(err);\n }\n\n // Return the response.\n response.body = { URL: url };\n response.complete();\n });\n });\n });\n}", "function fetchData() {\n console.log('IMonData: [Old API] Fetching...');\n var store = new Store();\n\n var baseUrl = 'https://thenetmonitor.org/v1/';\n\n var futures = [];\n\n ['datum_sources', 'countries', 'regions'].forEach(function(type) {\n var fut = HTTP.get.future()(baseUrl + type, { timeout: Settings.timeout });\n futures.push(fut);\n var results = fut.wait();\n store.sync(results.data);\n });\n\n Future.wait(futures);\n\n console.log('IMonData: [Old API] Inserting...');\n\n _.each(store.findAll('regions'), insertRegion);\n _.each(store.findAll('countries'), insertCountry);\n _.each(store.findAll('datum_sources'), insertIndicator);\n\n console.log('IMonData: [Old API] Inserted.');\n\n}", "function searchAPIs() {\n if (action === \"concert-this\") {\n band.findBand(argumentInput);\n } else if (action === \"spotify-this-song\") {\n spotifySearch.findMusic(argumentInput);\n } else if (action === \"movie-this\") {\n movieSearch.findMovie(argumentInput);\n } else if (action === \"do-what-it-says\") {\n fs.readFile(\"random.txt\", \"utf8\", function (error, data) {\n if (error) {\n return console.log(error);\n } else {\n var dataParse = data.split(\",\");\n if (dataParse[0] === \"concert-this\") {\n band.findBand(dataParse[1]);\n } else if (dataParse[0] === \"spotify-this-song\") {\n spotifySearch.findMusic(dataParse[1]);\n } else if (dataParse[0] === \"movie-this\") {\n movieSearch.findMovie(dataParse[1]);\n }\n }\n });\n }\n}", "function handle_income_request(req, res) {\n req.parse_url = url.parse(req.url,true);\n var coreurl = req.parse_url.pathname;\n console.log(req.headers);\n console.log(req.method);\n if (coreurl == \"/albums\")\n handle_loadalbums(req, res);\n else if (coreurl == \"/movies\")\n handle_loadmovies(req, res);\n else {\n handle_invalidurl(req, res);\n }\n}", "function requestHandler(request,response){\n\n let nodeId = request.url.slice(1);\n\n //on every request check if node id exists\n if(publicTree.contains(nodeId)){\n\n //If it exists, find it\n let resultNode = publicTree.findNode(nodeId);\n console.log(resultNode.children);\n\n //Create an array of the child values\n let result = _.map(resultNode.children,function(child){return child.value});\n\n //Set statusCode, headers and write stringified result to response body\n response.statusCode = 200;\n response.setHeader('Content-Type', 'application/json');\n response.write(JSON.stringify(result));\n response.end();\n return;\n\n }else{\n\n //otherwise respond with invalid node\n response.statusCode = 404;\n response.write('Invalid Node');\n response.end();\n\n }\n\n}", "async processRequest(id, caller, apis, response_type, aggregation_type, context, prefered_api, string_to_count, options, assigned_oracle, standby_oracle) {\n\n\t\t\n\t\tvar results = [];\n\t\tvar api_response_set = [];\n\t\tfor (var api of apis) {\n\t\t\tvar result = null;\n\t\t\tif (api.endpoint.match(/^(https:\\/\\/)?(localhost|127\\.0\\.0\\.1)/) === null) {\n\t\t\t\ttry {\n\t\t\t\t\tresult = await this.getResult(api, api.endpoint, api.json_field, response_type);\n\t\t\t\t\tconsole.log(\"request processor, inside processReq result :\", result)\n\t\t\t\t\t\n\t\t\t\t\tif (result !== null) {\n\t\t\t\t\t\tapi[\"response\"] = result;\n\t\t\t\t\t\tapi[\"api\"] = api['endpoint'];\n\t\t\t\t\t\tdelete api['endpoint'];\n\t\t\t\t\t\tapi_response_set.push(api);\n\t\t\t\t\t\tresults.push(result);\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\tconsole.error(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconsole.log('Skipping request to localhost.');\n\t\t\t}\n\t\t}\n\n\n\t\tvar confirmed_response = results.filter((value,index,arr)=>{\n\t\t\treturn value!=undefined\n\t\t})\n\t\n\t\t\n\t\tconsole.log(\"request processor, inside processReq confirmed_response.length :\", confirmed_response.length)\n\t\tconsole.log(\"request processor, inside processReq apis.length/2 :\", apis.length/2)\n\t\tconsole.log(\"request processor, inside processReq confirmed_response.length>=apis.length/2 :\", (confirmed_response.length>=apis.length/2) )\n\t\tconsole.log(\"request processor, inside processReq results[prefered_api] :\", results[prefered_api])\n\n\n\t\tif(confirmed_response.length>=apis.length/2 )\n\t\t{\n\t\t\tresult = aggregate (confirmed_response, aggregation_type, string_to_count)\n\t\t}\n\t\telse if(prefered_api)\n\t\t{\n\t\t\tconsole.log(\"prefered_api: ~~~~~~~~~~\",prefered_api);\n\t\t\tif(results[prefered_api])\n\t\t\t{\n\t\t\t\tresult = results[prefered_api];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult = aggregate (confirmed_response, aggregation_type, string_to_count)\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = aggregate (confirmed_response, aggregation_type, string_to_count)\n\t\t}\n\t\t\n\t\tvar encoded = \"\";\n\t\ttry {\n\t\t\tconsole.log(\"request processor, inside processReq before encodeing aggregation :\", result)\n\t\t\tencoded = encode(result, response_type);\n\t\t}\n\t\tcatch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t\n\t\tconsole.log(\"request processor, inside processReq encoded :\", encoded)\n\t\tconsole.log(\"apaiaapapiapiaiapaipapapia\", api_response_set)\n\t\tconsole.log(\"apaiaapapiapiaiapaipapapia\", result)\n\n\t\tawait this.audit_trail(id, caller, api_response_set, response_type, aggregation_type, result, context, options, assigned_oracle, standby_oracle );\n\n\n\t\treturn encoded;\n\t}", "interrogate() {\n var url = '/clients/' + this.clientId + '/actions/interrogate';\n\n this.grrApiService_.post(url).then(\n function success(response) {\n this.interrogateOperationId = response['data']['operation_id'];\n this.monitorInterrogateOperation_();\n }.bind(this),\n function failure(response) {\n this.stopMonitorInterrogateOperation_();\n }.bind(this));\n }", "static async onGet(req, res) {\n const id = req.params.id\n try {\n const response = await Request.findById(id)\n return res.json(response)\n } catch (err) {\n console.log(err)\n return res.status(400).json(err)\n }\n }", "function handleResponse(msg)\n{\n log.debug(\"Enter - handleResponse\");\n\n var addResponseAnnotations = true;\n\n var responder = msg.recipient;\n var device = msg.device;\n \n log.debug(\"handleResponse - Event ID \" + msg.eventidentifier + \", response [\" + msg.response + \"], responder [\" + responder + \"], device [\" + device + \"]\");\n\n var incidentId = getIncidentID( msg );\n var userAnnotation = \"null\".equals(msg.annotation) ? null : msg.annotation;\n\n log.info(\"handleResponse - Event ID \" + msg.eventidentifier + \", incidentId [\" + incidentId + \"], annotation [\" + userAnnotation + \"]\");\n\n var incidentService = new XMHPDIncidentInterfaceWS(new WSUtil(), XM_HPD_INCIDENT_WS_URL);\n\n switch (String(msg.response).toUpperCase()) {\n \n case RESPONSE_ACTION_ACCEPT:\n var incident = getIncident( incidentId );\n\n // First set the assignee, add a annotation and push to Remedy\n Incident.setAssignee(incident, responder);\n Incident.setWorkLog(incident, addResponseAnnotations, notePrefix + \"Response \" + msg.response + \" received from \" + responder, userAnnotation);\n\n incidentService.updateAssignee(REMEDY_WS_USERNAME, REMEDY_WS_PASSWORD, incident);\n\n // Then change the status to 'In Progress', add another annotation and push the second update to Remedy\n Incident.setStatus(incident);\n Incident.setWorkLog(incident, addResponseAnnotations, notePrefix + \"Incident status changed to 'In Progress'\", null);\n\n incidentService.updateStatus(REMEDY_WS_USERNAME, REMEDY_WS_PASSWORD, incident);\n break;\n\n case RESPONSE_ACTION_RESOLVE:\n var incident = getIncident( incidentId );\n\n // First set the assignee, add a annotation and push to Remedy\n Incident.setAssignee(incident, responder);\n Incident.setWorkLog(incident, addResponseAnnotations, notePrefix + \"Response \" + msg.response + \" received from \" + responder, userAnnotation);\n \n incidentService.updateAssignee(REMEDY_WS_USERNAME, REMEDY_WS_PASSWORD, incident);\n\n Incident.setResolved(incident);\n Incident.setWorkLog(incident, addResponseAnnotations, notePrefix + \"Incident status changed to 'Resolved'\", null);\n\n incidentService.resolve(REMEDY_WS_USERNAME, REMEDY_WS_PASSWORD, incident);\n break;\n\n case RESPONSE_ACTION_IGNORE:\n case RESPONSE_ACTION_ACKNOWLEDGE:\n case RESPONSE_ACTION_ACK:\n // Don't need to retrieve the incident from Remedy for this response, but need the ID set up\n var incident = newRemedyObject();\n incident.Incident_Number = incidentId;\n Incident.setWorkLog(incident, addResponseAnnotations, notePrefix + \"Response \" + msg.response + \" received from \" + responder /* + \" | \" + device */, userAnnotation);\n \n incidentService.addWorkLog(REMEDY_WS_USERNAME, REMEDY_WS_PASSWORD, incident);\n break;\n\n default:\n throw { name: \"HandleResponseException\", message: \"Unknown response [\" + msg.response + \"]\"};\n }\n\n log.debug(\"handleResponse - returning incident [\" + incident + \"]\");\n log.debug(\"Exit - handleResponse\");\n}", "async howManyNotify(id) {\n // no of notificatons\n let response = await axios.get(`${API_URL}/requests/${id}/checkRequests`);\n // console.log(response);\n return response;\n }", "handlePayload(payload) {\n console.log(\"Received Payload:\", `${payload} for ${this.user.psid}`);\n\n // Log CTA event in FBA\n GraphAPi.callFBAEventsAPI(this.user.psid, payload);\n //test\n let response;\n\n // Set the response based on the payload\n if (\n payload === \"GET_STARTED\" ||\n payload === \"DEVDOCS\" ||\n payload === \"GITHUB\"\n ) {\n response = Response.genNuxMessage(this.user);\n } else if (payload.includes(\"CURATION\") || payload.includes(\"COUPON\")) {\n let curation = new Curation(this.user, this.webhookEvent);\n response = curation.handlePayload(payload);\n } else if (payload.includes(\"CARE\")) {\n let care = new Care(this.user, this.webhookEvent);\n response = care.handlePayload(payload);\n } else if (payload.includes(\"ORDER\")) {\n response = Order.handlePayload(payload);\n } else if (payload.includes(\"CSAT\")) {\n response = Survey.handlePayload(payload);\n } else if (payload.includes(\"CHAT-PLUGIN\")) {\n response = [\n Response.genText(i18n.__(\"chat_plugin.prompt\")),\n Response.genText(i18n.__(\"get_started.guidance\")),\n Response.genQuickReply(i18n.__(\"get_started.help\"), [\n {\n title: i18n.__(\"care.order\"),\n payload: \"CARE_ORDER\"\n },\n {\n title: i18n.__(\"care.billing\"),\n payload: \"CARE_BILLING\"\n },\n {\n title: i18n.__(\"care.other\"),\n payload: \"CARE_OTHER\"\n }\n ])\n ];\n } else if (payload.includes(\"complaints_1\")) {\n response = [\n Response.genQuickReply(\n i18n.__(\"complaints1flow.features_confirmation1\"),\n [\n {\n title: i18n.__(\"menu.yes\"),\n payload: \"yes_1\"\n },\n {\n title: i18n.__(\"menu.no\"),\n payload: \"no\"\n }\n ]\n ),\n { complaintType: \"complaints_1\" }\n ];\n } else if (payload.includes(\"complaints_2\")) {\n response = [\n Response.genQuickReply(\n i18n.__(\"complaints2flow.features_confirmation2\"),\n [\n {\n title: i18n.__(\"menu.yes\"),\n payload: \"yes_2\"\n },\n {\n title: i18n.__(\"menu.no\"),\n payload: \"no\"\n }\n ]\n ),\n { complaintType: \"complaints_2\" }\n ];\n } else if (payload.includes(\"complaints_3\")) {\n response = [\n Response.genQuickReply(\n i18n.__(\"complaints3flow.features_confirmation3\"),\n [\n {\n title: i18n.__(\"menu.yes\"),\n payload: \"yes_3\"\n },\n {\n title: i18n.__(\"menu.no\"),\n payload: \"no\"\n }\n ]\n ),\n { complaintType: \"complaints_3\" }\n ];\n } else if (payload.includes(\"complaints_4\")) {\n response = [\n Response.genQuickReply(\n i18n.__(\"complaints4flow.features_confirmation4\"),\n [\n {\n title: i18n.__(\"menu.yes\"),\n payload: \"yes_4\"\n },\n {\n title: i18n.__(\"menu.no\"),\n payload: \"no\"\n }\n ]\n ),\n { complaintType: \"complaints_4\" }\n ];\n } else if (payload.includes(\"yes_1\")) {\n let confirm = Response.genText(i18n.__(\"fallback.correct_option\"));\n let name = Response.genText(i18n.__(\"get_started.input_name\"));\n\n let payloadData = {\n payload: \"yes_1\",\n user: this.user.psid\n };\n response = [confirm, payloadData, name];\n } else if (payload.includes(\"yes_2\")) {\n let confirm = Response.genText(i18n.__(\"fallback.correct_option\"));\n let name = Response.genText(i18n.__(\"get_started.input_name\"));\n\n let payloadData = {\n payload: \"yes_2\",\n user: this.user.psid\n };\n response = [confirm, payloadData, name];\n } else if (payload.includes(\"yes_3\")) {\n let confirm = Response.genText(i18n.__(\"fallback.correct_option\"));\n let name = Response.genText(i18n.__(\"get_started.input_name\"));\n\n let payloadData = {\n payload: \"yes_3\",\n user: this.user.psid\n };\n response = [confirm, payloadData, name];\n } else if (payload.includes(\"yes_4\")) {\n let confirm = Response.genText(i18n.__(\"fallback.correct_option\"));\n let name = Response.genText(i18n.__(\"get_started.input_name\"));\n\n let payloadData = {\n payload: \"yes_4\",\n user: this.user.psid\n };\n response = [confirm, payloadData, name];\n } else if (payload.includes(\"no\")) {\n let firstResponse = Response.genQuickReply(\n i18n.__(\"get_started.input_select\"),\n [\n {\n title: i18n.__(\"menu.complaints_1\"),\n payload: \"complaints_1\"\n },\n {\n title: i18n.__(\"menu.complaints_2\"),\n payload: \"complaints_2\"\n },\n {\n title: i18n.__(\"menu.complaints_3\"),\n payload: \"complaints_3\"\n },\n {\n title: i18n.__(\"menu.complaints_4\"),\n payload: \"complaints_4\"\n }\n ]\n );\n let mypayload = {\n payload: \"mygreetings\"\n };\n response = [firstResponse, mypayload];\n } else if (payload.includes(\"deny_confirmation\")) {\n let first = Response.genText(i18n.__(\"get_started.input_name\"));\n let payloadSecond = {\n payload: \"deny_confirmation\",\n user: this.user.psid\n };\n response = [first, payloadSecond];\n } else if (payload.includes(\"yes_confirmation\")) {\n let first = Response.genText(i18n.__(\"fallback.when\"));\n let payloadSecond = {\n payload: \"yes_confirmation\",\n user: this.user.psid\n };\n response = [first, payloadSecond];\n } else if (payload.includes(\"decline_evidence\")) {\n console.log(\"Asignando codigo a mensaje\");\n console.log(this.user.idreport);\n let first = Response.genText(i18n.__(\"fallback.dontworry\"));\n console.log(\"first\");\n console.log(first);\n let second = Response.genText(i18n.__(\"fallback.pdfpath\"));\n let third = Response.genGenericTemplate(\n `${config.appUrl}/logo_chappy_police.png`,\n i18n.__(\"titles.title_en\"),\n this.user.idreport,\n [\n Response.genWebUrlButton(\n i18n.__(\"titles.download_here\"),\n `${config.botUrl}/${this.user.idDocument}.pdf`\n )\n ]\n );\n console.log(\"IMPRIMIENDO URL:\");\n console.log(`${config.botUrl}/${this.user.idDocument}.pdf`);\n\n let forth = Response.genText(i18n.__(\"fallback.finish2\"));\n let fifth = { payload: \"finish\" };\n response = [first, second, third, forth, fifth];\n } else if (payload.includes(\"accept_evidence\")) {\n let first = Response.genText(i18n.__(\"fallback.evidence_input\"));\n response = [first];\n }\n\n //yes_confirmation\n else {\n response = {\n text: `This is a default postback message for payload: ${payload}!`\n };\n }\n return response;\n }", "function fetchDataFromApi(request, requestedFields) {\n console.log(\"In fetch data method\");\n \n var otherEndpointFields = [];\n var gamesFields = requestedFields;\n var nonGameFieldsRequested = false;\n \n //remove fields not inside the games endpoint from requested Fields and add them to the other list\n for(var i = 0; i < gamesFields.length; i++){\n if(gamesFields[i] == \"url\"){\n nonGameFieldsRequested = true;\n otherEndpointFields.push(gamesFields[i]);\n gamesFields.splice(i,1);\n }\n }\n \n console.log(\"otherEndpointFields: \" + JSON.stringify(otherEndpointFields));\n \n //modify the data from the request to put it in an acceptable form for IGDB API\n var fields = \"\";\n for(var i = 0; i < gamesFields.length; i++){\n if(i + 1 != gamesFields.length){\n fields += gamesFields[i] + \",\";\n }\n else{\n fields += gamesFields[i];\n }\n }\n \n console.log(\"fields: \" + fields);\n \n var beginningTime = convertDate(request.dateRange.startDate);\n console.log(\"beginningTime: \" + beginningTime);\n var endingTime = convertDate(request.dateRange.endDate);\n console.log(\"endingTime: \" + endingTime);\n \n \n var load = \"fields \" + fields + \"; sort popularity desc; where rating > 0 & first_release_date > \" + beginningTime + \" & first_release_date < \";\n \n load += endingTime + \";\" + \"limit 20;\";\n \n console.log(\"payload: \" + load);\n \n \n var url = \"https://api-v3.igdb.com/games\";\n \n //make HTTP query\n var responseString = UrlFetchApp.fetch(url, {\n headers: {\n 'user-key': 'add user-key here',\n 'Accept': 'application/json'\n }, method: 'post',\n payload: load,\n muteHttpExceptions : true \n });\n \n //adds in metrics from other endpoints if any are requested\n if(nonGameFieldsRequested){\n responseString = addOtherFields(responseString, otherEndpointFields, request.fields);\n }\n \n console.log(responseString);\n return JSON.parse(responseString);\n \n}", "async function handleIdentifyRoute(req, res) {\n let handled = false;\n\n // parse the route: /maps/default/{layerName}/query\n if (req.url.match(/maps\\/default\\/\\w+\\/query/ig)) {\n let parameters = parseIdentifyParameters(req);\n let features = await getIdentifyFeatures(parameters);\n let featureCollection = new G.FeatureCollection(features);\n res.writeHead(200, {'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*'});\n res.end(JSON.stringify(featureCollection.toJSON()));\n handled = true;\n }\n\n return handled;\n}", "function checkForLookupRequests(data, callback){\n\tconsole.log('checkForLookupRequests');\n\t\n\tif(data.context && data.context.action && data.context.action.lookup && data.context.action.lookup!= 'complete'){\n\t\tvar workspace = process.env.WORKSPACE_ID || WORKSPACE_ID;\n\t var payload = {\n\t\t\tworkspace_id : workspace,\n\t\t\tcontext : data.context,\n\t\t\tinput : data.input\n\t\t}\n\t\t\n\t\t//conversation requests a data lookup action\n\t\tif(data.context.action.lookup === LOOKUP_BALANCE){\n\t\t\tconsole.log('Lookup Balance requested');\n\t\t\t//if account type is specified (checking, savings or credit card)\n\t\t\tif(data.context.action.account_type && data.context.action.account_type!=''){\n\t\t\t\t\n\t\t\t\t//lookup account information services and update context with account data\n\t\t\t\tvar accounts = bankingServices.getAccountInfo(7829706, data.context.action.account_type, function(err, accounts){\n\t\t\t\t\t\n\t\t\t\t\tif(err){\n\t\t\t\t\t\tconsole.log('Error while calling bankingServices.getAccountInfo ', err);\n\t\t\t\t\t\tcallback(err,null);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tvar len = accounts ? accounts.length : 0;\n\t\t\t\t\n\t\t\t\t\tvar append_account_response = (data.context.action.append_response && \n\t\t\t\t\t\t\tdata.context.action.append_response === true) ? true : false;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tvar accounts_result_text = '';\n\t\t\t\t\n\t\t\t\t\tfor(var i=0;i<len;i++){\n\t\t\t\t\t\taccounts[i].balance = accounts[i].balance ? numeral(accounts[i].balance).format('$0,0.00') : '';\n\t\t\t\t\t\n\t\t\t\t\t\tif(accounts[i].available_credit)\n\t\t\t\t\t\t\taccounts[i].available_credit = accounts[i].available_credit ? numeral(accounts[i].available_credit).format('$0,0.00') : '';\n\t\t\t\t\t\n\t\t\t\t\t\tif(accounts[i].last_statement_balance)\n\t\t\t\t\t\t\taccounts[i].last_statement_balance = accounts[i].last_statement_balance ? numeral(accounts[i].last_statement_balance).format('$0,0.00') : '';\n\t\t\t\t\n\t\t\t\t\t\tif(append_account_response===true){\n\t\t\t\t\t\t\taccounts_result_text += accounts[i].number + ' ' + accounts[i].type + ' Balance: '+accounts[i].balance +'<br/>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tpayload.context['accounts'] = accounts;\n\t\t\t\t\n\t\t\t\t\t//clear the context's action since the lookup was completed.\n\t\t\t\t\tpayload.context.action = {};\n\t\t\t\t\n\t\t\t\t\tif(!append_account_response){\n\t\t\t\t\t\tconsole.log('call conversation.message with lookup results.');\n\t\t\t\t\t\tconversation.message(payload, function(err, data) {\n\t\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\t\tconsole.log('Error while calling conversation.message with lookup result', err);\n\t\t\t\t\t\t\t\tcallback(err,null);\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tconsole.log('checkForLookupRequests conversation.message :: ',JSON.stringify(data));\n\t\t\t\t\t\t\t\tcallback(null, data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.log('append lookup results to the output.');\n\t\t\t\t\t\t//append accounts list text to response array\n\t\t\t\t\t\tif(data.output.text){\n\t\t\t\t\t\t\tdata.output.text.push(accounts_result_text);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//clear the context's action since the lookup and append was completed.\n\t\t\t\t\t\tdata.context.action = {};\n\t\t\t\t\t\t\n\t\t\t\t\t\tcallback(null, data);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}else if(data.context.action.lookup === LOOKUP_TRANSACTIONS){\n\t\t\tconsole.log('Lookup Transactions requested');\n\t\t\tbankingServices.getTransactions(7829706, data.context.action.category, function(err, transaction_response){\n\t\t\t\n\t\t\t\tif(err){\n\t\t\t\t\tconsole.log('Error while calling account services for transactions', err);\n\t\t\t\t\tcallback(err,null);\n\t\t\t\t}else{\n\t\t\t\t\n\t\t\t\t\tvar responseTxtAppend = '';\n\t\t\t\t\tif(data.context.action.append_total && data.context.action.append_total === true){\n\t\t\t\t\t\tresponseTxtAppend += 'Total = <b>'+ numeral(transaction_response.total).format('$0,0.00') + '</b>';\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(transaction_response.transactions && transaction_response.transactions.length>0){\n\t\t\t\t\t\t//append transactions\n\t\t\t\t\t\tvar len = transaction_response.transactions.length;\n\t\t\t\t\t\tfor(var i=0; i<len; i++){\n\t\t\t\t\t\t\tvar transaction = transaction_response.transactions[i];\n\t\t\t\t\t\t\tif(data.context.action.append_response && data.context.action.append_response===true){\n\t\t\t\t\t\t\t\tresponseTxtAppend += '<br/>'+transaction.date+' &nbsp;'+numeral(transaction.amount).format('$0,0.00')+' &nbsp;'+transaction.description;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(responseTxtAppend != ''){\n\t\t\t\t\t\tconsole.log('append lookup transaction results to the output.');\n\t\t\t\t\t\tif(data.output.text){\n\t\t\t\t\t\t\tdata.output.text.push(responseTxtAppend);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//clear the context's action since the lookup and append was completed.\n\t\t\t\t\t\tdata.context.action = {};\n\t\t\t\t\t}\n\t\t\t\t\tcallback(null, data);\n\t\t\t\t\t\n\t\t\t\t\t//clear the context's action since the lookup was completed.\n\t\t\t\t\tpayload.context.action = {};\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\n\t\t\t});\n\t\t\t\n\t\t}else{\n\t\t\tcallback(null, data);\n\t\t\treturn;\n\t\t}\n\t}else{\n\t\tcallback(null, data);\n\t\treturn;\n\t}\n\t\n}", "function enemyLookUp(eName, playerMatches, playerID){\n //get enemy level and ID\n $.getJSON(\"https://na.api.pvp.net/api/lol/na/v1.4/summoner/by-name/\" + eName + \"?api_key=\" + API_KEY, function(enemy){\n enemyID = enemy[eName].id;\n $(\"#eLevel\").text(enemy[eName].summonerLevel)\n $(\"#eID\").text(enemyID)\n\n //new JSON request to get enemy matchlist\n $.getJSON(\"https://na.api.pvp.net/api/lol/na/v2.2/matchlist/by-summoner/\" + enemyID + \"?api_key=\" + API_KEY, function(enemyMatchList){\n var enemyMatches = enemyMatchList.matches;\n var length = enemyMatchList.totalGames;\n \n //holds enemy matches\n var eMatchList = [];\n //holds in common matches\n var inCommon = [];\n \n //add all of the enemy's match ID's to eMatchList\n for(var i = 0; i< length; i++){\n eMatchList.push(enemyMatches[i].matchId)\n }\n\n //if the player's match ID is within eMatchList, add it to inCommon\n compareMatchLists(playerMatches, eMatchList, inCommon, playerID, enemyID);\n // player matchlist is a list of game objects, inCommon is a list of common matchIDs btw player1 and player2\n calculateWinPercentage(playerMatches, playerID, inCommon);\n });\n });\n }", "function requestServerStat() {\n\t\t\t\tvar infoContainers = $('.serverInfoContainer');\n\t\t\t\tfor(var index = 0; index< infoContainers.length; index++){\n\t\t\t\t\tvar request = new InfoRequest(infoContainers[index]);\n\t\t\t\t\trequest.request();\n\t\t\t\t\trequest.startInterval();\n\t\t\t\t}\n\t\t\t}", "function Controller () {\n /**\n * shared logic for handling Feature Service requests\n * most providers will use this mehtod to figure out what request is being made\n *\n * @param {Object} req\n * @param {Object} res\n * @param {Object} err\n * @param {Object} data\n * @param {Function} callback\n */\n function processFeatureServer (req, res, err, data, callback) {\n delete req.query.geometry\n\n if (err) return res.status(500).json(err)\n if (!data) return res.status(400).send('There a problem accessing this repo')\n if (callback) callback = sanitizeCallback(callback)\n // check for info requests and respond like ArcGIS Server would\n if (req._parsedUrl.pathname.substr(-4) === 'info') {\n var arcGisServerLikeResponse = {\n currentVersion: 10.21,\n fullVersion: '10.2.1',\n soapUrl: 'http://sampleserver6.arcgisonline.com/arcgis/services',\n secureSoapUrl: 'https://sampleserver6.arcgisonline.com/arcgis/services',\n authInfo: {\n isTokenBasedSecurity: true,\n tokenServicesUrl: 'https://sampleserver6.arcgisonline.com/arcgis/tokens/',\n shortLivedTokenValidity: 60\n }\n }\n\n return res.status(200).send(arcGisServerLikeResponse)\n }\n\n if (featureServices[req.params.layer]) {\n // requests for specific layers - pass data and the query string\n featureServices[req.params.layer](data, req.query || {}, function (err, d) {\n if (err) {\n res.status(400).send(err)\n return\n }\n // limit response to 1000\n if (d.feature && d.features.length > 1000) {\n d.features = d.features.splice(0, 1000)\n }\n if (callback) {\n res.send(callback + '(' + JSON.stringify(d) + ')')\n } else {\n res.json(d)\n }\n })\n } else {\n // have a layer\n if (req.params.layer && data[req.params.layer]) {\n // pull out the layer data\n data = data[req.params.layer]\n } else if (req.params.layer && !data[req.params.layer]) {\n res.status(404).send('Layer not found')\n }\n if (req.params.method && featureServices[req.params.method]) {\n // we have a method call like \"/layers\"\n featureServices[req.params.method](data, req.query || {}, function (err, d) {\n // limit response to 1000\n if (err) {\n res.status(400).send(err)\n return\n }\n if (d.features && d.features.length > 1000) {\n d.features = d.features.splice(0, 1000)\n }\n if (callback) {\n res.send(callback + '(' + JSON.stringify(d) + ')')\n } else {\n res.json(d)\n }\n })\n } else {\n // make a straight up feature service info request\n // we still pass the layer here to conform to info method, though its undefined\n featureServices.info(data, req.params.layer, req.query, function (err, d) {\n if (err) {\n if (callback) callback(err)\n else res.status(500).send(err)\n }\n if (callback) {\n res.send(callback + '(' + JSON.stringify(d) + ')')\n } else {\n res.json(d)\n }\n })\n }\n }\n }\n\n return {\n processFeatureServer: processFeatureServer\n }\n}", "adoptable(callback){\n alert(\"Mark as Closed?\")\n fetch('/api/requests/adoptable/'+this.props._id,{\n \"method\":'POST',\n 'body':\"\"\n }).then((res)=>{\n if(res.status==200){\n alert(\"The Animal has been listed for Adoption\")\n callback();\n }\n else if(res.status==401){\n alert(\"Unauthorized Activity\")\n }\n else{\n alert(\"Something didn't Sploot Well! Try Again Later!\")\n }\n }\n )\n\n \n\n }", "async discoverAPI(apiDiscoveryUrl) {\n if (typeof apiDiscoveryUrl === 'string') {\n const parts = url.parse(apiDiscoveryUrl);\n if (apiDiscoveryUrl && !parts.protocol) {\n this.log('Reading from file ' + apiDiscoveryUrl);\n const file = await readFile(apiDiscoveryUrl, { encoding: 'utf8' });\n return this.makeEndpoint(JSON.parse(file));\n }\n else {\n this.log('Requesting ' + apiDiscoveryUrl);\n const res = await this.transporter.request({\n url: apiDiscoveryUrl,\n });\n return this.makeEndpoint(res.data);\n }\n }\n else {\n const options = apiDiscoveryUrl;\n this.log('Requesting ' + options.url);\n const url = options.url;\n delete options.url;\n const parameters = {\n options: { url, method: 'GET' },\n requiredParams: [],\n pathParams: [],\n params: options,\n context: { google: { _options: {} }, _options: {} },\n };\n const res = await apirequest_1.createAPIRequest(parameters);\n return this.makeEndpoint(res.data);\n }\n }", "async function getIds(){\n console.log(\"Lider caido, escogiendo nuevo lider...\")\n serversHiguer = [];\n console.log(\"Recoger Id's...\")\n await getRequest('id_server')\n chooseHiguer();\n}", "function playerLookUp(name, enemyName){\n //Pulls layer ID and level from API\n $.getJSON(\"https://na.api.pvp.net/api/lol/na/v1.4/summoner/by-name/\" + name + \"?api_key=\" + API_KEY, function(player){\n playerID = player[name].id;\n $(\"#sLevel\").text(player[name].summonerLevel)\n $(\"#sID\").text(playerID)\n\n //New JSON request to get player's matchlist\n $.getJSON(\"https://na.api.pvp.net/api/lol/na/v2.2/matchlist/by-summoner/\" + playerID + \"?api_key=\" + API_KEY, function(playerMatchList){\n var playerMatches = playerMatchList;\n //Once we get the matchlist from the player, do the same for \"enemy\" player, sending it player matchlist\n enemyLookUp(enemyName, playerMatches, playerID);\n });\n \n });\n }", "function handleDiscovery(event, context) {\nvar headers = {\n namespace: 'Alexa.ConnectedHome.Discovery',\n name: 'DiscoverAppliancesResponse',\n payloadVersion: '2',\n messageId: generateUUID()\n };\n\n var accessToken = event.payload.accessToken.trim();\n\n var appliances = [];\n getVeraSession(username,password,PK_Device,function (ServerRelay,RelaySessionToken,PK_Device){\n getStatuses(ServerRelay,PK_Device,RelaySessionToken,function (statusText){\n var Status = parseJson(statusText,\"status\");\n var allDevices = Status.devices;\n var allRooms = Status.rooms;\n var allScenes = Status.scenes;\n var actions = [];\n var roomName = \"Unknown Room\";\n var applicanceId = \"\";\n deviceLoop:\n for(var i = 0; i < allDevices.length; i++) {\n var device = allDevices[i];\n\n if(device.name.indexOf(\"_\") !== 0){\n roomName = \"Unknown Room\";\n for (var j = 0;j<allRooms.length;j++){\n if(allRooms[j].id == device.room){\n roomName = allRooms[j].name;\n break;\n }\n }\n\n var deviceCategory = \"Unknown type of device\";\n applicanceId = device.id.toString();\n switch (device.category){\n case 2:\n deviceCategory = \"Dimmable Switch\";\n actions = [\"turnOff\", \"turnOn\",\"setPercentage\",\"incrementPercentage\",\"decrementPercentage\"];\n break;\n case 3:\n deviceCategory = \"Switch\";\n actions = [\"turnOff\", \"turnOn\"];\n break;\n case 4:\n deviceCategory = \"Sensor\";\n continue deviceLoop;\n case 5:\n deviceCategory = \"Thermostat\";\n applicanceId = \"T\"+device.id.toString();\n actions = [\"setTargetTemperature\", \"decrementTargetTemperature\",\"incrementTargetTemperature\"];\n break;\n case 6:\n deviceCategory = \"Camera\";\n continue deviceLoop;\n case 11:\n deviceCategory = \"Generic IO\";\n continue deviceLoop;\n case 16:\n deviceCategory = \"Humidity Sensor\";\n continue deviceLoop;\n case 17:\n deviceCategory = \"Temperature Sensor\";\n continue deviceLoop;\n case 18:\n deviceCategory = \"Light Sensor\";\n continue deviceLoop;\n default:\n continue deviceLoop;\n }\n\n var applianceDiscovered = {\n applianceId: applicanceId,\n manufacturerName:\"vera\",\n modelName:\"vera \"+deviceCategory,\n version: \"1\",\n friendlyName: device.name,\n friendlyDescription: deviceCategory+\" \"+device.name+\" in \"+roomName,\n isReachable: true,\n \"actions\":actions,\n additionalApplianceDetails: {}\n };\n appliances.push(applianceDiscovered);\n }\n\n }\n\n actions = [\"turnOff\", \"turnOn\"];\n for(var k = 0; k < allScenes.length; k++) {\n var scene = allScenes[k];\n if(scene.name.indexOf(\"_\") !== 0){\n roomName = \"Unknown Room\";\n for (var j2 = 0;j2<allRooms.length;j2++){\n if(allRooms[j2].id == scene.room){\n roomName = allRooms[j2].name;\n break;\n }\n }\n applicanceId = \"S\"+scene.id.toString();\n\n var applianceDiscovered2 = {\n applianceId: applicanceId,\n manufacturerName:\"vera\",\n modelName:\"vera scene\",\n version: \"1\",\n friendlyName: scene.name,\n friendlyDescription: scene.name+\" Scene in \"+roomName,\n isReachable: true,\n \"actions\":actions,\n additionalApplianceDetails: {}\n };\n appliances.push(applianceDiscovered2);\n }\n\n }\n\n appliances.sort(function(a, b) {\n return a.friendlyName.localeCompare(b.friendlyName);\n });\n var payloads = {\n discoveredAppliances: appliances\n };\n var result = {\n header: headers,\n payload: payloads\n };\n\n context.succeed(result);\n\n\n });\n });\n\n}", "function Bookingee_hotelSearchByHotelCode(req, res){\n var hotelReqData;\n currency.find({Code:req.body.CurrencyCode}).then(data => {\n var l = data.length;\n if(l> 0){\n hotelReqData = new searchHotelReq(req.body.SessionID,req.body.HotelCode, req.body.CheckInDate,req.body.CheckOutDate ,req.body.CurrencyCode,req.body.NationalityCode, req.body.Rooms);\n hotel_search(l);\n } else {\n hotelReqData = new searchHotelReq(req.body.SessionID,req.body.HotelCode, req.body.CheckInDate,req.body.CheckOutDate ,\"USD\",req.body.NationalityCode, req.body.Rooms);\n hotel_search(l);\n }\n }).catch(err => {\n logger.error(\"country get error:\", err);\n var resp = new Resp(err, \"400 Bad Request\");\n res.status(400).json(resp);\n })\n\n function hotel_search(l){\n var usernamePassword = config.bookingee.username + ':' + config.bookingee.password;\n //var hotelReqData = new searchHotelReq(req.body.SessionID,req.body.HotelCode, req.body.CheckInDate,req.body.CheckOutDate ,req.body.CurrencyCode,req.body.NationalityCode, req.body.Rooms);\n var headers1 = { \n 'Authorization': 'Basic ' + new Buffer(usernamePassword).toString('base64'),\n 'WBE-Api-Key': config.bookingee.WBE_Api_Key,\n 'Content-Type': 'application/json'\n }\n\n fetch(config.bookingee_org_Api.hotelSearchApi, {\n method: 'post',\n body: JSON.stringify(hotelReqData),\n headers: headers1,\n })\n .then(res => res.json())\n .then(data => {\n if(data.Success == true){\n if(l>0){\n res.send(data)\n } else {\n // res.send(data);\n // calling another function \n currenceyConvert(data);\n }\n }\n }).catch(err => {\n logger.error(\"hotel search error:\", err);\n });\n }\n function currenceyConvert(responsedata){\n console.log('currency')\n const options1 = {\n url: config.currency.currency_convertApi+'USD'+'/'+req.body.CurrencyCode,\n method: 'GET',\n strictSSL: false,\n rejectUnauthorized: false\n }\n Request(options1, (error, response, result) => {\n var l = responsedata.Data.Hotels.length;\n var convresult = JSON.parse(result);\n var conversionrate = convresult.body[0].conversionRate;\n // console.log(conversionrate);\n for(let i= 0; i<l; i++){\n responsedata.Data.Hotels[i].TotalPrice = Number(responsedata.Data.Hotels[i].TotalPrice * conversionrate);\n responsedata.Data.Hotels[i].Currency = req.body.CurrencyCode; \n }\n res.send(responsedata);\n })\n } \n\n}", "function loop_request(){\r\n let waisted_count = 0; // set to 0\r\n \r\n //requset from api\r\n async function StartR() \r\n {\r\n // request, fetch api data\r\n const response = await fetch(api_url); //fetch\r\n const data = await response.json(); //api\r\n let json_split = JSON.parse(JSON.stringify(data)); // split api data\r\n\r\n // only for the first request\r\n if (beginvar == true){\r\n console.log(\"first try\");\r\n render_call(json_split, waisted_count, beginvar);\r\n last_api = json_split[0].id;\r\n beginvar = false; \r\n } \r\n else{\r\n console.log(\"secound try\");\r\n waisted_count = while_count(last_api, json_split);\r\n render_call(json_split, waisted_count, beginvar);\r\n }\r\n console.log(\"assync vege 15perc \" + \"Last API: \" + last_api);\r\n }\r\n StartR();\r\n}", "get normalEncounterList() {\n const encounterInfo = [];\n let pokemonName;\n let hideEncounter = false;\n const getEncounterInfo = function (pokemonName, mimic) {\n var _a;\n const pokerus = (_a = App.game.party.getPokemonByName(pokemonName)) === null || _a === void 0 ? void 0 : _a.pokerus;\n const encounter = {\n image: `assets/images/${(App.game.party.alreadyCaughtPokemonByName(pokemonName, true) ? 'shiny' : '')}pokemon/${pokemonMap[pokemonName].id}.png`,\n pkrsImage: pokerus > GameConstants.Pokerus.Uninfected ? `assets/images/breeding/pokerus/${GameConstants.Pokerus[App.game.party.getPokemonByName(pokemonName).pokerus]}.png` : '',\n EVs: pokerus >= GameConstants.Pokerus.Contagious ? `EVs: ${App.game.party.getPokemonByName(pokemonName).evs().toLocaleString('en-US')}` : '',\n shiny: App.game.party.alreadyCaughtPokemonByName(pokemonName, true),\n hide: hideEncounter,\n uncaught: !App.game.party.alreadyCaughtPokemonByName(pokemonName),\n lock: false,\n lockMessage: '',\n mimic: mimic,\n };\n return encounter;\n };\n // Handling minions\n this.enemyList.forEach((enemy) => {\n var _a, _b, _c, _d;\n // Handling Pokemon\n if (typeof enemy === 'string' || enemy.hasOwnProperty('pokemon')) {\n if (enemy.hasOwnProperty('pokemon')) {\n pokemonName = enemy.pokemon;\n hideEncounter = ((_a = enemy.options) === null || _a === void 0 ? void 0 : _a.hide) ? (((_b = enemy.options) === null || _b === void 0 ? void 0 : _b.requirement) ? !((_c = enemy.options) === null || _c === void 0 ? void 0 : _c.requirement.isCompleted()) : (_d = enemy.options) === null || _d === void 0 ? void 0 : _d.hide) : false;\n }\n else {\n pokemonName = enemy;\n }\n encounterInfo.push(getEncounterInfo(pokemonName, false));\n // Handling Trainers\n }\n else { /* We don't display minion Trainers */ }\n });\n // Handling Mimics\n this.getCaughtMimics().forEach(enemy => {\n pokemonName = enemy;\n encounterInfo.push(getEncounterInfo(pokemonName, true));\n });\n return encounterInfo;\n }", "function displayQuery() {\n //'GET' Request\n var request = new XMLHttpRequest();\n request.open('GET', 'https://api.edamam.com/api/nutrition-data?ingr='+queryString+'&app_id='+Cred.app_id+'&app_key='+Cred.app_key);\n request.onload = function() {\n try {\n var data = JSON.parse(request.responseText);\n if (data[\"parsed\"].length < 1 || data[\"parsed\"] == undefined){\n throw \"error\";\n }\n console.log(\"used edamam\");\n frontend.changeSearchOutput(queryString,data.healthLabels,data.calories);\n }\n catch(err)\n {\n //'POST' Request\n var request2 = new XMLHttpRequest();\n request2.open('POST', 'https://trackapi.nutritionix.com/v2/natural/nutrients' );\n request2.setRequestHeader( 'x-app-id',Cred.x_app_id );\n request2.setRequestHeader( 'x-app-key',Cred.x_app_key );\n request2.setRequestHeader( 'x-remote-user-id',Cred.x_remote_user_id );\n request2.setRequestHeader( 'Content-Type','application/json' );\n //https://blog.garstasio.com/you-dont-need-jquery/ajax/#posting\n //https://docs.google.com/document/d/1_q-K-ObMTZvO0qUEAxROrN3bwMujwAN25sLHwJzliK0/edit\n //https://gist.github.com/sgnl/bd760187214681cdb6dd\n var jsonData = { query: queryString };\n var myJSON = JSON.stringify(jsonData);\n request2.send(myJSON);\n request2.onload = function() {\n try {\n var returnJSON = JSON.parse(request2.responseText);\n var nutribool = returnJSON.hasOwnProperty('message');\n if (nutribool == true)\n {\n throw error;\n }\n else\n {\n console.log(\"used NutritionX\");//diplay results found from NutritionX api\n frontend.changeSearchOutput(queryString,returnJSON[\"foods\"][0][\"food_name\"],returnJSON[\"foods\"][0][\"nf_calories\"]);\n }\n }\n catch(err) {\n frontend.inputNotFound(queryString);//diplay that nothing was found from either api\n }\n }\n }\n }\n request.send();\n}", "function findEntities(data)\n{\n var entities = {\"controllers\":{}, \"switches\":{}, \"hosts\":{}};\n for (var i = 0; i < data.length-1; i++) {\n var e = jQuery.parseJSON(data[i]);\n var eventHandlerMap = {\n \"ControllerStateChange\" : [findController],\n \"ControllerFailure\" : [findController],\n \"ControllerRecovery\" : [findController],\n \"ControlMessageSend\" : [findController, findSwitch],\n \"ControlMessageReceive\" : [findController, findSwitch],\n \"TrafficInjection\" : [findHost],\n \"HostMigration\" : [findHost],\n \"DataplaneDrop\" : [findSwitch, findHost]\n }\n if (e.class in eventHandlerMap) {\n var eventHandlers = eventHandlerMap[e.class];\n for (var j = 0; j < eventHandlers.length; j++) {\n eventHandlers[j]();\n } \n }\n }\n\n function findController() {\n if (!(e[\"controller_id\"] in entities[\"controllers\"])) {\n entities[\"controllers\"][e[\"controller_id\"]] = [];\n }\n }\n\n function findSwitch() {\n if (!(e[\"dpid\"] in entities[\"switches\"])) {\n entities[\"switches\"][e[\"dpid\"]] = [];\n }\n }\n\n function findHost() {\n if (!(e[\"host_id\"] in entities[\"hosts\"])) {\n entities[\"hosts\"][e[\"host_id\"]] = [];\n }\n }\n return entities;\n}", "submitRequest(IDs, names) {\n this.setState({schoolList: names, \n agreementKeys: IDs.agreements.map( (arg) => {return arg.major})\n })\n\n RequestAPI().requestAgreements(IDs)\n .then( data => {\n let lookup = new Map()\n for(let i = 0; i < data.lookup.length; i++) {\n lookup.set(data.lookup[i].key, data.lookup[i].course)\n }\n this.setState({pageNumber: 2, lookupTable: lookup, equivalencyMatrix: data.equivalencyMatrix})\n })\n .catch( err => {console.log(err)} )\n }", "async discoverAllAPIs(discoveryUrl) {\n const headers = this.options.includePrivate\n ? {}\n : { 'X-User-Ip': '0.0.0.0' };\n const res = await this.transporter.request({\n url: discoveryUrl,\n headers,\n });\n const items = res.data.items;\n const apis = await Promise.all(items.map(async (api) => {\n const endpointCreator = await this.discoverAPI(api.discoveryRestUrl);\n return { api, endpointCreator };\n }));\n const versionIndex = {};\n // tslint:disable-next-line no-any\n const apisIndex = {};\n for (const set of apis) {\n if (!apisIndex[set.api.name]) {\n versionIndex[set.api.name] = {};\n apisIndex[set.api.name] = (options) => {\n const type = typeof options;\n let version;\n if (type === 'string') {\n version = options;\n options = {};\n }\n else if (type === 'object') {\n version = options.version;\n delete options.version;\n }\n else {\n throw new Error('Argument error: Accepts only string or object');\n }\n try {\n const ep = \n // tslint:disable-next-line: no-any\n set.endpointCreator(options, this);\n return Object.freeze(ep); // create new & freeze\n }\n catch (e) {\n throw new Error(util.format('Unable to load endpoint %s(\"%s\"): %s', set.api.name, version, e.message));\n }\n };\n }\n versionIndex[set.api.name][set.api.version] = set.endpointCreator;\n }\n return apisIndex;\n }", "found(){\n alert(\"Mark as FOund?\")\n fetch('/api/requests/found/'+this.props._id,{\n \"method\":'POST',\n 'body':\"\"\n }).then((res)=>{\n if(res.status==200){\n alert(\"The Animal Has Been Marked as Found \")\n }\n else if(res.status==401){\n alert(\"Unauthorized Activity\")\n }\n else {\n alert(\"Something didn't Sploot Well! Try Again Later!\")\n }\n }\n )\n\n }", "function getMedia(req, result) {\n // JSON, \"instagram\": [ig media], \"yelp\": [yelp media], etc.\n var json_out = {};\n var num_services = 3;\n var gaia_id = req.params.gaia_id;\n console.log(\"getting media from services\");\n\n // here i need: service ids, gaia id. (so just whole location object?)\n\n if (req.query.instagram && req.query.instagram.length) {\n var ig_place_id = req.query.instagram[0].location_id;\n json_out.instagram = [];\n ig.location_media_recent(ig_place_id,\n function(err, ig_media_res, pagination, remaining, limit) {\n if (err) {\n result.send(err);\n } else {\n for (var j in ig_media_res) {\n var thisRes = ig_media_res[j];\n if (thisRes.location) {\n // console.log(thisRes);\n var post = {\n location_id: thisRes.location.id,\n post_id: thisRes.id,\n text: (thisRes.caption ? thisRes.caption.text : \"\"),\n image_url: thisRes.images.standard_resolution.url,\n link: thisRes.link,\n rating: thisRes.likes.count,\n date: (new Date(thisRes.created_time * 1000)).toString()\n };\n json_out.instagram.push(post);\n }\n }\n num_services = finishIfAllDoneMed(num_services, result, json_out, gaia_id);\n return;\n }\n });\n } else {\n num_services = finishIfAllDoneMed(num_services, result, json_out, gaia_id);\n }\n\n // other services here. make call to find media based on location,\n // increment num_services, add posts to json_out.servicename\n\n\n if (req.query.yelp && req.query.yelp.length) {\n var yelp_id = req.query.yelp[0].location_id;\n json_out.yelp = [];\n yelp.business(yelp_id,\n function(err, data) {\n if (err) {\n result.send(err);\n } else {\n // for (var j in ig_media_res) {\n // var thisRes = ig_media_res[j];\n\n // var post = {\n // location_id: thisRes.location.id,\n // post_id: thisRes.id,\n // text: (thisRes.caption ? thisRes.caption.text : \"\"),\n // image_url: thisRes.images.standard_resolution.url,\n // link: thisRes.link,\n // rating: thisRes.likes.count,\n // date: (new Date(thisRes.created_time * 1000)).toString()\n // };\n \n json_out.yelp.push(data);\n // }\n num_services = finishIfAllDoneMed(num_services, result, json_out, gaia_id);\n return;\n }\n });\n } else {\n num_services = finishIfAllDoneMed(num_services, result, json_out, gaia_id);\n }\n\n if (req.query.google && req.query.google.length) {\n var google_id = req.query.google[0].location_id;\n json_out.google = [];\n googlePlaces.placeDetailsRequest({reference: google_id},\n function(error, response) {\n if (error) {\n result.send(error);\n } else {\n // console.log(response);\n if (response.result) {\n var post = response.result;\n json_out.google.push(post);\n }\n num_services = finishIfAllDoneMed(num_services, result, json_out, gaia_id);\n return;\n }\n });\n } else {\n num_services = finishIfAllDoneMed(num_services, result, json_out, gaia_id);\n }\n\n}", "function API(){}", "function API(){}", "reqMatchDetail(fixId) {\n const headers = new _angular_common_http__WEBPACK_IMPORTED_MODULE_0__[\"HttpHeaders\"]()\n .set('x-rapidapi-host', 'v3.football.api-sports.io')\n .set('x-rapidapi-key', 'b21eb12292b3695485d39ea23412ffab');\n this.http.get(this.ROOT_URL + '/fixtures/statistics?fixture=' + fixId, { headers, responseType: 'text' }).subscribe(data => this.reqMatchDetailParser(JSON.parse(data)));\n //this.http.get('https://samymahi.eu/match.json' ,{ responseType: 'text' } ).subscribe( data => this.reqMatchDetailParser( JSON.parse(data) ) );\n }", "function callAPIWhenBottomofListIsReached(entries) {\n if (entries[0].isIntersecting && !ignoreFirstObserverCall) {\n //Call API Here\n if (!loadingData) {\n let idOfLastSuperHero = findTheMaxIdFromSuperheroes(superheroes);\n\n let heroesRemainingToFetch = totalNumberOfHeroes - idOfLastSuperHero;\n\n //Check how many heroes are left to fetch\n //Total heroes are 731, if fetched heroes are 700 then only 31 are remaining so fetch only 31\n //and avoid unnecessary fetching\n numberOfHeroesToFetch =\n heroesRemainingToFetch > numberOfHeroesToFetch\n ? numberOfHeroesToFetch\n : heroesRemainingToFetch;\n\n dispatch(\n fetchNSuperHeroes(idOfLastSuperHero + 1, numberOfHeroesToFetch)\n );\n // dispatch(fetchSuperheroById(100));\n }\n }\n ignoreFirstObserverCall = false;\n }", "function findRequests(req, res) {\n\tRequest.findRequests(req.body, function (err, results) {\n if (err) {\n res.send500('There was an error while searching for your request.');\n } else {\n res.send(results.slice(0,999).map(cleanUpGetResponse));\n }\n });\n}", "controller(model){\r\n Promise.all([\r\n api.sendRequest(`${api.API_URL}/flight`, 'GET'),\r\n api.sendRequest(`${api.API_URL}/airport`, 'GET')\r\n ]).then(allResponses => {\r\n model.flights = allResponses[0];\r\n model.airports = allResponses[1];\r\n })\r\n }", "function connection_handler(req, res){\n\tconsole.log(`New Request for ${req.url} from ${req.socket.remoteAddress}`);\n\tif (req.url === \"/\"){\n\t\tconst main = fs.createReadStream(\"html/main.html\");\n\t\tres.writeHead(200, {\"Content-Type\":\"text/html\"});\n\t\tmain.pipe(res);\n\t}\n\telse if (req.url.startsWith(\"/search\")){\n\t\tconst user_input = url.parse(req.url, true).query; //take an url object return a js object \n\t\tconsole.log(\"Performing PetFinder API request\");\n\t\t//POST method \n\t\tconst authentication_cache = \"./cache/authentication-res.json\";\n\t\tcache_access_token(authentication_cache, user_input, res);\n\t}\n\telse {\n\t\tres.writeHead(404, {\"Content-Type\":\"text/plain\"});\n\t\tres.write(\"404 Not Found\");\n\t\tres.end();\n\t}\n}", "function name(agent){\n var body=JSON.stringify(request.body);\n console.log(body);\n var obj = JSON.parse(body);\n \n // use outputContext[2] when testing in dialogflow console\n //let insuranceNumber=obj.queryResult.outputContexts[2].parameters.Insurance_Number;\n //let fever=obj.queryResult.outputContexts[2].parameters.Number2;\n //let preCon=obj.queryResult.outputContexts[2].parameters.Precondition;\n //let headInjury=obj.queryResult.outputContexts[2].parameters.Head_Injury;\n //let fracture=obj.queryResult.outputContexts[2].parameters.Fracture;\n \n let insuranceNumber=obj.queryResult.outputContexts[6].parameters.Insurance_Number;\n let fever=obj.queryResult.outputContexts[6].parameters.Number2;\n let preCon=obj.queryResult.outputContexts[6].parameters.Precondition;\n let headInjury=obj.queryResult.outputContexts[6].parameters.Head_Injury;\n let fracture=obj.queryResult.outputContexts[6].parameters.Fracture;\n console.log(insuranceNumber);\n let surname=obj.queryResult.parameters.givenname;\n let lastname=obj.queryResult.parameters.lastname;\n let mail=obj.queryResult.parameters.email;\n let birthDate=obj.queryResult.parameters.dateOfBirth; \n let params='InsuranceNumber='+ insuranceNumber + '&Surname=' + surname + '&Lastname=' + lastname + '&Mail=' + mail + '&dataOfBirth=' + birthDate;\n\tlet data = '';\n let url = encodeURI(`https://hook.integromat.com/zbeedk5u73hmh2jpay5w835anxq4x4kx?` + params);\n\treturn new Promise((resolve, reject) => { \n const request = https.get(url, (res) => {\n res.on('data', (d) => {\n data += d;\n agent.add(`Thanks`);\n console.log(`Thanks`); \n console.log(body);\n var name = surname + ` ` + lastname;\n consultationNeededPrompt(agent, name, fever, preCon, headInjury, fracture); \n });\n res.on('end', resolve);\n });\n request.on('error', reject);\n });\n }", "function findAllPokemon(req, res, next) {\n if (req.query.name) {\n return findByName(req, res, next)\n }\n getApiPokemon()\n .then(promArr => {\n Promise.all(promArr)\n .then(results => {\n const apiReqs = []\n results.forEach(e => {\n const apiPokeId = e.data.id\n const apiPokeName = e.data.name\n const apiPokeImg = e.data.sprites.front_default\n const apiPokeAttack = e.data.stats[1].base_stat\n const apiPokeTypes = e.data.types\n const apiType = []\n apiPokeTypes.forEach(e => {\n apiType.push({name: e.type.name})\n })\n apiReqs.push({\n id: apiPokeId,\n name: apiPokeName,\n img: apiPokeImg,\n attack: apiPokeAttack,\n types: apiType\n })\n Type.findAll()\n .then(myType => {\n apiReqs.forEach(e => {\n e.types.forEach(i => {\n if (!i.id) {\n myType.forEach(e => {\n if (i.name === e.dataValues.name) {\n i.id = e.dataValues.id\n }\n })\n }\n })\n })\n })\n })\n return apiReqs\n })\n .then(apiPokes => {\n getMyPokemon()\n .then(result => {\n const myPokemon = []\n result.forEach( e => {\n myPokemon.push({\n id: e.dataValues.id,\n name: e.dataValues.name,\n img: e.dataValues.img,\n attack: e.dataValues.attack,\n types: e.dataValues.types\n })\n })\n const allPokemons = myPokemon.concat(apiPokes)\n return res.send(allPokemons)\n })\n })\n })\n .catch(err => next(err))\n}", "function BOT_resolveRequest() {\r\n\tBOT_theLastAnswerShort = BOT_reqAnswerShort;\r\n\tBOT_theLastAnswerLong = BOT_reqAnswerLong;\r\n\t\r\n\tBOT_reqSuccess = true;\t\t// contains the result of request on model\r\n\tBOT_reqEmote = \"\";\t\t// contains the emote string\r\n\tBOT_reqAnswerShort = \"\";\t\t// contains the answer string -- mode short\r\n\tBOT_reqAnswerLong = \"\";\t\t// contains the answer string -- mode long\r\n\tBOT_reqFilled = false;\t// true when BOT_reqSuccess, BOT_reqEmote,BOT_reqAnswerShort/long filled\r\n\r\n\r\n\t// ASSUMPTIONS: BOT_theReqPerformative and BOT_theReqTopic exist\r\n\tswitch (BOT_theReqPerformative) { // there is always one (z)\r\n \t\tcase \"a\": BOT_onAsk(); break;\r\n \t\tcase \"b\": BOT_onBravo(); break;\r\n \t\tcase \"c\": BOT_onCriticize(); break;\r\n \t\tcase \"d\": BOT_onDislike(); break;\r\n \t\tcase \"e\": BOT_onEffect(); break;\r\n \t\tcase \"f\": BOT_onFeel(); break;\r\n \t\tcase \"g\": BOT_onGreet(); break;\r\n \t\tcase \"h\": BOT_onHow(); break;\r\n \t\tcase \"i\": BOT_onIntent(); break;\r\n \t\tcase \"j\": BOT_onJudge(); break;\r\n \t\tcase \"k\": BOT_onKnow(); break;\r\n \t\tcase \"l\": BOT_onLike(); break;\r\n \t\tcase \"m\": BOT_onMore(); break;\r\n \t\tcase \"n\": BOT_onNo(); break;\r\n \t\tcase \"o\": BOT_onObject(); break;\r\n \t\tcase \"p\": BOT_onPossible(); break;\r\n \t\tcase \"q\": BOT_onQuit(); break;\r\n \t\tcase \"r\": BOT_onReply(); break;\r\n \t\tcase \"s\": BOT_onSuggest(); break;\r\n \t\tcase \"t\": BOT_onTell(); break;\r\n \t\tcase \"u\": BOT_onUndo(); break;\r\n \t\tcase \"v\": BOT_onVerify(); break;\r\n \t\tcase \"w\": BOT_onWhy(); break;\r\n \t\tcase \"x\": BOT_onExecute(); break;\r\n \t\tcase \"y\": BOT_onYes(); break;\r\n \t\tcase \"z\": BOT_onZee(); break; // future extensions\r\n \t\tdefault : break;\r\n\t\t};\r\n\t\r\n\t// ------------------------------ EPILOG ----------------------------------- \r\n\t\r\n\t\r\n\tBOT_reqApplicationPostProcessing(); \r\n\t\r\n\tif(BOT_theReqPerformative != \"z\")\tBOT_theLastPerformative = BOT_theReqPerformative;\r\n\tif(BOT_theReqTopic) {\r\n\t\tBOT_theLastTopic = BOT_theReqTopic;\r\n\t\tBOT_theTopicId = BOT_theReqTopic // sets also the current topic id\r\n\t}\r\n\r\n\tif(BOT_theReqAttribute)\t\tBOT_theLastAttribute = BOT_theReqAttribute;\r\n\tif(BOT_theReqRelation)\t\tBOT_theLastRelation = BOT_theReqRelation;\r\n\tif(BOT_theReqValue)\t\t\tBOT_theLastValue = BOT_theReqValue;\r\n\tif(BOT_theReqStresser)\t\tBOT_theLastStresser = BOT_theReqStresser;\r\n\tif(BOT_theReqText)\t\t\tBOT_theLastText = BOT_theReqText; \r\n\r\n\tBOT_reqAnswerShort = BOT_fillMetaString(BOT_reqAnswerShort); \r\n\tBOT_reqAnswerLong = BOT_fillMetaString(BOT_reqAnswerLong); \r\n\t\r\n\tBOT_traceString += \"SUCCESS \" + BOT_reqSuccess + \"\\n\";\r\n\tBOT_traceString += \"EMOTE \" + BOT_reqEmote + \"\\n\";\r\n\tBOT_traceString += \"SHORT ANSWER \" + BOT_reqAnswerShort + \"\\n\";\r\n\tBOT_traceString += \"LONG ANSWER \" + BOT_reqAnswerLong + \"\\n\";\r\n}", "function setRefillsEvents() {\t\n \tfetch('http://10.241.115.20:8080/setRefills/5', { method: 'GET' })\n \t .then(function(response) {\n \t return response.json();\n \t })\n \t .then(function(myJson) {\n \t\t getRefills(myJson);\n \t\t console.log(myJson);\n \t }, function(e) { console.log(e) });\n }", "function eosRequest(method, elementID) {\n console.log(method, elementID);\n switch (method) {\n case 'pull':\n switch (elementID) {\n case 'hat-hotspot':\n break;\n\n case 'claim-notifications':\n break;\n\n }\n break;\n\n case 'push':\n switch (elementID) {\n case 'want-button':\n $('#purchase-response').hide();\n $('#want-response').show();\n break;\n\n case 'purchase-button':\n eos.contract('promoteit')\n .then((contract) => {\n console.log(\"CONTRACT INIT\");\n contract.buyitem( {\n \"serialnum\": \"0\",\n \"buyername\": \"james\"\n }, {authorization: EOS_CONFIG.contractSender} ) \n .then((res) => {\n console.log(\"POST CALL\");\n console.log(res);\n $('#purchase-response').show();\n $('#want-response').hide();\n $('#hidden-hat').show();\n }).catch((err) => { console.log(err) })\n }).catch((err) => { console.log(err) })\n break;\n\n case 'add-item-button':\n $('#add-item-button').hide();\n $('#add-item-response').show();\n setTimeout(function() {$('#claim-notifications').show()}, 3000);\n break;\n\n case 'receive-reward-button':\n $('#receive-reward-button').hide();\n $('#receive-reward-response').show();\n $('#claim-notifications').hide();\n $('#token-balance-amount').html('3.45');\n break;\n }\n break;\n }\n}", "function getEventIDs(eventSelect) {\r\n var req = new XMLHttpRequest();\r\n req.open(\"GET\", \"http://flip1.engr.oregonstate.edu:4598/events\", true);\r\n req.addEventListener('load', function(){\r\n if (req.status >= 200 && req.status < 400){\r\n var response = JSON.parse(req.responseText);\r\n appendEventID(response, eventSelect);\r\n } else {\r\n console.log(\"Error in network request: \" + req.statusText) \r\n }\r\n })\r\n req.send(null);\r\n}", "function main () {\n app.use(bodyParser.json());\n // Routes & Handlers\n app.get('/list',cacheMiddleware(10), function (req, res) {\n connection.query('select * from list', function (error, results, fields) {\n if (error) throw error;\n memCache.put(req.mCacheKey, results,1200000);\n incrementApiHitCount(req.mCacheKey);\n res.json(results);\n });\n});\n\napp.get('/emplist',cacheMiddleware(10), function (req, res) {\n connection.query('select * from list', function (error, results, fields) {\n if (error) throw error;\n memCache.put(req.mCacheKey, results,1200000);\n incrementApiHitCount(req.mCacheKey);\n res.json(results);\n });\n});\n \napp.get('/apilist/:key',cacheMiddleware(10), function (req, res) {\n let apikey=req.params.key;\n connection.query('select word from filter_words where siteid in (select siteid from keyinfo where api_key=?)',apikey, function (error, results, fields) {\n if (error) throw error;\n if(results.length>0) {\n memCache.put(req.mCacheKey, results,1200000);\n incrementApiHitCount(req.mCacheKey);\n res.json(results);\n }\n else{\n let emptyResponse='Invalid Key';\n res.json(emptyResponse);\n }\n });\n\n \n});\n app.listen(port, () => console.log(`Server is listening on port: ${port}`));\n\n}", "show(id, query_params = {}) {\n const query = Object(_api__WEBPACK_IMPORTED_MODULE_5__[\"toQueryString\"])(query_params);\n const key = `show|${id}|${query}`;\n const services = ['guests', 'events'];\n const serviceName = this.api_route;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route()}/${id}${query ? '?' + query : ''}`;\n let result = null;\n //resolve(this.process({\"name\":\"shamir\",\"email\":\"[email protected]\",\"phone\":\"0556257959\",\"organisation\":\"Nuevezo\",\"notes\":\"great guy\",\"checked_in\":false,\"visit_expected\":true,\"extension_data\":{\"whatever\":\"you want\",\"perferred_coffee\":\"Flat white, skim milk, one sugar\"}}))\n if (!services.includes(serviceName)) {\n Object(_placeos_ts_client__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(url).subscribe((d) => {\n console.log(d);\n result = this.process(d);\n }, (e) => {\n reject(e);\n this._promises[key] = null;\n }, () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), 1000);\n });\n }\n else {\n if (serviceName === 'guests') {\n Object(_placeos_ts_client__WEBPACK_IMPORTED_MODULE_2__[\"post\"])('http://localhost:3000/visitorcheck', {\n email: id,\n }).subscribe((d) => {\n if (d === null) {\n result = null;\n }\n else {\n result = this.process(d);\n }\n }, (e) => {\n reject(e);\n this._promises[key] = null;\n }, () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), 1000);\n });\n }\n else if (serviceName === 'events') {\n resolve(this.process({\n id: 'aqmkadawatnizmyazc1jntuams1knzljltawai0wmaoargaaa5drsxwsq85fn',\n status: 'accepted',\n host: 'rishabh.awa@email',\n hostphone: '055443322',\n attendees: [\n {\n name: 'shamir',\n email: '[email protected]',\n },\n ],\n title: 'name of the meeting',\n body: 'event details',\n private: false,\n date: 1609851180,\n event_start: 1609851180,\n event_end: 1614662400,\n timezone: 'Sydney',\n all_day: false,\n location: 'clear text location',\n recurring: true,\n recurrence: {\n range_start: 12345,\n range_end: 23456,\n days_of_week: 4,\n interval: 2,\n pattern: 1,\n },\n extension_data: { whatever: 'you want' },\n }));\n //1609853180\n }\n }\n });\n }\n return this._promises[key];\n }", "function v1Endpoints(server, rooms, lessons, degrees, courses) {\n // Corsi\n server.get('/v1/degrees', (req, res, next) => {\n //res.json(degrees)\n\t\tres.header('content-type', config.debug ? 'text' : 'json')\n\t\tres.send(config.debug ? prettyjson.render(degrees) : degrees)\n next()\n })\n\n server.get('/v1/degrees/:abbr/courses', (req, res, next) => {\n //res.json(courses.filter(x => x.laurea == req.params.abbr))\n\t\tres.header('content-type', config.debug ? 'text' : 'json')\n\t\tres.send(config.debug ? prettyjson.render(courses.filter(x => x.laurea == req.params.abbr)) : courses.filter(x => x.laurea == req.params.abbr))\n next()\n })\n\n server.get('/v1/degrees/:abbr/courses/semesters/:sem', (req, res, next) => {\n //res.json(courses.filter(x => x.laurea == req.params.abbr && x.semestre == req.params.sem))\n\t\tres.header('content-type', config.debug ? 'text' : 'json')\n\t\tres.send(config.debug ? prettyjson.render(courses.filter(x => x.laurea == req.params.abbr && x.semestre == req.params.sem)) : courses.filter(x => x.laurea == req.params.abbr && x.semestre == req.params.sem))\n next()\n })\n\n // Edifici\n server.get('/v1/buildings', (req, res, next) => {\n let buildings = new Set()\n for(let i in rooms) {\n buildings.add(rooms[i].building)\n }\n //res.json(Array.from(buildings))\n res.header('content-type', config.debug ? 'text' : 'json')\n config.debug ? res.send(prettyjson.render(Array.from(buildings))) : res.send(Array.from(buildings))\n next()\n })\n\n server.get('/v1/buildings/:name/rooms', (req, res, next) => {\n //res.json(queries.getRoomsInBuilding(rooms, req.params.name))\n\t\tres.header('content-type', config.debug ? 'text' : 'json')\n\t\tres.send(config.debug ? prettyjson.render(queries.getRoomsInBuilding(rooms, req.params.name)) : queries.getRoomsInBuilding(rooms, req.params.name))\n next()\n })\n\n // Lezioni\n server.get('/v1/lessons/days/:day', (req, res, next) => {\n //res.json(lessons.filter(x => x.lessons == req.params.day))\n\t\tres.header('content-type', config.debug ? 'text' : 'json')\n\t\tres.send(config.debug ? prettyjson.render(lessons.filter(x => x.lessons == req.params.day)) : lessons.filter(x => x.lessons == req.params.day))\n next()\n })\n\n server.get('/v1/lessons/days/:day/:hour/:minute', (req, res, next) => {\n const moment = moment(parseInt(req.params.hour).toString() + \":\" + parseInt(req.params.minute).toString())\n //res.json(queries.getLessonsDuringMoment(lessons, req.params.day, moment))\n\t\tres.header('content-type', config.debug ? 'text' : 'json')\n\t\tres.send(config.debug ? prettyjson.render(queries.getLessonsDuringMoment(lessons, req.params.day, moment)) : queries.getLessonsDuringMoment(lessons, req.params.day, moment))\n next()\n })\n\n server.get('/v1/lessons/buildings/:bld', (req, res, next) => {\n const isInBuilding = (roomname, building) => {\n const room = rooms.find(x => x.name == roomname)\n return room && room.building == building\n }\n //res.json(lessons.filter(x => isInBuilding(x.room, req.params.bld)))\n\t\tres.header('content-type', config.debug ? 'text' : 'json')\n\t\tres.send(config.debug ? prettyjson.render(lessons.filter(x => isInBuilding(x.room, req.params.bld))) : lessons.filter(x => isInBuilding(x.room, req.params.bld)))\n next()\n })\n\n server.get('/v1/lessons/rooms/:room', (req, res, next) => {\n //res.json(lessons.filter(x => x.room == req.params.room))\n\t\tres.header('content-type', config.debug ? 'text' : 'json')\n\t\tres.send(config.debug ? prettyjson.render(lessons.filter(x => x.room == req.params.room)) : lessons.filter(x => x.room == req.params.room))\n next()\n })\n}", "setupForMultiRequest(responses) {\n\t\tthis.request = (options, success, error) => {\n\t\t\tfor (var response in responses) {\n\t\t\t\tif (options.host === response) {\n\t\t\t\t\tsuccess(responses[response]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "async function sealIssueVC(req, res) {\n const requestedData = req.body.data;\n const vcType = req.body.vcType;\n\n const sealSession = req.body.sealSession;\n\n let dataStore = JSON.parse(await getSessionData(sealSession, \"dataStore\"));\n let didResp = JSON.parse(await getSessionData(sealSession, \"DID\"));\n\n //TODO\n // GET data from SM, parse them in the form of userSessionData, and proceed with the issuance\n\n // const sessionId = req.session.id;\n // const uuid = req.query.uuid; //get the sesionId that is picked up from the response uri\n\n let fetchedData = makeUserDetails(dataStore);\n let vcData = generateCredentialModel(requestedData, fetchedData, vcType);\n console.log(`sealApiControllers.js -- sealIssueVC:: vcData::`);\n console.log(vcData);\n // get the user DID authentication details\n // console.log(`did-${uuid}`);\n // const didResp = claimsCache.get(`did-${uuid}`);\n // Create and push the generated credential to the users wallet\n credentials\n .createVerification({\n sub: didResp.did,\n exp: Math.floor(new Date().getTime() / 1000) + 30 * 24 * 60 * 60,\n claim: vcData,\n vc: [\"/ipfs/QmNbicKYQKCsc7GMXSSJMpvJSYgeQ9K2tH15EnbxTydxfQ\"]\n })\n .then(attestation => {\n let push = pushTransport.send(didResp.pushToken, didResp.boxPub);\n console.log(\n `sealApiControllers.js -- sealIssueVC:: pushingn to wallet::`\n );\n console.log(attestation);\n return push(attestation);\n })\n .then(pushed => {\n console.log(\n `sealApiControllers.js -- sealIssueVC:: user should receive claim in any moment`\n );\n publish(JSON.stringify({ uuid: sealSession, status: \"sent\" }));\n res.send(200);\n });\n}", "function __request(apiURI, allQueries) {\n request(\n\tapiURI + \"?s=\" + allQueries[\"s\"] + \"&v=\" + allQueries[\"v\"]\n , function (error, response, body) {\n if (!error) {\n \tsetRedisPair(allQueries[\"s\"] + allQueries[\"v\"], body, function() {});\n } else {\n console.log('info', responseResult(\"failure\",\"Access the API went error.\",\"\"));\n }\n });\n}", "function onRequest(request, response) {\n \n var parsedreq = urlparser.parse(request.url, true);\n console.log(parsedreq.query);\n var req = parsedreq.pathname.split(\"/\");\n\n //var req = urlparser.parse(request.url).pathname.split(\"/\");\n var requestBody = '';\n var space = req[1];\n var thing = req[2];\n var action = req[3];\n console.log(\"Space: \" + space);\n console.log(\"Thing: \" + thing);\n console.log(\"Action: \" + action);\n \n try {\n if(request.method == \"GET\") {\n \n if (space.length == 0) {\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end(\"<META http-equiv=\\\"refresh\\\" content=\\\"60\\\"><body>\" + userPage() + \"</body>\");\n } else {\n if (thing === \"service\") {\n \n if (parsedreq.query.hasOwnProperty(\"user\")) {\n logEventToDb({'raw': {user: parsedreq.query.user, name: parsedreq.query.name}, 'space':space, 'message': parsedreq.query.name + \" ran service \" + action + \" in space \" + spaceName(space)});\n }\n \n if (action == \"here\") {\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end(\"<META http-equiv=\\\"refresh\\\" content=\\\"60\\\"><body>\" + services.hereService(context, space, request, response)+\"</body>\");\n } else if (action == \"speak\") {\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end(services.speakService(context, space, request, response));\n } else if (action == \"hal\") {\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end(services.halService(context, space, request, response));\n } else if (action == \"stlights\") {\n response.writeHead(200, {'Content-Type': 'text/html'});\n services.stLightsService(context, space, request, response);\n } else if (action == \"athome\") {\n services.atHomeService(context, space, request, response);\n } else {\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end(services.unknownService(context, space, request, response));\n }\n } else if (space === \"allbrains\") {\n allbrains(response);\n } else if (space === \"spaces\") {\n response.writeHead(200, {'Content-Type': 'application/json'});\n response.end(JSON.stringify(spacemetadata,\n undefined, 1));\n \n } else if (thing === \"users\") {\n response.writeHead(200, {'Content-Type': 'application/json'});\n response.end(JSON.stringify({\"users\": spacemap.hasOwnProperty(space) ? spacemap[space] : new Array(),\n }, undefined, 1));\n } else {\n response.writeHead(400, \"No Space Supplied\", {'Content-Type': 'text/html'});\n response.end('<html><head><title>400</title></head><body>400: URI should end in /Channel</body></html>');\n }\n }\n } else {\n if (request.method == \"PUT\") {\n \n if (space.length == 0) {\n //bad post\n response.writeHead(400, \"No Space Supplied\", {'Content-Type': 'text/html'});\n response.end('<html><head><title>400</title></head><body>400: URI should end in /Channel</body></html>');\n } else {\n request.on('data', function (data) {\n requestBody += data;\n if (requestBody.length > 1e7) {\n response.writeHead(413, \"Request Entity Too Large\", { 'Content-Type': 'text/html' });\n response.end('<html><head><title>413</title></head><body>413: Request Entity Too Large</body></html>');\n }\n });\n request.on('end', processPut);\n \n function processPut() {\n \n // debugging\n console.log(\"Data: \" + requestBody);\n \n var rec = JSON.parse(requestBody);\n \n \n if (action.length > 0) {\n if (action == \"leave\") {\n logEventToDb({'raw': rec, 'space':space, 'message': rec.name + \" left \" + spaceName(space) + \" space\"});\n doExitHooks(space, rec);\n } else if (action == \"enter\") {\n logEventToDb({'raw': rec, 'space':space, 'message': rec.name + \" entered \" + spaceName(space) + \" space\"});\n doEnterHooks(space, rec);\n } else if (action == \"refresh\") {\n logEventToDb({'raw': rec, 'space':space, 'message': rec.name + \" refreshed presence in \" + spaceName(space) + \" space\"});\n doRefreshHooks(space, rec);\n } else if (action == \"signoff\") {\n // space is ignored it should be \"all\"\n doGlobalSpaceExit(rec);\n } else {\n \n // error\n }\n \n // return current space user list on entry or exit\n response.writeHead(200, {'Content-Type': 'application/json'});\n response.end(JSON.stringify({\"users\": spacemap.hasOwnProperty(space) ? spacemap[space] : new Array(),\n }, undefined, 1));\n } else {\n // bad req\n response.writeHead(400, request.method + \" not supported without action\", {'Content-Type': 'text/html'});\n response.end('<html><head><title>400</title></head><body>400: Use GET</body></html>');\n }\n }\n \n \n }\n \n } else {\n //bad post\n response.writeHead(400, request.method + \" not supported\", {'Content-Type': 'text/html'});\n response.end('<html><head><title>400</title></head><body>400: Wait, What?</body></html>');\n }\n }\n }\n catch (e) {\n console.log(e);\n console.log(e.stack);\n response.writeHead(400, request.method + \" not supported\", {'Content-Type': 'text/html'});\n response.end('<html><head><title>400</title></head><body>400: OOPS!</body></html>');\n \n }\n \n \n }", "addFetchEventListener() {\n\t\tself.addEventListener('fetch', event => {\n\t\t\tthis.clientId.recent = event.clientId;\n\t\t\t// feed a selfexecuting function\n\t\t\tevent.respondWith((() => {\n\t\t\t\tif (!this.messageChannel) return fetch(event.request);\n\t\t\t\tconst intercept = this.clientId.isApproved() && this.doNotIntercept.every(url => !event.request.url.includes(url)) && this.doIntercept.some(url => event.request.url.includes(url))\n\t\t\t\tconsole.info(`@serviceworker intercept ${intercept}:`, event.request.url);\n\t\t\t\tif (intercept) {\n\t\t\t\t\tconst key = this.getRandomString();\n\t\t\t\t\tthis.messageChannel.postMessage([event.request.url, key]);\n\t\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\t\t// key, [success, failure] functions\n\t\t\t\t\t\tthis.resolveMap.set(key, [(data) => { resolve(new Response(data[0], data[1])); }, () => { resolve(fetch(event.request)); }]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t//console.log('@serviceworker donot-intercept', event.request.url);\n\t\t\t\t\tif (this.justInform.some(url => event.request.url.includes(url))) this.messageChannel.postMessage(['info', event.request.url]);\n\t\t\t\t\treturn fetch(event.request);\n\t\t\t\t}\n\t\t\t})());\n\t\t});\n\t}", "function api_forecastedConditions(request, reply) {\n var lat = request.query.latitude;\n var lon = request.query.longitude;\n var units = (request.query.units) ? request.query.units : \"e\";\n\n console.log(\"Server.js - Getting forecasted conditions @ \" + lat + \", \" + lon + \" in '\" + units + \"' units\");\n wService.getForecastedConditions(lat, lon, units, function(result) {\n // If error, log error and return\n var resultJSON = JSON.parse(result);\n if (resultJSON.statusCode !== 200) reply(result);\n // If success, extract important results and return data\n else {\n var forecastedConditions = {\n units: units,\n statusCode: 200\n };\n var forecasts = resultJSON.forecasts;\n if (forecasts && forecasts.length > 0) {\n // Establish baseline for successful call\n forecastedConditions.resultsReturned = true;\n forecastedConditions.forecasts = [];\n\n // Iterate through results, save to cache, and return forecast\n for (var i=0; i < forecasts.length; i++) {\n // Add general date predictions\n var forecastItem = {};\n forecastItem.date = forecasts[i].fcst_valid_local.substring(0,10);\n forecastItem.minTemp = forecasts[i].min_temp;\n forecastItem.maxTemp = forecasts[i].max_temp;\n forecastItem.narrative = forecasts[i].narrative;\n\n // Add day and night forecast data\n if (forecasts[i].day) forecastItem.day = extractDayNight(forecasts[i].day);\n if (forecasts[i].night) forecastItem.night = extractDayNight(forecasts[i].night);\n\n forecastedConditions.forecasts[i] = forecastItem;\n }\n var fcString = JSON.stringify(forecastedConditions);\n reply(forecastedConditions);\n }\n else {\n forecastedConditions.resultsReturned = false;\n var fcString = JSON.stringify(forecastedConditions);\n reply(fcString);\n }\n }\n })\n}", "function requestGetUnique_ByHits(query, callback) {\n\n// var url = hostUnique + format.queryToURLForm(slotValue_name, slotValue_country, slotValue_region, slotValue_content, slotValue_date, slotValue_solution); \n\n// var url = hostUnique_ByHits + format.queryToURLForm(slotValue_name, slotValue_country, slotValue_region, slotValue_content, slotValue_date); \n\n var url = hostUnique_ByHits + query; \n\n request(url, function(error, response, body) { \n\n console.log(url); \n console.log('error: ', error); \n console.log('statusCode: ', response && response.statusCode); \n console.log('body: ', body); \n callback(JSON.parse(body)); \n\n }); \n\n\n}", "async index(req, res){\n const {page=1} = req.query;\n const ong_id = req.headers.authorization;\n const incidents = await connection('incidents')\n .where('ong_id', ong_id)\n .limit(5)\n .offset((page-1)*5)\n .select('*')\n return res.json(incidents)\n }", "async function search(req, res) {\n const q = req.body.q;\n\n const { data } = await axios.get(\"https://api.wit.ai/message\", {\n params: {\n q,\n v: 20181205\n },\n headers: {\n Authorization: `Bearer ${process.env.WIT_KEY}`\n }\n });\n\n const info = {};\n let rows = await database\n .select(\"id\")\n .from(\"locations\")\n .map(row => row.id);\n\n if (data.entities) {\n await Promise.all(\n Object.keys(data.entities).map(async entityName => {\n const entity = data.entities[entityName][0];\n\n console.log(entity);\n\n if (entity.confidence < 0.9) return;\n\n if (entityName === \"neighborhood\") {\n const center = {\n lat: +entity.metadata.split(\",\")[0],\n lon: +entity.metadata.split(\",\")[1]\n };\n\n info.center = center;\n\n const locationIDs = await database\n .select(\"id\")\n .from(\"locations\")\n .whereRaw(\n `\n (\n 3959 *\n acos(\n cos(radians(${center.lat})) *\n cos(radians(latitude)) *\n cos(\n radians(longitude) - radians(${center.lon})\n ) +\n sin(radians(${center.lat})) *\n sin(radians(latitude))\n )\n ) < 0.75\n `\n )\n .map(row => row.id);\n\n rows = rows.filter(id => locationIDs.includes(id));\n }\n\n // Specific time or day \"tomorrow\", \"in 2 days\", \"now\", \"tomorrow at 3\"\n if (entityName === \"datetime\" && entity.value) {\n const days = [\"sun\", \"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\"];\n const date = new Date(entity.value);\n const day = days[date.getDay()];\n\n const query = database\n .select(\"locations.id\")\n .from(\"meeting_hours\")\n .leftJoin(\"meetings\", \"meeting_hours.meeting_id\", \"meetings.id\")\n .leftJoin(\"locations\", \"meetings.location_id\", \"locations.id\")\n .where({ day });\n\n if (entity.grain === \"hour\" || entity.grain === \"minute\" || entity.grain === \"second\") {\n query.where({ start_time: date.toLocaleTimeString(\"en-GB\") });\n }\n\n query.groupBy(\"locations.id\");\n\n const dayIDs = await query.map(row => row.id);\n\n rows = rows.filter(id => dayIDs.includes(id));\n info.day = day;\n }\n\n // Time range \"before 3pm\", \"after 10a\", \"between 12 and 4\"\n // Because the meetings are a recurring event, it doesn't necessarily make\n // sense to have \"After monday\", as it will wrap around indefinitely\n if (entityName === \"datetime\" && (entity.to || entity.from)) {\n const query = database\n .select(\"locations.id\")\n .from(\"meeting_hours\")\n .leftJoin(\"meetings\", \"meeting_hours.meeting_id\", \"meetings.id\")\n .leftJoin(\"locations\", \"meetings.location_id\", \"locations.id\");\n\n if (entity.from) {\n const date = new Date(entity.from.value);\n query.where(\"start_time\", \">\", date.toLocaleTimeString(\"en-GB\"));\n info.from = date;\n }\n\n if (entity.to) {\n const date = new Date(entity.to.value);\n query.where(\"start_time\", \"<\", date.toLocaleTimeString(\"en-GB\"));\n info.to = date;\n }\n\n query.groupBy(\"locations.id\");\n\n const dayIDs = await query.map(row => row.id);\n\n rows = rows.filter(id => dayIDs.includes(id));\n }\n })\n );\n }\n\n return res.json({\n ids: rows,\n info\n });\n}", "async function getLookUps(req, res) {\n let blResponse = await lookupBl.getLookups(req);\n return res.status(200).json(blResponse);\n}", "function handleDiscovery(event, context) {\n // Creating response header.\n var headers = createHeader(NAMESPACE_DISCOVERY, RESPONSE_DISCOVER);\n var processedPayload = {};\n log('Discovery', 'Handling discovery..');\n if (event.header.name == REQUEST_DISCOVER) {\n requestForUserEmail(event)\n .then(requestForUserDeviceProfiles, log)\n .then(assembleApplianceIdObjects, log)\n .then(function packageAndSendPayload(applianceObjects) {\n processedPayload = {\n discoveredAppliances: applianceObjects\n };\n \n // Craft the final response back to Alexa Connected Home Skill. \n var result = {\n header: headers,\n payload: processedPayload\n };\n \n log('Discovery', result);\n \n context.succeed(result);\n }, log);\n }\n}", "async function openSeaApiOwnerAssetsRequest(address, page, ethSum) {\n if (!page) page = 0;\n if (!ethSum) ethSum = 0;\n console.log(`${address}: Processing page ${page}`);\n await sleep(1100);\n return new Promise((resolve, reject) => {\n const params = {\n host: 'api.opensea.io',\n method: \"GET\",\n path: '/api/v1/assets?asset_contract_address=0x1d20a51f088492a0f1c57f047a9e30c9ab5c07ea&order_direction=desc&offset=' + (page*50) + '&limit=50'\n };\n let req = http.request(params, (res) => {\n if (res.statusCode < 200 || res.statusCode >= 300) {\n console.log(`${address}: Retrying failed request for page ${page}. HTTP status code: ${res.statusCode}`);\n return openSeaApiOwnerAssetsRequest(address, page, ethSum)\n .then(resolve);\n }\n var body = '';\n res.setEncoding('utf8');\n res.on('data', function(chunk) {\n body += chunk;\n });\n res.on('end', function() {\n try {\n let assets = JSON.parse(body).assets;\n console.log(`${address} : Found ${page*50 + assets.length} assets total`);\n ethSum += getTotalAssetValueEth(assets);\n if (assets.length === 50) {\n return openSeaApiOwnerAssetsRequest(address, page + 1, ethSum)\n .then(resolve);\n } else {\n let query = `INSERT INTO addresses (address, eth) values ($1, $2)`;\n let values = [address, ethSum];\n pgClient.query(query, values)\n .then(resolve);\n }\n } catch(e) {\n console.log(`${address}: Retrying failed request for page ${page}. Error: ${e}`);\n return openSeaApiOwnerAssetsRequest(address, page, ethSum)\n .then(resolve);\n }\n });\n });\n req.on('error', (err) => {\n console.log(`${address}: Retrying failed request for page ${page}. Error: ${err}`);\n return openSeaApiOwnerAssetsRequest(address, page, ethSum)\n .then(resolve);\n });\n req.end();\n });\n\n}", "QueryFromNECAIServer(queryText, eventcall) {\n\n request\n .post(queryUrl)\n .set('contentType', 'application/json; charset=utf-8')\n .set('dataType', 'json')\n .send({\n parentID: this.state.botinfo.parentID,\n sessionID: this.state.botinfo.sessionID,\n query: queryText,\n e: eventcall,\n tokenId: tokenID,\n chatbotCollectionName: this.state.botinfo.chatbotCollectionName\n })\n .end((err, res) => {\n\n if(err) {\n console.log('NEC AI query error: ' + err);\n }\n else {\n\n let querysuccess = res.body.success;\n\n if(querysuccess) {\n\n let fulfillment = res.body.res.result.fulfillment;\n let AllMessages = [];\n\n if (fulfillment.messages) {\n\n for (let i = 0; i < fulfillment.messages.length; ++i) {\n\n let message = fulfillment.messages[i];\n\n switch (message.type) {\n case 0:\n\n // Text Response\n AllMessages.push({\n type: 0, \n text:message.speech\n });\n break;\n\n case 4:\n\n // Payload\n switch (message.payload.type) {\n\n case 0:\n\n // Quick Replies\n AllMessages.push({\n type: 1,\n title: message.payload.title,\n qrs: message.payload.quick_replies\n });\n\n break;\n\n case 1:\n\n // link\n AllMessages.push({\n type: 2,\n link: message.payload.link\n });\n\n break;\n\n case 2:\n\n // event\n AllMessages.push({\n type: 3,\n event: message.payload.e\n });\n\n break;\n\n case 3:\n\n // images\n AllMessages.push({\n type: 4,\n title: message.payload.title,\n imageURL: message.payload.imageUrl\n });\n\n break;\n\n case 4:\n\n // Quick Replies\n AllMessages.push({\n type: 5,\n title: message.payload.title,\n qrs: message.payload.quick_replies\n });\n\n console.log(message.payload.quick_replies);\n\n break;\n \n default:\n break;\n\n }\n\n break;\n \n default:\n break;\n }\n\n }\n\n }\n\n let newItem = {\n user: 'ai',\n id: Date.now(),\n AiMessages: AllMessages\n };\n\n // store the msg return from api ai pls\n this.StoreMsg(newItem);\n\n // check got any events\n for (let i = 0; i < AllMessages.length; ++i) {\n\n let message = AllMessages[i];\n\n if (message.type === 3) {\n // got any event to fire?\n // if got any event call?\n console.log('got event pls: ' + message.event);\n this.QueryFromNECAIServer('', message.event);\n }\n }\n\n }\n else {\n console.log('query not success');\n }\n\n }\n \n });\n\n }", "function requestIndicators (sdgs, callback) {\n // console.log('Requesting indicator data…')\n // Request indicator url\n requestURL(urlIndicators, raw => {\n // console.log('Parsing indicator data…')\n // Parse loaded data\n parseCSVString(raw, json => {\n // console.log('Splitting indicator data…')\n // Split CSV between header and content\n splitJSON(json, splitedJSON => {\n const [rawHeader, content] = splitedJSON\n // console.log('Cleaning indicator header data…')\n // Clean array strings\n cleanArrayStrings(rawHeader, header => {\n // console.log('Checking indicator header data…')\n // Check if all required keys are present\n checkArrayStr([...indiHeadersDns, ...indiHeadersOkf], header, () => {\n // Split header based on key to seperate dns and okf headers\n splitHeader(indiSplitKey, header, indiDnsID, indiOkfID, splittedHeader => {\n const [headerDNS, headerOKF, splitPoint] = splittedHeader\n // console.log('Splitting indicator content data…')\n\n // Split content based on split point generated from header splitting to seperate dns and okf headers\n splitContent(splitPoint, content, splittedContent => {\n const [rawContentDNS, rawContentOKF] = splittedContent\n\n // Filter empty rows caused by table layout\n const contentDNS = filterArray(rawContentDNS, indiDnsID, headerDNS)\n const contentOKF = filterArray(rawContentOKF, indiOkfID, headerOKF)\n\n // Build new array consisting of defined keys. Also convert numbers\n const arrDNS = buildNewArray(indiHeadersDns, headerDNS, contentDNS, [...indiNumbers, indiSdgID], indiDnsID)\n const arrOKF = buildNewArray(indiHeadersOkf, headerOKF, contentOKF, [...indiNumbers, indiSdgID], indiOkfID)\n\n // Merge all indicators in single array\n const indicators = arrDNS.concat(arrOKF)\n\n processIndicators(indicators, arr => {\n callback(arr)\n // As some indicators reference each other as modified, the targets should also be marked\n const marked = markModifiedIndicators(arr)\n // console.log('Writing indicator data…')\n // Merge SDG data into indictors for links, color, label, … and write to file\n writeJSONFile('./indicators.json', formatArrayToHash(mergeSDGIntoIndicators(sdgs, marked), 'slug'))\n })\n })\n })\n })\n })\n })\n })\n })\n}", "function checkForLookupRequestsRetail(data, callback) {\n console.log('checkForLookupRequestsRetail');\n\n var workspace = process.env.WORKSPACE_ID || WORKSPACE_ID;\n var payload = {\n workspace_id: workspace,\n context: data.context,\n input: data.input\n }\n console.log(JSON.stringify(data.context, null, 2));\n\n\n if (data.context && data.context.action && data.context.action.lookup && data.context.action.lookup != 'complete') {\n\n if (data.context.action.lookup === LOOKUP_TRANSACTIONS) {\n console.log('Lookup transactions requested');\n\n var transaction_response = {\n total: '',\n category: 'all',\n transactions: [],\n type: ''\n };\n\n if (data.context.action.category)\n transaction_response.category = data.context.action.category;\n if (data.context.action.type)\n transaction_response.type = data.context.action.type\n\n\n real_time_payments.listPayments(data.context.person, function(err, payments) {\n\n if (err) {\n console.log('Error while calling retail banking services for transactions', err);\n callback(err, null);\n } else {\n\n transaction_response.transactions = payments;\n var total = 0;\n for (var i = 0; i < payments.length; i++) {\n total += Math.abs(payments[i].amount);\n }\n transaction_response.total = total;\n\n transaction_response.total = numeral(transaction_response.total).format('$0,0.00');\n\n if (transaction_response.category === 'payment') {\n switch (transaction_response.type) {\n case 'debit':\n transaction_response.type = 'sent';\n break;\n case 'credit':\n transaction_response.type = 'received';\n break;\n default:\n transaction_response.type = '';\n }\n }\n\n payload.context[\"result\"] = transaction_response;\n\n //clear the context's action since the lookup and append was completed.\n payload.context.action = {};\n\n conversation.message(payload, function(err, data) {\n if (err) {\n console.log('Error while calling conversation.message with lookup result', err);\n callback(err, null);\n } else {\n console.log('checkForLookupRequestsRetail conversation.message :: ', JSON.stringify(data, null, 2));\n callback(null, data);\n }\n });\n\n return;\n }\n\n });\n\n } else if (data.context.action.lookup === LOOKUP_CONTACTS) {\n console.log('Lookup contacts requested');\n\n var contact = {};\n var contacts = [];\n var recipients = data.context.person.recipients;\n if (recipients) {\n for (var i = 0; i < recipients.length; i++) {\n contact.fname = recipients[i].currentRecipientFirstName;\n contact.lname = recipients[i].currentRecipientLastName;\n contact.token = recipients[i].token;\n contacts.push(contact);\n }\n }\n\n payload.context[\"result\"] = {\n \"contacts\": contacts\n };\n\n //clear the context's action since the lookup and append was completed.\n payload.context.action = {};\n\n conversation.message(payload, function(err, data) {\n if (err) {\n console.log('Error while calling conversation.message with contacts lookup result', err);\n callback(err, null);\n } else {\n console.log('checkForLookupRequestsRetail contacts conversation.message :: ', JSON.stringify(data, null, 2));\n callback(null, data);\n }\n });\n\n return;\n\n } else if (data.context.action.lookup === LOOKUP_ACCOUNTS) {\n console.log('Lookup accounts requested');\n\n var accounts_response;\n var user = data.context.person;\n var accounts;\n var tokens;\n\n real_time_payments.listTokensUsingCXCTokens(user.id, function(err, myTokens) {\n tokens = myTokens;\n real_time_payments.listDDAAccounts(user.id, function(err, myAccounts) {\n accounts = myAccounts;\n\n\n for (var i = 0; i < accounts.length; i++) {\n //for(var j=0; j < tokens.length; j++) {\n if (accounts[i].number == tokens[0].accountNumber) {\n accounts_response = accounts[i];\n accounts_response.type = accounts[i].name;\n var balance = accounts[i].balance / 100; //round to dollars\n accounts_response.formattedBalance = numeral(balance).format('$0,0.00');\n }\n }\n\n\n var account = data.context.account;\n payload.context['account'] = accounts_response;\n payload.context.action = {};\n\n conversation.message(payload, function(err, data) {\n if (err) {\n console.log('Error while calling conversation.message with accounts lookup result', err);\n callback(err, null);\n } else {\n console.log('checkForLookupRequestsRetail accounts conversation.message :: ', JSON.stringify(data, null, 2));\n callback(null, data);\n }\n });\n\n return;\n });\n });\n\n } else {\n callback(null, data);\n return;\n }\n\n } else if (data.context && data.context.action && data.context.action.update && data.context.action.update != 'complete') {\n\n if (data.context.action.update === UPDATE_SEND_PAYMENT) {\n console.log('send payment requested');\n\n var token = payload.context.result.contacts[0].token;\n var fname = payload.context.result.contact_fname;\n var lname = payload.context.result.contact_lname;\n var amount = payload.context.result.amount;\n if(amount % 1 == 0) {\n amount = amount + '.00';\n }\n\n var account = payload.context.account.number;\n var user = payload.context.person;\n\n var recipients = payload.context.person.recipients;\n if (recipients) {\n for (var i = 0; i < recipients.length; i++) {\n if (recipients[i].currentRecipientFirstName == fname && recipients[i].currentRecipientFirstName == lname)\n token = recipients[i].token;\n console.log('found token in recipients');\n }\n }\n\n real_time_payments.send(token, fname, lname, amount, account, user, function(err) {\n\n if (err) {\n console.log('Error while creating payment', err);\n callback(err, null);\n } else {\n\n //update user account\n var tokens = user.tokens;\n real_time_payments.listDDAAccounts(user.id, function(err, myAccounts) {\n accounts = myAccounts;\n\n\n for (var i = 0; i < accounts.length; i++) {\n //for(var j=0; j < tokens.length; j++) {\n if (accounts[i].number == tokens[0].accountNumber) {\n accounts_response = accounts[i];\n accounts_response.type = accounts[i].name;\n var balance = accounts[i].balance / 100; //round to dollars\n accounts_response.formattedBalance = numeral(balance).format('$0,0.00');\n }\n }\n\n\n var account = data.context.account;\n payload.context['account'] = accounts_response;\n payload.context.action = {};\n\n\n console.log(console.log('createPayment response=' + JSON.stringify(data, null, 2)));\n\n //clear the payload's action\n payload.context.action = {};\n\n conversation.message(payload, function(err, data) {\n if (err) {\n console.log('Error while calling conversation.message with send payment result', err);\n callback(err, null);\n } else {\n console.log('checkForLookupRequestsRetail send payment conversation.message :: ', JSON.stringify(data, null, 2));\n callback(null, data);\n }\n });\n\n });\n }\n\n });\n\n } else {\n callback(null, data);\n return;\n }\n\n\n } else {\n callback(null, data);\n return;\n }\n\n}", "_API_helper_get_rider(e)\n{\n \n//console.log(\"this.API_rider_id = \" + this.API_rider_id);\n\n\n if (this.API_rider_id == undefined)\n return {};\n\n for(let rider of e.data.riders)\n {\n if (rider.rider_id == this.API_rider_id)\n return rider;\n }\n return {};\n}", "function getIssues(req,res){\n console.log(\"---------------------------------\")\n console.log(\"Inside all Issues on server JS\");\n issueModel.getIssues()\n .then(\n function(issues){\n res.json(issues);\n },\n function(err){\n res.status(400).send(err);\n }\n );\n }", "function handleRequest(request, response){ \n if(request.method === \"GET\"){\n //console.log(request.url)\n if(request.url.indexOf('data_sensor') != -1) {\n response.end(JSON.stringify(sensor_data_array));\n } else if(request.url.indexOf('data_new') != -1) {\n getNewData();\n data_new_status = \"waiting for response . . . please be patient\"\n response.end(\"OK\");\n } else if(request.url.indexOf('get_data_status') != -1) {\n response.end(data_new_status);\n } else if(request.url.indexOf('data_weather') != -1) {\n response.end(getWeatherData());\n } else if (request.url.indexOf('weather') != -1) {\n response.end(weatherPage);\n } else if (request.url.indexOf('water-control') != -1) {\n response.end(waterControlPage);\n } else if (request.url.indexOf('mystyle') != -1) {\n response.end(cssPage);\n } else if (request.url.indexOf('project-info') != -1) {\n response.end(projInfoPage);\n } else if (request.url.indexOf('temperature') != -1) {\n response.end(temperaturePage);\n } else if (request.url.indexOf('humidity') != -1) {\n response.end(humdityPage);\n } else if (request.url.indexOf('light') != -1) {\n response.end(lightPage);\n } else if (request.url.indexOf('pressure') != -1) {\n response.end(pressurePage);\n } else if (request.url.indexOf('soil-moisture') != -1) {\n response.end(soilMoisturePage);\n } else if(request.url.indexOf('example.css') != -1) {\n response.end(myStyleCSS);\n } else if(request.url.indexOf('jquery.js') != -1) {\n response.end(jquery);\n } else if(request.url.indexOf('jquery.flot.js') != -1) {\n response.end(jqueryFlot);\n } else if(request.url.indexOf('jquery.flot.time.js') != -1) {\n response.end(jqueryFlotTime);\n }else {\n response.end(projInfoPage);\n }\n } else if(request.method === \"POST\"){\n console.log(\"\\nRECEIVED POST: \")\n request.on('data', function(body) {\n // send the request okay msg to the client\n response.writeHead(200, {'Content-Type': 'text/html'});\n response.end('OK')\n \n // check if its a status packet\n if (body.indexOf('Gateway') > -1) {\n data_new_status = body;\n console.log(\"RX: received a status packet: \" + data_new_status)\n return\n }\n\n // parse the json data\n var sensor_data_json = JSON.parse(body)\n \n // check if the data is connected\n /*if(typeof sensor_data_array[sensor_data.dev_id-1] == 'undefined'){\n console.log(\"ERR: the database isn't configured, do not process the packet\")\n return;\n }*/\n \n // verify the json packet elements\n if (!('dev_id' in sensor_data_json && 'clock' in sensor_data_json && \n request.url == '/upload')){\n console.log(\"ERR: invalid or missing json packet elements, ignoring packet\")\n return;\n }\n // verify the json packet data\n if(sensor_data_json.dev_id < 0 || sensor_data_json.dev_id > 999 || \n sensor_data_json.clock < 1451606400000 || sensor_data_json.clock > 1893456000000){\n console.log(\"ERR: invalid data values, ignoring packet\")\n return;\n }\n // update the get new data status\n data_new_status = \"new data received from the network\"\n \n // check if the sensor array index doesn't exist, create it.\n while( typeof sensor_data_array[sensor_data_json.dev_id-1] == 'undefined'){\n sensor_data_array.push(JSON.parse(JSON.stringify(sensor_data)));\n }\n \n // verify the clock time is correct\n if(sensor_data.clock <= sensor_data_array[sensor_data_json.dev_id-1].newest_time){\n console.log(\"ERR: received packet from the past, perform manual Gateway clock sync\")\n return;\n }\n sensor_data_array[sensor_data_json.dev_id-1].newest_time = sensor_data_json.clock\n newest_data[sensor_data_json.dev_id-1] = sensor_data_json\n \n // get the database name\n database_name = 'sensor_node_' + sensor_data_json.dev_id\n \n // check if the database exists\n nano.db.get(database_name, function(err, body) {\n if(!err){\n // push the file to the database\n var node_db = nano.use(database_name);\n node_db.insert(sensor_data_json, \n sensor_data_json.clock.toString(), function(err, body, header) {\n if (err) {\n console.log('[' + database_name + ']: ', err.message);\n return;\n }\n console.log(body);\n });\n // update the local data\n processJSON(sensor_data_json)\n } \n else if (err.message == 'no_db_file') {\n //if the database does not exist, create it\n nano.db.create(database_name, function(err){\n if(!err){\n var node_db = nano.use(database_name);\n node_db.insert(couchdb_list_view, couchdb_list_view_id,\n function(err, body, header) {\n if (err) {\n console.log('[' + database_name + ']: ', err.message);\n return;\n }\n console.log(body);\n });\n } else {\n console.log(\"CREATE: \" + err.message)\n }\n });\n } else if (err) {\n console.log(\"ERROR: \" + err.message)\n return;\n }\n \n });\n });\n }\n}", "async requestInverterEndpoint() {\n try {\n const inverterUrl = this.apiVersion === 'v2' ? `http://${this.ip}/api/v2/inverter` : `http://${this.ip}:8080/api/inverter`;\n const data = (await (0, axios_1.default)({ url: inverterUrl, ...this.requestOptions })).data;\n const promises = [];\n promises.push(this.setStateAsync(`info.inverter`, JSON.stringify(data), true));\n // V1 has other response, handle it accordingly\n if (this.apiVersion === 'v1') {\n const relevantStates = [\n 'iac1',\n 'iac2',\n 'iac3',\n 'uac1',\n 'uac2',\n 'uac3',\n 'udc',\n 'temphmi',\n 'tempbdc',\n 'temppu',\n 'pac1',\n 'pac2',\n 'pac3'\n ];\n for (const state of relevantStates) {\n // inverter states are string but are all numbers\n promises.push(this.setStateAsync(`inverter.${state}`, parseFloat(data.status[state]), true));\n }\n }\n else if (this.apiVersion === 'v2') {\n const invererData = data;\n promises.push(this.setStateAsync('inverter.pacTotal', invererData.pac_total, true));\n promises.push(this.setStateAsync('inverter.tmax', invererData.tmax, true));\n promises.push(this.setStateAsync('inverter.ubat', invererData.ubat, true));\n }\n await Promise.all(promises);\n // inverter endpoint exists\n this.inverterEndpoint = true;\n }\n catch (e) {\n if (this.inverterEndpoint) {\n throw new Error(`Could not request inverter endpoint: ${e.message}`);\n }\n else {\n // not all batteries seem to have this endpoint so don't throw an error if it was never there, see Issue #55\n this.log.debug(`Could not request inverter endpoint: ${e.message}`);\n }\n }\n }", "discover(thing_name) {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n this.connection_manager.acquire()\n .then((connection) => {\n const request = new aws_crt_1.http.HttpRequest('GET', `/greengrass/discover/thing/${thing_name}`, new aws_crt_1.http.HttpHeaders([['host', this.endpoint]]));\n const stream = connection.request(request);\n let response = '';\n const decoder = new util_1.TextDecoder('utf8');\n stream.on('response', (status_code, headers) => {\n if (status_code != 200) {\n reject(new DiscoveryError(`Discovery failed (headers: ${headers})`, status_code));\n }\n });\n stream.on('data', (body_data) => {\n response += decoder.decode(body_data);\n });\n stream.on('end', () => {\n const json = JSON.parse(response);\n const discover_response = model.DiscoverResponse.from_json(json);\n resolve(discover_response);\n });\n stream.on('error', (error) => {\n reject(new DiscoveryError(error.toString()));\n });\n stream.activate();\n })\n .catch((reason) => {\n reject(new aws_crt_1.CrtError(reason));\n });\n }));\n }" ]
[ "0.5743216", "0.57232094", "0.57105756", "0.5656899", "0.5627413", "0.56088775", "0.56013936", "0.5593822", "0.5537244", "0.54276264", "0.5409418", "0.53995305", "0.5397861", "0.5373579", "0.5351065", "0.53099394", "0.52977055", "0.52706844", "0.5263961", "0.52608764", "0.5250916", "0.52499044", "0.5248199", "0.5221034", "0.5212367", "0.5197928", "0.5196526", "0.5184231", "0.51817936", "0.51749784", "0.51714253", "0.5157311", "0.51564026", "0.5146524", "0.5145754", "0.5142031", "0.51354957", "0.5134857", "0.5131733", "0.51312375", "0.51037264", "0.510305", "0.509008", "0.5087261", "0.5080436", "0.5075376", "0.5067846", "0.5053816", "0.5049621", "0.5047708", "0.5046692", "0.50441587", "0.5043658", "0.50433636", "0.5042658", "0.50342476", "0.50310075", "0.5030136", "0.5028205", "0.50266474", "0.50181705", "0.50177836", "0.50165683", "0.5005672", "0.5005434", "0.5004928", "0.5004928", "0.50043416", "0.49916485", "0.4989838", "0.4987584", "0.49873132", "0.49872583", "0.49802607", "0.49767855", "0.49716085", "0.49663666", "0.4961791", "0.49603617", "0.49571037", "0.4956101", "0.4949182", "0.49445224", "0.49411058", "0.49400595", "0.49367806", "0.4935956", "0.4934215", "0.49335486", "0.49322063", "0.49321872", "0.4930149", "0.4927424", "0.49261567", "0.49257818", "0.49255165", "0.4923702", "0.49231592", "0.49184468", "0.49128583", "0.49108094" ]
0.0
-1
Multiple column bar chart
function multiColumnBarPlotter(e) { // We need to handle all the series simultaneously. if (e.seriesIndex !== 0) return; var g = e.dygraph; var ctx = e.drawingContext; var sets = e.allSeriesPoints; var y_bottom = e.dygraph.toDomYCoord(0); // Find the minimum separation between x-values. // This determines the bar width. var min_sep = Infinity; for (var j = 0; j < 1; j++) { var points = sets[j]; for (var i = 1; i < points.length; i++) { var sep = points[i].canvasx - points[i - 1].canvasx; if (sep < min_sep) min_sep = sep; } } var bar_width = Math.floor(2.5 / 3 * min_sep); var fillColors = []; var strokeColors = g.getColors(); for (var i = 0; i < strokeColors.length; i++) { fillColors.push(strokeColors[i]); } for (var j = 0; j < sets.length; j++) { ctx.fillStyle = fillColors[j]; ctx.strokeStyle = strokeColors[j]; for (var i = 0; i < sets[j].length; i++) { var p = sets[j][i]; var center_x = p.canvasx; var x_left = center_x - (bar_width / 2); ctx.fillRect(x_left, p.canvasy, bar_width/1, y_bottom - p.canvasy); ctx.strokeRect(x_left, p.canvasy, bar_width/1, y_bottom - p.canvasy); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function multiColumnBarPlotter(e) {\n function darkenColor(colorStr) {\n // Defined in dygraph-utils.js\n var color = Dygraph.toRGB_(colorStr);\n color.r = Math.floor((255 + color.r) / 2);\n color.g = Math.floor((255 + color.g) / 2);\n color.b = Math.floor((255 + color.b) / 2);\n return 'rgb(' + color.r + ',' + color.g + ',' + color.b + ')';\n }\n // We need to handle all the series simultaneously.\n if (e.seriesIndex !== 0) {\n return;\n }\n\n var g = e.dygraph;\n var ctx = e.drawingContext;\n var sets = e.allSeriesPoints;\n var y_bottom = e.dygraph.toDomYCoord(0);\n\n // Find the minimum separation between x-values.\n // This determines the bar width.\n var min_sep = Infinity;\n for (var j = 0; j < sets.length; j++) {\n var points = sets[j];\n for (var i = 1; i < points.length; i++) {\n var sep = points[i].canvasx - points[i - 1].canvasx;\n if (sep < min_sep) {\n min_sep = sep;\n }\n }\n }\n var bar_width = Math.floor(2.0 / 3 * min_sep);\n var fillColors = [];\n var strokeColors = g.getColors();\n for (var i = 0; i < strokeColors.length; i++) {\n fillColors.push(darkenColor(strokeColors[i]));\n }\n\n for (var j = 0; j < sets.length; j++) {\n ctx.fillStyle = fillColors[j];\n ctx.strokeStyle = strokeColors[j];\n for (var i = 0; i < sets[j].length; i++) {\n var p = sets[j][i];\n var center_x = p.canvasx;\n var x_left;\n if (sets.length === 1) {\n x_left = center_x - (bar_width / 2);\n } else {\n x_left = center_x - (bar_width / 2) * (1 - j/(sets.length-1));\n }\n ctx.fillRect(x_left, p.canvasy, bar_width/sets.length, y_bottom - p.canvasy);\n ctx.strokeRect(x_left, p.canvasy, bar_width/sets.length, y_bottom - p.canvasy);\n }\n }\n }", "function createColumnChart(){\n\t\tvar data = matrix;\n\t\tvar margin = {top: 20, right: 20, bottom: 40, left: 40};\n\t\tvar columnPadding = 5;\n var div = d3.select(\".column\");\n var containerWidth = +div._groups[0][0].clientWidth;\n var containerHeight = +div._groups[0][0].clientHeight; \t\t\t\n\t\tvar width = containerWidth - margin.left - margin.right;\n\t\tvar height = containerHeight - margin.top - margin.bottom;\n\t\tvar x = d3.scaleBand().rangeRound([0, width]).padding(0.1);\n var y = d3.scaleLinear().rangeRound([height, 0]);\n\n x.domain(data.map(function(d){ return d.category; }));\n y.domain([0, d3.max(data, function(d){ return d.m1;})]);\n\n // Making svg width and height equal to container's width and height\n var svg = div.select(\"svg\") \n .attr(\"width\", containerWidth)\n .attr(\"height\", containerHeight);\n \n \n /**\n * Adding a group element to transform the origin of the co-ordinate system. This group will act as parent to all other elements so that we don't have\n * to transform each and every component of chart separately and make calculations straightforward (Axes, DataLabel, Column)\n */ \n var rectGroup = svg.append(\"g\")\n .attr(\"width\", width)\n .attr(\"height\", height) \n .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\n\n // Adding Tooltip\n var tip = d3.tip()\n .attr('class', 'd3-tip')\n .offset([-10, 0])\n .html(function(d) {\n return \"<strong>Measure:</strong> <span style='color:red'>\" + d.m1 + \"</span>\";\n });\n\n rectGroup.call(tip);\n\n // Adding Columns\n\t\tvar rect = rectGroup.selectAll(\".bar\").data(data); \n rect.enter()\n .append(\"rect\")\n .attr(\"class\", \"bar\")\n .attr(\"x\", function(d, i){ return x(d.category);})\n .attr(\"y\", function(d){ return y(d.m1)})\n .attr(\"width\", x.bandwidth()) // x.bandwidth() eliminates the hassles of calculating the column width and the innerPadding manually.\n .attr(\"height\", function(d){ return height - y(d.m1)})\n .on(\"mouseover\", tip.show)\n .on(\"mouseout\", tip.hide); \n rect.exit().remove();\n \n // Adding DataLabels\n var textGroup = rectGroup.append(\"g\"); \n var text = textGroup.selectAll(\"text\").data(data); \n text.enter()\n .append(\"text\")\n .text(function(d) {return d.m1;})\n .attr(\"text-anchor\", \"middle\")\n .attr(\"x\", function(d,i){ return x(d.category) + x.bandwidth()/2;})\n .attr(\"y\", function(d){ return y(d.m1)});\n text.exit().remove();\n\n // Adding X-Axis \n rectGroup.append(\"g\")\n .attr(\"class\", \"axis x-axis\")\n .attr(\"transform\", \"translate(0\" + \",\" + height + \")\")\n .call(d3.axisBottom(x));\n \n \n // Adding Y-Axis\n rectGroup.append(\"g\")\n .attr(\"class\", \"axis y-axis\")\n .call(d3.axisLeft(y));\n\n \n\n }", "function drawBar()\n{\n\n\n/*var Barview = new google.visualization.DataView(data);\nBarview.setColumns([0, 1,\n { calc: \"stringify\",\n sourceColumn: 1,\n type: \"string\",\n role: \"annotation\" },\n 2]);*/\n\nvar options = {\n title: \"Bar Chart\",\n width: 600,\n height: 400,\n bar: {groupWidth: \"95%\"},\n legend: { position: \"none\" },\n};\nvar Barchart = new google.visualization.BarChart(document.getElementById(\"barDiv\"));\nBarchart.draw(data, options);\n}", "function drawBar() {\n\n var data = new google.visualization.DataTable();\n data.addColumn('number', 'Date');\n data.addColumn('number', 'Issues');\n\n data.addRows(self.charts.bars.rows);\n\n var options = self.charts.bars.options;\n\n var chart2 = new google.visualization.ColumnChart(\n document.getElementById('chart_div2'));\n\n chart2.draw(data, options);\n }", "function renderBarChart() {\n drawAxisCalibrations();\n var i, j, p, a, x, y, w, h, len;\n\n if (opts.orient === \"horiz\") {\n rotate();\n }\n\n drawAxis();\n\n ctx.lineWidth = opts.stroke || 1;\n ctx.lineJoin = \"miter\";\n\n len = sets[0].length;\n\n // TODO fix right pad\n for (i = 0; i < sets.length; i++) {\n for (j = 0; j < len; j++) {\n p = 1;\n a = rotated ? height : width;\n w = ((a / len) / sets.length) - ((p / sets.length) * i) - 1;\n x = (p / 2) + getXForIndex(j, len + 1) + (w * i) + 1;\n y = getYForValue(sets[i][j]);\n h = y - getYForValue(0) || !isNaN(opts.mapZeroValueTo) && +opts.mapZeroValueTo || 0;\n\n if (isStacked()) {\n // TODO account for negative and positive values in same stack\n w = (a / len) - 2;\n x = getXForIndex(j, len + 1);\n //y = getYForValue(sumY(sets.slice(0, i + 1), j));\n \n // Accounting for negative and positive values in same stack\n y = getYForValue(sumYSigned(sets, i, j));\n }\n\n drawRect(colorOf(i), x, y, w, h);\n }\n }\n }", "function createBars(data, options) {\n // Calculating bar width given the spacing of the bars\n var numberOfBars = data.length;\n var xAxisLength = $(\"#chartarea\").width();\n var barWidth = (xAxisLength - ((numberOfBars + 1) * parseInt(options.barspacing)))/numberOfBars;\n barWidth = Math.floor(barWidth);\n var yScale = yAxis(data, options)[1];\n var barHeight;\n var barColour;\n var barStartPosition;\n\n //for loop that creates the bars for each of the data\n for (var i = 0; i < data.length; i++) {\n barStartPosition = 0;\n //Calculate x offset from y axis\n var xOffset = (i * barWidth) + ((i + 1) * parseInt(options.barspacing));\n var barId = \"bar\" + i;\n for ( var j = 0; j < data[i].length; j++) {\n barId = barId + j;\n barHeight = data[i][j] * yScale;\n drawBar(data, options, barId, xOffset, barHeight, barWidth, options.barcolour[j], barStartPosition, i, j);\n barStartPosition += barHeight;\n if(j === 0) {\n xAxisLabels(options.datalabels[i], barId);\n }\n }\n\n }\n\n // sets CSS formatting options for all bars, data and labels\n $(\".bar\").css({\n \"width\": barWidth,\n \"margin\": 0,\n \"padding\": 0,\n \"border\": 0\n });\n\n // formats the x labels in the color defined in options\n $(\".xaxislabels\").css({\"color\": options.datalabelcolor,\n \"top\": \"100%\",\n \"padding\": \"5%\"\n });\n\n $(\".xaxislabels, .xaxisdata\").css({ \"border\": \"0\",\n \"margin-bottom\": \"2%\",\n \"margin-top\": \"2%\",\n \"padding\": \"0\",\n \"position\": \"absolute\",\n \"text-align\": \"center\",\n \"width\": \"100%\",\n \"font-size\": \"small\"\n })\n}", "function barchart(DATA, topx){\n const topSlice = 10;\n let topDATA = [];\n let col = '';\n switch (topx){\n case 0: // Top Deficit\n let temp = DATA.sort((a, b) => a.Balance - b.Balance).slice(0,topSlice);\n for(let i=0; i<temp.length; i++){\n topDATA.push(Object.assign({}, temp[i]))\n }\n for(let i=0; i<topDATA.length; i++){\n topDATA[i].Balance *= -1\n }\n col = 'Balance';\n break\n case 1: // Top Surplus\n topDATA = DATA.sort((a, b) => b.Balance - a.Balance).slice(0,topSlice);\n col = 'Balance';\n break\n case 2: // Top Export\n topDATA = DATA.sort((a, b) => b.Export - a.Export).slice(0,topSlice);\n col = 'Export';\n break\n case 3: // Top Import\n topDATA = DATA.sort((a, b) => b.Import - a.Import).slice(0,topSlice);\n col = 'Import';\n break\n default: // Top Total\n topDATA= DATA.sort((a, b) => b.Total - a.Total).slice(0,topSlice);\n col = 'Total'\n }\n\n xLinearScale_Bar.domain(topDATA.map(d=>d.Country));\n yLinearScale_Bar.domain([d3.min(topDATA, d=>d[col]), d3.max(topDATA, d=>d[col])]);\n\n gButtomAxis_Bar.call(d3.axisBottom(xLinearScale_Bar))\n .selectAll(\"text\")\n .attr(\"transform\", \"translate(-10,0)rotate(-45)\")\n .style(\"text-anchor\", \"end\");\n gLeftAxis_Bar.call(d3.axisLeft(yLinearScale_Bar));\n\n var gBar = chartGroup_Bar.selectAll(\"rect\").data(topDATA)\n gBar\n .enter()\n .append(\"rect\")\n .merge(gBar)\n .transition().duration(1000)\n .attr(\"x\", d => xLinearScale_Bar(d.Country))\n .attr(\"y\", d => yLinearScale_Bar(d[col]))\n .attr(\"width\", xLinearScale_Bar.bandwidth())\n .attr(\"height\", d=>height_Bar-yLinearScale_Bar(d[col]))\n .attr(\"fill\", \"orange\")\n gBar.exit().remove()\n}", "function singleBarChart(data, options, element) {\n\n // extracts needed information from data\n var values = data.values;\n var scale = data.scale;\n\n // extracts needed information from options\n var chartWidth = options.width;\n var chartHeight = options.height;\n var space = options.spacing;\n var colour = options.colour;\n var labelColour = options.labelColour;\n var labelAlign = options.labelAlign;\n\n // updates the size of the area the the chart is rendered into\n $(element).css({width: (chartWidth + 100) + \"px\", height: (chartHeight + 300) + \"px\"});\n\n // creates the chart area that the bars are rendered to\n var chartArea = $(\"<div>\").attr(\"id\", \"chartArea\");\n $(chartArea).css({width: chartWidth + \"px\", height: chartHeight + \"px\"});\n $(element).append(chartArea);\n\n // determines the maximum value to be displayed on the Y axis of the chart and the width of the bars to be displayed\n var maxY = findMaxY(values, scale);\n var barWidth = (chartWidth / values.length) - space;\n var barHeight;\n var i;\n\n for (i = 0; i < values.length; i++) {\n // creates a bar for each value in values\n var bar = $(\"<div>\").addClass(\"bar\");\n\n // determines the bar's height\n barHeight = values[i] / maxY * chartHeight;\n\n // updates the position, colours, and text displayed for the bar\n $(bar).css({width: barWidth + \"px\", height: barHeight + \"px\", marginLeft: (space + i * (barWidth + space)) + \"px\", top: (chartHeight - barHeight) + \"px\", background: colour, color: labelColour});\n $(bar).text(values[i]);\n\n // determines the position of the labels within the bar (\"top\", \"center\", or \"bottom\")\n if (barHeight < 16) {\n $(bar).text(\"\");\n } else if (labelAlign === \"center\") {\n $(bar).css({lineHeight: barHeight + \"px\"});\n } else if (labelAlign === \"bottom\") {\n $(bar).css({lineHeight: (2 * barHeight - 20) + \"px\"});\n } else {\n $(bar).css({lineHeight: 20 + \"px\"});\n }\n\n // appends the bar to the chart area\n $(chartArea).append(bar);\n }\n}", "function barChart(a, b) {\n\n var data = new google.visualization.arrayToDataTable(barArray, false);\n var chartOptions = {\n title: a,\n width: 400,\n height: 300,\n\n };\n\n var chart = new google.visualization.BarChart(document.getElementById(b));\n\n chart.draw(data, chartOptions);\n }", "plotBarChart(data) {\n this.graph.xAxis('Story')\n .yAxis('Memory used (MiB)')\n .title('Labels')\n .setData(data, story => app.$emit('bar_clicked', story))\n .plotBar();\n }", "function stackedBarChart(data, options, element) {\n\n // extracts needed information from data\n var values = data.values;\n var scale = data.scale;\n var legend = data.legend;\n\n // extracts needed information from options\n var chartWidth = options.width;\n var chartHeight = options.height;\n var space = options.spacing;\n var labelColour = options.labelColour;\n var labelAlign = options.labelAlign;\n\n // updates the size of the area the the chart is rendered into\n $(element).css({width: (chartWidth + 300) + \"px\", height: (chartHeight + 300) + \"px\"});\n\n // creates the chart area that the bars are rendered to\n var chartArea = $(\"<div>\").attr(\"id\", \"chartArea\");\n $(chartArea).css({width: chartWidth + \"px\", height: chartHeight + \"px\"});\n $(element).append(chartArea);\n\n // determines the maximum value to be displayed on the Y axis of the chart and the width of the bars to be displayed\n var maxY = findMaxY(values, scale);\n var barWidth = (chartWidth / values.length) - space;\n var barHeight;\n var i;\n var j;\n\n for (i = 0; i < values.length; i++) {\n // stackHeight keeps track of the current height of each stack\n var stackHeight = 0;\n\n for (j = 0; j < values[i].length; j++) {\n // creates a bar for each value in each array of values\n var bar = $(\"<div>\").addClass(\"bar\");\n\n // determines the bar's height\n barHeight = values[i][j] / maxY * chartHeight;\n\n // updates the position, colours, and text displayed for the bar\n $(bar).css({width: barWidth + \"px\", height: barHeight + \"px\", marginLeft: (space + i * (barWidth + space)) + \"px\", top: (chartHeight - barHeight - stackHeight) + \"px\", background: legend[j][1], color: labelColour});\n $(bar).text(values[i][j]);\n\n // determines the position of the labels within the bar (\"top\", \"center\", or \"bottom\")\n if (barHeight < 16) {\n $(bar).text(\"\");\n } else if (labelAlign === \"center\") {\n $(bar).css({lineHeight: barHeight + \"px\"});\n } else if (labelAlign === \"bottom\") {\n $(bar).css({lineHeight: (2 * barHeight - 20) + \"px\"});\n } else {\n $(bar).css({lineHeight: 20 + \"px\"});\n }\n\n // increases the height of the stack by the height of the current bar\n stackHeight += barHeight;\n\n // appends the bar to the chart area\n $(chartArea).append(bar);\n }\n }\n}", "function barFunction(dataSet){\n var newArr = [];\n // For each get the last (latest) value for chosen component (dataSet) for each country and put into new array\n $.each(dataSet, function(key, arrValue) {\n newArr.push(arrValue[arrValue.length - 1]);\n });\n //get rank\n var sorted = newArr.slice().sort(function(a, b) {\n return b - a;\n });\n var ranks = newArr.slice().map(function(v) {\n return sorted.indexOf(v) + 1;\n });\n\n $.each(newData, function(i, arrValue) {\n //Copy the right data into the dataset for the vertical bar chart (newData) \n arrValue.name = countryListString[i]; //add in correct name as string\n arrValue.y = newArr[i]; //add in latest value\n \n //Then set the correct colour according to the quintile rank \n if (ranks[i] < 11) {\n arrValue.color = 'rgb(135,185,38)';\n } else {\n if (ranks[i] < 21) {\n arrValue.color = 'rgb(0,157,61)';\n } else {\n if (ranks[i] < 31) {\n arrValue.color = 'rgb(41,101,72)';\n } else {\n if (ranks[i] < 41) {\n arrValue.color = 'rgb(96,35,118)';\n } else {\n arrValue.color = 'rgb(50,33,115)';\n }\n }\n }\n }\n });\n //sort the dataset so that it is sorted descending when charted\n newData.sort(function(a, b) {\n return parseFloat(b.y) - parseFloat(a.y);\n });\n}", "function plotBarCh(data, n) { \n\t// data: table\n\t// n: #elements for row\n\n\t\tvar chart, item, row, col, \n\t\t\t\ty_size, x_size, z_size;\n\t\t\n\t\tchart = new THREE.Object3D();\n\t\t\n\t\tx_size = 2*(data.length / n) - 1;\n\t\tz_size = 2*n - 1;\n\t\ty_size = 0;\n\t\t\n\t\tfor (var i=0; i<data.length; i++) {\n\t\t\trow = div(i, n);\n\t\t\tcol = i % n;\n\t\n\t\t\t// new item bar\n\t\t\titem = bar( data[i], getColor( col ) );\n\t\t\titem.position.x = 0.5 + 2*row - (x_size / 2);\n\t\t\titem.position.z = 0.5 + 2*col - (z_size / 2);\n\t\t\tchart.add( item );\n\t\t\n\t\t\ty_size = Math.max(y_size, data[i]);\n\t\t}\n\n\t\treturn arrangeSize(chart, x_size, y_size, z_size);\n\t}", "function createBars(vals) {\n var barLeft;\n if (that.model.get(\"columnShift\")) {\n barLeft = \" style=left:\" + that.model.get(\"columnShift\") + \"px\";\n }\n var html = [\"<div class='bars'\" + barLeft + \">\"];\n for (var i = 0; i < vals.length; i++) {\n html.push(\"<div class='bar bar\" + (i + 1) + \"' style='height:\" + Math.round(100 * vals[i]) + \"%'></div>\");\n }\n html.push(\"</div>\");\n return html.join(\"\");\n }", "function chartBarChartVertical () {\n\n /* Default Properties */\n var svg = void 0;\n var chart = void 0;\n var classed = \"barChartVertical\";\n var width = 400;\n var height = 300;\n var margin = { top: 20, right: 20, bottom: 20, left: 40 };\n var transition = { ease: d3.easeBounce, duration: 500 };\n var colors = palette.categorical(3);\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n\n /* Chart Dimensions */\n var chartW = void 0;\n var chartH = void 0;\n\n /* Scales */\n var xScale = void 0;\n var yScale = void 0;\n var colorScale = void 0;\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n chartW = width - (margin.left + margin.right);\n chartH = height - (margin.top + margin.bottom);\n\n var _dataTransform$summar = dataTransform(data).summary(),\n seriesNames = _dataTransform$summar.seriesNames,\n columnKeys = _dataTransform$summar.columnKeys,\n valueMax = _dataTransform$summar.valueMax;\n\n var valueExtent = [0, valueMax];\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(columnKeys).range(colors);\n }\n\n xScale = d3.scaleBand().domain(columnKeys).rangeRound([0, chartW]).padding(0.15);\n\n yScale = d3.scaleLinear().domain(valueExtent).range([chartH, 0]).nice();\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias barChartVertical\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n // Create SVG element (if it does not exist already)\n if (!svg) {\n svg = function (selection) {\n var el = selection._groups[0][0];\n if (!!el.ownerSVGElement || el.tagName === \"svg\") {\n return selection;\n } else {\n return selection.append(\"svg\");\n }\n }(selection);\n\n svg.classed(\"d3ez\", true).attr(\"width\", width).attr(\"height\", height);\n\n chart = svg.append(\"g\").classed(\"chart\", true);\n } else {\n chart = selection.select(\".chart\");\n }\n\n // Update the chart dimensions and add layer groups\n var layers = [\"barChart\", \"xAxis axis\", \"yAxis axis\"];\n chart.classed(classed, true).attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\").attr(\"width\", chartW).attr(\"height\", chartH).selectAll(\"g\").data(layers).enter().append(\"g\").attr(\"class\", function (d) {\n return d;\n });\n\n selection.each(function (data) {\n // Initialise Data\n init(data);\n\n // Vertical Bars\n var barsVertical = component.barsVertical().width(chartW).height(chartH).colorScale(colorScale).xScale(xScale).dispatch(dispatch);\n\n chart.select(\".barChart\").datum(data).call(barsVertical);\n\n // X Axis\n var xAxis = d3.axisBottom(xScale);\n\n chart.select(\".xAxis\").attr(\"transform\", \"translate(0,\" + chartH + \")\").call(xAxis);\n\n // Y Axis\n var yAxis = d3.axisLeft(yScale);\n\n chart.select(\".yAxis\").call(yAxis);\n\n // Y Axis Label\n var yLabel = chart.select(\".yAxis\").selectAll(\".yAxisLabel\").data([data.key]);\n\n yLabel.enter().append(\"text\").classed(\"yAxisLabel\", true).attr(\"transform\", \"rotate(-90)\").attr(\"y\", -40).attr(\"dy\", \".71em\").attr(\"fill\", \"#000000\").style(\"text-anchor\", \"end\").merge(yLabel).transition().text(function (d) {\n return d;\n });\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return this;\n };\n\n /**\n * Transition Getter / Setter\n *\n * @param {d3.transition} _v - D3 transition style.\n * @returns {*}\n */\n my.transition = function (_v) {\n if (!arguments.length) return transition;\n transition = _v;\n return this;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "function drawBars(data, xScaleFn, yScaleFn) {\n select(\".chart-group\")\n .selectAll(\".bar\")\n .data(data)\n .join(\"rect\")\n .transition()\n .attr(\"class\", \"bar\")\n .attr(\"x\", d => xScaleFn(d.letter))\n .attr(\"y\", d => yScaleFn(d.frequency))\n .attr(\"width\", xScaleFn.bandwidth())\n .attr(\"height\", d => chartHeight - yScaleFn(d.frequency));\n }", "function bar(d) {\r\n\t\t var bar = svg.insert(\"svg:g\", \".y.barHierAxis\")\r\n\t\t .attr(\"class\", \"enter\")\r\n\t\t .attr(\"transform\",function(){if($.browser.msie){\t\t \t \t\t\t\t\t\t\t\t\t\r\n\t\t \t \t\t\t\t\t\t\t\tif(d.children.length * y*1.6 < h){\r\n\t\t \t \t\t\t\t\t\t\t\t\treturn \"translate(-10,5)\";\r\n\t\t \t \t\t\t\t\t\t\t\t}\r\n\t\t \t \t\t\t\t\t\t\t\telse{\r\n\t\t \t \t\t\t\t\t\t\t\t\t//show scroll, need re-adjust the position in IE9\r\n\t\t \t \t\t\t\t\t\t\t\t\treturn \"translate(-2,5)\";\r\n\t\t \t \t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t else{\r\n\t\t\t\t\t\t\t\t\t\t\t return \"translate(0,5)\"; \r\n\t\t\t\t\t\t\t\t\t\t }})\r\n\t\t .selectAll(\"g\")\r\n\t\t .data(d.children)\r\n\t\t .enter().append(\"svg:g\")\r\n\t\t .style(\"cursor\", function(d) { return !d.children ? null : \"pointer\"; })\t\t \r\n\t\t .on(\"click\", showDetail);\r\n\t\r\n\t\t bar.append(\"svg:text\")\r\n\t\t .attr(\"x\", -6)\r\n\t\t .attr(\"y\", y/2+1)\r\n\t\t .attr(\"dy\", \".35em\")\r\n\t\t .attr(\"text-anchor\", \"end\")\r\n\t\t .text(function(d) { \r\n\t\t \t \t /*for current font size and the whole txt width, the max character number is 20*/\r\n\t\t\t \t if(d.Name.length > 20){\r\n\t\t\t \t\t return d.Name.substr(0,18) + \"...\";\r\n\t\t\t \t }\r\n\t\t\t \t else{\r\n\t\t\t \t\t return d.Name; \r\n\t\t\t \t }\r\n\t\t \t\t});\r\n\t\r\n\t\t bar.append(\"svg:rect\")\r\n\t\t .attr(\"width\", function(d) { return x(value(d)); })\r\n\t\t .style(\"fill\", function(d) { return rs.view.getColorByVariancePercentage(d.VariancePercentage,d.Total); })\r\n\t\t .attr(\"height\", y);\r\n\r\n\t\t \t\r\n\t\t return bar;\r\n\t\t}", "function buildCharts() {\n var myChart = Highcharts.chart('barChart', {\n chart: {\n type: 'column'\n },\n title: {\n text: 'So You Think <em> Your </em> Airport Is Crowded?'\n },\n subtitle: {\n text: 'Source: CIA World Factbook'\n },\n xAxis: {\n categories: xCat\n },\n yAxis: {\n title: {\n text: 'Number of People for Every One Airport'\n }\n },\n series: [{\n name: 'Number of People at Every Airport',\n data: numAirports\n }]\n }); //end of Highcharts.chart\n }", "function drawMultiBarGraph(svg, coords, data, yAttrs, attributes) {\n\n // compute the axes\n var xData = data[0]['data'].map(function(elt) { return elt[0] });\n var xAxis = createBarAxisX(\n xData,\n [coords['x'], coords['x'] + coords['width']],\n coords['axisPadding']);\n xAxis.scale().padding(style('multiBarPadding'));\n var yAxis = createLinearAxisY(\n [yAttrs['min'], yAttrs['max']],\n [coords['y'] + coords['height'], coords['y']],\n yAttrs['ticks'], coords['axisPadding']);\n\n // draw gridlines\n if (style('barGraphGridlines'))\n drawYGridlines(svg, yAxis, coords['width'] - 2 * coords['axisPadding'],\n yAttrs['ticks'], coords['x'] + coords['axisPadding'], {});\n\n // draw axes\n drawAxisX(svg, xAxis, coords['y'] + coords['height'], coords['axisPadding']);\n drawAxisY(svg, yAxis, coords['x'], coords['axisPadding']);\n labelAxes(svg, coords, attributes);\n\n // go through each set of bars\n var numBars = data.length;\n var totalBarWidth = xAxis.scale().bandwidth();\n var eachBarWidth = totalBarWidth / numBars;\n for (var i = 0; i < data.length; i++) {\n var barColor = data[i]['color'];\n var barData = data[i]['data'];\n \n // go through each bar in the set\n for (var j = 0; j < barData.length; j++) {\n var bar = svg.append('rect')\n .attr('x', xAxis.scale()(barData[j][0]) + i * eachBarWidth)\n .attr('y', yAxis.scale()(barData[j][1]))\n .attr('width', eachBarWidth)\n .attr('height', coords['y'] + coords['height']\n - coords['axisPadding'] - yAxis.scale()(barData[j][1]))\n .style('fill', barColor);\n\n if (style('showTooltips'))\n addTooltipToPoint(svg, bar, barData[j][1], attributes);\n }\n }\n\n return [xAxis, yAxis];\n}", "function componentBarsVertical () {\n\n /* Default Properties */\n var width = 400;\n var height = 400;\n var transition = { ease: d3.easeBounce, duration: 500 };\n var colors = palette.categorical(3);\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n var xScale = void 0;\n var yScale = void 0;\n var colorScale = void 0;\n var classed = \"barsVertical\";\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n var _dataTransform$summar = dataTransform(data).summary(),\n columnKeys = _dataTransform$summar.columnKeys,\n valueMax = _dataTransform$summar.valueMax;\n\n var valueExtent = [0, valueMax];\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(columnKeys).range(colors);\n }\n\n if (typeof xScale === \"undefined\") {\n xScale = d3.scaleBand().domain(columnKeys).rangeRound([0, width]).padding(0.15);\n }\n\n if (typeof yScale === \"undefined\") {\n yScale = d3.scaleLinear().domain(valueExtent).range([0, height]).nice();\n }\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias barsVertical\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n init(selection.data());\n selection.each(function () {\n\n // Update bar group\n var barGroup = d3.select(this);\n barGroup.classed(classed, true).attr(\"id\", function (d) {\n return d.key;\n }).on(\"mouseover\", function (d) {\n dispatch.call(\"customSeriesMouseOver\", this, d);\n }).on(\"click\", function (d) {\n dispatch.call(\"customSeriesClick\", this, d);\n });\n\n // Add bars to group\n var bars = barGroup.selectAll(\".bar\").data(function (d) {\n return d.values;\n });\n\n bars.enter().append(\"rect\").classed(\"bar\", true).attr(\"width\", xScale.bandwidth()).attr(\"x\", function (d) {\n return xScale(d.key);\n }).attr(\"y\", height).attr(\"rx\", 0).attr(\"ry\", 0).attr(\"height\", 0).attr(\"fill\", function (d) {\n return colorScale(d.key);\n }).on(\"mouseover\", function (d) {\n dispatch.call(\"customValueMouseOver\", this, d);\n }).on(\"click\", function (d) {\n dispatch.call(\"customValueClick\", this, d);\n }).merge(bars).transition().ease(transition.ease).duration(transition.duration).attr(\"x\", function (d) {\n return xScale(d.key);\n }).attr(\"y\", function (d) {\n return height - yScale(d.value);\n }).attr(\"height\", function (d) {\n return yScale(d.value);\n });\n\n bars.exit().transition().style(\"opacity\", 0).remove();\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return my;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return my;\n };\n\n /**\n * X Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 scale.\n * @returns {*}\n */\n my.xScale = function (_v) {\n if (!arguments.length) return xScale;\n xScale = _v;\n return my;\n };\n\n /**\n * Y Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 scale.\n * @returns {*}\n */\n my.yScale = function (_v) {\n if (!arguments.length) return yScale;\n yScale = _v;\n return my;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "function SVGStackedColumnChart() {\r\n }", "function barChart(womenOfColorRows) {\n var svgHeight = womenOfColorRows.length * GANTT_BAR_HEIGHT;\n //var svgHeight = 500;\n var svgWidth = 800;\n\n var years = womenOfColorRows.flatMap(function (row) {\n var ranges = row['Dates of Service'].split(';'); \n\n return ranges.flatMap(function(range) { \n var rangeAsArray = range.trim().split('-'); \n return rangeAsArray.map(function(year) { \n if (year.trim().toLowerCase() === 'present') {\n return 2019;\n } else {\n return parseInt(year); \n }\n });\n });\n\n });\n womenOfColorRows.forEach(function (row) {\n var ranges = row['Dates of Service'].split(';'); \n\n var inOfficePeriods = ranges.map(function(range) { \n var rangeAsArray = range.trim().split('-'); \n return rangeAsArray.map(function(year) { \n if (year.trim().toLowerCase() === 'present') {\n return 2019;\n } else {\n return parseInt(year); \n }\n });\n });\n\n var totalYearsInOffice = 0; \n inOfficePeriods.forEach(function(period) { \n var lengthOfPeriod = period[1] - period[0]; \n totalYearsInOffice = totalYearsInOffice + lengthOfPeriod; \n });\n\n // if (row[\"Name\"] === \"Ayanna Pressley\") debugger;\n\n row['Total Years in Office'] = totalYearsInOffice; \n });\n var svg = d3.selectAll('.bar-chart')\n .attr(\"width\", svgWidth)\n .attr(\"height\", svgHeight + 30);\n\n var minYear = d3.min(years)\n\n var maxYear = d3.max(years)\n \n var xScale = d3.scaleLinear()\n .domain([minYear, maxYear])\n .range([0, svgWidth - 15]);\n\n var bars = svg.selectAll('rect')\n .data(womenOfColorRows);\n\n bars.enter().append(\"rect\")\n .attr(\"height\", GANTT_BAR_HEIGHT)\n .attr(\"width\", function(d) {\n \n return xScale(minYear + (d[\"Total Years in Office\"]));\n })\n .attr('y', function(d, i) {\n return i * GANTT_BAR_HEIGHT;\n })\n .attr('x', function(d, i) {\n return xScale(parseInt(d[\"Dates of Service\"]))\n })\n .attr(\"fill\", function(d) {\n return color(d[\"Ethnicity\"]);\n })\n \n .on(\"mousemove\", function(d) {\n var mouse = d3.mouse(document.body);\n d3.select(\".tooltip\")\n .style(\"display\", \"inline-block\")\n .style(\"position\", \"relative\")\n .html(\"<div class='tooltip-title'>\" + d[\"ASSOCIATION\"] + \"<br>\" + \" Association Type: \" + d[\"ASSOCIATION TYPE\"] + \"<br>\" + \" Founding Year: \" + d[\"FOUNDING YEAR\"] + \"<br>\" + \" Ending Year: \" + d[\"ENDING YEAR\"] + \"</br>\" + \"</div>\")\n .style(\"left\", mouse[0] + 20 + \"px\")\n .style(\"top\", mouse[1] - 50 + \"px\");\n })\n .on(\"mouseout\", function(d) {\n d3.select(\".tooltip\")\n .style(\"display\", \"none\")\n })\n \n\n var xAxis = d3.axisBottom(xScale)\n .tickFormat(d3.format(\"d\"));\n\n d3.select(\"#x-axis\").call(xAxis)\n .attr(\"transform\", \"translate(0,\" + (svgHeight + 10) + \")\");\n\n}", "function barchart(listValues) {\n\n // make rectangles for barchart\n var rects = svg.selectAll(\"rect\")\n .data(listValues)\n .enter()\n .append(\"rect\")\n rects.attr(\"x\", function(d, i) {\n return i * ((width - padding)/ listValues.length) + padding;\n })\n .attr(\"y\", function(d) {\n return scaleY(d);\n })\n .attr(\"width\", width / listValues.length - barPadding)\n .attr(\"height\", function(d) {\n return (height - scaleY(d) - padding);\n })\n .attr(\"fill\", function(d) {\n return \"rgb(0, 0, \" + (d * 0.027) + \")\";\n })\n\n // make barchart interactive\n .on('mouseout', function(d) {\n tooltip.style(\"display\", \"none\")\n d3.select(this).attr(\"fill\", function(d) {\n return \"rgb(0,0, \" + (d * 0.027) + \")\"\n });\n })\n .on('mousemove', function(d, i) {\n d3.select(this).attr(\"fill\", \"orange\")\n tooltip.style(\"display\", null);\n tooltip.select(\"text\").text(\"Value: \" + (d) +\n \" thousand toe\" + \", Year: \" + years[i]);\n });\n\n // make x and y axis\n var xAxis = d3.axisBottom(scaleX)\n var yAxis = d3.axisLeft(scaleY)\n\n // append ticks to x-axis\n svg.append(\"g\")\n .attr(\"class\", \"axis\")\n .attr(\"transform\", \"translate(0,\" + (height - padding) + \")\")\n .call(xAxis);\n\n // append x-label\n svg.append(\"text\")\n .attr(\"class\", \"myLabel\")\n .attr(\"y\", height - 10)\n .attr(\"x\", width / 2)\n .attr('text-anchor', 'middle')\n .text(\"Years\");\n\n // append ticks to y-axis\n svg.append(\"g\")\n .attr(\"class\", \"axis\")\n .attr(\"transform\", \"translate(\" + padding + \",0)\")\n .call(yAxis);\n\n // append y-label\n svg.append(\"text\")\n .attr(\"class\", \"myLabel\")\n .attr(\"y\", 10)\n .attr(\"x\", -150)\n .attr('transform', 'rotate(-90)')\n .attr('text-anchor', 'middle')\n .text(\"Values (in thousand toe)\")\n }", "function drawBarChart(data, ctx, can) {\n if (clear) ctx.clearRect(0, 0, can.width, can.height);\n var y, tx, ty, metrics, words, line, testLine, testWidth;\n var dataName = data.name;\n var dataValue = data.value;\n var colHead = 50;\n var rowHead = 30;\n var margin = 10;\n var maxVal = Math.ceil(Math.max.apply(Math, dataValue)/5) * 5;\n var stepSize = 5;\n var yScalar = (can.height - colHead - margin) / (maxVal);\n var xScalar = (can.width - rowHead) / (dataName.length + 1);\n ctx.lineWidth = 0.5;\n ctx.strokeStyle = \"rgba(128,128,255, 0.5)\"; // light blue line\n ctx.beginPath();\n // print row header and draw horizontal grid lines\n ctx.font = \"10pt Open Sans\"\n var count = 0;\n for (scale = maxVal; scale >= 0; scale -= stepSize) {\n y = colHead + (yScalar * count * stepSize);\n ctx.fillText(scale, margin,y + margin);\n ctx.moveTo(rowHead, y + margin - 1)\n ctx.lineTo(can.width, y + margin -1)\n count++;\n }\n ctx.stroke();\n ctx.save();\n // set a color\n ctx.fillStyle = \"rgba(151,187,205,1)\";\n // translate to bottom of graph and scale x,y to match data\n ctx.translate(0, can.height - margin);\n ctx.scale(xScalar, -1 * yScalar);\n // draw bars\n for (i = 0; i < dataName.length; i++) {\n ctx.fillRect(i + 1, -2, 0.5, dataValue[i]);\n }\n ctx.restore();\n \n // label samples\n ctx.font = \"8pt Open Sans\";\n ctx.textAlign = \"center\";\n for (i = 0; i < dataName.length; i++) {\n calcY(dataValue[i]);\n ty = y - margin - 5;\n tx = xScalar * (i + 1) + 14;\n words = dataName[i].split(' ');\n line = '';\n for(var n = 0; n < words.length; n++) {\n testLine = line + words[n] + ' ';\n metrics = ctx.measureText(testLine);\n testWidth = metrics.width;\n if (testWidth > 20 && n > 0) {\n ctx.fillText(line, tx, ty - 8);\n line = words[n] + ' ';\n }\n else {\n line = testLine;\n }\n }\n ctx.fillText(line, tx, ty + 8);\n }\n function calcY(value) {\n y = can.height - value * yScalar;\n } \n}", "function barplotColumn(tabinput, colName, x, y, plotwidth, plotheight, barfrac, offset, fillclr) {\n\n\n col = tabinput.columns.indexOf(colName)\n\n var yzero = y;\n var xlegend = xg;\n var colwidth = plotwidth / tabinput.getRowCount();\n var barwidth = colwidth * barfrac;\n // tabinput.columns\n\n // draw the zero axis labels on the base---------------------------\n stroke(150);\n strokeWeight(0.5);\n line(x, yzero, x + plotwidth, yzero)\n\n\n // get min and max\n let miny1 = 3000000;\n let maxy1 = -300000;\n\n for (var i = 0; i < (tabinput.getRowCount()); i++) {\n if (tabinput.getNum(i, col) <= miny1) {\n miny1 = tabinput.getNum(i, col);\n }\n if (tabinput.getNum(i, col) >= maxy1) {\n maxy1 = tabinput.getNum(i, col);\n }\n }\n print(miny1)\n print(maxy1)\n\n\n\n // Cycle through the table rows and get data\n for (let i = 0; i < tabinput.getRowCount(); i++) {\n var place = tabinput.getString(i, 0) // grab the data\n var value = tabinput.getNum(i, col)\n var lgndval = tabinput.getString(i, 2)\n var thisyearatm = 0;\n var thisyearund = 0;\n\n\n // // draw the year labels on the base---------------------------\n fill(30)\n push();\n strokeWeight(0.5);\n textStyle(NORMAL)\n textAlign(RIGHT)\n textSize(10)\n translate(x +5, y +3 );\n rotate(-pi / 4);\n text(place, 5, 12);\n pop()\n\n\n\n // draw the values labels on the top---------------------------\n fill(30)\n push();\n strokeWeight(0.5);\n textStyle(NORMAL)\n textAlign(CENTER)\n textSize(10)\n translate(x + barwidth, y + 5);\n // rotate(-pi / 2);\n text(value, 0, -(map(value, 0, maxy1, 0, plotheight)) -10 );\n pop()\n\n\n // hardcode the qualitative pallet, since colorforvalue doesnt seem to work..\n var Dark2 = {\n 3: [\"#1b9e77\", \"#d95f02\", \"#7570b3\"],\n 4: [\"#1b9e77\", \"#d95f02\", \"#7570b3\", \"#e7298a\"],\n 5: [\"#1b9e77\", \"#d95f02\", \"#7570b3\", \"#e7298a\", \"#66a61e\"],\n 6: [\"#810f7c\", \"#810f7c\", \"#810f7c\", \"#e7298a\", \"#66a61e\", \"#e6ab02\"],\n 7: [\"#1b9e77\", \"#d95f02\", \"#7570b3\", \"#e7298a\", \"#66a61e\", \"#e6ab02\", \"#a6761d\"],\n 8: [\"#1b9e77\", \"#d95f02\", \"#7570b3\", \"#e7298a\", \"#66a61e\", \"#e6ab02\", \"#a6761d\", \"#666666\"] \n \n };\n\n fill(Dark2[6][i]);\n rect(x + offset * barwidth, yzero, barwidth, -(map(value, 0, maxy1, 0, plotheight)));\n \n// if (i==2 ){\n// //draw the legend as well while were at it..\n// strokeWeight(0.5);\n// textStyle(NORMAL)\n// textAlign(RIGHT)\n// textSize(10)\n// rect(xlegend - barwidth*2, y + 50, 20, barwidth)\n// text(lgndval,xlegend - barwidth*3, y + 90)\n// rect(x,yzero,barwidth,thisyearund);\n// }\n\n\n x += colwidth // shift rightward to next col\n }\n\n}", "function chartBarChartHorizontal () {\n\n /* Default Properties */\n var svg = void 0;\n var chart = void 0;\n var classed = \"barChartHorizontal\";\n var width = 400;\n var height = 300;\n var margin = { top: 20, right: 20, bottom: 20, left: 80 };\n var transition = { ease: d3.easeBounce, duration: 500 };\n var colors = palette.categorical(3);\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n\n /* Chart Dimensions */\n var chartW = void 0;\n var chartH = void 0;\n\n /* Scales */\n var xScale = void 0;\n var yScale = void 0;\n var colorScale = void 0;\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n chartW = width - (margin.left + margin.right);\n chartH = height - (margin.top + margin.bottom);\n\n var _dataTransform$summar = dataTransform(data).summary(),\n columnKeys = _dataTransform$summar.columnKeys,\n valueMax = _dataTransform$summar.valueMax;\n\n var valueExtent = [0, valueMax];\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(columnKeys).range(colors);\n }\n\n yScale = d3.scaleBand().domain(columnKeys).rangeRound([0, chartH]).padding(0.15);\n\n xScale = d3.scaleLinear().domain(valueExtent).range([0, chartW]).nice();\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias barChartHorizontal\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n // Create SVG element (if it does not exist already)\n if (!svg) {\n svg = function (selection) {\n var el = selection._groups[0][0];\n if (!!el.ownerSVGElement || el.tagName === \"svg\") {\n return selection;\n } else {\n return selection.append(\"svg\");\n }\n }(selection);\n\n svg.classed(\"d3ez\", true).attr(\"width\", width).attr(\"height\", height);\n\n chart = svg.append(\"g\").classed(\"chart\", true);\n } else {\n chart = selection.select(\".chart\");\n }\n\n // Update the chart dimensions and add layer groups\n var layers = [\"barChart\", \"xAxis axis\", \"yAxis axis\"];\n chart.classed(classed, true).attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\").attr(\"width\", chartW).attr(\"height\", chartH).selectAll(\"g\").data(layers).enter().append(\"g\").attr(\"class\", function (d) {\n return d;\n });\n\n selection.each(function (data) {\n // Initialise Data\n init(data);\n\n // Horizontal Bars\n var barsHorizontal = component.barsHorizontal().width(chartW).height(chartH).colorScale(colorScale).xScale(xScale).yScale(yScale).dispatch(dispatch);\n\n chart.select(\".barChart\").datum(data).call(barsHorizontal);\n\n // X Axis\n var xAxis = d3.axisBottom(xScale);\n\n chart.select(\".xAxis\").attr(\"transform\", \"translate(0,\" + chartH + \")\").call(xAxis);\n\n // Y Axis\n var yAxis = d3.axisLeft(yScale);\n\n chart.select(\".yAxis\").call(yAxis);\n\n // Y Axis Label\n var yLabel = chart.select(\".yAxis\").selectAll(\".yAxisLabel\").data([data.key]);\n\n yLabel.enter().append(\"text\").classed(\"yAxisLabel\", true).attr(\"y\", -10).attr(\"dy\", \".71em\").attr(\"fill\", \"#000000\").style(\"text-anchor\", \"center\").merge(yLabel).transition().text(function (d) {\n return d;\n });\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return this;\n };\n\n /**\n * Transition Getter / Setter\n *\n * @param {d3.transition} _v - D3 transition style.\n * @returns {*}\n */\n my.transition = function (_v) {\n if (!arguments.length) return transition;\n transition = _v;\n return this;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch on Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "function addBarValues () {\n\t\t\textraChartGroup.append(\"g\").selectAll(\"text\")\n\t\t\t .data(clickedData)\n\t\t\t .enter()\n\t\t\t .append(\"text\")\n\t\t \t\t .attr(\"class\",\"barValues\")\n\t\t\t \t .style(\"font-size\", 11 * screenRatio + \"px\")\n\t\t\t \t .attr(\"x\",d => xLinearScale_extraChart(d.value) + 5)\n\t\t\t \t .attr(\"y\",function(data,index) {\n\t\t\t\t\t return index * height_extraChart / valueCount + 5 + yBandScale_extraChart.bandwidth() / 2;\n\t\t\t\t\t })\n\t\t\t \t .text(d=>d.value + \" per 100K\")\n\t\t}", "function DrawVerticalBarChart() {\n\n //set width and height of the chart\t\t\t\t\t\t\t\n var width = $(\".chartDivs4\").width(),\n height = $(\".chartDivs4\").height();\n\n //set margins\n var margin = {\n top: 20,\n right: 30,\n bottom: 30,\n left: 40\n };\n\n var width = width - margin.left - margin.right * 2.5;\n var height = height - margin.top - margin.bottom;\n\n\n var data = [{\n country: \"Europe\",\n growth: 5\n }, {\n country: \"Asia\",\n growth: 10\n }, {\n country: \"America\",\n growth: 15\n }, {\n country: \"Australia\",\n growth: 20\n }, {\n country: \"Africa\",\n growth: 25\n }];\n\n //set margins\n var margin = {\n top: 20,\n right: 30,\n bottom: 30,\n left: 40\n };\n\n //set scales and ranges\n var xScale = d3.scaleBand().range([0, width * 1.1]).padding(.1)\n\n var yScale = d3.scaleLinear().range([height, 30])\n\n //append the svg element and central g\n var svg = d3.select(\".chartDivs4\")\n .append(\"svg\")\n .attr(\"width\", width + margin.left + margin.right * 3)\n .attr(\"height\", height + margin.top + margin.bottom)\n .append(\"g\")\n .attr(\"class\", \"mainSvgG\")\n .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\n\n //Add a Title\n svg.append(\"text\")\n .attr(\"x\", (width / 2))\n .attr(\"y\", 11)\n .attr(\"text-anchor\", \"middle\")\n .style(\"font-size\", \"16px\")\n .style(\"text-decoration\", \"underline\")\n .text(\"Title for a vertical bar chart\");\n\n data.forEach(function(d) {\n return d.growth = +d.growth;\n });\n\n //set domains\n xScale.domain(data.map(function(d) {\n return d.country;\n }))\n\n yScale.domain([0, d3.max(data, function(d) {\n return d.growth\n })]).nice();\n\n //set axes\n\n var xAxis = svg.append(\"g\")\n .attr(\"transform\", \"translate(\" + 0 + \",\" + height + \")\")\n .call(d3.axisBottom(xScale))\n\n\n svg.selectAll(\"rects\")\n .data(data)\n .enter()\n .append(\"rect\")\n .transition()\n .duration((d, i) => (1 + i) * 1500)\n .delay((d, i) => (1 + i) * 500)\n .attr(\"x\", function(d) {\n return xScale(d.country)\n })\n .attr(\"y\", (d) => height - yScale(d.growth))\n .ease(d3.easeElastic)\n .attr(\"width\", xScale.bandwidth())\n .attr(\"height\", function(d) {\n return yScale(d.growth)\n })\n\n .attr(\"fill\", \"#470A68\")\n\n\n\n var yAxis = svg.append(\"g\")\n .call(d3.axisLeft(yScale));\n\n\n }", "function createBarChart(debits_by_councilman) {\n var data = [];\n var labels = [];\n var backgroundcolor = [];\n var bordercolor = [];\n\n $.each(debits_by_councilman, function (key, val) {\n data.push(val.toFixed(2));\n labels.push(key);\n backgroundcolor.push(get_rgb_randon())\n bordercolor.push(get_rgb_randon_border())\n });\n\n var ctx = document.getElementById(\"barChart\");\n var stackedBar = new Chart(ctx, {\n type: 'bar',\n data: {\n labels: labels,\n datasets: [{\n label: 'R$ ',\n data: data,\n backgroundColor: backgroundcolor,\n borderColor: bordercolor,\n borderWidth: 1\n }],\n },\n options:[]\n });\n}", "function buildYearlyBar(yearlyData) {\n var years = yearlyData.years;\n var data = [yearlyData.in, yearlyData.active, yearlyData.out]\n\n var chartOptions = {\n chart: {\n type: 'column'\n },\n title: {\n text: 'Program Participation by Year'\n },\n subtitle: {\n text: '2019 data available through August.<br>Chart shows full year projection for 2019.'\n },\n // annotations: [{\n // labels: [{\n // point: {\n // // xAxis: 0,\n // // yAxis: 0,\n // // x:300,\n // // y:50,\n\n // },\n // text: 'Projected'\n // }],\n // labelOptions: {\n // x: 10, y: -10\n // }\n // }],\n xAxis: {\n categories: [\n \n ],\n crosshair: true\n },\n yAxis: {\n min: 0,\n title: {\n text: '',\n // rotation: 0,\n // y: 0\n }\n },\n credits: {\n enabled: false\n },\n tooltip: {\n headerFormat: '<span style=\"font-size:10px\">{point.key}</span><table>',\n pointFormat: '<tr><td style=\"color:\"black\";padding:0\">{series.name}: </td>' +\n '<td style=\"padding:0; text-align:right\"><b>{point.y}</b></td></tr>',\n\n footerFormat: '</table>',\n shared: true,\n useHTML: true\n },\n plotOptions: {\n column: {\n pointPadding: 0.2,\n borderWidth: 0\n }\n },\n series: [{\n name: 'In',\n data: []\n \n }, {\n name: 'Active',\n data: []\n \n }, {\n name: 'Out',\n data: []\n \n }]\n };\n years.forEach((year,index) => {\n chartOptions.series[0].data.push(yearlyData.in[index]);\n chartOptions.series[1].data.push(yearlyData.active[index]);\n chartOptions.series[2].data.push(yearlyData.out[index]);\n chartOptions.xAxis.categories.push(year);\n });\n\n Highcharts.chart('yearly-bar',chartOptions);\n \n }", "function barChartData(){\n barChartConfig = {\n\ttype: 'bar',\n\n\tdata: {\n\t\tlabels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n\t\tdatasets: [{\n\t\t\tlabel: 'Orders',\n\t\t\tbackgroundColor: window.chartColors.green,\n\t\t\tborderColor: window.chartColors.green,\n\t\t\tborderWidth: 1,\n\t\t\tmaxBarThickness: 16,\n\t\t\t\n\t\t\tdata: [\n\t\t\t\tview2[0],\n\t\t\t\tview2[1],\n\t\t\t\tview2[2],\n\t\t\t\tview2[3],\n\t\t\t\tview2[4],\n\t\t\t\tview2[5],\n\t\t\t\tview2[6]\n\t\t\t]\n\t\t}]\n\t},\n\toptions: {\n\t\tresponsive: true,\n\t\taspectRatio: 1.5,\n\t\tlegend: {\n\t\t\tposition: 'bottom',\n\t\t\talign: 'end',\n\t\t},\n\t\ttitle: {\n\t\t\tdisplay: true,\n\t\t\ttext: 'View Bar'\n\t\t},\n\t\ttooltips: {\n\t\t\tmode: 'index',\n\t\t\tintersect: false,\n\t\t\ttitleMarginBottom: 10,\n\t\t\tbodySpacing: 10,\n\t\t\txPadding: 16,\n\t\t\tyPadding: 16,\n\t\t\tborderColor: window.chartColors.border,\n\t\t\tborderWidth: 1,\n\t\t\tbackgroundColor: '#fff',\n\t\t\tbodyFontColor: window.chartColors.text,\n\t\t\ttitleFontColor: window.chartColors.text,\n\n\t\t},\n\t\tscales: {\n\t\t\txAxes: [{\n\t\t\t\tdisplay: true,\n\t\t\t\tgridLines: {\n\t\t\t\t\tdrawBorder: false,\n\t\t\t\t\tcolor: window.chartColors.border,\n\t\t\t\t},\n\n\t\t\t}],\n\t\t\tyAxes: [{\n\t\t\t\tdisplay: true,\n\t\t\t\tgridLines: {\n\t\t\t\t\tdrawBorder: false,\n\t\t\t\t\tcolor: window.chartColors.borders,\n\t\t\t\t},\n\n\t\t\t\t\n\t\t\t}]\n\t\t}\n\t\t\n\t}\n}\n}", "function initBarGenderView(BarData){\n google.charts.load('current', {packages: ['corechart', 'bar']});\n google.charts.setOnLoadCallback(drawChart);\n\n function drawChart() {\n var Bardata = new google.visualization.arrayToDataTable(BarData);\n\n var options = {\n height: 240,\n width:'100%',\n legend: {position: 'bottom'},\n backgroundColor:\"#FFF\",\n colors: ['#e66368', '#300204'],\n hAxis: {\n textStyle: {\n color: '#000'\n }\n },\n vAxis: {\n textStyle: {\n color: '#000'\n }\n },\n legend: {\n position: 'top'\n },\n titleTextStyle: {\n color: '#000'\n },\n chartArea: {\n left: \"17%\",\n top: \"10%\",\n right: \"10%\",\n bottom:\"10%\",\n height: \"94%\",\n width: \"94%\"\n }\n\n };\n\n var Barchart = new google.visualization.ColumnChart(document.getElementById('Gender_Charts'));\n\n Barchart.draw(Bardata, options);\n }\n}", "function drawChart(data,selector,padding){\n var max = Math.max.apply(Math, data);\n var chart = document.querySelector(selector);\n var barwidth = ((chart.offsetWidth-(values.length-1)*padding-(data.length)*10)/data.length);\n var sum = data.reduce(function(pv, cv) { return pv + cv; }, 0);\n var left = 0;\n for (var i in data){\n var newbar = document.createElement('div');\n newbar.setAttribute(\"class\", \"bar\");\n newbar.style.width=barwidth+\"px\";\n newbar.style.height=((data[i]/max)*100)+\"%\";\n newbar.style.left=left+\"px\";\n chart.appendChild(newbar);\n left += (barwidth+padding+10);\n }\n}", "function ChartsBarchart() {\n}", "function drawBarChart(){\n\tvar COUNT = \"count\";\n var barWidth = 20;\n var margin = {\n top: 50,\n right: 5,\n bottom: 5,\n left: 5,\n labels: 5\n };\n var height = 200; //overridden by width in call\n var width = 200; //overridden by width in call \n var chartTitle = [\"test\"];\n var xformat = function(d){return d;};\n var focus;\n \n function chart(selection) {\n var maxBarHeight = height - (margin.top + margin.bottom);\n var chartWidth = width - margin.right - margin.left;\n \n //d3.select('svg').remove();//remove old charts\n\n selection.each(function(data) {\n \n var xValue = function(d) { return d[COUNT]; };\n var yValue = function(d) { return d[COUNT]; };\n\n var x = d3.scale.ordinal()\n .domain(data.map(function(d) { return d[COUNT]; }))\n .rangeRoundBands([margin.labels, chartWidth], 0);\n \n var y = d3.scale.linear()\n .domain([0, d3.max(data, function(d) { return d[COUNT]; })])\n .range([maxBarHeight, 0])\n .nice();\n \n \n \n //var yAxis = d3.svg.axis().scale(y).orient(\"left\");\n \n var svgContainer = d3.select(this).append(\"svg\")\n .attr(\"class\", \"chart mini-column-chart\")\n .attr(\"width\", width)\n .attr(\"height\", height).append(\"g\")\n .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\n \n svgContainer.append(\"g\")\n .attr(\"class\", \"x axis\")\n .attr(\"transform\", \"translate( 0,\" + (height - margin.top - margin.bottom) + \")\")\n \n \n .append(\"text\")\n .attr(\"class\", \"axis-label\")\n .attr(\"x\", width/2)\n .attr(\"text-anchor\", \"middle\")\n .attr(\"dy\", 48)\n\n var header = svgContainer.append(\"text\")\n .attr(\"class\", \"chart-title\")\n .attr(\"x\", width/2)\n .attr(\"text-anchor\", \"middle\")\n .attr(\"dy\", -32)\n .text(chartTitle);\n \n var barValues = svgContainer.append(\"g\")\n .attr(\"class\", \"bar-values\");\n \n barValues.selectAll(\"text\")\n .data(data)\n .enter().append(\"text\")\n .attr(\"x\", function(d, i) {\n return ((i+1) * x.rangeBand());\n })\n .attr(\"y\", function(d) { return y(d[COUNT]);})\n .attr(\"dy\", -5)\n .attr(\"text-anchor\", \"middle\")\n .text(function(d) {return d[COUNT];});\n\n svgContainer.append(\"g\")\n .attr(\"class\", \"y axis\")//.call(yAxis)\n .append(\"text\")\n .attr(\"class\", \"axis-label\")\n .attr(\"transform\", \"rotate(-90)\")\n .attr(\"y\", 8)\n .attr(\"x\", -(height-margin.top-margin.bottom))\n //.attr(\"dy\", \".71em\")\n .style(\"text-anchor\", \"start\")\n \n var bars = svgContainer.append(\"g\")\n .attr(\"class\", \"bars\");\n \n bars.selectAll(\".bar\")\n .data(data)\n .enter().append(\"rect\")\n .attr(\"class\", \"bar\")\n .attr(\"x\", function(d, i) {\n return ((i+1) * x.rangeBand())-(barWidth);\n })\n .attr(\"y\", function(d) { return y(d[COUNT]);})\n .attr(\"width\", barWidth)\n .attr(\"height\", function(d) {\n return (maxBarHeight -y(d[COUNT]));\n });\n });\n }\n\n\n chart.title = function(_) {\n if (!arguments.length) return chartTitle;\n chartTitle = _;\n return chart;\n };\n\n chart.x = function(_) {\n if (!arguments.length) return xValue;\n xValue = _;\n return chart;\n };\n\n chart.y = function(_) {\n if (!arguments.length) return yValue;\n yValue = _;\n return chart;\n };\n\n chart.width = function(_) {\n if (!arguments.length) return width;\n width = _;\n return chart;\n };\n\n chart.height = function(_) {\n if (!arguments.length) return height;\n height = _;\n return chart;\n };\n\n chart.barWidth = function(_) {\n if (!arguments.length) return barWidth;\n barWidth = _;\n return chart;\n };\n \n chart.xformat = function(_) {\n if (!arguments.length) return xformat;\n xformat = _;\n return chart;\n };\n \n chart.yAxisLabel = function(_) {\n if (!arguments.length) return yAxisLabel;\n yAxisLabel = _;\n return chart;\n };\n\n chart.xAxisLabel = function(_) {\n if (!arguments.length) return xAxisLabel;\n xAxisLabel = _;\n return chart;\n };\n\n return chart;\n}", "function plotdata(chartdata) {\n let chartformat = {};\n chartformat.type = 'bar';\n chartformat.data = chartdata;\n chartdata.datasets[0].label = 'Total games';\n\n let options = chartformat.options = {}; \n options.title = {};\n options.title.display = true;\n options.title.text = 'Total produced games between 1980 - 2015';\n options.title.fontSize = 24;\n options.title.fontColor = '#ff0000'\n\n new Chart($('#barChart'), chartformat, options );\n}", "function createBar(){\n\t\t\n\t\t/*get the # of values in the clicked dataset*/\n\t\tvalueCount = clickedData.map(d=>d.value).length;\n\n\t\t/*define margins around extra chart area*/\n\t\tvar margin_extraChart = {\n\t\t top: 60 * screenRatio,\n\t\t right: 90 * screenRatio,\n\t\t bottom: 100 * screenRatio,\n\t\t left: 100 * screenRatio\n\t\t};\n\n\t\t/*calculate extra chart area dimensions*/\n\t\tvar width_extraChart = svgWidth_extraChart - margin_extraChart.left - margin_extraChart.right;\n\t\tvar height_extraChart = svgHeight_extraChart - margin_extraChart.top - margin_extraChart.bottom;\n\n\t\t/*create the SVG container and set the origin point of extra chart*/\n\t\tvar svg_extraChart = d3.select(\"#extraChartSection\").append(\"svg\")\n\t\t .attr(\"id\",\"barChart\")\n\t\t .attr(\"width\", svgWidth_extraChart)\n\t\t .attr(\"height\", svgHeight_extraChart);\n\n\t\tvar extraChartGroup = svg_extraChart.append(\"g\")\n\t\t .attr(\"transform\", `translate(${margin_extraChart.left}, ${margin_extraChart.top})`)\n\t\t .attr(\"class\",\"extraChart\"); \n\n\t\t/*add titles to the extra chart area*/\n\t\tvar extraTitle = svg_extraChart.append(\"g\").append(\"text\")\n\t\t .attr(\"class\", \"extra title\")\n\t\t .attr(\"text-anchor\", \"middle\")\n\t\t .attr(\"x\", (width_extraChart + margin_extraChart.left) / 2 + 50 * screenRatio)\n\t\t .attr(\"y\", 20 * screenRatio)\n\t\t .style(\"font-weight\", \"bold\")\n\t\t .style(\"font-size\", 20 * screenRatio + \"px\")\n\t\t .text(\"Breakdown of Violent Crimes\");\n\n\t\tvar extraTitle = svg_extraChart.append(\"g\").append(\"text\")\n\t\t .attr(\"class\", \"extra title\")\n\t\t .attr(\"text-anchor\", \"middle\")\n\t\t .attr(\"x\", (width_extraChart + margin_extraChart.left) / 2 + 50 * screenRatio)\n\t\t .attr(\"y\", 40 * screenRatio)\n\t\t .style(\"font-weight\", \"bold\")\n\t\t .style(\"font-size\", 16 * screenRatio + \"px\")\n\t\t .text(`${clickedState}, Year ${clickedYear}`);\n\t\t\t \n\t\t\n\n\n\t\t/*configure a band scale for the y axis with a padding of 0.1 (10%)*/\n\t\tvar yBandScale_extraChart = d3.scaleBand()\n\t\t\t.domain(clickedData.map(d => d.type).reverse())\n\t\t\t.range([height_extraChart,0])\n\t\t\t.paddingInner(0.01);\n\n\n\t\t/*create a linear scale for the x axis*/\n\t\tvar xLinearScale_extraChart = d3.scaleLinear()\n\t\t\t.domain([0, d3.max(clickedData.map(d => d.value))])\n\t\t\t.range([0,width_extraChart]);\n\n\t\t/*add y axis*/\n\t\tvar leftAxis_extraChart = d3.axisLeft(yBandScale_extraChart);\n\n\t\t/*assign data to donut(pie) chart*/\n\t\tvar pie = d3.pie()\n\t .value(d => d.value)\n\n\t /*define arc to create the donut chart*/\n\t var arc = d3.arc()\n\t \t.cornerRadius(3)\n\n\t\t/*create color scale for extra charts */\n\t\tvar colorScale_extraChart = d3.scaleOrdinal()\n\t\t\t.range([\"#98abc5\", \"#7b6888\", \"#a05d56\", \"#ff8c00\"]);\n\n\t\t/*bind data to bars*/\n\t\tvar bars = extraChartGroup.selectAll(\".barGroup\")\n\t\t .data(function() {\n\t return pie(clickedData);\n\t \t})\n\t\t .enter()\n\t\t .append(\"g\")\n\t\t .attr(\"class\", \"barGroup\");\n\n\t\t/*create bars*/\n\t\tbars.append(\"rect\")\n\t\t .attr(\"width\", 0)\n\t\t .attr(\"height\", yBandScale_extraChart.bandwidth())\n\t\t .attr(\"x\", 0)\n\t\t .attr(\"y\", function(data,index) {\t\t \n\t\t \treturn index * (yBandScale_extraChart.bandwidth() + 1);\n\t\t \t})\n\t\t .attr(\"rx\",5)\n\t\t .attr(\"yx\",5)\n\t\t .style(\"fill\",function(d) {\n\t\t return colorScale_extraChart(d.data.type);\n\t\t })\n\t\t .attr(\"class\",\"bar\")\n\t\t .on(\"mouseover\", function() {highlight(d3.select(this))} )\n\t\t .on(\"mouseout\", function() {unhighlight(d3.select(this))} )\n\t\t .transition()\n\t\t \t.duration(500)\n\t\t \t.attr(\"width\", d => xLinearScale_extraChart(d.data.value))\n\n\t\t/*add the path of the bars and use it to draw donut chart*/\n\t\textraChartGroup.selectAll(\".barGroup\")\n\t\t\t.append(\"path\")\n\t .style(\"fill\",function(d) {\n\t\t return colorScale_extraChart(d.data.type);\n\t\t })\n\n\t\taddBarAxis();\n\n\t\t/*define a function to add y axis to the bar chart*/\n\t\tfunction addBarAxis () {\n\t\t\textraChartGroup.append(\"g\")\n\t\t\t .attr(\"class\", \"barYAxis\")\n\t\t\t .style(\"font-size\", 13 * screenRatio + \"px\")\n\t\t\t .call(leftAxis_extraChart);\n\t\t}\n\t\t\t\n\t\t/*show bar values half second later after the bars are created*/\n\t\tsetTimeout(addBarValues, 500);\n\n\t\t/*define a function to add values to the bar chart*/\n\t\tfunction addBarValues () {\n\t\t\textraChartGroup.append(\"g\").selectAll(\"text\")\n\t\t\t .data(clickedData)\n\t\t\t .enter()\n\t\t\t .append(\"text\")\n\t\t \t\t .attr(\"class\",\"barValues\")\n\t\t\t \t .style(\"font-size\", 11 * screenRatio + \"px\")\n\t\t\t \t .attr(\"x\",d => xLinearScale_extraChart(d.value) + 5)\n\t\t\t \t .attr(\"y\",function(data,index) {\n\t\t\t\t\t return index * height_extraChart / valueCount + 5 + yBandScale_extraChart.bandwidth() / 2;\n\t\t\t\t\t })\n\t\t\t \t .text(d=>d.value + \" per 100K\")\n\t\t}\n\t\t\t\n\t\t/*define a function to switch to donut(pie) chart when the Pie button is clicked*/\n\t\tfunction toPie() {\n\t\t\t/*remove bar chart if it exists*/\n\t\t\tif (document.querySelector(\"#barChart\")) {\n\t\t\t\td3.selectAll(\".bar\").remove();\n\t\t\t\td3.selectAll(\".barYAxis\").remove();\n\t\t\t\td3.selectAll(\".barValues\").remove();\n\t\t\t\t\n\t\t\t\t/*use the bar chart's path to start the transition to donut(pie) chart*/\n\t\t\t\textraChartGroup.selectAll(\"path\")\n\t\t\t .transition()\n\t\t\t .duration(500)\n\t\t\t .tween(\"arc\", arcTween);\n\n\t\t\t /*\n\t\t\t define the function used to do tween on arc.\n\t\t\t \n\t\t\t credits to https://bl.ocks.org/LiangGou/30e9af0d54e1d5287199, codes have been modified.\n\n\t\t\t the idea here is to first draw an arc like a bar,\n\t\t\t then tween the bar-like arc to the donut arc. \n\t\t\t\tThus, the key is to find the initial bar size and position:\n\t\t\t\tThe initial bar width is approximated by the length of \n\t\t\t\toutside arc: barWidth = OuterRadius * startAngle. \n\t\t\t\tSo we can get the startAngle shown in arcArguments below;\n\t\t\t\t(Note that: the measure of angle in d3 starts from vertical y:\n\t\t\t\t y angle\n\t\t\t\t | / \n\t\t\t\t | / \n\t\t\t\t | / \n\t\t\t\t |o/\n\t\t\t\t |/ \n\t\t\t\t ) \n\n\t\t\t\t*/\n\t\t\t function arcTween(d) {\t\t\t \n\t\t\t /*define the path of each tween*/\n\t\t\t var path = d3.select(this);\n\t\t\t /*get the starting y position of each bar*/\n\t\t\t var y0 = d.index * yBandScale_extraChart.bandwidth();\n\t\t\t \n\t\t\t return function(t) {\n\t\t\t /*t starts from 0 and ends with 1. Use cosine to calculate a, a stepping factor that changes from 1 to 0*/\n\t\t\t var a = Math.cos(t * Math.PI / 2);\n\t\t\t /*define radius r as a function of chart height. at the beginning, t is 0 so r is very big, which can render \n\t\t\t the arc like a bar. when t changes to 1, r is reduced to chart height or 1/2 of height based on device screen size*/\n\t\t\t var r = (1 + a) * height_extraChart / (windowWidth > 992? 1 : 2) / Math.min(1, t + .005);\n\t\t\t /*define xx and yy as the central position of arc, and xx and yy change with stepping factor a, until it becomes\n\t\t\t (1/2 of width, height)*/\n\t\t\t var yy = r + a * y0;\n\t\t\t var xx = ((1 - a) * width_extraChart / 2);\n\t\t\t \n\t\t\t /*define arguments used to create arc*/\n\t\t\t var arcArguments = {\n\t\t\t /*inially the delta between inner and outer radius is the bandwidth or height of bar */\n\t\t\t innerRadius: (1-a) * r * .5 + a * (r - yBandScale_extraChart.bandwidth()),\n\t\t\t outerRadius: r,\n\t\t\t /*start and end angle come from d3.pie() created earlier when data was bound to bars, and keeps changing \n\t\t\t with stepping factor a*/\n\t\t\t startAngle: (1 - a) * d.startAngle,\n\t\t\t endAngle: a * (Math.PI / 2) + (1 - a) * d.endAngle\n\t\t\t };\n\n\t\t\t /*shift the central locations of the arc and generate the arc*/\n\t\t\t path.attr(\"transform\", `translate(${xx},${yy})`);\n\t\t\t console.log(xx,yy,r);\n\t\t\t path.attr(\"d\", arc(arcArguments));\n\t\t\t \n\t\t\t /*create events on the path*/\n\t\t\t path.on(\"mouseover\",showSliceInfo);\n\t\t\t path.on(\"mouseout\",hideSliceInfo);\n\n\t\t\t\t\t /*define a function to highlight and display info of each bar or slice of donut chart when moused over*/\n\t\t\t\t\t function showSliceInfo() {\n\t\t\t\t\t\t\t/*for donut/pie chart, highlight the selection and show relevant info*/\n\t\t\t\t\t\t\tconsole.log(\"check\",xx,yy,r);\n\t\t\t\t\t\t\tif(document.querySelector(\"#pieChart\")) {\n\t\t\t\t\t\t\t\tvar slice = d3.select(this)\n\t\t\t\t\t\t\t\t\t.attr(\"stroke\",\"#fff\")\n\t\t \t\t\t\t.attr(\"stroke-width\",\"2px\");\n\t\t\t\t\t\t\t\t/*get the index of which slice has been selected*/\n\t\t\t\t\t\t\t\tvar sliceIndex = (slice._groups[0][0].__data__.index);\n\t\t\t\t\t\t\t\tvar sliceType = clickedData[sliceIndex].type;\n\t\t\t\t\t\t\t\tvar slicePercent = clickedData[sliceIndex].percent;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*display info of highlighted slice*/\n\t\t\t\t\t\t\t\tsvg_extraChart.append(\"g\").append(\"text\")\n\t\t\t\t\t\t\t\t .attr(\"class\", \"crimeType\")\n\t\t\t\t\t\t\t\t .attr(\"text-anchor\", \"middle\")\n\t\t\t\t\t\t\t\t .style(\"font-size\", 18 * screenRatio + \"px\")\n\t\t\t\t\t\t\t\t .attr(\"x\",xx + margin_extraChart.left) /*from the arc center, add the same margin as bar chart and its path shifted*/\n\t\t\t\t\t\t\t\t .attr(\"y\",yy + margin_extraChart.top - 5 * screenRatio) /*from the arc center, add the same margin as bar chart and its path shifted*/\n\t\t\t\t\t\t\t\t .text(`${sliceType}`);\n\n\t\t\t\t\t\t\t\tsvg_extraChart.append(\"g\").append(\"text\")\n\t\t\t\t\t\t\t\t .attr(\"class\", \"crimePercent\")\n\t\t\t\t\t\t\t\t .attr(\"text-anchor\", \"middle\")\n\t\t\t\t\t\t\t\t .style(\"font-size\", 14 * screenRatio + \"px\")\n\t\t\t\t\t\t\t\t .attr(\"x\",xx + margin_extraChart.left) /*from the arc center, add the same margin as bar chart and its path shifted*/\n\t\t\t\t\t\t\t\t .attr(\"y\",yy + margin_extraChart.top + 20 * screenRatio) /*from the arc center, add the same margin as bar chart and its path shifted*/\n\t\t\t\t\t\t\t\t .text(function () {\n\t\t\t\t\t\t\t\t \treturn d3.format(\".1%\")(`${slicePercent}`);\n\t\t\t\t\t\t\t\t \t});\n\n\t\t\t\t\t\t\t/*for bar charts, just highlight the selected bar*/\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvar selection = d3.select(this);\n\t\t\t\t\t\t\t\thighlight(selection);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/*define a function to remove highlight and info when mouse out*/\n\t\t\t\t\t\tfunction hideSliceInfo() {\n\t\t\t\t\t\t\tif(document.querySelector(\"#pieChart\")) {\n\t\t\t\t\t\t\t\tvar slice = d3.select(this)\n\t\t\t\t\t\t\t\t\t.attr(\"stroke\",\"none\");\n\n\t\t \t\t\td3.select(\".crimeType\").remove();\t\n\t\t \t\t\td3.select(\".crimePercent\").remove();\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvar selection = d3.select(this);\n\t\t\t\t\t\t\t\tunhighlight(selection);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t };\n\t\t\t }\n\t\t\t}\n\n\t\t\t/*after pie chart is created, change the chart ID to pieChart*/\n\t\t\td3.select(\"#extraChartSection\").select(\"svg\")\n\t\t\t\t\t.attr(\"id\",\"pieChart\");\n\t\t\t}\n\n\t\t\t/*define a function to switch to bar chart when the Bar button is clicked*/\n\t\t\tfunction toBar() {\t\t\t\t\n\t\t\t\tif (document.querySelector(\"#pieChart\")) {\n\t\t\t\t\textraChartGroup.selectAll(\"path\")\n\t\t\t\t .transition()\n\t\t\t\t .duration(500)\n\t\t\t\t .tween(\"arc\", arcTween);\t\t\t\t \n\n\t\t\t\t function arcTween(d) {\n\t\t\t\t \n\t\t\t\t var path = d3.select(this);\n\t\t\t\t \n\t\t\t\t /*define the original y position and width of bars so that when arc is created, the finishing position\n\t\t\t\t and length of arc will be the same as the bars*/\n\t\t\t\t var y0 = d.index * yBandScale_extraChart.bandwidth();\n\t\t\t\t var x0 = xLinearScale_extraChart(d.data.value);\n\t\t\t\t \n\t\t\t\t return function(t) {\t\t\t\t \n\t\t\t\t /*reverse the t so that it changes from 1 to 0, and a changes from 0 to 1.\n\t\t\t\t the donut chart is generated backwards until it appears like a bar chart*/\n\t\t\t\t t = 1 - t;\n\t\t\t\t var a = Math.cos(t * Math.PI / 2);\n\t\t\t\t var r = (1 + a) * height_extraChart / Math.min(1, t + .005);\n\t\t\t\t var yy = r + a * y0;\n\t\t\t\t var xx = (1 - a) * width_extraChart / 2;\n\t\t\t\t var arcArguments = {\n\t\t\t\t innerRadius: r - yBandScale_extraChart.bandwidth() + 1,\n\t\t\t\t outerRadius: r,\n\t\t\t\t startAngle: (1 - a) * d.startAngle,\n\t\t\t\t endAngle: a * (x0 / r) + (1 - a) * d.endAngle\n\t\t\t\t };\n\n\t\t\t\t path.attr(\"transform\", `translate(${xx},${yy})`);\n\t\t\t\t path.attr(\"d\", arc(arcArguments));\n\t\t\t\t };\t\t\t\t \n\t\t\t\t }\n\n\t\t\t\t /*create the y axis and values for the bar chart with some time delays*/\n\t\t\t\t setTimeout(addBarAxis, 600);\n\t\t\t\t setTimeout(addBarValues, 600);\n\n\t\t\t\t /*change the chart ID to barChart*/\n\t\t\t\t d3.select(\"#extraChartSection\").select(\"svg\")\n\t\t\t\t\t.attr(\"id\",\"barChart\");\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t/*create click event for bar button and pie button*/\n\t\t\td3.select(\"#barButton\").on(\"click\",toBar);\n\t\t\td3.select(\"#pieButton\").on(\"click\",toPie);\n\t\t}", "function drawBarChart(name1, name2, values1, values2) {\n var data = {};\n var labels = [\"First Point won\", \"Second Point Won\"];\n data[\"labels\"] = labels;\n var series = [];\n var winnerData = {};\n winnerData[\"label\"] = name1;\n var loserData = {};\n loserData[\"label\"] = name2;\n winnerData[\"values\"] = values1;\n loserData[\"values\"] = values2;\n series.push(winnerData);\n series.push(loserData);\n data[\"series\"] = series;\n\n var chartWidth = 300,\n barHeight = 20,\n groupHeight = barHeight * data.series.length,\n gapBetweenGroups = 10,\n spaceForLabels = 150,\n spaceForLegend = 150;\n\n // Zip the series data together (first values, second values, etc.)\n var zippedData = [];\n for (var i = 0; i < data.labels.length; i++) {\n for (var j = 0; j < data.series.length; j++) {\n zippedData.push(data.series[j].values[i]);\n }\n }\n\n // Color scale\n var color = d3.scale.category10();\n var chartHeight = barHeight * zippedData.length + gapBetweenGroups * data.labels.length;\n\n var x = d3.scale.linear()\n .domain([0, d3.max(zippedData)])\n .range([0, chartWidth]);\n\n var y = d3.scale.linear()\n .range([chartHeight + gapBetweenGroups, 0]);\n\n var yAxis = d3.svg.axis()\n .scale(y)\n .tickFormat('')\n .tickSize(0)\n .orient(\"left\");\n\n // Remove all elements inside the chart, to redraw it. \n d3.select(\".chart\").selectAll(\"*\").remove();\n\n // Specify the chart area and dimensions\n var chart = d3.select(\".chart\")\n .attr(\"width\", spaceForLabels + chartWidth + spaceForLegend)\n .attr(\"height\", chartHeight);\n\n // Create bars\n var bar = chart.selectAll(\"g\")\n .data(zippedData)\n .enter().append(\"g\")\n .attr(\"transform\", function(d, i) {\n return \"translate(\" + spaceForLabels + \",\" + (i * barHeight + gapBetweenGroups * (0.5 + Math.floor(i / data.series.length))) + \")\";\n });\n\n // Create rectangles of the correct width\n bar.append(\"rect\")\n .attr(\"fill\", function(d, i) {\n return color(i % data.series.length);\n })\n .attr(\"class\", \"bar\")\n .attr(\"width\", x)\n .attr(\"height\", barHeight - 1);\n\n // Add text label in bar\n bar.append(\"text\")\n .attr(\"x\", function(d) {\n return x(d) - 3;\n })\n .attr(\"y\", barHeight / 2)\n .attr(\"fill\", \"red\")\n .attr(\"dy\", \".35em\")\n .text(function(d) {\n return d;\n });\n\n // Draw labels\n bar.append(\"text\")\n .attr(\"class\", \"label\")\n .attr(\"x\", function(d) {\n return -10;\n })\n .attr(\"y\", groupHeight / 2)\n .attr(\"dy\", \".35em\")\n .text(function(d, i) {\n if (i % data.series.length === 0)\n return data.labels[Math.floor(i / data.series.length)];\n else\n return \"\"\n });\n\n chart.append(\"g\")\n .attr(\"class\", \"y axis\")\n .attr(\"transform\", \"translate(\" + spaceForLabels + \", \" + -gapBetweenGroups / 2 + \")\")\n .call(yAxis);\n\n // Draw legend\n var legendRectSize = 18,\n legendSpacing = 4;\n\n var legend = chart.selectAll('.legend')\n .data(data.series)\n .enter()\n .append('g')\n .attr('transform', function(d, i) {\n var height = legendRectSize + legendSpacing;\n var offset = -gapBetweenGroups / 2;\n var horz = spaceForLabels + chartWidth + 40 - legendRectSize;\n var vert = i * height - offset;\n return 'translate(' + horz + ',' + vert + ')';\n });\n\n legend.append('rect')\n .attr('width', legendRectSize)\n .attr('height', legendRectSize)\n .style('fill', function(d, i) {\n return color(i);\n })\n .style('stroke', function(d, i) {\n return color(i);\n });\n\n legend.append('text')\n .attr('class', 'legend')\n .attr('x', legendRectSize + legendSpacing)\n .attr('y', legendRectSize - legendSpacing)\n .text(function(d) {\n return d.label;\n });\n }", "function peopleWithMostBookedDays(){\n var data = google.visualization.arrayToDataTable(peopleWithMostBookedDays_arr);\n var height = 100 + 20*peopleWithMostBookedDays_arr.length;\n\n var options = {\n backgroundColor: \"#f9e7d5\",\n height: height,\n chartArea: {width: '65%'},\n isStacked: true,\n hAxis: {\n title: gon.peopleWithMostBookedDays_hAxis_title,\n minValue: 0,\n }\n };\n var chart = new google.visualization.BarChart(document.getElementById('g-chart-peopleWithMostBookedDays'));\n chart.draw(data, options);\n }", "function barUtil () {\n\n var decorate = noop,\n barWidth = fractionalBarWidth(0.75),\n orient = 'vertical',\n pathGenerator = bar();\n\n var base = xyBase().xValue(function (d, i) {\n return orient === 'vertical' ? d.x : d.y;\n }).yValue(function (d, i) {\n return orient === 'vertical' ? d.y : d.x;\n });\n\n var dataJoin$$ = dataJoin().selector('g.bar').element('g');\n\n function containerTranslation(d, i) {\n if (orient === 'vertical') {\n return 'translate(' + base.x1(d, i) + ', ' + base.y0(d, i) + ')';\n } else {\n return 'translate(' + base.x0(d, i) + ', ' + base.y1(d, i) + ')';\n }\n }\n\n function barHeight(d, i) {\n if (orient === 'vertical') {\n return base.y1(d, i) - base.y0(d, i);\n } else {\n return base.x1(d, i) - base.x0(d, i);\n }\n }\n\n function valueAxisDimension(generator) {\n if (orient === 'vertical') {\n return generator.height;\n } else {\n return generator.width;\n }\n }\n\n function crossAxisDimension(generator) {\n if (orient === 'vertical') {\n return generator.width;\n } else {\n return generator.height;\n }\n }\n\n function crossAxisValueFunction() {\n return orient === 'vertical' ? base.x : base.y;\n }\n\n var bar$$ = function bar$$(selection) {\n selection.each(function (data, index) {\n\n if (orient !== 'vertical' && orient !== 'horizontal') {\n throw new Error('The bar series does not support an orientation of ' + orient);\n }\n\n dataJoin$$.attr('class', 'bar ' + orient);\n\n var filteredData = data.filter(base.defined);\n\n pathGenerator.x(0).y(0).width(0).height(0);\n\n if (orient === 'vertical') {\n pathGenerator.verticalAlign('top');\n } else {\n pathGenerator.horizontalAlign('right');\n }\n\n // set the width of the bars\n var width = barWidth(filteredData.map(crossAxisValueFunction()));\n crossAxisDimension(pathGenerator)(width);\n\n var g = dataJoin$$(this, filteredData);\n\n // within the enter selection the pathGenerator creates a zero\n // height bar. As a result, when used with a transition the bar grows\n // from y0 to y1 (y)\n g.enter().attr('transform', containerTranslation).append('path').attr('d', function (d) {\n return pathGenerator([d]);\n });\n\n // set the bar to its correct height\n valueAxisDimension(pathGenerator)(barHeight);\n\n g.attr('transform', containerTranslation).select('path').attr('d', function (d) {\n return pathGenerator([d]);\n });\n\n decorate(g, filteredData, index);\n });\n };\n\n bar$$.decorate = function (x) {\n if (!arguments.length) {\n return decorate;\n }\n decorate = x;\n return bar$$;\n };\n bar$$.barWidth = function (x) {\n if (!arguments.length) {\n return barWidth;\n }\n barWidth = d3.functor(x);\n return bar$$;\n };\n bar$$.orient = function (x) {\n if (!arguments.length) {\n return orient;\n }\n orient = x;\n return bar$$;\n };\n\n d3.rebind(bar$$, base, 'xScale', 'xValue', 'x1Value', 'x0Value', 'yScale', 'yValue', 'y1Value', 'y0Value');\n d3.rebind(bar$$, dataJoin$$, 'key');\n\n return bar$$;\n }", "function transformBarData(data) {\n return data.map(function(el) { return [el.x, el.id__count]; });\n}", "function SVGColumnChart() {\r\n }", "function bar_charts(count=false,velocity=false,strike=false) {\n var pitch_types_array = Object.keys(types);\n\n if (count) {\n var counts = [];\n\n for (i = 0; i < pitch_types_array.length; i++) {\n counts.push(types[pitch_types_array[i]]['count']);\n };\n\n chart_builder('canvas1', 'bar', \"# of Pitches\", counts, \"Pitch Count\");\n }\n\n if (velocity) {\n var velocities = [];\n\n for (i = 0; i < pitch_types_array.length; i++) {\n velocities.push(Math.round(types[pitch_types_array[i]]['avg_velocity']));\n };\n\n chart_builder('canvas2', 'bar', \"Avg. Velocity\", velocities, \"Average Velocity\");\n }\n\n if (strike) {\n var strikes = [];\n\n for (i = 0; i < pitch_types_array.length; i++) {\n strikes.push(Math.round(types[pitch_types_array[i]]['strike%']));\n };\n\n chart_builder('canvas3', 'bar', \"Strike %\", strikes, \"Strike Percentage\");\n }\n\n\n}", "function drawBars() {\n var isStacked = graph.allSeries[seriesIndex].options.type ==='stackedBar',\n seriesSum = [],\n color,\n i=0,\n j = 0;\n\n if(isStacked) {\n for (j = 0; j < graph.numPoints; j++) {\n seriesSum.push(0);\n }\n for (j = 0; j < series.length; j++) {\n color = graph.options.colors[j];\n seriesSum = drawStackedBar(series[j], seriesSum, j+1, graph.yTicks[seriesIndex], color);\n }\n } else {\n barWidth = barWidth/series.length;\n\n for (i = 0; i < graph.numPoints; i++) {\n for(j=0; j < series.length; j++) {\n color = graph.options.colors[j];\n drawBar(series[j][i], i, j, graph.yTicks[seriesIndex], color);\n }\n }\n }\n\n graph.$el.bind('barDrawn', function(){$('.point-flag').fadeIn();});\n for (j = 0; j < series.length; j++) {\n drawPointFlags(series[j], seriesSum, j+1, graph.yTicks[seriesIndex]);\n }\n\n if (graph.tooltips && graph.tooltips.length) {\n for (j = 0; j < graph.numPoints; j++) {\n if (graph.tooltips[j] || graph.tooltips[j] === 0) {\n barHover(series, graph.yTicks[seriesIndex], j, isStacked);\n }\n }\n }\n\n }", "function createBarChart(container, data, graphColor, formatComma) {\r\n\r\n var margin = { top: 20, right: 30, bottom: 40, left: 90 };\r\n var axis_margin = 90\r\n\r\n var x = d3.scaleLinear()\r\n .domain([0, d3.max(data, d => d.n)])\r\n .range([0, 0.65 * container.attr('width')]);\r\n\r\n var y = d3.scaleBand()\r\n .range([20, container.attr('height')])\r\n .domain(data.map(d => d.nameCat))\r\n .padding(0.2)\r\n\r\n container.append(\"g\")\r\n .call(d3.axisLeft(y))\r\n .attr(\"transform\", \"translate(\" + axis_margin + \",\" + 0 + \")\")\r\n .attr(\"font-weight\", \"normal\")\r\n\r\n container.selectAll(\"myRect\")\r\n .data(data)\r\n .enter()\r\n .append(\"rect\")\r\n .attr(\"x\", x(0) + axis_margin)\r\n .attr(\"y\", d => y(d.nameCat))\r\n .transition()\r\n .duration(800)\r\n .attr(\"width\", d => x(d.n))\r\n .attr(\"height\", y.bandwidth())\r\n .attr(\"fill\", graphColor)\r\n\r\n // Adds the numbers at the end of the bars\r\n container.selectAll(\"rectText\")\r\n .data(data)\r\n .enter()\r\n .append('text')\r\n .text(d => formatComma(d.n))\r\n .attr(\"x\", d => x(0) + 100)\r\n .attr(\"y\", d => y(d.nameCat) + y.bandwidth() - 0.5)\r\n .transition()\r\n .duration(800)\r\n .attr(\"x\", d => x(d.n) + axis_margin + 8)\r\n .attr(\"y\", d => y(d.nameCat) + y.bandwidth() - 0.5)\r\n\r\n .attr(\"font-size\", 10)\r\n .attr(\"font-weight\", \"normal\")\r\n .attr(\"text-anchor\", \"start\")\r\n\r\n}", "function barChartBasics(hgt) {\n var margin = { top: 30, right: 5, bottom: 20, left: 50 },\n width = 500 - margin.left - margin.right,\n height = hgt - margin.top - margin.bottom,\n colorBar = d3.scaleOrdinal(d3.schemeCategory20);\n barPadding = 1;\n return {\n margin: margin,\n width: width,\n height: height,\n colorBar: colorBar,\n barPadding: barPadding\n };\n}", "function doubleBarGraph(datos, title) {\n\n var margin = {top: 10, right: 10, bottom: 25, left: 30},\n width = 600 - margin.left - margin.right,\n height = 350 - margin.top - margin.bottom;\n\n var x0 = d3.scale.ordinal()\n .rangeRoundBands([0, width], .1);\n\n var x1 = d3.scale.ordinal();\n\n var y = d3.scale.linear()\n .range([height, 0]);\n\n var color = d3.scale.ordinal()\n .range([\"#55aa55\", \"#99ff99\"]);\n\n var xAxis = d3.svg.axis()\n .scale(x0)\n .orient(\"bottom\");\n\n var yAxis = d3.svg.axis()\n .scale(y)\n .orient(\"left\")\n .tickFormat(d3.format(\".2s\"));\n\n document.getElementById(place).innerHTML = \"<p style='font: 20 px; font-family: sans-serif'><br>\" + title + \"</p>\";\n\n var svg = d3.select(\"div#stats\").append(\"svg\")\n .attr(\"width\", width + margin.left + margin.right)\n .attr(\"height\", height + margin.top + margin.bottom)\n .append(\"g\")\n .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\n\n var generos = ['male','female'];\n\n x0.domain(datos.map(function(d) { return d.nombre; }));\n x1.domain(generos).rangeRoundBands([0, x0.rangeBand()]);\n y.domain([0, d3.max(datos, function(d) { return d3.max(d.genero, function(d) { return d.value; }); })]);\n\n svg.append(\"g\")\n .attr(\"class\", \"x axis\")\n .attr(\"transform\", \"translate(0,\" + height + \")\")\n .call(xAxis);\n\n svg.append(\"g\")\n .attr(\"class\", \"y axis\")\n .call(yAxis)\n .append(\"text\")\n .attr(\"transform\", \"rotate(-90)\")\n .attr(\"y\", 6)\n .attr(\"dy\", \".71em\")\n .style(\"text-anchor\", \"end\")\n .text(\"Individuals\");\n\n var state = svg.selectAll(\".state\")\n .data(datos)\n .enter().append(\"g\")\n .attr(\"class\", \"g\")\n .attr(\"transform\", function(d) { return \"translate(\" + x0(d.nombre) + \",0)\"; });\n\n state.selectAll(\"rect\")\n .data(function(d) { return d.genero; })\n .enter().append(\"rect\")\n .attr(\"width\", x1.rangeBand())\n .attr(\"x\", function(d) { return x1(d.name); })\n .attr(\"y\", function(d) { return y(d.value); })\n .attr(\"height\", function(d) { return height - y(d.value); })\n .style(\"fill\", function(d) { return color(d.name); });\n\n var legend = svg.selectAll(\".legend\")\n .data(generos.slice().reverse())\n .enter().append(\"g\")\n .attr(\"class\", \"legend\")\n .attr(\"transform\", function(d, i) { return \"translate(0,\" + i * 20 + \")\"; });\n\n legend.append(\"rect\")\n .attr(\"x\", width - 18)\n .attr(\"width\", 18)\n .attr(\"height\", 18)\n .style(\"fill\", color);\n\n legend.append(\"text\")\n .attr(\"x\", width - 24)\n .attr(\"y\", 9)\n .attr(\"dy\", \".35em\")\n .style(\"text-anchor\", \"end\")\n .text(function(d) { return d; });\n}", "function componentBarsStacked () {\n\n /* Default Properties */\n var width = 100;\n var height = 300;\n var transition = { ease: d3.easeBounce, duration: 500 };\n var colors = palette.categorical(3);\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n var yScale = void 0;\n var colorScale = void 0;\n var classed = \"barsStacked\";\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n var _dataTransform$summar = dataTransform(data).summary(),\n columnKeys = _dataTransform$summar.columnKeys,\n rowTotalsMax = _dataTransform$summar.rowTotalsMax;\n\n var valueExtent = [0, rowTotalsMax];\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(columnKeys).range(colors);\n }\n\n if (typeof yScale === \"undefined\") {\n yScale = d3.scaleLinear().domain(valueExtent).range([0, height]).nice();\n }\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias barsStacked\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n init(selection.data());\n selection.each(function () {\n\n // Stack Generator\n var stacker = function stacker(data) {\n var series = [];\n var y0 = 0;\n var y1 = 0;\n data.forEach(function (d, i) {\n y1 = y0 + d.value;\n series[i] = {\n key: d.key,\n value: d.value,\n y0: y0,\n y1: y1\n };\n y0 += d.value;\n });\n\n return series;\n };\n\n // Update bar group\n var barGroup = d3.select(this);\n barGroup.classed(classed, true).attr(\"id\", function (d) {\n return d.key;\n }).on(\"mouseover\", function (d) {\n dispatch.call(\"customSeriesMouseOver\", this, d);\n }).on(\"click\", function (d) {\n dispatch.call(\"customSeriesClick\", this, d);\n });\n\n // Add bars to group\n var bars = barGroup.selectAll(\".bar\").data(function (d) {\n return stacker(d.values);\n });\n\n bars.enter().append(\"rect\").classed(\"bar\", true).attr(\"width\", width).attr(\"x\", 0).attr(\"y\", height).attr(\"rx\", 0).attr(\"ry\", 0).attr(\"height\", 0).attr(\"fill\", function (d) {\n return colorScale(d.key);\n }).on(\"mouseover\", function (d) {\n dispatch.call(\"customValueMouseOver\", this, d);\n }).on(\"click\", function (d) {\n dispatch.call(\"customValueClick\", this, d);\n }).merge(bars).transition().ease(transition.ease).duration(transition.duration).attr(\"width\", width).attr(\"x\", 0).attr(\"y\", function (d) {\n return height - yScale(d.y1);\n }).attr(\"height\", function (d) {\n return yScale(d.value);\n });\n\n bars.exit().transition().style(\"opacity\", 0).remove();\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return my;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return this;\n };\n\n /**\n * Y Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 scale.\n * @returns {*}\n */\n my.yScale = function (_v) {\n if (!arguments.length) return yScale;\n yScale = _v;\n return my;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "function createMacroBarGraph(\n dates,\n calories_carb,\n calories_fat,\n calories_protein\n) {\n var chart = c3.generate({\n bindto: \"#chart1\",\n title: \"Macronutrient Breakdown by Day\",\n data: {\n x: \"Dates\",\n xFormat: \"%Y-%m-%d\",\n columns: [\n [\"Dates\", ...dates],\n [\"Protein Calories\", ...calories_protein],\n [\"Carb Calories\", ...calories_carb],\n [\"Fat Calories\", ...calories_fat]\n ],\n type: \"bar\",\n groups: [[\"Protein Calories\", \"Carb Calories\", \"Fat Calories\"]]\n },\n axis: {\n x: {\n type: \"category\",\n tick: {\n format: \"%Y-%m-%d\",\n rotate: 90,\n multiline: false\n },\n label: {\n text: \"Date\",\n position: \"outer-center\"\n }\n },\n y: {\n label: {\n text: \"Calories\",\n position: \"outer-middle\"\n }\n }\n }\n });\n}", "function buildChartDataMultipleBar(data, simsBtn, chartId, maxEntries) {\n var chartForMultipleBar = new Highcharts.Chart(getMultipleBarChartDefinition(\n buildWowheadTooltipsMultipleBar( data, simsBtn), \n data,\n getValue(LegendTitles, simsBtn),\n dpsIncrease,\n chartId,\n maxEntries));\n while (chartForMultipleBar.series.length > 0) {\n chartForMultipleBar.series[0].remove(false);\n }\n var minResults = [];\n var maxResults = [];\n\n for(i = 0; i <= AggregateConduits.length -1; i++) {\n minResults = [];\n maxResults = [];\n\n for(currFight in data[jsonData]) {\n var minValue = ((data[jsonData][currFight][AggregateConduits[i]][\"min\"]) * 100);\n var maxValue = ((data[jsonData][currFight][AggregateConduits[i]][\"max\"]) * 100) - ((data[jsonData][currFight][AggregateConduits[i]][\"min\"])) * 100;\n minResults.push(minValue);\n maxResults.push(maxValue);\n }\n\n chartForMultipleBar.addSeries({\n color: getCovenantChoiceColor(AggregateConduits[i] + \"_max\"),\n data: maxResults,\n name: getValue(Conduits, AggregateConduits[i]) + \" max\",\n stack: AggregateConduits[i],\n showInLegend: true,\n }, false);\n \n chartForMultipleBar.addSeries({\n color: getCovenantChoiceColor(AggregateConduits[i] + \"_min\"),\n data: minResults,\n name: getValue(Conduits, AggregateConduits[i]) + \" min\",\n stack: AggregateConduits[i],\n showInLegend: true,\n }, false);\n }\n chartForMultipleBar.redraw();\n updateSize(chartForMultipleBar, chartId, AggregateConduits.length, maxEntries);\n}", "function dosBars() {\n var barChart1 = document.querySelector('#dos-chart').getContext('2d');\n var dataChart = new Chart(barChart1).Bar(dosBar, {\n scaleBeginAtZero : true,\n scaleShowGridLines : true,\n scaleGridLineWidth : 1,\n scaleShowHorizontalLines: true,\n legendTemplate : \"<ul class=\\\"<%=name.toLowerCase()%>-legend\\\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\\\"background-color:<%=datasets[i].strokeColor%>\\\"></span><%if(datasets[i].label){%><%=datasets[i].labels%><%}%></li><%}%></ul>\"\n\n });\n //document.querySelector('#item3-6 #legend-container').innerHTML = dataChart.generateLegend();\n }", "function drawBarChart(obj,container)\n{\n\tvar chart = Highcharts.chart(container, {\n title: {\n text: obj.title.text\n },\n subtitle:{\n text: obj.title.subtitle\n },\n tooltip: {\n pointFormat: '{series.name}: <b>{point.y:.1f}%</b>'\n },\n xAxis: {\n categories: obj.XAxis.categories\n },\n yAxis:{\n title: {text:'Percentage (%)'},\n max:100\n },\n series: [{\n type: 'column',\n colorByPoint: true,\n data: obj.barChartData.data,\n showInLegend: false\n }]\n\n});\n}", "function drawBarChart(data) {\n\tvar chartData = convertToChartData(data);\n\ttypes = [];\n\tfor (t in accidentTypes) types.push(t);\n\t$(\"#chart\").empty();\n\t$(\"#chart\").jqBarGraph( {\n\t\tdata: chartData,\t// (array) data to show. e.g [ [[5,2,3,1,...,3],'Jan.'], [[2,..,5],'Feb.'], ... [[...],'Dec.']]\n\t\tlegends: types,\t\t// (array) text for each colors in legend \n\t\tlegend: true,\t\t\n\t\tlegendWidth:150,\n\t\tcolors: colors,\t\t// (array) color information for each type\n\t\ttype:false,\t\t\t// stacked bar chart \n\t\twidth:500,\t\t\t\n\t\theight:200,\n\t\tanimate:false, showValues:false\n\t});\n\tattachChartEvents();\n}", "function devicesWithMostBookedDays(){\n var data = google.visualization.arrayToDataTable(devicesWithMostBookedDays_arr);\n var height = 100 + 20*devicesWithMostBookedDays_arr.length;\n\n var options = {\n backgroundColor: \"#f9e7d5\",\n height: height,\n chartArea: {width: '65%'},\n isStacked: true,\n hAxis: {\n title: gon.devicesWithMostBookedDays_hAxis_title,\n minValue: 0,\n }\n };\n var chart = new google.visualization.BarChart(document.getElementById('g-chart-devicesWithMostBookedDays'));\n chart.draw(data, options);\n }", "function bar_load() {\n var barctx = document.getElementById(\"MyBar\").getContext('2d');\n var barchart = new Chart(barctx, {\n // The type of chart we want to create\n type: 'bar',\n data: {\n labels: dataset_global['state_district'],\n datasets: [{\n label: 'Total Population',\n backgroundColor: 'rgb(255, 99, 132)',\n borderColor: 'rgb(255, 99, 132)',\n data: totalpop,\n }]\n },\n\n // Configuration options go here\n options: {\n title: {\n\t\t\t\tdisplay: true,\n\t\t\t\ttext: \"Total Population by Congressional District\",\n\t\t\t\tfontsize: 14,\n\t\t\t},\n tooltips: {\n\t\t\t\tcallbacks: {\n\t\t\t\t label: function(tooltipItems, data) {\n\t\t\t\t\treturn data.datasets[0].data[tooltipItems.index].toLocaleString();;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t },\n responsive: true,\n maintainAspectRatio: true,\n legend: {\n position: 'right',\n display: true,\n },\n scales: {\n yAxes: [{\n position: 'left',\n ticks: {\n beginAtZero: true,\n callback: function (value, index, values) {\n return value.toLocaleString();\n }\n // minBarThickness: 500,\n // categoryPercentage:500,\n // barPercentage:500,\n\n }\n }]\n }\n }\n });\n}", "function addBarAxis () {\n\t\t\textraChartGroup.append(\"g\")\n\t\t\t .attr(\"class\", \"barYAxis\")\n\t\t\t .style(\"font-size\", 13 * screenRatio + \"px\")\n\t\t\t .call(leftAxis_extraChart);\n\t\t}", "function makeResultsBarChart(countries) {\n var chart = ui.Chart.feature.byFeature(countries, 'Name');\n chart.setChartType('BarChart');\n chart.setOptions({\n title: 'Population Comparison',\n vAxis: {title: null},\n hAxis: {title: 'Approximate 2015 Population', minValue: 0}\n });\n chart.style().set({stretch: 'both'});\n return chart;\n}", "function buildbarchart(option) {\n \n if (option ===\"costsbyyear\") {\n // var trace1 = {\n // x: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n // y: [-3200, -1190, 517.3, 1000, 8.6, 15.4, -2900, -14500, 190.3, 91.3,-1000],\n // name: \"Profits or Loss\",\n // type: \"bar\"\n // // [\"1976\", \"1980\", \"1984\", \"1988\",\"1992\", \"1996\", \"2000\", \"2004\", \"2008\", \"2012\", \"2016\"]\n // };\n var trace2 = {\n x: [\"1976y\", \"1980y\", \"1984y\", \"1988y\",\"1992y\", \"1996y\", \"2000y\", \"2004y\", \"2008y\", \"2012y\", \"2016y\"],\n y: [5100, 6331, 958, 8200, 16200, 2600, 6700, 11500, 47000, 15300, 12000],\n name: \"Total Costs\",\n mode: 'lines+markers',\n type: \"scatter\",\n marker: {\n color: \"purple\",\n },\n };\n var data = [trace2];\n var layout = {\n title: \"Olympic Host City Total Costs\",\n yaxis: {\n title: 'USD (Million)',\n font: {\n family:\"Arial\",\n }, \n } \n }; \n Plotly.newPlot(\"FZbar\", data, layout);\n }\n\n // var data = [\n // {\n // type: 'bar',\n // x: [\"1976\", \"1980\", \"1984\", \"1988\",\"1992\", \"1996\", \"2000\", \"2004\", \"2008\", \"2012\", \"2016\"],\n // y: [500,600,700],\n // base: [-500,-600,-700],\n // marker: {\n // color: 'red'\n // },\n // name: 'expenses'\n // },\n // {\n // type: 'bar',\n // x: ['2016','2017','2018'],\n // y: [300,400,700],\n // base: 0,\n // marker: {\n // color: 'blue'\n // },\n // name: 'revenue'\n // }]\n \n // Plotly.newPlot('myDiv', data);\n \n if (option ===\"byprofit\") { \n var trace1 = {\n x: [\"1988y\",\"1984y\",\"2008y\",\"2012y\",\"1996y\",\"1992y\", \"2016y\", \"1980y\", \"2000y\",\"1976y\",\"2004y\"],\n \n y: [1000, 517.3, 190.3, 91.3,15.4,8.6,-1000,-1190,-2900, -3200,-14500],\n marker:{\n color: [\"rgb(0, 179, 0)\", 'rgb(0, 179, 0)', 'rgb(0, 179, 0)', 'rgb(0, 179, 0)', 'rgb(0, 179, 0)','rgb(0, 179, 0)',\t'rgb(179, 0, 0)',\t'rgb(179, 0, 0)',\n \t'rgb(179, 0, 0)',\t'rgb(179, 0, 0)',\t'rgb(179, 0, 0)']\n },\n\n name: \"Profits or Loss\",\n \n type: \"bar\"\n };\n // var trace2 = {\n // x: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n // y: [8200,958,47000, 15300,2600,16200,12000,6331,6700,5100, 11500], \n // name: \"Total Costs\",\n // mode: \"markers\", \n // type: \"scatter\"\n // };\n var data = [trace1];\n var layout = {\n title: \"Olympic Profits and Fund Loss\", \n yaxis: {\n title: 'USD (Million)',\n font: {\n family:\"Arial\",\n }, \n } \n // <option value=\"byyear\">Profit by Year</option>\n // <option value=\"byprofit\">Profit by amount</option>\n \n }; \n Plotly.newPlot(\"FZbar\", data, layout);\n }\n\n if (option ===\"byyear\") {\n var trace1 = {\n x: [\"1976y\", \"1980y\", \"1984y\", \"1988y\",\"1992y\", \"1996y\", \"2000y\", \"2004y\", \"2008y\", \"2012y\", \"2016y\"],\n y: [-3200, -1190, 517.3, 1000, 8.6, 15.4, -2900, -14500, 190.3, 91.3,-1000],\n name: \"Profits or Loss\",\n marker:{\n color: ['rgb(179, 0, 0)','rgb(179, 0, 0)',\"rgb(0, 179, 0)\", 'rgb(0, 179, 0)',\"rgb(0, 179, 0)\", 'rgb(0, 179, 0)',\n 'rgb(179, 0, 0)', 'rgb(179, 0, 0)','rgb(0, 179, 0)', 'rgb(0, 179, 0)', 'rgb(179, 0, 0)']\n },\n\n \n type: \"bar\"\n };\n // var trace2 = {\n // x: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n // y: [47000, 16200, 15300, 12000, 11500, 8200, 6700, 6331, 5100,2600, 958], \n // name: \"Total Costs\", \n // mode: \"markers\",\n // type: \"scatter\"\n // };\n var data = [trace1];\n var layout = {\n title: \"Olympic Profits or Fund Loss\",\n yaxis: {\n title: 'USD (Million)',\n font: {\n family:\"Arial\",\n }, \n } \n }; \n Plotly.newPlot(\"FZbar\", data, layout);\n }\n\n}", "function peopleWithMostBookings(){\n var data = google.visualization.arrayToDataTable(peopleWithMostBookings_arr);\n var height = 100 + 20*peopleWithMostBookings_arr.length;\n\n var options = {\n height: height,\n backgroundColor: \"#f9e7d5\",\n chartArea: {width: '65%'},\n isStacked: true,\n hAxis: {\n title: gon.peopleWithMostBookings_hAxis_title,\n minValue: 0,\n }\n };\n var chart = new google.visualization.BarChart(document.getElementById('g-chart-peopleWithMostBookings'));\n chart.draw(data, options);\n }", "function barChart(selector, data) {\n nv.addGraph(function() {\n var chart = nv.models.multiBarHorizontalChart()\n .x(function(d) { return d.label })\n .y(function(d) { return d.value })\n .margin({top: 0, right: 20, bottom: 50, left: 115})\n .showValues(false)\n .tooltips(true)\n .showLegend(false)\n .showControls(false)\n .color(keyColor);\n\n chart.yAxis\n .tickFormat(d3.format(',d'));\n\n var ds = d3.select(selector);\n ds.selectAll('div.bar').remove();\n ds.append('div').attr('class', 'bar').append('svg')\n .datum(data)\n .transition().duration(500)\n .call(chart);\n\n var labels = ds.selectAll('.nv-x text');\n labels.append('text');\n acronymizeBars(labels);\n\n nv.utils.windowResize(function() {\n chart.update;\n acronymizeBars(labels);\n });\n return chart;\n });\n}", "function devicesWithMostBookings(){\n var data = google.visualization.arrayToDataTable(devicesWithMostBookings_arr);\n var height = 100 + 20*devicesWithMostBookings_arr.length;\n\n var options = {\n backgroundColor: \"#f9e7d5\",\n height: height,\n chartArea: {width: '65%'},\n isStacked: true,\n hAxis: {\n title: gon.devicesWithMostBookings_hAxis_title,\n minValue: 0,\n }\n };\n var chart = new google.visualization.BarChart(document.getElementById('g-chart-devicesWithMostBookings'));\n chart.draw(data, options);\n }", "function createGroupedBars() {\n //set all values by series\n chart.data.forEach(function (d) {\n d.values = axis.serieNames.map(function (name) {\n return {\n name: name,\n xValue: d[chart.xField],\n yValue: +d[name]\n };\n })\n });\n\n //get new y domain\n var newYDomain = [0, d3.max(chart.data, function (d) {\n return d3.max(d.values, function (v) {\n return v.yValue * 1.1;\n });\n })];\n\n //check whether the chart is reversed\n if (isReversed) {\n //set new domain\n newYDomain = [d3.max(chart.data, function (d) {\n return d3.max(d.values, function (v) {\n return v.yValue * 1.1;\n });\n }), 0];\n\n //update x axis\n axis.x.domain(newYDomain);\n } else {\n //update y axis\n axis.y.domain(newYDomain);\n }\n\n //get range band\n var rangeBand = groupAxis.rangeBand();\n\n //create bar groups on canvas\n groupedBars = chart.svg.selectAll('.eve-series')\n .data(chart.data)\n .enter().append('g')\n .attr('class', 'eve-series')\n .attr('transform', function (d) {\n if (isReversed)\n return 'translate(' + (axis.offset.left) + ',' + (axis.y(d[chart.xField])) + ')';\n else\n return 'translate(' + (axis.x(d[chart.xField]) + axis.offset.left) + ',0)';\n });\n\n //create bar group rectangles\n groupedBarsRects = groupedBars.selectAll('rect')\n .data(function (d) { return d.values; })\n .enter().append('rect')\n .attr('class', function (d, i) { return 'eve-bar-serie eve-bar-serie-' + i; })\n .attr('width', function (d) { return isReversed ? (axis.offset.width - axis.x(d.yValue)) : rangeBand; })\n .attr('x', function (d) { return isReversed ? 0 : groupAxis(d.name); })\n .attr('y', function (d) { return isReversed ? groupAxis(d.name) : axis.y(d.yValue); })\n .attr('height', function (d) { return isReversed ? rangeBand : (axis.offset.height - axis.y(d.yValue)); })\n .style('fill', function (d, i) {\n //check whether the serie has color\n if (chart.series[i].color === '')\n return i <= e.colors.length ? e.colors[i] : e.randColor();\n else\n return chart.series[i].color;\n })\n .style('stroke', '#ffffff')\n .style('stroke-width', function (d, i) { return chart.series[i].strokeSize + 'px'; })\n .style('stroke-opacity', function (d, i) { return chart.series[i].alpha; })\n .style('fill-opacity', function (d, i) { return chart.series[i].alpha; })\n .on('mousemove', function(d, i) {\n var balloonContent = chart.getXYFormat(d, chart.series[d.index]);\n\n //show balloon\n chart.showBalloon(balloonContent);\n\n //increase bullet stroke size\n d3.select(this)\n .style('stroke-width', function (d) { return chart.series[i].strokeSize + 1; });\n })\n .on('mouseout', function(d, i) {\n //hide balloon\n chart.hideBalloon();\n\n //increase bullet stroke size\n d3.select(this)\n .style('stroke-width', function (d) { return chart.series[i].strokeSize; });\n });\n\n //set serie labels\n groupedBarsTexts = groupedBars.selectAll('text')\n .data(function(d) { return d.values; })\n .enter().append('text')\n .attr('class', function(d, i) { return 'eve-bar-label eve-bar-label-' + i; })\n .style('cursor', 'pointer')\n .style('fill', function(d, i) { return chart.series[i].labelFontColor; })\n .style('font-weight', function(d, i) { return chart.series[i].labelFontStyle == 'bold' ? 'bold' : 'normal'; })\n .style('font-style', function(d, i) { return chart.series[i].labelFontStyle == 'bold' ? 'normal' : chart.series[i].labelFontStyle; })\n .style(\"font-family\", function(d, i) { return chart.series[i].labelFontFamily; })\n .style(\"font-size\", function(d, i) { return chart.series[i].labelFontSize + 'px'; })\n .text(function(d, i) {\n //check whether the label format is enabled\n if(chart.series[i].labelFormat != '')\n return chart.getXYFormat(d, chart.series[i], 'label');\n })\n .attr('x', function(d, i) {\n //return calculated x pos\n return isReversed ? (axis.offset.width - axis.x(d.yValue)) : (i * rangeBand);\n })\n .attr('y', function(d, i) {\n //return calculated y pos\n return isReversed ? groupAxis(d.name) + rangeBand : axis.y(d.yValue) - 2;\n });\n }", "function renderBars() {\n return sortEnergy().map( (item,i)=>{\n return <Bar \n bar={item} \n key={i} \n select={select} \n index={i} \n onClick={()=>setSelect(i)} \n onMouseLeave={()=>setSelect(-1)}>\n {item.name} { parseInt((item.value*100).toString()) }%\n </Bar>\n })\n }", "function addBars(parent, config, data) {\n var bars = parent.selectAll('g.bars')\n .data(data)\n .enter()\n .append('svg:g')\n .attr('transform', function (d, i) { return formatString('translate(0, {0})', config.y(i)); })\n .append('svg:rect')\n .attr('class', function (d, i) { return 'bar' + (d.slowest ? ' slowest' : '') + (d.fastest ? ' fastest' : ''); })\n .attr('x', config.left)\n .attr('width', function (d, i) { return config.x(d.value); })\n .attr('height', config.y.rangeBand());\n\n return bars;\n }", "function appendBars(paddingGroup, data, scales, plot) {\n const rectWidth = scales.x.bandwidth() * 0.2;\n paddingGroup.append('g')\n .attr('class', 'bars')\n .attr('transform', 'translate(' + (scales.x.bandwidth()/2 - rectWidth/2) + ',0)')\n .selectAll()\n .data(data)\n .enter()\n .append('rect')\n .attr('x', (d) => scales.x(d.name))\n .attr('y', (d) => scales.y(d.scoreToday))\n .attr('width', rectWidth)\n .attr('height', (d) => plot.range.y - scales.y(d.scoreToday))\n .attr('class', (d) => d.name);\n }", "function barChartPlotter(e) {\n var ctx = e.drawingContext;\n var points = e.points;\n var y_bottom = e.dygraph.toDomYCoord(0);\n\n // This should really be based on the minimum gap\n var bar_width = 2/3 * (points[1].canvasx - points[0].canvasx);\n ctx.fillStyle = e.color;\n\n // Do the actual plotting.\n for (var i = 0; i < points.length; i++) {\n var p = points[i];\n var center_x = p.canvasx; // center of the bar\n ctx.fillRect(center_x - bar_width / 2, p.canvasy, bar_width, y_bottom - p.canvasy);\n ctx.strokeRect(center_x - bar_width / 2, p.canvasy, bar_width, y_bottom - p.canvasy);\n }\n }", "function componentBarsHorizontal () {\n\n /* Default Properties */\n var width = 400;\n var height = 500;\n var transition = { ease: d3.easeBounce, duration: 500 };\n var colors = palette.categorical(3);\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n var xScale = void 0;\n var yScale = void 0;\n var colorScale = void 0;\n var classed = \"barsHorizontal\";\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n var _dataTransform$summar = dataTransform(data).summary(),\n columnKeys = _dataTransform$summar.columnKeys,\n valueMax = _dataTransform$summar.valueMax;\n\n var valueExtent = [0, valueMax];\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(columnKeys).range(colors);\n }\n\n if (typeof xScale === \"undefined\") {\n xScale = d3.scaleLinear().domain(valueExtent).range([0, height]).nice();\n }\n\n if (typeof yScale === \"undefined\") {\n yScale = d3.scaleBand().domain(columnKeys).rangeRound([0, width]).padding(0.15);\n }\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias barsHorizontal\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n init(selection.data());\n selection.each(function () {\n\n // Update series group\n var seriesGroup = d3.select(this);\n seriesGroup.classed(classed, true).attr(\"id\", function (d) {\n return d.key;\n }).on(\"mouseover\", function (d) {\n dispatch.call(\"customSeriesMouseOver\", this, d);\n }).on(\"click\", function (d) {\n dispatch.call(\"customSeriesClick\", this, d);\n });\n\n // Add bars to series\n var bars = seriesGroup.selectAll(\".bar\").data(function (d) {\n return d.values;\n });\n\n bars.enter().append(\"rect\").classed(\"bar\", true).attr(\"fill\", function (d) {\n return colorScale(d.key);\n }).attr(\"width\", yScale.bandwidth()).attr(\"y\", function (d) {\n return yScale(d.key);\n }).attr(\"height\", yScale.bandwidth()).on(\"mouseover\", function (d) {\n dispatch.call(\"customValueMouseOver\", this, d);\n }).on(\"click\", function (d) {\n dispatch.call(\"customValueClick\", this, d);\n }).merge(bars).transition().ease(transition.ease).duration(transition.duration).attr(\"x\", 0).attr(\"width\", function (d) {\n return xScale(d.value);\n });\n\n bars.exit().transition().style(\"opacity\", 0).remove();\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return my;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return my;\n };\n\n /**\n * X Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 scale.\n * @returns {*}\n */\n my.xScale = function (_v) {\n if (!arguments.length) return xScale;\n xScale = _v;\n return my;\n };\n\n /**\n * Y Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 scale.\n * @returns {*}\n */\n my.yScale = function (_v) {\n if (!arguments.length) return yScale;\n yScale = _v;\n return my;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "function addBarsTwoSided(select, data, x, addClass) {\r\n\r\n // select correct section\r\n var svgChangeTwoSidedData = svgTwoSided.selectAll(select)\r\n .data(data);\r\n \r\n // initialize rectangles\r\n svgChangeTwoSidedData.enter().append(\"rect\");\r\n\r\n // add bars\r\n svgChangeTwoSidedData.transition()\r\n .attr(\"x\", x)\r\n .attr(\"y\", yPosition)\r\n .attr(\"width\", xT)\r\n .attr(\"height\", yT.rangeBand())\r\n .attr(\"class\", addClass);\r\n \r\n // add tooltip to bars of two sided barchart\r\n addTooltipToBars(\"rect.left\");\r\n addTooltipToBars(\"rect.right\");\r\n}", "function createStackedBars() {\n //manipulate chart data\n chart.data.forEach(function(d) {\n //set first y value\n var y0 = 0;\n\n //set series\n d.values = axis.serieNames.map(function(name) {\n //set value object\n var dataObj = {\n name: 'name',\n xValue: d[chart.xField],\n yValue: +d[name],\n y0: y0,\n y1: y0 += +d[name]\n };\n\n //return data object\n return dataObj;\n });\n\n //set serie total\n d.total = d.values[d.values.length - 1].y1;\n });\n\n //sort chart data\n chart.data.sort(function (a, b) { return b.total - a.total; });\n \n //check whether the axis is reversed\n /*if (isReversed)\n axis.x.domain([0, d3.max(chart.data, function (d) { return d.total; })]);\n else\n axis.y.domain([0, d3.max(chart.data, function (d) { return d.total; })]);*/\n\n //create stack bars on canvas\n stackedBars = chart.svg.selectAll('.eve-series')\n .data(chart.data)\n .enter().append('g')\n .attr('class', 'eve-series')\n .attr('transform', function (d) {\n //check whether the chart is reversed\n if (isReversed) {\n return 'translate(' + axis.offset.left + ',' + (axis.y(d[chart.xField])) + ')';\n } else {\n return 'translate(' + (axis.x(d[chart.xField]) + axis.offset.left) + ',0)';\n }\n });\n\n //create stacked bar rectangles\n stackedBarsRects = stackedBars.selectAll('rect')\n .data(function (d) { return d.values; })\n .enter().append('rect')\n .attr('class', function (d, i) { return 'eve-bar-serie eve-bar-serie-' + i; })\n .attr('width', function (d) { return isReversed ? (axis.x(d.y1) - axis.x(d.y0)) : axis.x.rangeBand(); })\n .attr('height', function (d) { return isReversed ? axis.y.rangeBand() : (axis.y(d.y0) - axis.y(d.y1)); })\n .style('fill', function (d, i) {\n //check whether the serie has color\n if (chart.series[i].color === '')\n return i <= e.colors.length ? e.colors[i] : e.randColor();\n else\n return chart.series[i].color;\n })\n .style('stroke', function (d, i) {\n //check whether the serie has color\n if (chart.series[i].color === '')\n return i <= e.colors.length ? e.colors[i] : e.randColor();\n else\n return chart.series[i].color;\n })\n .style('stroke-width', function (d, i) { return chart.series[i].strokeSize + 'px'; })\n .style('stroke-opacity', function (d, i) { return chart.series[i].alpha; })\n .style('fill-opacity', function (d, i) { return chart.series[i].alpha; })\n .on('mousemove', function(d, i) {\n var balloonContent = chart.getXYFormat(d, chart.series[d.index]);\n\n //show balloon\n chart.showBalloon(balloonContent);\n\n //increase bullet stroke size\n d3.select(this)\n .style('stroke-width', function (d) { return chart.series[i].strokeSize + 1; });\n })\n .on('mouseout', function(d, i) {\n //hide balloon\n chart.hideBalloon();\n\n //increase bullet stroke size\n d3.select(this)\n .style('stroke-width', function (d) { return chart.series[i].strokeSize; });\n });\n\n //set serie labels\n stackedBarsTexts = stackedBars.selectAll('text')\n .data(function(d) { return d.values; })\n .enter().append('text')\n .attr('class', function(d, i) { return 'eve-bar-label eve-bar-label-' + i; })\n .style('cursor', 'pointer')\n .style('fill', function(d, i) { return chart.series[i].labelFontColor; })\n .style('font-weight', function(d, i) { return chart.series[i].labelFontStyle == 'bold' ? 'bold' : 'normal'; })\n .style('font-style', function(d, i) { return chart.series[i].labelFontStyle == 'bold' ? 'normal' : chart.series[i].labelFontStyle; })\n .style(\"font-family\", function(d, i) { return chart.series[i].labelFontFamily; })\n .style(\"font-size\", function(d, i) { return chart.series[i].labelFontSize + 'px'; })\n .text(function(d, i) {\n //check whether the label format is enabled\n if(chart.series[i].labelFormat != '')\n return chart.getXYFormat(d, chart.series[i], 'label');\n });\n\n //check whether the chart is reversed\n if (isReversed) {\n stackedBarsRects.attr('x', function (d) { return axis.x(d.y0); });\n stackedBarsTexts\n .attr('x', function (d, i) {\n //return calculated x pos\n return axis.x(d.y0) + (axis.x(d.y1) - axis.x(d.y0)) - this.getBBox().width - 2;\n })\n .attr('y', function (d, i) {\n //return calculated y pos\n return axis.y.rangeBand() - 2;\n });\n } else {\n stackedBarsRects.attr('y', function (d) { return axis.y(d.y1); });\n stackedBarsTexts\n .attr('x', function (d, i) {\n //return calculated x pos\n return (axis.x.rangeBand() / 2 - this.getBBox().width / 2);\n })\n .attr('y', function (d) {\n //return calculated y pos\n return axis.y(d.y1) + this.getBBox().height - 2;\n });\n }\n }", "function VBarchart(paper, x, y, width, height, values, opts) {\n\t\topts = opts || {};\n\n\t\tvar chartinst = this,\n\t\t\ttype = \"square\",\n\t\t\tgutter = parseFloat(opts.gutter || \"20%\"),\n\t\t\tchart = paper.set(),\n\t\t\tbars = paper.set(),\n\t\t\tcovers = paper.set(),\n\t\t\tcovers2 = paper.set(),\n\t\t\ttotal = Math.max.apply(Math, values),\n\t\t\tcolors = opts.colors || chartinst.colors,\n\t\t\tstart = opts.start,\n\t\t\ttime_scale = opts.time_scale,\n\t\t\tlen = values.length-1;\n\n\t\tif (Raphael.is(values[0], \"array\")) {\n\t\t\ttotal = [];\n\t\t\tlen = values[0].length;\n\n\t\t\tfor (var i = values.length-1; i--;) {\n\t\t\t\ttotal.push(Math.max.apply(Math, values[i]));\n\t\t\t}\n\n\t\t\ttotal = Math.max.apply(Math, total);\n\t\t}\n\n\t\tvar barwidth = width / (len * (100 + gutter) + gutter) * 100,\n\t\t\tbarhgutter = barwidth * gutter / 100,\n\t\t\tbarvgutter = opts.vgutter == null ? 20 : opts.vgutter,\n\t\t\tstack = [],\n\t\t\tX = x + barhgutter,\n\t\t\tY = (height - 2 * barvgutter) / total,\n\t\t\tlimits = [];\n\n\t\tX = x + barhgutter;\n \n\t\tif(values[1] && values[1].length > 0 && values[2] && values[2].length > 0){\n \n\t\t\t//upper line\n\t\t\tvar path = [], j = 1, begin = 0;\n\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tvar stack = [];\n\n\t\t\t\tX += barwidth;\n \n\t\t\t\tvar h = Math.round(values[j][i] * Y), top = y + height - barvgutter - h;\n\t\t\t\tif (h==0) h=1;\n\t\t\t\t\n\t\t\t\tif (opts.hwb == \"1\") {\n\t\t\t\t limits.push({upper: height - top});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(i == 0){\n\t\t\t\t\tpath.push(\"M\" + ((X + barwidth / 2) - barwidth) + \" \" + top );\n\t\t\t\t}else{\n\t\t\t\t\tpath.push(\"L\" + ((X + barwidth / 2) - barwidth) + \" \" + top );\n\t\t\t\t}\n\n\t\t\t\tX += barhgutter;\n\t\t\t}\n \n\t\t\t//lower line\n\t\t\tj = 2;\n\n\t\t\tfor (var i = len -1; i >= 0; i--) {\n\t\t\t\tvar stack = [];\n\n\t\t\t\tX -= barhgutter;\n\n\t\t\t\t//draw sth here\n\t\t\t\tvar h = Math.round(values[j][i] * Y), top = y + height - barvgutter - h;\n\n if (opts.hwb == \"1\") {\n \t\t\t\t limits[i].lower = height - top;\n }\n \n\t\t\t\tif(i == 0){\n\t\t\t\t\tpath.push(\"L\" + ((X + barwidth / 2) - barwidth ) + \" \" + top + \"Z\");\n\t\t\t\t}else{\n\t\t\t\t\tpath.push(\"L\" + ((X + barwidth / 2) - barwidth) + \" \" + top );\n\t\t\t\t}\n\n\t\t\t\tX -= barwidth;\n\t\t\t}\n \n\t\t\tif(Math.max.apply(Math, values[1]) > 0 && Math.max.apply(Math, values[2]) > 0 ){\n\t\t\t\tpaper.path(path.join(\"\")).attr({'stroke-opacity':0,'stroke-width': 0, fill: '#EBEBEB'}); \n\t\t\t}\n\t\t}\n\n\t\t//current\n\n\t\tX = x + barhgutter;\n\n\t\tj = 0;\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tstack = [];\n\n\t\t\tvar h = Math.round(values[j][i] * Y);\n\t\t\t\n\t\t\tif (h==0 || isNaN(h)) h=1;\n\n\t\t\tvar\ttop = y + height - barvgutter - h,\n\t\t\t\tcolor = (h==1)?\"#c0c0c0\":pickColor(limits[i], height - top, colors, i == len - 1, opts.curr_number),\n\t\t\t\tbar = finger((X + barwidth / 2), top + h, barwidth, h, true, type, null, paper).attr({ 'stroke-opacity':0,'stroke-width':0,stroke: color, fill: color, 'fill-opacity': .85 });\n \n\t\t\t\tbars.push(bar);\n\n\t\t\t\tbar.y = top;\n\t\t\t\tbar.x = (X + barwidth / 2);\n\t\t\t\tbar.w = barwidth;\n\t\t\t\tbar.h = h;\n\t\t\t\tbar.value = values[j][i];\n\t\t\t\tbar.time = start + i*time_scale;\n\t\t\t\tX += barwidth + barhgutter;\n if (values[3] && values[3].length > 0) {\n bar.status = values[3][i];\n } else {\n bar.status = [];\n }\n\t\t}\n\t\t\n\t\t//hover effect\n\t\tX = x + barhgutter;\n\t\t\n\t\tj = 0;\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tvar cover;\n\n\t\t\tcovers.push(cover = paper.rect(Math.round(X), y + barvgutter, barwidth, height - barvgutter).attr(chartinst.shim));\n\t\t\tcover.bar = bars[i];\n cover.value = cover.bar.value;\n\t\t\tX += barwidth + barhgutter;\n\t\t}\n\n\t\tchart.hover = function (fin, fout) {\n\t\t\tcovers.show();\n\t\t\tcovers.mouseover(fin).mouseout(fout);\n\t\t\treturn this;\n\t\t};\n \n chart.push(bars, covers);\n chart.bars = bars;\n chart.covers = covers;\n return chart;\n }", "function plot2HB(attribute1, attribute2, data1, data2) {\n var margin = {\n top: 32,\n right: 100,\n bottom: 20,\n left: 100\n };\n\n var divBarchartLength = document.getElementById(\"barchart\").offsetWidth;\n var labelArea = 100;\n var width = (divBarchartLength - margin.left - labelArea - margin.right) / 2;\n bar_height = 20,\n height = bar_height * data1.length;\n var rightOffset = margin.left + width + labelArea;\n\n var lCol = attribute1;\n var rCol = attribute2;\n var xFrom = d3.scale.linear()\n .range([0, width]);\n var xTo = d3.scale.linear()\n .range([0, width]);\n var y = d3.scale.ordinal()\n .rangeBands([20, height]);\n\n d3.select(\"#barchart\").selectAll('svg').remove();\n var chart = d3.select(\"#barchart\")\n .append('svg')\n .attr('class', 'chart')\n .attr('width', divBarchartLength)\n .attr('height', height + margin.top + margin.bottom);\n\n xFrom.domain([0, d3.max(data1, function (d) {\n return d[lCol];\n })]);\n xTo.domain([0, d3.max(data2, function (d) {\n return d[rCol];\n })]);\n\n y.domain(data1.map(function (d) {\n return d.date;\n }));\n\n var yPosByIndex = function (d) {\n return y(d.date) + margin.top;\n };\n\n function handleBarHover(d, attribute) {\n // Use D3 to select element, change color and size\n //console.log(attribute);\n //console.log(d);\n // TODO: change the color of the bar\n\n updateInfoBoxBar(d, 0, attribute);\n }\n\n function handleBarOut(d, i) {\n // remove info box\n updateInfoBoxBar(d, -1);\n }\n\n chart.selectAll(\"rect.left\")\n .data(data1)\n .enter().append(\"rect\")\n .attr(\"x\", function (d) {\n return margin.left + width - xFrom(d[lCol]);\n })\n .attr(\"y\", yPosByIndex)\n .attr(\"class\", \"left\")\n .attr(\"width\", function (d) {\n return xFrom(d[lCol]);\n })\n .attr(\"height\", y.rangeBand())\n .on(\"mouseover\", function (d) {\n d.game = games[leftSelectedGame]; // !!! game name order inside games matters\n handleBarHover(d, leftAttribute);\n })\n .on(\"mouseout\", handleBarOut);\n\n chart.selectAll(\"text.leftscore\")\n .data(data1)\n .enter().append(\"text\")\n .attr(\"x\", function (d) {\n return margin.left + width - xFrom(d[lCol]) - 40;\n })\n .attr(\"y\", function (d) {\n return y(d.date) + y.rangeBand() / 2 + margin.top;\n })\n .attr(\"dx\", \"20\")\n .attr(\"dy\", \".36em\")\n .attr(\"text-anchor\", \"end\")\n .attr('class', 'leftscore')\n .text(function (d) {\n return d[lCol];\n });\n chart.selectAll(\"text.name\")\n .data(data1)\n .enter().append(\"text\")\n .attr(\"x\", (labelArea / 2) + width + margin.left)\n .attr(\"y\", function (d) {\n return y(d.date) + y.rangeBand() / 2 + margin.top;\n })\n .attr(\"dy\", \".20em\")\n .attr(\"text-anchor\", \"middle\")\n .attr('class', 'name')\n .text(function (d) {\n return d.date;\n });\n\n chart.selectAll(\"rect.right\")\n .data(data2)\n .enter().append(\"rect\")\n .attr(\"x\", rightOffset)\n .attr(\"y\", yPosByIndex)\n .attr(\"class\", \"right\")\n .attr(\"width\", function (d) {\n return xTo(d[rCol]);\n })\n .attr(\"height\", y.rangeBand())\n .on(\"mouseover\", function (d) {\n d.game = games[rightSelectedGame]; // !!! game name order inside games matters\n handleBarHover(d, rightAttribute);\n })\n .on(\"mouseout\", handleBarOut);\n\n chart.selectAll(\"text.score\")\n .data(data2)\n .enter().append(\"text\")\n .attr(\"x\", function (d) {\n return xTo(d[rCol]) + rightOffset + 50;\n })\n .attr(\"y\", function (d) {\n return y(d.date) + y.rangeBand() / 2 + margin.top;\n })\n .attr(\"dx\", -5)\n .attr(\"dy\", \".36em\")\n .attr(\"text-anchor\", \"end\")\n .attr('class', 'score')\n .text(function (d) {\n return d[rCol];\n });\n\n }", "function BarChart() {\n\n var my = ChiasmComponent({\n\n margin: {\n left: 150,\n top: 30,\n right: 30,\n bottom: 60\n },\n\n sizeColumn: Model.None,\n sizeLabel: Model.None,\n\n idColumn: Model.None,\n idLabel: Model.None,\n\n orientation: \"vertical\",\n\n // These properties adjust spacing between bars.\n // The names correspond to the arguments passed to\n // d3.scale.ordinal.rangeRoundBands(interval[, padding[, outerPadding]])\n // https://github.com/mbostock/d3/wiki/Ordinal-Scales#ordinal_rangeRoundBands\n barPadding: 0.1,\n barOuterPadding: 0.1,\n\n fill: \"black\",\n stroke: \"none\",\n strokeWidth: \"1px\",\n\n // Desired number of pixels between tick marks.\n xAxisTickDensity: 50,\n\n // Translation down from the X axis line (pixels).\n xAxisLabelOffset: 50,\n\n // Desired number of pixels between tick marks.\n yAxisTickDensity: 30,\n\n // Translation left from the X axis line (pixels).\n yAxisLabelOffset: 45\n\n });\n\n // This scale is for the length of the bars.\n var sizeScale = d3.scale.linear();\n\n my.el = document.createElement(\"div\");\n var svg = d3.select(my.el).append(\"svg\");\n var g = svg.append(\"g\");\n\n var xAxis = d3.svg.axis().orient(\"bottom\");\n var xAxisG = g.append(\"g\").attr(\"class\", \"x axis\");\n var xAxisLabel = xAxisG.append(\"text\")\n .style(\"text-anchor\", \"middle\")\n .attr(\"class\", \"label\");\n\n var yAxis = d3.svg.axis().orient(\"left\");\n var yAxisG = g.append(\"g\").attr(\"class\", \"y axis\");\n var yAxisLabel = yAxisG.append(\"text\")\n .style(\"text-anchor\", \"middle\")\n .attr(\"class\", \"label\");\n\n // TODO think about adding this stuff as configurable\n // .tickFormat(d3.format(\"s\"))\n // .outerTickSize(0);\n\n my.when(\"xAxisLabelText\", function (xAxisLabelText) {\n xAxisLabel.text(xAxisLabelText);\n });\n my.when([\"width\", \"xAxisLabelOffset\"], function (width, offset) {\n xAxisLabel.attr(\"x\", width / 2).attr(\"y\", offset);\n });\n\n my.when([\"height\", \"yAxisLabelOffset\"], function (height, offset) {\n yAxisLabel.attr(\"transform\", [\n \"translate(-\" + offset + \",\" + (height / 2) + \") \",\n \"rotate(-90)\"\n ].join(\"\"));\n });\n my.when(\"yAxisLabelText\", function (yAxisLabelText) {\n yAxisLabel.text(yAxisLabelText);\n });\n\n // Respond to changes in size and margin.\n // Inspired by D3 margin convention from http://bl.ocks.org/mbostock/3019563\n my.when(\"box\", function (box) {\n svg.attr(\"width\", box.width)\n .attr(\"height\", box.height);\n });\n my.when([\"box\", \"margin\"], function (box, margin) {\n my.width = box.width - margin.left - margin.right;\n my.height = box.height - margin.top - margin.bottom;\n g.attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\n });\n\n my.when(\"height\", function (height) {\n xAxisG.attr(\"transform\", \"translate(0,\" + height + \")\");\n });\n\n my.when([\"idColumn\", \"dataset\"],\n function (idColumn, dataset) {\n\n // This metadata is only present for aggregated numeric columns.\n var meta = dataset.metadata[idColumn];\n var idScale;\n\n if (meta) {\n\n // Handle the case of an aggregated numeric column.\n idScale = d3.scale.linear();\n idScale.domain(meta.domain);\n idScale.rangeBand = function () {\n return Math.abs(idScale(meta.step) - idScale(0));\n };\n idScale.rangeBands = function (extent) {\n idScale.range(extent);\n };\n idScale.step = meta.step;\n } else {\n\n // Handle the case of a string (categorical) column.\n idScale = d3.scale.ordinal();\n idScale.domain(dataset.data.map(function (d) {\n return d[idColumn];\n }));\n idScale.step = \"\";\n }\n my.idScale = idScale;\n });\n\n my.when(\"dataset\", function (dataset) {\n my.data = dataset.data;\n my.metadata = dataset.metadata;\n });\n\n my.when([\"data\", \"sizeColumn\", \"idScale\", \"idColumn\", \"width\", \"height\", \"orientation\", \"idLabel\", \"sizeLabel\", \"barPadding\", \"barOuterPadding\"],\n function (data, sizeColumn, idScale, idColumn, width, height, orientation, idLabel, sizeLabel, barPadding, barOuterPadding) {\n\n if (sizeColumn !== Model.None) {\n\n // TODO separate out this logic.\n sizeScale.domain([0, d3.max(data, function (d) {\n return d[sizeColumn];\n })]);\n\n if (orientation === \"vertical\") {\n\n sizeScale.range([height, 0]);\n idScale.rangeBands([0, width], barPadding, barOuterPadding);\n\n my.barsX = function (d) {\n return idScale(d[idColumn]);\n };\n my.barsY = function (d) {\n return sizeScale(d[sizeColumn]);\n };\n my.barsWidth = idScale.rangeBand();\n my.barsHeight = function (d) {\n return height - my.barsY(d);\n };\n\n my.xScale = idScale;\n if (idLabel !== Model.None) {\n my.xAxisLabelText = idLabel;\n }\n\n my.yScale = sizeScale;\n if (sizeLabel !== Model.None) {\n my.yAxisLabelText = sizeLabel;\n }\n\n } else if (orientation === \"horizontal\") {\n\n sizeScale.range([0, width]);\n idScale.rangeBands([height, 0], barPadding, barOuterPadding);\n\n my.barsX = 0;\n my.barsY = function (d) {\n\n // Using idScale.step here is kind of an ugly hack to get the\n // right behavior for both linear and ordinal id scales.\n return idScale(d[idColumn] + idScale.step);\n };\n my.barsWidth = function (d) {\n return sizeScale(d[sizeColumn]);\n };\n my.barsHeight = idScale.rangeBand();\n\n// TODO flip vertically for histogram mode.\n// my.barsX = 0;\n// my.barsWidth = function(d) { return sizeScale(d[sizeColumn]); };\n// my.barsHeight = Math.abs(idScale.rangeBand());\n// my.barsY = function(d) {\n// return idScale(d[idColumn]) - my.barsHeight;\n// };\n\n my.xScale = sizeScale;\n if (sizeLabel !== Model.None) {\n my.xAxisLabelText = sizeLabel;\n }\n\n my.yScale = idScale;\n if (idLabel !== Model.None) {\n my.yAxisLabelText = idLabel;\n }\n\n }\n }\n });\n\n my.when([\"data\", \"barsX\", \"barsWidth\", \"barsY\", \"barsHeight\"],\n function (data, barsX, barsWidth, barsY, barsHeight) {\n\n my.bars = g.selectAll(\"rect\").data(data);\n my.bars.enter().append(\"rect\")\n\n // This makes it so that there are no anti-aliased spaces between the bars.\n .style(\"shape-rendering\", \"crispEdges\");\n\n my.bars.exit().remove();\n //my.bars\n // .attr(\"x\", barsX)\n // .attr(\"width\", barsWidth)\n // .attr(\"y\", barsY)\n // .attr(\"height\", barsHeight);\n my.bars.attr(\"x\", barsX);\n my.bars.attr(\"width\", barsWidth);\n my.bars.attr(\"y\", barsY);\n my.bars.attr(\"height\", barsHeight);\n\n\n // Withouth this line, the bars added in the enter() phase\n // will flash as black for a fraction of a second.\n updateBarStyles();\n\n });\n\n function updateBarStyles() {\n my.bars\n .attr(\"fill\", my.fill)\n .attr(\"stroke\", my.stroke)\n .attr(\"stroke-width\", my.strokeWidth);\n }\n\n my.when([\"bars\", \"fill\", \"stroke\", \"strokeWidth\"], updateBarStyles)\n\n my.when([\"xScale\", \"width\", \"xAxisTickDensity\"],\n function (xScale, width, density) {\n xAxis.scale(xScale).ticks(width / density);\n xAxisG.call(xAxis);\n });\n\n my.when([\"yScale\", \"height\", \"yAxisTickDensity\"],\n function (yScale, height, density) {\n yAxis.scale(yScale).ticks(height / density);\n yAxisG.call(yAxis);\n });\n\n return my;\n }", "function dsBarChartBasics(){\n var margin ={top:30,right:5,bottom:20,left:50},\n width=500-margin.left-margin.right,\n height=250-margin.top-margin.bottom,\n colorBar=d3.scale.category20(),\n barPadding=1\n ;\n\n return{\n margin:margin,\n width:width,\n height:height,\n colorBar:colorBar,\n barPadding:barPadding\n }\n ;\n}", "function chart(selection) {\n selection.each(function(data) {\n\n // baseDimension = stacked ? vertical ? 72 : 30 : 20;\n\n var container = d3.select(this),\n orientation = vertical ? 'vertical' : 'horizontal',\n availableWidth = width - margin.left - margin.right,\n availableHeight = height - margin.top - margin.bottom,\n dimX = vertical ? 'width' : 'height',\n dimY = vertical ? 'height' : 'width',\n dimLabel = vertical ? 'width' : 'height',\n valX = vertical ? 'x' : 'y',\n valY = vertical ? 'y' : 'x',\n seriesCount = 0,\n groupCount = 0,\n minSeries = 0,\n maxSeries = data.length - 1,\n verticalLabels = false,\n labelPosition = showValues,\n labelLengths = [],\n labelThickness = 0;\n\n function barLength(d, i) {\n return Math.max(Math.round(Math.abs(y(getY(d, i)) - y(0))), 0);\n }\n function barThickness() {\n return x.rangeBand() / (stacked ? 1 : data.length);\n }\n function sign(bool) {\n return bool ? 1 : -1;\n }\n\n if (stacked) {\n data = d3.layout.stack()\n .offset('zero')\n .values(function(d) { return d.values; })\n .y(getY)(data);\n if (labelPosition === 'top' || labelPosition === true) {\n labelPosition = 'end';\n }\n } else if (labelPosition) {\n if (labelPosition === 'total') {\n labelPosition = 'top';\n }\n verticalLabels = vertical;\n }\n\n //------------------------------------------------------------\n // HACK for negative value stacking\n if (stacked) {\n var groupTotals = [];\n data[0].values.map(function(d, i) {\n var posBase = 0,\n negBase = 0;\n data.map(function(d) {\n var f = d.values[i];\n f.size = Math.abs(f.y);\n if (f.y < 0) {\n f.y1 = negBase - (vertical ? 0 : f.size);\n negBase -= f.size;\n } else {\n f.y1 = posBase + (vertical ? f.size : 0);\n posBase += f.size;\n }\n });\n groupTotals[i] = {neg: negBase, pos: posBase};\n });\n }\n\n //------------------------------------------------------------\n // Setup Scales\n\n // remap and flatten the data for use in calculating the scales' domains\n var seriesData = (xDomain && yDomain && !showValues) ?\n [] : // if we know xDomain and yDomain, no need to calculate\n d3.merge(data.map(function(d) {\n return d.values.map(function(d, i) {\n return {x: getX(d, i), y: getY(d, i), y0: d.y0, y1: d.y1};\n });\n }));\n\n groupCount = data[0].values.length;\n seriesCount = data.length;\n\n if (showValues) {\n var labelData = labelPosition === 'total' && stacked ?\n groupTotals.map(function(d) { return d.neg; }).concat(\n groupTotals.map(function(d) { return d.pos; })\n ) :\n seriesData.map(function(d, i) {\n return d.y;\n });\n\n var seriesExtents = d3.extent(data.map(function(d, i) { return d.series; }));\n minSeries = seriesExtents[0];\n maxSeries = seriesExtents[1];\n\n labelLengths = nv.utils.stringSetLengths(\n labelData,\n container,\n valueFormat,\n 'nv-label-value'\n );\n\n labelThickness = nv.utils.stringSetThickness(\n [0123],\n container,\n valueFormat,\n 'nv-label-value'\n )[0];\n }\n\n chart.resetDimensions = function(w, h) {\n width = w;\n height = h;\n availableWidth = w - margin.left - margin.right;\n availableHeight = h - margin.top - margin.bottom;\n resetScale();\n };\n\n function resetScale() {\n var maxX = vertical ? availableWidth : availableHeight,\n maxY = vertical ? availableHeight : availableWidth;\n\n var boundsWidth = stacked ? baseDimension : baseDimension * seriesCount + baseDimension,\n gap = baseDimension * (stacked ? 0.25 : 1),\n outerPadding = Math.max(0.25, (maxX - (groupCount * boundsWidth) - gap) / (2 * boundsWidth));\n\n if (withLine) {\n /*TODO: used in reports to keep bars from being too wide\n breaks pareto chart, so need to update line to adjust x position */\n x .domain(xDomain || seriesData.map(function(d) { return d.x; }))\n .rangeBands([0, maxX], 0.3);\n\n } else {\n x .domain(xDomain || seriesData.map(function(d) { return d.x; }))\n .rangeRoundBands([0, maxX], 0.25, outerPadding);\n }\n\n var yDomain = yDomain || d3.extent(seriesData.map(function(d) {\n var posOffset = (vertical ? 0 : d.y),\n negOffset = (vertical ? d.y : 0);\n return stacked ? (d.y > 0 ? d.y1 + posOffset : d.y1 + negOffset) : d.y;\n }).concat(forceY));\n\n var yRange = vertical ? [availableHeight, 0] : [0, availableWidth];\n\n // initial set of y scale based on full dimension\n y .domain(yDomain)\n .range(yRange);\n\n\n if (showValues) {\n // this must go here because barThickness varies\n if (vertical && stacked && d3.max(labelLengths) + 8 > barThickness()) {\n verticalLabels = true;\n }\n // vlbl hlbl\n // vrt: N Y\n // hrz: N N\n dimLabel = vertical && !verticalLabels ? 'labelHeight' : 'labelWidth';\n }\n\n //------------------------------------------------------------\n // recalculate y.range if grouped and show values\n\n if (labelPosition === 'top' || labelPosition === 'total') {\n var maxBarLength = maxY,\n minBarLength = 0,\n maxValuePadding = 0,\n minValuePadding = 0,\n gap = vertical ? verticalLabels ? 2 : -2 : 2;\n\n labelData.forEach(function(d, i) {\n var labelDim = labelPosition === 'total' && stacked && vertical && !verticalLabels ? labelThickness : labelLengths[i];\n if (vertical && d > 0 || !vertical && d < 0) {\n if (y(d) - labelDim < minBarLength) {\n minBarLength = y(d) - labelDim;\n minValuePadding = labelDim;\n }\n } else {\n if (y(d) + labelDim > maxBarLength) {\n maxBarLength = y(d) + labelDim;\n maxValuePadding = labelDim;\n }\n }\n });\n\n if (vertical) {\n y.range([\n maxY - (y.domain()[0] < 0 ? maxValuePadding + gap + 2 : 0),\n y.domain()[1] > 0 ? minValuePadding + gap : 0\n ]);\n } else {\n y.range([\n y.domain()[0] < 0 ? minValuePadding + gap + 4 : 0,\n maxY - (y.domain()[1] > 0 ? maxValuePadding + gap : 0)\n ]);\n }\n }\n\n if (nice) {\n y.nice();\n }\n\n x0 = x0 || x;\n y0 = y0 || y;\n }\n\n resetScale();\n\n\n //------------------------------------------------------------\n // Setup containers and skeleton of chart\n\n var wrap = container.selectAll('.nvd3.nv-wrap').data([data]);\n var wrapEnter = wrap.enter().append('g');\n var defsEnter = wrapEnter.append('defs');\n var gEnter = wrapEnter.append('g');\n var g = wrap.select('g');\n\n wrap.attr('class', 'nvd3 nv-wrap nv-multibar');\n\n //set up the gradient constructor function\n chart.gradient = function(d, i, p) {\n return nv.utils.colorLinearGradient(d, id + '-' + i, p, color(d, i), wrap.select('defs'));\n };\n\n gEnter.append('g').attr('class', 'nv-groups');\n\n wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');\n\n //------------------------------------------------------------\n\n if (clipEdge) {\n defsEnter.append('clipPath')\n .attr('id', 'nv-edge-clip-' + id)\n .append('rect');\n wrap.select('#nv-edge-clip-' + id + ' rect')\n .attr('width', availableWidth)\n .attr('height', availableHeight);\n }\n g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');\n\n\n if (textureFill) {\n var mask = nv.utils.createTexture(defsEnter, id);\n }\n\n\n //------------------------------------------------------------\n\n var groups = wrap.select('.nv-groups').selectAll('.nv-group')\n .data(function(d) { return d; });\n\n var groupsEnter = groups.enter().append('g')\n .style('stroke-opacity', 1e-6)\n .style('fill-opacity', 1e-6);\n\n groups.exit()\n .style('stroke-opacity', 1e-6)\n .style('fill-opacity', 1e-6)\n .selectAll('g.nv-bar')\n .attr('y', function(d) {\n return stacked ? y0(d.y0) : y0(0);\n })\n .attr(dimX, 0)\n .remove();\n groups.exit().remove();\n\n groups\n .attr('class', classes)\n .attr('fill', fill)\n .classed('hover', function(d) { return d.hover; })\n .classed('nv-active', function(d) { return d.active === 'active'; })\n .classed('nv-inactive', function(d) { return d.active === 'inactive'; })\n .style({'stroke-opacity': 1, 'fill-opacity': 1});\n\n groups\n .on('mouseover', function(d, i, j) { //TODO: figure out why j works above, but not here\n d3.select(this).classed('hover', true);\n })\n .on('mouseout', function(d, i, j) {\n d3.select(this).classed('hover', false);\n });\n\n //------------------------------------------------------------\n\n var bars = groups.selectAll('g.nv-bar')\n .data(function(d) { return d.values; });\n\n var barsEnter = bars.enter().append('g').attr('class', 'nv-bar');\n\n bars.exit().remove();\n\n // The actual bar rectangle\n barsEnter.append('rect')\n .attr('class', 'nv-base')\n .style('fill', 'inherit')\n .attr('x', 0)\n .attr('y', 0);\n\n if (textureFill) {\n // For on click active bars\n barsEnter.append('rect')\n .attr('class', 'nv-texture')\n .attr('x', 0)\n .attr('y', 0)\n .style('mask', 'url(' + mask + ')');\n }\n\n // For label background\n barsEnter.append('rect')\n .attr('class', 'nv-label-box')\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', 0)\n .attr('height', 0)\n .attr('rx', 2)\n .attr('ry', 2)\n .style('fill', 'transparent')\n .style('stroke-width', 0)\n .style('fill-opacity', 0);\n\n // For label text\n barsEnter.append('text') // TODO: should this be inside labelPosition?\n .attr('class', 'nv-label-value');\n\n //------------------------------------------------------------\n\n bars\n .attr('class', function(d, i) {\n return 'nv-bar ' + (getY(d, i) < 0 ? 'negative' : 'positive');\n })\n .attr('transform', function(d, i, j) {\n var trans = stacked ? {\n x: Math.round(x(getX(d, i))),\n y: Math.round(y(d.y1))\n } :\n { x: Math.round(j * barThickness() + x(getX(d, i))),\n y: Math.round(getY(d, i) < 0 ? (vertical ? y(0) : y(getY(d, i))) : (vertical ? y(getY(d, i)) : y(0)))\n };\n return 'translate(' + trans[valX] + ',' + trans[valY] + ')';\n });\n\n bars\n .select('rect.nv-base')\n .attr(valX, 0)\n .attr(dimY, barLength)\n .attr(dimX, barThickness);\n\n if (textureFill) {\n bars\n .select('rect.nv-texture')\n .attr(valX, 0)\n .attr(dimY, barLength)\n .attr(dimX, barThickness)\n .style('fill', function(d, i) {\n var backColor = fill(d),\n foreColor = nv.utils.getTextContrast(backColor, i);\n return foreColor;\n });\n }\n\n //------------------------------------------------------------\n // Assign events\n\n function buildEventObject(e, d, i, j) {\n return {\n value: getY(d, i),\n point: d,\n series: data[j],\n pointIndex: i,\n seriesIndex: j,\n id: id,\n e: e\n };\n }\n\n bars\n .on('mouseover', function(d, i, j) { //TODO: figure out why j works above, but not here\n var eo = buildEventObject(d3.event, d, i, j);\n dispatch.elementMouseover(eo);\n })\n .on('mousemove', function(d, i, j) {\n dispatch.elementMousemove(d3.event);\n })\n .on('mouseout', function(d, i, j) {\n dispatch.elementMouseout();\n })\n .on('click', function(d, i, j) {\n d3.event.stopPropagation();\n var eo = buildEventObject(d3.event, d, i, j);\n dispatch.elementClick(eo);\n })\n .on('dblclick', function(d, i, j) {\n d3.event.stopPropagation();\n var eo = buildEventObject(d3.event, d, i, j);\n dispatch.elementDblClick(eo);\n });\n\n //------------------------------------------------------------\n // Bar text: begin, middle, end, top\n var barText = bars.select('.nv-label-value');\n\n if (showValues) {\n\n barText\n .text(function(d, i) {\n var val = labelPosition === 'total' && stacked ?\n getY(d, i) < 0 ?\n groupTotals[i].neg :\n groupTotals[i].pos :\n getY(d, i);\n return valueFormat(val);\n })\n .each(function(d, i) {\n var bbox = this.getBoundingClientRect();\n d.labelWidth = Math.floor(bbox.width) + 4;\n d.labelHeight = Math.floor(bbox.height);\n d.barLength = barLength(d, i);\n d.barThickness = barThickness();\n });\n\n barText\n .attr('dy', '0.35em')\n .attr('text-anchor', function(d, i) {\n var anchor = 'middle',\n negative = getY(d, i) < 0;\n if (vertical && !verticalLabels) {\n anchor = 'middle';\n } else {\n switch (labelPosition) {\n case 'start':\n anchor = negative ? 'end' : 'start';\n break;\n case 'middle':\n anchor = 'middle';\n break;\n case 'end':\n anchor = negative ? 'start' : 'end';\n break;\n case 'top':\n case 'total':\n anchor = negative ? 'end' : 'start';\n break;\n }\n anchor = direction === 'rtl' && anchor !== 'middle' ? anchor === 'start' ? 'end' : 'start' : anchor;\n }\n return anchor;\n })\n .attr('transform', 'rotate(' + (verticalLabels ? -90 : 0) + ' 0,0)')\n .attr('x', function(d, i) {\n var offset = 0,\n negative = getY(d, i) < 0 ? -1 : 1,\n shift = negative < 0,\n padding = (4 + (verticalLabels || !vertical) * 2) * negative;\n\n if (vertical && !verticalLabels) {\n offset = d.barThickness / 2;\n } else {\n switch (labelPosition) {\n case 'start':\n // vrt: neg 0 , pos -1\n // hrz: neg 1 , pos 0\n offset = d.barLength * (shift - verticalLabels) + padding;\n break;\n case 'middle':\n offset = d.barLength * (verticalLabels ? -1 : 1) / 2;\n break;\n case 'end':\n // vrt: neg -1 , pos 0.\n // hrz: neg 0 , pos 1;\n offset = d.barLength * (!verticalLabels - shift) - padding;\n break;\n case 'top':\n case 'total':\n offset = d.barLength * (!verticalLabels - shift) + 2 * negative;\n break;\n }\n }\n return offset;\n })\n .attr('y', function(d, i) {\n var offset = 0,\n negative = getY(d, i) < 0 ? -1 : 1,\n shift = negative < 0,\n padding = (d.labelHeight / 2 + (4 + verticalLabels * 2) * (labelPosition === 'total' ? 0 : 1)) * negative;\n\n if (vertical && !verticalLabels) {\n switch (labelPosition) {\n case 'start':\n offset = d.barLength * (1 - shift) - padding;\n break;\n case 'middle':\n offset = d.barLength / 2;\n break;\n case 'end':\n offset = d.barLength * (0 + shift) + padding;\n break;\n case 'total':\n offset = d.barLength * (0 + shift) + padding * -1;\n break;\n }\n } else {\n offset = d.barThickness / 2;\n }\n return offset;\n })\n .style('fill', function(d, i, j) {\n if (labelPosition === 'top' || labelPosition === 'total') {\n return '#000';\n }\n // var backColor = d3.select(this.previousSibling).style('fill'),\n var backColor = fill(d),\n textColor = nv.utils.getTextContrast(backColor, i);\n return textColor;\n })\n .style('fill-opacity', function(d, i) {\n if (!stacked) {\n return 1;\n } else if (labelPosition === 'total') {\n if (d.series !== minSeries && d.series !== maxSeries) {\n return 0;\n }\n var y = getY(d, i);\n return (y < 0 && groupTotals[i].neg === d.y1 + (vertical ? y : 0)) ||\n (y >= 0 && groupTotals[i].pos === d.y1 + (vertical ? 0 : y)) ? 1 : 0;\n } else {\n var lengthOverlaps = d.barLength < (!vertical || verticalLabels ? d.labelWidth : d.labelHeight) + 8,\n thicknessOverlaps = d.barThickness < (!vertical || verticalLabels ? d.labelHeight : d.labelWidth) + 4;\n return labelPosition !== 'top' && (lengthOverlaps || thicknessOverlaps) ? 0 : 1;\n }\n });\n\n function getLabelBoxOffset(d, i, s, gap) {\n var offset = 0,\n negative = getY(d, i) < 0 ? -1 : 1,\n shift = s === negative < 0 ? 1 : 0,\n barLength = d.barLength - d[dimLabel];\n if (s ? vertical : !vertical) {\n offset = (d.barThickness - (verticalLabels === s ? d.labelHeight : d.labelWidth)) / 2;\n } else {\n switch (labelPosition) {\n case 'start':\n offset = barLength * (0 + shift) + gap * negative;\n break;\n case 'middle':\n offset = barLength / 2;\n break;\n case 'end':\n offset = barLength * (1 - shift) - gap * negative;\n break;\n case 'top':\n offset = d.barLength * (1 - shift) - d.labelWidth * (0 + shift);\n break;\n case 'total':\n offset = d.barLength * (1 - shift) - (verticalLabels === s ? d.labelHeight : d.labelWidth) * (0 + shift);\n break;\n }\n }\n\n return offset;\n }\n\n //------------------------------------------------------------\n // Label background box\n bars.filter(function(d, i) {\n return labelPosition === 'total' && stacked ? (d.series !== minSeries && d.series !== maxSeries) : false;\n }).select('rect.nv-label-box')\n .style('fill-opacity', 0);\n\n bars.filter(function(d, i) {\n return labelPosition === 'total' && stacked ? (d.series === minSeries || d.series === maxSeries) : true;\n }).select('rect.nv-label-box')\n .attr('x', function(d, i) {\n return getLabelBoxOffset(d, i, true, 4);\n })\n .attr('y', function(d, i) {\n return getLabelBoxOffset(d, i, false, -4);\n })\n .attr('width', function(d, i) {\n return verticalLabels ? d.labelHeight : d.labelWidth;\n })\n .attr('height', function(d, i) {\n return verticalLabels ? d.labelWidth : d.labelHeight;\n })\n .style('fill', function(d, i) {\n return labelPosition === 'top' || labelPosition === 'total' ? '#fff' : fill(d, i);\n })\n .style('fill-opacity', function(d, i) {\n var lengthOverlaps = d.barLength < (!vertical || verticalLabels ? d.labelWidth : d.labelHeight) + 8,\n thicknessOverlaps = d.barThickness < (!vertical || verticalLabels ? d.labelHeight : d.labelWidth) + 4;\n return labelPosition !== 'top' && (lengthOverlaps || thicknessOverlaps) ? 0 : 1;\n });\n\n } else {\n barText\n .text('')\n .style('fill-opacity', 0);\n\n bars\n .select('rect.label-box')\n .style('fill-opacity', 0);\n }\n\n // TODO: fix way of passing in a custom color function\n // if (barColor) {\n // if (!disabled) {\n // disabled = data.map(function() { return true; });\n // }\n // bars\n // //.style('fill', barColor)\n // //.style('stroke', barColor)\n // //.style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })\n // //.style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })\n // .style('fill', function(d, i, j) {\n // return d3.rgb(barColor(d, i))\n // .darker(disabled.map(function(d, i) { return i; })\n // .filter(function(d, i) { return !disabled[i]; })[j])\n // .toString();\n // })\n // .style('stroke', function(d, i, j) {\n // return d3.rgb(barColor(d, i))\n // .darker(disabled.map(function(d, i) { return i; })\n // .filter(function(d, i) { return !disabled[i]; })[j])\n // .toString();\n // });\n // }\n\n //store old scales for use in transitions on update\n x0 = x.copy();\n y0 = y.copy();\n\n });\n\n return chart;\n }", "function drawCol()\n{\n\n\n/*var Colview = new google.visualization.DataView(data);\nColview.setColumns(\n[0,1,\n {\n calc: \"stringify\",\n sourceColumn: 1,\n type: \"string\",\n role: \"annotation\"\n },\n2]\n);*/\n\nvar options = {\ntitle : \"Column Chart\",\nwidth : 600, //you can put any value\nheight : 400, //again , you can use any value\nbar: {groupWidth : \"95%\"},\nlegend: {position:\"none\"}\n};\n\nvar Colchart = new google.visualization.ColumnChart(document.getElementById(\"colDiv\"));\nColchart.draw(data, options);\n}", "function render_barBijzonder() {\n var plotBar = hgiBar().margin({\n 'top': 20,\n 'right': 20,\n 'bottom': 40,\n 'left': 110\n }).mapping(['name', 'value']).errorMapping('sd').freqMapping('frequency').title('Is er iets bijzonders gebeurd?').xDomain([0, 100]).xLabel('Ik ben van slag').addError(true).addFrequencies(true);\n d3.select('#barBijzonder').datum(data_vanslag).call(plotBar);\n}", "function buildBarChart(name, lines, columns, colors) {\n graph.element.selectAll('rect').remove()\n graph.element.selectAll('.leafLabel').remove()\n graph.element.selectAll('.leafLabelIsolates text').remove()\n graph.element.selectAll('.addBarChartLabel text').remove()\n graph.element.selectAll('.isolates').selectAll('g').remove()\n graph.style.barChart = true\n\n const profilesId = lines[0]\n const columns_data = []\n const order_data = []\n const map = new Map()\n\n const stack = d3.stack()\n .keys(['isolates'])\n .order(d3.stackOrderNone)\n .offset(d3.stackOffsetNone)\n\n function getColor(name) {\n for (let i = 0; i < colors.length; i++) {\n if (colors[i].name === name) return colors[i].color\n }\n }\n\n if (name === '&') {\n let columns_names\n columns.forEach((c, i) => {\n if (i === 0) columns_names = data.input.metadata[c] + ','\n else if (i === c.length - 1) columns_names += data.input.metadata[c]\n else columns_names += data.input.metadata[c] + ','\n })\n columns_names = columns_names.slice(0, columns_names.length - 1)\n\n data.input.nodes.forEach(node => {\n let isolates = [], profiles\n if (node.isolates && node.isolates.length > 0) {\n const currClass = d3.select('#node' + node.key).attr('class')\n\n d3.select('#node' + node.key).attr('class', `${currClass} isolates`)\n\n node.isolates.forEach(iso => columns.forEach((c, i) => {\n if (i === 0) isolates.push(iso[c] + ',')\n else if (i === c.length - 1) isolates.push(iso[c])\n else {\n const last = isolates.pop()\n isolates.push(last + iso[c] + ',')\n }\n }))\n isolates = isolates.map(i => i.slice(0, i.length - 1))\n\n node.isolates.forEach(iso => profiles = iso[profilesId])\n\n columns_data.push({\n 'category': columns_names,\n 'isolates': isolates,\n 'profiles': profiles\n })\n\n } else {\n const currClass = d3.select('#node' + node.key).attr('class')\n d3.select('#node' + node.key).attr('class', `${currClass} not-isolates`)\n }\n })\n } else {\n columns.forEach(col => {\n data.input.nodes.forEach(node => {\n if (node.isolates && node.isolates.length > 0) {\n const currClass = d3.select('#node' + node.key).attr('class')\n d3.select('#node' + node.key).attr('class', `${currClass} isolates`)\n\n node.isolates.forEach(iso => {\n columns_data.push({\n 'category': data.input.metadata[col],\n 'isolates': iso[col],\n 'profiles': iso[profilesId]\n })\n })\n } else {\n const currClass = d3.select('#node' + node.key).attr('class')\n d3.select('#node' + node.key).attr('class', `${currClass} not-isolates`)\n }\n })\n })\n }\n\n graph.element.selectAll('.isolates').each(d => {\n columns_data.forEach(item => {\n if (d.data.id === item.profiles) order_data.push(item)\n })\n })\n\n if (name === '&') {\n stack(order_data)[0].forEach(d => {\n const counts = {}\n d.data.isolates.forEach(x => {\n counts[x] = (counts[x] || 0) + 1\n })\n\n function valuesToArray(obj) {\n const result = []\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) result.push({'isolate': key, 'counter': obj[key]})\n }\n return result\n }\n\n const data = {\n 'category': d.data.category,\n 'isolates': valuesToArray(counts),\n 'profiles': d.data.profiles\n }\n map.set(d.data.profiles, data)\n })\n } else {\n stack(order_data)[0].forEach(d => {\n if (map.has(d.data.profiles)) {\n const existing = map.get(d.data.profiles)\n existing.forEach((item, i) => {\n if (item.isolates === d.data.isolates) {\n existing[i].numberOfIsolates = existing[i].numberOfIsolates + 1\n const data = Array.from(existing)\n map.set(d.data.profiles, data)\n } else {\n const data = Array.from(existing)\n d.data.numberOfIsolates = 1\n data.push(d.data)\n map.set(d.data.profiles, data)\n }\n })\n } else {\n d.data.numberOfIsolates = 1\n const data = Array.of(d.data)\n map.set(d.data.profiles, data)\n }\n })\n }\n\n graph.element\n .selectAll('.isolates')\n .append('g')\n .each(function (d) {\n d3.select(this)\n .selectAll('rect')\n .data(map)\n d.data.data.barChart = null\n })\n\n let w = 30, lastX = 0, lastWidth = 5, totalW = 0\n\n const xScale = d3.scaleLog()\n .domain([0.5, 50])\n .range([0, 50])\n\n if (name === '&') {\n map.forEach((isolate, profile) => {\n const node = d3.select('#node' + profile).select('g')\n lastX = 0\n lastWidth = 5\n totalW = 0\n\n isolate.isolates.forEach(item => {\n const rect = node.append('rect')\n .attr('y', '-5')\n .attr('height', '11')\n .attr('class', 'barChart')\n .attr('fill', getColor(item.isolate))\n\n lastX += lastWidth\n rect.attr('x', lastX.toString())\n\n lastWidth = xScale(item.counter * w)\n totalW += lastWidth\n rect.attr('width', lastWidth.toString())\n\n graph.nodes\n .selectAll('circle')\n .each(function (d) {\n if (d.data.id === profile) {\n rectOf(d, rect)\n }\n })\n })\n\n node\n .append('text')\n .attr('class', 'leafLabelIsolates')\n .attr('dy', 5)\n .attr('x', totalW + 10)\n .text(d => d.data.id)\n .style('text-anchor', 'start')\n .style('font', `${graph.style.labels_size}px sans-serif`)\n .on('mouseover', mouseOveredDendrogram(true))\n .on('mouseout', mouseOveredDendrogram(false))\n })\n } else {\n map.forEach((isolate, profile) => {\n const node = d3.select('#node' + profile).select('g')\n lastX = 0\n lastWidth = 5\n totalW = 0\n\n isolate.forEach(item => {\n const rect = node.append('rect')\n .attr('y', '-5')\n .attr('height', '11')\n .attr('class', 'barChart')\n .attr('fill', getColor(item.isolates))\n\n lastX += lastWidth\n rect.attr('x', lastX.toString())\n\n lastWidth = xScale(item.numberOfIsolates * w)\n totalW += lastWidth\n rect.attr('width', lastWidth.toString())\n\n graph.nodes\n .selectAll('#node' + profile + ' circle')\n .each(function (d) {\n if (d.data.id === profile) {\n rectOf(d, rect)\n }\n })\n })\n\n node\n .append('text')\n .attr('class', 'leafLabelIsolates')\n .attr('dy', 5)\n .attr('x', totalW + 10)\n .text(d => d.data.id)\n .style('text-anchor', 'start')\n .style('font', `${graph.style.labels_size}px sans-serif`)\n .on('mouseover', mouseOveredDendrogram(true))\n .on('mouseout', mouseOveredDendrogram(false))\n })\n }\n }", "function buildPercBars() {\n\n\treturn [\n\t {value: .45, index: .5, init:0},\n\t\t{value: .23, index: .4, init:0},\n\t];\n\t\n}", "function membersBarChart() {\n let bounds = getBounds();\n let g = addNewSVG(bounds);\n\n let barWidth = bounds.width / membersPerDay.length;\n addMembersBars(bounds, g, barWidth);\n addEventsBars(bounds, g, barWidth);\n}", "function barXFunc (d, i) { return (i * barwidth)+\"%\" ; }", "function barChartPlotter(e) {\n\tvar stacked = e.dygraph.getOption(\"stackedGraph\");\n\t\n\tconsole.log(e.color);\n\t \n\tvar ctx = e.drawingContext;\n\tvar points = e.points;\n\tvar y_bottom = e.dygraph.toDomYCoord(0);\n\n\t//if (stacked)ctx.fillStyle = darkenColor(e.color);\n\tif (stacked)ctx.fillStyle = e.color;\n\telse\t\t{\n\t\tctx.beginPath();\n\t\tctx.strokeStyle = e.color;\n\t}\n\t\n\t// Find the minimum separation between x-values.\n\t// This determines the bar width.\n\t/*var min_sep = Infinity;\n\tfor (var i = 1; i < points.length; i++) {\n\t\tvar sep = points[i].canvasx - points[i - 1].canvasx;\n\t\tif (sep < min_sep) min_sep = sep;\n\t}\n\tvar bar_width = min_sep;*/\n\tvar bar_width = points[1].canvasx - points[0].canvasx;\n\t\n\t// Do the actual plotting.\n\tfor (var i = 0; i < points.length; i++) {\n\t\tvar p = points[i];\n\t\tvar center_x = p.canvasx;\n\n\t\tif (stacked)ctx.fillRect(center_x - bar_width / 2, p.canvasy, bar_width + 1, y_bottom - p.canvasy);\n\t\telse {\n\t\t\tif (i > 0) {\n\t\t\t\tctx.moveTo(center_x - bar_width / 2, points[i-1].canvasy);\n\t\t\t\tctx.lineTo(center_x - bar_width / 2, p.canvasy);\n\t\t\t}\n\t\t\t\n\t\t\tctx.lineTo(center_x + bar_width / 2, p.canvasy);\n\t\t\t\n\t\t\tif (i < points.length - 1) {\n\t\t\t\tctx.lineTo(center_x + bar_width / 2, points[i+1].canvasy);\n\t\t\t\tctx.stroke();\n\t\t\t}\n\t\t}\n\t}\n }", "function dessinerGrapheSexAndAge (arr) {\n \n sexAndAgeChart = c3.generate({\n bindto: '#saddBarchart',\n size: {height: chartsHeight},\n padding: {top: 10},\n title: {\n text: 'Sex-disaggregated data along the COVID-19 clinical pathway',\n position: titlePosition\n },\n data: {\n x: 'x',\n columns: [xAxis, sexAndAgeDataArrMen, sexAndAgeDataArrWomen],\n type: 'bar'\n },\n color: {\n pattern: [colorMen, colorWomen]\n },\n axis: {\n x: {\n type: 'category',\n tick: {\n outer: false\n }\n },\n y:{\n max: 90,\n tick: {\n format: d3.format('d'),\n count: 5,\n outer: false\n }\n }\n },\n grid: {\n y: {\n show: true\n }\n },\n bar: {\n width: {\n ratio: 0.5 // this makes bar width 50% of length between ticks\n }\n },\n tooltip:{\n format: {\n value: function(value){\n return value + \" %\";\n }\n }\n }\n });\n\n }//dessinerGrapheSexAndAge", "function barChart(bcData){\n var bC={}, \n bcSizes = {t: 60, r: 0, b: 30, l: 0};\n bcSizes.w = 500 - bcSizes.l - bcSizes.r, \n bcSizes.h = 300 - bcSizes.t - bcSizes.b;\n \n// create the svg for barChart inside the div\n// for the width, put .width + length + radius\n// for height. put height + \n var bCsvg = d3.select(id).append(\"svg\")\n .attr(\"class\", \"barChart\")\n .attr(\"width\", bcSizes.w + bcSizes.l + bcSizes.r)\n .attr(\"height\", bcSizes.h + bcSizes.t + bcSizes.b)\n .append(\"g\")\n .attr(\"transform\", \"translate(\" + bcSizes.l + \",\" + bcSizes.t + \")\");\n\n// for the x variable, use map to \n var x = d3.scaleBand()\n // .rangeRoundBands([0, bcSizes.w], 0.1)\n .range([0, bcSizes.w])\n .round(0.1)\n .domain(bcData.map(function(d) { \n return d[0]; \n }));\n\n // Add x-axis to the barChart svg.\n bCsvg.append(\"g\").attr(\"class\", \"x axis\")\n .attr(\"transform\", \"translate(0,\" + bcSizes.h + \")\")\n .call(d3.axisBottom(x));\n\n // Create function for y-axis map.\n var y = d3.scaleLinear().rangeRound([bcSizes.h, 0])\n .domain([0, d3.max(bcData, function(d) { return d[1]; })]);\n\n // Create bars for barChart to contain rectangles and sentiment labels.\n var bars = bCsvg.selectAll(\".bar\")\n .data(bcData)\n .enter()\n .append(\"g\")\n .attr(\"class\", \"bar\");\n\n \n// create the bars\n// for x, use return x variable with (d[0]) to determine the location on x axis\n// for y, use function return the y variable width (d[1]) to determine the height (this is still undefined)\n// for the width, use x variable with rageband to use the same width\n// for height, use a function to return bcSizes.height - the height of the negative space due to (d[1])\n bars.append(\"rect\")\n .attr(\"x\", function(d) { \n return x(d[0]); \n })\n .attr(\"y\", function(d) { \n return y(d[1]); \n })\n .attr(\"width\", 40)\n .attr(\"height\", function(d) { \n return bcSizes.h - y(d[1]); \n })\n .attr('fill', \"#8DD4F4\")\n .on(\"mouseover\",mouseover)\n .on(\"mouseout\",mouseout);\n\n// another mouseover function, this time on the bar chart \n// store the selected year in a variable with a function\n// first, filter the year out of the data with a comparison\n// the mouseover year has to be true, all the others are false\n// return the comparison between s.year (selected year) and d[0] (the years) \n// after this function, add the [0] to refer to the sentiment in the data\n// then in another variable, store the selected year variable and sentiment in a new\n// object with .key and use .map to make an object with the selected year and sentiment\n function mouseover(d){ \n var selectedYear = myData.filter(function(s){ \n return s.year == d[0]\n ;})[0];\n var yearSentiment = d3\n .keys(selectedYear.sentiment)\n .map(function(s){ \n return {type:s, sentiment:selectedYear.sentiment[s]};\n });\n \n// call the functions that update the pie chart and legend, to connect this to the mouseover of bar chart\n// refer to the yearSentiment, becaue this new variable tells what data is selected \n pC.update(yearSentiment);\n leg.update(yearSentiment);\n }\n\n// in a function for mouseout, reset the pie chart and legend by refering to \n// the update function before the bar chart was touched \n function mouseout(d){ \n pC.update(updatePC);\n leg.update(updatePC);\n }\n \n// after the bar chart can alter the pie chart, now write a function to make\n// the pie chart update the bar chart\n// in the y domain, use yearSentiment to sort the sentiments in the years\n// and eliminate the bar height for other sentiments\n// give parameter color to change the color of the bars to the selected pie chart slice\n bC.update = function(yearSentiment, color){\n y.domain([0, d3.max(yearSentiment, function(d) { \n return d[1]; \n })]);\n \n// recreate the bars with the new data\n// only the data in the selected sentiment is added now\n var bars = bCsvg.selectAll(\".bar\")\n .data(yearSentiment);\n \n// with a transition, create the y, height, and color over again\n// this is a copy of the attributes as they were in the creation of the bars\n// only attribute fill is different, this refers to the parameter in this function\n bars.select(\"rect\").transition().duration(400)\n .attr(\"y\", function(d) {\n return y(d[1]); \n })\n .attr(\"height\", function(d) { \n return bcSizes.h - y(d[1]); \n })\n .attr(\"fill\", color);\n \n } \n\n// return the bar chart with the new data \n return bC;\n }", "function showResults(data, columns) {\n\t\n\tvar charts = []\n\t$containers = $('#ResultGraphs td');\n\t\n\t//setting charts\n\t$.each(data, function(i, attr) {\n\t\tcharts.push(new Highcharts.Chart({\n\n\t\t\tchart: {\n\t\t\t\trenderTo: $containers[i],\n\t\t\t\ttype: 'bar',\n\t\t\t\tmarginLeft: 55,\n\t\t\t\tmarginRight: 15,\n\n\t\t\t},\n\t\t\t\n\t\t\tplotOptions: {\n\t\t\t\tseries: {\n\t\t\t\t\tstacking: 'normal'\n\t\t\t\t}\n\t\t\t},\n\n\t\t\ttitle: {\n\t\t\t\ttext: attr.name,\n\t\t\t\talign: 'left',\n\t\t\t\tx: i === 0,\n\t\t\t\tstyle: {\n\t\t\t\t\t//fontFamily: 'times new roman',\n\t\t\t\t\t//fontSize:'18px'\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tcredits: {\n\t\t\t\tenabled: false\n\t\t\t},\n\t\t\t\n\t\t\tlegend: {\n enabled: false,\n\t\t\t\ttitle: {\n text: 'Models',\n style: {\n fontStyle: 'italic'\n }\n },\n layout: 'horizontal',\n align: 'top',\n verticalAlign: 'top',\n y: 10\n\t\t\t\t\n },\n\n\t\t\txAxis: {\n\t\t\t\tcategories: columns,\n\t\t\t\tlabels: {\n\t\t\t\t\tenabled: true\n\t\t\t\t},\n\t\t\t\tallowDecimal: true,\n\t\t\t\tlabels: {\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t//fontFamily: 'times new roman',\n\t\t\t\t\t\t//fontSize:'15px'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tyAxis: {\n\t\t\t\ttitle: {\n\t\t\t\t\ttext: null\n\t\t\t\t},\n\t\t\t\t//type: attr.atype,\n\t\t\t\ttype: 'logarithmic',\n\t\t\t\tlabels: {\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t//fontFamily: 'times new roman',\n\t\t\t\t\t\t//fontSize:'15px'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tseries: [attr]\n\n\t\t}));\n\t});\n\t\n}", "function bar(d) {\n var bar = svg.insert(\"g\", \".y.axis\")\n .attr(\"class\", \"enter\")\n .attr(\"transform\", \"translate(0,5)\")\n .selectAll(\"g\")\n .data(d.children)\n .enter().append(\"g\")\n .style(\"cursor\", function (d) {\n return !d.children ? null : \"pointer\";\n })\n .on(\"click\", downstep);\n // .append('title') // Tooltip\n // .text(function (d) {\n // return 'No of games won by '+d.key + ' is ' + d.value + ' for ' +group\n // });\n\n\n bar.append(\"text\")\n .attr(\"y\", barHeight / 2)\n .style(\"text-anchor\", \"end\")\n .attr(\"dy\", \".35em\")\n .attr(\"x\", -6)\n .text(function (d) {\n return d.name;\n });\n\n bar.append(\"rect\")\n .attr(\"height\", barHeight)\n .attr(\"width\", function (d) {\n return x(d.value);\n });\n\n return bar;\n}", "function createBar(){\r\n\tvar today = new Date();\r\n\tvar dd = String(today.getDate()).padStart(2, '0');\r\n\tvar mm = String(today.getMonth() + 1).padStart(2, '0');\r\n\tvar yyyy = today.getFullYear();\r\n\ttoday = mm + '/' + dd + '/' + yyyy;\r\n\r\n\twindow.barChart = Highcharts.chart('barChart', {\r\n\t\tchart: {\r\n\t\t\trenderTo: document.getElementById('barChart'),\r\n\t\t\ttype: 'column'\r\n\t\t},\r\n\t\ttitle: {\r\n\t\t\ttext: 'Sold Per day'\r\n\t\t},\r\n\t\txAxis: {\r\n\t\t\tcategories: ['01/01/2020', '01/02/2020']\r\n\t\t},\r\n\t\tyAxis: {\r\n\t\t\tmin: 0,\r\n\t\t\ttitle: {\r\n\t\t\t\ttext: 'Total Sold'\r\n\t\t\t},\r\n\t\t\tstackLabels: {\r\n\t\t\t\tenabled: true,\r\n\t\t\t\tstyle: {\r\n\t\t\t\t\tfontWeight: 'bold',\r\n\t\t\t\t\tcolor: ( // theme\r\n\t\t\t\t\t\tHighcharts.defaultOptions.title.style &&\r\n\t\t\t\t\t\tHighcharts.defaultOptions.title.style.color\r\n\t\t\t\t\t) || 'gray'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tlegend: {\r\n\t\t\talign: 'right',\r\n\t\t\tx: -30,\r\n\t\t\tverticalAlign: 'top',\r\n\t\t\ty: 25,\r\n\t\t\tfloating: true,\r\n\t\t\tbackgroundColor:\r\n\t\t\t\tHighcharts.defaultOptions.legend.backgroundColor || 'white',\r\n\t\t\tborderColor: '#CCC',\r\n\t\t\tborderWidth: 1,\r\n\t\t\tshadow: false\r\n\t\t},\r\n\t\ttooltip: {\r\n\t\t\theaderFormat: '<b>{point.x}</b><br/>',\r\n\t\t\tpointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'\r\n\t\t},\r\n\t\tplotOptions: {\r\n\t\t\tcolumn: {\r\n\t\t\t\tstacking: 'normal',\r\n\t\t\t\tdataLabels: {\r\n\t\t\t\t\tenabled: true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tseries: [{\r\n\t\t\tname: 'Dingus',\r\n\t\t\tdata: [1,2],\r\n\t\t\tcolor: 'aqua'\r\n\t\t}, {\r\n\t\t\tname: 'Widgets',\r\n\t\t\tdata: [1,2],\r\n\t\t\tcolor: 'lightgray'\r\n\t\t}]\r\n\t});\r\n\t// $('#orderBut').click(function() {\r\n\t// \tdingVal = document.getElementById('dingus').value;\r\n\t// \twidgeVal = document.getElementById('widget').value;\r\n\t// \tbarChart.series[0].addPoint(Number(dingVal))\r\n\t// \tbarChart.series[1].addPoint(Number(widgeVal))\r\n\r\n\t// \tarr = barChart.xAxis[0].categories\r\n\t// \tarr.push(today)\r\n\t// \tbarChart.xAxis[0].setCategories(arr)\r\n\t\t\r\n\t// \treturn barChart\r\n\t// })\r\n\t// return barChart\r\n}", "function createBarChart(dataMeta, containerID, dataSet, dataSetParameters)\n{\n // Maximum number of items represented on chart\n var maxItems = 50;\n var count = 0;\n\n // Create labels, attributes\n var attr0 = dataSetParameters.attributes[0];\n var attr1 = dataSetParameters.attributes[1];\n var labels = [];\n var attributes = [];\n for (let c = 0; c < dataSet.length; c++)\n {\n if (count < maxItems)\n {\n labels.push(dataSet[c][attr0]);\n attributes.push(dataSet[c][attr1]);\n count++;\n }\n }\n\n // Draw the chart\n var ctx = document.getElementById(containerID).getContext('2d');\n var config = {\n type: 'bar',\n data: {\n labels: labels,\n datasets: [{\n label: dataSetParameters.attributes[1],\n data: attributes,\n backgroundColor: 'rgba(0, 119, 204, 0.3)'\n }]\n },\n options: {\n title: {\n display: true,\n text: dataSetParameters.title,\n fontSize: '19',\n fontColor: 'grey',\n },\n legend: {\n display: false\n },\n scales: {\n xAxes: [{\n ticks: {\n display: true\n }\n }]\n }\n }\n };\n var chart = new Chart(ctx, config);\n}", "getScales(data) {\n let positionScale = d3.scaleBand()\n .domain(data.map(d => d[this.categoricalColumn]))\n .range([0, this.BAR_CHART_WIDTH])\n .padding(0.1)\n\n let yScale = d3.scaleLinear() \n .domain([0, d3.max(data.map(d => d3.sum(d[this.numericalColumn].split(\"-\").map(k => +k))))])\n .range([this.BAR_CHART_HEIGHT, 0])\n \n return {positionScale, yScale}\n }", "function barChartRender() {\n var votesArray = [];\n var shownArray = [];\n\n for (let index = 0; index < itemsArray.length; index++) {\n votesArray.push(itemsArray[index].vote);\n shownArray.push(itemsArray[index].time);\n }\n\n var myChart = new Chart(itemCanvas, {\n type: 'bar',\n data: {\n labels: itemName,\n datasets: [\n {\n label: '# of items votes',\n data: votesArray, // array of values (count for each item when it was clicked)\n backgroundColor: [\n 'rgba(255, 99, 132, 0.2)',\n 'rgba(54, 162, 235, 0.2)',\n 'rgba(255, 206, 86, 0.2)',\n 'rgba(75, 192, 192, 0.2)',\n 'rgba(153, 102, 255, 0.2)',\n 'rgba(255, 159, 64, 0.2)'\n ],\n borderColor: [\n 'rgba(255, 99, 132, 1)',\n 'rgba(54, 162, 235, 1)',\n 'rgba(255, 206, 86, 1)',\n 'rgba(75, 192, 192, 1)',\n 'rgba(153, 102, 255, 1)',\n 'rgba(255, 159, 64, 1)'\n ],\n borderWidth: 1\n },\n {\n label: '# of items shown',\n data: shownArray, // array of values (count for each item got a shown)\n backgroundColor: 'rgba(255, 99, 132, 0.2)',\n borderColor: 'rgba(255, 99, 132, 1)',\n borderWidth: 1\n }]\n },\n options: {\n scales: {\n yAxes: [{\n ticks: {\n beginAtZero: true\n }\n }]\n }\n }\n });\n}", "function drawBars() {\n\n xScale.domain(d3.range(actividades_jaca.length));\n yScale.domain([0, d3.max(actividades_jaca, function(d) {\n return +d.value;\n })]);\n\n bar_color.domain(d3.range(function(d) {\n return d.act_descripcion;\n }));\n var myBars = svgBar.selectAll('svgBar').data(actividades_jaca);\n\n myBars.enter()\n .append('rect')\n .attr('class', 'addon')\n .attr('x', function(d, i) {\n return xScale(i);\n })\n .attr('y', function(d) {\n return height - yScale(d.value);\n })\n .attr('width', xScale.rangeBand())\n .attr('height', function(d) {\n return yScale(d.value);\n })\n .attr('fill', function(d) {\n return bar_color(d.act_descripcion);\n })\n .on('mouseover', function(d) {\n d3.select(this)\n .style('stroke-width', 0.5)\n .style('stroke', 'red');\n tooltipTitle.html(d.act_descripcion);\n tooltipTotal.html(d.value);\n })\n .on('mouseout', function() {\n d3.select(this)\n .style('stroke-width', 0);\n tooltipTitle.html('Número de empresas');\n tooltipTotal.html(totalActividades);\n });\n }", "function singleCharts(array) {\n var wBar, elColor;\n\n // Transforming answers in percentage values for single charts and coloring them\n for( i=0; i<array.length; i++) {\n wBar = array[i]*33.33;\n elColor = assignColor(array[i]);\n $('.result-value[data-answer=\"'+(i+1)+'\"]').find('.bar').addClass(elColor).width(wBar+\"%\");\n }\n\n // Transforming answers in percentage values for average(area) charts and coloring them\n for( n=0; n<m3qData.length; n++) {\n wBar = m3qData9[n]*11.11;\n elColor = assignColor(m3qData[n]);\n $('.result-value[data-groupaverage=\"'+(n+1)+'\"]').find('.bar').addClass(elColor).width(wBar+\"%\");\n\n // This conditional logic adds the area labels to the table that shows Strong - Medium - Low and Not Contamplated areas\n if(elColor == \"green\") {\n $lgStrong.append(\"<span>\" + titles[n] + \"</span> \");\n //console.log(titles[n]);\n } else if(elColor == \"yellow\") {\n $lgMed.append(\"<span>\" + titles[n] + \"</span> \");\n } else if(elColor == \"red\") {\n $lgLow.append(\"<span>\" + titles[n] + \"</span> \");\n } else {\n $lgZero.append(\"<span>\" + titles[n] + \"</span> \");\n }\n }\n\n\n}", "function plotBar(data) {\r\n\r\n\r\n var numOfTicks = 10;\r\n var barLabelWidth = 50;\r\n var barLabelPadding = 5;\r\n var barHeight = 30;\r\n var margin = {\r\n top: 80,\r\n right: 50,\r\n bottom: 30,\r\n left: 80\r\n },\r\n width = 1000 + barLabelWidth,\r\n height = data.length * barHeight;\r\n\r\n var x = d3.scale.linear()\r\n .range([0, width - margin.left - margin.right - barLabelWidth]);\r\n\r\n\r\n y = d3.scale.ordinal()\r\n .rangeBands([0, height], .1, .5);\r\n\r\n var xAxis = d3.svg.axis()\r\n .scale(x)\r\n .orient(\"bottom\")\r\n .tickSize(height)\r\n .outerTickSize(0)\r\n .ticks(numOfTicks, \".2f\");\r\n\r\n var svg = d3.select(\"#bar_chart > section\").append(\"svg\")\r\n .attr(\"width\", width)\r\n .attr(\"height\", height + margin.top + margin.bottom)\r\n .append(\"g\")\r\n .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\r\n\r\n\r\n\r\n x.domain([d3.min(data, function(d) {\r\n return d[F_ICAGES_SCORE];\r\n }), d3.max(data, function(d) {\r\n return d[F_ICAGES_SCORE];\r\n })]).nice();\r\n\r\n y.domain(data.map(function(d) {\r\n return d[F_NAME];\r\n }));\r\n\r\n // xAxis vertical ticks\r\n svg.append(\"g\")\r\n .attr(\"class\", \"x axis\")\r\n .attr(\"transform\", \"translate(\" + barLabelWidth + \",0)\")\r\n .call(xAxis);\r\n\r\n // Top labels \r\n svg.append(\"g\")\r\n .attr(\"transform\", \"translate(\" + barLabelWidth + \",0)\")\r\n .selectAll(\"text\")\r\n .data(x.ticks(numOfTicks))\r\n .enter().append(\"text\")\r\n .attr(\"x\", x)\r\n .attr(\"dx\", \"-1em\")\r\n .attr(\"dy\", \"-0.5em\")\r\n .text(function(d) {\r\n return d3.format(\".2f\")(d);\r\n });\r\n\r\n\r\n svg.append(\"g\")\r\n .attr(\"class\", \"y axis\")\r\n .attr(\"transform\", \"translate(\" + (barLabelWidth - barLabelPadding) + \")\")\r\n .selectAll(\"a\")\r\n .data(data)\r\n .enter().append(\"a\")\r\n .attr(\"xlink:href\", function(d) {\r\n return d[F_URL];\r\n })\r\n .attr(\"target\", \"_blank\")\r\n .append(\"text\")\r\n .attr('y', function(d) {\r\n return y(d[F_NAME]);\r\n })\r\n .attr(\"dy\", \"1.35em\")\r\n .attr(\"text-anchor\", \"end\")\r\n .text(function(d) {\r\n return d[F_NAME];\r\n });\r\n\r\n // bars\r\n\r\n var chart = svg.append(\"g\")\r\n .attr(\"transform\", \"translate(\" + barLabelWidth + \")\");\r\n\r\n chart.selectAll(\"a\")\r\n .data(data)\r\n .enter().append(\"a\")\r\n .attr(\"xlink:href\", function(d) {\r\n return d[F_URL];\r\n })\r\n .append(\"rect\")\r\n .attr(\"class\", \"bar\")\r\n .attr(\"y\", function(d) {\r\n return y(d[F_NAME]);\r\n })\r\n .style(\"fill\", function(d) {\r\n return colorScale(d[F_CATEGORY]);\r\n })\r\n .attr(\"height\", y.rangeBand())\r\n .attr(\"width\", function(d) {\r\n return x(d[F_ICAGES_SCORE]);\r\n });\r\n\r\n chart.selectAll(\"text\")\r\n .data(data)\r\n .enter().append(\"text\")\r\n .attr(\"x\", function(d) {\r\n return x(d[F_ICAGES_SCORE]);\r\n })\r\n .attr(\"y\", function(d) {\r\n return y(d[F_NAME]);\r\n })\r\n .attr(\"dy\", \"1.35em\")\r\n .attr(\"dx\", \"0.5em\")\r\n .text(function(d) {\r\n return d3.format(\".3f\")(d[F_ICAGES_SCORE]);\r\n });\r\n }", "function barChartSettings(skillArr) {\n\t\t//console.log(\"setting the barchart....\");\n\t\t//svgcMargin = 40;\n\t\t//svgcSpace = 100;\n\t\tsvgcMargin = 60;\n\t\tsvgcSpace = 40;\t\t\n\t\t//svgcHeight = svg.height.baseVal.value - 2 * svgcMargin - svgcSpace;\n\t\tsvgcHeight = svg.height.baseVal.value - 2 * svgcMargin - svgcSpace;\n\t\tsvgcWidth = svg.width.baseVal.value - 2 * svgcMargin - svgcSpace;\n\t\tsvgcMarginSpace = svgcMargin + svgcSpace;\n\t\tsvgcMarginHeight = svgcMargin + svgcHeight;\n\t\t\n\t\t//console.log(\"svgcHeight = \"+svgcHeight);\n\t\t//console.log(\"svgcWidth = \"+svgcWidth);\n\t\t//console.log(\"svgcMarginSpace = \"+svgcMarginSpace);\n\t\t//console.log(\"svgcMarginHeight = \"+svgcMarginHeight);\n\t\t//The Bar Properties\n\t\tbcMargin = 6;\n\t\ttotalChartBars = skillArr.length;\n\t\tbcWidth = (svgcWidth / totalChartBars) - bcMargin;\n\t\t//console.log(\"bcWidth = \"+bcWidth);\n\t\t//Maximum value to plot on chart\n\t\tmaximumDataValue = 0;\n\t\tfor (var i = 0; i < totalChartBars; i++) {\n\t\t var arrVal = skillArr[i].split(\",\");\n\t\t var barVal = parseInt(arrVal[1]);\n\t\t if (parseInt(barVal) > parseInt(maximumDataValue))\n\t\t maximumDataValue = barVal;\n\t\t}\n\t\ttotalLabelOnYAxis = 4;\t\t\n\t}", "function showBar() {\r\n\r\n\r\n\t$( document ).ready(function() {\r\n\r\n\tvar showData = $('#show-data');\r\n\t\r\n\tif (firstin){\r\n\t\tset_svg();\r\n\t\tfirstin = false;\r\n\t}\r\n\r\n\tvar x = d3.scaleBand().rangeRound([0, width]).padding(0.1),\r\n y = d3.scaleLinear().rangeRound([height, 0]);\r\n\r\n\r\nd3.tsv(\"data.tsv\", function(d) {\r\n d.frequency = +d.frequency;\r\n return d;\r\n}, function(error, data) {\r\n if (error) throw error;\r\n\r\n x.domain(data.map(function(d) { return d.letter; }));\r\n y.domain([0, d3.max(data, function(d) { return d.frequency; })]);\r\n\r\n\r\n//start here\r\n x_axis[chartCount] = group.append(\"g\")\r\n .attr(\"class\", function(){ return \"axis axis--x\"+chartCount;})\t\r\n .attr(\"transform\", \"translate(0,\" + height + \")\")\r\n .call(d3.axisBottom(x));\r\n\r\n y_axis[chartCount] = group.append(\"g\")\r\n .attr(\"class\", function(){ return \"axis axis--y\"+chartCount;})\r\n\t .call(d3.axisLeft(y).ticks(10, \"%\"))\r\n \t .append(\"text\")\r\n .attr(\"transform\", \"rotate(-90)\")\r\n .attr(\"y\", 6)\r\n .attr(\"dy\", \"0.71em\")\r\n .attr(\"text-anchor\", \"end\")\r\n .text(\"Frequency\");\r\n\r\n bar[chartCount] = group.selectAll(\".bar\")\r\n .data(data)\r\n .enter().append(\"rect\")\r\n .attr(\"class\", function() { return \"bar\"+chartCount; })\r\n\t .style(\"fill\",\"steelblue\")\r\n .attr(\"x\", function(d) { return x(d.letter); })\r\n .attr(\"y\", function(d) { return y(d.frequency); })\r\n .attr(\"width\", x.bandwidth())\r\n.call(d3.drag()\r\n \t.on(\"start\", bardragstarted)\r\n \t.on(\"drag\", bardragged)\r\n \t.on(\"end\", bardragended))\r\n\r\n .attr(\"height\", function(d) { return height - y(d.frequency); });\r\n});\r\n\r\n\r\nchartCount++; \r\n\r\n\r\n\r\nfunction bardragged(d) {\t\r\n\t\r\n\tvar x = d3.event.x;\r\n\tvar y = d3.event.y;\r\n\tvar drag_x = \".axis--x\"+chartCount;\r\n\tvar drag_y = \".axis--y\"+chartCount;\r\n\tvar drag_bar = \".bar\"+chartCount;\r\n\r\n\td3.select(\"svg\").selectAll(drag_x)\t\t\r\n\t.attr('transform', 'translate(' + x + ',' + \t(y + height) + ')');\r\n\r\n\td3.select(\"svg\").selectAll(drag_y)\t\t\r\n\t.attr('transform', 'translate(' + x + ',' + \ty + ')');\r\n\r\n\td3.select(\"svg\").selectAll(drag_bar)\t\t\r\n\t.attr('transform', 'translate(' + x + ',' + \ty + ')');\r\n\t\r\n\t\r\n\r\n}\r\n\r\nfunction bardragstarted(d) {\r\n //alert(\"ended\");\r\n} \r\n\r\nfunction bardragended(d) {\r\n //alert(\"ended\");\r\n} \r\n\r\n\r\n\r\nshowData.empty();\r\n\r\n\r\n \t\r\n\r\n\t\r\n\r\n showData.text('Loading the JSON file.');\r\n });\r\n\r\n\r\n}", "function drawBarColors() {\r\n var data = new google.visualization.DataTable();\r\n data.addColumn('string', 'Share');\r\n data.addColumn('number', 'share price');\r\n data.addColumn({\r\n type: 'string',\r\n role: 'annotation'\r\n });\r\n data.addRows(price_list);\r\n\r\n var options = {\r\n annotations: {\r\n alwaysOutside: true,\r\n textStyle: {\r\n fontSize: 14,\r\n }\r\n },\r\n title: 'Stock Prices',\r\n chartArea: {\r\n width: \"50%\",\r\n height: \"50%\"\r\n },\r\n height: 300,\r\n colors: ['#0000CD', '#ffab91'],\r\n hAxis: {\r\n title: 'value per share',\r\n minValue: 0\r\n },\r\n vAxis: {\r\n title: 'Stock'\r\n }\r\n };\r\n var chart = new google.visualization.BarChart(document.getElementById('chart_div'));\r\n chart.draw(data, options);\r\n}", "function drawBarChart(){\n if(barChartData.length != 0){\n google.charts.load('current', {'packages':['bar']});\n google.charts.setOnLoadCallback(drawChart2);\n function drawChart2(){\n var data = google.visualization.arrayToDataTable(barChartData);\n var options = {\n chart: {\n title: 'Algorithm Performance Comparision',\n vAxis: { title: \"Time taken (in ms)\" },\n hAxis: { title: \"Algorithm\" },\n legend: { position: 'bottom' },\n colors: ['blue','red','green','yellow'],\n }\n };\n var chart = new google.charts.Bar(document.getElementById('algograph'));\n chart.draw(data, google.charts.Bar.convertOptions(options));\n }\n }\n}", "function addBarCharts(node) {\n graph.element.selectAll('.addBarChartLabel text').remove()\n\n if (!node.children && node.data.data.barChart) {\n if (!graph.element.select(`#node${node.data.id}`).selectAll('g').empty()) {\n graph.element.select(`#node${node.data.id}`).selectAll('g').remove()\n }\n const nodeElement = graph.element.select(`#node${node.data.id}`)\n .attr('class', 'node node--leaf node--norm isolates')\n .append('g')\n\n let totalWidth = 0\n for (let i = 0;i < node.data.data.barChart.length; i++) {\n const rect = node.data.data.barChart[i]\n nodeElement\n .append('rect')\n .attr('width', d => {\n totalWidth += Number.parseInt(rect.width)\n return rect.width\n })\n .attr('height', rect.height)\n .attr('fill', rect.fill)\n .attr('x', rect.x)\n .attr('y', rect.y)\n .attr('class', 'barChart')\n\n if (i === node.data.data.barChart.length - 1) {\n nodeElement\n .append('text')\n .attr('class', 'addBarChartLabel')\n .attr('dy', 5)\n .attr('x', totalWidth + 10)\n .style('text-anchor', 'start')\n .style('font', `${graph.style.labels_size}px sans-serif`)\n .text(d => node.data.id)\n .on('mouseover', mouseOveredDendrogram(true))\n .on('mouseout', mouseOveredDendrogram(false))\n }\n }\n }\n }", "function barchartplotter(id,data,label){\n new Chart(document.getElementById(id), {\n type: 'horizontalBar',\n data: {\n labels: categories,\n datasets: [{\n label: label,\n data: data,\n backgroundColor: colors,\n }]\n },\n options: {\n events: ['click'],\n scales: {\n yAxes: [{\n ticks: {\n beginAtZero: false\n }\n }]\n }\n }\n });\n}", "function barchart() {\n var svg = d3.select(\"#bar_chart svg\"),\n margin = {top: 20, right: 20, bottom: 30, left: 80},\n width = +svg.attr(\"width\") - margin.left - margin.right,\n height = +svg.attr(\"height\") - margin.top - margin.bottom;\n\n var tooltip = d3.select(\"body\").append(\"div\").attr(\"class\", \"toolTip\");\n\n var x = d3.scale.linear().range([0, width]);\n var y = d3.ordinal().range([height, 0]);\n\n var g = svg.append(\"g\")\n .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\n\n var data = globalProducts[flow][getSelectedProduct()][year]\n data.sort(function(a, b) { return a.value - b.value; });\n x.domain([0, d3.max(data, function(d) { return d.value; })]);\n y.domain(data.map(function(d) { return d.area; })).padding(0.1);\n\n g.append(\"g\")\n .attr(\"class\", \"x axis\")\n .attr(\"transform\", \"translate(0,\" + height + \")\")\n .call(d3.axisBottom(x).ticks(5).tickFormat(function(d) { return parseInt(d / 1000); }).tickSizeInner([-height]));\n\n g.append(\"g\")\n .attr(\"class\", \"y axis\")\n .call(d3.axisLeft(y));\n\n g.selectAll(\".bar\")\n .data(data)\n .enter().append(\"rect\")\n .attr(\"class\", \"bar\")\n .attr(\"x\", 0)\n .attr(\"height\", y.bandwidth())\n .attr(\"y\", function(d) { return y(d.area); })\n .attr(\"width\", function(d) { return x(d.value); })\n .on(\"mousemove\", function(d){\n tooltip\n .style(\"left\", d3.event.pageX - 50 + \"px\")\n .style(\"top\", d3.event.pageY - 70 + \"px\")\n .style(\"display\", \"inline-block\")\n .html((d.area) + \"<br>\" + \"£\" + (d.value));\n })\n .on(\"mouseout\", function(d){ tooltip.style(\"display\", \"none\");});\n}", "function barchart(id){\n d3.json(\"samples.json\").then(function(data){\n //getting the values from the data\n var samples=data.samples;\n var resultArray=samples.filter(function(data){\n return data.id === id\n })\n var result=resultArray[0];\n\n //using an if else since certain sample values length are less than 10\n\n if(result.sample_values.length<10){\n let y_data=result.sample_values.reverse();\n let x_slice_id=result.otu_ids.reverse();\n let text_slice_labels=result.otu_labels.reverse();\n x_slice_id_list=[]\n x_slice_id.forEach(item=>{\n item=`OTU ${item}`\n x_slice_id_list.push(item);\n })\n Plotly.restyle(\"bar\", \"y\", [x_slice_id_list]);\n Plotly.restyle(\"bar\", \"x\", [y_data]);\n Plotly.restyle(\"bar\", \"text\", [text_slice_labels]);\n }\n else{\n let y_data=result.sample_values.slice(0,10).reverse();\n let x_slice_id=result.otu_ids.slice(0,10).reverse();\n let text_slice_labels=result.otu_labels.slice(0,10).reverse();\n x_slice_id_list=[]\n x_slice_id.forEach(item=>{\n item=`OTU ${item}`\n x_slice_id_list.push(item);\n })\n Plotly.restyle(\"bar\", \"y\", [x_slice_id_list]);\n Plotly.restyle(\"bar\", \"x\", [y_data]);\n Plotly.restyle(\"bar\", \"text\", [text_slice_labels]);\n }\n })\n}" ]
[ "0.7506336", "0.6938817", "0.69080716", "0.68560195", "0.67892677", "0.6706148", "0.66786253", "0.66590834", "0.66461813", "0.65991473", "0.6576051", "0.6533897", "0.65147394", "0.65141284", "0.6512622", "0.64491487", "0.6420126", "0.64126086", "0.64040923", "0.6402658", "0.63953906", "0.6360265", "0.63558066", "0.63521624", "0.6327731", "0.6299366", "0.6298944", "0.6295635", "0.62802", "0.6265812", "0.62534714", "0.6246557", "0.6241932", "0.62414014", "0.62331235", "0.6232393", "0.62108123", "0.62081563", "0.62058777", "0.6202507", "0.61990416", "0.61833817", "0.61736405", "0.6173257", "0.617323", "0.6172358", "0.61607385", "0.61596787", "0.6157498", "0.615545", "0.61490226", "0.614665", "0.61448973", "0.6143895", "0.6138076", "0.61347204", "0.61323524", "0.61279684", "0.612699", "0.6118946", "0.6110575", "0.610543", "0.6100948", "0.60994077", "0.6091057", "0.6090193", "0.60892665", "0.6089202", "0.6086598", "0.608357", "0.6080986", "0.60795134", "0.6078857", "0.60643923", "0.60583895", "0.60534185", "0.60360974", "0.6029525", "0.6029489", "0.6028762", "0.6025481", "0.6023766", "0.60218704", "0.6018202", "0.6015011", "0.6014339", "0.60105723", "0.6007886", "0.600577", "0.59978443", "0.59911615", "0.599038", "0.5981487", "0.59730947", "0.59713316", "0.59542006", "0.5950384", "0.5947626", "0.59425646", "0.5942026" ]
0.76160324
0
Express = 2 things: 1. Router 2. Middleware that comprises a webframework Req (comes in) MIDDLEWARE > Res(goes out) Middleware function is ANY function that has access to the req,res, next object Req MIDDLEWARE > Res 1. Request comes in: MIDDLEWARE FUNCTIONS 2. We need to validate the user, sometimes. 3. We need to store some things in the DB. 4. If there is data from the user we need to parse it and store it. END OF MIDDLEWARE FUNCTIONS 5. Res
function validateUser(req, res, next) { // get info out of the req object // do some stuff with the DB //locals is property that is prebuilt into express and is attached to response. // every piece of middleware will have access to locals becuase every piece of middleware has access to the response object res.send("<h1>Main Page</h1>"); res.locals.validated = true; console.log("VALIDATED RAN!"); next(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function middleware(request, response, next) {}", "function authenticationMiddleware(req, res, next) {\n //1.check if user sent a token in the headers | body | query \n var token = req.body.token || req.query.token || req.get('Authorization');\n Logger_1.Logger.d(TAG, '=============== Authentication Middleware ===============', 'gray');\n Logger_1.Logger.d(TAG, 'the token > ' + token, 'gray');\n // decode token\n if (token) {\n //2.verify user token and its exp.\n jwt.verify(token, 'mySecretForJWTtoken', (err, decoded) => __awaiter(this, void 0, void 0, function* () {\n if (err) {\n Logger_1.Logger.d(TAG, 'Failed to authenticate token > ' + err, 'red');\n return res.status(401).json({ success: false, message: 'Failed to authenticate token.' });\n }\n else {\n let userId = decoded.userId;\n /*\n 3.check that userId exist in db and if so save the user in req.user\n using userId from decrypted token - to check if there is such user in db*/\n try {\n let userRep = new user_rep_1.UserRepository();\n let user = yield userRep.getUserById(userId);\n Logger_1.Logger.d(TAG, `user is authenticated, userId > ${userId} `, 'green');\n Logger_1.Logger.d(TAG, JSON.stringify(user), 'green');\n Logger_1.Logger.d(TAG, '=============== / Authentication Middleware ===============', 'gray');\n req.user = user;\n next();\n }\n catch (e) {\n Logger_1.Logger.d(TAG, 'ERR=========>' + e, 'red');\n res.status(401).json({\n success: false,\n message: e\n });\n }\n }\n }));\n }\n else {\n Logger_1.Logger.d(TAG, 'token not exist on Header | url | querystring', 'red');\n Logger_1.Logger.d(TAG, '=============== / Authentication Middleware ===============', 'gray');\n // if there is no token\n // return an error\n return res.status(401).json({\n success: false,\n message: 'No token provided.'\n });\n }\n}", "initExpressMiddleWare() {\n\t\tthis.app.use(bodyParser.urlencoded({ extended: true }));\n\t\tthis.app.use(bodyParser.json());\n\t}", "function validateUser(req, res, next) {\n //get info out of the req object\n //do some with the DB\n res.locals.validated = true;\n console.log(\"Validated Ran!\");\n next();\n}", "middlewares() {\n //directorio publico\n this.app.use(express.static('public'));\n\n //convertir los datos que llegan en json\n this.app.use(express.json());\n }", "setupAppMiddleware() {\n\t\t// small security protections by adjusting request headers\n\t\tthis.app.use(helmet());\n\n\t\t// adding the request's client ip\n\t\tthis.app.use(requestIp.mw());\n\n\t\tif(Config.isDev) {\n\t\t\t// Log requests in the console in dev mode\n\t\t\tthis.app.use(morgan('dev'));\n\t\t}\n\t\telse {\n\t\t\t// Compress responses in prod mode\n\t\t\tthis.app.use(compression());\n\t\t}\n\n\t\t// decode json-body requests\n\t\tthis.app.use(bodyParser.json());\n\n\t\t// TODO: Move mongo sanitation to save actions\n\t\t// sanitizing request data for mongo-injection attacks\n\t\tthis.app.use(mongoSanitize());\n\n\t\t// any internal data that is needed to be attached to the request must be attached to the \"internalAppVars\" object\n\t\tthis.app.use((req, res, next) => {\n\t\t\treq.internalAppVars = {};\n\t\t\tnext();\n\t\t});\n\t}", "middleware() {\n this.express.use(logger('dev'));\n this.express.use(bodyParser.json());\n this.express.use(bodyParser.urlencoded({ extended: false }));\n }", "function middleware(req, res, next) {\n\tns.run(() => next());\n}", "requestHandler(req, res) {\n // All requests are assumed to be \"Express-like\" and have the bodyParser run\n // before it. Express doesn't have a good way (that I'm aware of) to specify\n // \"run this middleware if it hasn't already been run\".\n this.emit('message', req.body)\n this.handler(req.body, this.responseHandler.bind(this, res))\n }", "function validateUser(req, res, next) {\n // Do stuff to validate res\n // Pretend that validation is done\n\n // You can set a variable of any name\n res.locals.iCanSetWhateverVariableIWant = true;\n console.log(\"Validated Ran!\")\n next(); // Hand control to next middleware\n}", "function fhmiddleware() {\n var fh = fhMbaasApi.getFhApi();\n return function(req, res, next) {\n var requestTime = new Date().getTime();\n\n // TODO - need to dig into analytics here and find out what exactly funct should be,\n // and possibly replace funct with url in analytics\n var funct = req.url;\n\n // Note we can't peek into the request body for POST/PUT as can can't assume its been unrolled at this stage\n var params = {};\n params = paramsUtils.parseFHParams(req);\n\n params._headers = req.headers;\n params._files = req.files;\n\n var msgParams = params;\n msgParams.ipAddress = getIPofClient(req);\n msgParams.agent = (req.headers && req.headers['user-agent']) ? req.headers['user-agent'] : '-';\n msgParams.funct = funct;\n\n function getIPofClient(req) {\n var ret = \"nonset\"; // default value\n\n if (req.headers && req.headers['x-forwarded-for']) {\n ret = req.headers['x-forwarded-for']; // this may be a comma seperated list of addresses added by proxies and load balancers\n } else if (req.connection && req.connection.remoteAddress) {\n ret = req.connection.remoteAddress;\n }\n return ret;\n }\n\n // check secure endpoints\n req.pause();\n authentication(req, res, params).authenticate(funct, function(err) {\n req.resume();\n\n if (err) {\n res.writeHead(err.code, {\n \"Cache-Control\": \"no-cache\",\n \"Content-Type\": \"application/json\"\n });\n return res.end(JSON.stringify(err));\n }\n\n\n res.on('finish', function() {\n sendReport();\n });\n\n function sendReport() {\n var responseTime = new Date().getTime();\n msgParams.status = res.statusCode || 200;\n msgParams.time = (responseTime - requestTime); //milisecs;\n msgParams.start = requestTime;\n msgParams.end = responseTime;\n\n try {\n fhreports.sendReport({\n func: funct,\n fullparams: msgParams,\n topic: 'fhact'\n });\n } catch (e) {\n // error purposely ignored\n }\n\n // also log live stat\n fh.stats.timing(funct + '_request_times', msgParams['time'], true);\n fh.stats.timing('__fh_all_request_times', msgParams['time'], true);\n }\n\n next();\n });\n };\n}", "function gen_auth_middleware (sql) {\n return function (req, res, next) {\n if (!req.headers.authorization) {\n return res.status(401).end();\n }\n const token = req.headers.authorization.split(' ')[1];\n\n return jwt.verify(token, secret.jwtSecret, (err, decoded) => {\n if (err) {\n console.log(`[401] ${req.method} ${req.url}: Cannot verify JWT token`);\n return res.status(401).end();\n }\n\n const userId = decoded.sub;\n\n // check if a user exists\n return sql.getUserById(userId).then((user) => {\n if (!user) {\n console.log(`[401] ${req.method} ${req.url}: Cannot find user in DB`);\n return res.status(401).end('Cannot find user in DB');\n }\n\n console.log(`[200] ${req.method} ${req.url}: Found user in DB`);\n req.locals = { userId: userId };\n\n return next();\n }).catch((err) => {\n console.log(`[401] ${req.method} ${req.url}: ${err.message}`);\n return res.status(401).end(err.message);\n });\n });\n };\n}", "process(req, res){}", "validate(req, res, next) {\n\n // check header or url parameters or post parameters for token\n let token = req.headers['x-access-token'];\n let url = req.url.split('/');\n // console.log('headers => ',req.headers);\n // console.log('url = ',req.url);\n\n /**\n * Exclude validation on all routes with auth, status and public\n */\n if ( url.includes('auth')\n || url.includes('status')\n || url.includes('public')\n || url.includes('register')\n || url.includes('dashboard')\n || url.includes('apidoc')\n || url.includes('login') || req.url==='/') {\n next();\n } else {\n /**\n * Decode user from token and add to request if request has a valid token\n */\n if (token) {\n // verifies secret and checks exp\n jwt.verify(token, config.jwtSecret, (err, decoded) => {\n if (err) {\n // console.log(err)\n return res.status(403).send({success: false, message: err.message});\n\n } else {\n // if everything is good, save to request for use in other routes\n req.user = decoded;\n // console.log(decoded);\n next();\n }\n });\n } else {\n /**\n * Return 403 - Forbidden status if there's no token or token is valid\n */\n return res.status(403).send({\n success: false,\n message: 'You are not allowed access',\n reason: 'No token provided.'\n });\n }\n }\n }", "function my_middleware(req, res, next){\n\tconsole.log('Hello Middleware');\n\tnext();\n}", "function Middleware(app, middleware, action){\n var args;\n action = action || \"invoke\";\n \n if (typeof middleware === 'function')\n {\n switch(middleware.length)\n {\n //fn() with this=app and fn.invoke(next) with this = context\n case 0:\n middleware.call(app);\n return function (context, next) {return middleware.invoke.call(context, next);};\n break;\n \n //fn(next) or fn(app) and fn.invoke(context, next) \n case 1:\n args =private_getParamNames(middleware);\n if (arrayEqual(args,[\"next\"]))\n return function (context, next) { return middleware.call(context, next);}; \n \n else\n {\n var mw = Object.create(middleware.prototype); \n middleware.call(mw, app);\n \n return mw.invoke.bind(mw);\n \n if (typeof mw[action] === 'function')\n return mw[action].bind(mw);\n else\n throw(\"no \" + action +\" function exists on middleware \" + middleware.toString());\n \n }\n \n //fn(req,res) or fn(context, next)\n case 2: \n args =private_getParamNames(middleware);\n if (arrayEqual(args,[\"req\",\"res\"]))\n {\n throw(\"must require 'iopa-connect' to use Connect/Express style middleware\");\n } else\n {\n return middleware;\n }\n \n //fn(req,res,next)\n case 3:\n throw(\"must require 'iopa-connect' to use Connect/Express style middleware\");\n \n //fn(err,req,res,next)\n case 4:\n throw(\"must require 'iopa-connect' to use Connect/Express style middleware\");\n \n default:\n throw(\"unknown middleware\");\n \n }\n }\n else\n {\n app.log.error(\"middleware must be a function\");\n throw(\"middleware must be called on a function\");\n }\n \n}", "function addRoutes(app) {\n\n app.all('*', (req, res, next) => {\n console.log(req.method + ' ' + req.url);\n next();\n });\n\n //register users\n /*\n param 1: api endpong\n param 2: middleware that uses a controller function \n */\n app.post('/api/register', authController.register);\n\n //login users\n /*\n param 1: api endpoint\n param 2: middleware that uses a controller function \n */\n app.post('/api/login', authController.login);\n\n app.post('/api/account-activate', authController.accountActivate);\n app.post('/api/resend-activation-link', authController.resendActivationLink);\n app.post('/api/reset-password-link', authController.resetPasswordLink);\n app.post('/api/reset-password', authController.resetPassword);\n\n //authorize your user - check that the user sending requests to server is authorized to view this route\n\n /*\n summary of this route:\n 1. call route\n 2. run first middleware, checkAuth \n - checkAuth uses the jwtAuth strategy defined in lib/passport.js\n - remember that this jwt auth strategy compares the JWT token saved to the client, \n either stored in a cookie or sent via an Authorization Header, \n with the JWT token that was created when the user logged in.\n - checkAuth, if successful, returns the user object from the DB\n 3. run second middleware, authController.testAuth\n - returns a {isLoggedIn: true/false} based on whether or not previous middleware\n successfully returned a user object\n */\n app.get('/api/test-auth', checkAuth, authController.testAuth);\n //if you ahve other protected routes, you can use the same middleware,\n //e.g: app.get('/api/protected-route', checkAuth, authController.testAuth);\n //e.g: app.get('/api/another-protected-route', checkAuth, authController.testAuth);\n\n}", "function middle(req, res, next)\n{\n console.log(`Incoming request: ${request.original}`)\n\n\n next();//always at end of middleware function\n}", "function authMiddleWare() {\n return function(req, res, next) {\n console.log(req.headers);\n if (req.headers['authorization']) {\n let token = req.headers['authorization'];\n\n try {\n let verifed = JWT.verify(token, SECRET);\n\n if (verifed.username === 'santRaju') {\n next();\n } else {\n throw 'unauthorized';\n }\n } catch (err) {\n res.json({\n status: 403,\n success: false,\n message: 'unauthorized access'\n });\n }\n } else {\n res.json({\n status: 403,\n success: false,\n message: 'unauthorized access'\n });\n }\n };\n}", "function middleware(validateFn, paramFn) {\n async function validationMiddleware(req, res, next) {\n // Get the params from request body and validate\n // Updates expressCtx.swatchCtx with validated params\n const requestParams = paramFn(req);\n validateFn(req.expressCtx, requestParams);\n\n await next();\n }\n\n return validationMiddleware;\n}", "getMiddleware() {\n const router = express.Router();\n router.options(this.path, (request, response, next) => {\n if (!this.handleAbuseProtectionRequests(request, response)) {\n next();\n }\n });\n router.post(this.path, (request, response, next) => __awaiter(this, void 0, void 0, function* () {\n try {\n if (!(yield this._cloudEventsHandler.processRequest(request, response))) {\n next();\n }\n }\n catch (err) {\n next(err);\n }\n }));\n return router;\n }", "function routeMiddleWare(req, res, next) {\n console.warn(req.method + ' ' + req.url + ' with ' + JSON.stringify(req.body))\n next()\n}", "use (middleware) {\n this.app.use(middleware)\n }", "applyMiddleware() {\n //Allows the server to parse json\n this.expressApp.use(bodyParser.json())\n\n //Registers the routes used by the app\n new Routes(this.expressApp)\n }", "function middleware(req, res, next) {\n req.context = createNamespace('context');\n req.context.run(() => next());\n}", "function validateUser(req, res, next) {\n // Get info out of the req object\n // Validate with the DB\n // IF validated run code below\n res.locals.validated = true;\n console.log(\"VALIDATED\");\n next();\n}", "function validateUser(req, res, next)\n{\n getUserFromTokenOrError(req, res, next)\n next()\n}", "function authMiddleware(req, res, next, options = {}) {\n\n // Match the auth header with RegExp\n let bearer = /Bearer (.+)/.exec(req.headers.authorization);\n\n // Check match of the header\n if(!bearer) {\n res.status(401).send({ error: \"invalid_authorization_header\" }).end();\n return;\n }\n // Get jwt from match\n let token = bearer[1];\n\n // Try to verify the jwt\n try {\n token = jwt.verify(token, Config.config.jwt.secret);\n } catch(err) {\n res.status(401).send({ error: \"unauthorized\" }).end();\n return;\n }\n\n // Check permissions\n if(options.admin && !token.admin) {\n res.status(403).send({ error: \"no_admin\" }).end();\n return;\n }\n\n // Set token payload to req.user\n req.user = token;\n\n next();\n\n}", "middlewares() {\n this.app.use(express.urlencoded({ extended: true }));\n this.app.use(express.json());\n this.app.use(express.static(resolve(__dirname, 'uploads')));\n this.app.use(cors())\n }", "function registerPostHandler(app)\n{\n return function(req, res)\n {\n const firstName = req.body.firstName.trim();\n const lastName = req.body.lastName.trim();\n const username = req.body.username.trim();\n const pw = req.body.pw.trim();\n const cPw = req.body.cPw.trim();\n\n const userId = username.substr(0,username.indexOf('@'));\n\n let errors = false;\n let view = {};\n\n if(typeof(firstName) === 'undefined' || firstName.trim().length === 0)\n {\n errors = true;\n view.fNameError = \"First Name field can not be empty.\";\n }\n if(typeof(lastName) === 'undefined' || lastName.trim().length === 0)\n {\n errors = true;\n view.lNameError = \"Last Name field can not be empty.\";\n }\n if(typeof username === 'undefined' || username.trim().length === 0){\n view.uNameError = 'Username can not be empty.';\n errors = true;\n }\n if(username.search(/[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.com/) === -1)\n {\n view.regexError = 'Username needs to be in [email protected]'\n errors = true;\n }\n if(typeof pw === 'undefined' || pw.trim().length === 0 )\n {\n view.pwError = 'Password field can not be empty.';\n errors = true;\n }\n if(pw.search(/\\d/) === -1)\n {\n view.pwNoDigitErr = 'Password should have at least 1 digit in it.';\n errors = true;\n }\n if(pw.search(/\\s/) !== -1)\n {\n view.pwSpaceErr = 'Password can not have space in it.';\n errors = true;\n }\n if(pw.length < 8)\n {\n view.pwLengthErr = 'Password must be at least 8 characters long.';\n errors = true;\n }\n if(typeof cPw === 'undefined' || cPw.trim().length === 0)\n {\n view.cPwErr = 'This field can not be empty.';\n errors = true;\n }\n else if(cPw !== pw)\n {\n view.cPwErr = 'Passwords do not match.'\n errors = true;\n }\n if(errors)\n {\n view.firstName = firstName; view.lastName = lastName; view.email = username;\n res.send(doMustache(app, 'register', view));\n }\n else\n {\n let user = {}; user.firstName = firstName; user.lastName = lastName;\n user.username = username; user.pw = pw;\n app.service.newUser(user)\n .then((resp) => {\n if(resp.info !== undefined)\n {\n view.error = resp;\n if(resp.status === 401)\n {\n //timeout, clear the old cookie.\n res.clearCookie(USER_COOKIE);\n }\n res.send(doMustache(app, 'error', view));\n }\n let user = {};\n user.auth = 'Bearer ' + resp.authToken;\n user.userId = username.substr(0,username.indexOf('@'));\n res.cookie(USER_COOKIE, user, { maxAge: 86400*1000 });\n res.redirect('/user/' + user.userId);\n });\n }\n }\n}", "run (req, res, next) {}", "function restrict() {\n return (req, res, next) => {\n // OR const token = req.cookies.token // express session does so automatically\n // set res.cookie in the generateToken function with 'cookie-parser' NPm\n // import cookie parser into server.js file, server.use(cocokieParser)\n //when a cookie gets sent out from client (insomnia, browser, etc)\n // then we can use req.cookies, instead of authorization we can do\n //req.tookies.token, get token value from cookie instead sent by client\n //This is another option to save tokens and not use authorization request\n //Example Login -: const token = generateToken(user) --- res.cookie - token\n //remove token from res.json message after login, cookie will automatically\n //handle all requests without authorizat\n const token = req.headers.authorization; // || req.cookies.token\n // see if there is a token\n //check if it is valid\n //reash the header + payload + secrete and see if it matches signature\n if (token) {\n jwt.verify(token, process.env.JWT_SECRET, (err, decodedToken) => {\n if (err) {\n console.log(\"err in verify token middleware----->\", err);\n res.status(401).json({ message: \"correct token required\" });\n } else {\n //token is valid here\n req.decodedToken = decodedToken;\n next();\n }\n });\n } else {\n res.status(401).json({\n message:\n \"token invalid, not logged in, enter correct login credentials\",\n });\n }\n };\n}", "middlewares () {\n this.express.use(express.urlencoded({ extended: false }))\n this.express.use(flash())\n this.express.use(\n session({\n store: new LokiStore({\n path: path.resolve(__dirname, '..', 'tmp', 'sessions.db')\n }),\n secret: 'MyAppSecret',\n resave: false,\n saveUninitialized: true\n })\n )\n }", "middleware(req, res, next) {\n this.tokens.push({ method: req.method, at: Date.now() });\n this.handleLimiting(req, res, next, this.tokens);\n }", "function userMiddleware(req, res, next) {\n const user_id = req.session.user_id;\n if (user_id) {\n req.user = users[user_id];\n res.locals.user = req.user; //locals makes the variable available in templates\n }\n //if there was a corresponding user object make it true if there wasn't anything or undefined make it false.\n req.isAuthenticated = !!req.user;\n res.locals.isAuthenticated = req.isAuthenticated;\n\n next();\n}", "function auth(req, res, next){\n const token = req.header('x-auth-token');\n if(!token) return res.status(401).send('Access denied. No token provided!');\n try{\n const decodedPayload = jwt.verify(token,config.get('jwtPrivateKey'));\n //getting user object with the help of token, secure approach\n //no one else can generate the token and paste it in header, because they don't have the private jwt key,\n //it's in environment variable\n \n req.user = decodedPayload;\n next(); //route handler, next middleware function\n }\n catch(ex){\n res.status(400).send('invalid token!!'); //terminating req res cycle\n }\n}", "function middleware2 (req, res, next) { //please keep in mind that a function name is not needed, also => may be used instead\n res.render (\"index2\");\n}", "function Authentication(req, res, next) {\r\n \r\n //Se localiza el header de la peticion y se coloca la palabra con la que se haran los procesos de autenticacion\r\n const token = req.header('Authorization')\r\n\r\n //Si el token no se coloca en el header de la peticion o la palabra clave se arroja mensaje de error\r\n if(!token)\r\n return res.status(401).json({eror: true, mssage: \"Access Denied\"})\r\n\r\n try {\r\n //Proceso de verificacion tanto de los usuarios como de los productos que nse vayan creando y que se autentiquen\r\n const verification = jwt.verify(token, process.env.TOKEN_KEY_AUTH)\r\n req.user = verification\r\n req.product = verification\r\n \r\n //Ejecucion del middleware\r\n next()\r\n }\r\n catch(err) {\r\n //Retorno de codigo de error y mensaje de error en caso de que se ingrese el token de autenticacion incorrecto\r\n return res.status(400).json({error: true, message: \"Invalid token\"})\r\n }\r\n}", "verificationMiddlewareFactory(userType){\n\t\tconst secret = this.getSecret(userType);\n\t\tconst verificationMiddleware = function(req, res, next){\n\t\t\tlet userInfo = null;\n\t\t\ttry {\n\t\t\t\tif(!req.headers.authorization) throw new BadRequest('Missing JWT');\n\t\t\t\tconst jwt = req.headers.authorization.split(' ')[1]; // 'Bearer $TOKEN', we just need the token part\n\t\t\t\tuserInfo = jsonwebtoken.verify(jwt, secret);\n\t\t\t} catch (e) {\n\t\t\t\tnext(e);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treq.user = userInfo;\n\t\t\t// console.log('req.user: ', req.user);\n\t\t\tnext();\n\t\t}\n\t\treturn verificationMiddleware;\n\t}", "middleware(req, res, next) {\n if (this.message) {\n res.status(500);\n res.type('text/html');\n res.send(this.message);\n } else {\n return next();\n }\n }", "function validateAuthentication(req, res, next) {\n\tnext(); //continue processing the request\n}", "async function protectRoute(req,res,next){ //include next also in parameter\n try{\n let token;\n if(req.headers.authorization){\n token=req.headers.authorization.split(\" \").pop();\n }\n if(token){\n // const userSentToken=req.body.token;\n const payload=jwt.verify(token,secrets.JWT_SECRET);\n if(payload){\n console.log(payload); //give userid and iat\n const user=await userModel.findById(payload.id);\n req.role=user.role; \n req.id=payload.id;\n // return res.status(200).json({\n // status:\"token verified\",\n // payload\n // })\n next();\n \n }else{\n throw new Error(\"Token is modified please login again\");\n }\n }else{\n throw new Error(\"Please login first\");\n }\n }catch(err){\n console.log(err)\n return res.status.json({\n status:\"token not verified\",\n err\n })\n }\n}", "function authenticationMiddleware() { \n\treturn (req, res, next) => {\n\t\tconsole.log(`req.session.passport.user: ${JSON.stringify(req.session.passport)}`);\n\t\t//only if the user is authenticated \n\t if (req.isAuthenticated()) return next();\n\t //if use is NOT authenticated then redirect them to login page\n\n\t res.redirect('/login');\n\t \n\t}\n}", "function checkUser(req, res, next){\r\n\tvar verify = req.body\r\n\t//console.log(verify.name)\r\n\t//console.log(verify.pass)\r\n\t\tif(verify.emailAddress && verify.password){\r\n\r\n\t\t\t\t\t\t// call static metod from User Model \r\n\t\t\t\t\t\tUsers.authenticate(verify.emailAddress, verify.password, function(error, user){\r\n\r\n\t\t\t\t\t\t\t// validate if there is no user \r\n\t\t\t\t\t\t\tconsole.log(user);\r\n\t\t\t\t\t\t\tif(error){\r\n\t\t\t\t\t\t\t\t// set error code \r\n\t\t\t\t\t\t\t\tvar err = new Error('There was an error on authenticate')\r\n\t\t\t\t\t\t\t\terr.status = 401;\r\n\t\t\t\t\t\t\t\tnext(err)\r\n\t\t\t\t\t\t\t}else if( !user){\r\n\t\t\t\t\t\t\t\t// Set error code if there is no user \r\n\t\t\t\t\t\t\t\tvar err2 = new Error('No User found or incorrect password');\r\n\t\t\t\t\t\t\t\terr2.status = 401;\r\n\t\t\t\t\t\t\t\tnext(err2)\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t// make user is avaialble for each middlewware\r\n\t\t\t\t\t\t\t\treq.session.UserId =user._id // If the authenticate method returns the user, then set the user document on the request so that each following middleware function has access to it.\r\n\t\t\t\t\t\t\t\tconsole.log(req.session)\r\n\t\t\t\t\t\t\t\tres.redirect('/allChurches')\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t})\r\n\t\t\t}\t\r\n\t\telse{\r\n\t\t\t// Find the user with the email addres s\r\n\t\t\tvar err = new Error('You must have a username and / or password to continue');\r\n\t\t\terr.status = 400;\r\n\t\t\tnext(err);\r\n\t\t}\r\n}", "function radioMiddleware(req, res, next){\n let cookie = req.cookies.authorization;\n\n if (!cookie) {\n console.debug(\"Redirecting to login - no cookie\")\n res.redirect('/');\n return;\n }\n try {\n const decryptedUserId = jwtFunctions.verify(cookie, secret);\n db.User.findOne({ where: { username: decryptedUserId } }).then((user, error) => {\n if (user) {\n res.locals.user = user.get({ plain: true });\n } \n else\n {\n console.debug(\"Redirecting to login - invalid cookie\")\n res.redirect('/');\n return;\n }\n });\n } catch (e) {\n res.status(400).send(e.message);\n }\n next();\n}", "middlewares() {\n this.server.use(cors());\n this.server.use(express.json());\n }", "function dbConn(req, res, next) {\r\n}", "function loginPostHandler(app) {\n return function(req, res){\n try\n {\n const username = req.body.username.trim();\n const pw = req.body.pw.trim();\n\n const userId = username.substr(0,username.indexOf('@'));\n\n let errors = false;\n let view = {};\n if(typeof username === 'undefined' || username.trim().length === 0){\n view.uNameError = 'Username can not be empty.';\n errors = true;\n }\n if(username.search(/[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.com/) === -1)\n {\n view.regexError = 'Username needs to be in [email protected]'\n errors = true;\n }\n if(typeof pw === 'undefined' || pw.trim().length === 0 )\n {\n view.pwError = 'Password field can not be empty.';\n errors = true;\n }\n if(pw.search(/\\d/) === -1)\n {\n view.pwNoDigitErr = 'Password should have at least 1 digit in it.';\n errors = true;\n }\n if(pw.search(/\\s/) !== -1)\n {\n view.pwSpaceErr = 'Password can not have space in it.';\n errors = true;\n }\n if(pw.length < 8)\n {\n view.pwLengthErr = 'Password must be at least 8 characters long.';\n errors = true;\n }\n if(errors)\n {\n view.email = username;\n res.send(doMustache(app, 'login', view));\n }\n else\n {\n let user = {};\n user.username = username;\n user.pw = pw;\n user.userId = username.substr(0,username.indexOf('@'));\n \tapp.service.authorizeUser(user)\n \t .then((json) => {\n if(json.info !== undefined)\n {\n view.error = json;\n if(json.status === 401)\n {\n //timeout, clear the old cookie.\n res.clearCookie(USER_COOKIE);\n }\n res.send(doMustache(app, 'error', view));\n }\n let user = {}\n user.auth = 'Bearer ' + json.authToken;\n user.userId = username.substr(0,username.indexOf('@'));\n res.cookie(USER_COOKIE, user, { maxAge: 86400*1000 });\n res.redirect('/user/' + user.userId);\n });\n }\n }catch(e)\n {\n view.error = e;\n console.error(e);\n }\n }\n}", "protect(callback) {\n // if the callback isn't defined default to one which just makes sure \n // someone is logged in.\n let middleware = callback ? callback : (request, response, next) => {\n if (!request.isAuthenticated())\n return response.redirect('/login');\n \n return next();\n }\n // get local this because of fucked up scope.\n let that = this;\n return {\n get(path, method) {\n that.router.get(path, method, middleware);\n },\n post(path, method) {\n that.router.post(path, method, middleware);\n },\n put(path, method) {\n that.router.put(path, method, middleware);\n },\n delete(path, method) {\n that.router.delete(path, method, middleware);\n }\n }\n }", "function validate(req,res,next){\n req.checkBody('fullname','Fullname is Required').notEmpty();\n req.checkBody('fullname','Fullname Must Not Be Less Than 5 Characters').isLength({min:5});\n req.checkBody('email','Email is Required').notEmpty();\n req.checkBody('email','Email is Invalid').isEmail();\n req.checkBody('password','Password is Required').notEmpty();\n req.checkBody('password','Password Must Not Be Less Than 5 Characters').isLength({min:5});\n req.check(\"password\",\"Password Must Contain at least 1 Number.\").matches(/^(?=.*\\d)(?=.*[a-z])[0-9a-z]{5,}$/, \"i\");\n\n const errors=req.validationErrors();\n if (errors) {\n var messages=[];\n errors.forEach((error)=>{\n messages.push(error.msg);\n });\n req.flash('error',messages);\n res.redirect('/signup');\n }else {\n return next();\n }\n}", "function authUser(req, res, next) {\n try {\n const token = req.headers.authorization.split(' ')[1];\n //Si el token es valido, la variable user tiene el objeto guardado en el /auth\n const user = jsonwebtoken.verify(token, process.env.SECRET);\n if (user) {\n req.user = user;// El objeto de user se guarda en el request que comparte la funcion\n return next();\n }\n } catch(err){\n res.status(400).send({message:'Error validating user.', error: err}); \n }\n}", "function log(req,res,next){\n\n // console.log('hello osho middleware function is running');\n next();// next function helps to change in req,res cycle\n}", "function verifyToken(req, res, next){\n // grab token from either headers, req.body, or query string\n\n const token = req= req.get('token') ||\n req.body.token || req.query.token\n // if no token present, deny access\n if(!token) return res.json({success:\n false,message: \"No token provided\"})\n // otherwise, try to verify token\n jwt.vertify(token, JWT_SECRET, (err,decodedData)=>{\n //if problem with token verification, deny access\n if(err) return res.json({success:\n false, message:\"Invalid token\"\n })\n // otherwise, search for user by id that was embedded in token\n\n User.findById(decodedData._id,(err,user)=>{\n\n //if no user, deny access\n if(!user)return\n res.json({success:false,message:\"Invalid token\"})\n //otherwise, add user to req object\n\n req.user =user\n //go on to process the route:\n next()\n\n })\n \n\n })\n\n \n}", "function byPassJWT(req, res, next) {\n // example: allow all get requests\n // if(req.method === 'GET') {\n // return next();\n // }\n return expressJwt({ secret: config.secret })(req, res, next);\n }", "function middleware(req, res, next) {\n if (req.url === '/log') {\n var level = req.body.level,\n message = req.body.message,\n meta = req.body.meta;\n\n if (level && message && log[level]) {\n if (meta) {\n log[level](message, meta);\n } else {\n log[level](message);\n }\n }\n res.end();\n } else {\n next();\n }\n}", "function set_routes() {\n\n // Check your current user and roles\n app.get( '/status/:id', function( request, response ) {\n acl.userRoles( request.params.id || false, function( error, roles ){\n response.json( {'User': request.user ,\"Roles\": roles });\n });\n });\n\n // Only for users and higher\n app.all( '/secret', [ acl.middleware( 1, get_user_id) ],function( request, response ) {\n\n response.send( 'Welcome Sir!' +request.params.id);\n }\n );\n\tapp.use('/user',require('./routers/userR.js'));\n app.use('/event',require('./routers/eventR.js'));\n //accept error\n app.use(acl.middleware.errorHandler('json')); \n \n}", "function auth(req, res, next) {\n //Validate token\n let token = req.header('x-auth-token')\n if (!token) {\n return res.status(401).json({ msg: 'Please register or log in' })\n }\n try {\n //Validate\n decoded = jwt.verify(token, process.env.JWT_SECRET)\n //Add user id from payload to request\n req.user = decoded\n next()\n } catch (e) {\n console.error(e.message)\n res.status(400).json({ msg: 'Invalid token' })\n }\n}", "function route() {\n var router = new express.Router();\n router.use(cors());\n router.use(bodyParser());\n\n // POST REST endpoint - note we use 'body-parser' middleware above to parse the request body in this route.\n // This can also be added in application.js\n // See: https://github.com/senchalabs/connect#middleware for a list of Express 4 middleware\n router.post('/', function(req, res) {\n console.log('Hi', req.body);\n //Must pass a username & password\n var username = req.body.username || req.body.userId;\n var password = req.body.password;\n if (!username || !password) {\n return res.status(500).json({'status': 'error','message': 'You need to provide a username and password.'});\n }\n\n checkCredentials(username, password)\n .then(function (result){\n console.log('username', username, 'authenticated')\n res.status(result.statusCode).json(result);\n })\n .catch(function (err) {\n console.log('username', username, 'not authenticated', 'err', err)\n res.status(err.statusCode).json(err);\n });\n\n });\n\n return router;\n}", "function onRequest(req, res) {\n // Uncomment this if you want to see the raw request logged\n // logRequest(req);\n\n // Setup a handy helper function for everybody to send errors\n // back\n res.error = function _error(code, err) {\n res.setHeader('content-type', 'text/plain');\n res.writeHead(code || 500);\n res.end(err ? (err.stack || err) : null);\n };\n\n // A poor man's request router\n if (req.method === 'POST') {\n if (req.url !== '/sign') {\n res.error(405, 'POST /sign');\n } else {\n handleSign(req, res);\n }\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n if (req.url !== '/index.html') {\n if (req.url === '/favicon.ico') {\n res.error(404);\n } else {\n res.setHeader('location', '/index.html');\n res.error(302);\n }\n } else {\n handleGet(req, res);\n }\n } else {\n res.error(405);\n }\n}", "function logger(req, res, next){\n // log the path of the request\n // console.log('Request received:', req.originalUrl);\n // console.log(req.headers);\n // VERIFY json web token\n let tokenToValidate = req.headers.authorization;\n\n jwt.verify(tokenToValidate, env.EPIC_ROADTRIPS_SECRET_KEY, (err, decodedPayload) => {\n if(err){\n\n // turn request away if not validated\n return res.status(403);\n }\n // continue with request if validated\n // console.log(decodedPayload);\n next();\n });\n}", "async function adminMiddleware(req, res, next){\n let cookie = req.cookies.authorization;\n\n if (!cookie) {\n console.debug(\"Redirecting to login - no cookie\")\n res.redirect('/');\n return;\n }\n try {\n const decryptedUserId = jwtFunctions.verify(cookie, secret);\n db.User.findOne({ where: { username: decryptedUserId } }).then((user, error) => {\n if (user) {\n res.locals.user = user.get({ plain: true });\n\n let adminRole = await db.Role.findOne({where: {name: \"admin\"}});\n adminRole = adminRole.get({plain: true});\n let ownerRole = await db.Role.findOne({where: {name: \"owner\"}});\n ownerRole = ownerRole.get({plain: true});\n\n if (user.roleId != adminRole.id && user.roleId != ownerRole.id){\n console.debug(\"Redirecting to login - non-admin cannot access admin routes.\");\n res.redirect('/');\n return;\n }\n } \n else\n {\n console.debug(\"Redirecting to login - invalid cookie\")\n res.redirect('/');\n return;\n }\n });\n } catch (e) {\n res.status(400).send(e.message);\n }\n next();\n}", "function userMiddleware({ user }, { locals }, next) {\n // eslint-disable-next-line no-param-reassign\n locals.user = user;\n next();\n}", "static async ensureAuthenticated(req, res, next) {\n // Check the user based on API.\n const apiKey = req.get(\"user-api\") || req.body[0]?.user_api;\n const userId = req.get(\"user-id\") || req.body[0]?.user_id;\n if (apiKey && userId) {\n let sqlQuery = \"SELECT * FROM user WHERE id = ?\";\n const ourUser = await db.query(sqlQuery, userId);\n if (ourUser.length > 0) {\n let uncDb = await Utils.decrypt(ourUser[0].api_key);\n if (uncDb == apiKey) {\n let curUser = {\n steam_id: ourUser[0].steam_id,\n name: ourUser[0].name,\n super_admin: ourUser[0].super_admin,\n admin: ourUser[0].admin,\n id: ourUser[0].id,\n small_image: ourUser[0].small_image,\n medium_image: ourUser[0].medium_image,\n large_image: ourUser[0].large_image,\n };\n req.user = curUser;\n return next();\n }\n }\n }\n if (req.isAuthenticated()) {\n return next();\n }\n res.redirect(\"auth/steam\");\n }", "function registerHandler(app) {\n //console.log(\"REGISTER USER\");\n return function(req, res) {\n const isDisplay = (typeof req.body.submit === 'undefined');\n if (isDisplay) { \n res.send(doMustache(app, 'register', {}));\n } else {\n const q = req.body;\n var errors = {};\n var flag = 0;\n if (typeof q.firstname === 'undefined' || q['firstname'].trim().length === 0) {\n flag = 1;\n errors['qFirstNameError'] = 'Please provide a value';\n } else if(!(/^[a-zA-Z ]+$/.test(q.firstname))) {\n flag = 1;\n errors['qFirstNameError'] ='Please provide a valid value';\n } else {\n errors['firstname'] = q.firstname;\n }\n\n if (typeof q.lastname === 'undefined' || q['lastname'].trim().length === 0) {\n flag = 1;\n errors['qLastNameError'] = 'Please provide a value';\n } else if(!(/^[a-zA-Z ]+$/.test(q.lastname))) {\n flag = 1;\n errors['qLastNameError'] = 'Please provide a valid value';\n } else {\n errors['lastname'] = q.lastname;\n }\n\n if (typeof q.email === 'undefined' || q['email'].trim().length === 0) {\n flag = 1;\n errors['qEmailError']= 'Please provide a value';\n } else if(!(/^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$/.test(q.email))) {\n flag = 1;\n errors['qEmailError']= 'Please provide a valid value';\n } else {\n errors['email'] = q.email;\n }\n\n if (typeof q.password === 'undefined' || q['password'].trim().length === 0) {\n flag = 1;\n errors['qPasswordError'] = 'Please provide a value';\n } else if(!(/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\\$%\\^&\\*])(?=.{8,})/.test(q.password))) {\n flag = 1;\n errors['qPasswordError'] = 'Please provide a strong value';\n }\n\n if (typeof q.confirmPassword === 'undefined' || q['confirmPassword'].trim().length === 0) {\n flag = 1;\n errors['qConfirmPasswordError'] = 'Please provide a value';\n } else if(q.password !== q.confirmPassword) {\n flag = 1;\n errors['qConfirmPasswordError'] = 'Password Mismatch';\n }\n \n if(flag !== 1) {\n app.users.registerUser(q).then(function(json) {\n\n if(json.response && json.response.status === 303) {\n errors['qSubmitError'] = 'User already exists!';\n res.send(doMustache(app, 'register', errors)); \n } else {\n res.cookie(\"authToken\", json.authToken);\n res.cookie(\"email\", q.email);\n res.redirect('/account');\n }\n });\n } else {\n res.send(doMustache(app, 'register', errors));\n }\n }\n }\n}", "function checkRequest(req, res, next) {\n\n var appToken = req.headers[appTokenHeader],\n appName = req.headers[appNameHeader],\n user = req.headers[userHeader];\n\n checkApplication(appName, appToken, function(err, applicationOk) {\n if(err) { return res.send(err); }\n if(!applicationOk) { res.send(new Error('You must provide an valid application name and token to access seguir the seguir API.')); }\n req.keyspace = keyspace + '_' + appName;\n checkUser(req.keyspace, user, function(err, user) {\n if(err) { return res.send(err); }\n req.liu = user;\n next();\n });\n });\n\n }", "function userRegistrationCheck(req, res, next) {\n gblErrMsg = '';\n var inputs = sanitizeInputs(req);\n if (!inputs.email) return res.send({ statusCode: 500, result: errMsg })\n if (!inputs.username) return res.send({ statusCode: 500, result: errMsg })\n if (!inputs.password) return res.send({ statusCode: 500, result: errMsg })\n //write validation \n //console.log(inputs)\n if (validateEmail(inputs.email)) {\n if (validatePassword(inputs.password)) {\n if (validateUserName(inputs.username)) {\n\n }\n }\n }\n\n if (Boolean(gblErrMsg)) {\n return res.send({ statusCode: 500, result: gblErrMsg })\n }\n else {\n req.secret = secret\n next();\n }\n}", "handleErrors(templateFunc, dataCB){ // passing a templateFunc as an argument\n //than we return a middleware function which will be called repeatedly\n //next is a callback which tells that everything is okay continue processing this req\n return async (req, res, next) => {\n const errors = validationResult(req); // this will check if the req has any errors/\n\n //if we have errors\n if(!errors.isEmpty()){\n let data = {};// declaring a data variable as an empty obj in case we don't have any data callback\n //if data is provided\n if(dataCB){\n data = await dataCB(req); // we update the variable //storing data in data variable\n }\n return res.send(templateFunc({ errors, ...data })); //we return the template with the errors as arguments, and data\n }\n next();\n };\n }", "function authentication(req, res, next) {\n\n var auth = req.headers.authorization;\n var user,pass,clearText,i;\n delete req.user; // Remove if anything here.\n\n if (auth) {\n\n // First check if there is a HTTP Authorization header and set\n // user based on that.\n\n log('auth', \"Start HTTP authentication\");\n clearText = atob(auth.substring(\"Basic \".length));\n i = clearText.indexOf(\":\");\n\n if (i == -1) {\n\n log('auth', \"Invalid authorization header \" + auth);\n unauthorized('Invalid authorization header');\n\n } else {\n\n user = clearText.substring(0,i);\n pass = clearText.substring(i+1);\n log('auth', \"Basic auth of: \" + user + \"/\" + pass);\n\n if (!user) {\n\n log('auth', \"Authentication failed, no user\");\n unauthorized('No user in authorization header');\n\n } else {\n\n storage.getNode(user,user)\n .done (nodeLoaded)\n .fail (nodeLoadFailed);\n\n }\n\n }\n\n } else if (req.session && req.session.user) {\n\n // No authorization header, set user from session\n\n req.user = req.session.user;\n log('auth', \"Set user from session. \" + req.user);\n next();\n\n } else {\n\n // No authorization header, nor session.\n\n log('auth', \"No session or authorization header, \" +\n \"proceeding as unauthenticated\");\n delete req.user;\n next();\n\n }\n\n function nodeLoaded (node) {\n\n authorizeAgainstNode(node,user,pass).\n done(compareOk).\n fail(compareFail);\n\n }\n\n function nodeLoadFailed (err) {\n\n log('auth', \"Cannot load user node\");\n unauthorized();\n\n }\n\n function compareOk () {\n\n log('auth', \"Password comparison succeeded\");\n req.user = user;\n next();\n\n }\n\n function compareFail (err) {\n\n log('auth', \"Error: \" + err);\n unauthorized(err);\n\n }\n\n function unauthorized (msg) {\n res.statusCode = 401;\n if (msg === undefined) msg = 'Unauthorized';\n res.end(msg);\n // don't call next here, request handling stops.\n }\n\n}", "function SessionHandler(db) {\r\n \"use strict\";\r\n\r\n var users = new UsersDAO(db);\r\n var sessions = new SessionsDAO(db);\r\n\r\n this.isLoggedInMiddleware = function (req, res, next) {\r\n var session_id = req.cookies.session;\r\n sessions.getUsername(session_id, function (err, username) {\r\n \"use strict\";\r\n\r\n if (!err && username) {\r\n req.username = username;\r\n }\r\n return next();\r\n });\r\n }\r\n\r\n this.displayLoginPage = function (req, res, next) {\r\n \"use strict\";\r\n return res.render(\"login\", {username: \"\", password: \"\", login_error: \"\"})\r\n }\r\n//Inventory\r\n \r\n this.handleInsertInventoryItem=function(req, res, next){\r\n console.log(\"Inside handleInsertInventoryItem\");\r\n \r\n console.log(req.username);\r\n \r\n req.body['userId'] =req.username;\r\n \r\n db2.inventory.insert(req.body, function(err, doc) {\r\n res.json(doc);\r\n });\r\n }\r\n this.handleGetInventoryItem=function(req, res, next){\r\n console.log(\"Inside handleGetInventoryItem\");\r\n console.log(req.username);\r\n db2.inventory.find({ userId: req.username } ,function (err, docs) {\r\n console.log(docs);\r\n res.json(docs);\r\n });\r\n }\r\n \r\n this.handleGetSingleInventoryItem=function(req, res, next){\r\n console.log(\"Inside handleGetSingleInventoryItem\");\r\n var id = req.params.id;\r\n console.log(id);\r\n db2.inventory.findOne({_id: mongojs.ObjectId(id)}, function (err, doc) {\r\n res.json(doc);\r\n });\r\n \r\n };\r\n\r\n this.handleDeleteSingleInventoryItem=function(req, res, next){\r\n console.log(\"Inside handleDeleteSingleInventoryItem\");\r\n var id = req.params.id;\r\n console.log(id);\r\n db2.inventory.remove({_id: mongojs.ObjectId(id)}, function (err, doc) {\r\n res.json(doc);\r\n }); \r\n };\r\n\r\n this.handleUpdateSingleInventoryItem=function(req, res, next){\r\n var id = req.params.id;\r\n console.log(\"ID!! \"+id);\r\n db2.inventory.findAndModify({\r\n query: {_id: mongojs.ObjectId(id)},\r\n update: {$set: {id: req.body.id, name: req.body.name, wt: req.body.wt, servings: req.body.servings, retail: req.body.retail}},\r\n new: true}, function (err, doc) {\r\n res.json(doc);\r\n }\r\n );\r\n };\r\n \r\n this.handleLoginRequest = function (req, res, next) {\r\n \"use strict\";\r\n\r\n var username = req.body.username;\r\n var password = req.body.password;\r\n\r\n console.log(\"user submitted username: \" + username + \" pass: \" + password);\r\n\r\n users.validateLogin(username, password, function (err, user) {\r\n \"use strict\";\r\n\r\n if (err) {\r\n if (err.no_such_user) {\r\n return res.render(\"login\", {username: username, password: \"\", login_error: \"No such user\"});\r\n }\r\n else if (err.invalid_password) {\r\n return res.render(\"login\", {username: username, password: \"\", login_error: \"Invalid password\"});\r\n }\r\n else {\r\n // Some other kind of error\r\n return next(err);\r\n }\r\n }\r\n\r\n sessions.startSession(user['_id'], function (err, session_id) {\r\n \"use strict\";\r\n\r\n if (err)\r\n return next(err);\r\n\r\n res.cookie('session', session_id);\r\n return res.redirect('/main');\r\n });\r\n });\r\n }\r\n\r\n this.displayLogoutPage = function (req, res, next) {\r\n \"use strict\";\r\n\r\n var session_id = req.cookies.session;\r\n sessions.endSession(session_id, function (err) {\r\n \"use strict\";\r\n\r\n // Even if the user wasn't logged in, redirect to home\r\n res.cookie('session', '');\r\n return res.redirect('/');\r\n });\r\n }\r\n\r\n this.displaySignupPage = function (req, res, next) {\r\n \"use strict\";\r\n res.render(\"signup\", {username: \"\", password: \"\",password_error: \"\", email: \"\",\r\n username_error: \"\", email_error: \"\", verify_error: \"\", companyName_error: \"\",\r\n city_error: \"\", state_error: \"\",zipcode_error: \"\", phoneNumber_error: \"\",\r\n company_website_address_error: \"\",companyName:\"\", address:\"\",address_error:\"\",\r\n city:\"\", state:\"\", zipcode:\"\", phoneNumber:\"\", company_website_address:\"\",\r\n\r\n daily_contact_name:\"\", daily_email_address:\"\", daily_phoneNumber:\"\",\r\n daily_contactName_error: \"\",daily_email_address_error: \"\",daily_phoneNumber_error: \"\",\r\n\r\n donor_shopping_cart_food_daily:\"\", donor_days_of_week_foodDonation:\"\",\r\n donor_pickup_time:\"\", donor_require_refrigeneration:\"\", donor_require_freezer:\"\", donor_deliver_local:\"\",\r\n food_recovery_type:\"\",\r\n donor_shoppingcart_error: \"\", donor_days_of_week_error: \"\", donor_pickup_time_error: \"\",\r\n donor_require_refrigeneration_error: \"\", donor_require_freezer_error: \"\",donor_deliver_local_error: \"\",\r\n\r\n receiver_Hotmeals:\"\", receiver_Sackmeals:\"\", receiver_perishableGoods:\"\",\r\n receiver_dryGoods:\"\", receiver_accept_shopping_cart_food:\"\",re_heating_food:\"\",\r\n receiver_days_of_week:\"\", receiver_earliest_pickUpTime:\"\",\r\n receiver_latest_pickUpTime:\"\", receiver_refrigerator:\"\",\r\n receiver_freezer:\"\",receiver_pickUp_locally:\"\",\r\n\r\n receiver_hot_meals_error: \"\",receiver_sack_meals_error: \"\",receiver_bags_perishables_error: \"\",\r\n receiver_bags_dryGoods_error: \"\",receiver_shopping_cart_error: \"\",\r\n \r\n \r\n });\r\n }\r\n function validateReceiver(receiver_Hotmeals, receiver_Sackmeals, receiver_perishableGoods,\r\n receiver_dryGoods, receiver_accept_shopping_cart_food, errors) {\r\n var FOODCART_RE = /^[0-9]{1,2}$/;\r\n debugger;\r\n errors['receiver_hot_meals_error'] = \"\";\r\n errors['receiver_sack_meals_error'] = \"\";\r\n errors['receiver_bags_perishables_error'] = \"\";\r\n errors['receiver_bags_dryGoods_error'] = \"\";\r\n errors['receiver_shopping_cart_error'] = \"\";\r\n\r\n if (!FOODCART_RE.test(receiver_Hotmeals)) {\r\n errors['receiver_hot_meals_error'] = \"Numeric values only\";\r\n return false;\r\n }\r\n if (!FOODCART_RE.test(receiver_Sackmeals)) {\r\n errors['receiver_sack_meals_error'] = \"Numeric values only\";\r\n return false;\r\n }\r\n if (!FOODCART_RE.test(receiver_perishableGoods)) {\r\n errors['receiver_bags_perishables_error'] = \"Numeric values only\";\r\n return false;\r\n }\r\n if (!FOODCART_RE.test(receiver_dryGoods)) {\r\n errors['receiver_bags_dryGoods_error'] = \"Numeric values only\";\r\n return false;\r\n }\r\n if (!FOODCART_RE.test(receiver_accept_shopping_cart_food)) {\r\n errors['receiver_shopping_cart_error'] = \"Numeric values only\";\r\n return false;\r\n }\r\n //radio buttons\r\n return true;\r\n\r\n }\r\n function validateDonor(donor_shopping_cart_food_daily, donor_days_of_week_foodDonation,\r\n donor_pickup_time, donor_require_refrigeneration,\r\n donor_require_freezer, donor_deliver_local, errors) {\r\n errors['donor_shoppingcart_error'] = \"\";\r\n errors['donor_days_of_week_error'] = \"\";\r\n errors['donor_pickup_time_error'] = \"\";\r\n errors['donor_require_refrigeneration_error'] = \"\";\r\n errors['donor_require_freezer_error'] = \"\";\r\n errors['donor_deliver_local_error'] = \"\";\r\n debugger;\r\n var FOODCART_RE = /^[0-9]{1,2}$/;\r\n if (donor_shopping_cart_food_daily != \"\") {\r\n if (!FOODCART_RE.test(donor_shopping_cart_food_daily)) {\r\n errors['donor_shoppingcart_error'] = \"Numeric values only\";\r\n return false;\r\n }\r\n }else{\r\n errors['donor_shoppingcart_error'] = \"cannot be null\";\r\n return false;\r\n }\r\n if (donor_days_of_week_foodDonation == \"\") {\r\n errors['donor_days_of_week_error'] = \"cannot be null\";\r\n return false;\r\n }\r\n if (donor_pickup_time == \"\") {\r\n errors['donor_pickup_time_error'] = \"cannot be null\";\r\n return false;\r\n }\r\n if (donor_require_refrigeneration == \"\") {\r\n errors['donor_require_refrigeneration_error'] = \"cannot be null\";\r\n return false;\r\n }\r\n if (donor_require_freezer == \"\") {\r\n errors['donor_require_freezer_error'] = \"cannot be null\";\r\n return false;\r\n }\r\n if (donor_deliver_local == \"\") {\r\n errors['donor_deliver_local_error'] = \"cannot be null\";\r\n return false;\r\n }\r\n return true;\r\n }\r\n function validateSignup(username, password, verify, email, companyName, address,\r\n city, state, zipcode, phoneNumber, company_website_address, daily_contact_name,\r\n daily_email_address, daily_phoneNumber, errors) {\r\n \"use strict\";\r\n var USER_RE = /^[a-zA-Z0-9_-]{3,20}$/;\r\n var PASS_RE = /^.{3,20}$/;\r\n var EMAIL_RE = /^[\\S]+@[\\S]+\\.[\\S]+$/;\r\n // debugger;\r\n var LETTERS_RE =/^([A-Za-z]+ )+[A-Za-z]+$|^[A-Za-z]+$/;\r\n var ZIPCODE_RE = /^[0-9]{5}([- ]?[0-9]{4})?$/;\r\n var PHONE_RE = /^\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;\r\n //address -geolocation\r\n errors['username_error'] = \"\";\r\n errors['password_error'] = \"\";\r\n errors['verify_error'] = \"\";\r\n errors['email_error'] = \"\";\r\n\r\n errors['companyName_error'] = \"\";\r\n errors['city_error'] = \"\";\r\n errors['state_error'] = \"\";\r\n errors['zipcode_error'] = \"\";\r\n errors['phoneNumber_error'] = \"\";\r\n\r\n errors['company_website_address_error'] = \"\";\r\n //2 *\r\n errors['daily_contactName_error'] = \"\";\r\n errors['daily_email_address_error'] = \"\";\r\n errors['daily_phoneNumber_error'] = \"\";\r\n errors['address_error']=\"\";\r\n\r\n if (!USER_RE.test(username)) {\r\n errors['username_error'] = \"invalid username. try just letters and numbers\";\r\n return false;\r\n }\r\n if (!PASS_RE.test(password)) {\r\n errors['password_error'] = \"invalid password.\";\r\n return false;\r\n }\r\n if (password != verify) {\r\n errors['verify_error'] = \"password must match\";\r\n return false;\r\n }\r\n if (email != \"\") {\r\n if (!EMAIL_RE.test(email)) {\r\n errors['email_error'] = \"invalid email address\";\r\n return false;\r\n }\r\n }\r\n\r\n if (companyName != \"\") {\r\n if (!LETTERS_RE.test(companyName)) {\r\n errors['companyName_error'] = \"invalid company Name\";\r\n return false;\r\n }\r\n }\r\n if (city != \"\") {\r\n if (!LETTERS_RE.test(city)) {\r\n errors['city_error'] = \"invalid name for city\";\r\n return false;\r\n }\r\n }\r\n if (state != \"\") {\r\n if (!LETTERS_RE.test(state)) {\r\n errors['state_error'] = \"invalid name for state\";\r\n return false;\r\n }\r\n }\r\n if (zipcode != \"\") {\r\n if (!ZIPCODE_RE.test(zipcode)) {\r\n errors['zipcode_error'] = \"invalid Zipocde\";\r\n return false;\r\n }\r\n }\r\n if (phoneNumber != \"\") {\r\n if (!PHONE_RE.test(phoneNumber)) {\r\n errors['phoneNumber_error'] = \"invalid phone number\";\r\n return false;\r\n }\r\n }\r\n //----------------------- 2* --------------------------\r\n if (company_website_address != \"\") {\r\n if (!EMAIL_RE.test(company_website_address)) {\r\n errors['company_website_address_error'] = \"invalid company website address\";\r\n return false;\r\n }\r\n }\r\n // ------------------------- 3* -----------------------------------\r\n if (daily_contact_name != \"\") {\r\n if (!LETTERS_RE.test(daily_contact_name)) {\r\n errors['daily_contactName_error'] = \"invalid contact name\";\r\n return false;\r\n }\r\n }\r\n if (daily_email_address != \"\") {\r\n if (!EMAIL_RE.test(daily_email_address)) {\r\n errors['daily_email_address_error'] = \"invalid email address\";\r\n return false;\r\n }\r\n }\r\n if (daily_phoneNumber != \"\") {\r\n if (!PHONE_RE.test(daily_phoneNumber)) {\r\n errors['daily_phoneNumber_error'] = \"invalid phone number\";\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n this.handleSignup = function (req, res, next) {\r\n \"use strict\";\r\n //1.*\r\n var email = req.body.email\r\n var username = req.body.username\r\n var password = req.body.password\r\n var verify = req.body.verify\r\n\r\n var companyName = req.body.company_name;\r\n var address = req.body.address;\r\n var city = req.body.city;\r\n var state = req.body.state;\r\n var zipcode = req.body.zipcode;\r\n var phoneNumber = req.body.phone_number;\r\n //2*\r\n var company_website_address = req.body.company_website;\r\n //3*\r\n var daily_contact_name = req.body.daily_contact_name;\r\n var daily_email_address = req.body.daily_email;\r\n var daily_phoneNumber = req.body.daily_phone_number;\r\n //4*\r\n var food_recovery_type = req.body.foodRecovery_type;//Donor or Receiver or Transpoter\r\n var flag = false;\r\n var coords =\"\";\r\n\r\n //Donor\r\n var donor_shopping_cart_food_daily = \"\", donor_days_of_week_foodDonation = \"\",\r\n donor_require_refrigeneration = \"\", donor_pickup_time = \"\",\r\n donor_require_freezer = \"\", donor_deliver_local = \"\";\r\n\r\n //Receiver\r\n var receiver_Hotmeals = \"\", receiver_Sackmeals = \"\", receiver_perishableGoods = \"\",\r\n receiver_dryGoods = \"\"; //re_heating_food =\"\", receiver_accept_shopping_cart_food =\"\"\r\n\r\n // set these up in case we have an error case\r\n //change\r\n var errors = {'username': username, 'email': email,'password':password, 'verify':verify,'companyName':companyName,\r\n 'address':address,\r\n 'city':city, 'state':state, 'zipcode':zipcode, 'phoneNumber':phoneNumber, 'company_website_address':company_website_address,\r\n 'daily_contact_name':daily_contact_name, 'daily_email_address':daily_email_address, 'daily_phoneNumber':daily_phoneNumber\r\n \r\n }\r\n\r\n if (validateSignup(username, password, verify, email, companyName, address,\r\n city, state, zipcode, phoneNumber, company_website_address,\r\n daily_contact_name, daily_email_address, daily_phoneNumber,\r\n errors)) {\r\n //ge0code\r\n\r\n\r\n if (address != \"\") {\r\n address = address.concat(\" \", city, \" \", state);\r\n\r\n }//address\r\n else{\r\n errors['address_error']=\"address errro\";\r\n }\r\n switch (food_recovery_type) {\r\n case 'Donor':\r\n donor_shopping_cart_food_daily = req.body.donor_shopping_cart;\r\n donor_days_of_week_foodDonation = req.body.days_of_week;\r\n donor_pickup_time = req.body.pickup_time;\r\n donor_require_refrigeneration = req.body.refrigeration;\r\n donor_require_freezer = req.body.freezer;\r\n donor_deliver_local = req.body.deliver_local;\r\n\r\n if (validateDonor(donor_shopping_cart_food_daily, donor_days_of_week_foodDonation,\r\n donor_pickup_time, donor_require_refrigeneration, donor_require_freezer,\r\n donor_deliver_local, errors)) {\r\n flag = true;\r\n\r\n users.addUser_Donor(username, password, email, companyName, address,\r\n city, state, zipcode, phoneNumber, company_website_address,\r\n daily_contact_name, daily_email_address, daily_phoneNumber,\r\n donor_shopping_cart_food_daily, donor_days_of_week_foodDonation,\r\n donor_pickup_time, donor_require_refrigeneration, donor_require_freezer, donor_deliver_local,\r\n food_recovery_type,\r\n function (err, user) {\r\n \"use strict\";\r\n\r\n if (err) {\r\n // this was a duplicate\r\n if (err.code == '11000') {\r\n errors['username_error'] = \"Username already in use. Please choose another\";\r\n return res.render(\"signup\", errors);\r\n }\r\n // this was a different error\r\n else {\r\n return next(err);\r\n }\r\n }\r\n\r\n sessions.startSession(user['_id'], function (err, session_id) {\r\n \"use strict\";\r\n\r\n if (err)\r\n return next(err);\r\n\r\n res.cookie('session', session_id);\r\n return res.redirect('/main');\r\n });\r\n });\r\n\r\n }\r\n else\r\n flag = false;\r\n break;\r\n case 'Receiver'://debugger;\r\n receiver_Hotmeals = req.body.hot_meals;\r\n receiver_Sackmeals = req.body.sack_meals;\r\n receiver_perishableGoods = req.body.bags_perishables;\r\n receiver_dryGoods = req.body.bags_dryGoods;\r\n var re_heating_food = req.body.reheating;\r\n var drygrocery = req.body.drygrocery;\r\n var perishablegrocery = req.body.perishablegrocery;\r\n var receiver_accept_shopping_cart_food = req.body.receiver_shopping_carts;\r\n var receiver_days_of_week = req.body.receiver_days_of_week;\r\n var receiver_earliest_pickUpTime = req.body.receiver_earliest_pickUpTime;\r\n var receiver_latest_pickUpTime = req.body.receiver_latest_pickUpTime;\r\n var receiver_refrigerator = req.body.receiver_refrigerator;\r\n var receiver_freezer = req.body.receiver_freezer;\r\n var receiver_pickUp_locally = req.body.receiver_pickUp_locally;\r\n var receiver_message = \"No message\";\r\n receiver_message = req.body.receiver_specialRequest_message;\r\n\r\n if (validateReceiver(receiver_Hotmeals, receiver_Sackmeals, receiver_perishableGoods,\r\n receiver_dryGoods, receiver_accept_shopping_cart_food, errors)) {\r\n flag = true;\r\n users.addUser_Receiver(username, password, email, companyName, address,\r\n city, state, zipcode, phoneNumber, company_website_address,\r\n daily_contact_name, daily_email_address, daily_phoneNumber,\r\n receiver_Hotmeals, receiver_Sackmeals, receiver_perishableGoods,\r\n receiver_dryGoods, receiver_accept_shopping_cart_food,drygrocery,perishablegrocery,\r\n re_heating_food, receiver_days_of_week, receiver_earliest_pickUpTime,\r\n receiver_latest_pickUpTime, receiver_refrigerator, receiver_freezer,\r\n receiver_pickUp_locally, receiver_message,food_recovery_type, function (err, user) {\r\n \"use strict\";\r\n\r\n if (err) {\r\n // this was a duplicate\r\n if (err.code == '11000') {\r\n errors['username_error'] = \"Username already in use. Please choose another\";\r\n return res.render(\"signup\", errors);\r\n }\r\n // this was a different error\r\n else {\r\n return next(err);\r\n }\r\n }\r\n\r\n sessions.startSession(user['_id'], function (err, session_id) {\r\n \"use strict\";\r\n\r\n if (err)\r\n return next(err);\r\n\r\n res.cookie('session', session_id);\r\n return res.redirect('/main');\r\n });\r\n });\r\n\r\n }\r\n else\r\n flag = false;\r\n break;\r\n case 'Transporter'://if(validateTransporter()){return true;} else return false;\r\n break;\r\n default:\r\n flag = false;\r\n break;\r\n }//switch\r\n //geo\r\n }//if validate\r\n else {\r\n console.log(\"user did not validate\");\r\n return res.render(\"signup\", errors);\r\n }\r\n if (flag == false) {\r\n console.log(\"donor/receiver/transporter did not validate\");\r\n return res.render(\"signup\", errors);\r\n }\r\n }\r\n\r\n this.displayWelcomePage = function (req, res, next) {\r\n \"use strict\";\r\n\r\n if (!req.username) {\r\n console.log(\"welcome: can't identify user...redirecting to signup\");\r\n return res.redirect(\"/signup\");\r\n }\r\n\r\n return res.render(\"main\", {'username': req.username})\r\n }\r\n}", "function lMiddleware1(requestObject, responseObject, nextMiddleware) {\n // nextMiddleware passed in by express framework\n console.log('In lMiddleware1');\n nextMiddleware(); // must be called else browser hangs\n}", "async handleRequest (req, res) {\n try {\n // First run the handlers assigned with \"server.use\"\n await this.callHandlers(this.handlers, req, res)\n\n // Then run process the request for the provied route\n await this.handleRoute(req, res)\n } catch (err) {\n // Call the error listener if an error is thrown\n this.errorListener.call(this, err, req)\n\n // Return HTTP 500 if error is not caught within handlers\n res.error(err.message)\n }\n }", "loginPost (request, response) {\n // Save class this in variable as this is not defiend\n // as this router class inside callback functions.\n const router = this;\n //\n if (!request.session.user) {\n // Send the login cridentials to the user controller login.\n this.users.validate(request.body, (error, result) => {\n // Confirm there was no error authenticating the user.\n if (!error) {\n // Confirm the authentication was aproved.\n if (result) {\n // If the authentication was aproved save the users data in the session.\n request.session.user = result;\n // Then send message back.\n response.writeHead(200, {\"Content-Type\": \"application/json\"});\n response.end(JSON.stringify({status: true, message: 'You have been logged in!', cookie: result}));\n } else {\n // If the authentication was not aproved set message to invalid message.\n response.writeHead(200, {\"Content-Type\": \"application/json\"});\n response.end(JSON.stringify({status: false, message: router.invalid}));\n }\n } else {\n // If there was an error logging in the user send error message.\n response.writeHead(200, {\"Content-Type\": \"application/json\"});\n response.end(JSON.stringify({status: false, message: router.error}));\n // Then log the error object.\n console.error(error);\n }\n });\n } else {\n // If there was an error logging in the user send error message.\n response.writeHead(200, {\"Content-Type\": \"application/json\"});\n response.end(JSON.stringify({status: false, message: router.loggedIn}));\n }\n }", "validateHandler(req, res, next) {\n let errors = validationResult(req);\n if (errors.isEmpty()) {\n next();\n } else {\n res.status(400).send({ message: \"Validation Errors\", status: 0, errors: errors });\n }\n }", "function checkRequest (req, res, next) {\n // TODO: Cleaner way of excluding some paths from the auth check\n if (req.url === '/status') {\n return next(null);\n }\n\n var appAuthorization = req.headers.authorization;\n var user = req.headers[userHeader];\n\n if (!appAuthorization) {\n return next(new restify.InvalidArgumentError('You must provide an valid Authorization header to access seguir the seguir API.'));\n }\n\n var appId = appAuthorization.split(':')[0].split(' ')[1];\n\n checkApplicationToken(appId, function (err, token) {\n if (err) { return next(err); }\n if (!token) {\n return next(new restify.InvalidArgumentError('You must provide an valid Authorization header to access seguir the seguir API.'));\n }\n\n if (authUtils.validateAuthorization(req.headers, token.tokenid, token.tokensecret)) {\n req.keyspace = keyspace + '_' + token.appkeyspace;\n checkUser(req.keyspace, user, function (err, user) {\n if (err) { return next(err); }\n req.liu = user;\n next(null);\n });\n } else {\n return next(new restify.InvalidArgumentError('You must provide an valid Authorization header to access seguir the seguir API.'));\n }\n });\n }", "function f1(req, res, next) {\n req.data = \"This is a test\";\n next()\n}", "addUser(request, response, next) {\n try {\n if (!request.body.password) {\n throw new Error('HTTP_400 Password Needed');\n } else if (!request.body.name) {\n throw new Error('HTTP_400 Name Needed');\n } else {\n // Check for duplicate name\n this._knex(this._user).where('name', request.body.name).then(result => {\n if (result.length > 0) {\n throw new Error('HTTP_400 Duplicate UserName');\n }\n });\n\n this._knex(this._user).then(() => {\n //using bcrypt to hash password\n bcrypt\n .hash(request.body.password, 12)\n .then(hash_password => {\n return this._knex(this._user).insert(\n {\n name: request.body.name,\n hashedPassword: hash_password\n },\n '*'\n );\n })\n .then(users => {\n const user = users[0];\n let token = jwt.sign(\n {\n id: user.id,\n name: user.name\n },\n JWTenv.JWT_KEY\n );\n response\n .status(200)\n .cookie('token', token, { httpOnly: true })\n .json({\n id: user.id,\n name: user.name\n });\n });\n });\n }\n } catch (err) {\n if (err.message === 'HTTP_400 Password Needed') {\n response\n .set('Content-Type', 'text/plain')\n .status(400)\n .send('Password needed');\n } else if (err.message === 'HTTP_400 Name Needed') {\n response\n .set('Content-Type', 'text/plain')\n .status(400)\n .send('Name needed');\n } else if (err.message === 'HTTP_400 Duplicate UserName') {\n response\n .set('Content-Type', 'text/plain')\n .status(400)\n .send('Username already exists');\n } else {\n next(err);\n }\n }\n }", "async function validateTodoMiddleware(req, res, next) {\n const { errors, isValid } = await validateTodoInput(req.body);\n if (!isValid) {\n return ResErr(res, errors.message, 404);\n }\n next();\n}", "function SessionMobileHandler (db) {\n \"use strict\";\n\n var users = new UsersDAO(db);\n var sessions = new SessionsDAO(db);\n var confapp = new ConfappDAO(db);\n\tvar uploadedimage = \"\";\n\n this.isLoggedInMiddleware = function(req, res, next) {\n var session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username) {\n \"use strict\";\n\n if (!err && username) {\n req.username = username;\n }\n return next();\n });\n }\n\n this.displayLoginPage = function(req, res, next) {\n \"use strict\";\n return res.render(\"login\", {username:\"\", password:\"\", login_error:\"\"})\n }\n\n this.handleLoginRequest = function(req, res, next) {\n \"use strict\";\n\n var username = req.body.username;\n var password = req.body.password;\n\n console.log(\"user submitted username: \" + username + \" pass: \" + password);\n\n users.validateLogin(username, password, function(err, user) {\n \"use strict\";\n\n if (err) {\n if (err.no_such_user) {\n return res.render(\"login\", {username:username, password:\"\", login_error:\"No such user\"});\n }\n else if (err.invalid_password) {\n return res.render(\"login\", {username:username, password:\"\", login_error:\"Invalid password\"});\n }\n else {\n // Some other kind of error\n return next(err);\n }\n }\n\n sessions.startSession(user['_id'], function(err, session_id) {\n \"use strict\";\n\n if (err) return next(err);\n\n res.cookie('session', session_id);\n return res.redirect('/welcome');\n });\n });\n }\n\t\n\tthis.confappLogin = function(req, res, next) {\n \"use strict\";\n\n var username = req.body.username;\n var password = req.body.password;\n\n console.log(\"user submitted username: \" + username + \" pass: \" + password);\n\n users.validateLogin(username, password, function(err, user) {\n \"use strict\";\n\n if (err) {\n if (err.no_such_user) {\n return res.json({username:username, password:\"\", login_error:\"No such user\"});\n }\n else if (err.invalid_password) {\n return res.json(\"login\", {username:username, password:\"\", login_error:\"Invalid password\"});\n }\n else {\n // Some other kind of error\n return next(err);\n }\n }\n\n sessions.startSession(user['_id'], function(err, session_id) {\n \"use strict\";\n\n if (err) return next(err);\n\n return res.cookie('session', session_id);\n \n });\n });\n }\n\t\tthis.confappadminLogin = function(req, res, next) {\n \"use strict\";\n\n var username = req.body.username;\n var password = req.body.password;\n\n console.log(\"user submitted username: \" + username + \" pass: \" + password);\n\n users.validateLogin(username, password, function(err, user) {\n \"use strict\";\n//console.log(\"user place 1 \" );\n if (err) {\n if (err.no_such_user) {\n return res.json({username:username, password:\"\", login_error:\"No such user\"});\n }\n else if (err.invalid_password) {\n return res.json({username:username, password:\"\", login_error:\"Invalid password\"});\n }\n else {\n // Some other kind of error\n return \t\tres.json({login_error:err});\n }\n }\n // console.log(\"user place 2 \" );\n\t\n sessions.startSession(user['_id'], function(err, session_id) {\n \"use strict\";\n\n\t\t\t//\tconsole.log(\"user place 3 \" );\n if (err) return res.json({error:err});\n//console.log(\"user place 4 \" );\n res.cookie('session', session_id);\n\t\t\t res.json(true);\n\t\t\t // next();\n \n });\n });\n }\n\n\n\tthis.confappGetSession = function(req, res, next) {\n \"use strict\";\n\n \n\t\t\n\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n \n var username = {\n\t\t\t\tusername:username1 \n\t\t\t } ;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username.username);\n\t\t\t \n \n\t\t\tif(err) return res.json({error:err});\n\t\t\telse {\n\t\t\t\treturn res.json(username);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n }\n\t\n\tthis.confappadminLogout = function(req, res, next) {\n \"use strict\";\n\n var session_id = req.cookies.session;\n sessions.endSession(session_id, function (err) {\n \"use strict\";\n\n // Even if the user wasn't logged in, redirect to home\n res.cookie('session', '');\n return res.json(true);\n });\n }\n\t\n this.displayLogoutPage = function(req, res, next) {\n \"use strict\";\n\n var session_id = req.cookies.session;\n sessions.endSession(session_id, function (err) {\n \"use strict\";\n\n // Even if the user wasn't logged in, redirect to home\n res.cookie('session', '');\n return res.redirect('/');\n });\n }\n\n this.displaySignupPage = function(req, res, next) {\n \"use strict\";\n res.render(\"signup\", {username:\"\", password:\"\",\n password_error:\"\",\n email:\"\", username_error:\"\", email_error:\"\",\n verify_error :\"\"});\n }\n\n function validateSignup(username, password, verify, email, errors) {\n \"use strict\";\n var USER_RE = /^[a-zA-Z0-9_-]{3,20}$/;\n var PASS_RE = /^.{3,20}$/;\n var EMAIL_RE = /^[\\S]+@[\\S]+\\.[\\S]+$/;\n/*\n errors['username_error'] = \"\";\n errors['password_error'] = \"\";\n errors['verify_error'] = \"\";\n errors['email_error'] = \"\";\n\n if (!USER_RE.test(username)) {\n errors['username_error'] = \"invalid username. try just letters and numbers\";\n return false;\n }\n if (!PASS_RE.test(password)) {\n errors['password_error'] = \"invalid password.\";\n return false;\n } */\n if (password != verify) {\n errors['verify_error'] = \"password must match\";\n return false;\n }\n\t\t/*\n if (email != \"\") {\n if (!EMAIL_RE.test(email)) {\n errors['email_error'] = \"invalid email address\";\n return false;\n }\n } */\n return true;\n }\n\n this.handleSignup = function(req, res, next) {\n \"use strict\";\n\n var email = req.body.email\n var username = req.body.username\n var password = req.body.password\n var verify = req.body.verify\n\n // set these up in case we have an error case\n var errors = {'username': username, 'email': email}\n if (validateSignup(username, password, verify, email, errors)) {\n users.addUser(username, password, email, function(err, user) {\n \"use strict\";\n\n if (err) {\n // this was a duplicate\n if (err.code == '11000') {\n errors['username_error'] = \"Username already in use. Please choose another\";\n return res.render(\"signup\", errors);\n }\n // this was a different error\n else {\n return next(err);\n }\n }\n\n sessions.startSession(user['_id'], function(err, session_id) {\n \"use strict\";\n\n if (err) return next(err);\n\n res.cookie('session', session_id);\n return res.redirect('/welcome');\n });\n });\n }\n else {\n console.log(\"user did not validate\");\n return res.render(\"signup\", errors);\n }\n }\n\t\n\t\t\n\t\tthis.adminregister = function(req, res, next) {\n \"use strict\";\n\n var email = req.body.email\n var username = req.body.username\n var password = req.body.password\n var verify = req.body.verify\n\n // set these up in case we have an error case\n var errors = {'username': username, 'email': email}\n if (validateSignup(username, password, verify, email, errors)) {\n users.addUser(username, password, email, function(err, user) {\n \"use strict\";\n\n if (err) return res.json({error:err});\n\t\t\t\t\n sessions.startSession(user['_id'], function(err, session_id) {\n \"use strict\";\n\n if (err) {return res.json({error:err}) ;\n\t\t\t\t\t}else {\n\n res.cookie('session', session_id);\n\t\t\t\t\t\n\t\t\t\t\tconsole.log(username + \"session started\");\n\t\t\t\t\t// return res.json(true);\n\t\t\t\t\t}\n });\n\t\t\t\t\n\t\t\t\tconfapp.insertEntry(username, function(err, companyevent) {\n\t\t\t\t\tconsole.log(username + \"creating company event\");\n\t\t\t\t\tif(err) {return \n\t\t\t\t\t\tres.json({error:err}); }\n\t\t\t\t\telse {\n\t\t\t\t\treturn res.json(companyevent);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t\n });\n }\n else {\n console.log(\"user did not validate\");\n return res.json({error:errors});\n }\n }\n\n\t\n\tthis.register = function(req, res, next) {\n \"use strict\";\n\n var email = req.body.email\n var username = req.body.username\n var password = req.body.password\n var verify = req.body.verify\n\n // set these up in case we have an error case\n var errors = {'username': username, 'email': email}\n if (validateSignup(username, password, verify, email, errors)) {\n users.addUser(username, password, email, function(err, user) {\n \"use strict\";\n\n\t\t\t\tif (err) return res.json({error:err});\n \n\n sessions.startSession(user['_id'], function(err, session_id) {\n \"use strict\";\n\n\t\t\t\t\tif (err) return res.json({error:err});\n\n res.cookie('session', session_id);\n \n });\n });\n }\n else {\n console.log(\"user did not validate\");\n return res.json({error:errors});\n }\n }\n\n\t\n this.displayWelcomePage = function(req, res, next) {\n \"use strict\";\n\n if (!req.username) {\n console.log(\"welcome: can't identify user...redirecting to signup\");\n return res.redirect(\"/signup\");\n }\n\n return res.render(\"welcome\", {'username':req.username})\n }\n\t\n\tthis.uploadImage = function(req, res){\n var destPath = path.join(__dirname, \"../images/\");\n var originalFilename = req.files.file.originalFilename;\n var hashName = crypto.createHash('md5').update(originalFilename).digest('hex') + \".jpeg\"; \n var writeStream = req.files.file.ws;\n\n //if the file already exists in the path, then create a random file name from hashName.\n while (fs.existsSync(destPath+hashName)) {\n hashName = hashName.substring(0, hashName.length - 5);\n var rnd = crypto.randomBytes(3),\n value = new Array(3),\n len = hashName.length;\n for (var i = 0; i < 3; i++) {\n value[i] = hashName[rnd[i] % len];\n };\n hashName = hashName + value.join('') + \".jpeg\";\n }\n fs.copy(writeStream.path, destPath+hashName, function (err) {\n if (err) return res.send(err);\n fs.chmodSync(destPath+hashName, '755'); //there is probably a better solution, I have to change the permission to access the file from public images directory \n\t uploadedimage = destPath+hashName ;\n fs.remove(writeStream.path, function(err){\n if (err) return res.error(err);\n });\n\t \n\t var data = {path : \"http://localhost:8888/images/\" + hashName};\n\t return res.json(data);\n });\n\t\n\t\n \n}\nthis.confappsearch = function(req, res, next) {\n \"use strict\";\n\n var str = req.params.str;\n\t\t\n\n confapp.search(str, 10, function(err, results) {\n \"use strict\";\n\n if (err) return res.json({error:err}); \n\n return res.json(results);\n });\n }\n\t\n\tthis.loadevent = function(req, res, next) {\n \"use strict\";\n\n\t\tvar id = req.params.id;\n \n\t\t\n // var username = \"test15\";\n\t\t\t\n\t\t\t console.log(\"id=\"+id);\n confapp.loadevent(id,function(err, object) {\n\t\t\tif(err) return res.json({error:err});\n\t\t\telse {\n\t\t\t\tres.json(object);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\n }\n\t\n\nthis.geteventdetails = function(req, res, next) {\n \"use strict\";\n\n \n\t\t\n var username = \"test15\";\n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.geteventdetails(username,function(err, object) {\n\t\t\tif(err) return res.json({error:err});\n\t\t\telse {\n\t\t\t\tres.json(object);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\n }\n\n\t\n\nthis.getgallerylist = function(req, res, next) {\n \"use strict\";\n\n \n\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n var username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.getgallerylist(username,function(err, object) {\n\t\t\tif(err) return res.json({error:err});\n\t\t\telse {\n\t\t\t\tres.json(object.gallery);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t}\n \n });\n\t\t\n\t\t\n\t\t\n\t\n }\n\n\tthis.getnotificationlist = function(req, res, next) {\n \"use strict\";\n\n \n\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n var username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.getnotificationlist(username,function(err, object) {\n\t\t\tif(err) return res.json({error:err});\n\t\t\telse {\n\t\t\t\tres.json(object.notifications);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t}\n \n });\n\t\t\n\t\t\n\t\t\n\t\n }\n\t\n\t\n\tthis.sendnotification = function(req, res, next) {\n \"use strict\";\n\n var image = req.body.image\n var title = req.body.title\n\t\tvar description = req.body.description\n\t\tvar username ;\n \n\t\tvar notification = {\n\t\t\timage : image,\n\t\t\ttitle : title,\n\t\t\tdescription: description\n\t\t};\n\n\t\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.addNotification(username, notification, function(err, user) {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t\treturn res.json(true);\n\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn res.json(false);\n\t\t\t}\n \n });\n\t\t \n\t\t \n \n \n \n\n\t\t}\n\t\t\n\tthis.sendgallery = function(req, res, next) {\n \"use strict\";\n\n var image = req.body.image\n var title = req.body.title\n\t\tvar description = req.body.description\n\t\tvar username ;\n \n\t\tvar gallery = {\n\t\t\timage : image,\n\t\t\ttitle : title,\n\t\t\tdescription: description\n\t\t};\n\n\t\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.addGallery(username, gallery, function(err, user) {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t\treturn res.json(true);\n\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn res.json(false);\n\t\t\t}\n \n });\n\t\t \n\t\t \n \n \n \n\n\t\t}\n\n\t\t\n\t\n\n\tthis.getsocial = function(req, res, next) {\n \"use strict\";\n\n \n\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n var username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.getSocial(username,function(err, social) {\n\t\t\tif(err) return res.json({error:err});\n\t\t\telse {\n\t\t\t\tres.json(social.social);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t}\n \n });\n\t\t\n\t\t\n\t\t\n\t\n }\n\t\n\t\n\tthis.gethome = function(req, res, next) {\n \"use strict\";\n\n \n\t\t\n\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n var username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.getHome(username,function(err, homeobject) {\n\t\t\tif(err) return res.json({error:err});\n\t\t\telse {\n\t\t\t\tres.json(homeobject.home);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t}\n \n });\n\t\n }\n\t\n\t\n\tthis.getagenda = function(req, res, next) {\n \"use strict\";\n\n \n\t\t\n\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n var username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.getagenda(username,function(err, homeobject) {\n\t\t\tif(err) return res.json({error:err});\n\t\t\telse {\n\t\t\t\tres.json(homeobject.agenda);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t}\n \n });\n\t\n }\n\t\n\t\n\tthis.getvenue = function(req, res, next) {\n \"use strict\";\n\n \n\t\t\n\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n var username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.getvenue(username,function(err, homeobject) {\n\t\t\tif(err) return res.json({error:err});\n\t\t\telse {\n\t\t\t\tres.json(homeobject.venue);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t}\n \n });\n\t\n }\n\t\n\tthis.sendvenue = function(req, res, next) {\n \"use strict\";\n\n var image = req.body.image\n var name = req.body.name\n\t\tvar address = req.body.address\n\t\tvar username ;\n \n\t\tvar venue = {\n\t\t\timage : image,\n\t\t\tname : name,\n\t\t\taddress: address\n\t\t};\n\n\t\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.addVenue(username, venue, function(err, user) {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t\treturn res.json(true);\n\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn res.json(false);\n\t\t\t}\n \n });\n\t\t\n\t\t}\n\n\tthis.sendagenda = function(req, res, next) {\n \"use strict\";\n\n var theme = req.body.theme\n var name = req.body.name\n\t\tvar description = req.body.description\n\t\tvar username ;\n \n\t\tvar agenda = {\n\t\t\tname : name,\n\t\t\ttheme : theme,\n\t\t\tdescription: description\n\t\t};\n\n\t\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.addAgenda(username, agenda, function(err, user) {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t\treturn res.json(true);\n\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn res.json(false);\n\t\t\t}\n \n });\n\t\t\n \n\t}\n\t\n\t\n\t\n\t\t\n\tthis.sendhome = function(req, res, next) {\n \"use strict\";\n\n var theme = req.body.theme\n var name = req.body.name\n\t\tvar description = req.body.description\n\t\tvar username ;\n \n\t\tvar home = {\n\t\t\tname : name,\n\t\t\ttheme : theme,\n\t\t\tdescription: description\n\t\t};\n\n\t\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.addHome(username, home, function(err, user) {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t\treturn res.json(true);\n\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn res.json(false);\n\t\t\t}\n \n });\n\t\t\n \n\t}\n\t\t\n\t\n\tthis.sendsocial = function(req, res, next) {\n \"use strict\";\n\n var facebook = req.body.facebook\n var twitter = req.body.twitter\n\t\tvar username ;\n \n\t\tvar social = {\n\t\t\tfacebook : facebook,\n\t\t\ttwitter : twitter\n\t\t};\n\n\t\t\tvar session_id = req.cookies.session;\n sessions.getUsername(session_id, function(err, username1) {\n \"use strict\";\n\n if (!err && username1) {\n username = username1;\n \n\t\t\t\n\t\t\t console.log(\"username=\"+username);\n confapp.addSocial(username, social, function(err, user) {\n\t\t\t\tif (err) return res.json({error:err});\n\t\t\t\treturn res.json(true);\n\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn res.json(false);\n\t\t\t}\n \n });\n\t\t\n \n \n \n\n\t\t}\n}", "function middleware1 (req, res, next) {\n console.log(req.url)\n\n // res.send('middleware1 function called')\n\n next() // if next() not called then server will hang\n}", "serve() {\n return function (req, res, next) {\n next();\n };\n }", "function initMiddleware(middleware) {\n return (req, res) => new Promise((resolve, reject) => {\n middleware(req, res, result => {\n if (result instanceof Error) {\n return reject(result);\n }\n\n return resolve(result);\n });\n });\n}", "appMiddleware(req, res, next) {\n const plugins = this.plugins.filter((plugin) => {\n return \"function\" === typeof plugin.appMiddleware;\n });\n if (!plugins.length) {\n return next();\n }\n else {\n const _recursiveNext = (i = 1) => {\n if (i >= plugins.length) {\n return next;\n }\n else {\n return () => {\n return plugins[i].appMiddleware(req, res, _recursiveNext(i + 1));\n };\n }\n };\n return plugins[0].appMiddleware(req, res, _recursiveNext());\n }\n }", "function runMiddleware(req, res, fn) {\n return new Promise((resolve, reject) => {\n fn(req, res, (result) => {\n console.log(\"accepted\");\n if (result instanceof Error) {\n return reject(result);\n }\n return resolve(result);\n });\n });\n}", "function isAuthenticated() {\n return compose()\n // Validate jwt\n .use(function (req, res, next) {\n console.log('Validating JWT');\n // allow access_token to be passed through query parameter as well\n if (req.query && req.query.hasOwnProperty('access_token')) {\n req.headers.authorization = 'Bearer ' + req.query.access_token;\n }\n validateJwt(req, res, next);\n })\n // Attach user to request\n .use(function (req, res, next) {\n console.log('finding user');\n console.log('users in mem', users);\n console.log('user in req', req.user);\n let user = users.find(user => user.email === req.user.email);\n console.log('user from find', user);\n if (!user) {\n return res.status(401).end();\n }\n req.user = user;\n next();\n });\n\n}", "middleware (opts={}) {\n let correlationHeader = opts.correlationHeader || this.correlationHeader;\n let formatReq = opts.formatReq || this.formatReq;\n let formatRes = opts.formatRes || this.formatRes;\n let correlationGen = opts.correlationGen || this.correlationGen;\n let requestIdHeader = opts.requestIdHeader || this.requestIdHeader;\n\n return async (ctx, next) => {\n let res = ctx.res;\n let reqTime = new Date();\n let reqId = UUID.v4();\n let classname = (ctx.request.headers[correlationHeader]) ? 'service_request' : 'client_request';\n let correlationId = ctx.request.headers[correlationHeader] || correlationGen();\n ctx.request.headers[correlationHeader] = correlationId;\n ctx.request.headers[requestIdHeader] = correlationId;\n\n let done = (evt) => {\n let resTime = new Date();\n res.removeListener('finish', onFinish);\n res.removeListener('close', onClose);\n let logBase = {\n requestId : reqId,\n classname : classname,\n correlationId : correlationId,\n resolutionTime : resTime - reqTime,\n requestTime : reqTime.toString(),\n responseTime : res.toString(),\n formatRes : formatReq,\n formatRes : formatRes,\n };\n\n logBase.message = formatReq(ctx);\n this.log('informational', this.buildReqLog(ctx, logBase));\n let resLevel = (ctx.response.status >= 400 ? 'informational' : 'error');\n logBase.message = formatRes(ctx);\n this.log(resLevel, this.buildResLog(ctx, logBase));\n };\n\n let onFinish = done.bind(null, 'finish');\n let onClose = done.bind(null, 'close');\n res.once('finish', onFinish);\n res.once('close', onClose);\n\n try {\n await next();\n } catch (err) {\n throw err;\n }\n }\n }", "function authMiddleware(req, res, next) {\n // Check token validity\n const authHeader = req.headers.authorization;\n const token = authHeader && authHeader.split(\" \")[1];\n if (token == null) return res.sendStatus(403);\n\n // Verify token\n const verify = authToken(token);\n if (verify && verify.exp > Date.now()) {\n next();\n } else {\n return res.sendStatus(401);\n }\n}", "function isValidUser(req,res,next){\n if(req.isAuthenticated()) next(); // passport method will check \n else return res.status(401).json({message:'Unauthorized Request'});\n}", "userRegisterHandler(req, res) {\n if (req.body.password === undefined ||\n req.body.email === undefined ||\n req.body.username === undefined ||\n req.body.password === '' ||\n req.body.email === '') {\n let error = 'Email, Username and Password required';\n return res.status(500).redirect('/?regError=' + encodeURIComponent(error));\n }\n if (req.body.password.length < 5) {\n let error = 'Password length insufficient';\n return res.status(500).redirect('/?regError=' + encodeURIComponent(error));\n }\n // Encrypt password given\n api.encrypt(req.body.password, function (password) {\n // Search for a user matching that email and encrypted password\n User.find({\n $or: [ { email: req.body.email }, { username: req.body.username } ]\n }, function (err, docs) {\n if (err) {\n api.log.warn('/user/register - User.find() error:', err);\n }\n // No one found, register\n if (docs.length === 0) {\n // Create the new user instance\n let newUser = new User({\n username: req.body.username,\n email: req.body.email,\n password: password\n });\n // Start a new session\n let session = newUser.startSession();\n // Save the model to the database\n newUser.save(function (err) {\n if (err) {\n api.log.warn('/user/register - newUser.save() error:', err);\n res.status(403).redirect('/?regError=' + encodeURIComponent('Unknown registration error'));\n } else {\n // Reply back with the session information\n res.send({\n error: false,\n session: session\n });\n }\n });\n // Matched an existing user, reject\n } else {\n let error = 'Sorry, that email or username is already taken';\n res.status(403).redirect('/?regError=' + encodeURIComponent(error));\n }\n });\n });\n }", "LogIn(req, res, next) {\n // EXTRACT FORM DATA\n const { username, password } = req.body;\n\n // FIND USER BY USERNAME\n User.findByUserName(username).then(user => {\n // IF A USER ISN'T FOUND\n if (!user) {\n return res.status(401).json({ success: false, message: 'User not found' });\n }\n // IF A USER IS FOUND, CONTINUE AND COMPARE PASSWORD WITH HASH\n User.comparePassword(password, user.password, (err, isMatch) => {\n if (err) throw err;\n // IF PASSWORDS MATCH\n if (isMatch) {\n // CREATE A TOKEN\n const token = jwt.sign({ id: user.id, username: user.username }, process.env.SECRET_KEY, {\n expiresIn: 604800 // 1 WEEK\n });\n // SEND JSON OBJECT ALONG WITH TOKEN\n res.status(200).json({\n success: true,\n token: 'JWT ' + token,\n user: {\n id: user.id,\n username: user.username,\n email: user.email\n }\n });\n } else {\n return res.status(401).json({ success: false, message: 'Wrong password' });\n }\n });\n });\n }", "async _processRequest(req, res) {\n const [error, isComplete, returnHandlers,] = await JsonRpcEngine._runAllMiddleware(req, res, this._middleware);\n // Throw if \"end\" was not called, or if the response has neither a result\n // nor an error.\n JsonRpcEngine._checkForCompletion(req, res, isComplete);\n // The return handlers should run even if an error was encountered during\n // middleware processing.\n await JsonRpcEngine._runReturnHandlers(returnHandlers);\n // Now we re-throw the middleware processing error, if any, to catch it\n // further up the call chain.\n if (error) {\n throw error;\n }\n }", "static isAuthenticatedAsUser (req, res, next) {\n try {\n const jwtToken = AuthorizationUtil._extractToken(req)\n\n const jwtPayload = AuthorizationUtil.extractJWTInformation(jwtToken)\n // so you can use get user who made the request in the endpoint\n // since it will receive the same req object\n req.user = new User(jwtPayload.userId, jwtPayload.username)\n return next()\n } catch (ignored) {\n return ApiResponse.sendErrorApiResponse(403, 'Not authenticated', res)\n }\n }", "function isValidUser(req, res, next) {\n\tconst bearerHeader = req.headers['authorization'];\n\tif (typeof bearerHeader !== 'undefined') {\n\t\treq.token = bearerHeader;\n\t\tjwt.verify(req.token, 'secretKey', (err, authData) => {\n\t\t\tif (err) {\n\t\t\t\tres.status(403).json({message: 'Unauthorized'})\n\t\t\t} else {\n\t\t\t\tres.status(200).json({\n\t\t\t\t\tmessage: 'Authorized request',\n\t\t\t\t\tauthData\n\t\t\t\t})\n\t\t\t\treq.params = authData\n\t\t\t\tnext();\n\t\t\t}\n\t\t})\n\t\tnext();\n\t} else {\n\t\tres.status(403).json({\n\t\t\tmessage: 'Unauthorized request'\n\t\t})\n\t}\n}", "function middleware(app, settings) {\n\n return function (conn) {\n\n return conn.call(app);\n\n }; // End the main return function\n}", "function sessionWare(req, res, next) {\n // Check authorization token, infuse user info if logged in\n if (req.headers.authorization) {\n var token = req.headers.authorization.replace(\"Bearer \", \"\");\n var s = getSession(token);\n if (s == null) res.header(\"LoggedIn\", false);\n else {\n res.header(\"LoggedIn\", true);\n req.dailyUserName = s.userName;\n req.dailyUserId = s.userId;\n req.dailyToken = token;\n }\n }\n // Infuse current version\n res.header(\"DailyAppVer\", pjson.version);\n // Move on\n next();\n }", "function unifiedServer(req, res) {\n const parsedUrl = new URL(req.url, `http://${req.headers.host}`);\n\n const path = parsedUrl.pathname;\n const trimmedPath = path.replace(/^\\/+|\\/$/g, '');\n\n const method = req.method;\n const requestQuery = parsedUrl.searchParams;\n\n const headers = req.headers;\n\n // decoder for decoding buffers\n const decoder = new StringDecoder('utf8');\n let buffer = '';\n\n // called only for requests with body to handle incomming chunks from the stream\n req.on('data', (chunk) => {\n buffer += decoder.write(chunk); // decode each chunk and append to the earlier received chunks\n });\n\n // called for all requests regardless if they contain a body\n req.on('end', () => {\n buffer += decoder.end();\n\n // check if request path is among the available routes\n const selectedCallback = handlers[trimmedPath] || handlers.notFound\n\n // construct data to be sent to all handlers\n const data = {\n 'path': trimmedPath,\n 'method': method,\n 'query': requestQuery,\n headers,\n 'payload': buffer\n }\n\n selectedCallback(data, function(statusCode = 200, payload = {}) {\n const responseData = JSON.stringify(payload);\n\n res.setHeader('Content-Type', 'application/json')\n res.writeHead(statusCode);\n res.end(responseData);\n })\n })\n}", "function secureRoute(req, res, next) {\n if(!req.headers.authorization) return res.status(401).json({ message: \"You are not allowed in because you're not cool enough.\"});\n\n var token = req.headers.authorization.replace(\"Bearer \", \"\")\n\n jwt.verify(token, secret, function(err, payload){\n if(err || !payload) return res.status(401).json({ message: \"You are not allowed in because you're not cool enough.\"});\n\n req.user = payload;\n next();\n });\n}", "function loginValidate(req,res,next){\n req.checkBody('email','Email is Required').notEmpty();\n req.checkBody('email','Email is Invalid').isEmail();\n req.checkBody('password','Password is Required').notEmpty();\n req.checkBody('password','Password Must Not Be Less Than 5 Characters').isLength({min:5});\n req.check(\"password\",\"Password Must Contain at least 1 Number.\").matches(/^(?=.*\\d)(?=.*[a-z])[0-9a-z]{5,}$/, \"i\");\n\n const errors=req.validationErrors();\n if (errors) {\n var messages=[];\n errors.forEach((error)=>{\n messages.push(error.msg);\n });\n req.flash('error',messages);\n res.redirect('/login');\n }else {\n return next();\n }\n}", "function loginRequired(req, res, next) {\n try {\n const token = req.body.token;\n const payload = jwt.verify(token, SECRET_KEY);\n req.user = payload;\n delete req.body.token;\n return next();\n } catch (error) {\n next(new ExpressError('Valid token required', 401));\n }\n}", "function logger(req, res, next) {\n\n}", "function bruteforceCheck (req, res, next) {\n bruteforce.getMiddleware({\n key: function(req, res, next) {\n next(req.body.Username);\n }\n })(req, res, next);\n }" ]
[ "0.76121956", "0.73320854", "0.68383336", "0.6821624", "0.6764039", "0.6735488", "0.6709929", "0.6699704", "0.6683545", "0.667735", "0.66609704", "0.66347325", "0.66323453", "0.6616796", "0.6606897", "0.6598984", "0.6598807", "0.65867764", "0.6585335", "0.65533483", "0.65518034", "0.65481055", "0.653955", "0.6521264", "0.64968824", "0.6479779", "0.64470255", "0.6442653", "0.6431615", "0.64016175", "0.64004445", "0.6355709", "0.6346402", "0.6334559", "0.632791", "0.6326778", "0.6301776", "0.6300279", "0.6298523", "0.62719214", "0.626068", "0.62590164", "0.6255886", "0.62527764", "0.6206243", "0.61852574", "0.618183", "0.61776894", "0.61684537", "0.61668676", "0.6148492", "0.61453694", "0.61435497", "0.6134724", "0.6131823", "0.6125853", "0.6123938", "0.6109098", "0.6107942", "0.6099107", "0.60985744", "0.6096513", "0.60955834", "0.6087134", "0.6085448", "0.60822976", "0.6070028", "0.60646147", "0.6063211", "0.6056684", "0.6049778", "0.6048216", "0.60419774", "0.6030104", "0.60254836", "0.6025106", "0.6022295", "0.60044605", "0.59990394", "0.5998808", "0.5993165", "0.59916276", "0.5985953", "0.59736615", "0.5969136", "0.59671503", "0.5960174", "0.59581196", "0.59542984", "0.5953532", "0.5940871", "0.5935349", "0.5930838", "0.59283453", "0.5924256", "0.59186906", "0.5915883", "0.5913814", "0.59097576", "0.5904862" ]
0.7230972
2
abrir o marker e infowindow corretos de acordo com o evento
openMarker(e) { this.props.markers.forEach(marker => { if (e.target.value === marker.name) { this.props.infoWindows.forEach(infoWindow => { if (marker.name === infoWindow.name) { infoWindow.open(this.props.map, marker); if (marker.getAnimation() !== null) { marker.setAnimation(null); } else { marker.setAnimation(window.google.maps.Animation.BOUNCE); setTimeout(() => {marker.setAnimation(null);}, 300) } } }) } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function klikInfoWindow(id, marker)\n{\n google.maps.event.addListener(marker, \"click\", function(){\n detailmes_infow(id);\n\n });\n\n}", "function clickEventer(event){\n\t\t// get the coordinate of the clicked postion\n\t \tvar coord = getCoordinate(event); \n\t \tif(checkInfoWindow()){ // check if infowindow was opened\n\t \t\tmapCollector.infowindow.close() //close opened window\n\t \t\tcreateNewInfoWindow(coord, contentString) //create new one\n\t \t\tmapCollector.infowindow.open(map); // open the newly created\n\t \t}else{\n\t \t\tcreateNewInfoWindow(coord, contentString) // create new one\n\t \t\tmapCollector.infowindow.open(map); // open it\n\t \t}\n\t \t\n }", "function createMarker(event) {\n let filter = $(\"#filterTag\")[0].value;\n let locationString = event.location;\n let latlng = parseLocation(locationString);\n \n // InfoWindow content\n \n var content = '<div class=\"infowindow\">' +\n '<div>' +\n '<h4>' + event.brief + '</h4>' +\n '<p>' + event.detail + '</p >' +\n '<div>Contacts</div>' +\n '<p>' + event.contact + '</p >' +\n '<div>Start_time</div>' +\n '<p>' + event.startTime + '</p >' +\n '<div>End_time</div>' +\n '<p>' + event.endTime + '</p >' +\n '</div>' +\n '</div>';\n \n // A new Info Window is created and set content\n var infowindow = new google.maps.InfoWindow({\n content: content,\n // Assign a maximum value for the width of the infowindow allows\n // greater control over the various content elements\n maxWidth: 350\n });\n\n // marker options\n var marker = new google.maps.Marker({\n position: latlng,\n map: map,\n title: event.brief\n });\n \n // This event expects a click on a marker\n // When this event is fired the Info Window is opened.\n google.maps.event.addListener(marker, 'click', function() {\n infowindow.open(map, marker);\n });\n // Event that closes the Info Window with a click on the map\n google.maps.event.addListener(map, 'click', function() {\n infowindow.close();\n });\n \n gmarkers.push(marker);\n \n nearEvents.append(\"<a href='#myModal' id='\" + event.id + \"' address='\" + event.address + \"' brief='\" + event.brief + \"' detail='\" + event.detail + \"' flag='\" + 0 +\"' contact='\" + event.contact + \"' startTime='\" + event.startTime + \"' endTime='\" + event.endTime + \"' location='\" + event.location + \"' onclick='showOnMap(this)' class=' list-group-item list-group-item-action' data-toggle='modal'>\" + event.brief + \"</a>\")\n tags.push(event.tag);\n if (filter == \"All\" || filter == event.tag) {\n show.push(1);\n marker.setMap(map);\n } else {\n show.push(0);\n marker.setMap(null);\n }\n}", "function addInfoWindow(marker, message,myLatLng,i) {\nvar infoWindow = new google.maps.InfoWindow({\n content: \"\"\n});\n var geocoder = new google.maps.Geocoder;\n google.maps.event.addListener(marker, 'click', function () {\n\t\t\tgeocodeLatLng(geocoder, map,marker, infoWindow,myLatLng,i);\n\t\t\t//infoWindow.open(map, marker);\n });\n}", "function showInfoWindow(event) {\n\tvar $elementFired = $( event.data.elementPlotter );\n\t\n\tif (exists($elementFired)) {\n\t\tvar id = $elementFired.attr('item-id');\n\t\t\n\t\tif (id) {\n\t\t\tfor (var indexInfoMarks = 0; indexInfoMarks < markers.length; indexInfoMarks++) {\n\t\t\t\tvar infoMark = markers[indexInfoMarks];\n\t\t\t\t\n\t\t\t\tif (infoMark.id == id) {\n\t\t\t\t\tnew google.maps.event.trigger( infoMark.googleOBJ , 'click' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function addPoiMarkerEventHandler(marker, infowindow) {\n marker.addListener(\"click\", function () {\n infowindows.forEach(function (eachInfoWindow) {\n eachInfoWindow.close();\n });\n map.setCenter(marker.position);\n map.setZoom(15);\n infowindow.open(map, marker);\n });\n }", "function pushMarker(json) {\n\n geocode({ 'address': json.location }, function (results, status) {\n if (status != google.maps.GeocoderStatus.OK) {\n console.log(status);\n return;\n }\n var coordinates = results[0].geometry.location;\n // if the coordinates are fine, create the marker and the infoWindow\n if (status == google.maps.GeocoderStatus.OK) {\n // check if the marker is already on the named location\n var getIndex;\n for (var i = 1; i < markers.length; i++) {\n if (coordinates.G == markers[i].getPosition().lat() && coordinates.K == markers[i].getPosition().lng()) {\n getIndex = i;\n break;\n }\n }\n // if the marker already exists, just change the infoWindow\n if (getIndex != null) {\n var content = infoViews[getIndex - 1].getContent();\n }\n // create the content of the infoWindow\n var contentString =\n '<div id=\"content\">' +\n '<div id=\"siteNotice\">' +\n '</div>' +\n '<h1 id=\"firstHeading\" class=\"firstHeading\">' + json.title + '</h1>';\n\n if (json.related != null) {\n contentString = contentString + '<h4 style=\"font-size: small;font-style: italic\">' + json.artist + ' is related to ' + json.related + '</h4>';\n }\n\n var contentString = contentString +\n '<h5 id=\"secondHeading\">' + json.type + '</h5>' +\n '<div id=\"bodyContent\">' +\n '<p>' + json.description + '</p>' +\n '</div>' +\n '</div>';\n\n // if marker already on the map, just change the content \n if (getIndex != null) {\n var newContent = content + contentString;\n infoViews[getIndex - 1].setContent(newContent);\n markers[getIndex].title = 'Miscellaneous';\n var icon = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=M|00FF00|0000FF';\n markers[getIndex].setIcon(icon);\n markers[getIndex].addListener('click', function () {\n infoViews[getIndex - 1].open(map, markers[getIndex]);\n });\n return;\n }\n // otherwise\n else {\n // create the infoWindow containing the content string\n var infoWindow = new google.maps.InfoWindow({\n content: contentString\n });\n infoViews.push(infoWindow);\n\n // set the propper icon\n var icon;\n if (json.type == 'TwitterLocation') {\n icon = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=T|4099FF|0000FF'\n } else if (json.type == 'Tweet') {\n icon = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=T|4099FF|0000FF'\n } else if (json.type == 'Performance') {\n icon = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=P|FF4500|0000FF'\n } else if (json.type == 'Release') {\n icon = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=R|9400D3|0000FF'\n }\n\n var marker = new google.maps.Marker({\n animation: google.maps.Animation.DROP,\n icon: icon,\n position: coordinates,\n map: map,\n title: json.title\n });\n markers.push(marker);\n\n marker.addListener('click', function () {\n infoWindow.open(map, marker);\n });\n }\n }\n });\n}", "function addMarkerClick(e){\n maxDist = 0.8 / 110.574;\n distGPStoSelection = Math.sqrt(Math.pow(e.latlng.lat - truelat, 2) + Math.pow(e.latlng.lng - truelon, 2));\n// Controlla se la distanza non è eccessiva\n if(distGPStoSelection <= maxDist && stato == 1){\n updateData(e.latlng.lat, e.latlng.lng);\n stopLocation();\n $(\"#geo-information\").html('<div class=\"alert alert-dark text-center\" role=\"alert\">📌 Modalità selezione manuale, la geolocalizzazione è in pausa. 🛑 </div>');\n} else if (distGPStoSelection <= maxDist){\n $(\"#geo-information\").html('<div class=\"alert alert-info text-center\" role=\"alert\">✋ Attendi che l\\' accuratezza migliori prima di selezionare la posizione dalla mappa manualmente.<div class=\"spinner-grow spinner-grow-sm float-right\" role=\"status\"></div></div>');\n} else if (stato == 1) {\n $(\"#geo-information\").html('<div class=\"alert alert-danger text-center\" role=\"alert\">✋ Non puoi selezionare un punto così distante dalla tua posizione attuale.');\n}\n }", "function toggleInfoWindow(event){\t\t\n\t\tif (!self.infowindow)\n\t\t\t// console.log(event.latLng);\n\t\t\t// console.log(self.message);\n\t\t\t initInformationWindow(event.latLng, self.message);\n\t\t\t \n\t\tif (self.infowindow.getMap())\n\t\t\tself.infowindow.close();\n\t\telse\n\t\t\tself.infowindow.open(GoogleMaps.map, self.marker);\n\t\t// Show flicker api images\n\t\t//alert('http://'+window.location.host + '/studier/API-programmering/Uppgift-4-App/ShareYourVacation/public/api/flickr?lat='+self.location_lat+'&lng='+self.location_lng);\n\t\tGoogleMaps.ajax = new Ajax();\n\t\tGoogleMaps.ajax.get( 'http://'+window.location.host + '/studier/API-programmering/Uppgift-4-App/ShareYourVacation/public/api/flickr?lat='+self.location_lat+'&lng='+self.location_lng , parseFlickrImages);\n\n\t}", "function tohere(i) {\r\n // gmarkers[i].openInfoWindowHtml(to_htmls[i]);\r\n infowindow.setContent(to_htmls[i]);\r\n infowindow.open(map, gmarkers[i]);\r\n}", "function initMap() {\n var latLng = {\n lat: 20.6772885,\n lng: -103.3856328\n }\n var map = new google.maps.Map(document.getElementById('mapa'), {\n 'center': latLng,\n 'zoom': 14,\n 'mapTypeId':google.maps.MapTypeId.ROADMAP,\n /*\n 'draggable' : false,\n 'scrollwheel ':false\n */\n });\n\n var contenido = '<h2>GDLWEBCAMP</h2>'+\n '<p>Del 10 al 12 de Diciembre</p>'+\n '<p>Visitanos!</p>'\n\n var informacion = new google.maps.InfoWindow({\n content: contenido\n });\n\n var marker = new google.maps.Marker({\n position: latLng,\n map: map,\n title:'GDLWEBCAMP'\n });\n\n marker.addListener('click',function(){\n informacion.open(map, marker);\n });\n\n}", "function initEventMap() {\n var eventmap = $('#eventmap');\n var eventlocation = {lat: eventmap.data('latitude'), lng: eventmap.data('longitude')};\n var map = new google.maps.Map((document.getElementById('eventmap')), {\n zoom: 14,\n center: eventlocation\n });\n var marker = new google.maps.Marker({\n position: eventlocation,\n map: map\n });\n\n // Adds Info Window\n var eventMapInfo = $('#eventMapInfo');\n var contentTitle = eventMapInfo.data('title');\n var contentAddress = eventMapInfo.data('address');\n var contentOwner = eventMapInfo.data('owner');\n\n var infowindow = new google.maps.InfoWindow({\n content: contentTitle + '</br>' + contentAddress + '</br>' + contentOwner\n });\n\n marker.addListener('click', function() {\n infowindow.open(map, marker);\n });\n\n}", "function bindInfoWindow(newMark,map,infowindow){\n newMark.addListener('click', function() {\n infowindow.close();\n infowindow.open(map, newMark);\n })\n }", "function infoBox(map, marker, item) {\n var infoWindow = new google.maps.InfoWindow();\n // Attaching a click event to the current marker\n google.maps.event.addListener(marker, \"click\", function (e) {\n //map.setZoom(8),\n map.setCenter(marker.getPosition());\n infoWindow.setContent(this.html);\n infoWindow.open(map, marker);\n });\n\n\n\n\n }//fin funcion informacion de marcador", "function info_marker(marker, infowindow){\n var marker_position = {lat:marker.position.lat()+0.003, lng:marker.position.lng()};\n // console.log(marker_position);\n infowindow.setPosition(marker_position);\n infowindow.setContent(\"<div style='font-size:14px; margin-top:5px;'><b>\"+marker.title+'</b><br>'+'</div>'+'<br>'+'<div id=\"pano\"></div>'); \n infowindow.open(map); \n}", "function createInfoWindow(KMLEvent_latLng, infoData) {\r\n CommonInfoWindow.close();\r\n //$(\"#map-loader\").hide();\r\n\r\n var content = \"<div class='content infoDiv'>\";\r\n if (infoData.establishments.length > 1) {\r\n content += \"<div class='row infoRow'><div class='col-md-12'><span class='infoImportant'>\" + infoData.address + \"</span></div></div>\";\r\n content += \"<div class='row infoRow infoHeader'><div class='col-md-12'>\" + infoData.establishments.length + \" establishments at this address</div></div>\";\r\n } else {\r\n content += \"<div class='row infoRow infoHeader'><div class='col-md-12'><span class='infoImportant'>\" + infoData.address + \"</span></div></div>\";\r\n \r\n }\r\n for (var i = 0; i < infoData.establishments.length; i++) {\r\n content += \"<div class='row infoRow'><div class='col-md-12'><img src='\" + statusIcons[infoData.establishments[i].status].medium + \"'>&nbsp;&nbsp;<span class='infoImportant orgLink'><a href='#' data-id='\" + infoData.establishments[i].estId + \"'>\" + infoData.establishments[i].name + \"</a></span></div></div>\";\r\n }\r\n content += \"<div class='row infoRow'><div class='col-md-12'><a class='svLink' href='#' data-latlng='\" + KMLEvent_latLng + \"'><img src='\" + STREET_VIEW_ICON + \"' alt='StreetView'></a></div></div>\";\r\n \r\n //} \r\n content += \"</div>\"; \r\n CommonInfoWindow.setOptions({ \"position\": KMLEvent_latLng,\r\n \"pixelOffset\": 0, //KMLEvent.pixelOffset,\r\n \"content\": content}); //KMLEvent.featureData.infoWindowHtml.replace(/ target=\"_blank\"/ig, \"\") });\r\n CommonInfoWindow.open(gblMap);\r\n}", "function dataInfoWindow(marker, infowindow) {\r\n var content = marker.sres;\r\n\r\n if (infowindow.marker !== undefined && infowindow.marker !== marker) {\r\n infowindow.marker.setAnimation(null);\r\n }\r\n\r\n infowindow.marker = marker;\r\n\r\n infowindow.marker.setAnimation(google.maps.Animation.BOUNCE);\r\n\r\n infowindow.setContent(content);\r\n\r\n infowindow.open(map, marker);\r\n\r\n infowindow.addListener('closeclick', function() {\r\n infowindow.marker.setAnimation(null);\r\n });\r\n}", "function drawEvents(thisEvent, infoWindow, map) {\n //Setting up the proper latLng object notation so it can be read by Google Maps\n let coords = {\n 'lat': Number(thisEvent.lat),\n 'lng': Number(thisEvent.lon)\n };\n //Creates a marker and assigns some info to it\n let marker = new google.maps.Marker({\n position: coords,\n title: thisEvent.name,\n //Uses placeholder event icon\n icon: \"/images/icons/event.png\"\n });\n //The line that actually attaches a marker to the map\n marker.setMap(map);\n //This connects the info window to the marker, allowing information, links, any HTML really to be displayed\n google.maps.event.addListener(marker, 'click', function() {\n infoWindow.setContent(\"<h4>\" + thisEvent.name + \"</h4>\" +\n \"<a href='event/\" + thisEvent.id + \"'>More Info</a>\");\n infoWindow.open(map, marker);\n });\n}", "initMap() {\n // creates InfoWindow to open\n let infowindow = new window.google.maps.InfoWindow();\n let bounds = new window.google.maps.LatLngBounds();\n\n const map = new window.google.maps.Map(document.getElementById('map'), {\n center: {lat: 44.388861, lng: -68.798958},\n zoom: 15\n\n });\n const gblMarkers = [];\n\n // display venues \n this.state.venues.forEach(locVenue => {\n // display venue name in window\n let venueName = `${locVenue.venue.name}`;\n \n // displays markers with Animation\n let marker = new window.google.maps.Marker({\n position: {lat: locVenue.venue.location.lat, lng: locVenue.venue.location.lng},\n map: map,\n\n animation: window.google.maps.Animation.BOUNCE,\n animation: window.google.maps.Animation.DROP,\n title: locVenue.venue.name,\n address: locVenue.venue.location.address,\n id: locVenue.venue.id,\n\n });\n\n // click on marker to display infowindow\n //old-marker.addListener('click', function(event) {\n //old-console.log('click event?', event);\n // change the content\n //0ld-infowindow.setContent(venueName);\n let info_Window = '<div class=\"info_window\">' +\n '<h6>' + locVenue.venue.name + '</h6>' +\n //infowindow.setContent(venueName);\n '<p>' + locVenue.venue.location.formattedAddress[0] + '</p>' +\n '<p>' + locVenue.venue.location.formattedAddress[1] + '</p>' +\n '</div>'\n marker.addListener('click', function(event) {\n console.log('click event?', event);\n if (marker.getAnimation() !== null) { marker.setAnimation(null); }\n else { marker.setAnimation(window.google.maps.Animation.BOUNCE); }\n setTimeout(() => { marker.setAnimation(null) }, 1000);\n });\n window.google.maps.event.addListener(marker, 'click', () => {\n infowindow.setContent(info_Window);\n map.setZoom(16);\n map.setCenter(marker.position);\n infowindow.open(this.map, marker);\n //map.panBy(0, -125);\n });\n \n gblMarkers.push(marker);\n // info_windows.push({ id: venue.id, name: venue.name, contents: infowindow});\n \n //old-infowindow.open(map, marker);\n });\n // Extend boundry on map for each marker\n //bounds.extend(marker.position);\n //old-gblMarkers.push(marker);\n //old-})\n // makes map fit to boundry\n //map.fitBounds(bounds);\n this.setState({ gblMarkers });\n }", "function fnAttainClosureInformationWindow(marker, ajLocations) {\n //Attaching click event to the current marker\n google.maps.event.addListener(marker, \"click\", function(event) {\n infoWindow.setContent(ajLocations.address);\n infoWindow.open(map, marker);\n });\n }", "function populateInfoWindow(marker, infowindow) {\n\n if (infowindow.marker != marker) {\n\n infowindow.marker = marker;\n\n infowindow.setContent(\n '<div id=\"infowindow\">' +\n '<h1>' + marker.title + '</h1>' +\n '<div id=\"infowindow-details\" class=\"container\"></div>'\n );\n\n //Obtem detalhes das locations\n var service = new google.maps.places.PlacesService(map);\n\n service.getDetails({placeId: marker.id}, function(place, status) {\n\n if (status === 'OK') {\n\n infowindow.marker = marker;\n\n var innerHTML = '<div>';\n\n if (place.formatted_address) {\n innerHTML += place.formatted_address;\n };\n\n if (place.opening_hours) {\n innerHTML += '<br><br><h2>Horários:</h2>' +\n place.opening_hours.weekday_text[0] + '<br>' +\n place.opening_hours.weekday_text[1] + '<br>' +\n place.opening_hours.weekday_text[2] + '<br>' +\n place.opening_hours.weekday_text[3] + '<br>' +\n place.opening_hours.weekday_text[4] + '<br>' +\n place.opening_hours.weekday_text[5] + '<br>' +\n place.opening_hours.weekday_text[6];\n };\n\n if (place.photos) {\n innerHTML += '<br><br>';\n innerHTML += '<img class=\"img-responsive\" alt=\"foto do parque\" src=\"' +\n place.photos[0].getUrl({maxHeight: 100, maxWidth: 120}) + '\">';\n innerHTML += '<img class=\"img-responsive\" alt=\"foto do parque\" src=\"' +\n place.photos[1].getUrl({maxHeight: 100, maxWidth: 120}) + '\">';\n };\n\n innerHTML += '</div></div>';\n\n infowindow.setContent(infowindow.content + innerHTML);\n\n } else {\n\n infowindow.setContent(infowindow.content + '<p>Não foi possível obter ' +\n 'maiores detalhes no Google. Atualize a página para tentar novamente' +\n '</p></div>');\n };\n });\n\n infowindow.open(map, marker);\n\n infowindow.addListener('closeclick', function() {\n resetMarkersIcons();\n showMarkers();\n\n infowindow.marker = null;\n });\n\n activeInfowindow = infowindow;\n\n };\n}", "function addMarker(location, message) {\n marker = new google.maps.Marker({\n position: location,\n map: mymap,\n animation: google.maps.Animation.DROP\n });\n\naddInfoWindow(marker, message)\n}", "function addMarker(foundedStreams,stream,map,infowindow,vm){\n var contentString = '<div>'+\n '<h1>' + foundedStreams[stream].name +'</h1> <div >'+\n '<p>'+ foundedStreams[stream].description + '</p>'+\n '<p><i><b>(Last update: ' + foundedStreams[stream].last_update_timestamp +')</b></i> </p>' +\n '<button class=\"fab\" onclick=\"selectOnInfoWindow(' + foundedStreams[stream].id +')\"><img class=\"imgInfo\" src=\"/static/img/icons/ic_mode_edit_white_24dp.png\" /></button>' +\n '</div>'; \n \n var lat = foundedStreams[stream].measurements[0].gps_latitude\n var lng = foundedStreams[stream].measurements[0].gps_longitude\n //var position = checkMarker(lat,lng)\n \n var position = checkMarker(lat,lng)\n \n\n var marker = new google.maps.Marker({\n map: map,\n position: position,\n title: foundedStreams[stream].name\n });\n\n\n markersArray.push({\n id: foundedStreams[stream].id,\n marker: marker \n });\n \n bindInfoWindow(marker, map, infowindow,contentString);\n}", "function drawMarker(map, location) {\n var marker = new google.maps.Marker({\n position: {lat : location['latitude'], lng : location['longitude']},\n map: map,\n title: location['name'],\n animation: google.maps.Animation.DROP\n });\n var contentString = '<div id=\"' + location['name'] + '\">'+\n '<div id=\"siteNotice\">'+\n '</div>'+\n '<h3 id=\"firstHeading\" class=\"firstHeading\">' + location['name'] + '</h3>'+\n '<div id=\"bodyContent\">'+\n '<p>' + location['description'] + '</p>'+\n '<img src=\"' + location['image'] + '\" alt=\"' + location['name'] +'\" style=\"width:50;height:50;\">' +\n '</div>'+\n '</div>';\n try{\n var infowindow = new google.maps.InfoWindow({\n content: contentString\n });\n marker.addListener('click', function() {\n infowindow.open(map, marker);\n });\n }\n catch(err){\n var e = marker._eventListeners[0];\n marker.removeEventListener(e.event, e.callback);\n contentString = '<div id=\"' + location['name'] + '\">'+\n '<div id=\"siteNotice\">'+\n '</div>'+\n '<h3 id=\"firstHeading\" class=\"firstHeading\">' + location['name'] + '</h3>'+\n '<div id=\"bodyContent\">'+\n '<p>' + location['description'] + '</p>'+\n '</div>'+\n '</div>';\n var infowindow = new google.maps.InfoWindow({\n content: contentString\n });\n marker.addListener('click', function() {\n infowindow.open(map, marker);\n });\n }\n //return marker;\n}", "populateInfoWindow(marker, infowindow) {\n if (infowindow.marker != marker) {\n this.map.panTo(new window.google.maps.LatLng(marker.position.lat(), marker.position.lng()));\n marker.setAnimation(window.google.maps.Animation.BOUNCE);\n infowindow.marker = marker;\n setTimeout(function () {\n marker.setAnimation(null);\n }, 2000);\n infowindow.setContent('<div>Loading..</div>');\n infowindow.open(this.map, marker);\n infowindow.addListener('closeclick', function () {\n infowindow.marker = null;\n });\n }\n\n //Using Fetch to get data about the location\n FoursquareApi.requestFoursqureApi(marker.position.lat(), marker.position.lng()).then((response) => {\n console.log(response);\n if (response.response.venues.length > 0) {\n var venue = response.response.venues[0];\n var restName = \"\";\n var restPhone = \"\";\n var restAddress = \"\";\n if (venue.name) {\n restName = venue.name;\n }\n if (venue.location && venue.location.formattedAddress && venue.location.formattedAddress.length > 0) {\n restAddress = venue.location.formattedAddress[0];\n }\n if (venue.contact && venue.contact.phone) {\n restPhone = venue.contact.phone;\n }\n infowindow.setContent('<div><div><strong>Name: ' + restName + '</strong></div><div>Address: ' + restAddress + '</div><div>Phone: ' + restPhone + ' </div></div>');\n }\n\n }).catch(function (err) {\n infowindow.setContent('<div><strong>Can Not Load Data</strong></div>');\n });;\n }", "function setEventListner() {\n google.maps.event.addListener(marker, 'click', (function(marker, content, infowindow) {\n return function() {\n if (prevInfoWindow) {\n prevInfoWindow.close();\n }\n prevInfoWindow = infowindow;\n infowindow.open(map, marker);\n };\n })(marker, content, infowindow));\n }", "function populateInfoWindow(marker, infowindow) {\n // Check to make sure the infowindow is not already opened on this marker.\n if (infowindow.marker != marker) {\n infowindow.marker = marker;\n infowindow.marker.setAnimation(google.maps.Animation.BOUNCE);\n infowindow.setContent( '<h2>' + marker.text + '</h2>' + '<div>' + marker.title + '</div>');\n infowindow.open(map, marker);\n // Make sure the marker property is cleared if the infowindow is closed.\n infowindow.addListener('closeclick', function() {\n infowindow.marker = null;\n });\n }\n}", "function attachInfo(marker, event) {\n\t\tvar info = new google.maps.InfoWindow(\n\t\t\t{\n\t\t\t\tcontent: formatInfo(event),\n\t\t\t\tsize: new google.maps.Size(75, 50)\n\t\t\t});\n\t\tgoogle.maps.event.addListener(marker, 'click', function() {\n\t\t\topenInfo(event.id);\n\t\t});\n\t\teventMarkerMap[event.id] = {'info': info, 'marker': marker, 'event': event};\n\t}", "function populateInfoWindow(marker, infowindow) {\n\t\t\t// Check to make sure the infowindow is not already opened on this marker.\n\t\t\t\tif (infowindow.marker != marker) {\n\t\t\t\t\t\tinfowindow.marker = marker;\n\t\t\t\t\t\t// Wiki(marker.location);\n\t\t\t\t\t\tmarker.setAnimation(google.maps.Animation.BOUNCE);\n\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\tmarker.setAnimation(null);\n\t\t\t\t\t\t}, 1000);\n\t\t\t\t\t\t// Wiki(marker.location);\n\t\t\t\t\t\t\n\t\t\t\t\t\tinfowindow.setContent(wikicontent + '<hr>' + '<div>' + marker.title + '</div>');\n\t\t\t\t\t\tconsole.log('information window : '+ wikicontent);\n\t\t\t\t\t\tinfowindow.open(map, marker);\n\t\t\t\t\t\t// Make sure the marker property is cleared if the infowindow is closed.\n\t\t\t\t\t\tinfowindow.addListener('closeclick', function() {\n\t\t\t\t\t\t\t\tinfowindow.marker = null;\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t}", "function infoMarkers(marker){\r\n\t\t\tvar infowindow = new google.maps.InfoWindow({\r\n\t\t\t content: marker.title,\r\n\t\t\t});\r\n\t\t\t \r\n\t\t\tmarker.addListener('click', function(){\r\n\t\t\t infowindow.open(marker.get('map'),marker);\r\n\t\t\t});\r\n\r\n\t\t}", "function populateInfoWindow(marker, infowindow) {\n if (infowindow.marker != marker) {\n infowindow.marker = marker;\n infowindow.setContent('<div>'+ marker.title +'</div>' +\n '<div>Address: '+ marker.listElement.address +'</div>' +\n '<div> <i class=\"fa fa-foursquare\" aria-hidden=\"true\"></i> Check-Ins: '+ marker.listElement.checkins +'</div>');\n infowindow.open(map, marker);\n infowindow.addListener('closeclick', function() {\n infowindow.marker = null;\n });\n }\n}", "function initializeVer(){\n\tvar mapProp = {center:myCenterVer, zoom:14, mapTypeId:google.maps.MapTypeId.ROADMAP};\n\n\tmapVer = new google.maps.Map(document.getElementById(\"googleMapVer\"),mapProp);\n\n\tgoogle.maps.event.addListener(mapVer, 'click', function(event){ placeMarkerVer(event.latLng); });\n\n\tvar marcador;\n\tvar infowindows = [];\n\tvar markerActu = [];\n\tfor(var i = 0; i < (PuntosLimpios.length); i++){\n\t\tconsole.log(PuntosLimpios[i]+\" \"+PuntosLimpios[i+1]);\n\t\tmarcador = new google.maps.Marker({position: {lat: parseFloat(PuntosLimpios[i]), lng: parseFloat(PuntosLimpios[i+1])}, map: mapVer,});\n\t\tinfowindow = new google.maps.InfoWindow({content:PuntosLimpios[i+2]});\n\t\tmarkerActu.push(marcador);\n\t\tinfowindows.push(infowindow);\n\t\tgoogle.maps.event.addListener(markerActu[parseInt(i/6)], 'click', function(k){\n\t\t\treturn function(){\n\t\t\t\tfor (var j = 0; j < infowindows.length; j++) {\n\t\t\t\t\tinfowindows[j].close();\n\t\t\t\t\tmarkerActu[j].setAnimation(null);\n\t\t\t\t}\n\t\t\t\tmarkerActu[k].setAnimation(google.maps.Animation.BOUNCE);\n\t\t\t\tinfowindows[k].open(mapVer, markerActu[k]);\n\n\t\t\t\tvar latitud = markerActu[k].getPosition().lat();\n\t\t\t\tvar longitud = markerActu[k].getPosition().lng();\n\t\t\t\tdocument.getElementById('coorX').value = latitud;\n\t\t\t\tdocument.getElementById(\"coordX\").innerHTML = latitud;\n\t\t\t\tdocument.getElementById('coorY').value = longitud;\n\t\t\t\tdocument.getElementById(\"coordY\").innerHTML = longitud;\n\n\t\t\t\tvar direccion = \"http://maps.googleapis.com/maps/api/geocode/json?latlng=\"+latitud+\",\"+longitud+\"&sensor=true\";\n\t\t\t\tconsole.log(direccion);\n\t\t\t\t$.getJSON(direccion, function(result){\n\t\t\t\t\tvar address = result.results[0].formatted_address;\n\t\t\t\t\tdocument.getElementById(\"dir\").innerHTML = address;\n\t\t\t\t\tdocument.getElementById(\"direccion\").value = address;\n\t\t\t\t});\n\t\t\t\tvar infoI = k*7 + 2;\n\t\t\t\tdocument.getElementById(\"nombreJunta\").innerHTML = PuntosLimpios[infoI];\n\t\t\t\tdocument.getElementById(\"nombre\").innerHTML = PuntosLimpios[infoI+2];\n\t\t\t\tdocument.getElementById(\"telefono\").innerHTML = PuntosLimpios[infoI+3];\n\t\t\t\tdocument.getElementById(\"email\").innerHTML = PuntosLimpios[infoI+4];\n\t\t\t\tdocument.getElementById(\"fecha\").innerHTML = PuntosLimpios[infoI+1];\n\t\t\t\t$('#collapseVerInfo').collapse(\"show\");\n\t\t\t}\n\t\t}(parseInt(i/7)));\n\t\ti += 6;\n\t}\n\n\tvar marcadorExistente;\n\tinfowindowsExistente = [];\n\tmarkerActuExistente = [];\n\tfor(var i = 0; i < (PuntosLimpiosExistente.length); i++){\n\t\tconsole.log(PuntosLimpiosExistente[i]+\" \"+PuntosLimpiosExistente[i+1]);\n\t\tmarcadorExistente = new google.maps.Marker({position: {lat: parseFloat(PuntosLimpiosExistente[i]), lng: parseFloat(PuntosLimpiosExistente[i+1])}, map: mapVer,icon:\"resources/pinkball.png\",});\t\t\n\t\tinfowindowExistente = new google.maps.InfoWindow({content:PuntosLimpiosExistente[i+2]});\n\t\tmarcadorExistente.setVisible(false);\n\t\tmarkerActuExistente.push(marcadorExistente);\n\t\tinfowindowsExistente.push(infowindowExistente);\n\t\tgoogle.maps.event.addListener(markerActuExistente[parseInt(i/3)], 'click', function(k){\n\t\t\treturn function(){\n\t\t\t\tfor (var j = 0; j < infowindowsExistente.length; j++) {\n\t\t\t\t\tinfowindowsExistente[j].close();\n\t\t\t\t}\n\t\t\t\tinfowindowsExistente[k].open(mapVer, markerActuExistente[k]);\n\t\t\t}\n\t\t}(parseInt(i/3)));\n\t\ti += 2;\n\t}\n}", "function displayEventInfo(e) {\n if (e.targetType == \"map\") {\n var point = new Microsoft.Maps.Point(e.getX(), e.getY());\n var loc = e.target.tryPixelToLocation(point);\n document.getElementById(\"textBox\").value = loc.latitude + \", \" + loc.longitude;\n\n }\n }", "function callMoroccoMap() {\n var map = new google.maps.Map(document.getElementById(\"map-four\"), {\n zoom: 5,\n center: {\n lat: 31.794525,\n lng: -7.0849336\n }\n });\n\n var locations = [\n [{\n lat: 31.0466925,\n lng: -7.1342039\n }, \"Aït Benhaddou\"],\n [{\n lat: 35.7633932,\n lng: -5.9045097\n }, \"Tangier\"],\n [{\n lat: 31.1458509,\n lng: -3.9765326\n }, \"Erg Chebbi\"],\n [{\n lat: 31.6347485,\n lng: -8.0778931\n }, \"Marrakesh\"],\n [{\n lat: 31.5109789,\n lng: -9.7800517\n }, \"Essaouira\"],\n ];\n var infoWindow = new google.maps.InfoWindow();\n locations.forEach(([position, title]) => {\n const marker = new google.maps.Marker({\n position,\n map,\n title: `${title}`,\n optimized: false,\n });\n\n marker.addListener(\"click\", () => {\n infoWindow.close();\n infoWindow.setContent(marker.getTitle());\n infoWindow.open(marker.getMap(), marker);\n });\n });\n}", "function populateInfoWindow(marker, infowindow) {\n if (infowindow.marker != marker) {\n infowindow.marker = marker;\n // Img src based on lat lng of location (street view)\n infowindow.setContent('<img src=\"' + 'https://maps.googleapis.com/maps/api/streetview?size=180x130&location=' + marker.positionLat + ',' + marker.positionLng + '&fov=90&heading=235&pitch=10' + '\" alt=\"Street View\">' + '<div>' + '<strong>' + marker.title + '</strong>' + '</div>' + '<div>' + marker.positionLat + ', ' + marker.positionLng + '</div>' + '<div class=\"locAdress\">' + self.fullAddress() + '</div>');\n infowindow.open(map, marker);\n // Make sure the marker property is cleared if the infowindow is closed\n infowindow.addListener('closeclick', function() {\n infowindow.marker = null;\n marker.setIcon(null);\n map.setZoom(15);\n });\n }\n }", "function populateInfoWindow(marker, infowindow) {\n // Check to make sure the infowindow is not already opened on this marker.\n if (infowindow.marker != marker) {\n infowindow.marker = marker;\n infowindow.setContent('<div class=\"venue-name\">' + marker.title + '</div>');\n infowindow.open(map, marker);\n // Make sure the marker property is cleared if the infowindow is closed.\n infowindow.addListener('closeclick', function () {\n infowindow.marker = null;\n });\n }\n}", "function showOnMap(e) {\n populateModal(e, e.getAttribute(\"flag\")) \n let locationString = e.getAttribute(\"location\")\n let latlng = parseLocation(locationString)\n map.setCenter(latlng)\n for (let i = 0; i < show.length; i++) {\n if (show[i] == 1) {\n gmarkers[i].setMap(null)\n }\n }\n let newMarker = new google.maps.Marker({\n position: latlng,\n map: map,\n title: e.getAttribute(\"brief\")\n });\n\n if (lastBounce != null) {\n lastBounce.setMap(null) \n } \n lastBounce = newMarker\n lastBounce.setAnimation(google.maps.Animation.BOUNCE)\n}", "function makeInfoWindowEvent( contentString, marker ) {\n\t\t\t\t\n\t\t\t\tgoogle.maps.event.addListener( marker, 'click', function() {\n\t\t\t\t\n\t\t\t\tinfowindow.setContent( contentString );\n\t\t\t\t\n\t\t\t\tinfowindow.open( map, marker );\n\t\t\t \n\t\t\t });\n\t\t\t\n\t\t\t}", "function populateInfoWindow(infowindow, location) {\n if (infowindow.marker != location.marker) {\n if (infowindow.marker != undefined) {\n infowindow.marker.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png');\n }\n\n infowindow.marker = location.marker;\n location.marker.setIcon('http://maps.google.com/mapfiles/ms/icons/green-dot.png');\n infowindow.setContent('<img style=\"border-radius: 100%; float: right\" src=\"' + location.img + '\">' + '<div><h1>' + location.marker.title + '</h1></div>' +\n '<div style=\"text-transform: capitalize\">' + location.weather + '</div>' + '<div>' + location.temp.toFixed(2) + '&degC</div>' +\n '<div>' + location.description + '</div>');\n infowindow.open(map, location.marker);\n infowindow.addListener('click', function() {\n location.marker.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png');\n infowindow.setMarker(null);\n });\n } else {\n infowindow.marker = null;\n location.marker.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png');\n infowindow.close();\n }\n}", "function populateInfoWindow(marker, infowindow) {\n // Check to make sure the infowindow is not already opened on this marker.\n if (infowindow.marker != marker) {\n infowindow.marker = marker;\n infowindow.setContent('<div>' + marker.title + '</div>');\n infowindow.open(map, marker);\n \n // Make sure the marker property is cleared if the infowindow is closed.\n infowindow.addListener('closeclick', function() {\n infowindow.marker = null;\n });\n }\n}", "function verPosiciondDeAlerta(dominio, latitud, longitud, tipoAlerta, fecha, velocidad, descripcion) {\n\n var geocoder = new google.maps.Geocoder();\n var posicion = new google.maps.LatLng(latitud, longitud);\n var direccion = \"\";\n\n var icono = {\n url: \"images/alerta-rojo.gif\"\n };\n\n geocoder.geocode({latLng: posicion}, function (results, status) {\n\n if (status == google.maps.GeocoderStatus.OK) {\n direccion = results[0].formatted_address;\n } else {\n direccion = \"Direccion no disponible\";\n }\n\n var marcador = new MarkerWithLabel({\n position: posicion,\n map: map\n });\n\n todosLosMarcadores.push(marcador); //Guarda cada marcador que se agrega para poder ser borrado\n\n });\n\n //var datosArr = datos[i];\n $(\"#carData, #alertData\").slideUp(function () {\n $(\"#alertData .dominio\").text(dominio);\n $(\"#alertData .tipo\").text(tipoAlerta);\n $(\"#alertData .fecha\").text(fecha);\n $(\"#alertData .velocidad\").text(velocidad);\n $(\"#alertData .descripcion\").text(descripcion);\n $(\"#alertData .direccion\").text(direccion);\n });\n $(\"#alertData\").slideDown();\n\n setAllMap(null); //Oculta cualquier otra posicion que este cerca\n\n map.setZoom(14);\n map.setCenter(posicion);\n\n}", "function populateInfoWindow(marker, restaurant) {\n// Check to make sure the infowindow is not already opened on this marker.\n\tif (restaurant.infowindow.marker != marker) {\n\t\trestaurant.infowindow.marker = marker;\n\t\trestaurant.infowindow.setContent('<div>' + marker.title + '</div>' + '<div>' + restaurant.address + '</div>' + \n\t\t\t'<div style=\"margin-top:5px\">' + '<a class=\"btn btn-primary\" href=\"' + restaurant.link + '\" role=\"button\">Reserve </a>' + '</div>');\n\t\trestaurant.infowindow.open(map, marker);\n\t\t// Clear marker property and revert the marker when closed\n\t\trestaurant.infowindow.addListener('closeclick',function() {\n revertMarker(marker, restaurant.infowindow);\n });\n google.maps.event.addListener(map, \"click\", function(event) {\n revertMarker(marker, restaurant.infowindow);\n\t\t});\n\t}\n}", "function addInfoWindow(map, marker, infowindow) {\n\tmarker.addListener('click', function() {\n\t\tinfowindow.setContent('<div id=\"stationinfo_' + marker.get('station_id') + '\">Loading station info for station ' + marker.get('station_id') + '...</div>');\n\t\tinfowindow.open(map, marker);\n\t\tget_station(marker.get('station_id'));\n\t});\n}", "function hook_event_listener(marker, name, id, img, date, des) {\n \n marker.addListener('click', function() {\n open_url(name, id); // click to open url\n });\n\n \n marker.addListener('mouseout', function() {\n infowindow.close(map, marker);\n });\n marker.addListener('mouseover', function() {\n \n //html thumb image display string \n var contentString = '<div>'+\n '<img class=\"thumbnail popup-th-img\" src=\"'+img+'\" alt=\"'+name+'\">'+\n '<h3>'+name+'</h3>'+des+\n '</p>'+\n '</div>';\n\n //create new object infowindow\n infowindow = new google.maps.InfoWindow({\n content: contentString,\n maxWidth: 400\n });\n //invoke infowindow Object\n infowindow.open(map, marker);\n \n });\n} // End of hook_event_listener function", "function mapEvent (location) {\n // build the popup\n popup = \"\";\n if (location.club_name) {popup += '<h3>' + location.club_name + '</h3>';}\n if (location.date) {popup += '<p>' + location.date + '</p>';}\n if (location.phone) {popup += '<p>' + location.phone + '</p>';}\n if (location.website) {popup += '<p><a href=\"' + location.website + '\" target=\"_blank\">website</a></p>';}\n if (location.address) {popup += '<p>' + location.address + '</p>';}\n\n // add marker\n eventsMap.addMarker({\n lat: location.latitude,\n lng: location.longitude,\n infoWindow: {\n content: popup\n }\n });\n }", "function addDeliveriesMarkers(data){\n\n for (var i=0; i<data.length; i++){\n var infoW = new google.maps.InfoWindow({\n content: ` <div id=\"delivery_infos\"> ${data[i].name} <br> ${data[i].comment} </div>`\n });\n\n var marker_start = new google.maps.Marker(\n {\n position : {\n lat: data[i].start_position.lat,\n lng: data[i].start_position.lng\n }\n });\n\n marker_start.setMap(map);\n\n var marker_end = new google.maps.Marker(\n {\n position : {\n lat: data[i].end_position.lat ,\n lng: data[i].end_position.lng\n }\n });\n\n marker_start.addListener('click', function() {\n infoW.open(map, marker_start);\n marker_end.setMap(map);\n\n\n /*\n $('#delivery_infos').html(`<p> ${data[i].name} </p>\n <p> ${data[i].comment} </p> <p> TEST </p>\n `);\n $('#delivery_infos').html(\"efjfejfe\");\n */\n // $('#delivery_infos').toggle();\n });\n\n infoW.addListener('closeclick', function() {\n marker_end.setMap(null);\n });\n }\n }", "function mapMarkers(array) {\n $.each(array, function(index, value) {\n var latitude = value.eventLat,\n longitude = value.eventLon,\n geoLoc = new google.maps.LatLng(latitude, longitude),\n thisEvent = value.eventName;\n\n var infoContentString = '<div id=\"infowindow\">' +\n '<img src=\"' + value.eventImg + '\">' +\n '<h4 class = \"infoName\">' + value.eventName + '</h4>' +\n '<div class = \"clear\"></div>' +\n '<p class = \"infoAddress\">' + value.eventAddress + '</p>' +\n '<p>Group: ' + value.eventGroup + '</p>' +\n '<p><a href=\"' + value.eventLink + '\" target=\"_blank\">Click to view event details</a></p>' +\n '</div>';\n\n // Custormize marker\n var iconBase = 'img/meetup.png';\n var marker = new google.maps.Marker({\n position: geoLoc,\n title: thisEvent,\n map: map,\n icon: iconBase\n });\n\n self.mapMarkers.push({marker: marker, content: infoContentString});\n\n self.eventStatus(self.numEvents() + ' events found near ' + self.searchLocation());\n\n //generate infowindows for each event\n google.maps.event.addListener(marker, 'click', function() {\n self.searchStatus('');\n infowindow.setContent(infoContentString);\n map.setZoom(12);\n map.setCenter(marker.position);\n infowindow.open(map, marker);\n map.panBy(0, -150);\n });\n });\n }", "function showInfoWindow() { \n currentmarker = this;\n infoWindow.open(map, currentmarker);\n buildIWContent();\n\n}", "function bindInfoWindow(marker, map, infowindow, html, location) \n{\n marker.addListener('click', function() \n {\n \n infowindow.setContent(html);\n infowindow.open(map, this);\n queryMapDetail(location);\n });\n}", "function displayInfobox(e) {\n infowindow.setOptions({description: e.target.Description, visible: true, showPointer: false});\n infowindow.setLocation(e.target.getLocation());\n }", "function carregarPontos() {\r\n \r\n $.getJSON('pontos.json', function(pontos) { \r\n $.each(pontos, function(index, ponto) {\r\n var marker = new google.maps.Marker({\r\n\t\t position: new google.maps.LatLng(ponto.Latitude, ponto.Longitude),\r\n\t\t map: map,\r\n\t\t icon: 'marcador.png',\r\n id: 'marker1', \r\n });\r\n\r\n var contentString = \r\n '<div id=\"content\">dados da cordenada'+\r\n '<div id=\"siteNotice\">'+\r\n '</div>'+\r\n '<h1 id=\"firstHeading\" class=\"firstHeading\"><?php printr($teste); ?>latitude: ' + ponto.Latitude+ 'longitude:' +ponto.Longitude+ '</h1>'+ \r\n '</div>';\r\n\r\n var infowindow = new google.maps.InfoWindow({\r\n content: contentString\r\n });\r\n\r\n marker.addListener('click', function() {\r\n infowindow.open(map, marker);\r\n });\r\n\r\n \r\n });\r\n\r\n });\r\n\r\n}", "function showInfoWindow(overlay, event) {\n var inputwindow = new google.maps.InfoWindow();\n var inputContent =\n '<div class=\"row\">' +\n '<form class=\"\">' +\n '<div class=\"row\">' +\n '<div class=\"input-field\">' +\n '<input id=\"title-iw\" type=\"text\" class=\"validate\">' +\n '<label for=\"title-iw\">Title</label>' +\n '</div>' +\n '</div>' +\n '<div class=\"row\">' +\n '<div class=\"input-field\">' +\n '<textarea id=\"textarea-iw\" class=\"materialize-textarea\"></textarea>' +\n '<label for=\"textarea-iw\">Description</label>' +\n '<a href=\"#\" id=\"infowindow-btn\" class=\"btn right\">save</a>' +\n '</div>' +\n '</div>' +\n '</form></div>';\n\n var latLng = {\n lat: event.latLng.lat(),\n lng: event.latLng.lng()\n };\n\n inputwindow.setContent(inputContent);\n inputwindow.setPosition(latLng);\n inputwindow.open(map);\n $('#infowindow-btn').on('click', function() {\n\n var title = $('#title-iw').val();\n var description = $('#textarea-iw').val();\n var content = '<h5>' + title + '</h5><p>' + description + '</p>';\n\n if (inputwindow !== null) {\n google.maps.event.clearInstanceListeners(inputwindow); // just in case handlers continue to stick around\n inputwindow.close();\n inputwindow = null;\n\n }\n infoWindowArr.push({\n 'title': title,\n 'description': description,\n 'latLng': latLng\n });\n console.log(\"InfoWindow Array : \", infoWindowArr);\n var infowindow = new google.maps.InfoWindow({\n content: content,\n position: latLng\n });\n\n /*infowindow.setContent(content);\n infowindow.setPosition(latLng);*/\n var infoWindowListener;\n\n if (overlay.type) {\n\n infoWindowListener = overlay.overlay;\n\n\n } else if (overlay === 'rightclick') {\n console.log(\"rightclick\");\n infoWindowListener = new google.maps.Marker({\n position: latLng,\n map: map\n });\n console.log('marker');\n }\n\n infoWindowListener.addListener('click', function() {\n infowindow.open(map);\n });\n map.addListener('click', function() {\n infowindow.close();\n });\n });\n\n\n }", "function MarkerClickEvent(marker){\n\t//\tIf the infoBox is already open then close it\n\tif(infobox){\n\t\tinfobox.close();\n\t}\n\t//\tCreate a new instance of infowindow from Google\n\tinfobox = new google.maps.InfoWindow();\n\t//\tAdd a click event to the Marker which you are currently clicking onto\n\tgoogle.maps.event.addListener(marker, \"click\", function(){\n\t\t//\tSetting the content of the infoBox\n\t\tinfobox.setContent(\"<div><strong>\"+marker.title+\"</strong></div><hr>\"+\n\t\t\t\t\t\t\t\"<div>\"+marker.description+\"</div>\"\n\t\t\t);\n\t\t//\tOpen the infoBox on the Map at the position of the Marker\n\t\t//\tWhat .open needs is what Map you want it on and also what Marker you want it onto aswell\n\t\tinfobox.open(map, marker);\n\t\t//\tChange the current Marker to the one which you are clicking onto\n\t\tcurrentMarker = marker;\n\t\t//\tShowing the directions to the new Marker clicked using one of the transport modes that is selected\n\t\tshowDirection(currentMarker.position, TransportMode);\n\t});\n}", "function addClicker(marker, content) {\n google.maps.event.addListener(marker, 'click', function() {\n \n if (infowindow) {infowindow.close();}\n infowindow = new google.maps.InfoWindow({content: content});\n infowindow.open(map, marker);\n });\n }", "function processJSONP(data){\n\n\tif(data.total_items==0) {\t\t\t\t // Results count is null. So no data obtained\n \n\t\tdocument.getElementById('loadMessage').innerHTML = 'No events found in this area';\n \n setTimeout(function() {\n document.getElementById('loadMessage').innerHTML = \"\";\n }, 3000);\n \n } else {\t\t\n \n if (data.total_items > 100) {\n document.getElementById('numberWarning').innerHTML = \"More events available, only 100 events will be loaded to the map at once\";\n }\n \n while(markers[0]) {\n markers.pop().setMap(null);\n }\n \n for(var i = 0; i < data.total_items; i++) { \t\t\t\t\t\t\t\t\t\t\t\t// Iterate through list of events\n\n $thisevent = data.events.event[i]; // Get the current event\n \n \n var marker = new google.maps.Marker({\t\n position: new google.maps.LatLng($thisevent.latitude, $thisevent.longitude),\t\t // Get the latitude and longitude\n icon:\"images/events.png\",\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // Custom image icon\n\t\t\t\ttitle: $thisevent.title\t // Set title\n });\n \n markers.push(marker);\n \n var infowindow = new google.maps.InfoWindow();\t\t \n marker.setMap(map);\n \n \n var stopTime;\n \n // Don't show end time if it's null\n if ($thisevent.stop_time == null) {\n stopTime = \"\";\n } else {\n stopTime = \" - \" + $thisevent.stop_time;\n }\n \n marker.set('content', \"<div id='iwContent'><h1>\" + $thisevent.title + \"</h1>\" + \"<b>Date & time:</b> \" + $thisevent.start_time + \n stopTime + \"<br /><b>Venue:</b> <a href='\" + $thisevent.venue_url + \"' target='_blank'>\" + $thisevent.venue_name + \n \"</a></br><a href=\" + $thisevent.url + \" target='_blank'>More info</a></div>\");\n \n\n\t\t\t\tgoogle.maps.event.addListener(marker,'click',function() {\t // On click event listener\n var position = this.getPosition();\n \n var content = this.get('content');\n \n infowindow.setContent(content);\n infowindow.open(map,this);\t\t\t\t\t\t\t\t\t// Open infowindow associated with this marker\n infowindow.marker = marker;\n \n getWeather(position.lat(), position.lng(), infowindow);\n\t\t\t\t});\n\t\t\t\t\n document.getElementById('loadMessage').innerHTML = \"Events loaded\";\n \n setTimeout(function() {\n document.getElementById('loadMessage').innerHTML = \"\";\n }, 3000);\n\t\t \n\t }\n \n\t}\n \n}", "function addMarkerInfo() {\n\n for (var i = 0; i < markersOnMap.length; i++) {\n var contentString = '<div id=\"content\"><h1>' + markersOnMap[i].placeName +\n\n '</h1><p>' + markersOnMap[i].description + ' <a href=\"walks.html\">See our Walks page for further details</a>r</p></div>';\n\n const marker = new google.maps.Marker({\n position: markersOnMap[i].LatLng[0],\n map: map\n });\n\n const infowindow = new google.maps.InfoWindow({\n content: contentString,\n maxWidth: 200\n });\n\n marker.addListener('click', function () {\n closeOtherInfo();\n infowindow.open(marker.get('map'), marker);\n InforObj[0] = infowindow;\n });\n\n }\n}", "function LoadMap() {\n\n var mapOptions = {\n center: new google.maps.LatLng(infoApartments[0].lat, infoApartments[0].lng),\n zoom: 13,\n mapTypeId: google.maps.MapTypeId.ROADMAP\n }\n var map = new google.maps.Map(document.getElementById(\"dvMap\"), mapOptions)\n\n //Create and open InfoWindow.\n var infoWindow = new google.maps.InfoWindow()\n var myLatlng\n for ( i = 0; i < infoApartments.length; i++) {\n data = infoApartments[i]\n myLatLng = new google.maps.LatLng(data.lat, data.lng)\n marker = new google.maps.Marker({\n position: myLatLng,\n map: map,\n title: data.description\n }); // leave semi-colon here\n //Attach click event to the marker.\n \n /* when function inside (), means it is self-starting function - just runs without being called. \n () after closing }) shows functions' parameters (if any) */\n (function(marker, data) {\n google.maps.event.addListener(marker, \"click\", function(e) {\n //Wrap the content inside an HTML DIV in order to set height and width of InfoWindow.\n infoWindow.setContent(\"<div style = 'width:150px;min-height:35px'>\" + data.description + \"</div>\")\n infoWindow.open(map, marker)\n }) \n }\n )(marker, data) \n \n } // for looop\n}", "function locationMarkers(location) {\n\n for(i=0; i<location.length; i++) {\n location[i].holdMarker = new google.maps.Marker({\n position: new google.maps.LatLng(location[i].lat, location[i].lng),\n map: map,\n title: location[i].title,\n icon: {\n url: 'img/marker.png',\n size: new google.maps.Size(25, 40),\n origin: new google.maps.Point(0, 0),\n anchor: new google.maps.Point(12.5, 40)\n }\n });\n\nbounds.extend(location[i].holdMarker.position);\n\n\n//Binds infoWindow content to each marker\n\nlocation[i].contentString =location[i].title +\n location[i].title + '</strong><br><p>' +\n location[i].streetAddress + '<br>' +\n location[i].cityAddress + '<br></p><a class=\"web-links\" href=\"http://' + location[i].url +\n '\" target=\"_blank\">' + location[i].url + '</a>';\n\n//triggers infowindow upon click\n\n\nviewModel.showInfo = function(location){\n google.maps.event.trigger(location.holdMarker,'click');\n}\n\n\n//opens infowindow when link or marker is clicked\n location[i].holdMarker.addListener ( 'click', (function(marker, i) {\n return function() {\n infowindow.setContent(location[i].contentString);\n marker.setAnimation(google.maps.Animation.BOUNCE);\n infowindow.open(map,marker);\n map.setZoom(16);\n map.setCenter(location[i]);\n setTimeout(function () {\n infowindow.close();\n marker.setAnimation(google.maps.Animation.DROP);\n }, 1400);\n //***GET WIKIPEDIA INFO***\n getWikiInfo(marker.title);\n };\n })(location[i].holdMarker, i));\n\n }\n\n}", "addEventMarker(coord, text, iconKey, events, ourEventOptions) {\n let eventMarker = this.addMarker(coord, text, iconKey);\n eventMarker.ourEventOptions = ourEventOptions;\n eventMarker.on(\"click\", () => {\n events(eventMarker.ourEventOptions);\n });\n }", "function populateInfoWindow(marker, infowindow) {\n infowindow.addListener(\"closeclick\", function() {\n stopBounce(marker);\n }, {once: true});\n\n infowindow.close(map, marker);\n individualInfo(infowindow, marker.abbr);\n infowindow.open(map, marker);\n }", "function cervantesAnnotationSelected(event)\r\n{\r\n let coordinate = new mapkit.Coordinate(this.spatial.latitude, this.spatial.longitude);\r\n map.setCenterAnimated(coordinate, true);\r\n\r\n element(\"information\").style.visibility = \"visible\";\r\n\r\n element(\"venueTitle\").innerHTML = this.title;\r\n element(\"venueDescription\").innerHTML = this.description;\r\n}", "function setMarkers(map, location){\n for (var i = 0; i < restaurants.length; i++){\n var restaurant = restaurants[i];\n var myLatLng = new google.maps.LatLng(restaurant[1], restaurant[2]);\n\n var marker = new google.maps.Marker({\n map: map,\n animation: google.maps.Animation.DROP,\n position: myLatLng,\n icon: icon,\n url: restaurant[6]\n\n });\n\n var content = '<div>' + '<h5><a href=\\\"'+restaurant[6]+'\\\">'\n + restaurant[0]+ '</a></h5>'\n + '<div class=\"secondary round label small-centered rate_label\">'+ restaurant[5]\n + '</div>'+'<div class=\"info round label small-centered rate_label\">'+ restaurant[4] + '</div>' + '</div>';\n\n\n var infowindow = new google.maps.InfoWindow();\n google.maps.event.addListener(marker,'mousemove', (function(marker,content,infowindow){\n return function() {\n infowindow.setContent(content);\n infowindow.open(map,marker);\n };\n })(marker,content,infowindow));\n\n google.maps.event.addListener(marker, 'click', function() {\n window.location.href = this.url;\n });\n\n\n google.maps.event.addListener(marker,'mouseout', (function(marker,content,infowindow){\n return function() {\n infowindow.close();\n };\n })(marker,content,infowindow));\n\n }\n\n}", "function showInfoWindow(marker)\n {\n google.maps.event.trigger(markers[marker], 'click');\n }", "function insertSASMarker(map) {\n // SAS Location\n var SASLocation = new google.maps.LatLng(35.822830042, -78.757330304);\n var SASLocationMarker = new google.maps.Marker({\n position: SASLocation,\n icon: {\n url: \"http://maps.google.com/mapfiles/ms/icons/pink-dot.png\"\n }\n });\n\n SASLocationMarker.setMap(map);\n\n // This block of code is for the small info window\n var contentSAS =\n ' <h1 style=\"text-align: center;\">SAS INSTITUTE</h1>' +\n ' <img src=\"./assets/Images/sasInfoImg.jpg\" ' +\n ' style=\"float:left; width: 34%; border-radius: 30px 50px 0 50px; float: left; width: 34% !important;\">' +\n ' <p style = \"text-align: center;\"><b>SAS</b> is an American multinational developer ' +\n 'of analytics software based in Cary, North Carolina. SAS develops and markets a suite of analytics software, ' +\n 'which helps access, manage, analyze data<br>' +\n '<a href=\"https://en.wikipedia.org/wiki/SAS_Institute\"><button type=\"button\" class=\"common-btn-styling\">LEARN MORE!</button></a>' +\n ' </p>';\n\n\n var infoSAS = new google.maps.InfoWindow({\n content: contentSAS\n });\n\n\n\n\n var SASLocationInfo = new google.maps.InfoWindow({\n content: \"SAS\"\n });\n\n google.maps.event.addListener(SASLocationMarker, 'click', function () {\n SASLocationInfo,\n infoSAS.open(map, SASLocationMarker);\n });\n\n}", "function populateInfoWindow(marker, infowindow) {\n // Check to make sure the infowindow is not already opened on this marker.\n if (infowindow.marker != marker) {\n infowindow.marker = marker;\n map.panTo(marker.position);\n toggleBounce(marker);\n getFlickrImage(marker.title);\n }\n}", "function mapOnClick(e) {\n var coords = e.latLng;\n \n geocoder.geocode({'location': coords}, function(results, status) {\n if (status === 'OK') {\n if (program.addAllInfo(results[0])) { setMarkerPosition(coords); }\n } else {\n program.showMessage(\"\", \"Óþekkt villa. Ekki tókst að sækja staðsetninguna\");\n }\n });\n }", "function insertOracleMarker(map) {\n // Oracle Location\n var OracleLocation = new google.maps.LatLng(37.4852, -122.2364);\n var OracleLocationMarker = new google.maps.Marker({\n position: OracleLocation,\n icon: {\n url: \"http://maps.google.com/mapfiles/ms/icons/yellow-dot.png\",\n scaledSize: new google.maps.Size(20, 20)\n }\n });\n\n OracleLocationMarker.setMap(map);\n\n // This block of code is for the small info window\n var contentOracle =\n ' <h1 style=\"text-align: center;\">ORACLE CORPORATION</h1>' +\n ' <img src=\"./assets/Images/oracleInfoImg.jpg\" ' +\n ' style=\"float:left; width: 34%; border-radius: 30px 50px 0 50px; float: left; width: 34% !important;\">' +\n ' <p style = \"text-align: center;\"><b>ORACLE</b> is an American multinational computer technology corporation ' +\n 'headquartered in Redwood Shores, California. The company sells database software and technology, ' +\n 'cloud engineered systems, and enterprise software products.<br>' +\n '<a href=\"https://en.wikipedia.org/wiki/Oracle_Corporation\"><button type=\"button\" class=\"common-btn-styling\">LEARN MORE!</button></a>' +\n ' </p>';\n\n\n var infoOracle = new google.maps.InfoWindow({\n content: contentOracle\n });\n\n\n var OracleLocationInfo = new google.maps.InfoWindow({\n content: \"ORACLE\"\n });\n\n google.maps.event.addListener(OracleLocationMarker, 'click', function () {\n OracleLocationInfo,\n infoOracle.open(map, OracleLocationMarker);\n });\n\n}", "function populateInfoWindow(marker, infowindow) {\n // Check to make sure the infowindow is not already opened on this marker.\n if (infowindow.marker != marker) {\n infowindow.marker = marker;\n infowindow.setContent('<div>' + marker.title + '</div>');\n infowindow.open(map, marker);\n // Make sure the marker property is cleared if the infowindow is closed.\n infowindow.addListener('closeclick', function() {\n infowindow.marker = null;\n });\n }\n }", "function getgeoinfoFoss (event){\n\t\t //console.log(\"getgeoinfoUSGS\");\n\t\t// console.log(event.graphic.attributes);\n\t\t var attr = event.graphic.attributes;\n\t\t var lon=event.mapPoint.x;\n\t\t var lat=event.mapPoint.y;\t\t\n\t\t map.infoWindow.setTitle(\"Fossil Information \");\n\t\t map.infoWindow.setContent( \"<b>Formation:</b>\"+attr.Formation+\"<br/><b>Collection Name:</b>\"+attr.nam+\"<br/><b>Early interval:</b>\"+attr.oei);\n\n\t\t map.infoWindow.show(event.mapPoint, map.getInfoWindowAnchor(event.screenPoint));\n }", "function populateInfoWindow(marker, infowindow) {\n if (infowindow.marker != marker) {\n infowindow.marker = marker;\n infoWindow.setContent(marker.content);\n infowindow.addListener('closeclick', function() {\n infowindow.marker = null;\n });\n }\n //Bugfix: Moved out of if condition\n //Issue: After closing infowindow manually, it does not open until\n //another marker is clicked and its infowindow opens.\n infowindow.open(map, marker);\n }", "function viewInfoWindow(marker, infowindow) {\n if(infowindow.marker != marker) {\n infowindow.marker = marker;\n getPlaces(marker, infowindow);\n }\n }", "function showEventsOnMap(id) {\n if(!DataStorage[id]) return;\n var len = DataStorage[id].events.length,\n content = \"\",\n marker,\n evt;\n for(var i = 0; i < len; i++) {\n evt = DataStorage[id].events[i];\n if (evt.x === 0 && evt.y === 0) {\n DataStorage[id].eventsMarkers.push(null);\n continue;\n }\n\n content = messagesUtils.getMessageText(DataStorage[id].events[i]);\n content = '<div ><div class=\"text\">'+content+'</div><div class=\"tick\"></div></div>';\n\n marker = L.marker(L.latLng(evt.y, evt.x), {icon: DataStorage[id].eventIcon}).bindPopup(content, {\n className: \"infoBox\",\n maxWidth: 315,\n minWidth: 315,\n offset: L.point(-170, 20)\n });\n\n DataStorage[id].eventsMarkers.push(marker);\n eventsLayer.addLayer(marker);\n }\n}", "function inicializarMapa() {\n // The location of Córdoba\n var casaCentral = { lat: -31.4662446, lng: -64.3983766 } //casa central en Córdoba\n // The map, centered at localizacion\n var map =new google.maps.Map(document.getElementById('maps'),{zoom: 4, center: casaCentral});\n\n localizaciones.forEach(localizacion => {\n //cargo los marcadores\n var marker = new google.maps.Marker({\n position: localizacion.position, \n map: map\n }); \n //cuando hace click se abre la ventanita infowindows con el nombre \n var infowindow = new google.maps.InfoWindow({\n content: localizacion.content\n });\n \n marker.addListener('click', function() {\n infowindow.open(map, marker);\n });\n }); \n \n}", "function populateInfoWindow(marker, infowindow) {\n if (infowindow.marker != marker) {\n infowindow.marker = marker;\n infowindow.setContent('<div id=infoWindow>' + marker.title + '</div>');\n infowindow.open(map, marker);\n infowindow.addListener('closeclick', function() {\n infowindow.setMarker = null;\n });\n }\n }", "function setMarkers(map, puntos) {\r\n var base_url = document.getElementById('base_url').value;\r\n var contenido = '';\r\n var link2 = base_url+\"pedido/pedidoabierto/\";\r\n //limpiamos el contenido del globo de informacion \r\n var infowindow = new google.maps.InfoWindow({ \r\n content: '' \r\n }); \r\n\r\n //recorremos cada uno de los puntos \r\n for (var i = 0; i < puntos.length; i++) {\r\n var place = puntos[i];\r\n var cliente_visitado = place[5];\r\n\r\n /*if (place[5]==1){\r\n\r\n //propiedades del marcador \r\n var marker = new google.maps.Marker({ \r\n\r\n position: new google.maps.LatLng(place[1], place[2]), //posicion \r\n map: map, \r\n title: place[0], \r\n scrollwheel: false, \r\n animation: google.maps.Animation.DROP, //animacion \r\n nombre: place[0], //personalizado - nombre del punto \r\n info: place[3], //personalizado - informacion adicional \r\n link: '', //'<?php //echo base_url().'pedido/comprobante/'; ?>'personalizado - informacion adicional \r\n visitado: place[5],\r\n icon: base_url+\"resources/images/red.png\"\r\n }); \r\n\r\n } else if (place[5]==2){\r\n //propiedades del marcador \r\n var marker = new google.maps.Marker({ \r\n\r\n position: new google.maps.LatLng(place[1], place[2]), //posicion \r\n map: map, \r\n title: place[0], \r\n scrollwheel: false, \r\n animation: google.maps.Animation.DROP, //animacion \r\n nombre: place[0], //personalizado - nombre del punto \r\n info: place[3], //personalizado - informacion adicional \r\n link: '', //'<?php //echo base_url().'pedido/comprobante/'; ?>'personalizado - informacion adicional \r\n visitado: place[5],\r\n icon: base_url+\"resources/images/gray.png\"\r\n\r\n }); \r\n\r\n }else{*/\r\n //propiedades del marcador \r\n var marker = new google.maps.Marker({ \r\n\r\n position: new google.maps.LatLng(place[1], place[2]), //posicion \r\n map: map, \r\n title: place[0], \r\n scrollwheel: false, \r\n animation: google.maps.Animation.DROP, //animacion \r\n nombre: place[0], //personalizado - nombre del punto \r\n info: place[3], //personalizado - informacion adicional \r\n link: place[4],\r\n pedido_id: place[6],\r\n visitado: place[5],\r\n //link: '<?php //echo base_url().'venta/ventas_cliente/'; ?>'+place[4], //personalizado - informacion adicional \r\n icon: base_url+\"resources/images/blue.png\"\r\n });\r\n //}\r\n\r\n google.maps.event.addListener(marker, 'click', function() {\r\n //html de como vamos a visualizar el contenido del globo \r\n /*if(this.visitado == 1){\r\n contenido='<div id=\"content\" style=\"width: auto; height: auto;\"><h5>'+this.nombre+'</h5>'+ this.info + '</div>';\r\n }else if(this.visitado == 2){\r\n contenido='<div id=\"content\" style=\"width: auto; height: auto;\"><h5>'+this.nombre+'</h5>'+ this.info + '</div>';\r\n }else{*/\r\n //contenido='<div id=\"content\" style=\"width: auto; height: auto;\">' +'<a onclick=\"consolidar_pedido('+this.pedido_id+')\" href=\"'+link2+this.link+'\" target=\"_blank\"><h5>Consolidar pedido: '+this.nombre +'</h5></a>' + this.info + '</div>'; \r\n contenido='<div id=\"content\" style=\"width: auto; height: auto;\">' +'<a style=\"cursor:pointer\" onclick=\"consolidar_pedido('+this.pedido_id+')\"><h5>Consolidar pedido: '+this.nombre +'</h5></a>' + this.info + '</div>'; \r\n //}\r\n\r\n\r\n infowindow.setContent(contenido); //asignar el contenido al globo \r\n infowindow.open(map, this); //mostrarlo \r\n }); \r\n } \r\n}", "function populateInfoWindow(marker, infowindow) {\n // Check to make sure the infowindow is not already opened on this marker.\n if (infowindow.marker != marker) {\n infowindow.marker = marker;\n infowindow.setContent(\"<div class='markerTitle'>\" + marker.title + \"</div>\");\n infowindow.setContent(\"<div class='markerDescription'>\" + marker.description + \"</div>\");\n infowindow.open(map, marker);\n // Make sure the marker property is cleared if the infowindow is closed.\n infowindow.addListener(\"closeclick\", function() {\n infowindow.marker = null;\n });\n }\n }", "function setMarkers(map) {\n\n // defines the clickable region of the icon\n // no real use yet\n // var shape = {\n // coords: [1, 1, 1, 20, 18, 20, 18, 1],\n // type: 'poly'\n // };\n\n for (var i=0; i<pins.length; i++) {\n // object (one pin)\n var pin = pins[i];\n\n var status = pin.fields.status;\n\n if (status === 'Barrier')\n var url = '/static/img/map-marker-barrier.png';\n else if (status === 'In Progress')\n var url = '/static/img/map-marker-in-progress.png';\n else if (status === 'Resolved')\n var url = '/static/img/map-marker-resolved.png';\n else if (status === 'Best Practice')\n var url = '/static/img/map-marker-best-practice.png';\n else\n var url = '/static/img/map-marker.png';\n\n var image = {\n url: url\n // size: new google.maps.Size(20, 32),\n // origin: new google.maps.Point(0, 0),\n // anchor: new google.maps.Point(0, 32)\n };\n\n if (pin.fields.address != null)\n var address = pin.fields.address;\n else\n var address = '';\n\n if (pin.fields.date_updated != null)\n var date = pin.fields.date_updated;\n else\n var date = '';\n\n // data of a detailed window\n var contentString = '<div id=\"content\" style=\"color: black\">'+\n '<div id=\"siteNotice\">'+\n '</div>'+\n '<h1 id=\"firstHeading\" class=\"firstHeading\">' + pin.fields.tag + '</h1>'+\n '<div id=\"bodyContent\">'+\n '<div><b>Status: </b>'+ status +'</div>'+\n '<div><b>Description: </b>'+ pin.fields.description +'</div>'+\n '<div><b>Address: </b>'+ address +'</div>'+\n '<div><b>Date created: </b>'+ pin.fields.date_created.slice(0,10) + \" \" + pin.fields.date_created.slice(11,19) +'</div>'+\n '<div><b>Date updated: </b>'+ date.slice(0,10) + \" \" + date.slice(11,19) +'</div>'+\n '<div><a href=\"/pins/' + (i+1) + '\">See more</a>' +\n '</div>'+\n '</div>';\n\n var infowindow = new google.maps.InfoWindow({\n content: contentString,\n maxWidth: 450\n });\n\n // creating the marker\n var marker = new google.maps.Marker({\n position: {\n lat: pin.fields.location_latitude, \n lng: pin.fields.location_longitude\n },\n map: map,\n icon: image,\n infowindow: infowindow,\n // shape: shape,\n // title: pin[0],\n zIndex: i // determines which pin is on top if they overlap\n });\n\n // listener for clicking on a pin\n marker.addListener('click', function() {\n this.infowindow.open(map, this);\n });\n\n\n }\n}", "function plotBrewery(element, index, array)\n{\n console.log(\"\\t\"+element.brewery.name);\n console.log(\"\\t\"+element.latitude + \"\\t\" + element.longitude);\n\n //Object to be mapped\n breweryLatLng = new google.maps.LatLng({lat: element.latitude, lng: element.longitude});\n\n var marker = new google.maps.Marker({\n position: breweryLatLng,\n map: map,\n title: element.brewery.name\n });\n\n marker.addListener('click', function() {\n if (infoWindowGlobal && infoWindowGlobal !== undefined)\n infoWindowGlobal.close();\n\n var infoWindowContentStr = fillInfoWindowTemplateWithBrewery(element);\n\n infoWindowGlobal = new google.maps.InfoWindow({\n content: infoWindowContentStr\n });\n\n // Add a listener to clean up and restyle the infowindow when it's loaded\n // http://en.marnoto.com/2014/09/5-formas-de-personalizar-infowindow.html\n google.maps.event.addListener(infoWindowGlobal, 'domready', function() {\n\n // Reference to the DIV which receives the contents of the infowindow using jQuery\n var iwOuter = $('.gm-style-iw');\n var iwBackground = iwOuter.prev();\n // Remove the background shadow DIV\n iwBackground.children(':nth-child(2)').css({'display' : 'none'});\n // Remove the white background DIV\n iwBackground.children(':nth-child(4)').css({'display' : 'none'});\n\n // Using the .next() method of JQuery you reference the following div to .gm-style-iw.\n // Is this div that groups the close button elements.\n var iwCloseBtn = iwOuter.next();\n\n // Apply the desired effect to the close button\n iwCloseBtn.css({\n width: '19px',\n height: '19px',\n overflow: 'hidden',\n position: 'absolute',\n opacity: '1', // by default the close button has an opacity of 0.7\n right: '-15px', top: '3px', // button repositioning\n border: '3px solid #00274c', // increasing button border and new color\n 'border-radius': '13px', // circular effect\n 'box-shadow': '0 0 5px #3990B9' // 3D effect to highlight the button\n });\n\n // The API automatically applies 0.7 opacity to the button after the mouseout event.\n // This function reverses this event to the desired value.\n iwCloseBtn.mouseout(function(){\n $(this).css({opacity: '1'});\n });\n\n iwBackground.children(':nth-child(3)').find('div').children().css({'box-shadow': 'rgba(72, 181, 233, 0.6) 0px 1px 6px', 'z-index' : '1'});\n\n // Old css work that may be worth playing with at a later time but is a bit complicated for now\n\n // // Moves the infowindow 115px to the right.\n // iwOuter.parent().parent().css({left: '115px'});\n // // Moves the shadow of the arrow 76px to the left margin\n // iwBackground.children(':nth-child(1)').attr('style', function(i,s){ return s + 'left: 33px !important;'});\n // // Moves the arrow 76px to the left margin\n // iwBackground.children(':nth-child(3)').attr('style', function(i,s){ return s + 'left: 33px !important;'});\n // Changes the desired color for the tail outline.\n // The outline of the tail is composed of two descendants of div which contains the tail.\n // The .find('div').children() method refers to all the div which are direct descendants of the previous div.\n\n // Style the outer div\n // iwOuter.css({\n // right: '115px',\n // left: 'initial'\n // });\n });\n\n infoWindowGlobal.open(map, marker);\n });\n\n markers.push(marker);\n\n bounds.extend(breweryLatLng);\n}", "function addMarker() {\n let newMap = new google.maps.Map(document.getElementById('app-map'), {\n zoom:12,\n center:{lat:state.userInfo.geoLocation.lat, lng:state.userInfo.geoLocation.lng},\n });\n let marker = new google.maps.Marker({\n position:{lat:state.userInfo.geoLocation.lat, lng:state.userInfo.geoLocation.lng},\n icon: \"img/blueDot.png\",\n map:newMap\n });\n state.foodbankList.forEach(element => {\n let marker = new google.maps.Marker({\n position:{lat:element.lat, lng:element.lng}, \n map:newMap\n });\n let hoursContent = '<b>Opening Hours: </b><br>';\n if (element.hours != '') {\n element.hours.forEach(day => {\n hoursContent = hoursContent + day + '<br>';\n });\n } else {\n hoursContent = '';\n }\n let contentString = '<h1 id=\"markerHead\">'+element.name+'</h1>'+\n '<p id=\"markerAddress\"><b>Address: </b>'+element.address+ \n '<br><b>Contact: </b>'+element.phone+'<br>';\n contentString = contentString + hoursContent + '</p>';\n let infowindow = new google.maps.InfoWindow({\n content: contentString\n });\n marker.addListener('click', function() {\n infowindow.open(map, marker);\n });\n });\n \n}", "function openInfowindow (name) {\n \n //loc.hideYelp ();\n loc.setName(name);\n \n infowindow.close();\n infowindow.setOptions ({\n maxWidth: 200,\n maxHeight: 150\n });\n\n infowindow.open(map, loc.marker);\n infowindow.setContent($(\"#infowindowData .loading\").html());\n \n loc.animateMarker();\n \n loc.getYelpData (function () {\n infowindow.open(map, loc.marker);\n infowindow.setContent($(\"#infowindowData .content\").html());\n });\n}", "function populateInfoWindow(marker, infowindow) {\n\t//check if the infowindow is already opened on this marker\n\tif (!infowindow || infowindow.marker == marker)\n\t\treturn;\n\n\t// Animate the marker\n\tmarker.setAnimation(google.maps.Animation.BOUNCE)\n\tsetTimeout(function(){\n\t\tmarker.setAnimation(null);\n\t},700);\n\n\tinfowindow.setContent('<div class=\"iw-container\">'+\n '<div class=\"iw-title\">' + marker.title + '</div>'+\n '<div class=\"info-container\">');\n\tinfowindow.marker = marker;\n\t// Clear the marker property when closing the infowindow.\n infowindow.addListener('closeclick', function() {\n infowindow.marker = null;\n });\n\n loadFoursquare_Wikipedia(marker.position, marker.title, infowindow);\n\n map.panTo(marker.getPosition());\n\n infowindow.open(map, marker);\n}", "function movimiento(evt)\n{\n\tvar position=$(evt.currentTarget).attr('id');\n\tmarkerPosition(position);\n}", "function setMarkerInfo(info) {\n infoWindow.setContent(info);\n }", "function addMarker(place){\n\n\t//Show markers in the Map\n\tvar marker = new google.maps.Marker({\n\t\tmap: map,\n\t\tanimation: google.maps.Animation.DROP,\t\t\t\t\n\t\ticon: {\n\t\t\turl: 'http://mt.google.com/vt/icon/name=icons/spotlight/gas_station_L_8x.png&scale=1.7'\n\t\t},\n\t\tposition: place.geometry.location\n\t});\n\n\n\tmarker.addListener('click', toggleBounce);\n\tfunction toggleBounce() {\n\t\tif (marker.getAnimation() !== null) {\n\t\t\tmarker.setAnimation(null);\n\t\t} else {\n\t\t\tmarker.setAnimation(google.maps.Animation.BOUNCE);\n\t\t}\n\t}\n\n\tmarker.addListener('mouseover', function() {\n\t\tservice.getDetails(place, function(site, status) {\n\t\t\tmarker.$.title = \"updated title\";\n\t\t\tmap.removeOverlay(marker);\n\t\t\tmap.addOverlay(marker);\n\t\t});\n\t});\n\n\t//Click Event for marks\n\tgoogle.maps.event.addListener(marker, 'click', function() {\n\t\tservice.getDetails(place, function(result, status) {\n\n \t//If not OK then RETURN\n \tif (status !== google.maps.places.PlacesServiceStatus.OK) {\n \t\tconsole.error(status);\n \t\treturn;\n \t}\n\n /*------------------------------------------------------------------------------\n\t\t\t* The Place variable is: result. Example to get the name of the place: ''result.name''.\n\t\t\t-------------------------------------------------------------------------------- */\n\t\t\tvar empresas= ['Texaco','Eco','Esso','Propagas','Isla','Tropigas','Credigas','Petronan','Mariot','Aferme','Total'];\t\t\n\t\t\t\n\t\t\t//SIDEBAR INFO\n\t\t\t$('#titulo_carta').text(result.name);\n\t\t\t$('#tel_carta').text(result.international_phone_number);\n\t\t\t$('#dir_carta').text(result.formatted_address);\t\t\t\n\t\t\tif(result.opening_hours!=null){\n\t\t\t\t$('#hora_carta').text(\"Abierto de: \"+result.opening_hours.periods[1].open.time+\" AM A: \"+result.opening_hours.periods[1].close.time+\" PM\");\n\t\t\t}\n\t\t\tvar name =result.name;\n\t\t\tvar name1=name.toLowerCase();\n\n\t\t\t//IMAGE SETTINGS\n\t\t\tif(/texaco/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/texaco.png');\n\t\t\t\t$('#web_carta').text(\"http://www.texaco.com/\");\n\n\t\t\t}if(/eco/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/eco.png');\n\t\t\t\t$('#web_carta').text(\"http://www.ecopetroleo.do/\");\n\n\t\t\t}if(/esso/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/esso.png');\n\t\t\t\t$('#web_carta').text(\"https://www.esso.com/\");\n\n\t\t\t}if(/total/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/total.png');\n\t\t\t\t$('#web_carta').text(\"https://www.total.com.do/\");\n\n\t\t\t}if(/aferme/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/aferme.jpg');\n\t\t\t\t$('#web_carta').text(\"http://afermegas.com.do/\");\n\n\t\t\t}if(/sigma/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/sigma.png');\n\t\t\t\t$('#web_carta').text(\"http://www.gruposencion.com/empresa/sigma-petroleum-corporation/\");\n\n\t\t\t}if(/petronan/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/petronan.png');\n\t\t\t\t$('#web_carta').text(\"http://www.petronan.com/\");\n\t\t\t\t/*codigo front end y back end ISFB y WETA*/\n\n\t\t\t}if(/tropigas/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/tropigas.png');\n\t\t\t\t$('#web_carta').text(\"http://tropigas.com.do/\");\n\n\t\t\t}if(/onegas/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/onegas.png');\n\t\t\t\t$('#web_carta').text(\"http://www.onegas.com.do/\");\n\n\t\t\t}if(/nativa/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/nativa.png');\n\t\t\t\t$('#web_carta').text(\"http://www.credigasnativa.com/\");\n\n\t\t\t}if(/shell/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/shell.png');\n\t\t\t\t$('#web_carta').text(\"http://www.shell.com.do/\");\n\n\t\t\t}if(/isla/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/isla.png');\n\t\t\t\t$('#web_carta').text(\"http://1524.do.all.biz/\");\n\n\t\t\t}if(/propagas/.test(name1)){\n\t\t\t\t$('#img_carta').attr('src','emp/propa.png');\n\t\t\t\t$('#web_carta').text(\"http://grupopropagas.com/\");\n\t\t\t}\n\n\t\t\t//RATING SETTINGS\n\t\t\tif(result.rating!=null){\t\n\t\t\t\t$(\".rating .number\").text(result.rating);\t\t\t\n\t\t\t\t$(\"#rateYo\").rateYo(\"option\", \"rating\", result.rating);\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$(\".rating .number\").text(0);\n\t\t\t\t$(\"#rateYo\").rateYo(\"option\", \"rating\", 0);\t\n\t\t\t}\n\n //Inserting place name in the infoWindow\n infoWindow.setContent(result.name);\n infoWindow.open(map, marker);\n });\n\t});\n}", "function addToMap(item) {\n\n\tvar data = $(item).data('result');\n\t\n\tvar coords = data.coords.split(',');\n\t\n\tvar latlng = new google.maps.LatLng(coords[0], coords[1]);\n\tvar marker = new google.maps.Marker({\n\t\tposition: latlng,\n\t\tmap: map,\n\t\ttitle: data.title,\n\t\ticon: data.icon\n\t});\n\t\n\tmarker.data = data;\n\t\n\tif(useOverlappingMarkerSpiderfier != true) {\n\t\n\t\t// add a click event to the marker\n\t\tgoogle.maps.event.addListener(marker, 'click', function() {\n\t\t\t\n\t\t\t// close any existing open infoWindow\n\t\t\tif(infoWindow != null) {\n\t\t\t\tinfoWindow.close();\n\t\t\t}\n\t\t\t\n\t\t\t// create a new infoWindow\n\t\t\tinfoWindow = new google.maps.InfoWindow({\n\t \tcontent: '<div class=\"info-window info-window-' + marques.computeLatLngHash(data.coords) + '\"><p class=\"search-progress\">Loading Cinema Data.</p><p class=\"search-progress\"><img src=\"/assets/images/search-progress.gif\" height=\"19\" width=\"220\" alt=\"Search Underway\"/></p></div>'\n\t \t});\n\t \t\n\t \t// open the new infoWindow\n\t \tinfoWindow.open(map, marker);\n\t \t\n\t \t// add a dom ready event to dynamically load the infoWindow content\n\t\t\tgoogle.maps.event.addListener(infoWindow, 'domready', function() {\n\t\t\t\n\t\t\t\t// get reference to the infoWindow\n\t\t\t\tvar infoWindow = this;\n\t\t\t\t\n\t\t\t\t// get reference to the container div\n\t\t\t\tvar infoWindowContent = $('.info-window');\n\t\t\t\t\n\t\t\t\t// get a list of classes\n\t\t\t\tvar classes = infoWindowContent.attr('class').split(' ');\n\t\t\t\t\n\t\t\t\t// find the right class for the hash\n\t\t\t\tvar hash = classes[1].split('-');\n\t\t\t\t\n\t\t\t\tif(hash.length == 3) {\n\t\t\t\t\thash = hash[2];\n\t\t\t\t} else {\n\t\t\t\t\thash = classes[0].split('-');\n\t\t\t\t\thash = hash[2];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// get the data object\n\t\t\t\tvar data = mapData.data[$.inArray(hash, mapData.hashes)];\n\t\t\t\t\n\t\t\t\tvar url = '/marques/film_weekly_info_windows/content/' + data.id;\n\t\t\t\t\n\t\t\t\t$.get(url, function(data){\n\t\t\t\t\n\t\t\t\t\tinfoWindow.close();\n\t\t\t\t\tinfoWindow = new google.maps.InfoWindow({\n\t\t\t\t\t\tcontent: data\n\t\t\t\t\t});\n\t\t\t\t\tinfoWindow.open(map, marker);\n\t\t\t\t});\n\t\t\t});\n\t\t\t\n\t\t});\n\t\t\n\t} else {\n\t\t\t\n\t\t// add the marker so it is tracked by the OMS plugin\n\t\toms.addMarker(marker);\n\t}\n\n\t// add to the list of what is on the map\n\tmapData.hashes.push(marques.computeLatLngHash(data.coords));\n\tmapData.data.push(data);\n\tmapData.markers.push(marker);\n\t\n\t$(item).empty().append('Added');\n\t$(item).removeClass('fw-clickable add-to-map');\n\t\n\tmapUpdated = true;\n\n}", "function openInfoWindow(e, current) {\r\n\t\tcloseInfoWindow(); \r\n\t\tvar x = e.pageX - parseInt($('#inner').css('left')) - $['mapsettings'].element.get(0).offsetLeft - 9;\r\n\t\tvar y = e.pageY - parseInt($('#inner').css('top')) - $['mapsettings'].element.get(0).offsetTop - 10;\r\n\t\t$['mapsettings'].infoWindowLocation[$['mapsettings'].zoom] = new Point(x,y);\r\n\t\t$('<div id = \"infowindow\" />').css('left',x-4).css('top',y-53).html('<div class = \"inner\">'+ $['mapsettings'].exitLink + $['mapsettings'].infoDisplay + '</div>').appendTo('#infowindows').hide();\r\n\t\tvar infow = $('#infowindow');\r\n\t\tinfoWidth = infow.innerWidth();\r\n\t\tinfoHeight = infow.innerHeight();\r\n\t\tinfow.css('left', x-4).css('top',y-16-infoHeight).show();\r\n\t\t$(\"#infowindows\").append($['mapsettings'].infoImage);\r\n\t\t$(\"#infowindows img\").css('left',x).css('top',y-15);\r\n\t\t$('#infowindows form').submit(function(e) { \r\n\t\t\te.preventDefault(); \r\n\t\t\tcloseInfoWindow();\r\n\t\t\taddMarker(new Point(x,y), function(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\topenInfoWindowHtml(markerPoint(this), \"<h2>Some Name</h2><p>Some Description.</p>\");\r\n\t\t\t});\r\n\t\t\t\r\n\t\t });\r\n\t\t$(\"#exitLink\").click(function(e){\r\n\t\t\te.preventDefault();\r\n\t\t\tcloseInfoWindow();\r\n\t\t\treturn false;\r\n\t\t});\r\n\t\t$['mapsettings'].hasOpenInfoWindow = true;\r\n\t}", "function callMaltaMap() {\n var map = new google.maps.Map(document.getElementById(\"map-two\"), {\n zoom: 10,\n center: {\n lat: 35.917973,\n lng: 14.409943\n }\n });\n var locations = [\n [{\n lat: 36.0468259,\n lng: 14.1899414\n }, \"Gozo\"],\n [{\n lat: 35.9597241,\n lng: 14.3388661\n }, \"Popeye Village\"],\n [{\n lat: 36.0139938,\n lng: 14.3053178\n }, \"Blue Lagoon, Comino\"],\n [{\n lat: 35.8984601,\n lng: 14.5089412\n }, \"Valletta\"],\n [{\n lat: 35.8872941,\n lng: 14.4018906\n }, \"Mdina\"],\n ];\n var infoWindow = new google.maps.InfoWindow();\n locations.forEach(([position, title]) => {\n const marker = new google.maps.Marker({\n position,\n map,\n title: `${title}`,\n optimized: false,\n });\n\n marker.addListener(\"click\", () => {\n infoWindow.close();\n infoWindow.setContent(marker.getTitle());\n infoWindow.open(marker.getMap(), marker);\n });\n });\n}", "function populateInfoWindow(marker, infowindow) {\n // Ensure infowindow isn't already opened on this marker.\n if (infowindow.marker != marker) {\n infowindow.marker = marker;\n infowindow.setContent('');\n infowindow.open(map, marker);\n // Ensure marker property is cleared if infowindow is closed.\n infowindow.addListener('closeclick',function(){\n infowindow.setMarker = null;\n });\n\n // Setup call to foursquare's API\n // Establish variables for data returned from fourSQ\n var lat = marker.lat;\n\t\t var lng = marker.lng;\n\t\t var fourSQ_ID;\n\t\t var fourSq_Name;\n\t\t var fourSq_Address;\n\t\t var picURL;\n\t\t var url = \"https://api.foursquare.com/v2/venues/search/?\" + $.param({\n\t\t client_id: \"U1XOXNRNDQERHG2KYML4A0R3REQMYL3SQTRUPRVKDWLSNEUS\",\n\t\t client_secret: \"THZFVY4HWPC1DV5XCAWCK5A2CIGB2OERGSNXYWSBX5WOOSIL\",\n\t\t v: \"20180323\",\n\t\t ll: lat + ',' + lng,\n\t\t query: marker.location_name,\n\t\t limit: \"1\"\n\t\t });\n\n\t\t $.ajax(url, {\n\t\t dataType: \"jsonp\",\n\t\t success: function(data) {\n\t\t fourSQ_ID = data.response.venues[0].id;\n\t\t fourSq_Name = data.response.venues[0].name;\n\t\t fourSq_Address = data.response.venues[0].location.formattedAddress[0];\n\t\t getPhoto(fourSQ_ID, fourSq_Name, fourSq_Address);\n\t\t },\n\t\t // Catch any JSON errors\n\t\t error: function(xhr, status, error) {\n\t\t \talert(xhr.responseText);\n\t\t \tsetApiError();\n\t\t }\n\t\t });\n\n\t\t // Call Foursquare's photo API\n\t\t function getPhoto(fourSQ_ID, fourSq_Name, fourSq_Address) {\n\t\t url = \"https://api.foursquare.com/v2/venues/\" + fourSQ_ID + \"/photos/?\" + $.param({\n\t\t client_id: \"U1XOXNRNDQERHG2KYML4A0R3REQMYL3SQTRUPRVKDWLSNEUS\",\n\t\t client_secret: \"THZFVY4HWPC1DV5XCAWCK5A2CIGB2OERGSNXYWSBX5WOOSIL\",\n\t\t v: \"20180323\",\n\t\t limit: \"1\"\n\t\t });\n\n\t\t $.ajax(url, {\n\t\t dataType: \"jsonp\",\n\t\t success: function(data) {\n\t\t \t// To Do: Handle Foursquare quota exceeded\n\t\t \t// if ((data.meta.errorType == \"quota_exceeded\") && (data.meta.code = \"429\")){\n\t\t \t// \tconsole.log(\"Foursquare Photos Quota Exceeded\");\n\t\t \t// \tsetApiError();\n\t\t \t// \tinfowindow.setContent('<div class=\"marker-name\">' + fourSq_Name +\n\t\t // '</div><div class=\"marker-address\">' + fourSq_Address +\n\t\t // '</div><a href=\"http://foursquare.com/v/' + fourSq_Name + '/' + fourSQ_ID +\n\t\t // '?ref=U1XOXNRNDQERHG2KYML4A0R3REQMYL3SQTRUPRVKDWLSNEUS\" target=\"_blank\">' +\n\t\t // '<figure class=\"marker-location-img\"><img src=\"img/image.png\" id=\"infobox\"></figure></a>' +\n\t\t // '<img class=\"foursquareImg\" src=\"img/Powered-by-Foursquare-full-color-300.png\">');\n\t\t \t// }\n\t\t \t// else {\n\t\t var photos = data.response.photos.items;\n\t\t photos.forEach(function(photo) {\n\t\t picURL = photo.prefix + \"height500\" + photo.suffix;\n\t\t infowindow.setContent('<div class=\"marker-name\">' + fourSq_Name +\n\t\t '</div><div class=\"marker-address\">' + fourSq_Address +\n\t\t '</div><a href=\"http://foursquare.com/v/' + fourSq_Name + '/' + fourSQ_ID +\n\t\t '?ref=U1XOXNRNDQERHG2KYML4A0R3REQMYL3SQTRUPRVKDWLSNEUS\" target=\"_blank\">' +\n\t\t '<figure class=\"marker-location-img\"><img src=\"' + picURL +\n\t\t '\" id=\"infobox\"></figure></a>' +\n\t\t '<img class=\"foursquareImg\" src=\"img/Powered-by-Foursquare-full-color-300.png\">');\n\t\t });\n\t\t },\n\t\t // Catch any JSON errors\n\t\t error: function(xhr, status, error) {\n\t\t \talert(xhr.responseText);\n\t\t \tsetApiError();\n\t\t }\n\t\t })};\n\n // Open infowindow with Foursquare and provided Information\n infowindow.open(map, marker);\n\n } // ENd of the if statement\n\n }", "function populateInfoWindow(marker, popupContent) {\n google.maps.event.addListener(marker, 'click', function () {\n infoWindow.setContent(popupContent);\n\n\n\n if (marker.getAnimation() !== null) {\n\n this.setAnimation(null);\n marker.setIcon('assets/img/map-marker.png');\n infoWindow.close(map, this);\n } else {\n //setTimeout(function(){ this.setAnimation(google.maps.Animation.BOUNCE); }, 750);\n marker.setAnimation(google.maps.Animation.BOUNCE);\n setTimeout(function(){ marker.setAnimation(null); }, 1400);\n marker.setIcon('assets/img/map-marker.png');\n infoWindow.open(map, this);\n }\n });\n }", "function updateInfo(e) {\n var marker = e.target;\n info.update(marker.valueOf().options);\n }", "function ajouterMarker(superHero) {\n\n var marker = new google.maps.Marker({\n position: superHero.position,\n map: gmap,\n title: superHero.nom,\n icon : {\n url : superHero.icon,\n // size : new google.maps.Size(151, 171),\n origin\t: new google.maps.Point(0, 0),\n anchor\t: new google.maps.Point(17, 34),\n // scaledSize\t: new google.maps.Size(60, 160),\n labelOrigin : new google.maps.Point(33, 15)\n },\n label : {\n text : superHero.saved.toString(),\n\t color : 'black',\n\t fontSize\t: '11px'\n }\n\n\n });\n\n markers.push(marker);\n \n \n marker.addListener('click', function () {\n \n var content;\n \n content = document.createElement('div');\n \n var title = document.createElement('h3');\n title.style.paddingBottom = \"10px\";\n title.innerHTML = superHero.nom;\n \n var couv = document.createElement('img');\n couv.style.paddingBottom = \"10px\";\n couv.setAttribute(\"src\", superHero.couv);\n \n var description = document.createElement('p');\n description.style.textAlign = \"justify\";\n description.style.paddingBottom = \"10px\";\n description.innerHTML = superHero.content;\n \n var sauvetage = document.createElement('p');\n sauvetage.style.textAlign = \"justify\";\n sauvetage.innerHTML = \"<strong>Personnes sauvées : </strong>\"+superHero.saved;\n \n content.appendChild(title);\n content.appendChild(couv);\n content.appendChild(description);\n content.appendChild(sauvetage);\n \n\n infowindow.setContent(content);\n infowindow.open(gmap, marker);\n \n if(gmap.getZoom()== 17)\n {\n gmap.panTo(marker.getPosition());\n }\n else {\n gmap.setCenter(marker.getPosition());\n gmap.setZoom(17);\n }\n \n console.log(marker);\n \n \n \n \n });\n \n \n }", "function bindInfoW(marker, contentString, infowindow) {\n google.maps.event.addListener(marker, 'click', function() {\n var timeline = [];\n infowindow.setContent(contentString);\n infowindow.open(map, marker);\n });\n\n google.maps.event.addListener(marker, 'rightclick', function(event) {\n marker.setVisible(false);\n infowindow.close();\n });\n\n google.maps.event.addListener(marker, 'dblclick', function(event) {\n marker.setVisible(false);\n infowindow.close();\n });\n }", "function bindInfoWindow(marker, map, infowindow, site) {\n\n\tgoogle.maps.event.addListener(marker, 'click', function () {\n\n\t\tif (ctrlPressed) {\n\n\t\t\tif (selectedMarkers.indexOf(marker) == -1) {\n\t\t\t\tselectedMarkers.push(marker);\n\t\t\t\tmarker.setIcon({url: 'http://maps.gstatic.com/mapfiles/markers2/icon_green.png'});\n\t\t\t\t// marker.set(labelContent', 'labels[labelIndex++ % labels.length]);\n\t\t\t\tselectedSensors.push(site);\n\t\t\t\tupdateSiteWindowPane();\n\t\t\t}\n\n\t\t}\n\t\telse {\n\n\t\t\t// Handle 1 selected marker on map\n\t\t\tclearSelectedMarkers();\n\t\t\tclearSelectedSensors();\n\t\t\tlabelIndex = 0;\n\t\t\tselectedMarker = marker;\n indexSite = site._id;\n\n\t\t\tif (selectedMarkers.indexOf(marker) == -1) {\n\n\t\t\t\t// log('Selected site', site);\n\n // Place camera at center and on top of marker\n\t\t\t\tif (Dashboard.state.localeCompare(\"minimized\") == 0)\n\t\t\t\t\toffsetCenter(marker.getPosition(), -($(window).width() * 0.15), 0);\n\t\t\t\telse\n\t\t\t\t\tmap.panTo(marker.getPosition());\n\n\t\t\t\tselectedMarkers.push(selectedMarker);\n\t\t\t\tselectedSensors.push(site);\n\t\t\t\t//TODO: add local icon\n\t\t\t\tmarker.setIcon({url: 'http://maps.gstatic.com/mapfiles/markers2/icon_green.png'});\n\t\t\t\t\n // InfoWindow\n //TODO: Id of ballon should be the site id\n\n\t\t\t\tvar markerSection = '<div id=\"site-marker-section\"></div>';\n\n infowindow.setContent(markerSection);\n\t\t\t\tinfowindow.open(map, marker);\n\n\t\t\t\tViewsManager.populateSections(site);\n\n }\n\t\t}\n\t\t// infoWindow Pane\n\t\t// infowindow.setContent(\"SensorID: \" + sensor.id + \"\\n TimeValue: \" + sensor.timeValue + \"\\nValue: \" + sensor.value);\n\t\t// updateSiteWindowPane(\"SensorID: \" + sensor.id + \"/n TimeValue: \" + sensor.timeValue + \"/nValue: \" + \"+ sensor.value\");\n\t});\n}", "function markerClick(data) {\n let data2;\n $(markers).each(function(i) {\n markers[i].addListener('click', function() {\n if(this.infowindow) return this.infowindow.open(map, this);\n let markerNumber = markers.indexOf(this);\n displayWindow(data[markerNumber], this);\n });\n });\n }", "function addMarker(place) {\n console.log(place);\n var latlng = new google.maps.LatLng(place.latitude, place.longitude);\n var marker = new MarkerWithLabel({\n position: latlng,\n map: map,\n labelContent: place.place_name,\n labelAnchor: new google.maps.Point(75, 0),\n labelClass: \"label\",\n icon: \"img/icon.png\"\n });\n\n google.maps.event.addListener(marker, \"click\", function() {\n // auto center map on marker click\n map.panTo(marker.getPosition());\n\n // show ajax indicator\n showInfo(marker);\n\n $.when(\n $.getJSON(\"http://api.openweathermap.org/data/2.5/weather\", {\n lat: place.latitude,\n lon: place.longitude,\n appid: \"a41d1d46e2d9075acbe27655af273216\",\n units: \"metric\"\n }),\n $.getJSON(\"articles.php\", { geo: place.place_name })\n ).then(function(weather_data, news_data) {\n // if no data\n if (news_data[0].length === 0) {\n var iconUrl = \"img/\" + weather_data[0].weather[0].icon + \".png\";\n var infowindow =\n '<div id=\"infoWindow\">' +\n '<table class=\"weatherInfo\">' +\n \"<tr>\" +\n \"<td>\" +\n '<img id=\"weatherIcon\" src=' +\n iconUrl +\n \">\" +\n \"</td>\" +\n \"<td>\" +\n \"<b>\" +\n place.place_name_rus +\n \"</b>\" +\n \"<p>\" +\n '<span class=\"badge\">' +\n Math.round(Number(weather_data[0].main.temp)) +\n \"\" +\n \" &#8451\" +\n \"</span>\" +\n \" вітер \" +\n weather_data[0].wind.speed +\n \" м/с,\" +\n \" тиск \" +\n Math.round(Number(weather_data[0].main.pressure * 0.75)) +\n \" мм.рт.ст\" +\n \"</p>\" +\n \"</td>\" +\n \"</tr>\" +\n \"</table>\" +\n '<p align=\"center\">' +\n \"Новин не знайдено\" +\n \"</p>\" +\n \"</div>\";\n\n showInfo(marker, infowindow);\n } else {\n // else build list of links to articles\n // start ul\n var ul = \"<ul>\";\n\n // template for li\n var template = _.template(\n \"<li><a href='<%- link %>' target='_blank'><%- title %></a></li>\"\n );\n\n // iterate over articles\n for (var i = 0; i < news_data[0].length; i++) {\n // add li to ul\n ul += template({\n link: news_data[0][i].link,\n title: news_data[0][i].title\n });\n }\n\n // end ul\n ul += \"</ul>\";\n\n var iconUrl = \"img/\" + weather_data[0].weather[0].icon + \".png\";\n var infowindow =\n '<div id=\"infoWindow\">' +\n '<table class=\"weatherInfo\">' +\n \"<tr>\" +\n \"<td>\" +\n '<img id=\"weatherIcon\" src=' +\n iconUrl +\n \">\" +\n \"</td>\" +\n \"<td>\" +\n \"<b>\" +\n place.place_name +\n \"</b>\" +\n \"<p>\" +\n '<span class=\"badge\">' +\n Math.round(Number(weather_data[0].main.temp)) +\n \"\" +\n \" &#8451\" +\n \"</span>\" +\n \" вітер \" +\n weather_data[0].wind.speed +\n \" м/с,\" +\n \" тиск \" +\n Math.round(Number(weather_data[0].main.pressure * 0.75)) +\n \" мм.рт.ст\" +\n \"</p>\" +\n \"</td>\" +\n \"</tr>\" +\n \"</table>\" +\n \"<div>\" +\n ul +\n \"</div>\" +\n \"</div>\";\n\n // show info window at marker with content\n showInfo(marker, infowindow);\n }\n });\n });\n\n markers.push(marker);\n}", "function setInfowindow(infowin, marker, title, address, phone) {\n infowin.marker = marker;\n infowin.setContent (\n '<h3 class=\"title\">' + title + '</h3>' +\n '<div class=\"phone\"><p><i class=\"fa fa-phone\" aria-hidden=\"true\"></i>: ' + phone + '</p></div>' +\n '<div class=\"address\"><p><i class=\"fa fa-map-marker\" aria-hidden=\"true\"></i>: ' + address + '</p></div>'\n );\n infowin.open(map, marker);\n // Make sure the marker property is cleared if the infowindow is closed.\n infowin.addListener('closeclick', function() {\n infowin.marker = null;\n });\n}", "function markerClickHandler(){\n var marker = this;\n viewModel.venues().forEach(function(Venue){\n Venue.marker.setAnimation(null);\n });\n marker.setAnimation(google.maps.Animation.BOUNCE);\n setTimeout(function(){\n marker.setAnimation(null);\n },750);\n infowindow.setContent(this.contentString);\n infowindow.open(map, this);\n}", "function bindInfoWindow(marker, map, infoWindow, html) {\n google.maps.event.addListener(marker, 'click', function() {\n infoWindow.setContent(html);\n infoWindow.open(map, marker);\n });\n }", "function placeMarker(location) {\n // close previous info in infowindow\n infoWindow.close();\n // creating dynamic marker\n markerOptions1 = {\n position: location,\n draggable:true,\n animation: google.maps.Animation.DROP,\n map: map\n };\n marker.setOptions(markerOptions1);\n\n\n\n // get lat lng value from marker position\n markerlat = marker.getPosition().lat();\n markerlng = marker.getPosition().lng();\n //creating dynamic infowindow\n send();\n\n}", "function populateInfoWindow(marker, infowindow, contentString) {\n infowindow.marker = marker;\n infowindow.setContent(contentString);\n infowindow.open(map, marker);\n map.panBy(10,-120);\n // Make sure the marker property is cleared if the infowindow is closed.\n infowindow.addListener('closeclick',function(){\n marker.setAnimation(null);\n infowindow.setMarker = null;\n centerMap();\n });\n }" ]
[ "0.73777", "0.7315891", "0.7271314", "0.70850956", "0.7066441", "0.705208", "0.69949704", "0.69716126", "0.69589114", "0.6953759", "0.69136107", "0.68817043", "0.6862094", "0.6845678", "0.6803509", "0.67933434", "0.6793215", "0.67822677", "0.67618585", "0.675975", "0.67540044", "0.67480963", "0.6726659", "0.67166847", "0.6715445", "0.6714872", "0.6684241", "0.66796476", "0.6670763", "0.6660285", "0.66547346", "0.66534495", "0.6651657", "0.6651388", "0.66332656", "0.6628619", "0.6615946", "0.66008055", "0.65953684", "0.65952617", "0.6590349", "0.6587559", "0.6582372", "0.65782136", "0.6574199", "0.6551856", "0.65505934", "0.6548916", "0.65467656", "0.6540297", "0.6538435", "0.652294", "0.6510989", "0.6510269", "0.6505819", "0.64950824", "0.64916927", "0.648601", "0.64828616", "0.64769316", "0.6474642", "0.64724827", "0.6472065", "0.64719594", "0.6468613", "0.64671135", "0.6466161", "0.6465493", "0.64614093", "0.64582855", "0.64510596", "0.6447114", "0.6446044", "0.6439536", "0.6437839", "0.6430255", "0.6409634", "0.64042646", "0.6389904", "0.6389652", "0.6384602", "0.6384047", "0.6380577", "0.6380235", "0.6380012", "0.6372112", "0.6369473", "0.6367238", "0.636663", "0.63649714", "0.63615525", "0.6358906", "0.63574356", "0.6354821", "0.6353475", "0.63490754", "0.63482857", "0.634518", "0.6344279", "0.63350403" ]
0.6589154
41
bonus show circles when loading
function bonus() { let radius = 1; setInterval(function () { // validate the current radius let validation = circle.validateRadius(radius, canvasHTML.height, canvasHTML.width); // if valid - drow circle if (validation === true) { drawer.drowCircle(radius); radius++; } }, 100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadingCircle() {\n const loading = document.querySelector(\"#loading-circle\");\n loading.classList.add(\"display\");\n setTimeout(() => {\n loading.classList.remove(\"display\");\n }, 15000);\n}", "function showLoading() {\n $B.removeClass(\"js-loaded loaded-reveal\").addClass(\"show-loading\");\n $(\".sl-progress span\").css(\"width\", \"0%\");\n }", "displayLoading(){\n $.showLoading({\n name: \"line-scale\"\n });\n }", "function startLoadingIndicator(){\r\n\t$('#svg').showLoading();\r\n\t$('#list').showLoading();\r\n}", "function loading() {\n\n\t// Generación del contenedor\n\tlet ctnr = document.createElement('div');\n\t\tctnr.classList.add('loading');\n\n\t// Añadido de tres puntos con sus respectivas clases\n\tfor (let i = 0; i < 3; i++) {\n\t\tlet dot = document.createElement('div');\n\t\t\tdot.classList.add('circleG', `circleG_${i}`);\n\t\tctnr.appendChild(dot);\n\t}\n\n\t// Devolución de la animación generada\n\treturn ctnr;\n}", "renderLoading() {\n return (\n <div className=\"loading\">\n <CircleLoader size={100} color=\"#FFFFFF\" />\n </div>\n );\n }", "function startLoading() {\n setStatus( RateCheckerChart.STATUS_OKAY );\n _dataLoadedDom.classList.add( 'loading' );\n _dataLoadedDom.classList.remove( 'loaded' );\n }", "function showLoading() {\n loading.classList.add(\"show\");\n setTimeout(callData, 2000);\n }", "function showLoading() {\n\tesri.show(app.loading);\n\tapp.map.disableMapNavigation();\n\tapp.map.hideZoomSlider();\n}", "renderLoadingIcon() {}", "function load(){\n\n //Display an optional loading bar\n // g.loadingBar();\n}", "function showLoading() {\n\t\t// Create loading layer at first usage\n\t\tif (!ajax_load_element) {\n\t\t\tajax_load_element = document.createElement('div');\n\t\t\tajax_load_element.className = 'ajaxLoad';\n\t\t\tvar\n\t\t\t\toverlay = document.createElement('div'),\n\t\t\t\tload_indicator = document.createElement('div')\n\t\t\t;\n\t\t\toverlay.className = 'overlay';\n\t\t\tajax_load_element.appendChild(overlay);\n\n\t\t\tload_indicator.className = 'loadIcon';\n\t\t\tload_indicator.innerHTML = msg.ajaxLoadingText;\n\t\t\tajax_load_element.appendChild(load_indicator);\n\n\t\t\tdocument.body.appendChild(ajax_load_element);\n\t\t\tsetTransparency(overlay, overlay_opacity);\n\t\t}\n\t\tvar el_pos = getElPos(img_lib_element);\n\t\twith (ajax_load_element.style) {\n\t\t\tdisplay = '';\n\t\t\ttop = el_pos.top + 'px';\n\t\t\tleft = el_pos.left + 'px';\n\t\t\twidth = el_pos.width + 'px';\n\t\t\theight = el_pos.height + 'px';\n\t\t}\n\t}", "function showLoadingIcon(viewtype){\n\n if(viewtype == 'tab'){\n $(\".chart-loader-overlay\").show();\n }\n \n }", "static displayCircles(layer, pcode, result, maxValue){\n if (layer.feature.properties.adm3_ID == pcode && result > 0) {\n layer.feature.properties.selected = true\n layer.feature.properties.result = result\n // Turf is used to calculate the centroid of a layer\n if (layer.feature.properties.father_id != null) {\n var centroid = turf.pointOnFeature(layer.feature);\n var lon = centroid.geometry.coordinates[0];\n var lat = centroid.geometry.coordinates[1];\n let circle\n const radius = Mapper.getCircleRadius(result, maxValue, analyser.circleMaxRadius)\n circle = L.circleMarker([lat, lon], {\n \"weight\": 1,\n \"color\": analyser.circleContour,\n \"opacity\": 0.7,\n \"fillColor\": analyser.circleFill,\n \"fillOpacity\": 0.7,\n \"radius\": radius\n })\n propCircles.addLayer(circle)\n circle.bindPopup(Mapper.setPopUpContent(result, layer.feature.properties.adm3_name));\n circle.on('mouseover', function (e) {\n level4.eachLayer(l => {\n if (l.feature.properties.adm3_ID == layer.feature.properties.adm3_ID) {\n l.setStyle({\n \"weight\": 3,\n \"color\": \"#e91625\",\n \"opacity\": 0.7,\n \"fillColor\": \"#FFF\",\n \"fillOpacity\": 0\n });\n }\n })\n this.openPopup();\n });\n circle.on('mouseout', function (e) {\n level4.eachLayer(l => {\n if (l.feature.properties.selected == true) {\n l.setStyle({\n \"weight\": 1,\n \"color\": \"#000\",\n \"opacity\": 0.7,\n \"fillColor\": \"#FFF\",\n \"fillOpacity\": 0\n });\n }\n })\n this.closePopup();\n });\n }\n\n\n } else if (layer.feature.properties.pcode == pcode && result == 0) {\n layer.feature.properties.selected = true\n layer.setStyle({\n \"weight\": 1,\n \"color\": \"#000\",\n \"opacity\": 0.7,\n \"fillColor\": \"#FFF\",\n \"fillOpacity\": 0\n });\n layer.bindPopup(Mapper.setPopUpContent(result, layer.feature.properties.adm3_name));\n layer.on('mouseover', function (e) {\n this.openPopup();\n });\n layer.on('mouseout', function (e) {\n this.closePopup();\n });\n }\n }", "function redrawCircles( geoData ){\n // Remove circles currently on the page (TODO: Add as LayerGroup and transition)\n $('#bubbles_loading').show();\n layers.Centroids.clearLayers();\n _.each(geoData, function(geo) {\n var bubble = drawCircle(geo);\n });\n }", "function displayRedCircle()\n\t\t\t\t{\n\t\t\t\t\t$(\"#wrong_pic_holder\").css(\"display\",\"block\");\n\t\t\t\t\t$(\"#wrong_pic_holder\").css(\"opacity\",\"1\");\n\t\t\t\t\t$(\"#wrong_pic_holder\").css(\"top\",\"0px\");\n\t\t\t\t\t$(\"#wrong_pic_holder\").css(\"left\",\"120px\");\n\t\t\t\t\t$(\"#wrong_pic_holder\").css(\"width\",\"600px\");\n\t\t\t\t\t$(\"#wrong_pic_holder\").css(\"height\",\"600px\");\n\t\t\t\t}", "function showLoadingView() {\n $loader.css(\"display\", \"block\");\n }", "showBall(){\n noStroke()\n fill('#575dfa')\n circle(this._posX, this._posY, this._radius);\n }", "function showLoadingSpinner(){\n loader.hidden = false;\n quoteContainer.hidden = true;\n}", "function ksfCanvas_setLoading(enable)\n{\n\tif (enable)\n\t{\n\t\t$(GRAPH_ID).addClass(\"loading\");\n\t\t$(\"#graph-img\").css(\"display\", \"none\");\n\t}\n\telse\n\t{\n\t\t$(GRAPH_ID).removeClass(\"loading\");\n\t\t$(\"#graph-img\").css(\"display\", \"\");\n\t}\n}", "function showThisLoader(type, colorClass) {\n type = typeof type !== 'undefined' ? type : \"dots\";\n colorClass = typeof colorClass !== 'undefined' ? colorClass : 'dark';\n\n var loader = {\n dots : '<div class=\"loader-dots '+ colorClass +'\">' +\n '<div class=\"sk-bounce1\"></div>' +\n '<div class=\"sk-bounce2\"></div>' +\n '<div class=\"sk-bounce3\"></div>' +\n '</div>',\n cubeGrid : '<div class=\"loader-cube-grid '+ colorClass +'\">' +\n '<div class=\"sk-cube sk-cube1\"></div>' +\n '<div class=\"sk-cube sk-cube2\"></div>' +\n '<div class=\"sk-cube sk-cube3\"></div>' +\n '<div class=\"sk-cube sk-cube4\"></div>' +\n '<div class=\"sk-cube sk-cube5\"></div>' +\n '<div class=\"sk-cube sk-cube6\"></div>' +\n '<div class=\"sk-cube sk-cube7\"></div>' +\n '<div class=\"sk-cube sk-cube8\"></div>' +\n '<div class=\"sk-cube sk-cube9\"></div>' +\n '</div>',\n fadingCircle: '<div class=\"loader-fading-circle '+ colorClass +'\">' +\n '<div class=\"sk-circle1 sk-circle\"></div>' +\n '<div class=\"sk-circle2 sk-circle\"></div>' +\n '<div class=\"sk-circle3 sk-circle\"></div>' +\n '<div class=\"sk-circle4 sk-circle\"></div>' +\n '<div class=\"sk-circle5 sk-circle\"></div>' +\n '<div class=\"sk-circle6 sk-circle\"></div>' +\n '<div class=\"sk-circle7 sk-circle\"></div>' +\n '<div class=\"sk-circle8 sk-circle\"></div>' +\n '<div class=\"sk-circle9 sk-circle\"></div>' +\n '<div class=\"sk-circle10 sk-circle\"></div>' +\n '<div class=\"sk-circle11 sk-circle\"></div>' +\n '<div class=\"sk-circle12 sk-circle\"></div>' +\n '</div>'\n };\n\n if(loader[type] == undefined) {\n return type;\n } else {\n return loader[type];\n }\n\n}", "function showLoading(show) { $.overlay.style.opacity = show ? 1 : 0; }", "function showLoadingSpinner() {\n $('.demo-loading')\n .css({'display': 'block', 'opacity': 0.1})\n .animate({'opacity' : 1}, 300);\n }", "function fnLoading(o) {\n var d = $.extend({\n show: true,\n hide: false,\n delay: 2600\n }, o);\n $(\"#loadingWrapper\").remove();\n if (d.hide) return true;\n var blockG = [];\n for (var i = 1; i < 9; i++) blockG.push('<div class=\"blockG\"></div>');\n var loading = $('<div id=\"floatingBarsG\" />').append(blockG.join(\"\"));\n var overlay = $('<div class=\"bg-fixed bg-opacity\" />');\n $('<div id=\"loadingWrapper\" />').append(overlay, loading).appendTo(js.wrapper).hide().fadeIn(d.delay);\n loading.fnCenter();\n return true;\n }", "function showLoadingView() {\n\n}", "function showLoadingView() {\n let $board =$('#jeopardy').empty()\n let $menu = $('.menu');\n $menu.css('display','none');\n $board.append('<div class=\"center\"><i class=\"fas fa-circle-notch fa-spin fa-5x\"></i></div>')\n\n\n}", "function setPreloader(el){\n var str = '<div class=\"circle-cont\">';\n for( var i = 1 ; i <= 3 ; i++ ) str += '<div class=\"c-el c-el-'+i+'\"></div>';\n el.append(str+'</div>').addClass(\"blocked\");\n }", "function getCircleLoader(elt){\n\treturn new ProgressBar.Circle(elt, {\n\tcolor: '#888',\n\t// This has to be the same size as the maximum width to\n\t// prevent clipping\n\tstrokeWidth: 4,\n\ttrailWidth: 1,\n\teasing: 'easeInOut',\n\tduration: 1400,\n\ttext: {\n\t\tautoStyleContainer: false\n\t},\n\tfrom: { color: '#EB004F', width: 4 },\n\tto: { color: '#fff', width: 4 },\n\t// Set default step function for all animate calls\n\tstep: function(state, circle) {\n\t\tcircle.path.setAttribute('stroke', state.color);\n\t\tcircle.path.setAttribute('stroke-width', state.width);\n\n\t\tvar value = Math.round(circle.value() * 100);\n\t\t// if (value === 0) {\n\t\t// circle.setText('');\n\t\t// } else {\n\t\t// circle.setText(value+\" %\");\n\t\t// }\n\n\t}\n\t});\n}", "function ajaxindicatorstart() {\n if ($('body').find('#loadingDiv').attr('id') != 'loadingDiv') {\n var loadingString = '<div id=\"loadingDiv\" class=\"modal1\"><div id=\"loading-image\" class=\"center\"><img src=\"../assets/img/loader.gif\" alt=\"Loading...\" /></div></div>';\n $('body').append(loadingString);\n $('#loadingDiv .bg').height('100%');\n $('#loadingDiv').fadeIn(300);\n $('body').css('cursor', 'wait');\n }\n }", "function loading() {\n $(\"#container\").hide(function() {\n $(\"body\").append(\"<i id='gear' class='fa fa-gear fa-spin' style='font-size: 500px; color: #023a8c;'></i>\");\n })\n .delay(200).fadeIn(200);\n }", "function showLoader(){\n\t //show Loader\n $(\"#result\").html('<img src=\"images/grey.gif\" style=\"width:20%; top:-5em;left:80%;\"/>');\n\t}", "function loading() {\n loader.hidden = false;\n quoteContainer.hidden = true;\n}", "function loading() {\n loader.hidden = false;\n quoteContainer.hidden = true;\n}", "function Progress(el){\n $(el).circleProgress({fill: {color:'navy'},animation:{duration:10000, easing:'circleProgressEasing'},animationStartValue: 1.0,reverse:true})\n }", "loadProgress() {\r\n (this.type === 'radial') ? this.radialProgress() : this.linearProgress();\r\n }", "function showLoading() {\n _updateState(hotelStates.SHOW_LOADING);\n }", "function showLoadingImage(container) {\n container.empty().append('<div class=\"barspinner dark\"><div class=\"rect1\"></div><div class=\"rect2\"></div><div class=\"rect3\"></div><div class=\"rect4\"></div><div class=\"rect5\"></div></div>');\n}", "function loadingGif(){\n $(document).ajaxSend(function(){\n $(\".cssload-container\").css(\"display\",\"block\");\n });\n $(document).ajaxComplete(function(){\n $(\".cssload-container\").css(\"display\",\"none\");\n });\n }", "function initCircles() {\n CIRCLE_PROPS.forEach((props) => {\n let ele = id(props.id);\n const length = props.radiusPixels * 2.0 + \"px\";\n ele.style.height = length;\n ele.style.width = length;\n ele.style.borderWidth = props.borderWidthPixels + \"px\";\n const parentWidth = id(\"game-frame\").getBoundingClientRect().width;\n const parentHeight = id(\"game-frame\").getBoundingClientRect().height;\n ele.style.left = parentWidth * props.leftInitialPct - STYLE_OFFSET + \"px\";\n ele.style.top = parentHeight * props.topInitialPct - STYLE_OFFSET + \"px\";\n });\n setCircleVisibility(true);\n addDragListeners();\n }", "function loader(){\r\n\t// all other images will be dynamic as well, so this is like RL flash, loading in images from IA images\r\n\tarrPath[0] = [\"purple\",\"contLogo\",\"blank\"];\r\n\tarrPath[1] = [];\r\n\tarrPath[2] = [\"black\"];\r\n\tarrPath[3] = [\"blank\",\"expMenu\",\"blank\",\"menuBar1\",\"menuBar2\",\"expLaundry\",\"expKitchen\",\"expBathroom\",\"expNursery\"];\r\n\tarrPath[4] = [];\r\n\tarrPath[5] = [\"blank\",\"blank\",\"blank\",\"blank\",\"blank\",\"blank\",\"blank\",\r\n\t\t\t\t\t\"blank\",\"blank\",\"blank\",\"blank\",\"blank\",\"blank\"];\r\n\tarrPath[6] = [\"blank\",\"blank\",\"blank\",\"blank\",\"blank\",\"blank\"];\r\n\tarrPath[7] = [];\r\n\t// set up the banner elements\r\n\t\r\n\t//set dynamic phone images\r\n\tfor(var m=0; m<spinMax; m++){\r\n\t\tarrPos356[1].push([[\"px\", m*gap+ 30],0,,,gap,558]);\r\n\t\tarrPath[1].push(\"p\"+m);\r\n\t}\r\n\tpreLoader(); \r\n\r\n\ttrace(circle1)\r\n}", "showLoadingView() {\n $('#start').empty();\n document.getElementById('start').innerHTML = 'Loading! ';\n $('#start').append($('<i class=\"fas fa-spinner fa-pulse\"></i>'))\n $('#load-screen').append($('<i id=\"loading\" class=\"mt-4 fas fa-spinner fa-pulse\"></i>'))\n }", "_displayLoading() {\n if (this.state.isLoading) {\n return (\n <View style={styles.loading_container}>\n <ActivityIndicator size='large' />\n {/* Le component ActivityIndicator possède une propriété size pour définir la taille du visuel de chargement : small ou large. Par défaut size vaut small, on met donc large pour que le chargement soit bien visible */}\n </View>\n )\n }\n }", "function addLoad(){\n $('#loadingPopup').css('display', 'block');\n }", "function _showLoader() {\r\n spinner.classList.add('fa', 'fa-refresh', 'fa-spin');\r\n spinner.style.marginRight = \"8px\";\r\n }", "function addLoader(){\n\t\t\t\t\t$contain.append( '<i class=\"enlarge_loader\"><i></i></i>' );\n\t\t\t\t}", "function loading_show(){\n $('#loading3').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function showLoading(){\n\tdiv_loading.classList.remove('d-none');\n\tdiv_trading.classList.add('d-none');\n\tdiv_login.classList.add('d-none');\n\tdiv_options.classList.add('d-none');\n}", "function startLoader() {\r\n\t$(\"#fe\").show();\r\n\t$(\"#fe_intro_moon\").html(\"<img src='img/hf_moon_state_0.png'><p></p>\");\r\n\tanimateLoader();\r\n}", "function checkLoading() {\n\n\t if(iLoaded == iTotal){\n\n\t $folioItems.each(function(){\n\n\t TweenMax.to($(this)[0], .2, {\n\t opacity: 1,\n\t delay: .2+$(this).index()*.1,\n\t onCompleteScope: $(this), \n\t onComplete: function(){\n\t $(this).removeClass('isotope-hidden');\n\t }\n\t });\n\n\t });\n\n\t $loader.fadeOut(150);\n\n\t }\n\n\t }", "function showQuake() {\r\n d3.select(\".circle\").style(\"visibility\",\"visible\")\r\n }", "function show_loading() { // 显示加载动画\n $(\".content\").append('<div id=\"app-loading\" class=\"app-loading flex-center\"><div class=\"loading-icon\"></div></div>')\n $(\".app-loading\").css(\"background\", \"rgba(0, 0, 0, 0.1)\");\n}", "function showReqRings() {\n switch (level) {\n case 1:\n $('.ringContainer').append('<div class=\"ring ring6\"></div>');\n $('.ring6').fadeTo(250, 1).addClass('dynamicBorderColor');\n break;\n case 2:\n $('.ringContainer').append('<div class=\"ring ring8\"></div>');\n $('.ring8').fadeTo(250, 1).addClass('dynamicBorderColor');\n break;\n case 3:\n $('.ringContainer').append('<div class=\"ring ring11\"></div>');\n $('.ring11').fadeTo(250, 1).addClass('dynamicBorderColor');\n break;\n }\n setTimeout(function () {\n $('.mathGameBoard').removeClass('offScreen').fadeTo(800, 1);\n timedCount();\n }, 2500);\n }", "function loading() {\n push();\n textSize(32);\n textStyle(BOLD);\n textAlign(CENTER, CENTER);\n text(`Loading ${modelName}...`, width / 2, height / 2);\n pop();\n}", "function showLoader()\n {\n\t\t// $('.loader-container').show();\n // $('.loader-container').preloader({\n // zIndex: 1000,\n // setRelative: false\n // });\n // $('.loader-back').show();\n }", "function startLoadingAnimation()\n{\n\tvar dots = 0;\n\tvar animate_loading_dots = function ()\n\t{\n\t\tvar loading = \"Loading\";\n\t\tfor (var i = 0; i < dots; i++) {\n\t\t\tloading = loading + \".\";\n\t\t}\n\t\tdocument.getElementById(\"episode_name\").object.textElement.innerText = loading;\n\t\t\n\t\tif (++dots > 3) {\n\t\t\tdots = 0;\n\t\t}\n\t};\n\t\n\tloading_animation_timer = setInterval(animate_loading_dots, 500);\n}", "function royalLoading() {\n\n\t\t// HTML\n\t\tif ( $('.royal-loading').length === 0 ) {\n\t\t\t$('<div class=\"royal-loading\">Loading<div>').appendTo('body');\n\t\t}\n\n\t\t// define\n\t\tvar loading = $('.royal-loading');\n\n\t\t// CSS\n\t\tloading.css({\n\t\t\t'display' \t\t: 'none',\n\t\t\t'position' \t\t: 'fixed',\n\t\t\t'z-index' \t\t: '1000',\n\t\t\t'top' \t\t\t: '30px',\n\t\t\t'right' \t\t: '30px',\n\t\t\t'padding' \t\t: '13px 21px',\n\t\t\t'background' \t: 'rgba(0, 0, 0, 0.85)',\n\t\t\t'color' \t\t: '#fff',\n\t\t\t'box-shadow' \t: '0 0 2px 0px #000',\n\t\t\t'font-family' \t: 'arial, sans-serif',\n\t\t\t'font-size' : '14px',\n\t\t\t'font-weight' : 'bold',\n\t\t\t'text-transform': 'uppercase',\n\t\t\t'letter-spacing': '1px',\n\t\t});\n\n\t\t// show on change\n\t\tloading.fadeIn('slow');\n\n\t\t// hide when done\n\t\t$(window).on( 'load', function() {\n\t\t\tloading.fadeOut('slow');\n\t\t});\n\n\t}", "function loading_show(){\n $('#loading4').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function letsDraw() {\n $(\"<div class = 'new-circles'\" + whereTo() + \"></div>\").appendTo('.back');\n }", "function loaderCircleType1(current, max) {\n var percent = (current / max) * 100;\n var loadLeft = Math.round((percent / 100) * (230));\n var loadRight = Math.round(230 * (percent / 100)) - 5; //(210-230); //100%\n /*<shape> = rect(<top>, <right>, <bottom>, <left>)*/\n document.getElementById(\"loaderCircleLeft\").style.clip = \"rect(-50px, \" + loadLeft + \"px, 310px, -50px)\";\n document.getElementById(\"loaderCircleRight\").style.clip = \"rect(-50px, 310px, 310px, \" + loadRight + \"px)\";\n document.getElementById(\"loaderCircleLabel\").innerHTML = Math.round(percent) + \"%\";\n}", "function startLoadingAnimation()\n{\n var dots = 0;\n var animateLoadingDots = function ()\n {\n var loading = dashcode.getLocalizedString(\"Laden\");\n for (var i = 0; i < dots; i++) {\n loading = loading + \".\";\n }\n document.getElementById(\"episodeName\").object.setOptions([loading]);\n\n \n if (++dots > 3) {\n dots = 0;\n }\n };\n loadingAnimationTimer = setInterval(animateLoadingDots, 500);\n}", "function showBuildingUiIndicator()\n {\n $(document.body).addClass('spot_easy_mode_loading');\n\n insertProgressIndicator();\n\n updateProgressIndicator(\n 'Building UI <span id=\"spot_easy_mode_loader_progress\">0</span>%'\n );\n }", "function loadingStatus(mapDefinition) {\n\n mapDefinition._currentPercentage = mapDefinition._currentPercentage + mapDefinition._percentagePerPoint;\n mapDefinition._loadingProgress.setProgress(mapDefinition._currentPercentage);\n mapDefinition._pointsProcessed++;\n\n if (mapDefinition._pointsProcessed == mapDefinition._pointsArray.length) {\n flyToBounds(mapDefinition);\n $('.ladda-label').text('Carregado');\n $('.loading-points').toggle('slow');\n }\n }", "function loading_show(){\n $('#loading6').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function showLoading(){\n var wrap = $('<div>').addClass('loading');\n var h2 = $('<h2>').text('Loading....');\n var img = $('<img>').attr('src', 'https://loading.io/spinners/wave/lg.wave-ball-preloader.gif').attr('alt', 'loading...');\n\n $(wrap).append(h2,img);\n\n $(\"#loading\").append(wrap)\n }", "function addLoadingIndicator() {\n $(\"#calculate-btn\").addClass(\"disabled\");\n $(\"#chance-text-number\").html(\"---\");\n $(\"#error-wrapper\").hide();\n $(\"#results-wrapper\").show();\n $(\"#calculate-btn span\").show();\n}", "function loader(status) {\n jQuery(\"#loadIndicatorContainer\").dxLoadPanel({\n shadingColor: \"rgba(0,0,0,0.4)\",\n position: { of: \"#loading\" },\n showIndicator: true,\n showPane: true,\n shading: true,\n visible: status\n });\n}", "function loading_show(){\n $('#loading5').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function loading_show(){\n \t\t$('#loading').html(\"<img src='img/loading.gif'/>\").fadeIn('fast');\n }", "function setCircleProgress(num) {\n\tfor (i = 0; i <= 9; i++) {\n\t\tif (i <= num) d3.select(eval('\"#circle_' + i + '\"')).style(\"background\",\"#D3D3D3\");\n\t\tif (i > num) d3.select(eval('\"#circle_' + i + '\"')).style(\"background\",\"white\");\n\t}//for i\t\n}//setCircleProgress", "function loading_show(){\n $('#loading7').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function loadAnimationComplete() {\n circleLoader.hide();\n\n // Fade out the black background\n TweenMax.to(preloadBg, 0.3, { opacity : 0, onComplete : bgAnimationComplete } );\n }", "loadingComplete() {\n // Show the canvas or something\n $('body').removeClass('loading');\n }", "function drawCircles() {\n for (var i = 0; i < numCircles; i++) {\n var randomX = Math.round(-100 + Math.random() * 704);\n var randomY = Math.round(-100 + Math.random() * 528);\n var speed = 1 + Math.random() * 3;\n var size = 1 + Math.random() * circleSize;\n\n var circle = new Circle(speed, size, randomX, randomY);\n circles.push(circle);\n }\n update();\n }", "function loading_show(){\n $('#loading2').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "function showQuiosqueLoad(){\n $(\"#myloadingDiv\" ).show();\n }", "function addLoadingIndicator() {\n $(\"#calculate-btn\").addClass(\"disabled\");\n $(\"#chance-text-number\").html(\"---\");\n $(\"#calculate-btn span\").show();\n}", "function ShowLoader() {\n var overlay = jQuery(\n '<div id=\"loading-overlay\" style=\"position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.6); z-index: 10000;\">' +\n ' <div style=\"text-align: center; width: 100%; position: absolute; top: 40%; margin-top: -50px;\"> ' +\n ' <div class=\"preloader-wrapper big active\"> ' +\n ' <div class=\"spinner-layer spinner-blue\"> ' +\n ' <div class=\"circle-clipper left\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div>' +\n ' <div class=\"gap-patch\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div>' +\n ' <div class=\"circle-clipper right\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div> ' +\n ' </div> ' +\n ' <div class=\"spinner-layer spinner-red\"> ' +\n ' <div class=\"circle-clipper left\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div>' +\n ' <div class=\"gap-patch\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div>' +\n ' <div class=\"circle-clipper right\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div> ' +\n ' </div> ' +\n ' <div class=\"spinner-layer spinner-yellow\"> ' +\n ' <div class=\"circle-clipper left\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div>' +\n ' <div class=\"gap-patch\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div>' +\n ' <div class=\"circle-clipper right\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div> ' +\n ' </div> ' +\n ' <div class=\"spinner-layer spinner-green\"> ' +\n ' <div class=\"circle-clipper left\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div>' +\n ' <div class=\"gap-patch\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div>' +\n ' <div class=\"circle-clipper right\"> ' +\n ' <div class=\"circle\"></div> ' +\n ' </div> ' +\n ' </div> ' +\n ' </div> ' +\n ' </div> ' +\n '</div>');\n overlay.appendTo(document.body);\n}", "drawLoading() {\n let g = this,\n cxt = g.context,\n img = imageFromPath(allImg.startBg);\n // Draw loading picture\n cxt.drawImage(img, 119, 0);\n }", "function createCircle() {\n $.get(\"/shape/circle\", function (data, status) {\n var obj = JSON.parse(data);\n app.drawCircle(obj.loc,obj.radius,obj.color);\n }, \"json\");\n}", "function updateLoadingImageThemeProgress(progress) { \r\n var $progress = $(\".circleLoadingProgress\");\r\n var $error = $(\".circleLoadingError\");\r\n if($error.is(\":visible\"))\r\n $error.hide();\r\n if(!$progress.is(\":visible\"))\r\n $progress.show();\r\n $progress.find(\"#circleLoadingProgress\").text(progress);\r\n}", "function showLoading() {\r\n\t\tvar element = document.getElementsByName(tbodyId + \"-loading\");\r\n\t\t/*if(element != null) {\r\n\t\t\tfor(var i=0;i<element.length;i++) {\r\n\t\t\t\tnew Effect.Opacity(element[i], {duration:1, from:0.4, to:0.4});\r\n //Effect.Appear(element[i]);\r\n\t\t\t}\r\n\t\t}*/\r\n\t}", "function show_indicator() {\n $('.loading-indicator').show();\n}", "showLoading() {\n var includedTypes = [0, 1, 5, 6];\n if (this.showProgress && this.config && includedTypes.includes(this.config.TypeId)) {\n this.progressBar = Lobibox.progress({\n title: flexygo.localization.translate('process.executing'),\n closeOnEsc: false,\n closeButton: false,\n onShow: () => { this.progressTimer = setInterval(() => this.moveLoading(), 500); }\n });\n }\n }", "function loading(show=false){\n loadingElement = d3.select(\"#loading\");\n if (show){\n loadingElement.style('display', 'block');\n } else{\n loadingElement.style('display', 'none');\n }\n }", "showLoadingIndicator() {\n this.loadingBar.classList.add('visible', 'infinite');\n }", "function showPageLoading() {\n $(\"div.loading-page\").css(\"display\", \"block\");\n $(\".main-page-core\").css(\"opacity\", \"1\");\n $(\".loading-icon\").css(\"display\", \" none\");\n}", "function loading_show(){\n $('#loading').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "_loading() {\n }", "function drawLoadingScreen() {\n if (simulation) {\n drawProgressBar(canvas.width / 2 - 100, canvas.height / 2 - 8, 200, 16, simulation.resourceManager.getProgress(), \"#888888\");\n drawRectOutline(canvas.width / 2 - 100, canvas.height / 2 - 8, 200, 16, 1, \"#888888\")\n }\n}", "function showLoadingScreen() {\n ctx.fillStyle = \"white\";\n ctx.textAlign = \"center\";\n ctx.font = \"1.7em Alegreya Sans SC\", \"1.7em sans-serif\";\n ctx.fillText(\"loading model...\", canvas.width / 2, canvas.height / 2);\n}", "function loading_show(){\n $('#loading8').html(\"<img src='../assets/img/loading.gif'/>\").fadeIn('fast');\n }", "showPageLoadingIndicator() {\n\t\tgetComponentElementById(this,\"DataListLoading\").html('<div class=\"dx-loading\"></div>').show();\n\t}", "function Procesando() {\n $(\"#divLoading\").show();\n }", "function onLoadProgress() {\n let percentage = activeLayer.getLoadingPercentage();\n percentage = Math.round(percentage);\n percentage = percentage > 100 ? 100 : percentage;\n\n if (percentage % 10 === 0) {\n loadingBar.container.innerHTML = htmlLoadingBar(percentage);\n console.log(`Loaded: ${percentage}`);\n }\n loadingBar.container.innerHTML = htmlLoadingBar(percentage);\n if (percentage === 100) {\n franceLightLayer.addTo(map);\n loadingBar.remove();\n }\n}", "function setReady(n) {\n switch (n) {\n case 0:\n circle1.color = \"green\";\n circle2.color = \"white\";\n circle3.color = \"white\";\n circle4.color = \"white\";\n break;\n case 1:\n circle1.color = \"white\";\n circle2.color = \"green\";\n circle3.color = \"white\";\n circle4.color = \"white\";\n break;\n case 2:\n circle1.color = \"white\";\n circle2.color = \"white\";\n circle3.color = \"green\";\n circle4.color = \"white\";\n break;\n case 3:\n circle1.color = \"white\";\n circle2.color = \"white\";\n circle3.color = \"white\";\n circle4.color = \"green\";\n break;\n }\n // stage.update();\n }", "function showloading(){ // waiting/working gif-animation\n $(\"#loading\").showv();\n}", "renderMinimapCircles(ctx) {\n ctx.save();\n drawCircleAndFill(ctx, this.size, '#000');\n\n _.each(PLANET_CIRCLES, (factor) => {\n let size = factor * this.size;\n let offset = (this.size - size) / 2;\n ctx.translate(offset, offset);\n strokeCircle(ctx, size, '#1A6D29');\n ctx.translate(-offset, -offset);\n });\n ctx.restore();\n }", "function loading() {\n}", "static updateCircles(libMap) {\n LibrariesMap.libCirclesGroup.selectAll(\"circle\")\n .attr(\"cx\", function(d){ return libMap.latLngToLayerPoint([d.localisation.latitude, d.localisation.longitude]).x })\n .attr(\"cy\", function(d){ return libMap.latLngToLayerPoint([d.localisation.latitude, d.localisation.longitude]).y })\n }", "injectCircularLoaderIndeterminate() {\n this.root.innerHTML = `<svg version=\"1.1\" id=\"L1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 100 100\" enable-background=\"new 0 0 100 100\" xml:space=\"preserve\">\n <circle fill=\"none\" stroke=\"currentColor\" stroke-width=\"6\" stroke-miterlimit=\"15\" stroke-dasharray=\"14.2472,14.2472\" cx=\"50\" cy=\"50\" r=\"47\" >\n <animateTransform \n attributeName=\"transform\" \n attributeType=\"XML\" \n type=\"rotate\"\n dur=\"5s\" \n from=\"0 50 50\"\n to=\"360 50 50\" \n repeatCount=\"indefinite\" />\n </circle>\n <circle fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\" stroke-miterlimit=\"10\" stroke-dasharray=\"10,10\" cx=\"50\" cy=\"50\" r=\"39\">\n <animateTransform \n attributeName=\"transform\" \n attributeType=\"XML\" \n type=\"rotate\"\n dur=\"5s\" \n from=\"0 50 50\"\n to=\"-360 50 50\" \n repeatCount=\"indefinite\" />\n </circle>\n <g fill=\"currentColor\">\n <rect x=\"30\" y=\"35\" width=\"5\" height=\"30\">\n <animateTransform \n attributeName=\"transform\" \n dur=\"1s\" \n type=\"translate\" \n values=\"0 5 ; 0 -5; 0 5\" \n repeatCount=\"indefinite\" \n begin=\"0.1\"/>\n </rect>\n <rect x=\"40\" y=\"35\" width=\"5\" height=\"30\" >\n <animateTransform \n attributeName=\"transform\" \n dur=\"1s\" \n type=\"translate\" \n values=\"0 5 ; 0 -5; 0 5\" \n repeatCount=\"indefinite\" \n begin=\"0.2\"/>\n </rect>\n <rect x=\"50\" y=\"35\" width=\"5\" height=\"30\" >\n <animateTransform \n attributeName=\"transform\" \n dur=\"1s\" \n type=\"translate\" \n values=\"0 5 ; 0 -5; 0 5\" \n repeatCount=\"indefinite\" \n begin=\"0.3\"/>\n </rect>\n <rect x=\"60\" y=\"35\" width=\"5\" height=\"30\" >\n <animateTransform \n attributeName=\"transform\" \n dur=\"1s\" \n type=\"translate\" \n values=\"0 5 ; 0 -5; 0 5\" \n repeatCount=\"indefinite\" \n begin=\"0.4\"/>\n </rect>\n <rect x=\"70\" y=\"35\" width=\"5\" height=\"30\" >\n <animateTransform \n attributeName=\"transform\" \n dur=\"1s\" \n type=\"translate\" \n values=\"0 5 ; 0 -5; 0 5\" \n repeatCount=\"indefinite\" \n begin=\"0.5\"/>\n </rect>\n </g>\n </svg>`;\n }", "function sc_displayCircle(o, p) {\n if (p === undefined) // we assume not given\n\tp = SC_DEFAULT_OUT;\n p.appendJSString(sc_toCircleString(o, sc_toDisplayString));\n}" ]
[ "0.68288267", "0.6773165", "0.67679703", "0.67341626", "0.65690327", "0.6504819", "0.6493884", "0.64534014", "0.6392278", "0.63875353", "0.637661", "0.6375635", "0.6326262", "0.6315794", "0.63055265", "0.62956375", "0.62952054", "0.6270665", "0.626664", "0.6258702", "0.6256588", "0.6228604", "0.6226267", "0.62195045", "0.62106395", "0.6210082", "0.6209419", "0.6206565", "0.6198558", "0.6190745", "0.61715585", "0.6162346", "0.6162346", "0.61561024", "0.6155185", "0.6154417", "0.6154078", "0.6139098", "0.6135602", "0.612716", "0.61248285", "0.6118165", "0.61180353", "0.6103504", "0.60901684", "0.60797745", "0.60624206", "0.6062338", "0.60584986", "0.6058246", "0.60568106", "0.6054251", "0.60464704", "0.6039557", "0.6036739", "0.6034091", "0.60320616", "0.6016718", "0.60137117", "0.60124105", "0.601098", "0.60105723", "0.6009487", "0.60047364", "0.5991849", "0.59897196", "0.5983678", "0.59826595", "0.59763193", "0.5974111", "0.59723437", "0.59709024", "0.5970112", "0.5959204", "0.59591186", "0.59515435", "0.5948754", "0.59487146", "0.59471935", "0.5946385", "0.5944871", "0.5942466", "0.59421754", "0.594107", "0.59409773", "0.59395605", "0.5938381", "0.5933455", "0.5933434", "0.59285545", "0.5928375", "0.59219706", "0.5914617", "0.5912403", "0.59046566", "0.5898249", "0.58979565", "0.5896363", "0.58937865", "0.58900595", "0.5888794" ]
0.0
-1
not part of the exercise
function getRandomColor() { let r = 0; let b = 255; let g = 0; //Math.round(Math.random()*255); return "rgb(" + r + "," + g + "," + b + ")"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "static private internal function m121() {}", "private public function m246() {}", "function exercise07() {}", "function exercise11() {}", "function solution(s) {\n\n}", "protected internal function m252() {}", "function exercise06() {}", "transient protected internal function m189() {}", "analyze(input){ return null }", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}" ]
[ "0.61473906", "0.60381895", "0.598922", "0.5901573", "0.5889553", "0.5886507", "0.5739726", "0.57042366", "0.55252826", "0.5421095", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926" ]
0.0
-1
return null if not exist
getDataFromEntry(entry){ let _item = this.getFromEntry(entry); if(this._isNullItem(_item)) return null; ON_LOG && console.log('getDataFromEntry' , entry, _item); return _item.data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "returnIfExists(obj, objName){\n if(obj === undefined) throw new ResourceNotFoundError;\n else return obj;\n }", "existingTransaction(public_key) {\n //if not found it will return undefined\n return this.transactions.find(t => t.input.address === public_key);\n }", "exist(item, queue) {\n const d = deferred();\n\n this.find(item, queue).then(function(res) {\n return d.resolve(res !== undefined && res !== null);\n }).done();\n\n return d.promise();\n }", "function checkIfFound(a) {\n return new Promise(function(resolve, reject) {\n if (a === undefined) {\n reject(new NotFoundError('Row wasn\\'t found.'));\n } else {\n resolve(a);\n }\n })\n}", "existingPlayer(playerName) {\n if(this.players.length > 0) {\n let player = this.players.find((value) => {\n if(value.name === playerName) {\n return value;\n }\n });\n return (player) ? true : false;\n }\n return false;\n }", "function findClzIfExist(req, res, next){\n const clzId = req.params.clzId;\n Clz\n .find({ _id: clzId })\n .exec()\n .then(clz => {\n if(!clz){\n res.status(500).json({\n state: false\n })\n } else{\n console.log(\"clz found\");\n next()\n }\n })\n .catch(err => {\n res.status(500).json({\n state: false,\n Message: \"Class Id isn't exist\"\n })\n })\n}", "remoteFileExists(communityUuid,documentUuid,callback){\n this._execute(\"/files/basic/api/communitylibrary/\"+communityUuid+\"/document/\"+documentUuid+\"/entry\",\n function(err, httpResponse, body){\n if(err){\n callback(err); \n }\n else{\n var checkErrorCode = body.match(\"<td:errorCode>(.*?)</td:errorCode>\")\n if(checkErrorCode !== null){\n\n if(checkErrorCode.includes(\"ItemNotFound\")){\n callback(\"Item Not Found\")\n }else{\n console.log(checkErrorCode);\n callback(checkErrorCode);\n }\n }\n else{\n callback(null);\n }\n }\n })\n }", "function existy(x){\n return x != null \n}", "exists() {\n return Boolean(this.id());\n }", "function exists(x) { return x !== null; }", "async function checkUserNameIsExist(userNameParam) {\n const result = await User.findOne({userName: userNameParam},function(err,obj){\n\n if(obj === null){\n return null\n }else {\n return obj\n } \n })\n return result\n}", "async exists(id) {\n // Please watch out if future versions of sqlite\n // change the return value to null, which is a more\n // correct return type than undefined. To defend\n // myself from this, I have used a `!=` instead of\n // a `!==`.\n return (await this._withDb(async (db) => await db.get(\n 'SELECT id FROM images WHERE id = ?', id\n ))) != undefined;\n }", "function oidExist(oid){\n return itemOp.findOne({oid: oid})\n .then(\n function(data){\n if(!data){\n return new Promise(function(resolve, reject) { resolve(oid) ;} );\n } else {\n oid = uuid();\n oidExist(oid);\n }\n })\n .catch(\n function(err){\n return new Promise(function(resolve, reject) { reject('Error in Mongo: ' + err) ;} );\n });\n}", "function name_exists(name) {\n return name\n}", "fetchByName(name) {\n // Name should be unique. Return first match or null if undefined.\n return this.data.filter(fruit => fruit.name === name)[0] || null;\n }", "getAlbumInArtist(artist, albumName){\n return this.returnIfExists(artist.albums.find((a)=> a.name === albumName), \"album \" + albumName);\n }", "getById(id) {\n console.log(\"getById(\" + id + \")\");\n let result = this.tvShows.find(show =>\n (show === undefined ? null : show.id) == id);\n if (result) return result;\n else return null;\n }", "async function getNonExistingRandomId() {\n let tempId = \"scanId_\" + crypto.randomBytes(7).toString(\"hex\");\n let checkId = await ScanResults.find({ scanId: tempId });\n if (checkId.length > 0) {\n return getNonExistingRandomId();\n } else return tempId;\n}", "get ifNoneExist() {\n\t\treturn this.__ifNoneExist;\n\t}", "function getPatVerfuegungExistiert() {\n if ((localStorage.get('patVerfuegungExistiert')) && (localStorage.get('patVerfuegungExistiert') !== '') && (localStorage.get('patVerfuegungExistiert') !== 'null')) {\n return (\n <Text style={PDFstyles.text}>Patientenverfügung\n existiert: {localStorage.get('patVerfuegungExistiert')}</Text>\n )\n }\n}", "search(key) {\r\n const hash = this.calculateHash(key);\r\n if(this.values.hasOwnProperty(hash) && this.values[hash].hasOwnProperty(key)) {\r\n return this.values[hash][key];\r\n } else {\r\n return null;\r\n }\r\n }", "function isExist(collection,param,callback)\n\t\t{\n\t\tdb.collection(collection).findOne(param,function(err,res)\n\t\t\t{\n\t\t\tif (err!=null){console.log('Error find docs when check existence!',url,collection,param,err);callback(err);return false;}\t\n\t\t\tcallback(null,res!=null);\n\t\t\t})\n\t\t}", "getFileId(name) {\n let matches = this.entries.filter(e => e.name === name);\n if (matches.length > 0) {\n return matches[0];\n } else {\n return null;\n }\n }", "function search(x, arr) {\n return null; \n}", "exists(){}", "function serviceExists(service) {\n let serviceNotFound = () => ({\n title: 'Service Not Found',\n detail: `service name: ${service}`\n });\n return servicesDb.get({ ServiceName: service })\n .then((rsp => (rsp ? [] : serviceNotFound())),\n (err) => {\n log.warn(err);\n return serviceNotFound();\n });\n}", "snoopWriteMiss(tag) {\r\n //console.log('DEBUG ' + this.name + '.snoopWriteMiss(tag=' + tag + ')')\r\n let lineNum = this.lineInCache(tag)\r\n if(lineNum == null) {\r\n //console.log('DEBUG ' + this.name + ': not in this cache')\r\n return null\r\n } else {\r\n //console.log('DEBUG ' + this.name + ': found in this cache')\r\n\t return this.getValuesAndInvalidate(lineNum)\r\n }\r\n }", "static checkExist(userId) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const currentDay = moment();\n const campInfo = yield campaigninfo_1.CampaignInfoDAL.findOne({\n where: {\n UserId: userId,\n IsDeleted: false,\n EndDate: {\n $gte: currentDay\n }\n },\n raw: true\n });\n const status = campInfo === null ? false : true;\n return {\n status,\n data: campInfo\n };\n }\n catch (error) {\n throw error;\n }\n });\n }", "async firstOrFail() {\r\n const result = this.first();\r\n if (!result) {\r\n throw new NotFoundException('Resource');\r\n }\r\n return result;\r\n }", "function existLive(id){\n var booking = Bookings_Live.findOne({ \"segmentID\" : id , \"screenID\": Session.get(\"SCREEN_ID\")});\n return booking == undefined;\n}", "function exists(obj){\r\n\tif (obj){\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "function findFirstFilenameNotTaken(confPath, fileName) {\n return new Promise(function(resolve, reject) {\n // let's find the extension if it exists\n var fileExtension = new RegExp( settings.regexpGetFileExtension, 'i').exec( fileName)[0];\n var fileNameWithoutExtension = new RegExp( settings.regexpRemoveFileExtension, 'i').exec( fileName)[1];\n fileNameWithoutExtension = slugg(fileNameWithoutExtension);\n dev.logverbose(\"Looking for existing file with name : \" + fileNameWithoutExtension + \" in confPath : \" + confPath);\n try {\n var newFileName = fileNameWithoutExtension + fileExtension;\n var newMetaFileName = fileNameWithoutExtension + settings.metaFileext;\n var index = 0;\n var newPathToFile = path.join(confPath, newFileName);\n var newPathToMeta = path.join(confPath, newMetaFileName);\n dev.logverbose( \"2. about to look for existing files.\");\n // check si le nom du fichier et le nom du fichier méta sont déjà pris\n while( (!fs.accessSync( newPathToFile, fs.F_OK) && !fs.accessSync( newPathToMeta, fs.F_OK))){\n dev.logverbose(\"- - following path is already taken : newPathToFile = \" + newPathToFile + \" or newPathToMeta = \" + newPathToMeta);\n index++;\n\n newFileName = fileNameWithoutExtension + \"-\" + index + fileExtension;\n newMetaFileName = fileNameWithoutExtension + \"-\" + index + settings.metaFileext;\n newPathToFile = path.join(confPath, newFileName);\n newPathToMeta = path.join(confPath, newMetaFileName);\n }\n } catch(err) {\n\n }\n dev.logverbose( \"3. this filename is not taken : \" + newFileName);\n resolve(newFileName);\n });\n }", "exists(id){\n if (typeof id !== \"undefined\"){\n id = String(id);\n let exists = document.getElementById(id);\n if (exists !== null){\n return true;\n } else {\n return false;\n }\n } else {\n console.log(\"exists - \" + \"(\" + \"ERROR - invalid parameter (id)\" + \")\");\n } // end if\n }", "function getVorsorgeauftragExistiert() {\n if ((localStorage.get('vorsorgeauftragExistiert')) && (localStorage.get('vorsorgeauftragExistiert') !== '') && (localStorage.get('vorsorgeauftragExistiert') !== 'null')) {\n return (\n <Text style={PDFstyles.text}>Vorsorgeauftrag\n existiert: {localStorage.get('vorsorgeauftragExistiert')}</Text>\n )\n }\n}", "exists(id) {\n let sqlRequest = \"SELECT (count(*) > 0) as found FROM taskItem WHERE id=$id\";\n let sqlParams = {$id: id};\n return this.common.existsOne(sqlRequest, sqlParams);\n }", "function checkWasFound(encontrado){\r\n if (encontrado === null) {\r\n console.log(\"Não encontrado\");\r\n } else {\r\n console.log(encontrado);\r\n }\r\n}", "exist(val) {\n return val != null;\n }", "function aliasCheckPubId(data,callback){\n gun.get(data.pub).once((data,key)=>{\n console.log(data);\n if(data){\n return callback('EXIST');\n }else{\n return callback(null);\n }\n });\n //return callback(null);\n}", "get(key: K): ?V {\n var val = this.tree.find([key, null]);\n return val ? val[1] : null;\n }", "find_entry(word) {\n for (let i=this.dictionary.length - 1; i >= 0; i--) {\n let entry = this.dictionary[i]\n if (entry.word == word) {\n return this.dictionary[i]\n }\n }\n return null\n }", "getEntityByUniqueName(uniqueName) {\n for (let entity of this.__entities) {\n if (entity.uniqueName === uniqueName) {\n return entity;\n }\n }\n return void 0;\n }", "exists (name, cb) {\n cb(null, true);\n }", "isUnique(emailOrmobile) {\n return new Promise((resolve, reject) => {\n let sql = sqlObj.otp.isExist;\n let sqlQuery = format(sql, emailOrmobile);\n\n db.doRead(sqlQuery).then(result => {\n resolve(result);\n })\n .catch(err => {\n reject(new Error(err));\n })\n })\n }", "isDocumentExisted(documentName) {\n var checkExistedProcess = this.dbConnect.then((connection) => {\n return new Promise ((resolve, reject) => {\n connection.query('SELECT id FROM ' + dbDocumentInfo + ' WHERE documentName = ?', documentName, (err, results, fields) => {\n if (!err) {\n var docName = results\n var quantity = docName.length\n if(quantity === 1) {\n //connection.release()\n resolve(true)\n } else if (quantity === 0){\n // console.log('Inside dbDoc : ' + docName[0].id)\n //connection.release()\n resolve(false)\n } else {\n //connection.release()\n reject({err: {msg: 'There are two of them in Database - System ERR'}})\n }\n } else {\n reject(err)\n }\n })\n })\n }).catch((err) =>{\n return Promise.reject(err)\n })\n return checkExistedProcess\n }", "function prodExiste(prodNuevo){\n \n let salida=true;\n let prodLista=JSON.parse(localStorage.getItem(\"productos\"));\n if(prodLista!=null&&prodLista.find(item=>item.id==prodNuevo.id)){\n salida=false;\n }\n return salida;\n}", "lookup(question, name) {\n for(let item of this.data) {\n if(item.question === question && item.name === name) {\n return item;\n } \n }\n console.error('failed lookup', question, name);\n }", "function keyExists(key) {\n urls.findOne({ emojis: key }).then((doc) => {\n if (doc) {\n return true;\n } else {\n return false;\n }\n });\n}", "exists() {\n return this._id !== undefined;\n }", "function isExisted (hn) {\n\tconst arr = arrItem.getAllItems();\n\n\tconst res = arr.find(el => el.hostname === hn);\n\treturn res === undefined ? false:true;\n}", "existePartida(idPartida, callback) {\n this.pool.getConnection((err, connection) => {\n if (err) {\n callback(err);\n return;\n }\n connection.query(\n \"SELECT id \" +\n \"FROM partidas \" +\n \"WHERE id = ? \",\n [idPartida],\n (err, rows) => {\n if (err) {\n callback(err);\n return;\n }\n connection.release();\n if (rows.length === 0) {\n callback(null, false);\n } else {\n callback(null, true);\n }\n });\n });\n }", "function exists(name) {\n return completeList.find(x => x.name === name) !== undefined;\n }", "function CheckIfPatientExists(){\n\t\t\t\n\t\t\t\n\t\t\treturn true;\n\t\t}", "function getExistingEntry(newEntry) {\n\t\tfor (let i=0; i<TOP_SKILL_SCORES.length; i++) {\n\t\t\tlet existingEntry = TOP_SKILL_SCORES[i];\n\t\t\tif (JSON.stringify(existingEntry.gameConfig) === JSON.stringify(newEntry.gameConfig)) {\n\t\t\t\treturn existingEntry;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "async existsIdIdClientType(id) {\n aux = await IDCLIENTTYPE.findByPk(id).catch(function() {\n console.log(\"Promise Rejected\");\n });\n if (aux == null) {\n return false;\n } else {\n return true;\n }\n }", "find(name){\n if(this.dict.hasOwnProperty(name)){\n return this.dict[name]\n }\n return false;\n }", "function getTemplateID(name, value, template) {\n\tif(template && template.length > 0) {\n\t\tfor(var i=0; i<template.length; i++) {\n\t\t\tif(name == template[i]['id']) {\n\t\t\t\tvar result = checkValueType(value, template[i]);\n\t\t\t\tif(result) {\n\t\t\t\t\treturn template[i]['id'];\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t} else {\n\t\twriteLog('Template is not existed');\n\t}\n\n\treturn null;\n}", "checkColl() {\n var self = this;\n return new Promise((resolve, reject) => {\n self.client.collection(self.coll, { strict: true }, (err, coll) => {\n //if err is collectio not exist resolve with null value\n if (err && err.message.indexOf('not exist') > -1)\n return resolve();\n else if (err)\n return reject(err);\n return resolve(coll);\n });\n });\n }", "getArtistByName(artistName){\n return this.returnIfExists(this.artists.find((a) => a.name === artistName), \"artista \" + artistName);\n }", "function checkPlatformExist(url, data) {\n\treturn new Promise(function(resolve, reject) {\n\t\tlet db = new PouchDB(url + \"/platforms\", {\n\t\t\tskip_setup: true\n\t\t});\n\t\tdb.allDocs({\n\t\t\tinclude_docs: true\n\t\t})\n\t\t\t.then(function(doc) {\n\t\t\t\tlet names = [];\n\t\t\t\tfor (let row of doc.rows) {\n\t\t\t\t\tif (\n\t\t\t\t\t\trow.id\n\t\t\t\t\t\t\t.toUpperCase()\n\t\t\t\t\t\t\t.replace(\"_\", \" \")\n\t\t\t\t\t\t\t.replace(\"-\", \" \") ===\n\t\t\t\t\t\tdata.META_INSTANCE_NAME.split(\"-\")[0]\n\t\t\t\t\t\t\t.toUpperCase()\n\t\t\t\t\t\t\t.replace(\"_\", \" \")\n\t\t\t\t\t) {\n\t\t\t\t\t\tresolve(row.doc);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (row === doc.rows[doc.rows.length - 1]) {\n\t\t\t\t\t\tresolve({\n\t\t\t\t\t\t\tdocId: data.META_INSTANCE_NAME.split(\"-\")[0].replace(\"_\", \" \"),\n\t\t\t\t\t\t\terror: \"not_found\",\n\t\t\t\t\t\t\tmessage: \"missing\",\n\t\t\t\t\t\t\tname: \"not_found\",\n\t\t\t\t\t\t\treason: \"missing\",\n\t\t\t\t\t\t\tstatus: 404\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(function(err) {\n\t\t\t\tif (err.code === \"ECONNREFUSED\") {\n\t\t\t\t\treject({ err: err, type: \"connection\" });\n\t\t\t\t} else {\n\t\t\t\t\treject({ err: err, type: \"table\", table: \"platforms\" });\n\t\t\t\t}\n\t\t\t});\n\t});\n}", "getById(id) {\n return super.getById(id) || this.idRegister[id];\n }", "getById(id) {\n return super.getById(id) || this.idRegister[id];\n }", "findUser (username) {\n for (let i = 0; i < this.users.length; i++) {\n if (username === this.users[i].name) {\n return this.users[i];\n }\n }\n return null;\n }", "getMatchOrCreate(bo) {\n return this.getMatching(bo).then(obj => {\n let matchingBo;\n try {\n matchingBo = obj.val();\n } catch (_err) {}\n if (matchingBo) {\n return Right(matchingBo);\n }\n return this.create(bo);\n });\n }", "snoopReadMiss(tag) {\r\n console.log('DEBUG ' + this.name + '.snoopReadMiss(tag=' + tag + ')')\r\n let lineNum = this.lineInCache(tag)\r\n if(lineNum == null) {\r\n console.log('DEBUG ' + this.name + ': not in this cache')\r\n return null\r\n } else {\r\n console.log('DEBUG ' + this.name + ': found in this cache')\r\n return this.getValues(lineNum)\r\n }\r\n }", "doesListExist(id){\n\t\treturn db.many(`SELECT * FROM user_information WHERE user_id = $1`, id);\n\t}", "function existy(x) {\n return x != null;\n}", "function existy(x) {\n return x != null;\n}", "function existy(x) {\n return x != null;\n}", "tryFind(name) {\n return this._tasks[name];\n }", "exists(req, res) {\n let id = req.params.id;\n\n this.tradeDao.exists(id)\n .then(this.common.existsSuccess(res))\n .catch(this.common.findError(res));\n }", "function loadNothing() {\n return null;\n }", "function checkExistentIdInArray(req, res, next) {\r\n // try {\r\n // const { id } = projects.find(x => x.id == req.body.id).id;\r\n // } catch {\r\n // return next();\r\n // }\r\n const project = projects.find(x => x.id === req.body.id);\r\n if (project) {\r\n return res\r\n .status(400)\r\n .json({ error: \"Project already existent, unable to proceed!\" });\r\n }\r\n return next();\r\n}", "function exists (obj){\n if (typeof (obj) != \"undefined\" && obj != null)\n return true;\n\n return false;\n}", "find(key) {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "has(uuid) {\n return this._data[uuid] !== undefined;\n }", "function exists(it) {\n return it != null;\n}", "isUserExistenceAndUnique(username) {\n var connectionDB = this.connectDB()\n var checkExistenceAndUniqueProcess = connectionDB.then((connection) => {\n return new Promise((resolve, reject) => {\n connection.query('SELECT id FROM ' + dbTesterInfo +\n ' WHERE testerID = ?', username, (err, results, fields) => {\n\n if (!err) {\n if(results.length === 1) {\n connection.release()\n resolve()\n } else if (results.length === 0){\n connection.release()\n reject({err: {msg: 'This username does not exist!'}})\n } else {\n connection.release()\n reject({err: {msg: 'This username is duplicated!Please remove!'}})\n }\n } else {\n connection.release()\n reject({err: {msg: 'Lost database connection!'}})\n }\n })\n })\n }).catch((err) => {\n return Promise.reject(err)\n })\n return checkExistenceAndUniqueProcess\n }", "async function isExist({ id,userName }) {\n let userInfo\n if(id){\n userInfo = await getUserInfo({ id })\n } else {\n userInfo = await getUserInfo({ userName })\n }\n\n if (userInfo) {\n return new SuccessModel(userInfo)\n }\n return new ErrorModel(userNameNotExistInfo)\n}", "findPersonInShipByID(theID){\n for (var i = 0; i < this.people.length; i++){\n if (this.people[i].id == theID){\n return this.people[i];\n }\n }\n //otherwise, return null: this CAN happen (usually if the person has died)\n return null;\n }", "function getPrimaryID(heads) {\n\tif(heads && heads.length > 0) {\n\t\tfor(var i=0; i<heads.length; i++) {\n\t\t\tif(heads[i].hasOwnProperty('primaryKey') && heads[i]['primaryKey']) {\n\t\t\t\tif(heads[i].hasOwnProperty('id')) {\n\t\t\t\t\treturn heads[i]['id'];\t\n\t\t\t\t} else {\n\t\t\t\t\twriteLog('id is not existed.');\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twriteLog('primaryKey is not existed.');\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t} else {\n\t\twriteLog('head is not existed.');\n\t\treturn null;\n\t}\n}", "function findNull(el) {\n return el===\"author\";\n }", "function checkUsername(username){ \n return new Promise((resolve, reject) => {\n firebase.database().ref('/usernames/'+username).once('value')\n .then((snapshot)=> { \n if(snapshot.exists()) \n reject('username allready exists!');\n else \n resolve();\n })\n })\n}", "doesUserExist(uname){\n\t\treturn db.one(`SELECT * FROM user_id WHERE uname=$1`, uname);\n\t}", "productAlreadyInCart(productId) {\n \n let productFound;\n let cartArr;\n \n //Get cart from local storage\n cartArr = JSON.parse(localStorage.getItem('cartData')) || [];\n console.log(\"cart : \" + cartArr);\n \n //check if cart is not empty\n if(cartArr.length > 0) {\n\n //return product found from cart\n productFound = cartArr.find(function(cartProduct) {\n return cartProduct.productId === productId ;\n });\n }\n return productFound; \n }", "getTaskById(taskId) {\n let foundTask;\n this.tasks.find(task => {\n if (task.id === taskId) {\n foundTask = task;\n }\n });\n return foundTask;\n }", "isNew() {\n return Promise.resolve(this.head === null);\n }", "function addUser(user){\n let x = users.find(student =>student.name == user.name)\n if (x == undefined){\n users.push(user)\n }else{\n return console.log(\"user already exist\")\n }\n console.log(users)\n}", "vertexExists(id) {\n for (let i = 0; i < this.g.length; i++) {\n if (this.g[i].id === id) {\n return this.g[i];\n }\n }\n return null;\n }", "getNode(id) {\n for (let i = 0; i < this.nodes.length; i++) {\n let node = this.nodes[i];\n if (!node) { continue; }\n if (node.id === id) { return node; }\n }\n return null;\n }", "function doesPageExist(pageName){\n return new Promise(function(resolve, reject) {\n // check if statid resource already exists\n force.request(\n {\n path: '/services/data/' + apiVersion + '/tooling/query/?q=select Id, Name, Description, LastModifiedDate from ApexPage WHERE Name=\\'' + pageName + '\\' LIMIT 1'\n },\n function(response) {\n console.debug('response' , response);\n resolve(response);\n },\n function(error) {\n console.error('Failed to check if page already existed on platform');\n reject({message :\"Page upload failed. See console for details.\", type: 'error'});\n });\n });\n }", "function notExistsOrErro(value, msg) {\n try {\n existsOrErro(value, msg)\n } catch (msg) {\n return\n }\n throw msg\n }", "getArtistById(id){\n let artistFound = this.artists.find( artist => artist.id == id );\n if ( !artistFound ){ throw new modelExep.NotFoundRelException('Artista no encontrado') } \n return artistFound;\n }", "static async exists(email){\n let user = await User.findOne({where: {email: email}});\n return user !== null\n }", "async notExists() {\n\t\t\treturn !(await this.exists());\n\t\t}", "findName() {\n const { resources, id } = this.props;\n if (resources && id) {\n let name = \"\";\n let found = false;\n objectToArray(resources).forEach(resource => {\n found = resource.links.some(link => {\n return link === \"/schedules/\" + id;\n });\n if (found) {\n name = resource.name;\n return;\n }\n });\n return name;\n }\n }", "function checkIfTagExists(tagId) {\n var tagToFind = tagId;\n var tagData = null;\n //check for a match in the database\n myDataRef.once('value', function(tagList) {\n tagList.forEach(function(childSnapshot) {\n \tvar tagString = childSnapshot.val().tag;\n if(tagToFind==tagString) {\n \t//if true return the tag's data\n \ttagData = childSnapshot;\n }\n });\n\t});\n\treturn tagData;\n}", "checkPlayerExist(user){\n let testPlayer = function(player){\n if(user.id === player.id){\n return true\n }\n return false\n }\n return this.players.find(testPlayer)\n }", "findById(id) {\n const posicion = indexOfPorId(id);\n return posicion == -1 ? undefined : users[posicion];\n }", "retrieveItem(key) {\n let item = null\n // Try to get the item first\n if (this.hasItem(key)) {\n item = this.getItem(key) || null // getItem returns undefined\n }\n\n if (item === null) {\n // Throw an error?\n }\n\n return item\n }", "function findTicketBannerExists() {\n\n\tvar ticketBanner = selectTicketBanner();\n\tif(ticketBanner === null || ticketBanner === undefined)\n\t\treturn null;\n\n\t// if the star is already added\n\tif(selectStarPicker(ticketBanner).length !== 0)\n\t\treturn null;\n\t\n\treturn ticketBanner;\n}", "fetchById(id) {\n // There should be only one match. Return first match or null if undefined.\n return this.data.filter(fruit => fruit.id === id)[0] || null;\n }" ]
[ "0.64312327", "0.60549015", "0.5884978", "0.5881601", "0.58322734", "0.58243716", "0.57100135", "0.56679565", "0.56560344", "0.5649606", "0.5585518", "0.558171", "0.5577484", "0.55733746", "0.5554513", "0.55503833", "0.55462927", "0.55455405", "0.55378", "0.5533017", "0.5527358", "0.5524406", "0.5522594", "0.55199564", "0.54965025", "0.54883176", "0.54726577", "0.54725784", "0.5471222", "0.5464428", "0.54643595", "0.5462996", "0.5447337", "0.54398876", "0.5438544", "0.5432632", "0.5431958", "0.54269", "0.54215753", "0.54182357", "0.54065555", "0.5400754", "0.5390195", "0.5380771", "0.53772753", "0.5377093", "0.5365875", "0.53630686", "0.53593075", "0.5353528", "0.5351016", "0.5349618", "0.5342315", "0.53248626", "0.5323249", "0.53223747", "0.531934", "0.5316439", "0.5314525", "0.53102", "0.53102", "0.5310161", "0.53098905", "0.53047144", "0.5303669", "0.5303612", "0.5303612", "0.5303612", "0.5301584", "0.52932554", "0.5290582", "0.52819234", "0.5277271", "0.52743626", "0.5270238", "0.52649397", "0.52619416", "0.52540725", "0.52518225", "0.5244807", "0.5243617", "0.5240916", "0.5240553", "0.5240246", "0.5230357", "0.52296484", "0.5217269", "0.5213764", "0.5208019", "0.52039695", "0.5203717", "0.52030885", "0.5202924", "0.5202199", "0.5200977", "0.51998955", "0.51967126", "0.51790017", "0.5178055", "0.51758736", "0.5175509" ]
0.0
-1
componentDidMount(): send request to get employees
async componentDidMount() { await this.getEmployeeJobData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount(){\n this.fetchEmployees();\n }", "componentDidMount() {\n this.fetchEmployeeData();\n }", "componentDidMount() {\n this.props.fetchEmployees();\n }", "componentDidMount() {\n this.getEmployees();\n }", "componentDidMount(){\n this.getEmployees();\n }", "async componentDidMount() {\n try {\n this.refresh();\n } this.catch(error) {\n console.error(error)\n }\n const res = await axios.get(\"/employees\");\n console.log(res.data)\n this.setState({\n employees: res.data\n\n })\n\n }", "componentDidMount() {\n this.loadEmployee();\n }", "componentDidMount() {\n fetch(\"/employees\")\n .then(res => res.json())\n .then(result => {\n // console.log(result);\n this.setState({\n employees: result\n });\n });\n }", "componentDidMount() {\n ManagerService.getEmployees(this.state.backEndToken).then((res) => {\n this.setState({ employees: res.data });\n });\n }", "componentDidMount() {\n this.fetchEmployeeDataByID();\n }", "componentDidMount(){\r\n axios.get('http://127.0.0.1:5000/api/employees')\r\n .then(res => {console.log(res); //debug\r\n if (res.statusText !== \"OK\") throw Error(\"Get /api/employees request failed, status: \",res.status);\r\n const employeesList = res.data.filter(employee => employee.email !== this.state.loggedInUserEmail)\r\n .map((employee) => {const statusStr = this.props.getStatusString(employee.status);\r\n return {name: employee.name, email: employee.email, status: statusStr, nickName:employee.nickName};\r\n });\r\n //console.log(employeesList);//debug\r\n this.setState({ employees: employeesList });\r\n })\r\n .catch(err => console.log(err));\r\n }", "componentDidMount() {\n this.setState({ isLoading: false });\n API.getEmployees()\n .then(res => {\n this.setState({ employees: res.data.results })\n })\n .catch(err => console.log(err));\n }", "componentDidMount() {\n document.title = `Add Booking | ${config.companyName}`;\n this.props.setPageTitle( 'Add Booking', 'You can add a customer booking on this page' );\n this.props.requestedEmployees();\n\n API.getEmployees()\n .then( this.props.receivedEmployees )\n .catch( this.props.fetchEmployeesFail );\n }", "componentDidMount() {\n axios.get(\"http://127.0.0.1:8000/rest/emp/\").then(res => {\n this.setState({\n employees: res.data\n });\n console.log(this.state.employees);\n });\n }", "componentDidMount(){\n // getEmployees returns a promise, with a 'then' method that has a response.\n EmployeeService.getEmployees().then((res) => {\n // Store the response data into the employees array.\n this.setState({employees: res.data});\n });\n }", "componentDidMount() {\n API.getEmployees()\n .then((res) => {\n this.setState({ employees: res.data.results });\n })\n .catch((err) => console.error(err));\n }", "componentDidMount() {\n this.searchEmployees();\n }", "componentDidMount() {\n this.searchEmployees();\n }", "componentDidMount() {\n this.employeeData();\n }", "componentDidMount() {\n this.searchEmployees();\n }", "getEmployeeList() {\n axios.get('http://localhost:4000/employees')\n .then((response) => {\n console.log(response);\n this.setState({\n employees: response.data\n });\n })\n .catch((error) => {\n console.log(error);\n })\n }", "componentDidMount() {\n this.getEmployeeNames();\n }", "componentDidMount() {\n API.getUsers().then(res => this.setState({\n employees: res.data.results,\n filteredEmployees: res.data.results\n })).catch(err => console.log(err))\n }", "componentDidMount() {\n ManagerService.getEmployeeById(\n this.state.staffId,\n this.state.backEndToken\n ).then((res) => {\n this.setState({ employee: res.data });\n });\n }", "componentDidMount() {\n this.searchEmployee();\n }", "componentDidMount() {\n api.getEmployees().then((response) => {\n let employeeData = response.data.results.map(employee => {\n return {\n id: employee.id.value,\n image: employee.picture.medium,\n firstName: employee.name.first,\n lastName: employee.name.last,\n email: employee.email,\n phone: employee.phone\n }\n })\n console.log(\"this is the\" + employeeData);\n this.setState({\n employees: employeeData,\n loadedEmployees: employeeData\n })\n })\n .catch(err => console.log(err));\n }", "componentDidMount() {\n this.searchEmployee();\n }", "async componentDidMount(){\n axios.get('/getAll') // proxy used is 'http://localhost:8080'\n .then(response => {\n this.setState({ employees: response.data });\n console.log(this.state.employees);\n })\n .catch(function (error) {\n console.log(error);\n })\n }", "componentDidMount() {\n fetch('https://bemostwanted.herokuapp.com/users').then(res => res.json()).then(listEmployees => this.setState({ listEmployee: listEmployees,\n order: \"true\" }));\n }", "componentDidMount() {\n API.searchEmployees().then(res => this.setState({\n employees: res.data.results,\n filteredEmployees: res.data.results\n })).catch(err => console.log(err))\n \n }", "componentDidMount() {\n API.allEmployees().then(res => {\n const employees = res.data.results;\n this.setState({ results: employees, directory: employees })\n });\n }", "componentDidMount() {\n this.searchEmployees(\"\");\n }", "componentDidMount() {\n\t\tthis.props.getEmployeesIncPassive();\n\t}", "componentWillMount() {\n this.props.employeesFetch();\n\n this.createDataSource(this.props)\n }", "componentDidMount() {\n this.searchEmployee();\n // this.display();\n }", "getAllEmployees() {\n $.ajax({\n url: \"/api/users/employee\",\n type: \"get\",\n success: (res) => {\n this.setState({ allEmployees: res });\n },\n });\n }", "async componentDidMount(){\n //must use try/catch for async calls\n try{\n //await the response (aka resolve) from checkFetch\n await this.context.checkFetch();\n\n let emps = [];\n\n if(this.context.employeeData.length > 0) {\n\n emps = this.context.employeeData.map(emp => {\n if (parseInt(emp.out_time) === 0) {\n return [emp.in_time, parseInt(this.context.dayData[0].close_time)];\n }\n else{\n return [emp.in_time, emp.out_time];\n }\n });\n }\n\n this.setState({\n employees: emps\n });\n \n } catch (err){\n // error occurred\n }\n\n }", "componentDidMount() {\n\t\tthis.getStaff();\n\t}", "componentDidMount() {\n this.employeeSearch();\n }", "getUsers(){\n \n axios.get('http://jsonplaceholder.typicode.com/posts')\n .then(response => {\n console.log('response:',response.data);\n \tthis.setState({\n employees: response.data\n })\n })\n .catch(error => {\n console.log('Error fetching and parsing data', error);\n });\n }", "componentDidMount() {\n this.fetchCompanyData();\n }", "componentDidMount() {\n this.getRequestEvent();\n this.getRequest();\n }", "componentDidMount(){\n //wording on render page\n // client({method: 'GET', path: '/vote'}).done(response => {\n // // this.setState({employees: response.entity._embedded.employees});\n // console.log(response)\n // });\n}", "componentDidMount() {\n // HTTP AXIOS GET REQUEST: retrieves all supervisors from the database sets to the state of App.\n axios.get('https://609aae2c0f5a13001721bb02.mockapi.io/lightfeather/managers')\n .then(response => {\n this.setState({ listOfSupervisors : response.data})\n console.log(this.state.listOfSupervisors);\n })\n .catch(error => {\n console.log('\\n> Failed to retrieve the list of supervisors from the Mock API.');\n console.log(error);\n });\n }", "componentDidMount() {\n let empno = this.props.match.params.id;\n console.log(`Received Value ${empno}`);\n let emp = {};\n this.serv.getEmpDatabyid(parseInt(empno)).then((resp) => {\n emp = resp.data.data; //to remove status headers we are doing this way\n this.setState({ EmpNo: emp.EmpNo });\n this.setState({ EmpName: emp.EmpName });\n this.setState({ Designation: emp.Designation });\n this.setState({ Salary: emp.Salary });\n this.setState({ DeptNo: emp.DeptNo });\n console.log(JSON.stringify(emp));\n }).catch((error) => {\n console.log(`Error ${error}`);\n });\n }", "componentDidMount() {\n this.fetchCustomerRequestData();\n }", "componentDidMount() {\n this.retrieveAccommodations();\n }", "componentDidMount() {\n this.getQuizzes();\n this.getStudents();\n this.getResponses();\n }", "async getAllEmployees() {\n const url = API_BASE_URL+\"/getAllDefects\";\n const response = await fetch(url);\n const data = await response.json();\n console.log(data);\n this.setState({\n employees: data\n });\n console.log(this.state.employees);\n }", "componentDidMount() {\n this.fetchAppointment();\n this.fetchLocations();\n this.fetchTeachers();\n console.log('Fetched') // Test whether they run succesfully\n }", "componentDidMount() {\n\t\tthis.getUsers();\n\t}", "componentDidMount() {\n API.getRandomEmployees().then((res) => {\n // console.log(res);\n this.setState({\n employees: res.data.results,\n filteredEmployees: res.data.results,\n });\n });\n }", "componentDidMount(){\n this.getUsers();\n this.getStatus();\n this.getToDos();\n }", "componentDidMount() {\n API.getEmployees()\n .then(res => {\n let employeeData = res.data.results.map(employee => {\n return {\n id: employee.id.value,\n img: employee.picture.medium,\n firstName: employee.name.first,\n lastName: employee.name.last,\n age: employee.dob.age,\n email: employee.email,\n phone: employee.phone\n }\n })\n this.setState({\n rows: employeeData,\n rowsLoaded: employeeData\n })\n })\n .catch(err => console.log(err));\n }", "componentDidMount() {\r\n this.getEmployeeDetails(this.props.val)\r\n }", "componentWillMount() {\n\t\tthis.usersDataGetRequest();\n\t}", "componentDidMount() {\n this.getRequest()\n }", "componentDidMount() {\n\t\tconst eventId = this.props.match.params.eventId;\n\t\taxios\n\t\t\t.get(`http://localhost:8080events/${eventId}?auth_token=${this.props.user.token}`)\n\t\t\t.then(response => {\n console.log(response.data);\n\t\t\t\tthis.setState({\n\t\t\t\t\tattendees: response.data.attendees\n\t\t\t\t})\n\t\t\t});\n\t}", "getEmployeeJobData() {\n axios({\n method: 'get',\n url: 'http://157.230.172.148:3000/api/queries/findJobs?managerID=resource%3Aorg.pow.app.User%23' + uuidv3(store.getState().email, uuidv3.URL)\n })\n .then((response) => {\n console.log(response);\n this.populateEmployeeData(response.data);\n })\n .catch((error) => {\n console.log(error);\n })\n }", "componentDidMount() {\n\n try {\n axios.get('http://localhost:4000/managers',)\n .then(response => {\n this.setState({ all_managers: response.data });\n })\n .catch(function (error) {\n console.log(error);\n });\n\n } catch (err) {\n console.log(err)\n }\n\n }", "componentDidMount(){\n fetch('http://localhost:3000/requests',{ })\n .then((response) => response.json())\n .then((responseJson) => {\n this.setState({requestList:responseJson});\n })\n .catch(function(err){\n if(err){\n console.log(err);\n }\n });\n }", "componentDidMount() {\n\t\tthis.props.fetchInfo('offences', 'offencesList');\n\t\tthis.props.fetchInfo('areas', 'lga');\n\t\tthis.props.fetchInfo('ages', 'age');\n\t\tthis.props.fetchInfo('genders', 'gender');\n\t\tthis.props.fetchInfo('years', 'year');\n\t}", "componentDidMount() {\n this.getUsers();\n }", "componentDidMount() {\n this.setState({\"result\": EmployeeList });\n }", "componentDidMount() {\n\n\t\ttry {\n\t\t\tAPIManager.getAll(\"companies\")\n\t\t\t\t.then(companies => this.setState({companies: companies}))\n\t\t} catch(err) {\n\t\t\talert(err)\n\t\t}\n\n\t\ttry {\n\t\t\tAPIManager.getWithDetails(\"identifiers\", \"filter[include]=type&filter[include]=company\")\n\t\t\t\t.then(identifiers => this.setState({identifiers: identifiers}))\n\t\t} catch (err) {\n\t\t\talert(err)\n\t\t}\n\n\t\ttry {\n\t\t\tAPIManager.getAll(\"types\")\n\t\t\t\t.then(types => this.setState({types: types}))\n\t\t} catch (err) {\n\t\t\talert(err)\n\t\t}\n\n\t\ttry {\n\t\t\tAPIManager.getByUserId(\"shoppinglists\")\n\t\t\t.then(shoppinglists => this.setState({shoppinglists: shoppinglists}))\n\t\t} catch (err) {\n\t\t\talert(err)\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tAPIManager.getAll(\"stitchers\")\n\t\t\t\t.then(stitchers => this.setState({stitchers: stitchers}))\n\t\t} catch (err) {\n\t\t\talert(err)\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tAPIManager.getWithDetails(\"stashes\", `filter[include][identifier]=type&filter[include][identifier]=company&filter[where][userId]=${userId}`)\n\t\t\t\t.then(stashes => this.setState({stashes: stashes}))\n\t\t} catch (err) {\n\t\t\talert(err)\n\t\t}\n\t}", "componentDidMount() {\n this.requestData();\n }", "componentDidMount() {\n const request = new Request('http://localhost:8080/users/');\n fetch(request)\n .then(response => response.json())\n .then(data => this.setState({data: data}));\n }", "componentDidMount() {\r\n this.setState({ ID: this.props.employeeID, ticketsOpen: true, admin: this.props.loggedEmployee.admin })\r\n this.getTickets()\r\n }", "componentDidMount() {\n\t\tthis.getAllRecords();\n\t}", "componentDidMount() {\n const data = {\n 'companyId': localStorage.getItem('companyId')\n }\n console.log(data)\n this.props.getCompanyEvents()\n // axios.defaults.headers.common['authorization'] = localStorage.getItem('token');\n // axios.get(environment.baseUrl+'/company/list-of-jobs-and-events/' + localStorage.getItem('companyId')+'/events')\n // .then((response) => {\n // //update the state with the response data\n // this.setState({\n // eventlist: response.data\n // })\n // console.log(this.state.eventlist)\n // });\n }", "componentDidMount() {\n /* Hide the preview spinner */\n document.getElementById( 'mounting-preview' ).remove();\n\n /* Print the API information to the console */\n API.version().then( response => {\n console.log( 'API Information', response.data );\n });\n\n /* Set the companies. */\n store.dispatch( requestCompanies());\n API.getCompanies()\n .then( success => store.dispatch( receiveCompanies( success.data )))\n .catch( error => store.dispatch( failCompanies( error )));\n }", "componentDidMount() {\n this.fetchPersonInfo()\n }", "componentDidMount() {\n let url = 'https://bemostwanted.herokuapp.com/user/' + this.props.employee + '/trips';\n fetch(url).then(res => res.json()).then(listTrips => this.setState({ listTrips }));\n }", "componentDidMount() {\n this.getUsers(10);\n }", "componentDidMount() {\n this.getUsers();\n }", "componentDidMount() {\n console.log(this.props.match.params.id);\n fetch(\"http://localhost/empleados/?consultar=\" + this.props.match.params.id)\n .then(respuesta => respuesta.json())\n .then((datosRespuesta) => {\n\n\n console.log(\"=>\" + datosRespuesta);\n this.setState({\n datosCargados: true,\n empleado: datosRespuesta[0]\n })\n })\n .catch(console.log)\n\n }", "componentDidMount() {\n\t\tconst url =\n\t\t\t'https://cors-anywhere.herokuapp.com/https://data.nsw.gov.au/data/api/3/action/datastore_search?resource_id=21304414-1ff1-4243-a5d2-f52778048b29';\n\n\t\tAxios.get(url)\n\t\t\t.then((result) => {\n\t\t\t\tif (result.data.success) {\n\t\t\t\t\tconst data = result.data.result.records;\n\t\t\t\t\tif (data.length > 0) {\n\t\t\t\t\t\tdata.map((item) => {\n\t\t\t\t\t\t\titem.id = this.state.lastIndex;\n\t\t\t\t\t\t\tthis.setState({ lastIndex: this.state.lastIndex + 1 });\n\t\t\t\t\t\t\treturn item;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.setState({ records: data });\n\t\t\t\t\t} else {\n\t\t\t\t\t\talert('No data');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch((error) => console.error('Error:', error.message));\n\t}", "componentDidMount(){\n this.getAllUsers()\n }", "componentDidMount() {\n\t\tthis.fetchData();\n\t}", "componentDidMount() {\nconst request = new Request('http://127.0.0.1:8080/sports');\nfetch(request)\n .then(response => response.json())\n .then(data => this.setState({data: data}));\n}", "componentDidMount(props) {\n // only called when exhibitor page is created or updated.\n this.apiFetcher(props, false)\n }", "componentDidMount() {\n this.getAllAppointments();\n }", "componentDidMount() {\n\t\tthis.fetchUser();\n\t}", "componentDidMount() {\n const id = this.props.match.params.id;\n console.log(\"RS= \" + id);\n // Use of the get controllers through the axios API\n axios\n .get(\"http://localhost:5000/job/\" + id)\n .then((Response) => {\n this.setState({\n title: Response.data.title,\n description: Response.data.description,\n jobtype: Response.data.jobtype,\n file: Response.data.file,\n year: Response.data.year,\n researchers: Response.data.researchers,\n });\n\n for (let researcher of this.state.researchers) {\n axios\n .get(\n \"http://localhost:5000/researcher/\" + researcher\n )\n .then((Resp) => {\n this.setState({\n contactResearchers: [...this.state.contactResearchers, Resp.data],\n });\n console.log(\"element=\" + Resp.data);\n });\n }\n\n })\n .catch((error) => {\n console.log(error);\n });\n }", "componentDidMount() {\n this.props.fetchApartmentsList();\n }", "componentDidMount() {\n this.loadDataFromServer();\n }", "componentDidMount() {\n request\n .get('/app/data/users.json')\n .end(function(err, res) {\n if (err || !res.ok) {\n console.log('Oh no! error');\n } else {\n console.log('yay got ' + JSON.stringify(res.body));\n }\n });\n }", "componentDidMount() {\n this.fetchFoodsInfo();\n }", "componentDidMount() {\n this.findAllCustomer();\n }", "componentDidMount() {\n this.fetchList()\n }", "componentWillMount() {\r\n axios.get(\"/request/ondemand/\")\r\n .then(response => {\r\n this.setState({ list_of_requests: response.data });\r\n })\r\n .catch(function (error) {\r\n console.error(error);\r\n });\r\n }", "componentWillMount() {\n this.getHRList();\n }", "componentDidMount() {\n // setting state after making ajax call\n this.fetchSkillsAndProjects();\n }", "componentDidMount() {\n this.getTeamData();\n this.getFamilyData();\n this.getQualificationData();\n }", "componentDidMount() {\n axios.get('http://localhost:8080/workshop/')\n .then(response => {\n this.setState({workshops: response.data.data})\n } )\n }", "async componentWillMount() {\n try {\n const res = await fetch('api/Consultants/getConsultants');\n const consultantlist = await res.json();\n console.log(consultantlist);\n this.setState({\n consultants: consultantlist,\n });\n } catch (error) {\n console.log(error);\n }\n }", "componentDidMount(){\n this.requestDetail();\n }", "componentDidMount() {\n \n let self = this;\n self.serverRequest = fetch('/product/queryAll', {\n method: 'GET'\n }).then(function(response) {\n if (response.status >= 400) {\n throw new Error(\"Bad response from server\");\n }\n return response.json();\n }).then(function(data) {\n self.setState({\n products: data\n });\n }).catch(err => {\n console.log('caught it!', err);\n });\n }", "componentDidMount() {\n getAllUsers()\n .then(response =>\n this.setState({\n allUsers: response.data\n })\n )\n .catch(() => {\n alert(\"Sorry cannot find all the users\");\n });\n }", "componentDidMount() {\r\n axios.get('http://localhost:5000/users')\r\n .then(response => {\r\n if (response.data) {\r\n console.log('did mount')\r\n this.setState({users: response.data})\r\n }\r\n })\r\n .catch(error => {console.log(error)})\r\n }" ]
[ "0.83849853", "0.8193695", "0.8080642", "0.80745906", "0.8037596", "0.7969767", "0.7950717", "0.79181176", "0.7917118", "0.78887147", "0.78495103", "0.78040934", "0.7787226", "0.7764372", "0.77525", "0.77096456", "0.7670477", "0.7670477", "0.7669678", "0.7650656", "0.7638295", "0.7594757", "0.75604576", "0.74530447", "0.7392597", "0.7387265", "0.7367934", "0.7359949", "0.7346518", "0.7288485", "0.728381", "0.72805214", "0.7266861", "0.72599554", "0.7256048", "0.7236454", "0.719561", "0.71871936", "0.7176519", "0.7161901", "0.71253616", "0.7060441", "0.7020102", "0.70175284", "0.7016215", "0.7015802", "0.7012937", "0.7012253", "0.70075846", "0.69991636", "0.6995286", "0.6994109", "0.6992592", "0.6966279", "0.6965571", "0.6964933", "0.69578815", "0.69555885", "0.6945139", "0.69253415", "0.69228125", "0.69019485", "0.6899491", "0.689926", "0.68915325", "0.6888858", "0.6878339", "0.6840665", "0.68402123", "0.6839417", "0.68343055", "0.6826953", "0.6820177", "0.68190503", "0.68165535", "0.6805166", "0.6797069", "0.67909473", "0.67881787", "0.67694557", "0.676817", "0.67660683", "0.6763934", "0.6757942", "0.67555803", "0.6753563", "0.67490923", "0.67419565", "0.6739929", "0.6729816", "0.67247605", "0.67082256", "0.6705341", "0.67029846", "0.6698993", "0.66979885", "0.6696341", "0.669536", "0.6691898", "0.6690994" ]
0.7068158
41
getEmployees(): retrieve employee data from server by ID
getEmployeeData(employeeID) { axios({ method: 'get', url: 'http://157.230.172.148:3000/api/User/' + employeeID }) .then((response) => { console.log(response.data); var joined = this.state.employeeData.concat(response.data); this.setState({ employeeData: joined }); }) .catch((error) => { console.log(error); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEmployees(req, res, next) {\n var id = parseInt(req.params.id);\n db.query(\"SELECT * FROM users WHERE id_entreprise = ?\", id, function (error, results, fields) {\n if (error)\n res.status(500)\n .json({\n status: \"ko\",\n data: \"error\"\n })\n else\n res.status(200)\n .json({\n status: \"ok\",\n data: results\n })\n });\n}", "getEployeeByID(employee_id : number): Promise<Employee[]>{\n return axios.get(url+'/employee/'+employee_id);\n }", "function getAnEmployee(res, mysql, context, id, complete){\r\n var sql = \"SELECT id, name, department FROM zoo_employee WHERE id = ?\";\r\n var inserts = [id];\r\n mysql.pool.query(sql, inserts, function(error, results, fields){\r\n if(error){\r\n res.write(JSON.stringify(error));\r\n res.end();\r\n }\r\n context.employee = results[0];\r\n complete();\r\n });\r\n }", "function getEmployees() {\n const query = \"SELECT * FROM employee\";\n return queryDB(query);\n}", "function getEmployees() {\n\t\t\temployeeService.getEmployees().then(function(data) {\n\t\t\t\tvm.employees = data;\n\t\t\t});\n\t\t}", "fetchEmployee(params) {\r\n return Api().get('/employees/' + params)\r\n }", "function getEmployees(callback){\n\n postGresClient.connect(connectionString, function(err, client, done){\n if(err) {\n callback('sorry your connection to postGres failed');\n }else {\n client.query('SELECT * FROM employees order by id',\n [],function(err,result) {\n if(err) {\n callback('getEmployees operation failed!!!');\n }else{\n done();\n callback(null, result.rows);\n }\n });\n }\n\n });\n postGresClient.end();\n }", "async fetchEmployeeById(id) {\r\n await this.checkLogin();\r\n var response = await axios.get(Config.employeeApiUrl + \"\" + id + \"/\", {\r\n headers: { Authorization: \"Bearer \" + AuthHandler.getLoginToken() },\r\n });\r\n return response;\r\n }", "getEmployees(){\r\n\t\tvar that = this;\r\n\t\t$.ajax({\r\n\t\t method: \"POST\",\r\n\t\t url: \"/ajaxgetemployees\",\r\n\t\t data: { OrderID: that.orderId }\r\n\t\t})\r\n\t\t.done(function( resp ) {\r\n\t\t\tthat.Employees = resp;\r\n\t\t\t\r\n\t\t\tconsole.log(resp);\r\n\t\t\t\r\n\t\t\tthat.setupEmployeesInListbox();\r\n\t\t\t//setup the order_details rows\r\n\t\t\t//First: read all of the products rows into an array called that.ProductsData\r\n\t\t\t//getProductsArr() calls createOrderDetailsRows()\r\n\t\t\treturn that.getProductsArr();\r\n\t\t\t\t\t\r\n\t\t})\r\n\t\t.fail(function(){\r\n\t\t\talert(\"Ajax Failed in getEmployees()\");\r\n\t\t});\r\n\t}", "async 'GET_EMPLOYEE_BY_ID'(state, payload) {\n\n state.employee = payload;\n }", "function getEmployees(res,mysql,context,complete){\r\n\t\tmysql.pool.query(\"SELECT Employees.Emp_ID, Employees.Emp_Name, Employees.Store_ID, Employees.Emp_Phone_Number, Employees.Emp_Address_Street, Employees.Emp_Address_Zip FROM Employees\",(error,results,fields)=>{\r\n\t\t\tif(error){\r\n\t\t\t\tres.write(JSON.stringify(error));\r\n\t\t\t\tres.end();\r\n\t\t\t}\r\n\t\t\tcontext.employees = results;\r\n\t\t\tcomplete();\r\n\t\t});\r\n\t}", "function getEmployees(){\n fetch('http://localhost:8080/ERS/employees')\n .then(res => res.json())\n .then(data => {\n employees = data;\n console.log(\"接收到所有的员工数据\" + employees);\n appendEmployeesToTable(employees);\n });\n}", "function getEmployees(res, mysql, context, complete) {\n mysql.pool.query(\"SELECT id, fname, lname, title FROM Employees\", function (error, results, fields) {\n if (error) {\n res.write(JSON.stringify(error));\n res.end();\n }\n context.employees = results; //define the results as \"employees\"\n complete(); //call the complete function to increase callbackcount\n });\n }", "function loadEmployees() {\n API.getEmployees()\n .then(result => {\n // testing and checking what is sent from Sequelize\n console.log(result.data);\n setData(result.data);\n })\n .catch(err => console.log(err));\n }", "function getEmps() {\n\t\t$http.get('/salary_input')\n\t\t\t.then(function (response) {\n\t\t\t\tconsole.log('Employee Data Get ' + response);\n\t\t\t\tself.employees = response.data;\n\t\t\t});\n\t}", "function getEmployeeByListID(info) {\n\t\t\t\t\t\t\t\treturn Restangular.all(\n\t\t\t\t\t\t\t\t\t\tRestEndpoint.THE_SIGN_CA_URL\n\t\t\t\t\t\t\t\t\t\t\t\t+ \"/getEmployeeByListID\").post(info);\n\t\t\t\t\t\t\t}", "function getEmployeeById (id) {\n var i;\n for (i = 0; i < employees.length; i++) {\n if (employees[i].id === id) {\n return employees[i];\n }\n }\n\n return undefined\n}", "function dbGetEmployeeWrapper(id) {\n dbGetEmployee(id)\n .then(res => {\n resolve(res);\n })\n .catch(err => {\n reject(err);\n });\n}", "findEmployees() {\n return this.connection.query(\"SELECT * FROM employee\");\n\n }", "function getAllEmployees(){\n\t\t\t$.ajax({\n\t\turl:'http://localhost:8181/api/v1/employee/',\n\t\ttype:'GET',\n\t\tcrossOrigin: true,\n\t\tcontentType : 'application/json',\n\t\tsuccess : function(data){\n\t\t\tvar response = data.employees;\n\t\t\tif(data.status == 200)\n\t\t\t\t$(\"#employeeDetails\").empty();\n\t\t\t$.each(response, function(i, data){\n \t\t$(\"#employeeDetails\")\n \t\t.append(\"<tr><td>\" + data.id + \"</td><td>\" + data.name + \"</td><td>\"+data.email+\"</td><td>\"+data.salary+\"<td></tr>\");\n})\n\t\t},\n\t\terror : function(error){\n\t\t\tconsole.log(error)\n\t\t}\n\t})\n\t}", "function getEmployeeIDs(employeeSelect) {\r\n var req = new XMLHttpRequest();\r\n\r\n req.open(\"GET\", \"http://flip1.engr.oregonstate.edu:4598/employees\", true);\r\n req.addEventListener('load', function(){\r\n if (req.status >= 200 && req.status < 400){\r\n var response = JSON.parse(req.responseText);\r\n appendEmployeeID(response, employeeSelect);\r\n } else {\r\n console.log(\"Error in network request: \" + req.statusText) \r\n }\r\n })\r\n req.send(null);\r\n}", "function viewEmployees() {\n connection.query(\"SELECT * FROM employee\", function (err, res) {\n if (err) throw err;\n console.log(\"\\n\" + res.length + \" employees found!\\n\" + \"______________________________________________________________________\\n\");\n for (var i = 0; i < res.length; i++) {\n console.log(\n \"|| \" +\n res[i].id +\n \" ||\\t\" +\n res[i].first_name + \" \" + res[i].second_name +\n \" \\t Role ID: \" +\n res[i].role_id +\n \" \\t Manager ID: \" +\n res[i].manager_id + \"\\n\" + \"______________________________________________________________________\\n\"\n );\n }\n start();\n });\n}", "function getEmployees(res, mysql, context, complete) {\n mysql.pool.query(\"SELECT id, fname, lname FROM Employees WHERE fsa = TRUE\", function (error, results, fields) {\n if (error) {\n res.write(JSON.stringify(error));\n res.end();\n }\n context.employee = results; //define results as \"employee\"\n complete(); //call the complete function to increase callbackcount\n });\n }", "function getEmployeeList()\n\t{\n\t\t$http.get('http://localhost:9999/employee/list').success(\n\t\t\t\tfunction(data) {\n\t\t\t\t\t$scope.employees = data;\n\t\t\t\t});\n\t}", "readAllEmployees() {\r\n return this.connection.query(\r\n \"SELECT employee.id, employee.first_name, employee.last_name, role.title, department.name AS department, role.salary, CONCAT(manager.first_name, ' ', manager.last_name) AS manager FROM employee LEFT JOIN role on employee.role_id = role.id LEFT JOIN department on role.department_id = department.id LEFT JOIN employee manager on manager.id = employee.manager_id;\"\r\n );\r\n }", "async findById(id) {\n\t\tlet sqlRequest = \"SELECT * FROM employee WHERE id=$id\";\n\t\tlet sqlParams = {$id: id};\n\t\tconst row = await this.common.findOne(sqlRequest, sqlParams);\n\t\treturn new employee(row.id, row.name, row.admin, row.reporting_admin, row.password, row.calender_id);\n\t}", "function getEmployees() {\n var employeeList = new XMLHttpRequest();\n employeeList.onload = function() {\n rawEmployeeData = (this.responseText).split(\"<newrecord>\");\n for (i = 0; i < rawEmployeeData.length - 1; i++) {\n each = rawEmployeeData[i].split(\"/\");\n employeeData.push({\n id: each[0],\n f_name: each[1],\n l_name: each[2],\n phone1: each[3]\n });\n }\n }\n employeeList.open(\"get\", \"php/get/get-emps.php\", false);\n employeeList.send();\n}", "function viewEmployees() {\n var query = \"SELECT CONCAT(employees.first_name, ' ', employees.last_name) as employee_name, roles.title, departments.name, employees.id FROM employees LEFT JOIN roles on employees.role_id = roles.id LEFT JOIN departments ON departments.id = roles.department_id \";\n con.query(query, function(err, res) {\n if (err) throw err;\n for (var i = 0; i < res.length; i++) {\n console.log(\"\\n\" + \"|| Employee: \" + res[i].employee_name + \"|| Title: \" + res[i].title + \"|| Department: \" + res[i].name + \"|| ID: \" + res[i].id);\n }\n runManager();\n });\n }", "async findAll() {\n\t\tlet sqlRequest = \"SELECT * FROM employee\";\n\t\tconst rows = await this.common.findAll(sqlRequest);\n\t\tlet employees = [];\n\t\tfor (const row of rows) {\n\t\t\temployees.push(new employee(row.id, row.name, row.admin, row.reporting_admin, row.password, row.calender_id, row.active));\n\t\t}\n\t\treturn employees;\n\t}", "function loadEmployeeList() {\n\tlet xhr = new XMLHttpRequest();\n\txhr.onreadystatechange = function() {\n\t\t// define functionality for response\n\t\tif (xhr.readyState == 4) {\n\t\t\t// check response status\n\t\t\tswitch (xhr.status) {\n\t\t\tcase (200):\n\t\t\t\tlet myArr = JSON.parse(xhr.responseText);\n\n\t\t\t\tfor ( let idx in myArr) {\n\t\t\t\t\t// to add to the DataTable's framework\n\t\t\t\t\tcheckEmpTable();\n\t\t\t\t\tempTable.row.add( [myArr[idx].employee_id,\n\t\t\t\t\t\tmyArr[idx].last_name,\n\t\t\t\t\t\tmyArr[idx].first_name,\n\t\t\t\t \tmyArr[idx].user_name,\n\t\t\t\t \tmyArr[idx].password,\n\t\t\t\t \tmyArr[idx].email,\n\t\t\t\t \tmyArr[idx].role.name, \n\t\t\t\t \tmyArr[idx].role.role_id\n\t\t\t\t ] ).draw();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase (403):\n\t\t\t\tbreak;\n\t\t\tcase (500):\n\t\t\t\tconsole.log('server error');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n \n xhr.open(\"GET\", 'employee');\n xhr.send();\t\n}", "readAllEmployeesByDepartment(departmentId) {\r\n return this.connection.query(\r\n \"SELECT employee.id, employee.first_name, employee.last_name, role.title FROM employee LEFT JOIN role on employee.role_id = role.id LEFT JOIN department department on role.department_id = department.id WHERE department.id = ?;\",\r\n departmentId\r\n );\r\n }", "getEmployees() {\n return this.http.get('http://dummy.restapiexample.com/api/v1/employees');\n }", "static async get(req, res) {\n const employeeDomain = new EmployeeDomain();\n employeeDomain.getAllEmployees(req, res);\n }", "static async findEmployee(id) {\n const user = await pool5.query(\n `\n select * from supervisor left join personal_information on personal_information.employee_id=supervisor.supervisor_id where personal_information.employee_id = $1`,\n [id]\n );\n return user.rows[0];\n }", "function viewAllEmployees() {\n console.log(\"Showing all employees...\\n\");\n connection.query(\"SELECT * FROM employee \", function (err, res) {\n if (err) throw err;\n for (var i = 0; i < res.length; i++) {\n console.log(res[i].id + \" | \" + res[i].first_name + \" | \" + res[i].last_name);\n }\n console.log(\"----------------\");\n })\n connection.end();\n}", "function viewEmployees() {\n connection.query(\"SELECT * FROM employees\", function (err, res) {\n if (err) throw err;\n for (var i = 0; i < res.length; i++) {\n console.log(res[i].id + \" | \" + res[i].first_name + \" | \" + res[i].last_name + \" | \" + res[i].role_id);\n }\n console.log(\"-----------------------------------\");\n start();\n })\n}", "function getEmployeeList_(companyID, locationID) {\r\n var deferred = $q.defer();\r\n if (isEmpty(companyID) || isEmpty(locationID)) {\r\n deferred.resolve([]);\r\n }\r\n showSpinnerDialog();\r\n $http({\r\n method: 'GET',\r\n url: Config.GetCompanyDetails + companyID + '/employees?location_ids=' + locationID,\r\n }).then(function (response) {\r\n console.log(response.data.employees);\r\n deferred.resolve(response.data.employees);\r\n closeSpinnerDialog();\r\n });\r\n return deferred.promise;\r\n }", "async getEmployeeById({commit}, id) {\n if (id <= 0) {\n throw Error('Id must be greater than zero')\n }\n const db = new EmployeeDbContext();\n commit('GET_EMPLOYEE_BY_ID', await db.getById(id))\n }", "getEmpDatabyid(id){\r\n let response = axios.get(`${this.url}/api/employees/${id}`);\r\n return response;\r\n }", "getAllEmployees() {\n return this.$http({\n method: 'GET',\n url: `${this.REST_CONSTANTS.BASE_URL}:${this.REST_CONSTANTS.PORT}/employee`\n });\n }", "function getSingleEmployee(res,mysql,context,Emp_ID,complete){\r\n\t\tvar sql = \"SELECT Emp_ID, Emp_Name, Store_ID, Emp_Phone_Number, Emp_Address_Street, Emp_Address_Zip FROM Employees WHERE Emp_ID = ?\" ;\r\n\t\tvar inserts = [Emp_ID];\r\n\r\n\t\tmysql.pool.query(sql,inserts,(error,results,fields)=>{\r\n\t\t\tif(error){\r\n\t\t\t\tres.write(JSON.stringify(error));\r\n\t\t\t\tres.end();\r\n\t\t\t}\r\n\t\t\tcontext.employee = results[0];\r\n\t\t\tcomplete();\r\n\t\t});\r\n\t}", "async function fetchEmployees(){\n\t\t\t\t// async function body\n\t\t\t\tconst e1 = await API.getEmployee(8569129)\n\t\t\t\tconst e2 = await API.getEmployee(254808831)\n\t\t\t\tconst e3 = await API.getEmployee(58197)\n\t\t\t\tconst e4 = await API.getEmployee(651065)\n\t\t\t\treturn [e1, e2, e3, e4]\n\t\t\t}", "findAllEmployeesByDepartment(departmentId) {\n return this.connection\n .promise()\n .query(\n \"SELECT employee.id, employee.first_name, employee.last_name, roles.title FROM employee LEFT JOIN roles on employee.role_id = roles.id LEFT JOIN department department on roles.department_id = department.id WHERE department.id = ?;\",\n departmentId\n );\n }", "function GetAllEmployee() {\n var getData = angularService.getEmployees();\n getData.then(function (emp) {\n $scope.employees = emp.data;\n }, function () {\n alert('Error in getting records');\n });\n }", "async fetchSalaryEmployee(id) {\r\n await this.checkLogin();\r\n var response = await axios.get(Config.employeeSalaryByIdApiUrl + \"\" + id, {\r\n headers: { Authorization: \"Bearer \" + AuthHandler.getLoginToken() },\r\n });\r\n return response;\r\n }", "function getUser(id) {\n fetch('http://dummy.restapiexample.com/api/v1/employee/' + id).then(resp => resp.json()).then(data => console.log(data));\n}", "static async getAnEmployee(req, res) {\n const employeeDomain = new EmployeeDomain();\n employeeDomain.getAnEmployee(req, res);\n }", "function viewEmployees() {\n connection.query(\n \"SELECT employee.id, first_name, last_name, roles.title, department.name AS department, roles.salary FROM employee INNER JOIN roles ON employee.role_id = roles.role_id INNER JOIN department ON roles.department_id = department.department_id\",\n (err, results) => {\n if (err) throw err;\n console.log(\"\\n\");\n console.table(results);\n console.log(\"===============================\");\n console.log(\"\\n \\n \\n \\n \\n \\n \\n\");\n }\n );\n // RETURN TO MAIN LIST\n runTracker();\n}", "function allEmployees() {\n //Build SQL query\n var query = \"SELECT employees.employee_id, employees.first_name, employees.last_name, roles.title, roles.salary, departments.department_name \";\n query += \"FROM employees LEFT JOIN roles ON employees.role_id = roles.role_id LEFT JOIN departments ON roles.department_id = departments.department_id\";\n connection.query(query, function (err, res) {\n if (err) throw err;\n console.table('Employees', res);\n start();\n });\n}", "async list() {\n try {\n const response = await Api('employee', { method: 'GET' });\n return response;\n } catch (errors) {\n return {\n errors,\n messages: [],\n };\n }\n }", "findAllEmployees() {\n return this.connection.promise().query(\n \"SELECT employee.id, employee.first_name, employee.last_name, roles.title, department.name AS department, roles.salary, CONCAT(manager.first_name, ' ', manager.last_name) AS manager FROM employee LEFT JOIN roles on employee.role_id = roles.id LEFT JOIN department on roles.department_id = department.id LEFT JOIN employee manager on manager.id = employee.manager_id;\"\n );\n }", "function getEmployees() {\n const query = 'SELECT CONCAT (employee.first_name, \" \", employee.last_name) as name FROM employee'\n\n connection.query(query, (err, res) => {\n if (err) throw err;\n\n addEmployee(res)\n })\n}", "function displayAllEmployees() {\n return connection.query(viewCommand);\n}", "function viewEmployeeList(cb) {\n let query = \"SELECT * FROM employee\";\n\n connection.query(query, (error, data) => {\n if (error) throw error;\n cb(data);\n });\n}", "viewEmployees() {\n return connection.query(`SELECT * from employee`)\n }", "function getEmployerById(req, res) {\n Employer.findById(req.params.id).exec(function (err, employer) {\n if (err)\n return res.send(err);\n res.status(200).json(employer);\n });\n}", "function GetAllEmployee() {\n debugger;\n var getData = myService.getEmployees();\n debugger;\n getData.then(function (emp) {\n $scope.employees = emp.data;\n }, function () {\n alert('Error in getting records');\n });\n }", "function getById(empId) {\n ajaxCall(\"Get\", \"api/employees/\" + empId, \"\")\n .done(function (data) {\n copyInfoToModal(data);\n })\n .fail(function (jqXHR, textStatus, errorThrown) {\n errorRoutine(jqXHR);\n });\n}", "function loadEmployees() {\n vm.empList = employeeInfo.getEmployees()\n .success(function(data) {\n vm.empList = data;\n console.log(vm.tempEmp);\n })\n .error(function() {\n console.log('Error fetching data');\n });\n }", "getEmpireById(id) {\n return client({\n method: 'GET',\n path: `${ROOT}/empires/${id}`,\n });\n }", "async function fetchEmployees(){\n\t\t\t\tconst ids = [8569129, 254808831, 58197, 651065]\n\t\t\t\t//const promises = ids.map(id => API.getEmployee(id))\n\t\t\t\tconst promises = ids.map(API.getEmployee)\n\t\t\t\treturn Promise.all(promises)\n\n\t\t\t\t// solution (2)\n\t\t\t\t/*const p1 = await API.getEmployee(8569129)\n\t\t\t\tconst p2 = await API.getEmployee(254808831)\n\t\t\t\tconst p3 = await API.getEmployee(58197)\n\t\t\t\tconst p4 = await API.getEmployee(651065)\n\t\t\t\treturn Promise.all[e1, e2, e3, e4] */\n\n\t\t\t\t// solution (3)\n\t\t\t\t/*const p1 = await API.getEmployee(8569129)\n\t\t\t\tconst p2 = await API.getEmployee(254808831)\n\t\t\t\tconst p3 = await API.getEmployee(58197)\n\t\t\t\tconst p4 = await API.getEmployee(651065)\n\t\t\t\treturn [await e1, await e2, await e3, await e4] */\n\n\t\t\t\t// solution (4) - parallel requests + parallel awaiting\n\t\t\t\t/*const res = []\n\t\t\t\tconst promises = ids.map(async (id, idx) => {\n\t\t\t\t\tconst e = await API.getEmployee(id)\n\t\t\t\t\tres[idx] = e\n\t\t\t\t}) \n\t\t\t\tawait Promise.all(promises)\n\t\t\t\treturn res*/\n\t\t\t}", "function getAll(request, response) {\n Employee.find(function(error, employees) {\n if(error) response.json({message: 'Could not find any employee'});\n\n response.json({employees: employees});\n }).select('-__v');\n}", "function viewAllEmployees() {\n db.query(employeeQuery, function (err, res) {\n if (err) throw err;\n console.log(\n \"---------------------------------------------------------------------------------------------------------------------------------------\"\n );\n console.table(res);\n console.log(\n \"---------------------------------------------------------------------------------------------------------------------------------------\"\n );\n start();\n });\n}", "function getEmployeeList() {\n /*mapping urls*/\n $.ajax({\n url: \"http://localhost:8081/ABCCompany/test\",\n type: 'GET',\n jasonp: \"callback\",\n contentType: \"application/json; charset=utf-8\",\n headers: headers,\n dataType: \"json\",\n /*if mapped successfully */\n success: function (result) {\n $.each(result, function (i, employee) {\n var id = employee.id;\n var $row = $('<tr>').append(\n $('<td>').text(employee.id),\n $('<td>').text(employee.name),\n $('<td>').text(employee.email),\n $('<td>').text(employee.address),\n $('<td>').text(employee.telephone),\n $('<td>').innerHTML =\n '<button class=\"btn-delete\" onclick=\"deleteEmployee(' + id + ')\">Delete</button>',\n $('<td>').innerHTML =\n '<button class=\"btn-edit\" onclick=\"editEmployee(' + id + ')\">Edit</button>');\n $('.tbl-content .employee_info').append($row);\n });\n\n },\n error: function (errorMsg) {\n alert('Failed! ' + errorMsg);\n }\n });\n }", "async findAssignedToCal(calID) {\n\t\tlet sqlRequest = `\n\t\t\tSELECT e.*\n\t\t\tFROM employee_calender ec\n\t\t\tINNER JOIN employee e ON ec.employee_id = e.id\n\t\t\tWHERE ec.calender_id = ` + calID.toString();\n\n\t\tconst rows = await this.common.findAll(sqlRequest);\n\t\tlet employees = [];\n\t\tfor (const row of rows) {\n\t\t\temployees.push(new employee(row.id, row.name, row.admin, row.reporting_admin, row.active));\n\t\t}\n\t\treturn employees;\n\t}", "async function viewEmployees() {\t\n\tconst res = await queryAsync('SELECT e.id, CONCAT(e.firstName, \" \", e.lastName) AS employeeName, role.title, role.salary, CONCAT(m.firstName, \" \", m.lastName) AS managerName FROM employee e LEFT JOIN employee m ON m.id = e.managerId INNER JOIN role ON e.roleId = role.id');\n\tconst allEmployees = [];\n\tconsole.log(' ');\n for (let i of res) { \n\t allEmployees.push({ ID: i.id, NAME: i.employeeName, ROLE: i.title, SALARY: i.salary, MANAGER: i.managerName });\n }\n\tconsole.table(allEmployees);\n start();\n}", "function viewEmployees() {\n connection.query(\"SELECT employee.id, employee.first_name, employee.last_name, role.title, department.name AS department, role.salary, CONCAT(manager.first_name, ' ', manager.last_name) AS Manager FROM employee LEFT JOIN employee manager on manager.id = employee.manager_id INNER JOIN role ON (role.id = employee.role_id) INNER JOIN department ON (department.id = role.department_id)\", function(err, res) {\n if(err) throw err;\n console.log(\"Employees:\")\n console.table(res)\n start();\n });\n}", "function viewEmployees() {\n \n const query = `SELECT first_name, last_name, title FROM employee LEFT JOIN role ON role.id = employee.role_id`;\n\n\tconnection.query(query, function(err, res) {\n\t\tif (err) throw err;\n \n console.table(res);\n\n\t\tstart();\n\t});\n}", "findAllEmployeesByManager(managerId) {\n return this.connection\n .promise()\n .query(\n \"SELECT employee.id, employee.first_name, employee.last_name, department.name AS department, roles.title FROM employee LEFT JOIN roles on roles.id = employee.role_id LEFT JOIN department ON department.id = roles.department_id WHERE manager_id = ?;\",\n managerId\n );\n }", "viewAllEmployees() {\n\t\treturn this.connection.query(\n\t\t\t`\n SELECT\n e1.id AS ID,\n e1.first_name AS First_Name,\n e1.last_name AS Last_Name,\n role.title AS Role,\n department.name AS Department,\n CONCAT(e2.first_name, ' ', e2.last_name) AS Manager,\n role.salary AS Salary\n FROM\n employee e1\n LEFT JOIN\n role ON e1.role_id = role.id\n LEFT JOIN\n employee e2 ON e1.manager_id = e2.id\n\t\t LEFT JOIN department ON role.department_id = department.id\n\t\t ORDER BY\n e1.id;\n `\n\t\t);\n }", "function viewAllEmployees() {\n const query = \"SELECT employee.id, employee.first_name, employee.last_name, role.title, department.department_name AS department, role.salary FROM employee LEFT JOIN role ON employee.role_id = role.id LEFT JOIN department on role.department_id = department.id\";\n db.query(query, function (err, res) {\n console.table(res);\n startTracker();\n });\n}", "function viewAllEmployees() {\n connection.query(\n 'SELECT e.id, e.first_name AS First_Name, e.last_name AS Last_Name, title AS Title, salary AS Salary, name AS Department, CONCAT(m.first_name, \" \", m.last_name) AS Manager FROM employee e LEFT JOIN employee m ON e.manager_id = m.id INNER JOIN role r ON e.role_id = r.id INNER JOIN department d ON r.department_id = d.id',\n function (err, res) {\n if (err) throw err;\n console.table(\"All Employees:\", res);\n init();\n }\n );\n}", "findAllEmployeesByDepartment(departmentId) {\n return this.connection.query(\n \"SELECT employee.id, employee.first_name, employee.last_name, role.title FROM employee LEFT JOIN role on employee.role_id = role.id LEFT JOIN department department on role.department_id = department.id WHERE department.id = ?;\",\n departmentId\n );\n}", "function dbGetEmployeeWrapper(id) {\n return new Promise(function(resolve, reject) {\n setTimeout(_ => {\n console.log(`Getting ${id}`);\n const employees = [\n {id: 1, name: 'John', headId: 3},\n {id: 2, name: 'Ann', headId: 3},\n {id: 3, name: 'Jack', headId: 4},\n {id: 4, name: 'Tom', headId: 6},\n {id: 5, name: 'Sarah', headId: 6},\n {id: 6, name: 'Nick', headId: 7},\n {id: 7, name: 'Lisa', headId: null}\n ];\n\n const employee = employees.find(emp => emp.id === id);\n if (employee) {\n resolve(employee);\n return;\n }\n reject(new Error(`Employee doesn't exist`));\n }, 2000);\n })\n}", "function getEmployee(req, res) {\n models.Employee.findAll({\n where: {\n code: req.params.code\n }\n }).then(employee => {\n return res.status(200).send({ message: employee })\n }).catch(error => {\n return res.status(500).send({ message: `Error al consultar los empleados ${error}` })\n })\n}", "function viewEmployees() {\n connection.query(\"SELECT first_name, last_name, title, salary, manager_id FROM employee JOIN role ON employee.role_id = role.id\", (err, result) => {\n if (err) {\n throw err;\n } else {\n console.table(result);\n beginApp();\n }\n });\n}", "function viewEmployees() {\n connection.query(\"SELECT * FROM employee\", function(error, results) {\n if (error) throw error;\n\n // This shows the results in a nice table in the CLI\n console.table(results);\n\n // Goes back to the main menu.\n start();\n })\n}", "function viewEmployees() {\n console.log('~~~~~~~~~~ All Employees ~~~~~~~~~~')\n const query = `SELECT employees.id, employees.first_name as 'first name', employees.last_name as 'last name', \n roles.title, departments.name as department, roles.salary, \n concat(m.first_name, ' ', m.last_name) as manager \n FROM employees \n INNER JOIN roles ON employees.role_id = roles.id\n INNER JOIN departments ON roles.department_id = departments.id \n LEFT JOIN employees m ON m.id = employees.manager_id`;\n\n db.promise().query(query)\n .then((results) => {\n console.table(results[0])\n })\n .catch('error getting the rows')\n .then(() => {\n menu();\n })\n}", "function viewEmp() {\n connection.query(\n \"SELECT employee.id,first_name,last_name,manager,title,salary,department FROM employee JOIN role ON employee.role_id = role.id JOIN department ON role.department_id = department.id\",\n function (err, res) {\n if (err) throw err;\n console.table(res);\n start();\n }\n );\n}", "function viewEmployees(){\n // Select all data from the departmenets table\n connection.query(`SELECT * FROM employee_table`, (err, res) => {\n // If error log error\n if (err) throw err;\n // Display the data in a table format...\n console.table(res);\n // Run the task completed function\n taskComplete();\n })\n }", "function _refreshEmployees() {\n\t\n\t$.ajax({\n\t\t 'url' : '/tasktracker/tasks/employees',\n\t\t 'type' : 'GET',\n\t\t 'success' : function(data) {\n\t\t \t$.each(data, function(index) {\n\t\t \t\tconsole.log(data[index].name);\n\t\t \t\t_generateEmpList(data[index].name);\n\t\t });\n\t\t },\n\t\t\t'error' : function(XMLHttpRequest, textStatus, errorThrown){\n\t\t\t\tconsole.log(textStatus);\n\t\t\t}\n\t\t });\n\t}", "findAllEmployee() {\n\t\tconst query = `\n\t\tSELECT \n\t\temployee.id,\n (CONCAT(employee.first_name, ' ', employee.last_name)) AS staff_name\n\t\tFROM employee\n\t\t`;\n\t\treturn this.connection.query(query);\n\t}", "function getAllEmployee(req, res) {\n models.Employee.findAll().then(employees => {\n return res.status(200).send({ message: employees })\n }).catch(error => {\n return res.status(500).send({ message: `Error al consultar los empleados ${error}` })\n })\n}", "function queryEmployeeInfo() {\n employeeInfo = {};\n var employeeSearch = search.create({\n type: search.Type.EMPLOYEE,\n filters: [\n helper.filter('giveaccess').is('T'),\n helper.filter('isinactive').is('F')\n ],\n columns: [\n helper.column('firstname').create(),\n helper.column('middlename').create(),\n helper.column('lastname').create()\n ]\n });\n var results = helper.resultset(employeeSearch.run());\n for ( var index in results) {\n var result = results[index];\n employeeInfo[result.id] = formatUserName(result.getValue(helper.column('firstname')), result.getValue(helper.column('middlename')), result.getValue(helper.column('lastname')));\n }\n }", "function getEmployee(param) {\n var returnObj = {};\n returnObj.returnType = {\n \"Content-Type\" : \"application/json\"\n };\n\n\n var employee = lookupEmployeeById(param);\n \n returnObj.content = employee;\n returnObj.content = JSON.stringify(returnObj.content);\n\n return returnObj;\n}", "function getEmployees() {\n $.ajax({\n type: 'GET',\n url: '/employees',\n success: function(response) {\n console.log(\"Got from server:\", response);\n appendDom(response);\n }\n });\n}", "async function viewAllEmployees () {\n // found information on self joins https://stackoverflow.com/questions/7451761/how-to-get-the-employees-with-their-managers\n const sql = 'SELECT e.id, e.first_name, e.last_name, role.title, department.name, role.salary, CONCAT(m.first_name,\\' \\', m.last_name) AS manager FROM employee e LEFT JOIN employee m ON e.manager_id = m.id LEFT JOIN role ON e.role_id = role.id LEFT JOIN department ON role.department_id = department.id';\n connection.promise().query(sql, (err, row) => {\n if (err) {\n console.log(`Error: ${err}`);\n return;\n }\n console.table(row);\n startingPrompt();\n return;\n });\n}", "function getEmployeeList(){\n return connection.query(\"SELECT * FROM employee\", function(err, res) {\n const employeeList = res.map(record => {\n return `${record.id} - ${record.first_name} ${record.last_name}`\n });\n console.log(employeeList)\n return employeeList;\n });\n}", "function viewEmployees() {\n let query = \n \"SELECT employee.id, employee.first_name, employee.last_name, person_role.title, person_role.salary, department.dept_name, CONCAT(e.first_name, ' ' ,e.last_name) AS Manager FROM employee INNER JOIN person_role on person_role.id = employee.role_id INNER JOIN department on department.id = person_role.department_id left join employee e on employee.manager_id = e.id;\";\n return connection.query(query, function (err, res) {\n if (err) throw err;\n console.table(res);\n start();\n });\n}", "async function getEmployees(url) {\n\tconst peopleJSON = await getJSON(url);\n\n\tconst profiles = peopleJSON.results.map(async (person) => {\n\t\tconst name = `${person.name.first} ${person.name.last}`;\n\t\tconst email = person.email;\n\t\tconst location = `${person.location.city}, ${person.location.state}`;\n\t\tconst address = `${person.location.street.name} ${person.location.street.number}, ${person.location.city}, ${person.location.state} ${person.location.postcode}`;\n\t\tconst large = person.picture.large;\n\t\tconst phoneNumber = person.phone;\n\t\tconst birthday = person.dob.date;\n\t\treturn { name, email, location, address, large, phoneNumber, birthday };\n\t});\n\n\treturn Promise.all(profiles);\n}", "function generateEmployees() {\n const query = \"SELECT ID, first_name, last_name FROM employee\";\n connection.query(query, (err, res) => {\n employees.splice(0, employees.length);\n employeesId.splice(0, employeesId.length);\n for (const i in res) {\n employees.push(res[i].first_name + \" \" + res[i].last_name);\n employeesId.push(res[i].ID)\n }\n })\n}", "viewEmployees() {\n console.log(`\n\n * Viewing All Employees *\n `)\n connection.query(`SELECT employees.id, employees.first_name, employees.last_name, roles.title AS role, roles.salary AS salary, departments.name AS department, CONCAT(m.first_name, ' ', m.last_name) AS manager FROM employees LEFT JOIN roles ON employees.role_id = roles.id LEFT JOIN departments ON roles.department_id = departments.id LEFT JOIN employees m ON employees.manager_id = m.id;`, function(err, res) {\n if (err) throw err;\n console.table(res);\n beginAgain();\n })\n }", "function viewEmployees() {\n db.query('SELECT * FROM employee', function (err, results) {\n console.table(results);\n goPrompt();\n });\n}", "async findByEmpId(id) {\n\t\tlet sqlRequest = \"SELECT * FROM clocking WHERE id=$id\";\n\t\tlet sqlParams = {$id: id};\n\t\tconst row = await this.common.findOne(sqlRequest, sqlParams)\n\t\t.then(() => {\n\t\t\treturn true;\n\t\t}).catch(() => {\n\t\t\treturn false\n\t\t})\n\n\t\treturn row;\n\t}", "function viewEmployees(employee) {\n let newQuery = \"SELECT employee.first_name, employee.last_name, roles.title, roles.salary, department.dept_name AS department FROM employee LEFT JOIN roles ON employee.role_id = roles.id LEFT JOIN department ON roles.department_id = department.id\";\n\n databaseConnect.query(newQuery, (err, res) => {\n if (err) throw err;\n \n // old method of gathering employees... too much work imo\n // res.forEach((employee) => {\n // eArray.push({\n // 'id': employee.id, \n // 'first_name': employee.first_name,\n // 'last_name': employee.last_name, \n // 'title': employee.title,\n // 'department': employee.department,\n // 'salary': employee.salary,\n // 'manager': employee.manager,\n // });\n // });\n\n console.log('Here are all active Employees:');\n \n console.log('====================================================================');\n console.table(res);\n console.log('====================================================================');\n\n\n startMenu();\n }); \n}", "function getEmployees() {\n var query = `SELECT e.id, e.first_name, e.last_name, r.title Role, d.name AS department , r.salary,\n concat( manager.first_name,\" \",manager.last_name ) Manager\n FROM \n employee e\n left join role r\n on e.role_id = r.id\n left join department d \n on r.department_id = d.id\n left join employee manager on e.manager_id = manager.id;`\n\n connection.query(query, function (err, res) {\n if (err) throw err;\n // Log all results of the SELECT statement\n console.table(res);\n main();\n\n });\n\n}", "function loadMyEmployees(ajdi) {\n let myEmployeesArr = [];\n let supervisorFilter = \"&$filter=(Approver eq \" + parseInt(ajdi) + \")\";\n // console.log( supervisorFilter );\n\n $.when(getAllListItemsWithFilters(site, \"Emplyoee%20Details\", supervisorFilter)).done(function (data) {\n\n // console.log(data.d);\n\n data.d.results.forEach(function (item) {\n // console.log(item.AuthorId);\n\n\n $.when(loadUserById(item.EmployeeId)).done(function (rawUser) {\n\n console.log(rawUser);\n\n /*\n\t \t\tmyEmployeesArr.push({\n\t \t\t\t\"ID\": rawUser.Id,\n\t \t\t\t\"Email\": rawUser.Email,\n\t \t\t\t\"UserName\": rawUser.Title,\n\t \t\t\t\"Login\": rawUser.LoginName\n\t \t\t});\n\t \t\t*/\n });\n });\n });\n\n return myEmployeesArr;\n}", "function viewAllEmployees() {\n const sql = `\n SELECT \n employee.id AS ID,\n employee.first_name AS FirstName, \n employee.last_name AS LastName, \n role.title AS Title, \n role.salary AS Salary, \n department.name AS Department, \n CONCAT(manager.first_name, \" \", manager.last_name) AS Manager\n FROM employee\n LEFT JOIN role \n ON employee.role_id = role.id\n LEFT JOIN department \n ON role.department_id = department.id\n LEFT JOIN employee AS manager\n ON employee.manager_id = manager.id\n ORDER BY employee.id;`\n db.query(sql, (err, response) => {\n if (err) {\n throw(err);\n return;\n }\n console.log(``);\n console.log(chalk.white.bold(`============================================================================================================`));\n console.log(` ` +chalk.white.bold(` Employees `));\n console.log(chalk.white.bold(`============================================================================================================`));\n console.table(response);\n console.log(chalk.white.bold(`============================================================================================================`));\n });\n init();\n}", "findAllEmployeesByManager(managerId) {\n return this.connection.query(\n \"SELECT employee.id, employee.first_name, employee.last_name, department.name AS department, role.title FROM employee LEFT JOIN role on role.id = employee.role_id LEFT JOIN department ON department.id = role.department_id WHERE manager_id = ?;\",\n managerId\n );\n}", "function viewEmployees() {\n connection.query(\"SELECT first_name, last_name, department.name, role.title, role.salary FROM ((employee INNER JOIN role ON role_id = role.id) INNER JOIN department ON department_id = department.id);\", function (err, res) {\n if (err) throw err;\n console.log(\"\\n All employees retrieved from database. \\n\");\n console.table(res);\n askQuestions();\n });\n}", "function employeeSearch() {\n let query = `\n SELECT employee.id, first_name, last_name, title, salary, dep_name, manager_id\n FROM employee\n JOIN roles\n ON role_id = roles.id\n JOIN department\n ON dep_id = department.id;`;\n return connection.query(query, (err, res) => {\n if (err) throw err;\n console.table(res);\n startSearch();\n });\n}" ]
[ "0.7647195", "0.7308158", "0.7272167", "0.7231006", "0.7220285", "0.72154903", "0.7209296", "0.7154747", "0.7139743", "0.7137463", "0.71090627", "0.7105582", "0.7092697", "0.706308", "0.70229095", "0.70127225", "0.70068526", "0.6992959", "0.69889885", "0.6962722", "0.69527036", "0.69501126", "0.69395083", "0.6903983", "0.689924", "0.68988824", "0.6897514", "0.6882576", "0.68629164", "0.68021566", "0.6771185", "0.6758077", "0.67276615", "0.6726133", "0.67154795", "0.6708567", "0.669242", "0.6658877", "0.6656916", "0.6651862", "0.6640935", "0.6623308", "0.6559165", "0.6548428", "0.6534262", "0.6518925", "0.6508927", "0.6500505", "0.64753926", "0.64742804", "0.64693284", "0.6469288", "0.64675134", "0.6463799", "0.6447506", "0.64461017", "0.643197", "0.64217865", "0.6420303", "0.64007366", "0.6397589", "0.6374534", "0.6355357", "0.6354442", "0.6347142", "0.63382363", "0.6335692", "0.63281995", "0.632648", "0.63159114", "0.63066936", "0.6305625", "0.6281527", "0.6281491", "0.62794924", "0.6272654", "0.6271819", "0.62690496", "0.62644184", "0.6262704", "0.6260309", "0.62558883", "0.6249044", "0.622243", "0.6214855", "0.6208407", "0.62058216", "0.6203039", "0.61766994", "0.6176277", "0.61738217", "0.6170372", "0.6145857", "0.61400676", "0.6135076", "0.61337656", "0.61242265", "0.61234623", "0.6109481", "0.6108384", "0.61061096" ]
0.0
-1
getEmployeeJobData(): retrieve employee job data from server
getEmployeeJobData() { axios({ method: 'get', url: 'http://157.230.172.148:3000/api/queries/findJobs?managerID=resource%3Aorg.pow.app.User%23' + uuidv3(store.getState().email, uuidv3.URL) }) .then((response) => { console.log(response); this.populateEmployeeData(response.data); }) .catch((error) => { console.log(error); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestJobData(event, callback) {\n\t\n var options = { \n\t method: 'GET',\n url: 'https://api.servicem8.com/api_1.0/job/' + event.eventArgs.jobUUID + '.json',\n auth: {\n bearer: event.auth.accessToken\n }\n };\n\n //Make Request to ServiceM8 API\n request(options, function (error, response, body) {\n \n\t if (error) {\n\t\t//Handle Error\n\t\treturn callback(\"Unable to retrieve job [\" + event.eventArgs.jobUUID + \"] [\" + error + \"]\");\n\t }\n\t\n\t//Parse Job Data\n\t var jobData = JSON.parse(body);\n\t\n\t //Success - Return Job JSON as the Response\n callback(null, { \n\t\teventResponse: JSON.stringify(jobData, null, 2)\n\t });\n\t\n });\n\t\n}", "static async getAllJobs(data={}) {\n let res = await this.request('jobs/', data);\n return res.jobs;\n }", "async populateEmployeeData(data) {\n let jobs = [];\n for (let i = 0; i < data.length; i++){\n if (data[i].employee !== 'resource:org.pow.app.User#' + uuidv3(store.getState().email, uuidv3.URL) &&\n typeof(data[i].endDate) === 'undefined') {\n await this.getEmployeeData(data[i].employee.split('#')[1]);\n jobs.push(data[i]);\n }\n }\n await this.setState({\n employeeJobs: jobs\n });\n }", "function GetEmployeeDataServer()\n{\n makeServiceCall(\"GET\", site_properties.server_url, true)\n .then(responseText => {\n employeePayrollList = JSON.parse(responseText);\n ProcessResponse();\n })\n .catch(error => {\n console.log(\"GET Error Status: \" + JSON.stringify(error));\n employeePayrollList = [];\n ProcessResponse();\n });\n}", "function getEmps() {\n\t\t$http.get('/salary_input')\n\t\t\t.then(function (response) {\n\t\t\t\tconsole.log('Employee Data Get ' + response);\n\t\t\t\tself.employees = response.data;\n\t\t\t});\n\t}", "function loadJobData() {\n $.ajax({\n dataType: \"xml\",\n url: server + \"/go/api/jobs/scheduled.xml\",\n timeout: 2000\n }).done(function(data) {\n $('#scheduled-jobs').html('');\n\n $(data).find('job').each(function() {\n job_hash = {\n 'name': $(this).find('buildLocator').text(),\n 'url': $(this).find('link').attr('href'),\n 'cancel_url': cancelUrl( $(this).find('buildLocator').text() )\n }\n $('#scheduled-jobs').append( scheduled_job_template( job_hash ))\n });\n });\n}", "getJobs() {\n return service\n .get('/jobs/')\n .then((res) => res.data)\n .catch(errorHandler);\n }", "function getJobByUser(id) {\n var deferred = $q.defer();\n var url = ENV.apiUrl + 'Jobs/GetJobByUser?userid=' + id;\n //var url = \"http://localhost:53977/odata/AnimalTypes\";\n console.log(url);\n\n $http.get(url, { cache: false }).success(function(data) {\n deferred.resolve(data);\n\n }).error(function(err) {\n deferred.reject();\n\n CommonServices.showAlert(JSON.stringify(err));\n //CommonServices.showError(MessageService.networkErrorMessage);\n });\n return deferred.promise;\n }", "async function getJobInfo(jobID) {\n\t\tawait axios.get(advertisementUrl, {params: {job_id: jobID}})\n\t\t\t.then(res => {\n\t\t\t\tconsole.log(res.data.job[0][1])\n\t\t\t\tconst job_data = res.data.job[0][1]\n\t\t\t\tsetTitle(job_data[\"title\"]);\n\t\t\t\tsetCompany(job_data[\"company\"]);\n\t\t\t\tsetLocation(job_data[\"location\"]);\n\t\t\t\tsetJobType(job_data[\"job_type\"]);\n\t\t\t\tsetSalary(job_data[\"salary_pa\"]);\n\t\t\t\tsetLoading(false);\n\t\t\t}).catch((error) => {\n\t\t\t\tconsole.log(\"error: \", error.response)\n\t\t\t\tsetMessage(\"An error occured, please try again\")\n\t\t\t\tsetOpen(true)\n\t\t\t})\t\n\t}", "function getJobsData() {\n _axios.default.get(CORS_KEY + API_URL + `positions.json?description=${state.description}&location=${state.location}`).then(response => {\n dispatch({\n type: ACTIONS.LOADING_STATE,\n payload: response.data\n });\n }).catch(error => {\n dispatch({\n type: \"FETCH_ERROR\"\n });\n });\n } //searching for jobs by key words, use this function", "getJobPostingFields() {\n var jobPostingSchemaConverterObject = this;\n return new Promise(function(resolve, reject){\n\n var url = String(jobPostingSchemaConverterObject.getDomainName() + \"/api/job_posting_fields\");\n var headers = {\n [httpConstants.CONTENT_TYPE]: httpConstants.APPLICATION_JSON,\n [httpConstants.AUTHORIZATION]: \"Bearer \" + jobPostingSchemaConverterObject.getAPIToken()\n }\n jobPostingSchemaConverterObject.apiClient.makeApiCall(url, 'GET', headers).then(\n function(employeeFieldsResponse) {\n resolve(JSON.parse(employeeFieldsResponse.response));\n },\n function(error) {\n console.log('Error while fetching employee fields', error);\n reject(error);\n }\n );\n });\n }", "async function fetchEmployees(){\n\t\t\t\t// async function body\n\t\t\t\tconst e1 = await API.getEmployee(8569129)\n\t\t\t\tconst e2 = await API.getEmployee(254808831)\n\t\t\t\tconst e3 = await API.getEmployee(58197)\n\t\t\t\tconst e4 = await API.getEmployee(651065)\n\t\t\t\treturn [e1, e2, e3, e4]\n\t\t\t}", "function loadEmployees() {\n API.getEmployees()\n .then(result => {\n // testing and checking what is sent from Sequelize\n console.log(result.data);\n setData(result.data);\n })\n .catch(err => console.log(err));\n }", "function getEmployees(){\n fetch('http://localhost:8080/ERS/employees')\n .then(res => res.json())\n .then(data => {\n employees = data;\n console.log(\"接收到所有的员工数据\" + employees);\n appendEmployeesToTable(employees);\n });\n}", "getEmployees(){\r\n\t\tvar that = this;\r\n\t\t$.ajax({\r\n\t\t method: \"POST\",\r\n\t\t url: \"/ajaxgetemployees\",\r\n\t\t data: { OrderID: that.orderId }\r\n\t\t})\r\n\t\t.done(function( resp ) {\r\n\t\t\tthat.Employees = resp;\r\n\t\t\t\r\n\t\t\tconsole.log(resp);\r\n\t\t\t\r\n\t\t\tthat.setupEmployeesInListbox();\r\n\t\t\t//setup the order_details rows\r\n\t\t\t//First: read all of the products rows into an array called that.ProductsData\r\n\t\t\t//getProductsArr() calls createOrderDetailsRows()\r\n\t\t\treturn that.getProductsArr();\r\n\t\t\t\t\t\r\n\t\t})\r\n\t\t.fail(function(){\r\n\t\t\talert(\"Ajax Failed in getEmployees()\");\r\n\t\t});\r\n\t}", "function getTexasJobData(skillName) {\n\n // Check to see if skillset-location is already stored in local storage, if so, retrieve & display\n if (localStorage.getItem(`${skillName}-texas`) !== null) {\n var skillLocationArray = JSON.parse(localStorage.getItem(`${skillName}-texas`));\n displayTexasJobResults(skillLocationArray);\n } else {\n // Set our fetch URL to skill selected\n var apiUrl = 'https://api.adzuna.com/v1/api/jobs/us/search/1?app_id=81c88f02&app_key=8fd8923d7be696f1f642efb26fcc6fd7&results_per_page=50&what=' + skillName + '&where=Texas';\n\n fetch(apiUrl)\n .then(function(response) {\n if (response.ok) {\n response.json().then(function(data) {\n var searchResultArray = setTexasJobResults(data.results);\n displayTexasJobResults(searchResultArray);\n localStorage.setItem(`${skillName}-texas`, JSON.stringify(searchResultArray));\n });\n } else {\n alert('Error: ' + response.statusText);\n }\n })\n .catch(function(error) {\n alert('Unable to connect to Adzuna Job Aggregator');\n });\n }\n}", "function getEmployee(param) {\n var returnObj = {};\n returnObj.returnType = {\n \"Content-Type\" : \"application/json\"\n };\n\n\n var employee = lookupEmployeeById(param);\n \n returnObj.content = employee;\n returnObj.content = JSON.stringify(returnObj.content);\n\n return returnObj;\n}", "static async getJob(id) {\n const res = await this.request(`jobs/${id}`);\n return res.job;\n }", "static async getJob(id) {\n let res = await this.request(`jobs/${id}`);\n return res.job;\n }", "async function jobs() {\n try {\n const response = await axios.get('http://127.0.0.1:5002/job/abonnements/alljobs/email/' + localStorage.getItem('email'));\n console.log(response);\n return response;\n } catch (error) {\n console.error(error);\n }\n }", "async function jobsGet() {\n const subscriptionId = process.env[\"DATABOX_SUBSCRIPTION_ID\"] || \"YourSubscriptionId\";\n const resourceGroupName = process.env[\"DATABOX_RESOURCE_GROUP\"] || \"YourResourceGroupName\";\n const jobName = \"TestJobName1\";\n const expand = \"details\";\n const options = { expand };\n const credential = new DefaultAzureCredential();\n const client = new DataBoxManagementClient(credential, subscriptionId);\n const result = await client.jobs.get(resourceGroupName, jobName, options);\n console.log(result);\n}", "function getEmployees() {\n var employeeList = new XMLHttpRequest();\n employeeList.onload = function() {\n rawEmployeeData = (this.responseText).split(\"<newrecord>\");\n for (i = 0; i < rawEmployeeData.length - 1; i++) {\n each = rawEmployeeData[i].split(\"/\");\n employeeData.push({\n id: each[0],\n f_name: each[1],\n l_name: each[2],\n phone1: each[3]\n });\n }\n }\n employeeList.open(\"get\", \"php/get/get-emps.php\", false);\n employeeList.send();\n}", "fetchEmployee(params) {\r\n return Api().get('/employees/' + params)\r\n }", "async function getEmployee() {\n try {\n const data = await getJsonData('../localStore/store.json');\n return data.employees;\n }\n catch (e) {\n console.log(e);\n }\n}", "getEployeeByID(employee_id : number): Promise<Employee[]>{\n return axios.get(url+'/employee/'+employee_id);\n }", "function getAllJobInternshipAPI(){\n\t\nvar userId = document.getElementById(\"uId\").value;\n\t\n\tfetch(path+\"/getAllJobInternshipDashboard/\"+userId,{\n\t\t\n\t\tmethod: \"GET\",\n\t headers: {\n\t \"Content-Type\": \"application/json\",\n\t },\n\t\t\n\t})\n\t.then((response)=>response.json())\n\t.then((jobInternships)=>{\n\t\tconsole.log(\"successfully fecth all data\", jobInternships);\n\t\tif(jobInternships){\n\t\t\tpopulateJobInternship(jobInternships);\n\t\t}\n\t})\n\t.then((error)=>{\n\t\t\n\t\treturn null;\n\t\t\n\t});\n}", "function _getListOfJobs() {\n\t\t//Get the Connection to the Database\n\t\tvar oConnection = $.db.getConnection();\n\n\t\t//Build the Query\n\t\tvar lvQuery = 'SELECT * FROM \"' + gvSchemaName + '\".\"' + gvTableName + '\"';\n\t\tlvQuery = lvQuery + ' WHERE \"JOB_NAME\" = ' + \"'\" + gvJobName + \"'\";\n\n\t\t//Prepare the SQL Statement to read the entries\n\t\tvar oStatement = oConnection.prepareStatement(lvQuery);\n\n\t\t//Execute the Query\n\t\tvar lsReturn = oStatement.executeQuery();\n\n\t\t//Map and Save the results\n\t\tvar Jobs = [];\n\n\t\twhile (lsReturn.next()) {\n\t\t\tvar oEntry = {\n\t\t\t\tID: lsReturn.getString(1),\n\t\t\t\tJOB_NAME: lsReturn.getString(2),\n\t\t\t\tXSCRON: lsReturn.getString(3)\n\t\t\t};\n\t\t\tJobs.push(oEntry);\n\t\t}\n\n\t\t//Close the DB Connection\n\t\toStatement.close();\n\t\toConnection.close();\n\n\t\t//Return the records\n\t\treturn Jobs;\n\t}", "function getEmployees(res,mysql,context,complete){\r\n\t\tmysql.pool.query(\"SELECT Employees.Emp_ID, Employees.Emp_Name, Employees.Store_ID, Employees.Emp_Phone_Number, Employees.Emp_Address_Street, Employees.Emp_Address_Zip FROM Employees\",(error,results,fields)=>{\r\n\t\t\tif(error){\r\n\t\t\t\tres.write(JSON.stringify(error));\r\n\t\t\t\tres.end();\r\n\t\t\t}\r\n\t\t\tcontext.employees = results;\r\n\t\t\tcomplete();\r\n\t\t});\r\n\t}", "getData(job) {\n const jobRuns = job.jobRuns.nodes;\n\n return jobRuns.map(function(jobRun) {\n const children = jobRun.tasks.nodes.map(function(jobTask) {\n const startedAt = jobTask.dateStarted;\n const finishedAt = jobTask.dateCompleted;\n const runTime = calculateRunTime(startedAt, finishedAt);\n\n return {\n taskID: jobTask.taskId,\n status: jobTask.status,\n startedAt,\n finishedAt,\n runTime\n };\n });\n\n const startedAt = jobRun.dateCreated;\n const finishedAt = jobRun.dateFinished;\n const runTime = calculateRunTime(startedAt, finishedAt);\n\n return {\n finishedAt,\n id: jobRun.jobID,\n jobID: job.id,\n startedAt,\n status: jobRun.status,\n runTime,\n children\n };\n });\n }", "employeeData(state) {\n return state.employees\n }", "getJobs () {\n }", "function joblist() {\n console.log('Inside factory now');\n var deferred = $q.defer();\n\n $http.get(jobUrl + '/job/list/status')\n .then (\n function(response) {\n deferred.resolve(response.data);\n },\n function(errResponse) {\n deferred.reject(errResponse);\n }\n );\n return deferred.promise;\n }", "function receiveDataJob(json){\n\tconst dataJobDetail = json;\n\treturn {\n\t\ttype: RECEIVE_DATAJOB,\n\t\tdataJobDetail\n\t}\n}", "function getJobs(id) {\n try {\n axios.get(`http://localhost:5000/jobs/${id}`)\n .then(res => {\n if (res.data.length !== 0) {\n setJobs(res.data[0].jobs);\n console.log(res.data[0].jobs)\n } else {\n console.log(\"no data\")\n }\n })\n .catch(err => console.log(err));\n } catch (error) {\n console.log(error);\n }\n }", "static async getJob({ id }) {\n let apiResponse = await JoblyApi.request(`jobs/${id}`);\n return apiResponse.job;\n }", "getJobs() {\n return this._http.get('http://localhost:5000').pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__[\"catchError\"])(JobApiService_1._handleError));\n }", "function getEmployees(res, mysql, context, complete) {\n mysql.pool.query(\"SELECT id, fname, lname, title FROM Employees\", function (error, results, fields) {\n if (error) {\n res.write(JSON.stringify(error));\n res.end();\n }\n context.employees = results; //define the results as \"employees\"\n complete(); //call the complete function to increase callbackcount\n });\n }", "function getEmployees() {\n\t\t\temployeeService.getEmployees().then(function(data) {\n\t\t\t\tvm.employees = data;\n\t\t\t});\n\t\t}", "function getJob() {\r\n\t//can be called by testJobSelect function (test drop down on page)\r\n\tplayerDetails.job = jobs.war; //<--- hard-coded. will need to be replaced with db query.\r\n\taddJobStyling(playerDetails.job);\r\n}", "function get_data() {}", "function getEmployees(res, mysql, context, complete) {\n mysql.pool.query(\"SELECT id, fname, lname FROM Employees WHERE fsa = TRUE\", function (error, results, fields) {\n if (error) {\n res.write(JSON.stringify(error));\n res.end();\n }\n context.employee = results; //define results as \"employee\"\n complete(); //call the complete function to increase callbackcount\n });\n }", "async function jobsGetExport() {\n const subscriptionId = process.env[\"DATABOX_SUBSCRIPTION_ID\"] || \"YourSubscriptionId\";\n const resourceGroupName = process.env[\"DATABOX_RESOURCE_GROUP\"] || \"YourResourceGroupName\";\n const jobName = \"TestJobName1\";\n const expand = \"details\";\n const options = { expand };\n const credential = new DefaultAzureCredential();\n const client = new DataBoxManagementClient(credential, subscriptionId);\n const result = await client.jobs.get(resourceGroupName, jobName, options);\n console.log(result);\n}", "function getEmployeeList_(companyID, locationID) {\r\n var deferred = $q.defer();\r\n if (isEmpty(companyID) || isEmpty(locationID)) {\r\n deferred.resolve([]);\r\n }\r\n showSpinnerDialog();\r\n $http({\r\n method: 'GET',\r\n url: Config.GetCompanyDetails + companyID + '/employees?location_ids=' + locationID,\r\n }).then(function (response) {\r\n console.log(response.data.employees);\r\n deferred.resolve(response.data.employees);\r\n closeSpinnerDialog();\r\n });\r\n return deferred.promise;\r\n }", "GetSchedulerData(JobSchedule){\n return new Promise((resolve, reject)=>{\n let SchedulerData = new Object()\n this.GetDbConfig(\"BackupScheduler\").then((reponse)=>{\n SchedulerData = reponse\n if (JobSchedule == null) {\n SchedulerData.JobScheduleStarted = false\n SchedulerData.JobScheduleNext = \"Scheduler not started\"\n } else {\n SchedulerData.JobScheduleStarted = true\n SchedulerData.JobScheduleNext = this.GetDateTimeString(JobSchedule.nextInvocation())\n }\n resolve(SchedulerData)\n },(erreur)=>{\n this.LogAppliError(\"GetSchedulerData error : \" + erreur, \"Server\", \"Server\")\n reject(erreur)\n })\n })\n }", "function getEmployeeJobApplication(firstname) {\n\treturn Employee.findOne({firstname: firstname})\n\t .populate(\"applications\").exec((err, posts) =>{\n console.log(\"Populated Employee\" + posts)\n }\n\t \n)\n}", "function GetAllEmployee() {\n debugger;\n var getData = myService.getEmployees();\n debugger;\n getData.then(function (emp) {\n $scope.employees = emp.data;\n }, function () {\n alert('Error in getting records');\n });\n }", "job(id) {\n return this.__get(`jobs/${id}`);\n }", "function getResponseData() {\n\tconnection.query('SELECT * FROM departments', function(err, res) {\n\t\tif (err) throw err;\n\t\texecutiveInputs(res);\n\t})\n}", "function getData(err, user) {\n //logger.debug(user);\n\n //get individual br asset report\n\n var _sql = \"SELECT a.machine as Machine,\\\n a.tacho as Tacho,\\\n a.site as Site,\\\n a.description as Description,\\\n a.order_number as OrderNumber,\\\n a.id_number as ID_Number,\\\n a.jlg_jobnumber as Job_Number,\\\n a.creation_date as Creation_Date,\\\n a.`mileage_e/w` as Mileage,\\\n a.job_status_idjob_status as Status_id,\\\n st.description as Status, \\\n a.finished as Finished,\\\n a.invoiced as Invoiced,\\\n a.idjob as DB_ID, \\\n a.priority as Priority, \\\n b.name as Customer,\\\n IF(c.stoptime IS NULL, 'Not Started', c.stoptime) as Last_Worked\\\n FROM job a \\\n JOIN job_status st \\\n ON st.idjob_status = a.job_status_idjob_status \\\n JOIN customer b \\\n ON b.idcustomer = a.customer_idcustomer\\\n LEFT JOIN (SELECT * FROM (SELECT stoptime, job_idjob FROM work_instance ORDER BY stoptime DESC) as temp GROUP BY job_idjob) as c\\\n ON c.job_idjob = a.idjob \\\n WHERE a.jlg_jobnumber = ?\";\n //logger.info(_sql);\n var _array = [req.params.job_number];\n mysql.query(_sql, _array, function(err2, rows) {\n if (!err2) {\n for (var i = 0; i < rows.length; i++) {\n\n if (rows[i]['Last_Worked'] != \"Not Started\") {\n var tempTime = new Date(rows[i]['Last_Worked']);\n logger.debug(tempTime);\n var tempTime2 = tempTime.toUTCString();\n // logger.debug(tempTime2);\n rows[i]['Last_Worked'] = tempTime2;\n }\n //logger.debug(rows[i]['Last_Worked']);\n }\n res.json(rows);\n\n } else {\n logger.debug('error:', err2);\n res.status(500).send(err);\n }\n })\n\n }", "function getEmployees(callback){\n\n postGresClient.connect(connectionString, function(err, client, done){\n if(err) {\n callback('sorry your connection to postGres failed');\n }else {\n client.query('SELECT * FROM employees order by id',\n [],function(err,result) {\n if(err) {\n callback('getEmployees operation failed!!!');\n }else{\n done();\n callback(null, result.rows);\n }\n });\n }\n\n });\n postGresClient.end();\n }", "static getJobOffers(){\n let url = \"http://localhost:3000/api/jobs\";\n let token = this.getUserToken();\n let config = {headers: {authorization: \"Bearer \" + token}};\n return axios.get(url, config);\n }", "function GetAllEmployee() {\n var getData = angularService.getEmployees();\n getData.then(function (emp) {\n $scope.employees = emp.data;\n }, function () {\n alert('Error in getting records');\n });\n }", "function getData() {\n\n var sqlQuery = \"INSERT INTO job \\\n (`machine`,`tacho`,`site`,`description`,`order_number`,\\\n `id_number`,`mileage_e/w`,`customer_idcustomer`,`jlg_jobnumber`,`creation_date`,`job_status_idjob_status`) \\\n VALUES (?,?,?,?,?,?,?,?,?,?,?);\";\n\n var array = [req.body.machine,\n req.body.tacho,\n req.body.site,\n req.body.description,\n req.body.orderNumber,\n req.body.serial,\n req.body.mileage,\n req.body.customerDB,\n req.body.job_number,\n _formattedDate,\n req.body.statusDB\n\n ];\n mysql.query(sqlQuery, array, function(err2, rows) {\n if (!err2) {\n res.json(rows);\n } else {\n logger.debug('error:', err2);\n res.status(500).send(err);\n }\n })\n\n }", "function loadJobs() {\n API.getAllJobs()\n .then(data => setJobList(data.data))\n .catch(err => console.log(err));\n }", "static async getJobs(handle) {\n try {\n let company = await db.query(\n `SELECT id, title, salary, equity, company_handle, date_posted\n FROM jobs\n JOIN companies ON companies.handle = jobs.company_handle\n WHERE company_handle = $1 \n `,[handle.toLowerCase()]\n );\n\n Company.errIfNonexistent(company.rows[0])\n\n return company.rows\n } catch (e) {\n throw e;\n }\n }", "async getJobs ({ commit, state }) {\n const { data } = await Api.jobs.get()\n commit('SET_JOBS', { jobs: data })\n commit('SET_JOBS_SHOW', { jobs: state.jobsList })\n }", "static async getAll() {\n const result = await db.query(\n `SELECT * FROM jobs`);\n if (result.rows.length === 0) {\n throw new ExpressError(\"No jobs\", 400)\n };\n return result.rows.map(j => new Job(j.id, j.title, j.salary, j.equity, j.company_handle, j.date_posted));\n }", "function getAllJobInfoFromServer() {\r\n\tMoCheck.aktJobs = new Array();\r\n\tif(MoCheck.getJobCoords().length > 0) {\r\n\t\t$each(MoCheck.getJobCoords(), function(jobCoords, index) {\r\n\t\t\tMoCheck.getJobInfoFromServer(jobCoords.pos.x, jobCoords.pos.y);\r\n\t\t});\r\n\t} else {\r\n\t\t/* MotivationWindow muss ggf. neu geladen werden, auch wenn die aktuelle Liste keine Jobs hat */\r\n\t\tMoCheck.reloadWindow();\r\n\t}\r\n}", "function getData() {\n\t\t\tvar deferred = $.Deferred();\n\t\t\t// get RPC results\n\t\t\tRactiveRPC.tab2dataAsync({\n\t\t\t\tonsuccess: function(results) {\n\t\t\t\t\tdeferred.resolve(results);\n\t\t\t\t},\n\t\t\t\tonerror: function(error) {\n\t\t\t\t\tdeferred.reject(error);\t\n\t\t\t\t},\n\t\t\t\tontimeout: function(error) {\n\t\t\t\t\tdeferred.reject(error);\t\n\t\t\t\t},\n\t\t\t\ttimeout: 2000,\n\t\t\t\tparams: [1,2]\n\t\t\t});\t\n\t\t\t\n\t\t\treturn deferred.promise();\n\t\t}", "function gettingRecordsData() {\n\treturn gettingRecordsDataForCheckin();\n}", "function fetchJobs () {\n JobsAPI.list().then(function(data){\n $scope.jobsList = data.jobs;\n })\n .catch(function(error){\n Notify.error(error);\n });\n }", "function loadMyEmployees(ajdi) {\n let myEmployeesArr = [];\n let supervisorFilter = \"&$filter=(Approver eq \" + parseInt(ajdi) + \")\";\n // console.log( supervisorFilter );\n\n $.when(getAllListItemsWithFilters(site, \"Emplyoee%20Details\", supervisorFilter)).done(function (data) {\n\n // console.log(data.d);\n\n data.d.results.forEach(function (item) {\n // console.log(item.AuthorId);\n\n\n $.when(loadUserById(item.EmployeeId)).done(function (rawUser) {\n\n console.log(rawUser);\n\n /*\n\t \t\tmyEmployeesArr.push({\n\t \t\t\t\"ID\": rawUser.Id,\n\t \t\t\t\"Email\": rawUser.Email,\n\t \t\t\t\"UserName\": rawUser.Title,\n\t \t\t\t\"Login\": rawUser.LoginName\n\t \t\t});\n\t \t\t*/\n });\n });\n });\n\n return myEmployeesArr;\n}", "async componentDidMount() {\n await this.getEmployeeJobData();\n }", "function getAnEmployee(res, mysql, context, id, complete){\r\n var sql = \"SELECT id, name, department FROM zoo_employee WHERE id = ?\";\r\n var inserts = [id];\r\n mysql.pool.query(sql, inserts, function(error, results, fields){\r\n if(error){\r\n res.write(JSON.stringify(error));\r\n res.end();\r\n }\r\n context.employee = results[0];\r\n complete();\r\n });\r\n }", "function loadEmployees() {\n vm.empList = employeeInfo.getEmployees()\n .success(function(data) {\n vm.empList = data;\n console.log(vm.tempEmp);\n })\n .error(function() {\n console.log('Error fetching data');\n });\n }", "static async get(id) {\n\t\tconst results = await db.query(`SELECT * FROM jobs WHERE id = $1`, [ id ]);\n\n\t\tlet job = results.rows[0];\n\n\t\tif (job === undefined) {\n\t\t\tthrow new ExpressError(`No such job with id: ${id}`, 404);\n\t\t}\n\n\t\tjob = new Job(job);\n\n\t\tconst companyResults = await db.query('SELECT * FROM companies WHERE handle = $1', [ job.company_handle ]);\n\n\t\tjob.company = companyResults.rows[0];\n\n\t\treturn job;\n\t}", "async function jobsGetCmk() {\n const subscriptionId = process.env[\"DATABOX_SUBSCRIPTION_ID\"] || \"YourSubscriptionId\";\n const resourceGroupName = process.env[\"DATABOX_RESOURCE_GROUP\"] || \"YourResourceGroupName\";\n const jobName = \"TestJobName1\";\n const expand = \"details\";\n const options = { expand };\n const credential = new DefaultAzureCredential();\n const client = new DataBoxManagementClient(credential, subscriptionId);\n const result = await client.jobs.get(resourceGroupName, jobName, options);\n console.log(result);\n}", "_onNotAbortedEmployeeGetSuccess(data) {\n try {\n gDashBoardData.Employees = data.d.results;\n this.GetAllOpenTasks();\n }\n catch (e) { BKJSShared.GlobalErrorHandler(e, \"DashboardMain._onNotAbortedEmployeeGetSuccess\"); }\n }", "function getEmployeeInfo() {\n\n $.ajax({\n url: '/dashboard/strategy/get_employee_info/',\n type: 'GET',\n dataType: 'json',\n success: function (data) {\n $('#user_branch').val(data.emp[0].branch__name);\n\n }\n });\n\n }", "function updateEmpDetailsGET(dataIn)\r\n{\r\n\tvar empInternalId = dataIn.empInternalId;\r\n\tnlapiLogExecution ('DEBUG', 'Employee Number', empInternalId);\r\n\tvar opptyObject = new Object();\r\n\tvar empRecord = nlapiLoadRecord('employee',empInternalId);\r\n\tempRecord.setFieldValue('title', dataIn.empTitle);\r\n\tnlapiSubmitRecord(empRecord, true,true);\r\n\topptyObject.msg = \"Success\";\r\n\treturn opptyObject;\r\n}", "function on_data(data)\n{\n //wj(\"web_face:on_data: got data response from web_data q\", data);\n\n job = jobs[data.job.jobid];\n if (!job)\n {\n w.warn(\"web_face: IGNORING UNKNOWN jobid=\"+data.job.jobid);\n return;\n }\n\n var resp = {\"info\":null, \"data\":null};\n resp.data = data.results;\n\n var info = job.qry;\n info.tsdone = Date.now();\n info.millis = info.tsdone - info.tsstart;\n info.ncount = data.results.length;\n resp.info = info;\n\n w.info(\"web_face:on_data: response took \"+ info.millis+\" ms\");\n\n res = job.res;\n res.writeHead(200, {'Content-Type': 'application/json'});\n res.write(JSON.stringify(resp,null,4));\n res.write('\\n');\n res.end();\n\n delete jobs[data.job.jobid];\n}", "function GetEmployeeDataLocalStorage()\n{\n employeePayrollList = localStorage.getItem('EmployeePayrollList')?\n JSON.parse(localStorage.getItem('EmployeePayrollList')):[];\n ProcessResponse();\n}", "async 'GET_EMPLOYEE_BY_ID'(state, payload) {\n\n state.employee = payload;\n }", "function getEmployees() {\n const query = \"SELECT * FROM employee\";\n return queryDB(query);\n}", "function getEmployeeInfo(assignee, infolabel){\n\t//nlapiLogExecution('Debug' , 'START: getEmployeeInfo()', assignee);\n\ttry {\n\t\tvar emp= nlapiLoadRecord('employee', assignee);\n\t//\tnlapiLogExecution('Debug', 'getEmployeeInfo()' + infolabel, emp.getFieldValue('email'));\n\t\tvar info = new Array();\n\t\tinfo[0] = emp.getFieldValue('email');\n\t\tinfo[1] = emp.getFieldValue('firstname');\n\t\tinfo[2] = emp.getFieldValue('lastname');\n\t\tinfo[3] = emp.getFieldValue('phone');\n\t\tinfo[4] = emp.getFieldValue('department');\n\t\tinfo[5] = emp.getFieldValue('location');\n\t\t\n\t\t\n\t\t\n\t\tif (info[0] ==null){\n\t\t\tinfo[0] = '';\n\t\t} \n\t\tif (info[1] ==null){\n\t\t\tinfo[1] = '';\n\t\t} \n\t\tif (info[2] ==null){\n\t\t\tinfo[2] = '';\n\t\t} \n\t\t//nlapiLogExecution('Debug' , 'Complete: getEmployeeInfo()', info[0]);\n\t\treturn info;\n\t}\n\tcatch (e){\n\t\tnlapiLogExecution('Error', 'getEmployeeInfo(): Unable to get employee info' + infolabel, assignee+ e.getDetails());\n\t\treturn new Array('','','','');\n\t}\t\n}", "function getAllEmployees(){\n\t\t\t$.ajax({\n\t\turl:'http://localhost:8181/api/v1/employee/',\n\t\ttype:'GET',\n\t\tcrossOrigin: true,\n\t\tcontentType : 'application/json',\n\t\tsuccess : function(data){\n\t\t\tvar response = data.employees;\n\t\t\tif(data.status == 200)\n\t\t\t\t$(\"#employeeDetails\").empty();\n\t\t\t$.each(response, function(i, data){\n \t\t$(\"#employeeDetails\")\n \t\t.append(\"<tr><td>\" + data.id + \"</td><td>\" + data.name + \"</td><td>\"+data.email+\"</td><td>\"+data.salary+\"<td></tr>\");\n})\n\t\t},\n\t\terror : function(error){\n\t\t\tconsole.log(error)\n\t\t}\n\t})\n\t}", "function newJob(client, data) {\n console.log(\"data new job :\"+data);\n var job = new Job(JSON.parse(data));\n qh.addJob(job);\n}", "function getEmployee() {\n //retrieve the value with the key\n var jsonEmployee = localStorage.getItem(\"Employee\");\n if (jsonEmployee == null) {\n return;\n }\n //convert json strings into array of entries\n gEmployee = JSON.parse(jsonEmployee);\n}", "function getData(err, user) {\n //logger.debug(user);\n\n //get individual br asset report\n\n var _sql = \"SELECT a.machine as Machine,\\\n a.tacho as Tacho,\\\n a.site as Site,\\\n a.description as Description,\\\n a.order_number as OrderNumber,\\\n a.id_number as ID_Number,\\\n a.jlg_jobnumber as Job_Number,\\\n a.creation_date as Creation_Date,\\\n a.`mileage_e/w` as Mileage,\\\n a.job_status_idjob_status as Status_id,\\\n st.description as Status, \\\n a.finished as Finished,\\\n a.invoiced as Invoiced,\\\n a.idjob as DB_ID, \\\n a.priority as Priority, \\\n b.name as Customer,\\\n IF(c.stoptime IS NULL, 'Not Started', c.stoptime) as Last_Worked\\\n FROM job a \\\n JOIN job_status st \\\n ON st.idjob_status = a.job_status_idjob_status \\\n JOIN customer b \\\n ON b.idcustomer = a.customer_idcustomer\\\n LEFT JOIN (SELECT * FROM (SELECT stoptime, job_idjob FROM work_instance ORDER BY stoptime DESC) as temp GROUP BY job_idjob) as c\\\n ON c.job_idjob = a.idjob\";\n //logger.info(_sql);\n mysql.query(_sql, function(err2, rows) {\n if (!err2) {\n for (var i = 0; i < rows.length; i++) {\n\n if (rows[i]['Last_Worked'] != \"Not Started\") {\n var tempTime = new Date(rows[i]['Last_Worked']);\n //logger.debug(tempTime);\n var tempTime2 = tempTime.toUTCString();\n // logger.debug(tempTime2);\n rows[i]['Last_Worked'] = tempTime2;\n }\n //logger.debug(rows[i]['Last_Worked']);\n }\n res.json(rows);\n\n } else {\n logger.debug('error:', err2);\n res.status(500).send(err);\n }\n })\n\n }", "readAllEmployees() {\r\n return this.connection.query(\r\n \"SELECT employee.id, employee.first_name, employee.last_name, role.title, department.name AS department, role.salary, CONCAT(manager.first_name, ' ', manager.last_name) AS manager FROM employee LEFT JOIN role on employee.role_id = role.id LEFT JOIN department on role.department_id = department.id LEFT JOIN employee manager on manager.id = employee.manager_id;\"\r\n );\r\n }", "function handleJobRequest( method, path, query, payload, reply )\n{\n // API:\n // GET host/jobs - all josb with query params\n // GET host/jobs/jobid - job record\n\n if ( method === \"GET\" )\n {\n if ( path.length === 2 )\n {\n DB.jobQuery( reply, query );\n }\n else if ( path.length === 3 )\n {\n result = DB.jobGet( reply, path[2], query );\n }\n else throw Err.INVALID_REQUEST;\n }\n else throw Err.INVALID_METHOD;\n}", "function GetEmployeeDataLocalStorage()\n{\n return localStorage.getItem('EmployeePayrollList')?\n JSON.parse(localStorage.getItem('EmployeePayrollList')):[];\n}", "function setJobDetails(){\n let jobId = JobManager.getCurrentJobId();\n let jobOffer = JobManager.getJobOffer(jobId);\n document.getElementById('jobTitle').innerText = jobOffer.jobTitle;\n document.getElementById('jobType').innerText = jobOffer.jobType;\n document.getElementById('description').innerText = jobOffer.description;\n document.getElementById('skills').innerText = jobOffer.skills;\n document.getElementById('minYears').innerText = jobOffer.minYears;\n document.getElementById('maxYears').innerText = jobOffer.maxYears;\n document.getElementById('minSalary').innerText = jobOffer.minSalary;\n document.getElementById('maxSalary').innerText = jobOffer.maxSalary;\n document.getElementById('location').innerText = jobOffer.location;\n document.getElementById('noOfVacancy').innerText = jobOffer.noOfVacancy;\n document.getElementById('qualification').innerText = jobOffer.qualification;\n}", "function queryEmployeeInfo() {\n employeeInfo = {};\n var employeeSearch = search.create({\n type: search.Type.EMPLOYEE,\n filters: [\n helper.filter('giveaccess').is('T'),\n helper.filter('isinactive').is('F')\n ],\n columns: [\n helper.column('firstname').create(),\n helper.column('middlename').create(),\n helper.column('lastname').create()\n ]\n });\n var results = helper.resultset(employeeSearch.run());\n for ( var index in results) {\n var result = results[index];\n employeeInfo[result.id] = formatUserName(result.getValue(helper.column('firstname')), result.getValue(helper.column('middlename')), result.getValue(helper.column('lastname')));\n }\n }", "getJobsByName(name){\n\t\tvar query = 'SELECT \"ID\",\"NAME\", \"TIMESTAMP\" FROM \"Jobs.Data\" WHERE NAME =?';\n\t\treturn new Promise((resolve,reject) => {\n\t\t\tthis.client.prepare(query,(err,stmt) => {\n\t\t\t\tif(err){\n\t\t\t\t\treturn reject(err);\n\t\t\t\t}\n\t\t\t\tvar sql = stmt;\n\t\t\t\tsql.exec(name, (err,rows) => {\n\t\t\t\t\tif(err){\n\t\t\t\t\t\treturn reject(err);\n\t\t\t\t\t}\n\t\t\t\t\treturn resolve(rows);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}", "async function _getCourseEmployees(apiMemoData) {\n const { courseCode, semester, ladokRoundIds } = apiMemoData\n try {\n const { assistants, teachers, examiners, responsibles } = redisKeys(courseCode, semester, ladokRoundIds)\n log.debug(\n '_getCourseEmployees for with key(s): ',\n assistants.length ? assistants : '',\n teachers.length ? teachers : '',\n examiners.length ? examiners : '',\n responsibles.length ? responsibles : ''\n )\n\n const employeeIndex = new Map()\n const ugClient = await redis('ugRedis', serverConfig.cache.ugRedis.redis)\n let apiCall = ugClient.multi()\n if (teachers.length) {\n apiCall = apiCall.mget(teachers)\n employeeIndex.set('teachers', 0)\n }\n if (examiners.length) {\n apiCall = apiCall.mget(examiners)\n employeeIndex.set('examiners', employeeIndex.size)\n }\n if (responsibles.length) {\n apiCall = apiCall.mget(responsibles)\n employeeIndex.set('responsibles', employeeIndex.size)\n }\n if (assistants.length) {\n apiCall = apiCall.mget(assistants)\n employeeIndex.set('assistants', employeeIndex.size)\n }\n const arrWithStringifiedArrays = await apiCall.execAsync()\n log.debug('Ug Redis fetched correctly', arrWithStringifiedArrays)\n const flatArrWithHtmlStr = arrWithStringifiedArrays.map((perTypeStringifiedArr) => {\n const thisTypeAllRoundsEmployees = perTypeStringifiedArr.flatMap((perRoundStr) => JSON.parse(perRoundStr))\n /* Remove duplicates */\n const deepDistinctEmpoyeesNoDublicates = _removeDublicates(thisTypeAllRoundsEmployees)\n return createPersonHtml(deepDistinctEmpoyeesNoDublicates)\n })\n\n const employees = {}\n if (employeeIndex.has('teachers')) {\n employees.teachers = flatArrWithHtmlStr[employeeIndex.get('teachers')]\n }\n if (employeeIndex.has('examiners')) {\n employees.examiners = flatArrWithHtmlStr[employeeIndex.get('examiners')]\n }\n if (employeeIndex.has('responsibles')) {\n employees.responsibles = flatArrWithHtmlStr[employeeIndex.get('responsibles')]\n }\n if (employeeIndex.has('assistants')) {\n employees.assistants = flatArrWithHtmlStr[employeeIndex.get('assistants')]\n }\n return employees\n } catch (err) {\n log.error('Exception from ugRedis - multi', { error: err })\n return err\n }\n}", "function Job(position, employer, dates, location, desc){\n\tthis.position = position;\n\tthis.employer = employer;\n\tthis.dates = dates;\n\tthis.location = location;\n\tthis.desc = desc;\n}", "async function getAppliedJobs(req, res) {\n try {\n let { job_id } = req.params;\n let jobs = await jobModel.getAppliedJobsModel(job_id);\n if (jobs == undefined) {\n res.status(404).json({\n status: \"failure\",\n message: \"Job not found\"\n })\n }\n res.status(200).json({\n status: \"Job Found\",\n jobs: jobs\n })\n\n } catch (err) {\n res.status(500).json({\n sucess: \"failure\",\n message: err.message\n })\n }\n}", "handleGetJobById (req, res) {\n const jobId = req.params.id \n const userId = req.decoded.userId \n\n var _Job = this.Job \n var _Question = this.Question \n var _Answer = this.Answer \n var _reqHelper = this.reqHelper\n\n if (isNaN(jobId)) {\n \n res.status(400).json({\n message: \"Bad request.\"\n })\n\n } else {\n\n /* First, confirm that this is a job that belongs to this employer\n * because Employers can only see their own jobs- no one elses. \n */\n\n _reqHelper.getEmployerId(userId)\n\n /* If this job belongs to this Employer, then we'll allow the rest\n * of the request.\n */\n\n .then(() => {\n\n var jobPromise = _Job.find({\n where: {\n job_id: jobId\n }\n })\n\n var questionPromise = _Question.findAll({\n where: {\n job_id: jobId\n }\n })\n\n var answersPromise = _Answer.findAll({\n where: {\n job_id: jobId \n }\n })\n\n Promise.all([jobPromise, questionPromise, answersPromise])\n .then((result) => {\n\n if (result[0] !== null) {\n res.json({\n job: result[0],\n questions: result[1],\n answers: result[2]\n })\n } else {\n res.status(404).json({\n message: \"Job not found.\"\n })\n }\n })\n .catch((err) => {\n res.status(500).json({\n err: err.toString()\n })\n })\n })\n\n /*\n * Employer id not found because the account was deleted\n * or something.\n */\n\n .catch((err) => {\n res.status(404).json({\n error: err.toString()\n })\n })\n\n }\n }", "function receiveDataJobs(json){\n\tconst dataJobs = json;\n\treturn {\n\t\ttype: RECEIVE_DATAJOBS,\n\t\tdataJobs\n\t}\n}", "function Job(_id, _title, _employer, _industry, _currency, _salary, _description) {\n this.id = _id;\n this.title = _title;\n this.employer = _employer;\n this.industry = _industry;\n this.currency = _currency;\n this.salary = _salary;\n this.description = _description;\n}", "function loadEmployeeList() {\n\tlet xhr = new XMLHttpRequest();\n\txhr.onreadystatechange = function() {\n\t\t// define functionality for response\n\t\tif (xhr.readyState == 4) {\n\t\t\t// check response status\n\t\t\tswitch (xhr.status) {\n\t\t\tcase (200):\n\t\t\t\tlet myArr = JSON.parse(xhr.responseText);\n\n\t\t\t\tfor ( let idx in myArr) {\n\t\t\t\t\t// to add to the DataTable's framework\n\t\t\t\t\tcheckEmpTable();\n\t\t\t\t\tempTable.row.add( [myArr[idx].employee_id,\n\t\t\t\t\t\tmyArr[idx].last_name,\n\t\t\t\t\t\tmyArr[idx].first_name,\n\t\t\t\t \tmyArr[idx].user_name,\n\t\t\t\t \tmyArr[idx].password,\n\t\t\t\t \tmyArr[idx].email,\n\t\t\t\t \tmyArr[idx].role.name, \n\t\t\t\t \tmyArr[idx].role.role_id\n\t\t\t\t ] ).draw();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase (403):\n\t\t\t\tbreak;\n\t\t\tcase (500):\n\t\t\t\tconsole.log('server error');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n \n xhr.open(\"GET\", 'employee');\n xhr.send();\t\n}", "async function jobsGetWaitingForAction() {\n const subscriptionId = process.env[\"DATABOX_SUBSCRIPTION_ID\"] || \"YourSubscriptionId\";\n const resourceGroupName = process.env[\"DATABOX_RESOURCE_GROUP\"] || \"YourResourceGroupName\";\n const jobName = \"TestJobName1\";\n const expand = \"details\";\n const options = { expand };\n const credential = new DefaultAzureCredential();\n const client = new DataBoxManagementClient(credential, subscriptionId);\n const result = await client.jobs.get(resourceGroupName, jobName, options);\n console.log(result);\n}", "findEmployeesPerJob() {\n const employeesPerJob = new Map();\n this.sampleEmployees.forEach((employee) => {\n const key = employee.payload()['jobId'];\n const value = employee.payload()['id'];\n if (!employeesPerJob.has(key)) {\n employeesPerJob.set(key, [value]);\n } else {\n employeesPerJob.get(key).push(value);\n }\n });\n return employeesPerJob;\n }", "function getCurrentEmployees(){\n connection.query(`SELECT * FROM employee_table`, (err, res) => {\n // If error log error\n if (err) throw err;\n // Set the current employes array to the array of employee objects retrieved from the database\n currentEmployees = res;\n // Combine the first and last name properties into a single full name variable for use in inquirer choices later\n for (i=0; i<res.length; i++) {\n // Loop through and pull out the firstname and lastname and combine them into a full name variable declaried in this loop\n let fullName = `${res[i].employee_firstname} ${res[i].employee_lastname}`;\n // Each time add that into an array that will hold the full names for use in inquirer choices...\n currentEmployeeNames.push(fullName);\n }\n // And start the main prompt\n startMainPrompt();\n })\n }", "function getPostData(res) {\n $.ajax({\n type: 'POST',\n url: '/favorites/getAJob',\n data: JSON.stringify({jobID: res.jobID}),\n contentType: \"application/json; charset=utf-8\",\n success: function(res) {\n processFavorite(res);\n },\n error: function(res) {\n console.log(res);\n }\n });\n}", "function getCompanyQuery() {\n getData(getCompanyParams);\n}", "getData(){}", "async function _getCourseEmployees(apiMemoData) {\n const { courseCode, semester, ladokRoundIds } = apiMemoData\n try {\n const { assistants, teachers, examiners, responsibles } = _groupNames(courseCode, semester, ladokRoundIds)\n log.debug(\n '_getCourseEmployees for all memos course rounds with keys: ',\n assistants.length ? assistants : '',\n teachers.length ? teachers : '',\n examiners.length ? examiners : '',\n responsibles.length ? responsibles : ''\n )\n // get all groups along with member of given course code from UG Rest Api\n const groupsAlongWithMembers = await _getAllGroupsAlongWithMembersRelatedToCourse(\n assistants,\n teachers,\n examiners,\n responsibles,\n courseCode,\n semester\n )\n const membersObject = _getMembersObjectFromGroups(\n groupsAlongWithMembers,\n assistants,\n teachers,\n examiners,\n responsibles,\n courseCode,\n semester\n )\n return _getEmployeeObject(\n membersObject.examiner,\n membersObject.teacher,\n membersObject.responsibles,\n membersObject.assistants\n )\n } catch (err) {\n log.info('Exception from UG Rest API - multi', { error: err })\n return err\n }\n}", "function getJobs() {\n return this.__jobs__ = this.__jobs__ || {};\n }" ]
[ "0.6471585", "0.63663083", "0.6310343", "0.6196553", "0.61338365", "0.6101689", "0.6099259", "0.60925925", "0.60368615", "0.5956124", "0.5873185", "0.58530164", "0.58358085", "0.5818223", "0.5758793", "0.5676728", "0.56721145", "0.56592", "0.56446093", "0.5621554", "0.5617158", "0.5604403", "0.55997765", "0.5595781", "0.55887526", "0.55716544", "0.55626184", "0.5514113", "0.5510069", "0.55070174", "0.5506681", "0.5487323", "0.54818636", "0.5472886", "0.5470475", "0.54618037", "0.54603255", "0.5454999", "0.5452868", "0.5451964", "0.545081", "0.54382235", "0.54349077", "0.54288864", "0.5417219", "0.5416269", "0.5405163", "0.5390758", "0.5388247", "0.5379879", "0.5363355", "0.5361024", "0.5351057", "0.5339726", "0.5338684", "0.5338356", "0.5336249", "0.5329667", "0.53272516", "0.5327034", "0.5323421", "0.5322283", "0.5318659", "0.53173065", "0.5311266", "0.5310911", "0.5309775", "0.5299643", "0.5288039", "0.52854365", "0.5282875", "0.52809507", "0.5280173", "0.52742153", "0.5262808", "0.52508366", "0.5250564", "0.5249251", "0.52474487", "0.5234832", "0.5221632", "0.5215987", "0.52157724", "0.52116144", "0.5209719", "0.52058625", "0.5202905", "0.5202002", "0.5198258", "0.5184075", "0.5176851", "0.5172204", "0.51688087", "0.5166158", "0.5165404", "0.5161408", "0.51597327", "0.515671", "0.5156628", "0.5154427" ]
0.66167104
0
populateEmployeeData(): populate employee data variables from job and user list
async populateEmployeeData(data) { let jobs = []; for (let i = 0; i < data.length; i++){ if (data[i].employee !== 'resource:org.pow.app.User#' + uuidv3(store.getState().email, uuidv3.URL) && typeof(data[i].endDate) === 'undefined') { await this.getEmployeeData(data[i].employee.split('#')[1]); jobs.push(data[i]); } } await this.setState({ employeeJobs: jobs }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillEmployeeList(){\n var divList, division, divName, empList, employee, empName, tempList;\n tempList = [];\n divList = company[0].divisions;\n for(var i = 0, dCount = divList.length; i < dCount; i++) {\n division = divList[i];\n divName = division.divisionName;\n empList = division.employees;\n var filteredEmployees = empList.filter(function(item){\n return item.isActive; \n }).sort(function(a, b){\n return a.name.last === b.name.last ? 0 : +(a.name.last > b.name.last) || -1; \n });\n for(var j = 0, eCount = filteredEmployees.length; j < eCount; j++) {\n employee = filteredEmployees[j];\n empName = employee.name;\n var emp = new Employee(\n empName.first,\n empName.last,\n employee.email,\n divName\n )\n tempList.push(emp);\n } \n }\n return tempList;\n}", "function enterData() {\n if (hourlyOption.checked) {\n let emp = HourlyEmployee(name.value, title.value);\n emp.setHourlyRate(hourlyRate.value);\n emp.setHoursWorked(hours.value);\n employees.push(emp);\n clearFields();\n } else if (salaryOption.checked) {\n let emp = SalariedEmployee(name.value, title.value);\n emp.setSalary(salary.value);\n employees.push(emp);\n clearFields();\n } else {\n let emp = CommissionedEmployee(name.value, title.value);\n emp.setBaseSalary(parseFloat(baseSalary.value));\n emp.setCommissionRate(parseFloat(commissionRate.value));\n emp.setSalesVolume(parseFloat(sales.value));\n employees.push(emp);\n clearFields();\n }\n numRecords++;\n numberRecords.innerHTML = \"The number of records entered is: \" + numRecords;\n }", "function loadEmployees() {\n API.getEmployees()\n .then(result => {\n // testing and checking what is sent from Sequelize\n console.log(result.data);\n setData(result.data);\n })\n .catch(err => console.log(err));\n }", "function loadMyEmployees(ajdi) {\n let myEmployeesArr = [];\n let supervisorFilter = \"&$filter=(Approver eq \" + parseInt(ajdi) + \")\";\n // console.log( supervisorFilter );\n\n $.when(getAllListItemsWithFilters(site, \"Emplyoee%20Details\", supervisorFilter)).done(function (data) {\n\n // console.log(data.d);\n\n data.d.results.forEach(function (item) {\n // console.log(item.AuthorId);\n\n\n $.when(loadUserById(item.EmployeeId)).done(function (rawUser) {\n\n console.log(rawUser);\n\n /*\n\t \t\tmyEmployeesArr.push({\n\t \t\t\t\"ID\": rawUser.Id,\n\t \t\t\t\"Email\": rawUser.Email,\n\t \t\t\t\"UserName\": rawUser.Title,\n\t \t\t\t\"Login\": rawUser.LoginName\n\t \t\t});\n\t \t\t*/\n });\n });\n });\n\n return myEmployeesArr;\n}", "function displayEmployeePageData(tablesInput) {\r\n // Set global variables\r\n\r\n departments = tablesInput['departments'];\r\n departments.forEach(function(department) {\r\n\r\n departmentLocation[department['id']] = department['location'];\r\n departmentLocationId[department['id']] = department['locationID'];\r\n\r\n if (department['managerFirstName'] == null || department['managerLastName'] == null) {\r\n departmentManager[department['id']] = \"No manager\";\r\n departmentManagerId[department['id']] = null;\r\n } else {\r\n departmentManager[department['id']] = department['managerFirstName'] + ' ' + department['managerLastName'];\r\n departmentManagerId[department['id']] = department['departmentManager'];\r\n }\r\n });\r\n // console.log(departmentLocation)\r\n locations = tablesInput['locations'];\r\n locations.forEach(function(location) {\r\n if (location['managerFirstName'] == null || location['managerLastName'] == null) {\r\n locationManager[location['id']] = \"No manager\";\r\n } else {\r\n locationManager[location['id']] = location['managerFirstName'] + ' ' + location['managerLastName'];\r\n }\r\n });\r\n // console.log(locations)\r\n\r\n statuses = tablesInput['status']\r\n\r\n employees = tablesInput['employees'];\r\n displayAllEmployees(employees)\r\n\r\n}", "function populateEmployee(data, idx) {\n $('#hidden-employee-id').val(data[0]);\n $('#hidden-employee-idx').val(idx);\n\t$('#first-name-form').val(data[2]);\n\t$('#last-name-form').val(data[1]);\n\t$('#user-name-form').val(data[3]);\n\t$('#password-form').val(data[4]);\n\t$('#email-form').val(data[5]);\n\t$('#role-dropdown').val(data[7]);\n\t\n\t$('#first-name-form').prop(\"disabled\", false);\n\t$('#last-name-form').prop(\"disabled\", false);\n\t$('#user-name-form').prop(\"disabled\", false);\n\t$('#password-form').prop(\"disabled\", false);\n\t$('#email-form').prop(\"disabled\", false);\n\t$('#role-dropdown').prop(\"disabled\", false);\n\t$('#employee-new').hide();\n\t$('#employee-submit').show();\n\t$('#employee-cancel').show();\n}", "function populateEmployeeList() {\n\tif(valueListXML == null || (populateLock && !window.overrideLock))\n\t\treturn;\n\twindow.populateLock = true;\n\tvar table = document.getElementById(\"StaffListTable\");\n\tif(positionInList == 0)\n\t{\n\t\twhile(table.hasChildNodes())\n\t\t\ttable.removeChild(table.firstChild);\n\t}\n\t\t\n\tvar results = valueListXML.getElementsByTagName(\"RESULT\");\n\tif(results!=null && results.length!=0)\n\t{\n\t\tvar counter = 0;\n\t\tfor(var i=positionInList;i<results.length;++i,++counter)\n\t\t{\n\t\t\t//making sure we don't cause starvation\n\t\t\tif(counter >= 10 )\n\t\t\t{\n\t\t\t\twindow.overrideLock = true;\n\t\t\t\tpositionInList = i;\n\t\t\t\tsetTimeout(populateEmployeeList,100);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//check if other controls ask for repopulating the list\n\t\t\tif(!window.populateLock)\n\t\t\t{\n\t\t\t\t//starting all over\n\t\t\t\tpopulateEmployeeList();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar refid = parseInt(results[i].getElementsByTagName(\"REFID\")[0].textContent);\n\t\t\tvar fname = escapeHTML(results[i].getElementsByTagName(\"FNAME\")[0].textContent);\n\t\t\tvar lname = escapeHTML(results[i].getElementsByTagName(\"LNAME\")[0].textContent);\n\t\t\tvar tr = document.createElement(\"TR\");\n\t\t\tvar td1 = document.createElement(\"td\");\n\t\t\ttd1.textContent = fname;\n\t\t\ttd1.setAttribute(\"refid\",refid);\n\t\t\ttd1.id=\"fname\"+refid;\n\t\t\ttd1.addEventListener(\"click\",selectEmployee,false);\n\t\t\tvar td2 = document.createElement(\"td\");\n\t\t\ttd2.textContent = lname;\n\t\t\ttd2.setAttribute(\"refid\",refid);\n\t\t\ttd2.id=\"lname\"+refid;\n\t\t\ttd2.addEventListener(\"click\",selectEmployee,false);\n\t\t\ttr.appendChild(td1);\n\t\t\ttr.appendChild(td2);\n\t\t\ttable.appendChild(tr);\n\t\t}\n\t}\n\twindow.overrideLock = false;\n\twindow.populateLock = false;\n}", "function loadEmployees() {\n vm.empList = employeeInfo.getEmployees()\n .success(function(data) {\n vm.empList = data;\n console.log(vm.tempEmp);\n })\n .error(function() {\n console.log('Error fetching data');\n });\n }", "function loadEmployeeObjects( itcb ) {\n if( !options.withEmployee ) {\n return itcb( null );\n }\n\n Y.log( 'getPopulatedActivities: loadEmployeeObjects ' + (new Date().getTime()), 'debug', NAME );\n async.each( activities, populateEmployeeSingle, itcb );\n }", "function persistEmployees(results) {\n\t\tconst data = results.map((result, i) => addEmployeeAttributes(result, i));\n\t\temployeesData = data;\n\t\tconsole.log(\"Persisted employeesData on page load:\");\n\t\tconsole.log(employeesData);\n\t\treturn data;\n\t}", "function getCurrentEmployees(){\n connection.query(`SELECT * FROM employee_table`, (err, res) => {\n // If error log error\n if (err) throw err;\n // Set the current employes array to the array of employee objects retrieved from the database\n currentEmployees = res;\n // Combine the first and last name properties into a single full name variable for use in inquirer choices later\n for (i=0; i<res.length; i++) {\n // Loop through and pull out the firstname and lastname and combine them into a full name variable declaried in this loop\n let fullName = `${res[i].employee_firstname} ${res[i].employee_lastname}`;\n // Each time add that into an array that will hold the full names for use in inquirer choices...\n currentEmployeeNames.push(fullName);\n }\n // And start the main prompt\n startMainPrompt();\n })\n }", "function populateDataFields() {}", "function init(){\n employeeData();\n}", "function getEmps() {\n\t\t$http.get('/salary_input')\n\t\t\t.then(function (response) {\n\t\t\t\tconsole.log('Employee Data Get ' + response);\n\t\t\t\tself.employees = response.data;\n\t\t\t});\n\t}", "function finish() {\n const employee = {\n fullName: fullName.value,\n identifyCard: identifyCard.value,\n birthday: birthday.value,\n email: email.value,\n phone: phone.value,\n level: level.value,\n position: position.value,\n department: department.value,\n //salary: salary.innerHTML,\n };\n employees.push(employee);\n console.log(employees);\n displayEmployee();\n editData();\n}", "static extractUserDataObjFrom(userDBRows) {\n\n console.log('extractUserDataObjFrom : nbRows: ' + userDBRows.length);\n\n let userDataObj = {};\n\n userDBRows.forEach(row => {\n // userData = [ { obsvLabel, obsDate, obsLat, obsLng, parcelName, parcelSessionAvgGrowth, parcelSessionDate, parcelLat, parcelLng, userName}, ...]\n\n // INIT USER INFO Group by userEMail\n\n\n if (userDataObj.userEMail === undefined) {\n\n userDataObj = new ApexDataServices.MonitoredUser(\n row.userEMail\n , row.userId\n , row.userName\n );\n\n // console.log(\"INIT USER INFO\");\n // console.log(userDataObj);\n }\n\n\n // INIT PARCEL IF NEEDED\n // init userDataObj.parcel[p] if needed \n let parcel = userDataObj.parcels.find(p => p.parcelName === row.parcelName);\n if (parcel === undefined) {\n // parcelName, parcelCoord,\n\n parcel = new ApexDataServices.MonitoredParcel(\n row.parcelName\n , row.userEMail\n , row.userName\n , row.userId\n , { lat: row.parcelLat, lng: row.parcelLng }\n );\n userDataObj.parcels.push(parcel);\n\n // console.log(\"INIT PARCEL IF NEEDED\");\n // console.log(userDataObj);\n }\n\n\n // INIT YEAR IF NEEDED\n\n let sessionDate = new Date();\n sessionDate.setTime(row.sessionDateInSec + '000');\n // console.log(\"sessionDate \"+sessionDate);\n\n let sessionYear = sessionDate.getFullYear();\n let year = parcel.parcelYears.find(y => y.yearNumber === sessionYear);\n if (year === undefined) {\n\n year = new ApexDataServices.MonitoredYear(sessionYear);\n\n parcel.parcelYears.push(year);\n\n // console.log(\"INIT YEAR IF NEEDED\");\n }\n\n\n\n // INIT WEEK IF NEEDED\n\n // Compute session's WeekNumber from the first monday of the year\n let sessionFirstJan = new Date(sessionYear, 0, 1);\n // console.log(\"sessionFirstJan \"+sessionFirstJan);\n\n let millisecsPerDay = 86400000;\n let sessionFirstJanTo1stMondayInMs = millisecsPerDay *\n ((sessionFirstJan.getDay() === 1) // monday\n ? 0\n : ((sessionFirstJan.getDay() === 0) // sunday \n ? 1\n : 8 - sessionFirstJan.getDay())); // (saturday 6 -- tuesday 2);\n\n let sessionFirstMondayOfYear = new Date();\n sessionFirstMondayOfYear.setTime(sessionFirstJan.getTime() + sessionFirstJanTo1stMondayInMs);\n // console.log(\"sessionFirstMondayOfYear \"+sessionFirstMondayOfYear);\n\n let sessionWeekNumber = (sessionDate.getTime() === sessionFirstMondayOfYear.getTime()) ? 1\n : Math.ceil(((sessionDate.getTime() - sessionFirstMondayOfYear.getTime()) / millisecsPerDay) / 7);\n\n\n // Compute the Monday of the week corresponding to the session\n let sessionPrevMondayInMs = sessionDate.getTime() - millisecsPerDay *\n ((sessionDate.getDay() === 1) // monday\n ? 0\n : ((sessionDate.getDay() === 0) // sunday \n ? 6\n : sessionDate.getDay() - 1)); // (saturday 6 -- tuesday 2);\n\n let sessionDatePrevMonday = new Date();\n sessionDatePrevMonday.setTime(sessionPrevMondayInMs);\n // let sessionDatePrevMondayLabel = \"\" + sessionDatePrevMonday.getDate() + \" \" + ClientApexDataServices.getMonthLabel(sessionDatePrevMonday.getMonth());\n // console.log(\"sessionDatePrevMonday \"+sessionDatePrevMonday);\n\n let week = year.yearWeeks.find(w => w.weekNumber === sessionWeekNumber);\n if (week === undefined) {\n\n\n week = new ApexDataServices.MonitoredWeek(row.sessionDateInSec + '000');\n\n year.yearWeeks.push(week);\n }\n\n // ADD SESSION\n\n let session = week.weekSessions.find(s => s.sessionDateInMs === row.sessionDateInSec + '000');\n if (session === undefined) {\n session = new ApexDataServices.MonitoredSession(row.sessionDateInSec + '000');\n week.weekSessions.push(session);\n }\n\n\n // ADD OBSERVATION\n\n // userData = [ { obsVal, obsDate, obsLat, obsLng, parcelName, parcelSessionAvgGrowth, parcelSessionDate, parcelLat, parcelLng, userName}, ...]\n\n let obsv = new ApexDataServices.MonitoredObservation(\n row.obsvLabel\n , row.obsvDateInMs\n , row.userName\n , row.userName\n , { lat: row.obsvLat, lng: row.obsvLng }\n );\n\n session.sessionObservations.push(obsv);\n\n\n });\n\n // console.log('extracted userDataObj');\n // console.log(userDataObj);\n\n return userDataObj\n }", "function loadEmployeeList() {\n\tlet xhr = new XMLHttpRequest();\n\txhr.onreadystatechange = function() {\n\t\t// define functionality for response\n\t\tif (xhr.readyState == 4) {\n\t\t\t// check response status\n\t\t\tswitch (xhr.status) {\n\t\t\tcase (200):\n\t\t\t\tlet myArr = JSON.parse(xhr.responseText);\n\n\t\t\t\tfor ( let idx in myArr) {\n\t\t\t\t\t// to add to the DataTable's framework\n\t\t\t\t\tcheckEmpTable();\n\t\t\t\t\tempTable.row.add( [myArr[idx].employee_id,\n\t\t\t\t\t\tmyArr[idx].last_name,\n\t\t\t\t\t\tmyArr[idx].first_name,\n\t\t\t\t \tmyArr[idx].user_name,\n\t\t\t\t \tmyArr[idx].password,\n\t\t\t\t \tmyArr[idx].email,\n\t\t\t\t \tmyArr[idx].role.name, \n\t\t\t\t \tmyArr[idx].role.role_id\n\t\t\t\t ] ).draw();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase (403):\n\t\t\t\tbreak;\n\t\t\tcase (500):\n\t\t\t\tconsole.log('server error');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n \n xhr.open(\"GET\", 'employee');\n xhr.send();\t\n}", "function createEmployee()\n {\n inquirer.prompt(employeePrompt).then(data => {\n if(data.role===\"Exit\")\n {\n \n renderHTML();\n console.log(\"Team Profile Generated\");\n }\n if(data.role===\"Manager\")\n {\n employees.push(new Manager(data.name, data.id, data.email, data.officeN));\n createEmployee();\n }\n if(data.role===\"Engineer\")\n {\n employees.push(new Engineer(data.name, data.id, data.email, data.github));\n createEmployee();\n }\n if(data.role===\"Intern\")\n {\n employees.push(new Intern(data.name, data.id, data.email, data.school));\n createEmployee();\n \n }\n \n });\n }", "function populateEmployeeOff() {\n\t$('#hidden-employee-id').val(0);\n\t$('#hidden-employee-idx').val(0);\n\t$('#first-name-form').val(\"\");\n\t$('#last-name-form').val(\"\");\n\t$('#user-name-form').val(\"\");\n\t$('#password-form').val(\"\");\n\t$('#email-form').val(\"\");\n\t$('#role-dropdown').val(\"\");\n\t\n\t$('#first-name-form').prop(\"disabled\", true);\n\t$('#last-name-form').prop(\"disabled\", true);\n\t$('#user-name-form').prop(\"disabled\", true);\n\t$('#password-form').prop(\"disabled\", true);\n\t$('#email-form').prop(\"disabled\", true);\n\t$('#role-dropdown').prop(\"disabled\", true);\n\t$('#employee-new').show();\n\t$('#employee-submit').hide();\n\t$('#employee-cancel').hide();\n}", "function setValue() {\n let id, name, email, phonenumber, birthday, salary, numberworkingday, position, allowance;\n for (let i = 0; i < arrayInput.length; i++) {\n switch (arrayInput[i].getAttribute('id')) {\n case 'txtName':\n let tempname = toTitleCase(arrayInput[i].value.trim());\n name = tempname.replace(/\\s\\s+/g, ' ');\n case 'txtEmail':\n email = arrayInput[i].value.trim();\n case 'txtPhoneNumber':\n phonenumber = arrayInput[i].value;\n case 'txtDate':\n birthday = arrayInput[i].value.trim();\n case 'txtSalary':\n salary = arrayInput[i].value;\n case 'txtNumberWorking':\n numberworkingday = arrayInput[i].value;\n case 'txtPosition':\n let tempposition = toTitleCase(arrayInput[i].value.trim());\n position = tempposition.replace(/\\s\\s+/g, ' ');\n case 'txtAllowance':\n allowance = arrayInput[i].value;\n }\n }\n var data = listEmployee._getList();\n var list = JSON.parse(data);\n if (list.length == 0) {\n id = 1;\n } else {\n id = parseInt(list[list.length - 1]._Id) + 1;\n }\n var employee = new Employee(id, name, email, phonenumber, birthday, salary, numberworkingday, position, allowance);\n return employee;\n}", "function employeeSubmit() {\n\tlet textFirstName = $('#first-name-form').val();\n\tlet textLastName = $('#last-name-form').val();\n\tlet textUserName = $('#user-name-form').val();\n\tlet textPassword = $('#password-form').val();\n\tlet textEmail = $('#email-form').val();\n\tlet textRole = $('#role-dropdown').find(\":selected\").text();\n\tlet valRole = $('#role-dropdown').val();\n\tlet employee_id = $('#hidden-employee-id').val();\n\tlet employee_idx = $('#hidden-employee-idx').val();\n\tlet json = \"\";\n\t\n\t// build the data from the input\n\tlet dataObj = {\n\t\t\"employee_id\" : employee_id,\n\t\t\"first_name\" : textFirstName,\n\t\t\"last_name\" : textLastName,\n\t\t\"user_name\" : textUserName,\n\t\t\"password\" : textPassword,\n\t\t\"email\" : textEmail,\n\t\t\"role\" : {\"role_id\" : valRole, \"name\" : textRole}\n\t\t};\n\tif(employeeValidation(textFirstName, textLastName, textUserName, textEmail, textPassword, valRole)) {\n\t// populate the user list\n\tlet xhr = new XMLHttpRequest();\n\txhr.onreadystatechange = function() {\n\t\t// define functionality for response\n\t\tif (xhr.readyState == 4) {\n\t\t\t// check response status\n\t\t\tswitch (xhr.status) {\n\t\t\tcase (200):\n\t\t\t\tjson = JSON.parse(xhr.responseText);\n\t\t\n\t\t\t\t// look for the duplicate row and remove it before adding\n\t\t\t\t// matching on employee_id\n\t\t\t\tempTable.row(employee_idx).remove().draw();\n\t\t\t\t// we were successful so add it to the list\n\t\t\t\t// to add to the the DataTable's framework\n\t\t\t\tempTable.row.add( [json.employee_id,\n\t\t\t\t\tjson.last_name,\n\t\t\t\t\tjson.first_name,\n\t\t\t\t\tjson.user_name,\n\t\t\t\t\tjson.password,\n\t\t\t\t\tjson.email,\n\t\t\t\t\tjson.role.name, \n\t\t\t\t\tjson.role.role_id\n\t\t\t ] ).draw();\n\n\t\t\t\t// clean up the entry box\n\t\t\t\tpopulateEmployeeOff();\n\t\t\t\tbreak;\n\t\t\tcase (412):\n\t\t\t\tjson = JSON.parse(xhr.responseText);\n\t\t\t\tlet messages = [];\n\t\t\t\tmessages.push(json.text);\n\t\t\t\traiseAlert(json.code, messages);\n\t\t\t\tbreak;\n\t\t\tcase (500):\n\t\t\t\talert(\"(500) There was a server error.\");\n \t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n \n xhr.open(\"PUT\", 'employee');\n xhr.setRequestHeader(\"Content-type\", \"application/json\");\n let toSend = JSON.stringify(dataObj);\n \n xhr.send(toSend);\t\n\t}\n}", "function _refreshEmployees() {\n\t\n\t$.ajax({\n\t\t 'url' : '/tasktracker/tasks/employees',\n\t\t 'type' : 'GET',\n\t\t 'success' : function(data) {\n\t\t \t$.each(data, function(index) {\n\t\t \t\tconsole.log(data[index].name);\n\t\t \t\t_generateEmpList(data[index].name);\n\t\t });\n\t\t },\n\t\t\t'error' : function(XMLHttpRequest, textStatus, errorThrown){\n\t\t\t\tconsole.log(textStatus);\n\t\t\t}\n\t\t });\n\t}", "function getEmployeeDataFromUI() {\n // New code for handling role pick list.\n var ddList = document.getElementById(\"userPickList\");\n\n // create a user object from the values that the user has typed into the page.\n var userInputObj = {\n\n\n \"employeeEmail\": document.getElementById(\"employeeEmail\").value,\n \"employeeName\": document.getElementById(\"employeeName\").value,\n \"employeeBirthday\": document.getElementById(\"employeeBirthday\").value,\n \"employeeImage\": document.getElementById(\"employeeImage\").value,\n \"employeeDescription\": document.getElementById(\"employeeDescription\").value,\n \"employeeExp\": document.getElementById(\"employeeExp\").value,\n // Modification here for role pick list\n //\"userRoleId\": document.getElementById(\"userRoleId\").value,\n \"webUserId\": ddList.options[ddList.selectedIndex].value,\n\n \"errorMsg\": \"\"\n };\n\n console.log(userInputObj);\n\n // JSON.stringify converts the javaScript object into JSON format \n // (the reverse operation of what gson does on the server side).\n // \n // Then, you have to encode the user's data (encodes special characters \n // like space to %20 so the server will accept it with no security error. \n console.log(document.getElementById(\"employeeBirthday\").value);\n return encodeURIComponent(JSON.stringify(userInputObj));\n //return escape(JSON.stringify(userInputObj));\n }", "function populateUserData() {\r\n\tvar emailId = sessionStorage.getItem(\"jctEmail\");\r\n\tvar userProf = Spine.Model.sub();\r\n\tuserProf.configure(\"/admin/facilitatorAccount/populateExistingFacilitatorData\", \"facilitatorEmail\");\r\n\tuserProf.extend( Spine.Model.Ajax );\r\n\t//Populate the model with data to transfer\r\n\tvar modelPopulator = new userProf({ \r\n\t\tfacilitatorEmail: sessionStorage.getItem(\"jctEmail\")\r\n\t});\r\n\tmodelPopulator.save(); //POST\r\n\tuserProf.bind(\"ajaxError\", function(record, xhr, settings, error) {\r\n\t\talertify.alert(\"Unable to connect to the server.\");\r\n\t});\r\n\tuserProf.bind(\"ajaxSuccess\", function(record, xhr, settings, error) {\r\n\t\tvar jsonStr = JSON.stringify(xhr);\r\n\t\tvar obj = jQuery.parseJSON(jsonStr);\r\n\t\tvar statusCode = obj.statusCode;\r\n\t\tif(statusCode == 200) {\t\t\t\r\n\t\t\tshowUserData(obj.existingUserDataList);\r\n\t\t} else if(statusCode == 500) {\r\n\t\t\t//Show error message\r\n\t\t}\r\n\t});\r\n}", "function getEmployeeJobApplication(firstname) {\n\treturn Employee.findOne({firstname: firstname})\n\t .populate(\"applications\").exec((err, posts) =>{\n console.log(\"Populated Employee\" + posts)\n }\n\t \n)\n}", "'INIT_EMPLOYEE'(state, payload) {\n if (state.employees.length > 0) return;\n state.employees = payload\n }", "function getEmployees() {\n\t\t\temployeeService.getEmployees().then(function(data) {\n\t\t\t\tvm.employees = data;\n\t\t\t});\n\t\t}", "function upsertEmployee(employeeData) {\r\n\t\t$.post(\"/api/employees\", employeeData).then(getEmployees);\r\n\t}", "function enhanceEmployees( emps ) {\n const MSPERYEAR = (1000 * 60 * 60 * 24 * 365.25);\n let now = Date.now();\n\n emps.forEach( emp => {\n emp.firstName = emp.firstName.charAt(0) + emp.firstName.substring( 1 ).toLowerCase();\n\n emp.lastName = emp.lastName.charAt(0) + emp.lastName.substring( 1 ).toLowerCase();\n\n let splitDate = emp.bDay.split( '-' );\n let bDate = new Date( splitDate[0], splitDate[1], splitDate[2]);\n emp.age = Math.floor((now - bDate.getTime()) / MSPERYEAR);\n });\n}", "function loadData() {\r\n // load projects\r\n failureReportMode.projectOpts.clear();\r\n var projectMap = {};\r\n for (var i = 0; i < employeeInfo.projectRole.length; i++) {\r\n var project = employeeInfo.projectRole[i][0];\r\n if (projectMap[project] == null && project != \"\") {\r\n projectMap[project] = 1;\r\n failureReportMode.projectOpts.push({\r\n value: project,\r\n label: project\r\n });\r\n }\r\n }\r\n\r\n }", "function init() {\n var userList = getStorage();\n var empList = userList;\n insertRow(empList);\n}", "function createEmployeeRecord([firstName, familyName, title, payPerHour]) {\n // populates a firstName field from the 0th element, familyName field from the 1th element..etc\n return {\n firstName: firstName,\n familyName: familyName,\n title: title,\n payPerHour: payPerHour,\n // initializes a field, timeInEvents, to hold an empty Array\n timeInEvents: [],\n // initializes a field, timeOutEvents, to hold an empty Array\n timeOutEvents: []\n };\n}", "function queryEmployeeInfo() {\n employeeInfo = {};\n var employeeSearch = search.create({\n type: search.Type.EMPLOYEE,\n filters: [\n helper.filter('giveaccess').is('T'),\n helper.filter('isinactive').is('F')\n ],\n columns: [\n helper.column('firstname').create(),\n helper.column('middlename').create(),\n helper.column('lastname').create()\n ]\n });\n var results = helper.resultset(employeeSearch.run());\n for ( var index in results) {\n var result = results[index];\n employeeInfo[result.id] = formatUserName(result.getValue(helper.column('firstname')), result.getValue(helper.column('middlename')), result.getValue(helper.column('lastname')));\n }\n }", "function addEmployee() {\n var tempEmpObj = {\n firstname: parent.empObj.firstname,\n lastname: parent.empObj.lastname,\n email: parent.empObj.email,\n address: parent.empObj.address,\n phone: parent.empObj.phone\n };\n return parent.postEmpList(tempEmpObj);\n }", "function populateEmployeeSingle( activity, itcb ) {\n Y.log( 'getPopulatedActivities: populateEmployeeSingle employeeId:' + activity.employeeId, 'debug', NAME );\n\n // skip this step of no employee (should never happen)\n if( !activity.employeeId ) {\n return itcb( null );\n }\n\n if( objCacheHas( 'employee', activity.employeeId ) ) {\n activity.employeeId = objCacheGet( 'employee', activity.employeeId );\n return itcb( null );\n }\n\n var\n popQuery = {\n path: 'employeeId',\n select: '_id officialNo lastname firstname specialities',\n model: 'employee'\n };\n\n patientModel.mongoose.populate( activity, [popQuery], onEmployeePopulated );\n\n function onEmployeePopulated( err /*, result */ ) {\n if( err ) {\n return itcb( err );\n }\n // keep this for next time (getCaseFile optimization)\n objCacheSet( 'employee', activity.employeeId._id, activity.employeeId );\n itcb( null );\n }\n }", "function getNames(dataRow){\n var names = recal(\"FirstName\") || employeeData();\nif(dataRow.employeeID){\n var ID = dataRow.employeeID;\n dataRow.firstName = names[ID];\n };\n// log(\"First Name Function Called\", dataRow.firstName)\n return dataRow\n}", "function getEmployee() {\n inquirer.prompt(\n [...questions]\n )\n .then ((data) => {\n try {\n //Apply relevant classes to data, push teammember objects to employees array\n let teamMember;\n if (data.employee_type === \"Manager\") {\n let name = data.name;\n let id = data.id;\n let email = data.email;\n let officeNumber = data.officeNumber;\n teamMember = new Manager (name, id, email, officeNumber);\n employees.push(teamMember);\n\n } else if (data.employee_type === \"Engineer\") {\n let name = data.name;\n let id = data.id;\n let email = data.email;\n let github = data.github;\n teamMember = new Engineer (name, id, email, github);\n employees.push(teamMember);\n } else {\n let name = data.name;\n let id = data.id;\n let email = data.email;\n let school = data.school;\n teamMember = new Intern (name, id, email, school);\n employees.push(teamMember);\n\n };\n //ask users if they want to add more team members\n inquirer.prompt(\n [{\n name:\"add_more\",\n type:\"list\",\n message:\"Would you like to add another team member?\",\n choices:[\"Yes\", \"No\"]\n },\n ]\n )\n .then ((data) => {\n //if statement to end inquirer and call function to render data if 'no'\n //chosen, or redirect to questions if more employees need to be added\n if (data.add_more === 'No') {\n pushAnswersToRender(employees);\n } else {\n getEmployee();\n }\n })\n } catch (error) {\n console.log(error);\n }\n }); \n }", "function populateUsersData(req,res,daycouner,journey,x,userYelpArr,callback){\n var tempArr = [];//array for temprorarily storing populatedData\n var counter = 0;//counter for handling ASYNC\n //show all of user's favorites on the planner page by searching through yelpData\n //and linking to user.favorites\n if(!userYelpArr || userYelpArr == \"\" || userYelpArr==null){\n callback(tempArr);\n }else{\n userYelpArr.forEach(function(userProperties){\n yelpData.findOne({'business.id': userProperties},function(err,foundYelpData){\n if(err){\n console.log(err);\n }else{\n tempArr.push(foundYelpData.business);\n counter++;\n if(counter == userYelpArr.length){\n callback(tempArr , x , journey);\n }\n }\n });\n });\n }\n}", "function startPopulateEmployeeList(XML) {\n\tif(XML == null)\n\t\treturn;\n\tvalueListXML = XML;\n\tpositionInList = 0;\n\t//if this function is already running\n\tif(window.populateLock)\n\t\twindow.populateLock = false;\n\telse\n\t\tpopulateEmployeeList();\n}", "function displayEmployees(personData) {\n employees = personData;\n let employeeHTML = \"\";\n employees.forEach((employee, index) => {\n let { email, location: { city, street, state, postcode}, login: {username}, name, phone, picture } = employees[index] || {};\n employeeHTML += `\n <div class=\"card\" data-index=\"${index}\">\n <img class=\"avatar\" src=\"${picture.large}\">\n <div class=\"text-container\">\n <h2 class=\"name\">${name.first} ${name.last}</h2>\n <p class=\"email\">${email}</p>\n <p class=\"address\">${city}</p>\n </div>\n </div>\n `\n });\n gridContainer.innerHTML = employeeHTML;\n}", "function employee_Set_FormData(data)\r\n\t{\r\n\t\t$(\"#employee_title\").val(data.title);\r\n\t\t$(\"#employee_fullName\").val(data.fullName);\r\n\t\t$(\"#employee_surname\").val(data.surname);\r\n\t\t$(\"#employee_fatherName\").val(data.fatherName);\r\n\t\t$(\"#employee_gender\").val(data.gender);\r\n\t\t$(\"#employee_email\").val(data.email);\r\n\t\t$(\"#employee_maritalStatus\").val(data.maritalStatus);\r\n\t\t$(\"#employee_postalAddress\").val(data.postalAddress);\r\n\t\t$(\"#employee_nic\").val(data.nic);\r\n\t\t$(\"#employee_mobile\").val(data.mobile);\r\n\t\t$(\"#employee_phone\").val(data.phone);\r\n\t\t$(\"#employee_religion\").val(data.religion);\r\n\t\t$(\"#employee_department\").val(data.departmentId);\r\n\t\t$(\"#employee_employeeId\").val(data.employeeId);\r\n\t\t$(\"#employee_date\").val(data.dob);\r\n\t\tpageAniamateScroll();\r\n\t}", "function putEmployeeInfo(res,selector){\n\t\tvar name=res['fname'].charAt(0).toUpperCase() + res['fname'].slice(1);\n\t\tif(res['mname']!=null)\n\t\t\tname=name+\" \"+res['mname'];\n\t\tif(res['lname']!=null)\n\t\t\tname=name+\" \"+res['lname'];\n\t\tvar district=res['district'].charAt(0).toUpperCase() + res['district'].slice(1);\n\t\tvar state=res['state'].charAt(0).toUpperCase() + res['state'].slice(1);\n\t\tvar len=res['contactNo'].length;\n\t\tvar contact=\"\";\n\t\tfor(i=0;i<len;i++){\n\t\t\tcontact=contact+res['contactNo'][i]['contactNo']+\", \"\n\t\t}\n\t\tcontact=contact.substring(0,contact.length-1);\n\t\tvar values=[res['empId'],name,res['dob'],res['post'].charAt(0).toUpperCase()+res['post'].slice(1),\n\t\t\t\t \tres['district'].charAt(0).toUpperCase() + res['district'].slice(1)+\" \"+\n\t\t\t\t \tres['state'].charAt(0).toUpperCase() + res['state'].slice(1),\n\t\t\t\t \tres['joiningDate'],res['retirementDate'],contact];\n\t\thead=[\"Employee Id:\",\"Name:\",\"Date of Birth\",\"Post\",\"Belongs To:\",\n\t\t\t\t \"Date of Joining:\",\"Date of Retirement:\",\"Contact No:\"];\n\t\tlen=values.length;\n\t\tvar dataString=\"<div class='col-lg-5'>\";\n\t\tfor(i=0;i<len/2;i++){\n\t\t\tdataString=dataString+\"<div class='row'>\"+\n\t\t\t\t\t\t\t\t\t\"<div class='col-lg-4'><h6 class='pull-right'><b>\"+head[i]+\"</b></h6></div>\"+\n\t\t\t\t\t\t\t\t\t\"<div class='col-lg-8'><h6>\"+values[i]+\"</h6></div>\"+\n\t\t\t\t\t\t\t\t \"</div>\"\n\t\t}\n\t\tdataString=dataString+\"</div><div class='col-lg-7'>\";\n\t\tfor(i=4;i<len;i++){\n\t\t\tdataString=dataString+\"<div class='row'>\"+\n\t\t\t\t\t\t\t\t\t\"<div class='col-lg-4'><h6 class='pull-right'><b>\"+head[i]+\"</b></h6></div>\"+\n\t\t\t\t\t\t\t\t\t\"<div class='col-lg-8'><h6>\"+values[i]+\"</h6></div>\"+\n\t\t\t\t\t\t\t\t \"</div>\"\n\t\t}\n\t\tdataString=dataString+\"</div>\";\n\t\t$(selector).append(dataString);\n\t}", "function populateEmployeeNew() {\n\t$('#hidden-employee-id').val(0);\n\t$('#hidden-employee-idx').val(0);\n\t$('#first-name-form').val(\"\");\n\t$('#last-name-form').val(\"\");\n\t$('#user-name-form').val(\"\");\n\t$('#password-form').val(\"\");\n\t$('#email-form').val(\"\");\n\t$('#role-dropdown').val(\"\");\n\t\n\t$('#first-name-form').prop(\"disabled\", false);\n\t$('#last-name-form').prop(\"disabled\", false);\n\t$('#user-name-form').prop(\"disabled\", false);\n\t$('#password-form').prop(\"disabled\", false);\n\t$('#email-form').prop(\"disabled\", false);\n\t$('#role-dropdown').prop(\"disabled\", false);\n\t$('#employee-new').hide();\n\t$('#employee-submit').show();\n\t$('#employee-cancel').show();\n}", "function updateEmployeeData() {\r\n //get container where data is supposed to go\r\n const employeeTable = document.getElementById(\"employee-table\");\r\n const employeeTableBody = document.getElementById(\"employee-table-body\");\r\n\r\n //create element for data\r\n const employeeTR = document.createElement(\"tr\");\r\n //populate element with data\r\n getEmployeeData(function(employeeData) {\r\n //do stuff\r\n const employeeNameTD = document.createElement(\"td\");\r\n const roleTD = document.createElement(\"td\");\r\n const startDateTD = document.createElement(\"td\");\r\n const monthsWorkedTD = document.createElement(\"td\");\r\n const monthlyRateTD = document.createElement(\"td\");\r\n const totalBilledTD = document.createElement(\"td\");\r\n\r\n //get new employee data\r\n let employee = employeeData[employeeData.length - 1];\r\n \r\n //populate with info\r\n employeeNameTD.innerText = employee.employeeName;\r\n roleTD.innerText = employee.role;\r\n startDateTD.innerText = employee.startDate;\r\n monthsWorkedTD.innerText = \"some text here\";\r\n monthlyRateTD.innerText = employee.monthlyRate;\r\n\r\n //append td to tr\r\n employeeTR.append(employeeNameTD);\r\n employeeTR.append(roleTD);\r\n employeeTR.append(startDateTD);\r\n employeeTR.append(monthsWorkedTD);\r\n employeeTR.append(monthlyRateTD);\r\n employeeTR.append(totalBilledTD);\r\n\r\n // append tr to table body\r\n employeeTableBody.append(employeeTR);\r\n })\r\n\r\n //append element to container\r\n}", "function createEmployee(){\n\n\n //Get First name from the submission\n first_name=document.getElementsByName(\"first_name\")[0].value;\n\n console.log(\"DEBUG-FIRST NAME: \"+first_name+'\\n');\n\n //Get Last Name from the submission\n last_name=document.getElementsByName(\"last_name\")[0].value;\n\n console.log(\"DEBUG-LAST NAME: \"+last_name+'\\n');\n\n //Get the Department\n var e = document.getElementById(\"dept_select\");\n var strDept = e.options[e.selectedIndex].text;\n\n\n //Get the current date\n var today = new Date();\n var dd = String(today.getDate()).padStart(2, '0');\n var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!\n var yyyy = today.getFullYear();\n today = mm + '/' + dd + '/' + yyyy;\n\n\n //Creating Employee ID Variable w/random num\n employeeId=generate_id();\n\n //Check to see if it's unique\n while(emp_ids.indexOf(employeeId)>-1){\n console.log(\"ID already exists, making another\");\n employeeId=generate_id();\n }\n\n total_employees+=1;\n\n employee={\"first_name\":first_name,\n \"last_name\":last_name,\n \"employee_id\":employeeId,\n \"hire_date\":today,\n \"total_employees\":total_employees};\n\n //Append employee to employees array\n employees.push(employee);\n\n //Append emp_id to list of unique ids for future checking\n emp_ids.push(employeeId);\n\n\n //Debug check to see if our employee was created\n console.log(employee);\n\n //Construct and send our request\n $.ajax({\n url:\"test.php\",\n type:\"POST\",\n contentType:\"application/json\",\n data:JSON.stringify(employee),\n success:function(response){\n console.log('Sucessfully sent to php backend');\n },\n error:function(response){\n console.log(\"This was a complete and spectacular failure\");\n console.log(response);\n }\n });\n\n //Update most recently Added employee\n document.getElementById('Employee Added').innerHTML = \"Employee Added\";\n document.getElementById('name').innerHTML = \"Name: \"+first_name+\",\"+last_name;\n document.getElementById('department').innerHTML =\"Department: \"+ strDept;\n document.getElementById('emp_id').innerHTML = \"ID: \"+employeeId.toString();\n document.getElementById('hire_date').innerHTML = \"Hire Date: \"+today;\n document.getElementById('total_employees').innerHTML = \"Total Employees: \"+employees.length.toString();\n}", "async function fetchEmployees(){\n\t\t\t\t// async function body\n\t\t\t\tconst e1 = await API.getEmployee(8569129)\n\t\t\t\tconst e2 = await API.getEmployee(254808831)\n\t\t\t\tconst e3 = await API.getEmployee(58197)\n\t\t\t\tconst e4 = await API.getEmployee(651065)\n\t\t\t\treturn [e1, e2, e3, e4]\n\t\t\t}", "function viewAllEmployees(promptUser) {\n connection.query(`SELECT emp.id, emp.first_name, emp.last_name, role.title, department.name AS department, role.salary, concat(mng.first_name,' ',mng.last_name) as manager FROM employee emp LEFT JOIN role ON emp.role_id = role.id LEFT JOIN department ON role.department_id = department.id\n LEFT JOIN employee mng ON emp.manager_id = mng.id ORDER BY emp.id`, function (err, data) {\n if (err) throw err;\n console.table(\"\\n\",data);\n promptUser();\n })\n}", "constructor (AllEmployeeName,AllEmployeeDepartment,AllEmployeeByManager,AddEmployee,\n RemoveEmployee,UpdateEmployeeRole,UpdateEmployeeManager)\n {\n this.AllEmployeeName = AllEmployeeName\n this.AllEmployeeDepartment = AllEmployeeDepartment\n this.AllEmployeeByManager = AllEmployeeByManager\n this.AddEmployee = AddEmployee\n this.RemoveEmployee = RemoveEmployee\n this.UpdateEmployeeRole = UpdateEmployeeRole\n this.UpdateEmployeeManager = UpdateEmployeeManager\n }", "function appendEmployeesToTable(data){\n // if no employee and display no employee, else list all employees\n if(data.length == 0){\n document.getElementById('noDataShow').style.display = 'block';\n }else{\n document.getElementById('noDataShow').style.display = 'none';\n }\n\n // add employees to the table\n for(let i = 0; i < data.length; i++){\n\n let tr = document.createElement('tr');\n \n let td1 = document.createElement('td');\n let td2 = document.createElement('td');\n let td3 = document.createElement('td');\n let td4 = document.createElement('td');\n let td5 = document.createElement('td');\n \n let data1 = document.createTextNode(data[i].user_id);\n let data2 = document.createTextNode(data[i].username);\n let data3 = document.createTextNode(data[i].first_name);\n let data4 = document.createTextNode(data[i].last_name);\n let data5 = document.createTextNode(data[i].email);\n\n td1.appendChild(data1);\n td2.appendChild(data2);\n td3.appendChild(data3);\n td4.appendChild(data4);\n td5.appendChild(data5);\n\n tr.appendChild(td1);\n tr.appendChild(td2);\n tr.appendChild(td3);\n tr.appendChild(td4);\n tr.appendChild(td5);\n \n document.getElementById('reimbList').appendChild(tr);\n console.log(\"add emp\" + i + 1);\n }\n}", "function addEmployee() { \n inquirer.prompt(employeeQuestions)\n \n .then((employeeData) => {\n \n\n const {role, name, id, email, gitHub, school, confirmEmployee} = employeeData;\n let theEmployee;\n \n // SET A CONDITION ON WHICH INPUT DATA SHOULD BE RETRIEVED ON BASED ON EMPLOYEE ROLE\n if (role === \"Engineer\") {\n theEmployee = new Engineer (name, id, email, gitHub);\n teamData.push(theEmployee);\n \n\n } else if (role === \"Intern\") {\n theEmployee = new Intern (name, id, email, school);\n // ADD TO EMPTY TEAM ARRAY TO JOIN ALL INPUT DATA\n teamData.push(theEmployee);\n console.log(theEmployee);\n\n } \n \n if (confirmEmployee) {\n addEmployee()\n } else {\n const html = generateProfilePage(teamData)\n console.log(html)\n writeToFile(html)\n }\n });\n}", "function getEmployee() {\n\n inquirer\n .prompt([\n\n {\n type: 'input',\n message: \"Please enter new Employee name\",\n name: 'userName',\n default: 'Joe Blow',\n },\n {\n type: 'input',\n message: \"Please enter new employees assignged employee id :\",\n name: 'employeeId',\n default: '0012',\n },\n {\n type: 'input',\n message: \"Please enter email address.\",\n name: 'emailAdress',\n default: '[email protected]',\n },\n {\n type: 'list',\n message: \"What role is this employee?\",\n name: 'role',\n choices: ['Intern', 'Engineer'],\n default: 'Intern',\n }\n ])\n // Uses the data from the role to ask final question depending on the role selected\n .then((data) => {\n switch (data.role) {\n case 'Intern':\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"school\",\n message: `What is your intern's school?`,\n default: 'School of rock',\n },\n ])\n .then((schooldata) => {\n let intern = new Intern(data.userName, data.employeeId, data.emailAdress, schooldata.school);\n data\n const totaldata = { ...schooldata, ...data }\n allEmployees.push(totaldata)\n console.log(\"Intern has been added\");\n })\n .then(() => {\n continueorquit()\n })\n break;\n case 'Engineer':\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"github\",\n message: `What is your engineer's GitHub??`,\n default: 'https://github.com/ChrisOnions',\n },\n ])\n .then((gitdata) => {\n let engineer = new Engineer(data.userName, data.employeeId, data.emailAdress, gitdata.github);\n const totaldata = { ...gitdata, ...data }\n allEmployees.push(totaldata)\n console.log(\"Engineer has been added\");\n })\n .then(() => {\n continueorquit(allEmployees)\n })\n break;\n }\n })\n}", "function createEmployeeRecord(eData){\n let record = {};\n record.firstName = eData[0];\n record.familyName = eData[1];\n record.title = eData[2];\n record.payPerHour = eData[3];\n record.timeInEvents = [];\n record.timeOutEvents = [];\n return record;\n}", "function _get_manager_users_list(db){\n try{\n var rows = db.execute('SELECT * FROM my_manager_user WHERE status_code=1 and company_id=?',_selected_company_id);\n var b = 0;\n if(rows.getRowCount() > 0){\n while(rows.isValidRow()){\n var row = Ti.UI.createTableViewRow({\n filter_class:'manager_user',\n className:'manager_user_list_data_row_'+b,\n hasChild:true,\n source:_source,\n job_id:_selected_job_id,\n contact_id:rows.fieldByName('id'),\n title:rows.fieldByName('first_name')+' '+rows.fieldByName('last_name'),\n mobile:rows.fieldByName('phone_mobile'),\n email:rows.fieldByName('email')\n }); \n if(b === 0){\n row.header = 'Staff';\n }\n self.data.push(row);\n rows.next();\n b++;\n }\n }\n rows.close();\n }catch(err){\n self.process_simple_error_message(err,window_source+' - _get_manager_users_list');\n return;\n } \n }", "function assignEmployee() {\n manageTaskService.getNotLinkedTaskList($scope.selectedTask).then(notLinkedTaskSuccess, notLinkedTaskError);\n $scope.selectedTask.TaskId;\n }", "function getEmployees() {\n var employeeList = new XMLHttpRequest();\n employeeList.onload = function() {\n rawEmployeeData = (this.responseText).split(\"<newrecord>\");\n for (i = 0; i < rawEmployeeData.length - 1; i++) {\n each = rawEmployeeData[i].split(\"/\");\n employeeData.push({\n id: each[0],\n f_name: each[1],\n l_name: each[2],\n phone1: each[3]\n });\n }\n }\n employeeList.open(\"get\", \"php/get/get-emps.php\", false);\n employeeList.send();\n}", "function updateEmployeeList(employees, $targetTab){\r\n\t\t\t$targetTab.empty();\r\n\t\t\tvar $list = jQuery('<ul></ul>')\r\n\t\t\t\t\t\t\t.appendTo($targetTab)\r\n\t\t\t\t\t\t\t.addClass('employee-list');\r\n\t\t\t_.chain(employees).each(function(employee){\r\n\t\t\t\tjQuery('<li></liv>')\r\n\t\t\t\t\t.addClass('employeeName')\r\n\t\t\t\t\t.attr('data-name', employee.name)\r\n\t\t\t\t\t.data('employee', employee)\r\n\t\t\t\t\t.text(employee.displayName)\r\n\t\t\t\t\t.appendTo($list);\r\n\t\t\t});\r\n\t\t}", "function updateEmployeeList() {\n\n $('#EmployeeList').empty(); //clear out data\n\n //create variables from input fields\n let firstNameIn = $('#firstNameIn').val();\n let lastNameIn = $('#lastNameIn').val();\n let idNumberIn = $('#idNumberIn').val();\n let jobTitleIn = $('#jobTitleIn').val();\n let annualSalaryIn = ($('#annualSalaryIn').val());\n //monthlySalary = annualSalaryIn.toFixed(2); //take 2 decimals from input field\n\n\n //test to make sure variables and functions work\n console.log('employee annualSalaryIn:', annualSalaryIn);\n\n\n //create new employee object from class constructor \n let addEmployee = new Employee(firstNameIn, lastNameIn, idNumberIn, jobTitleIn, annualSalaryIn);\n employeeData.push(addEmployee); // push new Employee into employee data array\n\n //create variable for output/appending to HTML\n let newEmployee = (firstNameIn + ' ' + lastNameIn + ' ' + idNumberIn\n + ' ' + jobTitleIn + ' ' + '$' + annualSalaryIn);\n\n //test: console.log( 'showing', newEmployee);\n\n //append new employee info to html \n $('#employeeList').append('<p>' + newEmployee + '</p>');\n\n $('#firstNameIn').empty('First Name');\n $('#lastNameIn').empty();\n $('#idNumberIn').val();\n $('#jobTitleIn').val();\n $('#annualSalaryIn').val();\n\n} //end updateEmployeeList", "function addEmployee(event) {\n event.preventDefault(); // prevents refresh on click\n firstName = $('#first-name').val(); // grabbing values from input fields\n lastName = $('#last-name').val();\n employeeID = $('#employee-id-number').val();\n jobTitle = $('#job-title').val();\n annualSalary = $('#annual-salary').val();\n let employee = { // creates new object for each employee with above values\n firstName,\n lastName,\n employeeID,\n jobTitle,\n annualSalary\n };\n employeeInfo.push(employee); // pushes new object to the array\n $('#first-name').val(''); // empties inputs\n $('#last-name').val('');\n $('#employee-id-number').val('');\n $('#job-title').val('');\n $('#annual-salary').val('');\n $('#employeeList').empty(); // I had to call this here to avoid posting the same information twice\n postEmployeeInfo(employee); // calling function to post employee information to the DOM\n calculateMonthly();\n}", "function detailDisplay(employee) {\n\tvar tableDiv = document.getElementById(\"StaffDetailsContainer\");\n\tvar blankDiv = document.getElementById(\"StaffDetailsBlank\");\n\tif(employee == null)\n\t{\n\t\ttableDiv.setAttribute(\"class\",\"hide\");\n\t\tblankDiv.removeAttribute(\"class\");\n\t\treturn;\n\t}\n\telse\n\t{\n\t\tblankDiv.setAttribute(\"class\",\"hide\");\n\t\ttableDiv.removeAttribute(\"class\");\n\t\tvar hiddenRefid = document.getElementById(\"hiddenRefid\");\n\t\thiddenRefid.value = employee.refid;\n\t\t//obtaining the input boxes I need to set values for\n\t\tvar fName = document.getElementById(\"fname\");\n\t\tvar lName = document.getElementById(\"lname\");\n\t\tvar uName = document.getElementById(\"username\");\n\t\tvar email = document.getElementById(\"email\");\n\t\tvar lineManager = document.getElementById(\"lineManager\");\n\t\tvar userType = document.getElementById(\"userType\");\n\t\tvar minHours = document.getElementById(\"minHours\");\n\t\tvar toilAdjustment = document.getElementById(\"toilAdjustment\");\n\t\tvar toilAdjustmentDate = document.getElementById(\"toilAdjustmentDate\");\n\t\tvar toilAdjustmentComment = document.getElementById(\"toilAdjustmentComment\");\n\t\tvar holsAdjustment = document.getElementById(\"holsAdjustment\");\n\t\tvar holsAdjustmentComment = document.getElementById(\"holsAdjustmentComment\");\n\t\tvar employed = document.getElementById(\"employed\");\n\t\tvar variable = document.getElementById(\"variable\");\n\t\tvar authorizes_subordinates = document.getElementById(\"authorizes_subordinates\");\n\t\tvar authorizes_invoice_codes = document.getElementById(\"authorizes_invoice_codes\");\n\t\tvar enrolled = document.getElementById(\"enrolled\");\n\t\tfName.value = employee.firstName;\n\t\tlName.value = employee.lastName;\n\t\tuName.value = employee.userName;\n\t\ttoilAdjustment.value = employee.toilAdjustment;\n\t\ttoilAdjustmentDate.value = employee.toilAdjustmentDate;\n\t\ttoilAdjustmentComment.value = employee.toilAdjustmentComment;\n\t\tholsAdjustment.value = employee.holsAdjustment;\n\t\tholsAdjustmentComment.value = employee.holsAdjustmentComment;\n\t\temail.value = employee.email;\n\t\tlineManager.value = employee.lineManager;\n\t\tuserType.value = employee.userType.toString();\n\t\tminHours.value = employee.minHours;\n\t\temployed.checked = employee.employed;\n\t\tvariable.checked = employee.variable;\n\t\tauthorizes_subordinates.checked = employee.authorizes_subordinates;\n\t\tauthorizes_invoice_codes.checked = employee.authorizes_invoice_codes;\n\t\tenrolled.checked = employee.enrolled;\n\t\tdocument.getElementById(\"statusText\").value = \"\";\n\t}\n}", "function initializeUserData() {\n $.get(\"/api/user_data\").then(function(data) {\n console.log(\"User Data: \", data);\n var name = commonName;\n if (name) {\n generateName(data, name);\n } else {\n name = commonName;\n generateName(data, name);\n }\n });\n }", "function get_user_details() {\n\t\t$.ajax({\n url: basepath + \"employees/\"+action_id,\n type: \"GET\",\n contentType: 'application/json',\n beforeSend: function(xhr) {\n xhr.setRequestHeader('Token', TOKEN);\n },\n success: function(data) {\n if(data) {\n var id = data.id;\n var first_name = data.first_name;\n var last_name = data.last_name;\n var middle_name = data.middle_name;\n\t\t\t\t\t\tvar age = data.age;\n\t\t\t\t\t\tvar sex = data.sex;\n\t\t\t\t\t\tvar dob = data.date_of_birth;\n var address1 = data.address_one;\n\t\t\t\t\t\tvar address2 = data.address_two;\n\t\t\t\t\t\tvar llg = data.llg;\n\t\t\t\t\t\tvar province = data.province;\n\t\t\t\t\t\tvar village = data.village;\n\t\t\t\t\t\tvar district = data.district;\n\t\t\t\t\t\tvar region = data.region;\n var email = data.email_address;\n var contact_number =data.contact_number;\n\t\t\t\t\t\tvar phone1 = data.alt_contact_number;\n var country = data.country;\n var employee_number = data.employement_number;\n\t\t\t\t\t\tvar retirement_age = data.retirement_age;\n\t\t\t\t\t\tvar salary_step = data.salary_step;\n\t\t\t\t\t\tvar date_of_commencement = data.date_of_commencement;\n\t\t\t\t\t\tvar emp_category = data.employee_category_id;\n\t\t\t\t\t\tvar branch_agency = data.employee_branch;\n\t\t\t\t\t\tvar emp_type = data.employee_type_id;\n\t\t\t\t\t\tvar emp_position = data.employee_position_id;\n var employee_branch_id = data.employee_branch_id;\n var salutation = data.salutation;\n var is_branch = data.is_branch;\n\n\t\t\t\t\t\t$(\"#first-name\").val(first_name);\n\t\t\t\t\t\t$(\"#last-name\").val(last_name);\n $(\"#sex\").selectpicker('val', sex);\n\t\t\t\t\t\t$(\"#middle-name\").val(middle_name);\n\t\t\t\t\t\t$(\"#age\").val(age);\n\t\t\t\t\t\t$(\"#dob\").val(dob);\n\t\t\t\t\t\t$(\"#address1\").val(address1);\n\t\t\t\t\t\t$(\"#village\").val(village);\n\n $(\"#district\").selectpicker('val', district);\n $(\"#region\").selectpicker('val', region);\n $(\"#province\").selectpicker('val', province);\n $(\"#country\").selectpicker('val', country);\n $(\"#llg\").selectpicker('val', llg);\n\n\n\t\t\t\t\t\t$(\"#phone\").val(contact_number);\n\t\t\t\t\t\t$(\"#phone1\").val(phone1);\n\t\t\t\t\t\t$(\"#address2\").val(address2);\n\t\t\t\t\t\t$(\"#email\").val(email);\n\t\t\t\t\t\t$(\"#village\").val(village);\n\t\t\t\t\t\t$(\"#employee-number\").val(employee_number);\n\t\t\t\t\t\t$(\"#retirement-age\").val(retirement_age);\n\n\n $(\"#branch-agency\").selectpicker('val', (is_branch)?'branch':'agency');\n if(is_branch){\n $(\"#branch\").selectpicker('val', employee_branch_id);\n showBranch()\n } else {\n $(\"#agency\").selectpicker('val', employee_branch_id);\n showAgency()\n }\n $(\"#salutation\").selectpicker('val', salutation);\n $(\"#employee-type\").selectpicker('val', emp_type);\n $(\"#employee-category\").selectpicker('val', emp_category);\n $(\"#position-title\").selectpicker('val', emp_position);\n\n\t\t\t\t\t\t$(\"#salary-step\").val(salary_step);\n\t\t\t\t\t\t$(\"#start-date\").val(date_of_commencement);\n\n\t\t\t\t\t\t$(\".page-loader\").hide();\n\t\t\t\t\t\t$(\".card\").fadeIn(\"fast\");\n }\n },\n error: function(error) {\n $(\".loader\").hide();\n $(\"#submit\").show();\n showError(\"Error in Server! Try again!\")\n },\n });// Ajax\n\t}", "function processEmployees(data) {\n const output = {};\n for (let i = 0; i < data.length; i++) {\n const id = data[i].group.toLowerCase();\n if (!output[id]) output[id] = [];\n output[id].push(processName(data[i]));\n }\n return sortObject(output);\n}", "function fillUserData(response) {\n\tvar users = response.payload;\n\tfor (var i = 0; i < users.length; i++) {\n\t\tvar user = users[i];\n\t\tif (user.username == managedUser) {\n\t\t\tdocument.getElementById(\"user-header\").innerHTML =\n\t\t\t\tS(\"edit-user-header\", user.first_name, user.last_name, user.username);\n\t\t\tdocument.getElementById(\"first-name-field\" ).value = user.first_name;\n\t\t\tdocument.getElementById(\"last-name-field\" ).value = user.last_name;\n\t\t\tdocument.getElementById(\"current-credit-amount\").value = user.assets;\n\t\t\tdocument.getElementById(\"new-credit-amount\" ).value = user.assets;\n\t\t\tdocument.getElementById(\"credit-add-amount\" ).value = 0;\n\t\t\tdocument.getElementById(\"new-credit-amount\" ).min = user.assets;\n\t\t\tbreak;\n\t\t}\n\t}\n}", "findEmployeesPerJob() {\n const employeesPerJob = new Map();\n this.sampleEmployees.forEach((employee) => {\n const key = employee.payload()['jobId'];\n const value = employee.payload()['id'];\n if (!employeesPerJob.has(key)) {\n employeesPerJob.set(key, [value]);\n } else {\n employeesPerJob.get(key).push(value);\n }\n });\n return employeesPerJob;\n }", "function sortEmployee(data) {\n switch (data.skill) {\n case skills[0]:\n company.frontEndEmployees.push(data);\n break;\n case skills[1]:\n company.backEndEmployees.push(data);\n break;\n case skills[2]:\n company.logicEmployees.push(data);\n break;\n }\n}", "getEmployeeJobData() {\n axios({\n method: 'get',\n url: 'http://157.230.172.148:3000/api/queries/findJobs?managerID=resource%3Aorg.pow.app.User%23' + uuidv3(store.getState().email, uuidv3.URL)\n })\n .then((response) => {\n console.log(response);\n this.populateEmployeeData(response.data);\n })\n .catch((error) => {\n console.log(error);\n })\n }", "getEmployees(){\r\n\t\tvar that = this;\r\n\t\t$.ajax({\r\n\t\t method: \"POST\",\r\n\t\t url: \"/ajaxgetemployees\",\r\n\t\t data: { OrderID: that.orderId }\r\n\t\t})\r\n\t\t.done(function( resp ) {\r\n\t\t\tthat.Employees = resp;\r\n\t\t\t\r\n\t\t\tconsole.log(resp);\r\n\t\t\t\r\n\t\t\tthat.setupEmployeesInListbox();\r\n\t\t\t//setup the order_details rows\r\n\t\t\t//First: read all of the products rows into an array called that.ProductsData\r\n\t\t\t//getProductsArr() calls createOrderDetailsRows()\r\n\t\t\treturn that.getProductsArr();\r\n\t\t\t\t\t\r\n\t\t})\r\n\t\t.fail(function(){\r\n\t\t\talert(\"Ajax Failed in getEmployees()\");\r\n\t\t});\r\n\t}", "function addEmployee() {\n var inputFields = [$('name'), $('title'), $('extension')];\n var isValidData = true;\n inputFields.forEach(function (ele) {\n var id = ele.id || '';\n if (id.length) {\n var sts = isVaild(ele);\n isValidData = isValidData && sts['isValid'];\n ele.nextElementSibling.innerText = sts['errorMsg'];\n }\n });\n if (!isValidData)\n return;\n var emp_id = String(Math.round(Math.random() * Math.pow(10, 10))); // Generate an unique id for each employee\n var newEmployee = [];\n newEmployee.push(emp_id);\n inputFields.forEach(function (ele) {\n newEmployee.push(ele.value);\n ele.value = '';\n });\n employeeData.push(newEmployee);\n showEmployees();\n }", "function setJobDescrInfo(data) {\n // TODO: move this global to getChanData success\n currentRole = data.role;\n\n // insert asignment basic info to rpoper places\n $(creatorNameElement).html(data.creator_name);\n $(jobDateElement).html(data.job_date);\n $(subjectElement).text(data.subject);\n $(langFromElement).html(data.lang_from);\n $(langToElement).html(data.lang_to);\n $(qualificationElement).html(data.qualification);\n $(startDateElement).html(data.formated_date);\n $(genderElement).html(data.gender);\n $(startTimeElement).html(data.start_time);\n $(finishTimeElement).html(data.finish_time);\n\n // make appropriate job type block visible\n // remove all unappropriate job type blocks\n switch (data.job_type) {\n case 0: // video assignment\n $(jobTypeContVideo).removeClass(exampleClass);\n $(jobTypeContExample).remove();\n break\n case 1: // phone assignment\n $(jobTypeContPhone).removeClass(exampleClass);\n $(jobTypeContExample).remove();\n break\n case 2: // in person assignment\n // if job type is in person assignment we fill in location details and create map\n $(jobTypeContMeeting).removeClass(exampleClass);\n $(jobTypeContExample).remove();\n $(contactPersonElement).text(data.contact_person);\n $(phoneNumberElement).text(data.phone_number);\n $(locationElement).text(data.location);\n $(extraInfoElement).text(data.extra_info);\n showMapSnippet(data.location, data.lat, data.long);\n break\n case 3: // hub assignment\n // if job has hub type we check user role\n // if current user is interpreter we show info like on in person assignment (address, map etc)\n if (currentRole === 1) {\n $(jobTypeContHubInter).removeClass(exampleClass);\n $(jobTypeContExample).remove();\n $(contactPersonElement).text(data.contact_person);\n $(phoneNumberElement).text(data.phone_number);\n $(locationElement).text(data.location);\n $(extraInfoElement).text(data.extra_info);\n showMapSnippet(data.location, data.lat, data.long);\n } else {\n // if current user is business we show only hub tyle text (without address and map)\n $(jobTypeContHubBusiness).removeClass(exampleClass);\n $(jobTypeContExample).remove();\n }\n \n break\n };\n\n\n // check presence of call details for this assignment (appear only after reward before the call)\n if (data.call_details) {\n // if current user is interpreter and job type is hub type we don't show him call details\n if (currentRole === 1 && data.job_type === 3) {\n $(sessionDetailsCont).remove();\n } else {\n // if current user is interpreter we show phone details\n if (data.job_type === 1) {\n $(sessionPhoneNumber).text(data.call_details.phone_number);\n $(sessionPhoneBooking).text(data.call_details.phone_booking);\n $(sessionPhonePin).text(data.call_details.phone_pin);\n } else {\n // if user is business we remove block with phone details\n $(sessionPhoneBlock).remove();\n }\n // then we fill in call details blocks with appropriate info\n $(sessionDesktopLinkAddress).text(data.call_details.hostname);\n $(sessionDesktopLinkAddress).attr(\"href\", data.call_details.link_to_desktop);\n $(sessionSipAddress).text(data.call_details.sip_address);\n $(sessionSipBooking).text(data.call_details.sip_booking);\n $(sessionSipPin).text(data.call_details.sip_pin);\n $(sessionLyncAddress).text(data.call_details.lync_address);\n $(sessionLyncPin).text(data.call_details.lync_pin);\n $(sessionDetailsCont).removeClass(exampleClass);\n }\n } else {\n // if server hasn't provided us with call info we remove call info block\n $(sessionDetailsCont).remove();\n }\n\n if ((data.attenders && data.attenders.length > 0) && (data.permission && data.permission.can_manage_job)) {\n $(chosenAttenderList + \" *\").remove();\n makeChosenAttendersList(data.attenders);\n $(attendersSection).removeClass(\"is-hidden\");\n } else {\n $(attendersSection).remove();\n }\n if (data.permission && !data.permission.can_init_event) {\n $(\".js-cancel-job-popup\").remove();\n }\n $(\".js-assign-descr-cont\").removeClass(\"is-hidden\");\n }", "function populateUserData() {\n var user = firebaseData.getUser();\n if (user) {\n // we are logged in\n displayAdminData(user);\n firebaseData.getUserData(user, \n function(data) {\n // we have the user data here, set the data correctly\n if (firebaseData.isUserAdmin(data)) {\n // we are a coach\n displayAdminData(user);\n }\n else {\n // we are not an admin user - hide it all\n hideAdminData(user);\n }\n },\n function(error) {\n // this is the failure to get the data, do our best I suppose\n hideAdminData(user);\n console.log(\"Failed to get the firestore user data for \" + user);\n });\n }\n else {\n // we are not logged in, ask the user to log in\n hideAdminData(user);\n }\n}", "function joblist() {\n jobFactory.joblist()\n .then (\n function(jobs) { \n self.joblist = jobs;\n for(var [job] in self.joblist) {\n // console.log(self.bloglist[blog].postDate);\n self.joblist[job].postDate = new Date(self.joblist[job].postDate[0],self.joblist[job].postDate[1] - 1,self.joblist[job].postDate[2]);\n // console.log(self.bloglist[blog].postDate);\n }\n console.log(self.joblist);\n },\n function(errResponse) {\n console.log('Failure!');\n }\n );\n }", "function processEmployees(employees) {\n for (let i = 0; i < employees.length; i++) {\n let employee = employees[i];\n\n employee = giveRaise(employee);\n employee = giveCar(employee);\n employee = haveHrTalk(employee);\n employee = christmasDinner(employee);\n employee = giveBonus(employee);\n }\n\n return employees;\n }", "function setJobDetails(){\n let jobId = JobManager.getCurrentJobId();\n let jobOffer = JobManager.getJobOffer(jobId);\n document.getElementById('jobTitle').innerText = jobOffer.jobTitle;\n document.getElementById('jobType').innerText = jobOffer.jobType;\n document.getElementById('description').innerText = jobOffer.description;\n document.getElementById('skills').innerText = jobOffer.skills;\n document.getElementById('minYears').innerText = jobOffer.minYears;\n document.getElementById('maxYears').innerText = jobOffer.maxYears;\n document.getElementById('minSalary').innerText = jobOffer.minSalary;\n document.getElementById('maxSalary').innerText = jobOffer.maxSalary;\n document.getElementById('location').innerText = jobOffer.location;\n document.getElementById('noOfVacancy').innerText = jobOffer.noOfVacancy;\n document.getElementById('qualification').innerText = jobOffer.qualification;\n}", "function getEmployeeInfo() {\n\n $.ajax({\n url: '/dashboard/strategy/get_employee_info/',\n type: 'GET',\n dataType: 'json',\n success: function (data) {\n $('#user_branch').val(data.emp[0].branch__name);\n\n }\n });\n\n }", "async function getEmployee() {\n let input = inquirer.prompt([\n {\n type: \"input\",\n message: \"Employee Name: \",\n name: \"name\"\n },\n {\n type: \"input\",\n message: \"Employee ID: \",\n name: \"id\"\n },\n {\n type: \"input\",\n message: \"Employee Email: \",\n name: \"email\"\n },\n {\n type: \"list\",\n message: \"Employee Role: \",\n name: \"role\",\n choices: employeeTypes\n }\n ])\n let employee = await input;\n\n if (employee.role === \"Manager\") {\n let managerInput = inquirer.prompt([\n {\n type: \"input\",\n message: \"Office Number: \",\n name: \"officeNumber\"\n }\n ])\n let office = await managerInput;\n employee.officeNumber = office.officeNumber;\n\n manager = new Manager(employee.name, employee.id, employee.email, employee.officeNumber);\n\n allEmployees.push(manager);\n\n employeeTypes.splice(0,1);\n\n } else if (employee.role === \"Engineer\") {\n let engineerInput = inquirer.prompt([\n {\n type: \"input\",\n message: \"GitHub Profile: \",\n name: \"github\"\n }\n ])\n let githubLink = await engineerInput;\n employee.github = githubLink.github;\n\n engineer = new Engineer(employee.name, employee.id, employee.email, employee.github);\n\n allEmployees.push(engineer);\n\n } else if (employee.role === \"Intern\") {\n let internInput = inquirer.prompt([\n {\n type: \"input\",\n message: \"School: \",\n name: \"school\"\n }\n ])\n let university = await internInput;\n employee.school = university.school;\n\n intern = new Intern(employee.name, employee.id, employee.email, employee.school);\n\n allEmployees.push(intern);\n\n }\n\n let another = inquirer.prompt(\n {\n type: \"list\",\n message: \"Would you like to add another employee? \",\n name: \"repeat\",\n choices: yesOrNo\n }\n )\n let addEmployee = await another;\n if (addEmployee.repeat === \"Yes\") {\n anotherEmployee = true;\n } else {\n anotherEmployee = false;\n }\n}", "function addUserDetail(sender, eventArgs) {\n\n currentRowIndex = eventArgs.get_itemIndexHierarchical();\n\n var ary = [];\n\n ary[0] = 0;\n ary[1] = ordersTableView.get_dataItems()[currentRowIndex].findElement(\"USER_NAME\").value;\n ary[2] = ordersTableView.get_dataItems()[currentRowIndex].findElement(\"FROM_DATE\").value;\n ary[3] = ordersTableView.get_dataItems()[currentRowIndex].findElement(\"TO_DATE\").value;\n ary[4] = ordersTableView.get_dataItems()[currentRowIndex].findElement(\"PASSWORD\").value;\n ary[5] = eventArgs._tableView._element.parentNode.children[0].control._dataItems[currentRowIndex]._dataItem.EMP_ID;\n\n \n if (ary[1] == \"\" || ary[1] == 'null') ary[1] = 0;\n if (ary[2] == \"\" || ary[2] == 'null') ary[2] = 0;\n if (ary[3] == \"\" || ary[3] == 'null') ary[3] = 0;\n if (ary[4] == \"\" || ary[4] == 'null') ary[4] = 0;\n\n try {\n\n CRM.WebApp.webservice.EmployeeWebService.UpdateUserDetails(ary, s, OnCallBack);\n CRM.WebApp.webservice.EmployeeWebService.GetDetailsByEMP_ID(EMP_ID, updateOrdersGrid);\n \n } catch (e) {\n\n alert('Wrong Data Inserted');\n }\n\n}", "employeeData(state) {\n return state.employees\n }", "function populateDataTable(theData) {\n console.log(theData);\n if (!theData) {\n var promUsage = makeAjaxCall(\"/boss/vehicle/\" + vehicleId, \"GET\", null);\n var promEmp = makeAjaxCall(\"/boss/employeeProfile\", \"GET\", null);\n Promise.all([promUsage, promEmp]).then(\n function(values) {\n var usageData = values[0].monthlyIWFIAUsage;\n var empData = values[1];\n var employees = [];\n for (i in empData) {\n emp = empData[i];\n emp.displayName = emp.lastName + \", \" + emp.firstName;\n employees[emp.id] = emp;\n }\n for (i in usageData) {\n usageData[i].operator = employees[usageData[i].operator.id];\n }\n populateDataTable(usageData);\n console.log(usageData);\n },\n function(reason) {\n console.log(\"AJAX Error: \", reason);\n }\n );\n\n promUsage.then(\n function() {},\n function(a, b, c) {\n console.log(a, b, c);\n }\n );\n return \"Waiting\";\n }\n var el = $(\"#iwfia\");\n if (table) {\n table.clear();\n table.rows.add(theData);\n table.draw();\n return;\n }\n table = el.DataTable({\n data: theData,\n bProcessing: true,\n bPaginate: false,\n dom: \"Brtip\",\n order: [[0, \"desc\"]],\n columns: [\n {\n data: \"null\",\n render: function(data, type, row) {\n if (type == \"display\") {\n return (\n CustomFormFunctions.OptionSets.MONTHS[row.month] +\n \" \" +\n row.year\n );\n } else {\n var val = new Date();\n val.setFullYear(row.year);\n val.setMonth(row.month);\n return val;\n }\n }\n },\n { data: \"operator.displayName\" },\n { data: \"mileage\" },\n { data: \"gas\" },\n { data: \"oil\" },\n { data: \"jobCode.description\" },\n {\n data: null,\n orderable: false,\n render: function(data, type, row) {\n var buttonList = $(\"#templates .dropdown1\").clone();\n buttonList.find(\"a\").attr(\"data-row\", JSON.stringify(row));\n return buttonList.prop(\"outerHTML\");\n }\n }\n ],\n buttons: [\n {\n text: 'Print <i class=\"fa fa-lg fa-print\"></i>',\n extend: \"print\",\n exportOptions: {\n columns: [0, 1, 2, 3, 4, 5]\n },\n className: \"table-btns print-btn\"\n },\n {\n text: 'Export to Excel <i class=\"fa fa-lg fa-file-excel-o\"></i>',\n extend: \"excel\",\n exportOptions: {\n columns: [0, 1, 2, 3, 4, 5]\n },\n className: \"table-btns excel-btn\"\n },\n // {\n // text: 'Add <i class=\"fa fa-lg fa-plus\"></i>',\n // action: function() {\n // //$('html,body').animate({scrollTop: $(\"#iwfia\").offset().top}, 'slow');\n // $(\"#myModal_add\").modal(\"toggle\");\n // },\n // className: \"table-btns add-btn\"\n // },\n {\n text: 'Refresh <i class=\"fa fa-lg fa-repeat\"></i>',\n action: function() {\n populateDataTable();\n },\n className: \"table-btns refresh-btn\"\n }\n ]\n });\n } //end of populating the table function", "function addEmp() {\n console.log(\" -------------------------- \\n ADD A NEW COMPANY EMPLOYEE \\n --------------------------\");\n // Initial SQL query so that role and manager can be selected from a list instead of user manually entering\n connection.query(\n \"SELECT CONCAT(e.first_name, ' ', e.last_name) AS 'Employee', e.first_name, e.last_name, e.id AS 'empId', e.role_id, r.title AS 'Title', r.id AS 'Roleid' FROM employee e INNER JOIN role r ON r.id = e.role_id\",\n function (err, res) {\n if (err) throw err;\n const rolResults = [];\n const rolIdResults = [];\n const manResults = [];\n const manIdResults = [];\n for (let i = 0; i < res.length; i++) {\n // simply for CLI UI to display list of existing titles to choose role\n let rolObj = res[i].Title;\n rolResults.push(rolObj);\n // for comparing inquirer selected title string and setting corresponding role id\n let rolIdObj = {\n title: res[i].Title,\n roleid: res[i].Roleid,\n };\n rolIdResults.push(rolIdObj);\n // simply for CLI UI to display list of existing employee to choose a manager from\n let manObj = res[i].Employee;\n manResults.push(manObj);\n // for comparing inquirer selected manager name and setting corresponding manager id\n let manIdObj = {\n manid: res[i].empId,\n first: res[i].first_name,\n last: res[i].last_name,\n full: res[i].Employee,\n };\n manIdResults.push(manIdObj);\n }\n // simply to provide a final \"None\" option for the manager selection list in the CLI UI\n manResults.push(\"NONE\");\n\n // Employee Entry question prompts\n inquirer\n .prompt([\n {\n name: \"first\",\n type: \"input\",\n message: \"Enter employee's first name.\",\n },\n {\n name: \"last\",\n type: \"input\",\n message: \"Enter employee's last name.\",\n },\n {\n name: \"selectManager\",\n type: \"list\",\n message: \"Select the manager for this employee from the below.\",\n choices: manResults,\n },\n {\n name: \"selectRole\",\n type: \"list\",\n message: \"Select the role for this employee from the existing titles below.\",\n choices: rolResults,\n },\n ])\n // asynchronous handling of the provided employee information\n .then((answers) => {\n let chosenMgrId;\n let chosenRoleId;\n // Setting chosenRoleId var to role_id that matches the title the user selected in list\n for (let i = 0; i < rolIdResults.length; i++) {\n if (rolIdResults[i].title == answers.selectRole) {\n chosenRoleId = rolIdResults[i].roleid;\n }\n }\n // Setting chosenMgrId var to employee_id that matches the employee the user selected in manager list\n if (answers.selectManager !== \"NONE\") {\n for (let i = 0; i < manIdResults.length; i++) {\n if (manIdResults[i].full == answers.selectManager) {\n chosenMgrId = manIdResults[i].manid;\n }\n }\n // Setting chosenMgrId to null if selected \"NONE\" in manager list\n } else {\n chosenMgrId = null;\n }\n // INSERT SQL to add the employee\n connection.query(\n \"INSERT INTO employee SET ?\",\n [\n {\n first_name: answers.first,\n last_name: answers.last,\n role_id: chosenRoleId,\n manager_id: chosenMgrId,\n },\n ],\n function (error) {\n if (error) throw err;\n console.clear();\n console.log(\"NEW EMPLOYEE ADDED SUCCESSFULLY!\");\n actions();\n }\n );\n });\n }\n );\n}", "function addEmployees(e) {\n // Map out same data from above\n employeeData.forEach(employee => {\n tab2.insertAdjacentHTML('beforeend', `\n <ul class=\"employees-list\">\n <li class=\"employee\">\n <span class=\"employee-name\">${employee.name}</span><br><br>\n <span class=\"employee-office-num\">${employee.officeNum}</span><br><br>\n <span class=\"employee-phone-num\">${employee.phoneNum}</span>\n </li>\n </ul>\n `);\n });\n\n // Add employee info\n addBtn.addEventListener(\"click\", (e) => {\n const nameValue = document.querySelector(\".name-input\");\n const officeNumValue = document.querySelector(\".office-num-input\");\n const phoneNumValue = document.querySelector(\".phone-number-input\");\n \n addBtn.insertAdjacentHTML('afterend', `\n <ul class=\"employees-list\">\n <li class=\"employee\">\n <span class=\"employee-name\">${nameValue.value}</span><br><br>\n <span class=\"employee-office-num\">${officeNumValue.value}</span><br><br>\n <span class=\"employee-phone-num\">${phoneNumValue.value}</span>\n </li>\n </ul>\n `);\n nameValue.value = \"\";\n officeNumValue.value = \"\";\n phoneNumValue.value = \"\";\n });\n }", "function constructEmployee(reason, name, start, end, birthdate, role){\n return {\n \"Reason\": reason,\n \"Full name\": name,\n \"Shift start\": start,\n \"Shift end\": end,\n \"Birthdate\": birthdate,\n \"Role\": role,\n }\n}", "function secondaryEmployeeData() {\n inquirer.prompt([\n {\n type: \"list\",\n message: \"What is this employee's role?\",\n name: \"employeeRole\",\n choices: [\"Intern\", \"Engineer\"]\n },\n {\n type: \"input\",\n message: \"What is the employee's name?\",\n name: \"employeeName\"\n },\n {\n type: \"input\",\n message: \"What is the employee's id?\",\n name: \"employeeId\"\n },\n {\n type: \"input\",\n message: \"What is the employee's email?\",\n name: \"employeeEmail\"\n },\n {\n type: \"input\",\n message: \"What is the Engineer's Github?\",\n name: \"github\",\n when: (userInput) => userInput.employeeRole === \"Engineer\"\n },\n {\n type: \"input\",\n message: \"What is the name of the school attended by the intern?\",\n name: \"school\",\n when: (userInput) => userInput.employeeRole === \"Intern\"\n },\n {\n type: \"confirm\",\n name: \"newEmployee\",\n message: \"Would you like to add another team member?\"\n }\n ]).then(employeeAnswers => {\n if (employeeAnswers.employeeRole === \"Intern\") {\n const employee = new Intern(employeeAnswers.employeeName, employeeAnswers.employeeId, employeeAnswers.employeeEmail, employeeAnswers.school);\n teamMembers.push(employee);\n } else if (employeeAnswers.employeeRole === \"Engineer\") {\n teamMembers.push(new Engineer(employeeAnswers.employeeName, employeeAnswers.employeeId, employeeAnswers.employeeEmail, employeeAnswers.github));\n }\n if (employeeAnswers.newEmployee === true) {\n secondaryEmployeeData();\n } else {\n\n\n //Creates HTML\n let main = fs.readFileSync('./templates/main.html', 'utf8');\n main = main.replace(/{{teamTitle}}/g, teamTitle);\n\n let managerCard = fs.readFileSync('./templates/Manager.html', 'utf8');\n managerCard = managerCard.replace('{{name}}', manager.getName());\n managerCard = managerCard.replace('{{role}}', manager.getRole());\n managerCard = managerCard.replace('{{id}}', manager.getId());\n managerCard = managerCard.replace('{{email}}', manager.getEmail());\n managerCard = managerCard.replace('{{officeNumber}}', manager.getOfficeNumber());\n\n\n let cards = managerCard;\n for (let i = 0; i < teamMembers.length; i++) {\n let employee = teamMembers[i];\n cards += renderEmployee(employee);\n }\n main = main.replace('{{cards}}', cards);\n\n fs.writeFileSync('./output/team.html', main);\n }\n });\n}", "function seedJobData() {\n console.info('seeding job data');\n \n\n const seedData = [];\n\n for (let i = 1; i <= 10; i++) {\n seedData.push({\n\n job: \"Software Engineer\",\n company: \"Google\",\n stage: \"On Site\",\n status: \"Active\",\n date: \"2018-07-06T07:00:00.000Z\",\n comp: \"900K\",\n pros: \"Good Job\",\n cons: \"Hard to work up\",\n notes: \"Need to send resume\"\n });\n }\n // this will return a promise\n return Job.insertMany(seedData);\n}", "constructor(){\r\n\t\tthis.data = [];//initializing the array as blank...\r\n\t\tthis.data.push(new employee(123, \"Phaniraj\", \"Bangalore\"));\r\n\t\tthis.data.push(new employee(124, \"Mahesh\", \"Bangalore\"));\r\n\t\tthis.data.push(new employee(125, \"Gopal\", \"Mysore\"));\r\n\t\tthis.data.push(new employee(126, \"Venkatesh\", \"Chennai\"));\r\n\t}", "function empDataCollection() {\r\n client.query('SELECT * from employees', (err, res) => {\r\n\r\n if (err) {\r\n errorLog(err, 'data fetching issue', 'Pending')\r\n } else {\r\n\r\n console.log('fetching email ids')\r\n res.rows.map(item => {\r\n //email validation\r\n if (mailformat.test(item.emailid.trim())) {\r\n email.push(item.emailid)\r\n } else {\r\n let err = 'Invalid email ' + item.emailid\r\n console.log(err);\r\n errorLog(err, 'email validation', 'Pending')\r\n\r\n }\r\n })\r\n\r\n\r\n\r\n }\r\n })\r\n}", "function employeeInfo( nameIn, employeeNumberIn, annualSalaryIn, reviewRatingIn ){\n employees = {\n name: $( '#nameIn' ).val(),\n employeeNumber: $( '#employeeNumberIn' ).val(),\n annualSalary: $( '#annualSalaryIn' ).val(),\n reviewRating: $( '#reviewRatingIn' ).val()\n } // end info\n // push the employeeInfo into the array\n employees.push( employeeInfo );\n // empty inputs\n $( '#nameIn' ).val( '' );\n $( '#employeeNumberIn' ).val( '' );\n $( '#annualSalaryIn' ).val( '' );\n $( '#reviewRatingIn' ).val( '' );\n // calculate eveything\n bonusCalculator();\n // update DOM\n displayInfo();\n} // end employeeInfo", "function initData(){\n if (_users){\n return;\n }\n _users = [];\n _users['user1'] = {\n username: 'user1',\n password: 'password', \n };\n _users['user2'] = {\n username: 'user2',\n password: 'password',\n };\n}", "function viewEmployees(employee) {\n let newQuery = \"SELECT employee.first_name, employee.last_name, roles.title, roles.salary, department.dept_name AS department FROM employee LEFT JOIN roles ON employee.role_id = roles.id LEFT JOIN department ON roles.department_id = department.id\";\n\n databaseConnect.query(newQuery, (err, res) => {\n if (err) throw err;\n \n // old method of gathering employees... too much work imo\n // res.forEach((employee) => {\n // eArray.push({\n // 'id': employee.id, \n // 'first_name': employee.first_name,\n // 'last_name': employee.last_name, \n // 'title': employee.title,\n // 'department': employee.department,\n // 'salary': employee.salary,\n // 'manager': employee.manager,\n // });\n // });\n\n console.log('Here are all active Employees:');\n \n console.log('====================================================================');\n console.table(res);\n console.log('====================================================================');\n\n\n startMenu();\n }); \n}", "function populatelawyers(comp_id){\n if (comp_id==\"\"){\n jQuery('#productdiv').html(\"\");\n jQuery('#empdiv').html(\"\");\n return false\n }\n loader.prependTo(\"#empdiv\");\n jQuery.ajax({\n type: \"GET\",\n url: \"/assign_licence/\"+comp_id,\n dataType: 'script',\n data: {\n 'comp_id' : comp_id,\n 'populate' : \"employees\"\n },\n success: function(){\n loader.remove();\n }\n });\n}", "async function helperEmpManager() {\n let res = await connection.query(`SELECT CONCAT(employee.first_name,\" \" ,employee.last_name) AS fullName, employee.id FROM employee`)\n let employeName = [];\n res.forEach(emp => {\n //saving on the list of objects\n employeName.push({ name: emp.fullName, value: emp.id })\n })\n \n return employeName;\n \n }", "function populateVolunteerContainer(){\n\t\n\tvar userId = document.getElementById(\"uId\").value;\n\t\n\tif(userId){\n\t\t\n\t\t fetch(path+\"/getAllVolunteer/\" + userId, {\n\t\t\t method: \"GET\",\n\t\t\t headers: {\n\t\t\t \"Content-Type\": \"application/json\",\n\t\t\t },\n\t\t\t })\n\t\t\t .then((response) => response.json())\n\t\t\t .then((volunteers) => {\n\t\t\t \t\n\t\t\t console.log(\"Success:\", volunteers);\n\t\t\t console.log(\"data is fetched\");\n\t\t\t if (volunteers != null) {\n\t\t\t \n\t\t\t \t iteratorForVolunteer(volunteers);\n\t\t\t }\n\t\t\t \n\t\t\t })\n\t\t\t .catch((error) => {\n\t\t\t console.error(\"Error:\", error);\n\t\t\t return null;\n\t\t });\n\n\t}\n\t\n}", "function editUserField(data) {\n var employeeDetails = getStorage();\n employeeDetails.forEach(function (user, index) {\n if (user.employeeId == data) {\n employeeId.value = user.employeeId;\n firstName.value = user.firstName;\n lastName.value = user.lastName;\n address.value = user.address;\n emailId.value = user.emailId;\n updateBtn.style.display = \"block\";\n submitBtn.style.display = \"none\";\n position = index;\n }\n });\n}", "function loadData() {\n\n //Users name.\n loadName()\n\n //Users config.\n loadConfig()\n}", "function addEmployee() {\n var name = Browser.inputBox('Enter the name of the employee.');\n if(name == 'cancel') return;\n \n var ss = SpreadsheetApp.getActive();\n var s = ss.getActiveSheet();\n var set = ss.getSheetByName('Settings');\n \n // If the user is on the setting sheet just add to the end of the employee list.\n if (s.getSheetName() == 'Settings') {\n Browser.msgBox('Please go to the month you need the employee added.');\n return;\n \n // Gather the list of employees on the setting sheet (assumes there will never be more than 25 employees).\n var ls = set.getRange(2, 1, 25).getValues();\n // Loop through the employees.\n for (var i=0; i<ls.length; i++) {\n // At the end of the employees leave the list.\n if (ls[0][i] == null) {\n ls[0][i] = name;\n set.getRange(2, 1, 25).setValues(ls);\n return;\n }\n // Crete a message is there is already an employee with that name.\n if (ls[0][i] == name) {\n Browser.msgBox('There is already an employee with that name entered.');\n return;\n }\n }\n }\n \n // Get the current employee list.\n var emList = createEmployeeList('Settings');\n \n // Check if the employee is already in the list.\n for (var i=0; i<emList.length; i++) {\n // If they are stop serching and move on\n if (emList[i].name == name) {\n break;\n // If the employee was not found add their name;\n } else if (i == emList.length-1 && emList[i] != name){\n set.getRange(emList.length+2, 1).setValue(name);\n var employee = new Employee(ss, name, [false,false,false,false,false,false,false], 0);\n emList.push(employee);\n }\n }\n \n // Clear the formating for the pay periods and add a new employee\n var row = 54;\n if (s.getRange(52, 1).getValue()) row = 64;\n s.getRange(row, 1, row+emList.length+2, 7).clearFormat();\n s.getRange(row, 11, emList.length+2, 4).clearFormat();\n \n // Add a new template to the current sheet.\n ppTemplate(s.getSheetName());\n holPayTemp(s.getSheetName());\n employeeVal(s.getName());\n \n \n}", "function getEmployees() {\n\n $.get('/employees', function(employees, status) {\n console.log(\"Data: \" + employees + \"\\nStatus: \" + status);\n\n\n console.log(employees);\n $('#container').empty();\n $('#container').append('<table> <tr>' +\n '<th>ID#</th>' +\n '<th>Name</th>' +\n '<th>Job Title</th> ' +\n '<th>Monthly Salary</th>' +\n '</tr>');\n\n employees.forEach(function(employee) {\n\n $container = $('<tr></tr>');\n $container.data('id', employee.id);\n\n\n monthlySalary = parseFloat(calculateMonthlySalary(employee.annual_salary));\n totalMonthlySalary += monthlySalary;\n $container.append('<td>' + employee.id + '</td>');\n $container.append('<td>' + employee.last_name + ', ' + employee.first_name + '</td>');\n $container.append('<td>' + employee.job_title + '</td>');\n\n $container.append('<td> ' + monthlySalary + '</td>');\n $container.append('<button class=\"delete\">Inactivate</button>');\n\n $('#container').append($container);\n\n\n $('#container').append('</table>');\n $('#monthlysalarytotal').text('Monthly Salary Total: ' + totalMonthlySalary);\n\n });\n\n });\n }", "function prepareForUpdate(employeeObject) {\n $('#name').val(employeeObject.name);\n $('#position').val(employeeObject.position);\n $('#salary').val(employeeObject.salary);\n $('#submitEmployee').data(\"id\", employeeObject.id);\n updating = true;\n}", "function addEmp() {\n var empFirstName, empLastName, empRole, empManagerId\n // prompt for first and last name\n prompt([\n {\n type: 'input',\n name: 'firstName',\n message: 'First Name:',\n validate: inputStr => {\n if (inputStr) {\n // validate only letters entered\n if (/^[a-zA-Z]+$/.test(inputStr)) {\n return true;\n } else {\n console.log(`\\nEnglish letters only, please:`);\n return false;\n }\n // no inputStr \n } else return false;\n }\n },\n {\n type: 'input',\n name: 'lastName',\n message: 'Last Name:',\n validate: inputStr => {\n if (inputStr) {\n // validate only letters entered\n if (/^[a-zA-Z]+$/.test(inputStr)) {\n return true;\n } else {\n console.log(`\\nEnglish letters only, please`);\n return false;\n }\n // no inputStr \n } else return false;\n }\n },\n\n ]).then(emp => {\n // force proper noun case\n empFirstName = (\n emp.firstName.charAt(0).toUpperCase() +\n emp.firstName.slice(1).toLowerCase());\n\n empLastName = (\n emp.lastName.charAt(0).toUpperCase() +\n emp.lastName.slice(1).toLowerCase());\n\n // get roles from db for user to pick from\n db.selectAllRoles()\n //display roles and select one\n .then(([roles]) => {\n prompt([\n {\n type: \"list\",\n name: \"selectedRole\",\n message: `\\nSelect a role for ${empFirstName} ${empLastName}:`,\n choices: roles.map(r => ({ value: r.id, name: r.title }))\n }\n ])//assign the role\n .then((inqData) => {\n empRole = inqData.selectedRole;\n })\n .then(() => {\n // display employees to pick manager\n db.selectAllEmployees()\n // prompt to pick manager\n .then(([employee]) => {\n prompt([\n {\n type: \"list\",\n name: \"selectedMgr\",\n message: `\\nSelect a manager for ${empFirstName} ${empLastName}:`,\n choices: employee.map(emp => ({ value: emp.id, name: `${emp.first_name} ${emp.last_name}` }))\n }\n ])//assign manager\n .then((mgrData) => {\n empManagerId = mgrData.selectedMgr;\n // Insert Employee into Database\n db.addEmployee(empFirstName, empLastName, empRole, empManagerId)\n .then(() =>\n promptAction()\n );\n }) // manager assigned\n })//employees displayed and mgr selcted\n }) //role assigned\n })//role displayed and selected\n })//roles retrieved from db\n}", "function fillEmployeeOptions(employees) {\n\n var optionHtml = $(\"#employee-template\").html();\n var optionTemplate = Handlebars.compile(optionHtml);\n $(\"#employee-select\").empty();\n for (var i = 0; i < employees.length; i++) {\n\n var context = {\n name: employees[i]\n }\n\n var html = optionTemplate(context);\n\n\n $(\"#employee-select\").append(html);\n }\n}", "function getEmployeeInfo(role) {\n return inquirer.prompt(getPromptByRole(role))\n .then(({ name, id, email, school, github }) => {\n let emp;\n if (role === 'Intern') {\n emp = new Intern(name, id, email, school);\n } else {\n emp = new Engineer(name, id, email, github);\n }\n\n //push new employee instances to employees array\n employees.push(emp);\n\n\n })\n}", "function populateKeys(keys, employee) {\n const res = {};\n for(let i = 0; i<keys.length; i++){\n res[keys[i]] = employee[i];\n }\n return res;\n}" ]
[ "0.63280034", "0.626249", "0.62357914", "0.6178332", "0.61088705", "0.61025083", "0.6067165", "0.59434354", "0.5899673", "0.5896165", "0.58639866", "0.5827233", "0.58237845", "0.5816457", "0.58132493", "0.58091855", "0.5774632", "0.574736", "0.5734261", "0.5682039", "0.5676144", "0.56678545", "0.5655529", "0.5643862", "0.5633194", "0.56115663", "0.5608261", "0.560507", "0.55978847", "0.5596585", "0.5594091", "0.556641", "0.555871", "0.5555884", "0.55440754", "0.5540322", "0.5523891", "0.5521749", "0.55209374", "0.55045205", "0.55015415", "0.5488556", "0.54691875", "0.5452582", "0.5449166", "0.5449148", "0.5445038", "0.5438173", "0.5431416", "0.5425944", "0.5408449", "0.53991485", "0.53954536", "0.53903705", "0.5385372", "0.5384651", "0.53845173", "0.53844637", "0.53821236", "0.53727156", "0.5365315", "0.5363834", "0.5345302", "0.5344732", "0.5344177", "0.5340223", "0.5338345", "0.53325623", "0.5331183", "0.53172624", "0.5314646", "0.5314374", "0.5313478", "0.5309644", "0.53032607", "0.5291519", "0.5288476", "0.5287421", "0.5271748", "0.5268131", "0.526796", "0.52658224", "0.5262005", "0.5258031", "0.52483714", "0.5247142", "0.52440864", "0.5241276", "0.5232617", "0.52311873", "0.5229698", "0.52164495", "0.5207378", "0.52028596", "0.5191769", "0.51890284", "0.5188339", "0.51835364", "0.51817465", "0.51781535" ]
0.72014844
0
renderEmployees(): render employee data
renderEmployees() { let employees = [] for (let i = 0; i < this.state.employeeJobs.length; i++){ let job = this.state.employeeJobs[i] employees.push( <div key={job.startDate} as="li"> <Card style={{ width: '18rem' }}> <Card.Body> <Card.Title>{job.jobTitle}</Card.Title> <Card.Subtitle className="mb-2 text-muted">{job.company.name}</Card.Subtitle> <Card.Text> {job.description} </Card.Text> <Card.Text> {job.type} </Card.Text> {typeof(job.endDate) !== 'undefined' ? '' : <Button variant="danger" onClick={this.handleTerminate} value={JSON.stringify(job)}>Terminate</Button>} </Card.Body> </Card> </div> ) } return employees; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderEmployeesData () {\n fetch(\"http://localhost:3000/api/employees/getEmployee\").then(res => {\n return res.json()\n }).then(data => {\n data.map(i => {\n const html = `\n <td>${i.id}</td>\n <td>${i.name}</td>\n <td>${i.mail}</td>\n <td>${i.cin}</td>\n <td>${i.dateOfBirth}</td>\n <td>${i.registration_number}</td>\n `\n document.querySelector('#employees_data').innerHTML += html\n })\n })\n}", "function renderEmployee(employee) {\n return (\n <tr key={employee.id}>\n <td>{employee.firstName}</td>\n <td>{employee.lastName}</td>\n <td>{employee.phone}</td>\n <td>{employee.email}</td>\n <td>{employee.gender}</td>\n </tr>\n )\n }", "function render() {\n\t$(\"#content\").empty();\n\n\tfor (let i = 0; i < employeeList.length; i++) {\n\t\tlet info = employeeList[i];\n\n\t\tlet nameData = info.name;\n\t\tlet officeData = info.office;\n\t\tlet phoneData = info.phone;\n\n\t\tlet objectDiv = `<div class=\"objectDiv\"><p>Employee: ${nameData}</p><p>Office: ${officeData}</p><p>Phone Number: ${phoneData}</p></div>`\n\t\t$(\"#content\").append(objectDiv);\n\t}\n}", "function viewEmployees() {\n var query = \"SELECT CONCAT(employees.first_name, ' ', employees.last_name) as employee_name, roles.title, departments.name, employees.id FROM employees LEFT JOIN roles on employees.role_id = roles.id LEFT JOIN departments ON departments.id = roles.department_id \";\n con.query(query, function(err, res) {\n if (err) throw err;\n for (var i = 0; i < res.length; i++) {\n console.log(\"\\n\" + \"|| Employee: \" + res[i].employee_name + \"|| Title: \" + res[i].title + \"|| Department: \" + res[i].name + \"|| ID: \" + res[i].id);\n }\n runManager();\n });\n }", "function displayEmployees(personData) {\n employees = personData;\n let employeeHTML = \"\";\n employees.forEach((employee, index) => {\n let { email, location: { city, street, state, postcode}, login: {username}, name, phone, picture } = employees[index] || {};\n employeeHTML += `\n <div class=\"card\" data-index=\"${index}\">\n <img class=\"avatar\" src=\"${picture.large}\">\n <div class=\"text-container\">\n <h2 class=\"name\">${name.first} ${name.last}</h2>\n <p class=\"email\">${email}</p>\n <p class=\"address\">${city}</p>\n </div>\n </div>\n `\n });\n gridContainer.innerHTML = employeeHTML;\n}", "function renderEmployee(employee) {\n if (employee.getRole() === \"Intern\") {\n let internCard = fs.readFileSync('./templates/Intern.html', 'utf8');\n internCard = internCard.replace('{{name}}', employee.getName());\n internCard = internCard.replace('{{role}}', employee.getRole());\n internCard = internCard.replace('{{id}}', employee.getId());\n internCard = internCard.replace('{{email}}', employee.getEmail());\n internCard = internCard.replace('{{school}}', employee.getSchool());\n return internCard;\n } else if (employee.getRole() === \"Engineer\") {\n let engineerCard = fs.readFileSync('./templates/Engineer.html', 'utf8');\n engineerCard = engineerCard.replace('{{name}}', employee.getName());\n engineerCard = engineerCard.replace('{{role}}', employee.getRole());\n engineerCard = engineerCard.replace('{{id}}', employee.getId());\n engineerCard = engineerCard.replace('{{email}}', employee.getEmail());\n engineerCard = engineerCard.replace('{{github}}', employee.getGithub());\n return engineerCard;\n }\n}", "function renderAllEmployeeData(data) {\n let renderAllHTML = `<table><thead><tr><th>First Name</th><th>Last Name</th><th>Email</th><th>Birthday</th>\n <th>Hire Date</th></thead><tbody>`;\n data.forEach(function(data) {\n const tableRow = `<tr>\n <th>${data.first_name}</th>\n <th>${data.last_name}</th>\n <th>${data.email}</th>\n <th>${moment(data.birthday).format(\"MMMM Do YYYY\")}</th>\n <th>${moment(data.hire_date).format(\"MMMM Do YYYY\")}</th>`;\n\n renderAllHTML += tableRow;\n });\n\n renderAllHTML += `</tbody></table>`;\n $(\"#search-results\").append(renderAllHTML);\n }", "function renderEmployee(employee) {\n if (employee.getRole() === \"Intern\") {\n var internCard = fs.readFileSync('./src/intern.html', 'utf8');\n internCard = internCard.replace('{{ name }}', employee.getName());\n internCard = internCard.replace('{{ role }}', employee.getRole());\n internCard = internCard.replace('{{ id }}', employee.getId());\n internCard = internCard.replace('{{ email }}', employee.getEmail());\n internCard = internCard.replace('{{ address }}', employee.getEmail());\n internCard = internCard.replace('{{ school }}', employee.getSchool());\n return internCard;\n } else if (employee.getRole() === \"Engineer\") {\n var engineerCard = fs.readFileSync('./src/engineer.html', 'utf8');\n engineerCard = engineerCard.replace('{{ name }}', employee.getName());\n engineerCard = engineerCard.replace('{{ role }}', employee.getRole());\n engineerCard = engineerCard.replace('{{ id }}', employee.getId());\n engineerCard = engineerCard.replace('{{ email }}', employee.getEmail());\n engineerCard = engineerCard.replace('{{ address }}', employee.getEmail());\n engineerCard = engineerCard.replace('{{ github }}', employee.getGithub());\n engineerCard = engineerCard.replace('{{ githubID }}', employee.getGithub());\n return engineerCard;\n }\n}", "function generateEmployee(data){\n console.log(data)\n return `<div>${data.employeeCreate}</div>`\n}", "function displayEmployeesRow(member) {\n\n return `\n <!-- start employees -->\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <h2 class=\"my-4\">Team</h2>\n </div>\n ${member.employees.map(employeeTemplateRow).join(\"\")}\n \n </div>\n <!-- end employees -->\n `;\n}", "function viewEmployees() {\n connection.query(\"SELECT employee.id, employee.first_name, employee.last_name, role.title, department.name AS department, role.salary, CONCAT(manager.first_name, ' ', manager.last_name) AS Manager FROM employee LEFT JOIN employee manager on manager.id = employee.manager_id INNER JOIN role ON (role.id = employee.role_id) INNER JOIN department ON (department.id = role.department_id)\", function(err, res) {\n if(err) throw err;\n console.log(\"Employees:\")\n console.table(res)\n start();\n });\n}", "viewEmployees() {\n console.log(`\n\n * Viewing All Employees *\n `)\n connection.query(`SELECT employees.id, employees.first_name, employees.last_name, roles.title AS role, roles.salary AS salary, departments.name AS department, CONCAT(m.first_name, ' ', m.last_name) AS manager FROM employees LEFT JOIN roles ON employees.role_id = roles.id LEFT JOIN departments ON roles.department_id = departments.id LEFT JOIN employees m ON employees.manager_id = m.id;`, function(err, res) {\n if (err) throw err;\n console.table(res);\n beginAgain();\n })\n }", "function viewEmployees(employee) {\n let newQuery = \"SELECT employee.first_name, employee.last_name, roles.title, roles.salary, department.dept_name AS department FROM employee LEFT JOIN roles ON employee.role_id = roles.id LEFT JOIN department ON roles.department_id = department.id\";\n\n databaseConnect.query(newQuery, (err, res) => {\n if (err) throw err;\n \n // old method of gathering employees... too much work imo\n // res.forEach((employee) => {\n // eArray.push({\n // 'id': employee.id, \n // 'first_name': employee.first_name,\n // 'last_name': employee.last_name, \n // 'title': employee.title,\n // 'department': employee.department,\n // 'salary': employee.salary,\n // 'manager': employee.manager,\n // });\n // });\n\n console.log('Here are all active Employees:');\n \n console.log('====================================================================');\n console.table(res);\n console.log('====================================================================');\n\n\n startMenu();\n }); \n}", "function viewEmployees() {\n \n const query = `SELECT first_name, last_name, title FROM employee LEFT JOIN role ON role.id = employee.role_id`;\n\n\tconnection.query(query, function(err, res) {\n\t\tif (err) throw err;\n \n console.table(res);\n\n\t\tstart();\n\t});\n}", "function viewEmployees() {\n connection.query(\n \"SELECT employee.id, first_name, last_name, roles.title, department.name AS department, roles.salary FROM employee INNER JOIN roles ON employee.role_id = roles.role_id INNER JOIN department ON roles.department_id = department.department_id\",\n (err, results) => {\n if (err) throw err;\n console.log(\"\\n\");\n console.table(results);\n console.log(\"===============================\");\n console.log(\"\\n \\n \\n \\n \\n \\n \\n\");\n }\n );\n // RETURN TO MAIN LIST\n runTracker();\n}", "function renderEmployeeCard(employee) {\n if (employee.getRole() === \"Engineer\") {\n let engineerCard = fs.readFileSync(\"./templates/engineer.html\", \"utf8\");\n engineerCard = engineerCard.replace(\"{{name}}\", employee.getName());\n engineerCard = engineerCard.replace(\"{{role}}\", employee.getRole());\n engineerCard = engineerCard.replace(\"{{id}}\", employee.getId());\n engineerCard = engineerCard.replace(/{{email}}/g, employee.getEmail());\n engineerCard = engineerCard.replace(/{{github}}/g, employee.getGithub());\n return engineerCard;\n } else if (employee.getRole() === \"Intern\") {\n let internCard = fs.readFileSync(\"./templates/intern.html\", \"utf8\");\n internCard = internCard.replace(\"{{name}}\", employee.getName());\n internCard = internCard.replace(\"{{role}}\", employee.getRole());\n internCard = internCard.replace(\"{{id}}\", employee.getId());\n internCard = internCard.replace(/{{email}}/g, employee.getEmail());\n internCard = internCard.replace(\"{{school}}\", employee.getSchool());\n return internCard;\n }\n}", "viewAllEmployees() {\n\t\treturn this.connection.query(\n\t\t\t`\n SELECT\n e1.id AS ID,\n e1.first_name AS First_Name,\n e1.last_name AS Last_Name,\n role.title AS Role,\n department.name AS Department,\n CONCAT(e2.first_name, ' ', e2.last_name) AS Manager,\n role.salary AS Salary\n FROM\n employee e1\n LEFT JOIN\n role ON e1.role_id = role.id\n LEFT JOIN\n employee e2 ON e1.manager_id = e2.id\n\t\t LEFT JOIN department ON role.department_id = department.id\n\t\t ORDER BY\n e1.id;\n `\n\t\t);\n }", "function viewEmployees() {\n connection.query(\"SELECT * FROM employee\", function(error, results) {\n if (error) throw error;\n\n // This shows the results in a nice table in the CLI\n console.table(results);\n\n // Goes back to the main menu.\n start();\n })\n}", "render() {\n\n const employees = this.state.searchedEmployees || this.state.employees;\n\n return (\n <Container>\n <Header />\n <SearchName\n handleInputChange={this.handleInputChange}\n />\n <EmployeeTable>\n {employees.map(employee => (\n <EmployeeData \n key={employee.id.value}\n image={employee.picture.large}\n id={employee.id.value}\n name={employee.name}\n phone={employee.phone}\n email={employee.email}\n />\n ))}\n </EmployeeTable>\n </Container>\n );\n }", "function viewAllEmployees() {\n const sql = `\n SELECT \n employee.id AS ID,\n employee.first_name AS FirstName, \n employee.last_name AS LastName, \n role.title AS Title, \n role.salary AS Salary, \n department.name AS Department, \n CONCAT(manager.first_name, \" \", manager.last_name) AS Manager\n FROM employee\n LEFT JOIN role \n ON employee.role_id = role.id\n LEFT JOIN department \n ON role.department_id = department.id\n LEFT JOIN employee AS manager\n ON employee.manager_id = manager.id\n ORDER BY employee.id;`\n db.query(sql, (err, response) => {\n if (err) {\n throw(err);\n return;\n }\n console.log(``);\n console.log(chalk.white.bold(`============================================================================================================`));\n console.log(` ` +chalk.white.bold(` Employees `));\n console.log(chalk.white.bold(`============================================================================================================`));\n console.table(response);\n console.log(chalk.white.bold(`============================================================================================================`));\n });\n init();\n}", "function displayAllEmployees() {\n return connection.query(viewCommand);\n}", "displayData(data) {\n\t\tlet displayCard = \"\";\n\t\tdata.forEach((employee) => {\n\t\t\tdisplayCard += `\n <div class=\"card border-primary mb-3\" style=\"min-width: 20rem;\">\n <div class=\"card-body\" data-id=${employee.id}>\n <h4 class=\"card-title\"><span>${employee.name}</span></h4>\n <ul class=\"card-text\">\n <li>Position: <span>${employee.position}</span></li>\n <li >Salary: <span>${employee.salary}</span></li>\n <li >Age: <span>${employee.age}</span></li>\n <li >ID: <span>${employee.id}</span></li>\n </ul>\n <button class=\"btn btn-primary btn submit deleteBtn\">Delete</button>\n <button class=\"btn btn-primary btn submit editBtn\">Edit</button>\n </div> \n </div>`;\n\t\t});\n\t\temployeeCard.innerHTML = displayCard;\n\t}", "function viewEmployees(){\n // Select all data from the departmenets table\n connection.query(`SELECT * FROM employee_table`, (err, res) => {\n // If error log error\n if (err) throw err;\n // Display the data in a table format...\n console.table(res);\n // Run the task completed function\n taskComplete();\n })\n }", "function EmployeeList(props) {\n return (\n <div>\n <table>\n <thead>\n <tr>\n <th>First</th>\n <th>Last</th>\n <th>Username</th>\n <th>Email</th>\n <th>Country</th>\n </tr>\n </thead>\n <tbody>\n {props.employees.length &&\n props.employees.map((employee) => {\n return (\n <tr>\n <td>{employee.name.first}</td>\n <td>{employee.name.last}</td>\n <td>{employee.login.username}</td>\n <td>{employee.email}</td>\n <td>{employee.location.country}</td>\n </tr>\n );\n })}\n </tbody>\n </table>\n </div>\n );\n}", "function viewEmployees() {\n const query = 'SELECT employee.id, employee.first_name, employee.last_name, roletable.title, department.name AS department, roletable.salary, CONCAT(manager.first_name, \" \", manager.last_name) AS manager FROM employee LEFT JOIN roletable on employee.role_id = roletable.id LEFT JOIN department on roletable.department_id = department.id LEFT JOIN employee manager on manager.id = employee.manager_id';\n connection.query(query, (err, res) => {\n if (err) throw err;\n createTable(res);\n });\n}", "function render() {\n $('.js-employeeInfoDisplay').empty();\n findTotal();\n\n for (let i = 0; i < employeeInfo.length; i++) {\n const employee = employeeInfo[i];\n\n $('.js-employeeInfoDisplay').append(`\n \n <tr data-id=\"${i}\">\n <td>${employee.firstName}</td>\n <td>${employee.lastName}</td>\n <td>${employee.idNumber}</td>\n <td>${employee.jobTitle}</td>\n <td>${employee.annualSalary}</td>\n <td>${employee.monthlySalary.toFixed(2)}</td>\n <td><button class =\"js-button-bye\">delete</button></td>\n </tr>\n `);\n}\n\n $('#monthly-total').text(`Monthly Salary Total : $${monthlyTotal.toFixed(2)}`);\n}", "function viewAllEmployees() {\n connection.query(\n 'SELECT e.id, e.first_name AS First_Name, e.last_name AS Last_Name, title AS Title, salary AS Salary, name AS Department, CONCAT(m.first_name, \" \", m.last_name) AS Manager FROM employee e LEFT JOIN employee m ON e.manager_id = m.id INNER JOIN role r ON e.role_id = r.id INNER JOIN department d ON r.department_id = d.id',\n function (err, res) {\n if (err) throw err;\n console.table(\"All Employees:\", res);\n init();\n }\n );\n}", "function viewEmployee() {\n\n var query =\n `SELECT e.id, e.first_name, e.last_name, r.title, d.name AS department, r.salary, CONCAT(m.first_name, ' ', m.last_name) AS manager\n FROM employee e\n LEFT JOIN roles r\n ON e.roles_id = r.id\n LEFT JOIN department d\n ON d.id = r.department_id\n LEFT JOIN employee m\n ON m.id = e.manager_id`\n \n connection.query(query, function (err, res) {\n if (err) throw err;\n \n console.table(res); \n init(); \n \n });\n }", "function viewEmployees() {\n connection.query(\"SELECT * FROM employee\", function (err, res) {\n if (err) throw err;\n console.log(\"\\n\" + res.length + \" employees found!\\n\" + \"______________________________________________________________________\\n\");\n for (var i = 0; i < res.length; i++) {\n console.log(\n \"|| \" +\n res[i].id +\n \" ||\\t\" +\n res[i].first_name + \" \" + res[i].second_name +\n \" \\t Role ID: \" +\n res[i].role_id +\n \" \\t Manager ID: \" +\n res[i].manager_id + \"\\n\" + \"______________________________________________________________________\\n\"\n );\n }\n start();\n });\n}", "function showEmployees() {\n console.log(employees)\n}", "async function viewAllEmployees () {\n // found information on self joins https://stackoverflow.com/questions/7451761/how-to-get-the-employees-with-their-managers\n const sql = 'SELECT e.id, e.first_name, e.last_name, role.title, department.name, role.salary, CONCAT(m.first_name,\\' \\', m.last_name) AS manager FROM employee e LEFT JOIN employee m ON e.manager_id = m.id LEFT JOIN role ON e.role_id = role.id LEFT JOIN department ON role.department_id = department.id';\n connection.promise().query(sql, (err, row) => {\n if (err) {\n console.log(`Error: ${err}`);\n return;\n }\n console.table(row);\n startingPrompt();\n return;\n });\n}", "function viewEmployees() {\n console.log('~~~~~~~~~~ All Employees ~~~~~~~~~~')\n const query = `SELECT employees.id, employees.first_name as 'first name', employees.last_name as 'last name', \n roles.title, departments.name as department, roles.salary, \n concat(m.first_name, ' ', m.last_name) as manager \n FROM employees \n INNER JOIN roles ON employees.role_id = roles.id\n INNER JOIN departments ON roles.department_id = departments.id \n LEFT JOIN employees m ON m.id = employees.manager_id`;\n\n db.promise().query(query)\n .then((results) => {\n console.table(results[0])\n })\n .catch('error getting the rows')\n .then(() => {\n menu();\n })\n}", "function viewAllEmployees() {\n db.query(employeeQuery, function (err, res) {\n if (err) throw err;\n console.log(\n \"---------------------------------------------------------------------------------------------------------------------------------------\"\n );\n console.table(res);\n console.log(\n \"---------------------------------------------------------------------------------------------------------------------------------------\"\n );\n start();\n });\n}", "function displayEmployees(){\r\n let employeesDispCont = employeesList.map((employee)=>`<li>${employee.name}(${employee.active?'Y':'N'})-${employee.email}</li>`);\r\n console.log(employeesDispCont);\r\n let element = document.getElementById('employeeList');\r\n let innerHTML = \"\";\r\n for(let index = 0; index<employeesDispCont.length; index++){\r\n innerHTML = innerHTML.concat(employeesDispCont[index]);\r\n }\r\n element.innerHTML = innerHTML;\r\n}", "function viewEmployees() {\n connection.query(\"SELECT * FROM employee\", function(err, results) {\n if (err) throw err;\n // show results in table format\n console.table(results);\n // console.log(results);\n // re-prompt the user for further actions by calling \"start\" function\n start();\n });\n}", "function getEmployees(){\n fetch('http://localhost:8080/ERS/employees')\n .then(res => res.json())\n .then(data => {\n employees = data;\n console.log(\"接收到所有的员工数据\" + employees);\n appendEmployeesToTable(employees);\n });\n}", "viewEmployeesByDepartment() {\n\t\treturn this.connection.query(\n `\n SELECT\n e1.id AS ID,\n e1.first_name AS First_Name,\n e1.last_name AS Last_Name,\n role.title AS Role,\n department.name AS Department,\n CONCAT(e2.first_name, ' ', e2.last_name) AS Manager,\n role.salary AS Salary\n FROM\n employee e1\n LEFT JOIN\n role ON e1.role_id = role.id\n LEFT JOIN\n employee e2 ON e1.manager_id = e2.id\n LEFT JOIN department ON role.department_id = department.id\n ORDER BY\n department.name;\n ` \n\t\t);\n\t}", "displayEmployees() {\n let employeeHTML = \" \";\n console.log(this.filteredEmployees);\n this.filteredEmployees.forEach((employee, index) => {\n let name = employee.name;\n let email = employee.email;\n let city = employee.location.city;\n let picture = employee.picture;\n employeeHTML += `\n <section class=\"card\" data-index=\"${index}\">\n <img class=\"avatar\" src=\"${picture.large}\" />\n <div class=\"text-container\">\n <h2 class=\"name\">${name.first} ${name.last}</h2>\n <p class=\"email\">${email}</p>\n <p class=\"address\">${city}</p>\n </div>\n </section>\n `;\n });\n this.gridContainer.innerHTML = employeeHTML;\n }", "function getAllEmployees(){\n\t\t\t$.ajax({\n\t\turl:'http://localhost:8181/api/v1/employee/',\n\t\ttype:'GET',\n\t\tcrossOrigin: true,\n\t\tcontentType : 'application/json',\n\t\tsuccess : function(data){\n\t\t\tvar response = data.employees;\n\t\t\tif(data.status == 200)\n\t\t\t\t$(\"#employeeDetails\").empty();\n\t\t\t$.each(response, function(i, data){\n \t\t$(\"#employeeDetails\")\n \t\t.append(\"<tr><td>\" + data.id + \"</td><td>\" + data.name + \"</td><td>\"+data.email+\"</td><td>\"+data.salary+\"<td></tr>\");\n})\n\t\t},\n\t\terror : function(error){\n\t\t\tconsole.log(error)\n\t\t}\n\t})\n\t}", "function viewEmployees() {\n db.query('SELECT * FROM employee', function (err, results) {\n console.table(results);\n goPrompt();\n });\n}", "function viewEmployees() {\n let query = \n \"SELECT employee.id, employee.first_name, employee.last_name, person_role.title, person_role.salary, department.dept_name, CONCAT(e.first_name, ' ' ,e.last_name) AS Manager FROM employee INNER JOIN person_role on person_role.id = employee.role_id INNER JOIN department on department.id = person_role.department_id left join employee e on employee.manager_id = e.id;\";\n return connection.query(query, function (err, res) {\n if (err) throw err;\n console.table(res);\n start();\n });\n}", "function viewEmployees() {\n connection.query(\"SELECT first_name, last_name, title, salary, manager_id FROM employee JOIN role ON employee.role_id = role.id\", (err, result) => {\n if (err) {\n throw err;\n } else {\n console.table(result);\n beginApp();\n }\n });\n}", "viewEmployeesByDepartment() {\n console.log(`\n\n * Viewing All Employees by Department *\n `)\n connection.query(`SELECT employees.id, employees.first_name, employees.last_name, roles.title AS role, departments.name AS department FROM employees LEFT JOIN roles ON employees.role_id = roles.id LEFT JOIN departments ON roles.department_id = departments.id ORDER BY department DESC;`, function(err, res) {\n if (err) throw err;\n console.table(res);\n beginAgain();\n })\n }", "function makeEmployeesHTML(results) {\n\t\tupdateEmployeeFilter();\n\t\tlet html = [];\n\t\tresults.forEach( (employee, i) => {\n\t\t\tconst employeeHtml = makeContactHTML(employee, i);\n\t\t\tif (employee.filteredFor === true) {\n\t\t\t\thtml.push(employeeHtml);\n\t\t\t}\n\t\t});\n\t\treturn html.join('')\n\t}", "viewAllEmployee() {\n\t\tconst query = `\n\t\tSELECT \n\t\tS2.id, S2.first_name, S2.last_name,\n\t\tstaffrole.title,staffrole.salary,\t\n\t\tdepartment.name as department,\n\t\t(CONCAT(s1.first_name, ' ', s1.last_name)) AS manager\n\t\tFROM employee As S1\n\t\tRight JOIN employee as S2 on (S1.id = S2.manager_id)\n\t\tLEFT JOIN staffrole on (S2.role_id = staffrole.id)\n\t\tLEFT JOIN department on (staffrole.department_id = department.id);\n\t\t`;\n\t\treturn this.connection.query(query);\n\t}", "function writeEmployees(array) { \n return array.map(object=>{\n const {name, id, email, role, officeNumber, github, school} = object\n\n // roleTag is icon for employee\n let roleInfo\n let icon\n switch (role) {\n case `Manager`:\n roleInfo = `<li>Office Number:<br> ${officeNumber}</li>`\n icon = `<i class=\"fas fa-user-tie\"></i>`\n break\n case `Engineer`:\n roleInfo = `<li>Github:<br> <a href=\"https://github.com/${github}\" target=\"_blank\">${github}</a></li>`\n icon = `<i class=\"fas fa-wrench\"></i>`\n break\n case `Intern`:\n roleInfo = `<li>School:<br> ${school}</li>`\n icon = `<i class=\"fas fa-users\"></i>`\n break\n }\n return `\n <div class=\"employee\">\n <div class=\"title\">\n <h2>${name}</h2>\n <p>${role}${icon}</p>\n </div>\n <div class=\"info\">\n <ul>\n <li>ID: ${id}</li>\n <li>Email:<br> <a href=\"mailto:${email}\" target=\"_blank\">${email}</a></li>\n ${roleInfo}\n </ul>\n </div>\n </div>\n ` \n }).join('')\n}", "function viewAllEmployees() {\n //THEN I am presented with a formatted table showing employee data, including employee ids, first names, last names, job titles, departments, salaries, and managers that the employees report to\n // employee.role_id = role.id: checking if the employee.role_id matches the role.id\n // Combine the SELECT and FROM into one string and add that to the query const variable \n // LEFT JOIN add its to the left\n\n const query = `SELECT employee.id, employee.first_name, employee.last_name, role.salary, role.title, department.name AS department, CONCAT(manager.first_name,\" \", manager.last_name) AS manager\n \n FROM employee\n\n LEFT JOIN role ON employee.role_id = role.id\n LEFT JOIN department ON role.department_id = department.id\n LEFT JOIN employee manager ON manager.id = employee.manager_id;\n `\n\n connection.query(query, (err, res) => {\n if (err) throw err;\n console.log(res);\n console.table(res);\n options();\n })\n}", "function displayEmployeesTable(employeesArray) {\n \t\n \tvar employeesTableBody = document.getElementById(\"employees-table-body\");\n \t//clear table body\n \temployeesTableBody.innerHTML=\"\";\n \t\n \t//Create table row and append to body\n \temployeesArray.forEach(function(employeeObject){\n\t var tr = document.createElement('tr');\n tr.appendChild( document.createElement('td') );\n tr.appendChild( document.createElement('td') );\n tr.appendChild( document.createElement('td') );\n tr.appendChild( document.createElement('td') );\n\n tr.cells[0].appendChild( document.createTextNode(employeeObject.id) )\n tr.cells[1].appendChild( document.createTextNode(employeeObject.firstName+\" \"+employeeObject.lastName) );\n tr.cells[2].appendChild( document.createTextNode(employeeObject.address)); \t\t\n tr.cells[3].appendChild( document.createTextNode(employeeObject.country.name)); \t\t\n employeesTableBody.appendChild(tr);\n \t});\n\n }", "function createEmployeeCard(data) {\n var employee = data.results;\n var employeeCard = '';\n for (i=0; i < employee.length; i++) {\n employeeCard += `<div class=\"employee-card\" data-employee=\"${i}\">`;\n employeeCard += `<div class=\"img-container\">`;\n employeeCard += `<img src=\"${employee[i].picture.large}\" class=\"avatar\" alt=\"employee picture\">`;\n employeeCard += `</div>`;\n employeeCard += `<div class=\"text-container\">`;\n employeeCard += `<p class=\"employee-name\">${employee[i].name.first} ${employee[i].name.last}</p>`;\n employeeCard += `<p class=\"text-description\">${employee[i].email}</p>`;\n employeeCard += `<p class=\"text-description capitalize\">${employee[i].location.city}</p>`;\n employeeCard += `</div>`;\n employeeCard += `</div>`;\n }\n employeeList.innerHTML = employeeCard;\n}", "function showEmployees() {\n //query consult select\n connection.query(`SELECT employee.id, employee.first_name,employee.last_name,role.title AS job_title,role.salary,\n CONCAT(manager.first_name ,\" \", manager.last_name) AS Manager FROM employee LEFT JOIN role ON employee.role_id=role.id LEFT JOIN employee manager ON manager.id = employee.manager_id`, (err, res) => {\n \n \n if (err) throw err;\n \n if (res.length > 0) {\n console.log('\\n')\n console.log('** Employees **')\n console.log('\\n')\n console.table(res);\n }\n //calls the menu to display the question again\n menu();\n });\n \n }", "getAllEmployees(req, res) {\n res.json(empArray);\n }", "function getEmployees() {\n\t\t\temployeeService.getEmployees().then(function(data) {\n\t\t\t\tvm.employees = data;\n\t\t\t});\n\t\t}", "function employeeView() {\n let query = \"SELECT * FROM employee\";\n connection.query(query, function(err, res) {\n if (err) throw err;\n console.table(res);\n // result is then shown in the console.table\n runMenu();\n });\n}", "viewEmployees() {\n return connection.query(`SELECT * from employee`)\n }", "function loadEmployees() {\n const xhr = new XMLHttpRequest();\n\n // open connection\n xhr.open('GET', 'employees.json', true);\n\n xhr.onreadystatechange = function () {\n if (this.status === 200 && this.readyState === 4) {\n\n const employees = JSON.parse(this.responseText);\n\n let outPut = ``;\n employees.forEach(function (employee) {\n outPut += `\n <ul>\n <li>ID: ${employee.id}</li>\n <li>Name: ${employee.name}</li>\n <li>Company: ${employee.company}</li>\n <li>Job: ${employee.job}</li> \n </ul>\n `;\n\n });\n\n\n document.getElementById('employees').innerHTML = outPut;\n }\n }\n\n xhr.send();\n}", "function viewAllEmployees() {\n connection.query(\n `SELECT e.id, e.first_name, e.last_name, r.title, d.department, r.salary, concat(m.first_name, ' ', m.last_name) AS manager \n FROM employee_tracker_db.employee AS e \n\t\tLEFT JOIN employee_tracker_db.employee AS m ON e.manager_id = m.id \n JOIN employee_tracker_db.role AS r ON e.role_id = r.id\n JOIN employee_tracker_db.department AS d ON r.department_id = d.id;`,\n function(err, res) {\n if (err) throw err;\n console.log(\"\\n\");\n //console.table makes the table in the command line and allEmployees is the array at the top of the page \n console.table(res);\n //go back to inital\n initialQuestion();\n });\n}", "getEmployees(){\r\n\t\tvar that = this;\r\n\t\t$.ajax({\r\n\t\t method: \"POST\",\r\n\t\t url: \"/ajaxgetemployees\",\r\n\t\t data: { OrderID: that.orderId }\r\n\t\t})\r\n\t\t.done(function( resp ) {\r\n\t\t\tthat.Employees = resp;\r\n\t\t\t\r\n\t\t\tconsole.log(resp);\r\n\t\t\t\r\n\t\t\tthat.setupEmployeesInListbox();\r\n\t\t\t//setup the order_details rows\r\n\t\t\t//First: read all of the products rows into an array called that.ProductsData\r\n\t\t\t//getProductsArr() calls createOrderDetailsRows()\r\n\t\t\treturn that.getProductsArr();\r\n\t\t\t\t\t\r\n\t\t})\r\n\t\t.fail(function(){\r\n\t\t\talert(\"Ajax Failed in getEmployees()\");\r\n\t\t});\r\n\t}", "function show(data) {\r\n let tab = \r\n `<tr>\r\n <th>ID</th>\r\n <th>NAME</th>\r\n </tr>`;\r\n \r\n // Loop to access all rows \r\n for (let r of data) {\r\n tab += `<tr> \r\n <td>${r.id} </td>\r\n <td>${r.name}</td>\r\n \r\n</tr>`;\r\n }\r\n // Setting innerHTML as tab variable\r\n document.getElementById(\"employees\").innerHTML = tab;\r\n}", "function displayAllEmployees() {\n let query = \"SELECT * FROM employee \";\n connection.query(query, (err, res) => {\n if (err) throw err;\n\n console.log(\"\\n\\n ** Full Employee list ** \\n\");\n console.table(res);\n });\n}", "function viewEmployees() {\r\n connection.query(\"SELECT employee.first_name, employee.last_name, role.title, role.salary, department.name, CONCAT(e.first_name, ' ' ,e.last_name) AS Manager FROM employee INNER JOIN role on role.id = employee.role_id INNER JOIN department on department.id = role.department_id left join employee e on employee.manager_id = e.id;\", \r\n function(err, res) {\r\n if (err) throw err\r\n console.table(res)\r\n questions();\r\n })\r\n}", "function viewEmployees() {\n connection.query(\"SELECT * FROM employees\", function (err, res) {\n if (err) throw err;\n for (var i = 0; i < res.length; i++) {\n console.log(res[i].id + \" | \" + res[i].first_name + \" | \" + res[i].last_name + \" | \" + res[i].role_id);\n }\n console.log(\"-----------------------------------\");\n start();\n })\n}", "function pushAnswersToRender(employees) {\ntry {\n fs.writeFileSync('index.html', generateFile(employees));\n console.log('Success! Your team profiles page has been created!');\n //console.log(employees);\n } catch (error) {\n console.log(error);\n };\n}", "function viewAllEmployees() {\n console.log(\"Showing all employees...\\n\");\n connection.query(\"SELECT * FROM employee \", function (err, res) {\n if (err) throw err;\n for (var i = 0; i < res.length; i++) {\n console.log(res[i].id + \" | \" + res[i].first_name + \" | \" + res[i].last_name);\n }\n console.log(\"----------------\");\n })\n connection.end();\n}", "function employeeTemplateRow(employee) {\n\n\n return `\n <!-- start employee -->\n <div class=\"col-lg-4 col-sm-6 text-center mb-4\"> \n <img class=\"rounded-circle img-fluid d-block mx-auto\" src=\"${employee.profilbilde}\" onerror=\"this.onerror=null;this.src='${avatarImageDefaut}';\" >\n <h3>${employee.fornavn} ${employee.etternavn}\n <small>${employee.tittel}</small>\n </h3>\n <div>\n <small class=\"text-muted\">\n <i class=\"icon-envelope\"></i>  ${employee.epost}\n </small>\n <small class=\"text-muted mr-3\">\n <i class=\"icon-screen-smartphone\"></i> <a href=\"tel:${employee.mobil}\"> ${employee.mobil}\n </small>\n </div>\n\n \n <a href=\"${employee.linkedin}\" target=\"_blank\">\n <small class=\"text-muted mr-3\">\n <i class=\"icon-social-linkedin\"></i>\n </small>\n </a>\n\n <a href=\"${employee.twitter}\" target=\"_blank\">\n <small class=\"text-muted\">\n <i class=\"icon-social-twitter\"></i>\n </small>\n </a> \n </div>\n <!-- end employee -->\n `;\n\n\n}", "function displayEmployeePageData(tablesInput) {\r\n // Set global variables\r\n\r\n departments = tablesInput['departments'];\r\n departments.forEach(function(department) {\r\n\r\n departmentLocation[department['id']] = department['location'];\r\n departmentLocationId[department['id']] = department['locationID'];\r\n\r\n if (department['managerFirstName'] == null || department['managerLastName'] == null) {\r\n departmentManager[department['id']] = \"No manager\";\r\n departmentManagerId[department['id']] = null;\r\n } else {\r\n departmentManager[department['id']] = department['managerFirstName'] + ' ' + department['managerLastName'];\r\n departmentManagerId[department['id']] = department['departmentManager'];\r\n }\r\n });\r\n // console.log(departmentLocation)\r\n locations = tablesInput['locations'];\r\n locations.forEach(function(location) {\r\n if (location['managerFirstName'] == null || location['managerLastName'] == null) {\r\n locationManager[location['id']] = \"No manager\";\r\n } else {\r\n locationManager[location['id']] = location['managerFirstName'] + ' ' + location['managerLastName'];\r\n }\r\n });\r\n // console.log(locations)\r\n\r\n statuses = tablesInput['status']\r\n\r\n employees = tablesInput['employees'];\r\n displayAllEmployees(employees)\r\n\r\n}", "function viewAllEmployees(promptUser) {\n connection.query(`SELECT emp.id, emp.first_name, emp.last_name, role.title, department.name AS department, role.salary, concat(mng.first_name,' ',mng.last_name) as manager FROM employee emp LEFT JOIN role ON emp.role_id = role.id LEFT JOIN department ON role.department_id = department.id\n LEFT JOIN employee mng ON emp.manager_id = mng.id ORDER BY emp.id`, function (err, data) {\n if (err) throw err;\n console.table(\"\\n\",data);\n promptUser();\n })\n}", "function viewAllEmployees() {\n const query = \"SELECT employee.id, employee.first_name, employee.last_name, role.title, department.department_name AS department, role.salary FROM employee LEFT JOIN role ON employee.role_id = role.id LEFT JOIN department on role.department_id = department.id\";\n db.query(query, function (err, res) {\n console.table(res);\n startTracker();\n });\n}", "function loadEmployees() {\n API.getEmployees()\n .then(result => {\n // testing and checking what is sent from Sequelize\n console.log(result.data);\n setData(result.data);\n })\n .catch(err => console.log(err));\n }", "function getEmployees() {\n $.ajax({\n type: 'GET',\n url: '/employees',\n success: function(response) {\n console.log(\"Got from server:\", response);\n appendDom(response);\n }\n });\n}", "viewAllEmployees() {\n return `SELECT employee.id, employee.first_name, employee.last_name, role.title, dept.name AS department, \n role.salary, CONCAT(manager.first_name, ' ', manager.last_name) AS manager FROM employee \n LEFT JOIN role on employee.role_id = role.id \n LEFT JOIN department dept on role.department_id = dept.id \n LEFT JOIN employee manager on manager.id = employee.manager_id`;\n}", "displayEmployeeDirectory() {\n let key = 0;\n\n this.employees.forEach(employee => {\n const employeeFullName = `${this.formatName(employee.name.first)} ${this.formatName(employee.name.last)}`;\n const employeeCity = `${this.formatName(employee.location.city)}`;\n\n let employeeHTML = `\n <div class=\"employee\" data-index=${key}>\n <img src=${employee.picture.medium} alt=\"image of ${employee.name.first}\" />\n\n <div class=\"flex\">\n <p>${employeeFullName}</p>\n <p>${employee.email}</p>\n <p>${employeeCity}</p>\n </div>\n </div>`\n\n document.querySelector('.employee-container').innerHTML += employeeHTML;\n key += 1;\n });\n this.handleEmployeeClick();\n }", "function renderEmployeeList(rows) {\r\n\t\temployeeList\r\n\t\t\t.children()\r\n\t\t\t.not(\":last\")\r\n\t\t\t.remove();\r\n\t\temployeeContainer.children(\".alert\").remove();\r\n\t\tif (rows.length) {\r\n\t\t\temployeeList.prepend(rows);\r\n\t\t} else {\r\n\t\t\trenderEmpty();\r\n\t\t}\r\n\t}", "function viewEmployees() {\n connection.query(\"SELECT first_name, last_name, department.name, role.title, role.salary FROM ((employee INNER JOIN role ON role_id = role.id) INNER JOIN department ON department_id = department.id);\", function (err, res) {\n if (err) throw err;\n console.log(\"\\n All employees retrieved from database. \\n\");\n console.table(res);\n askQuestions();\n });\n}", "function viewAllEmployees() {\n connection.query(\"SELECT * FROM employee\", function (err, results) {\n if (err) throw err;\n console.log(\"----------------------------------------------------------------------\")\n console.table(results)\n userInput()\n });\n}", "function getEmployees() {\n\n $.get('/employees', function(employees, status) {\n console.log(\"Data: \" + employees + \"\\nStatus: \" + status);\n\n\n console.log(employees);\n $('#container').empty();\n $('#container').append('<table> <tr>' +\n '<th>ID#</th>' +\n '<th>Name</th>' +\n '<th>Job Title</th> ' +\n '<th>Monthly Salary</th>' +\n '</tr>');\n\n employees.forEach(function(employee) {\n\n $container = $('<tr></tr>');\n $container.data('id', employee.id);\n\n\n monthlySalary = parseFloat(calculateMonthlySalary(employee.annual_salary));\n totalMonthlySalary += monthlySalary;\n $container.append('<td>' + employee.id + '</td>');\n $container.append('<td>' + employee.last_name + ', ' + employee.first_name + '</td>');\n $container.append('<td>' + employee.job_title + '</td>');\n\n $container.append('<td> ' + monthlySalary + '</td>');\n $container.append('<button class=\"delete\">Inactivate</button>');\n\n $('#container').append($container);\n\n\n $('#container').append('</table>');\n $('#monthlysalarytotal').text('Monthly Salary Total: ' + totalMonthlySalary);\n\n });\n\n });\n }", "renderTableData() {\n return this.props.employees.map((employee, index) => {\n const { name, email, phone, department, manager, eid } = employee //destructuring\n return (\n <tr className=\"employee\" >\n <td className=\"employee\">{eid}</td>\n <td className=\"employee\">{name}</td>\n <td className=\"employee\">{email}</td>\n <td className=\"employee\">{phone}</td>\n <td className=\"employee\">{department}</td>\n <td className=\"employee\">{manager}</td>\n </tr>\n )\n })\n }", "async function viewEmployees() {\n const employeeList = await db.obtainAllEmployees();\n\n console.log(`\\nTASK: VIEW ALL EMPLOYEES\\n`);\n console.table(employeeList);\n\n displayMenus();\n}", "function loadEmployeeList() {\n\tlet xhr = new XMLHttpRequest();\n\txhr.onreadystatechange = function() {\n\t\t// define functionality for response\n\t\tif (xhr.readyState == 4) {\n\t\t\t// check response status\n\t\t\tswitch (xhr.status) {\n\t\t\tcase (200):\n\t\t\t\tlet myArr = JSON.parse(xhr.responseText);\n\n\t\t\t\tfor ( let idx in myArr) {\n\t\t\t\t\t// to add to the DataTable's framework\n\t\t\t\t\tcheckEmpTable();\n\t\t\t\t\tempTable.row.add( [myArr[idx].employee_id,\n\t\t\t\t\t\tmyArr[idx].last_name,\n\t\t\t\t\t\tmyArr[idx].first_name,\n\t\t\t\t \tmyArr[idx].user_name,\n\t\t\t\t \tmyArr[idx].password,\n\t\t\t\t \tmyArr[idx].email,\n\t\t\t\t \tmyArr[idx].role.name, \n\t\t\t\t \tmyArr[idx].role.role_id\n\t\t\t\t ] ).draw();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase (403):\n\t\t\t\tbreak;\n\t\t\tcase (500):\n\t\t\t\tconsole.log('server error');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n \n xhr.open(\"GET\", 'employee');\n xhr.send();\t\n}", "function showEmployees() {\n var table = document.getElementById('employee_table');\n var header = table.firstElementChild.firstElementChild;\n var rows = [header.innerHTML].concat(employeeData.map(function (emp) {\n return emp.reduce(function (row, col, index) {\n if (!index)\n row.push(`<tr id = ${col}>`);\n else\n row.push(`<td> ${col || ''} </td>`);\n return row;\n }, []).concat([`<td> <input type=\\\"button\\\" value=\\\"Delete\\\"> </td> </tr>`]);\n }).map(function (r) { return r.join(''); }));\n table.innerHTML = rows.join('');\n attachDeleteEvents(); // Attach delete events to all the delete butons in the employee table\n document.getElementById('count').innerText = rows.length - 1; // Remove header from count\n }", "function viewAllEmp() {\n // SQL query to the db\n connection.query(\n \"SELECT CONCAT(e.first_name, ' ', e.last_name) AS Employee, r.title AS Title, r.salary AS Salary, d.name AS Department, IFNULL(CONCAT(m.first_name, ' ', m.last_name), 'NONE') AS 'Manager' FROM employee e LEFT JOIN employee m ON m.id = e.manager_id LEFT JOIN role r ON r.id = e.role_id LEFT JOIN department d ON d.id = r.department_id ORDER BY e.last_name;\",\n function (err, res) {\n if (err) throw err;\n let tableResults = [];\n for (var i = 0; i < res.length; i++) {\n var empObj = [res[i].Employee, res[i].Title, res[i].Salary, res[i].Department, res[i].Manager];\n tableResults.push(empObj);\n }\n console.clear();\n console.log(\n \" ---------------------------------- \\n ALL COMPANY EMPLOYEES AT THIS TIME \\n ----------------------------------\"\n );\n console.table([\"Employee\", \"Title\", \"Salary\", \"Department\", \"Manager\"], tableResults);\n actions();\n }\n );\n}", "function viewEmployee() {\n console.log(\"Viewing all employees\\n\");\n\n var results=connection.query\n (\"SELECT employee.id, employee.first_name, employee.last_name, role.title, department_id AS department, role.salary, employee.manager_id FROM employee, role where employee.role_id = role.id ;\",\n function(error,results)\n {\n\n if(error) throw error;\n\n \n console.table(results)\n console.log(\" All Employees \\n\");\n mainMenu();\n \n })\n\n }", "employeeData(state) {\n return state.employees\n }", "function viewAllEmployeesQuery() {\n return `SELECT e.id, e.first_name, e.last_name, r.title, d.name as department, r.salary, \n CONCAT(m.first_name, ' ', m.last_name) as manager FROM employee e \n INNER JOIN role r ON e.role_id = r.id INNER JOIN department d ON r.department_id = d.id \n LEFT JOIN employee m ON e.manager_id = m.id`;\n}", "readAllEmployees() {\r\n return this.connection.query(\r\n \"SELECT employee.id, employee.first_name, employee.last_name, role.title, department.name AS department, role.salary, CONCAT(manager.first_name, ' ', manager.last_name) AS manager FROM employee LEFT JOIN role on employee.role_id = role.id LEFT JOIN department on role.department_id = department.id LEFT JOIN employee manager on manager.id = employee.manager_id;\"\r\n );\r\n }", "function render() {\n res.render('socList', {\n title: 'Sentinel Project: SOC Manager',\n socs: socs,\n datapoints: resultsDatapoints\n });\n }", "async function fetchEmployeeData() {\n const response = await fetch(\n \"https://randomuser.me/api/?results=12&nat=US&noinfo\"\n );\n await response.json().then((result) => {\n generateHTML(result);\n });\n}", "function viewEmp(){\n connection.query(`\n SELECT e.first_name FirstName, e.last_name LastName, d.name Department, r.title JobTitle, r.salary Salary, e.id EmpID, e.manager_id Manager\n FROM employee e\n LEFT JOIN role r on (e.role_id = r.id)\n LEFT JOIN department d on (r.department_id = d.id)\n LEFT JOIN employee m on (e.manager_id = m.id)\n ORDER BY e.first_name,e.last_name,d.name,r.title;`,(err, results)=>{\n if(err)throw err;\n console.table(results);\n renderAction()\n })\n}", "function viewEmpByDept() {\n // SQL query to the db\n connection.query(\n \"SELECT CONCAT(e.first_name, ' ', e.last_name) AS Employee, r.title AS Title, r.salary AS Salary, d.name AS Department, IFNULL(CONCAT(m.first_name, ' ', m.last_name), 'NONE') AS 'Manager' FROM employee e LEFT JOIN employee m ON m.id = e.manager_id LEFT JOIN role r ON r.id = e.role_id LEFT JOIN department d ON d.id = r.department_id ORDER BY d.name;\",\n function (err, res) {\n if (err) throw err;\n let tableResults = [];\n for (var i = 0; i < res.length; i++) {\n var empObj = [res[i].Employee, res[i].Title, res[i].Salary, res[i].Department, res[i].Manager];\n tableResults.push(empObj);\n }\n console.clear();\n console.log(\n \" ----------------------------------- \\n ALL COMPANY EMPLOYEES BY DEPARTMENT \\n -----------------------------------\"\n );\n console.table([\"Employee\", \"Title\", \"Salary\", \"Department\", \"Manager\"], tableResults);\n actions();\n }\n );\n}", "displayEmployeeData() {\n return this.connection.promise().query(\n `SELECT employee.id, employee.first_name, employee.last_name, role.title, department.name as department, \n role.salary, CONCAT(e.first_name, ' ', e.last_name) AS manager\n FROM employee \n LEFT JOIN role ON employee.role_id = role.id\n LEFT JOIN department ON role.department_id = department.id\n LEFT JOIN employee AS e ON employee.manager_id = e.id`\n );\n }", "function viewEmployees() {\n // select from the db\n let query = \"SELECT * FROM employee\";\n connection.query(query, function(err, res) {\n if (err) throw err;\n console.table(res);\n startPrompt();\n });\n \n}", "render()\n {\n return(\n <div>\n <div>Estas son las empresas disponibles</div><br/>\n <div>NOTA: Para ver el procesamiento de datos se puede observar la consola: (F12)</div> \n {console.log(\"RE:\",this.renderEmpresas())}\n </div>\n );\n }", "function renderJobs(jobs){\n const html = jobs.map(function(job, jobId) {\n // job is our object, it is iterating over an array and it is rendering the data from the keys that belong on the object\n return `\n <li class='job-item'> \n <h2 id=\"${jobId}\">${job.company}</h2>\n <p>Job Title: ${job.position}</p>\n <p>Job Level: ${job.level}</p>\n </li>\n `\n });\n \n return html.join('');\n /* converts array into a string, .innerHTML has to be a string,\n that is why we convert the array of objects to a string*/\n }", "async function displayAllEmployees() {\n console.log(' ');\n await connection.query('SELECT e.id, e.first_name AS First_Name, e.last_name AS Last_Name, title AS Title, salary AS Salary, name AS Department, CONCAT(m.first_name, \" \", m.last_name) AS Manager FROM employee e LEFT JOIN employee m ON e.manager_id = m.id INNER JOIN role r ON e.role_id = r.id INNER JOIN department d ON r.department_id = d.id', (err, res) => {\n if (err) throw err;\n console.table(res);\n runApp();\n });\n}", "async function viewEmployees() {\t\n\tconst res = await queryAsync('SELECT e.id, CONCAT(e.firstName, \" \", e.lastName) AS employeeName, role.title, role.salary, CONCAT(m.firstName, \" \", m.lastName) AS managerName FROM employee e LEFT JOIN employee m ON m.id = e.managerId INNER JOIN role ON e.roleId = role.id');\n\tconst allEmployees = [];\n\tconsole.log(' ');\n for (let i of res) { \n\t allEmployees.push({ ID: i.id, NAME: i.employeeName, ROLE: i.title, SALARY: i.salary, MANAGER: i.managerName });\n }\n\tconsole.table(allEmployees);\n start();\n}", "async function viewAllEmployees() {\n try {\n const employees = await connection.queryPromise(`\n SELECT employees.employee_id AS ID, employees.first_name AS 'First Name', employees.last_name AS 'Last Name',\n roles.title AS Title, departments.name AS Department, roles.salary AS Salary, CONCAT_WS(' ', managers.first_name, managers.last_name) AS Manager\n FROM employees JOIN roles ON employees.role_id=roles.role_id JOIN departments ON roles.department_id=departments.department_id\n LEFT JOIN employees AS managers on employees.manager_id=managers.employee_id\n ORDER BY departments.department_id, roles.role_id`);\n if (employees.length === 0) console.log(\"There aren't any employees yet\\n\");\n else console.table(employees);\n } catch (err) { console.error(err); }\n readMenu();\n}", "async function viewEmployeesByDepartment() {\n try {\n const department_id = (await chooseDepartment(\"view employees in\")).department.department_id;\n if (!department_id) throw \"There aren't any departments yet\";\n const employees = await connection.queryPromise(`\n SELECT employees.employee_id AS ID, employees.first_name AS 'First Name', employees.last_name AS 'Last Name',\n roles.title AS Title, roles.salary AS Salary, CONCAT_WS(' ', managers.first_name, managers.last_name) AS Manager\n FROM employees JOIN roles ON employees.role_id=roles.role_id\n LEFT JOIN employees AS managers on employees.manager_id=managers.employee_id\n WHERE roles.department_id=? ORDER BY roles.role_id`, department_id);\n if (employees.length === 0) console.log(\"This department doesn't have any employees yet\\n\");\n else console.table(employees);\n } catch (err) { console.error(err); }\n readMenu();\n}", "function viewEmp() {\n connection.query(\n \"SELECT employee.id,first_name,last_name,manager,title,salary,department FROM employee JOIN role ON employee.role_id = role.id JOIN department ON role.department_id = department.id\",\n function (err, res) {\n if (err) throw err;\n console.table(res);\n start();\n }\n );\n}", "function viewEmployeeList(cb) {\n let query = \"SELECT * FROM employee\";\n\n connection.query(query, (error, data) => {\n if (error) throw error;\n cb(data);\n });\n}", "function viewEmps() {\n let query = `SELECT e.id AS \"ID\", e.first_name AS \"FIRST NAME\", e.last_name AS \"LAST NAME\", \nr.title AS \"ROLE\", d.name AS \"DEPARTMENT\", r.salary AS \"SALARY\", \n(select concat(emp.first_name,' ',emp.last_name) from employee as emp where e.manager_id = emp.id) AS \"MANAGER\"\nFROM employee e \nLEFT JOIN role r ON e.role_id=r.id\nLEFT JOIN department d ON r.department_id = d.id;`;\n connection.query(query, (err, res) => {\n if (err) throw err;\n printTable(res);\n CMS();\n });\n}", "function getEmployeeDetails(input) {\n var obj = JSON.parse(input);\n var output = \"\";\n\n //If pageNumber is 1, the 'prev' link will be disabled.\n if (pageNumber == 1) {\n document.getElementById(\"prev\").classList.add(\"disable\");\n } else {\n if (document.getElementById(\"prev\").classList.contains(\"disable\")) {\n document.getElementById(\"prev\").classList.remove(\"disable\");\n }\n }\n\n //If pageNumber is equal to the last page, the 'next' link will be disabled.\n if (!obj[pageNumber * employeesPerPage + 1]) {\n document.getElementById(\"next\").classList.add(\"disable\");\n } else {\n if (document.getElementById(\"next\").classList.contains(\"disable\")) {\n document.getElementById(\"next\").classList.remove(\"disable\");\n }\n }\n //Loop to iterate through the records in each page and to write it into HTML.\n for (var i = employeesPerPage * (pageNumber - 1); i < pageNumber * employeesPerPage; i++) {\n employeeNumber = i;\n\n if (!obj[employeeNumber + 1]) {\n continue;\n }\n var id = obj[employeeNumber + 1].employeeid;\n var firstName = obj[employeeNumber + 1].employeefname;\n var lastName = obj[employeeNumber + 1].employeelname;\n var bio = obj[employeeNumber + 1].employeebio;\n var employeeHasPic = obj[employeeNumber + 1].employeehaspic;\n var employeeIsFeatured = obj[employeeNumber + 1].employeeisfeatured;\n var roles = obj[employeeNumber + 1].roles;\n\n output += \"<div id='employee'>\";\n output += \"<div id='crown'>\";\n\n //If employee is featured the crown icon will be added.\n if (employeeIsFeatured == 1) {\n output += \"<img src='crown.png' width='25px' alt='Crown Image'/>\"\n }\n output += \"</div>\";\n output += \"<div class = 'clear'></div >\";\n output += \"<div id = 'image'>\";\n\n //If employee has a picture, it will be inserted.\n if (employeeHasPic == 1) {\n output += \"<img src='http://sandbox.bittsdevelopment.com/code1/employeepics/\" + (employeeNumber + 1) + \".jpg' alt='Employee Image' />\"\n }\n output += \"</div>\";\n output += \"<div id = 'name'>\";\n output += \"<span id = 'firstName'>\" + firstName + \"</span><span id ='lastName'>\" + lastName + \"</span></div >\";\n output += \"<div id ='bio'>\" + bio + \"</div>\";\n output += \"<div id = 'role'>\";\n\n //Loop to get the list of roles and it's details\n for (var j = 0; j < roles.length; j++) {\n name = roles[j].rolename;\n color = roles[j].rolecolor;\n id = roles[j].roleid;\n output += \"<span class='role' style='background-color:\" + color + \"' >\" + name + \"</span>\";\n }\n output += \"</div>\";\n output += \"</div>\";\n }\n\n //Inserting the output to employeeList div tag\n document.getElementById(\"employeeList\").innerHTML = output;\n document.getElementById(\"pageNumber\").innerHTML = \"Page Number: \" + pageNumber;\n\n }", "function renderThisMonthsWorkAnniversaries(data) {\n let anniversaryHTML = `<br><h3>This month's work anniversaries</h3>\n <br><table><thead>\n <tr><th>First Name</th>\n <th>Last Name</th>\n <th>Hire Date</th>\n <th>Years Employed</th>\n </thead><tbody>`;\n data.forEach(function(data) {\n const hireYear = data.hire_date.slice(0, 4);\n const currentYear = moment().format(\"YYYY\");\n const yearsEmployed = currentYear - hireYear;\n const tableRow = `<tr>\n <th>${data.first_name}</th>\n <th>${data.last_name}</th>\n <th>${moment(data.hire_date).format(\"MMMM Do YYYY\")}</th>\n <th>${yearsEmployed}</th>\n </tr>`;\n anniversaryHTML += tableRow;\n });\n anniversaryHTML += `</tbody></table>`;\n $(\"#search-results\").append(anniversaryHTML);\n }" ]
[ "0.76517296", "0.7400849", "0.7249863", "0.7070262", "0.7009761", "0.69917333", "0.6991701", "0.6823743", "0.67636746", "0.6644696", "0.66193485", "0.6584044", "0.6582145", "0.65719664", "0.65155816", "0.65073514", "0.64905083", "0.644651", "0.64399576", "0.6414418", "0.64013124", "0.6393527", "0.638513", "0.6378692", "0.6377388", "0.6357433", "0.6339077", "0.6323201", "0.6313855", "0.62790245", "0.62533754", "0.6244925", "0.6242671", "0.624029", "0.6218746", "0.62055063", "0.61973035", "0.61909086", "0.6183085", "0.61748976", "0.616698", "0.6159045", "0.6147035", "0.61435646", "0.6139347", "0.61353576", "0.6129062", "0.6114049", "0.6108609", "0.61042315", "0.6084313", "0.6075286", "0.6050958", "0.60492206", "0.602756", "0.6019639", "0.60112965", "0.5978158", "0.59766835", "0.5976212", "0.59704334", "0.59619904", "0.59476084", "0.59431607", "0.593302", "0.5931756", "0.5920966", "0.5920085", "0.5912416", "0.59082246", "0.5900214", "0.58961475", "0.58858705", "0.5880104", "0.58789915", "0.58788055", "0.58760107", "0.58754325", "0.5867958", "0.5856453", "0.5854487", "0.5851885", "0.58435786", "0.58346146", "0.5832222", "0.5830526", "0.5825892", "0.58205736", "0.58131045", "0.58067125", "0.5804146", "0.58005387", "0.578194", "0.576527", "0.5754063", "0.574069", "0.5739598", "0.5736187", "0.57354385", "0.573125", "0.57265395" ]
0.0
-1
initialize instance by generate all operations from operations passed in parameter
constructor(someGeneratorMusaicPcsOperation) { this.operations = Group.buildOperationsGroupByCaylayTable(someGeneratorMusaicPcsOperation) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generateOperations() {\n if (this._Operations) {\n return;\n }\n\n this._signHeadersList = this._signHeadersList || this.signHeadersList; // backward support\n this._serviceName = this._serviceName || this.serviceName;\n this._serviceVersion = this._serviceVersion || this.serviceVersion;\n\n // the holder class\n const Operations = function(needMeta, meta) {\n this.needMeta = needMeta;\n this.meta = meta;\n };\n\n // assign instance properties into prototype\n assign(Operations.prototype, this);\n\n // update supported methods, but need to bind it back to the original instance\n Operations.prototype.wmHeaders = this.wmHeaders.bind(this);\n\n this._Operations = Operations;\n\n // wrapper for each operation\n\n //\n // Each operation could specify multiple tags.\n // Each tag goes in swagger.apis[<tag>] as a group of all operations belonging to it\n // Any operations that don't have tags go into the default group.\n // In each group, there's apis object that holds the details of the operations inside it\n //\n each(this.swagger.apis, group => {\n if (!isFunction(group) && isObject(group)) {\n each(group, (fn, operationId) => {\n if (operationId !== \"help\" && isFunction(fn) && !Operations.prototype[operationId]) {\n const api = group.apis[operationId];\n const spec = this.swagger.spec.paths[api.path][api.method];\n Operations.prototype[operationId] = function swapiOperationWrapper(params, options) {\n const meta = this.useMeta();\n return apiFuncInvoke({\n api,\n spec,\n meta,\n client: this,\n fn,\n params,\n options: options || {},\n operationId\n });\n };\n // add details from Swagger\n Operations.prototype[operationId].details = group.operations[operationId];\n }\n });\n }\n });\n\n Operations.prototype.useMeta = function useMeta() {\n if (this.needMeta && !this.meta) {\n throw new Error(\"swapi operation needs meta\");\n }\n return this.meta;\n };\n\n Operations.prototype.invoke = function invoke(tag, operationId, params, options) {\n return invokeWithMeta({\n meta: this.useMeta(),\n client: this,\n tag,\n operationId,\n params,\n options\n });\n };\n }", "requiredOperations1() {}", "constructor() {\n this.ops = [];\n this.offset = 0;\n }", "async function initOps() {\n const newop = await loadNewDefaultOp();\n await resetOps(); // deletes everything including newop\n newop.update(); // re-saves newop\n}", "templateMethod() {\n this.baseOperation1();\n this.requiredOperations1();\n this.baseOperation2();\n this.hook1();\n this.requiredOperation2();\n this.baseOperation3();\n this.hook2();\n }", "async extractOps () {\n\t\tconst opKeys = Object.keys(this.attributes).filter(opKey => opKey.startsWith('$'));\n\t\tif (opKeys.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tthis.ops = { };\n\t\tObject.keys(this.attributes).forEach(attribute => {\n\t\t\tif (attribute.startsWith('$')) {\n\t\t\t\tthis.ops[attribute] = Object.assign(this.ops[attribute] || {}, this.attributes[attribute]);\n\t\t\t\tdelete this.attributes[attribute];\n\t\t\t}\n\t\t\telse if (attribute !== 'id') {\n\t\t\t\tthis.ops.$set = this.ops.$set || {};\n\t\t\t\tif (typeof this.attributes[attribute] === 'object') {\n\t\t\t\t\tthis.ops.$set[attribute] = DeepClone(this.attributes[attribute]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.ops.$set[attribute] = this.attributes[attribute];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "constructor() {\n\n V1CompiledOperation.initialize(this);\n }", "function init()\n\t{\n\t\tif (options.info)\n\t\t{\n\t\t\tlog = new Log('info');\n\t\t}\n\t\tif (options.debug)\n\t\t{\n\t\t\tlog = new Log('debug');\n\t\t}\n\t\toptions.log = log;\n\t\tfor (var operation in syntaxes.commandMap)\n\t\t{\n\t\t\tself[operation] = getDistributor(operation);\n\t\t}\n\t\tinitConnections();\n\t}", "static initialize(obj, type, operation, value) { \n obj['type'] = type;\n obj['operation'] = operation;\n obj['value'] = value;\n }", "async function initOperation(inputs) {\n const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult, } = inputs;\n const { operationLocation, resourceLocation, metadata, response } = await init();\n if (operationLocation)\n withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false);\n const config = {\n metadata,\n operationLocation,\n resourceLocation,\n };\n logger.verbose(`LRO: Operation description:`, config);\n const state = stateProxy.initState(config);\n const status = getOperationStatus({ response, state, operationLocation });\n processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult });\n return state;\n}", "async function initOperation(inputs) {\n const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult, } = inputs;\n const { operationLocation, resourceLocation, metadata, response } = await init();\n if (operationLocation)\n withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false);\n const config = {\n metadata,\n operationLocation,\n resourceLocation,\n };\n logger.verbose(`LRO: Operation description:`, config);\n const state = stateProxy.initState(config);\n const status = getOperationStatus({ response, state, operationLocation });\n processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult });\n return state;\n}", "function BulkOperationInit(){\n\t//make sure all pre considtion are valid\n\tassert(BulkOperation!=undefined && BulkOperation.packedBulkOps==null && BulkOperation.packedSingleBlockBulkOps==null); \n\t\n\t//loading the concrete class here \n\tvar BulkOperationPacked = require('./BulkOperationPacked.js');\n\tvar BulkOperationPackedSingleBlock = require('./BulkOperationPackedSingleBlock.js');\n\t\n\tvar BulkOperationPacked1 = require('./BulkOperationPacked1.js');\n\tvar BulkOperationPacked2 = require('./BulkOperationPacked2.js');\n\tvar BulkOperationPacked3 = require('./BulkOperationPacked3.js');\n\tvar BulkOperationPacked4 = require('./BulkOperationPacked4.js');\n\tvar BulkOperationPacked5 = require('./BulkOperationPacked5.js');\n\tvar BulkOperationPacked6 = require('./BulkOperationPacked6.js');\n\tvar BulkOperationPacked7 = require('./BulkOperationPacked7.js');\n\tvar BulkOperationPacked8 = require('./BulkOperationPacked8.js');\n\tvar BulkOperationPacked9 = require('./BulkOperationPacked9.js');\n\tvar BulkOperationPacked10 = require('./BulkOperationPacked10.js');\n\tvar BulkOperationPacked11 = require('./BulkOperationPacked11.js');\n\tvar BulkOperationPacked12 = require('./BulkOperationPacked12.js');\n\tvar BulkOperationPacked13 = require('./BulkOperationPacked13.js');\n\tvar BulkOperationPacked14 = require('./BulkOperationPacked14.js');\n\tvar BulkOperationPacked15 = require('./BulkOperationPacked15.js');\n\tvar BulkOperationPacked16 = require('./BulkOperationPacked16.js');\n\tvar BulkOperationPacked17 = require('./BulkOperationPacked17.js');\n\tvar BulkOperationPacked18 = require('./BulkOperationPacked18.js');\n\tvar BulkOperationPacked19 = require('./BulkOperationPacked19.js');\n\tvar BulkOperationPacked20 = require('./BulkOperationPacked20.js');\n\tvar BulkOperationPacked21 = require('./BulkOperationPacked21.js');\n\tvar BulkOperationPacked22 = require('./BulkOperationPacked22.js');\n\tvar BulkOperationPacked23 = require('./BulkOperationPacked23.js');\n\tvar BulkOperationPacked24 = require('./BulkOperationPacked24.js');\n\n\tBulkOperation.packedBulkOps = new Array( //new {\n\t\t new BulkOperationPacked1(),\n\t\t new BulkOperationPacked2(),\n\t\t new BulkOperationPacked3(),\n\t\t new BulkOperationPacked4(),\n\t\t new BulkOperationPacked5(),\n\t\t new BulkOperationPacked6(),\n\t\t new BulkOperationPacked7(),\n\t\t new BulkOperationPacked8(),\n\t\t new BulkOperationPacked9(),\n\t\t new BulkOperationPacked10(),\n\t\t new BulkOperationPacked11(),\n\t\t new BulkOperationPacked12(),\n\t\t new BulkOperationPacked13(),\n\t\t new BulkOperationPacked14(),\n\t\t new BulkOperationPacked15(),\n\t\t new BulkOperationPacked16(),\n\t\t new BulkOperationPacked17(),\n\t\t new BulkOperationPacked18(),\n\t\t new BulkOperationPacked19(),\n\t\t new BulkOperationPacked20(),\n\t\t new BulkOperationPacked21(),\n\t\t new BulkOperationPacked22(),\n\t\t new BulkOperationPacked23(),\n\t\t new BulkOperationPacked24(),\n\t\t new BulkOperationPacked(25),\n\t\t new BulkOperationPacked(26),\n\t\t new BulkOperationPacked(27),\n\t\t new BulkOperationPacked(28),\n\t\t new BulkOperationPacked(29),\n\t\t new BulkOperationPacked(30),\n\t\t new BulkOperationPacked(31),\n\t\t new BulkOperationPacked(32),\n\t\t new BulkOperationPacked(33),\n\t\t new BulkOperationPacked(34),\n\t\t new BulkOperationPacked(35),\n\t\t new BulkOperationPacked(36),\n\t\t new BulkOperationPacked(37),\n\t\t new BulkOperationPacked(38),\n\t\t new BulkOperationPacked(39),\n\t\t new BulkOperationPacked(40),\n\t\t new BulkOperationPacked(41),\n\t\t new BulkOperationPacked(42),\n\t\t new BulkOperationPacked(43),\n\t\t new BulkOperationPacked(44),\n\t\t new BulkOperationPacked(45),\n\t\t new BulkOperationPacked(46),\n\t\t new BulkOperationPacked(47),\n\t\t new BulkOperationPacked(48),\n\t\t new BulkOperationPacked(49),\n\t\t new BulkOperationPacked(50),\n\t\t new BulkOperationPacked(51),\n\t\t new BulkOperationPacked(52),\n\t\t new BulkOperationPacked(53),\n\t\t new BulkOperationPacked(54),\n\t\t new BulkOperationPacked(55),\n\t\t new BulkOperationPacked(56),\n\t\t new BulkOperationPacked(57),\n\t\t new BulkOperationPacked(58),\n\t\t new BulkOperationPacked(59),\n\t\t new BulkOperationPacked(60),\n\t\t new BulkOperationPacked(61),\n\t\t new BulkOperationPacked(62),\n\t\t new BulkOperationPacked(63),\n\t\t new BulkOperationPacked(64),\n\t );\n\t \n BulkOperation.packedSingleBlockBulkOps = new Array(\n\t new BulkOperationPackedSingleBlock(1),\n\t new BulkOperationPackedSingleBlock(2),\n\t new BulkOperationPackedSingleBlock(3),\n\t new BulkOperationPackedSingleBlock(4),\n\t new BulkOperationPackedSingleBlock(5),\n\t new BulkOperationPackedSingleBlock(6),\n\t new BulkOperationPackedSingleBlock(7),\n\t new BulkOperationPackedSingleBlock(8),\n\t new BulkOperationPackedSingleBlock(9),\n\t new BulkOperationPackedSingleBlock(10),\n\t null,\n\t new BulkOperationPackedSingleBlock(12),\n\t null,\n\t null,\n\t null,\n\t new BulkOperationPackedSingleBlock(16),\n\t null,\n\t null,\n\t null,\n\t null,\n\t new BulkOperationPackedSingleBlock(21),\n\t null,\n\t null,\n\t null,\n\t null,\n\t null,\n\t null,\n\t null,\n\t null,\n\t null,\n\t null,\n\t new BulkOperationPackedSingleBlock(32),\n ); \t \n}", "chooseOperation(operation) {\n\n}", "function makeExecute() {\n var swaggerJs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return function (_ref) {\n var pathName = _ref.pathName,\n method = _ref.method,\n operationId = _ref.operationId;\n return function (parameters) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return swaggerJs.execute((0,_babel_runtime_corejs3_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__.default)((0,_babel_runtime_corejs3_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__.default)({\n spec: swaggerJs.spec\n }, lodash_pick__WEBPACK_IMPORTED_MODULE_2___default()(swaggerJs, 'requestInterceptor', 'responseInterceptor', 'userFetch')), {}, {\n pathName: pathName,\n method: method,\n parameters: parameters,\n operationId: operationId\n }, opts));\n };\n };\n} // Creates an interface with tags+operations = execute", "function operation(operatorName, args) {\n\t return { type: 'operation', operator: operatorName, args: args || [] };\n\t }", "function op(id, nargs) {\n return function() {\n var r = new Operation(id);\n r.args = toArray(arguments).slice(0, nargs);\n return r;\n };\n }", "initialize() {\n const base = {\n scope: this,\n partialArg: { ...this.context, doc: this },\n }\n\n /**\n * @property {Registry} actions\n *\n */\n this.actions = registry({\n name: 'actions',\n members: this.tryResult('actions', {}),\n ...base,\n })\n\n /**\n * @property {Registry} sandboxes\n *\n */\n this.sandboxes = registry({\n name: 'sandboxes',\n members: this.tryResult('sandboxes', {}),\n ...base,\n })\n }", "static initialize(obj, type, name, operator, elements) { \n obj['type'] = type;\n obj['name'] = name;\n obj['operator'] = operator;\n obj['elements'] = elements;\n }", "function operation(operatorName, args) {\n return { type: 'operation', operator: operatorName, args: args || [] };\n }", "function operation(operatorName, args) {\n return { type: 'operation', operator: operatorName, args: args || [] };\n }", "constructor(left, op, right) {\n this.left = left;\n this.op = op;\n this.right = right;\n }", "async Init(stub) {\n this.logger = shim.newLogger('odb');\n\n this[\"initLedger\"] = initLedger;\n\n // Accreditation actions\n this[\"revokeAccreditation\"] = revokeAccreditation;\n this[\"createAccreditation\"] = createAccreditation;\n\n // Course actions\n this[\"createCourse\"] = createCourse;\n this[\"queryCourse\"] = queryCourse;\n this[\"queryAllCourses\"] = queryAllCourses;\n\n // Module actions\n this[\"createModule\"] = createModule;\n\n return shim.success();\n }", "function createOperationTree(initialExpression, operationList) {\n\t for (var i = 0, l = operationList.length, item; i < l && (item = operationList[i]); i++) {\n\t initialExpression = operation(item[0], [initialExpression, item[1]]);\n\t }return initialExpression;\n\t }", "constructor(props) {\n super(props)\n this.state = {\n action: (id, dato, operation) => props.onClick(id, dato, operation),\n operationsButton: props.value[0],\n inputOperation: props.value[1],\n def:props.def,\n id: props.id,\n \n }\n }", "apply (ops) {\n this.opsReceivedTimestamp = new Date()\n for (var i = 0; i < ops.length; i++) {\n var o = ops[i]\n if (o.id == null || o.id[0] !== this.y.connector.userId) {\n var required = Y.Struct[o.struct].requiredOps(o)\n if (o.requires != null) {\n required = required.concat(o.requires)\n }\n this.whenOperationsExist(required, o)\n }\n }\n }", "function createUsingFullOptionsOperations() {\n var initialParams = {\n count: 10 // initial page size\n };\n var initialSettings = {\n // page size buttons (right set of buttons in demo)\n counts: [],\n // determines the pager buttons (left set of buttons in demo)\n paginationMaxBlocks: 10,\n paginationMinBlocks: 2,\n dataset: $scope.operationsData\n };\n return new NgTableParams(initialParams, initialSettings);\n }", "constructor() {\n const ops = [\n _op_list_arithmetic__WEBPACK_IMPORTED_MODULE_4__, _op_list_basic_math__WEBPACK_IMPORTED_MODULE_5__, _op_list_control__WEBPACK_IMPORTED_MODULE_6__, _op_list_convolution__WEBPACK_IMPORTED_MODULE_7__, _op_list_creation__WEBPACK_IMPORTED_MODULE_8__, _op_list_dynamic__WEBPACK_IMPORTED_MODULE_9__,\n _op_list_evaluation__WEBPACK_IMPORTED_MODULE_10__, _op_list_logical__WEBPACK_IMPORTED_MODULE_14__, _op_list_image__WEBPACK_IMPORTED_MODULE_13__, _op_list_graph__WEBPACK_IMPORTED_MODULE_11__, _op_list_matrices__WEBPACK_IMPORTED_MODULE_15__, _op_list_normalization__WEBPACK_IMPORTED_MODULE_16__, _op_list_reduction__WEBPACK_IMPORTED_MODULE_17__,\n _op_list_slice_join__WEBPACK_IMPORTED_MODULE_18__, _op_list_spectral__WEBPACK_IMPORTED_MODULE_19__, _op_list_transformation__WEBPACK_IMPORTED_MODULE_20__, _op_list_hash_table__WEBPACK_IMPORTED_MODULE_12__\n ];\n const mappersJson = [].concat(...ops.map(op => op.json));\n this.opMappers = mappersJson.reduce((map, mapper) => {\n map[mapper.tfOpName] = mapper;\n return map;\n }, {});\n }", "generateOperations() {\n // remove previous elements if created\n if (this.operation) {\n this.operation.remove()\n }\n if (this.valueSelector) {\n this.valueSelector.remove()\n }\n // check whether the column is numeric\n this.expInfo[\"name\"] = this.altColSelect.value\n this.paneOb.altFiltersState[this.id].colname = this.altColSelect.value\n if (parseFloat(this.paneOb.csvData[this.altColSelect.value][0])) {\n // the value was numeric, t\n /** The Operation drop down who's possible options are dependent on the selected csv column featuring numeric or categorical data */\n this.operation = document.createElement(\"select\")\n this.operation.id = \"op\"\n let equals = document.createElement(\"option\")\n equals.innerHTML = \"<\"\n equals.value = \"<\"\n let notEquals = document.createElement(\"option\")\n notEquals.innerHTML = \">\"\n notEquals.value = \">\"\n this.operation.append(equals)\n this.operation.append(notEquals)\n this.holder.append(this.operation)\n // create an input point for value input\n /** The value drop down list that is combined with the selected operation to generate a bool mask array from the selected alternate CSV column */\n this.valueSelector = document.createElement(\"input\")\n this.valueSelector.type = \"text\"\n this.valueSelector.id = \"val\"\n this.holder.append(this.valueSelector)\n this.operation.onchange = this.mask.bind(this)\n this.valueSelector.onchange = this.mask.bind(this)\n\n } else {\n // remove existing elements too\n // generate the == != select\n this.operation = document.createElement(\"select\")\n this.operation.id = \"op\"\n let equals = document.createElement(\"option\")\n equals.innerHTML = \"==\"\n equals.value = \"==\"\n let notEquals = document.createElement(\"option\")\n notEquals.innerHTML = \"!=\"\n notEquals.value = \"!=\"\n this.operation.append(equals)\n this.operation.append(notEquals)\n this.holder.append(this.operation)\n\n // make a populated selector with unique options from the column\n this.findUniqueElements()\n this.valueSelector = document.createElement(\"select\")\n this.valueSelector.id = \"val\"\n for (let op of this.uniqueSet) {\n //make an option with each\n let opele = document.createElement(\"option\")\n opele.value = op\n opele.innerHTML = op\n this.valueSelector.append(opele)\n }\n this.holder.append(this.valueSelector)\n // do mask on both the selectors change\n this.operation.onchange = this.mask.bind(this)\n this.valueSelector.onchange = this.mask.bind(this)\n // mask using defaults\n this.mask()\n }\n }", "TemplateMethod() {\n this.PrimitiveOperation1();\n this.PrimitiveOperation2();\n this.PrimitiveOperation3();\n }", "function makeOpComposition () {\n \n var ops = []; \n var domain = makeEmptyMap(); \n var gen = 0; \n \n var func = function (s) {\n return function (i) {\n return evaluate(domain.has(i) ? (ops.length-1) - (gen-domain.get(i)) : -1, i)(i);\n }\n \n // determine selection state of i but only access the elements \n // of ops (staring from ind) that have i in their domain\n function evaluate(ind, i) {\n if (ind < 0) return s; // i defined in the base selection mapping s\n else {\n var op = ops[ind];\n return op(function (j) { return evaluate(ind - op.domain.get(i), j)(i); });\n // the call to evaluate is wrapped to a lambda to make the call lazy.\n // op will only call the lambda if op.f.constant is false\n }\n }\n }\n \n func.domain = domain;\n \n // member functions of func\n func.push = function (op) {\n ops.push(op);\n ++gen\n op.domain.forEach(function(_, i) {\n op.domain.set(i, domain.has(i) ? gen - domain.get(i) : ops.length);\n domain.set(i, gen); \n });\n }\n func.pop = function () {\n var n = ops.length;\n var op = ops.pop();\n --gen;\n // domain updated for those elements that are in op.domain\n op.domain.forEach(function (_, i) {\n if (op.domain.get(i) >= n) domain.delete(i); // no op defines i\n else domain.set(i, domain.get(i) - op.domain.get(i)); \n });\n return op;\n }\n func.top = function () { return ops[ops.length - 1]; }\n func.top2 = function () { return ops[ops.length - 2]; }\n func.shift = function (bmap) {\n var op = ops.shift();\n op.domain.forEach(function(_, i) {\n if (domain.get(i) - gen === ops.length) { domain.delete(i); }\n // if lastOp the only op that defines i, remove i from domain\n });\n return op;\n }\n func.size = function () { return ops.length; }\n func.removeIndex = function (i) {\n if (!domain.has(i)) return;\n \n // find the first op in ops that defines i\n var j = (ops.length - 1) - (gen - domain.get(i));\n \n while (j >= 0) {\n var d = ops[j].domain.get(i);\n ops[j].domain.delete(i);\n j -= d;\n }\n domain.delete(i);\n }\n \n return func;\n }", "function Operation(name, description, level)\n {\n this.Init(name, description, level);\n }", "function createOperationTree(initialExpression, operationList) {\n for (var i = 0, l = operationList.length, item; i < l && (item = operationList[i]); i++)\n initialExpression = operation(item[0], [initialExpression, item[1]]);\n return initialExpression;\n }", "function createOperationTree(initialExpression, operationList) {\n for (var i = 0, l = operationList.length, item; i < l && (item = operationList[i]); i++)\n initialExpression = operation(item[0], [initialExpression, item[1]]);\n return initialExpression;\n }", "* applyCreatedOperations (ops) {\n var send = []\n for (var i = 0; i < ops.length; i++) {\n var op = ops[i]\n yield* this.store.tryExecute.call(this, op)\n if (op.id == null || typeof op.id[1] !== 'string') {\n send.push(Y.Struct[op.struct].encode(op))\n }\n }\n if (send.length > 0) { // TODO: && !this.store.forwardAppliedOperations (but then i don't send delete ops)\n // is connected, and this is not going to be send in addOperation\n this.store.y.connector.broadcastOps(send)\n }\n }", "* getOperationsUntransformed () {\n var ops = []\n yield* this.os.iterate(this, null, null, function * (op) {\n if (op.id[0] !== '_') {\n ops.push(op)\n }\n })\n return {\n untransformed: ops\n }\n }", "clearOperations() {\n this._Operations = undefined;\n }", "async init(){\n this.state = await this.genClassif(this.state);\n this.state = await this.genPlanets(this.state);\n this.state = await this.getPlanetIDs(this.state);\n this.state = await this.genPlanetoids(this.state);\n this.state = await this.getPlanetoidIDs(this.state);\n this.save();\n }", "static initialize(obj) { \n obj['left'] = left;\n obj['right'] = right;\n obj['operator'] = operator;\n }", "init() {\n this.acc = [];\n this.operator = null;\n this.leftOperand = 0;\n this.rightOperand = 0;\n this.state = null;\n this.strategy = null;\n this.transition(STATE_LEFT_OPERAND);\n }", "execute() {\n this._setActiveRequests(this.activeRequests + 1);\n\n let params = !this.params || typeof this.params === 'object' ? this.params : JSON.parse(this.params);\n\n let { input } = this;\n\n let { op } = this;\n\n // the goal is to track if we have a bulk action in select all mode (to be used for the abort method)\n let isBulk = false;\n\n if (this._isPageProvider(input) || this._isView(input)) {\n let pageProvider;\n // support page provider as input to operations\n // relies on parameters naming convention until provider marshaller is available\n if (this._isPageProvider(input)) {\n pageProvider = input;\n input = undefined;\n } else if (this._isSelectAllActive(input)) {\n // in select all mode, we use `Bulk.RunAction` as the operation and `this.op` as a parameter for it\n op = 'Bulk.RunAction';\n // support page provider display behavior instances (table, grid, list) as input to operations for select all\n pageProvider = input.nxProvider;\n params = {\n action: 'automationUi',\n providerName: pageProvider.provider,\n excludeDocs: input._excludedItems,\n parameters: JSON.stringify({\n operationId: this.op,\n parameters: params,\n }),\n };\n isBulk = true;\n input = undefined;\n } else {\n // only a few selected documents should be considered for the operation\n pageProvider = input.nxProvider;\n input = input.selectedItems;\n }\n\n params.providerName = pageProvider.provider;\n Object.assign(params, pageProvider._params);\n // ELEMENTS-1318 - commas would need to be escaped, as queryParams are mapped to stringlists by the server\n // But passing queryParams as an array will map directly to the server stringlist\n if (params.queryParams && !Array.isArray(params.queryParams)) {\n params.queryParams = [params.queryParams];\n } else if (!params.queryParams) {\n params.queryParams = [];\n }\n }\n\n const options = {};\n // Look up document schemas to be returned\n if (this.schemas && this.schemas.length > 1) {\n options.schemas = this.schemas.trim().split(/[\\s,]+/);\n }\n options.headers = this.headers || {};\n // Force sync indexing\n if (this.syncIndexing) {\n options.headers['nx-es-sync'] = true;\n }\n // Look up content enrichers parameter\n if (this.enrichers) {\n let enrich = {};\n if (typeof this.enrichers === 'string') {\n enrich[this.enrichersEntity] = this.enrichers;\n } else {\n enrich = this.enrichers;\n }\n Object.entries(enrich).forEach(([type, value]) => {\n let v = value;\n if (Array.isArray(value)) {\n v = value.join(',');\n }\n options.headers[`enrichers-${type}`] = v;\n });\n }\n\n // Manage the way to abort the request\n if (!this.uncancelable) {\n if (this._controller) {\n this._controller.abort();\n }\n\n // For the next request\n this._controller = new AbortController();\n options.signal = this._controller.signal;\n }\n\n return this.$.nx.operation(op).then((operation) => {\n this._operation = operation;\n return this._doExecute(input, params, options, isBulk);\n });\n }", "function OperationMapper() {\n var ops = [\n arithmetic, basicMath, control, convolution, creation, dynamic,\n evaluation, logical, image, graph, matrices, normalization, reduction,\n sliceJoin, spectral, transformation\n ];\n var mappersJson = [].concat.apply([], ops.map(function (op) { return op.json; }));\n this.opMappers = mappersJson.reduce(function (map, mapper) {\n map[mapper.tfOpName] = mapper;\n return map;\n }, {});\n }", "function OperationMapper() {\n var ops = [\n arithmetic, basicMath, control, convolution, creation, dynamic,\n evaluation, logical, image, graph, matrices, normalization, reduction,\n sliceJoin, spectral, transformation\n ];\n var mappersJson = [].concat.apply([], ops.map(function (op) { return op.json; }));\n this.opMappers = mappersJson.reduce(function (map, mapper) {\n map[mapper.tfOpName] = mapper;\n return map;\n }, {});\n }", "_construct() {\n for (let url in methods) {\n const urlParts = url.split('/');\n const name = urlParts.pop(); // key for function\n\n let tmp = this;\n for (let p = 1; p < urlParts.length; ++p) { // acts like mkdir -p\n tmp = tmp[urlParts[p]] || (tmp[urlParts[p]] = {});\n }\n\n tmp[name] = (() => {\n const method = methods[url]; // closure forces copy\n return (params) => {\n return this._call(method, params);\n };\n })();\n }\n\n this._debug(`Trakt.tv: module loaded, as ${this._settings.useragent}`);\n }", "chooseOperation(operation) {\r\n if (this.currentOperand === '') return\r\n if (this.previousOperand !== '') {\r\n this.compute()\r\n }\r\n this.operation = operation\r\n this.previousOperand = this.currentOperand\r\n this.currentOperand = ''\r\n }", "function setOperations(operations, portType) {\n _.forEach(portType.childNodes, node => {\n if (node.localName === 'operation') {\n operations[node.getAttribute('name')] = node;\n }\n });\n}", "function _filterOperations(data) {\n var updateOps = [];\n var createOps = [];\n for(var i=0; i<data.length; i++) {\n var queryJSON = {};\n //var element = _parseProperty(queryJSON, view_model.primaryKeyProperty);\n //element = _parseProperty(data[i], view_model.primaryKeyProperty);\n\n _.set(queryJSON, view_model.primaryKeyProperty, _.get(data[i], view_model.primaryKeyProperty));\n\n var query = _.findIndex(view_model.serviceDB, queryJSON);\n if( query > -1 ) updateOps.push(data[i]);\n else createOps.push(data[i]);\n }\n return { updateOperations: updateOps, createOperations: createOps };\n }", "async function initHttpOperation(inputs) {\n const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs;\n return initOperation({\n init: async () => {\n const response = await lro.sendInitialRequest();\n const config = inferLroMode({\n rawResponse: response.rawResponse,\n requestPath: lro.requestPath,\n requestMethod: lro.requestMethod,\n resourceLocationConfig,\n });\n return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}));\n },\n stateProxy,\n processResult: processResult\n ? ({ flatResponse }, state) => processResult(flatResponse, state)\n : ({ flatResponse }) => flatResponse,\n getOperationStatus: getStatusFromInitialResponse,\n setErrorAsResult,\n });\n}", "async function initHttpOperation(inputs) {\n const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs;\n return initOperation({\n init: async () => {\n const response = await lro.sendInitialRequest();\n const config = inferLroMode({\n rawResponse: response.rawResponse,\n requestPath: lro.requestPath,\n requestMethod: lro.requestMethod,\n resourceLocationConfig,\n });\n return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}));\n },\n stateProxy,\n processResult: processResult\n ? ({ flatResponse }, state) => processResult(flatResponse, state)\n : ({ flatResponse }) => flatResponse,\n getOperationStatus: getStatusFromInitialResponse,\n setErrorAsResult,\n });\n}", "initializing () {\n require('./actions/init')(this)\n }", "init(){\n var self = this;\n self.generateData();\n self.insertInfo();\n self.copyData();\n }", "PrimitiveOperation1() {}", "function WrappedOperation (operation, meta) {\n this.wrapped = operation;\n this.meta = meta;\n }", "function WrappedOperation (operation, meta) {\n this.wrapped = operation;\n this.meta = meta;\n }", "function Shop() {\n this.construct = function(builder) {\n builder.step1();\n builder.step2();\n return builder.get();\n }\n}", "function OperationsImpl(client) {\n this.client = client;\n }", "initButtons() {\n const self = this;\n const actions = [\n {\n id: 'compile',\n run: () => {\n self.compile();\n },\n },\n {\n id: 'save',\n run: () => {\n self.save();\n },\n },\n ];\n\n for (let action of actions) {\n const a = document.getElementById(action.id);\n a.addEventListener('click', action.run);\n this.views[action.id] = a;\n }\n }", "static resultForOps(ops, actionContext) {\n const nextContext = this.tempUpdateContext(ops, actionContext);\n return {\n nextContext: nextContext,\n resultOps: ops,\n scheduledActions: []\n };\n }", "chooseOperation(operation) {\n if(this.currOperand === '') return\n if(this.prevOperand !== '') {\n this.processValue()\n }\n this.operation = operation\n this.prevOperand = this.currOperand\n this.currOperand = ''\n }", "function makeBinaryOp (operation) {\r\n return function (self, other) {\r\n console.log(operation, self, other);\r\n };\r\n }", "addOperation(classId, operationId, data) {\n console.log(\"NEW DATA\", data)\n this.operations[operationId] = new OperationData(data);\n console.log(\"NEW DATA2\", this.operations[operationId])\n console.log(\"NEW DATA3\" ,new OperationData(data))\n this.classes[classId].addOperation(operationId);\n }", "chooseOperation(operation) {\n if (this.currentOperand === '')return\n // this is a check for updating operators, dont want the operator buttons being used to clear the fields\n if(this.previousOperand !== ''){\n this.compute()\n }\n // this is a check to ensure that the calculator will continue to work through past calculations, not clear them.\n this.operation = operation\n this.previousOperand = this.currentOperand\n this.currentOperand = ''\n }", "function operationMaker(operation) {\n \n if (operation === \"mult\") { \n return function multiplier(num1, num2) {\n return num1 * num2;\n }\n } else if (operation === \"add\") {\n return function adder(num1, num2) {\n return num1 + num2;\n }\n } else if (operation === \"subtract\") {\n return function subtracter(num1, num2) {\n return num1 - num2;\n }\n } else if (operation === \"div\") {\n return function divider(num1, num2) {\n return num1 / num2;\n }\n } else {\n return false\n }\n}", "function createMockOperation(mappers) {\n mappers = mappers || {};\n\n // Note: noop mock operation - return the resource unchanged\n var op = mappers.operation || function(executions) {\n return executions.map(executionMapper);\n };\n var executionMapper = mappers.executions || sinon.spy(function(resources) {\n return resources.map(resourceMapper);\n });\n var resourceMapper = mappers.resources || sinon.spy(function(resource) {\n return resource;\n });\n\n op.executions = executionMapper;\n op.resources = resourceMapper;\n\n return op;\n}", "_buildOperators(operators) {\n if (typeof operators !== 'object') return;\n return Object.keys(operators).reduce((memo, key) => {\n let raw = operators[key];\n let operator = this._buildOperator(raw, key);\n operator && (memo[operator.id] = operator);\n return memo;\n }, {});\n }", "static initialize(obj, repoName, mainBranch, buildCommand, period) {\n obj['repoName'] = repoName;\n obj['mainBranch'] = mainBranch;\n obj['buildCommand'] = buildCommand;\n obj['period'] = period;\n }", "init() {\n module_utils.patchModule(\n 'openwhisk/lib/actions.js',\n 'invoke',\n openWhiskWrapper$1,\n actions => actions.prototype\n );\n }", "function gen_op_test_ls(param1)\n{\n //gen_opparam_ptr.push(param1);\n gen_opc_ptr.push({func:op_test_ls, param: param1});\n}", "constructor(ins) {\n super(ins);\n let opBin = MapForI_1.MapForI.getMap().get(this.operator);\n if (opBin == undefined) {\n this.op = \"XXXXXX\";\n console.log(\"Error in constructor for InstructionR.\");\n }\n else {\n this.op = opBin;\n }\n let posOfSpace = ins.indexOf(\" \");\n if (this.operator == \"lui\") {\n let operands = ins.substring(posOfSpace + 1, ins.length).split(\",\", 2);\n this.operandRS = \"\";\n this.operandRT = operands[0];\n this.operandIMM = operands[1];\n this.rs = \"00000\";\n this.rt = DecimalToBinary_1.decimalToBinary(+this.operandRT.substring(1), 5);\n this.imm = DecimalToBinary_1.decimalToBinary(+this.operandIMM, 16);\n }\n else if (this.operator == \"beq\" || this.operator == \"bne\") {\n let operands = ins.substring(posOfSpace + 1, ins.length).split(\",\", 3);\n this.operandRS = operands[0];\n this.operandRT = operands[1];\n this.operandIMM = operands[2];\n this.rs = DecimalToBinary_1.decimalToBinary(+this.operandRS.substring(1), 5);\n this.rt = DecimalToBinary_1.decimalToBinary(+this.operandRT.substring(1), 5);\n this.imm = DecimalToBinary_1.decimalToBinary(+this.operandIMM, 16);\n }\n else if (this.operator == \"addi\" ||\n this.operator == \"addiu\" ||\n this.operator == \"andi\" ||\n this.operator == \"ori\" ||\n this.operator == \"slti\" ||\n this.operator == \"sltiu\") {\n let operands = ins.substring(posOfSpace + 1, ins.length).split(\",\", 3);\n this.operandRS = operands[1];\n this.operandRT = operands[0];\n this.operandIMM = operands[2];\n this.rs = DecimalToBinary_1.decimalToBinary(+this.operandRS.substring(1), 5);\n this.rt = DecimalToBinary_1.decimalToBinary(+this.operandRT.substring(1), 5);\n this.imm = DecimalToBinary_1.decimalToBinary(+this.operandIMM, 16);\n }\n else {\n let operands = ins.substring(posOfSpace + 1, ins.length).split(\",\", 2);\n let leftBracket = operands[1].indexOf(\"(\");\n let rightBracket = operands[1].indexOf(\")\");\n this.operandRS = operands[1].substring(leftBracket + 1, rightBracket);\n this.operandRT = operands[0];\n this.operandIMM = operands[1].substring(0, leftBracket);\n this.rs = DecimalToBinary_1.decimalToBinary(+this.operandRS.substring(1), 5);\n this.rt = DecimalToBinary_1.decimalToBinary(+this.operandRT.substring(1), 5);\n this.imm = DecimalToBinary_1.decimalToBinary(+this.operandIMM, 16);\n }\n this.binIns = this.op + this.rs + this.rt + this.imm;\n }", "chooseOperation(operation){\r\n // if the currentOperand is empty, won't execute any further \r\n if(this.currentOperand === '') return\r\n\r\n // If previous operand already existed then continue operation\r\n // Eg. 1+1=2 +1=3\r\n if(this.currentOperand !== '' && this.previousOperand !== ''){\r\n this.compute()\r\n }\r\n this.operation = operation;\r\n this.previousOperand = this.currentOperand;\r\n this.currentOperand = '';\r\n }", "_handleCustomOperations() {\n const that = this;\n\n that._filterOperationDescriptions = that._defaultFilterOperationDescriptions;\n\n for (let i = 0; i < that.customOperations.length; i++) {\n const operation = that.customOperations[i];\n\n that._filterOperationDescriptions.push({\n label: operation.label,\n value: operation.name,\n custom: true,\n index: i,\n editorTemplate: operation.editorTemplate,\n valueTemplate: operation.valueTemplate,\n handleValue: operation.handleValue\n });\n }\n }", "chooseOperation(operation){\n if (this.currentOperand === '') return\n //to get a displaying figure or answer to continue another computation\n if (this.previousOperand !== '') {\n this.compute()\n }\n //to get the actual operation clicked\n this.operation = operation\n // the previous operand now equals current operand for new input\n this.previousOperand = this.currentOperand\n this.currentOperand = ''\n }", "_handleCustomOperations() {\n const that = this;\n\n that._filterOperationDescriptions = that._defaultFilterOperationDescriptions.slice(0);\n\n for (let i = 0; i < that.customOperations.length; i++) {\n const operation = that.customOperations[i];\n\n that._filterOperationDescriptions.push({\n label: operation.label,\n value: operation.name,\n custom: true,\n index: i,\n editorTemplate: operation.editorTemplate,\n valueTemplate: operation.valueTemplate,\n handleValue: operation.handleValue,\n hideValue: operation.hideValue\n });\n }\n }", "function gen_op_swi()\n{\n gen_opc_ptr.push({func:op_swi});\n}", "function gen_op_test_mi(param1)\n{\n //gen_opparam_ptr.push(param1);\n gen_opc_ptr.push({func:op_test_mi, param:param1});\n}", "* getOperations (startSS) {\n // TODO: use bounds here!\n if (startSS == null) {\n startSS = {}\n }\n var send = []\n\n var endSV = yield* this.getStateVector()\n for (var endState of endSV) {\n var user = endState.user\n if (user === '_') {\n continue\n }\n var startPos = startSS[user] || 0\n if (startPos > 0) {\n // There is a change that [user, startPos] is in a composed Insertion (with a smaller counter)\n // find out if that is the case\n var firstMissing = yield* this.getInsertion([user, startPos])\n if (firstMissing != null) {\n // update startPos\n startPos = firstMissing.id[1]\n startSS[user] = startPos\n }\n }\n yield* this.os.iterate(this, [user, startPos], [user, Number.MAX_VALUE], function * (op) {\n op = Y.Struct[op.struct].encode(op)\n if (op.struct !== 'Insert') {\n send.push(op)\n } else if (op.right == null || op.right[1] < (startSS[op.right[0]] || 0)) {\n // case 1. op.right is known\n var o = op\n // Remember: ?\n // -> set op.right\n // 1. to the first operation that is known (according to startSS)\n // 2. or to the first operation that has an origin that is not to the\n // right of op.\n // For this we maintain a list of ops which origins are not found yet.\n var missing_origins = [op]\n var newright = op.right\n while (true) {\n if (o.left == null) {\n op.left = null\n send.push(op)\n if (!Y.utils.compareIds(o.id, op.id)) {\n o = Y.Struct[op.struct].encode(o)\n o.right = missing_origins[missing_origins.length - 1].id\n send.push(o)\n }\n break\n }\n o = yield* this.getInsertion(o.left)\n // we set another o, check if we can reduce $missing_origins\n while (missing_origins.length > 0 && Y.utils.matchesId(o, missing_origins[missing_origins.length - 1].origin)) {\n missing_origins.pop()\n }\n if (o.id[1] < (startSS[o.id[0]] || 0)) {\n // case 2. o is known\n op.left = Y.utils.getLastId(o)\n send.push(op)\n break\n } else if (Y.utils.matchesId(o, op.origin)) {\n // case 3. o is op.origin\n op.left = op.origin\n send.push(op)\n op = Y.Struct[op.struct].encode(o)\n op.right = newright\n if (missing_origins.length > 0) {\n console.log('This should not happen .. :( please report this')\n }\n missing_origins = [op]\n } else {\n // case 4. send o, continue to find op.origin\n var s = Y.Struct[op.struct].encode(o)\n s.right = missing_origins[missing_origins.length - 1].id\n s.left = s.origin\n send.push(s)\n missing_origins.push(o)\n }\n }\n }\n })\n }\n return send.reverse()\n }", "init(){\n this.initFunctional();\n }", "constructor() {\n this.data = {};\n this.args = process.argv;\n this.parser = new Parse(this.args[2]);\n this.calculate = new Calculate(this.data);\n this.checkArgs();\n }", "function eachOperation(spec, cb, find) {\n if (!spec || (0,_babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__.default)(spec) !== 'object' || !spec.paths || (0,_babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__.default)(spec.paths) !== 'object') {\n return null;\n }\n\n var paths = spec.paths; // Iterate over the spec, collecting operations\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n\n for (var pathName in paths) {\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (var method in paths[pathName]) {\n if (method.toUpperCase() === 'PARAMETERS') {\n continue; // eslint-disable-line no-continue\n }\n\n var operation = paths[pathName][method];\n\n if (!operation || (0,_babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__.default)(operation) !== 'object') {\n continue; // eslint-disable-line no-continue\n }\n\n var operationObj = {\n spec: spec,\n pathName: pathName,\n method: method.toUpperCase(),\n operation: operation\n };\n var cbValue = cb(operationObj);\n\n if (find && cbValue) {\n return operationObj;\n }\n }\n }\n\n return undefined;\n} // REVIEW: OAS3: identify normalization steps that need changes", "constructor() {\n\t\tthis.pops = [];\n\t\tthis.popsStats = []; // Store so stats don't have to be regathered and recalculated\n\t}", "static initialize(obj, method, path) { \n obj['method'] = method;\n obj['path'] = path;\n }", "constructor() {\n\t\tthis.un_op = '~';\n\t\tthis.log_ops = ['~', '^', 'v', '->', '<->'];\n\t\tthis.half_ops = ['<', '-', '<-', '>'];\n\t\tthis.poss_ops = ['~', '^', 'v', '->', '<->', '-', '<', '>'];\n\t\tthis.prec = ['(', '[', '~', '^', 'v', '->', '<->'];\n\t\tthis.braces = ['(', ')', '[', ']', '{', '}'];\n\t\tthis.braces_open = ['(', '[', '{'];\n\t\tthis.braces_closed = [')', ']', '}'];\n\t\tthis.w_space = ['\\n', '\\t', ' '];\n\t\tthis.space = ' ';\n\t\tthis.newline = '\\n';\n\t\tthis.terms = return_alpha();\n\t\tthis.op_stack = [];\n\t\tthis.b_stack = [];\n\t\tthis.l_stack = [];\n\t\tthis.postfix = [];\n\t\tthis.seen = [];\n\t\tthis.tmp = [];\n\t\tthis.expressions = [];\n\t\tthis.t_count = 0;\n\t\tthis.prev = undefined;\n\t}", "function gen_op_stl_user()\n{\n gen_opc_ptr.push({func:op_stl_user});\n}", "function eachOperation(spec, cb, find) {\n if (!spec || _babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(spec) !== 'object' || !spec.paths || _babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(spec.paths) !== 'object') {\n return null;\n }\n\n var paths = spec.paths; // Iterate over the spec, collecting operations\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n\n for (var pathName in paths) {\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (var method in paths[pathName]) {\n if (method.toUpperCase() === 'PARAMETERS') {\n continue; // eslint-disable-line no-continue\n }\n\n var operation = paths[pathName][method];\n\n if (!operation || _babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(operation) !== 'object') {\n continue; // eslint-disable-line no-continue\n }\n\n var operationObj = {\n spec: spec,\n pathName: pathName,\n method: method.toUpperCase(),\n operation: operation\n };\n var cbValue = cb(operationObj);\n\n if (find && cbValue) {\n return operationObj;\n }\n }\n }\n\n return undefined;\n} // REVIEW: OAS3: identify normalization steps that need changes", "static initialize(obj, id, created, code, poolId) { \n obj['id'] = id;\n obj['created'] = created;\n obj['code'] = code;\n obj['poolId'] = poolId;\n }", "addNewOp(opName, opId, opCode, parentPart, opIntervals, isSequential) {\n if (!isSequential) isSequential = false;\n return ops.create({\n opId: opId,\n opCode: opCode,\n opName: opName,\n parentPartId: parentPart,\n intervals: opIntervals,\n isSequential: isSequential\n });\n }", "constructor() { \n BasePipeline.initialize(this);BasePipelineWithSelectedFlagAllOf.initialize(this);\n BasePipelineWithSelectedFlag.initialize(this);\n }", "createPathOps(path) {\n const ops = [];\n let parent = otClient.documentByPathImmediate('.');\n let parentId = parent.docId;\n\n // eslint-disable-next-line func-names\n path.forEach(function(segment) {\n let childId;\n // eslint-disable-next-line no-cond-assign\n if (parent && (childId = parent.children[segment])) {\n // Walking existing dirs\n parent = otClient.documentImmediate(childId);\n // eslint-disable-next-line no-return-assign\n return (parentId = parent.docId);\n // eslint-disable-next-line no-else-return\n } else {\n // Creating new dirs\n const newDirId = randomId();\n ops.push({\n type: 'add',\n name: segment,\n docId: newDirId,\n docType: 'directory',\n parentId,\n });\n\n parent = null;\n // eslint-disable-next-line no-return-assign\n return (parentId = newDirId);\n }\n });\n\n const leafId = parent ? parent.docId : parentId;\n\n return {\n ops,\n leafId,\n };\n }", "applyOp(op) {\n const fields = {\n position: 0,\n insertString: '',\n delNum: 0\n };\n\n console.log(op);\n\n // Loops through the different fields and parses out the events\n // and creates a fields object which is then parsed by update().\n for (let i = 0; i < op.length; i++) {\n Binding.update(fields, op[i]);\n }\n\n if (fields.delNum > 0) {\n // Delete\n this.onRemove(fields.position, fields.delNum);\n }\n\n if (fields.insertString.length > 0) {\n // Insert\n this.onInsert(fields.position, fields.insertString);\n }\n\n return this.snapshot;\n }", "static initialize(obj, name, expression) { \n obj['name'] = name;\n obj['expression'] = expression;\n }", "init() {\n // Import indicator + set the default params\n this.ind1 = dep('SomeIndicator1', [12])\n\n // Import a TA library (nmp package)\n this.ta_lib = dep('@some_ta_lib')\n\n }", "addOperation(operation) {\n this.operations.push(async () => {\n try {\n this.actives++;\n await operation();\n this.actives--;\n this.completed++;\n this.parallelExecute();\n }\n catch (error) {\n this.emitter.emit(\"error\", error);\n }\n });\n }", "addOperation(operation) {\n this.operations.push(async () => {\n try {\n this.actives++;\n await operation();\n this.actives--;\n this.completed++;\n this.parallelExecute();\n }\n catch (error) {\n this.emitter.emit(\"error\", error);\n }\n });\n }", "construct(self) {\n var obj = {};\n this.paths.forEach((val, path) => {\n const key = path.slice(1).replace(/ [a-z]/, x => x[1].toUpperCase(1));\n switch (val.constructor) {\n case PlatformApiFunction:\n obj[key] = input => val.impl.call(self, input);\n break;\n case PlatformApiGetter:\n obj[key] = () => val.impl.call(self);\n break;\n default: throw new Error(\n `PlatformApi had path of weird constructor ${val.constructor}`);\n }\n });\n }", "static initialize(obj, componentGroups, attachments, inputs, references, outputs, commands, outputStates, id) { \n obj['componentGroups'] = componentGroups;\n obj['attachments'] = attachments;\n obj['inputs'] = inputs;\n obj['references'] = references;\n obj['outputs'] = outputs;\n obj['commands'] = commands;\n obj['outputStates'] = outputStates;\n obj['id'] = id;\n }", "function gen_op_test_cs(param1)\n{\n //gen_opparam_ptr.push(param1);\n gen_opc_ptr.push({func:op_test_cs, param: param1});\n}", "_instrumentOperations(collection, operations, getCurrentHub) {\n operations.forEach((operation) => this._patchOperation(collection, operation, getCurrentHub));\n }", "function gen_op_test_vs(param1)\n{\n //gen_opparam_ptr.push(param1);\n gen_opc_ptr.push({func:op_test_vs, param: param1});\n}", "async init(){\r\n await this.setName();\r\n await this.setPrice();\r\n await this.setImage();\r\n }", "async init(){\r\n await this.setName();\r\n await this.setPrice();\r\n await this.setImage();\r\n }", "function CookedOperation(name) {\n var _name = name;\n this.sync = function (data) {}.bind(this);\n this.getProperty = function (path, defaultValue) {\n var value = getProperty({\n name: _name,\n path: path,\n defaultValue: defaultValue\n });\n return value;\n }.bind(this);\n\n this.getHash = function (path) {\n var hash = getHash({\n name: _name,\n path: path\n });\n return hash;\n }.bind(this);\n }" ]
[ "0.69607323", "0.64687884", "0.64146584", "0.6363052", "0.63026553", "0.6224885", "0.6146677", "0.6074444", "0.60694635", "0.604268", "0.604268", "0.601469", "0.5948372", "0.5782247", "0.578042", "0.5755436", "0.571319", "0.57022375", "0.5697326", "0.5697326", "0.5693193", "0.5662016", "0.56590897", "0.5653436", "0.5628401", "0.5608766", "0.56003654", "0.55610853", "0.55248386", "0.55190206", "0.55189323", "0.54980904", "0.54980904", "0.5484254", "0.54801935", "0.5469685", "0.544509", "0.5444253", "0.5409662", "0.53929746", "0.53904706", "0.53904706", "0.5385044", "0.53701717", "0.5368094", "0.5321974", "0.5317983", "0.5317983", "0.5306141", "0.5297312", "0.52860975", "0.5284997", "0.5284997", "0.52819794", "0.5267252", "0.5263893", "0.5236166", "0.52257097", "0.5202097", "0.5199858", "0.51989126", "0.5186389", "0.5184264", "0.51816434", "0.5174609", "0.5173686", "0.51571214", "0.5153871", "0.5143794", "0.5142246", "0.51417345", "0.51407045", "0.5132252", "0.5129353", "0.5127934", "0.51248777", "0.512056", "0.5113029", "0.5101167", "0.5087628", "0.5083732", "0.5079979", "0.50791043", "0.5064883", "0.50468975", "0.5042681", "0.5042113", "0.5037175", "0.50353503", "0.50325245", "0.5031144", "0.5031144", "0.5030161", "0.50158274", "0.50119984", "0.49972948", "0.49891987", "0.49853063", "0.49853063", "0.49788645" ]
0.6537328
1
Tipo de dato funcion
function suma(a, b){ return a+b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dataType(){\n\n}", "function tipoDado(dado){\n return typeof dado;\n}", "function whatIsIt(data) { //create the function with a data argument\n return typeof(data) //return the data type\n}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion (){}", "function getType(fn){var match=fn&&fn.toString().match(/^\\s*function (\\w+)/);return match?match[1]:'';}", "function getType(fn){var match=fn&&fn.toString().match(/^\\s*function (\\w+)/);return match?match[1]:'';}", "function argsDataType() {\n\n}", "function getType(fn){var match=fn&&fn.toString().match(/^\\s*function (\\w+)/);return match&&match[1];}", "function da(){}", "function da(){}", "function da(){}", "function AlgDataType() {}", "function getType (fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/)\n\t return match && match[1]\n\t}", "function Data() { }", "function getType(fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t return match && match[1];\n\t}", "function getType (fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t return match && match[1]\n\t}", "function getType (fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t return match && match[1]\n\t}", "function getType (fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t return match && match[1]\n\t}", "function getType (fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t return match && match[1]\n\t}", "function getType (fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t return match && match[1]\n\t}", "function getType (fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t return match && match[1]\n\t}", "function Type() {\r\n}", "GetData() {}", "function getType(fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : '';\n }", "function getType (fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t return match ? match[1] : ''\n\t}", "function getType (fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t return match ? match[1] : ''\n\t}", "function Type() {}", "function getType(fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t return match ? match[1] : '';\n\t}", "function getType(fn) {\n\t var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t return match ? match[1] : '';\n\t}", "function theType(dataType){\n return theType(dataType);// This function will return the type of any argument passed into this function\n}", "function nombreFuncion(){\n \n}", "function getType (fn) {\n\t\tvar match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n\t\treturn match ? match[1] : ''\n\t}", "function Generica(param) {\n console.log(\"El tipo es: \" + typeof (param));\n return param;\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n }", "function tipo(texto){\n return typeof(texto)\n}", "function fun1(){} //toda a função de js retorna alguma coisa", "function fuctionPanier(){\n\n}", "function fun1( /*parametros opcionais*/ ){ /*retorno opcional*/ }", "function dataFunc(data) {\n console.log(data.getData());\n console.log(data.getColumns());\n }", "function dataTypes(){\n console.log(\"I like Numbers because they can be divided and multiplied and many other operations.\");\n console.log(\"I like Strings because I like my name and my name is a string.\");\n console.log(\"I like Objects most of all because they can hold all sorts of information.\")\n}", "function tipoAleatorio(tipo){\n var tipoVar;\n if (tipo==\"Entrante\"){\n tipoVar = getElementoAleatorio(entrante);\n }\n\n if (tipo==\"Principal\"){\n tipoVar = getElementoAleatorio(principal);\n }\n\n if (tipo==\"Postre\"){\n tipoVar = getElementoAleatorio(postre);\n }\n return tipoVar;\n}", "function getType (fn) {\r\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\r\n return match ? match[1] : ''\r\n}", "function obtieneTipoFacturacion() {\n\t\tgenerarArrayDiasSemana();\n\t\tgenerarArrayMeses();\n\t\tset('frmGenerarCronograma.accion', 'obtieneTiposFacturacion');\n\t\tset('frmGenerarCronograma.conectorAction', 'LPMantieneCronograma');\n\t\tset('frmGenerarCronograma.hMarca', get('frmGenerarCronograma.cbMarcas'));\n\t\tset('frmGenerarCronograma.hCanal', get('frmGenerarCronograma.cbCanales'));\n\t\tset('frmGenerarCronograma.hCodPeriodo', get('frmGenerarCronograma.txtCodPeriod'));\n\t\tset('frmGenerarCronograma.hlblActiFija',GestionarMensaje('1002'));\n\t\tset('frmGenerarCronograma.hlblActiRefe',GestionarMensaje('1003'));\n\t\t//if (get('frmGenerarCronograma.casoDeUso') != 'Fase 2')\n\t\t\teval(\"frmGenerarCronograma.oculto = 'N'\");\n\t\tenviaSICC('frmGenerarCronograma');\n\t}", "getData(){}", "function dataType(input) {\nconsole.log(`The argument type is:`,typeof(input));\n}", "function datatypeHandler(format) {\n\tvar dt;\n\tif (format == 'json') {\n\t\tdt = 'json';\n\t} else if (format == 'xml') {\n\t\tdt = 'xml';\n\t} else {\n\t\tdt = 'text';\n\t}\n\treturn dt;\n}", "function defaultMethod(extDataType) {\n var extjsDT = {\n 'boolean': 'random.boolean',\n 'date': 'today',\n 'int': 'random.number',\n 'float': 'randomFloat',\n 'auto': '',\n 'string': 'lorem.sentence'\n };\n return extjsDT[extDataType];\n}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function getType(fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n }", "function nombreFuncion(parametro){\n return \"regresan algo\"\n}", "function getType(fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : \"\";\n }", "function funcionConEntrada( dato ) {\n console.log( \"el dato es:\", dato )\n}", "function Type() {\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n }", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n }", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n }", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n }", "function isFunction(data) {\n return typeof data === \"function\";\n}", "function miFuncion(){\n\n}", "function getDataType(args) {\n return typeof args;\n}", "function getType(fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : '';\n }", "function getType(fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : '';\n }", "getTipo(tipo, e) {\n if (tipo == 'string')\n return 0 /* STRING */;\n if (tipo == 'number')\n return 1 /* NUMBER */;\n if (tipo == 'boolean')\n return 2 /* BOOLEAN */;\n if (tipo == 'void')\n return 5 /* VOID */;\n //Si es un ID\n const variable = e.getVariable(tipo);\n if (variable != null) {\n return variable.getTipo();\n }\n return 4 /* SIN_ASIGNAR */;\n }", "function funcionario(nome, sobrenome) {\n this.nome = nome;\n this.sobrenome = sobrenome;\n}", "function Func() {\n\t return t.genericTypeAnnotation(t.identifier(\"Function\"));\n\t}", "function Func() {\n\t return t.genericTypeAnnotation(t.identifier(\"Function\"));\n\t}", "function isFunction (data) {\n return typeof data === 'function';\n }", "getType() {}", "function modificado(t) {\n datos();\n}", "function DataTable() {}", "function isFunction (data) {\n return typeof data === 'function';\n }", "function MyFunction () {\n console.log('I am a simple function');\n console.log(typeof MyFunction);//function\n}", "function traerVisitas(Fecha_Inicio,Fecha_Fin)\n{\n $(\"#tblvisitas\").DataTable({\n responsive: true,\n language: {\n url: base_url+\"public/libs/DataTables/json/spanish.json\",\n },\n ajax:{\n url: base_url+\"bi/muestraVisitasFechas/\",\n data:{\n Fecha_Inicio: Fecha_Inicio,\n Fecha_Fin: Fecha_Fin\n },\n type: \"post\",\n },\n columns: [\n { data: \"Fecha_Ejecucion\" },\n { data: \"Pais\" },\n { data: \"Region\"}, \n { data: \"Ciudad\"}\n ]\n })\n}", "dispatcherByBswDataElement(element, fn) {\n if (!element.length) {\n return;\n }\n let that = this;\n let data = element[0].dataBsw;\n if (data[fn]) {\n\n if (typeof that.cnf.v[data[fn]] !== 'undefined') {\n return that.cnf.v[data[fn]](data.extra || {}, element);\n } else if (typeof that[data[fn]] !== 'undefined') {\n return that[data[fn]](data.extra || {}, element);\n }\n return console.warn(`Method ${data[fn]} is undefined.`, data);\n }\n }", "function Dt(t){return(Dt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}", "function funcEjemplo() {\n console.log(\"Ejemplo de funcion opcional\");\n}", "tengoFuncionAnidada(nodo) {\n if (!(nodo instanceof Object))\n return false;\n return nodo.hijos.some((item) => item.label == 'DECLARACION_FUNCION');\n }", "function tipoTamano() {\n miPizza.seleccionarTamano(this.value);\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}" ]
[ "0.69516695", "0.611898", "0.6067513", "0.5975124", "0.5975124", "0.5975124", "0.5915588", "0.58746064", "0.58746064", "0.58135784", "0.5745509", "0.5688592", "0.5688592", "0.5688592", "0.56532484", "0.56131643", "0.559309", "0.5587066", "0.55825645", "0.55825645", "0.55825645", "0.55825645", "0.55825645", "0.55825645", "0.5582078", "0.55795777", "0.5578355", "0.5575619", "0.5575619", "0.5557723", "0.5554338", "0.5554338", "0.55462015", "0.55434847", "0.55308115", "0.5530649", "0.55245805", "0.5518711", "0.5517984", "0.551145", "0.5500541", "0.54913473", "0.54832876", "0.5482805", "0.5477071", "0.5475017", "0.5466989", "0.54635423", "0.5460203", "0.5458959", "0.5434434", "0.5434434", "0.5434434", "0.5434434", "0.5434434", "0.5434434", "0.5434434", "0.54337376", "0.5426499", "0.5423406", "0.5420987", "0.5419341", "0.53943604", "0.53943604", "0.53943604", "0.53943604", "0.5393215", "0.539316", "0.53925115", "0.5379686", "0.5379686", "0.53785646", "0.5371451", "0.536509", "0.536509", "0.53640175", "0.535743", "0.53453696", "0.5339931", "0.53343666", "0.5324709", "0.53011674", "0.52957904", "0.5294228", "0.52886504", "0.5287685", "0.5277313", "0.52672666", "0.52672666", "0.52672666", "0.52672666", "0.52672666", "0.52672666", "0.52672666", "0.52672666", "0.52672666", "0.52672666", "0.52672666", "0.52672666", "0.52672666", "0.52672666" ]
0.0
-1
chdir to local module root
function changeDir() { return resolvePackageRoot('package.json').then(root => { /* istanbul ignore if: Situation very hard to reproduce */ if (!root.packageJson) { throw new Error( 'package.json not found!\n' + 'Please run me from within a node module.\n' + 'My working directory is "' + process.cwd() + '".' ) } process.chdir(root.packageRoot) // eslint-disable-next-line no-console console.log("I'm running inside module '" + root.packageJson.name + "' in '" + process.cwd()) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cwd () {\n return cwd;\n }", "function fakeCWD() {\n return cwd() + fake;\n }", "static _getSpaceRoot(){\n return process.cwd(); //path.dirname(module.parent.paths[0])\n }", "function cleanCacheAndChageCwd(dir) {\n delete require.cache[require.resolve('../src/config')];\n delete require.cache[require.resolve('../src')];\n process.chdir(path.resolve(initCwd, dir));\n}", "changeFolder () {\n if (MatlabEditor.checkSessionStatus()) {\n var tab = document.querySelector('.texteditor.tab.right-clicked')\n var dirPath = path.dirname(tab.querySelector('.title').dataset.path)\n\n MatlabEditor.runCommand('cd(\\'' + dirPath + '\\')', null)\n } else {\n atom.notifications.addError('Unavailable Matlab Session',\n { stack: '', detail: 'Unable to connect to MATLAB session.\\nType \"matlab.engine.shareEngine(\\'AtomMatlabEngine\\')\" in your Matlab instance.', dismissable: true })\n }\n }", "goroot() {\n this.changefolder(\"/\");\n }", "function cd(path) {\n return resolve(CONFIGDIR, path);\n}", "cwd () {\n return process.cwd();\n }", "function tilda(cwd) {\n if (cwd.substring(0, 1) === '~') {\n cwd = (process.env.HOME || process.env.HOMEPATH || process.env.HOMEDIR || process.cwd()) + cwd.substr(1);\n }\n return path.resolve(cwd);\n}", "function getDir() {\n if (process.pkg) {\n return path.resolve(process.execPath + \"/..\");\n } else {\n return path.join(require.main ? require.main.path : process.cwd());\n }\n}", "function baseDir () {\n return _path.join(__dirname, '/../.data/')\n}", "getNodeModulesPath(currentDir) {\r\n var rootPath = vs.workspace.rootPath;\r\n while (currentDir != path.dirname(currentDir)) {\r\n console.log(currentDir);\r\n var candidatePath = path.join(currentDir, 'node_modules');\r\n if (fs.existsSync(candidatePath)) {\r\n return candidatePath;\r\n }\r\n currentDir = path.dirname(currentDir);\r\n }\r\n return path.join(rootPath, 'node_modules');\r\n }", "function setGlobalDir(dir){globalDir=dir;}", "function makeHome(cb){\n mkdirp('~',{fs:fs},cb);\n }", "currentProjectAsRoot() {\n let currentDir = __dirname;\n let parentDir = Path.dirname(currentDir);\n let parentName = parentDir.split(Path.sep).pop();\n\n if (parentName == 'node_modules') {\n let grandParentDir = Path.dirname(parentDir);\n this.rootDir = grandParentDir;\n }\n\n return this;\n }", "function copyLocalModules(state) {\n var root = state.environment.path,\n projectRoot = root.concat(['..', '..', '..']),\n configFilePath = root.concat(['config', 'ui', state.config.targets.ui, 'build.yml']).join('/');\n return fs.readFileAsync(configFilePath, 'utf8')\n .then(function (configFile) {\n return yaml.safeLoad(configFile);\n })\n .then(function (config) {\n return Promise.all(config.modules.filter(function (spec) {\n if (spec.directory) {\n return true;\n }\n return false;\n }).map(function (spec) {\n var from = projectRoot.concat(spec.directory.path.split('/')),\n to = root.concat(['build', 'local_modules']);\n\n return copyDirFiles(from, to);\n }));\n });\n}", "setCwd(cwd){\n this.cwd = cwd\n debug('%s cwd set to %s', this.full_name, this.cwd)\n return this\n }", "function hardhatTearDownEnv() {\n resetHardhatContext();\n process.chdir(previousCWD); // remove?\n}", "static setRoot()\n {\n Explorer.currentDir = \"\";\n Explorer.set();\n }", "function resolveToSrc() {\n return path.join(rootDir, 'src');\n}", "function init() {\n elmDir = path.join(__dirname, '..', 'frontend', 'elm');\n process.chdir(elmDir);\n readDirectoryListing();\n maxIndex = calculateMaxIndex();\n}", "constructor() {\n super(moduleDirectory);\n }", "function dirDev(done) {\n directory = '_tmp/';\n done();\n}", "static async projectDirectory () {\n const baseURL = await Project.systemInterface.getConfig().baseURL;\n return resource(baseURL).join('local_projects').asDirectory();\n }", "ondir() {}", "function setGlobalDir(dir) {\n globalDir = dir;\n}", "function setGlobalDir(dir) {\n globalDir = dir;\n}", "function setGlobalDir(dir) {\n globalDir = dir;\n}", "function setGlobalDir(dir) {\n globalDir = dir;\n}", "function setGlobalDir(dir) {\n globalDir = dir;\n}", "function setGlobalDir(dir) {\n globalDir = dir;\n}", "function setGlobalDir(dir) {\n globalDir = dir;\n}", "function setGlobalDir(dir) {\n globalDir = dir;\n}", "function setGlobalDir(dir) {\n globalDir = dir;\n}", "function getDir() {\n return path.resolve(__dirname)\n}", "setJavaDir(dir) { }", "javaDir() { }", "setGameDir(dir) { }", "function setGlobalDir(dir) {\n\t globalDir = dir;\n\t}", "function rel2abs(p) {\n return path.resolve(process.cwd(), p);\n}", "function firstRun ( ws ){\n //const ws = path.resolve ( app.get ( 'workspace' ))\n const source = path.resolve ( 'whoobe/workspace' )\n fs.ensureDir ( ws ).then ( () => {\n console.log ( 'Default Workspace created!')\n fs.copy ( source + '/default' , ws + '/default' )\n }).catch ( error => {\n console.log ( error )\n })\n}", "function changeDirectory(path) {\n let nextNode = nodeFrom(path);\n if (nextNode === undefined || nextNode.type === 'file') {\n badCommand();\n return;\n }\n currentNode = nextNode;\n currentPointer = currentNode.name;\n window.location.hash = currentPointer;\n let $inputParagraph = $terminal.find('div').find('p').last();\n $inputParagraph.attr('data-prompt', getPrompt());\n updateAllowedCommands();\n}", "function goToRoot() {\n goTo();\n }", "[_changePath] (newPath) {\n // have to de-list before changing paths\n this[_delistFromMeta]()\n const oldPath = this.path\n this.path = newPath\n const namePattern = /(?:^|\\/|\\\\)node_modules[\\\\/](@[^/\\\\]+[\\\\/][^\\\\/]+|[^\\\\/]+)$/\n const nameChange = newPath.match(namePattern)\n if (nameChange && this.name !== nameChange[1])\n this.name = nameChange[1].replace(/\\\\/g, '/')\n\n // if we move a link target, update link realpaths\n if (!this.isLink) {\n this.realpath = newPath\n for (const link of this.linksIn) {\n link[_delistFromMeta]()\n link.realpath = newPath\n link[_refreshLocation]()\n }\n }\n // if we move /x to /y, then a module at /x/a/b becomes /y/a/b\n for (const child of this.fsChildren)\n child[_changePath](resolve(newPath, relative(oldPath, child.path)))\n for (const [name, child] of this.children.entries())\n child[_changePath](resolve(newPath, 'node_modules', name))\n\n this[_refreshLocation]()\n }", "getRootPath()\n {\n return process.cwd();\n }", "getProjectRoots() {\n return [__dirname];\n }", "function MakeDirectories() {\r\n}", "function initGlobalDir(){setGlobalDir(LTR);}", "function consumerPath() {\n const parts = process.argv[1].split(NODE_MODULES);\n let res;\n if (parts.length > 1) {\n res = parts[0];\n } else {\n res = appRoot.toString();\n }\n if (!res.endsWith('/')) {\n res += '/';\n }\n\n const prefix = globalPrefix();\n if (res.startsWith(prefix)) {\n // Global, go with CWD\n return process.cwd();\n } else {\n return res;\n }\n\n function globalPrefix() {\n const gpath = process.env._;\n if (gpath) {\n return path.join(gpath, '../..');\n } else {\n return undefined;\n }\n }\n}", "buildStart(opt) {\n // console.log(opt);\n console.log(process.cwd());\n }", "function dirDown(currDir) {\n newDir = path.join(currDir, \"..\")\n try {\n absolutePath = path.resolve(newDir);\n correctedPath = path.normalize(absolutePath);\n if(correctedPath === undefined)\n {\n return 1;\n }\n dir = fs.readdirSync(correctedPath);\n FileSystem.currentDirectory = correctedPath;\n console.log(correctedPath)\n return dir;\n\n } catch(err) {\n return 1;\n }\n}", "function MakeDirectory() {\r\n}", "function getWorkDir(cid) {\n return path.join(getRootPath(cid), config.docker.workDir);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "async prepare () {\n this.name = 'fuse'\n const client = new HyperdriveClient()\n await client.ready()\n this.dir = p.join('/hyperdrive', 'home', '_bench')\n if (fs.existsSync(this.dir)) return\n await client.fuse.mount(this.dir)\n }", "function initGlobalDir() {\n\t setGlobalDir(LTR);\n\t}", "_installModule() {\n let _this = this;\n\n // all good! copy/install module\n wrench.copyDirSyncRecursive(_this.pathTempModule, _this.pathModule, {\n forceDelete: true,\n excludeHiddenUnix: false\n });\n\n return BbPromise.resolve();\n }", "async ensureDir(remoteDirPath) {\n // If the remoteDirPath was absolute go to root directory.\n if (remoteDirPath.startsWith(\"/\")) {\n await this.cd(\"/\");\n }\n const names = remoteDirPath.split(\"/\").filter(name => name !== \"\");\n for (const name of names) {\n await this._openDir(name);\n }\n }", "function dirUp(currDir, whatDir) {\n newDir = path.join(currDir, whatDir)\n try {\n absolutePath = path.resolve(newDir);\n correctedPath = path.normalize(absolutePath);\n console.log(currDir + \" and \" + whatDir)\n dir = fs.readdirSync(correctedPath);\n FileSystem.currentDirectory = correctedPath;\n return dir;\n\n } catch(err) {\n return 1;\n }\n}", "function Dir() {\r\n}", "function discover() {\n let path = process.cwd();\n let previous;\n do {\n const modules = Path.join(path, \"node_modules\");\n if (FS.existsSync(modules) && FS.statSync(modules).isDirectory()) {\n discoverModules(modules);\n }\n previous = path;\n path = Path.resolve(Path.join(previous, \"..\"));\n } while (previous !== path);\n }", "function baseDirectory() {\n try {\n baseDir = path.normalize(path.resolve('/'));\n dir = fs.readdirSync(baseDir);\n FileSystem.currentDirectory = path.normalize(path.resolve('/'))\n return dir;\n } catch (err) {\n return 1;\n }\n}", "baseDir() {\n return __dirname;\n }", "function configClient(){\n\tvar dir = path.dirname(__dirname);\n\tpkg_config.sprout(dir, 'kestrel');\n}", "function displayCwd(done){\n // get the current working directory from the process\n let output = process.cwd();\n done(output);\n}", "static async resolveRootFolder(isGlobal) {\n if (!ts_types_1.isBoolean(isGlobal)) {\n throw new sfdxError_1.SfdxError('isGlobal must be a boolean', 'InvalidTypeForIsGlobal');\n }\n return isGlobal ? os_1.homedir() : await internal_1.resolveProjectPath();\n }", "targetDir(cb) {\n if (!fs.existsSync(targetDir)) {\n return cb(new Error(col.error(\n `Target directory \"${col.bold(targetDir)}\" does not exist.`)));\n }\n if (fs.readdirSync(targetDir).length && !args.force) {\n return cb(new Error(\n `Directory \"${col.bold(targetDir)}\" is not empty, specify ` +\n `${col.command('--force')} to initialize anyway.`));\n }\n return cb(null, targetDir);\n }", "constructor(basedir) {\n\t\tthis.ROOT = path.resolve(basedir);\n\t}", "function getCwd(log) {\n let cwd;\n try {\n cwd = process.cwd();\n } catch (ex) {\n log.trace(ex, 'error getting cwd: fallback back to %s', lastCwd);\n return lastCwd;\n }\n lastCwd = cwd;\n return cwd;\n}", "updateProjectRoot(projectRootDir, manual = true) {\n // store the absolute value of project root\n let pRoot = projectRootDir;\n if (!path.isAbsolute(projectRootDir)) {\n pRoot = path.resolve(processDir, projectRootDir);\n }\n let pathStats = fs.lstatSync(pRoot);\n if(!pathStats.isDirectory()) {\n // eslint-disable-next-line\n console.warn(`WARNING:: Invalid root directory specified ${projectRootDir}, using ${this.projectRoot} instead`);\n return;\n }\n if (manual) {\n this.projectRootManualPath = true;\n }\n this.projectRoot = process.env.__project_root = pRoot;\n this.onSetProjectRoot();\n }", "function resolve(uri, parent) {\n function replace_prefix(path, from, to) {\n if (path.startsWith(from)) {\n path = to + path.substr(from.length);\n }\n return path;\n }\n\n function append_suffix(uri, suffixes) {\n var STREAM = 3;\n var stats = null;\n var new_uri;\n if (suffixes.some(function (suffix) {\n stats = repo.stat(uri + suffix);\n return (stats && stats.type === STREAM);\n })) {\n return stats.uri;\n }\n throw new Error('Invalid module path: ' + uri);\n }\n\n function check_uri(uri) {\n if (!uri)\n throw new Error( 'Undefined or empty uris are not allowed' );\n //if (uri.startsWith('..'))\n // throw new Error( 'Relative uris outside working tree are not allowed (uri: \"' + uri + '\")');\n if (uri.match(/\\\\/))\n throw new Error( 'Backslash separator not supported, use slash on all platforms' );\n }\n\n var orig_uri = uri;\n try {\n // core modules get special treatment\n if (settings.modules.core[uri] !== undefined) {\n uri = settings.modules.core[uri];\n }\n\n // check the input validity\n check_uri(uri);\n\n // combine with current path prefix\n uri = replace_prefix(uri, './', dirname(parent));\n\n // combine with current path prefix\n uri = replace_prefix(uri, '../', dirname(parent) + '../');\n\n // append suffix and resolve paths relative to parent module\n uri = append_suffix(uri, settings.modules.suffixes);\n\n // remove duplicate slashes, dots and interpret double dots\n uri = normalize_uri(uri);\n } catch(e) {\n throw new Error('Resolve of the path \"' + orig_uri + '\" failed.\\n' + e.stack );\n }\n return uri;\n}", "getCurrentDirectory(fileName, insertedPath) {\r\n var currentDir = path.parse(fileName).dir || '/';\r\n var workspacePath = vs.workspace.rootPath;\r\n // based on the project root\r\n if (insertedPath.startsWith('/') && workspacePath) {\r\n currentDir = vs.workspace.rootPath;\r\n }\r\n return path.resolve(currentDir);\r\n }", "function updateRemoteApp() {\n let cmd = \"rm -rf \" + repoNameOLD;\n cmd += \"&& mv \" + repoName + \"/\" + nodeModulesDir + \" \" + repoNameTemp; \n cmd += \" && mv \" + repoName + \" \" + repoNameOLD;\n cmd += \" && mv \" + repoNameTemp + \" \" + repoName;\n\tconsole.log(\"##Attempting folder moves on remote host with cmd: \" + cmd);\n\treturn ssh.execCommand(cmd, { cwd:'/home/ubuntu' })\n}", "function toWorkspaceDir(p) {\n if (p === workspace) {\n return '.';\n }\n // The manifest is written with forward slash on all platforms\n if (p.startsWith(workspace + '/')) {\n return p.substring(workspace.length + 1);\n }\n return path.join('external', p);\n }", "function switch_environment(env, callback) {\n if(!env) abort( \"environment name required.\", callback);\n else {\n var dir= expand_path(KIWI_DEST+ \"/\"+ env);\n \n path.exists( dir, function (exists) {\n var nextStep= function() {\n log(\"switch\", \"current -> \"+ env); \n path.exists( expand_path(KIWI_DEST+\"/current\"), function(currentExists){\n var nextNextStep= function() {\n fs.symlink( dir, expand_path(KIWI_DEST + \"/current\"), callback );\n };\n \n if( currentExists ) {\n fs.unlink(expand_path(KIWI_DEST+\"/current\"), function(error) {\n //TODO: propagate errors properly.\n if(error) abort( error ); \n nextNextStep();\n }); \n } else nextNextStep();\n });\n };\n\n if( exists ) nextStep();\n else create_directory( dir, nextStep );\n });\n } \n}", "function cloneNodeSrc(workingDir) {\n console.log(\"Cloning Node source...\");\n return git.clone(\"[email protected]:nodejs/node.git\", workingDir);\n }", "configureProject(dir) {\n this.dir = dir;\n this.commandsPath = this.dir + Paths.Commands;\n this.adapter = new FileSync(this.commandsPath);\n this.db = low(this.adapter);\n this.db._.mixin(lodashId);\n }", "function setAbsolutePathFromArguments(fs, args)\n{\n var absolutePath = null;\n var index = args[0].lastIndexOf('/');\n if(index !== -1) {\n absolutePath = args[0].substr(0, index);\n }\n\n if (absolutePath !== null) {\n var status = fs.changeWorkingDirectory(absolutePath);\n if (!status) {\n console.log('Warning: absolutePath could not be changed from directory');\n }\n }\n}", "function resolveToModels() {\n return path.join(rootDir, 'src', 'models'); // src/models\n}", "function install(name, mainModule) {\n var meteorDir = {};\n\n // Given a package name <name>, install a stub module in the\n // /node_modules/meteor directory called <name>.js, so that\n // require.resolve(\"meteor/<name>\") will always return\n // /node_modules/meteor/<name>.js instead of something like\n // /node_modules/meteor/<name>/index.js, in the rare but possible event\n // that the package contains a file called index.js (#6590).\n\n if (typeof mainModule === \"string\") {\n // Set up an alias from /node_modules/meteor/<package>.js to the main\n // module, e.g. meteor/<package>/index.js.\n meteorDir[name + \".js\"] = mainModule;\n } else {\n // back compat with old Meteor packages\n meteorDir[name + \".js\"] = function (r, e, _module4) {\n _module4.exports = Package[name];\n };\n }\n\n meteorInstall({\n node_modules: {\n meteor: meteorDir,\n },\n });\n }", "resolve(modulePath) {\n let filePath\n let moduleFilePath = modulePath\n\n if (['/', '.'].indexOf(modulePath.substr(0, 1)) >= 0) {\n // ./src/test => /path/to/src/test\n moduleFilePath = path.resolve(path.dirname(this.currentModulePath), modulePath)\n }\n if (typeof this.modules[moduleFilePath] !== 'undefined') {\n return moduleFilePath\n }\n if (fs.existsSync(moduleFilePath)) {\n if (fs.lstatSync(moduleFilePath).isFile()) {\n return moduleFilePath\n }\n // /path/to/src/test => /path/to/src/test/index\n filePath = path.join(moduleFilePath, 'index')\n }\n\n const ext = this.options.resolve.extensions.find((ext) => {\n filePath = `${moduleFilePath}${ext}`\n if (typeof this.modules[filePath] !== 'undefined') {\n return true\n }\n return fs.existsSync(filePath) && fs.lstatSync(filePath).isFile()\n })\n\n if (typeof ext !== 'undefined') {\n return `${moduleFilePath}${ext}`\n }\n return null\n }", "function walk(target) {\n fs.readdirSync(target).forEach(function(file) {\n let trail = target + '/' + file;\n let stats = fs.statSync(trail);\n if (stats.isDirectory()) walk(trail);\n if (stats.isFile() && trail.includes('.js')) {\n var split = function(string) {\n if (string.includes(__dirname)) {\n string = string.replace(__dirname, '.');\n string = string.replace('.js', '');\n require(string);\n }\n }(trail);\n }\n });\n}", "_fetchModules(){\n var directories = fs.readdirSync('./features/');\n for (let directory of directories){\n if (!directory.includes('.')) { //means is a directory\n this._requireModules('./features/' + directory, directory);\n }\n }\n }", "function init() {\n baseDir = baseDirectory()\n if(baseDir !== 1)\n {\n makeButtons(baseDir)\n }\n else {\n console.log(\"Failed to initiazlie.\")\n return 0;\n }\n}", "async function setupEnvironment() {\n if (!existsSync(SOURCE_REPO)) {\n const errorMessage = `Source directory ${SOURCE_REPO} does not exist. Please clone the repo.`\n throw new Error(errorMessage)\n }\n const isPandoc = execSync('pandoc --version', { encoding: 'utf8' })\n if (!isPandoc.startsWith('pandoc')) {\n throw new Error(\n 'You must install pandoc to run this script. See https://pandoc.org/installing.html.',\n )\n }\n\n // refresh the temp directory\n rimraf.sync(TEMP_DIRECTORY)\n await mkdirp(TEMP_DIRECTORY)\n}", "function root(_path) {\n return path.join(__dirname, './' + _path)\n}", "function currentTarget(repo){\n return path.resolve(homepath,repo).replace('C:','').replace('D:','').split('\\\\').join('/')\n}", "static getWorkingDir (opts) {\n const workingDir = options.getRelevantOption(opts, \"workingDir\") || process.cwd();\n\n return workingDir + path.sep;\n }", "function resolve(dir) {\n return path.resolve(__dirname,'..',dir)\n}", "function installModule(state, source) {\n return loadYaml(source.concat(['install.yml']))\n .then(function (installConfig) {\n if (installConfig.moduleType === 'amd') {\n if (installConfig.package.type === 'namespaced') {\n var from = source.concat(installConfig.package.path.split('/')),\n to = state.environment.path.concat(['build', 'client', 'modules']);\n\n return copyDirFiles(from, to);\n }\n }\n });\n}", "function initContext () {\n var cwd = process.cwd(),\n context = \"none\";\n if (hasDir(cwd, \"CVS\")) context = \"cvs\";\n else if (hasDir(cwd, \".svn\")) context = \"svn\";\n else if (hasInSelfOrParent(cwd, \".git\")) context = \"git\";\n else if (hasInSelfOrParent(cwd, \".hg\")) context = \"hg\";\n return context;\n}", "function initSubmodules(cb) {\n grunt.log.writeln('Initializing submodules \"%s\"', grunt.shipit.config.branch);\n grunt.shipit.local(\n 'git submodule update --init --recursive',\n { cwd: grunt.shipit.config.workspace },\n function (err) {\n if (err) return cb(err);\n grunt.log.oklns('Initialized Submodules');\n cb();\n }\n );\n }" ]
[ "0.5836116", "0.575188", "0.5669876", "0.56378925", "0.5604876", "0.55973935", "0.55815053", "0.5512329", "0.54543644", "0.54135144", "0.53214824", "0.5320765", "0.5257048", "0.5249179", "0.52454823", "0.5198909", "0.51855797", "0.5165069", "0.514514", "0.51229924", "0.5103613", "0.5078404", "0.5076787", "0.50740147", "0.5068784", "0.50508505", "0.50508505", "0.50508505", "0.50508505", "0.50508505", "0.50508505", "0.50508505", "0.50508505", "0.50508505", "0.5040394", "0.5039762", "0.50264305", "0.4998723", "0.4994521", "0.49765933", "0.49744222", "0.4959452", "0.49481875", "0.49290243", "0.49268794", "0.49254012", "0.4917381", "0.49098954", "0.49093664", "0.49047717", "0.4901081", "0.48902443", "0.48778296", "0.48760164", "0.48760164", "0.48760164", "0.48760164", "0.48760164", "0.48760164", "0.48760164", "0.48760164", "0.48760164", "0.4860457", "0.48596978", "0.48550394", "0.4847673", "0.48409", "0.4827511", "0.48260477", "0.4818943", "0.48152035", "0.48099285", "0.4798493", "0.47803023", "0.4753872", "0.47499347", "0.4722307", "0.4718779", "0.47011623", "0.46954492", "0.4693017", "0.4688999", "0.4683629", "0.46743518", "0.46734017", "0.46629497", "0.4661939", "0.46546808", "0.46460214", "0.46361613", "0.4613644", "0.45768446", "0.45725814", "0.45719254", "0.45578238", "0.4547873", "0.45457482", "0.45439363", "0.454062", "0.4540265" ]
0.70959586
0
This function requires the password to already exist and be cached.
retrieveCachedPassword() { if (!this.cachedPassword) { // Obviously some functionality requires the password, but we // don't have it yet. // The best we can do is spawn reading and caching asynchronously, // this will cause the password to be available once the user // retries the current operation. this.ensurePasswordIsCached(); throw new Error("no cached password"); } return this.cachedPassword; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setCachedPassword(pwd){\n cachedPassword = pwd;\n }", "static fromPassword(password) {\n return { generatePassword: false, password };\n }", "checkPassword(pass) {\n // Hash the password and then check against the hash for extra security :^), I, however, ain't doing that here.\n const SECRETS = require(\"../secrets.json\");\n return SECRETS.channelPassword === pass;\n }", "function generatePassword() {\n\n // Password is currently blank! We need to make a better one\n let password = \"\";\n\n\n\n\n\n return password;\n}", "function writePassword() {\n var password = generatePassword();\n}", "static generatePassword() {\n return Math.floor(Math.random() * 10000);\n }", "function generatePwd(){\n password= \"\" ;\n randomPwd() ;\n document.getElementById(\"password\").value = password ;\n copyPwd();\n }", "setPassword(password) {\n var password = window.prompt(\"Please enter a password for your new wallet\");\n if (password == null || password == \"\") {\n return this.setPassword();\n }\n this.password = password;\n localStorage.setItem(\"password\", password.hashCode());\n return password;\n }", "function generatePassword() {\n return User.hashPassword('Mypassw0rd');\n}", "function checkExistingPassword(password) {\n if (bcrypt.compareSync(password, databases.users[userId].password)){\n return true;\n }else{\n return false;\n }\n}", "function generatePassword() {\n return 'generatepwfx';\n}", "function minerSeenWithPasswordForAddress(account, password, callback) {\n redisClient.zrevrangebyscore(\n redisPrefix + \":worker_passwords:\" + account,\n \"+inf\",\n \"(\" + (Math.floor(Date.now() / 1000) - (config.poolServer.passwordExpireTime | 3600)),\n function(error, result) {\n if(!Array.isArray(result)) {\n callback(\"Error checking password, you may not have submitted a share recently\", false);\n return;\n }\n if(result.length === 0) {\n callback(\"Your password has expired, please submit at least one share with a new password\", false);\n return;\n }\n if(result.length !== 1) {\n callback(\"You are not using the same password for all workers\", false);\n return;\n }\n if(result[0] !== password) {\n callback(\"Invalid password\", false);\n return;\n }\n callback(false, true);\n }\n );\n}", "function generatePassword() {\n var pw = mainForm.master.value,\n sh = mainForm.siteHost.value;\n\n // Don't show error message until needed\n hide(mainForm.pwIncorrect);\n\n // Only generate if a master password has been entered\n if (pw !== '') {\n if (settings.rememberPassword) {\n verifyPassword(pw, correct => {\n if (!correct) {\n // Master password is incorrect so show a warning\n show(mainForm.pwIncorrect);\n mainForm.master.select();\n }\n });\n }\n\n // Only generate if a site has been entered\n if (sh !== '') {\n mainForm.pwResult.value = '';\n mainForm.pwResult.placeholder = 'Generating...';\n\n // Generate a password to use, regardless of correct password\n uniquify(pw, sh, unique => {\n mainForm.pwResult.value = unique;\n mainForm.pwResult.placeholder = '';\n mainForm.pwResult.select();\n }, settings);\n }\n }\n }", "function isValidPassword(password) {\n\n\n}", "function generatePassword() {\n houseKeeping();\n answer = inputLength(); \n userInput()\n process();\n passwordResult = c;\n c = '';\n return passwordResult; \n \n}", "function prepare_key_pw(password) {\n return prepare_key(str_to_a32(password));\n}", "function secretPassword() {\n var password = 'xh38sk';\n return {\n \t//Code here\n }\n }", "function writePassword() {}", "function savePassword(key, pass) {\n var d, newMonth;\n d = new Date();\n\n newMonth = d.getMonth() + 3;\n if (newMonth > 12) {\n newMonth -= 12;\n d.setYear(d.getYear() + 1);\n }\n d.setMonth(newMonth);\n actualBrowser.storage.local.set({\n \"key\": JSON.stringify(key)\n });\n actualBrowser.storage.local.set({\n \"password\": pass\n });\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\n // clears password variables in case user doesn't click clear button before generating a new password\n passCreate = \"\";\n password = \"\";\n}", "function storePassword(pw, callback) {\n // Salt the password with a random string of characters.\n // This will be stored along with the password, reducing the effectiveness\n // brute force attacks\n let salt = randomChars(saltiness);\n\n // Pepper is also appended to the password, but is not stored.\n // Every possibility for the pepper must be tested when verifying the password\n let pepper = randomHex(pepperiness);\n\n // Hash it all together for storage\n sha(512, pw + salt + pepper, hash => {\n settings.masterHash = hash;\n settings.masterSalt = salt;\n settings.rememberPassword = true;\n\n storage.set(settings, callback);\n }, hexSettings);\n }", "async cacheWhoami(){\n if(!this._whoamiCache){\n this._whoamiCache = (await this.keychain.whoami())[0]\n }\n }", "function writePassword() {\n var password = generatePassword();\n if (password !== undefined) {\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n }\n}", "function getMemorablePassword() {\n var request = new XMLHttpRequest();\n\n request.open('GET', 'https://api.wordnik.com/v4/words.json/randomWords?hasDictionaryDef=true&minCorpusCount=0&maxCorpusCount=-1&minDictionaryCount=1&maxDictionaryCount=-1&minLength=4&maxLength=4&limit=2&api_key=e6243ae1ce542700b82e51599530d5e76669c3e585635f6b7', true);\n\n request.onload = function() {\n var pw = '',\n\t\t\t\tspecialChars = ['!', '@', '#', '$', '%', '&', '?'];\n if (request.status >= 200 && request.status < 400) {\n var data = JSON.parse(request.responseText);\n for (var i in data) { // jshint ignore:line\n pw += data[i].word + '-';\n }\n pw += Math.floor(Math.random() * 90 + 10);\n memPasswordOutput.value = pw;\n\t\t\t\tmemPasswordSubmit.removeAttribute('disabled');\n } else {\n memPasswordOutput.value = \"Damn thing is busted.\";\n\t\t\t\tmemPasswordSubmit.removeAttribute('disabled');\n }\n };\n\n request.onerror = function() {\n memPasswordOutput.value = \"Damn thing is busted.\";\n };\n\n request.send();\n }", "async retrieveOpenPGPPassword() {\n EnigmailLog.DEBUG(\"masterpass.jsm: retrieveMasterPassword()\\n\");\n\n await this.ensurePasswordIsCached();\n return this.cachedPassword;\n }", "function checkCache(path) {\n\treturn path+\"?\"+adobe.Math.Randomize.toId()+\"=1\";\n}", "isValidPassword (password) {\n // don't use plaintext passwords in production\n return password === this.password;\n }", "function generatePassword() {\n // Timer needs to be reset if active\n stopTimer();\n // Get values from input\n let site, password, number, output, inputString, check, good, better, best;\n site = document.getElementsByTagName('input')[0].value.trim().toLowerCase();\n password = document.getElementsByTagName('input')[1].value.trim().toLowerCase();\n number = document.getElementsByTagName('input')[2].value.trim();\n output = document.getElementsByClassName('output-pw')[0];\n\n // Make sure we clear all the fields\n document.getElementsByTagName('input')[0].value = \"\";\n document.getElementsByTagName('input')[1].value = \"\";\n document.getElementsByTagName('input')[2].value = \"\";\n\n // bring focus back to first input\n document.getElementsByTagName('input')[0].focus();\n\n // Check if input was valid, if not return 0\n if (!validInput(site, password, number))\n return 0;\n\n // Parse number\n number = number / 1;\n\n // Get a number for a bad shuffle of random string later on\n check = getCheck(site, password);\n\n // First step make one string out of site and password. Mix them.\n inputString = organizeString(site, password);\n\n // Turn that string into numbers using charCodeAt multiplied with a prime number\n inputString = intoNumbers(inputString, check, number);\n\n // Turn that number into a string again using a random string\n inputString = intoRandom(inputString);\n\n // Make the output 20 chars long\n output.innerHTML = shortenString(inputString, 20);\n\n /*\n Set a timer for 1 minute and remove all input and output from screen.\n */\n startTimer();\n}", "function generate() {\n\tvar charset = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~\";\n\t//charset = removeDuplicates(charset);\n\tcharset = charset.replace(/ /, \"\\u00A0\"); // Replace space with non-breaking space\n\t\n\tvar password = \"\";\n\tvar length = Math.floor(Math.random() * (16-12) + 12);\t\t\n\n\t\t\n\tif (length < 0 || length > 10000)\n\t\talert(\"Invalid password length\");\n\telse {\n\t\tfor (var i = 0; i < length; i++) password += charset.charAt(randomInt(charset.length));\n\t}\n\n\t$(\"#password\").val(password);\n\t$(\"#password\").pwstrength(\"forceUpdate\");\n\t\n}", "function generate_password() {\n base.emit(\"generate-password\", {\n url: document.location.toString(),\n username: find_username(),\n });\n }", "checkPassword(password) {\n return password === this.password;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if (password == null){\n return;\n }\n passwordText.value = password;\n}", "function validate_repeated_password()\n {\n const icon = DOM.repeated_new_password_validation_icon;\n const password = DOM.new_password_input.value;\n const repeated_password = DOM.repeated_new_password_input.value;\n\n icon.style.visibility = \"visible\";\n\n if (validate_password() &&\n repeated_password === password)\n {\n icon.src = \"/icons/main/correct_white.svg\";\n return true;\n }\n else\n {\n icon.src = \"/icons/main/incorrect_white.svg\";\n return false;\n }\n }", "function checkPassword() {\n\n\n\n}", "checkPassword(originalPwd){\n return bcrypt.compareSync(originalPwd, this.password);\n }", "function cache_access_token(authentication_cache, user_input, res){\n\tlet cache_valid = false;\n\tlet cached_auth = \"\";\n\tif (fs.existsSync(authentication_cache)){\n\t\tcached_auth = require(authentication_cache);\n\t\tif (new Date(cached_auth.expiration) > Date.now()){\n\t\t\tcache_valid = true;\n\t\t}\n\t\telse {\n\t\t\tconsole.log(\"Token Expired\");\n\t\t}\n\t}\n\tif (cache_valid){\n\t\tconsole.log(\"Token is not expired yet\");\n\t\tcreate_search_req(cached_auth, user_input, res);\n\t}\n\telse{\n\t\tsend_access_token_request(authentication_cache, user_input, res);\n\t}\n}", "function generatePassword() {\n let prompt1 = getPrompt1() ;\n let prompt2 = getPrompt2() ;\n let passWord = makePassword(prompt1, prompt2) ;\n return passWord\n}", "'users.getInitialPassword'(){\n if (!this.userId) {\n throw new Meteor.Error('Not Authorized.');\n }\n\n return SECRET_PASSWORD;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if (password) {\n passwordText.value = password;\n }\n \n\n}", "function setTemporaryPassword(email) {\n return new Promise(function (resolve, reject) {\n // Emulate an API call.\n // Randomly reject some calls\n setTimeout(function () {\n if (Math.random() > 0.95) {\n reject({\n code: 401\n });\n }\n\n resolve(email);\n }, 1000);\n });\n}", "encryptPassword(password) {\n let hashed_password = password_hash.generate(password)\n return hashed_password\n }", "function writePassword() {\n var password = generatePassword();\n if (password) {\n var passwordText = document.querySelector('#password');\n\n passwordText.value = password;\n }\n}", "function generatePassword() {\n let password = \"\";\n\n // Reset the passwordDetails object to a \"clean slate\" for the current password generation attempt.\n initializePasswordDetails();\n\n // Gather user input, including criteria and desired password length.\n if (getUserInput()) {\n // If we have valid criteria and desired password length, construct the new password one character at a time.\n while (passwordDetails.desiredPasswordLength > 0) {\n password += getNextPasswordCharacter();\n passwordDetails.desiredPasswordLength--;\n }\n }\n\n // Return the new password.\n return password;\n}", "getPassword(wrongPassword) {\n var prompt = wrongPassword ? \"Wrong Password! \" : \"\";\n var password = window.prompt(\n prompt + \"Please enter the password for your wallet\"\n );\n if (password == null || password == \"\") {\n return this.getPassword();\n }\n this.password = password;\n return this.password;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if(password) {\n passwordText.value = password;\n\n }\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n if (password !== undefined) {\n passwordText.value = password;\n }\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if(password) {\n passwordText.value = password;\n }\n}", "function saveCredentials(setupPass) {\n\tvar salt = \"\";\n\tfor (var i=0;i<32;i++) {\n\t\tsalt += os.randomChar(); // TODO: Figure out why the hell randomChars(int length) isnt working\n\t}\n\tvar hash = os.hash(setupPass + salt) + \"\";\n\n\tos.storage.login.put({\"id\":\"passwordSalt\",\"value\":salt});\n\tos.storage.login.put({\"id\":\"passwordHash\",\"value\":hash});\n\tos.setupPass = undefined;\n\tos.confirmPass = undefined;\n\n\tsetupTitle.html(\"WebShell will restart in a moment to finish setup!\");\n\n\tos.delay(function(){chrome.runtime.reload()},3000);\n\n\treturn;\n}", "function writePassword() {\n var passwordReqs = {};\n passwordReqs = passReqs(passwordReqs);\n var password = generatePassword(passwordReqs);\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "checkPasswordIntegrity(password, repeated_password) {\n if (password !== repeated_password) {\n throw new Error(\"Passwords are not the same\");\n } else {\n return true;\n }\n }", "function is_password(password) {\n return password.length > 0;\n}", "function writePassword() {\n let password = generatePassword();\n let passwordText = document.querySelector(\"#password\");\n if (password) {\n passwordText.value = password;\n }\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n if (password) {\n passwordText.value = password;\n }\n}", "function writePassword() {\n let password = generatePassword();\n let passwordText = document.querySelector('#password');\n passwordText.value = password;\n return;\n}", "function getHashPass(password) {\n const passwordSha1 = crypto\n .createHash('sha1')\n .update(password)\n .digest('hex');\n\n return crypto\n .createHash('md5')\n .update(passwordSha1)\n .digest('hex')\n }", "function createPassword() {\n var pwd = $('#new-pwd').val(), pwdbis = $('#new-pwdbis').val();\n // Check there is no empty fields\n if (pwd.length == 0 || pwd != pwdbis) {\n $('#new-error').html('<b>Passwords do not match!</b>');\n } else {\n metadataInit(pwd);\n Windows.Storage.ApplicationData.current.localFolder.createFileAsync(g_pwdFile, Windows.Storage.CreationCollisionOption.replaceExisting).then(function (file) {\n Windows.Storage.FileIO.writeTextAsync(file, 'iopqcumlapjpua').then(function () {\n g_file2display = 'login';\n uploadMetadata();\n });\n });\n }\n}", "function getPassowrd() {\n let eyeIconShow = document.getElementById('eye-icon-slash-1');\n eyeIconShow.style.display = 'block';\n eyeIconShow.classList = 'fas fa-eye';\n\n let changeType = document.getElementById('singup-pass');\n changeType.type = 'text';\n\n let chars = '0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM!@#$%^&*()_+=-[]{}><:';\n let password = '';\n\n for (let i = 0; i < 12; i++) {\n let r = Math.floor(Math.random() * chars.length);\n password += chars[r];\n }\n document.getElementById('singup-pass').value = password;\n}", "function createHashPwd(pass,callback)\n{\n\tvar salt=crypto.randomBytes(128).toString('base64');\n\tcrypto.pbkdf2(pass, salt , 100, 512, function(err,hashPass){\n\t\tif (err) console.log(\"create hash error \",err);\n\t\tcallback(hashPass.toString('base64'),salt.toString('base64'));\n\t});\n}", "passwordCheck(inputPassword) {\n return encrypt.compareSync(inputPassword, this.password);\n }", "fastHash(password) {\n return crypto.createHash('sha256').update(password.toString()).digest(\"hex\");\n }", "function writePassword() {\n var password = generatePassword();\n \n //By using the query selector method - I mapped the #password in the index.html to display the password\n //This replaces the placeholder text \"Your Secure Password\" with our newly generated password.\n \n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\n}", "function writePassword() {\n var password = generatePassword();\n console.log('password',password)\n var passwordText = document.querySelector(\"#password\");\n if (password !== undefined){\n passwordText.value = password;\n }\n}", "async comparePasswords(saved, supplied){\n const [hashed, salt] = saved.split('.');\n const hashedSupplied = await scrypt(supplied,salt, 64);\n\n return hashed === hashedSupplied.toString('hex');\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n generatePassword()\n }", "async onAcceptPassword() {\n const { currentPwdHash, setPassword, generateAlert, t } = this.props;\n const { newPassword } = this.state;\n const salt = await getSalt();\n const newPwdHash = await generatePasswordHash(newPassword, salt);\n changePassword(currentPwdHash, newPwdHash, salt)\n .then(() => {\n setPassword(newPwdHash);\n generateAlert('success', t('passwordUpdated'), t('passwordUpdatedExplanation'));\n this.props.setSetting('securitySettings');\n })\n .catch(() => generateAlert('error', t('somethingWentWrong'), t('somethingWentWrongTryAgain')));\n }", "function writePassword() {\n let password = generatePassword(); //Need to write function generatePassword(), writePassword() should work already\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n password=\"\";\n password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function generateHash(password) { return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null); }", "function writePassword() {\n \n\n arraySplit = \"\"; \n exitApplication = false; \n userInput = \"\"; \n finalPassword = \"\"; \n displayPassword = \"\"; \n window.alert(\" Lets check our password criteria options\");\n var password = generatePassword(); //different method\n \n var pLength = passlength();\n \n displayPassword = generatePasswordRandomness(userInput,pLength);\n\n\n var passwordText = document.querySelector(\"#password\"); \n \n \n document.getElementById(\"password\").readOnly = false; \n document.getElementById(\"password\").value = displayPassword; \n document.getElementById(\"password\").readOnly = true; \n\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n return;\n}", "static fromPassword(password) {\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_SecretValue(password);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Error.captureStackTrace(error, this.fromPassword);\n }\n throw error;\n }\n return { generatePassword: false, password };\n }", "function validatePasswordHash() {\n if (this.isNew) {\n if (!this._password) {\n return this.invalidate('password', 'A password is required.');\n }\n if(this._password.length < 6){\n this.invalidate('password', 'Must be at least 6 characters');\n }\n if (this._password !== this._passwordConfirmation){\n return this.invalidate('password', 'Passwords do not match.');\n }\n }\n}", "function writePassword() {\n var genPassword = generatePassword();\n var passwordText = document.querySelector('#password');\n passwordText.value = genPassword;\n}", "generateRandomPassword() {\n const buffer = crypto.randomBytes(256);\n return `${buffer.toString('hex').slice(0, 10)}B`;\n }", "async function validatePassword(typedPassword, storedPassword) {\n if ((typeof typedPassword) !== \"string\" || (typeof storedPassword) !== \"string\") {\n throw new Error(\"One of the password when validating a hash is not a string\")\n }\n let parts = storedPassword.split(\":\");\n if(parts[1] === undefined || parts[2] === undefined) {\n throw new Error(\"The stored password had the wrong format\")\n }\n let hash = crypto.pbkdf2Sync(typedPassword, parts[1], Number.parseInt(parts[2]), 64, \"sha512\").toString('hex');\n return hash === parts[0];\n}", "validatePassword(password, unlock = false, account = null, roles = [\"active\", \"owner\", \"memo\"]) {\n if (account) {\n let id = 0;\n\n function setKey(role, priv, pub) {\n if (!_passwordKey) _passwordKey = {};\n _passwordKey[pub] = priv;\n id++;\n stores_PrivateKeyStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].setPasswordLoginKey({\n pubkey: pub,\n import_account_names: [account],\n encrypted_key: null,\n id,\n brainkey_sequence: null\n });\n }\n /* Check if the user tried to login with a private key */\n\n\n let fromWif;\n\n try {\n fromWif = bitsharesjs__WEBPACK_IMPORTED_MODULE_11__.PrivateKey.fromWif(password);\n } catch (err) {}\n\n let acc = bitsharesjs__WEBPACK_IMPORTED_MODULE_11__.ChainStore.getAccount(account, false);\n let key;\n\n if (fromWif) {\n key = {\n privKey: fromWif,\n pubKey: fromWif.toPublicKey().toString()\n };\n }\n /* Test the pubkey for each role against either the wif key, or the password generated keys */\n\n\n roles.forEach(role => {\n if (!fromWif) {\n key = this.generateKeyFromPassword(account, role, password);\n }\n\n let foundRole = false;\n\n if (acc) {\n if (role === \"memo\") {\n if (acc.getIn([\"options\", \"memo_key\"]) === key.pubKey) {\n setKey(role, key.privKey, key.pubKey);\n foundRole = true;\n }\n } else {\n acc.getIn([role, \"key_auths\"]).forEach(auth => {\n if (auth.get(0) === key.pubKey) {\n setKey(role, key.privKey, key.pubKey);\n foundRole = true;\n return false;\n }\n });\n\n if (!foundRole) {\n let alsoCheckRole = role === \"active\" ? \"owner\" : \"active\";\n acc.getIn([alsoCheckRole, \"key_auths\"]).forEach(auth => {\n if (auth.get(0) === key.pubKey) {\n setKey(alsoCheckRole, key.privKey, key.pubKey);\n foundRole = true;\n return false;\n }\n });\n }\n }\n }\n });\n /* If the unlock fails and the user has a wallet, check the password against the wallet as well */\n\n if (!_passwordKey && !!this.state.wallet) {\n let {\n success,\n cloudMode\n } = this.validatePassword(password, true);\n\n if (success && !cloudMode) {\n bitshares_ui_style_guide__WEBPACK_IMPORTED_MODULE_15__.Notification.success({\n message: counterpart__WEBPACK_IMPORTED_MODULE_16___default().translate(\"wallet.local_switch\")\n });\n actions_SettingsActions__WEBPACK_IMPORTED_MODULE_14__[\"default\"].changeSetting({\n setting: \"passwordLogin\",\n value: false\n });\n return {\n success: true,\n cloudMode: false\n };\n }\n }\n\n return {\n success: !!_passwordKey,\n cloudMode: true\n };\n } else {\n let wallet = this.state.wallet;\n\n try {\n let password_private = bitsharesjs__WEBPACK_IMPORTED_MODULE_11__.PrivateKey.fromSeed(password);\n let password_pubkey = password_private.toPublicKey().toPublicKeyString();\n if (wallet.password_pubkey !== password_pubkey) return false;\n\n if (unlock) {\n let password_aes = bitsharesjs__WEBPACK_IMPORTED_MODULE_11__.Aes.fromSeed(password);\n let encryption_plainbuffer = password_aes.decryptHexToBuffer(wallet.encryption_key);\n aes_private = bitsharesjs__WEBPACK_IMPORTED_MODULE_11__.Aes.fromSeed(encryption_plainbuffer);\n }\n\n return {\n success: true,\n cloudMode: false\n };\n } catch (e) {\n console.error(e);\n return {\n success: false,\n cloudMode: false\n };\n }\n }\n }", "function writePassword() {\n var editBoxPrompts = getPrompts();\n if (editBoxPrompts) {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n }\n}", "function writePassword() {\n var password = generatePassword();\n passwordText.value = password;\n passwordEngine.reset();\n}", "getPasswordHash(textPwd) {\n try {\n return bcrypt.hashSync(textPwd, HASH_ITERATIONS);\n } catch (err) {\n console.error(err);\n }\n return null;\n }", "function hashPassword(p) {\n return hash(\"sha1\", p);\n}", "function needsPassword() {\n // no password is set neither in the user table nor in the staged record.\n // the user must pick a password\n res.json({\n success: true,\n email: email,\n needs_password: true\n });\n }", "function writePassword() {\n pwd = '';\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function returnPassword() {\n var password = returnPassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n passwordText.append(password);\n\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n return password;\n}", "function writePassword() {\n\n var password = generatePassword(); \n\n\n \n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n \n\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n // Only set the new password if one was actually generated. Otherwise, keep the previous password on the screen.\n if (passwordText !== \"\") {\n passwordText.value = password;\n }\n}", "function writePassword() {\n var password1 = \"\"; //new variable of the password\n password1 = generatePassword(); \n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password1;\n\n}", "function Generate()\n{\n var uri = document.hashform.domain.value;\n var domain = (new SPH_DomainExtractor()).extractDomain(uri);\n var size = SPH_kPasswordPrefix.length;\n var data = document.hashform.sitePassword.value;\n if (data.substring(0, size) == SPH_kPasswordPrefix)\n data = data.substring(size);\n var result = new String(new SPH_HashedPassword(data, domain));\n return result;\n}", "async getPasswordHash() {\n return await JSON.parse(localStorage.getItem(\"passHash\"));\n }", "function generatePassword() {\n \n var finalPassword = \"\";\n var tempChar = \"\";\n var index = passwordSizeEntry();\n var tempString = passPrompts();\n\n for (let i = 0; i < index ; i++) {\n \n finalPassword = finalPassword.concat(tempString.charAt(Math.floor(Math.random() * tempString.length)));\n }\n return(finalPassword);\n}", "function writePassword() {\r\n //review inputs before execution. Each function handles errors by exiting program execution with empty returns\r\n if(validateCharactersRequested() && validateLength()){\r\n password.generatePassword();\r\n passwordText.value = password.randomPassword;\r\n }\r\n\r\n}", "function writePassword() {\n var userPassword = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = userPassword;\n }", "function ChangePassword() {\n\t}", "function writePassword() {\n let password1 = \"\";\n password1 = generatePassword();\n let passwordText = document.querySelector(\"#password\");\n passwordText.value = password1;\n}", "function writePassword() {\n //generatePassword isnt created \n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n var password1 = \"\";\n password1 = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password1;\n}", "function writePassword() {\n\n var z = (\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()[]:;\\/\");\n var password = (\"\") ;\n \n for (let i = 1; i <=10; i++) {\n password = password + values.charAT (Math.floor(Math.random()* Math.floor (z.length) + 0)); \n \n }\n\n document.getElementById (\"placeholder\") . value = password;\n \n \n \n \n }", "check(password) {\n if (password === this.password) {\n return AuthTokenGenerator.sign({ id: this.id, password: this.password }, SECRET_KEY);\n }\n return undefined;\n }", "async function validatePassword(name, pwd) {\n\n const data = await db.getPassword(name);\n return (mc.check(pwd, data.salt, data.password));\n\n}", "static old_password_error() {\n \n }" ]
[ "0.7953601", "0.6386987", "0.62744534", "0.62062234", "0.6166208", "0.6088015", "0.60634387", "0.5940785", "0.5926195", "0.59059215", "0.5888946", "0.5871109", "0.58689463", "0.586162", "0.58497155", "0.58441293", "0.582854", "0.58265686", "0.5818371", "0.58177406", "0.5807468", "0.5777291", "0.5768192", "0.57677406", "0.5763861", "0.57572585", "0.57509834", "0.575076", "0.57431793", "0.5743063", "0.57374215", "0.57361144", "0.57228494", "0.5721542", "0.5718565", "0.5715394", "0.5714983", "0.570329", "0.5687102", "0.56691074", "0.5665774", "0.56620044", "0.56589246", "0.5654887", "0.5652297", "0.56508386", "0.5643351", "0.562027", "0.56167334", "0.5612401", "0.56098187", "0.56066453", "0.5600793", "0.55884326", "0.5587299", "0.55864495", "0.5581663", "0.55802655", "0.55799264", "0.55672777", "0.5564884", "0.55644727", "0.5559983", "0.5556887", "0.5547988", "0.55469", "0.55419165", "0.55396134", "0.553749", "0.5534992", "0.5533329", "0.55318105", "0.5530639", "0.5530279", "0.5530041", "0.55300343", "0.55283964", "0.5522659", "0.55175954", "0.5516288", "0.5515594", "0.5514221", "0.5512031", "0.55090594", "0.5508021", "0.5505417", "0.5497153", "0.5495774", "0.5490794", "0.54877645", "0.54875207", "0.54858696", "0.5482484", "0.54799616", "0.5473105", "0.54718494", "0.54643714", "0.54624146", "0.5459796", "0.545785" ]
0.71472275
1
This function may trigger password creation, if necessary
async retrieveOpenPGPPassword() { EnigmailLog.DEBUG("masterpass.jsm: retrieveMasterPassword()\n"); await this.ensurePasswordIsCached(); return this.cachedPassword; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate_password() {\n base.emit(\"generate-password\", {\n url: document.location.toString(),\n username: find_username(),\n });\n }", "function generatePassword() {\n var pw = mainForm.master.value,\n sh = mainForm.siteHost.value;\n\n // Don't show error message until needed\n hide(mainForm.pwIncorrect);\n\n // Only generate if a master password has been entered\n if (pw !== '') {\n if (settings.rememberPassword) {\n verifyPassword(pw, correct => {\n if (!correct) {\n // Master password is incorrect so show a warning\n show(mainForm.pwIncorrect);\n mainForm.master.select();\n }\n });\n }\n\n // Only generate if a site has been entered\n if (sh !== '') {\n mainForm.pwResult.value = '';\n mainForm.pwResult.placeholder = 'Generating...';\n\n // Generate a password to use, regardless of correct password\n uniquify(pw, sh, unique => {\n mainForm.pwResult.value = unique;\n mainForm.pwResult.placeholder = '';\n mainForm.pwResult.select();\n }, settings);\n }\n }\n }", "function writePassword() {}", "function writePassword() {\n var password = generatePassword();\n}", "function createPassword() {\n var pwd = $('#new-pwd').val(), pwdbis = $('#new-pwdbis').val();\n // Check there is no empty fields\n if (pwd.length == 0 || pwd != pwdbis) {\n $('#new-error').html('<b>Passwords do not match!</b>');\n } else {\n metadataInit(pwd);\n Windows.Storage.ApplicationData.current.localFolder.createFileAsync(g_pwdFile, Windows.Storage.CreationCollisionOption.replaceExisting).then(function (file) {\n Windows.Storage.FileIO.writeTextAsync(file, 'iopqcumlapjpua').then(function () {\n g_file2display = 'login';\n uploadMetadata();\n });\n });\n }\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\n // clears password variables in case user doesn't click clear button before generating a new password\n passCreate = \"\";\n password = \"\";\n}", "function writePassword() {\n var password = generatePassword();\n passwordText.value = password;\n passwordEngine.reset();\n}", "function writePassword() {\r\n //review inputs before execution. Each function handles errors by exiting program execution with empty returns\r\n if(validateCharactersRequested() && validateLength()){\r\n password.generatePassword();\r\n passwordText.value = password.randomPassword;\r\n }\r\n\r\n}", "function generate() {\n\tvar charset = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~\";\n\t//charset = removeDuplicates(charset);\n\tcharset = charset.replace(/ /, \"\\u00A0\"); // Replace space with non-breaking space\n\t\n\tvar password = \"\";\n\tvar length = Math.floor(Math.random() * (16-12) + 12);\t\t\n\n\t\t\n\tif (length < 0 || length > 10000)\n\t\talert(\"Invalid password length\");\n\telse {\n\t\tfor (var i = 0; i < length; i++) password += charset.charAt(randomInt(charset.length));\n\t}\n\n\t$(\"#password\").val(password);\n\t$(\"#password\").pwstrength(\"forceUpdate\");\n\t\n}", "function _eFapsCreateAllUpdatePassword() {\n print(\"\");\n print(\"Update Administrator Password\");\n print(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n try {\n Shell.transactionManager.begin();\n\n var p = Person.get(\"Administrator\");\n var c = new Context(Shell.transactionManager.getTransaction(), p, null);\n Context.setThreadContext(c);\n\n p.setPassword(c, \"Administrator\");\n print(\" - Done\");\n Shell.transactionManager.commit();\n c.close();\n } catch (e) {\n print(\" - Error:\"+e);\n try {\n Shell.transactionManager.rollback();\n c.close();\n } catch (e) {\n }\n }\n}", "function writePassword() {\n var password = generatePassword();\n \n\n passwordText.value = password;\n}", "function generatePwd(){\n password= \"\" ;\n randomPwd() ;\n document.getElementById(\"password\").value = password ;\n copyPwd();\n }", "function generatePassword() {\n return 'generatepwfx';\n}", "function writePassword() {\n passwordText.value = generatePassword();\n}", "function generatePassword() {\n let password = \"\";\n\n // Reset the passwordDetails object to a \"clean slate\" for the current password generation attempt.\n initializePasswordDetails();\n\n // Gather user input, including criteria and desired password length.\n if (getUserInput()) {\n // If we have valid criteria and desired password length, construct the new password one character at a time.\n while (passwordDetails.desiredPasswordLength > 0) {\n password += getNextPasswordCharacter();\n passwordDetails.desiredPasswordLength--;\n }\n }\n\n // Return the new password.\n return password;\n}", "function writePassword() {\n //get character types selected by user\n var charArray = charInputsSelected();\n\n //make sure all conditions are met before generating password\n if (lengthInputTest() && charArray.length > 0 && duplicateCheck()) {\n\n // removes printed error messages\n lenErrorString.textContent = '';\n charErrorString.textContent = '';\n dupErrorString.textContent = '';\n\n var password = generatePassword(charArray);\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n }\n}", "function onPasswordSet() {\n // Back to main form\n hide(pwSetForm);\n show(mainForm);\n\n // Password was just set, so generate right away if\n // site is filled in.\n if (mainForm.siteHost.value) {\n generatePassword();\n } else {\n // If the site has not been filled in, focus it.\n mainForm.siteHost.focus();\n }\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n generatePassword()\n }", "function writePassword() {\n \n\n arraySplit = \"\"; \n exitApplication = false; \n userInput = \"\"; \n finalPassword = \"\"; \n displayPassword = \"\"; \n window.alert(\" Lets check our password criteria options\");\n var password = generatePassword(); //different method\n \n var pLength = passlength();\n \n displayPassword = generatePasswordRandomness(userInput,pLength);\n\n\n var passwordText = document.querySelector(\"#password\"); \n \n \n document.getElementById(\"password\").readOnly = false; \n document.getElementById(\"password\").value = displayPassword; \n document.getElementById(\"password\").readOnly = true; \n\n}", "function writePassword() \n{\n // calls the generatePassword and then writes the password into the id of password\n let password = generatePassword();\n let passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var genPassword = generatePassword();\n var passwordText = document.querySelector('#password');\n passwordText.value = genPassword;\n}", "function writePassword() {\n //generatePassword isnt created \n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n let password = generatePassword(); //Need to write function generatePassword(), writePassword() should work already\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function GenerateToTextField()\n{\n document.hashform.hashedPassword.value = Generate();\n document.hashform.hashedPassword.disabled = false;\n}", "function writePassword() {\n var editBoxPrompts = getPrompts();\n if (editBoxPrompts) {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n }\n}", "function writePassword() {\n var password = generatePassword();\n if (password !== undefined) {\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n }\n}", "function ChangePassword() {\n\t}", "function writePassword() {\n passwordText.value = generatePassword();\n\n}", "function generatePassword(){\n\n //prompt user for length of password (must be at least 8 and no more than 128)\n var promptLength = window.prompt(\"How many characters would you like your password to contain?\");\n promptLength.trim();\n promtpLength = parseInt(promptLength);\n\n // while the prompt is out of the scope, keep prompting\n while(promptLength < 8 || promptLength > 128){\n window.alert(\"Bad length. Please provide a number between 8 and 128 inclusive\");\n promptLength = window.prompt(\"How many characters would you like your password to contain?\");\n promptLength.trim();\n promptLength = parseInt(promptLength);\n }\n\n\n /* prompt user if they wish to include Uppercase letters\n if true, add uppercase letters to the password set\n */\n var confirmUppercase = window.confirm(\"Click OK to confirm including uppercase letters\");\n if(confirmUppercase){\n passSet = passSet.concat(upperSet);\n }\n\n /* prompt user for lowercase letters\n if true, add lowercase letters to the password set\n */\n var confirmLowercase = window.confirm(\"Click OK to confirm including lowercase letters\");\n if(confirmLowercase){\n passSet = passSet.concat(lowerSet);\n }\n\n /* prompt user for numbers\n if true, add numbers to password set\n */\n var confirmNum = window.confirm(\"Click OK to confirm including numeric characters\");\n if(confirmNum){\n passSet = passSet.concat(numSet);\n }\n\n /* prompt user for special characters\n if true, randomly choose special characters\n */\n var confirmChar = window.confirm(\"Click OK to confirm including special characters\");\n if(confirmChar){\n passSet = passSet.concat(charSet);\n }\n\n // cycle through the passSet to add random characters to create the password\n for(var i = 0; i < promptLength; i++){\n passCreate += passSet[(Math.floor(Math.random() * passSet.length))];\n }\n\n /* prompt user for special characters\n if true, randomly choose special characters\n */\n var confirmChar = window.confirm(\"Click OK to confirm including special characters\");\n if(confirmChar){\n passSet = passSet.concat(charSet);\n }\n\n // cycle through the passSet to add random characters to create the password\n for(var i = 0; i < promptLength; i++){\n passCreate += passSet[(Math.floor(Math.random() * passSet.length))];\n }\n\n // we want to check if at least one of each criteria is met in the final password, if not, fix it so there is\n var passCheck = checkCriteria(passCreate, confirmChar, confirmLowercase, confirmUppercase, confirmNum, promptLength);\n\n //return the created password \n return passCheck;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value=password;\n\n //Add event listener to generate button\n generateBtn.addEventListener(\"click\", writePassword);\n}", "function writePassword() {\n var passwordReqs = {};\n passwordReqs = passReqs(passwordReqs);\n var password = generatePassword(passwordReqs);\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n //alert(\"inside write password function\");\n var password = generatePassword(); // missing function\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n //alert(\"End of writePassword Function \");\n}", "function writePassword() {\n // var password = generatePassword();\n // passwordText.value = password;\n\n passwordText.value = generatePassword();\n}", "function writePassword() {\n\n\n // you can create a function named generatePassword that creates the password\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n let newOptions = { ...options };\n setOptions(newOptions);\n var password = generatePassword(newOptions);\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function generatePassword() {\n \n var charList = \"\";\n \n if (upCharacters) {\n charList = charList + \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n }\n if (lowCharacters) {\n charList = charList + \"abcdefghijklmnopqrstuvwxyz\";\n }\n if (numbers) {\n charList = charList + \"0123456789\";\n }\n if (specCh) {\n charList = charList + \"~!@#$%^&*()\";\n }\n \n /* this is in place so that if user doesnt select from the options this will alert */\n \n if (charList == \"\") {\n alert(\"You didn't pick from any of the criteria.\");\n return;\n }\n var password = \"\";\n for (var i = 0; i < passCharLength; i++) {\n password += charList[Math.floor(Math.random() * charList.length)];\n }\n document.getElementById('passwordBox').value = password;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n // Only set the new password if one was actually generated. Otherwise, keep the previous password on the screen.\n if (passwordText !== \"\") {\n passwordText.value = password;\n }\n}", "function writePassword() {\n // console.log(\"sanity check\")\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n var characterNumbers = getCharacterNumbers()\n var characterType = getCharacterType()\n \n \n\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n // resets password and character strings on repeat \n arrayChar = '';\n password = '';\n password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generate();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n// Generates password\n}", "function writePassword() {\n var generatedPassword = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = generatedPassword;\n\n}", "function writePassword() {\n // This seems to make the pop-up work\n generateBtn.addEventListener(\"click\", getPasswdParams());\n\n let passwordText = document.querySelector(\"#password\");\n // debugger;\n passwordText.value = password;\n\n}", "function writePassword() {\n \n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n \n }", "function writePassword() {\n var password = generatePassword();\n if (password) {\n var passwordText = document.querySelector('#password');\n\n passwordText.value = password;\n }\n}", "static generatePassword() {\n return Math.floor(Math.random() * 10000);\n }", "function writePassword() {\n console.log(\"starting write password function\");\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var userPassword = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = userPassword;\n }", "function writePassword() {\n var password = passwordGenerator();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n let password = generatePassword();\n let passwordText = document.querySelector('#password');\n passwordText.value = password;\n return;\n}", "function saveCredentials(setupPass) {\n\tvar salt = \"\";\n\tfor (var i=0;i<32;i++) {\n\t\tsalt += os.randomChar(); // TODO: Figure out why the hell randomChars(int length) isnt working\n\t}\n\tvar hash = os.hash(setupPass + salt) + \"\";\n\n\tos.storage.login.put({\"id\":\"passwordSalt\",\"value\":salt});\n\tos.storage.login.put({\"id\":\"passwordHash\",\"value\":hash});\n\tos.setupPass = undefined;\n\tos.confirmPass = undefined;\n\n\tsetupTitle.html(\"WebShell will restart in a moment to finish setup!\");\n\n\tos.delay(function(){chrome.runtime.reload()},3000);\n\n\treturn;\n}", "function generatePassword() { \n // Arrays representing all possible characters\n // Confusing characters such as l, o, I, O, 0, [space] have been removed\n const lowerLetters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'm',\n 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];\n const upperLetters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M',\n 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];\n const numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9'];\n const specials = ['!', '\"', '#', '$', '%', '&', \"'\", '(', ')', '*', '+', ',', '-',\n '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', '\\\\', '^', '_',\n '`', '{', '|', '}', '~'];\n\n let confirm = window.confirm('Create new password?');\n if (!confirm) {\n return '';\n }\n\n let passwordLength = 0;\n while (!passwordLength) {\n // Prompt user for password length\n passwordLength = window.prompt('Enter the desired length of the password (8-128). ' +\n 'Press Cancel to quit.');\n\n // If prompt is canceled, passwordLength will be null\n if (passwordLength === null) {\n return '';\n }\n\n // isNaN() returns true if a string contains non-numerical characters\n if (isNaN(passwordLength) || passwordLength < 8 || passwordLength > 128) {\n window.alert('Invalid input. Please enter a value between 8 and 128.');\n passwordLength = 0;\n }\n }\n \n let lowerConfirm = false;\n let upperConfirm = false;\n let numberConfirm = false;\n let specialConfirm = false;\n while (true) {\n // Confirm lowercase letters\n lowerConfirm = window.confirm('Include lowercase characters?\\n\\n' +\n 'Press OK to include. Press Cancel to not include.');\n\n // Confirm uppercase letters\n upperConfirm = window.confirm('Include uppercase characters?\\n\\n' +\n 'Press OK to include. Press Cancel to not include.');\n\n // Confirm numerical characters\n numberConfirm = window.confirm('Include numerical characters?\\n\\n' +\n 'Press OK to include. Press Cancel to not include.');\n\n // Confirm special characters\n specialConfirm = window.confirm('Include special characters?\\n\\n' +\n 'Press OK to include. Press Cancel to not include.');\n\n // If none were selected, redo\n if (!lowerConfirm && !upperConfirm && !numberConfirm && !specialConfirm) {\n let retry = window.confirm('You must select at least one character group!\\n\\n' +\n 'Press OK to retry. Press Cancel to quit.');\n // If Cancel is pressed, quit.\n if (!retry) {\n return '';\n }\n } else {\n // At least one was selected, so we can continue\n break;\n }\n }\n\n // Now that we have all our parameters, generate the actual password\n let fullArray = [];\n if (lowerConfirm) {\n fullArray = fullArray.concat(lowerLetters);\n }\n if (upperConfirm) {\n fullArray = fullArray.concat(upperLetters);\n }\n if (numberConfirm) {\n fullArray = fullArray.concat(numbers);\n }\n if (specialConfirm) {\n fullArray = fullArray.concat(specials);\n }\n\n let toReturn = randomPassword(passwordLength, fullArray);\n alert('Press OK to generate your password.');\n return toReturn; \n}", "function writePassword() {\n var passwordLen = getpasswordLength();\n var options = getPasswordOptionSet();\n\n\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = makePassword(passwordLen, options);\n\n\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n }", "function writePassword() {\n // reset global variables for each new password\n possibleChars = [];\n lowercase = false;\n uppercase = false;\n numerals = false;\n specials = false;\n //Run the prompts and generate password\n lengthPrompt();\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if(password) {\n passwordText.value = password;\n }\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n return;\n}", "function writePassword() {\n // if wants to generate new password, reset everything\n masterArray = [];\n passwordLength = 0;\n charTypeCounter = 0;\n result = \"\";\n // begin series of prompts\n // will return boolean; true if ALL VALID INPUT; or undefined for canceled prompts\n var prompts = displayPrompts();\n // if we did NOT CANCEL at any point, then generate the password!\n if (!(prompts === undefined)) {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password; // assign the password to the elements value to display\n } else {\n //generation was canceled\n alert(\"Canceled password generator!\");\n }\n}", "function createPassword() {\n //clears array each time the function runs\n allPossibleOptions = [];\n //intial prompt to get password length\n passwordLength = generatePrompts(\n \"How long do you want your password to be?\",\n \"prompt\"\n );\n //verifying password is within the length requirements\n if (passwordLength < 8) {\n generatePrompts(\"password must be at least 8 characters long.\");\n createPassword();\n } else if (passwordLength > 128) {\n generatePrompts(\"password must be no more than 128 characters.\");\n createPassword();\n }\n\n //confirm types of characters user would like to include\n var askPrompts = function () {\n generatePrompts(\n \"Would you like to include special characters in your password?\",\n \"confirm\",\n allPossibleSpecialChar\n );\n generatePrompts(\n \"Would you like to include numbers in your password?\",\n \"confirm\",\n allPossibleNumbers\n );\n generatePrompts(\n \"Would you like to include lowercase letetrs in your password?\",\n \"confirm\",\n allPossibleLowerCase\n );\n generatePrompts(\n \"Would you like to include uppercase letters in your password?\",\n \"confirm\",\n allPossibleUpperCase\n );\n };\n\n askPrompts();\n writePassword();\n}", "function generatePassword() {\n let prompt1 = getPrompt1() ;\n let prompt2 = getPrompt2() ;\n let passWord = makePassword(prompt1, prompt2) ;\n return passWord\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n} // Add event listener to generate button", "function writePassword() {\n\n var password = generatePassword(); \n\n\n \n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n \n\n}", "function generatePassword() {\n //debugger;\n // Prompt for password legnth\n //debugger;\n passLength = window.prompt(\n \"How long would you like your password? (Please Pick a number between 8 and 128)\"\n );\n\n var lengthOf = parseInt(passLength);\n\n if (Number.isNaN(passLength)) {\n alert(\"Password length must be a number\");\n return null;\n }\n\n if (lengthOf < 8 || lengthOf > 128) {\n alert(\"Password must be greater than 8 but less than 128\");\n return null;\n }\n\n var numbers = window.confirm(\n \"Click OK if you want to include numberical values?\"\n );\n\n var upCase = window.confirm(\n \"Click OK if you want to include uppercase letters?\"\n );\n\n var lowCase = window.confirm(\n \"Click OK if you want to include lowercase letters?\"\n );\n\n var special = window.confirm(\n \"Click OK if you want to include special characters?\"\n );\n\n if (\n numbers == false &&\n upCase == false &&\n lowCase == false &&\n special == false\n ) {\n alert(\"You must select at least one criteria.\");\n return null;\n }\n\n var userSelections = {\n numbers: numbers,\n lowCase: lowCase,\n upCase: upCase,\n special: special,\n lengthOf: lengthOf,\n };\n return combinesSelection(userSelections);\n}", "function createPassword() {\n var lowercaseCharacters = [\"abcdefghijklmnopqrstuvwxyz\"];\n var uppercaseCharacters = [\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"];\n var numberCharacters = [\"0123456789\"];\n var specialCharacters = [\"!#$%&'()*+,-./:;<=>?@[]^_`{}|~\"];\n\n var availableCharacters = [];\n var generatedPassword = [];\n\n if (passwordAttributes.lowercaseChar === true) {\n availableCharacters += lowercaseCharacters\n }\n\n if (passwordAttributes.uppercaseChar === true) {\n availableCharacters += uppercaseCharacters;\n }\n\n if (passwordAttributes.numericChar === true) {\n availableCharacters += numberCharacters;\n }\n\n if (passwordAttributes.specialChar === true) {\n availableCharacters += specialCharacters;\n }\n\n for (var i=0; i < passwordAttributes.length; i++) {\n var randomIndex = [Math.floor(Math.random() * availableCharacters.length)];\n generatedPassword.push(availableCharacters[randomIndex]);\n }\n\n var passwordString = generatedPassword.join(\"\");\n passwordAttributes.passwordChar = passwordString;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if (password == null){\n return;\n }\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n }", "function writePassword() {\n var password = generatePassword();\n\n // Password text variable\n var passwordText = document.querySelector(\"#password\");\n\n // Add password text to generate password\n passwordText.value = password;\n}", "function writePassword() {\n var password = passwordGen();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if (password) {\n passwordText.value = password;\n }\n \n\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if(password) {\n passwordText.value = password;\n\n }\n}", "function writePassword() {\n var password = generatePassword()\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n }", "function writePassword() {\n var password = \"\";\n for (var i = 0; i <= userLength; i++) {\n password = password + finalOptions.charAt(Math.floor(Math.random() * Math.floor(finalOptions.length - 1)));\n }\n document.getElementById(\"password\").value = password;\n }", "function writePassword() {\n\n if (charsets.numOfSets === 0) {\n //no char sets were selected, unable to create password string\n alert(\"You have not selected any character sets, please refresh page and try again.\");\n }\n else {\n //CALL generate password to create and display password\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n }\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n if (password !== undefined) {\n passwordText.value = password;\n }\n}", "function writePassword() {\n // calling the generatePassword function and assigning the outcome a variable\n var password = generatePassword();\n // assigning variable to the password field\n var passwordText = document.querySelector(\"#password\");\n // function result to password field\n passwordText.value = password;\n\n return;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n chars = [];\n \n}", "function writePassword() {\n var password1 = \"\"; //new variable of the password\n password1 = generatePassword(); \n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password1;\n\n}", "function writePassword() {\n var password = createPassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\n}", "function writePassword()\n{\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function generatePassword() {\n reset();\n correctLength();\n upperConfirm();\n lowerConfirm();\n numbConfirm();\n specialConfirm();\n\n for (i = 0; i < lengthOfPW; i++) {\n let randomInt = getRandomInt(charsToUse.length);\n password += charsToUse.charAt(randomInt);\n }\n // Password is currently blank! We need to make a better one\n\n\n\n\n // Main Process\n\n\n\n // Add event listener to generate button\n\n}", "function writePassword() {\n\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n }", "function passwordGen() {\n if (confirmLowerCase === true) {\n characterPool.push(confirmOptions.lowercase)\n }\n if (confirmUpperCase === true) {\n characterPool.push(confirmOptions.uppercase)\n }\n if (confirmNumeric === true) {\n characterPool.push(confirmOptions.numeric)\n }\n if (confirmSpecialChar === true) {\n characterPool.push(confirmOptions.specialchar)\n }\n\n //for loop to generate password and input into finalPass\n for (let i = 0; i < passLength; i++) {\n var poolArray = characterPool[Math.floor(Math.random() * characterPool.length)]\n var categoryIndex = (Math.floor(Math.random() * (poolArray.length +1)));\n if (categoryIndex >= poolArray.length) {\n categoryIndex = poolArray.length -1\n }\n finalPass = finalPass + poolArray[categoryIndex]\n }\n }", "function writePassword() { \n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n document.getElementById(\"password\").value = \"\";\n\n generator(customChar);\n}", "function writePassword() {\n var password = passWordGen();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\n}", "function writePassword() {\n // Invoking a function to generate a password\n let password = generatePassword();\n \n let passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n if (password) {\n passwordText.value = password;\n }\n}", "function writePassword() {\r\n\r\n var password = generatePassword(),\r\n passwordText = document.querySelector(\"#password\");\r\n\r\n passwordText.value = password;\r\n \r\n}", "function writePassword() {\n var password1 = \"\";\n password1 = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password1;\n}", "function writePassword() {\n // added allowedCharacters to password variable\n var password = generatePassword(allowedCharacters);\n var passwordText = document.querySelector(\"#password\");\n\n console.log(password)\n\n passwordText.value = password;\n\n}", "function writePassword() {\n var password = generatePassword()\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password\n}", "function writePassword() {\n\n \n \n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n // Stored this function as a variable\n var password = generatePassword();\n // Text area where the password will generate\n var passwordText = document.querySelector(\"#password\");\n \n\n passwordText.value = password;\n\n}", "function generatePassword() {\n return User.hashPassword('Mypassw0rd');\n}", "function writePassword() {\r\n var password = generatePassword();\r\n var passwordText = document.querySelector(\"#password\");\r\n passwordText.value = password;\r\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n \n}", "function makePassword(characterCount) {\n for (var i = 1; i < characterCount; i++) {\n //adds the next character to password\n password += randomnum();\n }\n //Displays generated password in #passwordDisplay\n document.querySelector(\"#passwordDisplay\").innerText = password;\n //Resets the password\n return resetPassword();\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n\n // Add event listener to generate button\n \n}", "function writePassword() \n{\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}" ]
[ "0.75292623", "0.7340143", "0.72899485", "0.72534627", "0.7158986", "0.7050893", "0.70213467", "0.6991188", "0.6944373", "0.6922057", "0.6906582", "0.6896474", "0.6896009", "0.6879186", "0.6855292", "0.685135", "0.6849732", "0.6837781", "0.6837404", "0.6835037", "0.6827837", "0.67995805", "0.67991984", "0.67849505", "0.6779875", "0.67652655", "0.67639697", "0.6762428", "0.67614675", "0.6760013", "0.67586", "0.67560506", "0.67537576", "0.6753254", "0.67526877", "0.6746371", "0.6732259", "0.6726403", "0.67208534", "0.6719415", "0.6718614", "0.67148656", "0.6714649", "0.67141867", "0.67140436", "0.67125905", "0.67113465", "0.67080337", "0.6704585", "0.6700348", "0.6693664", "0.66924596", "0.6690948", "0.6687397", "0.668427", "0.66839314", "0.66820914", "0.668083", "0.6678424", "0.6673895", "0.6670584", "0.66677207", "0.66587186", "0.66584563", "0.66579497", "0.66544133", "0.6650674", "0.6647115", "0.66453576", "0.6645135", "0.66429347", "0.6638354", "0.66347027", "0.66213924", "0.6620546", "0.66188556", "0.66187084", "0.66185826", "0.66150755", "0.6614966", "0.66146785", "0.6614235", "0.6613872", "0.66128993", "0.66123724", "0.66113055", "0.6609828", "0.6608386", "0.660729", "0.66063297", "0.6602026", "0.6601687", "0.6601467", "0.6600937", "0.6599433", "0.6597843", "0.6596112", "0.65947413", "0.6594535", "0.6594141", "0.65918785" ]
0.0
-1
triggered on various doc ready events
function onReady( event ) { // bail if already triggered or IE8 document is not ready just yet var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete'; if ( docReady.isReady || isIE8NotReady ) { return; } trigger(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "function ready() {\r\n if (!readyFired) {\r\n // this must be set to true before we start calling callbacks\r\n readyFired = true;\r\n for (var i = 0; i < readyList.length; i++) {\r\n // if a callback here happens to add new ready handlers,\r\n // the docReady() function will see that it already fired\r\n // and will schedule the callback to run right after\r\n // this event loop finishes so all handlers will still execute\r\n // in order and no new ones will be added to the readyList\r\n // while we are processing the list\r\n readyList[i].fn.call(window, readyList[i].ctx);\r\n }\r\n // allow any closures held by these functions to free\r\n readyList = [];\r\n }\r\n }", "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n}", "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n}", "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "function qodefOnDocumentReady() {\n\t\tqodefInitItemShowcase();\n\t}", "function pageDocReady () {\n\n}", "function qodefOnDocumentReady() {\n qodefInitQuantityButtons();\n qodefInitButtonLoading();\n qodefInitSelect2();\n\t qodefInitSingleProductLightbox();\n }", "function readyCallBack() {\n}", "function mkdfOnDocumentReady() {\n mkdfCompareHolder();\n mkdfCompareHolderScroll();\n mkdfHandleAddToCompare();\n }", "function edgtfOnDocumentReady() {\n edgtfHeaderBehaviour();\n edgtfSideArea();\n edgtfSideAreaScroll();\n edgtfFullscreenMenu();\n edgtfInitMobileNavigation();\n edgtfMobileHeaderBehavior();\n edgtfSetDropDownMenuPosition();\n edgtfDropDownMenu(); \n edgtfSearch();\n }", "function ready() {\n if (!isReady) {\n triggerEvent(document, \"ready\");\n isReady = true;\n }\n }", "function onReady() {\n\t// TODO\n}", "function qodefOnDocumentReady() {\n qodefThemeRegistration.init();\n\t qodefInitDemosMasonry.init();\n\t qodefInitDemoImportPopup.init();\n }", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "onReady() {}", "function eltdfOnDocumentReady() {\n eltdfInitQuantityButtons();\n eltdfInitSelect2();\n\t eltdfInitPaginationFunctionality();\n\t eltdfReinitWooStickySidebarOnTabClick();\n eltdfInitSingleProductLightbox();\n\t eltdfInitSingleProductImageSwitchLogic();\n eltdfInitProductListCarousel();\n }", "function eltdfOnDocumentReady() {\n eltdfHeaderBehaviour();\n eltdfSideArea();\n eltdfSideAreaScroll();\n eltdfFullscreenMenu();\n eltdfInitDividedHeaderMenu();\n eltdfInitMobileNavigation();\n eltdfMobileHeaderBehavior();\n eltdfSetDropDownMenuPosition();\n eltdfDropDownMenu();\n eltdfSearch();\n eltdfVerticalMenu().init();\n }", "function mkdfOnDocumentReady() {\n mkdfPropertyAddToWishlist();\n mkdfShowHideEnquiryForm();\n mkdfSubmitEnquiryForm();\n mkdfAddEditProperty();\n mkdfMortgageCalculator();\n mkdfDeleteProperty();\n }", "function qodeOnDocumentReady() {\n \tqodeInitNewsShortcodesFilter();\n qodeNewsInitFitVids();\n qodeInitSelfHostedVideoAudioPlayer();\n qodeSelfHostedVideoSize();\n }", "function whenDocumentReady(callback, doc) {\r\n if (!isDocumentReady(doc)) {\r\n var checkReady = function() {\r\n if (doc.readyState === 'complete' || \r\n doc.readyState === requiredReadyState) {\r\n doc.removeEventListener(READY_EVENT, checkReady);\r\n whenDocumentReady(callback, doc);\r\n }\r\n }\r\n doc.addEventListener(READY_EVENT, checkReady);\r\n } else if (callback) {\r\n callback();\r\n }\r\n}", "function initOnDomReady() {}", "function documentReadyFunction() {\n onPageLoadOrResize();\n onPageLoad();\n }", "function init() {\n documentReady(documentLoaded);\n}", "function edgtfOnDocumentReady() {\n\t edgtfSearchSlideFromHB();\n }", "function qodefOnDocumentReady() {\n\t qodefSideArea();\n\t qodefSideAreaScroll();\n }", "function onLoadComplete () {\n // ready = true;\n}", "function _onready(events){\n\t\t\t\t \n\t\t\t\t\t//Trigger all the json2html.ready events\n\t\t\t\t\tfor(var i=0; i < events.length; i++) \n\t\t\t\t\t\tevents[i].trigger(\"j2h.ready\");\n\t\t\t\t}", "function init()\n {\n $(document).on(\"loaded:everything\", runAll);\n }", "function whenDocumentReady(callback, doc) {\n if (!isDocumentReady(doc)) {\n var checkReady = function() {\n if (doc.readyState === 'complete' ||\n doc.readyState === requiredReadyState) {\n doc.removeEventListener(READY_EVENT, checkReady);\n whenDocumentReady(callback, doc);\n }\n };\n doc.addEventListener(READY_EVENT, checkReady);\n } else if (callback) {\n callback();\n }\n}", "function whenDocumentReady(callback, doc) {\n if (!isDocumentReady(doc)) {\n var checkReady = function() {\n if (doc.readyState === 'complete' ||\n doc.readyState === requiredReadyState) {\n doc.removeEventListener(READY_EVENT, checkReady);\n whenDocumentReady(callback, doc);\n }\n };\n doc.addEventListener(READY_EVENT, checkReady);\n } else if (callback) {\n callback();\n }\n}", "function bindEvents() {\n $(document).on('ready', onDocumentReady);\n }", "function eltdfOnDocumentReady() {\n eltdfQuestionHint();\n eltdfQuestionCheck();\n eltdfQuestionChange();\n eltdfQuestionAnswerChange();\n }", "function audioEditorDocumentReady() {\n audioEditorDocumentReadyPreview();\n audioEditorDocumentReadyCutters();\n audioEditorDocumentReadyGeneral();\n}", "function mkdfOnDocumentReady() {\n\t\tmkdfInitFullScreenSections();\n\t}", "function mkdOnDocumentReady() {\n\t mkdIconWithHover().init();\n\t mkdIEversion();\n\t mkdInitAnchor().init();\n\t mkdInitBackToTop();\n\t mkdBackButtonShowHide();\n\t mkdInitSelfHostedVideoPlayer();\n\t mkdSelfHostedVideoSize();\n\t mkdFluidVideo();\n\t mkdOwlSlider();\n\t mkdPreloadBackgrounds();\n\t mkdPrettyPhoto();\n mkdInitCustomMenuDropdown();\n }", "function DOMReady() {\n }", "function edgtfOnDocumentReady() {\n\t edgtfSearchSlideFromWT();\n }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "onPageReady () {}", "function _fireReadyEventCallbacks() {\n _callbacks.ready.forEach(function(callback) {\n callback();\n });\n }", "function mkdfOnDocumentReady() {\n\t\tmkdfInitVerticalSplitSlider();\n\t}", "function onReady(event) {\n // bail if already triggered or IE8 document is not ready just yet\n var isIE8NotReady = event.type === \"readystatechange\" && document.readyState !== \"complete\";\n if (docReady.isReady || isIE8NotReady) {\n return;\n }\n trigger();\n }", "function onReady(event) {\r\n // bail if already triggered or IE8 document is not ready just yet\r\n var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete';\r\n if (docReady.isReady || isIE8NotReady) {\r\n return;\r\n }\r\n\r\n trigger();\r\n }", "static ready() { }", "function onReady(event) {\n // bail if already triggered or IE8 document is not ready just yet\n var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete';\n if (docReady.isReady || isIE8NotReady) {\n return;\n }\n\n trigger();\n }", "function pageReady() {\n legacySupport();\n\n updateHeaderActiveClass();\n initHeaderScroll();\n\n setLogDefaultState();\n setStepsClasses();\n _window.on('resize', debounce(setStepsClasses, 200))\n\n initMasks();\n initValidations();\n initSelectric();\n initDatepicker();\n\n _window.on('resize', debounce(setBreakpoint, 200))\n }", "function docReady(fn) {\n // see if DOM is already available\n if (document.readyState === \"complete\" || document.readyState === \"interactive\") {\n // call on next available tick\n setTimeout(fn, 1);\n } else {\n document.addEventListener(\"DOMContentLoaded\", fn);\n }\n }", "function imageEditorDocumentReady() {\n imageEditorDocumentReadyGeneral();\n imageEditorDocumentReadyCrop();\n imageEditorDocumentReadyTexts();\n imageEditorDocumentReadyUndo();\n}", "function whenReady(callback, doc) {\n doc = doc || rootDocument;\n // if document is loading, wait and try again\n whenDocumentReady(function() {\n watchImportsLoad(callback, doc);\n }, doc);\n}", "function whenReady(callback, doc) {\n doc = doc || rootDocument;\n // if document is loading, wait and try again\n whenDocumentReady(function() {\n watchImportsLoad(callback, doc);\n }, doc);\n}", "function onDocumentRedy() {\n\t//Init\n\tinitWS();\n\t\n//\tinitButtons();\n//\tupdateButtons();\n//\tsetInterval(updateButtons, 3000);\n\n}", "ready() {\r\n\t\tsuper.ready();\r\n\t}", "function setReady() {\n debug.log( arguments.callee.name );\n // Hacky-hacky for Linkinus 2.2 / iOS.\n location.href = 'linkinus-style://styleDidFinishLoading';\n \n scroller.setReady();\n overlay.setReady();\n \n //spam(); // Uncomment for scroll debugging.\n}", "function fireReady() {\n db(\"In #fireReady\")\n if (holdLoad) setTimeout(fireReady, 10);\n else {\n db(\"#fireReady - notifying listeners\")\n readyFired = true;\n for (var i = 0, len = readyListeners.length; i < len; i++) {\n readyListeners[i]();\n }\n readyListeners = [];\n }\n }", "ready() {}", "ready() {}", "ready() {}", "function init( event ) {\n // bail if IE8 document is not ready just yet\n var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete';\n if ( docReady.isReady || isIE8NotReady ) {\n return;\n }\n docReady.isReady = true;\n docReady.emit( 'ready', event );\n}", "function pageReady() {\n legacySupport();\n initSliders();\n }", "function onDOMReady() {\n // Make sure that the DOM is not already loaded\n if (isReady) return;\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if (!document.body) return setTimeout(onDOMReady, 0);\n // Remember that the DOM is ready\n isReady = true;\n // Make sure this is always async and then finishin init\n setTimeout(function() {\n app._finishInit();\n }, 0);\n }", "pageReady() {}", "function ready()\n {\n if (!readyFired)\n {\n // This must be set to true before we start calling callbacks\n readyFired = true;\n\n for (var i = 0; i < readyList.length; i++)\n {\n /**\n * If a callback here happens to add new ready handlers, this function will see that it already\n * fired and will schedule the callback to run right after this event loop finishes so all handlers\n * will still execute in order and no new ones will be added to the readyList while we are\n * processing the list.\n */\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n\n // Allow any closures held by these functions to free\n readyList = [];\n }\n }", "function completed( event ) {\n\t // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {\n\t detach();\n\t ready();\n\t }\n\t }", "function onInit() {\n Event.onDOMReady(onDOMReady, this.cfg.getProperty(\"container\"), this);\n }", "function mkdfOnDocumentReady() {\n\t\tmkdfScrollingImage();\n\t}", "function edgtfOnDocumentReady() {\n\t\tedgtfButton().init();\n\t}", "function ready(callback){\n // in case the document is already rendered\n if (document.readyState!='loading') callback();\n // modern browsers\n else if (document.addEventListener) document.addEventListener('DOMContentLoaded', callback);\n // IE <= 8\n else document.attachEvent('onreadystatechange', function(){\n if (document.readyState=='complete') callback();\n });\n}", "function docLoaded(fn) {\n if (document.readyState !== 'loading') {\n fn();\n\t} else {\n\t\tdocument.addEventListener('DOMContentLoaded', fn);\n\t}\n}", "function onInit() {\r\n\r\n Event.onDOMReady(onDOMReady, this.cfg.getProperty(\"container\"), this);\r\n\r\n }", "function onReady()\n {\n var layout_selector = $(\"#id_layout\");\n if(layout_selector.length == 0) // readonly field.\n return;\n fluent_layouts._select_single_option( layout_selector );\n layout_selector.change( fluent_layouts.onLayoutChange );\n fluent_contents.layout.onInitialize( fluent_layouts.fetch_layout_on_refresh );\n }", "function whenImportsReady(callback, doc) {\r\n doc = doc || mainDoc;\r\n // if document is loading, wait and try again\r\n whenDocumentReady(function() {\r\n watchImportsLoad(callback, doc);\r\n }, doc);\r\n}", "function edgtfOnDocumentReady() {\n\t edgtfInitImageSlider();\n }", "function pageReady(){\n handleUTM();\n legacySupport();\n initModals();\n initScrollMonitor();\n initVideos();\n _window.on('resize', debounce(initVideos, 200))\n initSmartBanner();\n initTeleport();\n initMasks();\n }", "function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}", "function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}", "function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}", "function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}", "ready() {\r\n\t\t// Override this\r\n\t\tthis.updateTitle();\r\n\t}" ]
[ "0.7519627", "0.74466544", "0.74466544", "0.7433517", "0.7413093", "0.7402056", "0.73957306", "0.73957306", "0.7317836", "0.72398555", "0.721288", "0.7160247", "0.7140437", "0.71345466", "0.71240044", "0.7050046", "0.7004576", "0.6997813", "0.6997813", "0.6997813", "0.6997813", "0.6987738", "0.69758767", "0.69641995", "0.6963915", "0.69572014", "0.69006974", "0.6898451", "0.6873536", "0.68705827", "0.6860413", "0.6822018", "0.68086845", "0.67954177", "0.6790318", "0.6787301", "0.6787301", "0.6784455", "0.678181", "0.6777589", "0.67696565", "0.6741863", "0.67284024", "0.66900635", "0.6670207", "0.6670207", "0.6670207", "0.6670207", "0.6670207", "0.6670207", "0.6670207", "0.6670207", "0.6666837", "0.6639672", "0.6637825", "0.6627795", "0.66074324", "0.659001", "0.65813774", "0.6576575", "0.65621203", "0.6545246", "0.65216005", "0.65216005", "0.6513412", "0.6512785", "0.64929473", "0.6488619", "0.64874387", "0.64874387", "0.64874387", "0.6484793", "0.6478321", "0.6463908", "0.646206", "0.64608973", "0.6450632", "0.6428669", "0.64262813", "0.6419251", "0.64087206", "0.6405249", "0.6404993", "0.6400876", "0.6384036", "0.6383467", "0.6382936", "0.6373868", "0.6373868", "0.6373868", "0.6373868", "0.6365167" ]
0.6641917
60
Class for managing events. Can be extended to provide event functionality in other classes.
function EventEmitter() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventClass() {}", "function Event() {\n let events = {};\n let last = undefined;\n this.on = function(evt, handler) {\n (events[evt] || (events[evt] = [])).push(handler);\n } \n this.emit = function(evt, ...arg) {\n last = evt;\n for(let item of events[evt])\n item(...arg);\n }\n\n this.removeLastEventHandler = function() {\n events[last].pop(); // delete event[last]\n }\n \n this.getEvents = function() {\n return {...events};\n }\n }", "function EventManager() {\n}", "function EventEmitter() {\n // Initialise required storage variables\n this._events = {};\n}", "function EventEmitter() {\n // Initialise required storage variables\n this._events = {};\n}", "function Event() {\n\t\tvar self = {};\n\t\tvar listeners = [];\n\n\t\tself.bind = function(callback) {\n\t\t\tlisteners.push(callback);\n\t\t};\n\t\tself.unbind = function(callback) {\n\t\t\tfor (var i = listeners.length - 1; i >= 0; i--) {\n\t\t\t\tif (listeners[i] == callback) listeners.splice(i, 1);\n\t\t\t}\n\t\t};\n\t\tself.trigger = function() {\n\t\t\tvar args = arguments;\n\t\t\t/* event is considered 'cancelled' if any handler returned a value of false\n\t\t\t\t(specifically false, not just a falsy value). Exactly what this means is\n\t\t\t\tup to the caller - we just return false */\n\t\t\tvar cancelled = false;\n\t\t\tfor (var i = 0; i < listeners.length; i++) {\n\t\t\t\tcancelled = cancelled || (listeners[i].apply(null, args) === false);\n\t\t\t}\n\t\t\treturn !cancelled;\n\t\t};\n\n\t\treturn self;\n\t}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {\n /* element using this mixin */\n var me = this,\n\n /* the registered event callbacks */\n listeners = [],\n\n //-------------------------------------------------------------//\n /*\n * Register a callback for the given event type\n *\n * @param type {string} the event type triggering the callback\n * @param cb {function} the callback used when the event type\n * is triggered\n * @param context {any} an optional context used as \"this\" for\n * the triggered callback\n * \"this\" default to the event emitter if not provided\n */\n on = function(type, cb, context) {\n listeners.push({\n type: type,\n cb: cb,\n context: context || this\n });\n },\n\n //-------------------------------------------------------------//\n /*\n * Unregister a previously registered callback\n *\n * @param type {string} the type of the event listener to unregister\n * @param cb {function} the callback of the listener to unregister\n */\n off = function(type, cb) {\n listeners = _filter(listeners, function(listener) {\n return !(listener.type === type && listener.cb === cb);\n });\n },\n\n //-------------------------------------------------------------//\n /*\n * Trigger an event of the provided type, calling all registered\n * callbacks for this type of event\n *\n * @param type {string} the type of the listener to trigger\n * @param event {object} the object containg data\n *\n * event.currentTarget : the element having triggered the\n * first trigger.\n *\n * if no currentTarget is set, then the current element is\n * the first on to call 'trigger'\n *\n * -> set him as currentTarget\n *\n */\n trigger = function(type, event) {\n event = event || {};\n event.currentTarget = event.currentTarget || me;\n\n listeners.forEach(function(listener) {\n if (type === listener.type) {\n listener.cb.call(listener.context, event);\n }\n });\n\n /* bubbling */\n // if (me.parent) {\n // me.parent.trigger.call(me.parent, type, event);\n // }\n };\n\n //-------------------------------------------------------------//\n /* public fields */\n\n this.on = on.bind(this);\n this.off = off.bind(this);\n this.trigger = trigger.bind(this);\n\n //-------------------------------------------------------------//\n\n return this;\n}", "function Events() { }", "function _class() {\n\t\t_classCallCheck(this, _class);\n\n\t\t/**\n * Map of events to handlers. The keys in the object are the event names.\n * The values in the object are arrays of event handler functions.\n * @type {Object}\n * @private\n */\n\t\tthis._handlers = {};\n\t}", "function EventAware() {\n //a map of event names to an array of callbacks\n var listeners = {};\n\n return {\n /**\n * Registers a callback with a certain type of event. When the fire\n * method is called with an event whose name property matches the name\n * argument, the callback will be called.\n *\n * @param name the name of the type of the event that will invoke the\n * callback when fired\n * @param callback a function that takes the argument of the fired event\n **/\n on(name, callback) {\n if (listeners[name] === undefined) {\n listeners[name] = [callback];\n } else {\n listeners[name].push(callback);\n }\n },\n /**\n * Signifies that an event has occurred. This will cause any registered\n * callbacks to be fired.\n *\n * @param event the event. Any callback that was registered under\n * event.name will be called.\n **/\n fire(event) {\n if (event.name === undefined) {\n throw (new Error('event must have a name'));\n }\n if (listeners[event.name] !== undefined) {\n for (var listener of listeners[event.name]) {\n listener(event);\n }\n }\n }\n };\n }", "function _EV() {\n//var _EV = {\n var self = this;\n var handlers = {};\n\n self.emit = function emit(event) {\n var args = Array.prototype.slice.call(arguments, 1);\n\n if(handlers[event]) {\n for(var lc=0; lc<handlers[event].length; lc++) {\n var handler = handlers[event][lc];\n handler.apply(cur_frm, args);\n }\n }\n };\n\n self.on = function on(event, callback) {\n if(!handlers[event]) {\n handlers[event] = [];\n }\n handlers[event].push(callback);\n };\n\n self.once = function once(event, callback) {\n self.on(event, function onetimeCallback() {\n callback.apply(cur_frm, arguments);\n self.removeListener(event, onetimeCallback);\n });\n };\n\n self.removeListener = function removeListener(event, callback) {\n if(handlers[event]) {\n var index = handlers[event].indexOf(callback);\n handlers[event].splice(index, 1);\n }\n };\n\n self.removeAllListeners = function removeAllListeners(event) {\n handlers[event] = undefined;\n };\n}", "function EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n }", "function EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n }", "constructor() {\n this._events = Object.create(null)\n }", "function EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n }", "function Eventify() {\n this.events = {};\n }", "function EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n }", "function EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n }", "function EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n }", "function EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n }", "function EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n }", "function EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n }", "function EventHandlers() {}" ]
[ "0.74709177", "0.72577137", "0.7088683", "0.6984273", "0.6984273", "0.6937129", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.6876639", "0.674028", "0.6695112", "0.6678295", "0.66249394", "0.6606175", "0.6591336", "0.6550087", "0.6546204", "0.6544782", "0.65418357", "0.65418357", "0.65418357", "0.65418357", "0.6541678", "0.6541678", "0.6514826" ]
0.0
-1
helpers // get a number from a string, not a percentage
function getStyleSize( value ) { var num = parseFloat( value ); // not a percent like '100%', and a number var isValid = value.indexOf('%') === -1 && !isNaN( num ); return isValid && num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function measureToNumber(str){\n\tvar parts = str.split(\"p\");\n\tvar val = parts[0];\n\tval = Number(val);\n\treturn val;\n}", "function stringToNumber(string) {\r\n // parseXXX interpretiert einen Punkt immer als Dezimaltrennzeichen\r\n var returnValue = \"\";\r\n var percent = false;\r\n // Buchstaben und Whitespaces entfernen\r\n string = string.replace(/[\\sa-zA-Z]/g, \"\");\r\n // Auf % pruefen und % entfernen\r\n if (string.lastIndexOf(\"%\") != -1) {\r\n percent = true;\r\n string = string.replace(/%/g, \"\");\r\n }\r\n var regexpWholeSimple = /^\\d+$/;\r\n var regexpWholeWithDots = /^\\d+(\\.\\d{3}){1,}$/;\r\n var regexpDecimal = /^\\d*\\.\\d{1,}$/;\r\n if (regexpWholeSimple.test(string)) {\r\n // Einfache ganze Zahl\r\n returnValue = parseInt(string);\r\n } else if (regexpWholeWithDots.test(string)) {\r\n // Ganze Zahl mit Tausenderpunkten\r\n returnValue = parseInt(string.replace(/\\./g, \"\"));\r\n } else if (regexpDecimal.test(string)) {\r\n // Dezimalzahl mit Punkt als Trennzeichen\r\n returnValue = parseFloat(string);\r\n } else {\r\n // Kein gueltiger String\r\n percent = false;\r\n returnValue = \"\";\r\n }\r\n if (percent) { returnValue /= 100; }\r\n return returnValue;\r\n}", "function getNum(string) {\n var num = string.match(/\\d+/)[0];\n return num;\n}", "percentToNumber(percentStr) {\n return Number(percentStr.slice(0, -1));\n }", "function string2PPValue(inString) {\n var matches = /^(.+?)(%)?$/.exec(inString);\n var value, isRatio;\n return matches && isFinite(value = parseFloat(matches[1])) ? {\n value: (isRatio = !!(matches[2] && value)) ? value / 100 : value,\n isRatio: isRatio\n } : null; // 0% -> 0\n }", "function getPercentFromText (text) {\n if (!text) return 'null'\n var percent = text.match(/[0-9]*%/)\n var int\n if (percent && percent.length >= 1) {\n int = parseInt(percent[0], 10)\n // In case a match is found but is actually not parseable as integer\n if (isNaN(int) === true) {\n return 'null'\n } else {\n return int\n }\n } else {\n return 'null'\n }\n}", "function getNumberFromString(s) {\n return +s.replace(/[^0-9.]/g,''); //remove all the alphabetic characters\n}", "function getNumberFromString(s) {\n return Number(s.replace(/\\D/g, \"\"));\n}", "function justTheNumber(text){\n var numbo=0;\n var decimal= new RegExp(/\\./g);\n if (decimal.test(text)){\n numbo= text.match(/[0-9]+\\.[0-9]+/g);\n }else{\n numbo= text.match(/[0-9]+/g);\n }\n\n return numbo;\n\n}", "function getNumberFromString(s) {\n return +s.replace(/\\D/g, \"\");\n}", "function p(s){\n return Number(s.split('px')[0]);\n}", "function readNumber(str) {\n // let result = '';\n // let end = start;\n //\n // const validChars = '0123456789';\n // const validFirstChar = '+-0123456789';\n //\n // for (let i = start; i < str.length; ++i) {\n //\n // }\n\n return parseFloat(str);\n}", "function extractCurrencyValue(str) {\r\n\treturn Number(str.slice(1))\r\n}", "function getValue(str){\n\tstr += '';\n \tvar rgx = /^\\d|\\.|-$/;\n\t var out = '';\n\t for( var i = 0; i < str.length; i++ )\n\t {\n\t if( rgx.test( str.charAt(i) ) ){\n\t if( !( ( str.charAt(i) == '.' && out.indexOf( '.' ) != -1 ) ||\n\t ( str.charAt(i) == '-' && out.length != 0 ) ) ){\n\t out += str.charAt(i);\n\t }\n\t }\n\t }\n\t return parseInt(out);\n}", "function extractAmount(str) {\n return Number(str.replace(/[^0-9\\.-]+/g, ''));\n }", "function stringToNumber(str, base) {\n var sanitized, isDecimal;\n sanitized = str.replace(fullWidthNumberReg, function(chr) {\n var replacement = getOwn(fullWidthNumberMap, chr);\n if (replacement === HALF_WIDTH_PERIOD) {\n isDecimal = true;\n }\n return replacement;\n });\n return isDecimal ? parseFloat(sanitized) : parseInt(sanitized, base || 10);\n }", "function pxToNum(str) {\n return Number(String(str).match(/^(-?[\\d.]+)px$/)[1]);\n}", "function stringToNumber(str, base) {\n var sanitized, isDecimal;\n sanitized = str.replace(NumberNormalizeReg, function(chr) {\n var replacement = NumberNormalizeMap[chr];\n if(replacement === HalfWidthPeriod) {\n isDecimal = true;\n }\n return replacement;\n });\n return isDecimal ? parseFloat(sanitized) : parseInt(sanitized, base || 10);\n }", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function percent(str) {\n\tvar num = '', percentPos = str.indexOf('%'), leftNumPos = -1, rightNumPos = percentPos - 1;\n\tfor (var i = rightNumPos; i >= 0 && (isFinite(str[i]) || str[i] == '.'); i--) {\n\t\tnum += str[i];\n\t\tleftNumPos = i;\n\t}\n\tnum = num.split('').reverse().join('');\n\treturn {\n\t\tsubstr: num + '%',\n\t\tnum: num / 100\n\t};\n}", "function parsePercent(str, defaultValue) {\n if (str) {\n return parseFloat(str) / 100;\n } else {\n return defaultValue;\n }\n}", "function stringToNumber( string )\n {\n \tvar number;\n \t\n \tnumber = parseFloat( string );\n \treturn number;\n }", "function stringToCalculation(string) {\n let newString = string.replace(/x/g, \"*\"); // eval does not accept \"x\" as multiplication, only \"*\"\n newString = newString.replace(/÷/g, \"/\"); // same goes for division icon\n let result = eval(newString);\n return Math.round(result * 100) / 100; // handling for JS floating point weirdness\n}", "function convertStringToNumber(string) {\n string = string.replace(/,/g, \"\"); // remove thousand separators ','\n string = string.replace(/%/, \"\"); // remove percent symbol '%'\n\n // convert time into number string\n if (isTime(string)) {\n string = getSecondsFromTime(string);\n }\n\n // convert string into number\n var number = Number(string);\n if (number.toString() == \"NaN\") {\n return string;\n }\n\n return number;\n }", "function extract_num(str, num) {\n var len = num.toString().length;\n var trim = str.trim();\n var extracted = trim.substr(len, trim.length).trim();\n if (extracted[0] == '.' || extracted[0] == ')' || extracted[0] == '-') return extracted.substr(1, extracted.length).trim();\n return extracted;\n}", "function getSpotNumber(s) // paramwret is a string\r\n{\r\n var number = new String('');\r\n \r\n for(var i = 0; i < s.length; i++)\r\n {\r\n if( (s.charAt(i) >= '0') && (s.charAt(i) <= '9') )\r\n number += s.charAt(i);\r\n }\r\n return number; // return a string\r\n}", "function parseNumber(s)\n{\n if (s.match(/\\./)) {\n return parseFloat(s);\n } else if (s.match(/\\//)) {\n return new Fraction(s); \n } else {\n return parseInt(s);\n }\n}", "function parseNumber(nbrStr) {\n var fNbr = board.jc.snippet(nbrStr, true, '', true);\n return fNbr();\n }", "function gentlyParseNumber(text) { return parseFloat(text) || text; }", "function formatString(string) {\n\treturn parseInt(string.replace(/\\./g, ''));\n}", "function ezGetNumPart(givenStr)\n{\n\tvar numPart=givenStr\n \tnumChars=\"0123456789\"\n \tch=0\n \twhile(numChars.indexOf(givenStr.charAt(ch))==-1)\n \t{\n \t\tch++\n \t\tif(ch==givenStr.length)\n \t\t\tbreak\n \t}\n \tif(ch!=givenStr.length)\n \t numPart=givenStr.substring(ch,givenStr.length)\n \tif(givenStr!=numPart)\n\treturn new Number(numPart)\n\telse\n\treturn givenStr\n\n}", "function pullNum(src){\n var num;\n var str;\n var test = src.indexOf(\"_\", 2);\n str = src.charAt(test+1) + src.charAt(test+2);\n num = parseInt(str);\n return num;\n}", "function _percentConverter(stringPercent){\n return parseFloat(stringPercent);\n}", "function findFirstWholeNumber(line) {\n\tvar num = new RegExp(\"[0-9]+\");\n\tvar result = num.exec(line);\n\tvar ans = null;\n\n\tif(result !== null) {\n\t\tvar endIndex= result.index + result[0].length - 1;\n\t\tvar nextChar = line.charAt(endIndex+1);\n\t\t// double check to see if not a fraction\n\t\tif(nextChar !== '/') {\n\t\t\tans = {\"value\": parseInt(result[0], 10), \"text\": result[0], \"start\": result.index, \"end\": endIndex};\t\n\t\t}\n\t}\n\treturn ans;\n}", "function eval(str){\n return 1* (str+ '').split(/[^0-9.+-]/)[0]; \n}", "function extractNumber(input){\n return parseInt(input.slice(1));\n }", "function numInMega(numStr){\n\n\tvar m = numStr.match(numExtRgx);\n\t\n\tif (m != null){\n\t\tlet v = parseFloat(m[1]);\n\t\tlet unit = m[2].toUpperCase();\n\n\t\tif (unit.startsWith(\"G\")){\n\t\t\tv *= 1000;\n\t\t}else if (unit.startsWith(\"K\") || unit.length === 0){\n\t\t\tv /= 1000;\n\t\t}\n\t\treturn v;\n\t}\n\treturn null;\n}", "function getNumberPercentage(total, num) {\n return parseInt(((num*100)/total));\n}", "function toNumberOrPercent(value) {\n if (!hasValue(value) || isNumber(value) || Object(_Percent__WEBPACK_IMPORTED_MODULE_0__[\"isPercent\"])(value)) {\n return value;\n }\n if (isString(value) && value.indexOf(\"%\") != -1) {\n return Object(_Percent__WEBPACK_IMPORTED_MODULE_0__[\"percent\"])(toNumber(value));\n }\n return toNumber(value);\n}", "function changeToNumber(myString) {\n return parseInt(myString);\n}", "function parseUnits(e) {\n if(typeof e === 'number') {\n return e;\n }\n if(e.indexOf('%') > -1) {\n e = e.replace('%','').trim();\n e = parseInt(e);\n e = e/100;\n } else {\n e = e.replace('px','').trim();\n e = parseInt(e);\n }\n return e;\n }", "function pxval(s) {\n return parseFloat(s.substr(0,s.length-2));\n }", "function priceToNumber(str) {\n let newStr = \"\";\n for (let char of str) {\n if (Number(char) || Number(char) === 0 || char === \".\") {\n newStr += char;\n }\n }\n return Number(newStr.trim());\n }", "function formatNum(num){\n\tif(!isNull(num) && isNaN(num)){\n\t\tif(num.indexOf(\"%\")){//invalid number\n\t\t\treturn false;\n\t\t}else{\n\t\t\tvar index=num.indexOf(\"px\");\n\t\t\tif(index>0){\n\t\t\t\treturn new Number(num.substring(0,index));\n\t\t\t}else{\n\t\t\t\treturn new Number(num);\n\t\t\t}\n\t\t}\n\t}else{\n\t\treturn num;\n\t}\n}", "function string2Number(str)\r\n{\r\n var v = 0;\r\n for(var i = 0 ; i < str.length ; i++)\r\n v += str[i].charCodeAt() * Math.pow(10,i);\r\n return v;\r\n}", "function GetDigitFromString(word) {\n return word.match(/\\d+/);\n}", "function changeStrToNum(str){\n return Number(str)\n}", "function stringInt(str) {\n return parseFloat(str);\n }", "function parseInt(string) {\n var words = {\n zero: 0, ten: 10,\n one: 1, eleven: 11,\n two: 2, twelve: 12, twenty: 20,\n three: 3, thirteen: 13, thirty: 30,\n four: 4, fourteen: 14, forty: 40,\n five: 5, fifteen: 15, fifty: 50,\n six: 6, sixteen: 16, sixty: 60,\n seven: 7, seventeen: 17, seventy: 70,\n eight: 8, eighteen: 18, eighty: 80,\n nine: 9, nineteen: 19, ninety: 90,\n hundred: 100,\n thousand: 1000,\n million: 1000000\n };\n\n var partial = string.split(/[- ]/).filter(function (e) {\n return e != 'and';\n }).map(function (e) {\n return words[e];\n });\n\n let num = 0;\n let previous = 0;\n\n for (let i = 0, n = partial.length - 1; i <= n; i++) {\n let current = partial[i];\n if (previous == 0) {\n previous = current;\n } else if (previous > current) {\n previous += current;\n } else {\n previous *= current;\n }\n\n if (current >= 1000 || i == n) {\n num += previous;\n previous = 0;\n }\n }\n return num;\n}", "function str_to_number(input)\n{\n\tif (typeof(input) == \"number\")\n\t\treturn input;\n\tif (typeof(input) != \"string\")\n\t\treturn NaN;\n\tif (!input)\n\t\treturn NaN;\n\n\t// I believe the following commented line does more checks than it needs to\n\t//if (parseFloat(input) != NaN && isFinite(parseFloat(input)) && !isNaN(input))\n\tif (!isNaN(parseFloat(input)) && isFinite(input))\n\t{\t\n\t\tvar i_s = input.toString();\n\t\tif (i_s.length > 1)\n\t\t{\n\t\t\tif (i_s[0] == \"0\" && i_s[1].toLowerCase() == \"x\")\n\t\t\treturn parseInt(input, 16);\n\t\t}\n\t\treturn parseFloat(input);\n\t}\n\t\n\t//special case failure \n\tif (input.toString().toLowerCase() == \"infinity\")\n\t\treturn Infinity;\n\t\n\treturn NaN;\n}", "function getLixNumber(str) {\n if (getWordCount(str) == 0) return 1;\n if (getPeriodsCount(str) == 0) return 1;\n\n return getWordCount(str) / getPeriodsCount(str) + getLongWordCount(str) * (100 / getWordCount(str));\n}", "function stringToNum(arg){\n return parseInt(arg);\n}", "function getFloat(str) {\n return parseFloat(str.replace(/[^0-9\\.\\-]/g, ''));\n}", "function strToNumber(value){// Convert strings to numbers\nif(typeof value==='string'&&!isNaN(Number(value)-parseFloat(value))){return Number(value);}if(typeof value!=='number'){throw new Error(value+\" is not a number\");}return value;}", "function stringToNumber(s){\n //'121'\n var number = 0;\n for (var i=0; i< s.length ; i++){\n number += parseInt(s[i]) * Math.pow(10,s.length-i-1);\n }\n return number;\n}", "function stringToNum(string) {\n return parseInt(string)\n}", "function _prosValue (str, name) {\n\n var reStr = name + '(\\\\-\\\\w*)*'\n , reInt = /^\\d+$/g\n , re, value;\n\n re = new RegExp(reStr, 'gi');\n va = str.match(re);\n\n if( va !== null ) {\n // Delay: get number only\n va = va[0].replace(name + '-', '');\n\n // Delay: number convert\n if( reInt.test(va) ) return parseInt(va);\n else return va;\n\n } else { return false; }\n}", "function str2Num(input) {\n const n1 = input;\n console.log(Number(n1) + 1); // To check n1 converted to number from string. expected value 56.\n console.log(n1 + 1); // Check to test string. Expected 551.\n}", "function stringToNumber(value, containerSize) {\n if (value !== null && value !== undefined) {\n return value.indexOf('%') !== -1 ? containerSize / 100 * parseInt(value, 10) : parseInt(value, 10);\n }\n return null;\n }", "function returnNumber(stringValue) {\n\t\tstringValue = stringValue.trim();\n\t\t/*\tRegExp explanation:\n\t\t\t# [^ - Start of negated character class\t\t\t\t\t\t\t# , The literal character ,\t\t\t\t\t\t\t\t\n\t\t\t# ] - End of negated character class\t\t\t\t\t\t\t\t# \\. Matches the character . literally\n\t\t\t# 0-9 A single character in the range between 0 and 9\t\t\t\t# \\d Match a digit [0-9]\n\t\t\t# g Modifier: global. All matches (don't return on first match)\t# {2} Quantifier: {2} Exactly 2 times\n\t\t\t# [,\\.] Match a single character present in the list below\t\t\t# $ Assert position at end of the string\n\t\t*/\n\t\tvar result = stringValue.replace(/[^-0-9-]/g, '');\n\t\tif (/[,\\.]\\d{2}$/.test(stringValue)) {\n\t\t\tresult = result.replace(/(\\d{2})$/, '.$1');\n\t\t}\n\t\treturn parseFloat(result);\n\t}", "function priceToNumber(str) {\n if (!str || str.length === 0) {\n return 0;\n }\n\n var cleanPrice = str[0] === '$'? str.substring(1, str.length): str;\n var f = parseFloat(cleanPrice, 10);\n if (isNaN(f)) {\n console.error(\"Cannot parse as number:\", str);\n }\n return f;\n}", "function cssPixelsToInt(heightString){\n // check for non-numerics\n if (heightString.search(\"px\") && (heightString.search(\"!\") == -1)) {\n heightString = heightString.substring(0,((heightString.length)-2));// strip the 'px' from the end of the height\n return parseInt(heightString);// return an int\n } else if (heightString.search(\"px\") && (heightString.search(\"!\") != -1)) {\n // do something here eventually... need to get last index of integer to build the substring\n return 0;\n } else {\n // not pixel based, may be auto or a %, return nothing\n console.log('fullTopOffset.js: Error as cssPixelsToInt, string passed does not contain a pixel value. String: ' + heightString);\n return 0;\n } \n }", "function n(str) {\n if (str == \"\") { return -1; }\n return Number(str);\n }", "function pxtoint(str){\n\t// cuts \"px\" off the end\n\tvar num = Number(str.substring(0,str.length-2));\n\treturn num;\n}", "function parseStringToNumber ( value ) {\n\n\t// If the value is not a string, return it back\n\tif ( typeof value != \"string\" || value.trim() == \"\" )\n\t\treturn value;\n\n\t// If the value contains any character other than a digit, comma or a decimal point, return it back\n\tif ( /[^\\d\\-\\.,]/.test( value ) )\n\t\treturn value;\n\n\treturn parseFloat( value.replace( /,/g, \"\" ) );\n\n}", "_getDistanceInString(d) { \n if(d % 10 <= 0){\n let distance = d * 1000\n return `${parseInt(distance, 10)} ม.`\n }\n else {\n return `${parseInt(d, 10)} กม.` \n }\n }", "function getOnlyNumbers(str) {\n\t\tconst notNumbers = /\\D/g;\n\t\treturn parseInt(str.replace(notNumbers, \"\"));\n\t}", "function getMatchNumber(str, reg) {\n const result = str.match(reg)[0];\n return result.replace(/[^0-9]/g, \"\") * 1;\n}", "function conveterNum(num){\n return num/ 100;\n }", "function preProcessEvaluate( str ) {\n if (str.length === 0) return Number.NaN;\n\n if (str.endsWith('%') ) {\n const len = str.length;\n return `${preProcessEvaluate(str.slice(0, len - 1) ) * 0.01}`;\n }\n if ( str.startsWith('sin') ) {\n return `${Math.sin( preProcessEvaluate(str.slice(3) ) )}`; \n } else if (str.startsWith('cos') ) {\n return `${Math.cos( preProcessEvaluate(str.slice(3) ) )}`;\n } else if (str.startsWith('tan') ) {\n return `${Math.tan( preProcessEvaluate(str.slice(3) ) )}`;\n } else if (str.startsWith('√') ) {\n return `${Math.sqrt( preProcessEvaluate(str.slice(1) ) )}`;\n }\n\n return `${str}`;\n}", "function parse(string) {\n\treturn parseInt(string.slice(0,-2), 10);\n}", "function getStringValue() {\n let input = inText.value\n .replace(/\\.\\./g,'\\.'); // correct double radix entry\n // let inputAmt = (input === '' ? NaN : (Math.trunc(Number(input) * 100) / 100));\n setFocus(inText);\n displayOutput(input, outText);\n}", "function utanParseInt(str){\n if (!str) return 0;\n if (typeof str === 'number') {\n\t return Math.floor(str);\n\t}\n\treturn parseInt(str,10);\n}", "strToNum(str) {\n return Number(str.replace(/,/g, \"\")); // \"8,312,456\" --> 8312456\n }", "function pdec(s) { \n if (s === 'ph1' || s === 'PH1') { return 0.6180339887498948 }\n if (s === 'ln2' || s === 'LN2') { return Math.log(2) }\n if (s === 'p69' || s === 'P69') { return 0.692 }\n return parseInt(s)/12\n}", "function getWeight(str){\n result = 0;\n array = str.split('');\n array.forEach(element => {\n result += Number(element);\n });\n return result;\n}", "function Get_NumberFromStyle(variable, defaultValue)\n{\n\t//valid string?\n\tif (variable)\n\t{\n\t\t//remove all px\n\t\tvariable = variable.replace(/px/g, \"\");\n\t\t//valid?\n\t\tif (!isNaN(variable) && variable.length > 0)\n\t\t{\n\t\t\t//convert to a number\n\t\t\tvariable = Number(variable);\n\t\t\t//now return it\n\t\t\treturn variable.valueOf();\n\t\t}\n\t}\n\t//return the result\n\treturn defaultValue;\n}", "function n(e,t){var r=e.split(\"_\");return t%10===1&&t%100!==11?r[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?r[1]:r[2]}", "function n(e,t){var r=e.split(\"_\");return t%10===1&&t%100!==11?r[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?r[1]:r[2]}", "function n(e,t){var r=e.split(\"_\");return t%10===1&&t%100!==11?r[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?r[1]:r[2]}", "function f(n){ return Number(\"0.\"+String(n).split('.')[1] || 0); }", "function parseNumber(str) {\n var match = str.match(/^\\s*(\\d*)\\s*(.*)$/);\n return {\n num: Number(match[1]),\n value: match[2]\n };\n} // compare two strings case-insensitively, but examine case for strings that are", "readAndReturnNumber() {\n let ss = this.ss;\n let foundDecimal = false;\n let foundExp = false; // will recognize either \"e\" \"E\" or \"f\" TODO \"p\"\n let str = \"\";\n if (ss.peek() !== \".\" && !charUtils.isNumeric(ss.peek()))\n throw new assert_1.AssertError(\"Must only call if next chars are numbers. Found: \" + ss.peek());\n while (!ss.eof()) {\n let c = ss.read();\n if (c === \".\") {\n if (foundDecimal) {\n ss.unread();\n break;\n }\n if (foundExp) {\n ss.unread();\n break;\n }\n foundDecimal = true;\n str = str + c;\n continue;\n }\n if (c === \"e\" || c === \"E\" || c === \"f\") {\n if (foundExp) {\n ss.unread();\n break;\n }\n foundExp = true;\n str = str + c;\n continue;\n }\n if (charUtils.isNumeric(c)) {\n str = str + c;\n continue;\n }\n // otherwise, invalid character for a number\n ss.unread();\n break;\n }\n return str;\n }", "function convertStringToNumber(string)\n{\n string = string.replace(\"R$ \", \"\");\n string = string.replace(\".\", \"\");\n // string = string.replace(\",\", \".\");\n\n string = parseFloat(string);\n // string = string.toFixed(2);\n return string;\n}", "function parseNextNumber()\r\n{\r\n\tvar _value\r\n\r\n\t_value = parseFloat(parseNextWord())\r\n\treturn _value\r\n}", "function getnum(spanid) {\n return parseInt(spanid.split(\"-\").slice(-1)[0]);\n }", "function Solo_Numerico(variable){\n Numer=parseInt(variable);\n if (isNaN(Numer)){\n return \"\";\n }\n return Numer;\n}", "function parseSvgMeasure(str) {\n return utils.isString(str) && /[a-z]/.test(str) ? str : Number(str);\n }", "function percentOf(num1, num2){\n num3 = num1/num2 * 100\n return num3 + \"%\"\n}", "function percentFormat(str, fn) {\n var num = 0;\n\n if (typeof str == \"string\") {\n //不是數字就傳回原來的\n if (isNaN(str)) {\n return str;\n }\n\n num = Number(str);\n }\n else if (typeof str == \"number\") {\n num = str;\n }\n else {\n return str;\n }\n\n if (fn == \"%\") {\n return (num * 100);\n }\n\n fn1 = fn.substring(1);\n if (isNaN(fn1)) {\n return (num * 100);\n }\n\n return Number((num * 100).toFixed(Number(fn1)));\n}", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n}", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n}" ]
[ "0.7677354", "0.7292998", "0.7140811", "0.7128982", "0.69619435", "0.6959351", "0.69154835", "0.6903902", "0.67870355", "0.67828125", "0.6771369", "0.67198145", "0.67067134", "0.6705655", "0.66444874", "0.6621286", "0.66016775", "0.6593742", "0.6553171", "0.6553171", "0.6553171", "0.6553171", "0.6553171", "0.6553171", "0.6553171", "0.6553171", "0.6553171", "0.6553171", "0.65431136", "0.6529228", "0.6523492", "0.6512094", "0.6489898", "0.6485521", "0.64808863", "0.6468453", "0.6397572", "0.6393957", "0.63883215", "0.6382483", "0.6376561", "0.6352269", "0.63358647", "0.63130206", "0.6296432", "0.62907594", "0.6290186", "0.6279027", "0.6272773", "0.6269945", "0.62665856", "0.62588626", "0.6249823", "0.6242648", "0.62404424", "0.6227537", "0.6203606", "0.6186384", "0.61747384", "0.61647224", "0.61589247", "0.615709", "0.6143106", "0.6127188", "0.612695", "0.61267775", "0.6104509", "0.6101753", "0.60875815", "0.6064617", "0.60554904", "0.60333145", "0.6023733", "0.60164034", "0.60092884", "0.5995999", "0.5987121", "0.5985473", "0.5975353", "0.5969679", "0.59570885", "0.59567857", "0.595605", "0.59544456", "0.5953163", "0.59491354", "0.59486014", "0.59486014", "0.59486014", "0.59478134", "0.59421664", "0.59400237", "0.59342253", "0.5929659", "0.59258753", "0.5921876", "0.59166104", "0.5915307", "0.5912074", "0.59056574", "0.59056574" ]
0.0
-1
setup vars and functions do it on initial getSize(), rather than on script load For Firefox bug
function setup() { // setup once if ( isSetup ) { return; } isSetup = true; var getComputedStyle = window.getComputedStyle; getStyle = ( function() { var getStyleFn = getComputedStyle ? function( elem ) { return getComputedStyle( elem, null ); } : function( elem ) { return elem.currentStyle; }; return function getStyle( elem ) { var style = getStyleFn( elem ); if ( !style ) { logError( 'Style returned ' + style + '. Are you running this code in a hidden iframe on Firefox? ' + 'See http://bit.ly/getsizebug1' ); } return style; }; })(); // -------------------------- box sizing -------------------------- // boxSizingProp = getStyleProperty('boxSizing'); /** * WebKit measures the outer-width on style.width on border-box elems * IE & Firefox measures the inner-width */ if ( boxSizingProp ) { var div = document.createElement('div'); div.style.width = '200px'; div.style.padding = '1px 2px 3px 4px'; div.style.borderStyle = 'solid'; div.style.borderWidth = '1px 2px 3px 4px'; div.style[ boxSizingProp ] = 'border-box'; var body = document.body || document.documentElement; body.appendChild( div ); var style = getStyle( div ); isBoxSizeOuter = getStyleSize( style.width ) === 200; body.removeChild( div ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initSize(){\n\t\t$this.css({\n\t\t\twidth\t: params.width,\n\t\t\theight\t: params.height\n\t\t});\n\t\t\n\t\t$('body').css({\n\t\t\twidth\t: params.width,\n\t\t\theight\t: params.height\n\t\t});\n\n\t\t$this.find('.lsd-box').each(function(){\n\t\t\t$(this).css({\n\t\t\t\twidth\t: params.width,\n\t\t\t\theight\t: params.height\n\t\t\t});\n\t\t});\n\n\t\t\n\t}", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n isSetup = true;\n var getComputedStyle = window.getComputedStyle;\n getStyle = function() {\n var getStyleFn = getComputedStyle ? function(elem) {\n return getComputedStyle(elem, null);\n } : function(elem) {\n return elem.currentStyle;\n };\n return function getStyle(elem) {\n var style = getStyleFn(elem);\n if (!style) {\n logError(\"Style returned \" + style + \". Are you running this code in a hidden iframe on Firefox? \" + \"See http://bit.ly/getsizebug1\");\n }\n return style;\n };\n }();\n // -------------------------- box sizing -------------------------- //\n boxSizingProp = getStyleProperty(\"boxSizing\");\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox measures the inner-width\n */\n if (boxSizingProp) {\n var div = document.createElement(\"div\");\n div.style.width = \"200px\";\n div.style.padding = \"1px 2px 3px 4px\";\n div.style.borderStyle = \"solid\";\n div.style.borderWidth = \"1px 2px 3px 4px\";\n div.style[boxSizingProp] = \"border-box\";\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div);\n isBoxSizeOuter = getStyleSize(style.width) === 200;\n body.removeChild(div);\n }\n }", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n var getComputedStyle = window.getComputedStyle;\n getStyle = ( function() {\n var getStyleFn = getComputedStyle ?\n function( elem ) {\n return getComputedStyle( elem, null );\n } :\n function( elem ) {\n return elem.currentStyle;\n };\n\n return function getStyle( elem ) {\n var style = getStyleFn( elem );\n if ( !style ) {\n logError( 'Style returned ' + style +\n '. Are you running this code in a hidden iframe on Firefox? ' +\n 'See http://bit.ly/getsizebug1' );\n }\n return style;\n };\n })();\n\n // -------------------------- box sizing -------------------------- //\n\n boxSizingProp = getStyleProperty$$1('boxSizing');\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox measures the inner-width\n */\n if ( boxSizingProp ) {\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style[ boxSizingProp ] = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n isBoxSizeOuter = getStyleSize( style.width ) === 200;\n body.removeChild( div );\n }\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n var getComputedStyle = window.getComputedStyle;\n getStyle = ( function() {\n var getStyleFn = getComputedStyle ?\n function( elem ) {\n return getComputedStyle( elem, null );\n } :\n function( elem ) {\n return elem.currentStyle;\n };\n\n return function getStyle( elem ) {\n var style = getStyleFn( elem );\n if ( !style ) {\n logError( 'Style returned ' + style +\n '. Are you running this code in a hidden iframe on Firefox? ' +\n 'See http://bit.ly/getsizebug1' );\n }\n return style;\n };\n })();\n\n // -------------------------- box sizing -------------------------- //\n\n boxSizingProp = getStyleProperty('boxSizing');\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox measures the inner-width\n */\n if ( boxSizingProp ) {\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style[ boxSizingProp ] = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n isBoxSizeOuter = getStyleSize( style.width ) === 200;\n body.removeChild( div );\n }\n\n }", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n isSetup = true;\n\n var getComputedStyle = window.getComputedStyle;\n getStyle = (function() {\n var getStyleFn = getComputedStyle ?\n function(elem) {\n return getComputedStyle(elem, null);\n } :\n function(elem) {\n return elem.currentStyle;\n };\n\n return function getStyle(elem) {\n var style = getStyleFn(elem);\n if (!style) {\n logError('Style returned ' + style +\n '. Are you running this code in a hidden iframe on Firefox? ' +\n 'See http://bit.ly/getsizebug1');\n }\n return style;\n };\n })();\n\n // -------------------------- box sizing -------------------------- //\n\n boxSizingProp = getStyleProperty('boxSizing');\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox measures the inner-width\n */\n if (boxSizingProp) {\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style[boxSizingProp] = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div);\n\n isBoxSizeOuter = getStyleSize(style.width) === 200;\n body.removeChild(div);\n }\n\n }", "function setup() {\r\n // setup once\r\n if (isSetup) {\r\n return;\r\n }\r\n isSetup = true;\r\n\r\n var getComputedStyle = window.getComputedStyle;\r\n getStyle = (function() {\r\n var getStyleFn = getComputedStyle ?\r\n function(elem) {\r\n return getComputedStyle(elem, null);\r\n } : function(elem) {\r\n return elem.currentStyle;\r\n };\r\n\r\n return function getStyle(elem) {\r\n var style = getStyleFn(elem);\r\n if (!style) {\r\n logError('Style returned ' + style + '. Are you running this code in a hidden iframe on Firefox? ' + 'See http://bit.ly/getsizebug1');\r\n }\r\n return style;\r\n };\r\n })();\r\n\r\n // -------------------------- box sizing -------------------------- //\r\n boxSizingProp = getStyleProperty('boxSizing');\r\n\r\n /**\r\n * WebKit measures the outer-width on style.width on border-box elems\r\n * IE & Firefox measures the inner-width\r\n */\r\n if (boxSizingProp) {\r\n var div = document.createElement('div');\r\n div.style.width = '200px';\r\n div.style.padding = '1px 2px 3px 4px';\r\n div.style.borderStyle = 'solid';\r\n div.style.borderWidth = '1px 2px 3px 4px';\r\n div.style[boxSizingProp] = 'border-box';\r\n\r\n var body = document.body || document.documentElement;\r\n body.appendChild(div);\r\n var style = getStyle(div);\r\n\r\n isBoxSizeOuter = getStyleSize(style.width) === 200;\r\n body.removeChild(div);\r\n }\r\n\r\n }", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div);\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize(style.width) == 200;\n body.removeChild(div);\n\n }", "function setup() {\n\t // setup once\n\t if ( isSetup ) {\n\t return;\n\t }\n\t isSetup = true;\n\t\n\t var getComputedStyle = window.getComputedStyle;\n\t getStyle = ( function() {\n\t var getStyleFn = getComputedStyle ?\n\t function( elem ) {\n\t return getComputedStyle( elem, null );\n\t } :\n\t function( elem ) {\n\t return elem.currentStyle;\n\t };\n\t\n\t return function getStyle( elem ) {\n\t var style = getStyleFn( elem );\n\t if ( !style ) {\n\t logError( 'Style returned ' + style +\n\t '. Are you running this code in a hidden iframe on Firefox? ' +\n\t 'See http://bit.ly/getsizebug1' );\n\t }\n\t return style;\n\t };\n\t })();\n\t\n\t // -------------------------- box sizing -------------------------- //\n\t\n\t boxSizingProp = getStyleProperty('boxSizing');\n\t\n\t /**\n\t * WebKit measures the outer-width on style.width on border-box elems\n\t * IE & Firefox measures the inner-width\n\t */\n\t if ( boxSizingProp ) {\n\t var div = document.createElement('div');\n\t div.style.width = '200px';\n\t div.style.padding = '1px 2px 3px 4px';\n\t div.style.borderStyle = 'solid';\n\t div.style.borderWidth = '1px 2px 3px 4px';\n\t div.style[ boxSizingProp ] = 'border-box';\n\t\n\t var body = document.body || document.documentElement;\n\t body.appendChild( div );\n\t var style = getStyle( div );\n\t\n\t isBoxSizeOuter = getStyleSize( style.width ) === 200;\n\t body.removeChild( div );\n\t }\n\t\n\t}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n\n getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;\n body.removeChild( div );\n\n}", "function sizeInit(url){\n\n\toverlay = new Element('div', {\n\t\t'id':'mbOverlay',\n\t\t'styles':{ 'opacity': 0.75 },\n\t\t'events':{ 'click' : sizeKill }\n\t}).inject($(document.body));\n\n\tpp = new Element('div', {\n\t\t'id' : 'overSize',\n\t\t'class' : 'overlayPanel'\n\t}).inject($(document.body));\n\n\tii = new Element('iframe', {\n\t\t'src'\t\t\t: myPath+'ressource/lib/media.size.php?src='+url,\n\t\t'height'\t\t: '100%',\n\t\t'width'\t\t\t: '100%',\n\t\t'frameborder'\t: '0'\n\t}).inject(pp);\n\n}", "function setup () {\n // setup once\n if (isSetup) {\n return\n }\n isSetup = true\n\n var getComputedStyle = window.getComputedStyle\n getStyle = (function () {\n var getStyleFn = getComputedStyle\n ? function (elem) {\n return getComputedStyle(elem, null)\n }\n : function (elem) {\n return elem.currentStyle\n }\n\n return function getStyle (elem) {\n var style = getStyleFn(elem)\n if (!style) {\n logError(\n 'Style returned ' +\n style +\n '. Are you running this code in a hidden iframe on Firefox? ' +\n 'See http://bit.ly/getsizebug1'\n )\n }\n return style\n }\n })()\n\n // -------------------------- box sizing -------------------------- //\n\n boxSizingProp = getStyleProperty('boxSizing')\n\n /**\n * WebKit measures the outer-width on style.width on border-box elems\n * IE & Firefox measures the inner-width\n */\n if (boxSizingProp) {\n var div = document.createElement('div')\n div.style.width = '200px'\n div.style.padding = '1px 2px 3px 4px'\n div.style.borderStyle = 'solid'\n div.style.borderWidth = '1px 2px 3px 4px'\n div.style[boxSizingProp] = 'border-box'\n\n var body = document.body || document.documentElement\n body.appendChild(div)\n var style = getStyle(div)\n\n isBoxSizeOuter = getStyleSize(style.width) === 200\n body.removeChild(div)\n }\n }", "function get_size() {\r\n\tK.height = document.body.clientHeight\r\n\tK.width = document.body.clientWidth\r\n}", "function onPageLoad()\n\t{\n\t\t//Set page size\n\t\tSetSize();\n\t\tloadPreferences();\n\t}", "function onPageLoad()\n{\n\t//Set page size\n\tSetSize();\n}", "function init_resize(){\n\n // add more here\n\n}", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n\n isSetup = true; // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div); // round value for browser zoom. desandro/masonry#928\n\n isBoxSizeOuter = Math.round(getStyleSize(style.width)) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n body.removeChild(div);\n } // -------------------------- getSize -------------------------- //", "function _calculateSize() {\r\n contentWidth = parseInt($(\"#\" + divid).width());\r\n contentHeight = parseInt($(\"#\" + divid).height());\r\n $(\"#\" + divid).remove();\r\n sizeGetCallback(contentOrJQObj, _getLayerPos(clientSize, { Width: contentWidth, Height: contentHeight }));\r\n }", "function initialSize() {\r\n let iwidth = $('#iframe').width();\r\n let iheight = iwidth * (0.5625); // 16:9 ratio //\r\n $('#iframe').height(iheight);\r\n }", "function onPageLoad() {\n // winResize();\n // winScroll();\n }", "function help_resize() {\n\t\tvar h_height = inner_size()[1];\n\t\tdocument.getElementById('general').style.height = h_height-45;\n\t\tdocument.getElementById('chat').style.height = h_height-45;\n\t\tdocument.getElementById('calendar').style.height = h_height-45;\n\t\tdocument.getElementById('inbox').style.height = h_height-45;\n\t\tdocument.getElementById('compose').style.height = h_height-45;\n\t\tdocument.getElementById('address').style.height = h_height-45;\n\t\tdocument.getElementById('folders').style.height = h_height-45;\n\t\tdocument.getElementById('search').style.height = h_height-45;\n\t\tdocument.getElementById('preferences').style.height = h_height-45;\n\t\tdocument.getElementById('credits').style.height = h_height-45;\n\t}", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div);\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round(getStyleSize(style.width)) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild(div);\n }", "function doneResizing(){\n //bigGalleryWidth();\n sliderHeight();\n centerVerticalNavigation();\n}", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div);\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round(getStyleSize(style.width)) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n body.removeChild(div);\n }", "updateSize() {\n this.w = this.ent.width + this.wo;\n this.h = this.ent.height + this.ho;\n }", "function set_dimensions() \n{\n\t// Control section height\n\t$(\"#control-area.initial-contain\").css(\"height\", (h*0.6)-50); \n\t// Footer height (no search yet)\n\t$(\"#main-content > section:first-child\").css(\"height\", (h*0.4));\n\t// Content (for search results) needs to be spaced from the top of the screen\n\t$(\"#content-area\").css(\"marginTop\", (h*0.6)-50);\n}", "function doResizeStuff() {\n checkTextWidths();\n $('#mainwindow').height($(document).height() -35);\n}", "function utilSize () {\n var contentWidth = $('.poem-home').width();\n $('#utils').width(contentWidth + 10);\n }", "function setsize() {\n\tvar sizes = $(\".well input[name='size']\").val().split(\"x\");\n\t// add properties to object and store for future play\n\tCW.sizex = sizes[0];\n\tCW.sizey = sizes[1];\n\tlocalStorage[\"sizex\"] = sizes[0];\n\tlocalStorage[\"sizey\"] = sizes[1];\n\tlocalStorage[\"black\"] = CW.black;\n\tlocalStorage[\"blank\"] = CW.blank;\n\t$(\".well > h3\").text(\"Generator for \" + CW.sizex + \"x\" + CW.sizey + \" Crossword Puzzle\")\n\t$(\".word\").toggle(\"slow\");\n\t$(\".form-inline\").hide();\n\tevent.preventDefault();\n}", "setPxSizes() {\n var px_per_em = this.getEmSize( this.jqueryMap.$container.get(0) );\n\n this.stateMap.px_per_em = px_per_em;\n this.stateMap.alone_height_px = this.configMap.alone_height_em * px_per_em;\n this.stateMap.other_height_px = this.configMap.other_height_em * px_per_em;\n }", "function setupPage() { \r\n tintDiv = document.getElementById(\"modaltintdiv\"); \r\n getDimensions(); \r\n sizeTintDiv();\r\n setModalPosition();\r\n }", "function RMXFViewer_SetSize()\n{\n var instText1 = \"You must install \";\n var instText2 = \"Vidicor View Component\";\n var instText3 = \"Click this link and run the file then follow his instructions.\";\n var instText4 = \"Press F5 since installation complete.\";\n var instText5 = \"Attention! This page requires additional component to work.\\n\" +\n \"Press OK and follow component installation instructions.\";\n if (lang == 'ru')\n {\n instText1 = \"Вам необходимо установить \";\n instText2 = \"компонент просмотра Vidicor\";\n instText3 = \"Нажмите на эту ссылку, запустите файл и следуйте его инструкциям.\";\n instText4 = \"После завершения установки нажмите F5.\";\n instText5 = \"Внимание! Эта страница требует для работы установки дополнительного компонента.\\n\" +\n \"Нажмите OK и следуйте появившимся инструкциям по установке компонента.\";\n }\n\n var w = -1;\n var h = -1;\n if (arguments.length == 2)\n {\n w = parseInt(arguments[0]);\n h = parseInt(arguments[1]);\n }\n else\n if (arguments.length == 1)\n {\n var str = new String(arguments[0]);\n var xi = str.indexOf('x', 0);\n if (xi < 0) xi = str.indexOf('X', 0);\n if (xi < 0) xi = str.indexOf('*', 0);\n if (xi >= 0)\n {\n w = parseInt(str.substring(0, xi));\n h = parseInt(str.substring(xi + 1));\n }\n }\n else\n if (arguments.length == 0)\n {\n w = this.reqW;\n h = this.reqH;\n }\n if ((w >= 0) && (h >= 0))\n {\n this.reqW = w;\n this.reqH = h;\n if ((this.rmxfobj != null) &&\n (this.rmxfobj.readyState >= 4))\n {\n if (this.rmxfobj.URL != null)\n window.setTimeout('RMXFCallSetVideoSize(' + this.rmxfidx + ', ' + w + ', ' + h + ')', 10);\n else\n {\n this.rmxftag.innerHTML = \"<TABLE id=instructions\" +\n \t\t\t \"width=\" + this.reqW + \n \t\t\t \" height=\" + this.reqH +\n \t\t\t \"border=0 cellpadding=0 cellspacing=0>\" +\n \"<TR><TD align=center valign=middle>\" +\n \"<FONT color=#D00000>\" + instText1 + \n \"<BR><A href='http://\" + this.rmxfhost +\n \"/activex_setup.exe'>\" + instText2 + \n \"</A></FONT><BR>\" +\n \"<LI>\" + instText3 +\n \"<LI>\" + instText4 +\n \"</TD></TR></TABLE>\";\n instructions.scrollIntoView(true);\n alert(instText5);\n }\n }\n }\n}", "function setSizes()\n {\n if (DOM.container.offsetHeight > DOM.container.offsetWidth)\n {\n DOM.container.style.minWidth = DOM.container.offsetHeight + \"PX\";\n }\n\n desk.style.height = sizes.desk.height + \"PX\";\n desk.style.width = sizes.desk.width + \"PX\";\n desk.style.marginBottom = sizes.deskContainer.marginBottom + \"PX\";\n\n for (var counterRow = 0; counterRow < sizes.field.rows; counterRow++)\n {\n for (var counterCol = 0; counterCol < sizes.field.cols; counterCol++)\n {\n DOM.game.field.rows[counterRow].cells[counterCol].style.height = sizes.card.height + \"PX\";\n DOM.game.field.rows[counterRow].cells[counterCol].style.width = sizes.card.width + \"PX\";\n\n var card = cards[counterRow * sizes.field.cols + counterCol];\n if (card)\n {\n card.style.height = sizes.card.height + \"PX\";\n card.style.width = sizes.card.width + \"PX\";\n }\n }\n }\n }", "function InitGraphSize(w, h) {\n document.getElementById(w).value = GetViewportWidth();\n document.getElementById(h).value = GetViewportHeight();\n}", "function initializePage(){\n //GLOBALS pageHeight and sensitivity. Initialized in inputreader.js.\n //gotta fix this... this is terrible style.\n pageHeight = window.innerHeight + (svpArray.length * sensitivity) - 1;\n document.getElementById('container').style.height = pageHeight+\"px\";\n }", "function init() {\n var mssArea = document.getElementById(\"mssArea\");\n var mssPanels = getElementsByClass(\"mssPanel\",mssArea,\"div\");\n // Start Override: allow for cases in which there is not a witnessMenu\n // ie: there is only a single witness and it doesn't make sense to put a select\n // element in the panel. If there is only one witness\n // we dont call changeWitness (which also requires the select element to \n // determine the currently selected witness and makes no sense if there is\n // only one witness). We still want to add an imagePanel though, so we call\n // addImagePanelIfOnlyOneWitness(). But since this function will call\n // resizePanels (through showImgPanel), we need to set a flag so that\n // we dont call resizePanels again. Phew!\n // Also, Chrome does not get our original panel size onload,\n // so try to get it here\n originalImagePanelSize = getImagePanelSize();\n var panelsNeedResizing = true;\n for (i = 0; i < mssPanels.length; i++) {\n var currentPanel = mssPanels[i];\n var witnessMenu = getElementsByClass(\"witnessMenu\",currentPanel,\"select\")[0];\n if (witnessMenu) {\n witness = witnessMenu.value;\n changeWitness(witness,currentPanel);\n } \n else {\n panelsNeedResizing = false;\n addImagePanelIfOnlyOneWitness();\n }\n }\n if (panelsNeedResizing) resizePanels();\n // end Override\n}", "function SetSize()\n\t{\n\t\tif(0 < (document.body.clientHeight - (document.all(\"RPSTopPage_tblOuter\").clientHeight + document.all(\"RPSBottomPage_lblFooter\").clientHeight +30 )))\n\t\t\tdocument.all(\"tblContainer\").height = document.body.clientHeight - (document.all(\"RPSTopPage_tblOuter\").clientHeight + document.all(\"RPSBottomPage_lblFooter\").clientHeight + 40 );\n\t\tif(0 < (document.all(\"tblContainer\").height - (document.all(\"tblButtons\").height +35 )))\n\t\t\tdocument.all(\"divglobal\").style.height = document.all(\"tblContainer\").height - (document.all(\"tblButtons\").height+10);\t\t\t\n\t\t//This is for horizontal scroll\n\t\tdocument.all(\"divglobal\").style.width = document.body.clientWidth;\n\t}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function pcSizeOnly(){\n changeImgPc();\n }", "function updateMetrics() {\n\n isVwDirty = false;\n DPR = window.devicePixelRatio;\n cssCache = {};\n sizeLengthCache = {};\n\n pf.DPR = DPR || 1;\n\n units.width = Math.max(window.innerWidth || 0, docElem.clientWidth);\n units.height = Math.max(window.innerHeight || 0, docElem.clientHeight);\n\n units.vw = units.width / 100;\n units.vh = units.height / 100;\n\n evalId = [ units.height, units.width, DPR ].join(\"-\");\n\n units.em = pf.getEmValue();\n units.rem = units.em;\n }", "function pageCalculations() {\r\n winW = $(window).width();\r\n winH = $(window).height();\r\n }", "onBeforeResize() {\n }", "function setSize()\n\t\t{\n\t\t\t//console.log(width, height, height/width);\n\t\t\n\t\t\t/*\n\t\t\tthat.css({\n\t\t\t\twidth : w + '%',\n\t\t\t\tpaddingTop : height/width * w + '%',\n\t\t\t\tposition : 'relative'\n\t\t\t});\n\t\t\t*/\n\t\t\t\n\t\t\t/*\n\t\t\tthat.css({\n\t\t\t\twidth : width,\n\t\t\t\theight : height\n\t\t\t});\n\t\t\t\n\t\t\tdiv_wrapper.css({\n\t\t\t\twidth :width ,\n\t\t\t\theight : height\n\t\t\t});\n\t\t\t*/\n\t\t\t\n\t\t\tdiv_ratio.css({\n\t\t\t\twidth : '100%',\n\t\t\t\tpaddingTop : height/width * 100 + '%'\n\t\t\t});\n\t\t}", "function sizer(){\n //update object\n å.screen.x = window.innerWidth;\n å.screen.y = window.innerHeight;\n //update canvas size\n canvas.width = å.screen.x;\n canvas.height = å.screen.y;\n}", "function documentReadyFunction() {\n onPageLoadOrResize();\n onPageLoad();\n }", "function aonResizeBody(){\r\n\t\r\n\tif (document.body) {\r\n\t\ty = document.body.clientHeight;\r\n\t}else if (document.documentElement && document.documentElement.clientHeight) {\r\n\t\ty = document.documentElement.clientHeight;\t\t\r\n\t}\r\n\tif (self.innerHeight) {\r\n\t\t//FF\r\n\t\ty = self.innerHeight;\r\n\t}\r\n\t\r\n\tvar headerHeight=0;\r\n\tvar toolbarHeight=0;\r\n\r\n\tvar subtitleHeight=0;\r\n\tvar footerHeight=0;\r\n\tvar errorsHeight=0;\r\n\tvar windowPopUpHeaderHeight=0;\r\n\tvar windowPopUpFooterHeight=0;\r\n\tvar windowPopUpTitleHeight=0;\r\n\tvar hpHypercubeHeight=0;\r\n\tvar titleHeight=0;\r\n\tvar hpHypercube=0;\r\n\t\r\n\tvar headerRegion=document.getElementById(\"aon-header-container\");\t\r\n\tvar toolbarRegion=document.getElementById(\"aon-general-toolbar\");\r\n\tvar subtitleRegion=document.getElementById(\"aon-content-subtitle\");\r\n\t\r\n\tvar footerRegion=document.getElementById(\"aon-footer-container\");\r\n\tvar windowPopUpTitle=document.getElementById(\"aon-window-popup-title\");\r\n\tvar hpTitle=document.getElementById(\"aon-general-title\");\r\n\tvar hpHypercube=document.getElementById(\"aon-hypercube-item\");\r\n\t\r\n\t\r\n\tif(headerRegion!=null){\r\n\t\tvar headerHeight=headerRegion.offsetHeight;\r\n\r\n\t}\r\n\tif(toolbarRegion!=null){\r\n\t\tvar toolbarHeight=toolbarRegion.offsetHeight;\t\r\n\t\t}\r\n\tif(hpTitle!=null){\r\n\t\tvar titleHeight=hpTitle.offsetHeight;\r\n\r\n\t}\r\n\tif(subtitleRegion!=null){\r\n\t\tvar subtitleHeight=subtitleRegion.offsetHeight;\t\r\n\t\r\n\t}\r\n\tif(footerRegion!=null){\r\n\t\tvar footerHeight=footerRegion.offsetHeight;\t\r\n\r\n\t}\r\n\tif(windowPopUpTitle!=null){\r\n\t\tvar windowPopUpTitleHeight=windowPopUpTitle.offsetHeight;\t\t\t\r\n\r\n\t}\r\n\r\n\tvar remain_height = headerHeight + toolbarHeight + titleHeight + subtitleHeight + footerHeight + windowPopUpTitleHeight ;\r\n\tvar el = document.getElementById(\"aon-scroll-area\");\r\n\tvar sidebar=document.getElementById(\"aon-sidebar-region\");\r\n\r\n\tif(el){\t\r\n\t\tif((y-remain_height)>0){\r\n\t\t\tel.style.height= (y-remain_height) + \"px\";\t\t\t\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tel.style.height=\"0px\";\r\n\t\t}\r\n\r\n\t}\r\n\tif(sidebar){\t\r\n\t\t\r\n\t\tif((y-remain_height)>0){\r\n\t\t\tsidebar.style.height= (y-remain_height) + \"px\";\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tsidebar.style.height=\"0px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\telem = document.getElementById(\"actual_tree_node\");\r\n\tif (elem) {\r\n\t\tdocument.location = \"#actual_tree_node\";\r\n\t}\r\n\r\n\treturn false;\r\n}", "function qodeOnWindowLoad() {\n qodeInitElementorAdvancedImageGalleryMasonry();\n }", "function dynamicVariableAndDimensions() {\n dynamicCssVariables();\n settingDynamicDimensions();\n}", "function onWindowResize() {\n updateSizes();\n }", "function set_vars() {\n //alert('setting vars')\n current_width = window.innerWidth;\n current_height = window.innerHeight;\n\n current_ratio = current_width / current_height;\n\n // Check if height is limiting factor\n if (current_ratio > default_ratio) {\n h = current_height;\n w = h * default_ratio;\n // Else width is limiting\n } else {\n w = current_width;\n h = w / default_ratio;\n }\n\n\n if (current_width <= 430) {\n h = 500\n w = 500\n margin.top = 0;\n margin.bottom = 0;\n\n } else {\n margin.top;\n margin.bottom;\n\n };\n // Set new width and height based on graph dimensions\n width = w - margin.left - margin.right;\n height = h - margin.top - margin.bottom;\n\n}", "function makeSizer(size) {\nreturn function() {\ndocument.body.style.fontSize= size + \"px\";\n};\n}", "_onResize () {\n }", "function updateMetrics() {\n\n\t\tisVwDirty = false;\n\t\tDPR = window.devicePixelRatio;\n\t\tcssCache = {};\n\t\tsizeLengthCache = {};\n\n\t\tpf.DPR = DPR || 1;\n\n\t\tunits.width = Math.max(window.innerWidth || 0, docElem.clientWidth);\n\t\tunits.height = Math.max(window.innerHeight || 0, docElem.clientHeight);\n\n\t\tunits.vw = units.width / 100;\n\t\tunits.vh = units.height / 100;\n\n\t\tevalId = [ units.height, units.width, DPR ].join(\"-\");\n\n\t\tunits.em = pf.getEmValue();\n\t\tunits.rem = units.em;\n\t}", "function pageCalculations() {\n winW = $(window).width();\n winH = $(window).height();\n }", "function resize() {\n getNewSize();\n rmPaint();\n}", "function loadedXUL() {\n //start_venkman();\n\n initCSS();\n \n document.getElementById(\"topbox\").setAttribute(\"libSwordLoadFailed\", LibSword.loadFailed ? \"true\":\"false\");\n document.getElementById(\"topbox\").setAttribute(\"hasBible\", LibSword.hasBible ? \"true\":\"false\");\n \n document.title = fixWindowTitle(XSBundle.getString(\"Title\"));\n \n //To make the program window draw cleaner and faster, size initialization \n //routines use prefs to size the frames since window size is not available during \n //initialization. However, the first time the program is run, there are no size prefs \n //as yet. The solution in this case is to init everything using a timeout so that \n //window size is then available and can be stored into the size prefs before the frames \n //are initialized.\n try {prefs.getIntPref(\"ViewPortHeight\");}\n catch (er) {\n document.getElementById('main-viewport').style.visibility = 'hidden';\n window.setTimeout(function () {\n loadedXUL2();\n document.getElementById('main-viewport').style.visibility = '';\n }, 0);\n return;\n }\n \n loadedXUL2();\n}", "function qodeOnWindowLoad() {\n qodeInitElementorCustomFont();\n }", "function spSizeOnly(){\n changeImgSp();\n }", "function watchSize() {\n\t\t\t\t\t\tif(window.width > 436) $('#tab-content-container').css({'pointer-events':'all'});\n\t\t\t\t\t\telse $('#tab-content-container').css({'pointer-events':'none'});\n\t\t\t\t\t\t// var canvas = $('#give-image-canvas')[0];\n\t\t\t\t\t\t// canvas.width = $('#give-image-canvas').width();\n\t\t\t\t\t\t// canvas.height = $('#give-image-canvas').height();\n\t\t\t\t\t}", "function pageLoad() {\n nSCV('hdnPageHgt', screen.height);\n}", "function resizeTracker() {\n\t$(window).resize(function() {\n\t setGEDivSize();\n\t setProgressOverlayPosition();\n\t});\n}", "function on_load() {\r\n $(\"#page_title_container\").css(\"height\", window_height + \"px\");\r\n $(\"#content01\").css(\"height\", window_height + \"px\");\r\n $(\"#content02\").css(\"height\", window_height + \"px\");\r\n $(\"#content03\").css(\"height\", window_height + \"px\");\r\n}", "function setPaneSize(e) {\n\n}", "function dragGoSize(event) {\n var y;\n // Get cursor position with respect to the page.\n y = event.clientY + window.scrollY;\n\n var delta = y - d.cursorStartY;\n if (delta!=0) {\n var newh = d.baseH + delta;\n if (newh>unitHeight(1) && newh<(dims.height+(dims.headerw? (dims.headert+16) : (dims.top+16)))) {\n newh = unitHeight(heightUnit(newh));\n delta = newh - d.baseH;\n d.cp.setAttribute('style',replaceOrAddStyle(d.cp.getAttribute('style'),'height',newh+'px'));\n d.cph.setAttribute('style',replaceOrAddStyle(d.cph.getAttribute('style'),'top',(d.baseO+delta)+'px'));\n updateCPSize(newh);\n }\n }\n event.preventDefault();\n}", "adjustSize () {\n this._resize();\n }", "function OnClientResize_DocView(sender, eventArgs)\r\n{ \r\n var rcp = $find('ResizableControlBehavior1');\r\n\r\n if (isLoaded)\r\n {\r\n var width = rcp.get_Size().width;\r\n var height = rcp.get_Size().height;\r\n PageMethods.SetDocDimensions(width, height);\r\n }\r\n}", "function originalSize() {\n svg.setAttribute(\"width\", w);\n svg.setAttribute(\"height\", h);\n resizeDiv(w, h);\n\n propObj.wProp = w;\n propObj.hProp = h;\n updateProperties();\n}", "function init(){\n $(\"html\").css({\n \"width\":\"100%\",\n \"height\":\"100%\",\n \"margin\":\"0px\",\n \"padding\":\"0px\"\n });\n $(\"body\").css({\n \"width\":\"100%\",\n \"height\":\"100%\",\n \"overflow\":\"hidden\",\n \"margin\":\"0px\",\n \"padding\":\"0px\"\n });\n setSizeForPages();\n $(window).resize(setSizeForPages);\n }" ]
[ "0.7191545", "0.6806995", "0.6755936", "0.67360145", "0.6707767", "0.6694855", "0.6687263", "0.6654907", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.65711933", "0.6535822", "0.652331", "0.65085727", "0.64825004", "0.64403176", "0.6420527", "0.6410826", "0.63826084", "0.6330903", "0.6323043", "0.63186675", "0.627244", "0.62413394", "0.62217814", "0.6210867", "0.62061095", "0.62036604", "0.62011236", "0.6191785", "0.6185272", "0.6180903", "0.61795306", "0.6161627", "0.6149448", "0.61443126", "0.6143473", "0.6110815", "0.6110815", "0.6110815", "0.6110815", "0.6110815", "0.6110815", "0.6110815", "0.6110815", "0.6110815", "0.6110815", "0.6110815", "0.6110815", "0.6099593", "0.60819536", "0.60761666", "0.6074", "0.60646", "0.6060074", "0.6059282", "0.605707", "0.6056731", "0.60523677", "0.6044778", "0.60402006", "0.60386455", "0.60345924", "0.60341334", "0.6031843", "0.6027479", "0.6010726", "0.60022134", "0.599769", "0.5977059", "0.5973901", "0.5973309", "0.59651047", "0.59621555", "0.595962", "0.59531534", "0.594958", "0.5941865", "0.59410036" ]
0.675789
7
IE8 returns percent values, not pixels taken from jQuery's curCSS
function mungeNonPixel( elem, value ) { // IE8 and has percent value if ( window.getComputedStyle || value.indexOf('%') === -1 ) { return value; } var style = elem.style; // Remember the original values var left = style.left; var rs = elem.runtimeStyle; var rsLeft = rs && rs.left; // Put in the new values to get a computed value out if ( rsLeft ) { rs.left = elem.currentStyle.left; } style.left = value; value = style.pixelLeft; // Revert the changed values style.left = left; if ( rsLeft ) { rs.left = rsLeft; } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function curCSS(elem, prop) {\n var value,\n pixel,\n unit,\n rvpos = /^top|bottom/,\n outerProp = [\"paddingTop\", \"paddingBottom\", \"borderTop\", \"borderBottom\"],\n innerHeight,\n parent,\n i = 4; // outerProp.length\n \n if (getComputedStyle) {\n // FireFox, Chrome/Safari, Opera and IE9+\n value = getComputedStyle(elem)[prop];\n } else if (pixel = elem.style['pixel' + prop.charAt(0).toUpperCase() + prop.slice(1)]) {\n // IE and Opera support pixel shortcuts for top, bottom, left, right, height, width\n // WebKit supports pixel shortcuts only when an absolute unit is used\n value = pixel + 'px';\n } else if (prop === 'fontSize') {\n // correct IE issues with font-size\n // @see http://bugs.jquery.com/ticket/760\n value = toPx(elem, '1em', 'left', 1) + 'px';\n } else {\n // IE 8 and below return the specified style\n value = elem.currentStyle[prop];\n }\n\n // check the unit\n unit = (value.match(runit)||[])[2];\n if (unit === '%' && computedValueBug) {\n // WebKit won't convert percentages for top, bottom, left, right, margin and text-indent\n if (rvpos.test(prop)) {\n // Top and bottom require measuring the innerHeight of the parent.\n innerHeight = (parent = elem.parentNode || elem).offsetHeight;\n while (i--) {\n innerHeight -= parseFloat(curCSS(parent, outerProp[i]));\n }\n value = parseFloat(value) / 100 * innerHeight + 'px';\n } else {\n // This fixes margin, left, right and text-indent\n // @see https://bugs.webkit.org/show_bug.cgi?id=29084\n // @see http://bugs.jquery.com/ticket/10639\n value = toPx(elem, value);\n }\n } else if ((value === 'auto' || (unit && unit !== 'px')) && getComputedStyle) {\n // WebKit and Opera will return auto in some cases\n // Firefox will pass back an unaltered value when it can't be set, like top on a static element\n value = 0;\n } else if (unit && unit !== 'px' && !getComputedStyle) {\n // IE 8 and below won't convert units for us\n // try to convert using a prop that will return pixels\n // this will be accurate for everything (except font-size and some percentages)\n value = toPx(elem, value) + 'px';\n }\n return value;\n}", "function mungeNonPixel( elem, value ) {\n\t // IE8 and has percent value\n\t if ( window.getComputedStyle || value.indexOf('%') === -1 ) {\n\t return value;\n\t }\n\t var style = elem.style;\n\t // Remember the original values\n\t var left = style.left;\n\t var rs = elem.runtimeStyle;\n\t var rsLeft = rs && rs.left;\n\t\n\t // Put in the new values to get a computed value out\n\t if ( rsLeft ) {\n\t rs.left = elem.currentStyle.left;\n\t }\n\t style.left = value;\n\t value = style.pixelLeft;\n\t\n\t // Revert the changed values\n\t style.left = left;\n\t if ( rsLeft ) {\n\t rs.left = rsLeft;\n\t }\n\t\n\t return value;\n\t}", "function mungeNonPixel(elem, value) {\n // IE8 and has percent value\n if (isComputedStyle || value.indexOf('%') === -1) {\n return value;\n }\n var style = elem.style;\n // Remember the original values\n var left = style.left;\n var rs = elem.runtimeStyle;\n var rsLeft = rs && rs.left;\n\n // Put in the new values to get a computed value out\n if (rsLeft) {\n rs.left = elem.currentStyle.left;\n }\n style.left = value;\n value = style.pixelLeft;\n\n // Revert the changed values\n style.left = left;\n if (rsLeft) {\n rs.left = rsLeft;\n }\n\n return value;\n }", "function mungeNonPixel(elem, value) {\r\n // IE8 and has percent value\r\n if (window.getComputedStyle || value.indexOf('%') === -1) {\r\n return value;\r\n }\r\n var style = elem.style;\r\n // Remember the original values\r\n var left = style.left;\r\n var rs = elem.runtimeStyle;\r\n var rsLeft = rs && rs.left;\r\n\r\n // Put in the new values to get a computed value out\r\n if (rsLeft) {\r\n rs.left = elem.currentStyle.left;\r\n }\r\n style.left = value;\r\n value = style.pixelLeft;\r\n\r\n // Revert the changed values\r\n style.left = left;\r\n if (rsLeft) {\r\n rs.left = rsLeft;\r\n }\r\n\r\n return value;\r\n }", "function coerceCssPixelValue(value) {\n if (value == null) {\n return '';\n }\n return cssUnitsPattern.test(value) ? value : `${value}px`;\n}", "function mungeNonPixel( elem, value ) {\n // IE8 and has percent value\n if ( isComputedStyle || value.indexOf('%') === -1 ) {\n return value;\n }\n var style = elem.style;\n // Remember the original values\n var left = style.left;\n var rs = elem.runtimeStyle;\n var rsLeft = rs && rs.left;\n\n // Put in the new values to get a computed value out\n if ( rsLeft ) {\n rs.left = elem.currentStyle.left;\n }\n style.left = value;\n value = style.pixelLeft;\n\n // Revert the changed values\n style.left = left;\n if ( rsLeft ) {\n rs.left = rsLeft;\n }\n\n return value;\n}", "function intCss(elem, prop) {\n\t\t\t\treturn Math.ceil(parseFloat(vendorCss(elem, prop)));\n\t\t\t}", "function mungeNonPixel( elem, value ) {\n // IE8 and has percent value\n if ( getComputedStyle || value.indexOf('%') === -1 ) {\n return value;\n }\n var style = elem.style;\n // Remember the original values\n var left = style.left;\n var rs = elem.runtimeStyle;\n var rsLeft = rs && rs.left;\n\n // Put in the new values to get a computed value out\n if ( rsLeft ) {\n rs.left = elem.currentStyle.left;\n }\n style.left = value;\n value = style.pixelLeft;\n\n // Revert the changed values\n style.left = left;\n if ( rsLeft ) {\n rs.left = rsLeft;\n }\n\n return value;\n}", "function mungeNonPixel( elem, value ) {\n // IE8 and has percent value\n if ( getComputedStyle || value.indexOf('%') === -1 ) {\n return value;\n }\n var style = elem.style;\n // Remember the original values\n var left = style.left;\n var rs = elem.runtimeStyle;\n var rsLeft = rs && rs.left;\n\n // Put in the new values to get a computed value out\n if ( rsLeft ) {\n rs.left = elem.currentStyle.left;\n }\n style.left = value;\n value = style.pixelLeft;\n\n // Revert the changed values\n style.left = left;\n if ( rsLeft ) {\n rs.left = rsLeft;\n }\n\n return value;\n}", "function mungeNonPixel( elem, value ) {\n // IE8 and has percent value\n if ( getComputedStyle || value.indexOf('%') === -1 ) {\n return value;\n }\n var style = elem.style;\n // Remember the original values\n var left = style.left;\n var rs = elem.runtimeStyle;\n var rsLeft = rs && rs.left;\n\n // Put in the new values to get a computed value out\n if ( rsLeft ) {\n rs.left = elem.currentStyle.left;\n }\n style.left = value;\n value = style.pixelLeft;\n\n // Revert the changed values\n style.left = left;\n if ( rsLeft ) {\n rs.left = rsLeft;\n }\n\n return value;\n}", "function mungeNonPixel( elem, value ) {\n // IE8 and has percent value\n if ( getComputedStyle || value.indexOf('%') === -1 ) {\n return value;\n }\n var style = elem.style;\n // Remember the original values\n var left = style.left;\n var rs = elem.runtimeStyle;\n var rsLeft = rs && rs.left;\n\n // Put in the new values to get a computed value out\n if ( rsLeft ) {\n rs.left = elem.currentStyle.left;\n }\n style.left = value;\n value = style.pixelLeft;\n\n // Revert the changed values\n style.left = left;\n if ( rsLeft ) {\n rs.left = rsLeft;\n }\n\n return value;\n}", "function mungeNonPixel(elem, value) {\n // IE8 and has percent value\n if (window.getComputedStyle || value.indexOf('%') === -1) {\n return value;\n }\n var style = elem.style;\n // Remember the original values\n var left = style.left;\n var rs = elem.runtimeStyle;\n var rsLeft = rs && rs.left;\n\n // Put in the new values to get a computed value out\n if (rsLeft) {\n rs.left = elem.currentStyle.left;\n }\n style.left = value;\n value = style.pixelLeft;\n\n // Revert the changed values\n style.left = left;\n if (rsLeft) {\n rs.left = rsLeft;\n }\n\n return value;\n }", "function mungeNonPixel(elem, value) {\n // IE8 and has percent value\n if (window.getComputedStyle || value.indexOf(\"%\") === -1) {\n return value;\n }\n var style = elem.style;\n // Remember the original values\n var left = style.left;\n var rs = elem.runtimeStyle;\n var rsLeft = rs && rs.left;\n // Put in the new values to get a computed value out\n if (rsLeft) {\n rs.left = elem.currentStyle.left;\n }\n style.left = value;\n value = style.pixelLeft;\n // Revert the changed values\n style.left = left;\n if (rsLeft) {\n rs.left = rsLeft;\n }\n return value;\n }", "function rc(e){return getComputedStyle(e)}", "get referencePixelsPerUnit() {}", "toCSSValues() {\r\n return [this.h * 360, this.s * 100, this.l * 100];\r\n }", "function calcDragBarPosFromCss() {\n if (dragBar.css('left') === '') return null;\n var percent = /(\\d*(?:\\.\\d+)?)\\%/.exec(dragBar.css('left'))[1];\n percent = parseFloat(percent) / 100;\n return outerWidth * percent;\n }", "function num(elem, prop) {\n\treturn elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;\n}", "function num(elem, prop) {\n\treturn elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;\n}", "function num(elem, prop) {\n\treturn elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;\n}", "function num(elem, prop) {\n\treturn elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;\n}", "getCurrentSliderPercentage_() {\n const {left: barLeft} =\n this.bar_./*OK*/getBoundingClientRect();\n const {left: boxLeft, width: boxWidth} = this.getLayoutBox();\n return (barLeft - boxLeft) / boxWidth;\n }", "function cursorCalc() {\n var cursorDistance = 100 / cursorSteps;\n cursorStepValue += cursorDistance;\n cursorWidth = cursorStepValue + '%';\n $(cursor).animate(\n {\n width: cursorWidth\n },\n 300\n );\n }", "calculatePercent(data) {\n return Math.ceil((data - this.calculateWithDif()) / this.interactiveDomWidth * 100);\n }", "function px(n) { return n+'px' }", "get pixelPerfect() {}", "function getComputedStyleCBJC (selection) {\n\t\tvar elem;\n\t\tif (\"function\" == typeof selection) {\n\t\t\tselection = selection();\n\t\t}\n\t\tif (selection instanceof HTMLElement) {\n\t\t\telem = selection;\n\t\t} else if (selection.hasOwnProperty(0) && selection[0] instanceof HTMLElement) {\n\t\t\telem = selection[0];\n\t\t} else if (!(\"string\" == typeof selection && (elem = $(selection).get(0)) instanceof HTMLElement)) {\n\t\t\treturn 'Invalid selection passed to getComputedStyle';\n\t\t}\n\t\tif (window.getComputedStyle) { // chrome, firefox\n\t\t\treturn window.getComputedStyle(elem);\n\t\t} else if ('undefined' != typeof elem.currentStyle) { // internet explorer 8-\n\t\t\treturn elem.currentStyle;\n\t\t} else if ('undefined' != typeof document.defaultView\n\t\t\t\t&& 'function' == typeof document.defaultView.getComputedStyle) { // oldschool fallback\n\t\t\treturn document.defaultView.getComputedStyle(elem, null);\n\t\t} else {\n\t\t\treturn 'Your browser doesn\\'t appear to be supported.';\n\t\t}\n\t}", "function Pr(e){return getComputedStyle(e)}", "function percentage() {\n return percent;\n}", "get overridePixelPerfect() {}", "function getCssFloat(el, prop) {\n\treturn parseFloat(el.css(prop)) || 0;\n}", "function getCssFloat(el, prop) {\n\treturn parseFloat(el.css(prop)) || 0;\n}", "function getCssFloat(el, prop) {\n\treturn parseFloat(el.css(prop)) || 0;\n}", "function getCssFloat(el, prop) {\n\treturn parseFloat(el.css(prop)) || 0;\n}", "function getCssFloat(el, prop) {\n\treturn parseFloat(el.css(prop)) || 0;\n}", "function getCssFloat(el, prop) {\n\treturn parseFloat(el.css(prop)) || 0;\n}", "function getCssFloat(el, prop) {\n\treturn parseFloat(el.css(prop)) || 0;\n}", "function getCssFloat(el, prop) {\n\treturn parseFloat(el.css(prop)) || 0;\n}", "function getCssFloat(el, prop) {\n return parseFloat(el.css(prop)) || 0;\n}", "function getCssFloat(el, prop) {\n return parseFloat(el.css(prop)) || 0;\n}", "function getCssFloat(el, prop) {\n return parseFloat(el.css(prop)) || 0;\n}", "function getCssFloat(el, prop) {\n return parseFloat(el.css(prop)) || 0;\n}", "function doMath()\n\t{\n\t\treturn pixels/baseValue;\n\t}", "calculateTransformPercent(data) {\n return ((this.interactiveDomWidth - this.characterWidth) / this.characterWidth) * data;\n }", "function computeStyleTests(){div.style.cssText= // Support: Firefox<29, Android 2.3\n// Vendor-prefix box-sizing\n\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\"+\"position:relative;display:block;\"+\"margin:auto;border:1px;padding:1px;\"+\"top:1%;width:50%\";div.innerHTML=\"\";documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!==\"1%\";reliableMarginLeftVal=divStyle.marginLeft===\"2px\";boxSizingReliableVal=divStyle.width===\"4px\"; // Support: Android 4.0 - 4.3 only\n// Some styles come back with percentage values, even though they shouldn't\ndiv.style.marginRight=\"50%\";pixelMarginRightVal=divStyle.marginRight===\"4px\";documentElement.removeChild(container);}", "function getCssFloat(el, prop) {\n\t\treturn parseFloat(el.css(prop)) || 0;\n\t}", "function getCssFloat(el, prop) {\n return parseFloat(el.css(prop)) || 0;\n }", "function num(elem, prop) {\n return elem[0] && parseInt(jQuery.curCSS(elem[0], prop, true), 10) || 0;\n }", "heightToCM(){\n return this.height * 2.54; \n }", "function getCubicBezierXYatPercent(startPt,controlPt1,controlPt2,endPt,percent){\n var x=CubicN(percent,startPt.x,controlPt1.x,controlPt2.x,endPt.x);\n var y=CubicN(percent,startPt.y,controlPt1.y,controlPt2.y,endPt.y);\n return({x:x,y:y});\n }", "function StyleNormalCur() {\n var optsCur = myData['opts'][an.optsPos];\n for (var name in optsCur['styleBegin']) {\n var valueBegin = optsCur['styleBegin'][name], valueEnd = optsCur['styleEnd'][name], valueCur;\n /**\n * CASE: PROPERTY HAS VALUE IS ARRAY[]\n */\n if ($.isArray(valueBegin)) {\n valueCur = ValueCurForArray(name, valueBegin, valueEnd);\n }\n else {\n // Convert value String to Number (if posible)\n valueBegin = ConvertValue(name, valueBegin);\n valueEnd = ConvertValue(name, valueEnd);\n // Case: value of property is Number\n if ($.isNumeric(valueBegin) && $.isNumeric(valueEnd)) {\n valueCur = ValueCurForNumber(name, valueBegin, valueEnd);\n }\n else {\n valueCur = valueBegin;\n }\n }\n /**\n * REMOVE STYLES HAVE DEFAULT VALUE\n */\n if (optsCur.isClearStyleDefault && VA['styleDefault'][name] === valueCur) {\n valueCur = '';\n }\n /**\n * STORE VALUE OF CURRENT PROPERTY\n */\n styleCur[name] = valueCur;\n }\n }", "fracToPixel(frac){\n return frac*c.width\n }", "function xGetComputedStyle(oEle, sProp, bInt)\r\n{\r\n var s, p = 'undefined';\r\n var dv = document.defaultView;\r\n if(dv && dv.getComputedStyle){\r\n s = dv.getComputedStyle(oEle,'');\r\n if (s) p = s.getPropertyValue(sProp);\r\n }\r\n else if(oEle.currentStyle) {\r\n // convert css property name to object property name for IE\r\n var i, c, a = sProp.split('-');\r\n sProp = a[0];\r\n for (i=1; i<a.length; ++i) {\r\n c = a[i].charAt(0);\r\n sProp += a[i].replace(c, c.toUpperCase());\r\n }\r\n p = oEle.currentStyle[sProp];\r\n }\r\n else return null;\r\n return bInt ? (parseInt(p) || 0) : p;\r\n}", "function _formatCSSOrigin(origin) {\n\t return (100 * origin[0]) + '% ' + (100 * origin[1]) + '%';\n\t }", "function gi(e){return getComputedStyle(e)}", "function parseMaxStyle(styleValue, node, parentProperty) {\r\n\t\tvar valueInPixels;\r\n\t\tif (typeof styleValue === 'string') {\r\n\t\t\tvalueInPixels = parseInt(styleValue, 10);\r\n\r\n\t\t\tif (styleValue.indexOf('%') !== -1) {\r\n\t\t\t\t// percentage * size in dimension\r\n\t\t\t\tvalueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvalueInPixels = styleValue;\r\n\t\t}\r\n\r\n\t\treturn valueInPixels;\r\n\t}", "function ConvertValue(name, valueCur) {\n /*\n * CASE: STRING\n */\n if (typeof valueCur == 'string') {\n /**\n * CASE: UNIT IS 'PX'\n */\n if (/px$/.test(valueCur)) {\n valueCur = parseFloat(valueCur);\n }\n else if (/\\%$/.test(valueCur)) {\n // Name of property exist in conversion system\n var nameSizeFn = VA.percentRef[name];\n if (nameSizeFn !== UNDE) {\n var sizeCur = an['size'][nameSizeFn];\n valueCur = sizeCur * parseFloat(valueCur) / 100;\n }\n }\n }\n /**\n * RETURN VALUE AFTER SETUP\n */\n return valueCur;\n }", "function reqStyle(x, y){\n\t\treturn parseInt(window.getComputedStyle(x, null).getPropertyValue(y));\n\t}", "function seventyPercent(evt) {\n\twb.cm_percent = 0.7;\n\twb.drawRectForViewPort();\n\tvar element = document.querySelector('.code_map');\n\tvar transfromString = (\"scale(0.7, 0.7)\");\n // now attach that variable to each prefixed style\n element.style.webkitTransform = transfromString;\n element.style.MozTransform = transfromString;\n element.style.msTransform = transfromString;\n element.style.OTransform = transfromString;\n element.style.transform = transfromString;\n}", "function getRecStyle(x, y){\n return parseInt(window.getComputedStyle(x, null).getPropertyValue(y));\n}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function sz(el, p) { \n return parseInt($.css(el,p))||0; \n}", "function xValFromPct(percent) {\n return percent * canvas.width / 100;\n}", "function getStyle(obj, attr) {\n\t\treturn parseFloat(obj.currentStyle ? obj.currentStyle[attr] : getComputedStyle(obj, null)[attr])\n\t}", "function getCssWidth(childSelector) {\n return 100 * $(childSelector).width() / $(childSelector).offsetParent().width();\n}", "function parseMaxStyle(styleValue, node, parentProperty) {\n var valueInPixels;\n if (typeof styleValue === 'string') {\n valueInPixels = parseInt(styleValue, 10);\n\n if (styleValue.indexOf('%') !== -1) {\n // percentage * size in dimension\n valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n }\n } else {\n valueInPixels = styleValue;\n }\n\n return valueInPixels;\n }", "function parseMaxStyle(styleValue, node, parentProperty) {\n var valueInPixels;\n if (typeof styleValue === 'string') {\n valueInPixels = parseInt(styleValue, 10);\n\n if (styleValue.indexOf('%') !== -1) {\n // percentage * size in dimension\n valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n }\n } else {\n valueInPixels = styleValue;\n }\n\n return valueInPixels;\n }", "function parseMaxStyle(styleValue, node, parentProperty) {\n\t\t\tvar valueInPixels;\n\t\t\tif (typeof(styleValue) === 'string') {\n\t\t\t\tvalueInPixels = parseInt(styleValue, 10);\n\t\n\t\t\t\tif (styleValue.indexOf('%') !== -1) {\n\t\t\t\t\t// percentage * size in dimension\n\t\t\t\t\tvalueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvalueInPixels = styleValue;\n\t\t\t}\n\t\n\t\t\treturn valueInPixels;\n\t\t}", "function adjustCSS( elem, prop, valueParts, tween ) { // 4536\n\tvar adjusted, // 4537\n\t\tscale = 1, // 4538\n\t\tmaxIterations = 20, // 4539\n\t\tcurrentValue = tween ? // 4540\n\t\t\tfunction() { // 4541\n\t\t\t\treturn tween.cur(); // 4542\n\t\t\t} : // 4543\n\t\t\tfunction() { // 4544\n\t\t\t\treturn jQuery.css( elem, prop, \"\" ); // 4545\n\t\t\t}, // 4546\n\t\tinitial = currentValue(), // 4547\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ), // 4548\n // 4549\n\t\t// Starting value computation is required for potential unit mismatches // 4550\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) && // 4551\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) ); // 4552\n // 4553\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) { // 4554\n // 4555\n\t\t// Trust units reported by jQuery.css // 4556\n\t\tunit = unit || initialInUnit[ 3 ]; // 4557\n // 4558\n\t\t// Make sure we update the tween properties later on // 4559\n\t\tvalueParts = valueParts || []; // 4560\n // 4561\n\t\t// Iteratively approximate from a nonzero starting point // 4562\n\t\tinitialInUnit = +initial || 1; // 4563\n // 4564\n\t\tdo { // 4565\n // 4566\n\t\t\t// If previous iteration zeroed out, double until we get *something*. // 4567\n\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below // 4568\n\t\t\tscale = scale || \".5\"; // 4569\n // 4570\n\t\t\t// Adjust and apply // 4571\n\t\t\tinitialInUnit = initialInUnit / scale; // 4572\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit ); // 4573\n // 4574\n\t\t// Update scale, tolerating zero or NaN from tween.cur() // 4575\n\t\t// Break the loop if scale is unchanged or perfect, or if we've just had enough. // 4576\n\t\t} while ( // 4577\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations // 4578\n\t\t); // 4579\n\t} // 4580\n // 4581\n\tif ( valueParts ) { // 4582\n\t\tinitialInUnit = +initialInUnit || +initial || 0; // 4583\n // 4584\n\t\t// Apply relative offset (+=/-=) if specified // 4585\n\t\tadjusted = valueParts[ 1 ] ? // 4586\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : // 4587\n\t\t\t+valueParts[ 2 ]; // 4588\n\t\tif ( tween ) { // 4589\n\t\t\ttween.unit = unit; // 4590\n\t\t\ttween.start = initialInUnit; // 4591\n\t\t\ttween.end = adjusted; // 4592\n\t\t} // 4593\n\t} // 4594\n\treturn adjusted; // 4595\n} // 4596", "function s(e){return getComputedStyle(e)}", "function computeStyleTests(){div.style.cssText= // Support: Firefox<29, Android 2.3\n\t// Vendor-prefix box-sizing\n\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\"+\"position:relative;display:block;\"+\"margin:auto;border:1px;padding:1px;\"+\"top:1%;width:50%\";div.innerHTML=\"\";documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!==\"1%\";reliableMarginLeftVal=divStyle.marginLeft===\"2px\";boxSizingReliableVal=divStyle.width===\"4px\"; // Support: Android 4.0 - 4.3 only\n\t// Some styles come back with percentage values, even though they shouldn't\n\tdiv.style.marginRight=\"50%\";pixelMarginRightVal=divStyle.marginRight===\"4px\";documentElement.removeChild(container);}", "function toPercent(pixels) {\n return pixels / outerWidth * 100;\n }", "function px(input) {\r\n var emSize = parseFloat($(\"body\").css(\"font-size\"));\r\n return (input / emSize);\r\n}", "function i(t){return getComputedStyle(t)}", "function i(t){return getComputedStyle(t)}", "function i(t){return getComputedStyle(t)}", "function parseMaxStyle(styleValue, node, parentProperty) {\n var valueInPixels;\n\n if (typeof styleValue === 'string') {\n valueInPixels = parseInt(styleValue, 10);\n\n if (styleValue.indexOf('%') !== -1) {\n // percentage * size in dimension\n valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n }\n } else {\n valueInPixels = styleValue;\n }\n\n return valueInPixels;\n }", "getResizeCalculatePositions() {\n return this.calculatePercent(this.getDomTransform());\n }", "function toCssUnits(val) {\n return typeof val === 'string' ? val : typeof val === 'number' ? val + 'px' : '';\n}", "function i(e){return getComputedStyle(e)}", "function computePropertyValue (element, property) {\n /* When box-sizing isn't set to border-box, height and width style values are incorrectly computed when an element's scrollbars are visible (which expands the element's dimensions). Thus, we defer\n to the more accurate offsetHeight/Width property, which includes the total dimensions for interior, border, padding, and scrollbar. We subtract border and padding to get the sum of interior + scrollbar. */\n if (!forceStyleLookup) {\n if (property === \"height\" && CSS.getPropertyValue(element, \"boxSizing\").toLowerCase() !== \"border-box\") {\n return element.offsetHeight - (parseFloat(CSS.getPropertyValue(element, \"borderTopWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderBottomWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingTop\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingBottom\")) || 0);\n } else if (property === \"width\" && CSS.getPropertyValue(element, \"boxSizing\").toLowerCase() !== \"border-box\") {\n return element.offsetWidth - (parseFloat(CSS.getPropertyValue(element, \"borderLeftWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderRightWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingLeft\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingRight\")) || 0);\n }\n }\n\n var computedValue = 0;\n\n /* IE<=8 doesn't support window.getComputedStyle, thus we defer to jQuery, which has an extensive array of hacks to accurately retrieve IE8 property values.\n Re-implementing that logic here is not worth bloating the codebase for a dying browser. The performance repercussions of using jQuery here are minimal since\n Velocity is optimized to rarely (and sometimes never) query the DOM. Further, the $.css() codepath isn't that slow. */\n if (IE <= 8) {\n computedValue = $.css(element, property); /* GET */\n /* All other browsers support getComputedStyle. The returned live object reference is cached onto its associated element so that it does not need to be refetched upon every GET. */\n } else {\n var computedStyle;\n\n /* For elements that Velocity hasn't been called on directly (e.g. when Velocity queries the DOM on behalf of a parent of an element its animating), perform a direct getComputedStyle lookup since the object isn't cached. */\n if ($.data(element, NAME) === undefined) {\n computedStyle = window.getComputedStyle(element, null); /* GET */\n /* If the computedStyle object has yet to be cached, do so now. */\n } else if (!$.data(element, NAME).computedStyle) {\n computedStyle = $.data(element, NAME).computedStyle = window.getComputedStyle(element, null); /* GET */\n /* If computedStyle is cached, use it. */\n } else {\n computedStyle = $.data(element, NAME).computedStyle;\n }\n\n /* IE doesn't return a value for borderColor -- it only returns individual values for each border side's color. As a polyfill, default to querying for just the top border's color. */\n if (IE && property === \"borderColor\") {\n property = \"borderTopColor\";\n }\n\n /* IE9 has a bug in which the \"filter\" property must be accessed from computedStyle using the getPropertyValue method instead of a direct property lookup. \n The getPropertyValue method is slower than a direct lookup, which is why we avoid it by default. */\n if (IE === 9 && property === \"filter\") {\n computedValue = computedStyle.getPropertyValue(property); /* GET */\n } else {\n computedValue = computedStyle[property];\n } \n\n /* Fall back to the property's style value (if defined) when computedValue returns nothing, which can happen when the element hasn't been painted. */\n if (computedValue === \"\") {\n computedValue = element.style[property];\n }\n }\n\n /* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position, defer to jQuery for converting \"auto\" to a numeric value.\n (For elements with a \"static\" or \"relative\" position, \"auto\" has the same effect as being set to 0, so no conversion is necessary.) */\n /* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\" property, which reverts to \"auto\", left's value is 0 relative to its parent element,\n but is often non-zero relative to its *containing* (not parent) element, which is the nearest \"position:relative\" ancestor or the viewport (and always the viewport in the case of \"position:fixed\"). */\n if (computedValue === \"auto\" && /^(top|right|bottom|left)$/i.test(property)) {\n var position = computePropertyValue(element, \"position\"); /* GET */\n\n /* For absolute positioning, jQuery's $.position() only returns values for top and left; right and bottom will have their \"auto\" value reverted to 0. */\n /* Note: A jQuery object must be created here since jQuery doesn't have a low-level alias for $.position(). Not a big deal since we're currently in a GET batch anyway. */\n if (position === \"fixed\" || (position === \"absolute\" && /top|left/i.test(property))) {\n /* Note: jQuery strips the pixel unit from its returned values; we re-add it here to conform with computePropertyValue's behavior. */\n computedValue = $(element).position()[property] + \"px\"; /* GET */\n }\n }\n\n return computedValue;\n }", "function parseMaxStyle(styleValue, node, parentProperty) {\n var valueInPixels;\n\n if (typeof styleValue === 'string') {\n valueInPixels = parseInt(styleValue, 10);\n\n if (styleValue.indexOf('%') !== -1) {\n // percentage * size in dimension\n valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n }\n } else {\n valueInPixels = styleValue;\n }\n\n return valueInPixels;\n }", "function sz(el, p) { \r\n\t\t return parseInt($.css(el,p))||0; \r\n\t\t }" ]
[ "0.7013315", "0.5806784", "0.5796477", "0.5784483", "0.57773995", "0.57736987", "0.5760651", "0.5753687", "0.5753687", "0.5753687", "0.5753687", "0.57495964", "0.5720688", "0.5694006", "0.56810033", "0.56525624", "0.56374526", "0.5634937", "0.5634937", "0.5634937", "0.5634937", "0.56296146", "0.5629306", "0.562726", "0.5618035", "0.56133425", "0.56043404", "0.5600722", "0.55867445", "0.5566764", "0.5556457", "0.5556457", "0.5556457", "0.5556457", "0.5556457", "0.5556457", "0.5556457", "0.5556457", "0.5547054", "0.5547054", "0.5547054", "0.5547054", "0.5535143", "0.55197215", "0.5513109", "0.55112016", "0.5511052", "0.55103105", "0.55059415", "0.5499917", "0.54867995", "0.54867667", "0.5485461", "0.5484595", "0.5483564", "0.5476842", "0.5475263", "0.5473533", "0.5457686", "0.5457126", "0.54559994", "0.54559994", "0.54559994", "0.54559994", "0.54559994", "0.54559994", "0.54559994", "0.54559994", "0.54559994", "0.5448413", "0.5444098", "0.5444001", "0.544084", "0.54323876", "0.54323876", "0.5429284", "0.5419972", "0.54175335", "0.54146016", "0.5393172", "0.5389852", "0.53873116", "0.53873116", "0.53873116", "0.5381552", "0.5374545", "0.53737205", "0.5373343", "0.5369303", "0.53655833", "0.53631645" ]
0.5765661
12
query // fall back to using QSA
function query( elem, selector ) { // append to fragment if no parent checkParent( elem ); // match elem with all selected elems of parent var elems = elem.parentNode.querySelectorAll( selector ); for ( var i=0, len = elems.length; i < len; i++ ) { // return true if match if ( elems[i] === elem ) { return true; } } // otherwise return false return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "query() { }", "function LQuery() {}", "function LQuery() {}", "function LQuery() {}", "function TQuery() {}", "function TQuery() {}", "function TQuery() {}", "async query(query) {\n\n }", "function ______MA_Query() {}", "function query()\n{\n return query_start(0, -1)\n}", "function LQuery() { }", "function LQuery() { }", "getFixedQuery() {}", "function LQuery(){}", "function TQueries() {}", "function TQueries() {}", "function TQueries() {}", "function TQuery() { }", "function TQuery() { }", "function TQuery(){}", "function doQuery(target, q){\n\t\tsetValue(target, q, true);\n\t}", "function doQuery(target, q){\n setValue(target, q, true);\n }", "function doQuery(target, q){\n\t\tsetValue(target, q);\n\t}", "function TQueries(){}", "function LQueries() {}", "function LQueries() {}", "function LQueries() {}", "function Query(applicationId, path, ql, options, success, failure) {\n if (path.lastIndexOf(\"/\", 0) !== 0) {\n path = \"/\" + path;\n }\n path = \"/\" + self.currentOrganization + \"/\" + applicationId + path;\n var client = self;\n var self = this;\n var query = {};\n var start_cursor = null;\n var next_cursor = null;\n var prev_cursor = null;\n\n function getServiceParams() {\n var params = {};\n if (ql) {\n params['ql'] = ql;\n }\n if (start_cursor) {\n params['cursor'] = start_cursor;\n }\n if (prev_cursor) {\n params['prev'] = prev_cursor;\n }\n if (options) {\n for (var name in options) {\n params[name] = options[name];\n }\n }\n return params;\n }\n this.getServiceParams = getServiceParams;\n\n function hasPrevious() {\n return prev_cursor != null;\n }\n this.hasPrevious = hasPrevious;\n\n function getPrevious() {\n start_cursor = null;\n next_cursor = null;\n if (prev_cursor) {\n start_cursor = prev_cursor.pop();\n send(\"GET\", null);\n }\n }\n this.getPrevious = getPrevious;\n\n function hasNext() {\n return next_cursor && start_cursor;\n }\n this.hasNext = hasNext;\n\n function getNext() {\n if (next_cursor && start_cursor) {\n prev_cursor = prev_cursor || [];\n prev_cursor.push(start_cursor);\n start_cursor = next_cursor;\n next_cursor = null;\n send(\"GET\", null);\n }\n }\n this.getNext = getNext;\n\n function send(method, data) {\n var params = getServiceParams();\n prev_cursor = null;\n next_cursor = null;\n start_cursor = null;\n apiRequest(method, path, params, data, function (data) {\n if (data.entities && data.entities.length > 1) {\n start_cursor = data.entities[0].uuid;\n if (data.params) {\n if (data.params.prev) {\n prev_cursor = data.params.prev;\n }\n if (data.params.cursor) {\n start_cursor = data.params.cursor[0];\n }\n }\n next_cursor = data.cursor;\n }\n if (success) {\n success(data, self);\n }\n }, function (data) {\n if (failure) {\n failure(data, self);\n }\n });\n }\n this.send = send;\n\n function post(obj) {\n if (obj) {\n send(\"POST\", JSON.stringify(obj));\n }\n }\n this.post = post;\n\n function put(obj) {\n if (obj) {\n send(\"PUT\", JSON.stringify(obj));\n }\n }\n this.put = put;\n\n function delete_() {\n send(\"DELETE\", null);\n }\n this.delete_ = delete_;\n }", "executeQuery(endpoint, query, quads, variables) {\n const stream = new asynciterator_1.BufferedIterator({ autoStart: false, maxBufferSize: Infinity });\n const inputStream = quads\n ? this.endpointFetcher.fetchTriples(endpoint, query)\n : this.endpointFetcher.fetchBindings(endpoint, query);\n inputStream\n .then((rawStream) => {\n let totalItems = 0;\n rawStream.on('error', (error) => stream.emit('error', error));\n rawStream.on('data', (rawData) => {\n totalItems++;\n stream._push(quads ? rawData : bus_query_operation_1.Bindings(rawData));\n });\n rawStream.on('end', () => {\n stream.emit('metadata', { totalItems });\n stream.close();\n });\n })\n .catch((error) => stream.emit('error', error));\n const metadata = ActorQueryOperationSparqlEndpoint.cachifyMetadata(() => new Promise((resolve, reject) => {\n stream._fillBuffer();\n stream.on('error', reject);\n stream.on('end', () => reject(new Error('No metadata was found')));\n stream.on('metadata', resolve);\n }));\n if (quads)\n return {\n type: 'quads',\n quadStream: stream,\n metadata,\n };\n return {\n type: 'bindings',\n bindingsStream: stream,\n metadata,\n variables: variables.map(rdf_string_1.termToString),\n };\n }", "query(store, type, query) {\n return this.findQuery(store, type, query);\n }", "function TQueries() { }", "function TQueries() { }", "function querySearch (query) {\n\t\t\t\t\t\t \t//var results = $rootScope.clients;\n\t\t\t\t\t\t\t var results = query ? $rootScope.clients.filter(createFilterFor(query)) : $rootScope.clients,\n\t\t\t\t\t\t deferred;\n\t\t\t\t \t\t\treturn results;\n\t\t\t\t\t\t\t \n//\t\t\t\t\t\t \tvar urlClients = protocol_url + appHost + \"/client/operator/list\"\n//\t\t\t\t\t\t\t var data = {domain:appFirmDomain}\n//\t\t\t\t\t\t return httpService.GET(urlClients,data).then(\n//\t\t\t\t\t\t \t\tfunction(response) {\n//\t\t\t\t\t\t \t\t\tvar results = response.data;\n//\t\t\t\t\t\t \t\t\treturn results;\n//\t\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t }", "function LQueries(){}", "function doQuery(target, q) {\n setValue(target, q);\n }", "function doQuery(target, q) {\n setValue(target, q);\n }", "function CustomQuery() {\n\n}", "soql(soql){\n this.log(soql);\n var ret = this.callCommandJson('sfdx force:data:soql:query -q \"' + soql +'\" -r json');\n if(ret != undefined || ret.result.totalSize > 0){\n return ret.result.records;\n }\n return null;\n }", "run(){\n let [q, ...args] = this._getQuery();\n return this.client._query(q, args, {emitter: this}).then(data => {\n this.emit('data', data);\n return data;\n });\n }", "async query(qry, opt) {\n try {\n if (typeof qry.run !== 'function') {\n throw thorin.error('STORE.GCLOUD', `query() requires a QueryObject as its first parameter`);\n }\n let res = await this[store].runQuery(qry, opt);\n return res;\n } catch (e) {\n throw thorin.error(`STORE.GCLOUD`, `An error occurred while querying store`, e);\n }\n }", "query(oracleId, queryFee, queryTtl, responseTtl, fee, query) {\n // if (this.oracle) {\n let data = {\n 'target': 'oracle',\n 'action': 'query',\n 'payload': {\n 'type': 'OracleQueryTxObject',\n 'vsn': 1,\n 'oracle_pubkey': oracleId,\n 'query_fee': queryFee,\n 'query_ttl': {'type': 'delta', 'value': queryTtl},\n 'response_ttl': {'type': 'delta', 'value': responseTtl},\n 'fee': fee,\n 'query': typeof query.toString !== 'undefined' ? query.toString(): query\n }\n }\n this.webSocket.send (JSON.stringify (data))\n return data\n }", "function LQueries() { }", "function LQueries() { }", "async createQuery(queryContents) {\n let language = await this.getLanguage();\n return language.query(queryContents);\n }", "function initialQuery( params, callback ) {\n\n var options = {\n db : params.db || \"toxline\",\n keywords: querystring.escape( params.keywords || \"agranulocytosis\" ),\n verbose : params.verbose || false\n };\n\n if ( callback ) {\n initialRetrieve( \"/x?\", options.db, options.keywords, options.verbose ).then(\n function ( result ) {\n params.verbose && console.log( \"Result:\", result );\n callback( null, result );\n },\n function ( err ) {\n callback( err );\n }\n )\n } else {\n return initialRetrieve( \"/x?\", options.db, options.keywords, options.verbose );\n }\n\n}", "async function executeQuery2(question, tx) {\n printToLog(\"Question: \", question);\n\n let query = [\n \"match \",\n ' $suspect isa person has city \"London\", has age > 50;',\n ' $company isa company has name \"Telecom\";',\n \" (customer: $suspect, provider: $company) isa contract;\",\n \" $pattern-callee isa person has age < 20;\",\n \" (caller: $suspect, callee: $pattern-callee) isa call has started-at $pattern-call-date;\",\n \" $target isa person has phone-number $phone-number, has is-customer false;\",\n \" (caller: $suspect, callee: $target) isa call has started-at $target-call-date;\",\n \" $target-call-date > $pattern-call-date;\",\n \"get $phone-number;\"\n ];\n printToLog(\"Query:\", query.join(\"\\n\"));\n query = query.join(\"\");\n\n const iterator = await tx.query(query);\n const answers = await iterator.collect();\n const result = await Promise.all(\n answers.map(answer =>\n answer\n .map()\n .get(\"phone-number\")\n .value()\n )\n );\n\n printToLog(\"Result:\", result);\n}", "function query(querymode, sql, args, req, streams, cb, type) {\n\n\tvar env = getEnvFromRequest(req);\n\n\tif (!env || !env.match(/^[A-Za-z0-9_]+$/) || !Conf.db[env]) {\n\t\tvar err = 'invalid ' + Conf.sourceSysField + ' value: ' + env;\n\t\tlogger.error(err);\n\t\treturn cb ? cb(err) : null;\n\t}\n\n\t// if we have a valid SAML session, execute the query on a user pool\n\tif (req && req.SAMLAuthenticated && req.session && req.session.passport && req.session.passport.user)\n\t\treturn queryUserPool(querymode, env, sql, args, req, streams, cb, type);\n\n\t// execute the query on an env pool\n\tqueryEnvPool(querymode, env, sql, args, req, streams, cb, type);\n}", "function execute_query(data, params){\n //gets list of all searchable fields\n const keys = window.store.filter(a => a.searchable).map(a => a.value);\n //build full index\n const options = {\n keys: keys,\n threshold: window.threshold,\n useExtendedSearch: true,\n findAllMatches: true,\n }\n const fuse = new Fuse(data, options);\n //SEARCH 1: All fields search (q) + fuzzy text search (a)\n //adds q and a together and formats them in the way fuse.js expects them\n const a = params.a ? params.a : [];\n const q = params.q ? params.q : [];\n const or = q.length ? { $or: keys.map((k) => ({[k]:q.join(\" \")}))} : '';\n const search1 = typeof or === \"object\"? {$and: [...a, or ]} : {$and: [...a]};\n //search all fields and text fields\n //If there are search results, maps them to be in the same format as the original data\n //If there are no search params, return all data\n let searchRes = search1.$and.length ? fuse.search(search1).map(a => a.item) : data;\n const n = params.n ? params.n : [];\n if (n.length){\n //iterate through each item in the n field\n for (const param in n){\n //get type of param\n const field = Object.keys(n[param])[0];\n const type = get_field_by_value(\"type\", field);\n //deals with numbers\n if (type === \"num\"){\n //blank Set for storing unique results from among all num searches\n let newSearchResSet = new Set();\n //split number field into array on \",\" (trim whitespace)\n const nums = String(n[param][field]).split(\",\").map(a => a.replace(/\\s/g,''));\n for (const num in nums){\n if (nums[num].includes(\">\")){\n searchRes.filter(a => a[field] >= nums[num].replace(\">\",'')).forEach(a => newSearchResSet.add(a));\n } else if (nums[num].includes(\"<\")){\n searchRes.filter(a => a[field] <= nums[num].replace(\"<\",'')).forEach(a => newSearchResSet.add(a));\n } else {\n //note this works fine for numbers without a hyphen in them too, so there's no seperate case for that\n const numrange = nums[num].split(\"-\");\n searchRes.filter(a => (a[field] >= parseInt(numrange[0]) && (numrange[numrange.length -1].length ? a[field] <= parseInt(numrange[numrange.length - 1]) : true))).forEach(a => newSearchResSet.add(a));\n }\n }\n //passes new set of results back into searchRes variable.\n searchRes = [...newSearchResSet];\n //deals with symbols\n } else if (type === \"sym\"){\n //blank Set for storing unique results form among all sym searches\n let newSearchResSet = new Set();\n ///split symbol field into array on \"|\" (trim whitespace)\n const syms = String(n[param][field]).split(\"|\").map(a => a.replace(/\\s/g,''));\n for (const sym in syms){\n //if sym contains *, remove * and do a search for anything including the letters\n if (syms[sym].includes(\"*\")){\n //removes * from sym and converts it to an array of characters\n const wildsym = syms[sym].replace(\"*\",'').split('');\n //filters only search results that contain the array of charaters in wildsym\n searchRes.filter(a => wildsym.every(val => a[field].split('').includes(val))).forEach(a => newSearchResSet.add(a));\n } else { //if sym doesn't contain *, do a search for anything exactly matching the letters\n //note: sorts both strings to ensure that the order doesn't matter\n searchRes.filter(a => (a[field].split('').sort().join('') === syms[sym].split('').sort().join(''))).forEach(a => newSearchResSet.add(a));\n }\n }\n //passes new set of results back into searchRes variable.\n searchRes = [...newSearchResSet];\n }\n }\n }\n return searchRes;\n}", "function run_query(arg) {\n query[arg.key] = arg.value;\n if(arg.key === \"State\") {\n dispatch.state(query);\n set_url(query);\n return;\n }\n query.result = query.Phase === \"all\"\n ? counts.Court[query.Court]\n : query.result = counts.Phase[query.Court][query.Phase]\n ;\n if(query.result) {\n dispatch.display(query);\n set_url(query);\n }\n return;\n }", "query(store, type, query) {\n let { backend, id } = query;\n return this.ajax(this._url(backend, id), 'GET', { data: { list: true } }).then(resp => {\n resp.id = id;\n resp.backend = backend;\n return resp;\n });\n }", "async query(stub, args) {\n console.info('============= START : Query method ===========');\n if (args.length != 1) {\n throw new Error('Incorrect number of arguments. Expecting 1');\n }\n\n let query = args[0];\n\n let queryAsBytes = await stub.getState(query); //get the animal from chaincode state\n if (!queryAsBytes || queryAsBytes.toString().length <= 0) {\n throw new Error('key' + ' does not exist: ');\n }\n console.info('query response: ');\n console.info(queryAsBytes.toString());\n console.info('============= END : Query method ===========');\n\n return queryAsBytes;\n\n }", "fullSearch(query) {\n return this.client.search(query || {}).then((resp) => {\n return q(resp.hits.hits);\n }).catch((err) => {\n return q.reject(err);\n });\n }", "async function executeQuery5(question, tx) {\n printToLog(\"Question: \", question);\n\n let queryA = [\n \"match\",\n \" $customer isa person has age < 20;\",\n ' $company isa company has name \"Telecom\";',\n \" (customer: $customer, provider: $company) isa contract;\",\n \" (caller: $customer, callee: $anyone) isa call has duration $duration;\",\n \"aggregate mean $duration;\"\n ];\n printToLog(\"Query:\", queryA.join(\"\\n\"));\n queryA = queryA.join(\"\");\n\n const iteratorA = await tx.query(queryA);\n const answersA = await iteratorA.collect();\n const resultA = answersA[0].number();\n let result =\n \"Customers aged under 20 have made calls with average duration of \" +\n Math.round(resultA) +\n \" seconds.\\n\";\n\n let queryB = [\n \"match \" + \" $customer isa person has age > 40;\",\n ' $company isa company has name \"Telecom\";',\n \" (customer: $customer, provider: $company) isa contract;\",\n \" (caller: $customer, callee: $anyone) isa call has duration $duration;\",\n \"aggregate mean $duration;\"\n ];\n printToLog(\"Query:\", queryB.join(\"\\n\"));\n queryB = queryB.join(\"\");\n\n const iteratorB = await tx.query(queryB);\n const answersB = await iteratorB.collect();\n const resultB = answersB[0].number();\n result +=\n \"Customers aged over 40 have made calls with average duration of \" +\n Math.round(resultB) +\n \" seconds.\\n\";\n\n printToLog(\"Result:\", result);\n}", "function runQuery() {\n const WOQL = TerminusDB.WOQL\n\n const query = WOQL.or(\n WOQL.triple('v:Person', 'knows', 'v:OtherPerson'),\n WOQL.triple('v:OtherPerson', 'knows', 'v:Person'),\n )\n\n return client.query(query)\n}", "function customQuery(db, fun, opts) {\n\t return new PouchPromise(function (resolve, reject) {\n\t db._query(fun, opts, function (err, res$$1) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t resolve(res$$1);\n\t });\n\t });\n\t }", "function querySearch(query) {\n\t\t\t\t\t\t\treturn $http(\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tmethod : 'POST',\n\t\t\t\t\t\t\t\t\t\turl : 'http://localhost/imsui/api/inv/getByName',\n\t\t\t\t\t\t\t\t\t\tdata : $.param( {\n\t\t\t\t\t\t\t\t\t\t\tq : query,\n\t\t\t\t\t\t\t\t\t\t\thead : $scope.cart.head\n\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\theaders : {\n\t\t\t\t\t\t\t\t\t\t\t'Content-Type' : 'application/x-www-form-urlencoded'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}).then(function(response) {\n\t\t\t\t\t\t\t\treturn response.data;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}", "query(db, user_input = {}, options = {}) {\n const langcode = options.langcode;\n const query = this.queryBuilder(db, options);\n\n let values = { ...this.__options.defaultFilters, ...user_input };\n\n if (options.limit > 0) {\n query.limit(options.limit);\n } else {\n query.limit(FALLBACK_LIMIT);\n }\n\n if (options.skip > 0) {\n query.offset(options.skip);\n }\n\n for (let [field, value] of this.baseFilters) {\n if (Array.isArray(value)) {\n query.whereIn(field, value);\n } else {\n query.where(field, value);\n }\n }\n\n for (let name in values) {\n if (!this.filters.has(name)) {\n continue;\n }\n\n const rule = this.filters.get(name);\n const value = values[name];\n\n switch (rule.filter) {\n case 'prefix':\n if (typeof value == 'string' && !value.length) {\n break;\n }\n prefixFilter(query, rule.field, value);\n break;\n\n case 'substring':\n if (typeof value == 'string' && !value.length) {\n break;\n }\n partialMatchFilter(query, rule.field, value);\n break;\n\n case 'terms':\n if (typeof value == 'string' && !value.length) {\n break;\n }\n termsFilter(query, rule.field, stringToTerms(value));\n break;\n\n case 'callback':\n rule.callback(query, value, values, options);\n break;\n\n default:\n console.error('FAIL', rule)\n throw new Error(`Invalid filter specification for '${name}'`);\n }\n\n if (rule.join) {\n for (let join of rule.join) {\n query.innerJoin(join.table, ...join.with);\n }\n }\n\n if (rule.multilang && langcode) {\n query.andWhere(`${rule.table}.langcode`, langcode);\n }\n }\n\n const sorting = (options.sort && options.sort.length)\n ? options.sort\n : this.__options.defaultSorting\n ;\n\n if (sorting) {\n this.sort(query, sorting, langcode);\n }\n\n let filters = new FilterChain;\n\n const context = {\n query: query,\n transform: (callback, ...args) => {\n filters.transform(callback, ...args);\n return context;\n },\n clone: () => query.clone(),\n then: async (callback) => {\n const result = filters.context(await query);\n await this.events.emit('result', {db, result, values, options});\n return callback(result);\n }\n };\n\n return context;\n }", "function doQuery() {\n // Clear the results from a previous query\n resultsLyr.removeAll();\n /*********************************************\n *\n * Set the where clause for the query. This can be any valid SQL expression.\n * In this case the inputs from the three drop down menus are used to build\n * the query. For example, if \"Elevation\", \"is greater than\", and \"10,000 ft\"\n * are selected, then the following SQL where clause is built here:\n *\n * params.where = \"ELEV_ft > 10000\";\n *\n * ELEV_ft is the field name for Elevation and is assigned to the value of the\n * select option in the HTML below. Other operators such as AND, OR, LIKE, etc\n * may also be used here.\n *\n **********************************************/\n params.where = field + stateName.value;\n // executes the query and calls getResults() once the promise is resolved\n // promiseRejected() is called if the promise is rejected\n qTask.execute(params)\n .then(getResults)\n .otherwise(promiseRejected);\n }", "function query(adSql, params, asObjectRow) {\n return $fairCmd.execute(cmd, {\n type: 'QUERY',\n name: adSql,\n parameter: params,\n asObjectRow: asObjectRow === undefined ? true : asObjectRow\n });\n }", "async query(oracleId, queryFee, queryTtl, responseTtl, fee, query) {\n let data = {\n 'target': targets.ORACLE,\n 'action': actions.QUERY,\n 'payload': {\n 'type': 'OracleQueryTxObject',\n 'vsn': 1,\n 'oracle_pubkey': oracleId,\n 'query_fee': queryFee,\n 'query_ttl': {'type': 'delta', 'value': queryTtl},\n 'response_ttl': {'type': 'delta', 'value': responseTtl},\n 'fee': fee,\n 'query': typeof query.toString !== 'undefined' ? query.toString(): query\n }\n }\n\n // First specify to resovle the `query_id` once the subscription\n // has been notified\n let queryAcknowledged = new Promise((resolve, reject) => {\n const subscription = new AeSubscription({\n action: actions.QUERY,\n origin: origins.ORACLE,\n update: (data) => {\n let queryId = data.payload['query_id']\n this.wsProvider.removeSubscription(subscription)\n resolve(queryId)\n }\n })\n this.wsProvider.addSubscription(subscription)\n })\n // then send the query data\n this.wsProvider.sendJson(data)\n // wait for the query being ackowledged\n let queryId = await queryAcknowledged\n\n // then specify to resolve the query payload once the\n // subscription has been notified\n let receivedResponse = new Promise((resolve, reject) => {\n const subscription = new AeSubscription({\n action: actions.NEW_ORACLE_RESPONSE,\n origin: origins.CHAIN,\n update: (data) => {\n this.wsProvider.removeSubscription(subscription)\n resolve(data.payload)\n }\n })\n this.wsProvider.addSubscription(subscription)\n })\n\n // subscribe to the query response\n this.subscribeToResponse(queryId)\n\n return receivedResponse\n }", "async function faunaQuery(query) {\n try {\n debug_log(`trying to execute query ${JSON.stringify(query)}`);\n const res = await client.query(query);\n debug_log(\n `successfully executed query ${JSON.stringify(\n query\n )}, got res ${JSON.stringify(res)}`\n );\n return res;\n } catch (error) {\n console.error(`for query ${JSON.stringify(query)}, got error ${error}`);\n console.error(error.description);\n throw error;\n }\n}", "_query(provider, cacheKey, host, params, item) {\n\t // Should be implemented by child classes\n\t throw new Error('_query() should not be called on base API class');\n\t }", "function query(memoryIndex,predicate,descend,// TODO: \"read\" should be an AbstractType (FW-486)\nread){ngDevMode&&assertPreviousIsParent(getIsParent());var queryList=new QueryList();var queries=getOrCreateCurrentQueries(LQueries_);queries.track(queryList,predicate,descend,read);storeCleanupWithContext(getLView(),queryList,queryList.destroy);if(memoryIndex!=null){store(memoryIndex,queryList);}return queryList;}", "async function bnQueryGen() {\n resultMode = \"bn\";\n await setLimit();\n showSpinner();\n var subject = validateSubject();\n var predicate = validatePredicate();\n var object = nonvalidatedObject();\n var graph = gAppState.checkValue(\"docNameID\", \"docNameID2\");\n\n\n if (gAppState.getCurTab() === \"dbms\") {\n var query =\n \"PREFIX : <\" + graph + \"#>\\n\"\n + \"SELECT DISTINCT * \\n\"\n + \"FROM <\" + graph + \"> \\n\"\n + \"WHERE {\" + \" \" + subject + \" \" + predicate + \" \" + object + \" \" + \"}\"\n } else if (gAppState.getCurTab() === \"fs\") {\n var query =\n \"DEFINE get:soft\" + \" \" + '\"soft\"' + \"\\n\"\n + \"PREFIX : <\" + graph + \"#>\\n\"\n + \"SELECT DISTINCT * \\n\"\n + \"FROM <\" + graph + \"> \\n\"\n + \"WHERE {\" + \" \" + subject + \" \" + predicate + \" \" + object + \" \" + \"}\"\n }\n\n if (limit >= 1) { // if results per page is active\n query = query + \"\\n\" + \"OFFSET \" + offset + \"\\n\" + \"LIMIT \" + limit;\n }\n\n if (DOC.iSel(\"riID\").checked == true) {// if reasoning and inference is on\n query = \"DEFINE input:same-as\" + '\"yes\" \\n' + query;\n } else if (DOC.iSel(\"ruleNameID\").checked == true) {\n query = \"DEFINE input:inference\" + ' ' + \"'\" + DOC.iSel(\"infRuleNameID\").value + \"'\" + ' \\n' + query;\n }\n\n // CSV download\n if (DOC.iSel(\"csvID\").checked == true || DOC.iSel(\"xmlID\").checked == true) {\n await downloadResults();\n }\n\n var endpoint = DOC.iSel(\"sparql_endpoint\").value + \"?default-graph-uri=&query=\";\n let url = endpoint + encodeURIComponent(query) + \"&should-sponge=&format=application%2Fsparql-results%2Bjson\";\n\n if (DOC.iSel(\"cmdID\").checked == true) {\n console.log(\"SPARQL Query: \" + query);\n console.log(\"Query URL: \" + url)\n }\n\n const options = {\n method: 'GET',\n headers: {\n 'Content-type': 'application/sparql-results+json; charset=UTF-8',\n },\n credentials: 'include',\n mode: 'cors',\n crossDomain: true,\n };\n\n var resp;\n try {\n resp = await solidClient.fetch(url, options)\n if (resp.ok && resp.status == 200) {\n var data = await resp.json();\n\n refreshTable();\n\n /*\n Dynamic Table for processing JSON Structured Data (via \"application/sparql-results+json\" document content type)\n that enables INSERT to be handled via a 3-tuple subject, predicate, object graph (relation) while query results\n are handled via an N-Tuple structured table (relation).\n */\n if (data.results.bindings.length > 0) {\n var table = gAppState.checkId(\"dbmsTableID\", \"fsTableID\"); // creates table for header\n var header = table.createTHead(); // creates empty tHead\n var headRow = header.insertRow(0); // inserts row into tHead\n var bindings = data.results.bindings;\n for (var col = 0; col < data.head.vars.length; col++) { // for each column\n var headCell = headRow.insertCell(col); // inserts new cell at position i in thead\n headCell.innerHTML = \"<b>\" + data.head.vars[col] + \"</b>\"; // adds bold text to thead cell\n }\n for (i in bindings) {\n var curr = 0; // curr is used to keep track of correct cell position\n var binding = bindings[i];\n var bodyRow = table.insertRow(-1); // create new row\n for (n in binding) {\n var bodyCell = bodyRow.insertCell(curr); // create new cell in row\n bodyCell.innerHTML = tableFormat(binding[n].value); // set value of cell\n curr += 1;\n }\n }\n hideSpinner();\n }\n else {\n hideSpinner();\n console.log(\"No data returned by query\");\n }\n\n } else {\n var msg = await resp.text();\n hideSpinner();\n console.error('Query Failed', msg);\n alert('Query Failed ' + msg)\n }\n\n } catch (e) {\n hideSpinner();\n console.error('Query Failed', e);\n alert('Query Failed ' + e)\n }\n await setTableSize();\n await buttonDisplay();\n}", "query(query_params = {}) {\n let cache = 1000;\n let subroute = '';\n if (query_params) {\n cache = query_params.cache || 1000;\n delete query_params.cache;\n subroute = query_params.subroute;\n delete query_params.subroute;\n }\n const query = Object(_api__WEBPACK_IMPORTED_MODULE_5__[\"toQueryString\"])(query_params);\n const key = `query|${query}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route()}${subroute ? '/' + subroute : ''}${query ? '?' + query : ''}`;\n let result = [];\n Object(_placeos_ts_client__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(url).subscribe((d) => {\n result =\n d && d instanceof Array\n ? d.map((i) => this.process(i))\n : d && !(d instanceof Array) && d.results\n ? d.results\n : [];\n }, (e) => {\n reject(e);\n this._promises[key] = null;\n }, () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), cache);\n });\n });\n }\n return this._promises[key];\n }", "query(store, type, query) {\n\t\tif (type.proto()._isRPC) {\n\t\t\treturn this.queryRPC(store, type, query);\n\t\t} else {\n\t\t\treturn this._super(...arguments);\n\t\t}\n\t}", "query(type, value) {\n this.modifyState({\n loading: true\n });\n API.object(type, value).then((res) => {\n this.apiResponded(res, 'queryResult');\n });\n }", "query(params)\n {\n return this.doRequest({method: 'GET'}, null, params);\n }", "function customQuery(db, fun, opts) {\n return new __WEBPACK_IMPORTED_MODULE_0_pouchdb_promise__[\"a\" /* default */](function (resolve, reject) {\n db._query(fun, opts, function (err, res) {\n if (err) {\n return reject(err);\n }\n resolve(res);\n });\n });\n }", "query(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, queryOperationSpec);\n }", "query(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, queryOperationSpec);\n }", "query(e, detailed) {\n const event = 'query';\n if (!e || !('query' in e)) {\n throw new TypeError(errors.redirectParams(event));\n }\n let q = e.query;\n let special, prepared;\n if (typeof q === 'string') {\n const qSmall = q.toLowerCase();\n const verbs = ['begin', 'commit', 'rollback', 'savepoint', 'release'];\n for (let i = 0; i < verbs.length; i++) {\n if (qSmall.indexOf(verbs[i]) === 0) {\n special = true;\n break;\n }\n }\n } else {\n if (typeof q === 'object' && ('name' in q || 'text' in q)) {\n // Either a Prepared Statement or a Parameterized Query;\n prepared = true;\n const msg = [];\n if ('name' in q) {\n msg.push(cct.query('name=') + '\"' + cct.value(q.name) + '\"');\n }\n if ('text' in q) {\n msg.push(cct.query('text=') + '\"' + cct.value(q.text) + '\"');\n }\n if (Array.isArray(q.values) && q.values.length) {\n msg.push(cct.query('values=') + cct.value(toJson(q.values)));\n }\n q = msg.join(', ');\n }\n }\n let qText = q;\n if (!prepared) {\n qText = special ? cct.special(q) : cct.query(q);\n }\n const d = (detailed === undefined) ? monitor.detailed : !!detailed;\n if (d && e.ctx) {\n // task/transaction details are to be reported;\n const sTag = getTagName(e), prefix = e.ctx.isTX ? 'tx' : 'task';\n if (sTag) {\n qText = cct.tx(prefix + '(') + cct.value(sTag) + cct.tx('): ') + qText;\n } else {\n qText = cct.tx(prefix + ': ') + qText;\n }\n }\n print(e, event, qText);\n if (e.params) {\n let p = e.params;\n if (typeof p !== 'string') {\n p = toJson(p);\n }\n print(e, event, timeGap + cct.paramTitle('params: ') + cct.value(p), true);\n }\n }", "function querySearch(query) {\n var results = query ? $scope.states.filter(createFilterFor(query)) : $scope.states,\n deferred;\n if ($scope.simulateQuery) {\n deferred = $q.defer();\n $timeout(function () {\n deferred.resolve(results);\n }, Math.random() * 1000, false);\n return deferred.promise;\n } else {\n return results;\n }\n }", "function fdbQuery( params ) {\n return query( schema, ObjStoreName, params );\n }", "function customQuery(db, fun, opts) {\n\t return new PouchPromise$1(function (resolve, reject) {\n\t db._query(fun, opts, function (err, res) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t resolve(res);\n\t });\n\t });\n\t }", "async function query(query) {\n await logUtils.debug(`>> ${MODULE}.query: query=${query}`)\n let result = {\n totalSize: 0,\n done: false,\n nextRecordsUrl: `/services/data/v49.0/query/?q=${query}`,\n records: []\n }\n do {\n let endpoint = `https://${configUtils.getConfig().server}${result.nextRecordsUrl}`\n let curlRequest = `curl --silent -H \"X-PrettyPrint:1\" -H \"Authorization: Bearer ${configUtils.getToken()}\" ${endpoint}`\n let curlResult = await curlExec(curlRequest)\n result.totalSize = curlResult.totalSize\n result.done = curlResult.done\n result.nextRecordsUrl = curlResult.nextRecordsUrl\n result.records = result.records.concat(curlResult.records)\n } while (result.done === false)\n await logUtils.debug(`<< ${MODULE}.query: totalResults=${result.totalSize}, nbResults=${result.records.length}`)\n return result\n}", "function singleQuery(client, query, params) {\n return new Promise(function(resolve, reject) {\n client.query(\n {\n values: params,\n sql: query,\n options: { sql: '...', nestTables: '_' },\n },\n function(error, results, fields) {\n if (error)\n reject('Error fetching Subject access data from ActionKit: ', error);\n resolve(results);\n }\n );\n });\n}", "executeQuery(query) {\n\n query = query.toQuery();\n\n debugQuery(query.text);\n\n return new Promise((resolve, reject) => {\n\n this.connection\n .then(driver => driver.executeQuery(query))\n .then(resolve);\n });\n }", "async query(oracleId, queryFee, queryTtl, responseTtl, fee, query, account, options = {}) {\n let payload = {\n 'response_ttl': {\n 'type': 'delta',\n 'value': responseTtl\n },\n 'sender': options.sender,\n query,\n 'query_ttl': {\n 'type': 'delta',\n 'value': queryTtl\n },\n 'fee': fee,\n 'query_fee': queryFee,\n 'nonce': options && options.nonce,\n 'oracle_pubkey': oracleId\n }\n\n let {data} = await this.client.post(`tx/oracle/query`, payload)\n return this.client.tx.sendSigned(data.tx, account.priv, options)\n }", "queryOne( ...args ) {\n return this.query( ...args ).head();\n }", "function getCurrentWoqlQueryObject(query, settings){\n\tvar qval;\n if(!query) query = settings.query;\n\tswitch(query){\n\t\tcase 'Show_All_Schema_Elements':\n\t\t\tqval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .elementMetadata();\n\t\tbreak;\n\t\tcase 'Show_All_Classes':\n\t\t\tqval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .classMetadata();\n\t\tbreak;\n\t\tcase 'Show_All_Data':\n\t\t\tqval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .getEverything();\n\t\tbreak;\n\t\tcase 'Show_All_Documents':\n\t\t\tqval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .getAllDocuments();\n\t\tbreak;\n case 'Show_All_Document_classes':\n qval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .documentMetadata();\n break;\n case 'Show_Document_Classes':\n qval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start).and(\n TerminusClient.WOQL.quad(\"v:Element\", \"rdf:type\", \"owl:Class\", \"db:schema\"),\n TerminusClient.WOQL.abstract(\"v:Element\"),\n TerminusClient.WOQL.sub(\"v:Element\", \"tcs:Document\"),\n TerminusClient.WOQL.opt().quad(\"v:Element\", \"rdfs:label\", \"v:Label\", \"db:schema\"),\n TerminusClient.WOQL.opt().quad(\"v:Element\", \"rdfs:comment\", \"v:Comment\", \"db:schema\"));\n break;\n case 'Show_All_Properties':\n qval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .propertyMetadata();\n break;\n\t\tdefault:\n\t\t\tconsole.log('Invalid query ' + query + ' passed in WOQLTextboxGenerator');\n\t\tbreak;\n\t}\n\treturn qval;\n}", "function buildQuery(u,s){\n // TODO: add cooky user\n return {\"query\": {\n\t\"bool\": {\n\t \"must\": [\n\t\t{\"match\": {\n\t\t \"user_id\": u\n\t\t}},\n\t {\"exists\":{\"field\":\"resource\"}}\n\t\t]\n\t}\n },\n \"size\": s,\n \"sort\": [{\"date\": \"desc\"}]\n\t } \n}", "async function executeQuery4(question, tx) {\n printToLog(\"Question: \", question);\n\n let query = [\n \"match \",\n ' $target isa person has phone-number \"+48 894 777 5173\";',\n ' $company isa company has name \"Telecom\";',\n \" $customer-a isa person has phone-number $phone-number-a;\",\n \" (customer: $customer-a, provider: $company) isa contract;\",\n \" (caller: $customer-a, callee: $target) isa call;\",\n \" $customer-b isa person has phone-number $phone-number-b;\",\n \" (customer: $customer-b, provider: $company) isa contract;\",\n \" (caller: $customer-b, callee: $target) isa call;\",\n \" (caller: $customer-a, callee: $customer-b) isa call;\",\n \"get $phone-number-a, $phone-number-b;\"\n ];\n printToLog(\"Query:\", query.join(\"\\n\"));\n query = query.join(\"\");\n\n const iterator = await tx.query(query);\n const answers = await iterator.collect();\n const result = await Promise.all(\n answers.map(answer =>\n answer\n .map()\n .get(\"phone-number-a\")\n .value()\n )\n );\n\n printToLog(\"Result:\", result);\n}", "async function query(q, vals){\n const client = await _getClient();\n\n return new Promise(async (resolve, reject) => {\n try{\n const res = await client.query(q, vals);\n resolve(res);\n }\n catch(e){\n reject(e);\n }\n finally{\n client.release();\n }\n });\n}", "handleGetQuery(stanza)\r\n {\r\n //If the request has a query\r\n if (stanza.children[0].is(\"query\"))\r\n {\r\n //Look at the query type\r\n switch (stanza.children[0].attrs.xmlns) \r\n {\r\n case \"http://jabber.org/protocol/disco#info\":\r\n const response = xml(\"iq\", { id: stanza.attrs.id, to: this.fullHostJID(), type: \"result\" }, \r\n xml(\"query\", { xmlns: \"http://jabber.org/protocol/disco#info\" }, \r\n '<identity category=\"client\" name=\"https://saros-project.org\" type=\"pc\"/>'+\r\n '<feature var=\"http://jabber.org/protocol/disco#items\"/>' +\r\n '<feature var=\"http://jabber.org/protocol/si/profile/file-transfer\"/>' + \r\n '<feature var=\"urn:xmpp:ping\"/><feature var=\"jabber:iq:last\"/>' + \r\n '<feature var=\"http://jabber.org/protocol/commands\"/>' +\r\n '<feature var=\"http://jabber.org/protocol/muc\"/>' + \r\n '<feature var=\"http://jabber.org/protocol/bytestreams\"/>' +\r\n '<feature var=\"http://jabber.org/protocol/ibb\"/>' +\r\n '<feature var=\"http://jabber.org/protocol/si\"/>' +\r\n '<feature var=\"http://jabber.org/protocol/xhtml-im\"/>' +\r\n '<feature var=\"http://jabber.org/protocol/chatstates\"/>' +\r\n '<feature var=\"http://jabber.org/protocol/disco#info\"/>'));\r\n this.xmpp.send(response);\r\n break;\r\n \r\n default:\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n //this.log(\"IQ get stanza has no query:\\n\" + stanza + \"\\n\");\r\n }\r\n }", "@computed\n get query() {\n if (this.inputCategory === VARIANT) {\n return {\n \"token\": this.accessToken,\n \"start\": this.variantStart,\n \"end\": this.variantEnd,\n \"seq_region_name\": this.variantRegion\n }\n }\n else if (this.inputCategory === GENE) {\n return {\n \"variants\": {\n \"token\": this.accessToken\n },\n \"genome\": \"homo_sapiens\",\n \"name\": this.searchText.trim()\n }\n }\n }", "executeQuery(res, query){ \n sql.connect(dbConfig, function (err) {\n if (err) { \n console.log(\"Error while connecting database :- \" + err);\n res.send(err);\n }\n else {\n // create Request object\n var request = new sql.Request();\n // query to the database\n request.query(query, function (err, res) {\n if (err) {\n console.log(\"Error while querying database :- \" + err);\n res.send(err);\n }\n else {\n res.send(res);\n }\n });\n }\n }); \n }", "function singleQuery(filter)\n{\n\t//add wheres to query\n\tvar sqlQuery = parseFilter(filter);\n\n\t//perform query\n\treturn db.queryp(sqlQuery);\n}", "query(q, data) {\n\t\treturn new Promise((resolve,reject) => {\n\t\t\ttry {\n\t\t\t\tthis.db.query(q, data, (err, rows) => {\n\t\t\t\t\tif(err) reject(err);\n\t\t\t\t\telse resolve(rows);\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\treject(err);\n\t\t\t}\n\t\t});\n\t}", "addQuery(text) {}", "function customQuery(db, fun, opts) {\n\t return new PouchPromise(function (resolve, reject) {\n\t db._query(fun, opts, function (err, res) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t resolve(res);\n\t });\n\t });\n\t}", "function querySearch (query) {\n var results = query ? self.states.filter( createFilterFor(query) ) : [],\n deferred;\n if (self.simulateQuery) {\n deferred = $q.defer();\n $timeout(function () { deferred.resolve( results ); }, Math.random() * 1000, false);\n return deferred.promise;\n } else {\n return results;\n }\n }", "function qsa(query) {\n return document.querySelectorAll(query);\n }", "function querySearch (query) {\n var results = query ? self.states.filter( createFilterFor(query) ) : self.states,\n deferred;\n if (self.simulateQuery) {\n deferred = $q.defer();\n $timeout(function () { deferred.resolve( results ); }, Math.random() * 1000, false);\n return deferred.promise;\n } else {\n return results;\n }\n }", "query(rawQuery, ...args) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.connection && this.connection.isConnected) {\n return this.connection.query(rawQuery, args);\n }\n throw new ts_framework_common_1.BaseError('Connection is not available for query runner');\n });\n }", "async query (verb, query) {\n await this.connecting()\n return this.connection.request(verb, query)\n }", "findAllQ(options, params) {\n return this.request.post('q', options, {\n params\n });\n }", "executeQuery(query){\n\t\treturn new Promise((resolve, reject)=>{\n\t\t\tthis.db_connection.query(query, err=>{\n\t\t\t\tif (err){\n\t\t\t\t\treject(err);\n\t\t\t\t}else{\n\t\t\t\t\tresolve();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}", "function querySearch(query) {\n var results = query ? self.states.filter(createFilterFor(query)) : self.states,\n deferred;\n if (self.simulateQuery) {\n deferred = $q.defer();\n $timeout(function () { deferred.resolve(results); }, Math.random() * 1000, false);\n return deferred.promise;\n } else {\n return results;\n }\n }", "function transformResult (result) {\n let qdetails = result['bmsbi:result']['bmsbi:qresult']['bmsbi:queryDetails']\n let query = {\n version: result['bmsbi:result']['bmsbi:qresult'].version,\n title: qdetails._,\n }\n\n for (let att in qdetails.$) {\n if (qdetails.$.hasOwnProperty(att)) {\n query[att] = qdetails.$[att]\n }\n }\n\n let qdef = result['bmsbi:result']['bmsbi:qresult']['query']\n query.available = !qdef.queryNotAvailable\n query.infoobjects = qdef.dimension.measure.map((el) => {\n let item = {}\n let ishier = el.ishierarchy === 'true'\n for (var itm in el) {\n // console.log('ishierarchy', , itm.includes('hie'), !el.ishierarchy && itm.includes('hie'))\n if (!el.hasOwnProperty(itm)) continue\n if (!ishier && itm.includes('hie')) continue\n if (itm === 'infoobject') item['id'] = el[itm]\n if (itm === 'descript') item['name'] = el[itm]\n item[itm] = el[itm]\n }\n if (ishier) {\n item.hierarchy =\n {\n id: el.hierarchy,\n name: el.hienmdesc,\n level: el.hienmlevel\n }\n }\n return item\n })\n query.variables = qdef.globalvardescrstr.vars.map((el) => {\n let item = {}\n item.id = el.vnam\n item.name = el.vnamdesc\n item.infoobject = { id: el.infoobject, name: el.infoobjectdesc }\n item.type = el.vartyp\n item.typetext = el.vartypdesc\n item.processtype = el.vproctyp\n item.processtypetext = el.vproctypdesc\n item.parsel = el.vparsel\n item.parseltext = el.vparseldesc\n item.input = el.varinput.toLowerCase() === 'x'\n item.mandatory = el.entrytp === '2' || el.entrytp === '1'\n item.entrytype = el.entrytp\n item.entrytypetext = el.entrytpdesc\n item.dynchange = el.dynchange\n item.dynchangedescr = el.dynchangedescr\n item.flags = {lh: el.flaglh, r: el.flagr}\n item.value = el.lowvalue\n item.highvalue = el.highvalue\n return item\n })\n\n // json-slim: minifies json (better than minify)\n // const slim = require('json-slim')\n // let q = slim(query)\n // // console.log('slim query:', q)\n return query\n }", "function Qi(t, e, n) {\n var r = O(t), i = U.min(), o = en();\n return r.persistence.runTransaction(\"Execute query\", \"readonly\", (function(t) {\n return function(t, e, n) {\n var r = O(t), i = r.kn.get(n);\n return void 0 !== i ? mr.resolve(r.Fn.get(i)) : r.qe.getTargetData(e, n);\n }(r, t, Jt(e)).next((function(e) {\n if (e) return i = e.lastLimboFreeSnapshotVersion, r.qe.getMatchingKeysForTargetId(t, e.targetId).next((function(t) {\n o = t;\n }));\n })).next((function() {\n return r.xn.getDocumentsMatchingQuery(t, e, n ? i : U.min(), n ? o : en());\n })).next((function(t) {\n return {\n documents: t,\n Bn: o\n };\n }));\n }));\n}" ]
[ "0.7057861", "0.68653244", "0.68653244", "0.68653244", "0.68376017", "0.68376017", "0.68376017", "0.67666537", "0.67477953", "0.6725346", "0.6719836", "0.6719836", "0.6651606", "0.66207224", "0.6576635", "0.6576635", "0.6576635", "0.65610373", "0.65610373", "0.6498335", "0.6472477", "0.6425574", "0.6402763", "0.63647443", "0.6356751", "0.6356751", "0.6356751", "0.6294359", "0.62899727", "0.62531286", "0.62404877", "0.62404877", "0.6237164", "0.6232829", "0.6215265", "0.6215265", "0.6181971", "0.6167388", "0.6148249", "0.61316067", "0.61262727", "0.61182374", "0.61182374", "0.6111921", "0.6109446", "0.6075157", "0.60669446", "0.6049506", "0.60406905", "0.60360545", "0.60184497", "0.5981617", "0.5981022", "0.5958895", "0.5949017", "0.5939017", "0.59321254", "0.5915131", "0.5907041", "0.5904821", "0.5903977", "0.5899546", "0.5899207", "0.5890087", "0.5880006", "0.58656037", "0.58607024", "0.58566356", "0.58458656", "0.58390963", "0.58390963", "0.5836441", "0.58276486", "0.5823866", "0.5813928", "0.58104545", "0.5788343", "0.578088", "0.5776738", "0.5772857", "0.57655495", "0.5764838", "0.5762655", "0.57603294", "0.57576275", "0.5755858", "0.5753562", "0.5753179", "0.5748053", "0.5747997", "0.5747728", "0.57393086", "0.5736852", "0.5725887", "0.57258624", "0.572437", "0.5719263", "0.5712363", "0.5705991", "0.5704425", "0.5699514" ]
0.0
-1
helpers // extend objects
function extend( a, b ) { for ( var prop in b ) { a[ prop ] = b[ prop ]; } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extend() {}", "extend() {}", "function extend(a,b){for(var prop in b){a[prop]=b[prop];}return a;}", "function ExtraMethods() {}", "function _extend(){\n\t \n\t\tvar out = {};\n\t\t\n\t\t//Itterate over all objects and copy each property\n\t\t// shallow copy only \n\t\tvar len = arguments.length;\n\t\tfor(var i=0; i < len;i++)\n\t\t for (var prop in arguments[i]) { out[prop] = arguments[i][prop]; }\n\t\t \n\t\treturn(out);\n\t}", "add(obj){\n this.dict = this.extend(this.dict, obj);\n }", "static iextend(obj) {\n // eslint-disable-next-line prefer-rest-params\n each(slice.call(arguments, 1), function (source) {\n for (let prop in source) {\n if ({}.hasOwnProperty.call(source, prop)) {\n obj[prop] = source[prop];\n }\n }\n });\n return obj;\n }", "function BasicObject() {}", "function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}", "function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}", "function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}", "function obj(objec){\nreturn objec;\n}", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function mixin(obj) {\n each(functions(obj), function (name) {\n console.log('name', name);\n var func = (_[name] = obj[name]);\n _.prototype[name] = function () {\n //把方法挂到原型链上\n var args = [this._wrapped]; //['京城一灯']\n push.apply(args, arguments); //['京城一灯',回调函数]\n console.log(\"合并之后的args\", arguments);\n return func.apply(_, args)\n };\n });\n }", "function BasicObject(){}", "function BasicObject(){}", "function NXObject() {}", "function __Object__() {\n }", "function UtilsObject(app) {\n this.app = app;\n this.params = {};\n \n // create a new session\n this.typeOf = function( value ) {\n var s = typeof value;\n if (s === 'object') {\n if (value) {\n if (value instanceof Date) {\n s = 'date';\n } else if (value instanceof Array) {\n s = 'array';\n }\n\n } else {\n s = 'null';\n }\n }\n return s;\n };\n \n this.indexOf= function(array, idx) {\n var i, len = array.length;\n \n for( i=0; i<len; ++i ) {\n if( array[i] == idx )\n return i;\n }\n return false;\n };\n \n this.locationOf= function(array, idx, startptr) {\n var i, len = array.length;\n \n for( i=startptr; i<len; ++i ) {\n if( array[i] == idx )\n return i;\n }\n return false;\n };\n \n this.rangeOf= function(start, count) {\n var fin = start+count;\n var inc = fin > 0 ? 1 : -1;\n var srch=[];\n while( start != fin ) {\n srch.push(start);\n start += inc;\n }\n return srch;\n };\n\n this.cloneValues= function(obj, values) {\n for( var i in values ) {\n obj[i] = this.cloneObject( values[i] );\n }\n };\n \n this.isAlpha= function(value) {\n \tvar upperBoundUpper = \"A\".charCodeAt(0);\n \tvar lowerBoundUpper = \"Z\".charCodeAt(0);\n \tvar upperBoundLower = \"a\".charCodeAt(0);\n \tvar lowerBoundLower = \"z\".charCodeAt(0);\n\n \tfor (var i = 0; i < value.length; i++) {\n \t\tvar char = value.charCodeAt(i);\n \t\tif( (char >= upperBoundUpper && char <= lowerBoundUpper) ||\n \t\t\t(char >= upperBoundLower && char <= lowerBoundLower) )\n \t\t\tcontinue;\n \t\treturn false;\n\t\t}\n \treturn true;\n };\n this.isDigit= function(value) {\n \tvar upperBound = \"9\".charCodeAt(0);\n \tvar lowerBound = \"0\".charCodeAt(0);\n\n \tfor (var i = 0; i < value.length; i++) {\n \t\tvar char = value.charCodeAt(i);\n \t\tif( char <= upperBound && char >= lowerBound )\n \t\t\tcontinue;\n\t\t\treturn false;\n\t\t}\n \treturn true;\n };\n \n this.cloneObject= function(obj) {\n var clone;\n var typ = this.typeOf(obj);\n switch(typ){\n case 'date':\n clone = new Date();\n clone.setTime(obj.getTime());\n break;\n case 'object':\n clone={};\n for( var i in obj )\n {\n clone[i] = this.cloneObject(obj[i]);\n }\n break;\n case 'array':\n clone = obj.slice(0);\n break;\n case 'function':\n clone = null;\n break;\n default:\n intermed = JSON.stringify(obj);\n clone = JSON.parse(intermed);\n break;\n }\n return clone;\n };\n this.FibreRing = function( cb, obj ) {\n if( typeof obj != 'undefined' )\n cb = cb.bind(obj);\n return function() { wait.launchFiber( cb ) };\n };\n \n /* randomInt: produce a number between a and b. */\n this.randomInt = function(a,b)\n {\n return Math.floor( Math.random()*(b-a) + a );\n };\n this.randomNumber = this.randomInt;\n \n /* randomStr: produce a len length string of letters between a and Z and 0 and 9. */\n this.randomStr = function(len)\n {\n var w = '';\n while( len > 0 ) { len--;\n c = this.randomInt(0,61);\n if( c < 10 ) {\n w += c;\n } else if( c < 37 ) {\n w += String.fromCharCode( c + 87 );\n } else {\n w += String.fromCharCode( c + 30 );\n }\n }\n return w;\n };\n this.randomAlpha = this.randomStr;\n this.randomString = this.randomStr;\n \n\n this.flowNumber = function(n)\n {\n if( n > 1024001024 ) {\n return parseInt(n/1024001024) + \"G\"; //..\n } else if( n > 1024000 ) {\n return parseInt(n/1024000) + \"M\";\n } else if( n > 1024 ) {\n return parseInt(n/1024) + \"K\"; \n }\n return n + \"B\";\n };\n\n var server = null;\n \n this.connectMailer = function( ) {\n this.server = email.server.connect( {\n user: this.app.gmail_user,\n password: this.app.gmail_password,\n host: this.app.gmail_host,\n tls: {ciphers: \"SSLv3\"}\n } );\n };\n this.sendMessage = function( to, ccs, subj, msg, cb ) {\n if( this.server == null ) {\n connectMailer();\n }\n this.server.send( {\n text: msg,\n from: this.app.gmail_fullname + '<' + this.app.gmail_user + '>',\n to: to,\n cc: ccs,\n subject: subj }, function( err, message ) {\n console.log(err||message);\n cb(err,message);\n });\n };\n \n /*\n this.find = function() {\n this.cb.apply( null, arguments );\n };\n \n this.fin = function( runner, thisArg, args ) {\n \n var oldcb = args[ args.length-1 ];\n var carryobj = { 'cb': oldcb };\n args[ args.length-1 ] = this.find.bind( carryobj );\n \n runner.apply( thisArg, args ); \n };\n */\n \n /*\n this.ShoeSock = function( runner, thisArg, args ) {\n this.sock = new Sock( \"ws://localhost:8080\", \"echo-protocol\" );\n ock.send({'code':'c1'});\n \n var oldcb = args[ args.length-1 ];\n args[ args.length-1 ] = this.ShoeHorn;\n \n runner.apply( thisArg, args );\n };\n \n this.FibreSock = function( cb ) {\n \n }\n */\n}", "function extend( a, b ) {\r\n for ( var prop in b ) {\r\n a[ prop ] = b[ prop ];\r\n }\r\n return a;\r\n }", "function xx(a,b){return\"method\"!==b.kind||!b.ej||\"value\"in b.ej?(ia(),{kind:\"field\",key:Symbol(),oW:\"own\",ej:{},Dj:function(){\"function\"===typeof b.Dj&&(this[b.key]=b.Dj.call(this))},$l:function(c){c.Ca(b.key,a)}}):Object.assign(Object.assign({},b),{$l:function(c){c.Ca(b.key,a)}})}", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(baseObj, extObj) {\n for (var k in extObj) {\n if (!extObj.hasOwnProperty(k))\n continue;\n assert(!baseObj.hasOwnProperty(k));\n baseObj[k] = extObj[k];\n }\n return baseObj;\n }", "function baseObj(obj){\r\n for(var p in obj){\r\n this[p]=obj[p];\r\n }\r\n }", "function Object() {}", "function Object() {}", "function Object(){}", "function Object(){}", "function Utils(){}", "function __extend__(a,b) {\n\tfor ( var i in b ) {\n\t\tvar g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);\n\t\tif ( g || s ) {\n\t\t\tif ( g ) a.__defineGetter__(i, g);\n\t\t\tif ( s ) a.__defineSetter__(i, s);\n\t\t} else\n\t\t\ta[i] = b[i];\n\t} return a;\n}", "function __extend__(a,b) {\n\tfor ( var i in b ) {\n\t\tvar g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);\n\t\tif ( g || s ) {\n\t\t\tif ( g ) a.__defineGetter__(i, g);\n\t\t\tif ( s ) a.__defineSetter__(i, s);\n\t\t} else\n\t\t\ta[i] = b[i];\n\t} return a;\n}", "function extend( a, b ) {\n\t for ( var prop in b ) {\n\t a[ prop ] = b[ prop ];\n\t }\n\t return a;\n\t}", "function extend(to,_from){for(var key in _from){to[key]=_from[key];}return to;}", "function extend(to,_from){for(var key in _from){to[key]=_from[key];}return to;}", "function extend(to,_from){for(var key in _from){to[key]=_from[key];}return to;}", "function extend(obj, extension) {\n if (typeof extension !== 'object') { extension = extension(); }\n Object.keys(extension).forEach(function(key) {\n obj[key] = extension[key];\n });\n return obj;\n }", "function extend(a, b) {\n for (var i in b) {\n if (b.hasOwnProperty(i)) {\n a[i] = b[i];\n }\n }\n\n if (b.hasOwnProperty(\"toString\")) {\n a.toString = b.toString;\n }\n\n if (b.hasOwnProperty(\"valueOf\")) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n\t}", "combine(obj1, obj2)\n\t{\n\t\treturn _extend(_extend({}, obj1), obj2);\n\t}", "function extend(a, b) {\r\n for (var prop in b) {\r\n a[prop] = b[prop];\r\n }\r\n return a;\r\n }", "function extend(a,b){\n\tvar c={};\n\tfor(var i in a){\n\t\tif(a.hasOwnProperty(i)){\n\t\t\tc[i]=a[i];\n\t\t}\n\t}\n\tfor(var i in b){\n\t\tif(b.hasOwnProperty(i)){\n\t\t\tc[i]=b[i];\n\t\t}\n\t}\n\treturn c\n}", "function extend(a,b){\n\tvar c={};\n\tfor(var i in a){\n\t\tif(a.hasOwnProperty(i)){\n\t\t\tc[i]=a[i];\n\t\t}\n\t}\n\tfor(var i in b){\n\t\tif(b.hasOwnProperty(i)){\n\t\t\tc[i]=b[i];\n\t\t}\n\t}\n\treturn c\n}", "function extend(a,b){\n\tvar c={};\n\tfor(var i in a){\n\t\tif(a.hasOwnProperty(i)){\n\t\t\tc[i]=a[i];\n\t\t}\n\t}\n\tfor(var i in b){\n\t\tif(b.hasOwnProperty(i)){\n\t\t\tc[i]=b[i];\n\t\t}\n\t}\n\treturn c\n}", "objd(obj) {\n\n return toObject(obj);\n }", "function extend(obj, source) {\n for (var prop in source) {\n obj[prop] = source[prop];\n }\n return obj;\n }", "static initialize(obj, scale, rotate, zIndex) { \n obj['scale'] = scale;\n obj['rotate'] = rotate;\n obj['zIndex'] = zIndex;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend( obj, extension ){\n for ( var key in obj ){\n extension[key] = obj[key];\n }\n}", "function dummyObjects(name, age){\n this.name = name\n this.age = age\n}", "function extend(a, b) {\n for (var prop in b) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function Obj()\r\n{\r\n return {\r\n name: 'hamza',\r\n lastName : 'mubeen'\r\n }\r\n}", "function extend(a, b){\n for(var key in b)\n if(b.hasOwnProperty(key))\n a[key] = b[key];\n return a;\n }", "function Utils() {}", "function Utils() {}", "static initialize(obj, from, to) { \n obj['from'] = from;\n obj['to'] = to;\n }", "function extend(extension, obj) {\n\t\tfor(var key in extension) {\n\t\t\tobj[key] = extension[key];\n\t\t}\n\t}", "function Obj() {}", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend( a, b ) {\r\n for ( var prop in b ) {\r\n a[ prop ] = b[ prop ];\r\n }\r\n return a;\r\n}", "function d(e,t){for(var n in e=e||{},t)t[n]&&t[n].constructor&&t[n].constructor===Object?(e[n]=e[n]||{},d(e[n],t[n])):e[n]=t[n];return e}", "function extend(a, b) {\n\t for( var i in b ) {\n\t a[i] = b[i];\n\t }\n\t return a;\n\t}", "function extend(o, e){\n each(e, function(v, n){\n if (is(o[n], 'object') && is(v, 'object')){\n o[n] = extend(o[n], v);\n } else if (v !== null) {\n o[n] = v;\n }\n });\n return o;\n}", "function $o(){}", "get object() {\n\n }", "function extend(obj, extension) {\n for (var key in extension) {\n obj[key] = extension[key];\n }\n return obj;\n}", "function dateObjects()\n{\n\n}", "static initialize(obj, type, items) { \n obj['type'] = type;\n obj['items'] = items;\n }", "function _extend (a, b) {\n\tfor (var k in b) a[k] = b[k];\n}", "function extend(obj, from, from2) {\n from && each(Object.keys(from), function(key) {\n obj[key] = from[key]\n })\n return from2 ? extend(obj, from2) : obj\n}", "function extend(a, b) {\n\t\tfor( var key in b ) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function obj() { return this; }", "function $o(){return $o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$o.apply(this,arguments)}", "function extend(a, b) {\n\t\tfor(var key in b) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function extendObj (oldObj, addObj){\n for (var key in addObj) {\n if (addObj.hasOwnProperty(key)) {\n oldObj[key]=addObj[key];\n }\n }\n return oldObj;\n}", "function extend( a, b ) {\n\t\tfor( var key in b ) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function extend( a, b ) {\n\t\tfor( var key in b ) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function Extend(target, source){\r\n if((target) && (source) && (typeof source == 'object')) {\r\n for(var property in source) {\r\n if (source.hasOwnProperty(property)) {\r\n try { target[property] = source[property]; } catch (exception) { ; }\r\n }\r\n }\r\n }\r\n return target;\r\n}", "initCustomFunctions() {/*To be overridden in sub class as needed*/}", "function extend( ) {\n var args, merged, aI, object, key;\n\n //grab the args\n args = Array.prototype.slice.call(arguments);\n\n //look for arrays\n merged = {};\n for(aI = 0; aI < args.length; aI += 1) {\n object = args[aI];\n if(typeof object === 'undefined') { continue; }\n\n //throw an error if an item is an invalid type\n if(typeof object !== 'object') { throw new Error('Cannot extend objects. All arguments must be objects.'); }\n\n //if we find an array then the merged object will be an array\n if(typeof object.push === 'function') {\n merged = [];\n break;\n }\n }\n\n //add the data to the merged object\n for(aI = 0; aI < args.length; aI += 1) {\n object = args[aI];\n\n if(typeof object !== 'object') { continue; }\n\n //loop through the object's properties\n for(key in object) {\n\n //the property must not be from a prototype\n if(!object.hasOwnProperty(key)) { continue; }\n\n //copy the property\n if(typeof object[key] === 'object' && typeof merged[key] === 'object') {\n merged[key] = extend(merged[key], object[key]);\n } else if(typeof object[key] === 'object') {\n merged[key] = clone(object[key]);\n } else if(typeof merged.push === 'function') {\n merged.push(object[key]);\n } else {\n merged[key] = object[key];\n }\n }\n }\n\n return merged;\n }", "function extend(obj, props) {\n\t\tvar empty = {};\t\n\t\t\n\t\tif(!obj) {\n\t\t\tobj = {};\n\t\t}\n\t\tfor(var i = 1, l = arguments.length; i < l; i++) {\n\t\t\tmixin(obj, arguments[i]);\n\t\t}\n\t\treturn obj;\n\t\t\n\t\tfunction mixin(target, source) {\n\t\t\tvar name, s, i;\n\t\t\tfor(name in source) {\n\t\t\t\tif(source.hasOwnProperty(name)) {\n\t\t\t\t\ts = source[name];\n\t\t\t\t\tif(!( name in target) || (target[name] !== s && (!( name in empty) || empty[name] !== s))) {\n\t\t\t\t\t\ttarget[name] = s;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn target;\n\t\t\t// Object\n\t\t}\t\t\n\t}", "function extend( obj, extension ){\n for ( var key in extension ){\n obj[key] = extension[key];\n }\n}", "function extend(base) {\n\t if (!base) base = {};\n\t for (var i = 1, l = arguments.length, arg; i < l && (arg = arguments[i] || {}); i++) {\n\t for (var name in arg) {\n\t base[name] = arg[name];\n\t }\n\t }return base;\n\t }", "function mixin( /* objects */ ) {\n var mixed = {};\n for (var arg of arguments) {\n for (var name of Object.getOwnPropertyNames(arg)) {\n var desc = Object.getOwnPropertyDescriptor(arg, name);\n Object.defineProperty(mixed, name, desc);\n }\n }\n return mixed;\n }" ]
[ "0.65491366", "0.65491366", "0.6241516", "0.6193384", "0.6184945", "0.6184535", "0.6170308", "0.61424136", "0.61262864", "0.61262864", "0.61262864", "0.61212605", "0.60223323", "0.5989742", "0.59867513", "0.59867513", "0.59615767", "0.5882699", "0.5867043", "0.58626276", "0.58615553", "0.58535135", "0.5849376", "0.5846635", "0.5805527", "0.5805527", "0.5780494", "0.5780494", "0.5780237", "0.5777183", "0.5777183", "0.5772423", "0.5769807", "0.5769807", "0.5769807", "0.5766037", "0.5762971", "0.5743008", "0.5742033", "0.5725838", "0.5725838", "0.5725838", "0.5720676", "0.57191175", "0.5718751", "0.5716262", "0.5715067", "0.5708841", "0.56994843", "0.5699264", "0.5699264", "0.56941843", "0.5677216", "0.5677216", "0.5677216", "0.56712556", "0.56675136", "0.5664533", "0.5664533", "0.56611294", "0.5661057", "0.5660528", "0.5658972", "0.5658972", "0.5651494", "0.564941", "0.5648082", "0.5646559", "0.5646221", "0.5645906", "0.5643163", "0.5630437", "0.5616338", "0.5608711", "0.5607218", "0.56068575", "0.55935174", "0.5592174", "0.5592007", "0.5588457", "0.55863154", "0.55863154", "0.55827236", "0.5581483", "0.55812776", "0.55788314", "0.55710775", "0.5569866", "0.55693525" ]
0.0
-1
turn element or nodeList into an array
function makeArray( obj ) { var ary = []; if ( isArray( obj ) ) { // use object if already an array ary = obj; } else if ( obj && typeof obj.length === 'number' ) { // convert nodeList to array for ( var i=0, len = obj.length; i < len; i++ ) { ary.push( obj[i] ); } } else { // array of single index ary.push( obj ); } return ary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertToArray(nodes){\n var array = null;\n try {\n array = Array.prototype.slice.call(nodes, 0); //non-IE and IE9+\n } catch (ex) {\n array = new Array();\n for (var i=0, len=nodes.length; i < len; i++){\n array.push(nodes[i]);\n }\n }\n return array;\n}", "getArrayFromNodeList(nodeList) {\r\n return [].slice.call(nodeList);\r\n }", "getArrayFromNodeList(nodeList) {\r\n return [].slice.call(nodeList);\r\n }", "function nodesToArr2() {\n let body = document.querySelector('body');\n return treeTags(body);\n}", "getArrayFromNodeList(nodeList) {\n return [].slice.call(nodeList);\n }", "function nodeListToArray (nodeList) {\n return Array.prototype.slice.call(nodeList);\n }", "function nodeListToArray (domNodeList) {\n if (Array.isArray(domNodeList)) {\n return domNodeList;\n } else {\n return Array.prototype.slice.call(domNodeList);\n }\n}", "function getArrayOfElements(value) {\n if (isSingular(value)) {\n // TODO: VirtualReference is not compatible to type Element\n return [value];\n }\n\n if (value instanceof NodeList) {\n return arrayFrom(value);\n }\n\n if (Array.isArray(value)) {\n return value;\n }\n\n try {\n return arrayFrom(document.querySelectorAll(value));\n } catch (e) {\n return [];\n }\n }", "function getArray(nodeList) {\n return [].slice.call(nodeList);\n}", "toArray() {\n let answer = [];\n let node = this;\n while (node) {\n answer.push(node.value);\n node = node.next;\n }\n return answer;\n }", "function getArrayOfElements(value) {\n if (isSingular(value)) {\n // TODO: VirtualReference is not compatible to type Element\n return [value];\n }\n\n if (value instanceof NodeList) {\n return arrayFrom(value);\n }\n\n if (Array.isArray(value)) {\n return value;\n }\n\n try {\n return arrayFrom(document.querySelectorAll(value));\n } catch (e) {\n return [];\n }\n}", "toArray() {\n let arr = [];\n this.traverse((currentNode) => {\n arr.push(currentNode.value);\n });\n return arr;\n }", "function nodeListToArray (nodeList) {\n var length = nodeList.length;\n\n if (nodeList.hasOwnProperty) {\n return Array.prototype.slice.call(nodeList);\n }\n\n return new Array(length).fill().map(function (index) {\n return nodeList[index];\n });\n}", "function array(nodeList) {\n\t\treturn Array.prototype.slice.call(nodeList, 0);\n\t}", "function getArrayOfElements(value) {\n if (isElement(value)) {\n return [value];\n }\n\n if (isNodeList(value)) {\n return arrayFrom(value);\n }\n\n if (Array.isArray(value)) {\n return value;\n }\n\n return arrayFrom(document.querySelectorAll(value));\n}", "static getElements(els) {\r\n if (typeof els === 'string') {\r\n let list = document.querySelectorAll(els);\r\n if (!list.length && els[0] !== '.' && els[0] !== '#') {\r\n list = document.querySelectorAll('.' + els);\r\n if (!list.length) {\r\n list = document.querySelectorAll('#' + els);\r\n }\r\n }\r\n return Array.from(list);\r\n }\r\n return [els];\r\n }", "function returnElementArray($container) {\n var nsp = '[data-' + ns + ']',\n // if an $el was given, then we scope our query to just look within the element\n DOM = $container ? $container.find(nsp) : $(nsp);\n\n return DOM;\n }", "function toArray(fake) { // @param NodeList/Array:\r\n // @return Array:\r\n if (!_ie && (_opera && _uaver >= 9.5)) {\r\n return Array.prototype.slice.call(fake, 0);\r\n }\r\n var rv = [], ri = -1, i = 0, iz = fake.length;\r\n\r\n for (; i < iz; ++i) {\r\n rv[++ri] = fake[i];\r\n }\r\n return rv;\r\n}", "toArray() {\n const array = [];\n let node = this.head;\n while (node) {\n array.push(node.value);\n node = node.next;\n }\n return array;\n }", "function splitToArray(el){\n return el.innerHTML.split('/');\n }", "function getElementAndAncestors(element) {\n var allElements = [];\n while (isTransformableElement(element)) {\n allElements.push(element);\n element = element.parentNode;\n }\n return allElements;\n}", "function xml2Array(xml, nodeName) {\n\tvar tab = [];\n\tvar rsp = xml.getElementsByTagName(nodeName);\n\tfor (var i = 0; i < rsp.length; i++) {\n\t\ttab[i] = [];\n\t\tvar nodes = rsp[i].childNodes;\n\t\tfor (var j = 0; j < nodes.length; j++)\n\t\t\tif (nodes[j].nodeType == 1) {\n\t\t\t\tvar el = nodes[j];\n\t\t\t\ttab[i][el.nodeName] = (el.firstChild != null ? el.firstChild.nodeValue : \"\");\n\t\t\t}\n\t}\n\treturn tab;\n}", "function ElementNodes(nodelist) {\n\tvar eNodes = []; // return array is defined\n\n\tfor (var i=0, j=nodelist.length; i < j; i++) {\n\t\tif (nodelist[i].nodeType == 1) { // if nodelist is real element\n\t\t\teNodes.push(nodelist[i]); // push the nodelist into our eNodes array\n\t\t}\n\t}\n\n\treturn eNodes;\n}", "function turnNodeArrayIntoStringArray(arrayNodes){\n var stringArray=[];\n arrayNodes.forEach(function(element){\n var elementArray = [];\n element.each(function(index, title){\n elementArray.push(title.innerHTML);\n });\n stringArray.push(elementArray);\n });\n return stringArray;\n}", "toArray() {\n const elements = [];\n let currNode = this.head;\n\n while (currNode) {\n elements.push(currNode);\n currNode = currNode.next;\n }\n\n return elements;\n }", "async function getTextNodeArray(rootElem = document) {\n return new Promise((resolve, _) => {\n let textNodeArray = [];\n let stack = [rootElem];\n while (stack.length) {\n let node = stack.pop();\n\n if (node instanceof Text) {\n textNodeArray.push(node);\n continue;\n }\n\n if (node instanceof Element &&\n node.classList.contains(LABEL.classWhiteList)) {\n continue;\n }\n\n let child = node.lastChild;\n while (child) {\n stack.push(child);\n child = child.previousSibling;\n }\n }\n resolve(textNodeArray);\n });\n}", "function qsa(element, selector) {\n return toArray(element.querySelectorAll(selector));\n}", "function qsa(element, selector) {\n return toArray(element.querySelectorAll(selector));\n}", "function qsa(element, selector) {\n return toArray(element.querySelectorAll(selector));\n}", "function GetAllElements(element) {\n var elements = [];\n\n if (element && element.hasChildNodes()) {\n elements.push(element);\n\n var childs = element.childNodes;\n\n for (var i = 0; i < childs.length; i++) {\n if (childs[i].hasChildNodes()) {\n elements = elements.concat(GetAllElements(childs[i]));\n } else if (childs[i].nodeType === 1) {\n elements.push(childs[i]);\n }\n }\n }\n return elements;\n}", "function makeArray(container) {\n return $(container).toArray();\n}", "function coll2array(coll) {\r\n return coll && ('tagName' in coll ? [coll] : (function() {\r\n for (var i=0, len=coll.length, arr=new Array(len); i<len; i++) arr[i]=coll[i];\r\n return arr\r\n })());\r\n}", "function arr(elementsByClassName) {\n result = [];\n for(var i = 0;i<elementsByClassName.length; i++){\n result[i] = elementsByClassName[i];\n }\n return result;\n}", "toArray () {\n return this._content.map(function (x, i) {\n return x.val\n })\n }", "function xmlTagToArray(d) {\n if (!d) { return []; }\n else if (!Array.isArray(d)) { return [d]; }\n else { return d; }\n}", "function toArray(children){return mapChildren(children,function(child){return child;})||[];}", "function xmlParser2Array(xmlDoc, containerTag)\n{\n var output= new Array();\n var rawData = xmlDoc.getElementsByTagName(containerTag)[0];\n var tiles=rawData.children;\n var attributes;\n var i=0;\n var j=0;\n /*********\n * This loop goes through a childs/tiles node adding its attributes to an array\n */\n for(i=0;i<tiles.length;i++)\n { \n attributes= new Array();\n\n for(j=0;j<tiles[i].attributes.length;j++)\n {\n attributes.push(new Array(tiles[i].attributes[j].name,tiles[i].attributes[j].nodeValue));\n }\n output.push(attributes);\n }\n return output;\n}", "function getNodeList(ary) {\n return ary.map((d) => d['sub'])\n}", "toArray() {}", "toArray() {}", "toArray() {}", "getChildren(): Array<Element>{\n return this._elements;\n }", "function toArray(enu) {\n var arr = [];\n\n for (var i = 0, l = enu.length; i < l; i++)\n arr.push(enu[i]);\n\n return arr;\n}", "function childNodesOfElement(element) {\n let children = [];\n let child = element.firstChild;\n while (child) {\n children.push(child);\n child = child.nextSibling;\n }\n return children;\n }", "getNodes() {\n if (\"subtree\" in this.options) {\n return Array.from(this.target.querySelectorAll(this.options.selector));\n }\n\n return Array.from(this.target.childNodes);\n }", "function __(elm) { return document.querySelectorAll(elm) }", "function xmlToArray(resultsXml)\n{\n// initiate the resultsArray\nvar resultsArray= new Array();\n// loop through all the xml nodes retrieving the content\nfor(i=0;i<resultsXml.length;i++)\nresultsArray[i]=resultsXml.item(i).firstChild.data;\n// return the node's content as an array\nreturn resultsArray;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( typeof obj.length === 'number' ) {\n // convert nodeList to array\n for ( var i=0, len = obj.length; i < len; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function getThumbnailsArray() {\r\n 'use strict';\r\n var thumbnails = document.querySelectorAll(THUMBNAIL_LINK_SELECTOR);\r\n\r\n // convert the NodeList returned from querySelectorAll to an array -\r\n // It is a backward-compatible way to convert from a NodeList to an array\r\n var thumbnailArray = [].slice.call(thumbnails);\r\n return thumbnailArray;\r\n\r\n}", "function convertToArrs(elem) {\n return function(el) {\n return el.qs.map(convertTo(elem));\n };\n }", "function contents(element) {\n var res = [];\n var nodes;\n for (var i=0; i<element.length; i++) {\n nodes = element[i].childNodes;\n for (var j=0; j<nodes.length; j++) {\n res.push(nodes.item(j));\n }\n }\n return $(res);\n }", "function _makeDomArray(elem, clone) {\n if (elem == null) {\n return [];\n }\n if (isCheerio(elem)) {\n return clone ? cloneDom(elem.get()) : elem.get();\n }\n if (Array.isArray(elem)) {\n return elem.reduce((newElems, el) => newElems.concat(this._makeDomArray(el, clone)), []);\n }\n if (typeof elem === 'string') {\n return this._parse(elem, this.options, false, null).children;\n }\n return clone ? cloneDom([elem]) : [elem];\n}", "function getBoardArray(){\n // get each row of the board\n var grid_rows = [].slice.call(document.querySelectorAll(\".row\"));\n \n grid_rows.forEach(function(row,index){\n var nums;\n board.push([]);\n // each cell of the board\n row_cells = [].slice.call(row.children);\n row_cells.forEach(function(num){\n board[index].push(num.value); \n });\n })\n return board;\n}", "function selectNodes(contextNode, xpathExpression) {\r\n var nodes = document.evaluate(xpathExpression, contextNode, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\r\n var nodeArray = new Array(nodes.snapshotLength);\r\n\r\n for (var i = 0; i < nodeArray.length; i++)\r\n nodeArray[i] = nodes.snapshotItem(i);\r\n\r\n return nodeArray;\r\n }", "get all() {\n const _elements = [];\n try {\n const value = this.elements.value;\n if (value && value.length) {\n // create list elements\n for (let i = 0; i < value.length; i++) {\n // make each list element individually selectable via xpath\n const selector = `(${this._selector})[${i + 1}]`;\n const listElement = this._elementStoreFunc.apply(this._store, [selector, this._elementOpts]);\n _elements.push(listElement);\n }\n }\n return _elements;\n }\n catch (error) {\n // this.elements will throw error if no elements were found\n return _elements;\n }\n }", "toArray() {\n const nodes = [];\n let currentNode = this.head;\n\n while (currentNode) {\n nodes.push(currentNode);\n currentNode = currentNode.next;\n }\n return nodes;\n }", "toArray() {\n let array = [];\n for (let current = this.#head.next;\n current != this.this.#tail;\n current = current.next) {\n array.push(current.value);\n }\n\n return array;\n }", "function assembleNodes(firstNode) {\n var nodes = [];\n var node = firstNode;\n while(node) {\n if (node instanceof HTMLElement) nodes.push(node);\n node = node.nextSibling;\n }\n return nodes;\n}", "function makeArray(element) {\n\treturn isArray(element) ? element : [element];\n}", "function __arrayDoms($doms) {\r\n if ($doms==null)\r\n return new Array();\r\n for (i in $doms) {\r\n if (i==\"length\") {\r\n var tmp = new Array();\r\n for (var i=0; i<$doms.length; i++) {\r\n tmp.push($doms[i]);\r\n }\r\n return tmp;\r\n }\r\n break;\r\n }\r\n return new Array($doms);\r\n}", "toArray() {\n let arr = [];\n let n = this._dummy.next;\n\n while (n !== this._dummy) {\n arr.push(n.data);\n n = n.next;\n }\n\n return arr;\n }", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n }", "function asArray ( a ) {\n\t\treturn $.isArray(a) ? a : [a];\n\t}", "function _toConsArray(nodeList)\n {\n let arr = []\n for(let i = 0; i < nodeList.length; i++) arr.push(nodeList[i])\n return arr\n }", "function _makeDomArray(elem, clone) {\n var _this = this;\n\n if (elem == null) {\n return [];\n }\n\n if (utils_1.isCheerio(elem)) {\n return clone ? utils_1.cloneDom(elem.get()) : elem.get();\n }\n\n if (Array.isArray(elem)) {\n return elem.reduce(function (newElems, el) {\n return newElems.concat(_this._makeDomArray(el, clone));\n }, []);\n }\n\n if (typeof elem === 'string') {\n return parse_1.default(elem, this.options, false).children;\n }\n\n return clone ? utils_1.cloneDom([elem]) : [elem];\n}", "function HTMLCollectionToArray(collection) {\n\tvar array = [];\n\tfor ( var i = 0; i < collection.length; i++ )\n\t\tarray.push(collection[i]);\n\treturn array;\n}", "get elements():Array<Element> {\n return this._elements;\n }", "function uuarray(source) { // @param Array/Mix/NodeList/Arguments: source\r\n // @return Array:\r\n var type = uutype(source), rv, i, iz;\r\n\r\n if (type === uutype.FAKEARRAY) { // [3][4]\r\n for (rv = [], i = 0, iz = source.length; i < iz; ++i) {\r\n rv[i] = source[i];\r\n }\r\n return rv;\r\n }\r\n return (type === uutype.ARRAY) ? source : [source]; // [1][2]\r\n}", "function __( el )\n{\n return document.querySelectorAll( el );\n}", "function convertNsIArray(arr, elemType) {\n var out = [];\n arr = arr.QueryInterface(Ci.nsIArray);\n for (var i = 0; i < arr.length; i++) {\n out.push(arr.queryElementAt(i, elemType));\n }\n return out;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( obj && typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "static getChildren(el, klass) {\n const results = [];\n if (el == null)\n return results;\n for (let node = el.firstElementChild; node != null; node = node === null || node === void 0 ? void 0 : node.nextElementSibling) {\n if (Dom.hasClass(node, klass))\n results.push(node);\n }\n return results;\n }", "static array(array) {\n let result = [];\n array.forEach(function (elem) {\n // this element has objectify implemented?\n if (isFunction(elem.objectify)) {\n try {\n let obj = Objectify.create(elem);\n if (obj) {\n result.push(obj);\n }\n\n } catch (ex) {\n Objectify._logger.error(\"Failed to objectify element: \" + ex);\n }\n }\n });\n\n return result;\n }", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function getInnerText(elements) {\n var res = [];\n elements.forEach(function(el) {\n res.push(el.innerText);\n });\n return res;\n}", "function qsa(parent, selector){return [].slice.call(parent.querySelectorAll(selector) )}", "function makeArray( obj ) {\n var ary = [];\n if ( isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function convertNodes() {\n var nodes, i, len, c, e;\n nodes = [];\n for (i = 0, len = usercomics.length; i < len; i = i + 1) {\n c = usercomics[i];\n e = new Element('span', { 'comicid': c.id });\n e.innerHTML = c.name;\n nodes[i] = e;\n }\n return nodes;\n}", "function currentTubeToArray(){\n list = document.getElementsByClassName(\"ballContainer\")\n listArray = []\n for (const tube of list){\n tubeArray = []\n balls = tube.children\n for(const ball of balls){\n tubeArray.push(ball.style.backgroundColor)\n }\n listArray.push(tubeArray)\n }\n return(listArray)\n}", "_getAllTextElementsForChangingColorScheme() {\n let tagNames = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'label']\n let allItems = [];\n\n for (let tagname of tagNames) {\n allitems = Array.prototype.concat.apply(allitems, x.getElementsByTagName(tagname));\n }\n // allitems = Array.prototype.concat.apply(allitems, x.getElementsByTagName(\"h1\"));\n\n return allItems;\n }", "getElementsByType(type) {\n if (!this[$elementsByType].has(type)) {\n return [];\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return Array.from(this[$elementsByType].get(type));\n }", "function getElementsFromHTML() {\n toRight = document.querySelectorAll(\".to-right\");\n toLeft = document.querySelectorAll(\".to-left\");\n toTop = document.querySelectorAll(\".to-top\");\n toBottom = document.querySelectorAll(\".to-bottom\");\n }", "getAst() {\n\n return {\n type: 'array',\n elements: this.elements.map(elem => elem.getAst())\n };\n }", "function getThumbnailsArray() {\n 'use strict';\n var thumbnails =\n document.querySelectorAll(THUMBNAIL_LINK_SELECTOR);\n var thumbnailArray = [].slice.call(thumbnails);\n return thumbnailArray;\n}", "function makeArray( obj ) {\r\n var ary = [];\r\n if ( isArray( obj ) ) {\r\n // use object if already an array\r\n ary = obj;\r\n } else if ( typeof obj.length === 'number' ) {\r\n // convert nodeList to array\r\n for ( var i=0, len = obj.length; i < len; i++ ) {\r\n ary.push( obj[i] );\r\n }\r\n } else {\r\n // array of single index\r\n ary.push( obj );\r\n }\r\n return ary;\r\n }", "function toArray(thing) {\n return Array.prototype.slice.call(thing);\n }", "function frame_to_array(frame) {\n var frame_array = [];\n while (frame) {\n frame_array.push(frame);\n frame = frame.parent;\n }\n\n return frame_array;\n}", "function makeTagArr(pathToSelected, result) {\n var backwardsPath = pathToSelected;\n var currentTagName = $(result).prop(\"tagName\").toLowerCase();\n var siblingIndex = $(result).index();\n var documentIndex = $(currentTagName).index(result);\n var tagArr = [];\n tagArr.unshift([currentTagName,documentIndex,siblingIndex]);\n\n // going backwards to html tag from selected tag\n while(currentTagName != \"html\"){\n backwardsPath = backwardsPath + \"/parent::*\";\n var nodes = document.evaluate(backwardsPath, document, null,\n XPathResult.ANY_TYPE, null);\n var nodesResult = nodes.iterateNext();\n currentTagName = $(nodesResult).prop(\"tagName\").toLowerCase();\n siblingIndex = $(nodesResult).index(); //sibling num\n documentIndex = $(currentTagName).index(nodesResult); //whole document num\n tagArr.unshift([currentTagName,documentIndex,siblingIndex]);\n }\n return tagArr;\n}" ]
[ "0.7361989", "0.7308388", "0.7308388", "0.729898", "0.7279939", "0.7265269", "0.72267294", "0.7116159", "0.7040728", "0.7029587", "0.69996554", "0.6957603", "0.6861447", "0.68188804", "0.66965497", "0.6689172", "0.6598793", "0.65931666", "0.6518876", "0.647441", "0.6451992", "0.6432851", "0.6419615", "0.6419116", "0.6400182", "0.63842815", "0.63800794", "0.63800794", "0.63800794", "0.63530684", "0.6336319", "0.63347846", "0.6331773", "0.6311791", "0.6294093", "0.6290442", "0.6252953", "0.6241182", "0.62386805", "0.62386805", "0.62386805", "0.62173885", "0.62111175", "0.6207824", "0.6186409", "0.61810416", "0.61720264", "0.6166858", "0.61396766", "0.6119013", "0.61102164", "0.61078745", "0.6086616", "0.60813874", "0.606201", "0.60539675", "0.60407686", "0.6038009", "0.6031748", "0.60062885", "0.59939843", "0.5972763", "0.5972124", "0.59690577", "0.59610516", "0.595241", "0.59459025", "0.5945769", "0.5941328", "0.5940909", "0.59242016", "0.5885551", "0.58850694", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5879552", "0.58778375", "0.5874551", "0.5874551", "0.58727103", "0.58721095", "0.58688676", "0.58674735", "0.58642024", "0.58593607", "0.5846477", "0.58459634", "0.5825042", "0.5812088", "0.58097196" ]
0.0
-1
masonryDefinition // used for AMD definition and requires
function masonryDefinition( Outlayer, getSize ) { // create an Outlayer layout class var Masonry = Outlayer.create('masonry'); Masonry.prototype._resetLayout = function() { this.getSize(); this._getMeasurement( 'columnWidth', 'outerWidth' ); this._getMeasurement( 'gutter', 'outerWidth' ); this.measureColumns(); // reset column Y var i = this.cols; this.colYs = []; while (i--) { this.colYs.push( 0 ); } this.maxY = 0; }; Masonry.prototype.measureColumns = function() { this.getContainerWidth(); // if columnWidth is 0, default to outerWidth of first item if ( !this.columnWidth ) { var firstItem = this.items[0]; var firstItemElem = firstItem && firstItem.element; // columnWidth fall back to item of first element this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || // if first elem has no width, default to size of container this.containerWidth; } this.columnWidth += this.gutter; this.cols = Math.floor( ( this.containerWidth + this.gutter ) / this.columnWidth ); this.cols = Math.max( this.cols, 1 ); }; Masonry.prototype.getContainerWidth = function() { // container is parent if fit width var container = this.options.isFitWidth ? this.element.parentNode : this.element; // check that this.size and size are there // IE8 triggers resize on body size change, so they might not be var size = getSize( container ); this.containerWidth = size && size.innerWidth; }; Masonry.prototype._getItemLayoutPosition = function( item ) { item.getSize(); // how many columns does this brick span var remainder = item.size.outerWidth % this.columnWidth; var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; // round if off by 1 pixel, otherwise use ceil var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); colSpan = Math.min( colSpan, this.cols ); var colGroup = this._getColGroup( colSpan ); // get the minimum Y value from the columns var minimumY = Math.min.apply( Math, colGroup ); var shortColIndex = indexOf( colGroup, minimumY ); // position the brick var position = { x: this.columnWidth * shortColIndex, y: minimumY }; // apply setHeight to necessary columns var setHeight = minimumY + item.size.outerHeight; var setSpan = this.cols + 1 - colGroup.length; for ( var i = 0; i < setSpan; i++ ) { this.colYs[ shortColIndex + i ] = setHeight; } return position; }; /** * @param {Number} colSpan - number of columns the element spans * @returns {Array} colGroup */ Masonry.prototype._getColGroup = function( colSpan ) { if ( colSpan < 2 ) { // if brick spans only one column, use all the column Ys return this.colYs; } var colGroup = []; // how many different places could this brick fit horizontally var groupCount = this.cols + 1 - colSpan; // for each group potential horizontal position for ( var i = 0; i < groupCount; i++ ) { // make an array of colY values for that one group var groupColYs = this.colYs.slice( i, i + colSpan ); // and get the max value of the array colGroup[i] = Math.max.apply( Math, groupColYs ); } return colGroup; }; Masonry.prototype._manageStamp = function( stamp ) { var stampSize = getSize( stamp ); var offset = this._getElementOffset( stamp ); // get the columns that this stamp affects var firstX = this.options.isOriginLeft ? offset.left : offset.right; var lastX = firstX + stampSize.outerWidth; var firstCol = Math.floor( firstX / this.columnWidth ); firstCol = Math.max( 0, firstCol ); var lastCol = Math.floor( lastX / this.columnWidth ); // lastCol should not go over if multiple of columnWidth #425 lastCol -= lastX % this.columnWidth ? 0 : 1; lastCol = Math.min( this.cols - 1, lastCol ); // set colYs to bottom of the stamp var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) + stampSize.outerHeight; for ( var i = firstCol; i <= lastCol; i++ ) { this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); } }; Masonry.prototype._getContainerSize = function() { this.maxY = Math.max.apply( Math, this.colYs ); var size = { height: this.maxY }; if ( this.options.isFitWidth ) { size.width = this._getContainerFitWidth(); } return size; }; Masonry.prototype._getContainerFitWidth = function() { var unusedCols = 0; // count unused columns var i = this.cols; while ( --i ) { if ( this.colYs[i] !== 0 ) { break; } unusedCols++; } // fit container to columns that have been used return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; }; Masonry.prototype.needsResizeLayout = function() { var previousWidth = this.containerWidth; this.getContainerWidth(); return previousWidth !== this.containerWidth; }; return Masonry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeMasonry() {\n window.myMasonry = new Masonry(document.querySelector(`.${CLASSES.MASONRY}`))\n }", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n // HACK copy over isOriginLeft/Top options\n var _manageStamp = MasonryMode.prototype._manageStamp;\n MasonryMode.prototype._manageStamp = function() {\n this.options.isOriginLeft = this.isotope.options.isOriginLeft;\n this.options.isOriginTop = this.isotope.options.isOriginTop;\n _manageStamp.apply( this, arguments );\n };\n\n return MasonryMode;\n}", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n // HACK copy over isOriginLeft/Top options\n var _manageStamp = MasonryMode.prototype._manageStamp;\n MasonryMode.prototype._manageStamp = function() {\n this.options.isOriginLeft = this.isotope.options.isOriginLeft;\n this.options.isOriginTop = this.isotope.options.isOriginTop;\n _manageStamp.apply( this, arguments );\n };\n\n return MasonryMode;\n}", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n // HACK copy over isOriginLeft/Top options\n var _manageStamp = MasonryMode.prototype._manageStamp;\n MasonryMode.prototype._manageStamp = function() {\n this.options.isOriginLeft = this.isotope.options.isOriginLeft;\n this.options.isOriginTop = this.isotope.options.isOriginTop;\n _manageStamp.apply( this, arguments );\n };\n\n return MasonryMode;\n}", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n // HACK copy over isOriginLeft/Top options\n var _manageStamp = MasonryMode.prototype._manageStamp;\n MasonryMode.prototype._manageStamp = function() {\n this.options.isOriginLeft = this.isotope.options.isOriginLeft;\n this.options.isOriginTop = this.isotope.options.isOriginTop;\n _manageStamp.apply( this, arguments );\n };\n\n return MasonryMode;\n}", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n // HACK copy over isOriginLeft/Top options\n var _manageStamp = MasonryMode.prototype._manageStamp;\n MasonryMode.prototype._manageStamp = function() {\n this.options.isOriginLeft = this.isotope.options.isOriginLeft;\n this.options.isOriginTop = this.isotope.options.isOriginTop;\n _manageStamp.apply( this, arguments );\n };\n\n return MasonryMode;\n}", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n return MasonryMode;\n}", "function WR_Masonry() {\n\t \tvar el = $( '.wr-nitro-masonry' );\n\n\t \tel.each( function( i, val ) {\n\t \t\tvar _option = $( this ).data( 'masonry' );\n\n\t \t\tif ( _option !== undefined ) {\n\t \t\t\tvar _selector = _option.selector, _width = _option.columnWidth;\n\n\t \t\t\t$( this ).WR_ImagesLoaded( function() {\n\t \t\t\t\t$( val ).isotope( {\n\t \t\t\t\t\tpercentPosition: true,\n\t \t\t\t\t\titemSelector: _selector,\n\t \t\t\t\t\tmasonry: {\n\t \t\t\t\t\t\tcolumnWidth: _width\n\t \t\t\t\t\t}\n\t \t\t\t\t} );\n\t \t\t\t} )\n\t \t\t}\n\t \t} );\n\t }", "function simple_blogmasonry() {\n \"use strict\";\n var container = $('#blogmasonry .filterable');\n container.imagesLoaded(function() {\n\n msnry_blog = new Masonry('#blogmasonry .filterable', {\n \"columnWidth\": \".grid-size\",\n itemSelector: '.blog-article'\n });\n\n });\n }", "function initMasonry() {\n \t// first handle the imagesloaded because we are loading images\n \tvar $grid = $('.grid').imagesLoaded( function() {\n console.log(\"masonry initialized\");\n\n // Now call masonry after all images have loaded so it'll \n // properly gridify the images, gridify is probably not a real word.\n $grid.masonry({\n itemSelector: '.grid-item',\n percentPosition: true,\n columnWidth: '.grid-sizer'\n });\n });\n \t\n \t// we can init the featherlight library here.\n\tinitFeatherLight();\n }", "function init_masonry(){\n var $container = $('#content');\n\n $container.imagesLoaded( function(){\n $container.masonry({\n itemSelector: '.box-content',\n isAnimated: true\n });\n });\n}", "function masonryDefinition( Outlayer, getSize ) {\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n\n Masonry.prototype._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n var i = this.cols;\n this.colYs = [];\n while (i--) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n };\n\n Masonry.prototype.measureColumns = function() {\n var container = this._getSizingContainer();\n // if columnWidth is 0, default to outerWidth of first item\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n if ( !this.columnWidth ) {\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem ? getSize( firstItemElem ).outerWidth :\n // or size of container\n this.size.innerWidth;\n }\n this.columnWidth += this.gutter;\n\n this._containerWidth = getSize( container ).innerWidth;\n this.cols = Math.floor( ( this._containerWidth + this.gutter ) / this.columnWidth );\n this.cols = Math.max( this.cols, 1 );\n };\n\n Masonry.prototype._getSizingContainer = function() {\n return this.options.isFitWidth ? this.element.parentNode : this.element;\n };\n\n Masonry.prototype._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var colSpan = Math.ceil( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n\n var colGroup = this._getColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n var shortColIndex = indexOf( colGroup, minimumY );\n\n // position the brick\n var position = {\n x: this.columnWidth * shortColIndex,\n y: minimumY\n };\n\n // apply setHeight to necessary columns\n var setHeight = minimumY + item.size.outerHeight;\n var setSpan = this.cols + 1 - colGroup.length;\n for ( var i = 0; i < setSpan; i++ ) {\n this.colYs[ shortColIndex + i ] = setHeight;\n }\n\n return position;\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n Masonry.prototype._getColGroup = function( colSpan ) {\n if ( colSpan === 1 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( i, i + colSpan );\n // and get the max value of the array\n colGroup[i] = Math.max.apply( Math, groupColYs );\n }\n return colGroup;\n };\n\n Masonry.prototype._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var firstX = this.options.isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n Masonry.prototype._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this.options.isFitWidth ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n Masonry.prototype._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n // debounced, layout on resize\n // HEADS UP this overwrites Outlayer.resize\n // Any changes in Outlayer.resize need to be manually added here\n Masonry.prototype.resize = function() {\n // don't trigger if size did not change\n var container = this._getSizingContainer();\n var size = getSize( container );\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var hasSizes = this.size && size;\n if ( hasSizes && size.innerWidth === this._containerWidth ) {\n return;\n }\n\n this.layout();\n\n delete this.resizeTimeout;\n };\n\n return Masonry;\n}", "function social_curator_masonry_callback(element){}", "function createMasonry(element) {\n //using Images Loaded in .gallery section\n //\"You images done yet or what?\"\n let imgLoad = imagesLoaded('.gallery');\n imgLoad.on( 'progress', function(instance, image) {\n console.log( imgLoad.images.length + ' images have to be loaded' );\n // detect which image is broken\n for ( var i = 0, len = imgLoad.images.length; i < len; i++ ) {\n var image = imgLoad.images[i];\n var result = image.isLoaded ? 'loaded' : 'broken';\n console.log( 'image is ' + result + ' for ' + image.img.src );\n }\n //creates Masonry object from .gallery\n let msnry = new Masonry( element, {\n // options\n itemSelector: \".gallery__item\"\n });\n });\n}", "function masonryDefinition( Outlayer, getSize ) {\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n\n Masonry.prototype._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n var i = this.cols;\n this.colYs = [];\n while (i--) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n };\n\n Masonry.prototype.measureColumns = function() {\n this.getContainerWidth();\n // if columnWidth is 0, default to outerWidth of first item\n if ( !this.columnWidth ) {\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n // if first elem has no width, default to size of container\n this.containerWidth;\n }\n\n this.columnWidth += this.gutter;\n\n this.cols = Math.floor( ( this.containerWidth + this.gutter ) / this.columnWidth );\n this.cols = Math.max( this.cols, 1 );\n };\n\n Masonry.prototype.getContainerWidth = function() {\n // container is parent if fit width\n var container = this.options.isFitWidth ? this.element.parentNode : this.element;\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var size = getSize( container );\n this.containerWidth = size && size.innerWidth;\n };\n\n Masonry.prototype._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var remainder = item.size.outerWidth % this.columnWidth;\n var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n // round if off by 1 pixel, otherwise use ceil\n var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n\n var colGroup = this._getColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n var shortColIndex = indexOf( colGroup, minimumY );\n\n // position the brick\n var position = {\n x: this.columnWidth * shortColIndex,\n y: minimumY\n };\n\n // apply setHeight to necessary columns\n var setHeight = minimumY + item.size.outerHeight;\n var setSpan = this.cols + 1 - colGroup.length;\n for ( var i = 0; i < setSpan; i++ ) {\n this.colYs[ shortColIndex + i ] = setHeight;\n }\n\n return position;\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n Masonry.prototype._getColGroup = function( colSpan ) {\n if ( colSpan < 2 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( i, i + colSpan );\n // and get the max value of the array\n colGroup[i] = Math.max.apply( Math, groupColYs );\n }\n return colGroup;\n };\n\n Masonry.prototype._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var firstX = this.options.isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n // lastCol should not go over if multiple of columnWidth #425\n lastCol -= lastX % this.columnWidth ? 0 : 1;\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n Masonry.prototype._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this.options.isFitWidth ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n Masonry.prototype._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n // debounced, layout on resize\n // HEADS UP this overwrites Outlayer.resize\n // Any changes in Outlayer.resize need to be manually added here\n Masonry.prototype.resize = function() {\n // don't trigger if size did not change\n var previousWidth = this.containerWidth;\n this.getContainerWidth();\n if ( previousWidth === this.containerWidth ) {\n return;\n }\n\n this.layout();\n };\n\n return Masonry;\n}", "function masonryGridSetting() {\n if ($('.masonry-gallery').length) {\n var $grid = $('.masonry-gallery').masonry({\n itemSelector: '.grid-item',\n columnWidth: '.grid-item',\n percentPosition: true\n });\n\n $grid.imagesLoaded().progress(function () {\n $grid.masonry('layout');\n });\n }\n }", "function attachMasonry() {\n\t\tif ($('.masonry').length > 0) {\n\t\t\t$('.masonry').masonry({\n\t\t\t\tanimate: true,\n\t\t\t\tcolumnWidth: 1,\n\t\t\t\titemSelector: 'li.box',\n\t\t\t\tsingleMode: false,\n\t\t\t\tresizeable: true\n\t\t\t});\n\t\t}\n\t\t\n\t\tif ($('.masonry-no-animate').length > 0) {\n\t\t\t$('.masonry-no-animate').masonry({\n\t\t\t\tanimate: false,\n\t\t\t\tcolumnWidth: 1,\n\t\t\t\titemSelector: 'li.box',\n\t\t\t\tsingleMode: false,\n\t\t\t\tresizeable: true\n\t\t\t});\n\t\t}\n\t\t\n\t\tif ($('.masonry-news').length > 0) {\n\t\t\t$('.masonry-news').masonry({\n\t\t\t\tanimate: true,\n\t\t\t\tcolumnWidth: 50,\n\t\t\t\titemSelector: 'li.box',\n\t\t\t\tsingleMode: false,\n\t\t\t\tresizeable: true\n\t\t\t});\n\t\t}\n\t\t\n\t\tif ($('.masonry-no-animate-news').length > 0) {\n\t\t\t$('.masonry-news').masonry({\n\t\t\t\tanimate: true,\n\t\t\t\tcolumnWidth: 50,\n\t\t\t\titemSelector: 'li.box',\n\t\t\t\tsingleMode: false,\n\t\t\t\tresizeable: true\n\t\t\t});\n\t\t}\n\t}", "function masonryBlocks($cont,$item) {\n\n var container = $('.'+$cont);\n var items = $('.'+$item);\n sjq(container).imagesLoaded( function() {\n // init isotope\n sjq(container).isotope({\n itemSelector: '.'+$item,\n percentPosition: true,\n masonry: {\n columnWidth: '.'+$item\n \n }\n });\n // append other items when they are loaded\n sjq(items).imagesLoaded( function() {\n \n sjq(container).append(items)\n .isotope('appended', items)\n .isotope('layout');;\n });\n });\n}", "function qodefInitProductListMasonryShortcode() {\n\t\tvar container = $('.qodef-pl-holder.qodef-masonry-layout .qodef-pl-outer');\n\t\t\n\t\tif (container.length) {\n\t\t\tcontainer.each(function () {\n\t\t\t\tvar thisContainer = $(this),\n\t\t\t\t\tsize = thisContainer.find('.qodef-pl-sizer').width();\n\t\t\t\t\n\t\t\t\tthisContainer.waitForImages(function () {\n\t\t\t\t\tthisContainer.isotope({\n\t\t\t\t\t\titemSelector: '.qodef-pli',\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tmasonry: {\n\t\t\t\t\t\t\tcolumnWidth: '.qodef-pl-sizer',\n\t\t\t\t\t\t\tgutter: '.qodef-pl-gutter'\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tqodefResizeWooCommerceMasonryLayoutItems(size, thisContainer);\n\t\t\t\t\t\n\t\t\t\t\tthisContainer.isotope('layout').css('opacity', 1);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}", "function eltdfInitProductListMasonryShortcode() {\n\t\tvar container = $('.eltdf-pl-holder.eltdf-masonry-layout .eltdf-pl-outer');\n\t\t\n\t\tif(container.length) {\n\t\t\tcontainer.each(function(){\n\t\t\t\tvar thisContainer = $(this);\n\t\t\t\t\n\t\t\t\tthisContainer.waitForImages(function() {\n\t\t\t\t\tthisContainer.isotope({\n\t\t\t\t\t\titemSelector: '.eltdf-pli',\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tmasonry: {\n\t\t\t\t\t\t\tcolumnWidth: '.eltdf-pl-sizer',\n\t\t\t\t\t\t\tgutter: '.eltdf-pl-gutter'\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tthisContainer.isotope('layout');\n\t\t\t\t\t\n\t\t\t\t\tthisContainer.css('opacity', 1);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}", "function OsMasonryFlex() {\r\n $('.masonry-container').each(function () {\r\n var minwidth = parseInt($(this).data('masonry-grid-width'), 10) || 370;\r\n var $container = $(this);\r\n var oldWidth = $container.innerWidth();\r\n var oldRatio = oldWidth / minwidth;\r\n var $masonryOpt = {itemSelector: '.masonry-item'};\r\n var $masonry = $container.masonry($masonryOpt);\r\n\r\n function ResizeItem(containerWidth) {\r\n var Ratio = Math.floor(containerWidth / minwidth);\r\n if (Ratio === 0) {\r\n Ratio = 1;\r\n }\r\n else if (Ratio != oldRatio) {\r\n var itemWidth = 1 / Ratio;\r\n $container.children('.masonry-item').css({width: itemWidth * 100 + '%'});\r\n }\r\n }\r\n\r\n ResizeItem(oldWidth);\r\n\r\n // On ImagesLoaded\r\n $masonry.imagesLoaded().progress(function () {\r\n $masonry.masonry('layout');\r\n });\r\n\r\n // Window on resize\r\n $(window).on('resize', function () {\r\n var newWidth = $container.innerWidth();\r\n if (newWidth != oldWidth) {\r\n ResizeItem(newWidth);\r\n oldWidth = newWidth;\r\n }\r\n });\r\n\r\n //Fix parallax background\r\n $masonry.on('layoutComplete', function () {\r\n $(window).trigger('resize.px.parallax');\r\n });\r\n }\r\n )\r\n ;\r\n\r\n }", "function loadGridImages(numImages) { \ni=0;\nconsole.log('Loading '+numImages+' images');\n\nfor(i=0;i<numImages;i++){\nvar imgStr = \"images/p\"+(i+1)+\".png\";\naddImage(imgStr, i);\n}\n\nimagesLoaded('#thegrid', function() {\n$('#thegrid').masonry({\nitemSelector: 'item',\ncolumnWidth: ($(window).width())/50,\ngutter: 12\n});\n\n})\n}", "static get tag() {\n return \"lrndesign-gallery-masonry\";\n }", "renderLayout() {\n\t let self = this;\t \n\t let photoListWrapper = document.querySelector('#photos');\t \n imagesLoaded(photoListWrapper, function() { \t \n\t\t\tself.msnry = new Masonry( photoListWrapper, {\n\t\t\t\titemSelector: '.photo'\n\t\t\t}); \n\t\t\t[...document.querySelectorAll('#photos .photo')].forEach(el => el.classList.add('in-view'));\n });\n }", "function initMasonryGallery(){\n \"use strict\";\n\n resizeMasonryGallery($j('.grid-sizer').width());\n\n if($j('.masonry_gallery_holder').length){\n\n $j('.masonry_gallery_holder').each(function(){\n var $this = $j(this);\n $this.waitForImages(function(){\n $this.animate({opacity:1});\n $this.isotope({\n itemSelector: '.masonry_gallery_item',\n masonry: {\n columnWidth: '.grid-sizer'\n }\n });\n\t\t\t\t\n\t\t\t\t$this.find('.masonry_gallery_item.parallax_item').each(function(i){\n\t\t\t\t\t$j(this).masonryParallax($this.data('parallax_item_speed'), true, $this.data('parallax_item_offset'));\n\t\t\t\t\t\n\t\t\t\t});\n });\n });\n $j(window).resize(function(){\n resizeMasonryGallery($j('.grid-sizer').width());\n $j('.masonry_gallery_holder').isotope('reloadItems');\n });\n }\n}", "function runMasonry() {\n var $container = $('#container');\n\n $container.masonry({\n columnWidth: 60,\n itemSelector: '.item',\n containerStyle: null,\n isAnimated: true,\n gutter: 14,\n isFitWidth: true\n });\n}", "function runMasonry(container, item){\n var $container = $(container).masonry();\n $container.imagesLoaded( function() {\n $container.masonry({\n itemSelector: item\n });\n });\n}", "function masonry(container, items, images, spacing, dCol, tCol, mCol) {\n //selects the following classes from the the DOM.\n var g = document.querySelector(container),\n //The below returns an array\n gc = document.querySelectorAll(items),\n gi = document.querySelectorAll(images),\n //Finds the length of the array\n gcLength = gc.length,\n gHeight = 0,\n i;\n for (i = 0; i < gcLength; i++) {\n gc[i].style.height = getRandomIntInclusive(200, 400) + \"px\";\n gi[i].style.minHeight = gc[i].style.height;\n\n //Total height of all items\n gHeight += gc[i].offsetHeight + parseInt(spacing);\n }\n if (document.documentElement.clientWidth >= 940) {\n g.style.height = gHeight / dCol + gHeight / (gcLength + 1) + \"px\";\n } else if (\n document.documentElement.clientWidth < 940 &&\n document.documentElement.clientWidth >= 768\n ) {\n g.style.height = gHeight / tCol + gHeight / (gcLength + 1) + \"px\";\n } else {\n g.style.height = gHeight / mCol + gHeight / (gcLength + 1) + \"px\";\n }\n}", "function _masonry( container ) {\n\n\t\t/* Gallery Grid */\n\t\t$( '.gallery-grid' ).isotope({\n\t\t\t\titemSelector : '.gallery-grid-item',\n\t\t\t\ttransitionDuration: 0,\n\t\t});\n\t\tsetTimeout( function(){ $( '.gallery-grid' ).isotope( 'layout' ) }, 3000);\n\n\t}", "function initMasonryEffect() {\n\n\t\t$allElm = $(gridElementSpecific); // Get all elements from DOM and set allElm variable\n\t\t$allElm.hide(); // Hide html elements prelimenary\n\t\t$allElm.css('position', 'absolute'); // Positions elements absolutely\n\n\t\t// If the grid is present (#grid has elements), do masonry\n\t\tif ($allElm.length !== 0) {\n\n\t\t\t// Check if site is accessed correctly through the hashes (for index pages). If not, redirect to home and set hash route.\n\t\t\tif ($('body.home').length === 0) {\n\t\t\t\tvar newUrl = hashizeUrl(window.location.href);\n\t\t\t\tsetUrl(newUrl);\n\n\t\t\t// If no hash is set, initialize splash screen with all items\n\t\t\t} else if (getHash() === '') {\n\t\t\t\tsetHash('all');\n\n\t\t\t// Page is ready for masonry\n\t\t\t} else if (getHash() === 'shop') {\n\t\t\t\tsetHash('category-shop');\n\t\t\t} else {\n\t\t\t\tprepareMasonry();\n\t\t\t}\n\n\t\t\t// Change hash on click\n\t\t\t$('li.menu-item-type-taxonomy > a').click(function() {\n\t\t\t\tvar category = hashizeUrl($(this).attr(\"href\"), true);\n//\t\t\t\tcategory = category.replace(/\\//g,\"-\");\n\t\t\t\tsetHash(category);\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t// Watch for hash change and do masonry when changed\n\t\t\t$(window).hashchange(function() {\n\n\t\t\t\t// Alert Google Analytics that new async page has been called (converted to non-hashed url) and track with _gaq\n\t\t\t\tif (checkGoogleAnalyticsLoaded()) {\n\t\t\t\t\tvar trackUrl = antiHashizeUrl(getHash(), true, false);\n\t\t\t\t\tif (trackUrl == \"all\") { trackUrl = \"\"; }\n\t\t\t\t\tvar trackLocation = '/' + trackUrl;\n\t\t\t\t\t_gaq.push(['_trackPageview', trackLocation]);\n\t\t\t\t}\n\n\t\t\t\tprepareMasonry();\n\t\t\t});\n\n\t\t// The grid is not present, wait for clicks\n\t\t} else {\n\n\t\t\t// Change hash on click\n\t\t\t$('li.menu-item-type-taxonomy > a').click(function() {\n\t\t\t\tvar category = hashizeUrl($(this).attr(\"href\"), true);\n//\t\t\t\tcategory = category.replace(/\\//g,\"-\");\n\t\t\t\tvar url = base + \"#\" + category;\n\t\t\t\tsetUrl(url);\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\n\t}", "function searchResultMasonryInit() {\r\n\t\t\t\t\tif ($('body.search-results').length > 0 && \r\n\t\t\t\t\t$('#search-results article').length > 0 && \r\n\t\t\t\t\t$('#search-results[data-layout=\"list-no-sidebar\"]').length == 0) {\r\n\t\t\t\t\t\tsearchResultMasonry();\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "function initQBlog(){\n\t\"use strict\";\n\t\n\tif($j('.q_masonry_blog').length){\n\t\t$j('.q_masonry_blog').each(function() {\n var thisItem = $j(this);\n var thisItemWidth = thisItem.width();\n\n if($j('.full_width').length && !thisItem.parents('.grid_section').length){\n thisItemWidth = $j('.full_width').width();\n }\n\n\t\t\tvar $cols = 3;\n\t\t\tvar screenSize = $j(window).width();\n\n \tif ($j('.full_width').length && !thisItem.parents('.grid_section').length) {\n \t\tif(screenSize < 601) {\n\t\t\t\t\t$cols = 1;\n\t \t} else if (screenSize < 769) {\n\t \t\t$cols = 1;\n\t \t} else if (screenSize < 783) {\n\t \t\t$cols = 2;\n\t \t} else if (screenSize < 1000) {\n\t \t\t$cols = 3;\n\t \t} else if (screenSize < 1384) {\n\t \t\t$cols = 4;\n\t \t} else {\n\t \t\t$cols = 5;\n\t \t}\n \t} else if($j('.full_width').length && thisItem.parents('.grid_section').length) {\n \t\tif(thisItemWidth < 601) {\n $cols = 1;\n thisItem.children('article').css('width', '100%');\n } else if(thisItemWidth < 769) {\n $cols = 2;\n thisItem.children('article').css('width', '46.5%');\n } else {\n \t$cols = 3;\n }\n \t} else if($j('.content .container .container_inner.page_container_inner').length && thisItem.parents('.grid_section').length) {\n \t\tif(thisItemWidth < 421) {\n $cols = 1;\n thisItem.children('article').css('width', '100%');\n } else if(thisItemWidth < 769) {\n $cols = 2;\n thisItem.children('article').css('width', '46.5%');\n } else {\n \t$cols = 3;\n }\n \t} else {\n if(thisItemWidth < 421) {\n $cols = 1;\n } else if(thisItemWidth < 769) {\n $cols = 2;\n } else {\n \t$cols = 3;\n }\n }\n\n\t\t\tthisItem.isotope({\n\t\t\t\titemSelector: 'article',\n\t\t\t\tresizable: false,\n\t\t\t\tmasonry: { columnWidth: thisItemWidth / $cols }\n\t\t\t});\n\n thisItem.animate({opacity: \"1\"}, 500);\n\t\t});\n\t}\t\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function initBlogMasonryGallery(){\n \"use strict\";\n\n if($j('.blog_holder.masonry_gallery').length) {\n\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n\n var container = $j('.blog_holder.masonry_gallery');\n container.width(Math.round(container.parent().width()));\n container.isotope({\n itemSelector: 'article',\n resizable: false,\n masonry: {\n columnWidth: '.blog_holder_grid_sizer',\n gutter: '.blog_holder_grid_gutter'\n }\n });\n\n container.waitForImages(function(){\n container.animate({opacity: \"1\"}, 300, function() {\n container.isotope().isotope('layout');\n });\n });\n\n if( container.hasClass('masonry_infinite_scroll')){\n container.infinitescroll({\n navSelector : '.blog_infinite_scroll_button span',\n nextSelector : '.blog_infinite_scroll_button span a',\n itemSelector : 'article',\n loading: {\n finishedMsg: finished_text,\n msgText : loading_text\n }\n },\n // call Isotope as a callback\n function( newElements ) {\n container.isotope( 'appended', $j( newElements ) );\n fitVideo();\n fitAudio();\n initFlexSlider();\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n setTimeout(function() {\n container.isotope( 'layout');\n }, 300);\n }\n );\n }else if(container.hasClass('masonry_load_more')){\n var i = 1;\n $j('.blog_load_more_button a').off('click tap').on('click tap', function(e) {\n e.preventDefault();\n\n var link = $j(this).attr('href');\n var $content = '.masonry_load_more';\n var $anchor = '.blog_load_more_button a';\n var $next_href = $j($anchor).attr('href');\n $j.get(link+'', function(data){\n var $new_content = $j($content, data).wrapInner('').html();\n $next_href = $j($anchor, data).attr('href');\n container.append( $j( $new_content) ).isotope( 'reloadItems' ).isotope({ sortBy: 'original-order' });\n fitVideo();\n fitAudio();\n initFlexSlider();\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n setTimeout(function() {\n container.isotope( 'layout');\n }, 300);\n\n if($j('.blog_load_more_button span').attr('rel') > i) {\n $j('.blog_load_more_button a').attr('href', $next_href); // Change the next URL\n } else {\n $j('.blog_load_more_button').remove();\n }\n\n });\n i++;\n });\n\n }\n\n $j(window).resize(function() {\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n container.isotope().isotope('layout');\n container.width(Math.round(container.parent().width()));\n });\n }\n}", "function qodeOnWindowLoad() {\n qodeInitElementorAdvancedImageGalleryMasonry();\n }", "function searchResultMasonry() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $searchContainer = $('#search-results'),\r\n\t\t\t\t\t$dividerNum = ($searchContainer.is('[data-layout=\"masonry-no-sidebar\"]')) ? 4 : 3;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$searchContainer.imagesLoaded(function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$searchContainer.isotope({\r\n\t\t\t\t\t\t\titemSelector: '.result',\r\n\t\t\t\t\t\t\tlayoutMode: 'packery',\r\n\t\t\t\t\t\t\tpackery: {\r\n\t\t\t\t\t\t\t\tcolumnWidth: $('#search-results').width() / $dividerNum\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$searchContainer\r\n\t\t\t\t\t\t\t.find('article')\r\n\t\t\t\t\t\t\t.css('opacity', '1');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t$window.on('resize', function () {\r\n\t\t\t\t\t\t$searchContainer.isotope({\r\n\t\t\t\t\t\t\tlayoutMode: 'packery',\r\n\t\t\t\t\t\t\tpackery: {\r\n\t\t\t\t\t\t\t\tcolumnWidth: $('#search-results').width() / $dividerNum\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function qodefOnWindowResize() {\n qodefInitProductListMasonryShortcode();\n }", "function MasonryDoc(props) {\n return (\n <>\n <div className=\"flex flex-1 flex-grow-0 items-center justify-end\">\n <Button\n className=\"normal-case\"\n variant=\"contained\"\n color=\"secondary\"\n component=\"a\"\n href=\"https://mui.com/components/masonry\"\n target=\"_blank\"\n role=\"button\"\n >\n <Icon>link</Icon>\n <span className=\"mx-4\">Reference</span>\n </Button>\n </div>\n <Typography className=\"text-40 my-16 font-700\" component=\"h1\">\n Masonry\n </Typography>\n <Typography className=\"description\">\n Masonry lays out contents of different sizes as blocks of the same width and variable height\n with configurable gaps.\n </Typography>\n\n <Typography className=\"mb-40\" component=\"div\">\n Masonry maintains a list of content blocks with a consistent width but variable height. The\n contents are ordered by row. If a row is already filled with the specified number of\n columns, the next item starts another row, and it is added to the shortest column.\n </Typography>\n <blockquote>\n <Typography className=\"mb-40\" component=\"div\">\n Warning: This component has been developed with the use of CSS Grid Level 2.\n Unfortunately, Chrome only allows to render at most 1,000 rows for each grid. Hence, with\n the current design, a masonry component has a maximum height of 2,000px, and the items\n beyond this height will fail to be rendered. An{' '}\n <a href=\"https://github.com/mui-org/material-ui/issues/27934\">issue</a> has been created\n on GitHub to gather workarounds for this limitation. It is worth noting that this\n limitation does not exist on Firefox or Safari.\n </Typography>\n </blockquote>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Basic masonry\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n A simple example of a <code>{`<Masonry />`}</code>. <code>{`<Masonry />`}</code> is a\n container for one or more <code>{`<MasonryItem />`}</code>s.{' '}\n <code>{`<MasonryItem />`}</code> can receive any element including <code>{`<div />`}</code>{' '}\n and <code>{`<img />`}</code>. Also, it is important to note that each{' '}\n <code>{`<MasonryItem />`}</code> accepts only one element.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/BasicMasonry.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/BasicMasonry.js')}\n />\n </Typography>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Image masonry\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n This example demonstrates the use of <code>{`<Masonry />`}</code> for images.{' '}\n <code>{`<Masonry />`}</code> orders its children by row. If you would like to order images\n by column, you can use <code>{`<ImageList variant=\"masonry\" />`}</code>. More details on\n this component can be found in{' '}\n <a href=\"/components/image-list/#masonry-image-list\">Masonry Image List</a>.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/ImageMasonry.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/ImageMasonry.js')}\n />\n </Typography>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Columns\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n This example demonstrates the use of the <code>columns</code> to configure the number of\n columns of a <code>{`<Masonry />`}</code>.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/FixedColumns.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/FixedColumns.js')}\n />\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <code>columns</code> accepts responsive values:\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/ResponsiveColumns.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/ResponsiveColumns.js')}\n />\n </Typography>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Spacing\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n This example demonstrates the use of the <code>spacing</code> to configure the spacing\n between <code>{`<MasonryItem />`}</code>s. It is important to note that <code>spacing</code>{' '}\n is a factor of the theme&#39;s spacing.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/FixedSpacing.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/FixedSpacing.js')}\n />\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <code>spacing</code> accepts responsive values:\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/ResponsiveSpacing.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/ResponsiveSpacing.js')}\n />\n </Typography>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Column spanning\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n This example demonstrates the use of the <code>columnSpan</code> to configure the number of\n columns taken up by each <code>{`<MasonryItem />`}</code>.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/DiffColSizeMasonry.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/DiffColSizeMasonry.js')}\n />\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n However, you have to choose the value of <code>columnSpan</code> for each item carefully or\n fine-tune heights of items so that your masonry does not break.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/DiffColSizeMasonryBroken.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/DiffColSizeMasonryBroken.js')}\n />\n </Typography>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Server-side rendering\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n This example demonstrates the use of the <code>defaultHeight</code> to configure a fixed\n height of each <code>{`<MasonryItem />`}</code>. This is used for server-side rendering. By\n default, <code>height: 100%</code> will be set to the content of{' '}\n <code>{`<MasonryItem />`}</code>. If you change this, there can be unwanted gap between{' '}\n <code>{`<MasonryItem />`}</code> and the content that you pass to it.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/SSRMasonry.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/SSRMasonry.js')}\n />\n </Typography>\n </>\n );\n}", "function eltdfOnWindowResize() {\n eltdfInitProductListMasonryShortcode();\n }", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div);\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round(getStyleSize(style.width)) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n body.removeChild(div);\n }", "function initBlogMasonryFullWidth(){\n\t\"use strict\";\n\n\tif($j('.masonry_full_width').length){\n\t\tvar width_blog = $j('.full_width_inner').width();\n\n\t\t$j('.masonry_full_width').width(width_blog);\n\t\tvar $container = $j('.masonry_full_width');\n\n\t\t$j('.filter').click(function(){\n\t\t\tvar selector = $j(this).attr('data-filter');\n\t\t\t$container.isotope({ filter: selector });\n\t\t\treturn false;\n\t\t});\n\t\tif( $container.hasClass('masonry_infinite_scroll')){\n\t\t\t$container.infinitescroll({\n\t\t\t\t\tnavSelector : '.blog_infinite_scroll_button span',\n\t\t\t\t\tnextSelector : '.blog_infinite_scroll_button span a',\n\t\t\t\t\titemSelector : 'article',\n\t\t\t\t\tloading: {\n\t\t\t\t\t\tfinishedMsg: finished_text,\n\t\t\t\t\t\tmsgText : loading_text\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t// call Isotope as a callback\n\t\t\t\tfunction( newElements ) {\n\t\t\t\t\t$container.isotope( 'appended', $j( newElements ) );\n\t\t\t\t\tfitVideo();\n\t\t\t\t\tfitAudio();\n initFlexSlider();\n\n setTimeout(function() {\n $j('.blog_holder.masonry_full_width').isotope( 'layout');\n }, 400);\n\t\t\t\t}\n\t\t\t);\n\t\t}else if($container.hasClass('masonry_load_more')){\n\n\n\t\t\tvar i = 1;\n\t\t\t$j('.blog_load_more_button a').off('click tap').on('click tap', function(e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvar link = $j(this).attr('href');\n\t\t\t\tvar $content = '.masonry_load_more';\n\t\t\t\tvar $anchor = '.blog_load_more_button a';\n\t\t\t\tvar $next_href = $j($anchor).attr('href');\n\t\t\t\t$j.get(link+'', function(data){\n\t\t\t\t\tvar $new_content = $j($content, data).wrapInner('').html();\n\t\t\t\t\t$next_href = $j($anchor, data).attr('href');\n\t\t\t\t\t$container.append( $j( $new_content) ).isotope( 'reloadItems' ).isotope({ sortBy: 'original-order' });\n\t\t\t\t\tfitVideo();\n\t\t\t\t\tfitAudio();\n initFlexSlider();\n\n setTimeout(function() {\n $j('.blog_holder.masonry_full_width').isotope( 'layout');\n }, 400);\n\n\t\t\t\t\tif($j('.blog_load_more_button span').attr('rel') > i) {\n\t\t\t\t\t\t$j('.blog_load_more_button a').attr('href', $next_href); // Change the next URL\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$j('.blog_load_more_button').remove();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\ti++;\n\t\t\t});\n\n\t\t}\n\n $container.waitForImages(function() {\n setTimeout(function() {\n $container.isotope({\n itemSelector: 'article',\n resizable: false,\n masonry: { columnWidth: '.blog_holder_grid_sizer',gutter: '.blog_holder_grid_gutter'}\n });\n\n $j('.masonry_full_width').animate({opacity: \"1\"}, 500);\n }, 400);\n });\n\t}\n}", "function qodefOnWindowLoad() {\n qodefInitProductListMasonryShortcode();\n }", "initGrid() {\n \n // Initialize our packery grid\n let grid = this.$('.grid');\n \n grid.packery({\n percentPosition: true,\n itemSelector: '.grid-item',\n gutter: 10,\n });\n \n // Grid elements are draggable\n grid.find('.grid-item').each( function( i, gridItem ) {\n var draggie = new Draggabilly( gridItem );\n // bind drag events to Packery\n grid.packery( 'bindDraggabillyEvents', draggie );\n });\n \n // Resize grid elements on click \n // NOTE that in the future we want this to be encpsulated in some sort of button, etc.\n // Otherwise it happens any time you drag the element, which is really annoying\n // (Commenting out for now)\n /*grid.on( 'click', '.grid-item', function( event ) {\n var $item = $( event.currentTarget );\n // change size of item by toggling large class\n $item.toggleClass('grid-item--large');\n if ( $item.is('.grid-item--large') ) {\n // fit large item\n grid.packery( 'fit', event.currentTarget );\n } else {\n // back to small, shiftLayout back\n grid.packery('shiftLayout');\n }\n });*/\n \n }", "layoutDom(type = 'gridOne') {\n let randomNum = new Date().getTime();\n let configHeight = $(window).height() - 75 + 'px';\n let domType = {\n gridOne() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '<div class = \"columnOne columnOne_' + randomNum + '\"></div>' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"widgetAction\">' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n },\n gridTwo() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '<div class = \"columnTwo columnT_' + randomNum + '\"></div>' +\n '<div class = \"columnTwo columnTwo_' + randomNum + '\"></div>' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"widgetAction\">' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n },\n gridThree() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '<div class = \"columnThree columnTh_' + randomNum + '\"></div>' +\n '<div class = \"columnThree columnThr_' + randomNum + '\"></div>' +\n '<div class = \"columnThree columnThree_' + randomNum + '\"></div>' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"widgetAction\">' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n },\n gridChart() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"chartAction\">' +\n '<span class = \"chartTitle\"><i class=\"iconType\">chartName</i></span>' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n }\n };\n\n return domType[type] ? domType[type]() : domType['gridOne']();\n }", "function generateLayout() {\n $('.layout-display').each(function () {\n for (var i = 0; i < $(this).attr('data-max'); i++) {\n $(this).append('<div class=\"grid item\"></div>');\n }\n\n\n displayLayoutInfo($(this).parents('.layout'));\n resizeItems($(this));\n });\n}", "function Packer(){}", "function setup() {\n\n\n\n var $targetedEls;\n\n //For each area that we've hooked this module to,\n //update it independently from the others.\n $modules.each(function(index, el) {\n\n //Loop through our object that contains all the selectors\n //we need to check for. If it finds any, compare their heights\n //and set them all to be equal to the tallest.\n for (var subject in subjects) {\n\n if (subjects.hasOwnProperty(subject) && $(subject).length) {\n\n //Gets the array of selectors we want to play with\n childEls = subjects[subject];\n\n //For each selector in the array\n //(each group of things that should have matching heights)\n //Gets tallest of the group and sets the rest to that height\n for (var i = childEls.length - 1; i >= 0; i--) {\n\n $targetedEls = $(this).find(subject + ' ' + childEls[i]);\n\n //Only do this bit if the selector is found\n if ($targetedEls.length) {\n //Set all to auto first so we can start fresh (window resize etc)\n $targetedEls.height('auto');\n }\n\n setNewHeight($targetedEls, getTallestHeight($targetedEls));\n\n }\n }\n }\n });\n }", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n\n isSetup = true; // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div); // round value for browser zoom. desandro/masonry#928\n\n isBoxSizeOuter = Math.round(getStyleSize(style.width)) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n body.removeChild(div);\n } // -------------------------- getSize -------------------------- //", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n var _this = this;\n function hideReveal() {\n _this.reveal( hiddenMatched );\n _this.hide( visibleUnmatched );\n }\n\n if ( this._isInstant ) {\n this._noTransition( hideReveal );\n } else {\n hideReveal();\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter === 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n Isotope.prototype.updateSortData = function( elems ) {\n this._getSorters();\n // update item sort data\n // default to all items if none are passed in\n elems = makeArray( elems );\n var items = this.getItems( elems );\n // if no items found, update all items\n items = items.length ? items : this.items;\n this._updateItemsSortData( items );\n };\n\n Isotope.prototype._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n Isotope.prototype._updateItemsSortData = function( items ) {\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n var filteredItems = this._noTransition( function() {\n return this._filter( items );\n });\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n /*\n // this way adds hides new filtered items with NO transition\n // so user can't see if new hidden items have been inserted\n var filteredInsertItems;\n this._noTransition( function() {\n filteredInsertItems = this._filter( items );\n // hide all new items\n this.hide( filteredInsertItems );\n });\n // */\n // this way hides new filtered items with transition\n // so user at least sees that something has been added\n var filteredInsertItems = this._filter( items );\n // hide all newitems\n this._noTransition( function() {\n this.hide( filteredInsertItems );\n });\n // */\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @returns ret\n * @private\n */\n Isotope.prototype._noTransition = function( fn ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.call( this );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n var _this = this;\n function hideReveal() {\n _this.reveal( hiddenMatched );\n _this.hide( visibleUnmatched );\n }\n\n if ( this._isInstant ) {\n this._noTransition( hideReveal );\n } else {\n hideReveal();\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter === 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n Isotope.prototype.updateSortData = function( elems ) {\n // get items\n var items;\n if ( elems ) {\n elems = makeArray( elems );\n items = this.getItems( elems );\n } else {\n // update all items if no elems provided\n items = this.items;\n }\n\n this._getSorters();\n this._updateItemsSortData( items );\n };\n\n Isotope.prototype._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n Isotope.prototype._updateItemsSortData = function( items ) {\n // do not update if no items\n var len = items && items.length;\n\n for ( var i=0; len && i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n var filteredItems = this._noTransition( function() {\n return this._filter( items );\n });\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n /*\n // this way adds hides new filtered items with NO transition\n // so user can't see if new hidden items have been inserted\n var filteredInsertItems;\n this._noTransition( function() {\n filteredInsertItems = this._filter( items );\n // hide all new items\n this.hide( filteredInsertItems );\n });\n // */\n // this way hides new filtered items with transition\n // so user at least sees that something has been added\n var filteredInsertItems = this._filter( items );\n // hide all newitems\n this._noTransition( function() {\n this.hide( filteredInsertItems );\n });\n // */\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n Isotope.prototype.shuffle = function() {\n // update random sortData\n for ( var i=0, len = this.items.length; i < len; i++ ) {\n var item = this.items[i];\n item.sortData.random = Math.random();\n }\n this.options.sortBy = 'random';\n this._sort();\n this._layout();\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @returns ret\n * @private\n */\n Isotope.prototype._noTransition = function( fn ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.call( this );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- helper methods ----- //\n\n /**\n * getter method for getting filtered item elements\n * @returns {Array} elems - collection of item elements\n */\n Isotope.prototype.getFilteredItemElements = function() {\n var elems = [];\n for ( var i=0, len = this.filteredItems.length; i < len; i++ ) {\n elems.push( this.filteredItems[i].element );\n }\n return elems;\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n var _this = this;\n function hideReveal() {\n _this.reveal( hiddenMatched );\n _this.hide( visibleUnmatched );\n }\n\n if ( this._isInstant ) {\n this._noTransition( hideReveal );\n } else {\n hideReveal();\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter === 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n Isotope.prototype.updateSortData = function( elems ) {\n // get items\n var items;\n if ( elems ) {\n elems = makeArray( elems );\n items = this.getItems( elems );\n } else {\n // update all items if no elems provided\n items = this.items;\n }\n\n this._getSorters();\n this._updateItemsSortData( items );\n };\n\n Isotope.prototype._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n Isotope.prototype._updateItemsSortData = function( items ) {\n // do not update if no items\n var len = items && items.length;\n\n for ( var i=0; len && i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n var filteredItems = this._noTransition( function() {\n return this._filter( items );\n });\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n /*\n // this way adds hides new filtered items with NO transition\n // so user can't see if new hidden items have been inserted\n var filteredInsertItems;\n this._noTransition( function() {\n filteredInsertItems = this._filter( items );\n // hide all new items\n this.hide( filteredInsertItems );\n });\n // */\n // this way hides new filtered items with transition\n // so user at least sees that something has been added\n var filteredInsertItems = this._filter( items );\n // hide all newitems\n this._noTransition( function() {\n this.hide( filteredInsertItems );\n });\n // */\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n Isotope.prototype.shuffle = function() {\n // update random sortData\n for ( var i=0, len = this.items.length; i < len; i++ ) {\n var item = this.items[i];\n item.sortData.random = Math.random();\n }\n this.options.sortBy = 'random';\n this._sort();\n this._layout();\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @returns ret\n * @private\n */\n Isotope.prototype._noTransition = function( fn ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.call( this );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- helper methods ----- //\n\n /**\n * getter method for getting filtered item elements\n * @returns {Array} elems - collection of item elements\n */\n Isotope.prototype.getFilteredItemElements = function() {\n var elems = [];\n for ( var i=0, len = this.filteredItems.length; i < len; i++ ) {\n elems.push( this.filteredItems[i].element );\n }\n return elems;\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n var _this = this;\n function hideReveal() {\n _this.reveal( hiddenMatched );\n _this.hide( visibleUnmatched );\n }\n\n if ( this._isInstant ) {\n this._noTransition( hideReveal );\n } else {\n hideReveal();\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter === 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n Isotope.prototype.updateSortData = function( elems ) {\n // get items\n var items;\n if ( elems ) {\n elems = makeArray( elems );\n items = this.getItems( elems );\n } else {\n // update all items if no elems provided\n items = this.items;\n }\n\n this._getSorters();\n this._updateItemsSortData( items );\n };\n\n Isotope.prototype._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n Isotope.prototype._updateItemsSortData = function( items ) {\n // do not update if no items\n var len = items && items.length;\n\n for ( var i=0; len && i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n var filteredItems = this._noTransition( function() {\n return this._filter( items );\n });\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n /*\n // this way adds hides new filtered items with NO transition\n // so user can't see if new hidden items have been inserted\n var filteredInsertItems;\n this._noTransition( function() {\n filteredInsertItems = this._filter( items );\n // hide all new items\n this.hide( filteredInsertItems );\n });\n // */\n // this way hides new filtered items with transition\n // so user at least sees that something has been added\n var filteredInsertItems = this._filter( items );\n // hide all newitems\n this._noTransition( function() {\n this.hide( filteredInsertItems );\n });\n // */\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n Isotope.prototype.shuffle = function() {\n // update random sortData\n for ( var i=0, len = this.items.length; i < len; i++ ) {\n var item = this.items[i];\n item.sortData.random = Math.random();\n }\n this.options.sortBy = 'random';\n this._sort();\n this._layout();\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @returns ret\n * @private\n */\n Isotope.prototype._noTransition = function( fn ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.call( this );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- helper methods ----- //\n\n /**\n * getter method for getting filtered item elements\n * @returns {Array} elems - collection of item elements\n */\n Isotope.prototype.getFilteredItemElements = function() {\n var elems = [];\n for ( var i=0, len = this.filteredItems.length; i < len; i++ ) {\n elems.push( this.filteredItems[i].element );\n }\n return elems;\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n var _this = this;\n function hideReveal() {\n _this.reveal( hiddenMatched );\n _this.hide( visibleUnmatched );\n }\n\n if ( this._isInstant ) {\n this._noTransition( hideReveal );\n } else {\n hideReveal();\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter === 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n Isotope.prototype.updateSortData = function( elems ) {\n // get items\n var items;\n if ( elems ) {\n elems = makeArray( elems );\n items = this.getItems( elems );\n } else {\n // update all items if no elems provided\n items = this.items;\n }\n\n this._getSorters();\n this._updateItemsSortData( items );\n };\n\n Isotope.prototype._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n Isotope.prototype._updateItemsSortData = function( items ) {\n // do not update if no items\n var len = items && items.length;\n\n for ( var i=0; len && i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n var filteredItems = this._noTransition( function() {\n return this._filter( items );\n });\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n /*\n // this way adds hides new filtered items with NO transition\n // so user can't see if new hidden items have been inserted\n var filteredInsertItems;\n this._noTransition( function() {\n filteredInsertItems = this._filter( items );\n // hide all new items\n this.hide( filteredInsertItems );\n });\n // */\n // this way hides new filtered items with transition\n // so user at least sees that something has been added\n var filteredInsertItems = this._filter( items );\n // hide all newitems\n this._noTransition( function() {\n this.hide( filteredInsertItems );\n });\n // */\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n Isotope.prototype.shuffle = function() {\n // update random sortData\n for ( var i=0, len = this.items.length; i < len; i++ ) {\n var item = this.items[i];\n item.sortData.random = Math.random();\n }\n this.options.sortBy = 'random';\n this._sort();\n this._layout();\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @returns ret\n * @private\n */\n Isotope.prototype._noTransition = function( fn ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.call( this );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- helper methods ----- //\n\n /**\n * getter method for getting filtered item elements\n * @returns {Array} elems - collection of item elements\n */\n Isotope.prototype.getFilteredItemElements = function() {\n var elems = [];\n for ( var i=0, len = this.filteredItems.length; i < len; i++ ) {\n elems.push( this.filteredItems[i].element );\n }\n return elems;\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function constructAMD() {\n\n\t\t//create a library instance\n\t\treturn init();\n\n\t\t//spawns a library instance\n\t\tfunction init() {\n\t\t\tvar library;\n\t\t\tlibrary = factory('amd');\n\t\t\tlibrary.fork = init;\n\t\t\treturn library;\n\t\t}\n\t}", "function enableMasonry() {\r\n if($('.sortable-masonry').length){\r\n\r\n var winDow = $(window);\r\n // Needed variables\r\n var $container=$('.sortable-masonry .items-container');\r\n var $filter=$('.sortable-masonry .filter-btns');\r\n\r\n $container.isotope({\r\n filter:'*',\r\n masonry: {\r\n columnWidth : 1\r\n },\r\n animationOptions:{\r\n duration:1000,\r\n easing:'linear'\r\n }\r\n });\r\n\r\n\r\n // Isotope Filter\r\n $filter.find('li').on('click', function(){\r\n var selector = $(this).attr('data-filter');\r\n\r\n try {\r\n $container.isotope({\r\n filter\t: selector,\r\n animationOptions: {\r\n duration: 1000,\r\n easing\t: 'linear',\r\n queue\t: false\r\n }\r\n });\r\n } catch(err) {\r\n\r\n }\r\n return false;\r\n });\r\n\r\n\r\n winDow.bind('resize', function(){\r\n var selector = $filter.find('li.active').attr('data-filter');\r\n\r\n $container.isotope({\r\n filter\t: selector,\r\n animationOptions: {\r\n duration: 1000,\r\n easing\t: 'linear',\r\n queue\t: false\r\n }\r\n });\r\n });\r\n\r\n\r\n var filterItemA\t= $('.sortable-masonry .filter-btns li');\r\n\r\n filterItemA.on('click', function(){\r\n var $this = $(this);\r\n if ( !$this.hasClass('active')) {\r\n filterItemA.removeClass('active');\r\n $this.addClass('active');\r\n }\r\n });\r\n }\r\n }", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Isotope.prototype.settings.item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this.updateSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n return this._isInstant = isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n // HACK\n // disable transition if instant\n var _transitionDuration = this.options.transitionDuration;\n if ( this._isInstant ) {\n this.options.transitionDuration = 0;\n }\n this.reveal( hiddenMatched );\n this.hide( visibleUnmatched );\n // set back\n if ( this._isInstant ) {\n this.options.transitionDuration = _transitionDuration;\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n var test;\n if ( jQuery && this.options.isJQueryFiltering ) {\n test = function( item ) {\n return jQuery( item.element ).is( filter );\n };\n } else if ( typeof filter === 'function' ) {\n test = function( item ) {\n return filter( item.element );\n };\n } else {\n test = function( item ) {\n return matchesSelector( item.element, filter );\n };\n }\n return test;\n };\n\n // -------------------------- sorting -------------------------- //\n\n Isotope.prototype.updateSortData = function( items ) {\n // update sorters\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n // update item sort data\n // default to all items if none are passed in\n items = items || this.items;\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = getParser( args[1] );\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n // return a parser function if arg matches\n function getParser( arg ) {\n var parser;\n switch ( arg ) {\n case 'parseInt' :\n parser = function( val ) {\n return parseInt( val, 10 );\n };\n break;\n case 'parseFloat' :\n parser = function( val ) {\n return parseFloat( val );\n };\n break;\n default :\n // just return val if parser isn't one of these\n // TODO - console log that that parser doesn't exist\n parser = function( val ) {\n return val;\n };\n }\n return parser;\n }\n\n return mungeSorter;\n })();\n\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n var mode = this._mode();\n // HACK copy over some options\n mode.options.isOriginLeft = this.options.isOriginLeft;\n mode.options.isOriginTop = this.options.isOriginTop;\n mode._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.resize = function() {\n this._mode().resize();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n // disable transition for filtering\n var transitionDuration = this.options.transitionDuration;\n this.options.transitionDuration = 0;\n var filteredItems = this._filter( items );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n this.arrange();\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "createGrids () {\n }", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div);\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round(getStyleSize(style.width)) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild(div);\n }", "function createImageLayout(data) {\n let container = document.querySelector(\".collection\");\n data.forEach(photo => {\n let imageContainer = document.createElement('div');\n imageContainer.className = \"collection-item\";\n let img = document.createElement('img');\n img.src = photo.urls.thumb;\n imageContainer.append(img);\n container.append(imageContainer);\n });\n\n //use Masonry for adaptive collection images\n let elem = document.querySelector('.collection');\n let msnry = new Masonry(elem, {\n // options\n itemSelector: '.collection-item',\n columnWidth: 200,\n fitWidth: true,\n gutter: 15\n });\n}", "function isotopeFn ( page ) {\n\n\t// define variables\n\t\tvar bodyWidth \t= pageWrap.width(),\n\t\t\tcontainer \t= $('#'+ page +'-container'),\n\t\t\titem \t\t= $('.'+ page +'-post'),\n\t\t\titemVisible = item.filter(\":visible\"),\n\t\t\tlayout \t\t= ( container.attr('data-layout') !== '' ) ? container.attr('data-layout') : 'masonry',\n\t\t\tgutterHorz \t= parseInt( container.attr('data-gutter-horz'), 10 ),\n\t\t\tgutterVert \t= parseInt( container.attr('data-gutter-vert'), 10 ),\n\t\t\tcolumns \t= 0,\n\t\t\tx \t\t\t= 0,\n\t\t\tcolumnsRate = container.attr('data-columns-rate'),\n\t\t\tcontWidth \t= Math.floor( container.width() + gutterHorz - 0.3 ),\n\t\t\tpostMedia \t= itemVisible.find('.post-media'),\n\t\t\taspectRatio = parseInt( container.attr('data-aspect-height'), 10 ) / parseInt( container.attr('data-aspect-width'), 10 ),\n\t\t\tmaxHieght \t= -1,\n\t\t\tmaxTop \t\t= -1;\n\n\t\titem.addClass('rf-isotope-item');\n\n\t// reset\n\t\titem.css('min-height', '');\n\t\tpostMedia.find('.link-and-quote').css('min-height', '');\n\t\titem.removeClass('rf-last-item rf-last-row');\n\n\t// Brakepoints\n\n\t\t// Permament 1 column\n\t\tif ( columnsRate === \"one\" ) {\n\t\t\tcolumns = 1;\n\n\t\t// Permament 2 column\n\t\t} else if ( columnsRate === \"two\" ) {\n\t\t\tcolumns = 2;\n\n\t\t\tif( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\t\t\t}\n\n\t\t// Permament 3 column\n\t\t} else if ( columnsRate === \"three\" ) {\n\t\t\tcolumns = 3;\n\n\t\t\tif( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\t\t\t} else if( bodyWidth <= 900 ) {\n\t\t\t\tcolumns = 2;\n\t\t\t}\n\n\t\t// Permament 4 column\n\t\t} else if ( columnsRate === \"four\" ) {\n\t\t\tcolumns = 4;\n\n\t\t\tif( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\t\t\t} else if( bodyWidth <= 900 ) {\n\t\t\t\tcolumns = 2;\n\t\t\t}\n\n\t\t// or columns width brakepoints\n\t\t} else {\n\n\t\t\tcolumnsRate = parseInt( columnsRate, 10 );\n\n\t\t\t// Viewport 600\n\t\t\tif ( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\n\t\t\t// Viewport 900\n\t\t\t} else if ( $('#sidebar, #sidebar-top').css('display') === 'none' ) {\n\t\t\t\tx = ( columnsRate <= 0 ? 1 : columnsRate );\n\t\t\t\tcolumns = 1 + x;\n\n\t\t\t// Viewport 1250\n\t\t\t} else if ( bodyWidth <= 1250 ) {\n\t\t\t\tx = ( columnsRate <= 0 ? 0 : columnsRate );\n\t\t\t\tcolumns = 2 + x;\n\n\t\t\t// Viewport 1600\n\t\t\t} else if ( bodyWidth <= 1600 ) {\n\t\t\t\tcolumns = 3 + columnsRate;\n\n\t\t\t// Viewport 1950\n\t\t\t} else if ( bodyWidth <= 1950 ) {\n\t\t\t\tcolumns = 4 + columnsRate;\n\n\t\t\t// Viewport 2300\n\t\t\t} else if ( bodyWidth <= 2300 ) {\n\t\t\t\tcolumns = 5 + columnsRate;\n\n\t\t\t// Viewport 2650\n\t\t\t} else if ( bodyWidth <= 2650 ) {\n\t\t\t\tcolumns = 6 + columnsRate;\n\n\t\t\t// Viewport 3000\n\t\t\t} else if ( bodyWidth <= 3000 ) {\n\t\t\t\tcolumns = 7 + columnsRate;\n\n\t\t\t// Viewport 3350\n\t\t\t} else if ( bodyWidth <= 3350 ) {\n\t\t\t\tcolumns = 8 + columnsRate;\n\n\t\t\t// Viewport 3350+\n\t\t\t} else {\n\t\t\t\tcolumns = 9 + columnsRate;\n\t\t\t}\n\t\t}\n\n\t// set item width\n\t\tif ( layout !== 'masonry-metro' ) {\n\t\t\titem.outerWidth( Math.floor( contWidth / columns - gutterHorz ) );\n\t\t} else {\n\t\t\t$('.'+ page +'-grid-sizer, .'+ page +'-post.post-width1x').outerWidth( Math.floor( contWidth / 3 - gutterHorz ) );\n\t\t\t$('.'+ page +'-post.post-width2x').outerWidth( Math.floor( contWidth / 3 ) * 2 - gutterHorz);\n\t\t}\n\n\t// set gutters\n\t\tif ( layout === 'fitRows' ) {\n\t\t\titem.css('margin-right', gutterHorz + 'px');\n\t\t}\n\n\t\titem.css('margin-bottom', gutterVert + 'px');\n\n\t// Link & Quote heights\n\t\tif( layout === \"fitRows\" ) {\n\t\t\tpostMedia.find('.link-and-quote, video').css('min-height', postMedia.width() * aspectRatio + 'px');\n\t\t}\n\n\t\t// add last class\n\t\titemVisible.last().addClass('rf-last-item');\n\n\t// add last row & make all post equal height\n\t\titemVisible.each(function ( index ) {\n\n\t\t\t// define\n\t\t\tvar thisHieght = $(this).outerHeight(),\n\t\t\t\tthisTop = parseInt( $(this).css('top') , 10 );\n\n\t\t\tif ( ( index + 1 ) % columns === 0 ) {\n\t\t\t\t$(this).addClass('rf-last-item');\n\t\t\t}\n\n\t\t\t// determine max height\n\t\t\tif ( thisHieght > maxHieght ) {\n\t\t\t\tmaxHieght = thisHieght;\n\t\t\t}\n\n\t\t\t// determine last row\n\t\t\tif ( thisTop > maxTop ) {\n\t\t\t\tmaxTop = thisTop;\n\t\t\t}\n\t\t\t\n\t\t});\n\n\t\tif ( layout === 'fitRows' ) {\n\t\t\titemVisible.each(function() {\n\n\t\t\t\tif ( parseInt( $(this).css('top') ) === maxTop ) {\n\t\t\t\t\t$(this).addClass('rf-last-row');\n\t\t\t\t}\n\n\t\t\t\t$(this).css('min-height', maxHieght);\n\n\t\t\t});\n\t\t}\n\n\t// define masonry 'columnWidth' option\n\t\tvar columnWidth = contWidth / columns;\n\n\t// metro layout - based on 3 columns masonry \n\t\tif ( layout === 'masonry-metro' ) {\n\t\t\tlayout = 'masonry';\n\n\t\t\tif ( page === 'blog' ) {\n\t\t\t\tcolumnWidth = '.blog-grid-sizer';\n\t\t\t} else if ( page === 'portfolio' ) {\n\t\t\t\tcolumnWidth = '.portfolio-grid-sizer';\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t// run isotope on Portfolio & Blog\n\t\tcontainer.isotope({\n\t\t\titemSelector: 'article',\n\t\t transitionDuration: '0.6s',\n\t\t hiddenStyle: {\n\t\t transform: 'scale(0.001)'\n\t\t },\n\t\t visibleStyle: {\n\t\t transform: 'scale(1)'\n\t\t },\n\t\t\tlayoutMode : layout,\n\t\t\tmasonry: {\n\t\t\t\tcomlumnWidth: columnWidth,\n\t\t\t\tgutter: gutterHorz\n\t\t\t}\n\t\t});\n\n\t\t// sidebar equal\n\t\tsidebarEqual();\n\n\t}", "setLayout() {\n const {\n container,\n state,\n } = this\n const {\n heights,\n } = state\n var element = document.querySelector('.masonry-panel'),\n elements = document.querySelectorAll('.masonry-panel'),\n style = window.getComputedStyle(element),\n width = style.getPropertyValue('width');\n width = width.replace('px', '');\n width = width/window.innerWidth;\n var cols = Math.ceil(1/width) - 1;\n var number = (Math.ceil(elements.length/cols) + 1);\n this.state.maxHeight = (Math.max(...heights));\n var targetHeight = this.state.maxHeight + (17 * number);\n container.style.height = `${targetHeight}px`\n }", "function initIsotope(container, masonryObj, columnSize) {\r\n\r\n // modified Isotope methods for gutters in masonry\r\n $.Isotope.prototype._getMasonryGutterColumns = function () {\r\n var gutter = this.options.masonry && this.options.masonry.gutterWidth || 0;\r\n containerWidth = this.element.width();\r\n\r\n this.masonry.columnWidth = this.options.masonry && this.options.masonry.columnWidth ||\r\n // or use the size of the first item\r\n this.$filteredAtoms.outerWidth(true) ||\r\n // if there's no items, use size of container\r\n containerWidth;\r\n\r\n this.masonry.columnWidth += gutter;\r\n this.masonry.cols = Math.floor((containerWidth + gutter) / this.masonry.columnWidth);\r\n this.masonry.cols = Math.max(this.masonry.cols, 1);\r\n };\r\n\r\n $.Isotope.prototype._masonryReset = function () {\r\n // layout-specific props\r\n this.masonry = {};\r\n // FIXME shouldn't have to call this again\r\n this._getMasonryGutterColumns();\r\n var i = this.masonry.cols;\r\n this.masonry.colYs = [];\r\n while (i--) {\r\n this.masonry.colYs.push(0);\r\n }\r\n };\r\n\r\n $.Isotope.prototype._masonryResizeChanged = function () {\r\n var prevSegments = this.masonry.cols;\r\n // update cols/rows\r\n this._getMasonryGutterColumns();\r\n // return if updated cols/rows is not equal to previous\r\n return (this.masonry.cols !== prevSegments);\r\n };\r\n\r\n jQuery(window).on(\"load\", function () {\r\n\r\n if (typeof columnSize === \"undefined\") {\r\n columnSize = 155;\r\n }\r\n\r\n container.isotope({\r\n itemSelector: masonryObj,\r\n masonry: {\r\n columnWidth: parseInt(columnSize),\r\n gutterWidth: 10\r\n }\r\n });\r\n });\r\n}", "function enableMasonry() {\r\n if ($('.sortable-masonry').length) {\r\n\r\n var winDow = $(window);\r\n // Needed variables\r\n var $container = $('.sortable-masonry .items-container');\r\n var $filter = $('.filter-btns');\r\n\r\n $container.isotope({\r\n filter: '*',\r\n masonry: {\r\n columnWidth: 0\r\n },\r\n animationOptions: {\r\n duration: 500,\r\n easing: 'linear'\r\n }\r\n });\r\n\r\n\r\n // Isotope Filter \r\n $filter.find('li').click(function () {\r\n var selector = $(this).attr('data-filter');\r\n\r\n try {\r\n $container.isotope({\r\n filter: selector,\r\n animationOptions: {\r\n duration: 500,\r\n easing: 'linear',\r\n queue: false\r\n }\r\n });\r\n } catch (err) {\r\n\r\n }\r\n return false;\r\n });\r\n\r\n\r\n winDow.bind('resize', function () {\r\n var selector = $filter.find('li.active').attr('data-filter');\r\n\r\n $container.isotope({\r\n filter: selector,\r\n animationOptions: {\r\n duration: 500,\r\n easing: 'linear',\r\n queue: false\r\n }\r\n });\r\n });\r\n\r\n\r\n var filterItemA = $('.filter-btns li');\r\n\r\n filterItemA.on('click', function () {\r\n var $this = $(this);\r\n if (!$this.hasClass('active')) {\r\n filterItemA.removeClass('active');\r\n $this.addClass('active');\r\n }\r\n });\r\n }\r\n }", "function Module(){}", "function Module(){}", "function defaultGrid(){\n gridSize(24)\n createDivs(24)\n}", "function BaseLayouter() {}", "function BaseLayouter() {}", "function BaseLayouter() {}", "function defineDependencies() {\n define('jquery', [], function () { return root.jQuery; });\n define('ko', [], function () { return root.ko; });\n define('sammy', [], function () { return root.Sammy; });\n }", "function definition1() {\n\t\t\t\t\t\t\tlog('provide', '/app/js/example1', 'resolved', 'module');\n\n\t\t\t\t\t\t\treturn function appJsExample1() {\n\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}", "function grid() {\n\tif ($('.js-grid').length) {\n\t\t$('.js-grid').isotope({\n\t\t\titemSelector: '.js-grid-item',\n\t\t\tpercentPositijs-grid-itemon: true\n\t\t});\n\t}\n}", "function createInitialLayout() {\n return {\n name: 'grid',\n boundingBox: presetBoundingBox,\n }\n}", "function Md(){}", "function Md(){}", "function Md(){}", "function prepareMasonry() {\n\t\t$(loadingIcon).fadeIn(\"fast\"); // Show the loading icon\n\t\telmBusy = true;\n\n\t\t// Get the current category and attempt to find the link in primary-menu that it should correspondingly open\n\t\tvar category = getHash();\n\t\tvar searchUrl = antiHashizeUrl(category, false, true);\n\t\tvar possibleMenuItem = '#primary-menu li a[href=\"' + searchUrl + '\"]';\n\t\tif($(possibleMenuItem).length !== 0) {\n\t\t\tprimaryMenuEffect(possibleMenuItem);\n\t\t}\n\n\t\t// previous elements\n\t\tvar $previousElm = $(gridElementSpecific);\n\n\t\t// If its the frontpage, impersonate the priority-frontpage category\n\t\tif (category == \"all\") {\n\t\t\tcategory = \"priority-frontpage\";\n\t\t}\n\n\t\t// remove elements which are not chosen from previous\n\t\tvar $matchedElm = $(gridElement + \".\" + category);\n\t\tvar $removeElm = $previousElm.not($matchedElm);\n\n\t\t// previous elements which are to be kept\n\t\tvar $keptElm = $previousElm.filter($matchedElm);\n\n\t\t// get new elements - select all elm that have the corresponding\n\t\t// category and deselect all that are already there (from previous)\n\t\tvar $newElm = $allElm.filter(gridElement + \".\" + category).not($keptElm);\n\t\tvar $elmToBeRemoved = $previousElm.filter($removeElm);\n\n\t\t// Check if there are any elements to remove\n\t\tif($elmToBeRemoved.size() > 0){\n\t\t\tvar counterRemoved = 0;\n\t\t\t$elmToBeRemoved.fadeOut(\"slow\", function() {\n\t\t\t\t$(this).remove();\n\t\t\t\tcounterRemoved++;\n\t\t\t\tif ($elmToBeRemoved.length == counterRemoved) {\n\t\t\t\t\tbootstrapMasonry($newElm);\n\t\t\t\t}\n\t\t\t});\n\n\t\t// No elements to remove (e.g. going from subcat to topcat)\n\t\t} else {\n\t\t\tbootstrapMasonry($newElm);\n\t\t}\n\t}", "defineBEMBlocks() {\n return {\n container: (this.props.mod || 'cr-search-summary')\n }\n }", "function BaseLayouter() { }", "function enableMasonry() {\n\t\tif($('.masonry-gallery .items-container').length){\n\n\t\t\tvar winDow = $(window);\n\t\t\t// Needed variables\n\t\t\tvar $container=$('.masonry-gallery .items-container');\n\t\t\tvar $filter=$('.filter-btns');\n\n\t\t\t$container.isotope({\n\t\t\t\tfilter:'*',\n\t\t\t\t masonry: {\n\t\t\t\t\tcolumnWidth : '.masonry-item.small-item'\n\t\t\t\t },\n\t\t\t\tanimationOptions:{\n\t\t\t\t\tduration:500,\n\t\t\t\t\teasing:'linear'\n\t\t\t\t}\n\t\t\t});\n\n\n\t\t\t// Isotope Filter\n\t\t\t$filter.find('li').on('click', function(){\n\t\t\t\tvar selector = $(this).attr('data-filter');\n\n\t\t\t\ttry {\n\t\t\t\t\t$container.isotope({\n\t\t\t\t\t\tfilter\t: selector,\n\t\t\t\t\t\tanimationOptions: {\n\t\t\t\t\t\t\tduration: 500,\n\t\t\t\t\t\t\teasing\t: 'linear',\n\t\t\t\t\t\t\tqueue\t: false\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} catch(err) {\n\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\n\n\t\t\twinDow.on('resize', function(){\n\t\t\t\tvar selector = $filter.find('li.active').attr('data-filter');\n\n\t\t\t\t$container.isotope({\n\t\t\t\t\tfilter\t: selector,\n\t\t\t\t\tanimationOptions: {\n\t\t\t\t\t\tduration: 500,\n\t\t\t\t\t\teasing\t: 'linear',\n\t\t\t\t\t\tqueue\t: false\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\n\t\t\tvar filterItemA\t= $('.filter-btns li');\n\n\t\t\tfilterItemA.on('click', function(){\n\t\t\t\tvar $this = $(this);\n\t\t\t\tif ( !$this.hasClass('active')) {\n\t\t\t\t\tfilterItemA.removeClass('active');\n\t\t\t\t\t$this.addClass('active');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "function Layout()\n{\n \n}", "function define (name, dependencies, definition) {\n var requiredModules = [], i, depName;\n for (i = -1; depName = dependencies[++i]; ) {\n requiredModules.push(modules[depName]);\n }\n \n modules[name] = definition.apply(window, requiredModules);\n }", "configure() {\n //if (typeof $.fn.SageMedia == 'undefined') {\n // this.js = '/js/SageMediaManagement.js';\n //}\n //this.css = '//';\n }" ]
[ "0.69669485", "0.6723414", "0.6723414", "0.6723414", "0.6723414", "0.6723414", "0.6715945", "0.66956985", "0.64908195", "0.6481541", "0.6476408", "0.6460429", "0.63886654", "0.63648146", "0.6330003", "0.62155026", "0.6128444", "0.607041", "0.60456526", "0.5989751", "0.5908396", "0.58814", "0.5878089", "0.58512884", "0.58086437", "0.5805447", "0.5771358", "0.5740738", "0.56993216", "0.5616022", "0.5574696", "0.5499827", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.5427094", "0.54086065", "0.5392522", "0.5320876", "0.5302418", "0.5295159", "0.5290271", "0.52741444", "0.5247117", "0.52248555", "0.51762396", "0.5152329", "0.511746", "0.5115692", "0.5115474", "0.51066375", "0.51066375", "0.51066375", "0.51066375", "0.51066375", "0.5106387", "0.5102729", "0.50817436", "0.50771165", "0.50676817", "0.5051719", "0.5032986", "0.5020995", "0.49943286", "0.4993506", "0.49710694", "0.49710694", "0.49613208", "0.4942317", "0.4942317", "0.4942317", "0.49332863", "0.49291372", "0.49261904", "0.4918215", "0.48856172", "0.48856172", "0.48856172", "0.4878063", "0.4863616", "0.48529387", "0.481227", "0.48081386", "0.48068136", "0.4790998" ]
0.6330003
21
helpers // extend objects
function extend( a, b ) { for ( var prop in b ) { a[ prop ] = b[ prop ]; } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extend() {}", "extend() {}", "function extend(a,b){for(var prop in b){a[prop]=b[prop];}return a;}", "function ExtraMethods() {}", "function _extend(){\n\t \n\t\tvar out = {};\n\t\t\n\t\t//Itterate over all objects and copy each property\n\t\t// shallow copy only \n\t\tvar len = arguments.length;\n\t\tfor(var i=0; i < len;i++)\n\t\t for (var prop in arguments[i]) { out[prop] = arguments[i][prop]; }\n\t\t \n\t\treturn(out);\n\t}", "add(obj){\n this.dict = this.extend(this.dict, obj);\n }", "static iextend(obj) {\n // eslint-disable-next-line prefer-rest-params\n each(slice.call(arguments, 1), function (source) {\n for (let prop in source) {\n if ({}.hasOwnProperty.call(source, prop)) {\n obj[prop] = source[prop];\n }\n }\n });\n return obj;\n }", "function BasicObject() {}", "function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}", "function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}", "function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}", "function obj(objec){\nreturn objec;\n}", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function mixin(obj) {\n each(functions(obj), function (name) {\n console.log('name', name);\n var func = (_[name] = obj[name]);\n _.prototype[name] = function () {\n //把方法挂到原型链上\n var args = [this._wrapped]; //['京城一灯']\n push.apply(args, arguments); //['京城一灯',回调函数]\n console.log(\"合并之后的args\", arguments);\n return func.apply(_, args)\n };\n });\n }", "function BasicObject(){}", "function BasicObject(){}", "function NXObject() {}", "function __Object__() {\n }", "function UtilsObject(app) {\n this.app = app;\n this.params = {};\n \n // create a new session\n this.typeOf = function( value ) {\n var s = typeof value;\n if (s === 'object') {\n if (value) {\n if (value instanceof Date) {\n s = 'date';\n } else if (value instanceof Array) {\n s = 'array';\n }\n\n } else {\n s = 'null';\n }\n }\n return s;\n };\n \n this.indexOf= function(array, idx) {\n var i, len = array.length;\n \n for( i=0; i<len; ++i ) {\n if( array[i] == idx )\n return i;\n }\n return false;\n };\n \n this.locationOf= function(array, idx, startptr) {\n var i, len = array.length;\n \n for( i=startptr; i<len; ++i ) {\n if( array[i] == idx )\n return i;\n }\n return false;\n };\n \n this.rangeOf= function(start, count) {\n var fin = start+count;\n var inc = fin > 0 ? 1 : -1;\n var srch=[];\n while( start != fin ) {\n srch.push(start);\n start += inc;\n }\n return srch;\n };\n\n this.cloneValues= function(obj, values) {\n for( var i in values ) {\n obj[i] = this.cloneObject( values[i] );\n }\n };\n \n this.isAlpha= function(value) {\n \tvar upperBoundUpper = \"A\".charCodeAt(0);\n \tvar lowerBoundUpper = \"Z\".charCodeAt(0);\n \tvar upperBoundLower = \"a\".charCodeAt(0);\n \tvar lowerBoundLower = \"z\".charCodeAt(0);\n\n \tfor (var i = 0; i < value.length; i++) {\n \t\tvar char = value.charCodeAt(i);\n \t\tif( (char >= upperBoundUpper && char <= lowerBoundUpper) ||\n \t\t\t(char >= upperBoundLower && char <= lowerBoundLower) )\n \t\t\tcontinue;\n \t\treturn false;\n\t\t}\n \treturn true;\n };\n this.isDigit= function(value) {\n \tvar upperBound = \"9\".charCodeAt(0);\n \tvar lowerBound = \"0\".charCodeAt(0);\n\n \tfor (var i = 0; i < value.length; i++) {\n \t\tvar char = value.charCodeAt(i);\n \t\tif( char <= upperBound && char >= lowerBound )\n \t\t\tcontinue;\n\t\t\treturn false;\n\t\t}\n \treturn true;\n };\n \n this.cloneObject= function(obj) {\n var clone;\n var typ = this.typeOf(obj);\n switch(typ){\n case 'date':\n clone = new Date();\n clone.setTime(obj.getTime());\n break;\n case 'object':\n clone={};\n for( var i in obj )\n {\n clone[i] = this.cloneObject(obj[i]);\n }\n break;\n case 'array':\n clone = obj.slice(0);\n break;\n case 'function':\n clone = null;\n break;\n default:\n intermed = JSON.stringify(obj);\n clone = JSON.parse(intermed);\n break;\n }\n return clone;\n };\n this.FibreRing = function( cb, obj ) {\n if( typeof obj != 'undefined' )\n cb = cb.bind(obj);\n return function() { wait.launchFiber( cb ) };\n };\n \n /* randomInt: produce a number between a and b. */\n this.randomInt = function(a,b)\n {\n return Math.floor( Math.random()*(b-a) + a );\n };\n this.randomNumber = this.randomInt;\n \n /* randomStr: produce a len length string of letters between a and Z and 0 and 9. */\n this.randomStr = function(len)\n {\n var w = '';\n while( len > 0 ) { len--;\n c = this.randomInt(0,61);\n if( c < 10 ) {\n w += c;\n } else if( c < 37 ) {\n w += String.fromCharCode( c + 87 );\n } else {\n w += String.fromCharCode( c + 30 );\n }\n }\n return w;\n };\n this.randomAlpha = this.randomStr;\n this.randomString = this.randomStr;\n \n\n this.flowNumber = function(n)\n {\n if( n > 1024001024 ) {\n return parseInt(n/1024001024) + \"G\"; //..\n } else if( n > 1024000 ) {\n return parseInt(n/1024000) + \"M\";\n } else if( n > 1024 ) {\n return parseInt(n/1024) + \"K\"; \n }\n return n + \"B\";\n };\n\n var server = null;\n \n this.connectMailer = function( ) {\n this.server = email.server.connect( {\n user: this.app.gmail_user,\n password: this.app.gmail_password,\n host: this.app.gmail_host,\n tls: {ciphers: \"SSLv3\"}\n } );\n };\n this.sendMessage = function( to, ccs, subj, msg, cb ) {\n if( this.server == null ) {\n connectMailer();\n }\n this.server.send( {\n text: msg,\n from: this.app.gmail_fullname + '<' + this.app.gmail_user + '>',\n to: to,\n cc: ccs,\n subject: subj }, function( err, message ) {\n console.log(err||message);\n cb(err,message);\n });\n };\n \n /*\n this.find = function() {\n this.cb.apply( null, arguments );\n };\n \n this.fin = function( runner, thisArg, args ) {\n \n var oldcb = args[ args.length-1 ];\n var carryobj = { 'cb': oldcb };\n args[ args.length-1 ] = this.find.bind( carryobj );\n \n runner.apply( thisArg, args ); \n };\n */\n \n /*\n this.ShoeSock = function( runner, thisArg, args ) {\n this.sock = new Sock( \"ws://localhost:8080\", \"echo-protocol\" );\n ock.send({'code':'c1'});\n \n var oldcb = args[ args.length-1 ];\n args[ args.length-1 ] = this.ShoeHorn;\n \n runner.apply( thisArg, args );\n };\n \n this.FibreSock = function( cb ) {\n \n }\n */\n}", "function extend( a, b ) {\r\n for ( var prop in b ) {\r\n a[ prop ] = b[ prop ];\r\n }\r\n return a;\r\n }", "function xx(a,b){return\"method\"!==b.kind||!b.ej||\"value\"in b.ej?(ia(),{kind:\"field\",key:Symbol(),oW:\"own\",ej:{},Dj:function(){\"function\"===typeof b.Dj&&(this[b.key]=b.Dj.call(this))},$l:function(c){c.Ca(b.key,a)}}):Object.assign(Object.assign({},b),{$l:function(c){c.Ca(b.key,a)}})}", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(baseObj, extObj) {\n for (var k in extObj) {\n if (!extObj.hasOwnProperty(k))\n continue;\n assert(!baseObj.hasOwnProperty(k));\n baseObj[k] = extObj[k];\n }\n return baseObj;\n }", "function baseObj(obj){\r\n for(var p in obj){\r\n this[p]=obj[p];\r\n }\r\n }", "function Object() {}", "function Object() {}", "function Object(){}", "function Object(){}", "function Utils(){}", "function __extend__(a,b) {\n\tfor ( var i in b ) {\n\t\tvar g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);\n\t\tif ( g || s ) {\n\t\t\tif ( g ) a.__defineGetter__(i, g);\n\t\t\tif ( s ) a.__defineSetter__(i, s);\n\t\t} else\n\t\t\ta[i] = b[i];\n\t} return a;\n}", "function __extend__(a,b) {\n\tfor ( var i in b ) {\n\t\tvar g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);\n\t\tif ( g || s ) {\n\t\t\tif ( g ) a.__defineGetter__(i, g);\n\t\t\tif ( s ) a.__defineSetter__(i, s);\n\t\t} else\n\t\t\ta[i] = b[i];\n\t} return a;\n}", "function extend( a, b ) {\n\t for ( var prop in b ) {\n\t a[ prop ] = b[ prop ];\n\t }\n\t return a;\n\t}", "function extend(to,_from){for(var key in _from){to[key]=_from[key];}return to;}", "function extend(to,_from){for(var key in _from){to[key]=_from[key];}return to;}", "function extend(to,_from){for(var key in _from){to[key]=_from[key];}return to;}", "function extend(obj, extension) {\n if (typeof extension !== 'object') { extension = extension(); }\n Object.keys(extension).forEach(function(key) {\n obj[key] = extension[key];\n });\n return obj;\n }", "function extend(a, b) {\n for (var i in b) {\n if (b.hasOwnProperty(i)) {\n a[i] = b[i];\n }\n }\n\n if (b.hasOwnProperty(\"toString\")) {\n a.toString = b.toString;\n }\n\n if (b.hasOwnProperty(\"valueOf\")) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n\t}", "combine(obj1, obj2)\n\t{\n\t\treturn _extend(_extend({}, obj1), obj2);\n\t}", "function extend(a, b) {\r\n for (var prop in b) {\r\n a[prop] = b[prop];\r\n }\r\n return a;\r\n }", "function extend(a,b){\n\tvar c={};\n\tfor(var i in a){\n\t\tif(a.hasOwnProperty(i)){\n\t\t\tc[i]=a[i];\n\t\t}\n\t}\n\tfor(var i in b){\n\t\tif(b.hasOwnProperty(i)){\n\t\t\tc[i]=b[i];\n\t\t}\n\t}\n\treturn c\n}", "function extend(a,b){\n\tvar c={};\n\tfor(var i in a){\n\t\tif(a.hasOwnProperty(i)){\n\t\t\tc[i]=a[i];\n\t\t}\n\t}\n\tfor(var i in b){\n\t\tif(b.hasOwnProperty(i)){\n\t\t\tc[i]=b[i];\n\t\t}\n\t}\n\treturn c\n}", "function extend(a,b){\n\tvar c={};\n\tfor(var i in a){\n\t\tif(a.hasOwnProperty(i)){\n\t\t\tc[i]=a[i];\n\t\t}\n\t}\n\tfor(var i in b){\n\t\tif(b.hasOwnProperty(i)){\n\t\t\tc[i]=b[i];\n\t\t}\n\t}\n\treturn c\n}", "objd(obj) {\n\n return toObject(obj);\n }", "function extend(obj, source) {\n for (var prop in source) {\n obj[prop] = source[prop];\n }\n return obj;\n }", "static initialize(obj, scale, rotate, zIndex) { \n obj['scale'] = scale;\n obj['rotate'] = rotate;\n obj['zIndex'] = zIndex;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend( obj, extension ){\n for ( var key in obj ){\n extension[key] = obj[key];\n }\n}", "function dummyObjects(name, age){\n this.name = name\n this.age = age\n}", "function extend(a, b) {\n for (var prop in b) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function Obj()\r\n{\r\n return {\r\n name: 'hamza',\r\n lastName : 'mubeen'\r\n }\r\n}", "function extend(a, b){\n for(var key in b)\n if(b.hasOwnProperty(key))\n a[key] = b[key];\n return a;\n }", "function Utils() {}", "function Utils() {}", "static initialize(obj, from, to) { \n obj['from'] = from;\n obj['to'] = to;\n }", "function extend(extension, obj) {\n\t\tfor(var key in extension) {\n\t\t\tobj[key] = extension[key];\n\t\t}\n\t}", "function Obj() {}", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend( a, b ) {\r\n for ( var prop in b ) {\r\n a[ prop ] = b[ prop ];\r\n }\r\n return a;\r\n}", "function d(e,t){for(var n in e=e||{},t)t[n]&&t[n].constructor&&t[n].constructor===Object?(e[n]=e[n]||{},d(e[n],t[n])):e[n]=t[n];return e}", "function extend(a, b) {\n\t for( var i in b ) {\n\t a[i] = b[i];\n\t }\n\t return a;\n\t}", "function extend(o, e){\n each(e, function(v, n){\n if (is(o[n], 'object') && is(v, 'object')){\n o[n] = extend(o[n], v);\n } else if (v !== null) {\n o[n] = v;\n }\n });\n return o;\n}", "function $o(){}", "get object() {\n\n }", "function extend(obj, extension) {\n for (var key in extension) {\n obj[key] = extension[key];\n }\n return obj;\n}", "function dateObjects()\n{\n\n}", "static initialize(obj, type, items) { \n obj['type'] = type;\n obj['items'] = items;\n }", "function _extend (a, b) {\n\tfor (var k in b) a[k] = b[k];\n}", "function extend(obj, from, from2) {\n from && each(Object.keys(from), function(key) {\n obj[key] = from[key]\n })\n return from2 ? extend(obj, from2) : obj\n}", "function extend(a, b) {\n\t\tfor( var key in b ) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function obj() { return this; }", "function $o(){return $o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$o.apply(this,arguments)}", "function extend(a, b) {\n\t\tfor(var key in b) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function extendObj (oldObj, addObj){\n for (var key in addObj) {\n if (addObj.hasOwnProperty(key)) {\n oldObj[key]=addObj[key];\n }\n }\n return oldObj;\n}", "function extend( a, b ) {\n\t\tfor( var key in b ) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function extend( a, b ) {\n\t\tfor( var key in b ) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function Extend(target, source){\r\n if((target) && (source) && (typeof source == 'object')) {\r\n for(var property in source) {\r\n if (source.hasOwnProperty(property)) {\r\n try { target[property] = source[property]; } catch (exception) { ; }\r\n }\r\n }\r\n }\r\n return target;\r\n}", "initCustomFunctions() {/*To be overridden in sub class as needed*/}", "function extend( ) {\n var args, merged, aI, object, key;\n\n //grab the args\n args = Array.prototype.slice.call(arguments);\n\n //look for arrays\n merged = {};\n for(aI = 0; aI < args.length; aI += 1) {\n object = args[aI];\n if(typeof object === 'undefined') { continue; }\n\n //throw an error if an item is an invalid type\n if(typeof object !== 'object') { throw new Error('Cannot extend objects. All arguments must be objects.'); }\n\n //if we find an array then the merged object will be an array\n if(typeof object.push === 'function') {\n merged = [];\n break;\n }\n }\n\n //add the data to the merged object\n for(aI = 0; aI < args.length; aI += 1) {\n object = args[aI];\n\n if(typeof object !== 'object') { continue; }\n\n //loop through the object's properties\n for(key in object) {\n\n //the property must not be from a prototype\n if(!object.hasOwnProperty(key)) { continue; }\n\n //copy the property\n if(typeof object[key] === 'object' && typeof merged[key] === 'object') {\n merged[key] = extend(merged[key], object[key]);\n } else if(typeof object[key] === 'object') {\n merged[key] = clone(object[key]);\n } else if(typeof merged.push === 'function') {\n merged.push(object[key]);\n } else {\n merged[key] = object[key];\n }\n }\n }\n\n return merged;\n }", "function extend(obj, props) {\n\t\tvar empty = {};\t\n\t\t\n\t\tif(!obj) {\n\t\t\tobj = {};\n\t\t}\n\t\tfor(var i = 1, l = arguments.length; i < l; i++) {\n\t\t\tmixin(obj, arguments[i]);\n\t\t}\n\t\treturn obj;\n\t\t\n\t\tfunction mixin(target, source) {\n\t\t\tvar name, s, i;\n\t\t\tfor(name in source) {\n\t\t\t\tif(source.hasOwnProperty(name)) {\n\t\t\t\t\ts = source[name];\n\t\t\t\t\tif(!( name in target) || (target[name] !== s && (!( name in empty) || empty[name] !== s))) {\n\t\t\t\t\t\ttarget[name] = s;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn target;\n\t\t\t// Object\n\t\t}\t\t\n\t}", "function extend( obj, extension ){\n for ( var key in extension ){\n obj[key] = extension[key];\n }\n}", "function extend(base) {\n\t if (!base) base = {};\n\t for (var i = 1, l = arguments.length, arg; i < l && (arg = arguments[i] || {}); i++) {\n\t for (var name in arg) {\n\t base[name] = arg[name];\n\t }\n\t }return base;\n\t }", "function mixin( /* objects */ ) {\n var mixed = {};\n for (var arg of arguments) {\n for (var name of Object.getOwnPropertyNames(arg)) {\n var desc = Object.getOwnPropertyDescriptor(arg, name);\n Object.defineProperty(mixed, name, desc);\n }\n }\n return mixed;\n }" ]
[ "0.65491366", "0.65491366", "0.6241516", "0.6193384", "0.6184945", "0.6184535", "0.6170308", "0.61424136", "0.61262864", "0.61262864", "0.61262864", "0.61212605", "0.60223323", "0.5989742", "0.59867513", "0.59867513", "0.59615767", "0.5882699", "0.5867043", "0.58626276", "0.58615553", "0.58535135", "0.5849376", "0.5846635", "0.5805527", "0.5805527", "0.5780494", "0.5780494", "0.5780237", "0.5777183", "0.5777183", "0.5772423", "0.5769807", "0.5769807", "0.5769807", "0.5766037", "0.5762971", "0.5743008", "0.5742033", "0.5725838", "0.5725838", "0.5725838", "0.5720676", "0.57191175", "0.5718751", "0.5716262", "0.5715067", "0.5708841", "0.56994843", "0.5699264", "0.5699264", "0.56941843", "0.5677216", "0.5677216", "0.5677216", "0.56712556", "0.56675136", "0.5664533", "0.5664533", "0.56611294", "0.5661057", "0.5660528", "0.5658972", "0.5658972", "0.5651494", "0.564941", "0.5648082", "0.5646559", "0.5646221", "0.5645906", "0.5643163", "0.5630437", "0.5616338", "0.5608711", "0.5607218", "0.56068575", "0.55935174", "0.5592174", "0.5592007", "0.5588457", "0.55863154", "0.55863154", "0.55827236", "0.5581483", "0.55812776", "0.55788314", "0.55710775", "0.5569866", "0.55693525" ]
0.0
-1
masonryDefinition // used for AMD definition and requires
function masonryDefinition( LayoutMode, Masonry ) { // create an Outlayer layout class var MasonryMode = LayoutMode.create('masonry'); // save on to these methods var _getElementOffset = MasonryMode.prototype._getElementOffset; var layout = MasonryMode.prototype.layout; var _getMeasurement = MasonryMode.prototype._getMeasurement; // sub-class Masonry extend( MasonryMode.prototype, Masonry.prototype ); // set back, as it was overwritten by Masonry MasonryMode.prototype._getElementOffset = _getElementOffset; MasonryMode.prototype.layout = layout; MasonryMode.prototype._getMeasurement = _getMeasurement; var measureColumns = MasonryMode.prototype.measureColumns; MasonryMode.prototype.measureColumns = function() { // set items, used if measuring first item this.items = this.isotope.filteredItems; measureColumns.call( this ); }; // HACK copy over isOriginLeft/Top options var _manageStamp = MasonryMode.prototype._manageStamp; MasonryMode.prototype._manageStamp = function() { this.options.isOriginLeft = this.isotope.options.isOriginLeft; this.options.isOriginTop = this.isotope.options.isOriginTop; _manageStamp.apply( this, arguments ); }; return MasonryMode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeMasonry() {\n window.myMasonry = new Masonry(document.querySelector(`.${CLASSES.MASONRY}`))\n }", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n return MasonryMode;\n}", "function WR_Masonry() {\n\t \tvar el = $( '.wr-nitro-masonry' );\n\n\t \tel.each( function( i, val ) {\n\t \t\tvar _option = $( this ).data( 'masonry' );\n\n\t \t\tif ( _option !== undefined ) {\n\t \t\t\tvar _selector = _option.selector, _width = _option.columnWidth;\n\n\t \t\t\t$( this ).WR_ImagesLoaded( function() {\n\t \t\t\t\t$( val ).isotope( {\n\t \t\t\t\t\tpercentPosition: true,\n\t \t\t\t\t\titemSelector: _selector,\n\t \t\t\t\t\tmasonry: {\n\t \t\t\t\t\t\tcolumnWidth: _width\n\t \t\t\t\t\t}\n\t \t\t\t\t} );\n\t \t\t\t} )\n\t \t\t}\n\t \t} );\n\t }", "function simple_blogmasonry() {\n \"use strict\";\n var container = $('#blogmasonry .filterable');\n container.imagesLoaded(function() {\n\n msnry_blog = new Masonry('#blogmasonry .filterable', {\n \"columnWidth\": \".grid-size\",\n itemSelector: '.blog-article'\n });\n\n });\n }", "function initMasonry() {\n \t// first handle the imagesloaded because we are loading images\n \tvar $grid = $('.grid').imagesLoaded( function() {\n console.log(\"masonry initialized\");\n\n // Now call masonry after all images have loaded so it'll \n // properly gridify the images, gridify is probably not a real word.\n $grid.masonry({\n itemSelector: '.grid-item',\n percentPosition: true,\n columnWidth: '.grid-sizer'\n });\n });\n \t\n \t// we can init the featherlight library here.\n\tinitFeatherLight();\n }", "function init_masonry(){\n var $container = $('#content');\n\n $container.imagesLoaded( function(){\n $container.masonry({\n itemSelector: '.box-content',\n isAnimated: true\n });\n });\n}", "function masonryDefinition( Outlayer, getSize ) {\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n\n Masonry.prototype._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n var i = this.cols;\n this.colYs = [];\n while (i--) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n };\n\n Masonry.prototype.measureColumns = function() {\n var container = this._getSizingContainer();\n // if columnWidth is 0, default to outerWidth of first item\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n if ( !this.columnWidth ) {\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem ? getSize( firstItemElem ).outerWidth :\n // or size of container\n this.size.innerWidth;\n }\n this.columnWidth += this.gutter;\n\n this._containerWidth = getSize( container ).innerWidth;\n this.cols = Math.floor( ( this._containerWidth + this.gutter ) / this.columnWidth );\n this.cols = Math.max( this.cols, 1 );\n };\n\n Masonry.prototype._getSizingContainer = function() {\n return this.options.isFitWidth ? this.element.parentNode : this.element;\n };\n\n Masonry.prototype._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var colSpan = Math.ceil( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n\n var colGroup = this._getColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n var shortColIndex = indexOf( colGroup, minimumY );\n\n // position the brick\n var position = {\n x: this.columnWidth * shortColIndex,\n y: minimumY\n };\n\n // apply setHeight to necessary columns\n var setHeight = minimumY + item.size.outerHeight;\n var setSpan = this.cols + 1 - colGroup.length;\n for ( var i = 0; i < setSpan; i++ ) {\n this.colYs[ shortColIndex + i ] = setHeight;\n }\n\n return position;\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n Masonry.prototype._getColGroup = function( colSpan ) {\n if ( colSpan === 1 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( i, i + colSpan );\n // and get the max value of the array\n colGroup[i] = Math.max.apply( Math, groupColYs );\n }\n return colGroup;\n };\n\n Masonry.prototype._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var firstX = this.options.isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n Masonry.prototype._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this.options.isFitWidth ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n Masonry.prototype._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n // debounced, layout on resize\n // HEADS UP this overwrites Outlayer.resize\n // Any changes in Outlayer.resize need to be manually added here\n Masonry.prototype.resize = function() {\n // don't trigger if size did not change\n var container = this._getSizingContainer();\n var size = getSize( container );\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var hasSizes = this.size && size;\n if ( hasSizes && size.innerWidth === this._containerWidth ) {\n return;\n }\n\n this.layout();\n\n delete this.resizeTimeout;\n };\n\n return Masonry;\n}", "function social_curator_masonry_callback(element){}", "function createMasonry(element) {\n //using Images Loaded in .gallery section\n //\"You images done yet or what?\"\n let imgLoad = imagesLoaded('.gallery');\n imgLoad.on( 'progress', function(instance, image) {\n console.log( imgLoad.images.length + ' images have to be loaded' );\n // detect which image is broken\n for ( var i = 0, len = imgLoad.images.length; i < len; i++ ) {\n var image = imgLoad.images[i];\n var result = image.isLoaded ? 'loaded' : 'broken';\n console.log( 'image is ' + result + ' for ' + image.img.src );\n }\n //creates Masonry object from .gallery\n let msnry = new Masonry( element, {\n // options\n itemSelector: \".gallery__item\"\n });\n });\n}", "function masonryDefinition( Outlayer, getSize ) {\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n\n Masonry.prototype._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n var i = this.cols;\n this.colYs = [];\n while (i--) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n };\n\n Masonry.prototype.measureColumns = function() {\n this.getContainerWidth();\n // if columnWidth is 0, default to outerWidth of first item\n if ( !this.columnWidth ) {\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n // if first elem has no width, default to size of container\n this.containerWidth;\n }\n\n this.columnWidth += this.gutter;\n\n this.cols = Math.floor( ( this.containerWidth + this.gutter ) / this.columnWidth );\n this.cols = Math.max( this.cols, 1 );\n };\n\n Masonry.prototype.getContainerWidth = function() {\n // container is parent if fit width\n var container = this.options.isFitWidth ? this.element.parentNode : this.element;\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var size = getSize( container );\n this.containerWidth = size && size.innerWidth;\n };\n\n Masonry.prototype._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var remainder = item.size.outerWidth % this.columnWidth;\n var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n // round if off by 1 pixel, otherwise use ceil\n var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n\n var colGroup = this._getColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n var shortColIndex = indexOf( colGroup, minimumY );\n\n // position the brick\n var position = {\n x: this.columnWidth * shortColIndex,\n y: minimumY\n };\n\n // apply setHeight to necessary columns\n var setHeight = minimumY + item.size.outerHeight;\n var setSpan = this.cols + 1 - colGroup.length;\n for ( var i = 0; i < setSpan; i++ ) {\n this.colYs[ shortColIndex + i ] = setHeight;\n }\n\n return position;\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n Masonry.prototype._getColGroup = function( colSpan ) {\n if ( colSpan < 2 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( i, i + colSpan );\n // and get the max value of the array\n colGroup[i] = Math.max.apply( Math, groupColYs );\n }\n return colGroup;\n };\n\n Masonry.prototype._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var firstX = this.options.isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n // lastCol should not go over if multiple of columnWidth #425\n lastCol -= lastX % this.columnWidth ? 0 : 1;\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n Masonry.prototype._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this.options.isFitWidth ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n Masonry.prototype._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n Masonry.prototype.needsResizeLayout = function() {\n var previousWidth = this.containerWidth;\n this.getContainerWidth();\n return previousWidth !== this.containerWidth;\n };\n\n return Masonry;\n}", "function masonryDefinition( Outlayer, getSize ) {\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n\n Masonry.prototype._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n var i = this.cols;\n this.colYs = [];\n while (i--) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n };\n\n Masonry.prototype.measureColumns = function() {\n this.getContainerWidth();\n // if columnWidth is 0, default to outerWidth of first item\n if ( !this.columnWidth ) {\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n // if first elem has no width, default to size of container\n this.containerWidth;\n }\n\n this.columnWidth += this.gutter;\n\n this.cols = Math.floor( ( this.containerWidth + this.gutter ) / this.columnWidth );\n this.cols = Math.max( this.cols, 1 );\n };\n\n Masonry.prototype.getContainerWidth = function() {\n // container is parent if fit width\n var container = this.options.isFitWidth ? this.element.parentNode : this.element;\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var size = getSize( container );\n this.containerWidth = size && size.innerWidth;\n };\n\n Masonry.prototype._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var remainder = item.size.outerWidth % this.columnWidth;\n var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n // round if off by 1 pixel, otherwise use ceil\n var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n\n var colGroup = this._getColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n var shortColIndex = indexOf( colGroup, minimumY );\n\n // position the brick\n var position = {\n x: this.columnWidth * shortColIndex,\n y: minimumY\n };\n\n // apply setHeight to necessary columns\n var setHeight = minimumY + item.size.outerHeight;\n var setSpan = this.cols + 1 - colGroup.length;\n for ( var i = 0; i < setSpan; i++ ) {\n this.colYs[ shortColIndex + i ] = setHeight;\n }\n\n return position;\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n Masonry.prototype._getColGroup = function( colSpan ) {\n if ( colSpan < 2 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( i, i + colSpan );\n // and get the max value of the array\n colGroup[i] = Math.max.apply( Math, groupColYs );\n }\n return colGroup;\n };\n\n Masonry.prototype._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var firstX = this.options.isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n // lastCol should not go over if multiple of columnWidth #425\n lastCol -= lastX % this.columnWidth ? 0 : 1;\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n Masonry.prototype._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this.options.isFitWidth ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n Masonry.prototype._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n Masonry.prototype.needsResizeLayout = function() {\n var previousWidth = this.containerWidth;\n this.getContainerWidth();\n return previousWidth !== this.containerWidth;\n };\n\n return Masonry;\n}", "function masonryDefinition( Outlayer, getSize ) {\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n\n Masonry.prototype._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n var i = this.cols;\n this.colYs = [];\n while (i--) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n };\n\n Masonry.prototype.measureColumns = function() {\n this.getContainerWidth();\n // if columnWidth is 0, default to outerWidth of first item\n if ( !this.columnWidth ) {\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n // if first elem has no width, default to size of container\n this.containerWidth;\n }\n\n this.columnWidth += this.gutter;\n\n this.cols = Math.floor( ( this.containerWidth + this.gutter ) / this.columnWidth );\n this.cols = Math.max( this.cols, 1 );\n };\n\n Masonry.prototype.getContainerWidth = function() {\n // container is parent if fit width\n var container = this.options.isFitWidth ? this.element.parentNode : this.element;\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var size = getSize( container );\n this.containerWidth = size && size.innerWidth;\n };\n\n Masonry.prototype._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var remainder = item.size.outerWidth % this.columnWidth;\n var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n // round if off by 1 pixel, otherwise use ceil\n var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n\n var colGroup = this._getColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n var shortColIndex = indexOf( colGroup, minimumY );\n\n // position the brick\n var position = {\n x: this.columnWidth * shortColIndex,\n y: minimumY\n };\n\n // apply setHeight to necessary columns\n var setHeight = minimumY + item.size.outerHeight;\n var setSpan = this.cols + 1 - colGroup.length;\n for ( var i = 0; i < setSpan; i++ ) {\n this.colYs[ shortColIndex + i ] = setHeight;\n }\n\n return position;\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n Masonry.prototype._getColGroup = function( colSpan ) {\n if ( colSpan < 2 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( i, i + colSpan );\n // and get the max value of the array\n colGroup[i] = Math.max.apply( Math, groupColYs );\n }\n return colGroup;\n };\n\n Masonry.prototype._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var firstX = this.options.isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n // lastCol should not go over if multiple of columnWidth #425\n lastCol -= lastX % this.columnWidth ? 0 : 1;\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n Masonry.prototype._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this.options.isFitWidth ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n Masonry.prototype._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n Masonry.prototype.needsResizeLayout = function() {\n var previousWidth = this.containerWidth;\n this.getContainerWidth();\n return previousWidth !== this.containerWidth;\n };\n\n return Masonry;\n}", "function masonryDefinition( Outlayer, getSize ) {\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n\n Masonry.prototype._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n var i = this.cols;\n this.colYs = [];\n while (i--) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n };\n\n Masonry.prototype.measureColumns = function() {\n this.getContainerWidth();\n // if columnWidth is 0, default to outerWidth of first item\n if ( !this.columnWidth ) {\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n // if first elem has no width, default to size of container\n this.containerWidth;\n }\n\n this.columnWidth += this.gutter;\n\n this.cols = Math.floor( ( this.containerWidth + this.gutter ) / this.columnWidth );\n this.cols = Math.max( this.cols, 1 );\n };\n\n Masonry.prototype.getContainerWidth = function() {\n // container is parent if fit width\n var container = this.options.isFitWidth ? this.element.parentNode : this.element;\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var size = getSize( container );\n this.containerWidth = size && size.innerWidth;\n };\n\n Masonry.prototype._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var remainder = item.size.outerWidth % this.columnWidth;\n var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n // round if off by 1 pixel, otherwise use ceil\n var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n\n var colGroup = this._getColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n var shortColIndex = indexOf( colGroup, minimumY );\n\n // position the brick\n var position = {\n x: this.columnWidth * shortColIndex,\n y: minimumY\n };\n\n // apply setHeight to necessary columns\n var setHeight = minimumY + item.size.outerHeight;\n var setSpan = this.cols + 1 - colGroup.length;\n for ( var i = 0; i < setSpan; i++ ) {\n this.colYs[ shortColIndex + i ] = setHeight;\n }\n\n return position;\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n Masonry.prototype._getColGroup = function( colSpan ) {\n if ( colSpan < 2 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( i, i + colSpan );\n // and get the max value of the array\n colGroup[i] = Math.max.apply( Math, groupColYs );\n }\n return colGroup;\n };\n\n Masonry.prototype._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var firstX = this.options.isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n // lastCol should not go over if multiple of columnWidth #425\n lastCol -= lastX % this.columnWidth ? 0 : 1;\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n Masonry.prototype._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this.options.isFitWidth ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n Masonry.prototype._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n Masonry.prototype.needsResizeLayout = function() {\n var previousWidth = this.containerWidth;\n this.getContainerWidth();\n return previousWidth !== this.containerWidth;\n };\n\n return Masonry;\n}", "function masonryDefinition( Outlayer, getSize ) {\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n\n Masonry.prototype._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n var i = this.cols;\n this.colYs = [];\n while (i--) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n };\n\n Masonry.prototype.measureColumns = function() {\n this.getContainerWidth();\n // if columnWidth is 0, default to outerWidth of first item\n if ( !this.columnWidth ) {\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n // if first elem has no width, default to size of container\n this.containerWidth;\n }\n\n this.columnWidth += this.gutter;\n\n this.cols = Math.floor( ( this.containerWidth + this.gutter ) / this.columnWidth );\n this.cols = Math.max( this.cols, 1 );\n };\n\n Masonry.prototype.getContainerWidth = function() {\n // container is parent if fit width\n var container = this.options.isFitWidth ? this.element.parentNode : this.element;\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var size = getSize( container );\n this.containerWidth = size && size.innerWidth;\n };\n\n Masonry.prototype._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var remainder = item.size.outerWidth % this.columnWidth;\n var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n // round if off by 1 pixel, otherwise use ceil\n var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n\n var colGroup = this._getColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n var shortColIndex = indexOf( colGroup, minimumY );\n\n // position the brick\n var position = {\n x: this.columnWidth * shortColIndex,\n y: minimumY\n };\n\n // apply setHeight to necessary columns\n var setHeight = minimumY + item.size.outerHeight;\n var setSpan = this.cols + 1 - colGroup.length;\n for ( var i = 0; i < setSpan; i++ ) {\n this.colYs[ shortColIndex + i ] = setHeight;\n }\n\n return position;\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n Masonry.prototype._getColGroup = function( colSpan ) {\n if ( colSpan < 2 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( i, i + colSpan );\n // and get the max value of the array\n colGroup[i] = Math.max.apply( Math, groupColYs );\n }\n return colGroup;\n };\n\n Masonry.prototype._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var firstX = this.options.isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n // lastCol should not go over if multiple of columnWidth #425\n lastCol -= lastX % this.columnWidth ? 0 : 1;\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n Masonry.prototype._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this.options.isFitWidth ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n Masonry.prototype._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n Masonry.prototype.needsResizeLayout = function() {\n var previousWidth = this.containerWidth;\n this.getContainerWidth();\n return previousWidth !== this.containerWidth;\n };\n\n return Masonry;\n}", "function masonryDefinition( Outlayer, getSize ) {\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n\n Masonry.prototype._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n var i = this.cols;\n this.colYs = [];\n while (i--) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n };\n\n Masonry.prototype.measureColumns = function() {\n this.getContainerWidth();\n // if columnWidth is 0, default to outerWidth of first item\n if ( !this.columnWidth ) {\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n // if first elem has no width, default to size of container\n this.containerWidth;\n }\n\n this.columnWidth += this.gutter;\n\n this.cols = Math.floor( ( this.containerWidth + this.gutter ) / this.columnWidth );\n this.cols = Math.max( this.cols, 1 );\n };\n\n Masonry.prototype.getContainerWidth = function() {\n // container is parent if fit width\n var container = this.options.isFitWidth ? this.element.parentNode : this.element;\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var size = getSize( container );\n this.containerWidth = size && size.innerWidth;\n };\n\n Masonry.prototype._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var remainder = item.size.outerWidth % this.columnWidth;\n var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n // round if off by 1 pixel, otherwise use ceil\n var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n\n var colGroup = this._getColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n var shortColIndex = indexOf( colGroup, minimumY );\n\n // position the brick\n var position = {\n x: this.columnWidth * shortColIndex,\n y: minimumY\n };\n\n // apply setHeight to necessary columns\n var setHeight = minimumY + item.size.outerHeight;\n var setSpan = this.cols + 1 - colGroup.length;\n for ( var i = 0; i < setSpan; i++ ) {\n this.colYs[ shortColIndex + i ] = setHeight;\n }\n\n return position;\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n Masonry.prototype._getColGroup = function( colSpan ) {\n if ( colSpan < 2 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( i, i + colSpan );\n // and get the max value of the array\n colGroup[i] = Math.max.apply( Math, groupColYs );\n }\n return colGroup;\n };\n\n Masonry.prototype._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var firstX = this.options.isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n // lastCol should not go over if multiple of columnWidth #425\n lastCol -= lastX % this.columnWidth ? 0 : 1;\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n Masonry.prototype._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this.options.isFitWidth ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n Masonry.prototype._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n Masonry.prototype.needsResizeLayout = function() {\n var previousWidth = this.containerWidth;\n this.getContainerWidth();\n return previousWidth !== this.containerWidth;\n };\n\n return Masonry;\n}", "function masonryDefinition( Outlayer, getSize ) {\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n\n Masonry.prototype._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n var i = this.cols;\n this.colYs = [];\n while (i--) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n };\n\n Masonry.prototype.measureColumns = function() {\n this.getContainerWidth();\n // if columnWidth is 0, default to outerWidth of first item\n if ( !this.columnWidth ) {\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n // if first elem has no width, default to size of container\n this.containerWidth;\n }\n\n this.columnWidth += this.gutter;\n\n this.cols = Math.floor( ( this.containerWidth + this.gutter ) / this.columnWidth );\n this.cols = Math.max( this.cols, 1 );\n };\n\n Masonry.prototype.getContainerWidth = function() {\n // container is parent if fit width\n var container = this.options.isFitWidth ? this.element.parentNode : this.element;\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var size = getSize( container );\n this.containerWidth = size && size.innerWidth;\n };\n\n Masonry.prototype._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var remainder = item.size.outerWidth % this.columnWidth;\n var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n // round if off by 1 pixel, otherwise use ceil\n var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n\n var colGroup = this._getColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n var shortColIndex = indexOf( colGroup, minimumY );\n\n // position the brick\n var position = {\n x: this.columnWidth * shortColIndex,\n y: minimumY\n };\n\n // apply setHeight to necessary columns\n var setHeight = minimumY + item.size.outerHeight;\n var setSpan = this.cols + 1 - colGroup.length;\n for ( var i = 0; i < setSpan; i++ ) {\n this.colYs[ shortColIndex + i ] = setHeight;\n }\n\n return position;\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n Masonry.prototype._getColGroup = function( colSpan ) {\n if ( colSpan < 2 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( i, i + colSpan );\n // and get the max value of the array\n colGroup[i] = Math.max.apply( Math, groupColYs );\n }\n return colGroup;\n };\n\n Masonry.prototype._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var firstX = this.options.isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n // lastCol should not go over if multiple of columnWidth #425\n lastCol -= lastX % this.columnWidth ? 0 : 1;\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n Masonry.prototype._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this.options.isFitWidth ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n Masonry.prototype._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n // debounced, layout on resize\n // HEADS UP this overwrites Outlayer.resize\n // Any changes in Outlayer.resize need to be manually added here\n Masonry.prototype.resize = function() {\n // don't trigger if size did not change\n var previousWidth = this.containerWidth;\n this.getContainerWidth();\n if ( previousWidth === this.containerWidth ) {\n return;\n }\n\n this.layout();\n };\n\n return Masonry;\n}", "function masonryDefinition( Outlayer, getSize ) {\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n\n Masonry.prototype._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n var i = this.cols;\n this.colYs = [];\n while (i--) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n };\n\n Masonry.prototype.measureColumns = function() {\n this.getContainerWidth();\n // if columnWidth is 0, default to outerWidth of first item\n if ( !this.columnWidth ) {\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n // if first elem has no width, default to size of container\n this.containerWidth;\n }\n\n this.columnWidth += this.gutter;\n\n this.cols = Math.floor( ( this.containerWidth + this.gutter ) / this.columnWidth );\n this.cols = Math.max( this.cols, 1 );\n };\n\n Masonry.prototype.getContainerWidth = function() {\n // container is parent if fit width\n var container = this.options.isFitWidth ? this.element.parentNode : this.element;\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var size = getSize( container );\n this.containerWidth = size && size.innerWidth;\n };\n\n Masonry.prototype._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var remainder = item.size.outerWidth % this.columnWidth;\n var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n // round if off by 1 pixel, otherwise use ceil\n var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n\n var colGroup = this._getColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n var shortColIndex = indexOf( colGroup, minimumY );\n\n // position the brick\n var position = {\n x: this.columnWidth * shortColIndex,\n y: minimumY\n };\n\n // apply setHeight to necessary columns\n var setHeight = minimumY + item.size.outerHeight;\n var setSpan = this.cols + 1 - colGroup.length;\n for ( var i = 0; i < setSpan; i++ ) {\n this.colYs[ shortColIndex + i ] = setHeight;\n }\n\n return position;\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n Masonry.prototype._getColGroup = function( colSpan ) {\n if ( colSpan < 2 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( i, i + colSpan );\n // and get the max value of the array\n colGroup[i] = Math.max.apply( Math, groupColYs );\n }\n return colGroup;\n };\n\n Masonry.prototype._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var firstX = this.options.isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n // lastCol should not go over if multiple of columnWidth #425\n lastCol -= lastX % this.columnWidth ? 0 : 1;\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n Masonry.prototype._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this.options.isFitWidth ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n Masonry.prototype._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n Masonry.prototype.needsResizeLayout = function() {\n var previousWidth = this.containerWidth;\n this.getContainerWidth();\n return previousWidth !== this.containerWidth;\n };\n\n return Masonry;\n}", "function masonryGridSetting() {\n if ($('.masonry-gallery').length) {\n var $grid = $('.masonry-gallery').masonry({\n itemSelector: '.grid-item',\n columnWidth: '.grid-item',\n percentPosition: true\n });\n\n $grid.imagesLoaded().progress(function () {\n $grid.masonry('layout');\n });\n }\n }", "function attachMasonry() {\n\t\tif ($('.masonry').length > 0) {\n\t\t\t$('.masonry').masonry({\n\t\t\t\tanimate: true,\n\t\t\t\tcolumnWidth: 1,\n\t\t\t\titemSelector: 'li.box',\n\t\t\t\tsingleMode: false,\n\t\t\t\tresizeable: true\n\t\t\t});\n\t\t}\n\t\t\n\t\tif ($('.masonry-no-animate').length > 0) {\n\t\t\t$('.masonry-no-animate').masonry({\n\t\t\t\tanimate: false,\n\t\t\t\tcolumnWidth: 1,\n\t\t\t\titemSelector: 'li.box',\n\t\t\t\tsingleMode: false,\n\t\t\t\tresizeable: true\n\t\t\t});\n\t\t}\n\t\t\n\t\tif ($('.masonry-news').length > 0) {\n\t\t\t$('.masonry-news').masonry({\n\t\t\t\tanimate: true,\n\t\t\t\tcolumnWidth: 50,\n\t\t\t\titemSelector: 'li.box',\n\t\t\t\tsingleMode: false,\n\t\t\t\tresizeable: true\n\t\t\t});\n\t\t}\n\t\t\n\t\tif ($('.masonry-no-animate-news').length > 0) {\n\t\t\t$('.masonry-news').masonry({\n\t\t\t\tanimate: true,\n\t\t\t\tcolumnWidth: 50,\n\t\t\t\titemSelector: 'li.box',\n\t\t\t\tsingleMode: false,\n\t\t\t\tresizeable: true\n\t\t\t});\n\t\t}\n\t}", "function masonryBlocks($cont,$item) {\n\n var container = $('.'+$cont);\n var items = $('.'+$item);\n sjq(container).imagesLoaded( function() {\n // init isotope\n sjq(container).isotope({\n itemSelector: '.'+$item,\n percentPosition: true,\n masonry: {\n columnWidth: '.'+$item\n \n }\n });\n // append other items when they are loaded\n sjq(items).imagesLoaded( function() {\n \n sjq(container).append(items)\n .isotope('appended', items)\n .isotope('layout');;\n });\n });\n}", "function qodefInitProductListMasonryShortcode() {\n\t\tvar container = $('.qodef-pl-holder.qodef-masonry-layout .qodef-pl-outer');\n\t\t\n\t\tif (container.length) {\n\t\t\tcontainer.each(function () {\n\t\t\t\tvar thisContainer = $(this),\n\t\t\t\t\tsize = thisContainer.find('.qodef-pl-sizer').width();\n\t\t\t\t\n\t\t\t\tthisContainer.waitForImages(function () {\n\t\t\t\t\tthisContainer.isotope({\n\t\t\t\t\t\titemSelector: '.qodef-pli',\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tmasonry: {\n\t\t\t\t\t\t\tcolumnWidth: '.qodef-pl-sizer',\n\t\t\t\t\t\t\tgutter: '.qodef-pl-gutter'\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tqodefResizeWooCommerceMasonryLayoutItems(size, thisContainer);\n\t\t\t\t\t\n\t\t\t\t\tthisContainer.isotope('layout').css('opacity', 1);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}", "function eltdfInitProductListMasonryShortcode() {\n\t\tvar container = $('.eltdf-pl-holder.eltdf-masonry-layout .eltdf-pl-outer');\n\t\t\n\t\tif(container.length) {\n\t\t\tcontainer.each(function(){\n\t\t\t\tvar thisContainer = $(this);\n\t\t\t\t\n\t\t\t\tthisContainer.waitForImages(function() {\n\t\t\t\t\tthisContainer.isotope({\n\t\t\t\t\t\titemSelector: '.eltdf-pli',\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tmasonry: {\n\t\t\t\t\t\t\tcolumnWidth: '.eltdf-pl-sizer',\n\t\t\t\t\t\t\tgutter: '.eltdf-pl-gutter'\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tthisContainer.isotope('layout');\n\t\t\t\t\t\n\t\t\t\t\tthisContainer.css('opacity', 1);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}", "function OsMasonryFlex() {\r\n $('.masonry-container').each(function () {\r\n var minwidth = parseInt($(this).data('masonry-grid-width'), 10) || 370;\r\n var $container = $(this);\r\n var oldWidth = $container.innerWidth();\r\n var oldRatio = oldWidth / minwidth;\r\n var $masonryOpt = {itemSelector: '.masonry-item'};\r\n var $masonry = $container.masonry($masonryOpt);\r\n\r\n function ResizeItem(containerWidth) {\r\n var Ratio = Math.floor(containerWidth / minwidth);\r\n if (Ratio === 0) {\r\n Ratio = 1;\r\n }\r\n else if (Ratio != oldRatio) {\r\n var itemWidth = 1 / Ratio;\r\n $container.children('.masonry-item').css({width: itemWidth * 100 + '%'});\r\n }\r\n }\r\n\r\n ResizeItem(oldWidth);\r\n\r\n // On ImagesLoaded\r\n $masonry.imagesLoaded().progress(function () {\r\n $masonry.masonry('layout');\r\n });\r\n\r\n // Window on resize\r\n $(window).on('resize', function () {\r\n var newWidth = $container.innerWidth();\r\n if (newWidth != oldWidth) {\r\n ResizeItem(newWidth);\r\n oldWidth = newWidth;\r\n }\r\n });\r\n\r\n //Fix parallax background\r\n $masonry.on('layoutComplete', function () {\r\n $(window).trigger('resize.px.parallax');\r\n });\r\n }\r\n )\r\n ;\r\n\r\n }", "function loadGridImages(numImages) { \ni=0;\nconsole.log('Loading '+numImages+' images');\n\nfor(i=0;i<numImages;i++){\nvar imgStr = \"images/p\"+(i+1)+\".png\";\naddImage(imgStr, i);\n}\n\nimagesLoaded('#thegrid', function() {\n$('#thegrid').masonry({\nitemSelector: 'item',\ncolumnWidth: ($(window).width())/50,\ngutter: 12\n});\n\n})\n}", "static get tag() {\n return \"lrndesign-gallery-masonry\";\n }", "renderLayout() {\n\t let self = this;\t \n\t let photoListWrapper = document.querySelector('#photos');\t \n imagesLoaded(photoListWrapper, function() { \t \n\t\t\tself.msnry = new Masonry( photoListWrapper, {\n\t\t\t\titemSelector: '.photo'\n\t\t\t}); \n\t\t\t[...document.querySelectorAll('#photos .photo')].forEach(el => el.classList.add('in-view'));\n });\n }", "function initMasonryGallery(){\n \"use strict\";\n\n resizeMasonryGallery($j('.grid-sizer').width());\n\n if($j('.masonry_gallery_holder').length){\n\n $j('.masonry_gallery_holder').each(function(){\n var $this = $j(this);\n $this.waitForImages(function(){\n $this.animate({opacity:1});\n $this.isotope({\n itemSelector: '.masonry_gallery_item',\n masonry: {\n columnWidth: '.grid-sizer'\n }\n });\n\t\t\t\t\n\t\t\t\t$this.find('.masonry_gallery_item.parallax_item').each(function(i){\n\t\t\t\t\t$j(this).masonryParallax($this.data('parallax_item_speed'), true, $this.data('parallax_item_offset'));\n\t\t\t\t\t\n\t\t\t\t});\n });\n });\n $j(window).resize(function(){\n resizeMasonryGallery($j('.grid-sizer').width());\n $j('.masonry_gallery_holder').isotope('reloadItems');\n });\n }\n}", "function runMasonry() {\n var $container = $('#container');\n\n $container.masonry({\n columnWidth: 60,\n itemSelector: '.item',\n containerStyle: null,\n isAnimated: true,\n gutter: 14,\n isFitWidth: true\n });\n}", "function runMasonry(container, item){\n var $container = $(container).masonry();\n $container.imagesLoaded( function() {\n $container.masonry({\n itemSelector: item\n });\n });\n}", "function masonry(container, items, images, spacing, dCol, tCol, mCol) {\n //selects the following classes from the the DOM.\n var g = document.querySelector(container),\n //The below returns an array\n gc = document.querySelectorAll(items),\n gi = document.querySelectorAll(images),\n //Finds the length of the array\n gcLength = gc.length,\n gHeight = 0,\n i;\n for (i = 0; i < gcLength; i++) {\n gc[i].style.height = getRandomIntInclusive(200, 400) + \"px\";\n gi[i].style.minHeight = gc[i].style.height;\n\n //Total height of all items\n gHeight += gc[i].offsetHeight + parseInt(spacing);\n }\n if (document.documentElement.clientWidth >= 940) {\n g.style.height = gHeight / dCol + gHeight / (gcLength + 1) + \"px\";\n } else if (\n document.documentElement.clientWidth < 940 &&\n document.documentElement.clientWidth >= 768\n ) {\n g.style.height = gHeight / tCol + gHeight / (gcLength + 1) + \"px\";\n } else {\n g.style.height = gHeight / mCol + gHeight / (gcLength + 1) + \"px\";\n }\n}", "function _masonry( container ) {\n\n\t\t/* Gallery Grid */\n\t\t$( '.gallery-grid' ).isotope({\n\t\t\t\titemSelector : '.gallery-grid-item',\n\t\t\t\ttransitionDuration: 0,\n\t\t});\n\t\tsetTimeout( function(){ $( '.gallery-grid' ).isotope( 'layout' ) }, 3000);\n\n\t}", "function initMasonryEffect() {\n\n\t\t$allElm = $(gridElementSpecific); // Get all elements from DOM and set allElm variable\n\t\t$allElm.hide(); // Hide html elements prelimenary\n\t\t$allElm.css('position', 'absolute'); // Positions elements absolutely\n\n\t\t// If the grid is present (#grid has elements), do masonry\n\t\tif ($allElm.length !== 0) {\n\n\t\t\t// Check if site is accessed correctly through the hashes (for index pages). If not, redirect to home and set hash route.\n\t\t\tif ($('body.home').length === 0) {\n\t\t\t\tvar newUrl = hashizeUrl(window.location.href);\n\t\t\t\tsetUrl(newUrl);\n\n\t\t\t// If no hash is set, initialize splash screen with all items\n\t\t\t} else if (getHash() === '') {\n\t\t\t\tsetHash('all');\n\n\t\t\t// Page is ready for masonry\n\t\t\t} else if (getHash() === 'shop') {\n\t\t\t\tsetHash('category-shop');\n\t\t\t} else {\n\t\t\t\tprepareMasonry();\n\t\t\t}\n\n\t\t\t// Change hash on click\n\t\t\t$('li.menu-item-type-taxonomy > a').click(function() {\n\t\t\t\tvar category = hashizeUrl($(this).attr(\"href\"), true);\n//\t\t\t\tcategory = category.replace(/\\//g,\"-\");\n\t\t\t\tsetHash(category);\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t// Watch for hash change and do masonry when changed\n\t\t\t$(window).hashchange(function() {\n\n\t\t\t\t// Alert Google Analytics that new async page has been called (converted to non-hashed url) and track with _gaq\n\t\t\t\tif (checkGoogleAnalyticsLoaded()) {\n\t\t\t\t\tvar trackUrl = antiHashizeUrl(getHash(), true, false);\n\t\t\t\t\tif (trackUrl == \"all\") { trackUrl = \"\"; }\n\t\t\t\t\tvar trackLocation = '/' + trackUrl;\n\t\t\t\t\t_gaq.push(['_trackPageview', trackLocation]);\n\t\t\t\t}\n\n\t\t\t\tprepareMasonry();\n\t\t\t});\n\n\t\t// The grid is not present, wait for clicks\n\t\t} else {\n\n\t\t\t// Change hash on click\n\t\t\t$('li.menu-item-type-taxonomy > a').click(function() {\n\t\t\t\tvar category = hashizeUrl($(this).attr(\"href\"), true);\n//\t\t\t\tcategory = category.replace(/\\//g,\"-\");\n\t\t\t\tvar url = base + \"#\" + category;\n\t\t\t\tsetUrl(url);\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\n\t}", "function searchResultMasonryInit() {\r\n\t\t\t\t\tif ($('body.search-results').length > 0 && \r\n\t\t\t\t\t$('#search-results article').length > 0 && \r\n\t\t\t\t\t$('#search-results[data-layout=\"list-no-sidebar\"]').length == 0) {\r\n\t\t\t\t\t\tsearchResultMasonry();\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "function initQBlog(){\n\t\"use strict\";\n\t\n\tif($j('.q_masonry_blog').length){\n\t\t$j('.q_masonry_blog').each(function() {\n var thisItem = $j(this);\n var thisItemWidth = thisItem.width();\n\n if($j('.full_width').length && !thisItem.parents('.grid_section').length){\n thisItemWidth = $j('.full_width').width();\n }\n\n\t\t\tvar $cols = 3;\n\t\t\tvar screenSize = $j(window).width();\n\n \tif ($j('.full_width').length && !thisItem.parents('.grid_section').length) {\n \t\tif(screenSize < 601) {\n\t\t\t\t\t$cols = 1;\n\t \t} else if (screenSize < 769) {\n\t \t\t$cols = 1;\n\t \t} else if (screenSize < 783) {\n\t \t\t$cols = 2;\n\t \t} else if (screenSize < 1000) {\n\t \t\t$cols = 3;\n\t \t} else if (screenSize < 1384) {\n\t \t\t$cols = 4;\n\t \t} else {\n\t \t\t$cols = 5;\n\t \t}\n \t} else if($j('.full_width').length && thisItem.parents('.grid_section').length) {\n \t\tif(thisItemWidth < 601) {\n $cols = 1;\n thisItem.children('article').css('width', '100%');\n } else if(thisItemWidth < 769) {\n $cols = 2;\n thisItem.children('article').css('width', '46.5%');\n } else {\n \t$cols = 3;\n }\n \t} else if($j('.content .container .container_inner.page_container_inner').length && thisItem.parents('.grid_section').length) {\n \t\tif(thisItemWidth < 421) {\n $cols = 1;\n thisItem.children('article').css('width', '100%');\n } else if(thisItemWidth < 769) {\n $cols = 2;\n thisItem.children('article').css('width', '46.5%');\n } else {\n \t$cols = 3;\n }\n \t} else {\n if(thisItemWidth < 421) {\n $cols = 1;\n } else if(thisItemWidth < 769) {\n $cols = 2;\n } else {\n \t$cols = 3;\n }\n }\n\n\t\t\tthisItem.isotope({\n\t\t\t\titemSelector: 'article',\n\t\t\t\tresizable: false,\n\t\t\t\tmasonry: { columnWidth: thisItemWidth / $cols }\n\t\t\t});\n\n thisItem.animate({opacity: \"1\"}, 500);\n\t\t});\n\t}\t\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}", "function initBlogMasonryGallery(){\n \"use strict\";\n\n if($j('.blog_holder.masonry_gallery').length) {\n\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n\n var container = $j('.blog_holder.masonry_gallery');\n container.width(Math.round(container.parent().width()));\n container.isotope({\n itemSelector: 'article',\n resizable: false,\n masonry: {\n columnWidth: '.blog_holder_grid_sizer',\n gutter: '.blog_holder_grid_gutter'\n }\n });\n\n container.waitForImages(function(){\n container.animate({opacity: \"1\"}, 300, function() {\n container.isotope().isotope('layout');\n });\n });\n\n if( container.hasClass('masonry_infinite_scroll')){\n container.infinitescroll({\n navSelector : '.blog_infinite_scroll_button span',\n nextSelector : '.blog_infinite_scroll_button span a',\n itemSelector : 'article',\n loading: {\n finishedMsg: finished_text,\n msgText : loading_text\n }\n },\n // call Isotope as a callback\n function( newElements ) {\n container.isotope( 'appended', $j( newElements ) );\n fitVideo();\n fitAudio();\n initFlexSlider();\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n setTimeout(function() {\n container.isotope( 'layout');\n }, 300);\n }\n );\n }else if(container.hasClass('masonry_load_more')){\n var i = 1;\n $j('.blog_load_more_button a').off('click tap').on('click tap', function(e) {\n e.preventDefault();\n\n var link = $j(this).attr('href');\n var $content = '.masonry_load_more';\n var $anchor = '.blog_load_more_button a';\n var $next_href = $j($anchor).attr('href');\n $j.get(link+'', function(data){\n var $new_content = $j($content, data).wrapInner('').html();\n $next_href = $j($anchor, data).attr('href');\n container.append( $j( $new_content) ).isotope( 'reloadItems' ).isotope({ sortBy: 'original-order' });\n fitVideo();\n fitAudio();\n initFlexSlider();\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n setTimeout(function() {\n container.isotope( 'layout');\n }, 300);\n\n if($j('.blog_load_more_button span').attr('rel') > i) {\n $j('.blog_load_more_button a').attr('href', $next_href); // Change the next URL\n } else {\n $j('.blog_load_more_button').remove();\n }\n\n });\n i++;\n });\n\n }\n\n $j(window).resize(function() {\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n container.isotope().isotope('layout');\n container.width(Math.round(container.parent().width()));\n });\n }\n}", "function qodeOnWindowLoad() {\n qodeInitElementorAdvancedImageGalleryMasonry();\n }", "function searchResultMasonry() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $searchContainer = $('#search-results'),\r\n\t\t\t\t\t$dividerNum = ($searchContainer.is('[data-layout=\"masonry-no-sidebar\"]')) ? 4 : 3;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$searchContainer.imagesLoaded(function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$searchContainer.isotope({\r\n\t\t\t\t\t\t\titemSelector: '.result',\r\n\t\t\t\t\t\t\tlayoutMode: 'packery',\r\n\t\t\t\t\t\t\tpackery: {\r\n\t\t\t\t\t\t\t\tcolumnWidth: $('#search-results').width() / $dividerNum\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$searchContainer\r\n\t\t\t\t\t\t\t.find('article')\r\n\t\t\t\t\t\t\t.css('opacity', '1');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t$window.on('resize', function () {\r\n\t\t\t\t\t\t$searchContainer.isotope({\r\n\t\t\t\t\t\t\tlayoutMode: 'packery',\r\n\t\t\t\t\t\t\tpackery: {\r\n\t\t\t\t\t\t\t\tcolumnWidth: $('#search-results').width() / $dividerNum\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function qodefOnWindowResize() {\n qodefInitProductListMasonryShortcode();\n }", "function MasonryDoc(props) {\n return (\n <>\n <div className=\"flex flex-1 flex-grow-0 items-center justify-end\">\n <Button\n className=\"normal-case\"\n variant=\"contained\"\n color=\"secondary\"\n component=\"a\"\n href=\"https://mui.com/components/masonry\"\n target=\"_blank\"\n role=\"button\"\n >\n <Icon>link</Icon>\n <span className=\"mx-4\">Reference</span>\n </Button>\n </div>\n <Typography className=\"text-40 my-16 font-700\" component=\"h1\">\n Masonry\n </Typography>\n <Typography className=\"description\">\n Masonry lays out contents of different sizes as blocks of the same width and variable height\n with configurable gaps.\n </Typography>\n\n <Typography className=\"mb-40\" component=\"div\">\n Masonry maintains a list of content blocks with a consistent width but variable height. The\n contents are ordered by row. If a row is already filled with the specified number of\n columns, the next item starts another row, and it is added to the shortest column.\n </Typography>\n <blockquote>\n <Typography className=\"mb-40\" component=\"div\">\n Warning: This component has been developed with the use of CSS Grid Level 2.\n Unfortunately, Chrome only allows to render at most 1,000 rows for each grid. Hence, with\n the current design, a masonry component has a maximum height of 2,000px, and the items\n beyond this height will fail to be rendered. An{' '}\n <a href=\"https://github.com/mui-org/material-ui/issues/27934\">issue</a> has been created\n on GitHub to gather workarounds for this limitation. It is worth noting that this\n limitation does not exist on Firefox or Safari.\n </Typography>\n </blockquote>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Basic masonry\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n A simple example of a <code>{`<Masonry />`}</code>. <code>{`<Masonry />`}</code> is a\n container for one or more <code>{`<MasonryItem />`}</code>s.{' '}\n <code>{`<MasonryItem />`}</code> can receive any element including <code>{`<div />`}</code>{' '}\n and <code>{`<img />`}</code>. Also, it is important to note that each{' '}\n <code>{`<MasonryItem />`}</code> accepts only one element.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/BasicMasonry.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/BasicMasonry.js')}\n />\n </Typography>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Image masonry\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n This example demonstrates the use of <code>{`<Masonry />`}</code> for images.{' '}\n <code>{`<Masonry />`}</code> orders its children by row. If you would like to order images\n by column, you can use <code>{`<ImageList variant=\"masonry\" />`}</code>. More details on\n this component can be found in{' '}\n <a href=\"/components/image-list/#masonry-image-list\">Masonry Image List</a>.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/ImageMasonry.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/ImageMasonry.js')}\n />\n </Typography>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Columns\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n This example demonstrates the use of the <code>columns</code> to configure the number of\n columns of a <code>{`<Masonry />`}</code>.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/FixedColumns.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/FixedColumns.js')}\n />\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <code>columns</code> accepts responsive values:\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/ResponsiveColumns.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/ResponsiveColumns.js')}\n />\n </Typography>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Spacing\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n This example demonstrates the use of the <code>spacing</code> to configure the spacing\n between <code>{`<MasonryItem />`}</code>s. It is important to note that <code>spacing</code>{' '}\n is a factor of the theme&#39;s spacing.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/FixedSpacing.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/FixedSpacing.js')}\n />\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <code>spacing</code> accepts responsive values:\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/ResponsiveSpacing.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/ResponsiveSpacing.js')}\n />\n </Typography>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Column spanning\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n This example demonstrates the use of the <code>columnSpan</code> to configure the number of\n columns taken up by each <code>{`<MasonryItem />`}</code>.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/DiffColSizeMasonry.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/DiffColSizeMasonry.js')}\n />\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n However, you have to choose the value of <code>columnSpan</code> for each item carefully or\n fine-tune heights of items so that your masonry does not break.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/DiffColSizeMasonryBroken.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/DiffColSizeMasonryBroken.js')}\n />\n </Typography>\n <Typography className=\"text-32 mt-40 mb-10 font-700\" component=\"h2\">\n Server-side rendering\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n This example demonstrates the use of the <code>defaultHeight</code> to configure a fixed\n height of each <code>{`<MasonryItem />`}</code>. This is used for server-side rendering. By\n default, <code>height: 100%</code> will be set to the content of{' '}\n <code>{`<MasonryItem />`}</code>. If you change this, there can be unwanted gap between{' '}\n <code>{`<MasonryItem />`}</code> and the content that you pass to it.\n </Typography>\n <Typography className=\"mb-40\" component=\"div\">\n <FuseExample\n className=\"my-24\"\n iframe={false}\n component={\n require('app/main/documentation/material-ui-components/components/masonry/SSRMasonry.js')\n .default\n }\n raw={require('!raw-loader!app/main/documentation/material-ui-components/components/masonry/SSRMasonry.js')}\n />\n </Typography>\n </>\n );\n}", "function eltdfOnWindowResize() {\n eltdfInitProductListMasonryShortcode();\n }", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div);\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round(getStyleSize(style.width)) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n body.removeChild(div);\n }", "function initBlogMasonryFullWidth(){\n\t\"use strict\";\n\n\tif($j('.masonry_full_width').length){\n\t\tvar width_blog = $j('.full_width_inner').width();\n\n\t\t$j('.masonry_full_width').width(width_blog);\n\t\tvar $container = $j('.masonry_full_width');\n\n\t\t$j('.filter').click(function(){\n\t\t\tvar selector = $j(this).attr('data-filter');\n\t\t\t$container.isotope({ filter: selector });\n\t\t\treturn false;\n\t\t});\n\t\tif( $container.hasClass('masonry_infinite_scroll')){\n\t\t\t$container.infinitescroll({\n\t\t\t\t\tnavSelector : '.blog_infinite_scroll_button span',\n\t\t\t\t\tnextSelector : '.blog_infinite_scroll_button span a',\n\t\t\t\t\titemSelector : 'article',\n\t\t\t\t\tloading: {\n\t\t\t\t\t\tfinishedMsg: finished_text,\n\t\t\t\t\t\tmsgText : loading_text\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t// call Isotope as a callback\n\t\t\t\tfunction( newElements ) {\n\t\t\t\t\t$container.isotope( 'appended', $j( newElements ) );\n\t\t\t\t\tfitVideo();\n\t\t\t\t\tfitAudio();\n initFlexSlider();\n\n setTimeout(function() {\n $j('.blog_holder.masonry_full_width').isotope( 'layout');\n }, 400);\n\t\t\t\t}\n\t\t\t);\n\t\t}else if($container.hasClass('masonry_load_more')){\n\n\n\t\t\tvar i = 1;\n\t\t\t$j('.blog_load_more_button a').off('click tap').on('click tap', function(e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvar link = $j(this).attr('href');\n\t\t\t\tvar $content = '.masonry_load_more';\n\t\t\t\tvar $anchor = '.blog_load_more_button a';\n\t\t\t\tvar $next_href = $j($anchor).attr('href');\n\t\t\t\t$j.get(link+'', function(data){\n\t\t\t\t\tvar $new_content = $j($content, data).wrapInner('').html();\n\t\t\t\t\t$next_href = $j($anchor, data).attr('href');\n\t\t\t\t\t$container.append( $j( $new_content) ).isotope( 'reloadItems' ).isotope({ sortBy: 'original-order' });\n\t\t\t\t\tfitVideo();\n\t\t\t\t\tfitAudio();\n initFlexSlider();\n\n setTimeout(function() {\n $j('.blog_holder.masonry_full_width').isotope( 'layout');\n }, 400);\n\n\t\t\t\t\tif($j('.blog_load_more_button span').attr('rel') > i) {\n\t\t\t\t\t\t$j('.blog_load_more_button a').attr('href', $next_href); // Change the next URL\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$j('.blog_load_more_button').remove();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\ti++;\n\t\t\t});\n\n\t\t}\n\n $container.waitForImages(function() {\n setTimeout(function() {\n $container.isotope({\n itemSelector: 'article',\n resizable: false,\n masonry: { columnWidth: '.blog_holder_grid_sizer',gutter: '.blog_holder_grid_gutter'}\n });\n\n $j('.masonry_full_width').animate({opacity: \"1\"}, 500);\n }, 400);\n });\n\t}\n}", "function qodefOnWindowLoad() {\n qodefInitProductListMasonryShortcode();\n }", "initGrid() {\n \n // Initialize our packery grid\n let grid = this.$('.grid');\n \n grid.packery({\n percentPosition: true,\n itemSelector: '.grid-item',\n gutter: 10,\n });\n \n // Grid elements are draggable\n grid.find('.grid-item').each( function( i, gridItem ) {\n var draggie = new Draggabilly( gridItem );\n // bind drag events to Packery\n grid.packery( 'bindDraggabillyEvents', draggie );\n });\n \n // Resize grid elements on click \n // NOTE that in the future we want this to be encpsulated in some sort of button, etc.\n // Otherwise it happens any time you drag the element, which is really annoying\n // (Commenting out for now)\n /*grid.on( 'click', '.grid-item', function( event ) {\n var $item = $( event.currentTarget );\n // change size of item by toggling large class\n $item.toggleClass('grid-item--large');\n if ( $item.is('.grid-item--large') ) {\n // fit large item\n grid.packery( 'fit', event.currentTarget );\n } else {\n // back to small, shiftLayout back\n grid.packery('shiftLayout');\n }\n });*/\n \n }", "layoutDom(type = 'gridOne') {\n let randomNum = new Date().getTime();\n let configHeight = $(window).height() - 75 + 'px';\n let domType = {\n gridOne() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '<div class = \"columnOne columnOne_' + randomNum + '\"></div>' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"widgetAction\">' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n },\n gridTwo() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '<div class = \"columnTwo columnT_' + randomNum + '\"></div>' +\n '<div class = \"columnTwo columnTwo_' + randomNum + '\"></div>' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"widgetAction\">' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n },\n gridThree() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '<div class = \"columnThree columnTh_' + randomNum + '\"></div>' +\n '<div class = \"columnThree columnThr_' + randomNum + '\"></div>' +\n '<div class = \"columnThree columnThree_' + randomNum + '\"></div>' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"widgetAction\">' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n },\n gridChart() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"chartAction\">' +\n '<span class = \"chartTitle\"><i class=\"iconType\">chartName</i></span>' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n }\n };\n\n return domType[type] ? domType[type]() : domType['gridOne']();\n }", "function generateLayout() {\n $('.layout-display').each(function () {\n for (var i = 0; i < $(this).attr('data-max'); i++) {\n $(this).append('<div class=\"grid item\"></div>');\n }\n\n\n displayLayoutInfo($(this).parents('.layout'));\n resizeItems($(this));\n });\n}", "function Packer(){}", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n\n isSetup = true; // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div); // round value for browser zoom. desandro/masonry#928\n\n isBoxSizeOuter = Math.round(getStyleSize(style.width)) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n body.removeChild(div);\n } // -------------------------- getSize -------------------------- //", "function setup() {\n\n\n\n var $targetedEls;\n\n //For each area that we've hooked this module to,\n //update it independently from the others.\n $modules.each(function(index, el) {\n\n //Loop through our object that contains all the selectors\n //we need to check for. If it finds any, compare their heights\n //and set them all to be equal to the tallest.\n for (var subject in subjects) {\n\n if (subjects.hasOwnProperty(subject) && $(subject).length) {\n\n //Gets the array of selectors we want to play with\n childEls = subjects[subject];\n\n //For each selector in the array\n //(each group of things that should have matching heights)\n //Gets tallest of the group and sets the rest to that height\n for (var i = childEls.length - 1; i >= 0; i--) {\n\n $targetedEls = $(this).find(subject + ' ' + childEls[i]);\n\n //Only do this bit if the selector is found\n if ($targetedEls.length) {\n //Set all to auto first so we can start fresh (window resize etc)\n $targetedEls.height('auto');\n }\n\n setNewHeight($targetedEls, getTallestHeight($targetedEls));\n\n }\n }\n }\n });\n }", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n var _this = this;\n function hideReveal() {\n _this.reveal( hiddenMatched );\n _this.hide( visibleUnmatched );\n }\n\n if ( this._isInstant ) {\n this._noTransition( hideReveal );\n } else {\n hideReveal();\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter === 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n Isotope.prototype.updateSortData = function( elems ) {\n this._getSorters();\n // update item sort data\n // default to all items if none are passed in\n elems = makeArray( elems );\n var items = this.getItems( elems );\n // if no items found, update all items\n items = items.length ? items : this.items;\n this._updateItemsSortData( items );\n };\n\n Isotope.prototype._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n Isotope.prototype._updateItemsSortData = function( items ) {\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n var filteredItems = this._noTransition( function() {\n return this._filter( items );\n });\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n /*\n // this way adds hides new filtered items with NO transition\n // so user can't see if new hidden items have been inserted\n var filteredInsertItems;\n this._noTransition( function() {\n filteredInsertItems = this._filter( items );\n // hide all new items\n this.hide( filteredInsertItems );\n });\n // */\n // this way hides new filtered items with transition\n // so user at least sees that something has been added\n var filteredInsertItems = this._filter( items );\n // hide all newitems\n this._noTransition( function() {\n this.hide( filteredInsertItems );\n });\n // */\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @returns ret\n * @private\n */\n Isotope.prototype._noTransition = function( fn ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.call( this );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n var _this = this;\n function hideReveal() {\n _this.reveal( hiddenMatched );\n _this.hide( visibleUnmatched );\n }\n\n if ( this._isInstant ) {\n this._noTransition( hideReveal );\n } else {\n hideReveal();\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter === 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n Isotope.prototype.updateSortData = function( elems ) {\n // get items\n var items;\n if ( elems ) {\n elems = makeArray( elems );\n items = this.getItems( elems );\n } else {\n // update all items if no elems provided\n items = this.items;\n }\n\n this._getSorters();\n this._updateItemsSortData( items );\n };\n\n Isotope.prototype._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n Isotope.prototype._updateItemsSortData = function( items ) {\n // do not update if no items\n var len = items && items.length;\n\n for ( var i=0; len && i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n var filteredItems = this._noTransition( function() {\n return this._filter( items );\n });\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n /*\n // this way adds hides new filtered items with NO transition\n // so user can't see if new hidden items have been inserted\n var filteredInsertItems;\n this._noTransition( function() {\n filteredInsertItems = this._filter( items );\n // hide all new items\n this.hide( filteredInsertItems );\n });\n // */\n // this way hides new filtered items with transition\n // so user at least sees that something has been added\n var filteredInsertItems = this._filter( items );\n // hide all newitems\n this._noTransition( function() {\n this.hide( filteredInsertItems );\n });\n // */\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n Isotope.prototype.shuffle = function() {\n // update random sortData\n for ( var i=0, len = this.items.length; i < len; i++ ) {\n var item = this.items[i];\n item.sortData.random = Math.random();\n }\n this.options.sortBy = 'random';\n this._sort();\n this._layout();\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @returns ret\n * @private\n */\n Isotope.prototype._noTransition = function( fn ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.call( this );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- helper methods ----- //\n\n /**\n * getter method for getting filtered item elements\n * @returns {Array} elems - collection of item elements\n */\n Isotope.prototype.getFilteredItemElements = function() {\n var elems = [];\n for ( var i=0, len = this.filteredItems.length; i < len; i++ ) {\n elems.push( this.filteredItems[i].element );\n }\n return elems;\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n var _this = this;\n function hideReveal() {\n _this.reveal( hiddenMatched );\n _this.hide( visibleUnmatched );\n }\n\n if ( this._isInstant ) {\n this._noTransition( hideReveal );\n } else {\n hideReveal();\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter === 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n Isotope.prototype.updateSortData = function( elems ) {\n // get items\n var items;\n if ( elems ) {\n elems = makeArray( elems );\n items = this.getItems( elems );\n } else {\n // update all items if no elems provided\n items = this.items;\n }\n\n this._getSorters();\n this._updateItemsSortData( items );\n };\n\n Isotope.prototype._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n Isotope.prototype._updateItemsSortData = function( items ) {\n // do not update if no items\n var len = items && items.length;\n\n for ( var i=0; len && i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n var filteredItems = this._noTransition( function() {\n return this._filter( items );\n });\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n /*\n // this way adds hides new filtered items with NO transition\n // so user can't see if new hidden items have been inserted\n var filteredInsertItems;\n this._noTransition( function() {\n filteredInsertItems = this._filter( items );\n // hide all new items\n this.hide( filteredInsertItems );\n });\n // */\n // this way hides new filtered items with transition\n // so user at least sees that something has been added\n var filteredInsertItems = this._filter( items );\n // hide all newitems\n this._noTransition( function() {\n this.hide( filteredInsertItems );\n });\n // */\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n Isotope.prototype.shuffle = function() {\n // update random sortData\n for ( var i=0, len = this.items.length; i < len; i++ ) {\n var item = this.items[i];\n item.sortData.random = Math.random();\n }\n this.options.sortBy = 'random';\n this._sort();\n this._layout();\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @returns ret\n * @private\n */\n Isotope.prototype._noTransition = function( fn ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.call( this );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- helper methods ----- //\n\n /**\n * getter method for getting filtered item elements\n * @returns {Array} elems - collection of item elements\n */\n Isotope.prototype.getFilteredItemElements = function() {\n var elems = [];\n for ( var i=0, len = this.filteredItems.length; i < len; i++ ) {\n elems.push( this.filteredItems[i].element );\n }\n return elems;\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n var _this = this;\n function hideReveal() {\n _this.reveal( hiddenMatched );\n _this.hide( visibleUnmatched );\n }\n\n if ( this._isInstant ) {\n this._noTransition( hideReveal );\n } else {\n hideReveal();\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter === 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n Isotope.prototype.updateSortData = function( elems ) {\n // get items\n var items;\n if ( elems ) {\n elems = makeArray( elems );\n items = this.getItems( elems );\n } else {\n // update all items if no elems provided\n items = this.items;\n }\n\n this._getSorters();\n this._updateItemsSortData( items );\n };\n\n Isotope.prototype._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n Isotope.prototype._updateItemsSortData = function( items ) {\n // do not update if no items\n var len = items && items.length;\n\n for ( var i=0; len && i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n var filteredItems = this._noTransition( function() {\n return this._filter( items );\n });\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n /*\n // this way adds hides new filtered items with NO transition\n // so user can't see if new hidden items have been inserted\n var filteredInsertItems;\n this._noTransition( function() {\n filteredInsertItems = this._filter( items );\n // hide all new items\n this.hide( filteredInsertItems );\n });\n // */\n // this way hides new filtered items with transition\n // so user at least sees that something has been added\n var filteredInsertItems = this._filter( items );\n // hide all newitems\n this._noTransition( function() {\n this.hide( filteredInsertItems );\n });\n // */\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n Isotope.prototype.shuffle = function() {\n // update random sortData\n for ( var i=0, len = this.items.length; i < len; i++ ) {\n var item = this.items[i];\n item.sortData.random = Math.random();\n }\n this.options.sortBy = 'random';\n this._sort();\n this._layout();\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @returns ret\n * @private\n */\n Isotope.prototype._noTransition = function( fn ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.call( this );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- helper methods ----- //\n\n /**\n * getter method for getting filtered item elements\n * @returns {Array} elems - collection of item elements\n */\n Isotope.prototype.getFilteredItemElements = function() {\n var elems = [];\n for ( var i=0, len = this.filteredItems.length; i < len; i++ ) {\n elems.push( this.filteredItems[i].element );\n }\n return elems;\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n var _this = this;\n function hideReveal() {\n _this.reveal( hiddenMatched );\n _this.hide( visibleUnmatched );\n }\n\n if ( this._isInstant ) {\n this._noTransition( hideReveal );\n } else {\n hideReveal();\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter === 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n Isotope.prototype.updateSortData = function( elems ) {\n // get items\n var items;\n if ( elems ) {\n elems = makeArray( elems );\n items = this.getItems( elems );\n } else {\n // update all items if no elems provided\n items = this.items;\n }\n\n this._getSorters();\n this._updateItemsSortData( items );\n };\n\n Isotope.prototype._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n Isotope.prototype._updateItemsSortData = function( items ) {\n // do not update if no items\n var len = items && items.length;\n\n for ( var i=0; len && i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n var filteredItems = this._noTransition( function() {\n return this._filter( items );\n });\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n /*\n // this way adds hides new filtered items with NO transition\n // so user can't see if new hidden items have been inserted\n var filteredInsertItems;\n this._noTransition( function() {\n filteredInsertItems = this._filter( items );\n // hide all new items\n this.hide( filteredInsertItems );\n });\n // */\n // this way hides new filtered items with transition\n // so user at least sees that something has been added\n var filteredInsertItems = this._filter( items );\n // hide all newitems\n this._noTransition( function() {\n this.hide( filteredInsertItems );\n });\n // */\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n Isotope.prototype.shuffle = function() {\n // update random sortData\n for ( var i=0, len = this.items.length; i < len; i++ ) {\n var item = this.items[i];\n item.sortData.random = Math.random();\n }\n this.options.sortBy = 'random';\n this._sort();\n this._layout();\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @returns ret\n * @private\n */\n Isotope.prototype._noTransition = function( fn ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.call( this );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- helper methods ----- //\n\n /**\n * getter method for getting filtered item elements\n * @returns {Array} elems - collection of item elements\n */\n Isotope.prototype.getFilteredItemElements = function() {\n var elems = [];\n for ( var i=0, len = this.filteredItems.length; i < len; i++ ) {\n elems.push( this.filteredItems[i].element );\n }\n return elems;\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function enableMasonry() {\r\n if($('.sortable-masonry').length){\r\n\r\n var winDow = $(window);\r\n // Needed variables\r\n var $container=$('.sortable-masonry .items-container');\r\n var $filter=$('.sortable-masonry .filter-btns');\r\n\r\n $container.isotope({\r\n filter:'*',\r\n masonry: {\r\n columnWidth : 1\r\n },\r\n animationOptions:{\r\n duration:1000,\r\n easing:'linear'\r\n }\r\n });\r\n\r\n\r\n // Isotope Filter\r\n $filter.find('li').on('click', function(){\r\n var selector = $(this).attr('data-filter');\r\n\r\n try {\r\n $container.isotope({\r\n filter\t: selector,\r\n animationOptions: {\r\n duration: 1000,\r\n easing\t: 'linear',\r\n queue\t: false\r\n }\r\n });\r\n } catch(err) {\r\n\r\n }\r\n return false;\r\n });\r\n\r\n\r\n winDow.bind('resize', function(){\r\n var selector = $filter.find('li.active').attr('data-filter');\r\n\r\n $container.isotope({\r\n filter\t: selector,\r\n animationOptions: {\r\n duration: 1000,\r\n easing\t: 'linear',\r\n queue\t: false\r\n }\r\n });\r\n });\r\n\r\n\r\n var filterItemA\t= $('.sortable-masonry .filter-btns li');\r\n\r\n filterItemA.on('click', function(){\r\n var $this = $(this);\r\n if ( !$this.hasClass('active')) {\r\n filterItemA.removeClass('active');\r\n $this.addClass('active');\r\n }\r\n });\r\n }\r\n }", "function constructAMD() {\n\n\t\t//create a library instance\n\t\treturn init();\n\n\t\t//spawns a library instance\n\t\tfunction init() {\n\t\t\tvar library;\n\t\t\tlibrary = factory('amd');\n\t\t\tlibrary.fork = init;\n\t\t\treturn library;\n\t\t}\n\t}", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Isotope.prototype.settings.item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this.updateSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n return this._isInstant = isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n // HACK\n // disable transition if instant\n var _transitionDuration = this.options.transitionDuration;\n if ( this._isInstant ) {\n this.options.transitionDuration = 0;\n }\n this.reveal( hiddenMatched );\n this.hide( visibleUnmatched );\n // set back\n if ( this._isInstant ) {\n this.options.transitionDuration = _transitionDuration;\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n var test;\n if ( jQuery && this.options.isJQueryFiltering ) {\n test = function( item ) {\n return jQuery( item.element ).is( filter );\n };\n } else if ( typeof filter === 'function' ) {\n test = function( item ) {\n return filter( item.element );\n };\n } else {\n test = function( item ) {\n return matchesSelector( item.element, filter );\n };\n }\n return test;\n };\n\n // -------------------------- sorting -------------------------- //\n\n Isotope.prototype.updateSortData = function( items ) {\n // update sorters\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n // update item sort data\n // default to all items if none are passed in\n items = items || this.items;\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = getParser( args[1] );\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n // return a parser function if arg matches\n function getParser( arg ) {\n var parser;\n switch ( arg ) {\n case 'parseInt' :\n parser = function( val ) {\n return parseInt( val, 10 );\n };\n break;\n case 'parseFloat' :\n parser = function( val ) {\n return parseFloat( val );\n };\n break;\n default :\n // just return val if parser isn't one of these\n // TODO - console log that that parser doesn't exist\n parser = function( val ) {\n return val;\n };\n }\n return parser;\n }\n\n return mungeSorter;\n })();\n\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n var mode = this._mode();\n // HACK copy over some options\n mode.options.isOriginLeft = this.options.isOriginLeft;\n mode.options.isOriginTop = this.options.isOriginTop;\n mode._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.resize = function() {\n this._mode().resize();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n // disable transition for filtering\n var transitionDuration = this.options.transitionDuration;\n this.options.transitionDuration = 0;\n var filteredItems = this._filter( items );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n this.arrange();\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "createGrids () {\n }", "function setup() {\n // setup once\n if (isSetup) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild(div);\n var style = getStyle(div);\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round(getStyleSize(style.width)) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild(div);\n }", "function createImageLayout(data) {\n let container = document.querySelector(\".collection\");\n data.forEach(photo => {\n let imageContainer = document.createElement('div');\n imageContainer.className = \"collection-item\";\n let img = document.createElement('img');\n img.src = photo.urls.thumb;\n imageContainer.append(img);\n container.append(imageContainer);\n });\n\n //use Masonry for adaptive collection images\n let elem = document.querySelector('.collection');\n let msnry = new Masonry(elem, {\n // options\n itemSelector: '.collection-item',\n columnWidth: 200,\n fitWidth: true,\n gutter: 15\n });\n}", "function isotopeFn ( page ) {\n\n\t// define variables\n\t\tvar bodyWidth \t= pageWrap.width(),\n\t\t\tcontainer \t= $('#'+ page +'-container'),\n\t\t\titem \t\t= $('.'+ page +'-post'),\n\t\t\titemVisible = item.filter(\":visible\"),\n\t\t\tlayout \t\t= ( container.attr('data-layout') !== '' ) ? container.attr('data-layout') : 'masonry',\n\t\t\tgutterHorz \t= parseInt( container.attr('data-gutter-horz'), 10 ),\n\t\t\tgutterVert \t= parseInt( container.attr('data-gutter-vert'), 10 ),\n\t\t\tcolumns \t= 0,\n\t\t\tx \t\t\t= 0,\n\t\t\tcolumnsRate = container.attr('data-columns-rate'),\n\t\t\tcontWidth \t= Math.floor( container.width() + gutterHorz - 0.3 ),\n\t\t\tpostMedia \t= itemVisible.find('.post-media'),\n\t\t\taspectRatio = parseInt( container.attr('data-aspect-height'), 10 ) / parseInt( container.attr('data-aspect-width'), 10 ),\n\t\t\tmaxHieght \t= -1,\n\t\t\tmaxTop \t\t= -1;\n\n\t\titem.addClass('rf-isotope-item');\n\n\t// reset\n\t\titem.css('min-height', '');\n\t\tpostMedia.find('.link-and-quote').css('min-height', '');\n\t\titem.removeClass('rf-last-item rf-last-row');\n\n\t// Brakepoints\n\n\t\t// Permament 1 column\n\t\tif ( columnsRate === \"one\" ) {\n\t\t\tcolumns = 1;\n\n\t\t// Permament 2 column\n\t\t} else if ( columnsRate === \"two\" ) {\n\t\t\tcolumns = 2;\n\n\t\t\tif( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\t\t\t}\n\n\t\t// Permament 3 column\n\t\t} else if ( columnsRate === \"three\" ) {\n\t\t\tcolumns = 3;\n\n\t\t\tif( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\t\t\t} else if( bodyWidth <= 900 ) {\n\t\t\t\tcolumns = 2;\n\t\t\t}\n\n\t\t// Permament 4 column\n\t\t} else if ( columnsRate === \"four\" ) {\n\t\t\tcolumns = 4;\n\n\t\t\tif( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\t\t\t} else if( bodyWidth <= 900 ) {\n\t\t\t\tcolumns = 2;\n\t\t\t}\n\n\t\t// or columns width brakepoints\n\t\t} else {\n\n\t\t\tcolumnsRate = parseInt( columnsRate, 10 );\n\n\t\t\t// Viewport 600\n\t\t\tif ( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\n\t\t\t// Viewport 900\n\t\t\t} else if ( $('#sidebar, #sidebar-top').css('display') === 'none' ) {\n\t\t\t\tx = ( columnsRate <= 0 ? 1 : columnsRate );\n\t\t\t\tcolumns = 1 + x;\n\n\t\t\t// Viewport 1250\n\t\t\t} else if ( bodyWidth <= 1250 ) {\n\t\t\t\tx = ( columnsRate <= 0 ? 0 : columnsRate );\n\t\t\t\tcolumns = 2 + x;\n\n\t\t\t// Viewport 1600\n\t\t\t} else if ( bodyWidth <= 1600 ) {\n\t\t\t\tcolumns = 3 + columnsRate;\n\n\t\t\t// Viewport 1950\n\t\t\t} else if ( bodyWidth <= 1950 ) {\n\t\t\t\tcolumns = 4 + columnsRate;\n\n\t\t\t// Viewport 2300\n\t\t\t} else if ( bodyWidth <= 2300 ) {\n\t\t\t\tcolumns = 5 + columnsRate;\n\n\t\t\t// Viewport 2650\n\t\t\t} else if ( bodyWidth <= 2650 ) {\n\t\t\t\tcolumns = 6 + columnsRate;\n\n\t\t\t// Viewport 3000\n\t\t\t} else if ( bodyWidth <= 3000 ) {\n\t\t\t\tcolumns = 7 + columnsRate;\n\n\t\t\t// Viewport 3350\n\t\t\t} else if ( bodyWidth <= 3350 ) {\n\t\t\t\tcolumns = 8 + columnsRate;\n\n\t\t\t// Viewport 3350+\n\t\t\t} else {\n\t\t\t\tcolumns = 9 + columnsRate;\n\t\t\t}\n\t\t}\n\n\t// set item width\n\t\tif ( layout !== 'masonry-metro' ) {\n\t\t\titem.outerWidth( Math.floor( contWidth / columns - gutterHorz ) );\n\t\t} else {\n\t\t\t$('.'+ page +'-grid-sizer, .'+ page +'-post.post-width1x').outerWidth( Math.floor( contWidth / 3 - gutterHorz ) );\n\t\t\t$('.'+ page +'-post.post-width2x').outerWidth( Math.floor( contWidth / 3 ) * 2 - gutterHorz);\n\t\t}\n\n\t// set gutters\n\t\tif ( layout === 'fitRows' ) {\n\t\t\titem.css('margin-right', gutterHorz + 'px');\n\t\t}\n\n\t\titem.css('margin-bottom', gutterVert + 'px');\n\n\t// Link & Quote heights\n\t\tif( layout === \"fitRows\" ) {\n\t\t\tpostMedia.find('.link-and-quote, video').css('min-height', postMedia.width() * aspectRatio + 'px');\n\t\t}\n\n\t\t// add last class\n\t\titemVisible.last().addClass('rf-last-item');\n\n\t// add last row & make all post equal height\n\t\titemVisible.each(function ( index ) {\n\n\t\t\t// define\n\t\t\tvar thisHieght = $(this).outerHeight(),\n\t\t\t\tthisTop = parseInt( $(this).css('top') , 10 );\n\n\t\t\tif ( ( index + 1 ) % columns === 0 ) {\n\t\t\t\t$(this).addClass('rf-last-item');\n\t\t\t}\n\n\t\t\t// determine max height\n\t\t\tif ( thisHieght > maxHieght ) {\n\t\t\t\tmaxHieght = thisHieght;\n\t\t\t}\n\n\t\t\t// determine last row\n\t\t\tif ( thisTop > maxTop ) {\n\t\t\t\tmaxTop = thisTop;\n\t\t\t}\n\t\t\t\n\t\t});\n\n\t\tif ( layout === 'fitRows' ) {\n\t\t\titemVisible.each(function() {\n\n\t\t\t\tif ( parseInt( $(this).css('top') ) === maxTop ) {\n\t\t\t\t\t$(this).addClass('rf-last-row');\n\t\t\t\t}\n\n\t\t\t\t$(this).css('min-height', maxHieght);\n\n\t\t\t});\n\t\t}\n\n\t// define masonry 'columnWidth' option\n\t\tvar columnWidth = contWidth / columns;\n\n\t// metro layout - based on 3 columns masonry \n\t\tif ( layout === 'masonry-metro' ) {\n\t\t\tlayout = 'masonry';\n\n\t\t\tif ( page === 'blog' ) {\n\t\t\t\tcolumnWidth = '.blog-grid-sizer';\n\t\t\t} else if ( page === 'portfolio' ) {\n\t\t\t\tcolumnWidth = '.portfolio-grid-sizer';\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t// run isotope on Portfolio & Blog\n\t\tcontainer.isotope({\n\t\t\titemSelector: 'article',\n\t\t transitionDuration: '0.6s',\n\t\t hiddenStyle: {\n\t\t transform: 'scale(0.001)'\n\t\t },\n\t\t visibleStyle: {\n\t\t transform: 'scale(1)'\n\t\t },\n\t\t\tlayoutMode : layout,\n\t\t\tmasonry: {\n\t\t\t\tcomlumnWidth: columnWidth,\n\t\t\t\tgutter: gutterHorz\n\t\t\t}\n\t\t});\n\n\t\t// sidebar equal\n\t\tsidebarEqual();\n\n\t}", "setLayout() {\n const {\n container,\n state,\n } = this\n const {\n heights,\n } = state\n var element = document.querySelector('.masonry-panel'),\n elements = document.querySelectorAll('.masonry-panel'),\n style = window.getComputedStyle(element),\n width = style.getPropertyValue('width');\n width = width.replace('px', '');\n width = width/window.innerWidth;\n var cols = Math.ceil(1/width) - 1;\n var number = (Math.ceil(elements.length/cols) + 1);\n this.state.maxHeight = (Math.max(...heights));\n var targetHeight = this.state.maxHeight + (17 * number);\n container.style.height = `${targetHeight}px`\n }", "function initIsotope(container, masonryObj, columnSize) {\r\n\r\n // modified Isotope methods for gutters in masonry\r\n $.Isotope.prototype._getMasonryGutterColumns = function () {\r\n var gutter = this.options.masonry && this.options.masonry.gutterWidth || 0;\r\n containerWidth = this.element.width();\r\n\r\n this.masonry.columnWidth = this.options.masonry && this.options.masonry.columnWidth ||\r\n // or use the size of the first item\r\n this.$filteredAtoms.outerWidth(true) ||\r\n // if there's no items, use size of container\r\n containerWidth;\r\n\r\n this.masonry.columnWidth += gutter;\r\n this.masonry.cols = Math.floor((containerWidth + gutter) / this.masonry.columnWidth);\r\n this.masonry.cols = Math.max(this.masonry.cols, 1);\r\n };\r\n\r\n $.Isotope.prototype._masonryReset = function () {\r\n // layout-specific props\r\n this.masonry = {};\r\n // FIXME shouldn't have to call this again\r\n this._getMasonryGutterColumns();\r\n var i = this.masonry.cols;\r\n this.masonry.colYs = [];\r\n while (i--) {\r\n this.masonry.colYs.push(0);\r\n }\r\n };\r\n\r\n $.Isotope.prototype._masonryResizeChanged = function () {\r\n var prevSegments = this.masonry.cols;\r\n // update cols/rows\r\n this._getMasonryGutterColumns();\r\n // return if updated cols/rows is not equal to previous\r\n return (this.masonry.cols !== prevSegments);\r\n };\r\n\r\n jQuery(window).on(\"load\", function () {\r\n\r\n if (typeof columnSize === \"undefined\") {\r\n columnSize = 155;\r\n }\r\n\r\n container.isotope({\r\n itemSelector: masonryObj,\r\n masonry: {\r\n columnWidth: parseInt(columnSize),\r\n gutterWidth: 10\r\n }\r\n });\r\n });\r\n}", "function enableMasonry() {\r\n if ($('.sortable-masonry').length) {\r\n\r\n var winDow = $(window);\r\n // Needed variables\r\n var $container = $('.sortable-masonry .items-container');\r\n var $filter = $('.filter-btns');\r\n\r\n $container.isotope({\r\n filter: '*',\r\n masonry: {\r\n columnWidth: 0\r\n },\r\n animationOptions: {\r\n duration: 500,\r\n easing: 'linear'\r\n }\r\n });\r\n\r\n\r\n // Isotope Filter \r\n $filter.find('li').click(function () {\r\n var selector = $(this).attr('data-filter');\r\n\r\n try {\r\n $container.isotope({\r\n filter: selector,\r\n animationOptions: {\r\n duration: 500,\r\n easing: 'linear',\r\n queue: false\r\n }\r\n });\r\n } catch (err) {\r\n\r\n }\r\n return false;\r\n });\r\n\r\n\r\n winDow.bind('resize', function () {\r\n var selector = $filter.find('li.active').attr('data-filter');\r\n\r\n $container.isotope({\r\n filter: selector,\r\n animationOptions: {\r\n duration: 500,\r\n easing: 'linear',\r\n queue: false\r\n }\r\n });\r\n });\r\n\r\n\r\n var filterItemA = $('.filter-btns li');\r\n\r\n filterItemA.on('click', function () {\r\n var $this = $(this);\r\n if (!$this.hasClass('active')) {\r\n filterItemA.removeClass('active');\r\n $this.addClass('active');\r\n }\r\n });\r\n }\r\n }", "function Module(){}", "function Module(){}", "function defaultGrid(){\n gridSize(24)\n createDivs(24)\n}", "function BaseLayouter() {}", "function BaseLayouter() {}", "function BaseLayouter() {}", "function defineDependencies() {\n define('jquery', [], function () { return root.jQuery; });\n define('ko', [], function () { return root.ko; });\n define('sammy', [], function () { return root.Sammy; });\n }", "function grid() {\n\tif ($('.js-grid').length) {\n\t\t$('.js-grid').isotope({\n\t\t\titemSelector: '.js-grid-item',\n\t\t\tpercentPositijs-grid-itemon: true\n\t\t});\n\t}\n}", "function definition1() {\n\t\t\t\t\t\t\tlog('provide', '/app/js/example1', 'resolved', 'module');\n\n\t\t\t\t\t\t\treturn function appJsExample1() {\n\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}", "function createInitialLayout() {\n return {\n name: 'grid',\n boundingBox: presetBoundingBox,\n }\n}", "function Md(){}", "function Md(){}", "function Md(){}", "function prepareMasonry() {\n\t\t$(loadingIcon).fadeIn(\"fast\"); // Show the loading icon\n\t\telmBusy = true;\n\n\t\t// Get the current category and attempt to find the link in primary-menu that it should correspondingly open\n\t\tvar category = getHash();\n\t\tvar searchUrl = antiHashizeUrl(category, false, true);\n\t\tvar possibleMenuItem = '#primary-menu li a[href=\"' + searchUrl + '\"]';\n\t\tif($(possibleMenuItem).length !== 0) {\n\t\t\tprimaryMenuEffect(possibleMenuItem);\n\t\t}\n\n\t\t// previous elements\n\t\tvar $previousElm = $(gridElementSpecific);\n\n\t\t// If its the frontpage, impersonate the priority-frontpage category\n\t\tif (category == \"all\") {\n\t\t\tcategory = \"priority-frontpage\";\n\t\t}\n\n\t\t// remove elements which are not chosen from previous\n\t\tvar $matchedElm = $(gridElement + \".\" + category);\n\t\tvar $removeElm = $previousElm.not($matchedElm);\n\n\t\t// previous elements which are to be kept\n\t\tvar $keptElm = $previousElm.filter($matchedElm);\n\n\t\t// get new elements - select all elm that have the corresponding\n\t\t// category and deselect all that are already there (from previous)\n\t\tvar $newElm = $allElm.filter(gridElement + \".\" + category).not($keptElm);\n\t\tvar $elmToBeRemoved = $previousElm.filter($removeElm);\n\n\t\t// Check if there are any elements to remove\n\t\tif($elmToBeRemoved.size() > 0){\n\t\t\tvar counterRemoved = 0;\n\t\t\t$elmToBeRemoved.fadeOut(\"slow\", function() {\n\t\t\t\t$(this).remove();\n\t\t\t\tcounterRemoved++;\n\t\t\t\tif ($elmToBeRemoved.length == counterRemoved) {\n\t\t\t\t\tbootstrapMasonry($newElm);\n\t\t\t\t}\n\t\t\t});\n\n\t\t// No elements to remove (e.g. going from subcat to topcat)\n\t\t} else {\n\t\t\tbootstrapMasonry($newElm);\n\t\t}\n\t}", "defineBEMBlocks() {\n return {\n container: (this.props.mod || 'cr-search-summary')\n }\n }", "function BaseLayouter() { }", "function enableMasonry() {\n\t\tif($('.masonry-gallery .items-container').length){\n\n\t\t\tvar winDow = $(window);\n\t\t\t// Needed variables\n\t\t\tvar $container=$('.masonry-gallery .items-container');\n\t\t\tvar $filter=$('.filter-btns');\n\n\t\t\t$container.isotope({\n\t\t\t\tfilter:'*',\n\t\t\t\t masonry: {\n\t\t\t\t\tcolumnWidth : '.masonry-item.small-item'\n\t\t\t\t },\n\t\t\t\tanimationOptions:{\n\t\t\t\t\tduration:500,\n\t\t\t\t\teasing:'linear'\n\t\t\t\t}\n\t\t\t});\n\n\n\t\t\t// Isotope Filter\n\t\t\t$filter.find('li').on('click', function(){\n\t\t\t\tvar selector = $(this).attr('data-filter');\n\n\t\t\t\ttry {\n\t\t\t\t\t$container.isotope({\n\t\t\t\t\t\tfilter\t: selector,\n\t\t\t\t\t\tanimationOptions: {\n\t\t\t\t\t\t\tduration: 500,\n\t\t\t\t\t\t\teasing\t: 'linear',\n\t\t\t\t\t\t\tqueue\t: false\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} catch(err) {\n\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\n\n\t\t\twinDow.on('resize', function(){\n\t\t\t\tvar selector = $filter.find('li.active').attr('data-filter');\n\n\t\t\t\t$container.isotope({\n\t\t\t\t\tfilter\t: selector,\n\t\t\t\t\tanimationOptions: {\n\t\t\t\t\t\tduration: 500,\n\t\t\t\t\t\teasing\t: 'linear',\n\t\t\t\t\t\tqueue\t: false\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\n\t\t\tvar filterItemA\t= $('.filter-btns li');\n\n\t\t\tfilterItemA.on('click', function(){\n\t\t\t\tvar $this = $(this);\n\t\t\t\tif ( !$this.hasClass('active')) {\n\t\t\t\t\tfilterItemA.removeClass('active');\n\t\t\t\t\t$this.addClass('active');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "function Layout()\n{\n \n}", "function define (name, dependencies, definition) {\n var requiredModules = [], i, depName;\n for (i = -1; depName = dependencies[++i]; ) {\n requiredModules.push(modules[depName]);\n }\n \n modules[name] = definition.apply(window, requiredModules);\n }", "wookmarkLayout(){\n let options = {\n autoResize: true, // This will auto-update the layout when the browser window is resized.\n align: 'center',\n // container: $tiles, // Optional, used for some extra CSS styling\n offset: 20, // Optional, the distance between grid items\n itemWidth:260, // Optional, the width of a grid item\n ignoreInactiveItems: false,\n onLayoutChanged: false,\n direction: 'left'\n };\n let $tiles = $(this.refs.tileWrap);\n\n\n $tiles.imagesLoaded()\n .always( ()=>{\n // Destroy the old handler\n if ($tiles.wookmarkInstance) {\n $tiles.wookmarkInstance.clear();\n }\n\n // Create a new layout handler.\n // $handler = $('li', $tiles);\n $tiles.wookmark(options);\n $tiles.wookmarkInstance.layout(true);\n } )\n .progress( (instance, image)=>{\n $(image.img).attr('height', image.img.height);\n } );\n\n }" ]
[ "0.6967798", "0.6717626", "0.66983855", "0.64926636", "0.64823717", "0.6478784", "0.6462467", "0.63906384", "0.63662136", "0.63321126", "0.63321126", "0.63321126", "0.63321126", "0.63321126", "0.63321126", "0.63321126", "0.63321126", "0.62169874", "0.61305934", "0.60737664", "0.604704", "0.5990666", "0.5910599", "0.5882354", "0.58774835", "0.58519465", "0.58097744", "0.580843", "0.57740253", "0.5742599", "0.5701807", "0.5616675", "0.55758786", "0.550084", "0.54541945", "0.54541945", "0.54541945", "0.54541945", "0.54541945", "0.54541945", "0.54541945", "0.54541945", "0.54541945", "0.54541945", "0.54541945", "0.54541945", "0.5428792", "0.54083407", "0.53954023", "0.5321238", "0.53029156", "0.52954817", "0.5289764", "0.5275866", "0.52464557", "0.52252626", "0.517548", "0.51532084", "0.51166457", "0.5114812", "0.5113898", "0.510847", "0.510847", "0.510847", "0.510847", "0.510847", "0.51048064", "0.51043046", "0.5083571", "0.5076948", "0.5067174", "0.5053469", "0.5036158", "0.5021955", "0.499663", "0.49955958", "0.49677885", "0.49677885", "0.49623403", "0.49408644", "0.49408644", "0.49408644", "0.49301586", "0.49282837", "0.49263212", "0.49182838", "0.48832628", "0.48832628", "0.48832628", "0.48787218", "0.48630214", "0.4851296", "0.48144293", "0.48075843", "0.48046812", "0.4790089" ]
0.6724973
5
helpers // extend objects
function extend( a, b ) { for ( var prop in b ) { a[ prop ] = b[ prop ]; } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extend() {}", "extend() {}", "function extend(a,b){for(var prop in b){a[prop]=b[prop];}return a;}", "function ExtraMethods() {}", "function _extend(){\n\t \n\t\tvar out = {};\n\t\t\n\t\t//Itterate over all objects and copy each property\n\t\t// shallow copy only \n\t\tvar len = arguments.length;\n\t\tfor(var i=0; i < len;i++)\n\t\t for (var prop in arguments[i]) { out[prop] = arguments[i][prop]; }\n\t\t \n\t\treturn(out);\n\t}", "add(obj){\n this.dict = this.extend(this.dict, obj);\n }", "static iextend(obj) {\n // eslint-disable-next-line prefer-rest-params\n each(slice.call(arguments, 1), function (source) {\n for (let prop in source) {\n if ({}.hasOwnProperty.call(source, prop)) {\n obj[prop] = source[prop];\n }\n }\n });\n return obj;\n }", "function BasicObject() {}", "function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}", "function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}", "function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}", "function obj(objec){\nreturn objec;\n}", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function mixin(obj) {\n each(functions(obj), function (name) {\n console.log('name', name);\n var func = (_[name] = obj[name]);\n _.prototype[name] = function () {\n //把方法挂到原型链上\n var args = [this._wrapped]; //['京城一灯']\n push.apply(args, arguments); //['京城一灯',回调函数]\n console.log(\"合并之后的args\", arguments);\n return func.apply(_, args)\n };\n });\n }", "function BasicObject(){}", "function BasicObject(){}", "function NXObject() {}", "function __Object__() {\n }", "function UtilsObject(app) {\n this.app = app;\n this.params = {};\n \n // create a new session\n this.typeOf = function( value ) {\n var s = typeof value;\n if (s === 'object') {\n if (value) {\n if (value instanceof Date) {\n s = 'date';\n } else if (value instanceof Array) {\n s = 'array';\n }\n\n } else {\n s = 'null';\n }\n }\n return s;\n };\n \n this.indexOf= function(array, idx) {\n var i, len = array.length;\n \n for( i=0; i<len; ++i ) {\n if( array[i] == idx )\n return i;\n }\n return false;\n };\n \n this.locationOf= function(array, idx, startptr) {\n var i, len = array.length;\n \n for( i=startptr; i<len; ++i ) {\n if( array[i] == idx )\n return i;\n }\n return false;\n };\n \n this.rangeOf= function(start, count) {\n var fin = start+count;\n var inc = fin > 0 ? 1 : -1;\n var srch=[];\n while( start != fin ) {\n srch.push(start);\n start += inc;\n }\n return srch;\n };\n\n this.cloneValues= function(obj, values) {\n for( var i in values ) {\n obj[i] = this.cloneObject( values[i] );\n }\n };\n \n this.isAlpha= function(value) {\n \tvar upperBoundUpper = \"A\".charCodeAt(0);\n \tvar lowerBoundUpper = \"Z\".charCodeAt(0);\n \tvar upperBoundLower = \"a\".charCodeAt(0);\n \tvar lowerBoundLower = \"z\".charCodeAt(0);\n\n \tfor (var i = 0; i < value.length; i++) {\n \t\tvar char = value.charCodeAt(i);\n \t\tif( (char >= upperBoundUpper && char <= lowerBoundUpper) ||\n \t\t\t(char >= upperBoundLower && char <= lowerBoundLower) )\n \t\t\tcontinue;\n \t\treturn false;\n\t\t}\n \treturn true;\n };\n this.isDigit= function(value) {\n \tvar upperBound = \"9\".charCodeAt(0);\n \tvar lowerBound = \"0\".charCodeAt(0);\n\n \tfor (var i = 0; i < value.length; i++) {\n \t\tvar char = value.charCodeAt(i);\n \t\tif( char <= upperBound && char >= lowerBound )\n \t\t\tcontinue;\n\t\t\treturn false;\n\t\t}\n \treturn true;\n };\n \n this.cloneObject= function(obj) {\n var clone;\n var typ = this.typeOf(obj);\n switch(typ){\n case 'date':\n clone = new Date();\n clone.setTime(obj.getTime());\n break;\n case 'object':\n clone={};\n for( var i in obj )\n {\n clone[i] = this.cloneObject(obj[i]);\n }\n break;\n case 'array':\n clone = obj.slice(0);\n break;\n case 'function':\n clone = null;\n break;\n default:\n intermed = JSON.stringify(obj);\n clone = JSON.parse(intermed);\n break;\n }\n return clone;\n };\n this.FibreRing = function( cb, obj ) {\n if( typeof obj != 'undefined' )\n cb = cb.bind(obj);\n return function() { wait.launchFiber( cb ) };\n };\n \n /* randomInt: produce a number between a and b. */\n this.randomInt = function(a,b)\n {\n return Math.floor( Math.random()*(b-a) + a );\n };\n this.randomNumber = this.randomInt;\n \n /* randomStr: produce a len length string of letters between a and Z and 0 and 9. */\n this.randomStr = function(len)\n {\n var w = '';\n while( len > 0 ) { len--;\n c = this.randomInt(0,61);\n if( c < 10 ) {\n w += c;\n } else if( c < 37 ) {\n w += String.fromCharCode( c + 87 );\n } else {\n w += String.fromCharCode( c + 30 );\n }\n }\n return w;\n };\n this.randomAlpha = this.randomStr;\n this.randomString = this.randomStr;\n \n\n this.flowNumber = function(n)\n {\n if( n > 1024001024 ) {\n return parseInt(n/1024001024) + \"G\"; //..\n } else if( n > 1024000 ) {\n return parseInt(n/1024000) + \"M\";\n } else if( n > 1024 ) {\n return parseInt(n/1024) + \"K\"; \n }\n return n + \"B\";\n };\n\n var server = null;\n \n this.connectMailer = function( ) {\n this.server = email.server.connect( {\n user: this.app.gmail_user,\n password: this.app.gmail_password,\n host: this.app.gmail_host,\n tls: {ciphers: \"SSLv3\"}\n } );\n };\n this.sendMessage = function( to, ccs, subj, msg, cb ) {\n if( this.server == null ) {\n connectMailer();\n }\n this.server.send( {\n text: msg,\n from: this.app.gmail_fullname + '<' + this.app.gmail_user + '>',\n to: to,\n cc: ccs,\n subject: subj }, function( err, message ) {\n console.log(err||message);\n cb(err,message);\n });\n };\n \n /*\n this.find = function() {\n this.cb.apply( null, arguments );\n };\n \n this.fin = function( runner, thisArg, args ) {\n \n var oldcb = args[ args.length-1 ];\n var carryobj = { 'cb': oldcb };\n args[ args.length-1 ] = this.find.bind( carryobj );\n \n runner.apply( thisArg, args ); \n };\n */\n \n /*\n this.ShoeSock = function( runner, thisArg, args ) {\n this.sock = new Sock( \"ws://localhost:8080\", \"echo-protocol\" );\n ock.send({'code':'c1'});\n \n var oldcb = args[ args.length-1 ];\n args[ args.length-1 ] = this.ShoeHorn;\n \n runner.apply( thisArg, args );\n };\n \n this.FibreSock = function( cb ) {\n \n }\n */\n}", "function extend( a, b ) {\r\n for ( var prop in b ) {\r\n a[ prop ] = b[ prop ];\r\n }\r\n return a;\r\n }", "function xx(a,b){return\"method\"!==b.kind||!b.ej||\"value\"in b.ej?(ia(),{kind:\"field\",key:Symbol(),oW:\"own\",ej:{},Dj:function(){\"function\"===typeof b.Dj&&(this[b.key]=b.Dj.call(this))},$l:function(c){c.Ca(b.key,a)}}):Object.assign(Object.assign({},b),{$l:function(c){c.Ca(b.key,a)}})}", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(baseObj, extObj) {\n for (var k in extObj) {\n if (!extObj.hasOwnProperty(k))\n continue;\n assert(!baseObj.hasOwnProperty(k));\n baseObj[k] = extObj[k];\n }\n return baseObj;\n }", "function baseObj(obj){\r\n for(var p in obj){\r\n this[p]=obj[p];\r\n }\r\n }", "function Object() {}", "function Object() {}", "function Object(){}", "function Object(){}", "function Utils(){}", "function __extend__(a,b) {\n\tfor ( var i in b ) {\n\t\tvar g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);\n\t\tif ( g || s ) {\n\t\t\tif ( g ) a.__defineGetter__(i, g);\n\t\t\tif ( s ) a.__defineSetter__(i, s);\n\t\t} else\n\t\t\ta[i] = b[i];\n\t} return a;\n}", "function __extend__(a,b) {\n\tfor ( var i in b ) {\n\t\tvar g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);\n\t\tif ( g || s ) {\n\t\t\tif ( g ) a.__defineGetter__(i, g);\n\t\t\tif ( s ) a.__defineSetter__(i, s);\n\t\t} else\n\t\t\ta[i] = b[i];\n\t} return a;\n}", "function extend( a, b ) {\n\t for ( var prop in b ) {\n\t a[ prop ] = b[ prop ];\n\t }\n\t return a;\n\t}", "function extend(to,_from){for(var key in _from){to[key]=_from[key];}return to;}", "function extend(to,_from){for(var key in _from){to[key]=_from[key];}return to;}", "function extend(to,_from){for(var key in _from){to[key]=_from[key];}return to;}", "function extend(obj, extension) {\n if (typeof extension !== 'object') { extension = extension(); }\n Object.keys(extension).forEach(function(key) {\n obj[key] = extension[key];\n });\n return obj;\n }", "function extend(a, b) {\n for (var i in b) {\n if (b.hasOwnProperty(i)) {\n a[i] = b[i];\n }\n }\n\n if (b.hasOwnProperty(\"toString\")) {\n a.toString = b.toString;\n }\n\n if (b.hasOwnProperty(\"valueOf\")) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n\t}", "combine(obj1, obj2)\n\t{\n\t\treturn _extend(_extend({}, obj1), obj2);\n\t}", "function extend(a, b) {\r\n for (var prop in b) {\r\n a[prop] = b[prop];\r\n }\r\n return a;\r\n }", "function extend(a,b){\n\tvar c={};\n\tfor(var i in a){\n\t\tif(a.hasOwnProperty(i)){\n\t\t\tc[i]=a[i];\n\t\t}\n\t}\n\tfor(var i in b){\n\t\tif(b.hasOwnProperty(i)){\n\t\t\tc[i]=b[i];\n\t\t}\n\t}\n\treturn c\n}", "function extend(a,b){\n\tvar c={};\n\tfor(var i in a){\n\t\tif(a.hasOwnProperty(i)){\n\t\t\tc[i]=a[i];\n\t\t}\n\t}\n\tfor(var i in b){\n\t\tif(b.hasOwnProperty(i)){\n\t\t\tc[i]=b[i];\n\t\t}\n\t}\n\treturn c\n}", "function extend(a,b){\n\tvar c={};\n\tfor(var i in a){\n\t\tif(a.hasOwnProperty(i)){\n\t\t\tc[i]=a[i];\n\t\t}\n\t}\n\tfor(var i in b){\n\t\tif(b.hasOwnProperty(i)){\n\t\t\tc[i]=b[i];\n\t\t}\n\t}\n\treturn c\n}", "objd(obj) {\n\n return toObject(obj);\n }", "function extend(obj, source) {\n for (var prop in source) {\n obj[prop] = source[prop];\n }\n return obj;\n }", "static initialize(obj, scale, rotate, zIndex) { \n obj['scale'] = scale;\n obj['rotate'] = rotate;\n obj['zIndex'] = zIndex;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend( obj, extension ){\n for ( var key in obj ){\n extension[key] = obj[key];\n }\n}", "function dummyObjects(name, age){\n this.name = name\n this.age = age\n}", "function extend(a, b) {\n for (var prop in b) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function Obj()\r\n{\r\n return {\r\n name: 'hamza',\r\n lastName : 'mubeen'\r\n }\r\n}", "function extend(a, b){\n for(var key in b)\n if(b.hasOwnProperty(key))\n a[key] = b[key];\n return a;\n }", "function Utils() {}", "function Utils() {}", "static initialize(obj, from, to) { \n obj['from'] = from;\n obj['to'] = to;\n }", "function extend(extension, obj) {\n\t\tfor(var key in extension) {\n\t\t\tobj[key] = extension[key];\n\t\t}\n\t}", "function Obj() {}", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }", "function extend( a, b ) {\r\n for ( var prop in b ) {\r\n a[ prop ] = b[ prop ];\r\n }\r\n return a;\r\n}", "function d(e,t){for(var n in e=e||{},t)t[n]&&t[n].constructor&&t[n].constructor===Object?(e[n]=e[n]||{},d(e[n],t[n])):e[n]=t[n];return e}", "function extend(a, b) {\n\t for( var i in b ) {\n\t a[i] = b[i];\n\t }\n\t return a;\n\t}", "function extend(o, e){\n each(e, function(v, n){\n if (is(o[n], 'object') && is(v, 'object')){\n o[n] = extend(o[n], v);\n } else if (v !== null) {\n o[n] = v;\n }\n });\n return o;\n}", "function $o(){}", "get object() {\n\n }", "function extend(obj, extension) {\n for (var key in extension) {\n obj[key] = extension[key];\n }\n return obj;\n}", "function dateObjects()\n{\n\n}", "static initialize(obj, type, items) { \n obj['type'] = type;\n obj['items'] = items;\n }", "function _extend (a, b) {\n\tfor (var k in b) a[k] = b[k];\n}", "function extend(obj, from, from2) {\n from && each(Object.keys(from), function(key) {\n obj[key] = from[key]\n })\n return from2 ? extend(obj, from2) : obj\n}", "function extend(a, b) {\n\t\tfor( var key in b ) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function obj() { return this; }", "function $o(){return $o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$o.apply(this,arguments)}", "function extend(a, b) {\n\t\tfor(var key in b) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function extendObj (oldObj, addObj){\n for (var key in addObj) {\n if (addObj.hasOwnProperty(key)) {\n oldObj[key]=addObj[key];\n }\n }\n return oldObj;\n}", "function extend( a, b ) {\n\t\tfor( var key in b ) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function extend( a, b ) {\n\t\tfor( var key in b ) { \n\t\t\tif( b.hasOwnProperty( key ) ) {\n\t\t\t\ta[key] = b[key];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "function Extend(target, source){\r\n if((target) && (source) && (typeof source == 'object')) {\r\n for(var property in source) {\r\n if (source.hasOwnProperty(property)) {\r\n try { target[property] = source[property]; } catch (exception) { ; }\r\n }\r\n }\r\n }\r\n return target;\r\n}", "initCustomFunctions() {/*To be overridden in sub class as needed*/}", "function extend( ) {\n var args, merged, aI, object, key;\n\n //grab the args\n args = Array.prototype.slice.call(arguments);\n\n //look for arrays\n merged = {};\n for(aI = 0; aI < args.length; aI += 1) {\n object = args[aI];\n if(typeof object === 'undefined') { continue; }\n\n //throw an error if an item is an invalid type\n if(typeof object !== 'object') { throw new Error('Cannot extend objects. All arguments must be objects.'); }\n\n //if we find an array then the merged object will be an array\n if(typeof object.push === 'function') {\n merged = [];\n break;\n }\n }\n\n //add the data to the merged object\n for(aI = 0; aI < args.length; aI += 1) {\n object = args[aI];\n\n if(typeof object !== 'object') { continue; }\n\n //loop through the object's properties\n for(key in object) {\n\n //the property must not be from a prototype\n if(!object.hasOwnProperty(key)) { continue; }\n\n //copy the property\n if(typeof object[key] === 'object' && typeof merged[key] === 'object') {\n merged[key] = extend(merged[key], object[key]);\n } else if(typeof object[key] === 'object') {\n merged[key] = clone(object[key]);\n } else if(typeof merged.push === 'function') {\n merged.push(object[key]);\n } else {\n merged[key] = object[key];\n }\n }\n }\n\n return merged;\n }", "function extend(obj, props) {\n\t\tvar empty = {};\t\n\t\t\n\t\tif(!obj) {\n\t\t\tobj = {};\n\t\t}\n\t\tfor(var i = 1, l = arguments.length; i < l; i++) {\n\t\t\tmixin(obj, arguments[i]);\n\t\t}\n\t\treturn obj;\n\t\t\n\t\tfunction mixin(target, source) {\n\t\t\tvar name, s, i;\n\t\t\tfor(name in source) {\n\t\t\t\tif(source.hasOwnProperty(name)) {\n\t\t\t\t\ts = source[name];\n\t\t\t\t\tif(!( name in target) || (target[name] !== s && (!( name in empty) || empty[name] !== s))) {\n\t\t\t\t\t\ttarget[name] = s;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn target;\n\t\t\t// Object\n\t\t}\t\t\n\t}", "function extend( obj, extension ){\n for ( var key in extension ){\n obj[key] = extension[key];\n }\n}", "function extend(base) {\n\t if (!base) base = {};\n\t for (var i = 1, l = arguments.length, arg; i < l && (arg = arguments[i] || {}); i++) {\n\t for (var name in arg) {\n\t base[name] = arg[name];\n\t }\n\t }return base;\n\t }", "function mixin( /* objects */ ) {\n var mixed = {};\n for (var arg of arguments) {\n for (var name of Object.getOwnPropertyNames(arg)) {\n var desc = Object.getOwnPropertyDescriptor(arg, name);\n Object.defineProperty(mixed, name, desc);\n }\n }\n return mixed;\n }" ]
[ "0.65491366", "0.65491366", "0.6241516", "0.6193384", "0.6184945", "0.6184535", "0.6170308", "0.61424136", "0.61262864", "0.61262864", "0.61262864", "0.61212605", "0.60223323", "0.5989742", "0.59867513", "0.59867513", "0.59615767", "0.5882699", "0.5867043", "0.58626276", "0.58615553", "0.58535135", "0.5849376", "0.5846635", "0.5805527", "0.5805527", "0.5780494", "0.5780494", "0.5780237", "0.5777183", "0.5777183", "0.5772423", "0.5769807", "0.5769807", "0.5769807", "0.5766037", "0.5762971", "0.5743008", "0.5742033", "0.5725838", "0.5725838", "0.5725838", "0.5720676", "0.57191175", "0.5718751", "0.5716262", "0.5715067", "0.5708841", "0.56994843", "0.5699264", "0.5699264", "0.56941843", "0.5677216", "0.5677216", "0.5677216", "0.56712556", "0.56675136", "0.5664533", "0.5664533", "0.56611294", "0.5661057", "0.5660528", "0.5658972", "0.5658972", "0.5651494", "0.564941", "0.5648082", "0.5646559", "0.5646221", "0.5645906", "0.5643163", "0.5630437", "0.5616338", "0.5608711", "0.5607218", "0.56068575", "0.55935174", "0.5592174", "0.5592007", "0.5588457", "0.55863154", "0.55863154", "0.55827236", "0.5581483", "0.55812776", "0.55788314", "0.55710775", "0.5569866", "0.55693525" ]
0.0
-1
turn element or nodeList into an array
function makeArray( obj ) { var ary = []; if ( isArray( obj ) ) { // use object if already an array ary = obj; } else if ( obj && typeof obj.length === 'number' ) { // convert nodeList to array for ( var i=0, len = obj.length; i < len; i++ ) { ary.push( obj[i] ); } } else { // array of single index ary.push( obj ); } return ary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertToArray(nodes){\n var array = null;\n try {\n array = Array.prototype.slice.call(nodes, 0); //non-IE and IE9+\n } catch (ex) {\n array = new Array();\n for (var i=0, len=nodes.length; i < len; i++){\n array.push(nodes[i]);\n }\n }\n return array;\n}", "getArrayFromNodeList(nodeList) {\r\n return [].slice.call(nodeList);\r\n }", "getArrayFromNodeList(nodeList) {\r\n return [].slice.call(nodeList);\r\n }", "function nodesToArr2() {\n let body = document.querySelector('body');\n return treeTags(body);\n}", "getArrayFromNodeList(nodeList) {\n return [].slice.call(nodeList);\n }", "function nodeListToArray (nodeList) {\n return Array.prototype.slice.call(nodeList);\n }", "function nodeListToArray (domNodeList) {\n if (Array.isArray(domNodeList)) {\n return domNodeList;\n } else {\n return Array.prototype.slice.call(domNodeList);\n }\n}", "function getArrayOfElements(value) {\n if (isSingular(value)) {\n // TODO: VirtualReference is not compatible to type Element\n return [value];\n }\n\n if (value instanceof NodeList) {\n return arrayFrom(value);\n }\n\n if (Array.isArray(value)) {\n return value;\n }\n\n try {\n return arrayFrom(document.querySelectorAll(value));\n } catch (e) {\n return [];\n }\n }", "function getArray(nodeList) {\n return [].slice.call(nodeList);\n}", "toArray() {\n let answer = [];\n let node = this;\n while (node) {\n answer.push(node.value);\n node = node.next;\n }\n return answer;\n }", "function getArrayOfElements(value) {\n if (isSingular(value)) {\n // TODO: VirtualReference is not compatible to type Element\n return [value];\n }\n\n if (value instanceof NodeList) {\n return arrayFrom(value);\n }\n\n if (Array.isArray(value)) {\n return value;\n }\n\n try {\n return arrayFrom(document.querySelectorAll(value));\n } catch (e) {\n return [];\n }\n}", "toArray() {\n let arr = [];\n this.traverse((currentNode) => {\n arr.push(currentNode.value);\n });\n return arr;\n }", "function nodeListToArray (nodeList) {\n var length = nodeList.length;\n\n if (nodeList.hasOwnProperty) {\n return Array.prototype.slice.call(nodeList);\n }\n\n return new Array(length).fill().map(function (index) {\n return nodeList[index];\n });\n}", "function array(nodeList) {\n\t\treturn Array.prototype.slice.call(nodeList, 0);\n\t}", "function getArrayOfElements(value) {\n if (isElement(value)) {\n return [value];\n }\n\n if (isNodeList(value)) {\n return arrayFrom(value);\n }\n\n if (Array.isArray(value)) {\n return value;\n }\n\n return arrayFrom(document.querySelectorAll(value));\n}", "static getElements(els) {\r\n if (typeof els === 'string') {\r\n let list = document.querySelectorAll(els);\r\n if (!list.length && els[0] !== '.' && els[0] !== '#') {\r\n list = document.querySelectorAll('.' + els);\r\n if (!list.length) {\r\n list = document.querySelectorAll('#' + els);\r\n }\r\n }\r\n return Array.from(list);\r\n }\r\n return [els];\r\n }", "function returnElementArray($container) {\n var nsp = '[data-' + ns + ']',\n // if an $el was given, then we scope our query to just look within the element\n DOM = $container ? $container.find(nsp) : $(nsp);\n\n return DOM;\n }", "function toArray(fake) { // @param NodeList/Array:\r\n // @return Array:\r\n if (!_ie && (_opera && _uaver >= 9.5)) {\r\n return Array.prototype.slice.call(fake, 0);\r\n }\r\n var rv = [], ri = -1, i = 0, iz = fake.length;\r\n\r\n for (; i < iz; ++i) {\r\n rv[++ri] = fake[i];\r\n }\r\n return rv;\r\n}", "toArray() {\n const array = [];\n let node = this.head;\n while (node) {\n array.push(node.value);\n node = node.next;\n }\n return array;\n }", "function splitToArray(el){\n return el.innerHTML.split('/');\n }", "function getElementAndAncestors(element) {\n var allElements = [];\n while (isTransformableElement(element)) {\n allElements.push(element);\n element = element.parentNode;\n }\n return allElements;\n}", "function xml2Array(xml, nodeName) {\n\tvar tab = [];\n\tvar rsp = xml.getElementsByTagName(nodeName);\n\tfor (var i = 0; i < rsp.length; i++) {\n\t\ttab[i] = [];\n\t\tvar nodes = rsp[i].childNodes;\n\t\tfor (var j = 0; j < nodes.length; j++)\n\t\t\tif (nodes[j].nodeType == 1) {\n\t\t\t\tvar el = nodes[j];\n\t\t\t\ttab[i][el.nodeName] = (el.firstChild != null ? el.firstChild.nodeValue : \"\");\n\t\t\t}\n\t}\n\treturn tab;\n}", "function ElementNodes(nodelist) {\n\tvar eNodes = []; // return array is defined\n\n\tfor (var i=0, j=nodelist.length; i < j; i++) {\n\t\tif (nodelist[i].nodeType == 1) { // if nodelist is real element\n\t\t\teNodes.push(nodelist[i]); // push the nodelist into our eNodes array\n\t\t}\n\t}\n\n\treturn eNodes;\n}", "function turnNodeArrayIntoStringArray(arrayNodes){\n var stringArray=[];\n arrayNodes.forEach(function(element){\n var elementArray = [];\n element.each(function(index, title){\n elementArray.push(title.innerHTML);\n });\n stringArray.push(elementArray);\n });\n return stringArray;\n}", "toArray() {\n const elements = [];\n let currNode = this.head;\n\n while (currNode) {\n elements.push(currNode);\n currNode = currNode.next;\n }\n\n return elements;\n }", "async function getTextNodeArray(rootElem = document) {\n return new Promise((resolve, _) => {\n let textNodeArray = [];\n let stack = [rootElem];\n while (stack.length) {\n let node = stack.pop();\n\n if (node instanceof Text) {\n textNodeArray.push(node);\n continue;\n }\n\n if (node instanceof Element &&\n node.classList.contains(LABEL.classWhiteList)) {\n continue;\n }\n\n let child = node.lastChild;\n while (child) {\n stack.push(child);\n child = child.previousSibling;\n }\n }\n resolve(textNodeArray);\n });\n}", "function qsa(element, selector) {\n return toArray(element.querySelectorAll(selector));\n}", "function qsa(element, selector) {\n return toArray(element.querySelectorAll(selector));\n}", "function qsa(element, selector) {\n return toArray(element.querySelectorAll(selector));\n}", "function GetAllElements(element) {\n var elements = [];\n\n if (element && element.hasChildNodes()) {\n elements.push(element);\n\n var childs = element.childNodes;\n\n for (var i = 0; i < childs.length; i++) {\n if (childs[i].hasChildNodes()) {\n elements = elements.concat(GetAllElements(childs[i]));\n } else if (childs[i].nodeType === 1) {\n elements.push(childs[i]);\n }\n }\n }\n return elements;\n}", "function makeArray(container) {\n return $(container).toArray();\n}", "function coll2array(coll) {\r\n return coll && ('tagName' in coll ? [coll] : (function() {\r\n for (var i=0, len=coll.length, arr=new Array(len); i<len; i++) arr[i]=coll[i];\r\n return arr\r\n })());\r\n}", "function arr(elementsByClassName) {\n result = [];\n for(var i = 0;i<elementsByClassName.length; i++){\n result[i] = elementsByClassName[i];\n }\n return result;\n}", "toArray () {\n return this._content.map(function (x, i) {\n return x.val\n })\n }", "function xmlTagToArray(d) {\n if (!d) { return []; }\n else if (!Array.isArray(d)) { return [d]; }\n else { return d; }\n}", "function toArray(children){return mapChildren(children,function(child){return child;})||[];}", "function xmlParser2Array(xmlDoc, containerTag)\n{\n var output= new Array();\n var rawData = xmlDoc.getElementsByTagName(containerTag)[0];\n var tiles=rawData.children;\n var attributes;\n var i=0;\n var j=0;\n /*********\n * This loop goes through a childs/tiles node adding its attributes to an array\n */\n for(i=0;i<tiles.length;i++)\n { \n attributes= new Array();\n\n for(j=0;j<tiles[i].attributes.length;j++)\n {\n attributes.push(new Array(tiles[i].attributes[j].name,tiles[i].attributes[j].nodeValue));\n }\n output.push(attributes);\n }\n return output;\n}", "function getNodeList(ary) {\n return ary.map((d) => d['sub'])\n}", "toArray() {}", "toArray() {}", "toArray() {}", "getChildren(): Array<Element>{\n return this._elements;\n }", "function toArray(enu) {\n var arr = [];\n\n for (var i = 0, l = enu.length; i < l; i++)\n arr.push(enu[i]);\n\n return arr;\n}", "function childNodesOfElement(element) {\n let children = [];\n let child = element.firstChild;\n while (child) {\n children.push(child);\n child = child.nextSibling;\n }\n return children;\n }", "getNodes() {\n if (\"subtree\" in this.options) {\n return Array.from(this.target.querySelectorAll(this.options.selector));\n }\n\n return Array.from(this.target.childNodes);\n }", "function __(elm) { return document.querySelectorAll(elm) }", "function xmlToArray(resultsXml)\n{\n// initiate the resultsArray\nvar resultsArray= new Array();\n// loop through all the xml nodes retrieving the content\nfor(i=0;i<resultsXml.length;i++)\nresultsArray[i]=resultsXml.item(i).firstChild.data;\n// return the node's content as an array\nreturn resultsArray;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( typeof obj.length === 'number' ) {\n // convert nodeList to array\n for ( var i=0, len = obj.length; i < len; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function getThumbnailsArray() {\r\n 'use strict';\r\n var thumbnails = document.querySelectorAll(THUMBNAIL_LINK_SELECTOR);\r\n\r\n // convert the NodeList returned from querySelectorAll to an array -\r\n // It is a backward-compatible way to convert from a NodeList to an array\r\n var thumbnailArray = [].slice.call(thumbnails);\r\n return thumbnailArray;\r\n\r\n}", "function convertToArrs(elem) {\n return function(el) {\n return el.qs.map(convertTo(elem));\n };\n }", "function contents(element) {\n var res = [];\n var nodes;\n for (var i=0; i<element.length; i++) {\n nodes = element[i].childNodes;\n for (var j=0; j<nodes.length; j++) {\n res.push(nodes.item(j));\n }\n }\n return $(res);\n }", "function _makeDomArray(elem, clone) {\n if (elem == null) {\n return [];\n }\n if (isCheerio(elem)) {\n return clone ? cloneDom(elem.get()) : elem.get();\n }\n if (Array.isArray(elem)) {\n return elem.reduce((newElems, el) => newElems.concat(this._makeDomArray(el, clone)), []);\n }\n if (typeof elem === 'string') {\n return this._parse(elem, this.options, false, null).children;\n }\n return clone ? cloneDom([elem]) : [elem];\n}", "function getBoardArray(){\n // get each row of the board\n var grid_rows = [].slice.call(document.querySelectorAll(\".row\"));\n \n grid_rows.forEach(function(row,index){\n var nums;\n board.push([]);\n // each cell of the board\n row_cells = [].slice.call(row.children);\n row_cells.forEach(function(num){\n board[index].push(num.value); \n });\n })\n return board;\n}", "function selectNodes(contextNode, xpathExpression) {\r\n var nodes = document.evaluate(xpathExpression, contextNode, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\r\n var nodeArray = new Array(nodes.snapshotLength);\r\n\r\n for (var i = 0; i < nodeArray.length; i++)\r\n nodeArray[i] = nodes.snapshotItem(i);\r\n\r\n return nodeArray;\r\n }", "get all() {\n const _elements = [];\n try {\n const value = this.elements.value;\n if (value && value.length) {\n // create list elements\n for (let i = 0; i < value.length; i++) {\n // make each list element individually selectable via xpath\n const selector = `(${this._selector})[${i + 1}]`;\n const listElement = this._elementStoreFunc.apply(this._store, [selector, this._elementOpts]);\n _elements.push(listElement);\n }\n }\n return _elements;\n }\n catch (error) {\n // this.elements will throw error if no elements were found\n return _elements;\n }\n }", "toArray() {\n const nodes = [];\n let currentNode = this.head;\n\n while (currentNode) {\n nodes.push(currentNode);\n currentNode = currentNode.next;\n }\n return nodes;\n }", "toArray() {\n let array = [];\n for (let current = this.#head.next;\n current != this.this.#tail;\n current = current.next) {\n array.push(current.value);\n }\n\n return array;\n }", "function assembleNodes(firstNode) {\n var nodes = [];\n var node = firstNode;\n while(node) {\n if (node instanceof HTMLElement) nodes.push(node);\n node = node.nextSibling;\n }\n return nodes;\n}", "function makeArray(element) {\n\treturn isArray(element) ? element : [element];\n}", "function __arrayDoms($doms) {\r\n if ($doms==null)\r\n return new Array();\r\n for (i in $doms) {\r\n if (i==\"length\") {\r\n var tmp = new Array();\r\n for (var i=0; i<$doms.length; i++) {\r\n tmp.push($doms[i]);\r\n }\r\n return tmp;\r\n }\r\n break;\r\n }\r\n return new Array($doms);\r\n}", "toArray() {\n let arr = [];\n let n = this._dummy.next;\n\n while (n !== this._dummy) {\n arr.push(n.data);\n n = n.next;\n }\n\n return arr;\n }", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n }", "function asArray ( a ) {\n\t\treturn $.isArray(a) ? a : [a];\n\t}", "function _toConsArray(nodeList)\n {\n let arr = []\n for(let i = 0; i < nodeList.length; i++) arr.push(nodeList[i])\n return arr\n }", "function _makeDomArray(elem, clone) {\n var _this = this;\n\n if (elem == null) {\n return [];\n }\n\n if (utils_1.isCheerio(elem)) {\n return clone ? utils_1.cloneDom(elem.get()) : elem.get();\n }\n\n if (Array.isArray(elem)) {\n return elem.reduce(function (newElems, el) {\n return newElems.concat(_this._makeDomArray(el, clone));\n }, []);\n }\n\n if (typeof elem === 'string') {\n return parse_1.default(elem, this.options, false).children;\n }\n\n return clone ? utils_1.cloneDom([elem]) : [elem];\n}", "function HTMLCollectionToArray(collection) {\n\tvar array = [];\n\tfor ( var i = 0; i < collection.length; i++ )\n\t\tarray.push(collection[i]);\n\treturn array;\n}", "get elements():Array<Element> {\n return this._elements;\n }", "function uuarray(source) { // @param Array/Mix/NodeList/Arguments: source\r\n // @return Array:\r\n var type = uutype(source), rv, i, iz;\r\n\r\n if (type === uutype.FAKEARRAY) { // [3][4]\r\n for (rv = [], i = 0, iz = source.length; i < iz; ++i) {\r\n rv[i] = source[i];\r\n }\r\n return rv;\r\n }\r\n return (type === uutype.ARRAY) ? source : [source]; // [1][2]\r\n}", "function __( el )\n{\n return document.querySelectorAll( el );\n}", "function convertNsIArray(arr, elemType) {\n var out = [];\n arr = arr.QueryInterface(Ci.nsIArray);\n for (var i = 0; i < arr.length; i++) {\n out.push(arr.queryElementAt(i, elemType));\n }\n return out;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( obj && typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "static getChildren(el, klass) {\n const results = [];\n if (el == null)\n return results;\n for (let node = el.firstElementChild; node != null; node = node === null || node === void 0 ? void 0 : node.nextElementSibling) {\n if (Dom.hasClass(node, klass))\n results.push(node);\n }\n return results;\n }", "static array(array) {\n let result = [];\n array.forEach(function (elem) {\n // this element has objectify implemented?\n if (isFunction(elem.objectify)) {\n try {\n let obj = Objectify.create(elem);\n if (obj) {\n result.push(obj);\n }\n\n } catch (ex) {\n Objectify._logger.error(\"Failed to objectify element: \" + ex);\n }\n }\n });\n\n return result;\n }", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function getInnerText(elements) {\n var res = [];\n elements.forEach(function(el) {\n res.push(el.innerText);\n });\n return res;\n}", "function qsa(parent, selector){return [].slice.call(parent.querySelectorAll(selector) )}", "function makeArray( obj ) {\n var ary = [];\n if ( isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function makeArray( obj ) {\n var ary = [];\n if ( isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}", "function convertNodes() {\n var nodes, i, len, c, e;\n nodes = [];\n for (i = 0, len = usercomics.length; i < len; i = i + 1) {\n c = usercomics[i];\n e = new Element('span', { 'comicid': c.id });\n e.innerHTML = c.name;\n nodes[i] = e;\n }\n return nodes;\n}", "function currentTubeToArray(){\n list = document.getElementsByClassName(\"ballContainer\")\n listArray = []\n for (const tube of list){\n tubeArray = []\n balls = tube.children\n for(const ball of balls){\n tubeArray.push(ball.style.backgroundColor)\n }\n listArray.push(tubeArray)\n }\n return(listArray)\n}", "_getAllTextElementsForChangingColorScheme() {\n let tagNames = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'label']\n let allItems = [];\n\n for (let tagname of tagNames) {\n allitems = Array.prototype.concat.apply(allitems, x.getElementsByTagName(tagname));\n }\n // allitems = Array.prototype.concat.apply(allitems, x.getElementsByTagName(\"h1\"));\n\n return allItems;\n }", "getElementsByType(type) {\n if (!this[$elementsByType].has(type)) {\n return [];\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return Array.from(this[$elementsByType].get(type));\n }", "function getElementsFromHTML() {\n toRight = document.querySelectorAll(\".to-right\");\n toLeft = document.querySelectorAll(\".to-left\");\n toTop = document.querySelectorAll(\".to-top\");\n toBottom = document.querySelectorAll(\".to-bottom\");\n }", "getAst() {\n\n return {\n type: 'array',\n elements: this.elements.map(elem => elem.getAst())\n };\n }", "function getThumbnailsArray() {\n 'use strict';\n var thumbnails =\n document.querySelectorAll(THUMBNAIL_LINK_SELECTOR);\n var thumbnailArray = [].slice.call(thumbnails);\n return thumbnailArray;\n}", "function makeArray( obj ) {\r\n var ary = [];\r\n if ( isArray( obj ) ) {\r\n // use object if already an array\r\n ary = obj;\r\n } else if ( typeof obj.length === 'number' ) {\r\n // convert nodeList to array\r\n for ( var i=0, len = obj.length; i < len; i++ ) {\r\n ary.push( obj[i] );\r\n }\r\n } else {\r\n // array of single index\r\n ary.push( obj );\r\n }\r\n return ary;\r\n }", "function toArray(thing) {\n return Array.prototype.slice.call(thing);\n }", "function frame_to_array(frame) {\n var frame_array = [];\n while (frame) {\n frame_array.push(frame);\n frame = frame.parent;\n }\n\n return frame_array;\n}", "function makeTagArr(pathToSelected, result) {\n var backwardsPath = pathToSelected;\n var currentTagName = $(result).prop(\"tagName\").toLowerCase();\n var siblingIndex = $(result).index();\n var documentIndex = $(currentTagName).index(result);\n var tagArr = [];\n tagArr.unshift([currentTagName,documentIndex,siblingIndex]);\n\n // going backwards to html tag from selected tag\n while(currentTagName != \"html\"){\n backwardsPath = backwardsPath + \"/parent::*\";\n var nodes = document.evaluate(backwardsPath, document, null,\n XPathResult.ANY_TYPE, null);\n var nodesResult = nodes.iterateNext();\n currentTagName = $(nodesResult).prop(\"tagName\").toLowerCase();\n siblingIndex = $(nodesResult).index(); //sibling num\n documentIndex = $(currentTagName).index(nodesResult); //whole document num\n tagArr.unshift([currentTagName,documentIndex,siblingIndex]);\n }\n return tagArr;\n}" ]
[ "0.7361989", "0.7308388", "0.7308388", "0.729898", "0.7279939", "0.7265269", "0.72267294", "0.7116159", "0.7040728", "0.7029587", "0.69996554", "0.6957603", "0.6861447", "0.68188804", "0.66965497", "0.6689172", "0.6598793", "0.65931666", "0.6518876", "0.647441", "0.6451992", "0.6432851", "0.6419615", "0.6419116", "0.6400182", "0.63842815", "0.63800794", "0.63800794", "0.63800794", "0.63530684", "0.6336319", "0.63347846", "0.6331773", "0.6311791", "0.6294093", "0.6290442", "0.6252953", "0.6241182", "0.62386805", "0.62386805", "0.62386805", "0.62173885", "0.62111175", "0.6207824", "0.6186409", "0.61810416", "0.61720264", "0.6166858", "0.61396766", "0.6119013", "0.61102164", "0.61078745", "0.6086616", "0.60813874", "0.606201", "0.60539675", "0.60407686", "0.6038009", "0.6031748", "0.60062885", "0.59939843", "0.5972763", "0.5972124", "0.59690577", "0.59610516", "0.595241", "0.59459025", "0.5945769", "0.5941328", "0.5940909", "0.59242016", "0.5885551", "0.58850694", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5882635", "0.5879552", "0.58778375", "0.5874551", "0.5874551", "0.58727103", "0.58721095", "0.58688676", "0.58674735", "0.58642024", "0.58593607", "0.5846477", "0.58459634", "0.5825042", "0.5812088", "0.58097196" ]
0.0
-1
isotopeDefinition // used for AMD definition and requires
function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) { // create an Outlayer layout class var Isotope = Outlayer.create( 'isotope', { layoutMode: "masonry", isJQueryFiltering: true, sortAscending: true }); Isotope.Item = Item; Isotope.LayoutMode = LayoutMode; Isotope.prototype._create = function() { this.itemGUID = 0; // functions that sort items this._sorters = {}; this._getSorters(); // call super Outlayer.prototype._create.call( this ); // create layout modes this.modes = {}; // start filteredItems with all items this.filteredItems = this.items; // keep of track of sortBys this.sortHistory = [ 'original-order' ]; // create from registered layout modes for ( var name in LayoutMode.modes ) { this._initLayoutMode( name ); } }; Isotope.prototype.reloadItems = function() { // reset item ID counter this.itemGUID = 0; // call super Outlayer.prototype.reloadItems.call( this ); }; Isotope.prototype._itemize = function() { var items = Outlayer.prototype._itemize.apply( this, arguments ); // assign ID for original-order for ( var i=0, len = items.length; i < len; i++ ) { var item = items[i]; item.id = this.itemGUID++; } this._updateItemsSortData( items ); return items; }; // -------------------------- layout -------------------------- // Isotope.prototype._initLayoutMode = function( name ) { var Mode = LayoutMode.modes[ name ]; // set mode options // HACK extend initial options, back-fill in default options var initialOpts = this.options[ name ] || {}; this.options[ name ] = Mode.options ? extend( Mode.options, initialOpts ) : initialOpts; // init layout mode instance this.modes[ name ] = new Mode( this ); }; Isotope.prototype.layout = function() { // if first time doing layout, do all magic if ( !this._isLayoutInited && this.options.isInitLayout ) { this.arrange(); return; } this._layout(); }; // private method to be used in layout() & magic() Isotope.prototype._layout = function() { // don't animate first layout var isInstant = this._getIsInstant(); // layout flow this._resetLayout(); this._manageStamps(); this.layoutItems( this.filteredItems, isInstant ); // flag for initalized this._isLayoutInited = true; }; // filter + sort + layout Isotope.prototype.arrange = function( opts ) { // set any options pass this.option( opts ); this._getIsInstant(); // filter, sort, and layout this.filteredItems = this._filter( this.items ); this._sort(); this._layout(); }; // alias to _init for main plugin method Isotope.prototype._init = Isotope.prototype.arrange; // HACK // Don't animate/transition first layout // Or don't animate/transition other layouts Isotope.prototype._getIsInstant = function() { var isInstant = this.options.isLayoutInstant !== undefined ? this.options.isLayoutInstant : !this._isLayoutInited; this._isInstant = isInstant; return isInstant; }; // -------------------------- filter -------------------------- // Isotope.prototype._filter = function( items ) { var filter = this.options.filter; filter = filter || '*'; var matches = []; var hiddenMatched = []; var visibleUnmatched = []; var test = this._getFilterTest( filter ); // test each item for ( var i=0, len = items.length; i < len; i++ ) { var item = items[i]; if ( item.isIgnored ) { continue; } // add item to either matched or unmatched group var isMatched = test( item ); // item.isFilterMatched = isMatched; // add to matches if its a match if ( isMatched ) { matches.push( item ); } // add to additional group if item needs to be hidden or revealed if ( isMatched && item.isHidden ) { hiddenMatched.push( item ); } else if ( !isMatched && !item.isHidden ) { visibleUnmatched.push( item ); } } var _this = this; function hideReveal() { _this.reveal( hiddenMatched ); _this.hide( visibleUnmatched ); } if ( this._isInstant ) { this._noTransition( hideReveal ); } else { hideReveal(); } return matches; }; // get a jQuery, function, or a matchesSelector test given the filter Isotope.prototype._getFilterTest = function( filter ) { if ( jQuery && this.options.isJQueryFiltering ) { // use jQuery return function( item ) { return jQuery( item.element ).is( filter ); }; } if ( typeof filter === 'function' ) { // use filter as function return function( item ) { return filter( item.element ); }; } // default, use filter as selector string return function( item ) { return matchesSelector( item.element, filter ); }; }; // -------------------------- sorting -------------------------- // /** * @params {Array} elems * @public */ Isotope.prototype.updateSortData = function( elems ) { // get items var items; if ( elems ) { elems = makeArray( elems ); items = this.getItems( elems ); } else { // update all items if no elems provided items = this.items; } this._getSorters(); this._updateItemsSortData( items ); }; Isotope.prototype._getSorters = function() { var getSortData = this.options.getSortData; for ( var key in getSortData ) { var sorter = getSortData[ key ]; this._sorters[ key ] = mungeSorter( sorter ); } }; /** * @params {Array} items - of Isotope.Items * @private */ Isotope.prototype._updateItemsSortData = function( items ) { // do not update if no items var len = items && items.length; for ( var i=0; len && i < len; i++ ) { var item = items[i]; item.updateSortData(); } }; // ----- munge sorter ----- // // encapsulate this, as we just need mungeSorter // other functions in here are just for munging var mungeSorter = ( function() { // add a magic layer to sorters for convienent shorthands // `.foo-bar` will use the text of .foo-bar querySelector // `[foo-bar]` will use attribute // you can also add parser // `.foo-bar parseInt` will parse that as a number function mungeSorter( sorter ) { // if not a string, return function or whatever it is if ( typeof sorter !== 'string' ) { return sorter; } // parse the sorter string var args = trim( sorter ).split(' '); var query = args[0]; // check if query looks like [an-attribute] var attrMatch = query.match( /^\[(.+)\]$/ ); var attr = attrMatch && attrMatch[1]; var getValue = getValueGetter( attr, query ); // use second argument as a parser var parser = Isotope.sortDataParsers[ args[1] ]; // parse the value, if there was a parser sorter = parser ? function( elem ) { return elem && parser( getValue( elem ) ); } : // otherwise just return value function( elem ) { return elem && getValue( elem ); }; return sorter; } // get an attribute getter, or get text of the querySelector function getValueGetter( attr, query ) { var getValue; // if query looks like [foo-bar], get attribute if ( attr ) { getValue = function( elem ) { return elem.getAttribute( attr ); }; } else { // otherwise, assume its a querySelector, and get its text getValue = function( elem ) { var child = elem.querySelector( query ); return child && getText( child ); }; } return getValue; } return mungeSorter; })(); // parsers used in getSortData shortcut strings Isotope.sortDataParsers = { 'parseInt': function( val ) { return parseInt( val, 10 ); }, 'parseFloat': function( val ) { return parseFloat( val ); } }; // ----- sort method ----- // // sort filteredItem order Isotope.prototype._sort = function() { var sortByOpt = this.options.sortBy; if ( !sortByOpt ) { return; } // concat all sortBy and sortHistory var sortBys = [].concat.apply( sortByOpt, this.sortHistory ); // sort magic var itemSorter = getItemSorter( sortBys, this.options.sortAscending ); this.filteredItems.sort( itemSorter ); // keep track of sortBy History if ( sortByOpt !== this.sortHistory[0] ) { // add to front, oldest goes in last this.sortHistory.unshift( sortByOpt ); } }; // returns a function used for sorting function getItemSorter( sortBys, sortAsc ) { return function sorter( itemA, itemB ) { // cycle through all sortKeys for ( var i = 0, len = sortBys.length; i < len; i++ ) { var sortBy = sortBys[i]; var a = itemA.sortData[ sortBy ]; var b = itemB.sortData[ sortBy ]; if ( a > b || a < b ) { // if sortAsc is an object, use the value given the sortBy key var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc; var direction = isAscending ? 1 : -1; return ( a > b ? 1 : -1 ) * direction; } } return 0; }; } // -------------------------- methods -------------------------- // // get layout mode Isotope.prototype._mode = function() { var layoutMode = this.options.layoutMode; var mode = this.modes[ layoutMode ]; if ( !mode ) { // TODO console.error throw new Error( 'No layout mode: ' + layoutMode ); } // HACK sync mode's options // any options set after init for layout mode need to be synced mode.options = this.options[ layoutMode ]; return mode; }; Isotope.prototype._resetLayout = function() { // trigger original reset layout Outlayer.prototype._resetLayout.call( this ); this._mode()._resetLayout(); }; Isotope.prototype._getItemLayoutPosition = function( item ) { return this._mode()._getItemLayoutPosition( item ); }; Isotope.prototype._manageStamp = function( stamp ) { this._mode()._manageStamp( stamp ); }; Isotope.prototype._getContainerSize = function() { return this._mode()._getContainerSize(); }; Isotope.prototype.needsResizeLayout = function() { return this._mode().needsResizeLayout(); }; // -------------------------- adding & removing -------------------------- // // HEADS UP overwrites default Outlayer appended Isotope.prototype.appended = function( elems ) { var items = this.addItems( elems ); if ( !items.length ) { return; } var filteredItems = this._filterRevealAdded( items ); // add to filteredItems this.filteredItems = this.filteredItems.concat( filteredItems ); }; // HEADS UP overwrites default Outlayer prepended Isotope.prototype.prepended = function( elems ) { var items = this._itemize( elems ); if ( !items.length ) { return; } // add items to beginning of collection var previousItems = this.items.slice(0); this.items = items.concat( previousItems ); // start new layout this._resetLayout(); this._manageStamps(); // layout new stuff without transition var filteredItems = this._filterRevealAdded( items ); // layout previous items this.layoutItems( previousItems ); // add to filteredItems this.filteredItems = filteredItems.concat( this.filteredItems ); }; Isotope.prototype._filterRevealAdded = function( items ) { var filteredItems = this._noTransition( function() { return this._filter( items ); }); // layout and reveal just the new items this.layoutItems( filteredItems, true ); this.reveal( filteredItems ); return items; }; /** * Filter, sort, and layout newly-appended item elements * @param {Array or NodeList or Element} elems */ Isotope.prototype.insert = function( elems ) { var items = this.addItems( elems ); if ( !items.length ) { return; } // append item elements var i, item; var len = items.length; for ( i=0; i < len; i++ ) { item = items[i]; this.element.appendChild( item.element ); } // filter new stuff /* // this way adds hides new filtered items with NO transition // so user can't see if new hidden items have been inserted var filteredInsertItems; this._noTransition( function() { filteredInsertItems = this._filter( items ); // hide all new items this.hide( filteredInsertItems ); }); // */ // this way hides new filtered items with transition // so user at least sees that something has been added var filteredInsertItems = this._filter( items ); // hide all newitems this._noTransition( function() { this.hide( filteredInsertItems ); }); // */ // set flag for ( i=0; i < len; i++ ) { items[i].isLayoutInstant = true; } this.arrange(); // reset flag for ( i=0; i < len; i++ ) { delete items[i].isLayoutInstant; } this.reveal( filteredInsertItems ); }; var _remove = Isotope.prototype.remove; Isotope.prototype.remove = function( elems ) { elems = makeArray( elems ); var removeItems = this.getItems( elems ); // do regular thing _remove.call( this, elems ); // bail if no items to remove if ( !removeItems || !removeItems.length ) { return; } // remove elems from filteredItems for ( var i=0, len = removeItems.length; i < len; i++ ) { var item = removeItems[i]; // remove item from collection removeFrom( item, this.filteredItems ); } }; Isotope.prototype.shuffle = function() { // update random sortData for ( var i=0, len = this.items.length; i < len; i++ ) { var item = this.items[i]; item.sortData.random = Math.random(); } this.options.sortBy = 'random'; this._sort(); this._layout(); }; /** * trigger fn without transition * kind of hacky to have this in the first place * @param {Function} fn * @returns ret * @private */ Isotope.prototype._noTransition = function( fn ) { // save transitionDuration before disabling var transitionDuration = this.options.transitionDuration; // disable transition this.options.transitionDuration = 0; // do it var returnValue = fn.call( this ); // re-enable transition for reveal this.options.transitionDuration = transitionDuration; return returnValue; }; // ----- helper methods ----- // /** * getter method for getting filtered item elements * @returns {Array} elems - collection of item elements */ Isotope.prototype.getFilteredItemElements = function() { var elems = []; for ( var i=0, len = this.filteredItems.length; i < len; i++ ) { elems.push( this.filteredItems[i].element ); } return elems; }; // ----- ----- // return Isotope; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n var _this = this;\n function hideReveal() {\n _this.reveal( hiddenMatched );\n _this.hide( visibleUnmatched );\n }\n\n if ( this._isInstant ) {\n this._noTransition( hideReveal );\n } else {\n hideReveal();\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter === 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n Isotope.prototype.updateSortData = function( elems ) {\n this._getSorters();\n // update item sort data\n // default to all items if none are passed in\n elems = makeArray( elems );\n var items = this.getItems( elems );\n // if no items found, update all items\n items = items.length ? items : this.items;\n this._updateItemsSortData( items );\n };\n\n Isotope.prototype._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n Isotope.prototype._updateItemsSortData = function( items ) {\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n var filteredItems = this._noTransition( function() {\n return this._filter( items );\n });\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n /*\n // this way adds hides new filtered items with NO transition\n // so user can't see if new hidden items have been inserted\n var filteredInsertItems;\n this._noTransition( function() {\n filteredInsertItems = this._filter( items );\n // hide all new items\n this.hide( filteredInsertItems );\n });\n // */\n // this way hides new filtered items with transition\n // so user at least sees that something has been added\n var filteredInsertItems = this._filter( items );\n // hide all newitems\n this._noTransition( function() {\n this.hide( filteredInsertItems );\n });\n // */\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @returns ret\n * @private\n */\n Isotope.prototype._noTransition = function( fn ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.call( this );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Isotope.prototype.settings.item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n Isotope.prototype._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n Isotope.prototype.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n Isotope.prototype._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this.updateSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n Isotope.prototype._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n Isotope.prototype.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this.options.isInitLayout ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n Isotope.prototype._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n Isotope.prototype.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n this.filteredItems = this._filter( this.items );\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n Isotope.prototype._init = Isotope.prototype.arrange;\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n Isotope.prototype._getIsInstant = function() {\n var isInstant = this.options.isLayoutInstant !== undefined ?\n this.options.isLayoutInstant : !this._isLayoutInited;\n return this._isInstant = isInstant;\n };\n\n // -------------------------- filter -------------------------- //\n\n Isotope.prototype._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n // HACK\n // disable transition if instant\n var _transitionDuration = this.options.transitionDuration;\n if ( this._isInstant ) {\n this.options.transitionDuration = 0;\n }\n this.reveal( hiddenMatched );\n this.hide( visibleUnmatched );\n // set back\n if ( this._isInstant ) {\n this.options.transitionDuration = _transitionDuration;\n }\n\n return matches;\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n Isotope.prototype._getFilterTest = function( filter ) {\n var test;\n if ( jQuery && this.options.isJQueryFiltering ) {\n test = function( item ) {\n return jQuery( item.element ).is( filter );\n };\n } else if ( typeof filter === 'function' ) {\n test = function( item ) {\n return filter( item.element );\n };\n } else {\n test = function( item ) {\n return matchesSelector( item.element, filter );\n };\n }\n return test;\n };\n\n // -------------------------- sorting -------------------------- //\n\n Isotope.prototype.updateSortData = function( items ) {\n // update sorters\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n // update item sort data\n // default to all items if none are passed in\n items = items || this.items;\n for ( var i=0, len = items.length; i < len; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = getParser( args[1] );\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n getValue = function( elem ) {\n return elem.getAttribute( attr );\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function( elem ) {\n var child = elem.querySelector( query );\n return child && getText( child );\n };\n }\n return getValue;\n }\n\n // return a parser function if arg matches\n function getParser( arg ) {\n var parser;\n switch ( arg ) {\n case 'parseInt' :\n parser = function( val ) {\n return parseInt( val, 10 );\n };\n break;\n case 'parseFloat' :\n parser = function( val ) {\n return parseFloat( val );\n };\n break;\n default :\n // just return val if parser isn't one of these\n // TODO - console log that that parser doesn't exist\n parser = function( val ) {\n return val;\n };\n }\n return parser;\n }\n\n return mungeSorter;\n })();\n\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n Isotope.prototype._sort = function() {\n var sortByOpt = this.options.sortBy;\n if ( !sortByOpt ) {\n return;\n }\n // concat all sortBy and sortHistory\n var sortBys = [].concat.apply( sortByOpt, this.sortHistory );\n // sort magic\n var itemSorter = getItemSorter( sortBys, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n // keep track of sortBy History\n if ( sortByOpt !== this.sortHistory[0] ) {\n // add to front, oldest goes in last\n this.sortHistory.unshift( sortByOpt );\n }\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0, len = sortBys.length; i < len; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n Isotope.prototype._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n Isotope.prototype._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n Isotope.prototype._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n Isotope.prototype._manageStamp = function( stamp ) {\n var mode = this._mode();\n // HACK copy over some options\n mode.options.isOriginLeft = this.options.isOriginLeft;\n mode.options.isOriginTop = this.options.isOriginTop;\n mode._manageStamp( stamp );\n };\n\n Isotope.prototype._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n Isotope.prototype.resize = function() {\n this._mode().resize();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n Isotope.prototype.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n Isotope.prototype.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( previousItems );\n // add to filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n };\n\n Isotope.prototype._filterRevealAdded = function( items ) {\n // disable transition for filtering\n var transitionDuration = this.options.transitionDuration;\n this.options.transitionDuration = 0;\n var filteredItems = this._filter( items );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n // layout and reveal just the new items\n this.layoutItems( filteredItems, true );\n this.reveal( filteredItems );\n return items;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n Isotope.prototype.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n this.arrange();\n };\n\n var _remove = Isotope.prototype.remove;\n Isotope.prototype.remove = function( elems ) {\n elems = makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n // remove elems from filteredItems\n for ( var i=0, len = removeItems.length; i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n removeFrom( item, this.filteredItems );\n }\n };\n\n // ----- ----- //\n\n return Isotope;\n}", "function initiate_isotope() {\n var is_origin_left = true;\n if($('body').hasClass('rtl')){\n is_origin_left = false;\n }\n if($('.index-isotope').length && (not_display_type(\"tablet\") || (is_display_type(\"tablet\") && $('body').hasClass('menu-position-top') && $('body').hasClass('no-sidebar'))) && not_display_type(\"phone\")){\n var layout_mode = $('.index-isotope').data('layout-mode');\n var $isotope_container = $('.index-isotope').isotope({\n 'itemSelector': '.item-isotope',\n 'layoutMode': layout_mode,\n 'isOriginLeft': is_origin_left\n });\n $('.index-isotope').addClass('isotope-active');\n // init isotope\n $isotope_container.isotope('layout');\n // reposition when everything loads isotope\n $(window).load(function() {\n $isotope_container.isotope('layout');\n });\n // reposition when images load\n $('.index-isotope').imagesLoaded(function(){\n $isotope_container.isotope('layout');\n // $('.index-isotope .pluto-post-box .post-media-body, .index-isotope .product-media-body').find('.figure-link-w, iframe').slideDown(100, function(){\n // $isotope_container.isotope('layout');\n // setTimeout(function(){\n // $('.index-isotope .pluto-post-box .post-media-body, .index-isotope .product-media-body').find('.figure-link-w, iframe').addClass('os-faded-in');\n // }, 50);\n // });\n });\n }else{\n if($('.index-isotope').length && $('.index-isotope').hasClass('isotope-active')){\n $('.index-isotope').isotope('destroy').removeClass('isotope-active');\n }\n }\n }", "function WR_Masonry() {\n\t \tvar el = $( '.wr-nitro-masonry' );\n\n\t \tel.each( function( i, val ) {\n\t \t\tvar _option = $( this ).data( 'masonry' );\n\n\t \t\tif ( _option !== undefined ) {\n\t \t\t\tvar _selector = _option.selector, _width = _option.columnWidth;\n\n\t \t\t\t$( this ).WR_ImagesLoaded( function() {\n\t \t\t\t\t$( val ).isotope( {\n\t \t\t\t\t\tpercentPosition: true,\n\t \t\t\t\t\titemSelector: _selector,\n\t \t\t\t\t\tmasonry: {\n\t \t\t\t\t\t\tcolumnWidth: _width\n\t \t\t\t\t\t}\n\t \t\t\t\t} );\n\t \t\t\t} )\n\t \t\t}\n\t \t} );\n\t }", "function grid() {\n\tif ($('.js-grid').length) {\n\t\t$('.js-grid').isotope({\n\t\t\titemSelector: '.js-grid-item',\n\t\t\tpercentPositijs-grid-itemon: true\n\t\t});\n\t}\n}", "function eltdfInitProductListMasonryShortcode() {\n\t\tvar container = $('.eltdf-pl-holder.eltdf-masonry-layout .eltdf-pl-outer');\n\t\t\n\t\tif(container.length) {\n\t\t\tcontainer.each(function(){\n\t\t\t\tvar thisContainer = $(this);\n\t\t\t\t\n\t\t\t\tthisContainer.waitForImages(function() {\n\t\t\t\t\tthisContainer.isotope({\n\t\t\t\t\t\titemSelector: '.eltdf-pli',\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tmasonry: {\n\t\t\t\t\t\t\tcolumnWidth: '.eltdf-pl-sizer',\n\t\t\t\t\t\t\tgutter: '.eltdf-pl-gutter'\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tthisContainer.isotope('layout');\n\t\t\t\t\t\n\t\t\t\t\tthisContainer.css('opacity', 1);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}", "function simplePortfolioPageIsotope() {\n \"use strict\";\n if ($('#portfolio-preview-items .filterable').length > 0) {\n var $container = $('#portfolio-preview-items .filterable');\n\n $container.imagesLoaded(function() {\n var state = $container.mixItUp();\n simpleProjectBar();\n\n\n });\n }\n\n if ($('.masonry').length > 0) {\n $container = $('.masonry');\n imagesLoaded($container, function() {\n\n msnry_portfolio = new Masonry('.masonry', {\n \"columnWidth\": \".grid-size\",\n itemSelector: '.portfolio-item'\n });\n\n $('#portfolio-filter li a').click(function() {\n var filter = $(this).data('filter');\n if (filter != 'all') {\n\n msnry_portfolio.destroy();\n\n $container.mixItUp();\n $container.removeClass('masonry').addClass('filterable');\n\n $container.mixItUp('filter', filter);\n\n } else {\n $container.removeClass('filterable').addClass('masonry');\n $container.mixItUp('destroy', false);\n $('#portfolio-filter li').removeClass('active');\n $('#portfolio-filter li a').removeClass('active');\n $(this).addClass('active');\n $(this).parent().addClass('active');\n msnry_portfolio = new Masonry('.masonry', {\n \"columnWidth\": \".grid-size\",\n itemSelector: '.portfolio-item'\n });\n }\n\n });\n\n\n });\n\n }\n }", "function qodefInitProductListMasonryShortcode() {\n\t\tvar container = $('.qodef-pl-holder.qodef-masonry-layout .qodef-pl-outer');\n\t\t\n\t\tif (container.length) {\n\t\t\tcontainer.each(function () {\n\t\t\t\tvar thisContainer = $(this),\n\t\t\t\t\tsize = thisContainer.find('.qodef-pl-sizer').width();\n\t\t\t\t\n\t\t\t\tthisContainer.waitForImages(function () {\n\t\t\t\t\tthisContainer.isotope({\n\t\t\t\t\t\titemSelector: '.qodef-pli',\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tmasonry: {\n\t\t\t\t\t\t\tcolumnWidth: '.qodef-pl-sizer',\n\t\t\t\t\t\t\tgutter: '.qodef-pl-gutter'\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tqodefResizeWooCommerceMasonryLayoutItems(size, thisContainer);\n\t\t\t\t\t\n\t\t\t\t\tthisContainer.isotope('layout').css('opacity', 1);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}", "function isotopeFn ( page ) {\n\n\t// define variables\n\t\tvar bodyWidth \t= pageWrap.width(),\n\t\t\tcontainer \t= $('#'+ page +'-container'),\n\t\t\titem \t\t= $('.'+ page +'-post'),\n\t\t\titemVisible = item.filter(\":visible\"),\n\t\t\tlayout \t\t= ( container.attr('data-layout') !== '' ) ? container.attr('data-layout') : 'masonry',\n\t\t\tgutterHorz \t= parseInt( container.attr('data-gutter-horz'), 10 ),\n\t\t\tgutterVert \t= parseInt( container.attr('data-gutter-vert'), 10 ),\n\t\t\tcolumns \t= 0,\n\t\t\tx \t\t\t= 0,\n\t\t\tcolumnsRate = container.attr('data-columns-rate'),\n\t\t\tcontWidth \t= Math.floor( container.width() + gutterHorz - 0.3 ),\n\t\t\tpostMedia \t= itemVisible.find('.post-media'),\n\t\t\taspectRatio = parseInt( container.attr('data-aspect-height'), 10 ) / parseInt( container.attr('data-aspect-width'), 10 ),\n\t\t\tmaxHieght \t= -1,\n\t\t\tmaxTop \t\t= -1;\n\n\t\titem.addClass('rf-isotope-item');\n\n\t// reset\n\t\titem.css('min-height', '');\n\t\tpostMedia.find('.link-and-quote').css('min-height', '');\n\t\titem.removeClass('rf-last-item rf-last-row');\n\n\t// Brakepoints\n\n\t\t// Permament 1 column\n\t\tif ( columnsRate === \"one\" ) {\n\t\t\tcolumns = 1;\n\n\t\t// Permament 2 column\n\t\t} else if ( columnsRate === \"two\" ) {\n\t\t\tcolumns = 2;\n\n\t\t\tif( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\t\t\t}\n\n\t\t// Permament 3 column\n\t\t} else if ( columnsRate === \"three\" ) {\n\t\t\tcolumns = 3;\n\n\t\t\tif( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\t\t\t} else if( bodyWidth <= 900 ) {\n\t\t\t\tcolumns = 2;\n\t\t\t}\n\n\t\t// Permament 4 column\n\t\t} else if ( columnsRate === \"four\" ) {\n\t\t\tcolumns = 4;\n\n\t\t\tif( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\t\t\t} else if( bodyWidth <= 900 ) {\n\t\t\t\tcolumns = 2;\n\t\t\t}\n\n\t\t// or columns width brakepoints\n\t\t} else {\n\n\t\t\tcolumnsRate = parseInt( columnsRate, 10 );\n\n\t\t\t// Viewport 600\n\t\t\tif ( bodyWidth < 600 ) {\n\t\t\t\tcolumns = 1;\n\n\t\t\t// Viewport 900\n\t\t\t} else if ( $('#sidebar, #sidebar-top').css('display') === 'none' ) {\n\t\t\t\tx = ( columnsRate <= 0 ? 1 : columnsRate );\n\t\t\t\tcolumns = 1 + x;\n\n\t\t\t// Viewport 1250\n\t\t\t} else if ( bodyWidth <= 1250 ) {\n\t\t\t\tx = ( columnsRate <= 0 ? 0 : columnsRate );\n\t\t\t\tcolumns = 2 + x;\n\n\t\t\t// Viewport 1600\n\t\t\t} else if ( bodyWidth <= 1600 ) {\n\t\t\t\tcolumns = 3 + columnsRate;\n\n\t\t\t// Viewport 1950\n\t\t\t} else if ( bodyWidth <= 1950 ) {\n\t\t\t\tcolumns = 4 + columnsRate;\n\n\t\t\t// Viewport 2300\n\t\t\t} else if ( bodyWidth <= 2300 ) {\n\t\t\t\tcolumns = 5 + columnsRate;\n\n\t\t\t// Viewport 2650\n\t\t\t} else if ( bodyWidth <= 2650 ) {\n\t\t\t\tcolumns = 6 + columnsRate;\n\n\t\t\t// Viewport 3000\n\t\t\t} else if ( bodyWidth <= 3000 ) {\n\t\t\t\tcolumns = 7 + columnsRate;\n\n\t\t\t// Viewport 3350\n\t\t\t} else if ( bodyWidth <= 3350 ) {\n\t\t\t\tcolumns = 8 + columnsRate;\n\n\t\t\t// Viewport 3350+\n\t\t\t} else {\n\t\t\t\tcolumns = 9 + columnsRate;\n\t\t\t}\n\t\t}\n\n\t// set item width\n\t\tif ( layout !== 'masonry-metro' ) {\n\t\t\titem.outerWidth( Math.floor( contWidth / columns - gutterHorz ) );\n\t\t} else {\n\t\t\t$('.'+ page +'-grid-sizer, .'+ page +'-post.post-width1x').outerWidth( Math.floor( contWidth / 3 - gutterHorz ) );\n\t\t\t$('.'+ page +'-post.post-width2x').outerWidth( Math.floor( contWidth / 3 ) * 2 - gutterHorz);\n\t\t}\n\n\t// set gutters\n\t\tif ( layout === 'fitRows' ) {\n\t\t\titem.css('margin-right', gutterHorz + 'px');\n\t\t}\n\n\t\titem.css('margin-bottom', gutterVert + 'px');\n\n\t// Link & Quote heights\n\t\tif( layout === \"fitRows\" ) {\n\t\t\tpostMedia.find('.link-and-quote, video').css('min-height', postMedia.width() * aspectRatio + 'px');\n\t\t}\n\n\t\t// add last class\n\t\titemVisible.last().addClass('rf-last-item');\n\n\t// add last row & make all post equal height\n\t\titemVisible.each(function ( index ) {\n\n\t\t\t// define\n\t\t\tvar thisHieght = $(this).outerHeight(),\n\t\t\t\tthisTop = parseInt( $(this).css('top') , 10 );\n\n\t\t\tif ( ( index + 1 ) % columns === 0 ) {\n\t\t\t\t$(this).addClass('rf-last-item');\n\t\t\t}\n\n\t\t\t// determine max height\n\t\t\tif ( thisHieght > maxHieght ) {\n\t\t\t\tmaxHieght = thisHieght;\n\t\t\t}\n\n\t\t\t// determine last row\n\t\t\tif ( thisTop > maxTop ) {\n\t\t\t\tmaxTop = thisTop;\n\t\t\t}\n\t\t\t\n\t\t});\n\n\t\tif ( layout === 'fitRows' ) {\n\t\t\titemVisible.each(function() {\n\n\t\t\t\tif ( parseInt( $(this).css('top') ) === maxTop ) {\n\t\t\t\t\t$(this).addClass('rf-last-row');\n\t\t\t\t}\n\n\t\t\t\t$(this).css('min-height', maxHieght);\n\n\t\t\t});\n\t\t}\n\n\t// define masonry 'columnWidth' option\n\t\tvar columnWidth = contWidth / columns;\n\n\t// metro layout - based on 3 columns masonry \n\t\tif ( layout === 'masonry-metro' ) {\n\t\t\tlayout = 'masonry';\n\n\t\t\tif ( page === 'blog' ) {\n\t\t\t\tcolumnWidth = '.blog-grid-sizer';\n\t\t\t} else if ( page === 'portfolio' ) {\n\t\t\t\tcolumnWidth = '.portfolio-grid-sizer';\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t// run isotope on Portfolio & Blog\n\t\tcontainer.isotope({\n\t\t\titemSelector: 'article',\n\t\t transitionDuration: '0.6s',\n\t\t hiddenStyle: {\n\t\t transform: 'scale(0.001)'\n\t\t },\n\t\t visibleStyle: {\n\t\t transform: 'scale(1)'\n\t\t },\n\t\t\tlayoutMode : layout,\n\t\t\tmasonry: {\n\t\t\t\tcomlumnWidth: columnWidth,\n\t\t\t\tgutter: gutterHorz\n\t\t\t}\n\t\t});\n\n\t\t// sidebar equal\n\t\tsidebarEqual();\n\n\t}", "function projects_isotope() {\n if ($('.projects_area').length) {\n // Activate isotope in container\n $(\".projects_inner\").imagesLoaded(function () {\n $(\".projects_inner\").isotope({\n layoutMode: 'fitRows',\n animationOptions: {\n duration: 750,\n easing: 'linear'\n }\n });\n });\n\n // Add isotope click function\n $(\".filter li\").on('click', function () {\n $(\".filter li\").removeClass(\"active\");\n $(this).addClass(\"active\");\n\n var selector = $(this).attr(\"data-filter\");\n $(\".projects_inner\").isotope({\n filter: selector,\n animationOptions: {\n duration: 450,\n easing: \"linear\",\n queue: false,\n }\n });\n return false;\n });\n }\n }", "function galleryMasonaryLayout() {\n if ($('.filter-list').length) {\n $('.filter-list').isotope({\n itemSelector: '.gallery-item',\n layoutMode: 'masonry'\n });\n\n\n $('.post-filter').on('click', 'li', function () {\n var filterValue = $(this).attr('data-filter');\n $('.filter-list').isotope({ filter: filterValue });\n $(this).addClass(\"active\");\n $(this).siblings().removeClass(\"active\");\n });\n }\n\n}", "function isotopeGallery() {\r\n\r\n\t\t\t\tvar $container = $('.gallery-full');\r\n\t\t\t \t\t$container.isotope({\r\n\t\t\t\t\t itemSelector : '.gallery-item',\r\n\t\t\t\t\t //layoutMode : 'fitRows'\r\n\t\t\t\t\t masonry: {\r\n\t\t\t\t\t\t //columnWidth: 100,\r\n\t\t\t\t\t\t isFitWidth: true\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t \t\r\n\t\t\t\t\t// filter items when filter link is clicked\r\n\t\t\t\t\t$('#filters li').click(function(){\r\n\t\t\t\t\t var $allFilters = $('#filters li');\r\n\t\t\t\t\t $allFilters.removeClass('tags__link--active');\r\n\t\t\t\t\t $(this).addClass('tags__link--active');\r\n\r\n\t\t\t\t\t var selector = $(this).attr('data-filter');\r\n\t\t\t\t\t $container.isotope({ filter: selector });\r\n\t\t\t\t\t setProjects();\t\r\n\t\t\t\t\t return false;\r\n\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tfunction splitColumns() { \r\n\t\t\t\t\t\tvar winWidth = $(window).width(), \r\n\t\t\t\t\t\t\tcolumnNumb = 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (winWidth > 2100) {\r\n\t\t\t\t\t\t\t\tcolumnNumb = 9;\r\n\t\t\t\t\t\t\t} else if (winWidth > 1200) {\r\n\t\t\t\t\t\t\t\tcolumnNumb = 7;\r\n\t\t\t\t\t\t\t} else if (winWidth > 900) {\r\n\t\t\t\t\t\t\t\tcolumnNumb = 5;\r\n\t\t\t\t\t\t\t} else if (winWidth > 600) {\r\n\t\t\t\t\t\t\t\tcolumnNumb = 3;\r\n\t\t\t\t\t\t\t} else if (winWidth > 300) {\r\n\t\t\t\t\t\t\t\tcolumnNumb = 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn columnNumb;\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfunction setColumns() { \r\n\t\t\t\t\t\tvar winWidth = $(window).width(), \r\n\t\t\t\t\t\t\tcolumnNumb = splitColumns(), \r\n\t\t\t\t\t\t\tpostWidth = Math.floor(winWidth / columnNumb);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$container.find('.gallery-item').each(function () { \r\n\t\t\t\t\t\t\t$(this).css( { \r\n\t\t\t\t\t\t\t\twidth : postWidth + 'px'\r\n\t\t\t\t\t\t\t\t//height : postWidth + 'px' \r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfunction setProjects() { \r\n\t\t\t\t\t\tsetColumns();\r\n\t\t\t\t\t\t$container.isotope('reLayout');\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$container.imagesLoaded(function () { \r\n\t\t\t\t\t\tsetProjects();\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t$(window).bind('resize', function () { \r\n\t\t\t\t\t\tsetProjects();\t\t\t\r\n\t\t\t\t\t});\r\n}", "function masonryBlocks($cont,$item) {\n\n var container = $('.'+$cont);\n var items = $('.'+$item);\n sjq(container).imagesLoaded( function() {\n // init isotope\n sjq(container).isotope({\n itemSelector: '.'+$item,\n percentPosition: true,\n masonry: {\n columnWidth: '.'+$item\n \n }\n });\n // append other items when they are loaded\n sjq(items).imagesLoaded( function() {\n \n sjq(container).append(items)\n .isotope('appended', items)\n .isotope('layout');;\n });\n });\n}", "function isotopeConfig() {\n\t\tvar $container = $(\"#filter-port\"),\n\t\t\t$filter = $(\"#filter-nav\");\n\n\t\t$(window).on(\"load resize\", function() {\n\t\t\t$container.isotope({\n\t\t\t\titemSelector: \".item\",\n\t\t\t\tanimationEngine: \"best-available\",\n\t\t\t\ttransformsEnabled: true,\n\t\t\t\tresizesContainer: true,\n\t\t\t\tresizable: true,\n\t\t\t\teasing: \"linear\",\n\t\t\t\tlayoutMode: \"masonry\"\n\t\t\t});\n\n\t\t\t$filter.find(\"a\").on(\"click touchstart\", function(e) {\n\t\t\t\tvar $t = $(this),\n\t\t\t\t\tselector = $t.data(\"filter\");\n\t\t\t\t// Don't proceed if already selected\n\t\t\t\tif($t.hasClass(\"filter-current\"))\n\t\t\t\t\treturn false;\n\n\t\t\t\t$filter.find(\".filter-current\").removeClass(\"filter-current\");\n\t\t\t\t$t.parent().addClass(\"filter-current\");\n\t\t\t\t$container.isotope({filter: selector});\n\n\t\t\t\te.stopPropagation();\n\t\t\t\te.preventDefault(); \n\t\t\t});\n\t\t})\n\t}", "function galleryMasonaryLayout() {\n if ($('.masonary-layout').length) {\n $('.masonary-layout').isotope({\n layoutMode: 'masonry'\n });\n }\n\n if ($('.post-filter').length) {\n $('.post-filter li').children('span').on('click', function() {\n var Self = $(this);\n var selector = Self.parent().attr('data-filter');\n $('.post-filter li').children('span').parent().removeClass('active');\n Self.parent().addClass('active');\n $('.filter-layout').isotope({\n filter: selector,\n stagger: 30,\n transitionDuration: 400,\n hiddenStyle: {\n opacity: 0\n },\n visibleStyle: {\n opacity: 1\n }\n });\n return false;\n });\n }\n\n if ($('.post-filter.has-dynamic-filter-counter').length) {\n // var allItem = $('.single-filter-item').length;\n\n var activeFilterItem = $('.post-filter.has-dynamic-filter-counter').find('li');\n\n activeFilterItem.each(function() {\n var filterElement = $(this).data('filter');\n console.log(filterElement);\n var count = $('.gallery-content').find(filterElement).length;\n\n $(this).children('span').append('<span class=\"count\"><b>' + count + '</b></span>');\n });\n };\n}", "function initIsotope(container, masonryObj, columnSize) {\r\n\r\n // modified Isotope methods for gutters in masonry\r\n $.Isotope.prototype._getMasonryGutterColumns = function () {\r\n var gutter = this.options.masonry && this.options.masonry.gutterWidth || 0;\r\n containerWidth = this.element.width();\r\n\r\n this.masonry.columnWidth = this.options.masonry && this.options.masonry.columnWidth ||\r\n // or use the size of the first item\r\n this.$filteredAtoms.outerWidth(true) ||\r\n // if there's no items, use size of container\r\n containerWidth;\r\n\r\n this.masonry.columnWidth += gutter;\r\n this.masonry.cols = Math.floor((containerWidth + gutter) / this.masonry.columnWidth);\r\n this.masonry.cols = Math.max(this.masonry.cols, 1);\r\n };\r\n\r\n $.Isotope.prototype._masonryReset = function () {\r\n // layout-specific props\r\n this.masonry = {};\r\n // FIXME shouldn't have to call this again\r\n this._getMasonryGutterColumns();\r\n var i = this.masonry.cols;\r\n this.masonry.colYs = [];\r\n while (i--) {\r\n this.masonry.colYs.push(0);\r\n }\r\n };\r\n\r\n $.Isotope.prototype._masonryResizeChanged = function () {\r\n var prevSegments = this.masonry.cols;\r\n // update cols/rows\r\n this._getMasonryGutterColumns();\r\n // return if updated cols/rows is not equal to previous\r\n return (this.masonry.cols !== prevSegments);\r\n };\r\n\r\n jQuery(window).on(\"load\", function () {\r\n\r\n if (typeof columnSize === \"undefined\") {\r\n columnSize = 155;\r\n }\r\n\r\n container.isotope({\r\n itemSelector: masonryObj,\r\n masonry: {\r\n columnWidth: parseInt(columnSize),\r\n gutterWidth: 10\r\n }\r\n });\r\n });\r\n}", "function isotopeFilters() {\r\n\r\n\t\t\t\t\t/* ------------------- Isotope filters --------------------------*/\r\n\t\t\t\r\n\t\t\t\t\tvar $container = $('#blog-random');\r\n\t\t\t \t\t$container.isotope({\r\n\t\t\t\t\t itemSelector : '.post',\r\n\t\t\t\t\t masonry: {\r\n\t\t\t\t\t\t isFitWidth: true\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t \t\r\n\t\t\t\t\t// filter items when filter link is clicked\r\n\t\t\t\t\t$('#filters li').click(function(){\r\n\t\t\t\t\t var $allFilters = $('#filters li');\r\n\t\t\t\t\t $allFilters.removeClass('tags__link--active');\r\n\t\t\t\t\t $(this).addClass('tags__link--active');\r\n\r\n\t\t\t\t\t var selector = $(this).attr('data-filter');\r\n\t\t\t\t\t $container.isotope({ filter: selector });\r\n\t\t\t\t\t setProjects();\t\r\n\t\t\t\t\t return false;\r\n\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tfunction splitColumns() { \r\n\t\t\t\t\t\tvar winWidth = $(window).width(), \r\n\t\t\t\t\t\t\tcolumnNumb = 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (winWidth > 1200) {\r\n\t\t\t\t\t\t\t\tcolumnNumb = 4;\r\n\t\t\t\t\t\t\t} else if (winWidth > 900) {\r\n\t\t\t\t\t\t\t\tcolumnNumb = 3;\r\n\t\t\t\t\t\t\t} else if (winWidth > 600) {\r\n\t\t\t\t\t\t\t\tcolumnNumb = 2;\r\n\t\t\t\t\t\t\t} else if (winWidth > 200) {\r\n\t\t\t\t\t\t\t\tcolumnNumb = 1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn columnNumb;\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfunction setColumns() { \r\n\t\t\t\t\t\tvar winWidth = $(window).width(), \r\n\t\t\t\t\t\t\tcolumnNumb = splitColumns(), \r\n\t\t\t\t\t\t\tpostWidth = Math.floor(winWidth / columnNumb);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$container.find('.item').each(function () { \r\n\t\t\t\t\t\t\t$(this).css( { \r\n\t\t\t\t\t\t\t\twidth : postWidth + 'px',\r\n\t\t\t\t\t\t\t\theight : postWidth + 'px' \r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfunction setProjects() { \r\n\t\t\t\t\t\tsetColumns();\r\n\t\t\t\t\t\t$container.isotope('reLayout');\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$container.imagesLoaded(function () { \r\n\t\t\t\t\t\tsetProjects();\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t$(window).bind('resize', function () { \r\n\t\t\t\t\t\tsetProjects();\t\t\t\r\n\t\t\t\t\t});\r\n}", "function isotopeResize() { $container.isotope( 'reLayout' ); }", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n // HACK copy over isOriginLeft/Top options\n var _manageStamp = MasonryMode.prototype._manageStamp;\n MasonryMode.prototype._manageStamp = function() {\n this.options.isOriginLeft = this.isotope.options.isOriginLeft;\n this.options.isOriginTop = this.isotope.options.isOriginTop;\n _manageStamp.apply( this, arguments );\n };\n\n return MasonryMode;\n}", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n // HACK copy over isOriginLeft/Top options\n var _manageStamp = MasonryMode.prototype._manageStamp;\n MasonryMode.prototype._manageStamp = function() {\n this.options.isOriginLeft = this.isotope.options.isOriginLeft;\n this.options.isOriginTop = this.isotope.options.isOriginTop;\n _manageStamp.apply( this, arguments );\n };\n\n return MasonryMode;\n}", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n // HACK copy over isOriginLeft/Top options\n var _manageStamp = MasonryMode.prototype._manageStamp;\n MasonryMode.prototype._manageStamp = function() {\n this.options.isOriginLeft = this.isotope.options.isOriginLeft;\n this.options.isOriginTop = this.isotope.options.isOriginTop;\n _manageStamp.apply( this, arguments );\n };\n\n return MasonryMode;\n}", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n // HACK copy over isOriginLeft/Top options\n var _manageStamp = MasonryMode.prototype._manageStamp;\n MasonryMode.prototype._manageStamp = function() {\n this.options.isOriginLeft = this.isotope.options.isOriginLeft;\n this.options.isOriginTop = this.isotope.options.isOriginTop;\n _manageStamp.apply( this, arguments );\n };\n\n return MasonryMode;\n}", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n // HACK copy over isOriginLeft/Top options\n var _manageStamp = MasonryMode.prototype._manageStamp;\n MasonryMode.prototype._manageStamp = function() {\n this.options.isOriginLeft = this.isotope.options.isOriginLeft;\n this.options.isOriginTop = this.isotope.options.isOriginTop;\n _manageStamp.apply( this, arguments );\n };\n\n return MasonryMode;\n}", "function isotopeUpdateLayout() {\n\tif (globalDebug) {console.log(\"Isotope Update Layout\");}\n\n\tif ( !empty($isotope_container) && $isotope_container.length ) {\n\t\t$isotope_container.isotope( 'layout' );\n\t}\n}", "function initIsotopeFiltering()\n {\n \tvar sortBtn = $('.sort_btn');\n \tvar filterBtn = $('.filter_btn');\n\n \tif($('.offers_grid').length)\n \t{\n \t\tvar grid = $('.offers_grid').isotope({\n \t\t\titemSelector: '.offers_item',\n\t getSortData: {\n\t \tprice: function(itemElement)\n\t \t{\n\t \t\tvar priceEle = $(itemElement).find('.offers_price').text().replace( '$', '' );\n\t \t\treturn parseFloat(priceEle);\n\t \t},\n\t \tname: '.offer_name',\n\t \tstars: function(itemElement)\n\t \t{\n\t \t\tvar starsEle = $(itemElement).find('.offers_rating');\n\t \t\tvar stars = starsEle.attr(\"data-rating\");\n\t \t\treturn stars;\n\t \t}\n\t },\n\t animationOptions: {\n\t duration: 750,\n\t easing: 'linear',\n\t queue: false\n\t }\n\t });\n\n \t\t// Sorting\n\t sortBtn.each(function()\n\t {\n\t \t$(this).on('click', function()\n\t \t{\n\t \t\tvar parent = $(this).parent().parent().find('.sorting_text');\n\t \t\tparent.text($(this).text());\n\t \t\tvar option = $(this).attr('data-isotope-option');\n\t \t\toption = JSON.parse( option );\n \t\t\t\tgrid.isotope( option );\n\t \t});\n\t });\n\n\t // Filtering\n\t $('.filter_btn').on('click', function()\n\t {\n\t \tvar parent = $(this).parent().parent().find('.sorting_text');\n\t \tparent.text($(this).text());\n\t\t var filterValue = $(this).attr('data-filter');\n \t\t\t\tgrid.isotope({ filter: filterValue });\n\t });\n \t}\n }", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _getElementOffset = MasonryMode.prototype._getElementOffset;\n var layout = MasonryMode.prototype.layout;\n var _getMeasurement = MasonryMode.prototype._getMeasurement;\n\n // sub-class Masonry\n extend( MasonryMode.prototype, Masonry.prototype );\n\n // set back, as it was overwritten by Masonry\n MasonryMode.prototype._getElementOffset = _getElementOffset;\n MasonryMode.prototype.layout = layout;\n MasonryMode.prototype._getMeasurement = _getMeasurement;\n\n var measureColumns = MasonryMode.prototype.measureColumns;\n MasonryMode.prototype.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n return MasonryMode;\n}", "function organizeProducts() {\n var $grid = $(\".grid\").isotope({\n itemSelector: \".product-item\",\n getSortData: {\n id: \".id parseInt\",\n season: \".season parseInt\",\n category: \".category\",\n },\n percentPosition: true,\n masonry: {\n columnWidth: \".col-sm-2\"\n },\n sortBy: [\"season\",\"category\" ,\"id\"]\n });\n $grid.isotope(\"updateSortData\").isotope();\n }", "function initWorkFilter(){\n // Projects filtering\n var fselector = 0,\n itemsGrid = $(\"#items-grid\");\n\n (function($){\n \"use strict\";\n var isotopeMode;\n if (itemsGrid.hasClass(\"masonry\")){\n isotopeMode = \"masonry\";\n } else{\n isotopeMode = \"fitRows\"\n }\n\n itemsGrid.imagesLoaded(function(){\n itemsGrid.isotope({\n itemSelector: '.mix',\n layoutMode: isotopeMode,\n filter: fselector\n });\n });\n\n $(\".port-filter\").on('click','.filter', function(){\n $(\".filter\").removeClass(\"active\");\n $(this).addClass(\"active\");\n fselector = $(this).attr('data-filter');\n\n itemsGrid.isotope({\n itemSelector: '.mix',\n layoutMode: isotopeMode,\n filter: fselector\n });\n return false;\n });\n\n })(jQuery);\n}", "function popular_recype(){\n if ( $('.p_recype_item_inner').length ){\n $('.p_recype_item_inner').imagesLoaded(function(){\n $('.p_recype_item_inner').isotope({\n itemSelector: '.portfolio-g .col-md-6',\n layoutMode: 'fitRows',\n percentPosition:true,\n masonry: {\n columnWidth: 1,\n } \n })\n });\n }\n }", "function simple_blogmasonry() {\n \"use strict\";\n var container = $('#blogmasonry .filterable');\n container.imagesLoaded(function() {\n\n msnry_blog = new Masonry('#blogmasonry .filterable', {\n \"columnWidth\": \".grid-size\",\n itemSelector: '.blog-article'\n });\n\n });\n }", "initModule( $container ) {\n // load HTML and map jQuery collections\n this.stateMap.$container = $container;\n $container.html( this.configMap.main_html );\n this.setJqueryMap();\n\n // configure uriAnchor to use our schema\n $.uriAnchor.configModule({\n schema_map : this.configMap.anchor_schema_map\n });\n\n // configure and initialize feature modules\n // spa.menubar.configModule({\n // toolbox_model : spa.model.toolbox,\n // people_model : spa.model.people\n // });\n spa.menubar.initModule( this.jqueryMap.$menubar );\n\n spa.imagelist.configModule({\n cropper_model : spa.model,\n on_load : (input_files) => {this.loadImages(input_files);},\n });\n spa.imagelist.initModule( this.jqueryMap.$imagelist );\n\n spa.imagelistmodel.configModule({\n show_config : (config) => {spa.toolbox.updateConfig(config);},\n add_image_frontend : (backend) => {return spa.imagelist.addImagebox(backend);},\n });\n // imagelistmodel does not need init\n\n // configure and initialize feature modules\n spa.toolbox.configModule({\n set_toolbox_anchor : (position) => {this.setToolboxAnchor(position);},\n on_load : (input_files) => {this.loadImages(input_files);},\n on_save : () => {spa.imagelistmodel.saveImages()},\n lock_all : (input_type) => {\n spa.imagelistmodel.lockAll(input_type)}, // TODO\n on_input_change : (config) => {spa.imagelistmodel.updateConfig(config)},\n });\n spa.toolbox.initModule( this.jqueryMap.$container );\n\n // spa.footer.initModule( this.jqueryMap.$container );\n\n spa.announcement.initModule( this.jqueryMap.$container );\n\n // Handle URI anchor change events.\n // This is done /after/ all feature modules are configured\n // and initialized, otherwise they will not be ready to handle\n // the trigger event, which is used to ensure the anchor\n // is considered on-load\n //\n $(window)\n .bind( 'resize', () => {this.onResize();} )\n .bind( 'hashchange', () => {this.onHashchange();} )\n .trigger( 'hashchange' );\n }", "function izotopInit() {\n if ($('.izotope-container').length) {\n var $container = $('.izotope-container');\n $container.isotope({\n itemSelector: '.item',\n layoutMode: 'masonry',\n masonry: {\n columnWidth: '.grid-sizer'\n }\n });\n $('.filter-list li').click(function () {\n $('.izotope-container').each(function () {\n $(this).find('.item').removeClass('animated');\n });\n $('.filter-list li').removeClass('active');\n $(this).addClass('active');\n var filterValue = $(this).attr('data-filter');\n $container.isotope({filter: filterValue});\n });\n }\n }", "function initMegaFolio() {\n\t\tvar api=jQuery('.megafolio-container').megafoliopro(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfilterChangeAnimation:\"pagebottom\",\n\t\t\t\t\t\t\tfilterChangeSpeed:400,\n\t\t\t\t\t\t\tfilterChangeRotate:99,\n\t\t\t\t\t\t\tfilterChangeScale:0.6,\n\t\t\t\t\t\t\tdelay:20,\n\t\t\t\t\t\t\tdefaultWidth:980,\n\t\t\t\t\t\t\tpaddingHorizontal:10,\n\t\t\t\t\t\t\tpaddingVertical:10,\n\t\t\t\t\t\t\tlayoutarray:[9,11,5,3,7,12,4,6,13]\n\t\t\t\t\t\t});\n\n\t}", "function isotopeInfiniteScrollingInit() {\n\tif (globalDebug) {console.log(\"Isotope Infinite Scroll Init\");}\n\n\tisotope_page_counter = 1;\n\n\t$isotope_container.infinitescroll({\n\t\t\tnavSelector : 'ol.pagination', // selector for the paged navigation\n\t\t\tnextSelector : 'ol.pagination a.next', // selector for the NEXT link\n\t\t\titemSelector : 'article.article-archive', // selector for all items you'll retrieve\n\t\t\tloading: {\n\t\t\t\tfinished: undefined,\n\t\t\t\tfinishedMsg: objectl10n.infscrReachedEnd,\n\t\t\t\timg: \"data:image/gif;base64,R0lGODlhIAAgAPUAAP///wAAAPr6+sTExOjo6PDw8NDQ0H5+fpqamvb29ubm5vz8/JKSkoaGhuLi4ri4uKCgoOzs7K6urtzc3D4+PlZWVmBgYHx8fKioqO7u7kpKSmxsbAwMDAAAAM7OzsjIyNjY2CwsLF5eXh4eHkxMTLCwsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAIAAgAAAG/0CAcEgkFjgcR3HJJE4SxEGnMygKmkwJxRKdVocFBRRLfFAoj6GUOhQoFAVysULRjNdfQFghLxrODEJ4Qm5ifUUXZwQAgwBvEXIGBkUEZxuMXgAJb1dECWMABAcHDEpDEGcTBQMDBQtvcW0RbwuECKMHELEJF5NFCxm1AAt7cH4NuAOdcsURy0QCD7gYfcWgTQUQB6Zkr66HoeDCSwIF5ucFz3IC7O0CC6zx8YuHhW/3CvLyfPX4+OXozKnDssBdu3G/xIHTpGAgOUPrZimAJCfDPYfDin2TQ+xeBnWbHi37SC4YIYkQhdy7FvLdpwWvjA0JyU/ISyIx4xS6sgfkNS4me2rtVKkgw0JCb8YMZdjwqMQ2nIY8BbcUQNVCP7G4MQq1KRivR7tiDEuEFrggACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCQmNBpCcckkEgREA4ViKA6azM8BEZ1Wh6LOBls0HA5fgJQ6HHQ6InKRcWhA1d5hqMMpyIkOZw9Ca18Qbwd/RRhnfoUABRwdI3IESkQFZxB4bAdvV0YJQwkDAx9+bWcECQYGCQ5vFEQCEQoKC0ILHqUDBncCGA5LBiHCAAsFtgqoQwS8Aw64f8m2EXdFCxO8INPKomQCBgPMWAvL0n/ff+jYAu7vAuxy8O/myvfX8/f7/Arq+v0W0HMnr9zAeE0KJlQkJIGCfE0E+PtDq9qfDMogDkGmrIBCbNQUZIDosNq1kUsEZJBW0dY/b0ZsLViQIMFMW+RKKgjFzp4fNokPIdki+Y8JNVxA79jKwHAI0G9JGw5tCqDWTiFRhVhtmhVA16cMJTJ1OnVIMo1cy1KVI5NhEAAh+QQJCgAAACwAAAAAIAAgAAAG/0CAcEgkChqNQnHJJCYWRMfh4CgamkzFwBOdVocNCgNbJAwGhKGUOjRQKA1y8XOGAtZfgIWiSciJBWcTQnhCD28Qf0UgZwJ3XgAJGhQVcgKORmdXhRBvV0QMY0ILCgoRmIRnCQIODgIEbxtEJSMdHZ8AGaUKBXYLIEpFExZpAG62HRRFArsKfn8FIsgjiUwJu8FkJLYcB9lMCwUKqFgGHSJ5cnZ/uEULl/CX63/x8KTNu+RkzPj9zc/0/Cl4V0/APDIE6x0csrBJwybX9DFhBhCLgAilIvzRVUriKHGlev0JtyuDvmsZUZlcIiCDnYu7KsZ0UmrBggRP7n1DqcDJEzciOgHwcwTyZEUmIKEMFVIqgyIjpZ4tjdTxqRCMPYVMBYDV6tavUZ8yczpkKwBxHsVWtaqo5tMgACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCQuBgNBcck0FgvIQtHRZCYUGSJ0IB2WDo9qUaBQKIXbLsBxOJTExUh5mB4iDo0zXEhWJNBRQgZtA3tPZQsAdQINBwxwAnpCC2VSdQNtVEQSEkOUChGSVwoLCwUFpm0QRAMVFBQTQxllCqh0kkIECF0TG68UG2O0foYJDb8VYVa0alUXrxoQf1WmZnsTFA0EhgCJhrFMC5Hjkd57W0jpDsPDuFUDHfHyHRzstNN78PPxHOLk5dwcpBuoaYk5OAfhXHG3hAy+KgLkgNozqwzDbgWYJQyXsUwGXKNA6fnYMIO3iPeIpBwyqlSCBKUqEQk5E6YRmX2UdAT5kEnHKkQ5hXjkNqTPtKAARl1sIrGoxSFNuSEFMNWoVCxEpiqyRlQY165wEHELAgAh+QQJCgAAACwAAAAAIAAgAAAG/0CAcEgsKhSLonJJTBIFR0GxwFwmFJlnlAgaTKpFqEIqFJMBhcEABC5GjkPz0KN2tsvHBH4sJKgdd1NHSXILah9tAmdCC0dUcg5qVEQfiIxHEYtXSACKnWoGXAwHBwRDGUcKBXYFi0IJHmQEEKQHEGGpCnp3AiW1DKFWqZNgGKQNA65FCwV8bQQHJcRtds9MC4rZitVgCQbf4AYEubnKTAYU6eoUGuSpu3fo6+ka2NrbgQAE4eCmS9xVAOW7Yq7IgA4Hpi0R8EZBhDshOnTgcOtfM0cAlTigILFDiAFFNjk8k0GZgAxOBozouIHIOyKbFixIkECmIyIHOEiEWbPJTTQ5FxcVOMCgzUVCWwAcyZJvzy45ADYVZNIwTlIAVfNB7XRVDLxEWLQ4E9JsKq+rTdsMyhcEACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCwqFIuicklMEgVHQVHKVCYUmWeUWFAkqtOtEKqgAsgFcDFyHJLNmbZa6x2Lyd8595h8C48RagJmQgtHaX5XZUYKQ4YKEYSKfVKPaUMZHwMDeQBxh04ABYSFGU4JBpsDBmFHdXMLIKofBEyKCpdgspsOoUsLXaRLCQMgwky+YJ1FC4POg8lVAg7U1Q5drtnHSw4H3t8HDdnZy2Dd4N4Nzc/QeqLW1bnM7rXuV9tEBhQQ5UoCbJDmWKBAQcMDZNhwRVNCYANBChZYEbkVCZOwASEcCDFQ4SEDIq6WTVqQIMECBx06iCACQQPBiSabHDqzRUTKARMhSFCDrc+WNQIcOoRw5+ZIHj8ADqSEQBQAwKKLhIzowEEeGKQ0owIYkPKjHihZoBKi0KFE01b4zg7h4y4IACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCwqFIuicklMEgVHQVHKVCYUmWeUWFAkqtOtEKqgAsgFcDFyHJLNmbZa6x2Lyd8595h8C48RagJmQgtHaX5XZUUJeQCGChGEin1SkGlubEhDcYdOAAWEhRlOC12HYUd1eqeRokOKCphgrY5MpotqhgWfunqPt4PCg71gpgXIyWSqqq9MBQPR0tHMzM5L0NPSC8PCxVUCyeLX38+/AFfXRA4HA+pjmoFqCAcHDQa3rbxzBRD1BwgcMFIlidMrAxYICHHA4N8DIqpsUWJ3wAEBChQaEBnQoB6RRr0uARjQocMAAA0w4nMz4IOaU0lImkSngYKFc3ZWyTwJAALGK4fnNA3ZOaQCBQ22wPgRQlSIAYwSfkHJMrQkTyEbKFzFydQq15ccOAjUEwQAIfkECQoAAAAsAAAAACAAIAAABv9AgHBILCoUi6JySUwSBUdBUcpUJhSZZ5RYUCSq060QqqACyAVwMXIcks2ZtlrrHYvJ3zn3mHwLjxFqAmZCC0dpfldlRQl5AIYKEYSKfVKQaW5sSENxh04ABYSFGU4LXYdhR3V6p5GiQ4oKmGCtjkymi2qGBZ+6eo+3g8KDvYLDxKrJuXNkys6qr0zNygvHxL/V1sVD29K/AFfRRQUDDt1PmoFqHgPtBLetvMwG7QMes0KxkkIFIQNKDhBgKvCh3gQiqmxt6NDBAAEIEAgUOHCgBBEH9Yg06uWAIQUABihQMACgBEUHTRwoUEOBIcqQI880OIDgm5ABDA8IgUkSwAAyij1/jejAARPPIQwONBCnBAJDCEOOCnFA8cOvEh1CEJEqBMIBEDaLcA3LJIEGDe/0BAEAIfkECQoAAAAsAAAAACAAIAAABv9AgHBILCoUi6JySUwSBUdBUcpUJhSZZ5RYUCSq060QqqACyAVwMXIcks2ZtlrrHYvJ3zn3mHwLjxFqAmZCC0dpfldlRQl5AIYKEYSKfVKQaW5sSENxh04ABYSFGU4LXYdhR3V6p5GiQ4oKmGCtjkymi2qGBZ+6eo+3g8KDvYLDxKrJuXNkys6qr0zNygvHxL/V1sVDDti/BQccA8yrYBAjHR0jc53LRQYU6R0UBnO4RxmiG/IjJUIJFuoVKeCBigBN5QCk43BgFgMKFCYUGDAgFEUQRGIRYbCh2xACEDcAcHDgQDcQFGf9s7VkA0QCI0t2W0DRw68h8ChAEELSJE8xijBvVqCgIU9PjwA+UNzG5AHEB9xkDpk4QMGvARQsEDlKxMCALDeLcA0rqEEDlWCCAAAh+QQJCgAAACwAAAAAIAAgAAAG/0CAcEgsKhSLonJJTBIFR0FRylQmFJlnlFhQJKrTrRCqoALIBXAxchySzZm2Wusdi8nfOfeYfAuPEWoCZkILR2l+V2VFCXkAhgoRhIp9UpBpbmxIQ3GHTgAFhIUZTgtdh2FHdXqnkaJDigqYYK2OTKaLaoYFn7p6j0wOA8PEAw6/Z4PKUhwdzs8dEL9kqqrN0M7SetTVCsLFw8d6C8vKvUQEv+dVCRAaBnNQtkwPFRQUFXOduUoTG/cUNkyYg+tIBlEMAFYYMAaBuCekxmhaJeSeBgiOHhw4QECAAwcCLhGJRUQCg3RDCmyUVmBYmlOiGqmBsPGlyz9YkAlxsJEhqCubABS9AsPgQAMqLQfM0oTMwEZ4QpLOwvMLxAEEXIBG5aczqtaut4YNXRIEACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCwqFIuicklMEgVHQVHKVCYUmWeUWFAkqtOtEKqgAsgFcDFyHJLNmbZa6x2Lyd8595h8C48RahAQRQtHaX5XZUUJeQAGHR0jA0SKfVKGCmlubEhCBSGRHSQOQwVmQwsZTgtdh0UQHKIHm2quChGophuiJHO3jkwOFB2UaoYFTnMGegDKRQQG0tMGBM1nAtnaABoU3t8UD81kR+UK3eDe4nrk5grR1NLWegva9s9czfhVAgMNpWqgBGNigMGBAwzmxBGjhACEgwcgzAPTqlwGXQ8gMgAhZIGHWm5WjelUZ8jBBgPMTBgwIMGCRgsygVSkgMiHByD7DWDmx5WuMkZqDLCU4gfAq2sACrAEWFSRLjUfWDopCqDTNQIsJ1LF0yzDAA90UHV5eo0qUjB8mgUBACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCwqFIuickk0FIiCo6A4ZSoZnRBUSiwoEtYipNOBDKOKKgD9DBNHHU4brc4c3cUBeSOk949geEQUZA5rXABHEW4PD0UOZBSHaQAJiEMJgQATFBQVBkQHZKACUwtHbX0RR0mVFp0UFwRCBSQDSgsZrQteqEUPGrAQmmG9ChFqRAkMsBd4xsRLBBsUoG6nBa14E4IA2kUFDuLjDql4peilAA0H7e4H1udH8/Ps7+3xbmj0qOTj5mEWpEP3DUq3glYWOBgAcEmUaNI+DBjwAY+dS0USGJg4wABEXMYyJNvE8UOGISKVCNClah4xjg60WUKyINOCUwrMzVRARMGENWQ4n/jpNTKTm15J/CTK2e0MoD+UKmHEs4onVDVVmyqdpAbNR4cKTjqNSots07EjzzJh1S0IADsAAAAAAAAAAAA=\",\n\t\t\t\tmsg: null,\n\t\t\t\tmsgText: objectl10n.infscrLoadingText,\n\t\t\t\tselector: null,\n\t\t\t\tspeed: 'fast',\n\t\t\t\tstart: undefined\n\t\t\t},\n\t\t\tdebug: globalDebug,\n\t\t\t//animate : true,\n\t\t\t//extraScrollPx: 500,\n\t\t\tprefill: true,\n\t\t\tmaxPage: max_isotope_pages,\n\t\t\terrorCallback: function(){}\n\t\t\t// called when a requested page 404's or when there is no more content\n\t\t\t// new in 1.2\n\t\t},\n\t\t// trigger Isotope as a callback\n\t\tfunction( newElements, data, url ) {\n\n\t\t\tnewElements.forEach(function(e){\n\t\t\t\t$(e).css('opacity', 0);\n\t\t\t});\n\n\t\t\tvar $newElems = $( newElements );\n\n\t\t\t//if we have twitter widgets then we need to update the layout once they are loaded\n\t\t\tif ( typeof twttr != \"undefined\" ) {\n\t\t\t\tif ( globalDebug ) {console.log( \"Twitter API - Load new elements\" );}\n\n\t\t\t\ttwttr.widgets.load(newElements);\n\n\t\t\t}\n\n\t\t\tinfiniteScrollingRefreshComponents($isotope_container);\n\n\t\t\tif (globalDebug) {console.log(\"Infinite Scroll - Adding new \"+$newElems.length+\" items to the DOM\");}\n\n\t\t\t// ensure that images load before adding to masonry layout\n\t\t\t$newElems.imagesLoaded(function(){\n\n\t\t\t\t$isotope_container.isotope( 'appended', $newElems );\n\n\t\t\t\tif (globalDebug) {console.log(\"Isotope Infinite Scroll Loaded Next Page\");}\n\n\t\t\t\t//refresh all there is to refresh\n\t\t\t\t//layoutRefresh();\n\n\t\t\t\tisotope_page_counter++;\n\n\t\t\t\tif (isotope_page_counter == max_isotope_pages) {\n\t\t\t\t\t$('.load-more__container').fadeOut('slow');\n\t\t\t\t} else {\n\t\t\t\t\t$('.load-more__container .load-more__button').removeClass('loading');\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\tif ($isotope_container.hasClass('infinite_scroll_with_button')) {\n\t\tinfiniteScrollingOnClick($isotope_container);\n\t}\n}", "function qodefOnWindowLoad() {\n qodefInitProductListMasonryShortcode();\n }", "finisher(clazz){window.customElements.define(tagName,clazz);}", "function initMasonry() {\n \t// first handle the imagesloaded because we are loading images\n \tvar $grid = $('.grid').imagesLoaded( function() {\n console.log(\"masonry initialized\");\n\n // Now call masonry after all images have loaded so it'll \n // properly gridify the images, gridify is probably not a real word.\n $grid.masonry({\n itemSelector: '.grid-item',\n percentPosition: true,\n columnWidth: '.grid-sizer'\n });\n });\n \t\n \t// we can init the featherlight library here.\n\tinitFeatherLight();\n }", "function initMasonryGallery(){\n \"use strict\";\n\n resizeMasonryGallery($j('.grid-sizer').width());\n\n if($j('.masonry_gallery_holder').length){\n\n $j('.masonry_gallery_holder').each(function(){\n var $this = $j(this);\n $this.waitForImages(function(){\n $this.animate({opacity:1});\n $this.isotope({\n itemSelector: '.masonry_gallery_item',\n masonry: {\n columnWidth: '.grid-sizer'\n }\n });\n\t\t\t\t\n\t\t\t\t$this.find('.masonry_gallery_item.parallax_item').each(function(i){\n\t\t\t\t\t$j(this).masonryParallax($this.data('parallax_item_speed'), true, $this.data('parallax_item_offset'));\n\t\t\t\t\t\n\t\t\t\t});\n });\n });\n $j(window).resize(function(){\n resizeMasonryGallery($j('.grid-sizer').width());\n $j('.masonry_gallery_holder').isotope('reloadItems');\n });\n }\n}", "function searchResultMasonry() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $searchContainer = $('#search-results'),\r\n\t\t\t\t\t$dividerNum = ($searchContainer.is('[data-layout=\"masonry-no-sidebar\"]')) ? 4 : 3;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$searchContainer.imagesLoaded(function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$searchContainer.isotope({\r\n\t\t\t\t\t\t\titemSelector: '.result',\r\n\t\t\t\t\t\t\tlayoutMode: 'packery',\r\n\t\t\t\t\t\t\tpackery: {\r\n\t\t\t\t\t\t\t\tcolumnWidth: $('#search-results').width() / $dividerNum\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$searchContainer\r\n\t\t\t\t\t\t\t.find('article')\r\n\t\t\t\t\t\t\t.css('opacity', '1');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t$window.on('resize', function () {\r\n\t\t\t\t\t\t$searchContainer.isotope({\r\n\t\t\t\t\t\t\tlayoutMode: 'packery',\r\n\t\t\t\t\t\t\tpackery: {\r\n\t\t\t\t\t\t\t\tcolumnWidth: $('#search-results').width() / $dividerNum\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function searchResultMasonryInit() {\r\n\t\t\t\t\tif ($('body.search-results').length > 0 && \r\n\t\t\t\t\t$('#search-results article').length > 0 && \r\n\t\t\t\t\t$('#search-results[data-layout=\"list-no-sidebar\"]').length == 0) {\r\n\t\t\t\t\t\tsearchResultMasonry();\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "renderLayout() {\n\t let self = this;\t \n\t let photoListWrapper = document.querySelector('#photos');\t \n imagesLoaded(photoListWrapper, function() { \t \n\t\t\tself.msnry = new Masonry( photoListWrapper, {\n\t\t\t\titemSelector: '.photo'\n\t\t\t}); \n\t\t\t[...document.querySelectorAll('#photos .photo')].forEach(el => el.classList.add('in-view'));\n });\n }", "function makeMasonry() {\n window.myMasonry = new Masonry(document.querySelector(`.${CLASSES.MASONRY}`))\n }", "function portfolioMasonry() {\n var portfolio = $(\"#work-portfolio, .projects_inner\");\n if (portfolio.length) {\n portfolio.imagesLoaded(function () {\n // images have loaded\n // Activate isotope in container\n portfolio.isotope({\n // itemSelector: \".portfolio_item\",\n layoutMode: \"fitRows\",\n filter: \"*\",\n animationOptions: {\n duration: 1000,\n },\n transitionDuration: \"0.5s\",\n });\n\n // Add isotope click function\n $(\"#portfolio_filter div\").on(\"click\", function () {\n $(\"#portfolio_filter div\").removeClass(\"active\");\n $(this).addClass(\"active\");\n\n var selector = $(this).attr(\"data-filter\");\n portfolio.isotope({\n filter: selector,\n animationOptions: {\n animationDuration: 750,\n easing: \"linear\",\n queue: false,\n },\n });\n return false;\n });\n });\n }\n }", "function workGrid() {\n var $container5 = $('.work5').isotope({\n itemSelector: '.thumbnail',\n masonry: {\n columnWidth: '.thumbnail'\n }\n });\n // filter items on button click\n $('.filters').on( 'click', 'li', function() {\n var filterValue = $(this).attr('data-filter');\n $container5.isotope({ filter: filterValue });\n });\n}", "function izotopInit(){\n\t if ($('.izotope-container').length){\n\t var $container = $('.izotope-container');\n\t\t\t$container.isotope({\n\t\t\titemSelector: '.grid-item',\n\t\t\tlayoutMode: 'masonry',\n\t\t\tmasonry: {\n\t\t\t columnWidth: '.grid-sizer'\n\t\t\t}\n\t\t });\n $('.filter-list ul li').on('click', function() {\n \tconsole.log('click');\n $('.izotope-container').each(function(){\n $(this).find('.grid-item').removeClass('animated');\n });\n $('.filter-list ul li').removeClass('active');\n $(this).addClass('active');\n var filterValue = $(this).attr('data-filter');\n $container.isotope({filter: filterValue});\n }); \n\t }\n\t}", "finisher(clazz){window.customElements.define(tagName,clazz)}", "function izotopInit() {\n if ($('.izotope-container').length) {\n var $container = $('.izotope-container');\n $container.isotope({\n itemSelector: '.item',\n layoutMode: 'masonry',\n masonry: {\n columnWidth: '.grid-sizer'\n }\n });\n $('.filter-mob-list').on('click', 'li', function() {\n $('.izotope-container').each(function() {\n $(this).find('.item').removeClass('animated');\n });\n $('.filter-mob-list li').removeClass('active');\n $(this).addClass('active');\n var filterValue = $(this).attr('data-filter');\n $container.isotope({ filter: filterValue });\n });\n }\n }", "function qodeOnWindowLoad() {\n qodeInitElementorAdvancedImageGalleryMasonry();\n }", "function resizeIsotope() {\n\tjQuery('.isotope, .isotopeNOanim').each(function() {\n\t\t\"use strict\";\n\t\tvar cont = jQuery(this);\n\t\tvar columns = Math.max(1, Number(cont.data('columns')));\n\t\tif (columns == 1 || cont.data('last-width') == cont.width()) return;\n\t\tvar changeHeight = cont.hasClass('portfolio');\n\t\tvar element = cont.find('.isotopeElement');\n\t\tvar m1 = parseInt(cont.css('marginRight'));\n\t\tif (isNaN(m1)) m1 = 0;\n\t\tvar m2 = parseInt(element.find('.isotopePadding').css('marginRight'));\n\t\tif (isNaN(m2)) m2 = 0;\n\t\tvar lastWidth = cont.width() + (changeHeight ? 0 : m1+m2);\n\t\tcont.data('last-width', lastWidth);\n\t\tvar elementWidth = parseFloat(cont.data('element-width'));\n\t\tvar elementWidthNew = Math.floor(lastWidth / columns);\n\t\tvar dir = elementWidthNew > elementWidth ? 1 : -1;\n\t\twhile (dir*(elementWidthNew-elementWidth)/elementWidth > THEMEREX_isotope_resize_delta) {\n\t\t\tcolumns += dir;\n\t\t\tif (columns == 0) break;\n\t\t\t//jQuery(this).data('columns', columns);\n\t\t\telementWidthNew = Math.floor(lastWidth / columns);\n\t\t}\n\t\telement.css({\n\t\t\twidth: elementWidthNew\n\t\t});\n\t\tif (changeHeight) {\n\t\t\tvar elementHeight = parseFloat(cont.data('element-height'));\n\t\t\tvar elementHeightNew = Math.floor(elementWidthNew/elementWidth*elementHeight);\n\t\t\telement.css({\n\t\t\t\theight: elementHeightNew\n\t\t\t});\n\t\t}\n\t\tjQuery(this).isotope({\n\t\t\tmasonry: {\n\t\t\t\tcolumnWidth: elementWidthNew\t//Math.floor(jQuery('.isotope,.isotopeNOanim').width() / columns)\n\t\t\t}\n\t\t});\n\t\tcont.find('.sc_slider_flex,.sc_slider_chop,.sc_slider_swiper').each(function () {\n\t\t\tcalcSliderDimensions(jQuery(this));\n\t\t});\n\t});\n}", "defineBEMBlocks() {\n return {\n container: (this.props.mod || 'cr-search-summary')\n }\n }", "function searchIsotope() {\r\n var qsRegex;\r\n //Isotope init function\r\n var $grid = $('.individuals-grid').isotope({\r\n itemSelector: '.individual-cell',\r\n layoutMode: 'fitRows'\r\n });\r\n $('.individuals-grid').css('top', '0px');\r\n//Check screen width - Only Desktop must show scroll, NOT Mobile\r\n if (document.documentElement.clientWidth > 480) {\r\n //Check for every occurrence of individuals-grid\r\n $('.individuals-grid').each(function (i) {\r\n //Check if height of grid>400 - indicates that there are more than 14 people as part of the list\r\n if ($('.individuals-grid')[i].style.height.replace('px', '') > 400) {\r\n //Check width of grid\r\n if ($('.individuals-grid')[i].style.width === '' || $('.individuals-grid')[i].style.width === 'auto' || $('.individuals-grid')[i].style.width.replace('px', '') > 290) {\r\n //Attach Slimscroll\r\n $(this).slimScroll({\r\n height: '400px',\r\n color: '#388E3C',\r\n railVisible: true,\r\n railColor: '#D7D7D7',\r\n alwaysVisible: true,\r\n touchScrollStep: 50\r\n }).one('mousemove', function () {\r\n //Check EXACTLY once if the mouse moves on the individuals-grid div visible on screen, and accordingly reset the scrollbar to 0px\r\n $(this).next('.slimScrollBar').css('top', '0');\r\n });\r\n } else {\r\n $(this).slimScroll({\r\n destroy: true\r\n });\r\n }\r\n } else {\r\n $(this).slimScroll({\r\n destroy: true\r\n });\r\n }\r\n });\r\n //Destroy slimscroll if the device is a mobile\r\n } else {\r\n $('.individuals-grid').slimScroll({\r\n destroy: true\r\n });\r\n }\r\n}", "function filtersInit() {\n var $Filter = $('.isotope-filters');\n var FilterTimeOut;\n $Filter.find('li:first').addClass('active');\n $Filter.find('li:not(.active)').hide();\n $Filter.hover(function(){\n clearTimeout(FilterTimeOut);\n if( $(window).width() < 959 )\n {\n return;\n }\n FilterTimeOut=setTimeout(function(){ $Filter.find('li:not(.active)').stop(true, true).animate({width: 'show' }, 250, 'swing'); }, 100);\n },function(){\n if( $(window).width() < 959 )\n {\n return;\n }\n clearTimeout(FilterTimeOut);\n FilterTimeOut=setTimeout(function(){ $Filter.find('li:not(.active)').stop(true, true).animate({width: 'hide' }, 250, 'swing'); }, 100);\n });\n $(window).resize(function() {\n if( $(window).width() < 959 )\n {\n $Filter.find('li:not(.active)').show();\n }\n else\n {\n $Filter.find('li:not(.active)').hide();\n }\n });\n $(window).resize();\n $Filter.find('a').click(function(){\n $Filter.find('li').not($(this)).removeClass('active');\n $(this).parent('li').addClass('active');\n });\n}", "function enableMasonry() {\r\n if ($('.sortable-masonry').length) {\r\n\r\n var winDow = $(window);\r\n // Needed variables\r\n var $container = $('.sortable-masonry .items-container');\r\n var $filter = $('.filter-btns');\r\n\r\n $container.isotope({\r\n filter: '*',\r\n masonry: {\r\n columnWidth: 0\r\n },\r\n animationOptions: {\r\n duration: 500,\r\n easing: 'linear'\r\n }\r\n });\r\n\r\n\r\n // Isotope Filter \r\n $filter.find('li').click(function () {\r\n var selector = $(this).attr('data-filter');\r\n\r\n try {\r\n $container.isotope({\r\n filter: selector,\r\n animationOptions: {\r\n duration: 500,\r\n easing: 'linear',\r\n queue: false\r\n }\r\n });\r\n } catch (err) {\r\n\r\n }\r\n return false;\r\n });\r\n\r\n\r\n winDow.bind('resize', function () {\r\n var selector = $filter.find('li.active').attr('data-filter');\r\n\r\n $container.isotope({\r\n filter: selector,\r\n animationOptions: {\r\n duration: 500,\r\n easing: 'linear',\r\n queue: false\r\n }\r\n });\r\n });\r\n\r\n\r\n var filterItemA = $('.filter-btns li');\r\n\r\n filterItemA.on('click', function () {\r\n var $this = $(this);\r\n if (!$this.hasClass('active')) {\r\n filterItemA.removeClass('active');\r\n $this.addClass('active');\r\n }\r\n });\r\n }\r\n }", "function ImagesgridFilter(){\n if( $('.about_right_ms, .our_gallery_ms_inner').length ){\n $('.about_right_ms, .our_gallery_ms_inner').imagesLoaded(function(){\n $('.about_right_ms, .our_gallery_ms_inner').isotope({\n itemSelector: '.about_ms_item, .col-md-4, .col-sm-4',\n layoutMode: 'masonry',\n masonry: {\n columnWidth: 1,\n }\n })\n });\n }\n }", "function containedHawkSearchInitializer($) {\n\n // BEGIN Namespaced HawkSearch block.\n\n (function (HawkSearch, $) {\n\n HawkSearch.loadingtpl = '<img src=\"//manage.hawksearch.com/sites/shared/images/global/load.gif\" style=\"margin:0 5px;vertical-align:middle;\" />';\n\n HawkSearch.loadtimer = null;\n\n HawkSearch.scroll = false;\n\n HawkSearch.processing = false;\n\n \n\n HawkSearch.disableAjax = function () {\n\n return false;\n\n };\n\n \n\n HawkSearch.getHash = function () {\n\n var hashSplit = window.location.toString().split(\"#\");\n\n if (hashSplit.length > 1) return hashSplit[1];\n\n return window.location.search.substring(1);\n\n };\n\n \n\n HawkSearch.lilBro = new HawkSearch.LilBro({\n\n server: HawkSearch.getHawkUrl(),\n\n server_ssl: HawkSearch.getHawkUrl() + ':443',\n\n watch_focus: false,\n\n watch_click: false,\n\n event_base: HawkSearch.EventBase,\n\n qs: encodeURIComponent(HawkSearch.getHash()),\n\n jQuery: $\n\n });\n\n \n\n HawkSearch.jQuery = $;\n\n \n\n HawkSearch.normalizeHeights = function () {\n\n var container = $(\"#hawkitemlist\");\n\n var topcontainer = $(\"#hawkbannertop\");\n\n var targetElement = container.find(\".itemWrapper\");\n\n \n\n // use imagesLoaded() plugin to detect if images are fully loaded\n\n // http://imagesloaded.desandro.com/\n\n var imgLoad = imagesLoaded(container);\n\n \n\n // Triggered after all images have been either loaded or confirmed broken.\n\n imgLoad.on(\"always\", function (instance) {\n\n log(\"Heights Normalize; No broken images\");\n\n // match heights of specified elements\n\n container.find(\".itemWrapper .itemImage\").matchHeights();\n\n container.find(\".itemWrapper .itemTitle\").matchHeights();\n\n topcontainer.find(\".itemWrapper .itemImage\").matchHeights();\n\n topcontainer.find(\".itemWrapper .itemTitle\").matchHeights();\n\n targetElement.matchHeights({\n\n extension: 3\n\n });\n\n });\n\n \n\n // Triggered after all images have been loaded with at least one broken image.\n\n imgLoad.on('fail', function (instance) {\n\n log(\"Heights Normalize; Broken image(s)\");\n\n });\n\n \n\n // Triggered after each image has been loaded.\n\n imgLoad.on(\"progress\", function (instance, image) {\n\n var result = image.isLoaded ? 'loaded' : 'broken';\n\n // check if image is broken\n\n if (result === \"broken\") {\n\n // in debug mode log broken image src\n\n log('Image Broken: ' + image.img.src);\n\n // change broken image src with spacer.gif and apply broken image class\n\n image.img.src = \"/sites/shared/images/spacer.gif\";\n\n image.img.className = \"itemImage hawk-brokenImage\";\n\n };\n\n });\n\n };\n\n \n\n HawkSearch.regTracking = function () {\n\n log(\"Register Tracking\");\n\n \n\n $(\".hawk-bannerLink,.hawk-banner\").each(function () {\n\n var bannerId = $(this).data(\"bannerid\");\n\n HawkSearch.Tracking.writeBannerImpression(bannerId);\n\n });\n\n };\n\n \n\n HawkSearch.regSmartBug = function () {\n\n $('#aBug').click(function () {\n\n if ($('#divSmartBug > ul').children().length > 0) {\n\n $('#divSmartBugEye').hide();\n\n $('#divSmartBugPinning').hide();\n\n $('#divSmartBug').toggle('fast');\n\n return false;\n\n }\n\n return true;\n\n });\n\n \n\n $('#spanSmartBug').click(function () {\n\n $('#divSmartBug').hide();\n\n $('#divSmartBugEye').hide();\n\n $('#divSmartBugPinning').hide();\n\n var data = $('#hawkHdnUserProfileJson').val();\n\n var jsonPretty = JSON.stringify(JSON.parse(data), null, 2);\n\n $('#userProfileJson').text(jsonPretty);\n\n $(\"#divSmartBugUserProfile\").toggle('fast');\n\n });\n\n \n\n $(\"#divSmartBugUserProfile\").click(function () {\n\n $(this).toggle('fast');\n\n });\n\n \n\n $('#aEye').click(function () {\n\n if ($('#divSmartBugEye > ul').children().length > 0) {\n\n $('#divSmartBug').hide();\n\n $('#divSmartBugPinning').hide();\n\n $('#divSmartBugEye').toggle('fast');\n\n return false;\n\n }\n\n return true;\n\n });\n\n \n\n $('#aRefresh').off(\"click\");\n\n $('#aRefresh').click(function () {\n\n HawkSearch.resetSearch();\n\n });\n\n \n\n $(\"#divSmartBugEye .hawk-mutilbucket input[type=checkbox]\").click(function (e) {\n\n e.stopPropagation();\n\n });\n\n \n\n $(\"#divSmartBugEye a.hawk-mutilbucket\").click(function (e) {\n\n e.preventDefault();\n\n var checkBox = $(this).find(\"input[type=checkbox]\");\n\n checkBox.prop(\"checked\", !checkBox.prop(\"checked\"));\n\n });\n\n \n\n \n\n $(\"#hawkBtnApplayVisitorTarget\").click(function () {\n\n var url = $(\"#hawkHdnBucketUrl\").val();\n\n var selectedBuckets = [];\n\n \n\n $(\"#divSmartBugEye .hawk-mutilbucket input[type=checkbox]:checked\").each(function () {\n\n selectedBuckets.push($(this).data(\"hawkbucketid\"));\n\n });\n\n \n\n if ($(\"#divSmartBugEye .hawk-mutilbucket input[type=checkbox]:checked\").length === 0) {\n\n selectedBuckets.push(0);\n\n }\n\n \n\n url = url.replace(/__bucket_ids__/i, selectedBuckets.join());\n\n window.location.href = url;\n\n });\n\n \n\n if (typeof HawkPreviewDateTime !== 'undefined') {\n\n HawkPreviewDateTime.registerPreviewDatetime();\n\n }\n\n }\n\n \n\n HawkSearch.regFacets = function () {\n\n log(\"Register Facets\");\n\n \n\n // normalize heights across items in results list\n\n HawkSearch.normalizeHeights();\n\n \n\n // initializes slider configuration for use with price range\n\n $(\"div.hawk-slideRange\").each(function () {\n\n var container = $(this),\n\n options = container.data(),\n\n minRange = options.minRange,\n\n maxRange = options.maxRange,\n\n stepSlide = options.stepRange,\n\n minValueDisplay = container.siblings(\".slider-min-value\"),\n\n maxValueDisplay = container.siblings(\".slider-max-value\");\n\n \n\n var values = $(this).parent().find(\"input.hawk-sliderRangeInput\").val().split(','),\n\n minValue = parseInt(values[0]),\n\n maxValue = parseInt(values[1]);\n\n \n\n var numericFrom = $($(this).parent().find(\".numeric-from\"));\n\n var numericTo = $($(this).parent().find(\".numeric-to\"));\n\n \n\n // set up slider range functionality\n\n container.slider({\n\n range: true,\n\n min: minRange,\n\n max: maxRange,\n\n step: stepSlide,\n\n values: [minValue, maxValue],\n\n slide: function (event, ui) {\n\n var start = ui.values[0];\n\n var end = ui.values[1];\n\n var type = $(this).parent().find(\"input:last\").val().toLowerCase();\n\n if (type == 'currency') {\n\n start = HawkSearch.formatCurrency(start);\n\n end = HawkSearch.formatCurrency(end);\n\n }\n\n \n\n if (numericTo.size() > 0) {\n\n numericFrom.val(start);\n\n numericTo.val(end);\n\n }\n\n \n\n minValueDisplay.text(start);\n\n maxValueDisplay.text(end);\n\n \n\n $(this).parent().find(\"input.hawk-sliderRangeInput\").val(ui.values[0] + ',' + ui.values[1]);\n\n },\n\n stop: function (event, ui) {\n\n // clear the current page\n\n $(\"#hdnhawkpg\").val(\"\");\n\n \n\n HawkSearch.refreshUrl();\n\n }\n\n });\n\n \n\n var hawkSlideHandles = container.children().filter(\"a\");\n\n hawkSlideHandles.eq(0).addClass(\"first-handle\");\n\n hawkSlideHandles.eq(1).addClass(\"second-handle\");\n\n });\n\n \n\n $(\"div.hawk-sliderNumeric\").each(function () {\n\n $(this).find(\".hawk-numericInput\").each(function (e) {\n\n $(this).numeric();\n\n $(this).blur(function () {\n\n var val = parseFloat($(this).val().replace(/[^0-9\\.]+/g, \"\"));\n\n var type = $(this).data(\"type\");\n\n if (type == 'currency') {\n\n $(this).val(HawkSearch.formatCurrency(val));\n\n }\n\n });\n\n \n\n $(this).on(\"focus\", function () {\n\n $(this).attr(\"data-orgval\", $(this).val().replace(/[^0-9\\.]+/g, \"\"));\n\n });\n\n \n\n $(this).on(\"change\", function () {\n\n var val = parseFloat($(this).val().replace(/[^0-9\\.]+/g, \"\"));\n\n var minValue = parseFloat($(this).data(\"min\"));\n\n var maxValue = parseFloat($(this).data(\"max\"));\n\n var isInvalid = false;\n\n \n\n var numericFrom = $($(this).parent().find(\".numeric-from\"));\n\n var numericTo = $($(this).parent().find(\".numeric-to\"));\n\n \n\n var fromVal = parseFloat(numericFrom.val().replace(/[^0-9\\.]+/g, \"\"));\n\n var toVal = parseFloat(numericTo.val().replace(/[^0-9\\.]+/g, \"\"));\n\n \n\n var orgval = parseFloat($(this).data(\"orgval\"));\n\n val = val || orgval;\n\n \n\n if (isNaN(fromVal) || isNaN(toVal)) {\n\n isInvalid = true;\n\n }\n\n \n\n if (val < minValue || val > maxValue || fromVal > toVal) {\n\n val = orgval;\n\n isInvalid = true;\n\n }\n\n \n\n var type = $(this).data(\"type\");\n\n if (type == 'currency') {\n\n $(this).val(HawkSearch.formatCurrency(val));\n\n } else {\n\n $(this).val(val);\n\n }\n\n if (isInvalid) {\n\n return;\n\n }\n\n \n\n $(this).parents(\".hawk-slideFacet\").find(\"div.hawk-slideRange\").slider('values', 0, parseFloat(fromVal));\n\n $(this).parents(\".hawk-slideFacet\").find(\"div.hawk-slideRange\").slider('values', 1, parseFloat(toVal));\n\n $(this).parents(\".hawk-slideFacet\").find(\"input.hawk-sliderRangeInput\").val(fromVal + ',' + toVal);\n\n \n\n HawkSearch.refreshUrl();\n\n });\n\n })\n\n \n\n \n\n })\n\n \n\n // configures truncated list functionality\n\n $(\".hawk-navTruncateList\").each(function () {\n\n var cont = $(this);\n\n var listItems = cont.children(\"li\");\n\n var options = cont.data().options;\n\n \n\n var moreItems = listItems.filter(function (index) {\n\n return index >= options.cutoff;\n\n });\n\n \n\n if (moreItems.size() == 0) {\n\n return;\n\n }\n\n // only hide if not already expanded\n\n if (!window[\"hawkexpfacet_\" + cont.attr(\"id\")])\n\n moreItems.hide();\n\n \n\n var moreLess = $(\"<li class='hawk-navMore'><span>\" + options.moreText + \"</span></li>\");\n\n cont.append(moreLess);\n\n moreLess.children(\"span\").click(function (event) {\n\n var moreTrigger = $(this);\n\n if ($(this).hasClass(\"hawk-navMoreActive\")) {\n\n moreItems.hide();\n\n moreTrigger.removeClass(\"hawk-navMoreActive\").closest(\"span\").text(options.moreText);\n\n window[\"hawkexpfacet_\" + cont.attr(\"id\")] = null;\n\n } else {\n\n moreItems.show();\n\n moreTrigger.addClass(\"hawk-navMoreActive\").closest(\"span\").text(options.lessText);\n\n window[\"hawkexpfacet_\" + cont.attr(\"id\")] = true;\n\n };\n\n });\n\n \n\n if (window[\"hawkexpfacet_\" + cont.attr(\"id\")]) cont.find(\".hawk-navMore span\").click();\n\n \n\n });\n\n \n\n \n\n $(\".hawkRailNav\").delegate(\".hawk-navGroup li > a > span.hawk-negativeIcon\", \"click\", function (event) {\n\n event.preventDefault();\n\n event._hawkSettingNegative = true;\n\n \n\n var facetCont = $(this).closest(\"li\");\n\n \n\n facetCont.removeClass(\"hawkFacet-active\");\n\n \n\n if (facetCont.hasClass(\"hawkFacet-negative\")) {\n\n facetCont.removeClass(\"hawkFacet-negative\");\n\n } else {\n\n facetCont.addClass(\"hawkFacet-negative\");\n\n }\n\n });\n\n \n\n \n\n // this handles the mouse hovers and click states for the hawk nav\n\n $(\".hawkRailNav\").delegate(\".hawk-navGroup li > a\", \"mouseover mouseout click\", function (event) {\n\n \n\n var facetCont = $(this).parent();\n\n \n\n if (event.type == \"mouseover\") {\n\n facetCont.addClass(\"hawkFacet-hover\");\n\n } else if (event.type == \"mouseout\") {\n\n facetCont.removeClass(\"hawkFacet-hover\");\n\n } else if (event.type == \"click\") {\n\n event.preventDefault();\n\n //if (facetCont.hasClass(\"hawkFacet-indetermined\")) {\n\n // facetCont.removeClass(\"hawkFacet-indetermined\")\n\n // facetCont.addClass(\"hawkFacet-active\");\n\n // facetCont.find(\"> ul > li \").removeClass(\"hawkFacet-active\");\n\n //} else {\n\n // facetCont.toggleClass(\"hawkFacet-active\");\n\n //}\n\n \n\n $(facetCont).find(\".hawkFacet-active\").removeClass(\"hawkFacet-active\");\n\n $(facetCont).parentsUntil(\".hawk-navGroupContent\", \"ul\").each(function () {\n\n var parentUl = $(this);\n\n var activeCount = parentUl.find(\"li.hawkFacet-active\").size();\n\n var allCount = parentUl.find(\"li\").size();\n\n if (allCount > 0) {\n\n var closestLi = $(this).closest(\"li\");\n\n closestLi.removeClass(\"hawkFacet-active\");\n\n closestLi.addClass(\"hawkFacet-indetermined\");\n\n }\n\n });\n\n \n\n if (event._hawkSettingNegative) {\n\n facetCont.removeClass(\"hawkFacet-indetermined\")\n\n return;\n\n } else {\n\n facetCont.removeClass(\"hawkFacet-negative\");\n\n }\n\n \n\n if (facetCont.hasClass(\"hawkFacet-indetermined\")) {\n\n facetCont.removeClass(\"hawkFacet-indetermined\")\n\n facetCont.addClass(\"hawkFacet-active\");\n\n facetCont.find(\"> ul > li \").removeClass(\"hawkFacet-active\");\n\n } else {\n\n facetCont.toggleClass(\"hawkFacet-active\");\n\n }\n\n }\n\n });\n\n \n\n // initializes filter quicksearch\n\n $('.hawk-quickSearch input').each(function () {\n\n var searchInput = $(this);\n\n searchInput.filterThatList({\n\n list: searchInput.parent().next()\n\n });\n\n });\n\n \n\n // handles collapsible display on larger screens\n\n $(\".hawk-guidedNavWrapper .hawk-collapsible .hawk-groupHeading\").on(\"click\", function () {\n\n var facetGroup = $(this).closest(\".hawk-navGroup\");\n\n var fgHeightBefore = facetGroup.outerHeight();\n\n facetGroup.toggleClass(\"hawk-collapsed\");\n\n var fgHeightAfter = facetGroup.outerHeight();\n\n if ($(\".hawk-facetScollingContainer\").length && $(\".hawk-facetScollingContainer\").position().top > 0) {\n\n var menuHeight = $(\".hawk-facetScollingContainer\").outerHeight();\n\n var maxOffset = $(\".footer\").offset().top;\n\n var menuOffset = $(\".hawk-facetScollingContainer\").offset().top;\n\n if (menuHeight + menuOffset > maxOffset) {\n\n var offset = $(\".hawk-facetScollingContainer\").position().top;\n\n offset = offset - (menuHeight + menuOffset - maxOffset) - 10;\n\n $(\".hawk-facetScollingContainer\").css(\"top\", offset + \"px\");\n\n }\n\n \n\n HawkSearch.SetFacetScrollPosition();\n\n }\n\n \n\n var fieldName = facetGroup.attr(\"data-field\");\n\n var collapsed = false;\n\n if (facetGroup.hasClass(\"hawk-collapsed\")) {\n\n collapsed = true;\n\n }\n\n $.cookie(fieldName, collapsed, { expires: 365 });\n\n });\n\n \n\n $(\".hawk-guidedNavWrapper .hawk-collapsible\").each(function () {\n\n var fieldName = $(this).attr(\"data-field\");\n\n var visible = $.cookie(fieldName);\n\n if (visible == 'true') {\n\n $(this).addClass(\"hawk-collapsed\");\n\n } else if (visible == 'false') {\n\n $(this).removeClass(\"hawk-collapsed\");\n\n }\n\n });\n\n \n\n // bind click event to filter heading to hide/show for small devices\n\n $(\".hawk-railNavHeading\").on(\"click\", function () {\n\n var railNavHeading = $(this);\n\n var hawkNavFilters = railNavHeading.next(\".hawkRailNav\");\n\n railNavHeading.toggleClass(\"hawk-railNavHeadingActive\");\n\n hawkNavFilters.toggleClass(\"hawk-notCollapsed\");\n\n });\n\n \n\n // bind click event to filter group heading to hide/show for small devices\n\n $(\".hawk-guidedNavWrapper .hawk-navGroup .hawk-groupHeading\").on(\"click\", function () {\n\n var facetGroup = $(this).closest(\".hawk-navGroup\");\n\n facetGroup.toggleClass(\"hawk-notCollapsed\");\n\n });\n\n \n\n HawkSearch.regSmartBug();\n\n \n\n $(\"table.compTbl div.itemWrapper .itemPrice\").matchHeights();\n\n \n\n $(\".hawk-nestedfacet .hawkFacet-active\").each(function () {\n\n $(this).children(\"ul\").removeClass(\"collapse\").addClass(\"in\");\n\n $(this).children(\".hawk-collapseState\").removeClass(\"collapsed\");\n\n \n\n $(this).parentsUntil(\".hawk-navGroup\", \".hawk-facetgroup\").addClass(\"in\");\n\n $(this).parentsUntil(\".hawk-navGroup\", \"li\").each(function () {\n\n $(this).children(\".hawk-collapseState\").removeClass(\"collapsed\");\n\n });\n\n });\n\n \n\n $(\".hawk-nestedfacet .hawkFacet-negative\").each(function () {\n\n $(this).parentsUntil(\".hawk-navGroup\", \".hawk-facetgroup\").addClass(\"in\");\n\n $(this).parentsUntil(\".hawk-navGroup\", \"li\").each(function () {\n\n $(this).children(\".hawk-collapseState\").removeClass(\"collapsed\");\n\n });\n\n });\n\n \n\n \n\n $(\".hawk-nestedfacet ul >.hawkFacet-active, .hawk-nestedfacet ul >.hawkFacet-negative\").each(function () {\n\n var parents = $(this).parentsUntil(\".hawk-navGroupContent\", \"ul\").each(function () {\n\n var parentUl = $(this);\n\n var activeCount = parentUl.find(\"li.hawkFacet-active\").size();\n\n var allCount = parentUl.find(\"li\").size();\n\n if (allCount > 0) {\n\n var closestLi = $(this).closest(\"li\");\n\n closestLi.removeClass(\"hawkFacet-active\");\n\n closestLi.addClass(\"hawkFacet-indetermined\");\n\n }\n\n });\n\n \n\n });\n\n };\n\n \n\n HawkSearch.refreshUrl = function (event, forceReload) {\n\n $(\"#hdnhawkcompare\").val(window['hawktocompare'].join(\",\"));\n\n \n\n var qs = \"\";\n\n var prevName = \"\";\n\n var vals = \"\";\n\n var keyword = $(\"#hdnhawkkeyword\").val();\n\n var prv = $(\"#hdnhawkprv\").val();\n\n \n\n var lp = $(\"#hdnhawklp\").val();\n\n var adv = $(\"#hdnhawkadv\").val();\n\n var searchWithin = $(\"#searchWithin\").val();\n\n var pg = $(\"#hdnhawkpg\").val();\n\n var mpp = $(\"#hdnhawkmpp\").val();\n\n var sort = $(\"#hdnhawksortby\").val();\n\n var it = $(\"#hdnhawkit\").val();\n\n var items = $(\"#hdnhawkcompare\").val();\n\n var operator = $(\"#hdnhawkoperator\").val();\n\n var expand = $(\"#hdnhawkexpand\").val();\n\n var hawkb = $(\"#hdnhawkb\").val();\n\n var defaultmpp = $(\"#hdnhawkdefaultmpp\").val();\n\n var keywordfield = $(\"#hdnhawkkeywordfield\").val();\n\n var previewDate = typeof smartbugDatetimepicker != 'undefined' ? smartbugDatetimepicker.hawkDate : null;\n\n var hawkflags = $('#hdnhawkflags').val();\n\n var aid = $(\"#hdnhawkaid\").val();\n\n var hawkp = $(\"#hdnhawkp\").val();\n\n \n\n if (keyword && keyword !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + keywordfield + \"=\" + encodeURIComponent(keyword);\n\n if (prv && prv !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"prv=\" + encodeURIComponent(prv);\n\n if (lp && lp !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"lp=\" + encodeURIComponent(lp);\n\n if (adv && adv !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"adv=\" + encodeURIComponent(adv);\n\n if (searchWithin && searchWithin !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"searchWithin=\" + encodeURIComponent(searchWithin);\n\n if (sort && sort !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"sort=\" + encodeURIComponent(sort);\n\n if (it && it !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"it=\" + encodeURIComponent(it);\n\n if (items && items !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"items=\" + encodeURIComponent(items);\n\n if (operator && operator !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"operator=\" + encodeURIComponent(operator);\n\n if (expand && expand !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"expand=\" + encodeURIComponent(expand);\n\n if (hawkb && hawkb !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"hawkb=\" + encodeURIComponent(hawkb);\n\n if (previewDate) qs += (qs === \"\" ? \"\" : \"&\") + \"HawkDate=\" + previewDate;\n\n if (hawkflags && hawkflags !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"hawkflags=\" + encodeURIComponent(hawkflags);\n\n if (aid && aid !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"hawkaid=\" + encodeURIComponent(aid);\n\n if (hawkp && hawkp !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"hawkp=\" + encodeURIComponent(hawkp);\n\n \n\n var selectedFacetList = new HawkSearch.Dictionary();\n\n \n\n $(\".hawk-facetFilters li.hawkFacet-active > a\").each(function () {\n\n var options = $(this).data().options;\n\n if (!selectedFacetList[options.name]) {\n\n selectedFacetList.add(options.name, []);\n\n }\n\n var valueArr = selectedFacetList[options.name];\n\n \n\n var urlValue = options.value.replace(/,/g, \"%c%\");\n\n valueArr.push(urlValue);\n\n \n\n prevName = options.name;\n\n });\n\n \n\n //sort facet dictionary in order that were selected\n\n var facetOrder = [];\n\n for (var i = 0; i < selectedFacetList.keys().length; i++) {\n\n var facetKey = selectedFacetList.keys()[i]\n\n facetOrder.push({ \"key\": facetKey, \"order\": HawkSearch.getHashOrQueryVariableOrder(facetKey) });\n\n }\n\n \n\n facetOrder.sort(function (a, b) {\n\n if (a.order > b.order) {\n\n return 1;\n\n } else if (a.order < b.order) {\n\n return -1;\n\n } else {\n\n return 0;\n\n }\n\n });\n\n \n\n //sorts values of each facet in order that are selected\n\n for (var i = 0; i < facetOrder.length; i++) {\n\n var facetKey = facetOrder[i].key;\n\n var currentFacetSelection = selectedFacetList[facetKey];\n\n var currentValues = (HawkSearch.getHashOrQueryVariable(facetKey) + \"\").split(\",\");\n\n \n\n var sortedArray = [];\n\n for (var j = currentFacetSelection.length - 1; j >= 0; j--) {\n\n var currentFacetValue = currentFacetSelection[j]\n\n currentFacetValue = encodeURIComponent(currentFacetValue.replace(/,/g, \"%c%\"))\n\n if (currentValues.indexOf(currentFacetValue) < 0) {\n\n //if new value adding at end of list\n\n sortedArray.push(currentFacetValue);\n\n } else {\n\n //new value adding at front of list\n\n sortedArray.unshift(currentFacetValue);\n\n }\n\n }\n\n \n\n qs += (qs === \"\" ? \"\" : \"&\") + encodeURIComponent(facetKey) + \"=\" + sortedArray.join();\n\n }\n\n \n\n $(\".hawk-facetFilters li.hawkFacet-negative > a\").each(function () {\n\n var options = $(this).data().options;\n\n if (options.name !== prevName) {\n\n if (vals !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + encodeURIComponent(prevName) + '=' + vals;\n\n vals = \"\";\n\n }\n\n vals += (vals === \"\" ? \"\" : \",\") + encodeURIComponent(\"-\" + options.value.replace(/,/g, \"%c%\"));\n\n prevName = options.name;\n\n });\n\n \n\n if (prevName !== \"\" && vals !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + encodeURIComponent(prevName) + '=' + vals;\n\n \n\n $(\".hawk-sliderRangeInput\").each(function () {\n\n if ($(this).val() !== \"\") {\n\n var values = $(this).val().split(\",\");\n\n if (values.length === 2) {\n\n var sliderRange = $(this).parent().find(\".hawk-slideRange\");\n\n var min = sliderRange.data().minRange;\n\n var max = sliderRange.data().maxRange;\n\n \n\n if (parseFloat(values[0]) !== parseFloat(min) || parseFloat(values[1]) !== parseFloat(max)) {\n\n qs += (qs === \"\" ? \"\" : \"&\") + encodeURIComponent($(this).attr(\"name\")) + '=' + encodeURIComponent(values[0]) + ',' + encodeURIComponent(values[1]);\n\n }\n\n }\n\n }\n\n });\n\n \n\n if (mpp && mpp !== \"\" && mpp !== defaultmpp) qs += (qs === \"\" ? \"\" : \"&\") + \"mpp=\" + encodeURIComponent(mpp);\n\n if (pg && pg !== \"\" && pg !== \"1\") qs += (qs === \"\" ? \"\" : \"&\") + \"pg=\" + encodeURIComponent(pg);\n\n \n\n // cancel refresh if hash is not changed\n\n if (window.location.hash === \"#\" + qs) {\n\n return;\n\n }\n\n \n\n if (HawkSearch.disableAjax() || forceReload) {\n\n var url = window.location.toString();\n\n if (url.indexOf(\"?\") > -1) url = url.substring(0, url.indexOf(\"?\"));\n\n if (url.indexOf(\"#\") > -1) url = url.substring(0, url.indexOf(\"#\"));\n\n window.location = url + '?' + qs;\n\n } else {\n\n if (window.location.hash !== \"\" || qs !== \"\") {\n\n var scroll = $(document).scrollTop();\n\n \n\n window.history.pushState({}, {}, \"?\" + qs);\n\n HawkSearch.refreshResults();\n\n \n\n if (qs === \"\") {\n\n $(document).scrollTop(scroll);\n\n }\n\n }\n\n else if (qs === \"\") {\n\n window.history.pushState({}, {}, window.location.pathname);\n\n HawkSearch.refreshResults();\n\n }\n\n \n\n }\n\n \n\n };\n\n \n\n HawkSearch.resetSearch = function () {\n\n $(\"#hdnhawkpg\").val(1);\n\n if (window.location.hash !== \"\") {\n\n window.location.hash += \"&\";\n\n }\n\n HawkSearch.clearAllFacets();\n\n }\n\n \n\n HawkSearch.IsExplainPopupOpen = false;\n\n \n HawkSearch.viewRules = function(url, id){\n window.parent.location.href = url + \"/settings/ranking/rulesreport.aspx?id=\" + id;\n }\n\n\n HawkSearch.getPinFunctionUrl = function (f, itemId) {\n\n var keywordField = $('#hdnhawkkeywordfield').val();\n\n var keyword = HawkSearch.getHashOrQueryVariable(keywordField);\n\n var lpurl = HawkSearch.getCustomUrl();\n\n var lpId = $(\"#hdnhawklp\").val();\n\n var ssfid = $(\"#hdnhawkssfid\").val();\n \n var hawkbuckets = $(\"#hdnhawkbuckets\").val();\n\n var previewDate = typeof smartbugDatetimepicker != 'undefined' ? smartbugDatetimepicker.hawkDate : '';\n\n return HawkSearch.BaseUrl + \"/?fn=ajax&f=\" + f + \"&itemId=\" + encodeURIComponent(itemId) + \"&\" + keywordField + \"=\" + keyword + \"&lp=\" + encodeURIComponent(lpId) + \"&lpurl=\" + encodeURIComponent(lpurl) + \"&hawkb=\" + HawkSearch.getHashOrQueryVariable(\"hawkb\") + \"&hawkaid=\" + HawkSearch.getHashOrQueryVariable(\"hawkaid\") + \"&hawkp=\" + HawkSearch.getHashOrQueryVariable(\"hawkp\") + \"&HawkDate=\" + previewDate + \"&ssfid=\" + encodeURIComponent(ssfid) +\"&hawkbuckets=\" + hawkbuckets;\n\n }\n\n \n\n HawkSearch.addToTop = function (el, itemId) {\n\n \n\n var url = HawkSearch.getPinFunctionUrl(\"AddItemToTop\", itemId);\n\n var currentEl = el;\n\n $.ajax({\n\n type: \"GET\",\n\n async: true,\n\n context: el,\n\n contentType: \"application/json; charset=utf-8\",\n\n url: url,\n\n dataType: \"jsonp\",\n\n success: function () {\n\n log(\"Added item to top\");\n\n var parentContainer = $(this).parents(\".grid_3\");\n\n parentContainer.addClass(\"hawk-itemPinned\");\n\n parentContainer.find(\".preview-info\").append(\"<span class='hawkIcon-itemPinned'></span>\");\n\n $(\".itemWrapper.hawk-itemWrapper\").removeClass(\"hawk-itemPinned preview-info\");\n\n \n\n $(this).parents(\".popover\").popover('hide');\n\n },\n\n error: function (e) {\n\n log(\"ERROR: Add item to top \" + e);\n\n }\n\n });\n\n }\n\n \n\n HawkSearch.unpinItem = function (el, itemId) {\n\n var keywordField = $('#hdnhawkkeywordfield').val();\n\n var keyword = HawkSearch.getHashOrQueryVariable(keywordField);\n\n var lpurl = HawkSearch.getCustomUrl();\n\n var lpId = $(\"#hdnhawklp\").val();\n\n var url = HawkSearch.getPinFunctionUrl(\"UnpinItem\", itemId);\n\n \n\n $.ajax({\n\n type: \"GET\",\n\n async: true,\n\n contentType: \"application/json; charset=utf-8\",\n\n url: url,\n\n context: el,\n\n dataType: \"jsonp\",\n\n success: function () {\n\n log(\"Unpin item\");\n\n var parentContainer = $(this).parents(\".grid_3\");\n\n parentContainer.removeClass(\"hawk-itemPinned\");\n\n parentContainer.find(\".hawkIcon-itemPinned\").remove();\n\n $(this).parents(\".popover\").popover('hide');\n\n },\n\n error: function (e) {\n\n log(\"ERROR: Unpin item \" + e);\n\n }\n\n });\n\n };\n\n \n\n HawkSearch.updatePinOrder = function (itemOrder) {\n\n var url = HawkSearch.getPinFunctionUrl(\"UpdateItemPinOrder\", 0);\n\n url += \"&itemList=\" + encodeURIComponent(itemOrder);\n\n \n\n $.ajax({\n\n type: \"GET\",\n\n async: true,\n\n contentType: \"application/json; charset=utf-8\",\n\n url: url,\n\n dataType: \"jsonp\",\n\n success: function () {\n\n log(\"UpdateItemPinOrder\");\n\n },\n\n error: function (e) {\n\n log(\"ERROR: UpdateItemPinOrder \" + e);\n\n }\n\n });\n\n }\n\n \n\n HawkSearch.explain = function (docid) {\n\n if (HawkSearch.IsExplainPopupOpen) {\n\n return;\n\n }\n\n \n\n HawkSearch.IsExplainPopupOpen = true;\n\n \n\n var keyword = $(\"#hdnhawkkeyword\").val();\n\n var keywordField = $(\"#hdnhawkkeywordfield\").val();\n\n var keywordfromQuery = HawkSearch.getHashOrQueryVariable(keywordField);\n\n var hash = window.location.search.substring(1);\n\n if (keyword.toLowerCase() != decodeURIComponent(keywordfromQuery.toLowerCase().replace(/\\+/g, \" \"))) {\n\n hash = hash.replace(keywordField + '=' + keywordfromQuery, keywordField + '=' + encodeURIComponent(keyword));\n\n }\n\n if (hash === \"\" || (window.location.search.substring(1) !== \"\" && window.location.href.indexOf(\"#\") > -1)) hash = HawkSearch.getHash();\n\n \n\n var lpurl = HawkSearch.getCustomUrl();\n\n var hawkcustom = $(\"#hdnhawkcustom\").val();\n\n var full = HawkSearch.BaseUrl + \"/?\" + hash + \"&ajax=1&json=1&docid=\" + encodeURIComponent(docid) + (lpurl != '' ? \"&lpurl=\" + encodeURIComponent(lpurl) : \"\") + (hawkcustom != '' ? \"&hawkcustom=\" + encodeURIComponent(hawkcustom) : \"\");\n\n full += \"&hawkvisitorid=\" + HawkSearch.lilBro.event.getVisitorId()\n\n \n\n $.ajax({ \"type\": \"GET\", \"data\": \"\", \"async\": \"false\", \"contentType\": \"application/json; charset=utf-8\", \"url\": full, \"dataType\": \"jsonp\", \"success\": HawkSearch.showAjaxPopup });\n\n };\n\n \n\n HawkSearch.loadMoreLikeThis = function (event, arg) {\n\n var argsArr = arg.split('|');\n\n var pk = argsArr[0];\n\n var trackingId = HawkSearch.lilBro.getTrackingId();\n\n if (argsArr.length >= 3) {\n\n trackingId = argsArr[2];\n\n }\n\n HawkSearch.Tracking.writeClick(event, 0, true, pk, trackingId);\n\n \n\n var url = HawkSearch.BaseUrl + \"/default.aspx?fn=ajax&f=MoreLikeThis&args=\" + arg;\n\n \n\n $.ajax({\n\n \"type\": \"GET\",\n\n \"data\": \"\",\n\n \"async\": \"false\",\n\n \"contentType\": \"application/json; charset=utf-8\",\n\n \"url\": url,\n\n \"dataType\": \"jsonp\",\n\n \"success\": function (data) {\n\n HawkSearch.bootbox.dialog({\n\n title: \"More Like This\",\n\n message: data.Html,\n\n buttons: {\n\n main: {\n\n label: \"Close\"\n\n }\n\n }\n\n });\n\n }\n\n });\n\n };\n\n \n\n HawkSearch.HawkSubmit = (function (e) {\n\n var field = $(e).find('input[name=' + $('#hdnhawkkeywordfield').val() + ']');\n\n var keywords = $(field).val();\n\n var id = $(field).attr('id');\n\n var suggester = HawkSearch.SuggesterGlobal.getSuggester('#' + id);\n\n if (!(field.length == 0 && $('#hdnhawkkeyword').length == 0)) {\n\n if ((keywords == suggester.settings.defaultKeyword[id]) || (keywords == $('#hdnhawkkeyword').val())) {\n\n return false;\n\n }\n\n }\n\n return true;\n\n });\n\n \n\n HawkSearch.showAjaxPopup = function (json) {\n\n var html = json.html;\n\n var objs = $(html);\n\n \n\n var obj = objs.find(\"#hawkexplain\");\n\n if (obj != null && obj.length > 0) $(\"#divAjaxPopupContent\").html(obj.html());\n\n HawkSearch.bootbox.dialog({\n\n title: \"Item Information\",\n\n message: obj.html(),\n\n className: \"wideModal\",\n\n buttons: {\n\n main: {\n\n label: \"Close\"\n\n }\n\n }\n\n });\n\n \n\n HawkSearch.IsExplainPopupOpen = false;\n\n };\n\n \n\n HawkSearch.hideBlockUI = function () {\n\n if (HawkSearch.processing || HawkSearch.scroll) {\n\n return;\n\n }\n\n $.unblockUI({ \"fadeOut\": 0 });\n\n };\n\n \n\n HawkSearch.showBlockUI = function () {\n\n $.blockUI({ \"message\": HawkSearch.loadingtpl, \"fadeIn\": 0, overlayCSS: { backgroundColor: '#fff', opacity: 0.5, cursor: 'wait' }, \"css\": { \"borderWidth\": \"0px\", top: ($(window).height() - 100) / 2 + 'px', left: ($(window).width()) / 2 + 'px', width: '0px' } });\n\n };\n\n \n\n HawkSearch.showRecsBlockUI = function () {\n\n $(\".hawk-recommendation\").css(\"height\", \"100px\");\n\n $(\".hawk-recommendation\").block({ \"message\": HawkSearch.loadingtpl, \"fadeIn\": 0, overlayCSS: { backgroundColor: '#fff', opacity: 0.5, cursor: 'wait' }, \"css\": { \"borderWidth\": \"0px\", top: ($(window).height() - 100) / 2 + 'px', left: ($(window).width()) / 2 + 'px', width: '0px' } });\n\n };\n\n \n\n \n\n HawkSearch.hideRecsBlockUI = function () {\n\n $(\".hawk-recommendation\").css(\"height\", \"auto\");\n\n $(\".hawk-recommendation\").unblock({ \"fadeOut\": 0 });\n\n };\n\n \n\n \n\n HawkSearch.refreshResults = function (backbutton) {\n\n \n\n log('RefreshResults');\n\n \n\n if ($(\"#hawkitemlist\").length > 0) {\n\n \n\n var lpurl = HawkSearch.getCustomUrl();\n\n var hash = HawkSearch.getHash();\n\n var hawkcustom = $(\"#hdnhawkcustom\").val();\n\n var queryGuid = $(\"#hdnhawkquery\").val();\n\n var full = HawkSearch.BaseUrl + \"/?\" + (hash != '' ? hash + '&' : '') + \"ajax=1&json=1\" + (lpurl != '' ? \"&lpurl=\" + encodeURIComponent(lpurl) : \"\") + (hawkcustom != '' ? \"&hawkcustom=\" + encodeURIComponent(hawkcustom) : \"\");\n\n full += '&hawkvisitorid=' + HawkSearch.lilBro.event.getVisitorId();\n\n \n\n \n\n // notice we use global jQuery to be able to track global events for ajax calls\n\n // used by miniprofiler and possibly other libraries\n\n window.jQuery.ajax({\n\n type: \"GET\",\n\n data: \"\",\n\n async: \"true\",\n\n contentType: \"application/json; charset=utf-8\",\n\n url: full,\n\n dataType: \"jsonp\",\n\n success: function (json) {\n\n HawkSearch.processFacets(hash, json, queryGuid, backbutton);\n\n }\n\n });\n\n };\n\n };\n\n \n\n HawkSearch.getUrl = function () {\n\n var url = window.location.toString();\n\n if (url.indexOf(\"?\") > -1) url = url.substring(0, url.indexOf(\"?\"));\n\n if (url.indexOf(\"#\") > -1) url = url.substring(0, url.indexOf(\"#\"));\n\n \n\n return url;\n\n };\n\n \n\n \n\n HawkSearch.copyValue = function (objs, name) {\n\n var obj = objs.find(name);\n\n if (obj != null && obj.length > 0) $(name).html(obj.html());\n\n };\n\n \n\n HawkSearch.copyCustomBanners = function (objs) {\n\n \n\n $(objs).find(\".hawk-bannerZone\").each(function () {\n\n var name = \"#\" + $(this).attr(\"id\");\n\n var obj = objs.find(name);\n\n if (obj != null && obj.length > 0 && obj.html().trim() != \"\") {\n\n if ($(\"#hdnhawkprv\").val() == \"1\") {\n\n $(obj).prepend('<span class=\"hawk-customBannerTitle\">' + obj.attr(\"title\") + '</span>')\n\n }\n\n $(name).html(obj.html());\n\n }\n\n else {\n\n $(name).html(\"\");\n\n }\n\n })\n\n };\n\n \n\n \n\n HawkSearch.processFacets = function (hash, json, queryGuid, backbutton) {\n\n var html = json.html;\n\n var location = json.location;\n\n if (!location == '') {\n\n window.location.replace(location);\n\n }\n\n \n\n // update the page contents\n\n var objs = $(html);\n\n var obj;\n\n HawkSearch.copyValue(objs, \"#hawktitle\");\n\n HawkSearch.copyValue(objs, \"#hawkitemlist\");\n\n HawkSearch.copyValue(objs, \"#hawktoptext\");\n\n HawkSearch.copyValue(objs, \"#hawkfacets\");\n\n HawkSearch.copyValue(objs, \"#hawkbreadcrumb\");\n\n HawkSearch.copyValue(objs, \"#hawktoppager\");\n\n HawkSearch.copyValue(objs, \"#hawkbottompager\");\n\n HawkSearch.copyValue(objs, \"#hawkbannertop\");\n\n HawkSearch.copyValue(objs, \"#hawkbannerbottom\");\n\n HawkSearch.copyValue(objs, \"#hawkbannerlefttop\");\n\n HawkSearch.copyValue(objs, \"#hawkbannerleftbottom\");\n\n HawkSearch.copyValue(objs, \"#hawksmartbug\");\n\n HawkSearch.copyValue(objs, \"#hdnhawktrackingid\");\n\n HawkSearch.copyValue(objs, \"#hawktabs\");\n\n HawkSearch.copyValue(objs, '#hawkflags');\n\n HawkSearch.copyValue(objs, '#hawkaid');\n\n HawkSearch.copyValue(objs, '#hawkp');\n\n \n\n HawkSearch.copyCustomBanners(objs);\n\n \n\n if (queryGuid !== undefined) {\n\n $(\"#hdnhawkquery\").val(queryGuid);\n\n }\n\n \n\n // related terms are loaded only first time\n\n if ($(\"#hawkrelated\").html() == '') {\n\n HawkSearch.copyValue(objs, \"#hawkrelated\");\n\n }\n\n \n\n obj = objs.find(\"#errormsg\");\n\n if (obj != null && obj.length > 0) alert(obj.html());\n\n \n\n // register trackingre\n\n HawkSearch.regTracking();\n\n HawkSearch.Tracking.writeSearch();\n\n \n\n // register facets (sliders, etc)\n\n HawkSearch.regFacets();\n\n \n\n if ($.isFunction(HawkCompare.reload)) HawkCompare.reload();\n\n \n\n // clear the pager click and the loading timer & unblock the page\n\n HawkSearch.processing = false;\n\n clearTimeout(HawkSearch.loadtimer);\n\n HawkSearch.hideBlockUI();\n\n if (HawkSearch.GetRecentSearches !== undefined) {\n\n HawkSearch.GetRecentSearches();\n\n }\n\n HawkSearch.BindPreviewInformation();\n\n HawkSearch.BindFacetTooltip();\n\n HawkSearch.BindBackToTop();\n\n \n\n \n\n if ($(window).scrollTop() > 0 && !backbutton) {\n\n $('html,body').animate({ scrollTop: 0 }, 500, function () { HawkSearch.scroll = false; HawkSearch.hideBlockUI(); });\n\n } else {\n\n HawkSearch.scroll = false; HawkSearch.hideBlockUI();\n\n }\n\n \n\n };\n\n \n\n HawkSearch.clearAllFacets = function () {\n\n var keyword = $(\"#hdnhawkkeyword\").val();\n\n var prv = $(\"#hdnhawkprv\").val();\n\n var lp = $(\"#hdnhawklp\").val();\n\n var adv = $(\"#hdnhawkadv\").val();\n\n var mpp = $(\"#hdnhawkmpp\").val();\n\n var sort = $(\"#hdnhawksortby\").val();\n\n var it = $(\"#hdnhawkit\").val();\n\n var items = $(\"#hdnhawkcompare\").val();\n\n var operator = $(\"#hdnhawkoperator\").val();\n\n var expand = $(\"#hdnhawkexpand\").val();\n\n var hawkb = $(\"#hdnhawkb\").val();\n\n var defaultmpp = $(\"#hdnhawkdefaultmpp\").val();\n\n var keywordfield = $(\"#hdnhawkkeywordfield\").val();\n\n var hawkflags = $('#hdnhawkflags').val();\n\n var qs = '';\n\n var aid = $(\"#hdnhawkaid\").val();\n\n \n\n if (keyword && keyword !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + keywordfield + \"=\" + encodeURIComponent(keyword);\n\n if (prv && prv !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"prv=\" + encodeURIComponent(prv);\n\n if (lp && lp !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"lp=\" + encodeURIComponent(lp);\n\n if (adv && adv !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"adv=\" + encodeURIComponent(adv);\n\n if (mpp && mpp !== \"\" && mpp !== defaultmpp) qs += (qs === \"\" ? \"\" : \"&\") + \"mpp=\" + encodeURIComponent(mpp);\n\n if (sort && sort !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"sort=\" + encodeURIComponent(sort);\n\n if (it && it !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"it=\" + encodeURIComponent(it);\n\n if (items && items !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"items=\" + encodeURIComponent(items);\n\n if (operator && operator !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"operator=\" + encodeURIComponent(operator);\n\n if (expand && expand !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"expand=\" + encodeURIComponent(expand);\n\n if (hawkb && hawkb !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"hawkb=\" + encodeURIComponent(hawkb);\n\n if (hawkflags && hawkflags !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"hawkflags=\" + encodeURIComponent(hawkflags);\n\n if (aid && aid !== \"\") qs += (qs === \"\" ? \"\" : \"&\") + \"hawkaid=\" + encodeURIComponent(aid);\n\n \n\n if (HawkSearch.disableAjax()) {\n\n var url = window.location.toString();\n\n if (url.indexOf(\"?\") > -1) url = url.substring(0, url.indexOf(\"?\"));\n\n if (url.indexOf(\"#\") > -1) url = url.substring(0, url.indexOf(\"#\"));\n\n window.location = url + '?' + qs;\n\n } else {\n\n if (qs) {\n\n window.history.pushState({}, {}, \"?\" + qs);\n\n HawkSearch.refreshResults();\n\n } else {\n\n window.history.pushState({}, {}, window.location.pathname);\n\n HawkSearch.refreshResults();\n\n }\n\n \n\n }\n\n };\n\n \n\n HawkSearch.getHashOrQueryVariable = function (variable) {\n\n var query = HawkSearch.getHash();\n\n var vars = query.split(\"&\");\n\n for (var i = 0; i < vars.length; i++) {\n\n var pair = vars[i].split(\"=\");\n\n if (pair[0].toLowerCase() == variable.toLowerCase()) {\n\n return pair[1];\n\n }\n\n }\n\n return HawkSearch.getQueryVariable(window.location.search.substring(1), variable);\n\n };\n\n \n\n HawkSearch.getHashOrQueryVariableOrder = function (variable) {\n\n var query = HawkSearch.getHash();\n\n \n\n var vars = query.split(\"&\");\n\n \n\n for (var i = 0; i < vars.length; i++) {\n\n var pair = vars[i].split(\"=\");\n\n if (pair[0].toLowerCase() == variable.toLowerCase()) {\n\n return i;\n\n }\n\n }\n\n //since there is no variable return big int number\n\n return 100000;\n\n }\n\n \n\n HawkSearch.getHashOrQueryVariableOrder = function (variable) {\n\n var query = HawkSearch.getHash();\n\n \n\n var vars = query.split(\"&\");\n\n \n\n for (var i = 0; i < vars.length; i++) {\n\n var pair = vars[i].split(\"=\");\n\n if (pair[0].toLowerCase() == variable.toLowerCase()) {\n\n return i;\n\n }\n\n }\n\n //since there is no variable return big int number\n\n return 100000;\n\n }\n\n \n\n HawkSearch.getQueryVariable = function (url, variable) {\n\n if (variable === undefined || variable === null) {\n\n return \"\";\n\n }\n\n \n\n var query = url;\n\n var vars = query.split(\"&\");\n\n for (var i = 0; i < vars.length; i++) {\n\n var pair = vars[i].split(\"=\");\n\n if (pair[0].toLowerCase() == variable.toLowerCase()) {\n\n return pair[1];\n\n }\n\n }\n\n return \"\";\n\n };\n\n \n\n HawkSearch.getRecommenderUrl = function () {\n\n if (HawkSearch.RecommenderUrl === undefined || HawkSearch.RecommenderUrl === \"\") {\n\n return null;\n\n }\n\n else {\n\n return HawkSearch.RecommenderUrl;\n\n }\n\n }\n\n \n\n HawkSearch.link = function (event, id, i, pk, mlt) {\n\n if (event.currentTarget === undefined || event.currentTarget.href === undefined) {\n\n return true;\n\n }\n\n \n\n if (HawkSearch.Tracking.CurrentVersion() == HawkSearch.Tracking.Version.v2) {\n\n HawkSearch.Tracking.writeClick(event, i, mlt, pk, id);\n\n }\n\n else if (HawkSearch.Tracking.CurrentVersion() == HawkSearch.Tracking.Version.v2AndSql) {\n\n HawkSearch.Tracking.writeClick(event, i, mlt, pk, id);\n\n HawkSearch.Tracking.V1.link(event, id, i, pk, mlt);\n\n }\n\n else {\n\n HawkSearch.Tracking.V1.link(event, id, i, pk, mlt);\n\n }\n\n \n\n return true;\n\n };\n\n \n\n HawkSearch.bannerLink = function (el, id) {\n\n if (HawkSearch.Tracking.CurrentVersion() == HawkSearch.Tracking.Version.v2) {\n\n HawkSearch.Tracking.writeBannerClick(el, id);\n\n }\n\n else if (HawkSearch.Tracking.CurrentVersion() == HawkSearch.Tracking.Version.v2AndSql) {\n\n HawkSearch.Tracking.writeBannerClick(el, id);\n\n HawkSearch.Tracking.V1.bannerLink(el, id);\n\n }\n\n else {\n\n HawkSearch.Tracking.V1.bannerLink(el, id);\n\n }\n\n \n\n return true;\n\n };\n\n \n\n HawkSearch.formatCurrency = function (num) {\n\n num = num.toString().replace(/\\$|\\,/g, '');\n\n if (isNaN(num))\n\n num = \"0\";\n\n var sign = (num == (num = Math.abs(num)));\n\n num = Math.floor(num * 100 + 0.50000000001);\n\n var cents = num % 100;\n\n num = Math.floor(num / 100).toString();\n\n if (cents < 10)\n\n cents = \"0\" + cents;\n\n for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++)\n\n num = num.substring(0, num.length - (4 * i + 3)) + ',' +\n\n num.substring(num.length - (4 * i + 3));\n\n return (((sign) ? '' : '-') + '$' + num + '.' + cents);\n\n };\n\n \n\n HawkSearch.Mobile = {};\n\n \n\n \n\n HawkSearch.Mobile.closeWindow = function () {\n\n $('#mobileSearchOption').hide();\n\n }\n\n \n\n \n\n HawkSearch.Mobile.openWindow = function () {\n\n $('#mobileSearchOption').toggle();\n\n $('.mobile-searchInput').focus();\n\n }\n\n \n\n \n\n // HawkSearch Suggest initialize\n\n HawkSearch.suggestInit = function (suggesters) {\n\n \n\n suggesters.forEach(function (item, index) {\n\n HawkSearch.SuggesterGlobal.items.push({\n\n queryField: item.queryField,\n\n settings: item.settings\n\n });\n\n \n\n $.fn.hawksearchSuggest = function (settings) {\n\n settings = $.extend({\n\n isAutoWidth: false,\n\n isInstatSearch: false,\n\n value: $('#hdnhawkkeyword').val()\n\n }, settings);\n\n \n\n return optionsHandler(this, settings);\n\n \n\n // configures options and settings for hawk search suggest\n\n \n\n function optionsHandler(suggestQueryField, settings) {\n\n \n\n var suggestQueryFieldNode = $(suggestQueryField)[0];\n\n \n\n \n\n \n\n // for some reason, Firefox 1.0 doesn't allow us to set autocomplete to off\n\n \n\n // this way, so you should manually set autocomplete=\"off\" in the input tag\n\n \n\n // if you can -- we'll try to set it here in case you forget\n\n \n\n suggestQueryFieldNode.autocomplete = \"off\";\n\n \n\n $(suggestQueryField).val(settings.value);\n\n \n\n var suggesterInstanceSettings = HawkSearch.SuggesterGlobal.getSuggester('#' + suggestQueryFieldNode.id).settings;\n\n \n\n suggesterInstanceSettings.defaultKeyword = settings.value;\n\n \n\n $(suggestQueryField).on(\"keyup\", keypressHandler);\n\n \n\n \n\n \n\n suggestQueryField.on(\"focus\", function (e) {\n\n \n\n suggesterInstanceSettings.focus = true;\n\n \n\n this.value = '';\n\n \n\n });\n\n \n\n \n\n \n\n if (settings.hiddenDivName) {\n\n \n\n suggesterInstanceSettings.divName = settings.hiddenDivName;\n\n \n\n } else {\n\n \n\n suggesterInstanceSettings.divName = \"querydiv\";\n\n \n\n };\n\n \n\n \n\n \n\n // This is the function that monitors the queryField, and calls the lookup functions when the queryField value changes.\n\n \n\n function suggestLookup(suggestQueryField) {\n\n \n\n var suggesterInstance = HawkSearch.SuggesterGlobal.getSuggester('#' + suggestQueryFieldNode.id);\n\n \n\n var val = suggestQueryField.val();\n\n \n\n if ((suggesterInstance.settings.lastVal != val || suggesterInstance.settings.lastVal != \"\") && suggesterInstance.settings.focus && HawkSearch.SuggesterGlobal.searching == false) {\n\n \n\n suggesterInstance.settings.lastVal = val;\n\n \n\n suggestDoRemoteQuery(suggesterInstance, escape(val));\n\n \n\n }\n\n \n\n return true;\n\n \n\n };\n\n \n\n \n\n \n\n function suggestDoRemoteQuery(suggester, val) {\n\n \n\n HawkSearch.SuggesterGlobal.searching = true;\n\n \n\n //var suggesterInstance = HawkSearch.SuggesterGlobal.getSuggester('#' + suggestQueryFieldNode.id);\n\n \n\n \n\n \n\n var req = suggester.settings.lookupUrlPrefix;\n\n \n\n var visitorId = HawkSearch.lilBro.event.getVisitorId();\n\n \n\n var keywordField = $(\"#hdnhawkkeywordfield\").val();\n\n \n\n var kw = $(suggester.queryField).val();\n\n \n\n \n\n \n\n var hawkb = HawkSearch.GetQueryStringValue[\"hawkb\"];\n\n \n\n if (hawkb !== undefined) {\n\n \n\n req = req + '&hawkb=' + hawkb;\n\n \n\n }\n\n \n\n \n\n \n\n jQuery.ajax({\n\n \n\n type: \"GET\",\n\n \n\n contentType: \"application/json; charset=utf-8\",\n\n \n\n url: req + '&q=' + escape(val) + '&hawkvisitorid=' + visitorId + '&' + keywordField + '=' + encodeURIComponent(kw) + \"&ssfid=\" + encodeURIComponent($(\"#hdnhawkssfid\").val()),\n\n \n\n data: \"\",\n\n \n\n dataType: \"jsonp\",\n\n \n\n success: function (autoSuggestResult) {\n\n \n\n showQueryDiv(suggester, autoSuggestResult);\n\n \n\n HawkSearch.SuggesterGlobal.searching = false;\n\n \n\n },\n\n \n\n error: function () {\n\n \n\n try { hideSuggest(); } catch (error) { };\n\n \n\n HawkSearch.SuggesterGlobal.searching = false;\n\n \n\n }\n\n \n\n });\n\n \n\n };\n\n \n\n \n\n \n\n // Get the <DIV> we're using to display the lookup results, and create the <DIV> if it doesn't already exist.\n\n \n\n function getSuggestDiv(suggester) {\n\n \n\n if (!suggester.settings.globalDiv) {\n\n \n\n var divId = suggester.settings.divName;\n\n \n\n // if the div doesn't exist on the page already, create it\n\n \n\n if (!document.getElementById(divId)) {\n\n \n\n var newNode = document.createElement(\"div\");\n\n \n\n newNode.setAttribute(\"id\", divId);\n\n \n\n newNode.setAttribute(\"class\", \"hawk-searchQuery\");\n\n \n\n document.body.appendChild(newNode);\n\n \n\n }\n\n \n\n \n\n \n\n // set the globalDiv referencea\n\n \n\n suggester.settings.globalDiv = document.getElementById(divId);\n\n \n\n suggester.settings.queryDiv = $(\"#\" + divId);\n\n \n\n }\n\n \n\n \n\n \n\n if (suggestQueryField && (suggestQueryField.offset().left != suggester.settings.storedOffset)) {\n\n \n\n // figure out where the top corner of the div should be, based on the\n\n \n\n // bottom left corner of the input field\n\n \n\n var x = suggestQueryField.offset().left,\n\n \n\n y = suggestQueryField.offset().top + suggestQueryField.outerHeight(),\n\n \n\n fieldID = suggestQueryField.attr(\"id\");\n\n \n\n \n\n \n\n suggester.settings.storedOffset = x;\n\n \n\n \n\n \n\n // add some formatting to the div, if we haven't already\n\n \n\n if (!suggester.settings.divFormatted) {\n\n \n\n // set positioning and apply identifier class using ID of corresponding search field\n\n \n\n suggester.settings.queryDiv.removeAttr(\"style\").css({\n\n \n\n \"left\": x,\n\n \n\n \"top\": y\n\n \n\n }).attr(\"class\", \"hawk-searchQuery hawk-searchQuery-\" + fieldID);\n\n \n\n \n\n \n\n // check to see if 'isAutoWidth' is enabled\n\n \n\n // if enabled apply width based on search field width\n\n \n\n if (settings && settings.isAutoWidth) {\n\n \n\n var queryWidth = suggestQueryField.outerWidth();\n\n \n\n var minValue = 250;\n\n \n\n if (queryWidth < minValue) {\n\n \n\n queryWidth = minValue;\n\n \n\n }\n\n \n\n suggester.settings.queryDiv.css(\"width\", queryWidth);\n\n \n\n }\n\n \n\n \n\n \n\n if (suggester.settings.isMobile) {\n\n \n\n $(suggester.settings.queryDiv).closest('input').focus();\n\n \n\n suggester.settings.queryDiv.removeAttr(\"style\");\n\n \n\n suggester.settings.queryDiv.css(\"width\", \"100%\");\n\n \n\n suggester.settings.queryDiv.css(\"height\", \"100%\");\n\n \n\n suggester.settings.queryDiv.css(\"top\", \"120px\");\n\n \n\n suggester.settings.queryDiv.css(\"background\", 'rgba(30,30,30,0.8)');\n\n \n\n suggester.settings.queryDiv.css(\"color\", \"white\");\n\n \n\n suggester.settings.queryDiv.attr(\"class\", \"hawk-searchQuery hawk-searchQuery-\" + fieldID);\n\n \n\n }\n\n \n\n \n\n \n\n //HawkSearch.SuggesterGlobal.divFormatted = true;\n\n \n\n };\n\n \n\n };\n\n \n\n return suggester.settings.queryDiv;\n\n \n\n };\n\n \n\n \n\n \n\n function suggestIsAbove(suggester) {\n\n \n\n if (suggester.settings.isAbove) {\n\n \n\n \n\n \n\n var queryHeight = suggester.settings.queryDiv.outerHeight(true);\n\n \n\n var y = suggestQueryField.offset().top - queryHeight;\n\n \n\n \n\n \n\n suggester.settings.queryDiv.css({\n\n \n\n \"top\": y\n\n \n\n });\n\n \n\n \n\n \n\n if (!suggester.settings.queryDiv.hasClass(\"hawk-queryAbove\")) {\n\n \n\n suggester.settings.queryDiv.addClass(\"hawk-queryAbove\");\n\n \n\n }\n\n \n\n };\n\n \n\n \n\n \n\n };\n\n \n\n \n\n \n\n // This is the key handler function, for when a user presses the up arrow, down arrow, tab key, or enter key from the input field.\n\n \n\n function keypressHandler(e) {\n\n \n\n var suggestDiv = getSuggestDiv(HawkSearch.SuggesterGlobal.getSuggester('#' + e.target.id)),\n\n \n\n divNode = suggestDiv[0];\n\n \n\n \n\n \n\n // don't do anything if the div is hidden\n\n \n\n if (suggestDiv.is(\":hidden\")) {\n\n \n\n //return true;\n\n \n\n }\n\n \n\n \n\n \n\n // make sure we have a valid event variable\n\n \n\n if (!e && window.event) {\n\n \n\n e = window.event;\n\n \n\n }\n\n \n\n \n\n \n\n var key;\n\n \n\n if (window.event) {\n\n \n\n key = e.keyCode; // IE\n\n \n\n } else {\n\n \n\n key = e.which;\n\n \n\n }\n\n \n\n \n\n \n\n // if this key isn't one of the ones we care about, just return\n\n \n\n var KEYUP = 38;\n\n \n\n var KEYDOWN = 40;\n\n \n\n var KEYENTER = 13;\n\n \n\n var KEYTAB = 9;\n\n \n\n \n\n \n\n if ((key != KEYUP) && (key != KEYDOWN) && (key != KEYENTER) && (key != KEYTAB)) {\n\n \n\n suggestLookup(suggestQueryField, settings, e);\n\n \n\n return true;\n\n \n\n };\n\n \n\n \n\n \n\n // get the span that's currently selected, and perform an appropriate action\n\n \n\n var selectedIndex = getSelectedItem(suggestDiv);\n\n \n\n //var selSpan = HawkSearch.suggest.setSelectedSpan(div, selNum);\n\n \n\n var selectedItem;\n\n \n\n \n\n \n\n if (key == KEYENTER) {\n\n \n\n if (selectedIndex >= 0) {\n\n \n\n var selectedItem = setSelectedItem(suggestDiv, selectedIndex);\n\n \n\n _selectResult(selectedItem);\n\n \n\n e.cancelBubble = true;\n\n \n\n if (window.event) {\n\n \n\n return false;\n\n \n\n } else {\n\n \n\n e.preventDefault();\n\n \n\n };\n\n \n\n } else {\n\n \n\n hideSuggest(e);\n\n \n\n return true;\n\n \n\n };\n\n \n\n } else if (key == KEYTAB) {\n\n \n\n if ((selectedIndex + 1) < suggestDiv.find(\".hawk-sqItem\").length) {\n\n \n\n e.cancelBubble = true;\n\n \n\n e.preventDefault();\n\n \n\n selectedItem = setSelectedItem(suggestDiv, selectedIndex + 1);\n\n \n\n } else {\n\n \n\n hideSuggest(e)\n\n \n\n };\n\n \n\n } else {\n\n \n\n if (key == KEYUP) {\n\n \n\n selectedItem = setSelectedItem(suggestDiv, selectedIndex - 1);\n\n \n\n } else if (key == KEYDOWN) {\n\n \n\n selectedItem = setSelectedItem(suggestDiv, selectedIndex + 1);\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n return true;\n\n \n\n };\n\n \n\n \n\n \n\n // displays query div and query results\n\n \n\n function showQueryDiv(suggester, autoSuggestResult) {\n\n \n\n var suggestDiv = getSuggestDiv(suggester),\n\n \n\n divNode = suggestDiv[0];\n\n \n\n \n\n \n\n if (autoSuggestResult === null ||\n\n \n\n (\n\n \n\n autoSuggestResult.Count === 0 &&\n\n \n\n autoSuggestResult.ContentCount === 0 &&\n\n \n\n (autoSuggestResult.Categories == null || autoSuggestResult.Categories.length === 0) &&\n\n \n\n (autoSuggestResult.Popular == null || autoSuggestResult.Popular.length === 0)\n\n \n\n )) {\n\n \n\n showSuggest(suggester, false);\n\n \n\n return;\n\n \n\n }\n\n \n\n \n\n \n\n // remove any results that are already there\n\n \n\n while (divNode.childNodes.length > 0)\n\n \n\n divNode.removeChild(divNode.childNodes[0]);\n\n \n\n \n\n \n\n var categories = autoSuggestResult.Categories;\n\n \n\n var popular = autoSuggestResult.Popular;\n\n \n\n var products = autoSuggestResult.Products;\n\n \n\n var content = autoSuggestResult.Content;\n\n \n\n var trackingVersion = autoSuggestResult.TrackingVersion;\n\n \n\n \n\n \n\n var popularHeading = \"Popular Searches\";\n\n \n\n if (autoSuggestResult.PopularHeading != \"\" && autoSuggestResult.PopularHeading != null) {\n\n \n\n popularHeading = autoSuggestResult.PopularHeading;\n\n \n\n }\n\n \n\n \n\n \n\n showTerms(popular, popularHeading, HawkSearch.LilBro.Schema.AutoCompleteClick.AutoCompleteType.popular, suggester, trackingVersion);\n\n \n\n \n\n \n\n var categoryHeading = \"Top Product Categories\";\n\n \n\n if (autoSuggestResult.CategoryHeading != \"\" && autoSuggestResult.CategoryHeading != null) {\n\n \n\n categoryHeading = autoSuggestResult.CategoryHeading;\n\n \n\n }\n\n \n\n showTerms(categories, categoryHeading, HawkSearch.LilBro.Schema.AutoCompleteClick.AutoCompleteType.category, suggester, trackingVersion);\n\n \n\n \n\n \n\n var productsTitle = (products.length == 1 ? \"Top Product Match\" : \"Top \" + products.length + \" Product Matches\");\n\n \n\n if (autoSuggestResult.ProductHeading != \"\" && autoSuggestResult.ProductHeading != null) {\n\n \n\n productsTitle = autoSuggestResult.ProductHeading;\n\n \n\n }\n\n \n\n \n\n \n\n showProducts(suggestDiv, products, productsTitle, trackingVersion);\n\n \n\n \n\n \n\n var contentTitle = (content.length == 1 ? \"Top Content Match\" : \"Top \" + content.length + \" Content Matches\");\n\n \n\n if (autoSuggestResult.ContentHeading != \"\" && autoSuggestResult.ContentHeading != null) {\n\n \n\n contentTitle = autoSuggestResult.ContentHeading;\n\n \n\n }\n\n \n\n \n\n \n\n showContent(suggestDiv, content, contentTitle, trackingVersion);\n\n \n\n \n\n \n\n if (categories.length > 0 || popular.length > 0 || products.length > 0 || content.length > 0) {\n\n \n\n showFooter(suggestDiv, autoSuggestResult, suggester);\n\n \n\n showSuggest(suggester, true);\n\n \n\n }\n\n \n\n \n\n \n\n if (suggester.settings.isMobile) {\n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-sqHeader\").each(function (item) {\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n this.style.setProperty(\"background\", \"#616161\", \"important\");\n\n \n\n this.style.setProperty(\"text-transform\", \"uppercase\", \"important\");\n\n \n\n this.style.setProperty(\"padding\", \"20px\", \"important\");\n\n \n\n });\n\n \n\n \n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-sqFooter\").each(function (item) {\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n this.style.setProperty(\"background\", \"#616161\", \"important\");\n\n \n\n this.style.setProperty(\"text-transform\", \"uppercase\", \"important\");\n\n \n\n this.style.setProperty(\"padding\", \"20px\", \"important\");\n\n \n\n });\n\n \n\n \n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-searchQuery\").each(function (item) {\n\n \n\n this.style.setProperty(\"background\", \"rgba(30,30,30,0.8)\", \"important\");\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n });\n\n \n\n \n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-sqItemName\").each(function (item) {\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n this.style.setProperty(\"background\", \"transparent\", \"important\");\n\n \n\n });\n\n \n\n \n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-sqItem\").each(function (item) {\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n this.style.setProperty(\"background\", \"transparent\", \"important\");\n\n \n\n this.style.setProperty(\"text-transform\", \"uppercase\", \"important\");\n\n \n\n this.style.setProperty(\"padding\", \"20px\", \"important\");\n\n \n\n this.style.setProperty(\"border\", \"none\", \"important\");\n\n \n\n \n\n \n\n $(this).hover(function () {\n\n \n\n this.style.setProperty(\"background\", \"#a0a0a0\", \"important\");\n\n \n\n }, function () {\n\n \n\n this.style.setProperty(\"background\", \"inherit\", \"important\");\n\n \n\n });\n\n \n\n });\n\n \n\n \n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-sqContent\").each(function (item) {\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n this.style.setProperty(\"background\", \"rgba(30,30,30,0.8)\", \"important\");\n\n \n\n this.style.setProperty(\"text-transform\", \"uppercase\", \"important\");\n\n \n\n this.style.setProperty(\"padding\", \"20px\", \"important\");\n\n \n\n this.style.setProperty(\"border\", \"none\", \"important\");\n\n \n\n });\n\n \n\n }\n\n \n\n };\n\n \n\n \n\n \n\n // controls the visibility of the result lookup based on the \"show\" parameter\n\n \n\n function showSuggest(suggester, show) {\n\n \n\n if (show === false) {\n\n \n\n HawkSearch.SuggesterGlobal.items.forEach(function (item) {\n\n \n\n $(item.settings.globalDiv).hide();\n\n \n\n });\n\n \n\n $(\"body\").off(\"click\", hideSuggest);\n\n \n\n } else {\n\n \n\n var suggestDisplay = getSuggestDiv(suggester);\n\n \n\n suggestDisplay.show();\n\n \n\n $(\"body\").on(\"click\", hideSuggest);\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n // We originally used showSuggest as the function that was called by the onBlur\n\n \n\n // event of the field, but it turns out that Firefox will pass an event as the first\n\n \n\n // parameter of the function, which would cause the div to always be visible.\n\n \n\n function hideSuggest(e) {\n\n \n\n var updatedDisplay = false;\n\n \n\n if (!updatedDisplay && $(e.target).closest(\".hawk-searchQuery\").length <= 0) {\n\n \n\n showSuggest(null, false);\n\n \n\n updatedDisplay = true;\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n function isEven(num) {\n\n \n\n if (num !== false && num !== true && !isNaN(num)) {\n\n \n\n return num % 2 == 0;\n\n \n\n } else return false;\n\n \n\n };\n\n \n\n \n\n \n\n function showTerms(terms, title, type, suggester, trackingVersion) {\n\n \n\n if (terms.length >= 1) {\n\n \n\n //suggestDiv.empty();\n\n \n\n suggestDivNode = suggester.settings.globalDiv;\n\n \n\n \n\n \n\n // create and append suggest header to suggest container\n\n \n\n var suggestHeader = document.createElement(\"div\");\n\n \n\n suggestHeader.className = \"hawk-sqHeader\";\n\n \n\n suggestHeader.innerHTML = title;\n\n \n\n suggestDivNode.appendChild(suggestHeader);\n\n \n\n \n\n \n\n // set up and append suggest content to suggest container\n\n \n\n var suggestContent = document.createElement(\"ul\");\n\n \n\n suggestContent.className = \"hawk-sqContent\";\n\n \n\n suggestDivNode.appendChild(suggestContent);\n\n \n\n \n\n \n\n // loop through suggest options\n\n \n\n var resultItems = \"\";\n\n \n\n for (var i = 0; i < terms.length; i++) {\n\n \n\n var term = terms[i];\n\n \n\n if (term.Value == null) continue;\n\n \n\n \n\n \n\n var resultItem = document.createElement(\"li\");\n\n \n\n \n\n \n\n resultItem.setAttribute('data-url', term.Url);\n\n \n\n resultItem.setAttribute(\"data-autoCompleteType\", type);\n\n \n\n // check for odd/even alternative styling\n\n \n\n if (isEven(i)) {\n\n \n\n resultItem.className = \"hawk-sqItem term\";\n\n \n\n } else {\n\n \n\n resultItem.className = \"hawk-sqItem hawk-sqItemAlt term\";\n\n \n\n };\n\n \n\n \n\n \n\n var resultItemContent = document.createElement(\"h1\");\n\n \n\n resultItemContent.className = \"hawk-sqItemName\";\n\n \n\n resultItemContent.innerHTML = term.Value\n\n \n\n \n\n \n\n resultItem.appendChild(resultItemContent);\n\n \n\n \n\n \n\n // append results of suggest options to the suggest content container\n\n \n\n suggestContent.appendChild(resultItem);\n\n \n\n };\n\n \n\n \n\n \n\n // find all newly added suggest options\n\n \n\n var suggestItems = $(suggester.settings.globalDiv).find(\".hawk-sqContent .hawk-sqItem\");\n\n \n\n \n\n \n\n // pass suggestItems to 'suggestItemHandler' to handle events\n\n \n\n suggestItemHandler(trackingVersion, suggestItems);\n\n \n\n \n\n \n\n // check to see if query div should show above field\n\n \n\n suggestIsAbove(suggester);\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n function showProducts(suggestDiv, products, title, trackingVersion) {\n\n \n\n if (products.length >= 1) {\n\n \n\n \n\n \n\n //suggestDiv.empty();\n\n \n\n suggestDivNode = suggestDiv[0];\n\n \n\n \n\n \n\n // create and append suggest header to suggest container\n\n \n\n var suggestHeader = document.createElement(\"div\");\n\n \n\n suggestHeader.className = \"hawk-sqHeader\";\n\n \n\n suggestHeader.innerHTML = title;\n\n \n\n suggestDivNode.appendChild(suggestHeader);\n\n \n\n \n\n \n\n // set up and append suggest content to suggest container\n\n \n\n var suggestContent = document.createElement(\"ul\");\n\n \n\n suggestContent.className = \"hawk-sqContent\";\n\n \n\n suggestDivNode.appendChild(suggestContent);\n\n \n\n \n\n \n\n // loop through suggest options\n\n \n\n for (var i = 0; i < products.length; i++) {\n\n \n\n var product = products[i];\n\n \n\n \n\n \n\n var resultItem = document.createElement(\"li\");\n\n \n\n \n\n \n\n // check for odd/even alternative styling\n\n \n\n if (isEven(i)) {\n\n \n\n resultItem.className = \"hawk-sqItem\";\n\n \n\n } else {\n\n \n\n resultItem.className = \"hawk-sqItem hawk-sqItemAlt\";\n\n \n\n };\n\n \n\n \n\n \n\n resultItem.setAttribute('data-url', product.Url);\n\n \n\n resultItem.setAttribute(\"data-autoCompleteType\", HawkSearch.LilBro.Schema.AutoCompleteClick.AutoCompleteType.product);\n\n \n\n resultItem.innerHTML = product.Html;\n\n \n\n \n\n \n\n // append results of suggest options to the suggest content container\n\n \n\n suggestContent.appendChild(resultItem);\n\n \n\n };\n\n \n\n \n\n \n\n // find all newly added suggest options\n\n \n\n var suggestItems = suggestDiv.find(\".hawk-sqContent .hawk-sqItem\");\n\n \n\n \n\n \n\n // pass suggestItems to 'suggestItemHandler' to handle events\n\n \n\n suggestItemHandler(trackingVersion, suggestItems);\n\n \n\n ;\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n function showFooter(suggestDiv, autoSuggestResult, suggester) {\n\n \n\n // creating the footer container\n\n \n\n \n\n \n\n var footerContainer = document.createElement(\"div\");\n\n \n\n footerContainer.className = \"hawk-sqFooter\";\n\n \n\n \n\n \n\n //creating the footer link\n\n \n\n var footerLink = document.createElement(\"a\");\n\n \n\n footerLink.href = \"javascript:void(0);\";\n\n \n\n footerLink.setAttribute(\"onclick\", \"window.location='\" + autoSuggestResult.SearchWebsiteUrl + \"?\" + $(\"#hdnhawkkeywordfield\").val() + \"=\" + escape($(suggester.queryField).val()) + HawkSearch.preserveUrlParams() + \"'\");\n\n \n\n \n\n \n\n footerLink.innerHTML = \"View All Matches\";\n\n \n\n \n\n \n\n if (autoSuggestResult.ViewAllButtonLabel != \"\" && autoSuggestResult.ViewAllButtonLabel != null) {\n\n \n\n footerLink.innerHTML = autoSuggestResult.ViewAllButtonLabel;\n\n \n\n }\n\n \n\n \n\n \n\n //creating the footer count\n\n \n\n var footerCount = document.createElement(\"div\");\n\n \n\n footerCount.style.marginTop = \"3px\";\n\n \n\n footerCount.style.fontSize = \".85em\";\n\n \n\n \n\n \n\n var footerCountText = \"\";\n\n \n\n var con = \"\";\n\n \n\n if (autoSuggestResult.Count > 0) {\n\n \n\n footerCountText = autoSuggestResult.Count + \" product(s)\";\n\n \n\n con = \", \";\n\n \n\n }\n\n \n\n \n\n \n\n if (autoSuggestResult.ContentCount > 0) {\n\n \n\n footerCountText += con + autoSuggestResult.ContentCount + \" content item(s)\";\n\n \n\n }\n\n \n\n \n\n \n\n if (footerCountText !== \"\") {\n\n \n\n footerCount.innerHTML = footerCountText;\n\n \n\n footerContainer.appendChild(footerCount);\n\n \n\n } \n\n \n\n \n\n \n\n //appending link and count to container\n\n \n\n footerContainer.appendChild(footerLink);\n\n \n\n \n\n \n\n //appending container to suggestDiv\n\n \n\n suggestDiv.append(footerContainer);\n\n \n\n \n\n \n\n // check to see if query div should show above field\n\n \n\n suggestIsAbove(suggester);\n\n \n\n };\n\n \n\n \n\n \n\n function showContent(suggestDiv, content, title, trackingVersion) {\n\n \n\n if (content.length >= 1) {\n\n \n\n //suggestDiv.empty();\n\n \n\n suggestDivNode = suggestDiv[0];\n\n \n\n \n\n \n\n // create and append suggest header to suggest container\n\n \n\n var suggestHeader = document.createElement(\"div\");\n\n \n\n suggestHeader.className = \"hawk-sqHeader\";\n\n \n\n suggestHeader.innerHTML = title;\n\n \n\n suggestDivNode.appendChild(suggestHeader);\n\n \n\n \n\n \n\n \n\n \n\n // set up and append suggest content to suggest container\n\n \n\n var suggestContent = document.createElement(\"ul\");\n\n \n\n suggestContent.className = \"hawk-sqContent\";\n\n \n\n suggestDivNode.appendChild(suggestContent);\n\n \n\n \n\n \n\n // loop through suggest options\n\n \n\n for (var i = 0; i < content.length; i++) {\n\n \n\n var product = content[i];\n\n \n\n \n\n \n\n var resultItem = document.createElement(\"li\");\n\n \n\n \n\n \n\n // check for odd/even alternative styling\n\n \n\n if (isEven(i)) {\n\n \n\n resultItem.className = \"hawk-sqItem term\";\n\n \n\n } else {\n\n \n\n resultItem.className = \"hawk-sqItem hawk-sqItemAlt term\";\n\n \n\n };\n\n \n\n resultItem.setAttribute('data-url', product.Url);\n\n \n\n resultItem.setAttribute(\"data-autoCompleteType\", HawkSearch.LilBro.Schema.AutoCompleteClick.AutoCompleteType.content);\n\n \n\n resultItem.innerHTML = product.Html\n\n \n\n \n\n \n\n // append results of suggest options to the suggest content container\n\n \n\n suggestContent.appendChild(resultItem);\n\n \n\n };\n\n \n\n \n\n \n\n // find all newly added suggest options\n\n \n\n var suggestItems = suggestDiv.find(\".hawk-sqContent .hawk-sqItem\");\n\n \n\n \n\n \n\n // pass suggestItems to 'suggestItemHandler' to handle events\n\n \n\n suggestItemHandler(trackingVersion, suggestItems);\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n \n\n \n\n // sets up events for suggest items\n\n \n\n function suggestItemHandler(trackingVersion, suggestItems) {\n\n \n\n // bind mouseenter/mouseleave to suggest options\n\n \n\n // toggles active state on mouseenter\n\n \n\n suggestItems.on(\"mouseenter mouseleave\", function (e) {\n\n \n\n var sqItem = $(e.currentTarget);\n\n \n\n if (e.type === \"mouseenter\") {\n\n \n\n highlightResult(sqItem);\n\n \n\n } else {\n\n \n\n unhighlightResult(sqItem);\n\n \n\n }\n\n \n\n });\n\n \n\n \n\n \n\n // bind 'mousedown' event to suggest options to go to url\n\n \n\n // using 'mousedown' instead of 'click' due to 'blur' event blocking the 'click' event from firing\n\n \n\n suggestItems.off('click').on(\"click\", function (e) {\n\n \n\n SuggestedItemClick(trackingVersion, e);\n\n \n\n });\n\n \n\n };\n\n \n\n \n\n \n\n function SuggestedItemClick(trackingVersion, e) {\n\n \n\n e.preventDefault();\n\n \n\n var suggest_type = $(e.target).closest(\"li\").attr(\"data-autoCompleteType\");\n\n \n\n var name = $(e.target).text().replace(/\\u00bb/g, \"&raquo;\");\n\n \n\n if (name === \"\") {\n\n \n\n name = $(e.target).parents(\".hawk-sqActive\").find(\"div.hawk-sqItemContent h1\").text();\n\n \n\n }\n\n \n\n var itemUrl = $(e.currentTarget).data(\"url\");\n\n \n\n var keyword = $(\"#\" + $(\"#hdnhawkkeywordfield\").val()).val();\n\n \n\n \n\n \n\n if (trackingVersion == HawkSearch.Tracking.Version.v2) {\n\n \n\n HawkSearch.Tracking.writeAutoCompleteClick(keyword, e, suggest_type, name, itemUrl);\n\n \n\n }\n\n \n\n else if (trackingVersion == HawkSearch.Tracking.Version.v2AndSQL) {\n\n \n\n HawkSearch.Tracking.writeAutoCompleteClick(keyword, e, suggest_type, name, itemUrl);\n\n \n\n HawkSearch.Tracking.V1.autosuggestClick(keyword, name, itemUrl, suggest_type);\n\n \n\n }\n\n \n\n else {\n\n \n\n HawkSearch.Tracking.V1.autosuggestClick(keyword, name, itemUrl, suggest_type);\n\n \n\n }\n\n \n\n \n\n \n\n window.location = itemUrl;\n\n \n\n };\n\n \n\n \n\n \n\n // This is called whenever the user clicks one of the lookup results.\n\n \n\n // It puts the value of the result in the queryField and hides the lookup div.\n\n \n\n function selectResult(item) {\n\n \n\n _selectResult(item);\n\n \n\n };\n\n \n\n // This actually fills the field with the selected result and hides the div\n\n \n\n function _selectResult(item) {\n\n \n\n itemUrl = item.data(\"url\");\n\n \n\n window.location = itemUrl;\n\n \n\n };\n\n \n\n \n\n \n\n \n\n \n\n // This is called when a user mouses over a lookup result\n\n \n\n function highlightResult(item) {\n\n \n\n _highlightResult(item);\n\n \n\n };\n\n \n\n // This actually highlights the selected result\n\n \n\n function _highlightResult(item) {\n\n \n\n if (item == null) return;\n\n \n\n item.addClass(\"hawk-sqActive\");\n\n \n\n };\n\n \n\n \n\n \n\n \n\n \n\n // This is called when a user mouses away from a lookup result\n\n \n\n function unhighlightResult(item) {\n\n \n\n _unhighlightResult(item);\n\n \n\n };\n\n \n\n // This actually unhighlights the selected result\n\n \n\n function _unhighlightResult(item) {\n\n \n\n item.removeClass(\"hawk-sqActive\");\n\n \n\n };\n\n \n\n \n\n \n\n \n\n \n\n // Get the number of the result that's currently selected/highlighted\n\n \n\n // (the first result is 0, the second is 1, etc.)\n\n \n\n function getSelectedItem(suggestDiv) {\n\n \n\n var count = -1;\n\n \n\n var sqItems = suggestDiv.find(\".hawk-sqItem\");\n\n \n\n \n\n \n\n if (sqItems) {\n\n \n\n if (sqItems.filter(\".hawk-sqActive\").length == 1) {\n\n \n\n count = sqItems.index(sqItems.filter(\".hawk-sqActive\"));\n\n \n\n };\n\n \n\n }\n\n \n\n return count\n\n \n\n };\n\n \n\n \n\n \n\n \n\n \n\n // Select and highlight the result at the given position\n\n \n\n function setSelectedItem(suggestDiv, selectedIndex) {\n\n \n\n var count = -1;\n\n \n\n var selectedItem = null;\n\n \n\n var first = null;\n\n \n\n var sqItems = suggestDiv.find(\".hawk-sqItem\");\n\n \n\n \n\n \n\n if (sqItems) {\n\n \n\n for (var i = 0; i < sqItems.length; i++) {\n\n \n\n if (first == null) {\n\n \n\n first = sqItems.eq(i);\n\n \n\n };\n\n \n\n \n\n \n\n if (++count == selectedIndex) {\n\n \n\n _highlightResult(sqItems.eq(i));\n\n \n\n selectedItem = sqItems.eq(i);\n\n \n\n } else {\n\n \n\n _unhighlightResult(sqItems.eq(i));\n\n \n\n }\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n // handle if nothing is select yet to select first\n\n \n\n // or loop through results if at the end/beginning.\n\n \n\n if (selectedItem == null && (selectedIndex < 0)) {\n\n \n\n selectedItem = sqItems.eq(-1);\n\n \n\n _highlightResult(selectedItem);\n\n \n\n } else if (selectedItem == null) {\n\n \n\n selectedItem = first;\n\n \n\n _highlightResult(selectedItem);\n\n \n\n };\n\n \n\n \n\n \n\n return selectedItem;\n\n \n\n };\n\n \n\n };\n\n };\n\n \n\n $(item.queryField).hawksearchSuggest(item.settings);\n\n \n\n });\n\n };\n\n \n\n \n\n HawkSearch.preserveUrlParams = function () {\n\n var prv = HawkSearch.GetQueryStringValue[\"prv\"] + '';\n\n var adv = HawkSearch.GetQueryStringValue[\"adv\"] + '';\n\n var aid = HawkSearch.GetQueryStringValue[\"hawkaid\"] + '';\n\n var hawkflags = HawkSearch.GetQueryStringValue[\"hawkflags\"] + '';\n\n var ret = '';\n\n \n\n if (prv != \"undefined\" && prv != '') ret += '&prv=' + escape(prv);\n\n if (adv != \"undefined\" && adv != '') ret += '&adv=' + escape(adv);\n\n if (aid != \"undefined\" && aid != '') ret += '&hawkaid=' + escape(aid);\n\n if (hawkflags != \"undefined\" && hawkflags != '') ret += '&hawkflags=' + escape(hawkflags);\n\n \n\n return ret;\n\n };\n\n \n\n \n\n //Recent Searches\n\n \n\n HawkSearch.clearRelatedSearches = function () {\n\n $.cookie(\"recent-searches\", \"\", { expires: -1 });\n\n $(\".hawk-recentSearches .hawk-navGroupContent > ul\").empty();\n\n $(\".hawk-recentSearches\").hide();\n\n };\n\n \n\n HawkSearch.GetRecentSearches = function () {\n\n var recentSearchesStr = $.cookie(\"recent-searches\");\n\n var recentSearches = [];\n\n if (recentSearchesStr != null) {\n\n var rsObjeArr = recentSearchesStr.split(\",\");\n\n $(rsObjeArr).each(function () {\n\n var obj = this.split(\"|\");\n\n if (obj.length > 1) {\n\n var srch = {};\n\n srch.keyword = obj[0];\n\n srch.count = obj[1];\n\n recentSearches.push(srch);\n\n }\n\n });\n\n }\n\n \n\n var keyword = HawkSearch.RecentSearchesKeyword;\n\n var count = HawkSearch.RecentSearchesCount;\n\n if (keyword !== \"\" && count > 0) {\n\n var exists = false;\n\n var removeIndex = 0;\n\n for (var i = 0; i < recentSearches.length; i++) {\n\n if (recentSearches[i].keyword == encodeURIComponent(keyword)) {\n\n exists = true;\n\n removeIndex = i;\n\n break;\n\n }\n\n }\n\n //element exists and remove it at existing position then add on top\n\n if (exists) {\n\n recentSearches.splice(removeIndex, 1);\n\n }\n\n var search = new Object();\n\n search.keyword = encodeURIComponent(keyword);\n\n search.count = count;\n\n recentSearches.unshift(search);\n\n }\n\n if (recentSearches.length == 0) {\n\n $(\".hawk-recentSearches\").hide();\n\n }\n\n var maxRecentSearchesCount = HawkSearch.RecentSearchesRecentSearchesCount;\n\n var numberOrSearches = Math.min(recentSearches.length, maxRecentSearchesCount);\n\n for (var j = 0; j < numberOrSearches; j++) {\n\n var k = recentSearches[j].keyword;\n\n var c = recentSearches[j].count;\n\n $(\".hawk-recentSearches .hawk-navGroupContent > ul\").append(\"<li><a href='\" + HawkSearch.RecentSearchesUrl + \"?\" + $(\"#hdnhawkkeywordfield\").val() + \"=\" + k + \"' rel='nofolow'>\" + decodeURIComponent(k) + \"<span class='count'> (\" + c + \")</span></a></li>\");\n\n }\n\n \n\n $(\".hawk-recentSearches .hawk-navGroupContent > ul li a\").click(function () {\n\n window.location = $(this).attr(\"href\");\n\n });\n\n var tempArray = [];\n\n $(recentSearches).each(function () {\n\n tempArray.push(this.keyword + \"|\" + this.count);\n\n });\n\n recentSearchesStr = tempArray.join(\",\");\n\n $.cookie(\"recent-searches\", recentSearchesStr, { expires: 365 });\n\n };\n\n \n\n HawkSearch.getTipPlacementFunction = function (defaultPosition, width, height) {\n\n return function (tip, element) {\n\n var position, top, bottom, left, right;\n\n \n\n var $element = $(element);\n\n var boundTop = $(document).scrollTop();\n\n var boundLeft = $(document).scrollLeft();\n\n var boundRight = boundLeft + $(window).width();\n\n var boundBottom = boundTop + $(window).height();\n\n \n\n var pos = $.extend({}, $element.offset(), {\n\n width: element.offsetWidth,\n\n height: element.offsetHeight\n\n });\n\n \n\n var isWithinBounds = function (elPos) {\n\n return boundTop < elPos.top && boundLeft < elPos.left && boundRight > (elPos.left + width) && boundBottom > (elPos.top + height);\n\n };\n\n \n\n var testTop = function () {\n\n if (top === false) return false;\n\n top = isWithinBounds({\n\n top: pos.top - height,\n\n left: pos.left + pos.width / 2 - width / 2\n\n });\n\n return top ? \"top\" : false;\n\n };\n\n \n\n var testBottom = function () {\n\n if (bottom === false) return false;\n\n bottom = isWithinBounds({\n\n top: pos.top + pos.height,\n\n left: pos.left + pos.width / 2 - width / 2\n\n });\n\n return bottom ? \"bottom\" : false;\n\n };\n\n \n\n var testLeft = function () {\n\n if (left === false) return false;\n\n left = isWithinBounds({\n\n top: pos.top + pos.height / 2 - height / 2,\n\n left: pos.left - width\n\n });\n\n return left ? \"left\" : false;\n\n };\n\n \n\n var testRight = function () {\n\n if (right === false) return false;\n\n right = isWithinBounds({\n\n top: pos.top + pos.height / 2 - height / 2,\n\n left: pos.left + pos.width\n\n });\n\n return right ? \"right\" : false;\n\n };\n\n \n\n switch (defaultPosition) {\n\n case \"top\":\n\n if (position = testTop()) return position;\n\n case \"bottom\":\n\n if (position = testBottom()) return position;\n\n case \"left\":\n\n if (position = testLeft()) return position;\n\n case \"right\":\n\n if (position = testRight()) return position;\n\n default:\n\n if (position = testTop()) return position;\n\n if (position = testBottom()) return position;\n\n if (position = testLeft()) return position;\n\n if (position = testRight()) return position;\n\n return defaultPosition;\n\n }\n\n }\n\n };\n\n \n\n HawkSearch.PopoverShow = function ($this) {\n\n $this.addClass(\"bounded\");\n\n var tip = $this.popover();\n\n var popover = $(tip).data(\"bs.popover\");\n\n if ($this.data(\"tipclass\") !== undefined) {\n\n popover.tip().addClass($this.data(\"tipclass\"));\n\n }\n\n tip.on(\"shown.bs.popover\", function (e) {\n\n $this.mouseleave(function () {\n\n setTimeout(function () {\n\n HawkSearch.TipMouseLeave($this);\n\n }, 250);\n\n });\n\n \n\n popover.tip().hover(function () {\n\n $(this).addClass(\"hover\");\n\n },\n\n function () {\n\n $(this).removeClass(\"hover\");\n\n });\n\n \n\n popover.tip().mouseleave(function () {\n\n setTimeout(function () {\n\n HawkSearch.TipMouseLeave($this);\n\n }, 250);\n\n });\n\n });\n\n \n\n $this.data(\"popover\");\n\n $this.popover('show');\n\n }\n\n \n\n HawkSearch.TipMouseLeave = function (that) {\n\n var tip = that.data(\"bs.popover\").tip();\n\n if (tip.hasClass(\"hover\")) {\n\n return;\n\n } else {\n\n tip.hide();\n\n that.removeClass(\"hover\");\n\n }\n\n }\n\n \n\n HawkSearch.BindPreviewInformation = function () {\n\n $(\".on-off-cb\").onoff();\n\n var hdnItemPinned = $(this).parents(\".hawk-itemWrapper\").find(\".hdn-itemPinned\");\n\n \n\n $(\"body\").off(\"change\", \"input.toggle-item-pin\").on(\"change\", \"input.toggle-item-pin\", function () {\n\n var isPinned = $(this).prop(\"checked\");\n\n var primaryKey = $(this).data(\"primary-key\");\n\n if (isPinned) {\n\n HawkSearch.addToTop(this, primaryKey);\n\n var hdnItemPinned = $(this).parents(\".hawk-itemWrapper\").find(\".hdn-itemPinned\");\n\n hdnItemPinned.val(isPinned);\n\n } else {\n\n HawkSearch.unpinItem(this, primaryKey);\n\n var hdnItemPinned = $(this).parents(\".hawk-itemWrapper\").find(\".hdn-itemPinned\");\n\n hdnItemPinned.val(isPinned);\n\n }\n\n \n\n $(this).parents(\".hawk-itemWrapper\").find(\".hdn-itemPinned\").val(isPinned);\n\n \n\n $(\"#hawkitemlist\").sortable(\"option\", \"disabled\", true);\n\n $(\".preview-info\").addClass(\"no-sortable\");\n\n });\n\n $(\".preview-info.explain-info\").on(\"hidden.bs.tooltip\", function () {\n\n $(this).css(\"display\", \"\");\n\n });\n\n \n\n \n\n $(\".preview-info\").each(function () {\n\n var content = $(this).parent().find(\".preview-info-content\").html();\n\n \n\n $(this).popover({\n\n html: true,\n\n placement: HawkSearch.getTipPlacementFunction('right', 360, 200),\n\n content: content\n\n });\n\n \n\n $(this).mouseover(function () {\n\n if ($(this).parents(\".grid_3\").hasClass('ui-sortable-helper')) {\n\n return;\n\n }\n\n $(this).addClass(\"hover\");\n\n var $this = $(this);\n\n if ($this.hasClass(\"bounded\")) {\n\n var popup = $(this).parent().find(\".popover\");\n\n if (!popup.is(\":visible\")) {\n\n $this.popover(\"show\");\n\n }\n\n return;\n\n }\n\n HawkSearch.PopoverShow($(this));\n\n });\n\n $(this).on(\"shown.bs.popover\", function () {\n\n var itemWrapper = $(this).parents(\".hawk-itemWrapper\")\n\n var hdnItemPinned = itemWrapper.find(\".hdn-itemPinned\");\n\n var cbToggleItemPin = itemWrapper.find(\".popover\").find(\"input.toggle-item-pin\");\n\n var checked = hdnItemPinned.val() === \"true\";\n\n cbToggleItemPin.prop(\"checked\", checked);\n\n });\n\n });\n\n \n\n \n\n $(\"#hawkitemlist\").sortable({\n\n items: '.grid_3.hawk-itemPinned',\n\n placeholder: \"grid_3 hawk-itemWrapper-placeholder\",\n\n appendTo: \"#hawkitemlist\",\n\n handle: \".preview-info\",\n\n cursor: \"move\",\n\n start: function (e, ui) {\n\n $(this).find(\".popover\").popover(\"hide\");\n\n ui.placeholder.hide();\n\n var wrapper = ui.item.find(\".hawk-itemWrapper\");\n\n var height = wrapper.outerHeight() - 4;\n\n var width = wrapper.width() - 2;\n\n ui.placeholder.height(height).width(width);\n\n ui.placeholder.show();\n\n \n\n \n\n },\n\n update: function (e, ui) {\n\n var docIdList = $(this).sortable('toArray', { attribute: 'data-hawk-id' }).toString();\n\n HawkSearch.updatePinOrder(docIdList);\n\n }\n\n });\n\n \n\n };\n\n \n\n HawkSearch.BindFacetTooltip = function () {\n\n $(\".hawk-facet-tooltip\").each(function () {\n\n $(this).click(function (e) {\n\n e.preventDefault();\n\n e.stopPropagation();\n\n });\n\n var content = $(this).parent().find(\".hawk-facet-tooltip-content\").html();\n\n $(this).popover({\n\n html: true,\n\n placement: 'right',\n\n content: content,\n\n container: 'body'\n\n });\n\n $(this).mouseover(function () {\n\n $(this).addClass(\"hover\");\n\n var $this = $(this);\n\n if ($this.hasClass(\"bounded\")) {\n\n var popup = $(this).parent().find(\".popover\");\n\n if (!popup.is(\":visible\")) {\n\n $this.popover(\"show\");\n\n }\n\n return;\n\n }\n\n HawkSearch.PopoverShow($(this));\n\n });\n\n });\n\n }\n\n \n\n HawkSearch.BindBackToTop = function () {\n\n $(window).scroll(function () {\n\n var divBackToTop = $(\"#hawk-backToTop\");\n\n if ($(window).scrollTop() > 0) {\n\n if (!divBackToTop.is(\":visible\")) {\n\n divBackToTop.fadeIn({ duration: 200, queue: false });\n\n }\n\n }\n\n else {\n\n if (divBackToTop.is(\":visible\")) {\n\n divBackToTop.fadeOut({ duration: 200, queue: false });\n\n }\n\n }\n\n });\n\n $(\"#hawk-backToTop\").hover(function () {\n\n $(this).toggleClass(\"hover\");\n\n });\n\n $(\"#hawk-backToTop\").on(\"click\", function () {\n\n $('html,body').animate({ scrollTop: 0 }, 500);\n\n });\n\n }\n\n \n\n HawkSearch.SetFacetScrollPosition = function () {\n\n var menuYloc = $(\".hawk-facetScollingContainer\").offset().top - $(\".hawk-facetScollingContainer\").position().top;\n\n var footerHeight = $(\".footer\").outerHeight();\n\n var footerOffsetTop = $(\".footer\").offset().top;\n\n \n\n \n\n var menuHeight = $(\".hawk-facetScollingContainer\").outerHeight();\n\n var winHeight = $(window).height();\n\n var offset = 0;\n\n var docScroll = $(document).scrollTop();\n\n var diff = menuHeight - winHeight;\n\n if (winHeight < menuHeight) {\n\n offset = docScroll - diff - menuYloc;\n\n if (docScroll < diff) {\n\n offset = 0;\n\n }\n\n \n\n } else {\n\n offset = docScroll - menuYloc + 10;\n\n }\n\n \n\n if (offset < 0) {\n\n offset = 0;\n\n }\n\n \n\n if (offset + menuHeight + menuYloc >= footerOffsetTop) {\n\n offset = footerOffsetTop - menuHeight - menuYloc - 20;\n\n }\n\n \n\n $(\".hawk-facetScollingContainer\").animate({ top: offset }, { duration: 500, queue: false });\n\n }\n\n \n\n HawkSearch.FacetContainerScrollable = function () {\n\n $(window).scroll(function () {\n\n HawkSearch.SetFacetScrollPosition();\n\n \n\n });\n\n \n\n }\n\n \n\n // exposes custom jQuery events to the body\n\n HawkSearch.ExposeEvents = function (type, args) {\n\n var callback = $.Event('hawk' + type, args);\n\n $('body').trigger(callback);\n\n \n\n // if prevent default block execution\n\n return !callback.isDefaultPrevented();\n\n }\n\n \n\n HawkSearch.Tracking.setReady($);\n\n \n\n if (HawkSearch.getHashOrQueryVariable(\"hawkRegVisitor\") !== \"\") {\n\n parent.postMessage(HawkSearch.lilBro.event.getVisitorId(), \"*\");\n\n }\n\n \n\n HawkSearch.Recommender.ToggleRecPreview();\n\n }(window.HawkSearch = window.HawkSearch || {}, jQuery));\n (function (HawkCompare, $) {\n HawkCompare.process = function () {\n var itemIds = $(\"#hdnhawkcompare\").val();\n if (itemIds === \"\") return;\n //alert('Compare feature is not available on demo site');\n var itemIds = $(\"#hdnhawkcompare\").val();\n if (itemIds === \"\") return;\n \n var url = HawkSearch.BaseUrl + \"?fn=compare&Items=\" + itemIds;\n $.get(url, function (data) {\n var html = data;\n HawkSearch.bootbox.dialog({\n title: 'Compare Items',\n message: html,\n className: 'hawk-compare hawk-preview',\n buttons: {\n main: {\n label: \"Close\"\n }\n }\n });\n $(\".item.span3 .product-shop .product-name\").matchHeights();\n });\n };\n \n HawkCompare.addItem = function (itemVal) {\n var index = HawkCompare.countItems();\n window['hawktocompare'][index] = itemVal;\n if (HawkCompare.countItems() != 0) {\n $(\".hawk-subControls.clearfix\").css(\"display\", \"block\");\n }\n };\n \n HawkCompare.getImage = function (itemVal) {\n // sets up query and cache\n var compareQuery = HawkSearch.BaseUrl + \"/default.aspx?fn=ajax&F=GetItemImageToCompare&ItemId=\" + itemVal;\n var cacheResp = window[compareQuery];\n // check for cache; process and output ajax query\n if (cacheResp) {\n HawkCompare.addImage(cacheResp.Image);\n } else {\n $.ajax({\n type: \"GET\",\n contentType: \"application/json; charset=utf-8\",\n url: compareQuery,\n dataType: 'jsonp',\n data: \"\",\n async: false,\n success: function (json) {\n window[compareQuery] = json;\n HawkCompare.addImage(json.Image);\n }\n });\n };\n };\n \n HawkCompare.addImage = function (htmlLi) {\n $(\".hawk-compareList>ul\").each(function () {\n $(this).find(\"li\").each(function () {\n if ($(this).html() == \"\" || $(this).html() == \"&nbsp;\") {\n $(this).html(htmlLi);\n return false;\n }\n return true;\n });\n });\n };\n \n HawkCompare.countItems = function () {\n return window['hawktocompare'].length;\n };\n \n HawkCompare.reload = function () {\n $.each(window['hawktocompare'], function (i, value) {\n HawkCompare.getImage(value);\n $(\"#chkItemCompare\" + value).attr(\"checked\", true);\n });\n };\n \n HawkCompare.removeItem = function (itemVal) {\n $(\".hawk-compareList>ul\").each(function () {\n var cItem = $(this).find(\"a#\" + itemVal).parent();\n cItem.parent().append(\"<li>&nbsp;</li>\");\n cItem.remove();\n });\n $(\"#chkItemCompare\" + itemVal).attr(\"checked\", false);\n \n var index = window['hawktocompare'].indexOf(itemVal);\n window['hawktocompare'].splice(index, 1);\n \n if (HawkCompare.countItems() == 0) {\n $(\".hawk-subControls.clearfix\").css(\"display\", \"none\");\n }\n \n };\n \n }(window.HawkCompare = window.HawkCompare || {}, jQuery));\n\n // END Namespaced HawkSearch block.\n\n window.onpopstate = function () {\n log(\"onhashchagne event handler\");\n HawkSearch.refreshResults(true);\n }\n\n HawkSearch.loadRecommender = function () {\n $(\".hawk-recommendation\").empty();\n HawkSearch.showRecsBlockUI();\n var recommender = new HawkSearch.Recommender(HawkSearch.jQuery);\n }\n\n $(document).ready(function () {\n // initialize auto-suggest\n if (HawkSearch.initAutoSuggest !== undefined) {\n HawkSearch.initAutoSuggest();\n }\n\n $(document).on('click', '#explainDetailsTabs .tab-links a', function (e) {\n var currentAttrValue = $(this).data('nav');\n $('.tabs #' + currentAttrValue).show().siblings().hide();\n $(this).parent('li').addClass('active').siblings().removeClass('active');\n e.preventDefault();\n });\n\n HawkSearch.loadRecommender();\n\n $(\"#divSmartBug\").delegate(\".bugExplain\", \"click\", function () {\n $(\"#hdnhawkadv\").val($(this).attr(\"href\"));\n HawkSearch.refreshUrl(null, true);\n return false;\n });\n\n if (!$(\"#hawkitemlist\").length) {\n //HawkSearch.regSmartBug();\n return;\n }\n // load items to compare\n var items = decodeURIComponent(HawkSearch.getHashOrQueryVariable(\"items\"));\n if (items != \"\") {\n window['hawktocompare'] = items.split(\",\");\n if ($.isFunction(window.HawkCompare.reload)) HawkCompare.reload();\n } else {\n window['hawktocompare'] = new Array();\n }\n\n HawkSearch.regFacets();\n\n // bind the click event to the anchor tags\n $(\"#hawkfacets\").on(\"click\", \".slider-clear, .hawk-facetFilters a\", function (event) {\n\n // clear the current page\n $(\"#hdnhawkpg\").val(\"\");\n var options = $(this).data().options;\n var ul = $(this).parents(\"ul.hawk-facetFilters\");\n if (ul.hasClass(\"singlefacet\")) {\n ul.find(\".hawkFacet-active a\").each(function () {\n var opt = $(this).data().options;\n if (options.value !== opt.value) {\n $(this).parent().removeClass(\"hawkFacet-active\");\n }\n });\n }\n\n if (typeof (options.hash) !== \"undefined\") {\n if (HawkSearch.disableAjax()) {\n window.location = $(this).attr(\"href\");\n } else {\n window.history.pushState({}, {}, \"?\" + options.hash);\n }\n } else {\n HawkSearch.refreshUrl\n (event);\n }\n\n return false;\n });\n\n if (!HawkSearch.disableAjax()) {\n var newHash = window.location.search.substring(1);\n if (newHash === \"\" || (window.location.search.substring(1) !== \"\" && window.location.href.indexOf(\"#\") > -1)) newHash = HawkSearch.getHash();\n if (window.location.search.substring(1) !== newHash) {\n window.history.pushState({}, {}, \"?\" + newHash);\n }\n }\n\n // hawk pagination\n $(\"#hawktoppager, #hawkbottompager\").on(\"click\", \".hawk-pageLink\", function (e) {\n e.preventDefault();\n if ($(this).hasClass(\"disabled\") || $(\"#hdnhawkpg\").val() === $(this).attr(\"page\")) return false;\n\n $(\"#hdnhawkpg\").val($(this).attr(\"page\"));\n HawkSearch.refreshUrl();\n return false;\n });\n\n // hawk sorting\n $(\"#hawktoppager, #hawkbottompager\").on(\"change\", \".hawksortby\", function (e) {\n // clear the current page\n $(\"#hdnhawkpg\").val(\"\");\n\n $(\"#hdnhawksortby\").val($(this).val());\n $(\".hawksortby\").val($(this).val());\n\n HawkSearch.refreshUrl(e);\n return false;\n });\n\n\n // hawk change per page\n $(\"#hawktoppager, #hawkbottompager\").on(\"change\", \".hawkmpp\", function (event) {\n // clear the current page\n $(\"#hdnhawkpg\").val(\"\");\n\n $(\"#hdnhawkmpp\").val($(this).val());\n $(\".hawkmpp\").val($(this).val());\n\n HawkSearch.refreshUrl(event);\n return false;\n });\n\n var hawkmpp = $(\".hawkmpp\");\n if (hawkmpp.length > 0 && hawkmpp.eq(0).val() !== \"\" && $(\"#hdnhawkmpp\").val() === \"\") {\n $(\"#hdnhawkmpp\").val(hawkmpp.eq(0).val());\n hawkmpp.val($(\"#hdnhawkmpp\").val());\n }\n\n $(\"#hawkfacets\").on(\"click\", \".hawk-selectedGroup a\", function (e) {\n e.preventDefault();\n if (HawkSearch.disableAjax()) {\n window.location = $(this).attr(\"href\");\n } else {\n var options = $(this).data().options;\n if (window.location.hash == options.hash) {\n window.history.pushState({}, {}, window.location.pathname);\n HawkSearch.refreshResults();;\n } else {\n window.history.pushState({}, {}, \"?\" + options.hash);\n HawkSearch.refreshResults();\n }\n\n }\n return false;\n });\n\n $(\"#hawktoppager, #hawkbottompager\").on(\"click\", \".btnCompareItems\", function () {\n if (HawkCompare.countItems() < 2) {\n alert('You should select at least 2 items');\n return false;\n } else {\n $(\"#hdnhawkcompare\").val(window['hawktocompare'].join(\",\"));\n HawkCompare.process();\n }\n return true;\n });\n\n $(\"#hawkitemlist\").on(\"change\", \"input.ckbItemCompare\", function () {\n if ($(this).is(':checked')) {\n if (HawkCompare.countItems() >= 5) {\n alert('You can compare up to 5 items');\n $(this).attr('checked', false);\n return false;\n } else {\n HawkCompare.getImage($(this).val());\n HawkCompare.addItem($(this).val());\n }\n } else {\n HawkCompare.removeItem($(this).val());\n }\n return true;\n });\n\n $(\"#hawkfacets\").on(\"click\", \".hawk-resultsSearch:first .hawk-searchWithinButton\", function (e) {\n // clear the current page\n $(\"#hdnhawkpg\").val(\"\");\n\n e.preventDefault();\n });\n\n //initial load\n if ($(\"#hawkitemlist\").html() == '' || (!HawkSearch.disableAjax() && window.location.hash)) {\n HawkSearch.refreshResults();\n }\n else {\n HawkSearch.Tracking.writeSearch();\n HawkSearch.regTracking();\n }\n\n if (HawkSearch.GetRecentSearches !== undefined) {\n HawkSearch.GetRecentSearches();\n }\n\n $(window).on(\"debouncedresize\", function (event) {\n $(\"#hawkitemlist .itemWrapper\").css(\"min-height\", 0);\n $(\"#hawkbannertop .itemWrapper\").css(\"min-height\", 0);\n HawkSearch.normalizeHeights();\n log(\"resize\");\n\n });\n\n HawkSearch.BindPreviewInformation();\n HawkSearch.BindFacetTooltip();\n\n if ($(\".hawk-facetScollingContainer\").length) {\n HawkSearch.FacetContainerScrollable();\n }\n\n HawkSearch.BindBackToTop();\n\n });\n\n\n\n $.expr[':'].containsNoCase = function (a, i, m) {\n var regex = /(.*?)\\s\\(\\d+?\\)/;\n var textNode = a.textContent || a.innerText || \"\";\n var matches = textNode.match(regex);\n if (matches == null) {\n return null;\n }\n\n return (matches[1]).toUpperCase().indexOf(m[3].toUpperCase()) >= 0;\n };\n\n $.fn.filterThatList = function (options) {\n // if there are no passed options create an empty options object\n if (options === undefined || options === null) {\n options = {};\n }\n ;\n\n // set up default options\n var defaults = {\n searchTarget: $(this) // the search input\n };\n\n return this.each(function () {\n // merge passed options with default options to create settings\n var settings = $.extend(defaults, options);\n\n settings.searchTarget.change(function () {\n // get the value of the input which is used to filter against\n var filter = $(this).val();\n var searchList = settings.list;\n var isNestedFacet = settings.list.hasClass(\"hawk-nestedfacet\");\n //when nested facet prepare flat facet\n if (isNestedFacet) {\n var flatUlId = settings.list.attr(\"id\") + \"_flat\";\n if ($(\"#\" + flatUlId).size() == 0) {\n var searchList = $(settings.list[0].cloneNode(false));\n searchList.removeClass(\"hawk-navTruncateList\");\n searchList.addClass(\"hawk-scrollList\");\n searchList.attr(\"id\", flatUlId);\n searchList.appendTo(settings.list.parent());\n\n $(settings.list).find(\"li\").each(function () {\n var pathArr = [];\n $(this).parentsUntil(\"#\" + settings.list.attr(\"id\"), \"li\").each(function () {\n var text = $($($(this).children(\"a\")).children(\"span\").contents()[0]).text();\n text = text.trim();\n pathArr.unshift(text);\n });\n\n var li = $(\"<li>\");\n if ($(this).hasClass(\"hawkFacet-active\")) {\n li.addClass(\"hawkFacet-active\");\n }\n\n li.appendTo(searchList);\n var anchor = $(this).children(\"a\").clone();\n if (pathArr.length > 0) {\n var textSpan = anchor.children(\"span\")\n var spanCount = textSpan.children(\".hawk-facetCount\").remove()\n pathArr.push(textSpan.text());\n textSpan.html(pathArr.join(\" &raquo; \"));\n textSpan.append(spanCount);\n }\n\n anchor.appendTo(li);\n });\n var liHeight = searchList.children(\"li\").first().outerHeight();\n //set search list for max 20 elements\n searchList.css(\"max-height\", (liHeight * 20) + \"px\");\n settings.list.hide();\n }\n else {\n searchList = $(\"#\" + flatUlId);\n searchList.show();\n settings.list.hide();\n }\n }\n var noResults = (\"<li><span>No Results Found</span></li>\");\n\n if (filter) {\n searchList\n // hide items that do not match input filter\n .find(\"li:not(:containsNoCase(\" + filter + \"))\").hide()\n // show items that match input filter\n .end().find(\"li:containsNoCase(\" + filter + \")\").show();\n\n var items = searchList.find(\"li:containsNoCase(\" + filter + \")\");\n\n // nothing matches filter\n // add no results found\n if (items.length == 0) {\n var item = $(noResults);\n searchList.prepend(item);\n return;\n }\n\n //check if more results\n var options = settings.list.data().options;\n var moreItems = items.filter(function (index) {\n return index >= options.cutoff;\n });\n moreItems.hide();\n\n //if no more results\n if (moreItems.size() == 0) {\n return;\n }\n\n //otherwise \n //remove no results\n items.find(\":contains('No Results Found')\").remove();\n\n if (moreItems) {\n //add more button and handle it's click event\n var more = settings.list.find(\"li.hawk-navMore\");\n more.off(\"click\").find(\"span\").text(\"(+) Show \" + moreItems.size() + \" More\");\n more.show();\n\n more.on(\"click\", function (event) {\n var moreTrigger = $(this);\n if ($(this).hasClass(\"hawk-navMoreActive\")) {\n searchList\n // hide items that do not match input filter\n .find(\"li:not(:containsNoCase(\" + filter + \"))\").hide()\n // show items that match input filter\n .end().find(\"li:containsNoCase(\" + filter + \")\").show();\n\n items = searchList.find(\"li:containsNoCase(\" + filter + \")\");\n\n moreItems = items.filter(function (index) {\n return index >= options.cutoff;\n });\n moreItems.hide();\n\n moreTrigger.find(\"span\").text(\"(+) Show \" + moreItems.size() + \" More\");\n moreTrigger.removeClass(\"hawk-navMoreActive\");\n window[\"hawkexpfacet_\" + searchList.attr(\"id\")] = null;\n moreTrigger.show();\n } else {\n searchList\n // hide items that do not match input filter\n .find(\"li:not(:containsNoCase(\" + filter + \"))\").hide()\n // show items that match input filter\n .end().find(\"li:containsNoCase(\" + filter + \")\").show();\n\n items = searchList.find(\"li:containsNoCase(\" + filter + \")\");\n\n // nothing matches filter\n if (items.length == 0) {\n var item = $(noResults);\n searchList.prepend(item);\n return;\n }\n moreTrigger.addClass(\"hawk-navMoreActive\").find(\"span\").text(options.lessText);\n moreTrigger.show();\n window[\"hawkexpfacet_\" + searchList.attr(\"id\")] = true;\n };\n });\n\n }\n //no filter\n } else {\n //remove no results option\n settings.list.find(\":contains('No Results Found')\").remove();\n\n // if nothing is entered display all items in list\n if (isNestedFacet) {\n searchList.hide();\n settings.list.show();\n }\n else {\n if (settings.list.hasClass(\"hawk-navTruncateList\")) {\n var wasExpanded = settings.list.find(\"li.hawk-navMore > span\").hasClass(\"hawk-navMoreActive\");\n\n if (wasExpanded) {\n settings.list.find(\"li\").show();\n }\n else {\n var options = settings.list.data().options;\n var items = settings.list.find(\"li:not(.hawk-navMore)\");\n\n items.each(function (i, el) {\n if (i < options.cutoff) {\n $(this).show();\n } else {\n $(this).hide();\n }\n });\n\n\n //check if more results\n var options = settings.list.data().options;\n var moreItems = items.filter(function (index) {\n return index >= options.cutoff;\n });\n moreItems.hide();\n\n //if no more results\n if (moreItems.size() == 0) {\n return;\n }\n\n if (moreItems) {\n var more = settings.list.find(\"li.hawk-navMore\");\n more.off(\"click\").find(\"span\").text(options.moreText);\n more.show();\n\n more.on(\"click\", function (event) {\n var moreTrigger = $(this);\n if ($(this).hasClass(\"hawk-navMoreActive\")) {\n moreTrigger.hide();\n moreTrigger.removeClass(\"hawk-navMoreActive\").find(\"span\").text(options.moreText);\n window[\"hawkexpfacet_\" + searchList.attr(\"id\")] = null;\n moreTrigger.show();\n } else {\n moreTrigger.addClass(\"hawk-navMoreActive\").find(\"span\").text(options.lessText);\n window[\"hawkexpfacet_\" + searchList.attr(\"id\")] = true;\n moreTrigger.show();\n };\n });\n }\n\n }\n } else {\n settings.list.find(\"li\").show();\n }\n }\n }\n }).keyup(function () {\n //trigger above actions at every keyup\n $(this).change();\n });\n\n });\n };\n\n /************************/\n\n /* Custom Plugins Below */\n\n /************************/\n\n \n\n //requireJS, these are not the plugins you are looking for\n\n //TRUST ME. THIS IS GOOD. PLEASE DON'T REMOVE THIS.\n\n var define = undefined;\n\n \n\n /*!\n\n \t\t * jQuery blockUI plugin\n\n \t\t * Version 2.66.0-2013.10.09\n\n \t\t * Requires jQuery v1.7 or later\n\n \t\t *\n\n \t\t * Examples at: http://malsup.com/jquery/block/\n\n \t\t * Copyright (c) 2007-2013 M. Alsup\n\n \t\t * Dual licensed under the MIT and GPL licenses:\n\n \t\t * http://www.opensource.org/licenses/mit-license.php\n\n \t\t * http://www.gnu.org/licenses/gpl.html\n\n \t\t *\n\n \t\t * Thanks to Amir-Hossein Sobhi for some excellent contributions!\n\n \t\t */\n\n (function () {\n\n function p(b) {\n\n function p(c, a) {\n\n var f, h, e = c == window, g = a && void 0 !== a.message ? a.message : void 0; a = b.extend({}, b.blockUI.defaults, a || {}); if (!a.ignoreIfBlocked || !b(c).data(\"blockUI.isBlocked\")) {\n\n a.overlayCSS = b.extend({}, b.blockUI.defaults.overlayCSS, a.overlayCSS || {}); f = b.extend({}, b.blockUI.defaults.css, a.css || {}); a.onOverlayClick && (a.overlayCSS.cursor = \"pointer\"); h = b.extend({}, b.blockUI.defaults.themedCSS, a.themedCSS || {}); g = void 0 === g ? a.message : g; e && l && s(window, { fadeOut: 0 }); if (g && \"string\" != typeof g &&\n\n (g.parentNode || g.jquery)) {\n\n var k = g.jquery ? g[0] : g, d = {}; b(c).data(\"blockUI.history\", d); d.el = k; d.parent = k.parentNode; d.display = k.style.display; d.position = k.style.position; d.parent && d.parent.removeChild(k)\n\n } b(c).data(\"blockUI.onUnblock\", a.onUnblock); var d = a.baseZ, m; m = t || a.forceIframe ? b('<iframe class=\"blockUI\" style=\"z-index:' + d++ + ';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0\" src=\"' + a.iframeSrc + '\"></iframe>') : b('<div class=\"blockUI\" style=\"display:none\"></div>');\n\n k = a.theme ? b('<div class=\"blockUI blockOverlay ui-widget-overlay\" style=\"z-index:' + d++ + ';display:none\"></div>') : b('<div class=\"blockUI blockOverlay\" style=\"z-index:' + d++ + ';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0\"></div>'); a.theme && e ? (d = '<div class=\"blockUI ' + a.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all\" style=\"z-index:' + (d + 10) + ';display:none;position:fixed\">', a.title && (d += '<div class=\"ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle\">' +\n\n (a.title || \"&nbsp;\") + \"</div>\"), d += '<div class=\"ui-widget-content ui-dialog-content\"></div></div>') : a.theme ? (d = '<div class=\"blockUI ' + a.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all\" style=\"z-index:' + (d + 10) + ';display:none;position:absolute\">', a.title && (d += '<div class=\"ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle\">' + (a.title || \"&nbsp;\") + \"</div>\"), d += '<div class=\"ui-widget-content ui-dialog-content\"></div>', d += \"</div>\") : d = e ? '<div class=\"blockUI ' + a.blockMsgClass + ' blockPage\" style=\"z-index:' +\n\n (d + 10) + ';display:none;position:fixed\"></div>' : '<div class=\"blockUI ' + a.blockMsgClass + ' blockElement\" style=\"z-index:' + (d + 10) + ';display:none;position:absolute\"></div>'; d = b(d); g && (a.theme ? (d.css(h), d.addClass(\"ui-widget-content\")) : d.css(f)); a.theme || k.css(a.overlayCSS); k.css(\"position\", e ? \"fixed\" : \"absolute\"); (t || a.forceIframe) && m.css(\"opacity\", 0); f = [m, k, d]; var r = e ? b(\"body\") : b(c); b.each(f, function () { this.appendTo(r) }); a.theme && a.draggable && b.fn.draggable && d.draggable({ handle: \".ui-dialog-titlebar\", cancel: \"li\" });\n\n h = A && (!b.support.boxModel || 0 < b(\"object,embed\", e ? null : c).length); if (v || h) {\n\n e && a.allowBodyStretch && b.support.boxModel && b(\"html,body\").css(\"height\", \"100%\"); if ((v || !b.support.boxModel) && !e) {\n\n h = parseInt(b.css(c, \"borderTopWidth\"), 10) || 0; var q = parseInt(b.css(c, \"borderLeftWidth\"), 10) || 0, w = h ? \"(0 - \" + h + \")\" : 0, x = q ? \"(0 - \" + q + \")\" : 0\n\n } b.each(f, function (b, c) {\n\n var d = c[0].style; d.position = \"absolute\"; if (2 > b) e ? d.setExpression(\"height\", \"Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:\" +\n\n a.quirksmodeOffsetHack + ') + \"px\"') : d.setExpression(\"height\", 'this.parentNode.offsetHeight + \"px\"'), e ? d.setExpression(\"width\", 'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + \"px\"') : d.setExpression(\"width\", 'this.parentNode.offsetWidth + \"px\"'), x && d.setExpression(\"left\", x), w && d.setExpression(\"top\", w); else if (a.centerY) e && d.setExpression(\"top\", '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + \"px\"'),\n\n d.marginTop = 0; else if (!a.centerY && e) {\n\n var f = \"((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + \" + (a.css && a.css.top ? parseInt(a.css.top, 10) : 0) + ') + \"px\"'; d.setExpression(\"top\", f)\n\n }\n\n })\n\n } g && (a.theme ? d.find(\".ui-widget-content\").append(g) : d.append(g), (g.jquery || g.nodeType) && b(g).show()); (t || a.forceIframe) && a.showOverlay && m.show(); if (a.fadeIn) f = a.onBlock ? a.onBlock : u, m = a.showOverlay && !g ? f : u, f = g ? f : u, a.showOverlay && k._fadeIn(a.fadeIn, m), g && d._fadeIn(a.fadeIn,\n\n f); else if (a.showOverlay && k.show(), g && d.show(), a.onBlock) a.onBlock(); y(1, c, a); e ? (l = d[0], n = b(a.focusableElements, l), a.focusInput && setTimeout(z, 20)) : B(d[0], a.centerX, a.centerY); a.timeout && (g = setTimeout(function () { e ? b.unblockUI(a) : b(c).unblock(a) }, a.timeout), b(c).data(\"blockUI.timeout\", g))\n\n }\n\n } function s(c, a) {\n\n var f, h = c == window, e = b(c), g = e.data(\"blockUI.history\"), k = e.data(\"blockUI.timeout\"); k && (clearTimeout(k), e.removeData(\"blockUI.timeout\")); a = b.extend({}, b.blockUI.defaults, a || {}); y(0, c, a); null === a.onUnblock &&\n\n (a.onUnblock = e.data(\"blockUI.onUnblock\"), e.removeData(\"blockUI.onUnblock\")); var d; d = h ? b(\"body\").children().filter(\".blockUI\").add(\"body > .blockUI\") : e.find(\">.blockUI\"); a.cursorReset && (1 < d.length && (d[1].style.cursor = a.cursorReset), 2 < d.length && (d[2].style.cursor = a.cursorReset)); h && (l = n = null); a.fadeOut ? (f = d.length, d.stop().fadeOut(a.fadeOut, function () { 0 === --f && r(d, g, a, c) })) : r(d, g, a, c)\n\n } function r(c, a, f, h) {\n\n var e = b(h); if (!e.data(\"blockUI.isBlocked\")) {\n\n c.each(function (a, b) { this.parentNode && this.parentNode.removeChild(this) });\n\n a && a.el && (a.el.style.display = a.display, a.el.style.position = a.position, a.parent && a.parent.appendChild(a.el), e.removeData(\"blockUI.history\")); e.data(\"blockUI.static\") && e.css(\"position\", \"static\"); if (\"function\" == typeof f.onUnblock) f.onUnblock(h, f); c = b(document.body); a = c.width(); f = c[0].style.width; c.width(a - 1).width(a); c[0].style.width = f\n\n }\n\n } function y(c, a, f) {\n\n var h = a == window; a = b(a); if (c || (!h || l) && (h || a.data(\"blockUI.isBlocked\"))) a.data(\"blockUI.isBlocked\", c), h && f.bindEvents && (!c || f.showOverlay) && (c ? b(document).bind(\"mousedown mouseup keydown keypress keyup touchstart touchend touchmove\",\n\n f, q) : b(document).unbind(\"mousedown mouseup keydown keypress keyup touchstart touchend touchmove\", q))\n\n } function q(c) {\n\n if (\"keydown\" === c.type && c.keyCode && 9 == c.keyCode && l && c.data.constrainTabKey) { var a = n, f = c.shiftKey && c.target === a[0]; if (!c.shiftKey && c.target === a[a.length - 1] || f) return setTimeout(function () { z(f) }, 10), !1 } var a = c.data, h = b(c.target); if (h.hasClass(\"blockOverlay\") && a.onOverlayClick) a.onOverlayClick(c); return 0 < h.parents(\"div.\" + a.blockMsgClass).length ? !0 : 0 === h.parents().children().filter(\"div.blockUI\").length\n\n }\n\n function z(b) {\n\n n && (b = n[!0 === b ? n.length - 1 : 0]) && b.focus()\n\n } function B(c, a, f) {\n\n var h = c.parentNode, e = c.style, g = (h.offsetWidth - c.offsetWidth) / 2 - (parseInt(b.css(h, \"borderLeftWidth\"), 10) || 0); c = (h.offsetHeight - c.offsetHeight) / 2 - (parseInt(b.css(h, \"borderTopWidth\"), 10) || 0); a && (e.left = 0 < g ? g + \"px\" : \"0\"); f && (e.top = 0 < c ? c + \"px\" : \"0\")\n\n } b.fn._fadeIn = b.fn.fadeIn; var u = b.noop || function () { }, t = /MSIE/.test(navigator.userAgent), v = /MSIE 6.0/.test(navigator.userAgent) && !/MSIE 8.0/.test(navigator.userAgent), A = b.isFunction(document.createElement(\"div\").style.setExpression);\n\n b.blockUI = function (b) {\n\n p(window, b)\n\n }; b.unblockUI = function (b) {\n\n s(window, b)\n\n }; b.growlUI = function (c, a, f, h) {\n\n var e = b('<div class=\"growlUI\"></div>'); c && e.append(\"<h1>\" + c + \"</h1>\"); a && e.append(\"<h2>\" + a + \"</h2>\"); void 0 === f && (f = 3E3); var g = function (a) {\n\n a = a || {}; b.blockUI({ message: e, fadeIn: \"undefined\" !== typeof a.fadeIn ? a.fadeIn : 700, fadeOut: \"undefined\" !== typeof a.fadeOut ? a.fadeOut : 1E3, timeout: \"undefined\" !== typeof a.timeout ? a.timeout : f, centerY: !1, showOverlay: !1, onUnblock: h, css: b.blockUI.defaults.growlCSS })\n\n }; g(); e.css(\"opacity\");\n\n e.mouseover(function () { g({ fadeIn: 0, timeout: 3E4 }); var a = b(\".blockMsg\"); a.stop(); a.fadeTo(300, 1) }).mouseout(function () { b(\".blockMsg\").fadeOut(1E3) })\n\n }; b.fn.block = function (c) {\n\n if (this[0] === window) return b.blockUI(c), this; var a = b.extend({}, b.blockUI.defaults, c || {}); this.each(function () { var c = b(this); a.ignoreIfBlocked && c.data(\"blockUI.isBlocked\") || c.unblock({ fadeOut: 0 }) }); return this.each(function () {\n\n \"static\" == b.css(this, \"position\") && (this.style.position = \"relative\", b(this).data(\"blockUI.static\", !0)); this.style.zoom =\n\n 1; p(this, c)\n\n })\n\n }; b.fn.unblock = function (c) {\n\n return this[0] === window ? (b.unblockUI(c), this) : this.each(function () { s(this, c) })\n\n }; b.blockUI.version = 2.66; b.blockUI.defaults = {\n\n message: \"<h1>Please wait...</h1>\", title: null, draggable: !0, theme: !1, css: {\n\n padding: 0, margin: 0, width: \"30%\", top: \"40%\", left: \"35%\", textAlign: \"center\", color: \"#000\", border: \"3px solid #aaa\", backgroundColor: \"#fff\", cursor: \"wait\"\n\n }, themedCSS: {\n\n width: \"30%\", top: \"40%\", left: \"35%\"\n\n }, overlayCSS: {\n\n backgroundColor: \"#000\", opacity: 0.6, cursor: \"wait\"\n\n }, cursorReset: \"default\",\n\n growlCSS: {\n\n width: \"350px\", top: \"10px\", left: \"\", right: \"10px\", border: \"none\", padding: \"5px\", opacity: 0.6, cursor: \"default\", color: \"#fff\", backgroundColor: \"#000\", \"-webkit-border-radius\": \"10px\", \"-moz-border-radius\": \"10px\", \"border-radius\": \"10px\"\n\n }, iframeSrc: /^https/i.test(window.location.href || \"\") ? \"javascript:false\" : \"about:blank\", forceIframe: !1, baseZ: 1E3, centerX: !0, centerY: !0, allowBodyStretch: !0, bindEvents: !0, constrainTabKey: !0, fadeIn: 200, fadeOut: 400, timeout: 0, showOverlay: !0, focusInput: !0, focusableElements: \":input:enabled:visible\",\n\n onBlock: null, onUnblock: null, onOverlayClick: null, quirksmodeOffsetHack: 4, blockMsgClass: \"blockMsg\", ignoreIfBlocked: !1\n\n }; var l = null, n = []\n\n } \"function\" === typeof define && define.amd && define.amd.jQuery ? define([\"jquery\"], p) : p(jQuery)\n\n })();\n\n \n\n \n\n /*\n\n \t\t * Match Heights jQuery Plugin\n\n \t\t * \n\n \t\t * Version 1.7.2 (Updated 7/31/2013)\n\n \t\t * Copyright (c) 2010-2013 Mike Avello\n\n \t\t * Dual licensed under the MIT and GPL licenses:\n\n \t\t * http://www.opensource.org/licenses/mit-license.php\n\n \t\t * http://www.gnu.org/licenses/gpl.html\n\n \t\t *\n\n \t\t */\n\n (function (d) { d.fn.matchHeights = function (a) { a = jQuery.extend(this, { minHeight: null, maxHeight: null, extension: 0, overflow: null, includeMargin: !1 }, a); var e = a.extension, b = a.minHeight ? a.minHeight : 0; this.each(function () { b = Math.max(b, d(this).outerHeight()) }); a.maxHeight && b > a.maxHeight && (b = a.maxHeight); return this.each(function () { var c = d(this), f = c.innerHeight() - c.height() + (c.outerHeight(a.includeMargin) - c.innerHeight()); a.overflow ? c.css({ height: b - f + e, overflow: a.overflow }) : c.css({ \"min-height\": b - f + e }) }) } })(jQuery);\n\n \n\n \n\n /*!\n\n * imagesLoaded PACKAGED v3.1.8\n\n * JavaScript is all like \"You images are done yet or what?\"\n\n * MIT License\n\n *\n\n * Hawk Note: Had to romove this line from the plguin to keep our encapsulation. var $ = window.jQuery;\n\n *\n\n */\n\n (function () { function e() { } function i(e, t) { var n = e.length; while (n--) { if (e[n].listener === t) { return n } } return -1 } function s(e) { return function () { return this[e].apply(this, arguments) } } var t = e.prototype; var n = this; var r = n.EventEmitter; t.getListeners = function (t) { var n = this._getEvents(); var r; var i; if (typeof t === \"object\") { r = {}; for (i in n) { if (n.hasOwnProperty(i) && t.test(i)) { r[i] = n[i] } } } else { r = n[t] || (n[t] = []) } return r }; t.flattenListeners = function (t) { var n = []; var r; for (r = 0; r < t.length; r += 1) { n.push(t[r].listener) } return n }; t.getListenersAsObject = function (t) { var n = this.getListeners(t); var r; if (n instanceof Array) { r = {}; r[t] = n } return r || n }; t.addListener = function (t, n) { var r = this.getListenersAsObject(t); var s = typeof n === \"object\"; var o; for (o in r) { if (r.hasOwnProperty(o) && i(r[o], n) === -1) { r[o].push(s ? n : { listener: n, once: false }) } } return this }; t.on = s(\"addListener\"); t.addOnceListener = function (t, n) { return this.addListener(t, { listener: n, once: true }) }; t.once = s(\"addOnceListener\"); t.defineEvent = function (t) { this.getListeners(t); return this }; t.defineEvents = function (t) { for (var n = 0; n < t.length; n += 1) { this.defineEvent(t[n]) } return this }; t.removeListener = function (t, n) { var r = this.getListenersAsObject(t); var s; var o; for (o in r) { if (r.hasOwnProperty(o)) { s = i(r[o], n); if (s !== -1) { r[o].splice(s, 1) } } } return this }; t.off = s(\"removeListener\"); t.addListeners = function (t, n) { return this.manipulateListeners(false, t, n) }; t.removeListeners = function (t, n) { return this.manipulateListeners(true, t, n) }; t.manipulateListeners = function (t, n, r) { var i; var s; var o = t ? this.removeListener : this.addListener; var u = t ? this.removeListeners : this.addListeners; if (typeof n === \"object\" && !(n instanceof RegExp)) { for (i in n) { if (n.hasOwnProperty(i) && (s = n[i])) { if (typeof s === \"function\") { o.call(this, i, s) } else { u.call(this, i, s) } } } } else { i = r.length; while (i--) { o.call(this, n, r[i]) } } return this }; t.removeEvent = function (t) { var n = typeof t; var r = this._getEvents(); var i; if (n === \"string\") { delete r[t] } else if (n === \"object\") { for (i in r) { if (r.hasOwnProperty(i) && t.test(i)) { delete r[i] } } } else { delete this._events } return this }; t.removeAllListeners = s(\"removeEvent\"); t.emitEvent = function (t, n) { var r = this.getListenersAsObject(t); var i; var s; var o; var u; for (o in r) { if (r.hasOwnProperty(o)) { s = r[o].length; while (s--) { i = r[o][s]; if (i.once === true) { this.removeListener(t, i.listener) } u = i.listener.apply(this, n || []); if (u === this._getOnceReturnValue()) { this.removeListener(t, i.listener) } } } } return this }; t.trigger = s(\"emitEvent\"); t.emit = function (t) { var n = Array.prototype.slice.call(arguments, 1); return this.emitEvent(t, n) }; t.setOnceReturnValue = function (t) { this._onceReturnValue = t; return this }; t._getOnceReturnValue = function () { if (this.hasOwnProperty(\"_onceReturnValue\")) { return this._onceReturnValue } else { return true } }; t._getEvents = function () { return this._events || (this._events = {}) }; e.noConflict = function () { n.EventEmitter = r; return e }; if (typeof define === \"function\" && define.amd) { define(\"eventEmitter/EventEmitter\", [], function () { return e }) } else if (typeof module === \"object\" && module.exports) { module.exports = e } else { this.EventEmitter = e } }).call(this); (function (e) { function r(t) { var n = e.event; n.target = n.target || n.srcElement || t; return n } var t = document.documentElement; var n = function () { }; if (t.addEventListener) { n = function (e, t, n) { e.addEventListener(t, n, false) } } else if (t.attachEvent) { n = function (e, t, n) { e[t + n] = n.handleEvent ? function () { var t = r(e); n.handleEvent.call(n, t) } : function () { var t = r(e); n.call(e, t) }; e.attachEvent(\"on\" + t, e[t + n]) } } var i = function () { }; if (t.removeEventListener) { i = function (e, t, n) { e.removeEventListener(t, n, false) } } else if (t.detachEvent) { i = function (e, t, n) { e.detachEvent(\"on\" + t, e[t + n]); try { delete e[t + n] } catch (r) { e[t + n] = undefined } } } var s = { bind: n, unbind: i }; if (typeof define === \"function\" && define.amd) { define(\"eventie/eventie\", s) } else { e.eventie = s } })(this); (function (e, t) { if (typeof define === \"function\" && define.amd) { define([\"eventEmitter/EventEmitter\", \"eventie/eventie\"], function (n, r) { return t(e, n, r) }) } else if (typeof exports === \"object\") { module.exports = t(e, require(\"wolfy87-eventemitter\"), require(\"eventie\")) } else { e.imagesLoaded = t(e, e.EventEmitter, e.eventie) } })(window, function (t, n, r) { function o(e, t) { for (var n in t) { e[n] = t[n] } return e } function a(e) { return u.call(e) === \"[object Array]\" } function f(e) { var t = []; if (a(e)) { t = e } else if (typeof e.length === \"number\") { for (var n = 0, r = e.length; n < r; n++) { t.push(e[n]) } } else { t.push(e) } return t } function l(e, t, n) { if (!(this instanceof l)) { return new l(e, t) } if (typeof e === \"string\") { e = document.querySelectorAll(e) } this.elements = f(e); this.options = o({}, this.options); if (typeof t === \"function\") { n = t } else { o(this.options, t) } if (n) { this.on(\"always\", n) } this.getImages(); if ($) { this.jqDeferred = new $.Deferred } var r = this; setTimeout(function () { r.check() }) } function c(e) { this.img = e } function p(e) { this.src = e; h[e] = this } var i = t.console; var s = typeof i !== \"undefined\"; var u = Object.prototype.toString; l.prototype = new n; l.prototype.options = {}; l.prototype.getImages = function () { this.images = []; for (var e = 0, t = this.elements.length; e < t; e++) { var n = this.elements[e]; if (n.nodeName === \"IMG\") { this.addImage(n) } var r = n.nodeType; if (!r || !(r === 1 || r === 9 || r === 11)) { continue } var i = n.querySelectorAll(\"img\"); for (var s = 0, o = i.length; s < o; s++) { var u = i[s]; this.addImage(u) } } }; l.prototype.addImage = function (e) { var t = new c(e); this.images.push(t) }; l.prototype.check = function () { function r(r, o) { if (e.options.debug && s) { i.log(\"confirm\", r, o) } e.progress(r); t++; if (t === n) { e.complete() } return true } var e = this; var t = 0; var n = this.images.length; this.hasAnyBroken = false; if (!n) { this.complete(); return } for (var o = 0; o < n; o++) { var u = this.images[o]; u.on(\"confirm\", r); u.check() } }; l.prototype.progress = function (e) { this.hasAnyBroken = this.hasAnyBroken || !e.isLoaded; var t = this; setTimeout(function () { t.emit(\"progress\", t, e); if (t.jqDeferred && t.jqDeferred.notify) { t.jqDeferred.notify(t, e) } }) }; l.prototype.complete = function () { var e = this.hasAnyBroken ? \"fail\" : \"done\"; this.isComplete = true; var t = this; setTimeout(function () { t.emit(e, t); t.emit(\"always\", t); if (t.jqDeferred) { var n = t.hasAnyBroken ? \"reject\" : \"resolve\"; t.jqDeferred[n](t) } }) }; if ($) { $.fn.imagesLoaded = function (e, t) { var n = new l(this, e, t); return n.jqDeferred.promise($(this)) } } c.prototype = new n; c.prototype.check = function () { var e = h[this.img.src] || new p(this.img.src); if (e.isConfirmed) { this.confirm(e.isLoaded, \"cached was confirmed\"); return } if (this.img.complete && this.img.naturalWidth !== undefined) { this.confirm(this.img.naturalWidth !== 0, \"naturalWidth\"); return } var t = this; e.on(\"confirm\", function (e, n) { t.confirm(e.isLoaded, n); return true }); e.check() }; c.prototype.confirm = function (e, t) { this.isLoaded = e; this.emit(\"confirm\", this, t) }; var h = {}; p.prototype = new n; p.prototype.check = function () { if (this.isChecked) { return } var e = new Image; r.bind(e, \"load\", this); r.bind(e, \"error\", this); e.src = this.src; this.isChecked = true }; p.prototype.handleEvent = function (e) { var t = \"on\" + e.type; if (this[t]) { this[t](e) } }; p.prototype.onload = function (e) { this.confirm(true, \"onload\"); this.unbindProxyEvents(e) }; p.prototype.onerror = function (e) { this.confirm(false, \"onerror\"); this.unbindProxyEvents(e) }; p.prototype.confirm = function (e, t) { this.isConfirmed = true; this.isLoaded = e; this.emit(\"confirm\", this, t) }; p.prototype.unbindProxyEvents = function (e) { r.unbind(e.target, \"load\", this); r.unbind(e.target, \"error\", this) }; return l })\n\n \n\n \n\n /*\n\n * jQuery cookie\n\n */\n\n HawkSearch.jQuery.cookie = function (name, value, options) {\n\n if (typeof value != 'undefined') { // name and value given, set cookie\n\n options = options || {\n\n };\n\n if (value === null) {\n\n value = '';\n\n options.expires = -1;\n\n }\n\n var expires = '';\n\n if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {\n\n var date;\n\n if (typeof options.expires == 'number') {\n\n date = new Date();\n\n date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));\n\n } else {\n\n date = options.expires;\n\n }\n\n expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE\n\n }\n\n // CAUTION: Needed to parenthesize options.path and options.domain\n\n // in the following expressions, otherwise they evaluate to undefined\n\n // in the packed version for some reason...\n\n var path = options.path ? '; path=' + (options.path) : '';\n\n var domain = options.domain ? '; domain=' + (options.domain) : '';\n\n var secure = options.secure ? '; secure' : '';\n\n document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');\n\n } else { // only name given, get cookie\n\n var cookieValue = null;\n\n if (document.cookie && document.cookie != '') {\n\n var cookies = document.cookie.split(';');\n\n for (var i = 0; i < cookies.length; i++) {\n\n var cookie = $.trim(cookies[i]);\n\n // Does this cookie string begin with the name we want?\n\n if (cookie.substring(0, name.length + 1) == (name + '=')) {\n\n cookieValue = decodeURIComponent(cookie.substring(name.length + 1));\n\n break;\n\n }\n\n }\n\n }\n\n return cookieValue;\n\n }\n\n };\n\n \n\n \n\n // register indexOf() method if browser does not natively support it\n\n // this algorithm is exactly as specified in ECMA-262 standard, 5th edition, assuming Object, TypeError, Number, Math.floor, Math.abs, and Math.max have their original value. \n\n // see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf for more details\n\n if (!Array.prototype.indexOf) {\n\n Array.prototype.indexOf = function (searchElement /*, fromIndex */) {\n\n \"use strict\";\n\n if (this == null) {\n\n throw new TypeError();\n\n }\n\n var t = Object(this);\n\n var len = t.length >>> 0;\n\n if (len === 0) {\n\n return -1;\n\n }\n\n var n = 0;\n\n if (arguments.length > 0) {\n\n n = Number(arguments[1]);\n\n if (n != n) { // shortcut for verifying if it's NaN\n\n n = 0;\n\n } else if (n != 0 && n != Infinity && n != -Infinity) {\n\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n\n }\n\n }\n\n if (n >= len) {\n\n return -1;\n\n }\n\n var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n\n for (; k < len; k++) {\n\n if (k in t && t[k] === searchElement) {\n\n return k;\n\n }\n\n }\n\n return -1;\n\n }\n\n };\n\n \n\n // if bootstrap3 is already on the site, do not load this bootstrap.\n\n if (!bootstrap3_enabled) {\n\n log(\"Loading: local bootstrap\");\n\n \n\n /**\n\n * Bootstrap.js by @fat & @mdo\n\n * plugins: bootstrap-modal.js, bootstrap-tooltip.js, bootstrap-popover.js\n\n * Copyright 2013 Twitter, Inc.\n\n * http://www.apache.org/licenses/LICENSE-2.0.txt\n\n */\n\n !function (a) { var b = function (b, c) { this.options = c, this.$element = a(b).delegate('[data-dismiss=\"modal\"]', \"click.dismiss.modal\", a.proxy(this.hide, this)), this.options.remote && this.$element.find(\".modal-body\").load(this.options.remote) }; b.prototype = { constructor: b, toggle: function () { return this[this.isShown ? \"hide\" : \"show\"]() }, show: function () { var b = this, c = a.Event(\"show\"); this.$element.trigger(c); if (this.isShown || c.isDefaultPrevented()) return; this.isShown = !0, this.escape(), this.backdrop(function () { var c = a.support.transition && b.$element.hasClass(\"fade\"); b.$element.parent().length || b.$element.appendTo(document.body), b.$element.show(), c && b.$element[0].offsetWidth, b.$element.addClass(\"in\").attr(\"aria-hidden\", !1), b.enforceFocus(), c ? b.$element.one(a.support.transition.end, function () { b.$element.focus().trigger(\"shown\") }) : b.$element.focus().trigger(\"shown\") }) }, hide: function (b) { b && b.preventDefault(); var c = this; b = a.Event(\"hide\"), this.$element.trigger(b); if (!this.isShown || b.isDefaultPrevented()) return; this.isShown = !1, this.escape(), a(document).off(\"focusin.modal\"), this.$element.removeClass(\"in\").attr(\"aria-hidden\", !0), a.support.transition && this.$element.hasClass(\"fade\") ? this.hideWithTransition() : this.hideModal() }, enforceFocus: function () { var b = this; a(document).on(\"focusin.modal\", function (a) { b.$element[0] !== a.target && !b.$element.has(a.target).length && b.$element.focus() }) }, escape: function () { var a = this; this.isShown && this.options.keyboard ? this.$element.on(\"keyup.dismiss.modal\", function (b) { b.which == 27 && a.hide() }) : this.isShown || this.$element.off(\"keyup.dismiss.modal\") }, hideWithTransition: function () { var b = this, c = setTimeout(function () { b.$element.off(a.support.transition.end), b.hideModal() }, 500); this.$element.one(a.support.transition.end, function () { clearTimeout(c), b.hideModal() }) }, hideModal: function () { var a = this; this.$element.hide(), this.backdrop(function () { a.removeBackdrop(), a.$element.trigger(\"hidden\") }) }, removeBackdrop: function () { this.$backdrop && this.$backdrop.remove(), this.$backdrop = null }, backdrop: function (b) { var c = this, d = this.$element.hasClass(\"fade\") ? \"fade\" : \"\"; if (this.isShown && this.options.backdrop) { var e = a.support.transition && d; this.$backdrop = a('<div class=\"modal-backdrop ' + d + '\" />').appendTo(document.body), this.$backdrop.click(this.options.backdrop == \"static\" ? a.proxy(this.$element[0].focus, this.$element[0]) : a.proxy(this.hide, this)), e && this.$backdrop[0].offsetWidth, this.$backdrop.addClass(\"in\"); if (!b) return; e ? this.$backdrop.one(a.support.transition.end, b) : b() } else !this.isShown && this.$backdrop ? (this.$backdrop.removeClass(\"in\"), a.support.transition && this.$element.hasClass(\"fade\") ? this.$backdrop.one(a.support.transition.end, b) : b()) : b && b() } }; var c = a.fn.modal; a.fn.modal = function (c) { return this.each(function () { var d = a(this), e = d.data(\"modal\"), f = a.extend({}, a.fn.modal.defaults, d.data(), typeof c == \"object\" && c); e || d.data(\"modal\", e = new b(this, f)), typeof c == \"string\" ? e[c]() : f.show && e.show() }) }, a.fn.modal.defaults = { backdrop: !0, keyboard: !0, show: !0 }, a.fn.modal.Constructor = b, a.fn.modal.noConflict = function () { return a.fn.modal = c, this }, a(document).on(\"click.modal.data-api\", '[data-toggle=\"modal\"]', function (b) { var c = a(this), d = c.attr(\"href\"), e = a(c.attr(\"data-target\") || d && d.replace(/.*(?=#[^\\s]+$)/, \"\")), f = e.data(\"modal\") ? \"toggle\" : a.extend({ remote: !/#/.test(d) && d }, e.data(), c.data()); b.preventDefault(), e.modal(f).one(\"hide\", function () { c.focus() }) }) }(jQuery), !function (a) { var b = function (a, b) { this.init(\"tooltip\", a, b) }; b.prototype = { constructor: b, init: function (b, c, d) { var e, f, g, h, i; this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.enabled = !0, g = this.options.trigger.split(\" \"); for (i = g.length; i--;) h = g[i], h == \"click\" ? this.$element.on(\"click.\" + this.type, this.options.selector, a.proxy(this.toggle, this)) : h != \"manual\" && (e = h == \"hover\" ? \"mouseenter\" : \"focus\", f = h == \"hover\" ? \"mouseleave\" : \"blur\", this.$element.on(e + \".\" + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(f + \".\" + this.type, this.options.selector, a.proxy(this.leave, this))); this.options.selector ? this._options = a.extend({}, this.options, { trigger: \"manual\", selector: \"\" }) : this.fixTitle() }, getOptions: function (b) { return b = a.extend({}, a.fn[this.type].defaults, this.$element.data(), b), b.delay && typeof b.delay == \"number\" && (b.delay = { show: b.delay, hide: b.delay }), b }, enter: function (b) { var c = a.fn[this.type].defaults, d = {}, e; this._options && a.each(this._options, function (a, b) { c[a] != b && (d[a] = b) }, this), e = a(b.currentTarget)[this.type](d).data(this.type); if (!e.options.delay || !e.options.delay.show) return e.show(); clearTimeout(this.timeout), e.hoverState = \"in\", this.timeout = setTimeout(function () { e.hoverState == \"in\" && e.show() }, e.options.delay.show) }, leave: function (b) { var c = a(b.currentTarget)[this.type](this._options).data(this.type); this.timeout && clearTimeout(this.timeout); if (!c.options.delay || !c.options.delay.hide) return c.hide(); c.hoverState = \"out\", this.timeout = setTimeout(function () { c.hoverState == \"out\" && c.hide() }, c.options.delay.hide) }, show: function () { var b, c, d, e, f, g, h = a.Event(\"show\"); if (this.hasContent() && this.enabled) { this.$element.trigger(h); if (h.isDefaultPrevented()) return; b = this.tip(), this.setContent(), this.options.animation && b.addClass(\"fade\"), f = typeof this.options.placement == \"function\" ? this.options.placement.call(this, b[0], this.$element[0]) : this.options.placement, b.detach().css({ top: 0, left: 0, display: \"block\" }), this.options.container ? b.appendTo(this.options.container) : b.insertAfter(this.$element), c = this.getPosition(), d = b[0].offsetWidth, e = b[0].offsetHeight; switch (f) { case \"bottom\": g = { top: c.top + c.height, left: c.left + c.width / 2 - d / 2 }; break; case \"top\": g = { top: c.top - e, left: c.left + c.width / 2 - d / 2 }; break; case \"left\": g = { top: c.top + c.height / 2 - e / 2, left: c.left - d }; break; case \"right\": g = { top: c.top + c.height / 2 - e / 2, left: c.left + c.width } } this.applyPlacement(g, f), this.$element.trigger(\"shown\") } }, applyPlacement: function (a, b) { var c = this.tip(), d = c[0].offsetWidth, e = c[0].offsetHeight, f, g, h, i; c.offset(a).addClass(b).addClass(\"in\"), f = c[0].offsetWidth, g = c[0].offsetHeight, b == \"top\" && g != e && (a.top = a.top + e - g, i = !0), b == \"bottom\" || b == \"top\" ? (h = 0, a.left < 0 && (h = a.left * -2, a.left = 0, c.offset(a), f = c[0].offsetWidth, g = c[0].offsetHeight), this.replaceArrow(h - d + f, f, \"left\")) : this.replaceArrow(g - e, g, \"top\"), i && c.offset(a) }, replaceArrow: function (a, b, c) { this.arrow().css(c, a ? 50 * (1 - a / b) + \"%\" : \"\") }, setContent: function () { var a = this.tip(), b = this.getTitle(); a.find(\".tooltip-inner\")[this.options.html ? \"html\" : \"text\"](b), a.removeClass(\"fade in top bottom left right\") }, hide: function () { function e() { var b = setTimeout(function () { c.off(a.support.transition.end).detach() }, 500); c.one(a.support.transition.end, function () { clearTimeout(b), c.detach() }) } var b = this, c = this.tip(), d = a.Event(\"hide\"); this.$element.trigger(d); if (d.isDefaultPrevented()) return; return c.removeClass(\"in\"), a.support.transition && this.$tip.hasClass(\"fade\") ? e() : c.detach(), this.$element.trigger(\"hidden\"), this }, fixTitle: function () { var a = this.$element; (a.attr(\"title\") || typeof a.attr(\"data-original-title\") != \"string\") && a.attr(\"data-original-title\", a.attr(\"title\") || \"\").attr(\"title\", \"\") }, hasContent: function () { return this.getTitle() }, getPosition: function () { var b = this.$element[0]; return a.extend({}, typeof b.getBoundingClientRect == \"function\" ? b.getBoundingClientRect() : { width: b.offsetWidth, height: b.offsetHeight }, this.$element.offset()) }, getTitle: function () { var a, b = this.$element, c = this.options; return a = b.attr(\"data-original-title\") || (typeof c.title == \"function\" ? c.title.call(b[0]) : c.title), a }, tip: function () { return this.$tip = this.$tip || a(this.options.template) }, arrow: function () { return this.$arrow = this.$arrow || this.tip().find(\".tooltip-arrow\") }, validate: function () { this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null) }, enable: function () { this.enabled = !0 }, disable: function () { this.enabled = !1 }, toggleEnabled: function () { this.enabled = !this.enabled }, toggle: function (b) { var c = b ? a(b.currentTarget)[this.type](this._options).data(this.type) : this; c.tip().hasClass(\"in\") ? c.hide() : c.show() }, destroy: function () { this.hide().$element.off(\".\" + this.type).removeData(this.type) } }; var c = a.fn.tooltip; a.fn.tooltip = function (c) { return this.each(function () { var d = a(this), e = d.data(\"tooltip\"), f = typeof c == \"object\" && c; e || d.data(\"tooltip\", e = new b(this, f)), typeof c == \"string\" && e[c]() }) }, a.fn.tooltip.Constructor = b, a.fn.tooltip.defaults = { animation: !0, placement: \"top\", selector: !1, template: '<div class=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>', trigger: \"hover focus\", title: \"\", delay: 0, html: !1, container: !1 }, a.fn.tooltip.noConflict = function () { return a.fn.tooltip = c, this } }(jQuery), !function (e) { \"use strict\"; var t = function (t, n) { this.$element = e(t), this.options = e.extend({}, e.fn.collapse.defaults, n), this.options.parent && (this.$parent = e(this.options.parent)), this.options.toggle && this.toggle() }; t.prototype = { constructor: t, dimension: function () { var e = this.$element.hasClass(\"width\"); return e ? \"width\" : \"height\" }, show: function () { var t, n, r, i; if (this.transitioning || this.$element.hasClass(\"in\")) return; t = this.dimension(), n = e.camelCase([\"scroll\", t].join(\"-\")), r = this.$parent && this.$parent.find(\"> .accordion-group > .in\"); if (r && r.length) { i = r.data(\"collapse\"); if (i && i.transitioning) return; r.collapse(\"hide\"), i || r.data(\"collapse\", null) } this.$element[t](0), this.transition(\"addClass\", e.Event(\"show\"), \"shown\"), e.support.transition && this.$element[t](this.$element[0][n]) }, hide: function () { var t; if (this.transitioning || !this.$element.hasClass(\"in\")) return; t = this.dimension(), this.reset(this.$element[t]()), this.transition(\"removeClass\", e.Event(\"hide\"), \"hidden\"), this.$element[t](0) }, reset: function (e) { var t = this.dimension(); return this.$element.removeClass(\"collapse\")[t](e || \"auto\")[0].offsetWidth, this.$element[e !== null ? \"addClass\" : \"removeClass\"](\"collapse\"), this }, transition: function (t, n, r) { var i = this, s = function () { n.type == \"show\" && i.reset(), i.transitioning = 0, i.$element.trigger(r) }; this.$element.trigger(n); if (n.isDefaultPrevented()) return; this.transitioning = 1, this.$element[t](\"in\"), e.support.transition && this.$element.hasClass(\"collapse\") ? this.$element.one(e.support.transition.end, s) : s() }, toggle: function () { this[this.$element.hasClass(\"in\") ? \"hide\" : \"show\"]() } }; var n = e.fn.collapse; e.fn.collapse = function (n) { return this.each(function () { var r = e(this), i = r.data(\"collapse\"), s = e.extend({}, e.fn.collapse.defaults, r.data(), typeof n == \"object\" && n); i || r.data(\"collapse\", i = new t(this, s)), typeof n == \"string\" && i[n]() }) }, e.fn.collapse.defaults = { toggle: !0 }, e.fn.collapse.Constructor = t, e.fn.collapse.noConflict = function () { return e.fn.collapse = n, this }, e(document).on(\"click.collapse.data-api\", \"[data-toggle=collapse]\", function (t) { var n = e(this), r, i = n.attr(\"data-target\") || t.preventDefault() || (r = n.attr(\"href\")) && r.replace(/.*(?=#[^\\s]+$)/, \"\"), s = e(i).data(\"collapse\") ? \"toggle\" : n.data(); n[e(i).hasClass(\"in\") ? \"addClass\" : \"removeClass\"](\"collapsed\"), e(i).collapse(s) }) }(jQuery), !function (a) { var b = function (a, b) { this.init(\"popover\", a, b) }; b.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype, { constructor: b, setContent: function () { var a = this.tip(), b = this.getTitle(), c = this.getContent(); a.find(\".popover-title\")[this.options.html ? \"html\" : \"text\"](b), a.find(\".popover-content\")[this.options.html ? \"html\" : \"text\"](c), a.removeClass(\"fade top bottom left right in\") }, hasContent: function () { return this.getTitle() || this.getContent() }, getContent: function () { var a, b = this.$element, c = this.options; return a = (typeof c.content == \"function\" ? c.content.call(b[0]) : c.content) || b.attr(\"data-content\"), a }, tip: function () { return this.$tip || (this.$tip = a(this.options.template)), this.$tip }, destroy: function () { this.hide().$element.off(\".\" + this.type).removeData(this.type) } }); var c = a.fn.popover; a.fn.popover = function (c) { return this.each(function () { var d = a(this), e = d.data(\"popover\"), f = typeof c == \"object\" && c; e || d.data(\"popover\", e = new b(this, f)), typeof c == \"string\" && e[c]() }) }, a.fn.popover.Constructor = b, a.fn.popover.defaults = a.extend({}, a.fn.tooltip.defaults, { placement: \"right\", trigger: \"click\", content: \"\", template: '<div class=\"popover\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>' }), a.fn.popover.noConflict = function () { return a.fn.popover = c, this } }(HawkSearch.jQuery)\n\n }\n\n \n\n /* ========================================================================\n\n \t\t * Bootstrap: tooltip.js v3.3.4\n\n \t\t * http://getbootstrap.com/javascript/#tooltip\n\n \t\t * Inspired by the original jQuery.tipsy by Jason Frame\n\n \t\t * ========================================================================\n\n \t\t * Copyright 2011-2015 Twitter, Inc.\n\n \t\t * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n\n \t\t * ======================================================================== */\n\n +function (e) {\n\n var d = function (b, a) {\n\n this.$element = this.hoverState = this.timeout = this.enabled = this.options = this.type = null; this.init(\"tooltip\", b, a)\n\n }; d.VERSION = \"3.3.4\"; d.TRANSITION_DURATION = 150; d.DEFAULTS = {\n\n animation: !0, placement: \"top\", selector: !1, template: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>', trigger: \"hover focus\", title: \"\", delay: 0, html: !1, container: !1, viewport: { selector: \"body\", padding: 0 }\n\n }; d.prototype.init = function (b, a, c) {\n\n this.enabled =\n\n !0; this.type = b; this.$element = e(a); this.options = this.getOptions(c); this.$viewport = this.options.viewport && e(this.options.viewport.selector || this.options.viewport); if (this.$element[0] instanceof document.constructor && !this.options.selector) throw Error(\"`selector` option must be specified when initializing \" + this.type + \" on the window.document object!\"); b = this.options.trigger.split(\" \"); for (a = b.length; a--;) if (c = b[a], \"click\" == c) this.$element.on(\"click.\" + this.type, this.options.selector, e.proxy(this.toggle,\n\n this)); else if (\"manual\" != c) {\n\n var f = \"hover\" == c ? \"mouseleave\" : \"focusout\"; this.$element.on((\"hover\" == c ? \"mouseenter\" : \"focusin\") + \".\" + this.type, this.options.selector, e.proxy(this.enter, this)); this.$element.on(f + \".\" + this.type, this.options.selector, e.proxy(this.leave, this))\n\n } this.options.selector ? this._options = e.extend({}, this.options, { trigger: \"manual\", selector: \"\" }) : this.fixTitle()\n\n }; d.prototype.getDefaults = function () {\n\n return d.DEFAULTS\n\n }; d.prototype.getOptions = function (b) {\n\n b = e.extend({\n\n }, this.getDefaults(), this.$element.data(),\n\n b); b.delay && \"number\" == typeof b.delay && (b.delay = { show: b.delay, hide: b.delay }); return b\n\n }; d.prototype.getDelegateOptions = function () {\n\n var b = {}, a = this.getDefaults(); this._options && e.each(this._options, function (c, f) { a[c] != f && (b[c] = f) }); return b\n\n }; d.prototype.enter = function (b) {\n\n var a = b instanceof this.constructor ? b : e(b.currentTarget).data(\"bs.\" + this.type); if (a && a.$tip && a.$tip.is(\":visible\")) a.hoverState = \"in\"; else {\n\n a || (a = new this.constructor(b.currentTarget, this.getDelegateOptions()), e(b.currentTarget).data(\"bs.\" +\n\n this.type, a)); clearTimeout(a.timeout); a.hoverState = \"in\"; if (!a.options.delay || !a.options.delay.show) return a.show(); a.timeout = setTimeout(function () { \"in\" == a.hoverState && a.show() }, a.options.delay.show)\n\n }\n\n }; d.prototype.leave = function (b) {\n\n var a = b instanceof this.constructor ? b : e(b.currentTarget).data(\"bs.\" + this.type); a || (a = new this.constructor(b.currentTarget, this.getDelegateOptions()), e(b.currentTarget).data(\"bs.\" + this.type, a)); clearTimeout(a.timeout); a.hoverState = \"out\"; if (!a.options.delay || !a.options.delay.hide) return a.hide();\n\n a.timeout = setTimeout(function () { \"out\" == a.hoverState && a.hide() }, a.options.delay.hide)\n\n }; d.prototype.show = function () {\n\n var b = e.Event(\"show.bs.\" + this.type); if (this.hasContent() && this.enabled) {\n\n this.$element.trigger(b); var a = e.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]); if (!b.isDefaultPrevented() && a) {\n\n var c = this, b = this.tip(), a = this.getUID(this.type); this.setContent(); b.attr(\"id\", a); this.$element.attr(\"aria-describedby\", a); this.options.animation && b.addClass(\"fade\"); var a = \"function\" ==\n\n typeof this.options.placement ? this.options.placement.call(this, b[0], this.$element[0]) : this.options.placement, f = /\\s?auto?\\s?/i, l = f.test(a); l && (a = a.replace(f, \"\") || \"top\"); b.detach().css({ top: 0, left: 0, display: \"block\" }).addClass(a).data(\"bs.\" + this.type, this); this.options.container ? b.appendTo(this.options.container) : b.insertAfter(this.$element); var f = this.getPosition(), h = b[0].offsetWidth, g = b[0].offsetHeight; if (l) {\n\n var l = a, k = this.options.container ? e(this.options.container) : this.$element.parent(), k = this.getPosition(k),\n\n a = \"bottom\" == a && f.bottom + g > k.bottom ? \"top\" : \"top\" == a && f.top - g < k.top ? \"bottom\" : \"right\" == a && f.right + h > k.width ? \"left\" : \"left\" == a && f.left - h < k.left ? \"right\" : a; b.removeClass(l).addClass(a)\n\n } f = this.getCalculatedOffset(a, f, h, g); this.applyPlacement(f, a); a = function () {\n\n var a = c.hoverState; c.$element.trigger(\"shown.bs.\" + c.type); c.hoverState = null; \"out\" == a && c.leave(c)\n\n }; e.support.transition && this.$tip.hasClass(\"fade\") ? b.one(\"bsTransitionEnd\", a).emulateTransitionEnd(d.TRANSITION_DURATION) : a()\n\n }\n\n }\n\n }; d.prototype.applyPlacement =\n\n function (b, a) {\n\n var c = this.tip(), f = c[0].offsetWidth, d = c[0].offsetHeight, h = parseInt(c.css(\"margin-top\"), 10), g = parseInt(c.css(\"margin-left\"), 10); isNaN(h) && (h = 0); isNaN(g) && (g = 0); b.top += h; b.left += g; e.offset.setOffset(c[0], e.extend({ using: function (a) { c.css({ top: Math.round(a.top), left: Math.round(a.left) }) } }, b), 0); c.addClass(\"in\"); var g = c[0].offsetWidth, k = c[0].offsetHeight; \"top\" == a && k != d && (b.top = b.top + d - k); var m = this.getViewportAdjustedDelta(a, b, g, k); m.left ? b.left += m.left : b.top += m.top; f = (h = /top|bottom/.test(a)) ?\n\n 2 * m.left - f + g : 2 * m.top - d + k; d = h ? \"offsetWidth\" : \"offsetHeight\"; c.offset(b); this.replaceArrow(f, c[0][d], h)\n\n }; d.prototype.replaceArrow = function (b, a, c) {\n\n this.arrow().css(c ? \"left\" : \"top\", 50 * (1 - b / a) + \"%\").css(c ? \"top\" : \"left\", \"\")\n\n }; d.prototype.setContent = function () {\n\n var b = this.tip(), a = this.getTitle(); b.find(\".tooltip-inner\")[this.options.html ? \"html\" : \"text\"](a); b.removeClass(\"fade in top bottom left right\")\n\n }; d.prototype.hide = function (b) {\n\n function a() {\n\n \"in\" != c.hoverState && f.detach(); c.$element.removeAttr(\"aria-describedby\").trigger(\"hidden.bs.\" +\n\n c.type); b && b()\n\n } var c = this, f = e(this.$tip), l = e.Event(\"hide.bs.\" + this.type); this.$element.trigger(l); if (!l.isDefaultPrevented()) return f.removeClass(\"in\"), e.support.transition && f.hasClass(\"fade\") ? f.one(\"bsTransitionEnd\", a).emulateTransitionEnd(d.TRANSITION_DURATION) : a(), this.hoverState = null, this\n\n }; d.prototype.fixTitle = function () {\n\n var b = this.$element; (b.attr(\"title\") || \"string\" != typeof b.attr(\"data-original-title\")) && b.attr(\"data-original-title\", b.attr(\"title\") || \"\").attr(\"title\", \"\")\n\n }; d.prototype.hasContent =\n\n function () {\n\n return this.getTitle()\n\n }; d.prototype.getPosition = function (b) {\n\n b = b || this.$element; var a = b[0], c = \"BODY\" == a.tagName, a = a.getBoundingClientRect(); null == a.width && (a = e.extend({}, a, { width: a.right - a.left, height: a.bottom - a.top })); var d = c ? { top: 0, left: 0 } : b.offset(); b = { scroll: c ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop() }; c = c ? { width: e(window).width(), height: e(window).height() } : null; return e.extend({}, a, b, c, d)\n\n }; d.prototype.getCalculatedOffset = function (b, a, c, d) {\n\n return \"bottom\" ==\n\n b ? { top: a.top + a.height, left: a.left + a.width / 2 - c / 2 } : \"top\" == b ? { top: a.top - d, left: a.left + a.width / 2 - c / 2 } : \"left\" == b ? { top: a.top + a.height / 2 - d / 2, left: a.left - c } : {\n\n top: a.top + a.height / 2 - d / 2, left: a.left + a.width\n\n }\n\n }; d.prototype.getViewportAdjustedDelta = function (b, a, c, d) {\n\n var e = {\n\n top: 0, left: 0\n\n }; if (!this.$viewport) return e; var h = this.options.viewport && this.options.viewport.padding || 0, g = this.getPosition(this.$viewport); /right|left/.test(b) ? (c = a.top - h - g.scroll, a = a.top + h - g.scroll + d, c < g.top ? e.top = g.top - c : a > g.top + g.height && (e.top =\n\n g.top + g.height - a)) : (d = a.left - h, a = a.left + h + c, d < g.left ? e.left = g.left - d : a > g.width && (e.left = g.left + g.width - a)); return e\n\n }; d.prototype.getTitle = function () {\n\n var b = this.$element, a = this.options; return b.attr(\"data-original-title\") || (\"function\" == typeof a.title ? a.title.call(b[0]) : a.title)\n\n }; d.prototype.getUID = function (b) {\n\n do b += ~~(1E6 * Math.random()); while (document.getElementById(b)); return b\n\n }; d.prototype.tip = function () {\n\n return this.$tip = this.$tip || e(this.options.template)\n\n }; d.prototype.arrow = function () {\n\n return this.$arrow =\n\n this.$arrow || this.tip().find(\".tooltip-arrow\")\n\n }; d.prototype.enable = function () {\n\n this.enabled = !0\n\n }; d.prototype.disable = function () {\n\n this.enabled = !1\n\n }; d.prototype.toggleEnabled = function () {\n\n this.enabled = !this.enabled\n\n }; d.prototype.toggle = function (b) {\n\n var a = this; b && (a = e(b.currentTarget).data(\"bs.\" + this.type), a || (a = new this.constructor(b.currentTarget, this.getDelegateOptions()), e(b.currentTarget).data(\"bs.\" + this.type, a))); a.tip().hasClass(\"in\") ? a.leave(a) : a.enter(a)\n\n }; d.prototype.destroy = function () {\n\n var b = this; clearTimeout(this.timeout);\n\n this.hide(function () { b.$element.off(\".\" + b.type).removeData(\"bs.\" + b.type) })\n\n }; var n = e.fn.tooltip; e.fn.tooltip = function (b) {\n\n return this.each(function () { var a = e(this), c = a.data(\"bs.tooltip\"), f = \"object\" == typeof b && b; if (c || !/destroy|hide/.test(b)) if (c || a.data(\"bs.tooltip\", c = new d(this, f)), \"string\" == typeof b) c[b]() })\n\n }; e.fn.tooltip.Constructor = d; e.fn.tooltip.noConflict = function () {\n\n e.fn.tooltip = n; return this\n\n }\n\n }(jQuery);\n\n \n\n \n\n /* ========================================================================\n\n \t\t * Bootstrap: popover.js v3.3.4\n\n \t\t * http://getbootstrap.com/javascript/#popovers\n\n \t\t * ========================================================================\n\n \t\t * Copyright 2011-2015 Twitter, Inc.\n\n \t\t * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n\n \t\t * ======================================================================== */\n\n +function (b) {\n\n var a = function (c, a) {\n\n this.init(\"popover\", c, a)\n\n }; if (!b.fn.tooltip) throw Error(\"Popover requires tooltip.js\"); a.VERSION = \"3.3.4\"; a.DEFAULTS = b.extend({}, b.fn.tooltip.Constructor.DEFAULTS, { placement: \"right\", trigger: \"click\", content: \"\", template: '<div class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>' }); a.prototype = b.extend({}, b.fn.tooltip.Constructor.prototype); a.prototype.constructor = a; a.prototype.getDefaults = function () {\n\n return a.DEFAULTS\n\n };\n\n a.prototype.setContent = function () {\n\n var c = this.tip(), a = this.getTitle(), b = this.getContent(); c.find(\".popover-title\")[this.options.html ? \"html\" : \"text\"](a); c.find(\".popover-content\").children().detach().end()[this.options.html ? \"string\" == typeof b ? \"html\" : \"append\" : \"text\"](b); c.removeClass(\"fade top bottom left right in\"); c.find(\".popover-title\").html() || c.find(\".popover-title\").hide()\n\n }; a.prototype.hasContent = function () {\n\n return this.getTitle() || this.getContent()\n\n }; a.prototype.getContent = function () {\n\n var a = this.$element,\n\n b = this.options; return a.attr(\"data-content\") || (\"function\" == typeof b.content ? b.content.call(a[0]) : b.content)\n\n }; a.prototype.arrow = function () {\n\n return this.$arrow = this.$arrow || this.tip().find(\".arrow\")\n\n }; var e = b.fn.popover; b.fn.popover = function (c) {\n\n return this.each(function () { var f = b(this), d = f.data(\"bs.popover\"), e = \"object\" == typeof c && c; if (d || !/destroy|hide/.test(c)) if (d || f.data(\"bs.popover\", d = new a(this, e)), \"string\" == typeof c) d[c]() })\n\n }; b.fn.popover.Constructor = a; b.fn.popover.noConflict = function () {\n\n b.fn.popover =\n\n e; return this\n\n }\n\n }(jQuery);\n\n \n\n \n\n /**\n\n * bootbox.js v4.2.0\n\n *\n\n * http://bootboxjs.com/license.txt\n\n */\n\n !function (a, b) { \"use strict\"; \"function\" == typeof define && define.amd ? define([\"jquery\"], b) : \"object\" == typeof exports ? module.exports = b(require(\"jquery\")) : HawkSearch.bootbox = b(HawkSearch.jQuery) }(this, function a(b, c) { \"use strict\"; function d(a) { var b = q[o.locale]; return b ? b[a] : q.en[a] } function e(a, c, d) { a.stopPropagation(), a.preventDefault(); var e = b.isFunction(d) && d(a) === !1; e || c.modal(\"hide\") } function f(a) { var b, c = 0; for (b in a) c++; return c } function g(a, c) { var d = 0; b.each(a, function (a, b) { c(a, b, d++) }) } function h(a) { var c, d; if (\"object\" != typeof a) throw new Error(\"Please supply an object of options\"); if (!a.message) throw new Error(\"Please specify a message\"); return a = b.extend({}, o, a), a.buttons || (a.buttons = {}), a.backdrop = a.backdrop ? \"static\" : !1, c = a.buttons, d = f(c), g(c, function (a, e, f) { if (b.isFunction(e) && (e = c[a] = { callback: e }), \"object\" !== b.type(e)) throw new Error(\"button with key \" + a + \" must be an object\"); e.label || (e.label = a), e.className || (e.className = 2 >= d && f === d - 1 ? \"btn-primary\" : \"btn-default\") }), a } function i(a, b) { var c = a.length, d = {}; if (1 > c || c > 2) throw new Error(\"Invalid argument length\"); return 2 === c || \"string\" == typeof a[0] ? (d[b[0]] = a[0], d[b[1]] = a[1]) : d = a[0], d } function j(a, c, d) { return b.extend(!0, {}, a, i(c, d)) } function k(a, b, c, d) { var e = { className: \"bootbox-\" + a, buttons: l.apply(null, b) }; return m(j(e, d, c), b) } function l() { for (var a = {}, b = 0, c = arguments.length; c > b; b++) { var e = arguments[b], f = e.toLowerCase(), g = e.toUpperCase(); a[f] = { label: d(g) } } return a } function m(a, b) { var d = {}; return g(b, function (a, b) { d[b] = !0 }), g(a.buttons, function (a) { if (d[a] === c) throw new Error(\"button key \" + a + \" is not allowed (options are \" + b.join(\"\\n\") + \")\") }), a } var n = { dialog: \"<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>\", header: \"<div class='modal-header'><h4 class='modal-title'></h4></div>\", footer: \"<div class='modal-footer'></div>\", closeButton: \"<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>&times;</button>\", form: \"<form class='bootbox-form'></form>\", inputs: { text: \"<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />\", textarea: \"<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>\", email: \"<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />\", select: \"<select class='bootbox-input bootbox-input-select form-control'></select>\", checkbox: \"<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>\", date: \"<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />\", time: \"<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />\", number: \"<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />\", password: \"<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />\" } }, o = { locale: \"en\", backdrop: !0, animate: !0, className: null, closeButton: !0, show: !0, container: \"body\" }, p = {}; p.alert = function () { var a; if (a = k(\"alert\", [\"ok\"], [\"message\", \"callback\"], arguments), a.callback && !b.isFunction(a.callback)) throw new Error(\"alert requires callback property to be a function when provided\"); return a.buttons.ok.callback = a.onEscape = function () { return b.isFunction(a.callback) ? a.callback() : !0 }, p.dialog(a) }, p.confirm = function () { var a; if (a = k(\"confirm\", [\"cancel\", \"confirm\"], [\"message\", \"callback\"], arguments), a.buttons.cancel.callback = a.onEscape = function () { return a.callback(!1) }, a.buttons.confirm.callback = function () { return a.callback(!0) }, !b.isFunction(a.callback)) throw new Error(\"confirm requires a callback\"); return p.dialog(a) }, p.prompt = function () { var a, d, e, f, h, i, k; f = b(n.form), d = { className: \"bootbox-prompt\", buttons: l(\"cancel\", \"confirm\"), value: \"\", inputType: \"text\" }, a = m(j(d, arguments, [\"title\", \"callback\"]), [\"cancel\", \"confirm\"]), i = a.show === c ? !0 : a.show; var o = [\"date\", \"time\", \"number\"], q = document.createElement(\"input\"); if (q.setAttribute(\"type\", a.inputType), o[a.inputType] && (a.inputType = q.type), a.message = f, a.buttons.cancel.callback = a.onEscape = function () { return a.callback(null) }, a.buttons.confirm.callback = function () { var c; switch (a.inputType) { case \"text\": case \"textarea\": case \"email\": case \"select\": case \"date\": case \"time\": case \"number\": case \"password\": c = h.val(); break; case \"checkbox\": var d = h.find(\"input:checked\"); c = [], g(d, function (a, d) { c.push(b(d).val()) }) } return a.callback(c) }, a.show = !1, !a.title) throw new Error(\"prompt requires a title\"); if (!b.isFunction(a.callback)) throw new Error(\"prompt requires a callback\"); if (!n.inputs[a.inputType]) throw new Error(\"invalid prompt type\"); switch (h = b(n.inputs[a.inputType]), a.inputType) { case \"text\": case \"textarea\": case \"email\": case \"date\": case \"time\": case \"number\": case \"password\": h.val(a.value); break; case \"select\": var r = {}; if (k = a.inputOptions || [], !k.length) throw new Error(\"prompt with select requires options\"); g(k, function (a, d) { var e = h; if (d.value === c || d.text === c) throw new Error(\"given options in wrong format\"); d.group && (r[d.group] || (r[d.group] = b(\"<optgroup/>\").attr(\"label\", d.group)), e = r[d.group]), e.append(\"<option value='\" + d.value + \"'>\" + d.text + \"</option>\") }), g(r, function (a, b) { h.append(b) }), h.val(a.value); break; case \"checkbox\": var s = b.isArray(a.value) ? a.value : [a.value]; if (k = a.inputOptions || [], !k.length) throw new Error(\"prompt with checkbox requires options\"); if (!k[0].value || !k[0].text) throw new Error(\"given options in wrong format\"); h = b(\"<div/>\"), g(k, function (c, d) { var e = b(n.inputs[a.inputType]); e.find(\"input\").attr(\"value\", d.value), e.find(\"label\").append(d.text), g(s, function (a, b) { b === d.value && e.find(\"input\").prop(\"checked\", !0) }), h.append(e) }) } return a.placeholder && h.attr(\"placeholder\", a.placeholder), a.pattern && h.attr(\"pattern\", a.pattern), f.append(h), f.on(\"submit\", function (a) { a.preventDefault(), e.find(\".btn-primary\").click() }), e = p.dialog(a), e.off(\"shown.bs.modal\"), e.on(\"shown.bs.modal\", function () { h.focus() }), i === !0 && e.modal(\"show\"), e }, p.dialog = function (a) { a = h(a); var c = b(n.dialog), d = c.find(\".modal-body\"), f = a.buttons, i = \"\", j = { onEscape: a.onEscape }; if (g(f, function (a, b) { i += \"<button data-bb-handler='\" + a + \"' type='button' class='btn \" + b.className + \"'>\" + b.label + \"</button>\", j[a] = b.callback }), d.find(\".bootbox-body\").html(a.message), a.animate === !0 && c.addClass(\"fade\"), a.className && c.addClass(a.className), a.title && d.before(n.header), a.closeButton) { var k = b(n.closeButton); a.title ? c.find(\".modal-header\").prepend(k) : k.css(\"margin-top\", \"-10px\").prependTo(d) } return a.title && c.find(\".modal-title\").html(a.title), i.length && (d.after(n.footer), c.find(\".modal-footer\").html(i)), c.on(\"hidden.bs.modal\", function (a) { a.target === this && c.remove() }), c.on(\"shown.bs.modal\", function () { c.find(\".btn-primary:first\").focus() }), c.on(\"escape.close.bb\", function (a) { j.onEscape && e(a, c, j.onEscape) }), c.on(\"click\", \".modal-footer button\", function (a) { var d = b(this).data(\"bb-handler\"); e(a, c, j[d]) }), c.on(\"click\", \".bootbox-close-button\", function (a) { e(a, c, j.onEscape) }), c.on(\"keyup\", function (a) { 27 === a.which && c.trigger(\"escape.close.bb\") }), b(a.container).append(c), c.modal({ backdrop: a.backdrop, keyboard: !1, show: !1 }), a.show && c.modal(\"show\"), c }, p.setDefaults = function () { var a = {}; 2 === arguments.length ? a[arguments[0]] = arguments[1] : a = arguments[0], b.extend(o, a) }, p.hideAll = function () { b(\".bootbox\").modal(\"hide\") }; var q = { br: { OK: \"OK\", CANCEL: \"Cancelar\", CONFIRM: \"Sim\" }, da: { OK: \"OK\", CANCEL: \"Annuller\", CONFIRM: \"Accepter\" }, de: { OK: \"OK\", CANCEL: \"Abbrechen\", CONFIRM: \"Akzeptieren\" }, en: { OK: \"OK\", CANCEL: \"Cancel\", CONFIRM: \"OK\" }, es: { OK: \"OK\", CANCEL: \"Cancelar\", CONFIRM: \"Aceptar\" }, fi: { OK: \"OK\", CANCEL: \"Peruuta\", CONFIRM: \"OK\" }, fr: { OK: \"OK\", CANCEL: \"Annuler\", CONFIRM: \"D'accord\" }, he: { OK: \"אישור\", CANCEL: \"ביטול\", CONFIRM: \"אישור\" }, it: { OK: \"OK\", CANCEL: \"Annulla\", CONFIRM: \"Conferma\" }, lt: { OK: \"Gerai\", CANCEL: \"Atšaukti\", CONFIRM: \"Patvirtinti\" }, lv: { OK: \"Labi\", CANCEL: \"Atcelt\", CONFIRM: \"Apstiprināt\" }, nl: { OK: \"OK\", CANCEL: \"Annuleren\", CONFIRM: \"Accepteren\" }, no: { OK: \"OK\", CANCEL: \"Avbryt\", CONFIRM: \"OK\" }, pl: { OK: \"OK\", CANCEL: \"Anuluj\", CONFIRM: \"Potwierdź\" }, ru: { OK: \"OK\", CANCEL: \"Отмена\", CONFIRM: \"Применить\" }, sv: { OK: \"OK\", CANCEL: \"Avbryt\", CONFIRM: \"OK\" }, tr: { OK: \"Tamam\", CANCEL: \"İptal\", CONFIRM: \"Onayla\" }, zh_CN: { OK: \"OK\", CANCEL: \"取消\", CONFIRM: \"确认\" }, zh_TW: { OK: \"OK\", CANCEL: \"取消\", CONFIRM: \"確認\" } }; return p.init = function (c) { return a(c || b) }, p });\n\n \n\n /*\n\n * debouncedresize: special jQuery event that happens once after a window resize\n\n *\n\n * latest version and complete README available on Github:\n\n * https://github.com/louisremi/jquery-smartresize\n\n *\n\n * Copyright 2012 @louis_remi\n\n * Licensed under the MIT license.\n\n *\n\n * This saved you an hour of work? \n\n * Send me music http://www.amazon.co.uk/wishlist/HNTU0468LQON\n\n */\n\n (function ($) {\n\n \n\n var $event = $.event,\n\n $special,\n\n resizeTimeout;\n\n \n\n $special = $event.special.debouncedresize = {\n\n setup: function () {\n\n $(this).on(\"resize\", $special.handler);\n\n },\n\n teardown: function () {\n\n $(this).off(\"resize\", $special.handler);\n\n },\n\n handler: function (event, execAsap) {\n\n // Save the context\n\n var context = this,\n\n args = arguments,\n\n dispatch = function () {\n\n // set correct event type\n\n event.type = \"debouncedresize\";\n\n $event.dispatch.apply(context, args);\n\n };\n\n \n\n if (resizeTimeout) {\n\n clearTimeout(resizeTimeout);\n\n }\n\n \n\n execAsap ?\n\n dispatch() :\n\n resizeTimeout = setTimeout(dispatch, $special.threshold);\n\n },\n\n threshold: 150\n\n };\n\n \n\n })(jQuery);\n\n \n\n /*\n\n _ _ _ _\n\n ___| (_) ___| | __ (_)___\n\n / __| | |/ __| |/ / | / __|\n\n \\__ \\ | | (__| < _ | \\__ \\\n\n |___/_|_|\\___|_|\\_(_)/ |___/\n\n |__/\n\n \n\n Version: 1.4.1\n\n Author: Ken Wheeler\n\n Website: http://kenwheeler.github.io\n\n Docs: http://kenwheeler.github.io/slick\n\n Repo: http://github.com/kenwheeler/slick\n\n Issues: http://github.com/kenwheeler/slick/issues\n\n \n\n */\n\n \n\n !function (a) { \"use strict\"; \"function\" == typeof define && define.amd ? define([\"jquery\"], a) : \"undefined\" != typeof exports ? module.exports = a(require(\"jquery\")) : a(jQuery) }(function (a) {\n\n \"use strict\"; var b = window.Slick || {\n\n }; b = function () { function c(c, d) { var f, g, h, e = this; if (e.defaults = { accessibility: !0, adaptiveHeight: !1, appendArrows: a(c), appendDots: a(c), arrows: !0, asNavFor: null, prevArrow: '<button type=\"button\" data-role=\"none\" class=\"slick-prev\">Previous</button>', nextArrow: '<button type=\"button\" data-role=\"none\" class=\"slick-next\">Next</button>', autoplay: !1, autoplaySpeed: 3e3, centerMode: !1, centerPadding: \"50px\", cssEase: \"ease\", customPaging: function (a, b) { return '<button type=\"button\" data-role=\"none\">' + (b + 1) + \"</button>\" }, dots: !1, dotsClass: \"slick-dots\", draggable: !0, easing: \"linear\", edgeFriction: .35, fade: !1, focusOnSelect: !1, infinite: !0, initialSlide: 0, lazyLoad: \"ondemand\", mobileFirst: !1, pauseOnHover: !0, pauseOnDotsHover: !1, respondTo: \"window\", responsive: null, rtl: !1, slide: \"\", slidesToShow: 1, slidesToScroll: 1, speed: 500, swipe: !0, swipeToSlide: !1, touchMove: !0, touchThreshold: 5, useCSS: !0, variableWidth: !1, vertical: !1, waitForAnimate: !0 }, e.initials = { animating: !1, dragging: !1, autoPlayTimer: null, currentDirection: 0, currentLeft: null, currentSlide: 0, direction: 1, $dots: null, listWidth: null, listHeight: null, loadIndex: 0, $nextArrow: null, $prevArrow: null, slideCount: null, slideWidth: null, $slideTrack: null, $slides: null, sliding: !1, slideOffset: 0, swipeLeft: null, $list: null, touchObject: {}, transformsEnabled: !1 }, a.extend(e, e.initials), e.activeBreakpoint = null, e.animType = null, e.animProp = null, e.breakpoints = [], e.breakpointSettings = [], e.cssTransitions = !1, e.hidden = \"hidden\", e.paused = !1, e.positionProp = null, e.respondTo = null, e.shouldClick = !0, e.$slider = a(c), e.$slidesCache = null, e.transformType = null, e.transitionType = null, e.visibilityChange = \"visibilitychange\", e.windowWidth = 0, e.windowTimer = null, f = a(c).data(\"slick\") || {}, e.options = a.extend({}, e.defaults, f, d), e.currentSlide = e.options.initialSlide, e.originalSettings = e.options, g = e.options.responsive || null, g && g.length > -1) { e.respondTo = e.options.respondTo || \"window\"; for (h in g) g.hasOwnProperty(h) && (e.breakpoints.push(g[h].breakpoint), e.breakpointSettings[g[h].breakpoint] = g[h].settings); e.breakpoints.sort(function (a, b) { return e.options.mobileFirst === !0 ? a - b : b - a }) } \"undefined\" != typeof document.mozHidden ? (e.hidden = \"mozHidden\", e.visibilityChange = \"mozvisibilitychange\") : \"undefined\" != typeof document.msHidden ? (e.hidden = \"msHidden\", e.visibilityChange = \"msvisibilitychange\") : \"undefined\" != typeof document.webkitHidden && (e.hidden = \"webkitHidden\", e.visibilityChange = \"webkitvisibilitychange\"), e.autoPlay = a.proxy(e.autoPlay, e), e.autoPlayClear = a.proxy(e.autoPlayClear, e), e.changeSlide = a.proxy(e.changeSlide, e), e.clickHandler = a.proxy(e.clickHandler, e), e.selectHandler = a.proxy(e.selectHandler, e), e.setPosition = a.proxy(e.setPosition, e), e.swipeHandler = a.proxy(e.swipeHandler, e), e.dragHandler = a.proxy(e.dragHandler, e), e.keyHandler = a.proxy(e.keyHandler, e), e.autoPlayIterator = a.proxy(e.autoPlayIterator, e), e.instanceUid = b++, e.htmlExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*)$/, e.init(), e.checkResponsive(!0) } var b = 0; return c }(), b.prototype.addSlide = b.prototype.slickAdd = function (b, c, d) { var e = this; if (\"boolean\" == typeof c) d = c, c = null; else if (0 > c || c >= e.slideCount) return !1; e.unload(), \"number\" == typeof c ? 0 === c && 0 === e.$slides.length ? a(b).appendTo(e.$slideTrack) : d ? a(b).insertBefore(e.$slides.eq(c)) : a(b).insertAfter(e.$slides.eq(c)) : d === !0 ? a(b).prependTo(e.$slideTrack) : a(b).appendTo(e.$slideTrack), e.$slides = e.$slideTrack.children(this.options.slide), e.$slideTrack.children(this.options.slide).detach(), e.$slideTrack.append(e.$slides), e.$slides.each(function (b, c) { a(c).attr(\"data-slick-index\", b) }), e.$slidesCache = e.$slides, e.reinit() }, b.prototype.animateHeight = function () { var a = this; if (1 === a.options.slidesToShow && a.options.adaptiveHeight === !0 && a.options.vertical === !1) { var b = a.$slides.eq(a.currentSlide).outerHeight(!0); a.$list.animate({ height: b }, a.options.speed) } }, b.prototype.animateSlide = function (b, c) { var d = {}, e = this; e.animateHeight(), e.options.rtl === !0 && e.options.vertical === !1 && (b = -b), e.transformsEnabled === !1 ? e.options.vertical === !1 ? e.$slideTrack.animate({ left: b }, e.options.speed, e.options.easing, c) : e.$slideTrack.animate({ top: b }, e.options.speed, e.options.easing, c) : e.cssTransitions === !1 ? (e.options.rtl === !0 && (e.currentLeft = -e.currentLeft), a({ animStart: e.currentLeft }).animate({ animStart: b }, { duration: e.options.speed, easing: e.options.easing, step: function (a) { a = Math.ceil(a), e.options.vertical === !1 ? (d[e.animType] = \"translate(\" + a + \"px, 0px)\", e.$slideTrack.css(d)) : (d[e.animType] = \"translate(0px,\" + a + \"px)\", e.$slideTrack.css(d)) }, complete: function () { c && c.call() } })) : (e.applyTransition(), b = Math.ceil(b), d[e.animType] = e.options.vertical === !1 ? \"translate3d(\" + b + \"px, 0px, 0px)\" : \"translate3d(0px,\" + b + \"px, 0px)\", e.$slideTrack.css(d), c && setTimeout(function () { e.disableTransition(), c.call() }, e.options.speed)) }, b.prototype.asNavFor = function (b) { var c = this, d = null !== c.options.asNavFor ? a(c.options.asNavFor).slick(\"getSlick\") : null; null !== d && d.slideHandler(b, !0) }, b.prototype.applyTransition = function (a) { var b = this, c = {}; c[b.transitionType] = b.options.fade === !1 ? b.transformType + \" \" + b.options.speed + \"ms \" + b.options.cssEase : \"opacity \" + b.options.speed + \"ms \" + b.options.cssEase, b.options.fade === !1 ? b.$slideTrack.css(c) : b.$slides.eq(a).css(c) }, b.prototype.autoPlay = function () { var a = this; a.autoPlayTimer && clearInterval(a.autoPlayTimer), a.slideCount > a.options.slidesToShow && a.paused !== !0 && (a.autoPlayTimer = setInterval(a.autoPlayIterator, a.options.autoplaySpeed)) }, b.prototype.autoPlayClear = function () { var a = this; a.autoPlayTimer && clearInterval(a.autoPlayTimer) }, b.prototype.autoPlayIterator = function () { var a = this; a.options.infinite === !1 ? 1 === a.direction ? (a.currentSlide + 1 === a.slideCount - 1 && (a.direction = 0), a.slideHandler(a.currentSlide + a.options.slidesToScroll)) : (0 === a.currentSlide - 1 && (a.direction = 1), a.slideHandler(a.currentSlide - a.options.slidesToScroll)) : a.slideHandler(a.currentSlide + a.options.slidesToScroll) }, b.prototype.buildArrows = function () { var b = this; b.options.arrows === !0 && b.slideCount > b.options.slidesToShow && (b.$prevArrow = a(b.options.prevArrow), b.$nextArrow = a(b.options.nextArrow), b.htmlExpr.test(b.options.prevArrow) && b.$prevArrow.appendTo(b.options.appendArrows), b.htmlExpr.test(b.options.nextArrow) && b.$nextArrow.appendTo(b.options.appendArrows), b.options.infinite !== !0 && b.$prevArrow.addClass(\"slick-disabled\")) }, b.prototype.buildDots = function () { var c, d, b = this; if (b.options.dots === !0 && b.slideCount > b.options.slidesToShow) { for (d = '<ul class=\"' + b.options.dotsClass + '\">', c = 0; c <= b.getDotCount() ; c += 1) d += \"<li>\" + b.options.customPaging.call(this, b, c) + \"</li>\"; d += \"</ul>\", b.$dots = a(d).appendTo(b.options.appendDots), b.$dots.find(\"li\").first().addClass(\"slick-active\") } }, b.prototype.buildOut = function () { var b = this; b.$slides = b.$slider.children(b.options.slide + \":not(.slick-cloned)\").addClass(\"slick-slide\"), b.slideCount = b.$slides.length, b.$slides.each(function (b, c) { a(c).attr(\"data-slick-index\", b) }), b.$slidesCache = b.$slides, b.$slider.addClass(\"slick-slider\"), b.$slideTrack = 0 === b.slideCount ? a('<div class=\"slick-track\"/>').appendTo(b.$slider) : b.$slides.wrapAll('<div class=\"slick-track\"/>').parent(), b.$list = b.$slideTrack.wrap('<div class=\"slick-list\"/>').parent(), b.$slideTrack.css(\"opacity\", 0), (b.options.centerMode === !0 || b.options.swipeToSlide === !0) && (b.options.slidesToScroll = 1), a(\"img[data-lazy]\", b.$slider).not(\"[src]\").addClass(\"slick-loading\"), b.setupInfinite(), b.buildArrows(), b.buildDots(), b.updateDots(), b.options.accessibility === !0 && b.$list.prop(\"tabIndex\", 0), b.setSlideClasses(\"number\" == typeof this.currentSlide ? this.currentSlide : 0), b.options.draggable === !0 && b.$list.addClass(\"draggable\") }, b.prototype.checkResponsive = function (b) { var d, e, f, c = this, g = c.$slider.width(), h = window.innerWidth || a(window).width(); if (\"window\" === c.respondTo ? f = h : \"slider\" === c.respondTo ? f = g : \"min\" === c.respondTo && (f = Math.min(h, g)), c.originalSettings.responsive && c.originalSettings.responsive.length > -1 && null !== c.originalSettings.responsive) { e = null; for (d in c.breakpoints) c.breakpoints.hasOwnProperty(d) && (c.originalSettings.mobileFirst === !1 ? f < c.breakpoints[d] && (e = c.breakpoints[d]) : f > c.breakpoints[d] && (e = c.breakpoints[d])); null !== e ? null !== c.activeBreakpoint ? e !== c.activeBreakpoint && (c.activeBreakpoint = e, \"unslick\" === c.breakpointSettings[e] ? c.unslick() : (c.options = a.extend({}, c.originalSettings, c.breakpointSettings[e]), b === !0 && (c.currentSlide = c.options.initialSlide), c.refresh())) : (c.activeBreakpoint = e, \"unslick\" === c.breakpointSettings[e] ? c.unslick() : (c.options = a.extend({}, c.originalSettings, c.breakpointSettings[e]), b === !0 && (c.currentSlide = c.options.initialSlide), c.refresh())) : null !== c.activeBreakpoint && (c.activeBreakpoint = null, c.options = c.originalSettings, b === !0 && (c.currentSlide = c.options.initialSlide), c.refresh()) } }, b.prototype.changeSlide = function (b, c) { var f, g, h, d = this, e = a(b.target); switch (e.is(\"a\") && b.preventDefault(), h = 0 !== d.slideCount % d.options.slidesToScroll, f = h ? 0 : (d.slideCount - d.currentSlide) % d.options.slidesToScroll, b.data.message) { case \"previous\": g = 0 === f ? d.options.slidesToScroll : d.options.slidesToShow - f, d.slideCount > d.options.slidesToShow && d.slideHandler(d.currentSlide - g, !1, c); break; case \"next\": g = 0 === f ? d.options.slidesToScroll : f, d.slideCount > d.options.slidesToShow && d.slideHandler(d.currentSlide + g, !1, c); break; case \"index\": var i = 0 === b.data.index ? 0 : b.data.index || a(b.target).parent().index() * d.options.slidesToScroll; d.slideHandler(d.checkNavigable(i), !1, c); break; default: return } }, b.prototype.checkNavigable = function (a) { var c, d, b = this; if (c = b.getNavigableIndexes(), d = 0, a > c[c.length - 1]) a = c[c.length - 1]; else for (var e in c) { if (a < c[e]) { a = d; break } d = c[e] } return a }, b.prototype.clickHandler = function (a) { var b = this; b.shouldClick === !1 && (a.stopImmediatePropagation(), a.stopPropagation(), a.preventDefault()) }, b.prototype.destroy = function () { var b = this; b.autoPlayClear(), b.touchObject = {}, a(\".slick-cloned\", b.$slider).remove(), b.$dots && b.$dots.remove(), b.$prevArrow && \"object\" != typeof b.options.prevArrow && b.$prevArrow.remove(), b.$nextArrow && \"object\" != typeof b.options.nextArrow && b.$nextArrow.remove(), b.$slides.removeClass(\"slick-slide slick-active slick-center slick-visible\").removeAttr(\"data-slick-index\").css({ position: \"\", left: \"\", top: \"\", zIndex: \"\", opacity: \"\", width: \"\" }), b.$slider.removeClass(\"slick-slider\"), b.$slider.removeClass(\"slick-initialized\"), b.$list.off(\".slick\"), a(window).off(\".slick-\" + b.instanceUid), a(document).off(\".slick-\" + b.instanceUid), b.$slider.html(b.$slides) }, b.prototype.disableTransition = function (a) { var b = this, c = {}; c[b.transitionType] = \"\", b.options.fade === !1 ? b.$slideTrack.css(c) : b.$slides.eq(a).css(c) }, b.prototype.fadeSlide = function (a, b) { var c = this; c.cssTransitions === !1 ? (c.$slides.eq(a).css({ zIndex: 1e3 }), c.$slides.eq(a).animate({ opacity: 1 }, c.options.speed, c.options.easing, b)) : (c.applyTransition(a), c.$slides.eq(a).css({ opacity: 1, zIndex: 1e3 }), b && setTimeout(function () { c.disableTransition(a), b.call() }, c.options.speed)) }, b.prototype.filterSlides = b.prototype.slickFilter = function (a) { var b = this; null !== a && (b.unload(), b.$slideTrack.children(this.options.slide).detach(), b.$slidesCache.filter(a).appendTo(b.$slideTrack), b.reinit()) }, b.prototype.getCurrent = b.prototype.slickCurrentSlide = function () { var a = this; return a.currentSlide }, b.prototype.getDotCount = function () { var a = this, b = 0, c = 0, d = 0; if (a.options.infinite === !0) d = Math.ceil(a.slideCount / a.options.slidesToScroll); else if (a.options.centerMode === !0) d = a.slideCount; else for (; b < a.slideCount;)++d, b = c + a.options.slidesToShow, c += a.options.slidesToScroll <= a.options.slidesToShow ? a.options.slidesToScroll : a.options.slidesToShow; return d - 1 }, b.prototype.getLeft = function (a) { var c, d, f, b = this, e = 0; return b.slideOffset = 0, d = b.$slides.first().outerHeight(), b.options.infinite === !0 ? (b.slideCount > b.options.slidesToShow && (b.slideOffset = -1 * b.slideWidth * b.options.slidesToShow, e = -1 * d * b.options.slidesToShow), 0 !== b.slideCount % b.options.slidesToScroll && a + b.options.slidesToScroll > b.slideCount && b.slideCount > b.options.slidesToShow && (a > b.slideCount ? (b.slideOffset = -1 * (b.options.slidesToShow - (a - b.slideCount)) * b.slideWidth, e = -1 * (b.options.slidesToShow - (a - b.slideCount)) * d) : (b.slideOffset = -1 * b.slideCount % b.options.slidesToScroll * b.slideWidth, e = -1 * b.slideCount % b.options.slidesToScroll * d))) : a + b.options.slidesToShow > b.slideCount && (b.slideOffset = (a + b.options.slidesToShow - b.slideCount) * b.slideWidth, e = (a + b.options.slidesToShow - b.slideCount) * d), b.slideCount <= b.options.slidesToShow && (b.slideOffset = 0, e = 0), b.options.centerMode === !0 && b.options.infinite === !0 ? b.slideOffset += b.slideWidth * Math.floor(b.options.slidesToShow / 2) - b.slideWidth : b.options.centerMode === !0 && (b.slideOffset = 0, b.slideOffset += b.slideWidth * Math.floor(b.options.slidesToShow / 2)), c = b.options.vertical === !1 ? -1 * a * b.slideWidth + b.slideOffset : -1 * a * d + e, b.options.variableWidth === !0 && (f = b.slideCount <= b.options.slidesToShow || b.options.infinite === !1 ? b.$slideTrack.children(\".slick-slide\").eq(a) : b.$slideTrack.children(\".slick-slide\").eq(a + b.options.slidesToShow), c = f[0] ? -1 * f[0].offsetLeft : 0, b.options.centerMode === !0 && (f = b.options.infinite === !1 ? b.$slideTrack.children(\".slick-slide\").eq(a) : b.$slideTrack.children(\".slick-slide\").eq(a + b.options.slidesToShow + 1), c = f[0] ? -1 * f[0].offsetLeft : 0, c += (b.$list.width() - f.outerWidth()) / 2)), c }, b.prototype.getOption = b.prototype.slickGetOption = function (a) { var b = this; return b.options[a] }, b.prototype.getNavigableIndexes = function () { var e, a = this, b = 0, c = 0, d = []; for (a.options.infinite === !1 ? (e = a.slideCount - a.options.slidesToShow + 1, a.options.centerMode === !0 && (e = a.slideCount)) : (b = -1 * a.slideCount, c = -1 * a.slideCount, e = 2 * a.slideCount) ; e > b;) d.push(b), b = c + a.options.slidesToScroll, c += a.options.slidesToScroll <= a.options.slidesToShow ? a.options.slidesToScroll : a.options.slidesToShow; return d }, b.prototype.getSlick = function () { return this }, b.prototype.getSlideCount = function () { var c, d, e, b = this; return e = b.options.centerMode === !0 ? b.slideWidth * Math.floor(b.options.slidesToShow / 2) : 0, b.options.swipeToSlide === !0 ? (b.$slideTrack.find(\".slick-slide\").each(function (c, f) { return f.offsetLeft - e + a(f).outerWidth() / 2 > -1 * b.swipeLeft ? (d = f, !1) : void 0 }), c = Math.abs(a(d).attr(\"data-slick-index\") - b.currentSlide) || 1) : b.options.slidesToScroll }, b.prototype.goTo = b.prototype.slickGoTo = function (a, b) { var c = this; c.changeSlide({ data: { message: \"index\", index: parseInt(a) } }, b) }, b.prototype.init = function () { var b = this; a(b.$slider).hasClass(\"slick-initialized\") || (a(b.$slider).addClass(\"slick-initialized\"), b.buildOut(), b.setProps(), b.startLoad(), b.loadSlider(), b.initializeEvents(), b.updateArrows(), b.updateDots()), b.$slider.trigger(\"init\", [b]) }, b.prototype.initArrowEvents = function () { var a = this; a.options.arrows === !0 && a.slideCount > a.options.slidesToShow && (a.$prevArrow.on(\"click.slick\", { message: \"previous\" }, a.changeSlide), a.$nextArrow.on(\"click.slick\", { message: \"next\" }, a.changeSlide)) }, b.prototype.initDotEvents = function () { var b = this; b.options.dots === !0 && b.slideCount > b.options.slidesToShow && a(\"li\", b.$dots).on(\"click.slick\", { message: \"index\" }, b.changeSlide), b.options.dots === !0 && b.options.pauseOnDotsHover === !0 && b.options.autoplay === !0 && a(\"li\", b.$dots).on(\"mouseenter.slick\", function () { b.paused = !0, b.autoPlayClear() }).on(\"mouseleave.slick\", function () { b.paused = !1, b.autoPlay() }) }, b.prototype.initializeEvents = function () { var b = this; b.initArrowEvents(), b.initDotEvents(), b.$list.on(\"touchstart.slick mousedown.slick\", { action: \"start\" }, b.swipeHandler), b.$list.on(\"touchmove.slick mousemove.slick\", { action: \"move\" }, b.swipeHandler), b.$list.on(\"touchend.slick mouseup.slick\", { action: \"end\" }, b.swipeHandler), b.$list.on(\"touchcancel.slick mouseleave.slick\", { action: \"end\" }, b.swipeHandler), b.$list.on(\"click.slick\", b.clickHandler), b.options.autoplay === !0 && (a(document).on(b.visibilityChange, function () { b.visibility() }), b.options.pauseOnHover === !0 && (b.$list.on(\"mouseenter.slick\", function () { b.paused = !0, b.autoPlayClear() }), b.$list.on(\"mouseleave.slick\", function () { b.paused = !1, b.autoPlay() }))), b.options.accessibility === !0 && b.$list.on(\"keydown.slick\", b.keyHandler), b.options.focusOnSelect === !0 && a(b.$slideTrack).children().on(\"click.slick\", b.selectHandler), a(window).on(\"orientationchange.slick.slick-\" + b.instanceUid, function () { b.checkResponsive(), b.setPosition() }), a(window).on(\"resize.slick.slick-\" + b.instanceUid, function () { a(window).width() !== b.windowWidth && (clearTimeout(b.windowDelay), b.windowDelay = window.setTimeout(function () { b.windowWidth = a(window).width(), b.checkResponsive(), b.setPosition() }, 50)) }), a(\"*[draggable!=true]\", b.$slideTrack).on(\"dragstart\", function (a) { a.preventDefault() }), a(window).on(\"load.slick.slick-\" + b.instanceUid, b.setPosition), a(document).on(\"ready.slick.slick-\" + b.instanceUid, b.setPosition) }, b.prototype.initUI = function () { var a = this; a.options.arrows === !0 && a.slideCount > a.options.slidesToShow && (a.$prevArrow.show(), a.$nextArrow.show()), a.options.dots === !0 && a.slideCount > a.options.slidesToShow && a.$dots.show(), a.options.autoplay === !0 && a.autoPlay() }, b.prototype.keyHandler = function (a) { var b = this; 37 === a.keyCode && b.options.accessibility === !0 ? b.changeSlide({ data: { message: \"previous\" } }) : 39 === a.keyCode && b.options.accessibility === !0 && b.changeSlide({ data: { message: \"next\" } }) }, b.prototype.lazyLoad = function () { function g(b) { a(\"img[data-lazy]\", b).each(function () { var b = a(this), c = a(this).attr(\"data-lazy\"); b.load(function () { b.animate({ opacity: 1 }, 200) }).css({ opacity: 0 }).attr(\"src\", c).removeAttr(\"data-lazy\").removeClass(\"slick-loading\") }) } var c, d, e, f, b = this; b.options.centerMode === !0 ? b.options.infinite === !0 ? (e = b.currentSlide + (b.options.slidesToShow / 2 + 1), f = e + b.options.slidesToShow + 2) : (e = Math.max(0, b.currentSlide - (b.options.slidesToShow / 2 + 1)), f = 2 + (b.options.slidesToShow / 2 + 1) + b.currentSlide) : (e = b.options.infinite ? b.options.slidesToShow + b.currentSlide : b.currentSlide, f = e + b.options.slidesToShow, b.options.fade === !0 && (e > 0 && e--, f <= b.slideCount && f++)), c = b.$slider.find(\".slick-slide\").slice(e, f), g(c), b.slideCount <= b.options.slidesToShow ? (d = b.$slider.find(\".slick-slide\"), g(d)) : b.currentSlide >= b.slideCount - b.options.slidesToShow ? (d = b.$slider.find(\".slick-cloned\").slice(0, b.options.slidesToShow), g(d)) : 0 === b.currentSlide && (d = b.$slider.find(\".slick-cloned\").slice(-1 * b.options.slidesToShow), g(d)) }, b.prototype.loadSlider = function () { var a = this; a.setPosition(), a.$slideTrack.css({ opacity: 1 }), a.$slider.removeClass(\"slick-loading\"), a.initUI(), \"progressive\" === a.options.lazyLoad && a.progressiveLazyLoad() }, b.prototype.next = b.prototype.slickNext = function () { var a = this; a.changeSlide({ data: { message: \"next\" } }) }, b.prototype.pause = b.prototype.slickPause = function () { var a = this; a.autoPlayClear(), a.paused = !0 }, b.prototype.play = b.prototype.slickPlay = function () { var a = this; a.paused = !1, a.autoPlay() }, b.prototype.postSlide = function (a) { var b = this; b.$slider.trigger(\"afterChange\", [b, a]), b.animating = !1, b.setPosition(), b.swipeLeft = null, b.options.autoplay === !0 && b.paused === !1 && b.autoPlay() }, b.prototype.prev = b.prototype.slickPrev = function () { var a = this; a.changeSlide({ data: { message: \"previous\" } }) }, b.prototype.progressiveLazyLoad = function () { var c, d, b = this; c = a(\"img[data-lazy]\", b.$slider).length, c > 0 && (d = a(\"img[data-lazy]\", b.$slider).first(), d.attr(\"src\", d.attr(\"data-lazy\")).removeClass(\"slick-loading\").load(function () { d.removeAttr(\"data-lazy\"), b.progressiveLazyLoad() }).error(function () { d.removeAttr(\"data-lazy\"), b.progressiveLazyLoad() })) }, b.prototype.refresh = function () { var b = this, c = b.currentSlide; b.destroy(), a.extend(b, b.initials), b.init(), b.changeSlide({ data: { message: \"index\", index: c } }, !0) }, b.prototype.reinit = function () { var b = this; b.$slides = b.$slideTrack.children(b.options.slide).addClass(\"slick-slide\"), b.slideCount = b.$slides.length, b.currentSlide >= b.slideCount && 0 !== b.currentSlide && (b.currentSlide = b.currentSlide - b.options.slidesToScroll), b.slideCount <= b.options.slidesToShow && (b.currentSlide = 0), b.setProps(), b.setupInfinite(), b.buildArrows(), b.updateArrows(), b.initArrowEvents(), b.buildDots(), b.updateDots(), b.initDotEvents(), b.options.focusOnSelect === !0 && a(b.$slideTrack).children().on(\"click.slick\", b.selectHandler), b.setSlideClasses(0), b.setPosition(), b.$slider.trigger(\"reInit\", [b]) }, b.prototype.removeSlide = b.prototype.slickRemove = function (a, b, c) { var d = this; return \"boolean\" == typeof a ? (b = a, a = b === !0 ? 0 : d.slideCount - 1) : a = b === !0 ? --a : a, d.slideCount < 1 || 0 > a || a > d.slideCount - 1 ? !1 : (d.unload(), c === !0 ? d.$slideTrack.children().remove() : d.$slideTrack.children(this.options.slide).eq(a).remove(), d.$slides = d.$slideTrack.children(this.options.slide), d.$slideTrack.children(this.options.slide).detach(), d.$slideTrack.append(d.$slides), d.$slidesCache = d.$slides, d.reinit(), void 0) }, b.prototype.setCSS = function (a) { var d, e, b = this, c = {}; b.options.rtl === !0 && (a = -a), d = \"left\" == b.positionProp ? Math.ceil(a) + \"px\" : \"0px\", e = \"top\" == b.positionProp ? Math.ceil(a) + \"px\" : \"0px\", c[b.positionProp] = a, b.transformsEnabled === !1 ? b.$slideTrack.css(c) : (c = {}, b.cssTransitions === !1 ? (c[b.animType] = \"translate(\" + d + \", \" + e + \")\", b.$slideTrack.css(c)) : (c[b.animType] = \"translate3d(\" + d + \", \" + e + \", 0px)\", b.$slideTrack.css(c))) }, b.prototype.setDimensions = function () { var a = this; if (a.options.vertical === !1 ? a.options.centerMode === !0 && a.$list.css({ padding: \"0px \" + a.options.centerPadding }) : (a.$list.height(a.$slides.first().outerHeight(!0) * a.options.slidesToShow), a.options.centerMode === !0 && a.$list.css({ padding: a.options.centerPadding + \" 0px\" })), a.listWidth = a.$list.width(), a.listHeight = a.$list.height(), a.options.vertical === !1 && a.options.variableWidth === !1) a.slideWidth = Math.ceil(a.listWidth / a.options.slidesToShow), a.$slideTrack.width(Math.ceil(a.slideWidth * a.$slideTrack.children(\".slick-slide\").length)); else if (a.options.variableWidth === !0) { var b = 0; a.slideWidth = Math.ceil(a.listWidth / a.options.slidesToShow), a.$slideTrack.children(\".slick-slide\").each(function () { b += a.listWidth }), a.$slideTrack.width(Math.ceil(b) + 1) } else a.slideWidth = Math.ceil(a.listWidth), a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0) * a.$slideTrack.children(\".slick-slide\").length)); var c = a.$slides.first().outerWidth(!0) - a.$slides.first().width(); a.options.variableWidth === !1 && a.$slideTrack.children(\".slick-slide\").width(a.slideWidth - c) }, b.prototype.setFade = function () { var c, b = this; b.$slides.each(function (d, e) { c = -1 * b.slideWidth * d, b.options.rtl === !0 ? a(e).css({ position: \"relative\", right: c, top: 0, zIndex: 800, opacity: 0 }) : a(e).css({ position: \"relative\", left: c, top: 0, zIndex: 800, opacity: 0 }) }), b.$slides.eq(b.currentSlide).css({ zIndex: 900, opacity: 1 }) }, b.prototype.setHeight = function () { var a = this; if (1 === a.options.slidesToShow && a.options.adaptiveHeight === !0 && a.options.vertical === !1) { var b = a.$slides.eq(a.currentSlide).outerHeight(!0); a.$list.css(\"height\", b) } }, b.prototype.setOption = b.prototype.slickSetOption = function (a, b, c) { var d = this; d.options[a] = b, c === !0 && (d.unload(), d.reinit()) }, b.prototype.setPosition = function () { var a = this; a.setDimensions(), a.setHeight(), a.options.fade === !1 ? a.setCSS(a.getLeft(a.currentSlide)) : a.setFade(), a.$slider.trigger(\"setPosition\", [a]) }, b.prototype.setProps = function () { var a = this, b = document.body.style; a.positionProp = a.options.vertical === !0 ? \"top\" : \"left\", \"top\" === a.positionProp ? a.$slider.addClass(\"slick-vertical\") : a.$slider.removeClass(\"slick-vertical\"), (void 0 !== b.WebkitTransition || void 0 !== b.MozTransition || void 0 !== b.msTransition) && a.options.useCSS === !0 && (a.cssTransitions = !0), void 0 !== b.OTransform && (a.animType = \"OTransform\", a.transformType = \"-o-transform\", a.transitionType = \"OTransition\", void 0 === b.perspectiveProperty && void 0 === b.webkitPerspective && (a.animType = !1)), void 0 !== b.MozTransform && (a.animType = \"MozTransform\", a.transformType = \"-moz-transform\", a.transitionType = \"MozTransition\", void 0 === b.perspectiveProperty && void 0 === b.MozPerspective && (a.animType = !1)), void 0 !== b.webkitTransform && (a.animType = \"webkitTransform\", a.transformType = \"-webkit-transform\", a.transitionType = \"webkitTransition\", void 0 === b.perspectiveProperty && void 0 === b.webkitPerspective && (a.animType = !1)), void 0 !== b.msTransform && (a.animType = \"msTransform\", a.transformType = \"-ms-transform\", a.transitionType = \"msTransition\", void 0 === b.msTransform && (a.animType = !1)), void 0 !== b.transform && a.animType !== !1 && (a.animType = \"transform\", a.transformType = \"transform\", a.transitionType = \"transition\"), a.transformsEnabled = null !== a.animType && a.animType !== !1 }, b.prototype.setSlideClasses = function (a) { var c, d, e, f, b = this; b.$slider.find(\".slick-slide\").removeClass(\"slick-active\").removeClass(\"slick-center\"), d = b.$slider.find(\".slick-slide\"), b.options.centerMode === !0 ? (c = Math.floor(b.options.slidesToShow / 2), b.options.infinite === !0 && (a >= c && a <= b.slideCount - 1 - c ? b.$slides.slice(a - c, a + c + 1).addClass(\"slick-active\") : (e = b.options.slidesToShow + a, d.slice(e - c + 1, e + c + 2).addClass(\"slick-active\")), 0 === a ? d.eq(d.length - 1 - b.options.slidesToShow).addClass(\"slick-center\") : a === b.slideCount - 1 && d.eq(b.options.slidesToShow).addClass(\"slick-center\")), b.$slides.eq(a).addClass(\"slick-center\")) : a >= 0 && a <= b.slideCount - b.options.slidesToShow ? b.$slides.slice(a, a + b.options.slidesToShow).addClass(\"slick-active\") : d.length <= b.options.slidesToShow ? d.addClass(\"slick-active\") : (f = b.slideCount % b.options.slidesToShow, e = b.options.infinite === !0 ? b.options.slidesToShow + a : a, b.options.slidesToShow == b.options.slidesToScroll && b.slideCount - a < b.options.slidesToShow ? d.slice(e - (b.options.slidesToShow - f), e + f).addClass(\"slick-active\") : d.slice(e, e + b.options.slidesToShow).addClass(\"slick-active\")), \"ondemand\" === b.options.lazyLoad && b.lazyLoad() }, b.prototype.setupInfinite = function () { var c, d, e, b = this; if (b.options.fade === !0 && (b.options.centerMode = !1), b.options.infinite === !0 && b.options.fade === !1 && (d = null, b.slideCount > b.options.slidesToShow)) { for (e = b.options.centerMode === !0 ? b.options.slidesToShow + 1 : b.options.slidesToShow, c = b.slideCount; c > b.slideCount - e; c -= 1) d = c - 1, a(b.$slides[d]).clone(!0).attr(\"id\", \"\").attr(\"data-slick-index\", d - b.slideCount).prependTo(b.$slideTrack).addClass(\"slick-cloned\"); for (c = 0; e > c; c += 1) d = c, a(b.$slides[d]).clone(!0).attr(\"id\", \"\").attr(\"data-slick-index\", d + b.slideCount).appendTo(b.$slideTrack).addClass(\"slick-cloned\"); b.$slideTrack.find(\".slick-cloned\").find(\"[id]\").each(function () { a(this).attr(\"id\", \"\") }) } }, b.prototype.selectHandler = function (b) { var c = this, d = parseInt(a(b.target).parents(\".slick-slide\").attr(\"data-slick-index\")); return d || (d = 0), c.slideCount <= c.options.slidesToShow ? (c.$slider.find(\".slick-slide\").removeClass(\"slick-active\"), c.$slides.eq(d).addClass(\"slick-active\"), c.options.centerMode === !0 && (c.$slider.find(\".slick-slide\").removeClass(\"slick-center\"), c.$slides.eq(d).addClass(\"slick-center\")), c.asNavFor(d), void 0) : (c.slideHandler(d), void 0) }, b.prototype.slideHandler = function (a, b, c) { var d, e, f, g, h = null, i = this; return b = b || !1, i.animating === !0 && i.options.waitForAnimate === !0 || i.options.fade === !0 && i.currentSlide === a || i.slideCount <= i.options.slidesToShow ? void 0 : (b === !1 && i.asNavFor(a), d = a, h = i.getLeft(d), g = i.getLeft(i.currentSlide), i.currentLeft = null === i.swipeLeft ? g : i.swipeLeft, i.options.infinite === !1 && i.options.centerMode === !1 && (0 > a || a > i.getDotCount() * i.options.slidesToScroll) ? (i.options.fade === !1 && (d = i.currentSlide, c !== !0 ? i.animateSlide(g, function () { i.postSlide(d) }) : i.postSlide(d)), void 0) : i.options.infinite === !1 && i.options.centerMode === !0 && (0 > a || a > i.slideCount - i.options.slidesToScroll) ? (i.options.fade === !1 && (d = i.currentSlide, c !== !0 ? i.animateSlide(g, function () { i.postSlide(d) }) : i.postSlide(d)), void 0) : (i.options.autoplay === !0 && clearInterval(i.autoPlayTimer), e = 0 > d ? 0 !== i.slideCount % i.options.slidesToScroll ? i.slideCount - i.slideCount % i.options.slidesToScroll : i.slideCount + d : d >= i.slideCount ? 0 !== i.slideCount % i.options.slidesToScroll ? 0 : d - i.slideCount : d, i.animating = !0, i.$slider.trigger(\"beforeChange\", [i, i.currentSlide, e]), f = i.currentSlide, i.currentSlide = e, i.setSlideClasses(i.currentSlide), i.updateDots(), i.updateArrows(), i.options.fade === !0 ? (c !== !0 ? i.fadeSlide(e, function () { i.postSlide(e) }) : i.postSlide(e), i.animateHeight(), void 0) : (c !== !0 ? i.animateSlide(h, function () { i.postSlide(e) }) : i.postSlide(e), void 0))) }, b.prototype.startLoad = function () { var a = this; a.options.arrows === !0 && a.slideCount > a.options.slidesToShow && (a.$prevArrow.hide(), a.$nextArrow.hide()), a.options.dots === !0 && a.slideCount > a.options.slidesToShow && a.$dots.hide(), a.$slider.addClass(\"slick-loading\") }, b.prototype.swipeDirection = function () { var a, b, c, d, e = this; return a = e.touchObject.startX - e.touchObject.curX, b = e.touchObject.startY - e.touchObject.curY, c = Math.atan2(b, a), d = Math.round(180 * c / Math.PI), 0 > d && (d = 360 - Math.abs(d)), 45 >= d && d >= 0 ? e.options.rtl === !1 ? \"left\" : \"right\" : 360 >= d && d >= 315 ? e.options.rtl === !1 ? \"left\" : \"right\" : d >= 135 && 225 >= d ? e.options.rtl === !1 ? \"right\" : \"left\" : \"vertical\" }, b.prototype.swipeEnd = function () { var c, b = this; if (b.dragging = !1, b.shouldClick = b.touchObject.swipeLength > 10 ? !1 : !0, void 0 === b.touchObject.curX) return !1; if (b.touchObject.edgeHit === !0 && b.$slider.trigger(\"edge\", [b, b.swipeDirection()]), b.touchObject.swipeLength >= b.touchObject.minSwipe) switch (b.swipeDirection()) { case \"left\": c = b.options.swipeToSlide ? b.checkNavigable(b.currentSlide + b.getSlideCount()) : b.currentSlide + b.getSlideCount(), b.slideHandler(c), b.currentDirection = 0, b.touchObject = {}, b.$slider.trigger(\"swipe\", [b, \"left\"]); break; case \"right\": c = b.options.swipeToSlide ? b.checkNavigable(b.currentSlide - b.getSlideCount()) : b.currentSlide - b.getSlideCount(), b.slideHandler(c), b.currentDirection = 1, b.touchObject = {}, b.$slider.trigger(\"swipe\", [b, \"right\"]) } else b.touchObject.startX !== b.touchObject.curX && (b.slideHandler(b.currentSlide), b.touchObject = {}) }, b.prototype.swipeHandler = function (a) { var b = this; if (!(b.options.swipe === !1 || \"ontouchend\" in document && b.options.swipe === !1 || b.options.draggable === !1 && -1 !== a.type.indexOf(\"mouse\"))) switch (b.touchObject.fingerCount = a.originalEvent && void 0 !== a.originalEvent.touches ? a.originalEvent.touches.length : 1, b.touchObject.minSwipe = b.listWidth / b.options.touchThreshold, a.data.action) { case \"start\": b.swipeStart(a); break; case \"move\": b.swipeMove(a); break; case \"end\": b.swipeEnd(a) } }, b.prototype.swipeMove = function (a) { var d, e, f, g, h, b = this; return h = void 0 !== a.originalEvent ? a.originalEvent.touches : null, !b.dragging || h && 1 !== h.length ? !1 : (d = b.getLeft(b.currentSlide), b.touchObject.curX = void 0 !== h ? h[0].pageX : a.clientX, b.touchObject.curY = void 0 !== h ? h[0].pageY : a.clientY, b.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(b.touchObject.curX - b.touchObject.startX, 2))), e = b.swipeDirection(), \"vertical\" !== e ? (void 0 !== a.originalEvent && b.touchObject.swipeLength > 4 && a.preventDefault(), g = (b.options.rtl === !1 ? 1 : -1) * (b.touchObject.curX > b.touchObject.startX ? 1 : -1), f = b.touchObject.swipeLength, b.touchObject.edgeHit = !1, b.options.infinite === !1 && (0 === b.currentSlide && \"right\" === e || b.currentSlide >= b.getDotCount() && \"left\" === e) && (f = b.touchObject.swipeLength * b.options.edgeFriction, b.touchObject.edgeHit = !0), b.swipeLeft = b.options.vertical === !1 ? d + f * g : d + f * (b.$list.height() / b.listWidth) * g, b.options.fade === !0 || b.options.touchMove === !1 ? !1 : b.animating === !0 ? (b.swipeLeft = null, !1) : (b.setCSS(b.swipeLeft), void 0)) : void 0) }, b.prototype.swipeStart = function (a) { var c, b = this; return 1 !== b.touchObject.fingerCount || b.slideCount <= b.options.slidesToShow ? (b.touchObject = {}, !1) : (void 0 !== a.originalEvent && void 0 !== a.originalEvent.touches && (c = a.originalEvent.touches[0]), b.touchObject.startX = b.touchObject.curX = void 0 !== c ? c.pageX : a.clientX, b.touchObject.startY = b.touchObject.curY = void 0 !== c ? c.pageY : a.clientY, b.dragging = !0, void 0) }, b.prototype.unfilterSlides = b.prototype.slickUnfilter = function () { var a = this; null !== a.$slidesCache && (a.unload(), a.$slideTrack.children(this.options.slide).detach(), a.$slidesCache.appendTo(a.$slideTrack), a.reinit()) }, b.prototype.unload = function () { var b = this; a(\".slick-cloned\", b.$slider).remove(), b.$dots && b.$dots.remove(), b.$prevArrow && \"object\" != typeof b.options.prevArrow && b.$prevArrow.remove(), b.$nextArrow && \"object\" != typeof b.options.nextArrow && b.$nextArrow.remove(), b.$slides.removeClass(\"slick-slide slick-active slick-visible\").css(\"width\", \"\") }, b.prototype.unslick = function () { var a = this; a.destroy() }, b.prototype.updateArrows = function () {\n\n var b, a = this; b = Math.floor(a.options.slidesToShow / 2), a.options.arrows === !0 && a.options.infinite !== !0 && a.slideCount > a.options.slidesToShow && (a.$prevArrow.removeClass(\"slick-disabled\"), a.$nextArrow.removeClass(\"slick-disabled\"), 0 === a.currentSlide ? (a.$prevArrow.addClass(\"slick-disabled\"), a.$nextArrow.removeClass(\"slick-disabled\")) : a.currentSlide >= a.slideCount - a.options.slidesToShow && a.options.centerMode === !1 ? (a.$nextArrow.addClass(\"slick-disabled\"), a.$prevArrow.removeClass(\"slick-disabled\")) : a.currentSlide >= a.slideCount - 1 && a.options.centerMode === !0 && (a.$nextArrow.addClass(\"slick-disabled\"), a.$prevArrow.removeClass(\"slick-disabled\")))\n\n }, b.prototype.updateDots = function () { var a = this; null !== a.$dots && (a.$dots.find(\"li\").removeClass(\"slick-active\"), a.$dots.find(\"li\").eq(Math.floor(a.currentSlide / a.options.slidesToScroll)).addClass(\"slick-active\")) }, b.prototype.visibility = function () { var a = this; document[a.hidden] ? (a.paused = !0, a.autoPlayClear()) : (a.paused = !1, a.autoPlay()) }, a.fn.slick = function () { var g, a = this, c = arguments[0], d = Array.prototype.slice.call(arguments, 1), e = a.length, f = 0; for (f; e > f; f++) if (\"object\" == typeof c || \"undefined\" == typeof c ? a[f].slick = new b(a[f], c) : g = a[f].slick[c].apply(a[f].slick, d), \"undefined\" != typeof g) return g; return a }, a(function () { a(\"[data-slick]\").slick() })\n\n });\n\n \n\n \n\n /*\n\n *\n\n * Copyright (c) 2006-2011 Sam Collett (http://www.texotela.co.uk)\n\n * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)\n\n * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\n\n * \n\n * Version 1.3\n\n * Demo: http://www.texotela.co.uk/code/jquery/numeric/\n\n *\n\n */\n\n (function (e) { e.fn.numeric = function (t, n) { if (typeof t === \"boolean\") { t = { decimal: t } } t = t || {}; if (typeof t.negative == \"undefined\") t.negative = true; var r = t.decimal === false ? \"\" : t.decimal || \".\"; var i = t.negative === true ? true : false; var n = typeof n == \"function\" ? n : function () { }; return this.data(\"numeric.decimal\", r).data(\"numeric.negative\", i).data(\"numeric.callback\", n).keypress(e.fn.numeric.keypress).keyup(e.fn.numeric.keyup).blur(e.fn.numeric.blur) }; e.fn.numeric.keypress = function (t) { var n = e.data(this, \"numeric.decimal\"); var r = e.data(this, \"numeric.negative\"); var i = t.charCode ? t.charCode : t.keyCode ? t.keyCode : 0; if (i == 13 && this.nodeName.toLowerCase() == \"input\") { return true } else if (i == 13) { return false } var s = false; if (t.ctrlKey && i == 97 || t.ctrlKey && i == 65) return true; if (t.ctrlKey && i == 120 || t.ctrlKey && i == 88) return true; if (t.ctrlKey && i == 99 || t.ctrlKey && i == 67) return true; if (t.ctrlKey && i == 122 || t.ctrlKey && i == 90) return true; if (t.ctrlKey && i == 118 || t.ctrlKey && i == 86 || t.shiftKey && i == 45) return true; if (i < 48 || i > 57) { if (this.value.indexOf(\"-\") != 0 && r && i == 45 && (this.value.length == 0 || e.fn.getSelectionStart(this) == 0)) return true; if (n && i == n.charCodeAt(0) && this.value.indexOf(n) != -1) { s = false } if (i != 8 && i != 9 && i != 13 && i != 35 && i != 36 && i != 37 && i != 39 && i != 46) { s = false } else { if (typeof t.charCode != \"undefined\") { if (t.keyCode == t.which && t.which != 0) { s = true; if (t.which == 46) s = false } else if (t.keyCode != 0 && t.charCode == 0 && t.which == 0) { s = true } } } if (n && i == n.charCodeAt(0)) { if (this.value.indexOf(n) == -1) { s = true } else { s = false } } } else { s = true } return s }; e.fn.numeric.keyup = function (t) { var n = this.value; if (n.length > 0) { var r = e.fn.getSelectionStart(this); var i = e.data(this, \"numeric.decimal\"); var s = e.data(this, \"numeric.negative\"); if (i != \"\") { var o = n.indexOf(i); if (o == 0) { this.value = \"0\" + n } if (o == 1 && n.charAt(0) == \"-\") { this.value = \"-0\" + n.substring(1) } n = this.value } var u = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, \"-\", i]; var a = n.length; for (var f = a - 1; f >= 0; f--) { var l = n.charAt(f); if (f != 0 && l == \"-\") { n = n.substring(0, f) + n.substring(f + 1) } else if (f == 0 && !s && l == \"-\") { n = n.substring(1) } var c = false; for (var h = 0; h < u.length; h++) { if (l == u[h]) { c = true; break } } if (!c || l == \" \") { n = n.substring(0, f) + n.substring(f + 1) } } var p = n.indexOf(i); if (p > 0) { for (var f = a - 1; f > p; f--) { var l = n.charAt(f); if (l == i) { n = n.substring(0, f) + n.substring(f + 1) } } } this.value = n; e.fn.setSelection(this, r) } }; e.fn.numeric.blur = function () { var t = e.data(this, \"numeric.decimal\"); var n = e.data(this, \"numeric.callback\"); var r = this.value; if (r != \"\") { var i = new RegExp(\"^\\\\d+$|\\\\d*\" + t + \"\\\\d+\"); if (!i.exec(r)) { n.apply(this) } } }; e.fn.removeNumeric = function () { return this.data(\"numeric.decimal\", null).data(\"numeric.negative\", null).data(\"numeric.callback\", null).unbind(\"keypress\", e.fn.numeric.keypress).unbind(\"blur\", e.fn.numeric.blur) }; e.fn.getSelectionStart = function (e) { if (e.createTextRange) { var t = document.selection.createRange().duplicate(); t.moveEnd(\"character\", e.value.length); if (t.text == \"\") return e.value.length; return e.value.lastIndexOf(t.text) } else return e.selectionStart }; e.fn.setSelection = function (e, t) { if (typeof t == \"number\") t = [t, t]; if (t && t.constructor == Array && t.length == 2) { if (e.createTextRange) { var n = e.createTextRange(); n.collapse(true); n.moveStart(\"character\", t[0]); n.moveEnd(\"character\", t[1]); n.select() } else if (e.setSelectionRange) { e.focus(); e.setSelectionRange(t[0], t[1]) } } } })(jQuery)\n\n \n\n /*! waitForImages jQuery Plugin 2013-07-20 */\n\n !function (a) { var b = \"waitForImages\"; a.waitForImages = { hasImageProperties: [\"backgroundImage\", \"listStyleImage\", \"borderImage\", \"borderCornerImage\", \"cursor\"] }, a.expr[\":\"].uncached = function (b) { if (!a(b).is('img[src!=\"\"]')) return !1; var c = new Image; return c.src = b.src, !c.complete }, a.fn.waitForImages = function (c, d, e) { var f = 0, g = 0; if (a.isPlainObject(arguments[0]) && (e = arguments[0].waitForAll, d = arguments[0].each, c = arguments[0].finished), c = c || a.noop, d = d || a.noop, e = !!e, !a.isFunction(c) || !a.isFunction(d)) throw new TypeError(\"An invalid callback was supplied.\"); return this.each(function () { var h = a(this), i = [], j = a.waitForImages.hasImageProperties || [], k = /url\\(\\s*(['\"]?)(.*?)\\1\\s*\\)/g; e ? h.find(\"*\").addBack().each(function () { var b = a(this); b.is(\"img:uncached\") && i.push({ src: b.attr(\"src\"), element: b[0] }), a.each(j, function (a, c) { var d, e = b.css(c); if (!e) return !0; for (; d = k.exec(e) ;) i.push({ src: d[2], element: b[0] }) }) }) : h.find(\"img:uncached\").each(function () { i.push({ src: this.src, element: this }) }), f = i.length, g = 0, 0 === f && c.call(h[0]), a.each(i, function (e, i) { var j = new Image; a(j).on(\"load.\" + b + \" error.\" + b, function (a) { return g++, d.call(i.element, g, f, \"load\" == a.type), g == f ? (c.call(h[0]), !1) : void 0 }), j.src = i.src }) }) } }(jQuery);\n\n \n\n //! moment.js\n\n //! version : 2.10.3\n\n //! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n\n //! license : MIT\n\n //! momentjs.com\n\n !function (a, b) { \"object\" == typeof exports && \"undefined\" != typeof module ? module.exports = b() : \"function\" == typeof define && define.amd ? define(b) : a.moment = b() }(this, function () {\n\n \"use strict\"; function a() {\n\n return Dc.apply(null, arguments)\n\n } function b(a) {\n\n Dc = a\n\n } function c(a) {\n\n return \"[object Array]\" === Object.prototype.toString.call(a)\n\n } function d(a) {\n\n return a instanceof Date || \"[object Date]\" === Object.prototype.toString.call(a)\n\n } function e(a, b) {\n\n var c, d = []; for (c = 0; c < a.length; ++c) d.push(b(a[c], c)); return d\n\n } function f(a, b) {\n\n return Object.prototype.hasOwnProperty.call(a, b)\n\n } function g(a, b) {\n\n for (var c in b) f(b, c) && (a[c] = b[c]); return f(b, \"toString\") && (a.toString = b.toString), f(b, \"valueOf\") && (a.valueOf = b.valueOf), a\n\n } function h(a, b, c, d) {\n\n return za(a, b, c, d, !0).utc()\n\n } function i() {\n\n return { empty: !1, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: !1, invalidMonth: null, invalidFormat: !1, userInvalidated: !1, iso: !1 }\n\n } function j(a) {\n\n return null == a._pf && (a._pf = i()), a._pf\n\n } function k(a) {\n\n if (null == a._isValid) { var b = j(a); a._isValid = !isNaN(a._d.getTime()) && b.overflow < 0 && !b.empty && !b.invalidMonth && !b.nullInput && !b.invalidFormat && !b.userInvalidated, a._strict && (a._isValid = a._isValid && 0 === b.charsLeftOver && 0 === b.unusedTokens.length && void 0 === b.bigHour) } return a._isValid\n\n } function l(a) {\n\n var b = h(0 / 0); return null != a ? g(j(b), a) : j(b).userInvalidated = !0, b\n\n } function m(a, b) {\n\n var c, d, e; if (\"undefined\" != typeof b._isAMomentObject && (a._isAMomentObject = b._isAMomentObject), \"undefined\" != typeof b._i && (a._i = b._i), \"undefined\" != typeof b._f && (a._f = b._f), \"undefined\" != typeof b._l && (a._l = b._l), \"undefined\" != typeof b._strict && (a._strict = b._strict), \"undefined\" != typeof b._tzm && (a._tzm = b._tzm), \"undefined\" != typeof b._isUTC && (a._isUTC = b._isUTC), \"undefined\" != typeof b._offset && (a._offset = b._offset), \"undefined\" != typeof b._pf && (a._pf = j(b)), \"undefined\" != typeof b._locale && (a._locale = b._locale), Fc.length > 0) for (c in Fc) d = Fc[c], e = b[d], \"undefined\" != typeof e && (a[d] = e); return a\n\n } function n(b) {\n\n m(this, b), this._d = new Date(+b._d), Gc === !1 && (Gc = !0, a.updateOffset(this), Gc = !1)\n\n } function o(a) {\n\n return a instanceof n || null != a && null != a._isAMomentObject\n\n } function p(a) {\n\n var b = +a, c = 0; return 0 !== b && isFinite(b) && (c = b >= 0 ? Math.floor(b) : Math.ceil(b)), c\n\n } function q(a, b, c) {\n\n var d, e = Math.min(a.length, b.length), f = Math.abs(a.length - b.length), g = 0; for (d = 0; e > d; d++) (c && a[d] !== b[d] || !c && p(a[d]) !== p(b[d])) && g++; return g + f\n\n } function r() {\n\n } function s(a) {\n\n return a ? a.toLowerCase().replace(\"_\", \"-\") : a\n\n } function t(a) {\n\n for (var b, c, d, e, f = 0; f < a.length;) { for (e = s(a[f]).split(\"-\"), b = e.length, c = s(a[f + 1]), c = c ? c.split(\"-\") : null; b > 0;) { if (d = u(e.slice(0, b).join(\"-\"))) return d; if (c && c.length >= b && q(e, c, !0) >= b - 1) break; b-- } f++ } return null\n\n } function u(a) {\n\n var b = null; if (!Hc[a] && \"undefined\" != typeof module && module && module.exports) try { b = Ec._abbr, require(\"./locale/\" + a), v(b) } catch (c) { } return Hc[a]\n\n } function v(a, b) {\n\n var c; return a && (c = \"undefined\" == typeof b ? x(a) : w(a, b), c && (Ec = c)), Ec._abbr\n\n } function w(a, b) {\n\n return null !== b ? (b.abbr = a, Hc[a] || (Hc[a] = new r), Hc[a].set(b), v(a), Hc[a]) : (delete Hc[a], null)\n\n } function x(a) {\n\n var b; if (a && a._locale && a._locale._abbr && (a = a._locale._abbr), !a) return Ec; if (!c(a)) { if (b = u(a)) return b; a = [a] } return t(a)\n\n } function y(a, b) {\n\n var c = a.toLowerCase(); Ic[c] = Ic[c + \"s\"] = Ic[b] = a\n\n } function z(a) {\n\n return \"string\" == typeof a ? Ic[a] || Ic[a.toLowerCase()] : void 0\n\n } function A(a) {\n\n var b, c, d = {}; for (c in a) f(a, c) && (b = z(c), b && (d[b] = a[c])); return d\n\n } function B(b, c) {\n\n return function (d) { return null != d ? (D(this, b, d), a.updateOffset(this, c), this) : C(this, b) }\n\n } function C(a, b) {\n\n return a._d[\"get\" + (a._isUTC ? \"UTC\" : \"\") + b]()\n\n } function D(a, b, c) {\n\n return a._d[\"set\" + (a._isUTC ? \"UTC\" : \"\") + b](c)\n\n } function E(a, b) {\n\n var c; if (\"object\" == typeof a) for (c in a) this.set(c, a[c]); else if (a = z(a), \"function\" == typeof this[a]) return this[a](b); return this\n\n } function F(a, b, c) {\n\n for (var d = \"\" + Math.abs(a), e = a >= 0; d.length < b;) d = \"0\" + d; return (e ? c ? \"+\" : \"\" : \"-\") + d\n\n } function G(a, b, c, d) {\n\n var e = d; \"string\" == typeof d && (e = function () { return this[d]() }), a && (Mc[a] = e), b && (Mc[b[0]] = function () { return F(e.apply(this, arguments), b[1], b[2]) }), c && (Mc[c] = function () { return this.localeData().ordinal(e.apply(this, arguments), a) })\n\n } function H(a) {\n\n return a.match(/\\[[\\s\\S]/) ? a.replace(/^\\[|\\]$/g, \"\") : a.replace(/\\\\/g, \"\")\n\n } function I(a) {\n\n var b, c, d = a.match(Jc); for (b = 0, c = d.length; c > b; b++) Mc[d[b]] ? d[b] = Mc[d[b]] : d[b] = H(d[b]); return function (e) { var f = \"\"; for (b = 0; c > b; b++) f += d[b] instanceof Function ? d[b].call(e, a) : d[b]; return f }\n\n } function J(a, b) {\n\n return a.isValid() ? (b = K(b, a.localeData()), Lc[b] || (Lc[b] = I(b)), Lc[b](a)) : a.localeData().invalidDate()\n\n } function K(a, b) {\n\n function c(a) { return b.longDateFormat(a) || a } var d = 5; for (Kc.lastIndex = 0; d >= 0 && Kc.test(a) ;) a = a.replace(Kc, c), Kc.lastIndex = 0, d -= 1; return a\n\n } function L(a, b, c) {\n\n _c[a] = \"function\" == typeof b ? b : function (a) { return a && c ? c : b }\n\n } function M(a, b) {\n\n return f(_c, a) ? _c[a](b._strict, b._locale) : new RegExp(N(a))\n\n } function N(a) {\n\n return a.replace(\"\\\\\", \"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (a, b, c, d, e) { return b || c || d || e }).replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\")\n\n } function O(a, b) {\n\n var c, d = b; for (\"string\" == typeof a && (a = [a]), \"number\" == typeof b && (d = function (a, c) { c[b] = p(a) }), c = 0; c < a.length; c++) ad[a[c]] = d\n\n } function P(a, b) {\n\n O(a, function (a, c, d, e) { d._w = d._w || {}, b(a, d._w, d, e) })\n\n } function Q(a, b, c) {\n\n null != b && f(ad, a) && ad[a](b, c._a, c, a)\n\n } function R(a, b) {\n\n return new Date(Date.UTC(a, b + 1, 0)).getUTCDate()\n\n } function S(a) {\n\n return this._months[a.month()]\n\n } function T(a) {\n\n return this._monthsShort[a.month()]\n\n } function U(a, b, c) {\n\n var d, e, f; for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), d = 0; 12 > d; d++) { if (e = h([2e3, d]), c && !this._longMonthsParse[d] && (this._longMonthsParse[d] = new RegExp(\"^\" + this.months(e, \"\").replace(\".\", \"\") + \"$\", \"i\"), this._shortMonthsParse[d] = new RegExp(\"^\" + this.monthsShort(e, \"\").replace(\".\", \"\") + \"$\", \"i\")), c || this._monthsParse[d] || (f = \"^\" + this.months(e, \"\") + \"|^\" + this.monthsShort(e, \"\"), this._monthsParse[d] = new RegExp(f.replace(\".\", \"\"), \"i\")), c && \"MMMM\" === b && this._longMonthsParse[d].test(a)) return d; if (c && \"MMM\" === b && this._shortMonthsParse[d].test(a)) return d; if (!c && this._monthsParse[d].test(a)) return d }\n\n } function V(a, b) {\n\n var c; return \"string\" == typeof b && (b = a.localeData().monthsParse(b), \"number\" != typeof b) ? a : (c = Math.min(a.date(), R(a.year(), b)), a._d[\"set\" + (a._isUTC ? \"UTC\" : \"\") + \"Month\"](b, c), a)\n\n } function W(b) {\n\n return null != b ? (V(this, b), a.updateOffset(this, !0), this) : C(this, \"Month\")\n\n } function X() {\n\n return R(this.year(), this.month())\n\n } function Y(a) {\n\n var b, c = a._a; return c && -2 === j(a).overflow && (b = c[cd] < 0 || c[cd] > 11 ? cd : c[dd] < 1 || c[dd] > R(c[bd], c[cd]) ? dd : c[ed] < 0 || c[ed] > 24 || 24 === c[ed] && (0 !== c[fd] || 0 !== c[gd] || 0 !== c[hd]) ? ed : c[fd] < 0 || c[fd] > 59 ? fd : c[gd] < 0 || c[gd] > 59 ? gd : c[hd] < 0 || c[hd] > 999 ? hd : -1, j(a)._overflowDayOfYear && (bd > b || b > dd) && (b = dd), j(a).overflow = b), a\n\n } function Z(b) {\n\n a.suppressDeprecationWarnings === !1 && \"undefined\" != typeof console && console.warn && console.warn(\"Deprecation warning: \" + b)\n\n } function $(a, b) {\n\n var c = !0, d = a + \"\\n\" + (new Error).stack; return g(function () { return c && (Z(d), c = !1), b.apply(this, arguments) }, b)\n\n } function _(a, b) {\n\n kd[a] || (Z(b), kd[a] = !0)\n\n } function aa(a) {\n\n var b, c, d = a._i, e = ld.exec(d); if (e) { for (j(a).iso = !0, b = 0, c = md.length; c > b; b++) if (md[b][1].exec(d)) { a._f = md[b][0] + (e[6] || \" \"); break } for (b = 0, c = nd.length; c > b; b++) if (nd[b][1].exec(d)) { a._f += nd[b][0]; break } d.match(Yc) && (a._f += \"Z\"), ta(a) } else a._isValid = !1\n\n } function ba(b) {\n\n var c = od.exec(b._i); return null !== c ? void (b._d = new Date(+c[1])) : (aa(b), void (b._isValid === !1 && (delete b._isValid, a.createFromInputFallback(b))))\n\n } function ca(a, b, c, d, e, f, g) {\n\n var h = new Date(a, b, c, d, e, f, g); return 1970 > a && h.setFullYear(a), h\n\n } function da(a) {\n\n var b = new Date(Date.UTC.apply(null, arguments)); return 1970 > a && b.setUTCFullYear(a), b\n\n } function ea(a) {\n\n return fa(a) ? 366 : 365\n\n } function fa(a) {\n\n return a % 4 === 0 && a % 100 !== 0 || a % 400 === 0\n\n } function ga() {\n\n return fa(this.year())\n\n } function ha(a, b, c) {\n\n var d, e = c - b, f = c - a.day(); return f > e && (f -= 7), e - 7 > f && (f += 7), d = Aa(a).add(f, \"d\"), { week: Math.ceil(d.dayOfYear() / 7), year: d.year() }\n\n } function ia(a) {\n\n return ha(a, this._week.dow, this._week.doy).week\n\n } function ja() {\n\n return this._week.dow\n\n } function ka() {\n\n return this._week.doy\n\n } function la(a) {\n\n var b = this.localeData().week(this); return null == a ? b : this.add(7 * (a - b), \"d\")\n\n } function ma(a) {\n\n var b = ha(this, 1, 4).week; return null == a ? b : this.add(7 * (a - b), \"d\")\n\n } function na(a, b, c, d, e) {\n\n var f, g, h = da(a, 0, 1).getUTCDay(); return h = 0 === h ? 7 : h, c = null != c ? c : e, f = e - h + (h > d ? 7 : 0) - (e > h ? 7 : 0), g = 7 * (b - 1) + (c - e) + f + 1, { year: g > 0 ? a : a - 1, dayOfYear: g > 0 ? g : ea(a - 1) + g }\n\n } function oa(a) {\n\n var b = Math.round((this.clone().startOf(\"day\") - this.clone().startOf(\"year\")) / 864e5) + 1; return null == a ? b : this.add(a - b, \"d\")\n\n } function pa(a, b, c) {\n\n return null != a ? a : null != b ? b : c\n\n } function qa(a) {\n\n var b = new Date; return a._useUTC ? [b.getUTCFullYear(), b.getUTCMonth(), b.getUTCDate()] : [b.getFullYear(), b.getMonth(), b.getDate()]\n\n } function ra(a) {\n\n var b, c, d, e, f = []; if (!a._d) { for (d = qa(a), a._w && null == a._a[dd] && null == a._a[cd] && sa(a), a._dayOfYear && (e = pa(a._a[bd], d[bd]), a._dayOfYear > ea(e) && (j(a)._overflowDayOfYear = !0), c = da(e, 0, a._dayOfYear), a._a[cd] = c.getUTCMonth(), a._a[dd] = c.getUTCDate()), b = 0; 3 > b && null == a._a[b]; ++b) a._a[b] = f[b] = d[b]; for (; 7 > b; b++) a._a[b] = f[b] = null == a._a[b] ? 2 === b ? 1 : 0 : a._a[b]; 24 === a._a[ed] && 0 === a._a[fd] && 0 === a._a[gd] && 0 === a._a[hd] && (a._nextDay = !0, a._a[ed] = 0), a._d = (a._useUTC ? da : ca).apply(null, f), null != a._tzm && a._d.setUTCMinutes(a._d.getUTCMinutes() - a._tzm), a._nextDay && (a._a[ed] = 24) }\n\n } function sa(a) {\n\n var b, c, d, e, f, g, h; b = a._w, null != b.GG || null != b.W || null != b.E ? (f = 1, g = 4, c = pa(b.GG, a._a[bd], ha(Aa(), 1, 4).year), d = pa(b.W, 1), e = pa(b.E, 1)) : (f = a._locale._week.dow, g = a._locale._week.doy, c = pa(b.gg, a._a[bd], ha(Aa(), f, g).year), d = pa(b.w, 1), null != b.d ? (e = b.d, f > e && ++d) : e = null != b.e ? b.e + f : f), h = na(c, d, e, g, f), a._a[bd] = h.year, a._dayOfYear = h.dayOfYear\n\n } function ta(b) {\n\n if (b._f === a.ISO_8601) return void aa(b); b._a = [], j(b).empty = !0; var c, d, e, f, g, h = \"\" + b._i, i = h.length, k = 0; for (e = K(b._f, b._locale).match(Jc) || [], c = 0; c < e.length; c++) f = e[c], d = (h.match(M(f, b)) || [])[0], d && (g = h.substr(0, h.indexOf(d)), g.length > 0 && j(b).unusedInput.push(g), h = h.slice(h.indexOf(d) + d.length), k += d.length), Mc[f] ? (d ? j(b).empty = !1 : j(b).unusedTokens.push(f), Q(f, d, b)) : b._strict && !d && j(b).unusedTokens.push(f); j(b).charsLeftOver = i - k, h.length > 0 && j(b).unusedInput.push(h), j(b).bigHour === !0 && b._a[ed] <= 12 && b._a[ed] > 0 && (j(b).bigHour = void 0), b._a[ed] = ua(b._locale, b._a[ed], b._meridiem), ra(b), Y(b)\n\n } function ua(a, b, c) {\n\n var d; return null == c ? b : null != a.meridiemHour ? a.meridiemHour(b, c) : null != a.isPM ? (d = a.isPM(c), d && 12 > b && (b += 12), d || 12 !== b || (b = 0), b) : b\n\n } function va(a) {\n\n var b, c, d, e, f; if (0 === a._f.length) return j(a).invalidFormat = !0, void (a._d = new Date(0 / 0)); for (e = 0; e < a._f.length; e++) f = 0, b = m({}, a), null != a._useUTC && (b._useUTC = a._useUTC), b._f = a._f[e], ta(b), k(b) && (f += j(b).charsLeftOver, f += 10 * j(b).unusedTokens.length, j(b).score = f, (null == d || d > f) && (d = f, c = b)); g(a, c || b)\n\n } function wa(a) {\n\n if (!a._d) { var b = A(a._i); a._a = [b.year, b.month, b.day || b.date, b.hour, b.minute, b.second, b.millisecond], ra(a) }\n\n } function xa(a) {\n\n var b, e = a._i, f = a._f; return a._locale = a._locale || x(a._l), null === e || void 0 === f && \"\" === e ? l({ nullInput: !0 }) : (\"string\" == typeof e && (a._i = e = a._locale.preparse(e)), o(e) ? new n(Y(e)) : (c(f) ? va(a) : f ? ta(a) : d(e) ? a._d = e : ya(a), b = new n(Y(a)), b._nextDay && (b.add(1, \"d\"), b._nextDay = void 0), b))\n\n } function ya(b) {\n\n var f = b._i; void 0 === f ? b._d = new Date : d(f) ? b._d = new Date(+f) : \"string\" == typeof f ? ba(b) : c(f) ? (b._a = e(f.slice(0), function (a) { return parseInt(a, 10) }), ra(b)) : \"object\" == typeof f ? wa(b) : \"number\" == typeof f ? b._d = new Date(f) : a.createFromInputFallback(b)\n\n } function za(a, b, c, d, e) {\n\n var f = {}; return \"boolean\" == typeof c && (d = c, c = void 0), f._isAMomentObject = !0, f._useUTC = f._isUTC = e, f._l = c, f._i = a, f._f = b, f._strict = d, xa(f)\n\n } function Aa(a, b, c, d) {\n\n return za(a, b, c, d, !1)\n\n } function Ba(a, b) {\n\n var d, e; if (1 === b.length && c(b[0]) && (b = b[0]), !b.length) return Aa(); for (d = b[0], e = 1; e < b.length; ++e) b[e][a](d) && (d = b[e]); return d\n\n } function Ca() {\n\n var a = [].slice.call(arguments, 0); return Ba(\"isBefore\", a)\n\n } function Da() {\n\n var a = [].slice.call(arguments, 0); return Ba(\"isAfter\", a)\n\n } function Ea(a) {\n\n var b = A(a), c = b.year || 0, d = b.quarter || 0, e = b.month || 0, f = b.week || 0, g = b.day || 0, h = b.hour || 0, i = b.minute || 0, j = b.second || 0, k = b.millisecond || 0; this._milliseconds = +k + 1e3 * j + 6e4 * i + 36e5 * h, this._days = +g + 7 * f, this._months = +e + 3 * d + 12 * c, this._data = {}, this._locale = x(), this._bubble()\n\n } function Fa(a) {\n\n return a instanceof Ea\n\n } function Ga(a, b) {\n\n G(a, 0, 0, function () { var a = this.utcOffset(), c = \"+\"; return 0 > a && (a = -a, c = \"-\"), c + F(~~(a / 60), 2) + b + F(~~a % 60, 2) })\n\n } function Ha(a) {\n\n var b = (a || \"\").match(Yc) || [], c = b[b.length - 1] || [], d = (c + \"\").match(td) || [\"-\", 0, 0], e = +(60 * d[1]) + p(d[2]); return \"+\" === d[0] ? e : -e\n\n } function Ia(b, c) {\n\n var e, f; return c._isUTC ? (e = c.clone(), f = (o(b) || d(b) ? +b : +Aa(b)) - +e, e._d.setTime(+e._d + f), a.updateOffset(e, !1), e) : Aa(b).local(); return c._isUTC ? Aa(b).zone(c._offset || 0) : Aa(b).local()\n\n } function Ja(a) {\n\n return 15 * -Math.round(a._d.getTimezoneOffset() / 15)\n\n } function Ka(b, c) {\n\n var d, e = this._offset || 0; return null != b ? (\"string\" == typeof b && (b = Ha(b)), Math.abs(b) < 16 && (b = 60 * b), !this._isUTC && c && (d = Ja(this)), this._offset = b, this._isUTC = !0, null != d && this.add(d, \"m\"), e !== b && (!c || this._changeInProgress ? $a(this, Va(b - e, \"m\"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, a.updateOffset(this, !0), this._changeInProgress = null)), this) : this._isUTC ? e : Ja(this)\n\n } function La(a, b) {\n\n return null != a ? (\"string\" != typeof a && (a = -a), this.utcOffset(a, b), this) : -this.utcOffset()\n\n } function Ma(a) {\n\n return this.utcOffset(0, a)\n\n } function Na(a) {\n\n return this._isUTC && (this.utcOffset(0, a), this._isUTC = !1, a && this.subtract(Ja(this), \"m\")), this\n\n } function Oa() {\n\n return this._tzm ? this.utcOffset(this._tzm) : \"string\" == typeof this._i && this.utcOffset(Ha(this._i)), this\n\n } function Pa(a) {\n\n return a = a ? Aa(a).utcOffset() : 0, (this.utcOffset() - a) % 60 === 0\n\n } function Qa() {\n\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset()\n\n } function Ra() {\n\n if (this._a) { var a = this._isUTC ? h(this._a) : Aa(this._a); return this.isValid() && q(this._a, a.toArray()) > 0 } return !1\n\n } function Sa() {\n\n return !this._isUTC\n\n } function Ta() {\n\n return this._isUTC\n\n } function Ua() {\n\n return this._isUTC && 0 === this._offset\n\n } function Va(a, b) {\n\n var c, d, e, g = a, h = null; return Fa(a) ? g = { ms: a._milliseconds, d: a._days, M: a._months } : \"number\" == typeof a ? (g = {}, b ? g[b] = a : g.milliseconds = a) : (h = ud.exec(a)) ? (c = \"-\" === h[1] ? -1 : 1, g = { y: 0, d: p(h[dd]) * c, h: p(h[ed]) * c, m: p(h[fd]) * c, s: p(h[gd]) * c, ms: p(h[hd]) * c }) : (h = vd.exec(a)) ? (c = \"-\" === h[1] ? -1 : 1, g = { y: Wa(h[2], c), M: Wa(h[3], c), d: Wa(h[4], c), h: Wa(h[5], c), m: Wa(h[6], c), s: Wa(h[7], c), w: Wa(h[8], c) }) : null == g ? g = {} : \"object\" == typeof g && (\"from\" in g || \"to\" in g) && (e = Ya(Aa(g.from), Aa(g.to)), g = {}, g.ms = e.milliseconds, g.M = e.months), d = new Ea(g), Fa(a) && f(a, \"_locale\") && (d._locale = a._locale), d\n\n } function Wa(a, b) {\n\n var c = a && parseFloat(a.replace(\",\", \".\")); return (isNaN(c) ? 0 : c) * b\n\n } function Xa(a, b) {\n\n var c = { milliseconds: 0, months: 0 }; return c.months = b.month() - a.month() + 12 * (b.year() - a.year()), a.clone().add(c.months, \"M\").isAfter(b) && --c.months, c.milliseconds = +b - +a.clone().add(c.months, \"M\"), c\n\n } function Ya(a, b) {\n\n var c; return b = Ia(b, a), a.isBefore(b) ? c = Xa(a, b) : (c = Xa(b, a), c.milliseconds = -c.milliseconds, c.months = -c.months), c\n\n } function Za(a, b) {\n\n return function (c, d) { var e, f; return null === d || isNaN(+d) || (_(b, \"moment().\" + b + \"(period, number) is deprecated. Please use moment().\" + b + \"(number, period).\"), f = c, c = d, d = f), c = \"string\" == typeof c ? +c : c, e = Va(c, d), $a(this, e, a), this }\n\n } function $a(b, c, d, e) {\n\n var f = c._milliseconds, g = c._days, h = c._months; e = null == e ? !0 : e, f && b._d.setTime(+b._d + f * d), g && D(b, \"Date\", C(b, \"Date\") + g * d), h && V(b, C(b, \"Month\") + h * d), e && a.updateOffset(b, g || h)\n\n } function _a(a) {\n\n var b = a || Aa(), c = Ia(b, this).startOf(\"day\"), d = this.diff(c, \"days\", !0), e = -6 > d ? \"sameElse\" : -1 > d ? \"lastWeek\" : 0 > d ? \"lastDay\" : 1 > d ? \"sameDay\" : 2 > d ? \"nextDay\" : 7 > d ? \"nextWeek\" : \"sameElse\"; return this.format(this.localeData().calendar(e, this, Aa(b)))\n\n } function ab() {\n\n return new n(this)\n\n } function bb(a, b) {\n\n var c; return b = z(\"undefined\" != typeof b ? b : \"millisecond\"), \"millisecond\" === b ? (a = o(a) ? a : Aa(a), +this > +a) : (c = o(a) ? +a : +Aa(a), c < +this.clone().startOf(b))\n\n } function cb(a, b) {\n\n var c; return b = z(\"undefined\" != typeof b ? b : \"millisecond\"), \"millisecond\" === b ? (a = o(a) ? a : Aa(a), +a > +this) : (c = o(a) ? +a : +Aa(a), +this.clone().endOf(b) < c)\n\n } function db(a, b, c) {\n\n return this.isAfter(a, c) && this.isBefore(b, c)\n\n } function eb(a, b) {\n\n var c; return b = z(b || \"millisecond\"), \"millisecond\" === b ? (a = o(a) ? a : Aa(a), +this === +a) : (c = +Aa(a), +this.clone().startOf(b) <= c && c <= +this.clone().endOf(b))\n\n } function fb(a) {\n\n return 0 > a ? Math.ceil(a) : Math.floor(a)\n\n } function gb(a, b, c) {\n\n var d, e, f = Ia(a, this), g = 6e4 * (f.utcOffset() - this.utcOffset()); return b = z(b), \"year\" === b || \"month\" === b || \"quarter\" === b ? (e = hb(this, f), \"quarter\" === b ? e /= 3 : \"year\" === b && (e /= 12)) : (d = this - f, e = \"second\" === b ? d / 1e3 : \"minute\" === b ? d / 6e4 : \"hour\" === b ? d / 36e5 : \"day\" === b ? (d - g) / 864e5 : \"week\" === b ? (d - g) / 6048e5 : d), c ? e : fb(e)\n\n } function hb(a, b) {\n\n var c, d, e = 12 * (b.year() - a.year()) + (b.month() - a.month()), f = a.clone().add(e, \"months\"); return 0 > b - f ? (c = a.clone().add(e - 1, \"months\"), d = (b - f) / (f - c)) : (c = a.clone().add(e + 1, \"months\"), d = (b - f) / (c - f)), -(e + d)\n\n } function ib() {\n\n return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\")\n\n } function jb() {\n\n var a = this.clone().utc(); return 0 < a.year() && a.year() <= 9999 ? \"function\" == typeof Date.prototype.toISOString ? this.toDate().toISOString() : J(a, \"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\") : J(a, \"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\")\n\n } function kb(b) {\n\n var c = J(this, b || a.defaultFormat); return this.localeData().postformat(c)\n\n } function lb(a, b) {\n\n return this.isValid() ? Va({ to: this, from: a }).locale(this.locale()).humanize(!b) : this.localeData().invalidDate()\n\n } function mb(a) {\n\n return this.from(Aa(), a)\n\n } function nb(a, b) {\n\n return this.isValid() ? Va({ from: this, to: a }).locale(this.locale()).humanize(!b) : this.localeData().invalidDate()\n\n } function ob(a) {\n\n return this.to(Aa(), a)\n\n } function pb(a) {\n\n var b; return void 0 === a ? this._locale._abbr : (b = x(a), null != b && (this._locale = b), this)\n\n } function qb() {\n\n return this._locale\n\n } function rb(a) {\n\n switch (a = z(a)) { case \"year\": this.month(0); case \"quarter\": case \"month\": this.date(1); case \"week\": case \"isoWeek\": case \"day\": this.hours(0); case \"hour\": this.minutes(0); case \"minute\": this.seconds(0); case \"second\": this.milliseconds(0) } return \"week\" === a && this.weekday(0), \"isoWeek\" === a && this.isoWeekday(1), \"quarter\" === a && this.month(3 * Math.floor(this.month() / 3)), this\n\n } function sb(a) {\n\n return a = z(a), void 0 === a || \"millisecond\" === a ? this : this.startOf(a).add(1, \"isoWeek\" === a ? \"week\" : a).subtract(1, \"ms\")\n\n } function tb() {\n\n return +this._d - 6e4 * (this._offset || 0)\n\n } function ub() {\n\n return Math.floor(+this / 1e3)\n\n } function vb() {\n\n return this._offset ? new Date(+this) : this._d\n\n } function wb() {\n\n var a = this; return [a.year(), a.month(), a.date(), a.hour(), a.minute(), a.second(), a.millisecond()]\n\n } function xb() {\n\n return k(this)\n\n } function yb() {\n\n return g({}, j(this))\n\n } function zb() {\n\n return j(this).overflow\n\n } function Ab(a, b) {\n\n G(0, [a, a.length], 0, b)\n\n } function Bb(a, b, c) {\n\n return ha(Aa([a, 11, 31 + b - c]), b, c).week\n\n } function Cb(a) {\n\n var b = ha(this, this.localeData()._week.dow, this.localeData()._week.doy).year; return null == a ? b : this.add(a - b, \"y\")\n\n } function Db(a) {\n\n var b = ha(this, 1, 4).year; return null == a ? b : this.add(a - b, \"y\")\n\n } function Eb() {\n\n return Bb(this.year(), 1, 4)\n\n } function Fb() {\n\n var a = this.localeData()._week; return Bb(this.year(), a.dow, a.doy)\n\n } function Gb(a) {\n\n return null == a ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (a - 1) + this.month() % 3)\n\n } function Hb(a, b) {\n\n if (\"string\" == typeof a) if (isNaN(a)) { if (a = b.weekdaysParse(a), \"number\" != typeof a) return null } else a = parseInt(a, 10); return a\n\n } function Ib(a) {\n\n return this._weekdays[a.day()]\n\n } function Jb(a) {\n\n return this._weekdaysShort[a.day()]\n\n } function Kb(a) {\n\n return this._weekdaysMin[a.day()]\n\n } function Lb(a) {\n\n var b, c, d; for (this._weekdaysParse || (this._weekdaysParse = []), b = 0; 7 > b; b++) if (this._weekdaysParse[b] || (c = Aa([2e3, 1]).day(b), d = \"^\" + this.weekdays(c, \"\") + \"|^\" + this.weekdaysShort(c, \"\") + \"|^\" + this.weekdaysMin(c, \"\"), this._weekdaysParse[b] = new RegExp(d.replace(\".\", \"\"), \"i\")), this._weekdaysParse[b].test(a)) return b\n\n } function Mb(a) {\n\n var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); return null != a ? (a = Hb(a, this.localeData()), this.add(a - b, \"d\")) : b\n\n } function Nb(a) {\n\n var b = (this.day() + 7 - this.localeData()._week.dow) % 7; return null == a ? b : this.add(a - b, \"d\")\n\n } function Ob(a) {\n\n return null == a ? this.day() || 7 : this.day(this.day() % 7 ? a : a - 7)\n\n } function Pb(a, b) {\n\n G(a, 0, 0, function () { return this.localeData().meridiem(this.hours(), this.minutes(), b) })\n\n } function Qb(a, b) {\n\n return b._meridiemParse\n\n } function Rb(a) {\n\n return \"p\" === (a + \"\").toLowerCase().charAt(0)\n\n } function Sb(a, b, c) {\n\n return a > 11 ? c ? \"pm\" : \"PM\" : c ? \"am\" : \"AM\"\n\n } function Tb(a) {\n\n G(0, [a, 3], 0, \"millisecond\")\n\n } function Ub() {\n\n return this._isUTC ? \"UTC\" : \"\"\n\n } function Vb() {\n\n return this._isUTC ? \"Coordinated Universal Time\" : \"\"\n\n } function Wb(a) {\n\n return Aa(1e3 * a)\n\n } function Xb() {\n\n return Aa.apply(null, arguments).parseZone()\n\n } function Yb(a, b, c) {\n\n var d = this._calendar[a]; return \"function\" == typeof d ? d.call(b, c) : d\n\n } function Zb(a) {\n\n var b = this._longDateFormat[a]; return !b && this._longDateFormat[a.toUpperCase()] && (b = this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (a) { return a.slice(1) }), this._longDateFormat[a] = b), b\n\n } function $b() {\n\n return this._invalidDate\n\n } function _b(a) {\n\n return this._ordinal.replace(\"%d\", a)\n\n } function ac(a) {\n\n return a\n\n } function bc(a, b, c, d) {\n\n var e = this._relativeTime[c]; return \"function\" == typeof e ? e(a, b, c, d) : e.replace(/%d/i, a)\n\n } function cc(a, b) {\n\n var c = this._relativeTime[a > 0 ? \"future\" : \"past\"]; return \"function\" == typeof c ? c(b) : c.replace(/%s/i, b)\n\n } function dc(a) {\n\n var b, c; for (c in a) b = a[c], \"function\" == typeof b ? this[c] = b : this[\"_\" + c] = b; this._ordinalParseLenient = new RegExp(this._ordinalParse.source + \"|\" + /\\d{1,2}/.source)\n\n } function ec(a, b, c, d) {\n\n var e = x(), f = h().set(d, b); return e[c](f, a)\n\n } function fc(a, b, c, d, e) {\n\n if (\"number\" == typeof a && (b = a, a = void 0), a = a || \"\", null != b) return ec(a, b, c, e); var f, g = []; for (f = 0; d > f; f++) g[f] = ec(a, f, c, e); return g\n\n } function gc(a, b) {\n\n return fc(a, b, \"months\", 12, \"month\")\n\n } function hc(a, b) {\n\n return fc(a, b, \"monthsShort\", 12, \"month\")\n\n } function ic(a, b) {\n\n return fc(a, b, \"weekdays\", 7, \"day\")\n\n } function jc(a, b) {\n\n return fc(a, b, \"weekdaysShort\", 7, \"day\")\n\n } function kc(a, b) {\n\n return fc(a, b, \"weekdaysMin\", 7, \"day\")\n\n } function lc() {\n\n var a = this._data; return this._milliseconds = Rd(this._milliseconds), this._days = Rd(this._days), this._months = Rd(this._months), a.milliseconds = Rd(a.milliseconds), a.seconds = Rd(a.seconds), a.minutes = Rd(a.minutes), a.hours = Rd(a.hours), a.months = Rd(a.months), a.years = Rd(a.years), this\n\n } function mc(a, b, c, d) {\n\n var e = Va(b, c); return a._milliseconds += d * e._milliseconds, a._days += d * e._days, a._months += d * e._months, a._bubble()\n\n } function nc(a, b) {\n\n return mc(this, a, b, 1)\n\n } function oc(a, b) {\n\n return mc(this, a, b, -1)\n\n } function pc() {\n\n var a, b, c, d = this._milliseconds, e = this._days, f = this._months, g = this._data, h = 0; return g.milliseconds = d % 1e3, a = fb(d / 1e3), g.seconds = a % 60, b = fb(a / 60), g.minutes = b % 60, c = fb(b / 60), g.hours = c % 24, e += fb(c / 24), h = fb(qc(e)), e -= fb(rc(h)), f += fb(e / 30), e %= 30, h += fb(f / 12), f %= 12, g.days = e, g.months = f, g.years = h, this\n\n } function qc(a) {\n\n return 400 * a / 146097\n\n } function rc(a) {\n\n return 146097 * a / 400\n\n } function sc(a) {\n\n var b, c, d = this._milliseconds; if (a = z(a), \"month\" === a || \"year\" === a) return b = this._days + d / 864e5, c = this._months + 12 * qc(b), \"month\" === a ? c : c / 12; switch (b = this._days + Math.round(rc(this._months / 12)), a) { case \"week\": return b / 7 + d / 6048e5; case \"day\": return b + d / 864e5; case \"hour\": return 24 * b + d / 36e5; case \"minute\": return 1440 * b + d / 6e4; case \"second\": return 86400 * b + d / 1e3; case \"millisecond\": return Math.floor(864e5 * b) + d; default: throw new Error(\"Unknown unit \" + a) }\n\n } function tc() {\n\n return this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * p(this._months / 12)\n\n } function uc(a) {\n\n return function () { return this.as(a) }\n\n } function vc(a) {\n\n return a = z(a), this[a + \"s\"]()\n\n } function wc(a) {\n\n return function () { return this._data[a] }\n\n } function xc() {\n\n return fb(this.days() / 7)\n\n } function yc(a, b, c, d, e) {\n\n return e.relativeTime(b || 1, !!c, a, d)\n\n } function zc(a, b, c) {\n\n var d = Va(a).abs(), e = fe(d.as(\"s\")), f = fe(d.as(\"m\")), g = fe(d.as(\"h\")), h = fe(d.as(\"d\")), i = fe(d.as(\"M\")), j = fe(d.as(\"y\")), k = e < ge.s && [\"s\", e] || 1 === f && [\"m\"] || f < ge.m && [\"mm\", f] || 1 === g && [\"h\"] || g < ge.h && [\"hh\", g] || 1 === h && [\"d\"] || h < ge.d && [\"dd\", h] || 1 === i && [\"M\"] || i < ge.M && [\"MM\", i] || 1 === j && [\"y\"] || [\"yy\", j]; return k[2] = b, k[3] = +a > 0, k[4] = c, yc.apply(null, k)\n\n } function Ac(a, b) {\n\n return void 0 === ge[a] ? !1 : void 0 === b ? ge[a] : (ge[a] = b, !0)\n\n } function Bc(a) {\n\n var b = this.localeData(), c = zc(this, !a, b); return a && (c = b.pastFuture(+this, c)), b.postformat(c)\n\n } function Cc() {\n\n var a = he(this.years()), b = he(this.months()), c = he(this.days()), d = he(this.hours()), e = he(this.minutes()), f = he(this.seconds() + this.milliseconds() / 1e3), g = this.asSeconds(); return g ? (0 > g ? \"-\" : \"\") + \"P\" + (a ? a + \"Y\" : \"\") + (b ? b + \"M\" : \"\") + (c ? c + \"D\" : \"\") + (d || e || f ? \"T\" : \"\") + (d ? d + \"H\" : \"\") + (e ? e + \"M\" : \"\") + (f ? f + \"S\" : \"\") : \"P0D\"\n\n } var Dc, Ec, Fc = a.momentProperties = [], Gc = !1, Hc = {}, Ic = {}, Jc = /(\\[[^\\[]*\\])|(\\\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g, Kc = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g, Lc = {}, Mc = {}, Nc = /\\d/, Oc = /\\d\\d/, Pc = /\\d{3}/, Qc = /\\d{4}/, Rc = /[+-]?\\d{6}/, Sc = /\\d\\d?/, Tc = /\\d{1,3}/, Uc = /\\d{1,4}/, Vc = /[+-]?\\d{1,6}/, Wc = /\\d+/, Xc = /[+-]?\\d+/, Yc = /Z|[+-]\\d\\d:?\\d\\d/gi, Zc = /[+-]?\\d+(\\.\\d{1,3})?/, $c = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i, _c = {}, ad = {}, bd = 0, cd = 1, dd = 2, ed = 3, fd = 4, gd = 5, hd = 6; G(\"M\", [\"MM\", 2], \"Mo\", function () { return this.month() + 1 }), G(\"MMM\", 0, 0, function (a) { return this.localeData().monthsShort(this, a) }), G(\"MMMM\", 0, 0, function (a) { return this.localeData().months(this, a) }), y(\"month\", \"M\"), L(\"M\", Sc), L(\"MM\", Sc, Oc), L(\"MMM\", $c), L(\"MMMM\", $c), O([\"M\", \"MM\"], function (a, b) { b[cd] = p(a) - 1 }), O([\"MMM\", \"MMMM\"], function (a, b, c, d) { var e = c._locale.monthsParse(a, d, c._strict); null != e ? b[cd] = e : j(c).invalidMonth = a }); var id = \"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"), jd = \"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\"), kd = {\n\n }; a.suppressDeprecationWarnings = !1; var ld = /^\\s*(?:[+-]\\d{6}|\\d{4})-(?:(\\d\\d-\\d\\d)|(W\\d\\d$)|(W\\d\\d-\\d)|(\\d\\d\\d))((T| )(\\d\\d(:\\d\\d(:\\d\\d(\\.\\d+)?)?)?)?([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/, md = [[\"YYYYYY-MM-DD\", /[+-]\\d{6}-\\d{2}-\\d{2}/], [\"YYYY-MM-DD\", /\\d{4}-\\d{2}-\\d{2}/], [\"GGGG-[W]WW-E\", /\\d{4}-W\\d{2}-\\d/], [\"GGGG-[W]WW\", /\\d{4}-W\\d{2}/], [\"YYYY-DDD\", /\\d{4}-\\d{3}/]], nd = [[\"HH:mm:ss.SSSS\", /(T| )\\d\\d:\\d\\d:\\d\\d\\.\\d+/], [\"HH:mm:ss\", /(T| )\\d\\d:\\d\\d:\\d\\d/], [\"HH:mm\", /(T| )\\d\\d:\\d\\d/], [\"HH\", /(T| )\\d\\d/]], od = /^\\/?Date\\((\\-?\\d+)/i; a.createFromInputFallback = $(\"moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.\", function (a) { a._d = new Date(a._i + (a._useUTC ? \" UTC\" : \"\")) }), G(0, [\"YY\", 2], 0, function () { return this.year() % 100 }), G(0, [\"YYYY\", 4], 0, \"year\"), G(0, [\"YYYYY\", 5], 0, \"year\"), G(0, [\"YYYYYY\", 6, !0], 0, \"year\"), y(\"year\", \"y\"), L(\"Y\", Xc), L(\"YY\", Sc, Oc), L(\"YYYY\", Uc, Qc), L(\"YYYYY\", Vc, Rc), L(\"YYYYYY\", Vc, Rc), O([\"YYYY\", \"YYYYY\", \"YYYYYY\"], bd), O(\"YY\", function (b, c) { c[bd] = a.parseTwoDigitYear(b) }), a.parseTwoDigitYear = function (a) {\n\n return p(a) + (p(a) > 68 ? 1900 : 2e3)\n\n }; var pd = B(\"FullYear\", !1); G(\"w\", [\"ww\", 2], \"wo\", \"week\"), G(\"W\", [\"WW\", 2], \"Wo\", \"isoWeek\"), y(\"week\", \"w\"), y(\"isoWeek\", \"W\"), L(\"w\", Sc), L(\"ww\", Sc, Oc), L(\"W\", Sc), L(\"WW\", Sc, Oc), P([\"w\", \"ww\", \"W\", \"WW\"], function (a, b, c, d) { b[d.substr(0, 1)] = p(a) }); var qd = {\n\n dow: 0, doy: 6\n\n }; G(\"DDD\", [\"DDDD\", 3], \"DDDo\", \"dayOfYear\"), y(\"dayOfYear\", \"DDD\"), L(\"DDD\", Tc), L(\"DDDD\", Pc), O([\"DDD\", \"DDDD\"], function (a, b, c) { c._dayOfYear = p(a) }), a.ISO_8601 = function () {\n\n }; var rd = $(\"moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548\", function () { var a = Aa.apply(null, arguments); return this > a ? this : a }), sd = $(\"moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548\", function () { var a = Aa.apply(null, arguments); return a > this ? this : a }); Ga(\"Z\", \":\"), Ga(\"ZZ\", \"\"), L(\"Z\", Yc), L(\"ZZ\", Yc), O([\"Z\", \"ZZ\"], function (a, b, c) { c._useUTC = !0, c._tzm = Ha(a) }); var td = /([\\+\\-]|\\d\\d)/gi; a.updateOffset = function () {\n\n }; var ud = /(\\-)?(?:(\\d*)\\.)?(\\d+)\\:(\\d+)(?:\\:(\\d+)\\.?(\\d{3})?)?/, vd = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/; Va.fn = Ea.prototype; var wd = Za(1, \"add\"), xd = Za(-1, \"subtract\"); a.defaultFormat = \"YYYY-MM-DDTHH:mm:ssZ\"; var yd = $(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\", function (a) { return void 0 === a ? this.localeData() : this.locale(a) }); G(0, [\"gg\", 2], 0, function () { return this.weekYear() % 100 }), G(0, [\"GG\", 2], 0, function () { return this.isoWeekYear() % 100 }), Ab(\"gggg\", \"weekYear\"), Ab(\"ggggg\", \"weekYear\"), Ab(\"GGGG\", \"isoWeekYear\"), Ab(\"GGGGG\", \"isoWeekYear\"), y(\"weekYear\", \"gg\"), y(\"isoWeekYear\", \"GG\"), L(\"G\", Xc), L(\"g\", Xc), L(\"GG\", Sc, Oc), L(\"gg\", Sc, Oc), L(\"GGGG\", Uc, Qc), L(\"gggg\", Uc, Qc), L(\"GGGGG\", Vc, Rc), L(\"ggggg\", Vc, Rc), P([\"gggg\", \"ggggg\", \"GGGG\", \"GGGGG\"], function (a, b, c, d) { b[d.substr(0, 2)] = p(a) }), P([\"gg\", \"GG\"], function (b, c, d, e) { c[e] = a.parseTwoDigitYear(b) }), G(\"Q\", 0, 0, \"quarter\"), y(\"quarter\", \"Q\"), L(\"Q\", Nc), O(\"Q\", function (a, b) { b[cd] = 3 * (p(a) - 1) }), G(\"D\", [\"DD\", 2], \"Do\", \"date\"), y(\"date\", \"D\"), L(\"D\", Sc), L(\"DD\", Sc, Oc), L(\"Do\", function (a, b) { return a ? b._ordinalParse : b._ordinalParseLenient }), O([\"D\", \"DD\"], dd), O(\"Do\", function (a, b) { b[dd] = p(a.match(Sc)[0], 10) }); var zd = B(\"Date\", !0); G(\"d\", 0, \"do\", \"day\"), G(\"dd\", 0, 0, function (a) { return this.localeData().weekdaysMin(this, a) }), G(\"ddd\", 0, 0, function (a) { return this.localeData().weekdaysShort(this, a) }), G(\"dddd\", 0, 0, function (a) { return this.localeData().weekdays(this, a) }), G(\"e\", 0, 0, \"weekday\"), G(\"E\", 0, 0, \"isoWeekday\"), y(\"day\", \"d\"), y(\"weekday\", \"e\"), y(\"isoWeekday\", \"E\"), L(\"d\", Sc), L(\"e\", Sc), L(\"E\", Sc), L(\"dd\", $c), L(\"ddd\", $c), L(\"dddd\", $c), P([\"dd\", \"ddd\", \"dddd\"], function (a, b, c) { var d = c._locale.weekdaysParse(a); null != d ? b.d = d : j(c).invalidWeekday = a }), P([\"d\", \"e\", \"E\"], function (a, b, c, d) { b[d] = p(a) }); var Ad = \"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"), Bd = \"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"), Cd = \"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\"); G(\"H\", [\"HH\", 2], 0, \"hour\"), G(\"h\", [\"hh\", 2], 0, function () { return this.hours() % 12 || 12 }), Pb(\"a\", !0), Pb(\"A\", !1), y(\"hour\", \"h\"), L(\"a\", Qb), L(\"A\", Qb), L(\"H\", Sc), L(\"h\", Sc), L(\"HH\", Sc, Oc), L(\"hh\", Sc, Oc), O([\"H\", \"HH\"], ed), O([\"a\", \"A\"], function (a, b, c) { c._isPm = c._locale.isPM(a), c._meridiem = a }), O([\"h\", \"hh\"], function (a, b, c) { b[ed] = p(a), j(c).bigHour = !0 }); var Dd = /[ap]\\.?m?\\.?/i, Ed = B(\"Hours\", !0); G(\"m\", [\"mm\", 2], 0, \"minute\"), y(\"minute\", \"m\"), L(\"m\", Sc), L(\"mm\", Sc, Oc), O([\"m\", \"mm\"], fd); var Fd = B(\"Minutes\", !1); G(\"s\", [\"ss\", 2], 0, \"second\"), y(\"second\", \"s\"), L(\"s\", Sc), L(\"ss\", Sc, Oc), O([\"s\", \"ss\"], gd); var Gd = B(\"Seconds\", !1); G(\"S\", 0, 0, function () { return ~~(this.millisecond() / 100) }), G(0, [\"SS\", 2], 0, function () { return ~~(this.millisecond() / 10) }), Tb(\"SSS\"), Tb(\"SSSS\"), y(\"millisecond\", \"ms\"), L(\"S\", Tc, Nc), L(\"SS\", Tc, Oc), L(\"SSS\", Tc, Pc), L(\"SSSS\", Wc), O([\"S\", \"SS\", \"SSS\", \"SSSS\"], function (a, b) { b[hd] = p(1e3 * (\"0.\" + a)) }); var Hd = B(\"Milliseconds\", !1); G(\"z\", 0, 0, \"zoneAbbr\"), G(\"zz\", 0, 0, \"zoneName\"); var Id = n.prototype; Id.add = wd, Id.calendar = _a, Id.clone = ab, Id.diff = gb, Id.endOf = sb, Id.format = kb, Id.from = lb, Id.fromNow = mb, Id.to = nb, Id.toNow = ob, Id.get = E, Id.invalidAt = zb, Id.isAfter = bb, Id.isBefore = cb, Id.isBetween = db, Id.isSame = eb, Id.isValid = xb, Id.lang = yd, Id.locale = pb, Id.localeData = qb, Id.max = sd, Id.min = rd, Id.parsingFlags = yb, Id.set = E, Id.startOf = rb, Id.subtract = xd, Id.toArray = wb, Id.toDate = vb, Id.toISOString = jb, Id.toJSON = jb, Id.toString = ib, Id.unix = ub, Id.valueOf = tb, Id.year = pd, Id.isLeapYear = ga, Id.weekYear = Cb, Id.isoWeekYear = Db, Id.quarter = Id.quarters = Gb, Id.month = W, Id.daysInMonth = X, Id.week = Id.weeks = la, Id.isoWeek = Id.isoWeeks = ma, Id.weeksInYear = Fb, Id.isoWeeksInYear = Eb, Id.date = zd, Id.day = Id.days = Mb, Id.weekday = Nb, Id.isoWeekday = Ob, Id.dayOfYear = oa, Id.hour = Id.hours = Ed, Id.minute = Id.minutes = Fd, Id.second = Id.seconds = Gd, Id.millisecond = Id.milliseconds = Hd, Id.utcOffset = Ka, Id.utc = Ma, Id.local = Na, Id.parseZone = Oa, Id.hasAlignedHourOffset = Pa, Id.isDST = Qa, Id.isDSTShifted = Ra, Id.isLocal = Sa, Id.isUtcOffset = Ta, Id.isUtc = Ua, Id.isUTC = Ua, Id.zoneAbbr = Ub, Id.zoneName = Vb, Id.dates = $(\"dates accessor is deprecated. Use date instead.\", zd), Id.months = $(\"months accessor is deprecated. Use month instead\", W), Id.years = $(\"years accessor is deprecated. Use year instead\", pd), Id.zone = $(\"moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779\", La); var Jd = Id, Kd = { sameDay: \"[Today at] LT\", nextDay: \"[Tomorrow at] LT\", nextWeek: \"dddd [at] LT\", lastDay: \"[Yesterday at] LT\", lastWeek: \"[Last] dddd [at] LT\", sameElse: \"L\" }, Ld = { LTS: \"h:mm:ss A\", LT: \"h:mm A\", L: \"MM/DD/YYYY\", LL: \"MMMM D, YYYY\", LLL: \"MMMM D, YYYY LT\", LLLL: \"dddd, MMMM D, YYYY LT\" }, Md = \"Invalid date\", Nd = \"%d\", Od = /\\d{1,2}/, Pd = {\n\n future: \"in %s\", past: \"%s ago\", s: \"a few seconds\", m: \"a minute\", mm: \"%d minutes\", h: \"an hour\",\n\n hh: \"%d hours\", d: \"a day\", dd: \"%d days\", M: \"a month\", MM: \"%d months\", y: \"a year\", yy: \"%d years\"\n\n }, Qd = r.prototype; Qd._calendar = Kd, Qd.calendar = Yb, Qd._longDateFormat = Ld, Qd.longDateFormat = Zb, Qd._invalidDate = Md, Qd.invalidDate = $b, Qd._ordinal = Nd, Qd.ordinal = _b, Qd._ordinalParse = Od, Qd.preparse = ac, Qd.postformat = ac, Qd._relativeTime = Pd, Qd.relativeTime = bc, Qd.pastFuture = cc, Qd.set = dc, Qd.months = S, Qd._months = id, Qd.monthsShort = T, Qd._monthsShort = jd, Qd.monthsParse = U, Qd.week = ia, Qd._week = qd, Qd.firstDayOfYear = ka, Qd.firstDayOfWeek = ja, Qd.weekdays = Ib, Qd._weekdays = Ad, Qd.weekdaysMin = Kb, Qd._weekdaysMin = Cd, Qd.weekdaysShort = Jb, Qd._weekdaysShort = Bd, Qd.weekdaysParse = Lb, Qd.isPM = Rb, Qd._meridiemParse = Dd, Qd.meridiem = Sb, v(\"en\", { ordinalParse: /\\d{1,2}(th|st|nd|rd)/, ordinal: function (a) { var b = a % 10, c = 1 === p(a % 100 / 10) ? \"th\" : 1 === b ? \"st\" : 2 === b ? \"nd\" : 3 === b ? \"rd\" : \"th\"; return a + c } }), a.lang = $(\"moment.lang is deprecated. Use moment.locale instead.\", v), a.langData = $(\"moment.langData is deprecated. Use moment.localeData instead.\", x); var Rd = Math.abs, Sd = uc(\"ms\"), Td = uc(\"s\"), Ud = uc(\"m\"), Vd = uc(\"h\"), Wd = uc(\"d\"), Xd = uc(\"w\"), Yd = uc(\"M\"), Zd = uc(\"y\"), $d = wc(\"milliseconds\"), _d = wc(\"seconds\"), ae = wc(\"minutes\"), be = wc(\"hours\"), ce = wc(\"days\"), de = wc(\"months\"), ee = wc(\"years\"), fe = Math.round, ge = { s: 45, m: 45, h: 22, d: 26, M: 11 }, he = Math.abs, ie = Ea.prototype; ie.abs = lc, ie.add = nc, ie.subtract = oc, ie.as = sc, ie.asMilliseconds = Sd, ie.asSeconds = Td, ie.asMinutes = Ud, ie.asHours = Vd, ie.asDays = Wd, ie.asWeeks = Xd, ie.asMonths = Yd, ie.asYears = Zd, ie.valueOf = tc, ie._bubble = pc, ie.get = vc, ie.milliseconds = $d, ie.seconds = _d, ie.minutes = ae, ie.hours = be, ie.days = ce, ie.weeks = xc, ie.months = de, ie.years = ee, ie.humanize = Bc, ie.toISOString = Cc, ie.toString = Cc, ie.toJSON = Cc, ie.locale = pb, ie.localeData = qb, ie.toIsoString = $(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\", Cc), ie.lang = yd, G(\"X\", 0, 0, \"unix\"), G(\"x\", 0, 0, \"valueOf\"), L(\"x\", Xc), L(\"X\", Zc), O(\"X\", function (a, b, c) { c._d = new Date(1e3 * parseFloat(a, 10)) }), O(\"x\", function (a, b, c) { c._d = new Date(p(a)) }), a.version = \"2.10.3\", b(Aa), a.fn = Jd, a.min = Ca, a.max = Da, a.utc = h, a.unix = Wb, a.months = gc, a.isDate = d, a.locale = v, a.invalid = l, a.duration = Va, a.isMoment = o, a.weekdays = ic, a.parseZone = Xb, a.localeData = x, a.isDuration = Fa, a.monthsShort = hc, a.weekdaysMin = kc, a.defineLocale = w, a.weekdaysShort = jc, a.normalizeUnits = z, a.relativeTimeThreshold = Ac; var je = a; return je\n\n });\n\n \n\n \n\n /*\n\n The MIT License (MIT)\n\n \n\n Copyright (c) 2015 Jonathan Peterson\n\n \n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n\n of this software and associated documentation files (the \"Software\"), to deal\n\n in the Software without restriction, including without limitation the rights\n\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\n copies of the Software, and to permit persons to whom the Software is\n\n furnished to do so, subject to the following conditions:\n\n \n\n The above copyright notice and this permission notice shall be included in\n\n all copies or substantial portions of the Software.\n\n \n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\n THE SOFTWARE.\n\n */\n\n !function (e) { \"use strict\"; if (\"function\" == typeof define && define.amd) define([\"jquery\", \"moment\"], e); else if (\"object\" == typeof exports) e(require(\"jquery\"), require(\"moment\")); else { if (\"undefined\" == typeof jQuery) throw \"bootstrap-datetimepicker requires jQuery to be loaded first\"; if (\"undefined\" == typeof moment) throw \"bootstrap-datetimepicker requires Moment.js to be loaded first\"; e(jQuery, moment) } }(function (e, t) { \"use strict\"; if (!t) throw new Error(\"bootstrap-datetimepicker requires Moment.js to be loaded first\"); var a = function (a, n) { var r, i, o, s, d, p = {}, l = t().startOf(\"d\"), c = l.clone(), u = !0, f = !1, m = !1, h = 0, g = [{ clsName: \"days\", navFnc: \"M\", navStep: 1 }, { clsName: \"months\", navFnc: \"y\", navStep: 1 }, { clsName: \"years\", navFnc: \"y\", navStep: 10 }], y = [\"days\", \"months\", \"years\"], w = [\"top\", \"bottom\", \"auto\"], b = [\"left\", \"right\", \"auto\"], v = [\"default\", \"top\", \"bottom\"], k = { up: 38, 38: \"up\", down: 40, 40: \"down\", left: 37, 37: \"left\", right: 39, 39: \"right\", tab: 9, 9: \"tab\", escape: 27, 27: \"escape\", enter: 13, 13: \"enter\", pageUp: 33, 33: \"pageUp\", pageDown: 34, 34: \"pageDown\", shift: 16, 16: \"shift\", control: 17, 17: \"control\", space: 32, 32: \"space\", t: 84, 84: \"t\", \"delete\": 46, 46: \"delete\" }, C = {}, x = function (e) { if (\"string\" != typeof e || e.length > 1) throw new TypeError(\"isEnabled expects a single character string parameter\"); switch (e) { case \"y\": return -1 !== o.indexOf(\"Y\"); case \"M\": return -1 !== o.indexOf(\"M\"); case \"d\": return -1 !== o.toLowerCase().indexOf(\"d\"); case \"h\": case \"H\": return -1 !== o.toLowerCase().indexOf(\"h\"); case \"m\": return -1 !== o.indexOf(\"m\"); case \"s\": return -1 !== o.indexOf(\"s\"); default: return !1 } }, D = function () { return x(\"h\") || x(\"m\") || x(\"s\") }, T = function () { return x(\"y\") || x(\"M\") || x(\"d\") }, M = function () { var t = e(\"<thead>\").append(e(\"<tr>\").append(e(\"<th>\").addClass(\"prev\").attr(\"data-action\", \"previous\").append(e(\"<span>\").addClass(n.icons.previous))).append(e(\"<th>\").addClass(\"picker-switch\").attr(\"data-action\", \"pickerSwitch\").attr(\"colspan\", n.calendarWeeks ? \"6\" : \"5\")).append(e(\"<th>\").addClass(\"next\").attr(\"data-action\", \"next\").append(e(\"<span>\").addClass(n.icons.next)))), a = e(\"<tbody>\").append(e(\"<tr>\").append(e(\"<td>\").attr(\"colspan\", n.calendarWeeks ? \"8\" : \"7\"))); return [e(\"<div>\").addClass(\"datepicker-days\").append(e(\"<table>\").addClass(\"table-condensed\").append(t).append(e(\"<tbody>\"))), e(\"<div>\").addClass(\"datepicker-months\").append(e(\"<table>\").addClass(\"table-condensed\").append(t.clone()).append(a.clone())), e(\"<div>\").addClass(\"datepicker-years\").append(e(\"<table>\").addClass(\"table-condensed\").append(t.clone()).append(a.clone()))] }, O = function () { var t = e(\"<tr>\"), a = e(\"<tr>\"), r = e(\"<tr>\"); return x(\"h\") && (t.append(e(\"<td>\").append(e(\"<a>\").attr({ href: \"#\", tabindex: \"-1\" }).addClass(\"btn\").attr(\"data-action\", \"incrementHours\").append(e(\"<span>\").addClass(n.icons.up)))), a.append(e(\"<td>\").append(e(\"<span>\").addClass(\"timepicker-hour\").attr(\"data-time-component\", \"hours\").attr(\"data-action\", \"showHours\"))), r.append(e(\"<td>\").append(e(\"<a>\").attr({ href: \"#\", tabindex: \"-1\" }).addClass(\"btn\").attr(\"data-action\", \"decrementHours\").append(e(\"<span>\").addClass(n.icons.down))))), x(\"m\") && (x(\"h\") && (t.append(e(\"<td>\").addClass(\"separator\")), a.append(e(\"<td>\").addClass(\"separator\").html(\":\")), r.append(e(\"<td>\").addClass(\"separator\"))), t.append(e(\"<td>\").append(e(\"<a>\").attr({ href: \"#\", tabindex: \"-1\" }).addClass(\"btn\").attr(\"data-action\", \"incrementMinutes\").append(e(\"<span>\").addClass(n.icons.up)))), a.append(e(\"<td>\").append(e(\"<span>\").addClass(\"timepicker-minute\").attr(\"data-time-component\", \"minutes\").attr(\"data-action\", \"showMinutes\"))), r.append(e(\"<td>\").append(e(\"<a>\").attr({ href: \"#\", tabindex: \"-1\" }).addClass(\"btn\").attr(\"data-action\", \"decrementMinutes\").append(e(\"<span>\").addClass(n.icons.down))))), x(\"s\") && (x(\"m\") && (t.append(e(\"<td>\").addClass(\"separator\")), a.append(e(\"<td>\").addClass(\"separator\").html(\":\")), r.append(e(\"<td>\").addClass(\"separator\"))), t.append(e(\"<td>\").append(e(\"<a>\").attr({ href: \"#\", tabindex: \"-1\" }).addClass(\"btn\").attr(\"data-action\", \"incrementSeconds\").append(e(\"<span>\").addClass(n.icons.up)))), a.append(e(\"<td>\").append(e(\"<span>\").addClass(\"timepicker-second\").attr(\"data-time-component\", \"seconds\").attr(\"data-action\", \"showSeconds\"))), r.append(e(\"<td>\").append(e(\"<a>\").attr({ href: \"#\", tabindex: \"-1\" }).addClass(\"btn\").attr(\"data-action\", \"decrementSeconds\").append(e(\"<span>\").addClass(n.icons.down))))), i || (t.append(e(\"<td>\").addClass(\"separator\")), a.append(e(\"<td>\").append(e(\"<button>\").addClass(\"btn btn-primary\").attr(\"data-action\", \"togglePeriod\"))), r.append(e(\"<td>\").addClass(\"separator\"))), e(\"<div>\").addClass(\"timepicker-picker\").append(e(\"<table>\").addClass(\"table-condensed\").append([t, a, r])) }, E = function () { var t = e(\"<div>\").addClass(\"timepicker-hours\").append(e(\"<table>\").addClass(\"table-condensed\")), a = e(\"<div>\").addClass(\"timepicker-minutes\").append(e(\"<table>\").addClass(\"table-condensed\")), n = e(\"<div>\").addClass(\"timepicker-seconds\").append(e(\"<table>\").addClass(\"table-condensed\")), r = [O()]; return x(\"h\") && r.push(t), x(\"m\") && r.push(a), x(\"s\") && r.push(n), r }, P = function () { var t = []; return n.showTodayButton && t.push(e(\"<td>\").append(e(\"<a>\").attr(\"data-action\", \"today\").append(e(\"<span>\").addClass(n.icons.today)))), !n.sideBySide && T() && D() && t.push(e(\"<td>\").append(e(\"<a>\").attr(\"data-action\", \"togglePicker\").append(e(\"<span>\").addClass(n.icons.time)))), n.showClear && t.push(e(\"<td>\").append(e(\"<a>\").attr(\"data-action\", \"clear\").append(e(\"<span>\").addClass(n.icons.clear)))), n.showClose && t.push(e(\"<td>\").append(e(\"<a>\").attr(\"data-action\", \"close\").append(e(\"<span>\").addClass(n.icons.close)))), e(\"<table>\").addClass(\"table-condensed\").append(e(\"<tbody>\").append(e(\"<tr>\").append(t))) }, S = function () { var t = e(\"<div>\").addClass(\"bootstrap-datetimepicker-widget dropdown-menu\"), a = e(\"<div>\").addClass(\"datepicker\").append(M()), r = e(\"<div>\").addClass(\"timepicker\").append(E()), o = e(\"<ul>\").addClass(\"list-unstyled\"), s = e(\"<li>\").addClass(\"picker-switch\" + (n.collapse ? \" accordion-toggle\" : \"\")).append(P()); return n.inline && t.removeClass(\"dropdown-menu\"), i && t.addClass(\"usetwentyfour\"), n.sideBySide && T() && D() ? (t.addClass(\"timepicker-sbs\"), t.append(e(\"<div>\").addClass(\"row\").append(a.addClass(\"col-sm-6\")).append(r.addClass(\"col-sm-6\"))), t.append(s), t) : (\"top\" === n.toolbarPlacement && o.append(s), T() && o.append(e(\"<li>\").addClass(n.collapse && D() ? \"collapse in\" : \"\").append(a)), \"default\" === n.toolbarPlacement && o.append(s), D() && o.append(e(\"<li>\").addClass(n.collapse && T() ? \"collapse\" : \"\").append(r)), \"bottom\" === n.toolbarPlacement && o.append(s), t.append(o)) }, B = function () { var t, r = {}; return t = a.is(\"input\") || n.inline ? a.data() : a.find(\"input\").data(), t.dateOptions && t.dateOptions instanceof Object && (r = e.extend(!0, r, t.dateOptions)), e.each(n, function (e) { var a = \"date\" + e.charAt(0).toUpperCase() + e.slice(1); void 0 !== t[a] && (r[e] = t[a]) }), r }, j = function () { var t, r = (f || a).position(), i = (f || a).offset(), o = n.widgetPositioning.vertical, s = n.widgetPositioning.horizontal; if (n.widgetParent) t = n.widgetParent.append(m); else if (a.is(\"input\")) t = a.parent().append(m); else { if (n.inline) return void (t = a.append(m)); t = a, a.children().first().after(m) } if (\"auto\" === o && (o = i.top + 1.5 * m.height() >= e(window).height() + e(window).scrollTop() && m.height() + a.outerHeight() < i.top ? \"top\" : \"bottom\"), \"auto\" === s && (s = t.width() < i.left + m.outerWidth() / 2 && i.left + m.outerWidth() > e(window).width() ? \"right\" : \"left\"), \"top\" === o ? m.addClass(\"top\").removeClass(\"bottom\") : m.addClass(\"bottom\").removeClass(\"top\"), \"right\" === s ? m.addClass(\"pull-right\") : m.removeClass(\"pull-right\"), \"relative\" !== t.css(\"position\") && (t = t.parents().filter(function () { return \"relative\" === e(this).css(\"position\") }).first()), 0 === t.length) throw new Error(\"datetimepicker component should be placed within a relative positioned container\"); var d = e(a).parents().filter(function () { return \"fixed\" === e(this).css(\"position\") }).length > 0; if (\"fixed\" === m.css(\"position\") && d) { var i = a.offset(), p = i.left, l = jQuery(window).height() - (jQuery(a).offset().top - jQuery(window).scrollTop()); m.css({ bottom: l, left: p }) } else m.css({ top: \"top\" === o ? \"auto\" : r.top + a.outerHeight(), bottom: \"top\" === o ? r.top + a.outerHeight() : \"auto\", left: \"left\" === s ? t.css(\"padding-left\") : \"auto\", right: \"left\" === s ? \"auto\" : t.width() - a.outerWidth() }) }, H = function (e) { \"dp.change\" === e.type && (e.date && e.date.isSame(e.oldDate) || !e.date && !e.oldDate) || a.trigger(e) }, I = function (e) { m && (e && (d = Math.max(h, Math.min(2, d + e))), m.find(\".datepicker > div\").hide().filter(\".datepicker-\" + g[d].clsName).show()) }, F = function () { var t = e(\"<tr>\"), a = c.clone().startOf(\"w\"); for (n.calendarWeeks === !0 && t.append(e(\"<th>\").addClass(\"cw\").text(\"#\")) ; a.isBefore(c.clone().endOf(\"w\")) ;) t.append(e(\"<th>\").addClass(\"dow\").text(a.format(\"dd\"))), a.add(1, \"d\"); m.find(\".datepicker-days thead\").append(t) }, L = function (e) { return n.disabledDates[e.format(\"YYYY-MM-DD\")] === !0 }, Y = function (e) { return n.enabledDates[e.format(\"YYYY-MM-DD\")] === !0 }, W = function (e, t) { return e.isValid() ? n.disabledDates && L(e) && \"M\" !== t ? !1 : n.enabledDates && !Y(e) && \"M\" !== t ? !1 : n.minDate && e.isBefore(n.minDate, t) ? !1 : n.maxDate && e.isAfter(n.maxDate, t) ? !1 : \"d\" === t && -1 !== n.daysOfWeekDisabled.indexOf(e.day()) ? !1 : !0 : !1 }, q = function () { for (var t = [], a = c.clone().startOf(\"y\").hour(12) ; a.isSame(c, \"y\") ;) t.push(e(\"<span>\").attr(\"data-action\", \"selectMonth\").addClass(\"month\").text(a.format(\"MMM\"))), a.add(1, \"M\"); m.find(\".datepicker-months td\").empty().append(t) }, z = function () { var t = m.find(\".datepicker-months\"), a = t.find(\"th\"), n = t.find(\"tbody\").find(\"span\"); t.find(\".disabled\").removeClass(\"disabled\"), W(c.clone().subtract(1, \"y\"), \"y\") || a.eq(0).addClass(\"disabled\"), a.eq(1).text(c.year()), W(c.clone().add(1, \"y\"), \"y\") || a.eq(2).addClass(\"disabled\"), n.removeClass(\"active\"), l.isSame(c, \"y\") && n.eq(l.month()).addClass(\"active\"), n.each(function (t) { W(c.clone().month(t), \"M\") || e(this).addClass(\"disabled\") }) }, A = function () { var e = m.find(\".datepicker-years\"), t = e.find(\"th\"), a = c.clone().subtract(5, \"y\"), r = c.clone().add(6, \"y\"), i = \"\"; for (e.find(\".disabled\").removeClass(\"disabled\"), n.minDate && n.minDate.isAfter(a, \"y\") && t.eq(0).addClass(\"disabled\"), t.eq(1).text(a.year() + \"-\" + r.year()), n.maxDate && n.maxDate.isBefore(r, \"y\") && t.eq(2).addClass(\"disabled\") ; !a.isAfter(r, \"y\") ;) i += '<span data-action=\"selectYear\" class=\"year' + (a.isSame(l, \"y\") ? \" active\" : \"\") + (W(a, \"y\") ? \"\" : \" disabled\") + '\">' + a.year() + \"</span>\", a.add(1, \"y\"); e.find(\"td\").html(i) }, V = function () { var a, r, i, o = m.find(\".datepicker-days\"), s = o.find(\"th\"), d = []; if (T()) { for (o.find(\".disabled\").removeClass(\"disabled\"), s.eq(1).text(c.format(n.dayViewHeaderFormat)), W(c.clone().subtract(1, \"M\"), \"M\") || s.eq(0).addClass(\"disabled\"), W(c.clone().add(1, \"M\"), \"M\") || s.eq(2).addClass(\"disabled\"), a = c.clone().startOf(\"M\").startOf(\"week\") ; !c.clone().endOf(\"M\").endOf(\"w\").isBefore(a, \"d\") ;) 0 === a.weekday() && (r = e(\"<tr>\"), n.calendarWeeks && r.append('<td class=\"cw\">' + a.week() + \"</td>\"), d.push(r)), i = \"\", a.isBefore(c, \"M\") && (i += \" old\"), a.isAfter(c, \"M\") && (i += \" new\"), a.isSame(l, \"d\") && !u && (i += \" active\"), W(a, \"d\") || (i += \" disabled\"), a.isSame(t(), \"d\") && (i += \" today\"), (0 === a.day() || 6 === a.day()) && (i += \" weekend\"), r.append('<td data-action=\"selectDay\" class=\"day' + i + '\">' + a.date() + \"</td>\"), a.add(1, \"d\"); o.find(\"tbody\").empty().append(d), z(), A() } }, N = function () { var t = m.find(\".timepicker-hours table\"), a = c.clone().startOf(\"d\"), n = [], r = e(\"<tr>\"); for (c.hour() > 11 && !i && a.hour(12) ; a.isSame(c, \"d\") && (i || c.hour() < 12 && a.hour() < 12 || c.hour() > 11) ;) a.hour() % 4 === 0 && (r = e(\"<tr>\"), n.push(r)), r.append('<td data-action=\"selectHour\" class=\"hour' + (W(a, \"h\") ? \"\" : \" disabled\") + '\">' + a.format(i ? \"HH\" : \"hh\") + \"</td>\"), a.add(1, \"h\"); t.empty().append(n) }, Q = function () { for (var t = m.find(\".timepicker-minutes table\"), a = c.clone().startOf(\"h\"), r = [], i = e(\"<tr>\"), o = 1 === n.stepping ? 5 : n.stepping; c.isSame(a, \"h\") ;) a.minute() % (4 * o) === 0 && (i = e(\"<tr>\"), r.push(i)), i.append('<td data-action=\"selectMinute\" class=\"minute' + (W(a, \"m\") ? \"\" : \" disabled\") + '\">' + a.format(\"mm\") + \"</td>\"), a.add(o, \"m\"); t.empty().append(r) }, R = function () { for (var t = m.find(\".timepicker-seconds table\"), a = c.clone().startOf(\"m\"), n = [], r = e(\"<tr>\") ; c.isSame(a, \"m\") ;) a.second() % 20 === 0 && (r = e(\"<tr>\"), n.push(r)), r.append('<td data-action=\"selectSecond\" class=\"second' + (W(a, \"s\") ? \"\" : \" disabled\") + '\">' + a.format(\"ss\") + \"</td>\"), a.add(5, \"s\"); t.empty().append(n) }, U = function () { var e = m.find(\".timepicker span[data-time-component]\"); i || m.find(\".timepicker [data-action=togglePeriod]\").text(l.format(\"A\")), e.filter(\"[data-time-component=hours]\").text(l.format(i ? \"HH\" : \"hh\")), e.filter(\"[data-time-component=minutes]\").text(l.format(\"mm\")), e.filter(\"[data-time-component=seconds]\").text(l.format(\"ss\")), N(), Q(), R() }, G = function () { m && (V(), U()) }, J = function (e) { var t = u ? null : l; return e ? (e = e.clone().locale(n.locale), 1 !== n.stepping && e.minutes(Math.round(e.minutes() / n.stepping) * n.stepping % 60).seconds(0), void (W(e) ? (l = e, c = l.clone(), r.val(l.format(o)), a.data(\"date\", l.format(o)), G(), u = !1, H({ type: \"dp.change\", date: l.clone(), oldDate: t })) : (n.keepInvalid || r.val(u ? \"\" : l.format(o)), H({ type: \"dp.error\", date: e })))) : (u = !0, r.val(\"\"), a.data(\"date\", \"\"), H({ type: \"dp.change\", date: null, oldDate: t }), void G()) }, K = function () { var t = !1; return m ? (m.find(\".collapse\").each(function () { var a = e(this).data(\"collapse\"); return a && a.transitioning ? (t = !0, !1) : !0 }), t ? p : (f && f.hasClass(\"btn\") && f.toggleClass(\"active\"), m.hide(), e(window).off(\"resize\", j), m.off(\"click\", \"[data-action]\"), m.off(\"mousedown\", !1), m.remove(), m = !1, H({ type: \"dp.hide\", date: l.clone() }), p)) : p }, X = function () { J(null) }, Z = { next: function () { c.add(g[d].navStep, g[d].navFnc), V() }, previous: function () { c.subtract(g[d].navStep, g[d].navFnc), V() }, pickerSwitch: function () { I(1) }, selectMonth: function (t) { var a = e(t.target).closest(\"tbody\").find(\"span\").index(e(t.target)); c.month(a), d === h ? (J(l.clone().year(c.year()).month(c.month())), n.inline || K()) : (I(-1), V()) }, selectYear: function (t) { var a = parseInt(e(t.target).text(), 10) || 0; c.year(a), d === h ? (J(l.clone().year(c.year())), n.inline || K()) : (I(-1), V()) }, selectDay: function (t) { var a = c.clone(); e(t.target).is(\".old\") && a.subtract(1, \"M\"), e(t.target).is(\".new\") && a.add(1, \"M\"), J(a.date(parseInt(e(t.target).text(), 10))), D() || n.keepOpen || n.inline || K() }, incrementHours: function () { J(l.clone().add(1, \"h\")) }, incrementMinutes: function () { J(l.clone().add(n.stepping, \"m\")) }, incrementSeconds: function () { J(l.clone().add(1, \"s\")) }, decrementHours: function () { J(l.clone().subtract(1, \"h\")) }, decrementMinutes: function () { J(l.clone().subtract(n.stepping, \"m\")) }, decrementSeconds: function () { J(l.clone().subtract(1, \"s\")) }, togglePeriod: function () { J(l.clone().add(l.hours() >= 12 ? -12 : 12, \"h\")) }, togglePicker: function (t) { var a, r = e(t.target), i = r.closest(\"ul\"), o = i.find(\".in\"), s = i.find(\".collapse:not(.in)\"); if (o && o.length) { if (a = o.data(\"collapse\"), a && a.transitioning) return; o.collapse ? (o.collapse(\"hide\"), s.collapse(\"show\")) : (o.removeClass(\"in\"), s.addClass(\"in\")), r.is(\"span\") ? r.toggleClass(n.icons.time + \" \" + n.icons.date) : r.find(\"span\").toggleClass(n.icons.time + \" \" + n.icons.date) } }, showPicker: function () { m.find(\".timepicker > div:not(.timepicker-picker)\").hide(), m.find(\".timepicker .timepicker-picker\").show() }, showHours: function () { m.find(\".timepicker .timepicker-picker\").hide(), m.find(\".timepicker .timepicker-hours\").show() }, showMinutes: function () { m.find(\".timepicker .timepicker-picker\").hide(), m.find(\".timepicker .timepicker-minutes\").show() }, showSeconds: function () { m.find(\".timepicker .timepicker-picker\").hide(), m.find(\".timepicker .timepicker-seconds\").show() }, selectHour: function (t) { var a = parseInt(e(t.target).text(), 10); i || (l.hours() >= 12 ? 12 !== a && (a += 12) : 12 === a && (a = 0)), J(l.clone().hours(a)), Z.showPicker.call(p) }, selectMinute: function (t) { J(l.clone().minutes(parseInt(e(t.target).text(), 10))), Z.showPicker.call(p) }, selectSecond: function (t) { J(l.clone().seconds(parseInt(e(t.target).text(), 10))), Z.showPicker.call(p) }, clear: X, today: function () { J(t()) }, close: K }, $ = function (t) { return e(t.currentTarget).is(\".disabled\") ? !1 : (Z[e(t.currentTarget).data(\"action\")].apply(p, arguments), !1) }, _ = function () { var a, i = { year: function (e) { return e.month(0).date(1).hours(0).seconds(0).minutes(0) }, month: function (e) { return e.date(1).hours(0).seconds(0).minutes(0) }, day: function (e) { return e.hours(0).seconds(0).minutes(0) }, hour: function (e) { return e.seconds(0).minutes(0) }, minute: function (e) { return e.seconds(0) } }; return r.prop(\"disabled\") || !n.ignoreReadonly && r.prop(\"readonly\") || m ? p : (n.useCurrent && u && (r.is(\"input\") && 0 === r.val().trim().length || n.inline) && (a = t(), \"string\" == typeof n.useCurrent && (a = i[n.useCurrent](a)), J(a)), m = S(), F(), q(), m.find(\".timepicker-hours\").hide(), m.find(\".timepicker-minutes\").hide(), m.find(\".timepicker-seconds\").hide(), G(), I(), e(window).on(\"resize\", j), m.on(\"click\", \"[data-action]\", $), m.on(\"mousedown\", !1), f && f.hasClass(\"btn\") && f.toggleClass(\"active\"), m.show(), j(), r.is(\":focus\") || r.focus(), H({ type: \"dp.show\" }), p) }, et = function () { return m ? K() : _() }, tt = function (e) { return e = t.isMoment(e) || e instanceof Date ? t(e) : t(e, s, n.useStrict), e.locale(n.locale), e }, at = function (e) { var t, a, r, i, o = null, s = [], d = {}, l = e.which, c = \"p\"; C[l] = c; for (t in C) C.hasOwnProperty(t) && C[t] === c && (s.push(t), parseInt(t, 10) !== l && (d[t] = !0)); for (t in n.keyBinds) if (n.keyBinds.hasOwnProperty(t) && \"function\" == typeof n.keyBinds[t] && (r = t.split(\" \"), r.length === s.length && k[l] === r[r.length - 1])) { for (i = !0, a = r.length - 2; a >= 0; a--) if (!(k[r[a]] in d)) { i = !1; break } if (i) { o = n.keyBinds[t]; break } } o && (o.call(p, m), e.stopPropagation(), e.preventDefault()) }, nt = function (e) { C[e.which] = \"r\", e.stopPropagation(), e.preventDefault() }, rt = function (t) { var a = e(t.target).val().trim(), n = a ? tt(a) : null; return J(n), t.stopImmediatePropagation(), !1 }, it = function () { r.on({ change: rt, blur: n.debug ? \"\" : K, keydown: at, keyup: nt }), a.is(\"input\") ? r.on({ focus: _ }) : f && (f.on(\"click\", et), f.on(\"mousedown\", !1)) }, ot = function () { r.off({ change: rt, blur: K, keydown: at, keyup: nt }), a.is(\"input\") ? r.off({ focus: _ }) : f && (f.off(\"click\", et), f.off(\"mousedown\", !1)) }, st = function (t) { var a = {}; return e.each(t, function () { var e = tt(this); e.isValid() && (a[e.format(\"YYYY-MM-DD\")] = !0) }), Object.keys(a).length ? a : !1 }, dt = function () { var e = n.format || \"L LT\"; o = e.replace(/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (e) { var t = l.localeData().longDateFormat(e) || e; return t.replace(/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (e) { return l.localeData().longDateFormat(e) || e }) }), s = n.extraFormats ? n.extraFormats.slice() : [], s.indexOf(e) < 0 && s.indexOf(o) < 0 && s.push(o), i = o.toLowerCase().indexOf(\"a\") < 1 && o.indexOf(\"h\") < 1, x(\"y\") && (h = 2), x(\"M\") && (h = 1), x(\"d\") && (h = 0), d = Math.max(h, d), u || J(l) }; if (p.destroy = function () { K(), ot(), a.removeData(\"DateTimePicker\"), a.removeData(\"date\") }, p.toggle = et, p.show = _, p.hide = K, p.disable = function () { return K(), f && f.hasClass(\"btn\") && f.addClass(\"disabled\"), r.prop(\"disabled\", !0), p }, p.enable = function () { return f && f.hasClass(\"btn\") && f.removeClass(\"disabled\"), r.prop(\"disabled\", !1), p }, p.ignoreReadonly = function (e) { if (0 === arguments.length) return n.ignoreReadonly; if (\"boolean\" != typeof e) throw new TypeError(\"ignoreReadonly () expects a boolean parameter\"); return n.ignoreReadonly = e, p }, p.options = function (t) { if (0 === arguments.length) return e.extend(!0, {}, n); if (!(t instanceof Object)) throw new TypeError(\"options() options parameter should be an object\"); return e.extend(!0, n, t), e.each(n, function (e, t) { if (void 0 === p[e]) throw new TypeError(\"option \" + e + \" is not recognized!\"); p[e](t) }), p }, p.date = function (e) { if (0 === arguments.length) return u ? null : l.clone(); if (!(null === e || \"string\" == typeof e || t.isMoment(e) || e instanceof Date)) throw new TypeError(\"date() parameter must be one of [null, string, moment or Date]\"); return J(null === e ? null : tt(e)), p }, p.format = function (e) { if (0 === arguments.length) return n.format; if (\"string\" != typeof e && (\"boolean\" != typeof e || e !== !1)) throw new TypeError(\"format() expects a sting or boolean:false parameter \" + e); return n.format = e, o && dt(), p }, p.dayViewHeaderFormat = function (e) { if (0 === arguments.length) return n.dayViewHeaderFormat; if (\"string\" != typeof e) throw new TypeError(\"dayViewHeaderFormat() expects a string parameter\"); return n.dayViewHeaderFormat = e, p }, p.extraFormats = function (e) { if (0 === arguments.length) return n.extraFormats; if (e !== !1 && !(e instanceof Array)) throw new TypeError(\"extraFormats() expects an array or false parameter\"); return n.extraFormats = e, s && dt(), p }, p.disabledDates = function (t) { if (0 === arguments.length) return n.disabledDates ? e.extend({}, n.disabledDates) : n.disabledDates; if (!t) return n.disabledDates = !1, G(), p; if (!(t instanceof Array)) throw new TypeError(\"disabledDates() expects an array parameter\"); return n.disabledDates = st(t), n.enabledDates = !1, G(), p }, p.enabledDates = function (t) { if (0 === arguments.length) return n.enabledDates ? e.extend({}, n.enabledDates) : n.enabledDates; if (!t) return n.enabledDates = !1, G(), p; if (!(t instanceof Array)) throw new TypeError(\"enabledDates() expects an array parameter\"); return n.enabledDates = st(t), n.disabledDates = !1, G(), p }, p.daysOfWeekDisabled = function (e) { if (0 === arguments.length) return n.daysOfWeekDisabled.splice(0); if (!(e instanceof Array)) throw new TypeError(\"daysOfWeekDisabled() expects an array parameter\"); return n.daysOfWeekDisabled = e.reduce(function (e, t) { return t = parseInt(t, 10), t > 6 || 0 > t || isNaN(t) ? e : (-1 === e.indexOf(t) && e.push(t), e) }, []).sort(), G(), p }, p.maxDate = function (e) { if (0 === arguments.length) return n.maxDate ? n.maxDate.clone() : n.maxDate; if (\"boolean\" == typeof e && e === !1) return n.maxDate = !1, G(), p; \"string\" == typeof e && (\"now\" === e || \"moment\" === e) && (e = t()); var a = tt(e); if (!a.isValid()) throw new TypeError(\"maxDate() Could not parse date parameter: \" + e); if (n.minDate && a.isBefore(n.minDate)) throw new TypeError(\"maxDate() date parameter is before options.minDate: \" + a.format(o)); return n.maxDate = a, n.maxDate.isBefore(e) && J(n.maxDate), c.isAfter(a) && (c = a.clone()), G(), p }, p.minDate = function (e) { if (0 === arguments.length) return n.minDate ? n.minDate.clone() : n.minDate; if (\"boolean\" == typeof e && e === !1) return n.minDate = !1, G(), p; \"string\" == typeof e && (\"now\" === e || \"moment\" === e) && (e = t()); var a = tt(e); if (!a.isValid()) throw new TypeError(\"minDate() Could not parse date parameter: \" + e); if (n.maxDate && a.isAfter(n.maxDate)) throw new TypeError(\"minDate() date parameter is after options.maxDate: \" + a.format(o)); return n.minDate = a, n.minDate.isAfter(e) && J(n.minDate), c.isBefore(a) && (c = a.clone()), G(), p }, p.defaultDate = function (e) { if (0 === arguments.length) return n.defaultDate ? n.defaultDate.clone() : n.defaultDate; if (!e) return n.defaultDate = !1, p; \"string\" == typeof e && (\"now\" === e || \"moment\" === e) && (e = t()); var a = tt(e); if (!a.isValid()) throw new TypeError(\"defaultDate() Could not parse date parameter: \" + e); if (!W(a)) throw new TypeError(\"defaultDate() date passed is invalid according to component setup validations\"); return n.defaultDate = a, n.defaultDate && \"\" === r.val().trim() && void 0 === r.attr(\"placeholder\") && J(n.defaultDate), p }, p.locale = function (e) { if (0 === arguments.length) return n.locale; if (!t.localeData(e)) throw new TypeError(\"locale() locale \" + e + \" is not loaded from moment locales!\"); return n.locale = e, l.locale(n.locale), c.locale(n.locale), o && dt(), m && (K(), _()), p }, p.stepping = function (e) { return 0 === arguments.length ? n.stepping : (e = parseInt(e, 10), (isNaN(e) || 1 > e) && (e = 1), n.stepping = e, p) }, p.useCurrent = function (e) { var t = [\"year\", \"month\", \"day\", \"hour\", \"minute\"]; if (0 === arguments.length) return n.useCurrent; if (\"boolean\" != typeof e && \"string\" != typeof e) throw new TypeError(\"useCurrent() expects a boolean or string parameter\"); if (\"string\" == typeof e && -1 === t.indexOf(e.toLowerCase())) throw new TypeError(\"useCurrent() expects a string parameter of \" + t.join(\", \")); return n.useCurrent = e, p }, p.collapse = function (e) { if (0 === arguments.length) return n.collapse; if (\"boolean\" != typeof e) throw new TypeError(\"collapse() expects a boolean parameter\"); return n.collapse === e ? p : (n.collapse = e, m && (K(), _()), p) }, p.icons = function (t) { if (0 === arguments.length) return e.extend({}, n.icons); if (!(t instanceof Object)) throw new TypeError(\"icons() expects parameter to be an Object\"); return e.extend(n.icons, t), m && (K(), _()), p }, p.useStrict = function (e) { if (0 === arguments.length) return n.useStrict; if (\"boolean\" != typeof e) throw new TypeError(\"useStrict() expects a boolean parameter\"); return n.useStrict = e, p }, p.sideBySide = function (e) { if (0 === arguments.length) return n.sideBySide; if (\"boolean\" != typeof e) throw new TypeError(\"sideBySide() expects a boolean parameter\"); return n.sideBySide = e, m && (K(), _()), p }, p.viewMode = function (e) { if (0 === arguments.length) return n.viewMode; if (\"string\" != typeof e) throw new TypeError(\"viewMode() expects a string parameter\"); if (-1 === y.indexOf(e)) throw new TypeError(\"viewMode() parameter must be one of (\" + y.join(\", \") + \") value\"); return n.viewMode = e, d = Math.max(y.indexOf(e), h), I(), p }, p.toolbarPlacement = function (e) { if (0 === arguments.length) return n.toolbarPlacement; if (\"string\" != typeof e) throw new TypeError(\"toolbarPlacement() expects a string parameter\"); if (-1 === v.indexOf(e)) throw new TypeError(\"toolbarPlacement() parameter must be one of (\" + v.join(\", \") + \") value\"); return n.toolbarPlacement = e, m && (K(), _()), p }, p.widgetPositioning = function (t) { if (0 === arguments.length) return e.extend({}, n.widgetPositioning); if (\"[object Object]\" !== {}.toString.call(t)) throw new TypeError(\"widgetPositioning() expects an object variable\"); if (t.horizontal) { if (\"string\" != typeof t.horizontal) throw new TypeError(\"widgetPositioning() horizontal variable must be a string\"); if (t.horizontal = t.horizontal.toLowerCase(), -1 === b.indexOf(t.horizontal)) throw new TypeError(\"widgetPositioning() expects horizontal parameter to be one of (\" + b.join(\", \") + \")\"); n.widgetPositioning.horizontal = t.horizontal } if (t.vertical) { if (\"string\" != typeof t.vertical) throw new TypeError(\"widgetPositioning() vertical variable must be a string\"); if (t.vertical = t.vertical.toLowerCase(), -1 === w.indexOf(t.vertical)) throw new TypeError(\"widgetPositioning() expects vertical parameter to be one of (\" + w.join(\", \") + \")\"); n.widgetPositioning.vertical = t.vertical } return G(), p }, p.calendarWeeks = function (e) { if (0 === arguments.length) return n.calendarWeeks; if (\"boolean\" != typeof e) throw new TypeError(\"calendarWeeks() expects parameter to be a boolean value\"); return n.calendarWeeks = e, G(), p }, p.showTodayButton = function (e) { if (0 === arguments.length) return n.showTodayButton; if (\"boolean\" != typeof e) throw new TypeError(\"showTodayButton() expects a boolean parameter\"); return n.showTodayButton = e, m && (K(), _()), p }, p.showClear = function (e) { if (0 === arguments.length) return n.showClear; if (\"boolean\" != typeof e) throw new TypeError(\"showClear() expects a boolean parameter\"); return n.showClear = e, m && (K(), _()), p }, p.widgetParent = function (t) { if (0 === arguments.length) return n.widgetParent; if (\"string\" == typeof t && (t = e(t)), null !== t && \"string\" != typeof t && !(t instanceof e)) throw new TypeError(\"widgetParent() expects a string or a jQuery object parameter\"); return n.widgetParent = t, m && (K(), _()), p }, p.keepOpen = function (e) { if (0 === arguments.length) return n.keepOpen; if (\"boolean\" != typeof e) throw new TypeError(\"keepOpen() expects a boolean parameter\"); return n.keepOpen = e, p }, p.inline = function (e) { if (0 === arguments.length) return n.inline; if (\"boolean\" != typeof e) throw new TypeError(\"inline() expects a boolean parameter\"); return n.inline = e, p }, p.clear = function () { return X(), p }, p.keyBinds = function (e) { return n.keyBinds = e, p }, p.debug = function (e) { if (\"boolean\" != typeof e) throw new TypeError(\"debug() expects a boolean parameter\"); return n.debug = e, p }, p.showClose = function (e) { if (0 === arguments.length) return n.showClose; if (\"boolean\" != typeof e) throw new TypeError(\"showClose() expects a boolean parameter\"); return n.showClose = e, p }, p.keepInvalid = function (e) { if (0 === arguments.length) return n.keepInvalid; if (\"boolean\" != typeof e) throw new TypeError(\"keepInvalid() expects a boolean parameter\"); return n.keepInvalid = e, p }, p.datepickerInput = function (e) { if (0 === arguments.length) return n.datepickerInput; if (\"string\" != typeof e) throw new TypeError(\"datepickerInput() expects a string parameter\"); return n.datepickerInput = e, p }, a.is(\"input\")) r = a; else if (r = a.find(n.datepickerInput), 0 === r.size()) r = a.find(\"input\"); else if (!r.is(\"input\")) throw new Error('CSS class \"' + n.datepickerInput + '\" cannot be applied to non input element'); if (a.hasClass(\"input-group\") && (f = a.find(0 === a.find(\".datepickerbutton\").size() ? '[class^=\"input-group-\"]' : \".datepickerbutton\")), !n.inline && !r.is(\"input\")) throw new Error(\"Could not initialize DateTimePicker without an input element\"); return e.extend(!0, n, B()), p.options(n), dt(), it(), r.prop(\"disabled\") && p.disable(), r.is(\"input\") && 0 !== r.val().trim().length ? J(tt(r.val().trim())) : n.defaultDate && void 0 === r.attr(\"placeholder\") && J(n.defaultDate), n.inline && _(), p }; e.fn.datetimepicker = function (t) { return this.each(function () { var n = e(this); n.data(\"DateTimePicker\") || (t = e.extend(!0, {}, e.fn.datetimepicker.defaults, t), n.data(\"DateTimePicker\", a(n, t))) }) }, e.fn.datetimepicker.defaults = { format: !1, dayViewHeaderFormat: \"MMMM YYYY\", extraFormats: !1, stepping: 1, minDate: !1, maxDate: !1, useCurrent: !0, collapse: !0, locale: t.locale(), defaultDate: !1, disabledDates: !1, enabledDates: !1, icons: { time: \"glyphicon glyphicon-time\", date: \"glyphicon glyphicon-calendar\", up: \"glyphicon glyphicon-chevron-up\", down: \"glyphicon glyphicon-chevron-down\", previous: \"glyphicon glyphicon-chevron-left\", next: \"glyphicon glyphicon-chevron-right\", today: \"glyphicon glyphicon-screenshot\", clear: \"glyphicon glyphicon-trash\", close: \"glyphicon glyphicon-remove\" }, useStrict: !1, sideBySide: !1, daysOfWeekDisabled: [], calendarWeeks: !1, viewMode: \"days\", toolbarPlacement: \"default\", showTodayButton: !1, showClear: !1, showClose: !1, widgetPositioning: { horizontal: \"auto\", vertical: \"auto\" }, widgetParent: null, ignoreReadonly: !1, keepOpen: !1, inline: !1, keepInvalid: !1, datepickerInput: \".datepickerinput\", keyBinds: { up: function (e) { if (e) { var a = this.date() || t(); this.date(e.find(\".datepicker\").is(\":visible\") ? a.clone().subtract(7, \"d\") : a.clone().add(1, \"m\")) } }, down: function (e) { if (!e) return void this.show(); var a = this.date() || t(); this.date(e.find(\".datepicker\").is(\":visible\") ? a.clone().add(7, \"d\") : a.clone().subtract(1, \"m\")) }, \"control up\": function (e) { if (e) { var a = this.date() || t(); this.date(e.find(\".datepicker\").is(\":visible\") ? a.clone().subtract(1, \"y\") : a.clone().add(1, \"h\")) } }, \"control down\": function (e) { if (e) { var a = this.date() || t(); this.date(e.find(\".datepicker\").is(\":visible\") ? a.clone().add(1, \"y\") : a.clone().subtract(1, \"h\")) } }, left: function (e) { if (e) { var a = this.date() || t(); e.find(\".datepicker\").is(\":visible\") && this.date(a.clone().subtract(1, \"d\")) } }, right: function (e) { if (e) { var a = this.date() || t(); e.find(\".datepicker\").is(\":visible\") && this.date(a.clone().add(1, \"d\")) } }, pageUp: function (e) { if (e) { var a = this.date() || t(); e.find(\".datepicker\").is(\":visible\") && this.date(a.clone().subtract(1, \"M\")) } }, pageDown: function (e) { if (e) { var a = this.date() || t(); e.find(\".datepicker\").is(\":visible\") && this.date(a.clone().add(1, \"M\")) } }, enter: function () { this.hide() }, escape: function () { this.hide() }, \"control space\": function (e) { e.find(\".timepicker\").is(\":visible\") && e.find('.btn[data-action=\"togglePeriod\"]').click() }, t: function () { this.date(t()) }, \"delete\": function () { this.clear() } }, debug: !1 } });\n\n \n\n /** jquery.onoff - v0.3.5 - 2014-05-12\n\n * https://github.com/timmywil/jquery.onoff\n\n * Copyright (c) 2014 Timmy Willison; Licensed MIT */\n\n !function (a, b) { \"function\" == typeof define && define.amd ? define([\"jquery\"], b) : \"object\" == typeof exports ? b(require(\"jquery\")) : b(a.HawkSearch.jQuery) }(this, function (a) { \"use strict\"; function b(c, d) { if (!(this instanceof b)) return new b(c, d); if (\"input\" !== c.nodeName.toLowerCase() || \"checkbox\" !== c.type) return a.error(\"OnOff should be called on checkboxes\"); var e = a.data(c, b.datakey); return e ? e : (this.options = d = a.extend({}, b.defaults, d), this.elem = c, this.$elem = a(c).addClass(d.className), this.$doc = a(c.ownerDocument || document), d.namespace += a.guid++, c.id || (c.id = \"onoffswitch\" + g++), this.enable(), a.data(c, b.datakey, this), void 0) } var c = \"over out down up move enter leave cancel\".split(\" \"), d = a.extend({}, a.event.mouseHooks), e = {}; if (window.PointerEvent) a.each(c, function (b, c) { a.event.fixHooks[e[c] = \"pointer\" + c] = d }); else { var f = d.props; d.props = f.concat([\"touches\", \"changedTouches\", \"targetTouches\", \"altKey\", \"ctrlKey\", \"metaKey\", \"shiftKey\"]), d.filter = function (a, b) { var c, d = f.length; if (!b.pageX && b.touches && (c = b.touches[0])) for (; d--;) a[f[d]] = c[f[d]]; return a }, a.each(c, function (b, c) { if (2 > b) e[c] = \"mouse\" + c; else { var f = \"touch\" + (\"down\" === c ? \"start\" : \"up\" === c ? \"end\" : c); a.event.fixHooks[f] = d, e[c] = f + \" mouse\" + c } }) } a.pointertouch = e; var g = 1, h = Array.prototype.slice; return b.datakey = \"_onoff\", b.defaults = { namespace: \".onoff\", className: \"onoffswitch-checkbox\" }, b.prototype = { constructor: b, instance: function () { return this }, wrap: function () { var b = this.elem, c = this.$elem, d = this.options, e = c.parent(\".onoffswitch\"); e.length || (c.wrap('<div class=\"onoffswitch\"></div>'), e = c.parent().addClass(b.className.replace(d.className, \"\"))), this.$con = e; var f = c.next('label[for=\"' + b.id + '\"]'); f.length || (f = a(\"<label/>\").attr(\"for\", b.id).insertAfter(b)), this.$label = f.addClass(\"onoffswitch-label\"); var g = f.find(\".onoffswitch-inner\"); g.length || (g = a(\"<div/>\").addClass(\"onoffswitch-inner\").prependTo(f)), this.$inner = g; var h = f.find(\".onoffswitch-switch\"); h.length || (h = a(\"<div/>\").addClass(\"onoffswitch-switch\").appendTo(f)), this.$switch = h }, _handleMove: function (a) { if (!this.disabled) { this.moved = !0, this.lastX = a.pageX; var b = Math.max(Math.min(this.startX - this.lastX, this.maxRight), 0); this.$switch.css(\"right\", b), this.$inner.css(\"marginLeft\", 100 * -(b / this.maxRight) + \"%\") } }, _startMove: function (b) { b.preventDefault(); var c, d; \"pointerdown\" === b.type ? (c = \"pointermove\", d = \"pointerup\") : \"touchstart\" === b.type ? (c = \"touchmove\", d = \"touchend\") : (c = \"mousemove\", d = \"mouseup\"); var e = this.elem, f = this.$elem, g = this.options.namespace, h = this.$switch, i = h[0], j = this.$inner.add(h).css(\"transition\", \"none\"); this.maxRight = this.$con.width() - h.width() - a.css(i, \"margin-left\", !0) - a.css(i, \"margin-right\", !0) - a.css(i, \"border-left-width\", !0) - a.css(i, \"border-right-width\", !0); var k = e.checked; this.moved = !1, this.startX = b.pageX + (k ? 0 : this.maxRight); var l = this, m = this.$doc.on(c + g, a.proxy(this._handleMove, this)).on(d + g, function () { j.css(\"transition\", \"\"), m.off(g), setTimeout(function () { if (l.moved) { var a = l.lastX > l.startX - l.maxRight / 2; e.checked !== a && (e.checked = a, f.trigger(\"change\")) } l.$switch.css(\"right\", \"\"), l.$inner.css(\"marginLeft\", \"\") }) }) }, _bind: function () { this._unbind(), this.$switch.on(a.pointertouch.down, a.proxy(this._startMove, this)) }, enable: function () { this.wrap(), this._bind(), this.disabled = !1 }, _unbind: function () { this.$doc.add(this.$switch).off(this.options.namespace) }, disable: function () { this.disabled = !0, this._unbind() }, unwrap: function () { this.disable(), this.$label.remove(), this.$elem.unwrap().removeClass(this.options.className) }, isDisabled: function () { return this.disabled }, destroy: function () { this.disable(), a.removeData(this.elem, b.datakey) }, option: function (b, c) { var d, e = this.options; if (!b) return a.extend({}, e); if (\"string\" == typeof b) { if (1 === arguments.length) return void 0 !== e[b] ? e[b] : null; d = {}, d[b] = c } else d = b; a.each(d, a.proxy(function (a, b) { switch (a) { case \"namespace\": this._unbind(); break; case \"className\": this.$elem.removeClass(e.className) } switch (e[a] = b, a) { case \"namespace\": this._bind(); break; case \"className\": this.$elem.addClass(b) } }, this)) } }, a.fn.onoff = function (c) { var d, e, f, g; return \"string\" == typeof c ? (g = [], e = h.call(arguments, 1), this.each(function () { d = a.data(this, b.datakey), d ? \"_\" !== c.charAt(0) && \"function\" == typeof (f = d[c]) && void 0 !== (f = f.apply(d, e)) && g.push(f) : g.push(void 0) }), g.length ? 1 === g.length ? g[0] : g : this) : this.each(function () { new b(this, c) }) }, a.OnOff = b });\n\n \n\n // END Plugins\n \n }", "function ImagesgridFilter(){\n if( $('.image-grid, .single_blog_gallery').length ){\n $('.image-grid, .single_blog_gallery').imagesLoaded(function(){\n $('.image-grid, .single_blog_gallery').isotope({\n itemSelector: '.grid, .item_blog',\n layoutMode: 'masonry',\n masonry: {\n columnWidth: 1,\n }\n })\n });\n }\n }", "function enableMasonry() {\r\n if($('.sortable-masonry').length){\r\n\r\n var winDow = $(window);\r\n // Needed variables\r\n var $container=$('.sortable-masonry .items-container');\r\n var $filter=$('.sortable-masonry .filter-btns');\r\n\r\n $container.isotope({\r\n filter:'*',\r\n masonry: {\r\n columnWidth : 1\r\n },\r\n animationOptions:{\r\n duration:1000,\r\n easing:'linear'\r\n }\r\n });\r\n\r\n\r\n // Isotope Filter\r\n $filter.find('li').on('click', function(){\r\n var selector = $(this).attr('data-filter');\r\n\r\n try {\r\n $container.isotope({\r\n filter\t: selector,\r\n animationOptions: {\r\n duration: 1000,\r\n easing\t: 'linear',\r\n queue\t: false\r\n }\r\n });\r\n } catch(err) {\r\n\r\n }\r\n return false;\r\n });\r\n\r\n\r\n winDow.bind('resize', function(){\r\n var selector = $filter.find('li.active').attr('data-filter');\r\n\r\n $container.isotope({\r\n filter\t: selector,\r\n animationOptions: {\r\n duration: 1000,\r\n easing\t: 'linear',\r\n queue\t: false\r\n }\r\n });\r\n });\r\n\r\n\r\n var filterItemA\t= $('.sortable-masonry .filter-btns li');\r\n\r\n filterItemA.on('click', function(){\r\n var $this = $(this);\r\n if ( !$this.hasClass('active')) {\r\n filterItemA.removeClass('active');\r\n $this.addClass('active');\r\n }\r\n });\r\n }\r\n }", "finisher(t){window.customElements.define(e,t)}", "function qodefOnWindowResize() {\n qodefInitProductListMasonryShortcode();\n }", "function init_masonry(){\n var $container = $('#content');\n\n $container.imagesLoaded( function(){\n $container.masonry({\n itemSelector: '.box-content',\n isAnimated: true\n });\n });\n}", "newAssetConfigure() {\n let values = {\n source: this.shadowRoot.querySelector(\"#url\").value,\n title: this.shadowRoot.querySelector(\"#url\").value,\n };\n HAXStore.insertLogicFromValues(values, this);\n }", "function simplePortfolioInfiniteScroll() {\n \"use strict\";\n var container = '.masonry';\n var behavior = '';\n\n\n $(container).infinitescroll({\n\n navSelector: \"div.p_pagination\",\n // selector for the paged navigation (it will be hidden)\n nextSelector: \"div.p_pagination a.next_link\",\n // selector for the NEXT link (to page 2)\n itemSelector: \"#portfolio-preview-items .portfolio-item\",\n // selector for all items you'll retrieve\n animate: true,\n\n loading: {\n img: '',\n msgText: ''\n },\n\n behavior: behavior\n },\n\n function(arrayOfNewElems) {\n simplePortfolioInGrid();\n\n }\n\n );\n simplePortfolioPageIsotope();\n\n //s();\n\n\n }", "function Packer(){}", "function masonryGridSetting() {\n if ($('.masonry-gallery').length) {\n var $grid = $('.masonry-gallery').masonry({\n itemSelector: '.grid-item',\n columnWidth: '.grid-item',\n percentPosition: true\n });\n\n $grid.imagesLoaded().progress(function () {\n $grid.masonry('layout');\n });\n }\n }", "function WR_Shortcode_Gallery() {\n\t \tvar container = $( '.galleries .nitro-gallery-masonry' );\n\t \tif ( container.length ) {\n\t \t\tcontainer.each(function() {\n\t \t\t\tvar _this = $( this ),\n\t \t\t\tlayout = _this.attr( 'data-layout' );\n\t \t\t\t_this.WR_ImagesLoaded( function() {\n\n\t \t\t\t\tif ( layout == 'masonry' ) {\n\t \t\t\t\t\t_this.isotope( {\n\t \t\t\t\t\t\tfilter: '*',\n\t \t\t\t\t\t\tpercentPosition: true,\n\t \t\t\t\t\t\tmasonry: {\n\t \t\t\t\t\t\t\tcolumnWidth: '.grid-sizer',\n\t \t\t\t\t\t\t},\n\t \t\t\t\t\t} );\n\t \t\t\t\t} else {\n\t \t\t\t\t\t_this.isotope( {\n\t \t\t\t\t\t\tfilter: '*',\n\t \t\t\t\t\t\tpercentPosition: true,\n\t \t\t\t\t\t\tlayoutMode: 'fitRows'\n\t \t\t\t\t\t} );\n\t \t\t\t\t}\n\t \t\t\t} );\n\t \t\t});\n\t \t}\n\n\t \t$( '.gallery-cat a' ).click( function() {\n\t \t\tvar selector = $( this ).attr( 'data-filter' );\n\t \t\t$( this ).closest( '.galleries' ).find( '.nitro-gallery-masonry' ).isotope( {\n\t \t\t\tfilter: selector,\n\t \t\t\ttransitionDuration: '0.3s',\n\t \t\t} );\n\t \t} );\n\t \tvar $optionSets = $( '.gallery-cat' ), $optionLinks = $optionSets.find( 'a' );\n\n\t \t$optionLinks.click( function() {\n\t \t\tvar $this = $( this );\n\t\t\t// don't proceed if already selected\n\t\t\tif ( $this.hasClass( 'selected' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar $optionSet = $this.parents( '.gallery-cat' );\n\t\t\t$optionSet.find( '.selected' ).removeClass( 'selected' );\n\t\t\t$this.addClass( 'selected' );\n\t\t} );\n\n\t \tif ( window.innerWidth <= 769 ) {\n\t \t\t$( '.filter-on-mobile' ).on( 'click', function() {\n\t \t\t\t$( this ).next().slideToggle();\n\t \t\t} );\n\n\t \t\t$( '.gallery-cat a[data-filter]' ).on( 'click', function() {\n\t \t\t\tvar text = $( this ).text();\n\t \t\t\t$( this ).parent().siblings( '.filter-on-mobile' ).find( 'span' ).text( text );\n\t \t\t\t$( this ).parent().slideToggle();\n\t \t\t} );\n\t \t}\n\t }", "function galleryGrid() {\n //ISOTOPE media\n var $container = $('.work1').isotope({\n itemSelector: '.thumbnail',\n masonry: {\n columnWidth: '.thumbnail.small'\n }\n });\n // filter items on button click\n $('.filters').on( 'click', 'li', function() {\n var filterValue = $(this).attr('data-filter');\n $container.isotope({ filter: filterValue });\n });\n\n // change is-checked class on buttons\n $('.filters').each( function( i, buttonGroup ) {\n var $buttonGroup = $( buttonGroup );\n $buttonGroup.on( 'click', 'li', function() {\n $buttonGroup.find('.is-checked').removeClass('is-checked');\n $( this ).addClass('is-checked');\n });\n });\n\n // load more\n $('#append').on('click', function(e) {\n var newItems = $('#more-items').appendTo('.thumbnails');\n $(\".thumbnails\").isotope('insert', newItems );\n $(this).hide();\n return false;\n });\n}", "function initMasonryEffect() {\n\n\t\t$allElm = $(gridElementSpecific); // Get all elements from DOM and set allElm variable\n\t\t$allElm.hide(); // Hide html elements prelimenary\n\t\t$allElm.css('position', 'absolute'); // Positions elements absolutely\n\n\t\t// If the grid is present (#grid has elements), do masonry\n\t\tif ($allElm.length !== 0) {\n\n\t\t\t// Check if site is accessed correctly through the hashes (for index pages). If not, redirect to home and set hash route.\n\t\t\tif ($('body.home').length === 0) {\n\t\t\t\tvar newUrl = hashizeUrl(window.location.href);\n\t\t\t\tsetUrl(newUrl);\n\n\t\t\t// If no hash is set, initialize splash screen with all items\n\t\t\t} else if (getHash() === '') {\n\t\t\t\tsetHash('all');\n\n\t\t\t// Page is ready for masonry\n\t\t\t} else if (getHash() === 'shop') {\n\t\t\t\tsetHash('category-shop');\n\t\t\t} else {\n\t\t\t\tprepareMasonry();\n\t\t\t}\n\n\t\t\t// Change hash on click\n\t\t\t$('li.menu-item-type-taxonomy > a').click(function() {\n\t\t\t\tvar category = hashizeUrl($(this).attr(\"href\"), true);\n//\t\t\t\tcategory = category.replace(/\\//g,\"-\");\n\t\t\t\tsetHash(category);\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t// Watch for hash change and do masonry when changed\n\t\t\t$(window).hashchange(function() {\n\n\t\t\t\t// Alert Google Analytics that new async page has been called (converted to non-hashed url) and track with _gaq\n\t\t\t\tif (checkGoogleAnalyticsLoaded()) {\n\t\t\t\t\tvar trackUrl = antiHashizeUrl(getHash(), true, false);\n\t\t\t\t\tif (trackUrl == \"all\") { trackUrl = \"\"; }\n\t\t\t\t\tvar trackLocation = '/' + trackUrl;\n\t\t\t\t\t_gaq.push(['_trackPageview', trackLocation]);\n\t\t\t\t}\n\n\t\t\t\tprepareMasonry();\n\t\t\t});\n\n\t\t// The grid is not present, wait for clicks\n\t\t} else {\n\n\t\t\t// Change hash on click\n\t\t\t$('li.menu-item-type-taxonomy > a').click(function() {\n\t\t\t\tvar category = hashizeUrl($(this).attr(\"href\"), true);\n//\t\t\t\tcategory = category.replace(/\\//g,\"-\");\n\t\t\t\tvar url = base + \"#\" + category;\n\t\t\t\tsetUrl(url);\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\n\t}", "function init() {\n this.$ = require(\"jquery/dist/jquery\");\n this.jQuery = this.$;\n\n require(\"svg4everybody/dist/svg4everybody\")();\n require(\"retinajs/dist/retina\");\n\n require(\"bootstrap/dist/js/bootstrap.bundle\");\n\n\n\n $(document).ready(function () {\n require(\"./components/interractionObserver\")();\n });\n}", "static get tag() {\n return \"lrndesign-gallery-masonry\";\n }", "function Portfolio() {\r\n\t\t\r\n\t\tvar $container = $('#portfolio');\r\n\t\t\r\n\t\t$container.packery({\r\n\t\t\titemSelector: '.item',\r\n\t\t\tgutter:0,\r\n\t\t\ttransitionDuration: \"0.5s\"\r\n\t\t});\r\n\t\t\r\n\t\t$('#filters a').on('click', function() {\r\n\t\t\t$('#filters a').removeClass('active');\r\n\t\t\t$(this).addClass('active');\r\n\t\t\t$('.item').addClass('item-margins');\r\n\t\t\tvar selector = $(this).attr('data-filter');\r\n\t\t\t$container.isotope({ filter: selector }, function( $changedItems, instance ) {\r\n\t\t\t instance.$allAtoms.filter('.isotope-hidden').removeClass('is-filtered');\r\n\t\t\t instance.$filteredAtoms.addClass('is-filtered');\r\n\t\t\t});\t\t\r\n\t\t\treturn false;\r\n\t\t});\r\n\t\t\r\n\t\t$('#filters #all').on('click', function() {\r\n\t\t\t$('.item').removeClass('item-margins');\r\n\t\t});\r\n\t\t\r\n\t\tfunction parallax_item() {\t\t\t\t\r\n\t\t\t$('.item.wide').each(function(){\t\t\t\t\t\r\n\t\t\t\tvar difference = $(window).scrollTop() - $(this).offset().top;\r\n\t\t\t\tvar half = (difference / 10) + 'px',\r\n\t\t\t\ttransform = 'translate3d( 0, ' + half + ',0)';\t\t\t\t\r\n\t\t\t\t$(this).css('transform', transform);\t\t\t\r\n\t\t\t});\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$(\"#all\").trigger('click');\r\n\t\t\t\t\t\r\n\t\tparallax_item();\r\n\t\r\n\t\t$(window).on('scroll load ', parallax_item);\r\n\t\t\r\n\t\t$('a.ajax-link, a.ajax-link-menu, a.ajax-link-project').on('click', function() {\r\n\t\t\t$(window).off('scroll', parallax_item);\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tvar $animation_elements = $('.item');\r\n\t\tvar $window = $(window);\r\n\t\t\r\n\t\tfunction check_if_in_view() {\r\n\t\t\tvar window_height = $window.height();\r\n\t\t\tvar window_top_position = $window.scrollTop();\r\n\t\t\tvar window_bottom_position = (window_top_position + window_height);\r\n\t\t\r\n\t\t\t$.each($animation_elements, function() {\r\n\t\t\t\tvar $element = $(this);\r\n\t\t\t\tvar element_height = $element.outerHeight();\r\n\t\t\t\tvar element_top_position = $element.offset().top + 50;\r\n\t\t\t\tvar element_bottom_position = (element_top_position + element_height);\r\n\t\t\t\t\r\n\t\t\t\t//check to see if this current container is within viewport\r\n\t\t\t\tif ((element_bottom_position >= window_top_position) &&\t(element_top_position <= window_bottom_position)) {\r\n\t\t\t\t\t$element.addClass('in-view');\t\t\t\t\t\t\r\n\t\t\t\t} else if (element_bottom_position >= window_top_position) {\r\n\t\t\t\t\t$element.removeClass('in-view');\r\n\t\t\t\t} else if (element_top_position <= window_bottom_position) {\r\n\t\t\t\t\t$element.removeClass('in-view');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\t\t\r\n\t\t$window.on('scroll resize', check_if_in_view);\t\r\n\t\t\r\n\t\t\r\n\t\tvar $window = $(window),\r\n\t\t\t$portfolio = $('#portfolio');\r\n\t\r\n\t\tfunction resize() {\r\n\t\t\tif ($window.width() < 1025) {\r\n\t\t\t\treturn $portfolio.addClass('mobile');\r\n\t\t\t}\r\n\t\r\n\t\t\t$portfolio.removeClass('mobile');\r\n\t\t}\t\t\r\n\t\t\r\n\t\t//Title Reveal Hover Effect\r\n\t\tif( $('.title-reveal').length > 0 ){\r\n\t\t\t\r\n\t\t\t$('.item-title').each(function(){\r\n\t\t\t\tvar words = $(this).text().split(\" \");\r\n\t\t\t\tvar total = words.length;\r\n\t\t\t\t$(this).empty();\r\n\t\t\t\tfor (index = 0; index < total; index ++){\r\n\t\t\t\t\t$(this).append($(\"<div /> \").text(words[index]));\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\t$('.item-title-hover').each(function(){\r\n\t\t\t\tvar words = $(this).text().split(\" \");\r\n\t\t\t\tvar total = words.length;\r\n\t\t\t\t$(this).empty();\r\n\t\t\t\tfor (index = 0; index < total; index ++){\r\n\t\t\t\t\t$(this).append($(\"<div /> \").text(words[index]));\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tsetTimeout( function(){\r\n\t\t\r\n\t\t\t$('.item-title div').each(function(){\r\n\t\t\t\tvar words = $(this).text().slice(\" \");\r\n\t\t\t\tvar total = words.length;\r\n\t\t\t\t$(this).empty();\r\n\t\t\t\tfor (index = 0; index < total; index ++){\r\n\t\t\t\t\t$(this).append($(\"<span /> \").text(words[index]));\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\t$('.item-title-hover div').each(function(){\r\n\t\t\t\tvar words = $(this).text().slice(\" \");\r\n\t\t\t\tvar total = words.length;\r\n\t\t\t\t$(this).empty();\r\n\t\t\t\tfor (index = 0; index < total; index ++){\r\n\t\t\t\t\t$(this).append($(\"<span /> \").text(words[index]));\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t} , 100 );\r\n\t\t\t\t\r\n\t\t\t$(\"#portfolio\").find(\".item-content\").each(function() {\t\t\t\t\t\r\n\t\t\t\t$($(this)).find(\".item-caption .item-cat\").appendTo($(this))\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\r\n\t\t\tvar over = null,\r\n\t\t\t\t out = null;\r\n\t\t\t\r\n\t\t\t$(\".title-reveal .item-content\").hover(mouseOver, mouseOut);\r\n\t\t\t\r\n\t\t\tfunction mouseOver() {\r\n\t\t\t \r\n\t\t\t\tvar delay = 0;\r\n\t\t\t\tif (out && out.isActive()) {\r\n\t\t\t\t\tout.timeScale(3);\r\n\t\t\t\t\tdelay = 0.1;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tover = new TimelineLite({ delay: delay });\r\n\t\t\t\r\n\t\t\t\t$(this).find('.item-title span').each(function(index, element) {\r\n\t\t\t\tover.to(element, 0.2, {scale:1, x:30, opacity:0, ease:Power2.easeIn}, index * 0.01)\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tover.set($(this).find('.item-title span'), {delay:0.2, x: -30, opacity:0});\r\n\t\t\t\t\r\n\t\t\t\t$(this).find('.item-title-hover span').each(function(index, element) {\r\n\t\t\t\t\tover.to(element, 0.2, {scale:1, x:0, opacity:1, scale:1, delay:0.15, ease:Power2.easeOut}, index * 0.01)\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfunction mouseOut() {\r\n\t\t\t\t\r\n\t\t\t\tvar delay = 0;\r\n\t\t\t\tif (over && over.isActive()) {\r\n\t\t\t\t\tover.timeScale(3);\r\n\t\t\t\t\tdelay = 0.1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tout = new TimelineLite({ delay: delay });\r\n\t\t\t\t\r\n\t\t\t\t$(this).find('.item-title span').each(function(index, element) {\r\n\t\t\t\t\tout.to(element, 0.2, {scale:1, x:0, opacity:1, scale:1, delay:0.15, ease:Power2.easeOut}, index * 0.01)\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t$(this).find('.item-title-hover span').each(function(index, element) {\r\n\t\t\t\t\tout.to(element, 0.2, {scale:1, x:30, opacity:0, ease:Power2.easeIn}, index * 0.01)\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tout.set($(this).find('.item-title-hover span'), {delay:0.3, x: -30, opacity:0});\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$(\".item-content\").mouseenter(function(e) {\t\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{transformOrigin: '15px 15px', borderWidth: '1px', backgroundColor : 'rgba(0, 0, 0, 1)', scale: 1.8});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t\t$( \"#ball\" ).addClass(\"with-icon\").append( '<i class=\"fa fa-plus\"></i>' );\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t\t$(\".item-content\").mouseleave(function(e) {\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, backgroundColor : 'rgba(0, 0, 0, 0)', x: -15, y: -15});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t\t$(\"#ball\").removeClass(\"with-icon\");\r\n\t\t\t\t$('#ball i').remove();\r\n\t\t\t});\r\n\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t\t//Title Big Hover Effect\r\n\t\tif( $('.title-big').length > 0 ){\r\n\t\t\t\r\n\t\t\t// Portfolio Parallax\r\n\t\t\tif ($(\"#portfolio\").hasClass(\"title-big\")) {\r\n $(\"body\").append('<div class=\"big-title-caption\"></div>');\r\n\t\t\t\t$(\".big-title-caption\").append('<div class=\"outer\"></div>');\r\n\t\t\t\t$(\".big-title-caption .outer\").append('<div class=\"inner\"></div>');\r\n $(\"#portfolio\").find(\".item .item-caption\").each(function() {\r\n $(\".big-title-caption .outer .inner\").append($(this))\r\n }), $(\"#portfolio\").find(\".item a\").on(\"mouseenter\", function(e) {\r\n \r\n\t\t\t\t\tTweenMax.to($(\".big-title-caption .outer .inner\").children().children(\".item-title\").eq($(this).parent().index()), 0.2, {force3D:true, opacity:1, y: 0, delay:0.15, ease:Power2.easeOut});\r\n\t\t\t\t\tTweenMax.to($(\".big-title-caption .outer .inner\").children().children(\".item-cat\").eq($(this).parent().index()), 0.2, {force3D:true, opacity:1, y: 0, delay:0.25, ease:Power2.easeOut});\r\n\t\t\t\t\t\r\n }).on(\"mouseleave\", function(e) {\r\n \r\n\t\t\t\t\tTweenMax.to($(\".big-title-caption .outer .inner\").children().children(\".item-title\").eq($(this).parent().index()), 0.2, {force3D:true, opacity:0, y: -50, ease:Power2.easeIn});\r\n\t\t\t\t\tTweenMax.to($(\".big-title-caption .outer .inner\").children().children(\".item-cat\").eq($(this).parent().index()), 0.2, {force3D:true, opacity:0, y: -30, delay:0.05, ease:Power2.easeIn});\r\n\t\t\t\t\tTweenMax.set($(\".big-title-caption .outer .inner\").children().children(\".item-title\").eq($(this).parent().index()), { y: 50, opacity:0, delay:0.2});\r\n\t\t\t\t\tTweenMax.set($(\".big-title-caption .outer .inner\").children().children(\".item-cat\").eq($(this).parent().index()), { y: 30, opacity:0, delay:0.25});\r\n\t\t\t\t\t\r\n }).on(\"click\", function() {\r\n $(\".big-title-caption .outer .inner\").addClass(\"hover\")\r\n });\r\n $(\".item-title-hover\").remove();\r\n }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$(\".item-content\").mouseenter(function(e) {\t\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{transformOrigin: '15px 15px', borderWidth: '1px', backgroundColor : 'rgba(0, 0, 0, 1)', scale: 1.8});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t\t$( \"#ball\" ).addClass(\"with-icon\").append( '<i class=\"fa fa-plus\"></i>' );\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t\t$(\".item-content\").mouseleave(function(e) {\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, backgroundColor : 'rgba(0, 0, 0, 0)', x: -15, y: -15});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t\t$(\"#ball\").removeClass(\"with-icon\");\r\n\t\t\t\t$('#ball i').remove();\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Title Floating Tooltip\r\n\t\tif( $('.title-tooltip').length > 0 ){\r\n\t\t\t\r\n\t\t\t$(\".item-title-hover\").remove();\r\n\t\t\t\r\n\t\t\t$(\"#ball\").append('<div class=\"title-caption-tooltip\"></div>');\r\n\t\t\t$(\"#portfolio\").find(\".item .item-caption\").each(function() {\r\n\t\t\t\t$(\".title-caption-tooltip\").append($(this))\r\n\t\t\t}), $(\"#portfolio\").find(\".item a\").on(\"mouseenter\", function(e) {\r\n\t\t\t\t$(\".title-caption-tooltip\").children().eq($(this).parent().index()).addClass(\"hover\")\r\n\t\t\t}).on(\"mouseleave\", function(e) {\r\n\t\t\t\t$(\".title-caption-tooltip\").children().eq($(this).parent().index()).removeClass(\"hover\")\r\n\t\t\t}).on(\"click\", function() {\r\n\t\t\t\t$(\".title-caption-tooltip\").children().eq($(this).parent().index()).removeClass(\"hover\")\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$(\".item-content\").mouseenter(function(e) {\t\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '0px'});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t\t$(\".item-content\").mouseleave(function(e) {\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px'});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t\t//Title Floating Tooltip\r\n\t\tif( $('.title-overlay').length > 0 ){\r\n\t\t\t\r\n\t\t\t$(\".item-title-hover\").remove();\r\n\t\t\t\r\n\t\t\t$( \".item-image\" ).wrap( \"<div class='item-image-wrap'></div>\" );\r\n\t\t\t\r\n\t\t\t$(\".item-content\").mouseenter(function(e) {\t\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{transformOrigin: '15px 15px', borderWidth: '1px', backgroundColor : 'rgba(0, 0, 0, 1)', scale: 1.8});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t\t$( \"#ball\" ).addClass(\"with-icon\").append( '<i class=\"fa fa-plus\"></i>' );\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t\t$(\".item-content\").mouseleave(function(e) {\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, backgroundColor : 'rgba(0, 0, 0, 0)', x: -15, y: -15});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t\t$(\"#ball\").removeClass(\"with-icon\");\r\n\t\t\t\t$('#ball i').remove();\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$(\"#close-sidebar\").mouseenter(function(e) {\t\r\n\t\t\tTweenMax.to('#ball', 0.1,{transformOrigin: '15px 15px', borderWidth: '1px', scale: 1.8});\r\n\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t$( \"#ball\" ).addClass(\"close-icon\").append( '<i class=\"fa fa-times\"></i>' );\r\n\t\t});\r\n\t\t\t\r\n\t\t$(\"#close-sidebar\").mouseleave(function(e) {\r\n\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, x: -15, y: -15});\r\n\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t$(\"#ball\").removeClass(\"close-icon\");\r\n\t\t\t$('#ball i').remove();\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t$window\r\n\t\t\t.resize(resize)\r\n\t\t\t.trigger('resize');\r\n\t\t\r\n\t\t\r\n\t\t//Project Navigation\r\n\t\tvar over = null,\r\n\t\tout = null;\r\n\t\t\r\n\t\tTweenLite.set(\".main-subtitle\", { yPercent: 100 });\r\n\t\t\r\n\t\t$(\".next-project-title\").hover(mouseOver, mouseOut);\r\n\t\t\r\n\t\tfunction mouseOver() {\r\n\t\t\tvar delay = 0;\r\n\t\t\tif (out && out.isActive()) {\r\n\t\t\t\tout.timeScale(3);\r\n\t\t\t\tdelay = 0.1;\r\n\t\t\t}\t\t\r\n\t\t\tover = new TimelineLite({ delay: delay });\t\t\r\n\t\t\tover\r\n\t\t\t\t.to($(\".main-title\"), 0.3, { yPercent: -100 }, 0)\r\n\t\t\t\t.fromTo(\".main-subtitle\", 0.3, { yPercent: 100 }, { yPercent: 0 }, 0);\r\n\t\t}\r\n\t\t\r\n\t\tfunction mouseOut() {\r\n\t\t\tvar delay = 0;\r\n\t\t\tif (over && over.isActive()) {\r\n\t\t\t\tover.timeScale(3);\r\n\t\t\t\tdelay = 0.1;\r\n\t\t\t}\r\n\t\t\r\n\t\t\tout = new TimelineLite({ delay: delay });\r\n\t\t\r\n\t\t\tout\r\n\t\t\t\t.to($(\".main-subtitle\"), 0.3, { yPercent: -100 }, 0)\r\n\t\t\t\t.fromTo($(\".main-title\"), 0.3, { yPercent: 100 }, { yPercent: 0 }, 0);\r\n\t\t}\r\n\t\r\n\t}", "function portfolio(){\r\n\r\n $('#js-grid-mosaic-flat').cubeportfolio({\r\n layoutMode: 'mosaic',\r\n sortByDimension: true,\r\n mediaQueries: [ {\r\n width: 800,\r\n cols: 3,\r\n }, {\r\n width: 767,\r\n cols: 2,\r\n }, {\r\n width: 480,\r\n cols: 1,\r\n }],\r\n gapHorizontal: 15,\r\n gapVertical: 15,\r\n gridAdjustment: 'responsive',\r\n caption: 'zoom',\r\n\r\n // lightbox\r\n lightboxDelegate: '.cbp-lightbox',\r\n lightboxGallery: true,\r\n lightboxTitleSrc: 'data-title',\r\n });\r\n }", "configure() {\n //if (typeof $.fn.SageMedia == 'undefined') {\n // this.js = '/js/SageMediaManagement.js';\n //}\n //this.css = '//';\n }", "function setup() {\n\n\n\n var $targetedEls;\n\n //For each area that we've hooked this module to,\n //update it independently from the others.\n $modules.each(function(index, el) {\n\n //Loop through our object that contains all the selectors\n //we need to check for. If it finds any, compare their heights\n //and set them all to be equal to the tallest.\n for (var subject in subjects) {\n\n if (subjects.hasOwnProperty(subject) && $(subject).length) {\n\n //Gets the array of selectors we want to play with\n childEls = subjects[subject];\n\n //For each selector in the array\n //(each group of things that should have matching heights)\n //Gets tallest of the group and sets the rest to that height\n for (var i = childEls.length - 1; i >= 0; i--) {\n\n $targetedEls = $(this).find(subject + ' ' + childEls[i]);\n\n //Only do this bit if the selector is found\n if ($targetedEls.length) {\n //Set all to auto first so we can start fresh (window resize etc)\n $targetedEls.height('auto');\n }\n\n setNewHeight($targetedEls, getTallestHeight($targetedEls));\n\n }\n }\n }\n });\n }", "function _masonry( container ) {\n\n\t\t/* Gallery Grid */\n\t\t$( '.gallery-grid' ).isotope({\n\t\t\t\titemSelector : '.gallery-grid-item',\n\t\t\t\ttransitionDuration: 0,\n\t\t});\n\t\tsetTimeout( function(){ $( '.gallery-grid' ).isotope( 'layout' ) }, 3000);\n\n\t}", "function filterSorting() {\n \n // Selector elements\n var $layout = $('.portfolio .items, .blog.grid .items');\n \n // Check element exist\n if($layout.length) {\n $layout.each(function(){\n \n // Init - Liquid Layout\n var $el = $(this)\n , $filter;\n \n $el.isotope({\n layoutMode : 'fitRows',\n itemSelector : 'article',\n animationEngine : 'best-available',\n\n // Fallback animation\n animationOptions : {\n duration : 300\n },\n\n containerStyle : {\n position : 'relative',\n overflow : ''\n }\n });\n \n \n // Filter - Sorting\n $filter = $el.parent().find('.filter li');\n \n if ( $filter.length ) {\n \n // Add class from 'data-'\n $el.find('article').each(function(){\n $(this).addClass($(this).attr('data-tags'));\n });\n \n $filter.on('click touchstart', function(){\n var dataFilter = $(this).attr('data-tags');\n \n if(dataFilter){\n\n if(dataFilter != '*') {\n // Add '.' to dataFilter\n dataFilter = '.' + dataFilter;\n dataFilter = dataFilter.replace(/(,\\s+)|(\\s+)/g, ', .');\n }\n\n $el.isotope({ filter: dataFilter });\n }\n return false;\n }); \n }\n\n });\n }\n}", "function classicInfiniteScrollingInit($container) {\n\tif (globalDebug) {console.log(\"Classic Infinite Scroll Init\");}\n\n\t//we will use the same global variables as isotope to avoid declaring others\n\tmax_isotope_pages = $container.data('maxpages');\n\tisotope_page_counter = 1;\n\n\t$container.infinitescroll({\n\t\t\tnavSelector : 'ol.pagination', // selector for the paged navigation\n\t\t\tnextSelector : 'ol.pagination a.next', // selector for the NEXT link\n\t\t\titemSelector : 'article.article-archive', // selector for all items you'll retrieve\n\t\t\tloading: {\n\t\t\t\tfinished: undefined,\n\t\t\t\tfinishedMsg: objectl10n.infscrReachedEnd,\n\t\t\t\timg: \"data:image/gif;base64,R0lGODlhIAAgAPUAAP///wAAAPr6+sTExOjo6PDw8NDQ0H5+fpqamvb29ubm5vz8/JKSkoaGhuLi4ri4uKCgoOzs7K6urtzc3D4+PlZWVmBgYHx8fKioqO7u7kpKSmxsbAwMDAAAAM7OzsjIyNjY2CwsLF5eXh4eHkxMTLCwsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAIAAgAAAG/0CAcEgkFjgcR3HJJE4SxEGnMygKmkwJxRKdVocFBRRLfFAoj6GUOhQoFAVysULRjNdfQFghLxrODEJ4Qm5ifUUXZwQAgwBvEXIGBkUEZxuMXgAJb1dECWMABAcHDEpDEGcTBQMDBQtvcW0RbwuECKMHELEJF5NFCxm1AAt7cH4NuAOdcsURy0QCD7gYfcWgTQUQB6Zkr66HoeDCSwIF5ucFz3IC7O0CC6zx8YuHhW/3CvLyfPX4+OXozKnDssBdu3G/xIHTpGAgOUPrZimAJCfDPYfDin2TQ+xeBnWbHi37SC4YIYkQhdy7FvLdpwWvjA0JyU/ISyIx4xS6sgfkNS4me2rtVKkgw0JCb8YMZdjwqMQ2nIY8BbcUQNVCP7G4MQq1KRivR7tiDEuEFrggACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCQmNBpCcckkEgREA4ViKA6azM8BEZ1Wh6LOBls0HA5fgJQ6HHQ6InKRcWhA1d5hqMMpyIkOZw9Ca18Qbwd/RRhnfoUABRwdI3IESkQFZxB4bAdvV0YJQwkDAx9+bWcECQYGCQ5vFEQCEQoKC0ILHqUDBncCGA5LBiHCAAsFtgqoQwS8Aw64f8m2EXdFCxO8INPKomQCBgPMWAvL0n/ff+jYAu7vAuxy8O/myvfX8/f7/Arq+v0W0HMnr9zAeE0KJlQkJIGCfE0E+PtDq9qfDMogDkGmrIBCbNQUZIDosNq1kUsEZJBW0dY/b0ZsLViQIMFMW+RKKgjFzp4fNokPIdki+Y8JNVxA79jKwHAI0G9JGw5tCqDWTiFRhVhtmhVA16cMJTJ1OnVIMo1cy1KVI5NhEAAh+QQJCgAAACwAAAAAIAAgAAAG/0CAcEgkChqNQnHJJCYWRMfh4CgamkzFwBOdVocNCgNbJAwGhKGUOjRQKA1y8XOGAtZfgIWiSciJBWcTQnhCD28Qf0UgZwJ3XgAJGhQVcgKORmdXhRBvV0QMY0ILCgoRmIRnCQIODgIEbxtEJSMdHZ8AGaUKBXYLIEpFExZpAG62HRRFArsKfn8FIsgjiUwJu8FkJLYcB9lMCwUKqFgGHSJ5cnZ/uEULl/CX63/x8KTNu+RkzPj9zc/0/Cl4V0/APDIE6x0csrBJwybX9DFhBhCLgAilIvzRVUriKHGlev0JtyuDvmsZUZlcIiCDnYu7KsZ0UmrBggRP7n1DqcDJEzciOgHwcwTyZEUmIKEMFVIqgyIjpZ4tjdTxqRCMPYVMBYDV6tavUZ8yczpkKwBxHsVWtaqo5tMgACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCQuBgNBcck0FgvIQtHRZCYUGSJ0IB2WDo9qUaBQKIXbLsBxOJTExUh5mB4iDo0zXEhWJNBRQgZtA3tPZQsAdQINBwxwAnpCC2VSdQNtVEQSEkOUChGSVwoLCwUFpm0QRAMVFBQTQxllCqh0kkIECF0TG68UG2O0foYJDb8VYVa0alUXrxoQf1WmZnsTFA0EhgCJhrFMC5Hjkd57W0jpDsPDuFUDHfHyHRzstNN78PPxHOLk5dwcpBuoaYk5OAfhXHG3hAy+KgLkgNozqwzDbgWYJQyXsUwGXKNA6fnYMIO3iPeIpBwyqlSCBKUqEQk5E6YRmX2UdAT5kEnHKkQ5hXjkNqTPtKAARl1sIrGoxSFNuSEFMNWoVCxEpiqyRlQY165wEHELAgAh+QQJCgAAACwAAAAAIAAgAAAG/0CAcEgsKhSLonJJTBIFR0GxwFwmFJlnlAgaTKpFqEIqFJMBhcEABC5GjkPz0KN2tsvHBH4sJKgdd1NHSXILah9tAmdCC0dUcg5qVEQfiIxHEYtXSACKnWoGXAwHBwRDGUcKBXYFi0IJHmQEEKQHEGGpCnp3AiW1DKFWqZNgGKQNA65FCwV8bQQHJcRtds9MC4rZitVgCQbf4AYEubnKTAYU6eoUGuSpu3fo6+ka2NrbgQAE4eCmS9xVAOW7Yq7IgA4Hpi0R8EZBhDshOnTgcOtfM0cAlTigILFDiAFFNjk8k0GZgAxOBozouIHIOyKbFixIkECmIyIHOEiEWbPJTTQ5FxcVOMCgzUVCWwAcyZJvzy45ADYVZNIwTlIAVfNB7XRVDLxEWLQ4E9JsKq+rTdsMyhcEACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCwqFIuicklMEgVHQVHKVCYUmWeUWFAkqtOtEKqgAsgFcDFyHJLNmbZa6x2Lyd8595h8C48RagJmQgtHaX5XZUYKQ4YKEYSKfVKPaUMZHwMDeQBxh04ABYSFGU4JBpsDBmFHdXMLIKofBEyKCpdgspsOoUsLXaRLCQMgwky+YJ1FC4POg8lVAg7U1Q5drtnHSw4H3t8HDdnZy2Dd4N4Nzc/QeqLW1bnM7rXuV9tEBhQQ5UoCbJDmWKBAQcMDZNhwRVNCYANBChZYEbkVCZOwASEcCDFQ4SEDIq6WTVqQIMECBx06iCACQQPBiSabHDqzRUTKARMhSFCDrc+WNQIcOoRw5+ZIHj8ADqSEQBQAwKKLhIzowEEeGKQ0owIYkPKjHihZoBKi0KFE01b4zg7h4y4IACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCwqFIuicklMEgVHQVHKVCYUmWeUWFAkqtOtEKqgAsgFcDFyHJLNmbZa6x2Lyd8595h8C48RagJmQgtHaX5XZUUJeQCGChGEin1SkGlubEhDcYdOAAWEhRlOC12HYUd1eqeRokOKCphgrY5MpotqhgWfunqPt4PCg71gpgXIyWSqqq9MBQPR0tHMzM5L0NPSC8PCxVUCyeLX38+/AFfXRA4HA+pjmoFqCAcHDQa3rbxzBRD1BwgcMFIlidMrAxYICHHA4N8DIqpsUWJ3wAEBChQaEBnQoB6RRr0uARjQocMAAA0w4nMz4IOaU0lImkSngYKFc3ZWyTwJAALGK4fnNA3ZOaQCBQ22wPgRQlSIAYwSfkHJMrQkTyEbKFzFydQq15ccOAjUEwQAIfkECQoAAAAsAAAAACAAIAAABv9AgHBILCoUi6JySUwSBUdBUcpUJhSZZ5RYUCSq060QqqACyAVwMXIcks2ZtlrrHYvJ3zn3mHwLjxFqAmZCC0dpfldlRQl5AIYKEYSKfVKQaW5sSENxh04ABYSFGU4LXYdhR3V6p5GiQ4oKmGCtjkymi2qGBZ+6eo+3g8KDvYLDxKrJuXNkys6qr0zNygvHxL/V1sVD29K/AFfRRQUDDt1PmoFqHgPtBLetvMwG7QMes0KxkkIFIQNKDhBgKvCh3gQiqmxt6NDBAAEIEAgUOHCgBBEH9Yg06uWAIQUABihQMACgBEUHTRwoUEOBIcqQI880OIDgm5ABDA8IgUkSwAAyij1/jejAARPPIQwONBCnBAJDCEOOCnFA8cOvEh1CEJEqBMIBEDaLcA3LJIEGDe/0BAEAIfkECQoAAAAsAAAAACAAIAAABv9AgHBILCoUi6JySUwSBUdBUcpUJhSZZ5RYUCSq060QqqACyAVwMXIcks2ZtlrrHYvJ3zn3mHwLjxFqAmZCC0dpfldlRQl5AIYKEYSKfVKQaW5sSENxh04ABYSFGU4LXYdhR3V6p5GiQ4oKmGCtjkymi2qGBZ+6eo+3g8KDvYLDxKrJuXNkys6qr0zNygvHxL/V1sVDDti/BQccA8yrYBAjHR0jc53LRQYU6R0UBnO4RxmiG/IjJUIJFuoVKeCBigBN5QCk43BgFgMKFCYUGDAgFEUQRGIRYbCh2xACEDcAcHDgQDcQFGf9s7VkA0QCI0t2W0DRw68h8ChAEELSJE8xijBvVqCgIU9PjwA+UNzG5AHEB9xkDpk4QMGvARQsEDlKxMCALDeLcA0rqEEDlWCCAAAh+QQJCgAAACwAAAAAIAAgAAAG/0CAcEgsKhSLonJJTBIFR0FRylQmFJlnlFhQJKrTrRCqoALIBXAxchySzZm2Wusdi8nfOfeYfAuPEWoCZkILR2l+V2VFCXkAhgoRhIp9UpBpbmxIQ3GHTgAFhIUZTgtdh2FHdXqnkaJDigqYYK2OTKaLaoYFn7p6j0wOA8PEAw6/Z4PKUhwdzs8dEL9kqqrN0M7SetTVCsLFw8d6C8vKvUQEv+dVCRAaBnNQtkwPFRQUFXOduUoTG/cUNkyYg+tIBlEMAFYYMAaBuCekxmhaJeSeBgiOHhw4QECAAwcCLhGJRUQCg3RDCmyUVmBYmlOiGqmBsPGlyz9YkAlxsJEhqCubABS9AsPgQAMqLQfM0oTMwEZ4QpLOwvMLxAEEXIBG5aczqtaut4YNXRIEACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCwqFIuicklMEgVHQVHKVCYUmWeUWFAkqtOtEKqgAsgFcDFyHJLNmbZa6x2Lyd8595h8C48RahAQRQtHaX5XZUUJeQAGHR0jA0SKfVKGCmlubEhCBSGRHSQOQwVmQwsZTgtdh0UQHKIHm2quChGophuiJHO3jkwOFB2UaoYFTnMGegDKRQQG0tMGBM1nAtnaABoU3t8UD81kR+UK3eDe4nrk5grR1NLWegva9s9czfhVAgMNpWqgBGNigMGBAwzmxBGjhACEgwcgzAPTqlwGXQ8gMgAhZIGHWm5WjelUZ8jBBgPMTBgwIMGCRgsygVSkgMiHByD7DWDmx5WuMkZqDLCU4gfAq2sACrAEWFSRLjUfWDopCqDTNQIsJ1LF0yzDAA90UHV5eo0qUjB8mgUBACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCwqFIuickk0FIiCo6A4ZSoZnRBUSiwoEtYipNOBDKOKKgD9DBNHHU4brc4c3cUBeSOk949geEQUZA5rXABHEW4PD0UOZBSHaQAJiEMJgQATFBQVBkQHZKACUwtHbX0RR0mVFp0UFwRCBSQDSgsZrQteqEUPGrAQmmG9ChFqRAkMsBd4xsRLBBsUoG6nBa14E4IA2kUFDuLjDql4peilAA0H7e4H1udH8/Ps7+3xbmj0qOTj5mEWpEP3DUq3glYWOBgAcEmUaNI+DBjwAY+dS0USGJg4wABEXMYyJNvE8UOGISKVCNClah4xjg60WUKyINOCUwrMzVRARMGENWQ4n/jpNTKTm15J/CTK2e0MoD+UKmHEs4onVDVVmyqdpAbNR4cKTjqNSots07EjzzJh1S0IADsAAAAAAAAAAAA=\",\n\t\t\t\tmsg: null,\n\t\t\t\tmsgText: objectl10n.infscrLoadingText,\n\t\t\t\tselector: null,\n\t\t\t\tspeed: 'fast',\n\t\t\t\tstart: undefined\n\t\t\t},\n\t\t\tdebug: globalDebug,\n\t\t\t//animate : true,\n\t\t\t//extraScrollPx: 500,\n\t\t\tprefill: true,\n\t\t\tmaxPage: max_isotope_pages,\n\t\t\terrorCallback: function(){}\n\t\t\t// called when a requested page 404's or when there is no more content\n\t\t\t// new in 1.2\n\t\t},\n\t\t// trigger Isotope as a callback\n\t\tfunction( newElements ) {\n\t\t\tnewElements.forEach(function(e){\n\t\t\t\t$(e).css('opacity', 0);\n\t\t\t});\n\n\t\t\tvar $newElems = $( newElements );\n\n\t\t\t//if we have twitter widgets then we need to update the layout once they are loaded\n\t\t\tif ( typeof twttr != \"undefined\" ) {\n\t\t\t\tif ( globalDebug ) {console.log( \"Twitter API - Load new elements\" );}\n\n\t\t\t\ttwttr.widgets.load(newElements);\n\t\t\t}\n\n\t\t\t//refresh all there is to refresh\n\t\t\tinfiniteScrollingRefreshComponents($container);\n\n\t\t\tif (globalDebug) {console.log(\"Classic Infinite Scroll - Adding new \"+$newElems.length+\" items to the DOM\");}\n\n\t\t\t//$container.append($newElems);\n\t\t\t// ensure that images load before adding to masonry layout\n\t\t\t$newElems.imagesLoaded(function(){\n\t\t\t\tif (globalDebug) {console.log(\"Classic Infinite Scroll Loaded Next Page\");}\n\n\t\t\t\t//some animation\n\t\t\t\t$newElems.each(function(){\n\t\t\t\t\t$(this).animate({opacity: 1});\n\t\t\t\t});\n\n\t\t\t\tisotope_page_counter++;\n\n\t\t\t\tif (isotope_page_counter == max_isotope_pages) {\n\t\t\t\t\t$('.load-more__container').fadeOut('slow');\n\t\t\t\t} else {\n\t\t\t\t\t$('.load-more__container .load-more__button').removeClass('loading');\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\tif ($container.hasClass('infinite_scroll_with_button')) {\n\t\tinfiniteScrollingOnClick($container);\n\t}\n}", "function initialize(){\n\t $('.item').each( function(i){ \n\t\tvar img = $(\":first-child\", $(this));\t\n\t\t$(this).attr(\"name\", img.data(\"name\"));\n\t\t$(this).attr(\"location\", \"house\");\n\t\t$(this).attr(\"weight\", parseInt(img.data(\"weight\")));\n\t\t$(this).attr(\"value\", parseInt(img.data(\"value\")));\n\t\t$(this).append('<br>$'+$(this).attr(\"value\")+'<br>'+$(this).attr(\"weight\")+'kg')\n\t})\n\t\tisBest(value);\n}", "function AddNodes() {\n $('.grid').isotope({\n itemSelector: '.grid-item', // use a separate class for itemSelector, other than .col-\n masonry: {\n columnWidth: 440,\n gutter: 30\n }\n })\n $.getJSON( \"state\", function( data ) {\n var len = data.nodes.length\n for (var i = 0; i < len; i++) {\n NewNode(data.nodes[i], i)\n }\n // Set main chart data.\n var qpsdata = normData(data[\"qpsdata\"])\n mainchart.series[0].setData(qpsdata)\n lastTS = qpsdata[qpsdata.length-1][0]\n $('.grid').isotope( 'reloadItems' ).isotope()\n })\n}", "function initBlogMasonryGallery(){\n \"use strict\";\n\n if($j('.blog_holder.masonry_gallery').length) {\n\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n\n var container = $j('.blog_holder.masonry_gallery');\n container.width(Math.round(container.parent().width()));\n container.isotope({\n itemSelector: 'article',\n resizable: false,\n masonry: {\n columnWidth: '.blog_holder_grid_sizer',\n gutter: '.blog_holder_grid_gutter'\n }\n });\n\n container.waitForImages(function(){\n container.animate({opacity: \"1\"}, 300, function() {\n container.isotope().isotope('layout');\n });\n });\n\n if( container.hasClass('masonry_infinite_scroll')){\n container.infinitescroll({\n navSelector : '.blog_infinite_scroll_button span',\n nextSelector : '.blog_infinite_scroll_button span a',\n itemSelector : 'article',\n loading: {\n finishedMsg: finished_text,\n msgText : loading_text\n }\n },\n // call Isotope as a callback\n function( newElements ) {\n container.isotope( 'appended', $j( newElements ) );\n fitVideo();\n fitAudio();\n initFlexSlider();\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n setTimeout(function() {\n container.isotope( 'layout');\n }, 300);\n }\n );\n }else if(container.hasClass('masonry_load_more')){\n var i = 1;\n $j('.blog_load_more_button a').off('click tap').on('click tap', function(e) {\n e.preventDefault();\n\n var link = $j(this).attr('href');\n var $content = '.masonry_load_more';\n var $anchor = '.blog_load_more_button a';\n var $next_href = $j($anchor).attr('href');\n $j.get(link+'', function(data){\n var $new_content = $j($content, data).wrapInner('').html();\n $next_href = $j($anchor, data).attr('href');\n container.append( $j( $new_content) ).isotope( 'reloadItems' ).isotope({ sortBy: 'original-order' });\n fitVideo();\n fitAudio();\n initFlexSlider();\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n setTimeout(function() {\n container.isotope( 'layout');\n }, 300);\n\n if($j('.blog_load_more_button span').attr('rel') > i) {\n $j('.blog_load_more_button a').attr('href', $next_href); // Change the next URL\n } else {\n $j('.blog_load_more_button').remove();\n }\n\n });\n i++;\n });\n\n }\n\n $j(window).resize(function() {\n qodeResizeBlogMasonryGallery($j('.blog_holder_grid_sizer').width());\n container.isotope().isotope('layout');\n container.width(Math.round(container.parent().width()));\n });\n }\n}", "function initData () {\n\t\t\tdefaultSlickCallbacks = {\n\t\t\t\tonInit: function(slick) {\n\t\t\t\t\t//slick.$slides.each(function (i, el) {\n\t\t\t\t\t//});\n\n\t\t\t\t\tslick.$slider.addClass(\"ibm-carousel\");\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Merge configs then dupe for camelcase settings since data-attr can't do camelcase.\n\t\t\tconfig = $.extend({}, defaults, defaultSlickCallbacks, $container.data() || {}, settings);\n\t\t\tconfig.adaptiveHeight = config.adaptiveheight;\n\t\t\tconfig.autoplaySpeed = config.autoplayspeed;\n\t\t\tconfig.variableWidth = config.variablewidth;\n\t\t}", "initGrid() {\n \n // Initialize our packery grid\n let grid = this.$('.grid');\n \n grid.packery({\n percentPosition: true,\n itemSelector: '.grid-item',\n gutter: 10,\n });\n \n // Grid elements are draggable\n grid.find('.grid-item').each( function( i, gridItem ) {\n var draggie = new Draggabilly( gridItem );\n // bind drag events to Packery\n grid.packery( 'bindDraggabillyEvents', draggie );\n });\n \n // Resize grid elements on click \n // NOTE that in the future we want this to be encpsulated in some sort of button, etc.\n // Otherwise it happens any time you drag the element, which is really annoying\n // (Commenting out for now)\n /*grid.on( 'click', '.grid-item', function( event ) {\n var $item = $( event.currentTarget );\n // change size of item by toggling large class\n $item.toggleClass('grid-item--large');\n if ( $item.is('.grid-item--large') ) {\n // fit large item\n grid.packery( 'fit', event.currentTarget );\n } else {\n // back to small, shiftLayout back\n grid.packery('shiftLayout');\n }\n });*/\n \n }", "function loadPin() {\n $container.imagesLoaded(function(){\n $container.isotope({\n itemSelector: '.box'\n });\n });\n // Load all the buttons that goes onto the pins\n pageLoad();\n }", "function processFeed(feed, isotope_page, callback){\r\n feed = feed.responseData.feed;\r\n var entries = feed.entries;\r\n var articles = new Array();\r\n if(sideburnTemplate === null){\r\n sideburnTemplate = new Template(\"/templates/article\", null, null, null, function(template){\r\n for (var i = 0; i < feed.entries.length; i++){\r\n\r\n //Article Data\r\n var article = {\r\n content: feed.entries[i].content.replace(/(<([^>]+)>)/ig,\"\"),\r\n title: parseTitle(feed.entries[i].title),\r\n images: extractImages(feed.entries[i].content),\r\n isotope_tags: extractKeywords(feed.entries[i].title),\r\n author: feed.entries.author, \r\n publish_date: Date.parse(feed.entries[i].publishedDate),\r\n date_string: feed.entries[i].publishedDate,\r\n summary: feed.entries[i].contentSnippet.replace(/(<([^>]+)>)/ig,\"\")\r\n }\r\n var newArticle = template.build(article);\r\n if(article.title.toLowerCase().indexOf(\"sponsored\") === -1)\r\n $(isotope_page).append($(newArticle));\r\n }\r\n callback();\r\n\r\n }); \r\n } else{\r\n for (var i = 0; i < feed.entries.length; i++){\r\n\r\n //Article Data\r\n var article = {\r\n content: feed.entries[i].content.replace(/(<([^>]+)>)/ig,\"\"),\r\n title: parseTitle(feed.entries[i].title),\r\n images: extractImages(feed.entries[i].content),\r\n isotope_tags: extractKeywords(feed.entries[i].title),\r\n author: feed.entries.author, \r\n publish_date: Date.parse(feed.entries[i].publishedDate),\r\n date_string: feed.entries[i].publishedDate,\r\n summary: feed.entries[i].contentSnippet.replace(/(<([^>]+)>)/ig,\"\")\r\n }\r\n var newArticle = sideburnTemplate.build(article);\r\n $(isotope_page).append($(newArticle))/*.isotope(\"insert\", $(newArticle), callback())*/;\r\n }\r\n callback();\r\n\r\n }\r\n }", "function eltdfOnWindowResize() {\n eltdfInitProductListMasonryShortcode();\n }", "function initPortfolio(){\n\n\n\t\t\tif (jQuery('.portfolio.portfolio_rotator').length) {\n\n\t\t\t\tvar row_items=1;\n\n\t\t\t\tif (jQuery('.portfolio.portfolio_rotator .span2').length>0)\n\t\t\t\t\trow_items=6;\n\n\n\t\t\t\tif (jQuery('.portfolio.portfolio_rotator .span3').length>0)\n\t\t\t\t\trow_items=4;\n\n\t\t\t\tif (jQuery('.portfolio.portfolio_rotator .span4').length>0)\n\t\t\t\t\trow_items=3;\n\n\t\t\t\tif (jQuery('.portfolio.portfolio_rotator .span6').length>0)\n\t\t\t\t\trow_items=2;\n\n\t\t\t\tif (jQuery('.portfolio.portfolio_rotator .span12').length>0)\n\t\t\t\t\trow_items=1;\n\n\n\t\t\t\tjQuery('body').tpportfolio({\n\t\t\t\t\tspeed:500,\n\t\t\t\t\trow:row_items,\n\t\t\t\t\tnonSelectedAlpha:0,\n\t\t\t\t\tportfolioContainer:'.portfolio'\n\t\t\t\t});\n\t\t\t}\n\n\n\t\t}", "function layoutPortfolio() {\n\n var $container = $('ul.portfolio'),\n $items = $container.find('.portfolio-item');\n\n function refreshWaypoints() {\n setTimeout(function () {\n $.waypoints('refresh');\n }, 1000);\n }\n\n $('nav.filter ul a').on('click', function () {\n var selector = $(this).attr('data-filter');\n $container.isotope({ filter: selector }, refreshWaypoints());\n $('nav.filter ul a').removeClass('active');\n $(this).addClass('active');\n return false;\n });\n\n}", "function defineDependencies() {\n define('jquery', [], function () { return root.jQuery; });\n define('ko', [], function () { return root.ko; });\n define('sammy', [], function () { return root.Sammy; });\n }", "_init() {\n // The first time an Interchange plugin is initialized, this.rules is converted from a string of \"classes\" to an object of rules\n if (typeof this.rules === 'string') {\n let rulesTree = {};\n\n // Parse rules from \"classes\" pulled from data attribute\n let rules = this.rules.split(' ');\n\n // Iterate through every rule found\n for (let i = 0; i < rules.length; i++) {\n let rule = rules[i].split('-');\n let ruleSize = rule.length > 1 ? rule[0] : 'small';\n let rulePlugin = rule.length > 1 ? rule[1] : rule[0];\n\n if (MenuPlugins[rulePlugin] !== null) {\n rulesTree[ruleSize] = MenuPlugins[rulePlugin];\n }\n }\n\n this.rules = rulesTree;\n }\n\n if (!$.isEmptyObject(this.rules)) {\n this._checkMediaQueries();\n }\n // Add data-mutate since children may need it.\n this.$element.attr('data-mutate', (this.$element.attr('data-mutate') || Foundation.GetYoDigits(6, 'responsive-menu')));\n }", "function constructAMD() {\n\n\t\t//create a library instance\n\t\treturn init();\n\n\t\t//spawns a library instance\n\t\tfunction init() {\n\t\t\tvar library;\n\t\t\tlibrary = factory('amd');\n\t\t\tlibrary.fork = init;\n\t\t\treturn library;\n\t\t}\n\t}", "function enableMasonry() {\n\t\tif($('.masonry-gallery .items-container').length){\n\n\t\t\tvar winDow = $(window);\n\t\t\t// Needed variables\n\t\t\tvar $container=$('.masonry-gallery .items-container');\n\t\t\tvar $filter=$('.filter-btns');\n\n\t\t\t$container.isotope({\n\t\t\t\tfilter:'*',\n\t\t\t\t masonry: {\n\t\t\t\t\tcolumnWidth : '.masonry-item.small-item'\n\t\t\t\t },\n\t\t\t\tanimationOptions:{\n\t\t\t\t\tduration:500,\n\t\t\t\t\teasing:'linear'\n\t\t\t\t}\n\t\t\t});\n\n\n\t\t\t// Isotope Filter\n\t\t\t$filter.find('li').on('click', function(){\n\t\t\t\tvar selector = $(this).attr('data-filter');\n\n\t\t\t\ttry {\n\t\t\t\t\t$container.isotope({\n\t\t\t\t\t\tfilter\t: selector,\n\t\t\t\t\t\tanimationOptions: {\n\t\t\t\t\t\t\tduration: 500,\n\t\t\t\t\t\t\teasing\t: 'linear',\n\t\t\t\t\t\t\tqueue\t: false\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} catch(err) {\n\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\n\n\t\t\twinDow.on('resize', function(){\n\t\t\t\tvar selector = $filter.find('li.active').attr('data-filter');\n\n\t\t\t\t$container.isotope({\n\t\t\t\t\tfilter\t: selector,\n\t\t\t\t\tanimationOptions: {\n\t\t\t\t\t\tduration: 500,\n\t\t\t\t\t\teasing\t: 'linear',\n\t\t\t\t\t\tqueue\t: false\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\n\t\t\tvar filterItemA\t= $('.filter-btns li');\n\n\t\t\tfilterItemA.on('click', function(){\n\t\t\t\tvar $this = $(this);\n\t\t\t\tif ( !$this.hasClass('active')) {\n\t\t\t\t\tfilterItemA.removeClass('active');\n\t\t\t\t\t$this.addClass('active');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "function useItem(){\n\t\n}", "function initBlogMasonryFullWidth(){\n\t\"use strict\";\n\n\tif($j('.masonry_full_width').length){\n\t\tvar width_blog = $j('.full_width_inner').width();\n\n\t\t$j('.masonry_full_width').width(width_blog);\n\t\tvar $container = $j('.masonry_full_width');\n\n\t\t$j('.filter').click(function(){\n\t\t\tvar selector = $j(this).attr('data-filter');\n\t\t\t$container.isotope({ filter: selector });\n\t\t\treturn false;\n\t\t});\n\t\tif( $container.hasClass('masonry_infinite_scroll')){\n\t\t\t$container.infinitescroll({\n\t\t\t\t\tnavSelector : '.blog_infinite_scroll_button span',\n\t\t\t\t\tnextSelector : '.blog_infinite_scroll_button span a',\n\t\t\t\t\titemSelector : 'article',\n\t\t\t\t\tloading: {\n\t\t\t\t\t\tfinishedMsg: finished_text,\n\t\t\t\t\t\tmsgText : loading_text\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t// call Isotope as a callback\n\t\t\t\tfunction( newElements ) {\n\t\t\t\t\t$container.isotope( 'appended', $j( newElements ) );\n\t\t\t\t\tfitVideo();\n\t\t\t\t\tfitAudio();\n initFlexSlider();\n\n setTimeout(function() {\n $j('.blog_holder.masonry_full_width').isotope( 'layout');\n }, 400);\n\t\t\t\t}\n\t\t\t);\n\t\t}else if($container.hasClass('masonry_load_more')){\n\n\n\t\t\tvar i = 1;\n\t\t\t$j('.blog_load_more_button a').off('click tap').on('click tap', function(e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvar link = $j(this).attr('href');\n\t\t\t\tvar $content = '.masonry_load_more';\n\t\t\t\tvar $anchor = '.blog_load_more_button a';\n\t\t\t\tvar $next_href = $j($anchor).attr('href');\n\t\t\t\t$j.get(link+'', function(data){\n\t\t\t\t\tvar $new_content = $j($content, data).wrapInner('').html();\n\t\t\t\t\t$next_href = $j($anchor, data).attr('href');\n\t\t\t\t\t$container.append( $j( $new_content) ).isotope( 'reloadItems' ).isotope({ sortBy: 'original-order' });\n\t\t\t\t\tfitVideo();\n\t\t\t\t\tfitAudio();\n initFlexSlider();\n\n setTimeout(function() {\n $j('.blog_holder.masonry_full_width').isotope( 'layout');\n }, 400);\n\n\t\t\t\t\tif($j('.blog_load_more_button span').attr('rel') > i) {\n\t\t\t\t\t\t$j('.blog_load_more_button a').attr('href', $next_href); // Change the next URL\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$j('.blog_load_more_button').remove();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\ti++;\n\t\t\t});\n\n\t\t}\n\n $container.waitForImages(function() {\n setTimeout(function() {\n $container.isotope({\n itemSelector: 'article',\n resizable: false,\n masonry: { columnWidth: '.blog_holder_grid_sizer',gutter: '.blog_holder_grid_gutter'}\n });\n\n $j('.masonry_full_width').animate({opacity: \"1\"}, 500);\n }, 400);\n });\n\t}\n}", "function Portfolio() {\t\r\n\t\t\t\r\n\t\tif( $('#portfolio-wrap').length > 0 ){\t\t\t\r\n\t\t\t\r\n\t\t\tif ($(\"body\").hasClass(\"smooth-scroll\")) {\r\n\t\t\t\tvar elem = document.querySelector(\"#content-scroll\");\r\n\t\t\t\tvar scrollbar = Scrollbar.init(elem,\r\n\t\t\t\t{\r\n\t\t\t\t\trenderByPixels: true,\r\n\t\t\t\t\tdamping:0.05\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvar $container = $('#portfolio').packery({\r\n\t\t\t\titemSelector: '.item',\r\n\t\t\t\tgutter:0,\t\t\t\t\r\n\t\t\t\ttransitionDuration: \"0.5s\"\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$('#filters a').on('click', function() {\r\n\t\t\t\t$('#filters a').removeClass('active');\r\n\t\t\t\t$(this).addClass('active');\r\n\t\t\t\t$('.item').addClass('item-margins');\r\n\t\t\t\tvar selector = $(this).attr('data-filter');\r\n\t\t\t\t$container.isotope({ filter: selector }, function( $changedItems, instance ) {\r\n\t\t\t\t instance.$allAtoms.filter('.isotope-hidden').removeClass('is-filtered');\r\n\t\t\t\t instance.$filteredAtoms.addClass('is-filtered');\r\n\t\t\t\t});\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$(\"#all\").trigger('click');\r\n\t\t\t\t\r\n\t\t\t$('.item').each(function() {\r\n\t\t\t\tvar image = $(this).find('.item-image').data('src');\t\r\n\t\t\t\t$(this).find('.item-image').css({'background-image': 'url(' + image + ')'});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$(\".item-image\").mouseenter(function(e) {\t\r\n\t\t\t\tTweenMax.to('#ball', 0.2,{transformOrigin: '15px 15px', borderWidth: '1px', scale: 1.8});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.2,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t\t$( \"#ball\" ).addClass(\"with-icon\").append( '<i class=\"fa fa-plus\"></i>' );\r\n\t\t\t\t$(this).find('video').each(function() {\r\n\t\t\t\t\t$(this).get(0).play();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$('.item-image').on('mousedown', function(event) {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t\t$(\".item-image\").mouseleave(function(e) {\r\n\t\t\t\tTweenMax.to('#ball', 0.2,{borderWidth: '2px', scale:1, x: -15, y: -15});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.2,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t\t$(\"#ball\").removeClass(\"with-icon\");\r\n\t\t\t\t$('#ball i').remove();\r\n\t\t\t\t$(this).find('video').each(function() {\r\n\t\t\t\t\t$(this).get(0).pause();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$(\"#main-page-content\").mouseenter(function(e) {\t\t\t\t\t\r\n\t\t\t\t$( \"#ball\" ).addClass(\"hold\")\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$(\"#main-page-content\").mouseleave(function(e) {\t\t\t\t\t\r\n\t\t\t\t$( \"#ball\" ).removeClass(\"hold\")\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// Add clas on left or right\r\n\t\t\tvar mouseX;\r\n\t\t\t$(document).on(\"mousemove\", function(event) {\r\n\t\t\t\tmouseX = event.pageX;\r\n\t\t\t});\r\n\t\t\t$('#main-page-content.portfolio-page').each(function() {\r\n\t\t\t\tvar thisWidth = $(this).width();\r\n\t\t\t\t$('#main-page-content.portfolio-page').mousemove(function() {\r\n\t\t\t\t\tif (thisWidth/2 < mouseX) {\r\n\t\t\t\t\t\t $(\"#sidebar-overlay\" ).addClass(\"right\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else {\r\n\t\t\t\t\t\t$(\"#sidebar-overlay\" ).removeClass(\"right\");\r\n\t\t\t\t\t }\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$('#main-page-content.portfolio-page').on('mousedown', function(event) {\t\t\t\t\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t$( \"#ball\" ).removeClass(\"hold\");\r\n\t\t\t\tTweenMax.to('#ball', 1,{width:60, height:60});\r\n\t\t\t\tTweenMax.to('#hold-event', 1,{scale:0, width:56, height:56});\r\n\t\t\t\tvar progress = $('#hold-event');\r\n\t\t\t\tTweenMax.to(progress, 1, {force3D:true, backgroundColor : 'rgba(255, 255, 255, 1)', onComplete:function(){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Execute trigger click here\r\n\t\t\t\t\tvar heroheight = $(\"#hero\").height() \r\n\t\t\t\t\tif ($(\"body\").hasClass(\"smooth-scroll\")) {\r\n\t\t\t\t\t\tTweenLite.to(scrollbar, 1.5, {scrollTo:heroheight, ease:Power4.easeInOut});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTweenLite.to(window, 1.5, {scrollTo:heroheight, ease:Power4.easeInOut});\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tTweenMax.to(progress, 0.3,{force3D:true, backgroundColor : 'rgba(255, 255, 255, 0)'});\r\n\t\t\t\t\tTweenMax.to('#ball', 0.3,{width:30, height:30});\r\n\t\t\t\t\tTweenMax.to($(\"#hero\"), 2, {force3D:true, scale: 1, opacity:0, delay:0, ease:Power2.easeInOut});\r\n\t\t\t\t\tTweenMax.to($(\"#main\"), 0.6, {force3D:true, scale: 1, opacity:0.3, delay:0, ease:Power2.easeInOut});\r\n\t\t\t\t\t$('#sidebar-overlay').addClass('active');\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Fade In Navigation Lists\r\n\t\t\t\t\tvar tlMenu = new TimelineLite();\r\n\t\t\t\t\ttlMenu.set($(\".sidebar-timeline, .jssocials-share\"), {x:-30, opacity:0});\r\n\t\t\t\t\t$(\".sidebar-timeline, .jssocials-share\").each(function(index, element) {\r\n\t\t\t\t\t\ttlMenu.to(element, 0.5, {x:0, opacity:1, delay:0.3, ease:Power3.easeOut}, index * 0.1)\r\n\t\t\t\t\t});\r\n\t\t\t }});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$('#main-page-content.portfolio-page').on('mouseup touchend', function(event) {\r\n\t\t\t\t$( \"#ball\" ).addClass(\"hold\")\r\n\t\t\t\tTweenMax.to('#ball', 0.3,{width:30, height:30});\r\n\t\t\t\tTweenMax.to('#hold-event', 0.3,{force3D:true, scale:1, width:26, height:26, backgroundColor : 'rgba(255, 255, 255, 0)'});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t//Overlay Menu\r\n\t\t\t$('#show-filters, #close-sidebar').on('click', function() {\t\t\t\r\n\t\t\t\t$('#sidebar-overlay').toggleClass('active');\r\n\t\t\t\tvar navtitleheight = $(\".hero-title\").height()\r\n\t\t\t\tvar navsubtitleheight = $(\".hero-subtitle\").height()\r\n\t\t\t\t\r\n\t\t\t\tsetTimeout( function(){\t\t\t\r\n\t\t\t\t\tif ($('#sidebar-overlay').hasClass(\"active\")) {\t\r\n\t\t\t\t\t\tTweenMax.to($(\"#hero, #show-filters\"), 0.6, {force3D:true, scale: 1, opacity:0, delay:0.6, ease:Power2.easeInOut});\r\n\t\t\t\t\t\tTweenMax.to($(\"#main\"), 0.6, {force3D:true, scale: 1, opacity:0.3, delay:0, ease:Power2.easeInOut});\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Fade In Navigation Lists\r\n\t\t\t\t\t\tvar tlMenu = new TimelineLite();\r\n\t\t\t\t\t\ttlMenu.set($(\".sidebar-timeline, .jssocials-share\"), {x:-30, opacity:0});\r\n\t\t\t\t\t\t$(\".sidebar-timeline, .jssocials-share\").each(function(index, element) {\r\n\t\t\t\t\t\t\ttlMenu.to(element, 0.5, {x:0, opacity:1, delay:0.3, ease:Power3.easeOut}, index * 0.1)\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t} else {\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tTweenMax.to($(\"#hero, #show-filters\"), 0.6, {force3D:true, scale: 1, opacity:1, delay:0.3, ease:Power2.easeInOut});\r\n\t\t\t\t\t\tTweenMax.to($(\"#main\"), 0.6, {force3D:true, scale: 1, opacity:1, delay:0.3, ease:Power2.easeInOut});\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Fade Out Navigation Lists\t\t\t\t\t\r\n\t\t\t\t\t\tvar tlMenu = new TimelineLite();\r\n\t\t\t\t\t\t$(\".sidebar-timeline, .jssocials-share\").each(function(index, element) {\r\n\t\t\t\t\t\t\ttlMenu.to(element, 0.25, {opacity:0, x:30, ease:Power1.easeIn }, index * 0.1)\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tTweenMax.to('#hold-event', 0.3,{force3D:true, scale:1, width:26, height:26, backgroundColor : 'rgba(255, 255, 255, 0)'});\t\r\n\t\t\t\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, x: -15, y: -15});\r\n\t\t\t\t\t\t$(\"#ball\").removeClass(\"close-icon\");\r\n\t\t\t\t\t\t$('#ball i').remove();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t} , 20 );\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$(\"#close-sidebar\").mouseenter(function(e) {\t\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{transformOrigin: '15px 15px', borderWidth: '1px', scale: 1.8});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t\t$( \"#ball\" ).addClass(\"close-icon\").append( '<i class=\"fa fa-times\"></i>' );\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t\t$(\"#close-sidebar\").mouseleave(function(e) {\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, x: -15, y: -15});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t\t$(\"#ball\").removeClass(\"close-icon\");\r\n\t\t\t\t$('#ball i').remove();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tFitThumbScreen();\r\n\t\t\t\r\n\t\t}\t\r\n\t\r\n\t}", "function init() {\n renderGallery();\n renderSection('meme-gallery');\n}", "prepare() {\n var nodes = document.getElementsByClassName(\"region bottom bar\")\n var pos = nodes[0].querySelector(\".container\")\n var children = pos.children\n var module = document.createElement(\"div\")\n module.id = \"module_EXT_Spotify\"\n module.style.display= \"none\"\n module.classList.add(\"module\", \"EXT_Spotify\")\n var header = document.createElement(\"header\")\n header.classList.add(\"module-header\")\n header.style.display = \"none\"\n module.appendChild(header)\n var content = document.createElement(\"div\")\n content.classList.add(\"module-content\")\n var viewDom = document.createElement(\"div\")\n viewDom.id = \"EXT_SPOTIFY\"\n viewDom.classList.add(\"inactive\")\n\n content.appendChild(viewDom)\n module.appendChild(content)\n pos.insertBefore(module, children[children.length])\n this.getMinimalistBarDom(viewDom)\n }", "function social_curator_masonry_callback(element){}", "function simplePortfolioInGrid() {\n \"use strict\";\n //$('#portfolio-preview-items .portfolio-item img').on(\"load\", function(){\n if ($('.page-template-portfolio .portfolio-item .filter-row').hasClass('in_grid')) {\n var height_filter = $('.portfolio-item:nth-child(2)').innerHeight();\n $('.filter-row.in_grid').css('height', height_filter + 'px');\n }\n //});\n\n\n }" ]
[ "0.66426724", "0.65913916", "0.6232765", "0.6061513", "0.580566", "0.57968706", "0.57762825", "0.57542247", "0.571722", "0.56825715", "0.5622882", "0.5607108", "0.56070954", "0.55565923", "0.5520914", "0.54793626", "0.54765755", "0.5461874", "0.5448353", "0.5448353", "0.5448353", "0.5448353", "0.5448353", "0.5361638", "0.53607696", "0.5350354", "0.53470945", "0.53449595", "0.53440726", "0.53056043", "0.530227", "0.5262652", "0.5255865", "0.52251637", "0.52191246", "0.52037656", "0.51986915", "0.51618606", "0.5143394", "0.51401675", "0.5135734", "0.51234657", "0.51162475", "0.510491", "0.50999403", "0.50951576", "0.50796497", "0.5065316", "0.5050417", "0.5027051", "0.5019375", "0.5019243", "0.5003072", "0.498958", "0.49789324", "0.49762672", "0.496802", "0.49677396", "0.49663034", "0.49559462", "0.4947567", "0.49245632", "0.4920389", "0.49164933", "0.4912847", "0.49088046", "0.49048734", "0.49019244", "0.48784438", "0.4870658", "0.4853069", "0.48413882", "0.48316967", "0.48304823", "0.48288056", "0.48276538", "0.48271042", "0.48196727", "0.4810775", "0.4800716", "0.480001", "0.47902554", "0.4775959", "0.47744685", "0.47697467", "0.47648975", "0.47572333", "0.4740956", "0.47308853", "0.47227845", "0.4714775", "0.471065", "0.47093368", "0.470905", "0.47067574", "0.4704913", "0.46933776" ]
0.66426724
4
add a magic layer to sorters for convienent shorthands `.foobar` will use the text of .foobar querySelector `[foobar]` will use attribute you can also add parser `.foobar parseInt` will parse that as a number
function mungeSorter( sorter ) { // if not a string, return function or whatever it is if ( typeof sorter !== 'string' ) { return sorter; } // parse the sorter string var args = trim( sorter ).split(' '); var query = args[0]; // check if query looks like [an-attribute] var attrMatch = query.match( /^\[(.+)\]$/ ); var attr = attrMatch && attrMatch[1]; var getValue = getValueGetter( attr, query ); // use second argument as a parser var parser = Isotope.sortDataParsers[ args[1] ]; // parse the value, if there was a parser sorter = parser ? function( elem ) { return elem && parser( getValue( elem ) ); } : // otherwise just return value function( elem ) { return elem && getValue( elem ); }; return sorter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = getParser( args[1] );\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }", "function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter != 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }", "function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter != 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }", "function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter != 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }", "function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter != 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }", "function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter != 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }", "function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter != 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }", "function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter != 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }", "function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter != 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }", "function mungeSorter(sorter) {\r\n // if not a string, return function or whatever it is\r\n if (typeof sorter != 'string') {\r\n return sorter;\r\n }\r\n // parse the sorter string\r\n var args = trim(sorter).split(' ');\r\n var query = args[0];\r\n // check if query looks like [an-attribute]\r\n var attrMatch = query.match(/^\\[(.+)\\]$/);\r\n var attr = attrMatch && attrMatch[1];\r\n var getValue = getValueGetter(attr, query);\r\n // use second argument as a parser\r\n var parser = Isotope.sortDataParsers[args[1]];\r\n // parse the value, if there was a parser\r\n sorter = parser ?\r\n function(elem) {\r\n return elem && parser(getValue(elem));\r\n } :\r\n // otherwise just return value\r\n\r\n\r\n function(elem) {\r\n return elem && getValue(elem);\r\n };\r\n\r\n return sorter;\r\n }", "_dynamicSort(property) {\n let sortOrder = 1;\n\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n let result = (a['attributes'][property] < b['attributes'][property]) ? -1 :\n (a['attributes'][property] > b['attributes'][property]) ? 1 : 0;\n return result * sortOrder;\n };\n }", "function mungeSorter(sorter) {\n // if not a string, return function or whatever it is\n if (typeof sorter != 'string') {\n return sorter;\n }\n // parse the sorter string\n var args = trim(sorter).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match(/^\\[(.+)\\]$/);\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter(attr, query);\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[args[1]];\n // parse the value, if there was a parser\n sorter = parser ? function (elem) {\n return elem && parser(getValue(elem));\n } :\n // otherwise just return value\n function (elem) {\n return elem && getValue(elem);\n };\n return sorter;\n }", "function mungeSorter(sorter) {\n // if not a string, return function or whatever it is\n if (typeof sorter != 'string') {\n return sorter;\n }\n // parse the sorter string\n var args = trim(sorter).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match(/^\\[(.+)\\]$/);\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter(attr, query);\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[args[1]];\n // parse the value, if there was a parser\n sorter = parser ? function (elem) {\n return elem && parser(getValue(elem));\n } :\n // otherwise just return value\n function (elem) {\n return elem && getValue(elem);\n };\n\n return sorter;\n }", "function mungeSorter(sorter) {\n // if not a string, return function or whatever it is\n if (typeof sorter != 'string') {\n return sorter;\n }\n // parse the sorter string\n var args = trim(sorter).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match(/^\\[(.+)\\]$/);\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter(attr, query);\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[args[1]];\n // parse the value, if there was a parser\n sorter = parser ? function(elem) {\n return elem && parser(getValue(elem));\n } :\n // otherwise just return value\n function(elem) {\n return elem && getValue(elem);\n };\n\n return sorter;\n }", "function parseSortDirective_(filterElement, backwards) {\n var match = /^sort:(.*)$/.exec(filterElement);\n if (!match)\n return null;\n return {method: match[1], backwards: backwards};\n }", "function _addNumericSort(decimalPlace) {\n $.each({\n // Plain numbers\n \"num\": function num(d) {\n return __numericReplace(d, decimalPlace);\n },\n // Formatted numbers\n \"num-fmt\": function numFmt(d) {\n return __numericReplace(d, decimalPlace, _re_formatted_numeric);\n },\n // HTML numeric\n \"html-num\": function htmlNum(d) {\n return __numericReplace(d, decimalPlace, _re_html);\n },\n // HTML numeric, formatted\n \"html-num-fmt\": function htmlNumFmt(d) {\n return __numericReplace(d, decimalPlace, _re_html, _re_formatted_numeric);\n }\n }, function (key, fn) {\n // Add the ordering method\n _ext.type.order[key + decimalPlace + '-pre'] = fn; // For HTML types add a search formatter that will strip the HTML\n\n if (key.match(/^html\\-/)) {\n _ext.type.search[key + decimalPlace] = _ext.type.search.html;\n }\n });\n } // Default sort methods", "function parseComparator( comp, options ) {\n\t\tdebug( 'comp', comp, options );\n\t\tcomp = replaceCarets( comp, options );\n\t\tdebug( 'caret', comp );\n\t\tcomp = replaceTildes( comp, options );\n\t\tdebug( 'tildes', comp );\n\t\tcomp = replaceXRanges( comp, options );\n\t\tdebug( 'xrange', comp );\n\t\tcomp = replaceStars( comp, options );\n\t\tdebug( 'stars', comp );\n\t\treturn comp;\n\t}", "function parseComparator (comp, options) {\n\t debug('comp', comp, options);\n\t comp = replaceCarets(comp, options);\n\t debug('caret', comp);\n\t comp = replaceTildes(comp, options);\n\t debug('tildes', comp);\n\t comp = replaceXRanges(comp, options);\n\t debug('xrange', comp);\n\t comp = replaceStars(comp, options);\n\t debug('stars', comp);\n\t return comp\n\t}", "_sortBy(array, selectors) {\n return array.concat().sort((a, b) => {\n for (let selector of selectors) {\n let reverse = selector.order ? -1 : 1;\n\n a = selector.value ? JP.query(a, selector.value)[0] : JP.query(a,selector)[0];\n b = selector.value ? JP.query(b, selector.value)[0] : JP.query(b,selector)[0];\n\n if (a.toUpperCase() > b.toUpperCase()) {\n return reverse;\n }\n if (a.toUpperCase() < b.toUpperCase()) {\n return -1 * reverse;\n }\n }\n return 0;\n });\n }", "function getSorter(){\n return $(\".active\").attr(\"sortAttr\");\n }", "function _addNumericSort ( decimalPlace ) {\n $.each(\n {\n // Plain numbers\n \"num\": function ( d ) {\n return __numericReplace( d, decimalPlace );\n },\n \n // Formatted numbers\n \"num-fmt\": function ( d ) {\n return __numericReplace( d, decimalPlace, _re_formatted_numeric );\n },\n \n // HTML numeric\n \"html-num\": function ( d ) {\n return __numericReplace( d, decimalPlace, _re_html );\n },\n \n // HTML numeric, formatted\n \"html-num-fmt\": function ( d ) {\n return __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n }\n },\n function ( key, fn ) {\n // Add the ordering method\n _ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n \n // For HTML types add a search formatter that will strip the HTML\n if ( key.match(/^html\\-/) ) {\n _ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n }\n }\n );\n }", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}", "function parseComparator (comp, options) {\n debug('comp', comp, options);\n comp = replaceCarets(comp, options);\n debug('caret', comp);\n comp = replaceTildes(comp, options);\n debug('tildes', comp);\n comp = replaceXRanges(comp, options);\n debug('xrange', comp);\n comp = replaceStars(comp, options);\n debug('stars', comp);\n return comp\n}", "function parseComparator(comp, options) {\n debug('comp', comp, options);\n comp = replaceCarets(comp, options);\n debug('caret', comp);\n comp = replaceTildes(comp, options);\n debug('tildes', comp);\n comp = replaceXRanges(comp, options);\n debug('xrange', comp);\n comp = replaceStars(comp, options);\n debug('stars', comp);\n return comp;\n }", "function parseComparator(comp, options) {\n debug('comp', comp, options);\n comp = replaceCarets(comp, options);\n debug('caret', comp);\n comp = replaceTildes(comp, options);\n debug('tildes', comp);\n comp = replaceXRanges(comp, options);\n debug('xrange', comp);\n comp = replaceStars(comp, options);\n debug('stars', comp);\n return comp;\n }", "function parseComparator(comp, options) {\n debug('comp', comp, options);\n comp = replaceCarets(comp, options);\n debug('caret', comp);\n comp = replaceTildes(comp, options);\n debug('tildes', comp);\n comp = replaceXRanges(comp, options);\n debug('xrange', comp);\n comp = replaceStars(comp, options);\n debug('stars', comp);\n return comp;\n }", "function parseComparator(comp, options) {\n debug('comp', comp, options);\n comp = replaceCarets(comp, options);\n debug('caret', comp);\n comp = replaceTildes(comp, options);\n debug('tildes', comp);\n comp = replaceXRanges(comp, options);\n debug('xrange', comp);\n comp = replaceStars(comp, options);\n debug('stars', comp);\n return comp;\n}", "function parseComparator(comp, options) {\n debug('comp', comp, options);\n comp = replaceCarets(comp, options);\n debug('caret', comp);\n comp = replaceTildes(comp, options);\n debug('tildes', comp);\n comp = replaceXRanges(comp, options);\n debug('xrange', comp);\n comp = replaceStars(comp, options);\n debug('stars', comp);\n return comp;\n}", "function parseComparator(comp, options) {\n debug('comp', comp, options);\n comp = replaceCarets(comp, options);\n debug('caret', comp);\n comp = replaceTildes(comp, options);\n debug('tildes', comp);\n comp = replaceXRanges(comp, options);\n debug('xrange', comp);\n comp = replaceStars(comp, options);\n debug('stars', comp);\n return comp;\n}", "function parseComparator(comp, options) {\n debug('comp', comp, options);\n comp = replaceCarets(comp, options);\n debug('caret', comp);\n comp = replaceTildes(comp, options);\n debug('tildes', comp);\n comp = replaceXRanges(comp, options);\n debug('xrange', comp);\n comp = replaceStars(comp, options);\n debug('stars', comp);\n return comp;\n}", "function _addNumericSort ( decimalPlace ) {\n \t\t$.each(\n \t\t\t{\n \t\t\t\t// Plain numbers\n \t\t\t\t\"num\": function ( d ) {\n \t\t\t\t\treturn __numericReplace( d, decimalPlace );\n \t\t\t\t},\n \t\n \t\t\t\t// Formatted numbers\n \t\t\t\t\"num-fmt\": function ( d ) {\n \t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n \t\t\t\t},\n \t\n \t\t\t\t// HTML numeric\n \t\t\t\t\"html-num\": function ( d ) {\n \t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n \t\t\t\t},\n \t\n \t\t\t\t// HTML numeric, formatted\n \t\t\t\t\"html-num-fmt\": function ( d ) {\n \t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n \t\t\t\t}\n \t\t\t},\n \t\t\tfunction ( key, fn ) {\n \t\t\t\t// Add the ordering method\n \t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n \t\n \t\t\t\t// For HTML types add a search formatter that will strip the HTML\n \t\t\t\tif ( key.match(/^html\\-/) ) {\n \t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n \t\t\t\t}\n \t\t\t}\n \t\t);\n \t}", "dynamicSort(property) {\n var sortOrder = 1;\n //check for \"-\" operator and sort asc/desc depending on that\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a, b) {\n var result =\n a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0;\n return result * sortOrder;\n };\n }", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function _addNumericSort ( decimalPlace ) {\n\t\t\t$.each(\n\t\t\t\t{\n\t\t\t\t\t// Plain numbers\n\t\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t\t},\n\t\t\n\t\t\t\t\t// Formatted numbers\n\t\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t\t},\n\t\t\n\t\t\t\t\t// HTML numeric\n\t\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t\t},\n\t\t\n\t\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfunction ( key, fn ) {\n\t\t\t\t\t// Add the ordering method\n\t\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\t\n\t\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}", "function _addNumericSort ( decimalPlace ) {\n $.each(\n {\n // Plain numbers\n \"num\": function ( d ) {\n return __numericReplace( d, decimalPlace );\n },\n\n // Formatted numbers\n \"num-fmt\": function ( d ) {\n return __numericReplace( d, decimalPlace, _re_formatted_numeric );\n },\n\n // HTML numeric\n \"html-num\": function ( d ) {\n return __numericReplace( d, decimalPlace, _re_html );\n },\n\n // HTML numeric, formatted\n \"html-num-fmt\": function ( d ) {\n return __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n }\n },\n function ( key, fn ) {\n // Add the ordering method\n _ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\n // For HTML types add a search formatter that will strip the HTML\n if ( key.match(/^html\\-/) ) {\n _ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n }\n }\n );\n }", "function _addNumericSort ( decimalPlace ) {\n $.each(\n {\n // Plain numbers\n \"num\": function ( d ) {\n return __numericReplace( d, decimalPlace );\n },\n\n // Formatted numbers\n \"num-fmt\": function ( d ) {\n return __numericReplace( d, decimalPlace, _re_formatted_numeric );\n },\n\n // HTML numeric\n \"html-num\": function ( d ) {\n return __numericReplace( d, decimalPlace, _re_html );\n },\n\n // HTML numeric, formatted\n \"html-num-fmt\": function ( d ) {\n return __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n }\n },\n function ( key, fn ) {\n // Add the ordering method\n _ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\n // For HTML types add a search formatter that will strip the HTML\n if ( key.match(/^html\\-/) ) {\n _ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n }\n }\n );\n }", "function makeSortby(attribute) {\n return function(a, b) {\n if (a[attribute] != undefined && b[attribute] != undefined) {\n a = a[attribute].toLowerCase();\n b = b[attribute].toLowerCase();\n if (a < b) return -1;\n if (a > b) return 1;\n return 0;\n }\n }\n}", "function sortByAuthor() {\n let nodes = document.querySelectorAll('.bookCard')\n let authors = []\n nodes.forEach(node => authors.push(library[node.dataset.index].author))\n authors.sort()\n\n let order\n nodes.forEach((node) => {\n console.log(node)\n order = authors.findIndex(x => x === library[node.dataset.index].author)\n node.style.order = order\n })\n}", "function resortClass(idx){\n arrayBlock.children[idx].className ='sorted-element'\n}", "function parseComparator(comp, loose) {\n debug('comp', comp);\n comp = replaceCarets(comp, loose);\n debug('caret', comp);\n comp = replaceTildes(comp, loose);\n debug('tildes', comp);\n comp = replaceXRanges(comp, loose);\n debug('xrange', comp);\n comp = replaceStars(comp, loose);\n debug('stars', comp);\n return comp;\n }" ]
[ "0.60570204", "0.60109055", "0.60109055", "0.60109055", "0.60109055", "0.60109055", "0.60109055", "0.60109055", "0.60109055", "0.58911276", "0.58325964", "0.58073056", "0.57278776", "0.57263935", "0.55910444", "0.55197436", "0.55063754", "0.54884624", "0.5462685", "0.5450497", "0.5438387", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.542889", "0.5425071", "0.5424612", "0.5424612", "0.5382002", "0.53713226", "0.53713226", "0.53713226", "0.53713226", "0.5361441", "0.5335822", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53255177", "0.53228056", "0.5291541", "0.5291541", "0.529149", "0.5275957", "0.5271302", "0.52508336" ]
0.59969026
13
get an attribute getter, or get text of the querySelector
function getValueGetter( attr, query ) { var getValue; // if query looks like [foo-bar], get attribute if ( attr ) { getValue = function( elem ) { return elem.getAttribute( attr ); }; } else { // otherwise, assume its a querySelector, and get its text getValue = function( elem ) { var child = elem.querySelector( query ); return child && getText( child ); }; } return getValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueGetter( attr, query ) {\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n return function getAttribute( elem ) {\n return elem.getAttribute( attr );\n };\n }\n\n // otherwise, assume its a querySelector, and get its text\n return function getChildText( elem ) {\n var child = elem.querySelector( query );\n return child && child.textContent;\n };\n }", "function getValueGetter( attr, query ) {\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n return function getAttribute( elem ) {\n return elem.getAttribute( attr );\n };\n }\n\n // otherwise, assume its a querySelector, and get its text\n return function getChildText( elem ) {\n var child = elem.querySelector( query );\n return child && child.textContent;\n };\n }", "function getValueGetter( attr, query ) {\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n return function getAttribute( elem ) {\n return elem.getAttribute( attr );\n };\n }\n\n // otherwise, assume its a querySelector, and get its text\n return function getChildText( elem ) {\n var child = elem.querySelector( query );\n return child && child.textContent;\n };\n }", "function getValueGetter( attr, query ) {\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n return function getAttribute( elem ) {\n return elem.getAttribute( attr );\n };\n }\n\n // otherwise, assume its a querySelector, and get its text\n return function getChildText( elem ) {\n var child = elem.querySelector( query );\n return child && child.textContent;\n };\n }", "function getValueGetter( attr, query ) {\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n return function getAttribute( elem ) {\n return elem.getAttribute( attr );\n };\n }\n\n // otherwise, assume its a querySelector, and get its text\n return function getChildText( elem ) {\n var child = elem.querySelector( query );\n return child && child.textContent;\n };\n }", "function getValueGetter( attr, query ) {\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n return function getAttribute( elem ) {\n return elem.getAttribute( attr );\n };\n }\n\n // otherwise, assume its a querySelector, and get its text\n return function getChildText( elem ) {\n var child = elem.querySelector( query );\n return child && child.textContent;\n };\n }", "function getValueGetter(attr, query) {\n // if query looks like [foo-bar], get attribute\n if (attr) {\n return function getAttribute(elem) {\n return elem.getAttribute(attr);\n };\n }\n\n // otherwise, assume its a querySelector, and get its text\n return function getChildText(elem) {\n var child = elem.querySelector(query);\n return child && child.textContent;\n };\n }", "function getValueGetter(attr, query) {\n var getValue;\n // if query looks like [foo-bar], get attribute\n if (attr) {\n getValue = function(elem) {\n return elem.getAttribute(attr);\n };\n } else {\n // otherwise, assume its a querySelector, and get its text\n getValue = function(elem) {\n var child = elem.querySelector(query);\n return child && getText(child);\n };\n }\n return getValue;\n }", "function getValueGetter(attr, query) {\r\n var getValue;\r\n // if query looks like [foo-bar], get attribute\r\n if (attr) {\r\n getValue = function(elem) {\r\n return elem.getAttribute(attr);\r\n };\r\n } else {\r\n // otherwise, assume its a querySelector, and get its text\r\n getValue = function(elem) {\r\n var child = elem.querySelector(query);\r\n return child && getText(child);\r\n };\r\n }\r\n return getValue;\r\n }", "function getValueGetter(attr, query) {\n // if query looks like [foo-bar], get attribute\n if (attr) {\n return function getAttribute(elem) {\n return elem.getAttribute(attr);\n };\n }\n\n // otherwise, assume its a querySelector, and get its text\n return function getChildText(elem) {\n var child = elem.querySelector(query);\n return child && child.textContent;\n };\n }", "function getAtrributeFromElement(selector,attribute) {\n\t\t\tvar attributeValue = document.querySelector(selector).getAttribute(attribute);\n\t\t\treturn attributeValue;\n\t\t}", "get foo() {\n return this.getAttribute('foo'); \n }", "function get_attribute( e, a ) {\n if( !e ) return null;\n if( a === \"class\" || a === \"className\" )\n return e.className;\n if( a === \"for\" ) \n return e.htmlFor; \n return e.getAttribute( a ) || e[a];\n }", "function _getAttributeHelper ( sProp ){\n\treturn eval( \"this.\" + sProp );\n}", "function getAttribute(property){\n\n return ATTRIBUTES[property];\n\n }", "getAttribute(name) {\n return this._attrs[name];\n }", "function attrGetter(attrs) {\n return function (name) {\n switch (name) {\n case 'escape':\n return angular.isDefined(attrs.hljsEscape) ?\n attrs.hljsEscape :\n attrs.escape;\n\n case 'no-escape':\n return angular.isDefined(attrs.hljsNoEscape) ?\n attrs.hljsNoEscape :\n attrs.noEscape;\n\n case 'onhighlight':\n return angular.isDefined(attrs.hljsOnhighlight) ?\n attrs.hljsOnhighlight :\n attrs.onhighlight;\n }\n };\n}", "function attrGetter(type, name) {\nreturn Object.getOwnPropertyDescriptor(type.$$.prototype, name).get;\n}", "function get_html_attributes(selector,attribute){\n if(!attribute){\n return $(selector).map(function() {return $(this).val();}).get()\n }else{\n return $(selector).map(function() {return $(this).attr(attribute) ;}).get()\n }\n \n }", "static _attributeNameForProperty(name,options){const attribute=options.attribute;return!1===attribute?void 0:\"string\"===typeof attribute?attribute:\"string\"===typeof name?name.toLowerCase():void 0}", "function gA(item, att) { return item.getAttribute('data-'+att+''); }", "function gA(item, att) { return item.getAttribute('data-'+att+''); }", "static _attributeNameForProperty(e,t){const n=t.attribute;return!1===n?void 0:\"string\"==typeof n?n:\"string\"==typeof e?e.toLowerCase():void 0}", "getTag(attrSelector) {\n if (!attrSelector) return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }", "function getattr(obj, attr) {\r\n return obj[attr];\r\n}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "static _attributeNameForProperty(name,options){const attribute=options.attribute;return attribute===false?undefined:typeof attribute==='string'?attribute:typeof name==='string'?name.toLowerCase():undefined;}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}// If the object is an opaque reference ID, it's expected that\n// the next prop is different than the server value, so just return\n// expected\nif(isOpaqueHydratingObject(expected)){return expected;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}// If the object is an opaque reference ID, it's expected that\n// the next prop is different than the server value, so just return\n// expected\nif(isOpaqueHydratingObject(expected)){return expected;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getAttribute(text, regexp){\r\n if (!text.match(regexp))\r\n return null;\r\n var attr = RegExp.$1;\r\n var quoteChar = attr[0]; \r\n var attrlen;\r\n if (quoteChar == '\\\"' || quoteChar == '\\''){\r\n attrlen = attr.slice(1).indexOf(quoteChar); \r\n attr = attr.substr(1, attrlen);\r\n }\r\n else{\r\n attrlen = Math.min(attr.indexOf(\" \"), attr.indexOf(\">\"));\r\n attr = attr.substr(0, attrlen);\r\n }\r\n return attr;\r\n}", "async getAttribute(name) {\n await this._stabilize();\n return this._executeScript((element, attribute) => element.getAttribute(attribute), this.element(), name);\n }", "function get_attribute(node, attr, default_value) {\n return node.getAttribute(attr) || default_value;\n }", "getAttribute(key, value = undefined) {\n return this.$attributes[key] || value;\n }", "function extractGetters(element, name) {\n var nodeList\n , getters = [];\n nodeList = element.getElementsByTagName('text:user-field-get');\n eachNode(nodeList, function(node){\n if (node.getAttribute('text:name') === name) {\n getters.push(node);\n }\n });\n return getters;\n}", "function GetAttribute(node, attribute) {\n if (!node.getAttribute) {\n return null;\n }\n var attr = node.getAttribute(attribute);\n if (BR_IsIE() && attribute == \"style\") {\n return attr.value;\n } else {\n return attr;\n }\n}", "getTag(attrSelector) {\n if (!attrSelector)\n return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }", "getTag(attrSelector) {\n if (!attrSelector)\n return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }", "getTag(attrSelector) {\n if (!attrSelector)\n return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }", "getTag(attrSelector) {\n if (!attrSelector)\n return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }", "getTag(attrSelector) {\n if (!attrSelector)\n return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }", "get title () {\n this.getAttribute('title')\n }", "function getUSA() {\n let elem = document.querySelector('span[data-customAttr=\"USA\"').innerText\n console.log(elem)\n}", "get property(){}", "function getNodeAttribute(obj, tag) {\n\t\tvar returnValue = undefined;\n\t\tvar set = false;\n\t\t\n\t\ttry {\n\t\t\treturnValue = obj.attributes.getNamedItem(tag).value;\n\t\t\tset = true;\n\t\t} catch (err) {\n\t\t}\n\t\t\n\t\tif (! set) {\n\t\t\ttry {\n\t\t\t\treturnValue = obj[0].attributes.getNamedItem(tag).value;\n\t\t\t\tset = true;\n\t\t\t} catch (err1) {\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (returnValue === undefined) {\n\t\t\treturnValue = \"\";\n\t\t}\n\t\t\n\t\treturnValue = returnValue.replace(/&amp;/gi,\"&\");\n\t\t\n\t\treturn returnValue;\n\t}", "function getCustomAttribute(){\n let attr = document.querySelectorAll('[data-customAttr]')\n for (let i of attr){\n let z = i.getAttribute('data-customAttr')\n console.log(`${z} : ${i}`)\n }\n}", "function getValueForAttribute(node, name, expected) {\n if (!isAttributeNameSafe(name)) return;\n // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n if (isOpaqueHydratingObject(expected)) return expected;\n if (!node.hasAttribute(name)) return expected === undefined ? undefined : null;\n var value = node.getAttribute(name);\n if (value === '' + expected) return expected;\n return value;\n }", "function getAttribAccess( attrib ){\n return function(){\n return attrib;\n };\n}", "function _attribute()\r\n\t{\r\n\t return this._attributeHandler;\r\n\t}", "static _attributeNameForProperty(name, options) {\n const attribute = options.attribute;\n return attribute === false ?\n undefined :\n (typeof attribute === 'string' ?\n attribute :\n (typeof name === 'string' ? name.toLowerCase() : undefined));\n }", "static _attributeNameForProperty(name, options) {\n const attribute = options.attribute;\n return attribute === false ?\n undefined :\n (typeof attribute === 'string' ?\n attribute :\n (typeof name === 'string' ? name.toLowerCase() : undefined));\n }", "static _attributeNameForProperty(name, options) {\n const attribute = options.attribute;\n return attribute === false ?\n undefined :\n (typeof attribute === 'string' ?\n attribute :\n (typeof name === 'string' ? name.toLowerCase() : undefined));\n }", "function uuattrget(node, // @param Node:\r\n attrs) { // @param String: \"attr1,...\"\r\n // @return String/Hash: \"value\" (one attr)\r\n // or { attr1: \"value\", ... }\r\n var rv = {}, ary = attrs.split(\",\"), v, w, i = 0, iz = ary.length,\r\n HASH = uuattr._HASH; // [IE67] for -> htmlFor, className -> class\r\n // [OTHER] for -> htmlFor, class -> className\r\n\r\n for (; i < iz; ++i) {\r\n v = ary[i];\r\n w = HASH[v] || v;\r\n if (uu.ie) {\r\n if (uu.ver.ie89 || v === \"href\" || v === \"src\") {\r\n // [IE6][IE7][FIX] a[href^=\"#\"] -> full path\r\n rv[v] = node.getAttribute(v, 2) || \"\";\r\n } else {\r\n rv[v] = node[w] || \"\";\r\n }\r\n } else {\r\n rv[v] = node.getAttribute(w) || \"\";\r\n }\r\n }\r\n return (ary.length === 1) ? rv[ary[0]] : rv; // [3][4]\r\n}", "function getAttrValueFromString(html, attrName) {\r\n // make the input safe for regex\r\n html = html.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\r\n var reg = new RegExp(attrName + \"\\\\s*?=\\\\s*?(\\\"|')([^\\\\1]*?)\\\\1\", \"i\");\r\n var match = reg.exec(html);\r\n return match !== null && match.length > 0 ? match[2] : null;\r\n}", "_getAttr(key) {\r\n return this._data.attributes[key];\r\n }", "getAttribute(name) {\n return this.root.getAttribute(name);\n }", "getAttribute(name) {\n return this.root.getAttribute(name);\n }", "static _attributeNameForProperty(name, options) {\n const attribute = options.attribute;\n return attribute === false\n ? undefined\n : (typeof attribute === 'string'\n ? attribute\n : (typeof name === 'string' ? name.toLowerCase()\n : undefined));\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getCustomAttribute() {\r\n let elements = document.getElementsByTagName(\"*\"); //(\"[data-customAttr]\");\r\n for (let element of elements)\r\n if (element.hasAttribute(\"data-customAttr\")) {\r\n console.log(element.getAttribute(\"data-customAttr\"));\r\n console.log(element);\r\n console.log(\"--\");\r\n }\r\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "get name() {\n return this.getAttribute('name') ?? '';\n }", "get name() {\n return this.getAttribute('name') ?? '';\n }", "get name() {\n return this.getAttribute('name') ?? '';\n }", "function getAttributeValue(elem, name) {\n var _a;\n return (_a = elem.attribs) === null || _a === void 0\n ? void 0\n : _a[name];\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "get title() {\n return this.getAttribute(\"title\");\n }", "function getAttr(panel, keyword){\n\t\tvar result = $('#' + panel + keyword).val();\n\t\tif(keyword == ' .limit'){\n\t\t\tif (result == null || result == ''){\n\t\t\t\tresult = DEFAULT_LIMIT;\n\t\t\t}\n\t\t}\n\t\telse if(keyword == ' .offset'){\n\t\t\tif (result == null || result == ''){\n\t\t\t\tresult = DEFAULT_OFFSET;\n\t\t\t}\n\t\t}\n\t\telse if(keyword == ' .attributes'){\n\t\t\tif (result == null || result == ''){\n\t\t\t\tresult = DEFAULT_ATTRIBUTES;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}" ]
[ "0.7468154", "0.7468154", "0.7468154", "0.7468154", "0.7468154", "0.7468154", "0.742081", "0.73804647", "0.7353638", "0.7309144", "0.6794398", "0.66687435", "0.65556467", "0.64710164", "0.6337211", "0.63250375", "0.6238788", "0.622035", "0.62196165", "0.62012124", "0.6175201", "0.6175201", "0.6162779", "0.6096947", "0.6055039", "0.60370886", "0.60370886", "0.60370886", "0.60370886", "0.60370886", "0.60370886", "0.60370886", "0.60370886", "0.60370886", "0.60370886", "0.6000493", "0.6000414", "0.6000414", "0.59858906", "0.5944305", "0.59207875", "0.59151036", "0.5913802", "0.5910076", "0.58927345", "0.58927345", "0.58927345", "0.58927345", "0.58927345", "0.5872259", "0.58535415", "0.581458", "0.5792065", "0.5758539", "0.57576054", "0.57575893", "0.5740769", "0.57396394", "0.57396394", "0.57396394", "0.57326007", "0.5723794", "0.5707764", "0.56988925", "0.56988925", "0.569864", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.56976247", "0.5685861", "0.5677252", "0.5677252", "0.5677252", "0.5677252", "0.56769544", "0.56769544", "0.56769544", "0.5670088", "0.5656478", "0.5652824", "0.56496453" ]
0.74727523
6
returns a function used for sorting
function getItemSorter( sortBys, sortAsc ) { return function sorter( itemA, itemB ) { // cycle through all sortKeys for ( var i = 0, len = sortBys.length; i < len; i++ ) { var sortBy = sortBys[i]; var a = itemA.sortData[ sortBy ]; var b = itemB.sortData[ sortBy ]; if ( a > b || a < b ) { // if sortAsc is an object, use the value given the sortBy key var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc; var direction = isAscending ? 1 : -1; return ( a > b ? 1 : -1 ) * direction; } } return 0; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function GetSortOrder(prop) { \n return function(a, b) { \n if (a[prop] > b[prop]) { \n return 1; \n } else if (a[prop] < b[prop]) { \n return -1; \n } \n return 0; \n } \n }", "function Sort() {}", "function sortFunction(val){\n return val.sort();\n}", "function sortByFunc() {\n switch (sortBy.field) {\n case 'name':\n case 'ticker':\n if (sortBy.desc === 0) {\n return (a, b) => a[sortBy.field].localeCompare(b[sortBy.field])\n }\n return (a, b) => b[sortBy.field].localeCompare(a[sortBy.field])\n case 'price':\n case 'changes':\n case 'marketCapitalization':\n default:\n if (sortBy.desc === 0) {\n return (a, b) => (a[sortBy.field] - b[sortBy.field])\n }\n return (a, b) => (b[sortBy.field] - a[sortBy.field])\n }\n }", "sort() {\n\t}", "sort() {\n\t}", "getSortFunction() {\n var low_to_high = function (a, b) {return a.duration - b.duration};\n var high_to_low = function (a, b) {return b.duration - a.duration};\n if(this.state.selected_sort === 'High To Low'){\n return high_to_low\n }\n else if(this.state.selected_sort === 'Low To High'){\n return low_to_high\n }\n else {\n return null\n }\n }", "sortBy(field, reverse, primer) \n {\n const key = primer\n ? function(x) {\n return primer(x[field]);\n }\n : function(x) {\n return x[field];\n };\n\n return function(a, b) {\n a = key(a);\n b = key(b);\n return reverse * ((a > b) - (b > a));\n };\n }", "function sortFunction(){\r\n // parse arguments into an array\r\n var args = [].slice.call(arguments);\r\n return args.sort();\r\n}", "sort(){\n\n }", "function getSortFunc(opts, desc) {\n const options = opts || {};\n\n const type = options.type;\n const comparator = options.comparator;\n const byValue = options.byValue;\n\n return function (pair1, pair2) {\n const sortBy = byValue ? 'value' : 'key';\n let p1 = pair1[sortBy];\n let p2 = pair2[sortBy];\n let retValue;\n\n if (comparator) {\n retValue = comparator(p1, p2);\n } else {\n if (type) {\n p1 = type(p1);\n p2 = type(p2);\n }\n\n if (p1 < p2) {\n retValue = -1;\n } else if (p1 > p2) {\n retValue = 1;\n } else {\n retValue = 0;\n }\n }\n\n if (desc) {\n retValue *= -1;\n }\n\n return retValue;\n };\n }", "function sortfunction( p, q ) {\n\treturn p.x - q.x;\n}", "function sorterProdukter(prop) {\n return function (a, b) {\n if (a[prop] > b[prop]) {\n return 1;\n } else if (a[prop] < b[prop]) {\n return -1;\n }\n return 0;\n }\n}", "function getSortMethod(){\n var _args = Array.prototype.slice.call(arguments);\n return function(a, b){\n for(var x in _args){\n var ax = a[_args[x].substring(1)];\n var bx = b[_args[x].substring(1)];\n var cx;\n\n ax = typeof ax == \"string\" ? ax.toLowerCase() : ax / 1;\n bx = typeof bx == \"string\" ? bx.toLowerCase() : bx / 1;\n\n if(_args[x].substring(0,1) == \"-\"){cx = ax; ax = bx; bx = cx;}\n if(ax != bx){return ax < bx ? -1 : 1;}\n }\n }\n}", "sort() {\r\n\t\treturn this.data.sort((a,b) => {\r\n\t\t\tfor(var i=0; i < this.definition.length; i++) {\r\n\t\t\t\tconst [code, key] = this.definition[i];\r\n\t\t\t\tswitch(code) {\r\n\t\t\t\t\tcase 'asc':\r\n\t\t\t\t\tcase 'desc':\r\n\t\t\t\t\t\tif (a[key] > b[key])\r\n\t\t\t\t\t\t\treturn code == 'asc' ? 1 : -1;\r\n\t\t\t\t\t\tif (a[key] < b[key])\r\n\t\t\t\t\t\t\treturn code == 'asc' ? -1 : 1;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'fn':\r\n\t\t\t\t\t\tlet result = key(a, b);\r\n\t\t\t\t\t\tif (result != 0) // If it's zero the sort wasn't decided.\r\n\t\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t});\r\n\t}", "sortBy(field, reverse, primer) {\n\t\tconst key = primer\n\t\t\t? function (x) {\n\t\t\t\treturn primer(x[field]);\n\t\t\t}\n\t\t\t: function (x) {\n\t\t\t\treturn x[field];\n\t\t\t};\n\t\n\t\treturn function (a, b) {\n\t\t\ta = key(a);\n\t\t\tb = key(b);\n\t\t\treturn reverse * ((a > b) - (b > a));\n\t\t};\n\t}", "dynamicSort(property) {\n var sortOrder = 1;\n //check for \"-\" operator and sort asc/desc depending on that\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a, b) {\n var result =\n a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0;\n return result * sortOrder;\n };\n }", "genSortAscendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = -1\n if (valA > valB) order = 1\n return order\n }\n }", "sortBy(collection, functionOrKey) {\n return collection.sort((a, b) => {\n if (typeof functionOrKey === \"function\") {\n return functionOrKey(a) < functionOrKey(b) ? -1 : 1;\n }\n return a[functionOrKey] < b[functionOrKey] ? -1 : 1;\n });\n }", "getSortFunction(query, options) {\n var search = this.prepareSearch(query, options);\n return this._getSortFunction(search);\n }", "function GetSortOrder(prop) {\n return function (a, b) {\n if (a[prop] > b[prop]) {\n return direction ? 1 : -1;\n } else if (a[prop] < b[prop]) {\n return direction ? -1 : 1;\n }\n return 0;\n };\n }", "function GetSortOrder(prop) {\n return function (a, b) {\n if (a[prop] > b[prop]) {\n return direction ? 1 : -1;\n } else if (a[prop] < b[prop]) {\n return direction ? -1 : 1;\n }\n return 0;\n };\n }", "function sortArrayAscByItem(){\r\n return function(obj1, obj2){\r\n if (obj1.itemText > obj2.itemText) return 1;\r\n if (obj1.itemText < obj2.itemText) return -1;\r\n return 0;\r\n }\r\n}", "sortFunctionDesc(field) {\n const compare = (a, b) => {\n var aField = a[field]\n var bField = b[field]\n if (typeof a[field] === 'string') {\n aField = a[field].toLowerCase()\n }\n if (typeof b[field] === 'string') {\n bField = b[field].toLowerCase()\n }\n if (aField < bField) { return 1 }\n if (aField > bField) { return -1 }\n return 0\n }\n return compare\n }", "function sorter(a,b) {\n return a - b;\n}", "function GetSortOrder(prop) {\n return function (a, b) {\n if (a.district[prop] > b.district[prop]) {\n return -1;\n } else if (a.district[prop] < b.district[prop]) {\n return 1;\n }\n return 0;\n }\n }", "function mysort(arr, fn) {\n\t//return bubbleSort(arr, isFn(fn) ? fn : (a, b) => a > b);\n\treturn selectionSort(arr, isFn(fn) ? fn : (a, b) => a > b);\n}", "function sortFunction ( a, b ) { \n\t\t if (a[0] - b[0] != 0) {\n\t\t return (a[0] - b[0]);\n\t\t } else if (a[1] - b[1] != 0) { \n\t\t return (a[1] - b[1]);\n\t\t } else { \n\t\t return (a[2] - b[2]);\n\t\t }\n\t\t }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] > b[property]) \n return 1; \n else if(a[property] < b[property]) \n return -1; \n \n return 0; \n } \n}", "function sortBy(field, reverse, primer) {\r\n reverse = (reverse) ? -1 : 1;\r\n return function(a,b) {\r\n a = a[field];\r\n b = b[field];\r\n if (typeof(primer) != 'undefined'){\r\n a = primer(a);\r\n b = primer(b);\r\n }\r\n if (a<b) return reverse * -1;\r\n if (a>b) return reverse * 1;\r\n return 0;\r\n }\r\n}", "Sort() {\n\n }", "genSortDescendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = 1\n if (valA > valB) order = -1\n return order\n }\n }", "function sortFunction(a, b) {\n if (a[1] === b[1]) {\n return 0;\n } else {\n return (a[1] > b[1]) ? -1 : 1;\n }\n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "sort(comparator) {\n }", "function sortBy(prop){\r\n return function(a,b){\r\n if( a[prop] > b[prop]){\r\n return 1;\r\n }else if( a[prop] < b[prop] ){\r\n return -1;\r\n }\r\n return 0;\r\n }\r\n}", "function getFilterSortFunction(filter) {\n if (['severity'].includes(filter.name)) {\n return (a, b) => Number(a[0]) - Number(b[0]);\n } else {\n return (a, b) => String(a[1]).localeCompare(String(b[1]));\n }\n}", "_dynamicSort(property) {\n let sortOrder = 1;\n\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n let result = (a['attributes'][property] < b['attributes'][property]) ? -1 :\n (a['attributes'][property] > b['attributes'][property]) ? 1 : 0;\n return result * sortOrder;\n };\n }", "sortBy({ value }) {\n\n }", "function createComparer(idx, asc) {\n\t\treturn function(a, b) {\n\t\t\t// get values to compare at column idx\n\t\t\t// if order is ascending, compare 1st row to 2nd , otherwise 2nd to 1st\n\t\t\tvar v1 = getCellValue(asc ? a : b, idx),\n\t\t\t\tv2 = getCellValue(asc ? b : a, idx);\n\t\t\t// If non numeric value\n\t\t\tif (v1 === '' || v2 === '' || isNaN(v1) || isNaN(v2)) {\n\t\t\t\t//sort for grades\n\t\t\t\tif (idx === 5) {\n\t\t\t\t\tlet ord1 = getGradeOrder(v1.toString());\n\t\t\t\t\tlet ord2 = getGradeOrder(v2.toString());\n\t\t\t\t\treturn ord1 - ord2;\n\t\t\t\t}\n\t\t\t\t//sort for states\n\t\t\t\tif (idx === 6) {\n\t\t\t\t\tlet ord1 = getStateOrder(v1.toString());\n\t\t\t\t\tlet ord2 = getStateOrder(v2.toString());\n\t\t\t\t\treturn ord1 - ord2;\n\t\t\t\t}\n\t\t\t\t//sort for other lexical fields\n\t\t\t\treturn v1.toString().localeCompare(v2); // lexical comparison\n\t\t\t}\n\t\t\t// If numeric value\n\t\t\treturn v1 - v2; // v1 greater than v2 --> true\n\t\t};\n\t}", "sort(attribute, sortMethod) {\n return function(value1, value2) {\n if (attribute) {\n return (sortMethod == 'ASC' ? value1[attribute] - value2[attribute] :\n value2[attribute] - value1[attribute]) || value1[attribute] - value2[attribute];\n } else {\n return (sortMethod == 'ASC' ? value1 - value2 : value2 - value1) || value1 - value2;\n }\n }\n }", "sortFunctionAsc(field) {\n const compare = (a, b) => {\n var aField = a[field]\n var bField = b[field]\n if (typeof a[field] === 'string') {\n aField = a[field].toLowerCase()\n }\n if (typeof b[field] === 'string') {\n bField = b[field].toLowerCase()\n }\n\n if (aField < bField) { return -1 }\n if (aField > bField) { return 1 }\n return 0\n }\n return compare\n }", "function getCompare(_, ctx) {\n var k = 'c:' + _.$compare + '_' + _.$order,\n c = array(_.$compare).map(function(_) {\n return (_ && _.$tupleid) ? tupleid : _;\n });\n return ctx.fn[k] || (ctx.fn[k] = compare(c, _.$order));\n }", "function byField(field) {\n return function (a, b) {\n return a[field] > b[field] ? 1 : -1;\n }\n}", "function updateSortFunction() {\n switch(sortBy.value) {\n case '0': // receiverId increasing\n sortFunction = function(tr1, tr2) {\n if(tr1.getElementsByTagName('td')[0].textContent <\n tr2.getElementsByTagName('td')[0].textContent) {\n return -1;\n };\n return 1;\n }\n break;\n case '1': // receiverId decreasing\n sortFunction = function(tr1, tr2) {\n if(tr1.getElementsByTagName('td')[0].textContent >\n tr2.getElementsByTagName('td')[0].textContent) {\n return -1;\n };\n return 1;\n }\n break;\n }\n sortReceiversAndHighlight();\n}", "function sortFunction(array, functionToRun) {\n return array.sort(functionToRun);\n}", "get overrideSorting() {}", "function getDefaultSorter(colName) {\n\t\treturn function(a, b, dir){\n\n\t\t\tvar \n\t\t\t\tfirstRec = dir == 'asc' ? a : b,\n\t\t\t\tsecondRec = dir == 'asc' ? b : a,\n\n\t\t\t\tfA = firstRec[colName].toLowerCase(),\n\t\t\t\tfB = secondRec[colName].toLowerCase();\n\n\t\t\t// Handle numbers\n\t\t\tif (fA<fB) return -1\n\t\t\tif (fA>fB) return +1\n\t\t\treturn 0\n\t\t};\n\t}", "function makeSortby(attribute) {\n\treturn function(a, b) {\n\t\tif (a[attribute] != undefined && b[attribute] != undefined) {\n\t\t\ta = a[attribute].toLowerCase();\n\t\t\tb = b[attribute].toLowerCase();\n\t\t\tif (a < b) return -1;\n\t\t\tif (a > b) return 1;\n\t\t\treturn 0;\n\t\t}\n\t}\n}", "function makeSortby(attribute) {\n\treturn function(a, b) {\n\t\tif (a[attribute] != undefined && b[attribute] != undefined) {\n\t\t\ta = a[attribute].toLowerCase();\n\t\t\tb = b[attribute].toLowerCase();\n\t\t\tif (a < b) return -1;\n\t\t\tif (a > b) return 1;\n\t\t\treturn 0;\n\t\t}\n\t}\n}", "function makeSortby(attribute) {\n\treturn function(a, b) {\n\t\tif (a[attribute] != undefined && b[attribute] != undefined) {\n\t\t\ta = a[attribute].toLowerCase();\n\t\t\tb = b[attribute].toLowerCase();\n\t\t\tif (a < b) return -1;\n\t\t\tif (a > b) return 1;\n\t\t\treturn 0;\n\t\t}\n\t}\n}", "function dynamicSort(property) {\n var sortOrder = 1;\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function(a, b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n }\n }", "get sortingOrder() {}", "function sortfunction(a, b){\n //Compare \"a\" and \"b\" in some fashion, and return -1, 0, or 1\n var n1 = a[\"number\"];\n var n2 = b[\"number\"];\n return (n2 - n1);\n}", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "function dynamicSort(property) {\n var sortOrder = 1;\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a, b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n }\n }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function sortFunction(a, b) {\n if (a.EDT_for_sort === b.EDT_for_sort) {\n return 0;\n }\n else {\n return (a.EDT_for_sort < b.EDT_for_sort ? -1 : 1);\n }\n}", "function sortFunction(a, b) {\n if (a[0] - b[0] != 0) {\n return a[0] - b[0];\n } else if (a[1] - b[1] != 0) {\n return a[1] - b[1];\n } else {\n return a[2] - b[2];\n }\n }", "function thesortcomparer (prop,updown) {\n return function (a, b) {\n var A = a[prop], B = b[prop];\n if(updown)\n return ((A < B) ? -1 : (A > B) ? +1 : 0);\n else\n return ((A < B) ? 1 : (A > B) ? -1 : 0);\n }\n}", "function dynamicSort(property) {\n var sortOrder = 1;\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n\n return function(a, b) {\n if (sortOrder == -1) {\n return b[property].localeCompare(a[property]);\n } else {\n return a[property].localeCompare(b[property]);\n }\n }\n}", "function Sort(arr)\n{\n\n}", "function dynamicSort(property) {\n\t var sortOrder = 1;\n\t if(property[0] === \"-\") {\n\t sortOrder = -1;\n\t property = property.substr(1);\n\t }\n\t return function (a,b) {\n\t var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n\t return result * sortOrder;\n\t }\n\t}", "function defaultOrderFn (a, b) {\n return a - b; // asc order\n}", "function dynamicSort(property) {\r\n var sortOrder = 1;\r\n if (property[0] === \"-\") {\r\n sortOrder = -1;\r\n property = property.substr(1);\r\n }\r\n\r\n return function(a, b) {\r\n if (sortOrder == -1) {\r\n return b[property].localeCompare(a[property]);\r\n } else {\r\n return a[property].localeCompare(b[property]);\r\n }\r\n }\r\n}", "function sortData (data) {\n ...\n}", "function invalidSortFunction(a, b) {\n return 'bad'\n}", "function sort(argument) {\r\n return argument.sort();\r\n}", "function compareFnAscend(a, b) {\n return a - b;\n }", "function createComparisonFunction(propertyName) {\nreturn function(object1, object2){\n var value1 = object1[propertyName];\n var value2 = object2[propertyName];\n\n if (value1 < value2){\n return -1;\n } else if (value1 > value2){\n return 1;\n } else {\n return 0;\n }\n };\n}", "function compareFunc(a, b) {\n return a - b;\n }", "function sort_reverse(f) {\n return (a, b) => -f(a, b);\n}", "function dynamicSort( property ) {\n var sortOrder = 1;\n if ( property[ 0 ] === \"-\" ) {\n sortOrder = -1;\n property = property.substr( 1 );\n }\n return function ( a, b ) {\n var result = ( a[ property ] < b[ property ] ) ? -1 : ( a[ property ] > b[ property ] ) ? 1 : 0;\n return result * sortOrder;\n };\n }", "function funzioneSort(type) {\n\tvar freturn;\n\n\ttype= Number(type)\n\n\tswitch (type) {\n\t\tcase 0:\n\t\t\t\t\t\tfreturn=function(a,b) {\n\t\t\t\t\t\t\tvar tita = $(a).find(\"h3\").text();\n\t\t\t\t\t\t\tvar titb = $(b).find(\"h3\").text();\n\n\t\t\t\t\t\t\tif (tita >= titb) {\n\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\tbreak;\n\t\tcase 1:\n\t\t\t\t\t\tfreturn=function(a,b) {\n\t\t\t\t\t\t\tvar tita = $(a).find(\"h3\").text();\n\t\t\t\t\t\t\tvar titb = $(b).find(\"h3\").text();\n\n\t\t\t\t\t\t\tif (tita <= titb) {\n\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\tbreak;\n\t\tcase 2:\n\t\t\t\t\tfreturn=function(a,b) {\n\n\t\t\t\t\t\tvar datia = $(a).find(\"section strong\");\n\t\t\t\t\t\tvar datib = $(b).find(\"section strong\");\n\n\t\t\t\t\t\tvar lungha = parseFloat($(datia[0]).text())\n\t\t\t\t\t\tvar lunghb = parseFloat($(datib[0]).text())\n\n\t\t\t\t\t\tif (lungha >= lunghb) {\n\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t\t\tfreturn=function(a,b) {\n\t\t\t\t\t\t\tvar datia = $(a).find(\"section strong\");\n\t\t\t\t\t\t\tvar datib = $(b).find(\"section strong\");\n\n\t\t\t\t\t\t\tvar lungha = parseFloat($(datia[0]).text())\n\t\t\t\t\t\t\tvar lunghb = parseFloat($(datib[0]).text())\n\n\t\t\t\t\t\t\tif (lungha >= lunghb) {\n\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t\t\tfreturn=function(a,b) {\n\t\t\t\t\t\t\tvar datia = $(a).find(\"span.full\");\n\t\t\t\t\t\t\tvar datib = $(b).find(\"span.full\");\n\n\t\t\t\t\t\t\tif (datia.length >= datib.length) {\n\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\t\t\tfreturn=function(a,b) {\n\t\t\t\t\t\t\t\tvar datia = $(a).find(\"span.full\");\n\t\t\t\t\t\t\t\tvar datib = $(b).find(\"span.full\");\n\n\t\t\t\t\t\t\t\tif (datia.length < datib.length) {\n\t\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\tfreturn=function(a,b) {\n\t\t\t\t\t\t\t\t\tvar datia = $(a).find(\"section div.row div.col-md-9 span.gps-txt\");\n\t\t\t\t\t\t\t\t\tvar datib = $(b).find(\"section div.row div.col-md-9 span.gps-txt\");\n\n\t\t\t\t\t\t\t\t\tvar distA = parseFloat($(datia).text())\n\t\t\t\t\t\t\t\t\tvar distB = parseFloat($(datib).text())\n\n\t\t\t\t\t\t\t\t\tif (distA < distB) {\n\t\t\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\t\tfreturn=function(a,b) {\n\t\t\t\t\t\t\t\t\t\tvar datia = $(a).find(\"section div.row div.col-md-9 span.gps-txt\");\n\t\t\t\t\t\t\t\t\t\tvar datib = $(b).find(\"section div.row div.col-md-9 span.gps-txt\");\n\n\t\t\t\t\t\t\t\t\t\tvar distA = parseFloat($(datia).text())\n\t\t\t\t\t\t\t\t\t\tvar distB = parseFloat($(datib).text())\n\n\t\t\t\t\t\t\t\t\t\tif (distA < distB) {\n\t\t\t\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t}\n\n\treturn freturn\n}", "function dynamicSort(property) {\r\n var sortOrder = 1;\r\n if (property[0] === \"-\") {\r\n sortOrder = -1;\r\n property = property.substr(1);\r\n }\r\n return function (a, b) {\r\n var result = (a[property] > b[property]) ? -1 : (a[property] < b[property]) ? 1 : 0;\r\n return result * sortOrder;\r\n }\r\n}", "function createComparisonFunction(propertyName){\n\n return function(obj1, obj2){\n var value1 = obj1[propertyName]; //activation object\n var value2 = obj2[propertyName];\n\n if(value1 < value2){\n return -1;\n }else if(value1 > value2){\n return 1;\n }else{\n return 0;\n }\n }\n}", "function makeSortby(attribute) {\n return function(a, b) {\n if (a[attribute] != undefined && b[attribute] != undefined) {\n a = a[attribute].toLowerCase();\n b = b[attribute].toLowerCase();\n if (a < b) return -1;\n if (a > b) return 1;\n return 0;\n }\n }\n}", "function dynamicSort(property) {\n var sortOrder = 1;\n if(property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n }\n}", "function dynamicSort(property) {\n var sortOrder = 1;\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a, b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n }\n}", "function sortMethod(a, b) {\n var x = a.name.toLowerCase();\n var y = b.name.toLowerCase();\n return ((x < y) ? -1 : ((x > y) ? 1 : 0));\n }", "function sortFunction(a, b) {\n if (a[0] === b[0]) {\n return 0;\n }\n else {\n return (a[0] < b[0]) ? -1 : 1;\n }\n}", "function getCompare(_, ctx) {\n var k = 'c:' + _.$compare + '_' + _.$order,\n c = vegaUtil.array(_.$compare).map(function(_) {\n return (_ && _.$tupleid) ? vegaDataflow.tupleid : _;\n });\n return ctx.fn[k] || (ctx.fn[k] = vegaUtil.compare(c, _.$order));\n }", "function sortBy(f, foldable) {\n var rs = reduce(function(xs, x) {\n var fx = f(x);\n var lower = 0;\n var upper = xs.length;\n while (lower < upper) {\n var idx = Math.floor((lower + upper) / 2);\n if (lte(xs[idx].fx, fx)) lower = idx + 1; else upper = idx;\n }\n xs.splice(lower, 0, {x: x, fx: fx});\n return xs;\n }, [], foldable);\n\n var F = foldable.constructor;\n var result = empty(F);\n for (var idx = 0; idx < rs.length; idx += 1) {\n result = concat(result, of(F, rs[idx].x));\n }\n return result;\n }", "function customizedSortFunction(a, b) {\n\t\t\tif (a > 10000)\n\t\t\t\treturn true;\n\t\t}", "getOrderBy() {}", "function dynamicSort(property) {\n var sortOrder = 1;\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function(a, b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n };\n}", "function numberSortFunction(a, b) {\n return a - b;\n}", "function dynamicSort(property) {\n var sortOrder = 1;\n if(property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n };\n}", "function dynamicSort(property) {\n var sortOrder = 1;\n if(property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n }\n}", "orderBy(fn){\n let sorts = this.sorts\n let orderBy = []\n\n sorts.forEach((sortOpts,key)=>{\n \n let desc = sortOpts.desc && sortOpts.desc != 'false' ? 'DESC' : 'ASC'\n\n let sort = fn && fn(key, sortOpts)\n\n if( !sort && sort !== false )\n sort = `${this.db.escapeId(key)} ${desc}`\n \n if( sort )\n orderBy.push(sort)\n })\n\n return orderBy.length > 0 ? 'ORDER BY '+orderBy.join(', ') : ''\n }", "function sortable(predicate) {\n return function (obj) {\n if (predicate == 'moving_time')\n return moment.duration(obj[predicate]);\n return obj[predicate];\n };\n }", "function sortBy(f, foldable) {\n var rs = reduce (function(rs, x) {\n rs.push ({idx: rs.length, x: x, fx: f (x)});\n return rs;\n }, [], foldable);\n\n var lte_ = (function(r) {\n switch (typeof (r && r.fx)) {\n case 'number': return function(x, y) { return x <= y || x !== x; };\n case 'string': return function(x, y) { return x <= y; };\n default: return lte;\n }\n } (rs[0]));\n\n rs.sort (function(a, b) {\n return lte_ (a.fx, b.fx) ? lte_ (b.fx, a.fx) ? a.idx - b.idx : -1 : 1;\n });\n\n if (Array.isArray (foldable)) {\n for (var idx = 0; idx < rs.length; idx += 1) rs[idx] = rs[idx].x;\n return rs;\n }\n\n var F = foldable.constructor;\n var result = empty (F);\n for (idx = 0; idx < rs.length; idx += 1) {\n result = concat (result, of (F, rs[idx].x));\n }\n return result;\n }", "function sortFunc() {\n return 0.5 - Math.random();\n}", "function sortFunc(sort){\n switch(sort){\n case \"name\":\n sortByName()\n break\n case \"age\":\n sortByAge()\n break\n default:\n console.log(\"sort does not match any cases\")\n }\n }", "function sortResults(){\n return sort.sortCustomerRecords(result);\n}" ]
[ "0.7409723", "0.7409723", "0.7409723", "0.7409723", "0.7340594", "0.72998416", "0.72825414", "0.7168141", "0.7015041", "0.7015041", "0.6978145", "0.6969056", "0.69666415", "0.695595", "0.6939071", "0.69379956", "0.69276094", "0.68985426", "0.6839244", "0.6794043", "0.67714655", "0.67564493", "0.67357975", "0.6729772", "0.6699875", "0.6699875", "0.66645974", "0.66490805", "0.6617786", "0.6616019", "0.6609708", "0.6595088", "0.658361", "0.6572316", "0.6566703", "0.6549426", "0.65315205", "0.65176016", "0.65176016", "0.65162325", "0.65120804", "0.650385", "0.6486131", "0.6472897", "0.64580274", "0.6421323", "0.6416849", "0.6415445", "0.6414114", "0.6408597", "0.63971156", "0.63871336", "0.6382809", "0.6381636", "0.6381636", "0.6381636", "0.638077", "0.6373593", "0.6367174", "0.63662016", "0.63532877", "0.6351125", "0.6351125", "0.6346882", "0.6342147", "0.633675", "0.63303435", "0.6329822", "0.63291085", "0.6322107", "0.632136", "0.63027006", "0.6293973", "0.6277787", "0.6269696", "0.6265905", "0.62631804", "0.6262664", "0.62295264", "0.62262726", "0.62239254", "0.62156415", "0.62152547", "0.6194503", "0.61851716", "0.61813736", "0.6178393", "0.61760575", "0.6175383", "0.6174014", "0.61725456", "0.6167626", "0.6166555", "0.61658555", "0.61588997", "0.6154728", "0.6149405", "0.61473197", "0.6144656", "0.61382735", "0.6135723" ]
0.0
-1
Set the proper sizes on the containers and animate the content in.
function _showContent(){ $('.pp_loaderIcon').hide(); // Calculate the opened top position of the pic holder projectedTop = scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2)); if(projectedTop < 0) projectedTop = 0; $ppt.fadeTo(settings.animation_speed,1); // Resize the content holder $pp_pic_holder.find('.pp_content') .animate({ height:pp_dimensions['contentHeight'], width:pp_dimensions['contentWidth'] },settings.animation_speed); // Resize picture the holder $pp_pic_holder.animate({ 'top': projectedTop, 'left': ((windowWidth/2) - (pp_dimensions['containerWidth']/2) < 0) ? 0 : (windowWidth/2) - (pp_dimensions['containerWidth']/2), width:pp_dimensions['containerWidth'] },settings.animation_speed,function(){ $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']); $pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed); // Fade the new content // Show the nav if(isSet && _getFileType(pp_images[set_position])=="image") { $pp_pic_holder.find('.pp_hoverContainer').show(); }else{ $pp_pic_holder.find('.pp_hoverContainer').hide(); } if(settings.allow_expand) { if(pp_dimensions['resized']){ // Fade the resizing link if the image is resized $('a.pp_expand,a.pp_contract').show(); }else{ $('a.pp_expand').hide(); } } if(settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto.startSlideshow(); settings.changepicturecallback(); // Callback! pp_open = true; }); _insert_gallery(); pp_settings.ajaxcallback(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateContainers() {\n\n\t\tvar width = editor.duration * scale;\n\n\t\telements.setWidth( width + 'px' );\n\t\t// curves.setWidth( width + 'px' );\n\n\t}", "function update_containersize() {\n $container.css(\"width\", $('.showcase-container').width() + \"px\");\n $container.css(\"height\", \"auto\");\n }", "function setSizes() {\n var containerHeight = $(\".landing-cont\").height();\n $(\".landing-cont\").height(containerHeight - 200);\n}", "function setSizes()\n {\n if (DOM.container.offsetHeight > DOM.container.offsetWidth)\n {\n DOM.container.style.minWidth = DOM.container.offsetHeight + \"PX\";\n }\n\n desk.style.height = sizes.desk.height + \"PX\";\n desk.style.width = sizes.desk.width + \"PX\";\n desk.style.marginBottom = sizes.deskContainer.marginBottom + \"PX\";\n\n for (var counterRow = 0; counterRow < sizes.field.rows; counterRow++)\n {\n for (var counterCol = 0; counterCol < sizes.field.cols; counterCol++)\n {\n DOM.game.field.rows[counterRow].cells[counterCol].style.height = sizes.card.height + \"PX\";\n DOM.game.field.rows[counterRow].cells[counterCol].style.width = sizes.card.width + \"PX\";\n\n var card = cards[counterRow * sizes.field.cols + counterCol];\n if (card)\n {\n card.style.height = sizes.card.height + \"PX\";\n card.style.width = sizes.card.width + \"PX\";\n }\n }\n }\n }", "function newSize() {\n offsets = [];\n ih = window.innerHeight;\n TweenMax.set(\"#panelWrap\", { height: slides.length * ih });\n TweenMax.set(slides, { height: ih });\n for (let i = 0; i < slides.length; i++) {\n offsets.push(-slides[i].offsetTop);\n }\n TweenMax.set(container, { y: offsets[activeSlide] });\n dragMe[0].vars.snap = offsets;\n}", "function onResize() {\n positionContainer();\n}", "function resize(){\n // adjust the container's height to fill the modal window\n $(container).height($(modal).height());\n // adjust each slide's width to fill the container\n var containerWidth = $(container).width();\n $(slides).each(function(){\n $(this).css('width', containerWidth);\n });\n // adjust the slider to fit all slides side-by-side\n slideWidth = $(slides).eq(0).width();\n var sliderWidth = slideWidth * slides.length;\n $(slider).width(sliderWidth);\n // adjust the slider's height to fill the container\n var sliderHeight = $(container).height()\n $(slider).height(sliderHeight);\n // adjust each image div to fill the space above its caption\n var imageHeight = $(captions).eq(0).position().top\n $(images).each(function(){\n $(this).height(imageHeight);\n });\n // make sure that the current slide is still in the proper position\n navigate(0, false);\n }", "initContainer(){\n if(this.isDissolve()){ \n this.el.css('marginLeft', Math.floor((this.containerWidth - this.contentWidth)/2))\n } else {\n this.el.css('marginLeft', '')\n }\n // reveal content that is cloaked at startup\n // todo optimization - not needed on every window resize?\n [this.el,this.content].map(el => el.css('opacity',1))\n }", "function _resize(size){\n var sz = (size < 100) ? sz = 100 : sz = size;\n placeholder.each(function(){\n $(this).find('div.instrument').css({height : sz, width : sz});\n });\n }", "setLayout() {\n const {\n container,\n state,\n } = this\n const {\n heights,\n } = state\n var element = document.querySelector('.masonry-panel'),\n elements = document.querySelectorAll('.masonry-panel'),\n style = window.getComputedStyle(element),\n width = style.getPropertyValue('width');\n width = width.replace('px', '');\n width = width/window.innerWidth;\n var cols = Math.ceil(1/width) - 1;\n var number = (Math.ceil(elements.length/cols) + 1);\n this.state.maxHeight = (Math.max(...heights));\n var targetHeight = this.state.maxHeight + (17 * number);\n container.style.height = `${targetHeight}px`\n }", "function resizeContainers() {\n\tvar padding = 5;\n\n\t// mainContainer\n\t// =======================================================\n\tvar mainContainerHeight\t\t\t\t= $('#mainWindow').outerHeight(true);\n//\tconsole.log('mainContainerHeight: ' + mainContainerHeight);\n\n\tvar mainContainerWidth\t\t\t\t= $('#mainWindow').outerWidth(true);\n//\tconsole.log('mainContainerWidth: ' + mainContainerWidth);\n\t$('#mainContainer').width(mainContainerWidth);\n\t\n\tif(mainContainerHeight <= 712)\t{ $('#mainContainer').height(712); }\n\telse\t\t\t\t\t\t\t{ $('#mainContainer').height(mainContainerHeight); }\n\tif(mainContainerWidth <= 640)\t{ $('#mainContainer').width(640); }\n\telse\t\t\t\t\t\t\t{ $('#mainContainer').width(mainContainerWidth); }\n\t\n\tvar missionsHeight\t\t\t\t\t= $('#mainContainer').outerHeight(true)\n\t\t\t\t\t\t\t\t\t\t- $('#navigationHeader').outerHeight(true)\n\t\t\t\t\t\t\t\t\t\t- $('#trophies').outerHeight(true)\n\t\t\t\t\t\t\t\t\t\t- padding*3;\n\t$('#missions').height(missionsHeight);\n\t\n\tvar missionListHeight\t\t\t\t= missionsHeight\n\t\t\t\t\t\t\t\t\t\t- $('#missions .active .heading').outerHeight(true)*3\n\t\t\t\t\t\t\t\t\t\t- padding*2;\n\t$('#missions .active .missionList').height(missionListHeight/3);\n\t$('#missions .available .missionList').height(missionListHeight/3);\n\t$('#missions .completed .missionList').height(missionListHeight/3);\n\n\t\n//\tconsole.log($('#profilePage').height());\n//\tconsole.log($('#trophies').outerHeight(true));\n//\tconsole.log(missionsHeight/3);\n\n\t\n\tvar missionsWidth\t\t\t\t\t= $('#profilePage').width()\n\t\t\t\t\t\t\t\t\t\t- $('#user').outerWidth(true)\n\t\t\t\t\t\t\t\t\t\t- padding;\n\t$('#missions').width(missionsWidth);\n\t\n\t\n\tvar mapInfoHeight\t\t\t\t\t= $('#mainContainer').outerHeight(true)\n\t\t\t\t\t\t\t\t\t\t- $('#navigationHeader').outerHeight(true)\n\t\t\t\t\t\t\t\t\t\t- $('#missionName').outerHeight(true)\n//\t\t\t\t\t\t\t\t\t\t- $('#descriptionInfo').outerHeight(true)\n\t\t\t\t\t\t\t\t\t\t- 35\n\t\t\t\t\t\t\t\t\t\t- 97\n\t\t\t\t\t\t\t\t\t\t- padding*2;\n\t\t\t\t\t\t\t\t\t\t\n//\tconsole.log($('#mainContainer').outerHeight(true));\n//\tconsole.log($('#navigationHeader').outerHeight(true));\n//\tconsole.log($('#missionName').outerHeight(true));\n//\tconsole.log($('#descriptionInfo').outerHeight(true));\n\t$('#mapInfo').height(mapInfoHeight);\n\t\n\tvar mapCanvasHeight\t\t\t\t\t= mapInfoHeight\n\t\t\t\t\t\t\t\t\t\t- 52;\n//\tconsole.log(mapCanvasHeight);\n//\tconsole.log($('#mapInfo .addressInfo').outerHeight(true));\t\t\t\t\n\n\t$('#mapCanvas').height(mapCanvasHeight);\n}", "function setsize() {\n gsap.to(indexbtnitemcontainer, { duration: 0.9, ease: \"expo.out\", y: -(current_index * 65) });\n // gsap.to(indexbtn, { duration: 1.5, ease: \"expo.out\", height: \"65px\" });\n gsap.to(indexbtn, { duration: 0.9, ease: \"expo.out\", width: indexbtnitem[current_index].offsetWidth + \"px\" });\n // gsap.to(indexbtn, { duration: 1.5, ease: \"expo.out\", borderRadius: \"50px\" });\n\n}", "function contentAnimation() {\n //Animation keyframes\n let dishAnimate = [\n { transform: \"rotate(-45deg)\" },\n { transform: \"scale(0.5)\" },\n { transform: \"scale(1)\" },\n ];\n\n let textAnimate = [\n { transform: \"scale(1, 1)\" },\n { transform: \"scale(0.8, 0.8)\" },\n { transform: \"scale(0.5, 0.5)\" },\n { transform: \"scale(0.2, 0.5)\" },\n { transform: \"scale(0, 0)\" },\n { transform: \"scale(0.2, 0.5)\" },\n { transform: \"scale(0.5, 0.5)\" },\n { transform: \"scale(0.8, 0.8)\" },\n { transform: \"scale(1, 1)\" },\n ];\n\n mealImg.animate(dishAnimate, 600);\n price.animate(textAnimate, 600);\n name.animate(textAnimate, 600);\n description.animate(textAnimate, 600);\n orderButton.animate(textAnimate, 600);\n}", "function initSize(){\n\t\t$this.css({\n\t\t\twidth\t: params.width,\n\t\t\theight\t: params.height\n\t\t});\n\t\t\n\t\t$('body').css({\n\t\t\twidth\t: params.width,\n\t\t\theight\t: params.height\n\t\t});\n\n\t\t$this.find('.lsd-box').each(function(){\n\t\t\t$(this).css({\n\t\t\t\twidth\t: params.width,\n\t\t\t\theight\t: params.height\n\t\t\t});\n\t\t});\n\n\t\t\n\t}", "function size( animate )\n\t{\n\t\t// If we are resizing, we don't want the charts drawing on every resize event.\n\t\t// This clears the timeout so that we only run the sizing function\n\t\t// when we are done resizing the window\n\t\tclearTimeout( t );\n\t\t// This will reset the timeout right after clearing it.\n\t\tt = setTimeout( function ()\n\t\t{\n\t\t\t$( \"canvas\" ).each( function ( i, el )\n\t\t\t{\n\t\t\t\t// Set the canvas element's height and width to it's parent's height and width.\n\t\t\t\t// The parent element is the div.canvas-container\n\t\t\t\t$( el ).attr(\n\t\t\t\t{\n\t\t\t\t\t\"width\": $( el ).parent().width(),\n\t\t\t\t\t\"height\": $( el ).parent().outerHeight()\n\t\t\t\t} );\n\t\t\t} );\n\t\t\t// kickoff the redraw function, which builds all of the charts.\n\t\t\tredraw( animate );\n\n\t\t}, 100 ); // the timeout should run after 100 milliseconds\n\t}", "function display2(event) {\n\n$(event.currentTarget).animate( {height: '500'}, \"slow\");\n\n$(event.currentTarget).animate( {width: '500'}, \"slow\");\n\n}//end of display2", "function change_container() {\n var c = document.getElementById('jsmind_container');\n c.style.width = '800px';\n c.style.height = '500px';\n}", "function resize() {\n var targetWidth = parseInt(container.style(\"width\"));\n targetWidth = targetWidth > 500 ? 500 : targetWidth;\n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "_resizeHandler() {\n const that = this;\n\n that.$.container.style.width = that.$.container.style.height = Math.min(that.offsetWidth, that.offsetHeight) + 'px';\n }", "adjustToContainer() {\n if (this.isFullscreen()) {\n return\n }\n let parent = window.getComputedStyle(this._domElement.parentNode),\n width = parseInt(parent.width, 10),\n height = parseInt(parent.height, 10)\n\n this.setSize(width, height)\n }", "generateContainers() {\n\n // days of week container\n this.containerDaysOfWeek = this.artboard\n .selectAll(\".lgv-annotation-days-of-week\")\n .data(d => [d])\n .join(\n enter => enter.append(\"g\"),\n update => update,\n exit => exit.remove()\n )\n .attr(\"class\", \"lgv-annotation-days-of-week\")\n .attr(\"transform\", `translate(0,${this.paddingTop + this.artboardUnit})`);\n\n // month of year container\n this.containerWeeksOfYear = this.artboard\n .selectAll(\".lgv-annotation-months-of-year\")\n .data(d => [d])\n .join(\n enter => enter.append(\"g\"),\n update => update,\n exit => exit.remove()\n )\n .attr(\"class\", \"lgv-annotation-months-of-year\")\n .attr(\"transform\", `translate(${this.paddingSide},0)`);\n\n // calendar content container\n this.containerCalendar = this.artboard\n .selectAll(\".lgv-calendar\")\n .data(d => [d])\n .join(\n enter => enter.append(\"g\"),\n update => update,\n exit => exit.remove()\n )\n .attr(\"class\", \"lgv-calendar\")\n .attr(\"transform\", d => `translate(${this.paddingSide},${this.paddingTop})`);\n\n }", "function setPaneDimensions() {\n\t\t\t\tpane_width = element.width();\n\t\t\t\tpanes.each( function () {\n\t\t\t\t\t$( this ).width( pane_width );\n\t\t\t\t} );\n\t\t\t\tcontainer.width( pane_width * pane_count );\n\t\t\t}", "function sizeAll() {\n\tvar h = window.innerHeight;\n\tvar\tw = window.innerWidth;\n\t\n\tif ( w > (h-250)*2) {\n\t\tTweenMax.set(demo, {height:h-240, width:(h-250)*2});\n\t\tTweenMax.set($controls, {y:h-240});\t\n\t}\telse {\n\t\tTweenMax.set(demo, {y:0, width:w-10, height:w/2});\n\t\tTweenMax.set($controls, {y:w/2+10});\t\n\t}\n}", "function containersHeightWidthFix()\n{\n var windowHeight = $(window).height();\n var windowWidth = $(window).width();\n document.getElementById(\"container1\").style.height = windowHeight+\"px\";\n document.getElementById(\"container1\").style.width = windowWidth+\"px\";\n document.getElementById(\"container2\").style.height = windowHeight+\"px\";\n document.getElementById(\"container2\").style.width = windowWidth+\"px\";\n}", "function setPaneDimensions() {\n pane_width = element.width();\n $(options.paneItemsSelector, element).each(function () {\n $(this).width(pane_width);\n });\n container.width(pane_width * pane_count);\n }", "function contentResize() {\n $(\"#music-content\").css(\"width\", ($(\"#content-container\").width() - $(\"#ppLyricsContainer\").width() - 10) + \"px\");\n }", "function fitToContainer() {\n\tresizeButtons();\n\treconfigureArrows();\n}", "function setPaneDimensions() {\n pane_width = $(window).width();\n\t\t\t\n panes.each(function() {\n $(this).width(pane_width);\n });\n\n container.width(pane_width*pane_count);\n\t\t\t\n\t\t\t\n\t\t\n\n }", "function setPaneDimensions() {\n pane_width = $(window).width();\n\t\t\t\n panes.each(function() {\n $(this).width(pane_width);\n });\n\n container.width(pane_width*pane_count);\n\t\t\t\n\t\t\t\n\t\t\n\n }", "function resize() {\n var targetWidth = parseInt(container.style(\"width\"));\n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "function resize() {\n var targetWidth = parseInt(container.style(\"width\"));\n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "function resize() {\n var targetWidth = parseInt(container.style(\"width\"));\n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "function resize() {\n var targetWidth = parseInt(container.style(\"width\"));\n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "function resize() {\r\n var targetWidth = parseInt(container.style(\"width\"));\r\n svg.attr(\"width\", targetWidth);\r\n svg.attr(\"height\", Math.round(targetWidth / aspect));\r\n }", "function setDivSize() {\n\t\tvar wsize = getWindowSize();\n\t\tvar winh = wsize[0] - headerH - 80;\n\t\tvar winw = wsize[1] - 110;\n\t\t$('#controls').css('height','80').css('width',winw);\n\t\tfor (var i=1; i<=maxGraphs; i++ ) {\n\t\t\t$('#graphdiv'+i).css('height','240px').css('width',winw);\n\t\t\t$('#chart'+i).css('height','240px').css('width',winw);\n\t\t}\n\t}", "function handleResize() {\n container.style.width = (container.offsetHeight / 11) * 14 + \"px\";\n updateDisplay()\n}", "function onSizeChange(){\n\t\t\n\t\tvar galleryWidth = getGalleryWidth();\n\t\tg_carousel.setMaxWidth(galleryWidth);\n\t\tg_carousel.run();\n\t\t\t\n\t\tpositionElements();\n\t}", "function resizeContainers(){\n\n\tconsole.log('resizing')\n\tvar m = 10; //margin\n\tvar b = 50; //button height\n\n\tvar vHeight = parseFloat(window.innerHeight) - 4.*m - 2.*b;\n\tvar vWidth = vHeight/params.aspect;\n\tif (vWidth > params.canvasFrac*parseFloat(window.innerWidth)){\n\t\tvWidth = params.canvasFrac*parseFloat(window.innerWidth);\n\t\tvHeight = vWidth*params.aspect;\n\t}\n\tif (vWidth < params.canvasMinWidth){\n\t\tvWidth = params.canvasMinWidth;\n\t\tvHeight = vWidth*params.aspect;\n\t}\n\n\t//canvas\n\td3.select('#WebGLContainer')\n\t\t.style('position','absolute')\n\t\t.style('top',m + 'px')\n\t\t.style('left',m +'px')\n\t\t.style('padding',0)\n\t\t.style('margin',0)\n\t\t.style('width',vWidth + 'px')\n\t\t.style('height',vHeight + 'px')\n\tif (params.renderer != null){\n\t\td3.select(\"#WebGLContainer\").select('canvas')\n\t\t\t.style('width', vWidth)\n\t\t\t.style('height', vHeight)\n\t}\n\n\n\t//text \n\tiWidth = Math.max(params.textMinWidth, parseFloat(window.innerWidth) - vWidth - 4.*m);\n\td3.select('#textContainer')\n\t\t.style('position','absolute')\n\t\t.style('top',m + 'px')\n\t\t.style('left',(vWidth + 2.*m) +'px')\n\t\t.style('margin',0)\n\t\t.style('padding',0)\n\t\t.style('width',iWidth + 'px')\n\t\t.style('height',vHeight + 2.*b + 2.*m + 'px')\n\n\t//buttons\n\td3.select('#buttonContainer')\n\t\t.style('position','absolute')\n\t\t.style('top',vHeight + 2.*m + 'px')\n\t\t.style('left',m +'px')\n\t\t.style('margin',0)\n\t\t.style('padding',0)\n\t\t.style('width',vWidth + 'px')\n\t\t.style('height',2.*b + m + 'px')\n\n\tvar bw = (vWidth - 2.*m - 2.)/3. //-2 accounts for button border width\n\td3.select('#resetButton')\n\t\t.style('position','absolute')\n\t\t.style('top',0)\n\t\t.style('left',0)\n\t\t.style('width', bw + 'px')\n\t\t.style('height',b-2 + 'px')\n\t\t.classed('buttonClicked', true)\n\t\t.classed('buttonHover', false)\n\t\t.on('click', defaultView)\n\n\td3.select('#hardSphereButton')\n\t\t.style('position','absolute')\n\t\t.style('top',0)\n\t\t.style('left',bw + m + 'px')\n\t\t.style('width',bw + 'px')\n\t\t.style('height',b-2 + 'px')\n\t\t.classed('buttonClicked', false)\n\t\t.classed('buttonHover', true)\n\t\t.on('click', hardSphereView)\n\n\td3.select('#sliceButton')\n\t\t.style('position','absolute')\n\t\t.style('top',0)\n\t\t.style('left',2.*bw + 2.*m + 'px')\n\t\t.style('width',bw + 'px')\n\t\t.style('height',b-2 + 'px')\n\t\t.classed('buttonClicked', false)\n\t\t.classed('buttonHover', true)\n\t\t.on('click', sliceView)\n\n\td3.select('#sparseButton')\n\t\t.style('position','absolute')\n\t\t.style('top',b + m + 'px')\n\t\t.style('left',0)\n\t\t.style('width',bw + 'px')\n\t\t.style('height',b-2 + 'px')\n\t\t.classed('buttonHover', true)\n\t\t.classed('buttonClicked', false)\n\t\t.on('click', sparseView)\n\n\td3.select('#coordinationButton')\n\t\t.style('position','absolute')\n\t\t.style('top',b + m + 'px')\n\t\t.style('left',bw + m + 'px')\n\t\t.style('width',bw + 'px')\n\t\t.style('height',b-2 + 'px')\n\t\t.classed('buttonClicked', false)\n\t\t.classed('buttonHover', true)\n\t\t.on('click',coordinationView)\n\n\td3.select('#helpButton')\n\t\t.style('position','absolute')\n\t\t.style('top',b + m + 'px')\n\t\t.style('left',2*bw + 2*m + 'px')\n\t\t.style('width',bw + 'px')\n\t\t.style('height',b-2 + 'px')\n\t\t.classed('buttonClicked', false)\n\t\t.classed('buttonHover', true)\n\t\t.on('click',showHelp)\n\n\tif (params.renderer != null){\n\t\tvar width = parseFloat(params.container.style('width'));\n\t\tvar height = parseFloat(params.container.style('width'));\n\t\tvar aspect = width / height;\n\t\tparams.camera.aspect = aspect;\n\t\tparams.camera.updateProjectionMatrix();\n\n\t\tparams.renderer.setSize( width, height);\n\t}\n}", "initContainers() {\n this._body = new asprite.SpriteSheet() // create body container\n this._weapon = new asprite.SpriteSheet() // create weapon container\n\n this._body.anchor.x = this._body.anchor.y = this._weapon.anchor.x = this._weapon.anchor.y = 0.5\n\n this.addChild(this._body)\n this.addChild(this._weapon)\n\n this.animation = new AnimationController(this)\n }", "resize_content(ui, sizes) {\n const [width, height] = sizes;\n this.content_element.style.width\n = `${Math.max(ui.default_cell_size / 2, width + CONSTANTS.CONTENT_PADDING * 2)}px`;\n this.content_element.style.height\n = `${Math.max(ui.default_cell_size / 2, height + CONSTANTS.CONTENT_PADDING * 2)}px`;\n }", "function animate_projects_page() {\r\n\t\t\t\t$('.portfolio_main_space_projects_dark').animate({width: '120px'});\r\n\t\t\t\t$('#portfolio_main_space_projects_light').delay(250).animate({height: '0px'});\r\n\t\t\t\t$('.portfolio_main_space_projects_dark').animate({height: '600px'});\r\n\t\t\t\t$('#nav_list, #nav_logo, #footer_text').css({opacity: 1});\r\n\t\t\t\t$('#nav_proj_side_container').delay(750).animate({opacity: '1'}, 750);\r\n\t\t\t\t$('#project_content_view_spacer').delay(250).animate({width: '80%'}, 0);\r\n\t\t\t}", "function resize() {\n var targetWidth = parseInt(container.style(\"width\"));\n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "function resize() {\n var targetWidth = parseInt(container.style(\"width\"));\n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "function setPaneDimensions() {\n\t\tpane_width = element.width();\n\t\tpanes.each(function() {\n\t\t\t$(this).width(pane_width);\n\t\t});\n\t\tcontainer.width(pane_width*pane_count);\n\t\t}", "function simpleLayoutChanges() {\n \"use strict\";\n var container = $('.container').width();\n $('.testimonial_carousel .item').each(function() {\n\n var self = $(this);\n var wpb_column = self.parents('.wpb_column').first().width();\n self.innerWidth(wpb_column + 'px');\n self.height(self.height() + 'px');\n self.parents('.caroufredsel_wrapper').first().height(self.height() + 'px');\n self.parents('.testimonial_carousel').first().height(self.height() + 'px');\n\n });\n\n $('.clients_caro .item').each(function() {\n var self = $(this);\n var wpb_column = self.parents('.vc_column-inner').width();\n\n if (container > 420 && container <= 724) {\n self.innerWidth((wpb_column / 3) + 'px');\n }\n if (container > 724 && container < 940) {\n self.innerWidth((wpb_column / 4) + 'px');\n }\n if (container > 940) {\n self.innerWidth((wpb_column / 6) + 'px');\n }\n });\n\n clientsCarousel();\n }", "function size_content() {\n var container = $(\"html\");\n var top_container = $(\".top_container\");\n var wwtcanvas = $(\"#wwtcanvas\");\n\n // Constants here must be synced with settings in style.css\n //const new_wwt_width = (top_container.width() - sloan_gutter.width());\n const new_wwt_height = top_container.height() - 2;\n // set wwt_canvas height to fill top_container, subtract 3 to account for border width\n\n const colophon_height = $(\"#colophon\").height();\n const bottom_height = container.height() - top_container.outerHeight() - 80;\n const description_height = bottom_height - colophon_height;\n\n // resize wwtcanvas with new values\n $(wwtcanvas).css({\n //\"width\": $(\".right_container\").width() + \"px\",\n \"height\": new_wwt_height + \"px\"\n });\n\n // resize description box to new value\n $(\"#description_box\").css({\n \"height\": description_height + \"px\"\n });\n }", "function createContainers() {\n\t\t\t\t//console.log('Creating containers...');\n\t\t\t\t// Define html to be prepended to the body\n\t\t\t\tvar qfInner = \"<div id=\\\"qfCloseContainer\\\">&times;</div>\\n<div id=\\\"qfSheetContent\\\"></div>\";\n\t var qfSheetContainer = \"<div id=\\\"qfSheetContainer\\\">\" + qfInner + \"</div>\";\n\t\t\t\tvar qfDimmer = \"<div id=\\\"qfDimmer\\\"></div>\";\n\t\t\t\tvar qfSpinner = \"<div id=\\\"qfSpinner\\\"></div>\";\n\t\t\t\n\t\t\t\t// Prepend the containers and remove the body scrollbars\n $('body').css('overflow','hidden').prepend(qfSheetContainer, qfDimmer, qfSpinner);\n\t\t\n\t\t\t\t// Hide the containers immediately\n\t\t\t\t$('#qfDimmer').hide().fadeIn(250);\n\t\t\t\t$('#qfSheetContainer, #qfSpinner').hide();\n\t\t\t}", "function resize() {\n var targetWidth = (isNaN(parseInt(container.style(\"width\")))) ? 960 : parseInt(container.style(\"width\")); \n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "function setPaneDimensions() {\n pane_width = element.width();\n \n // incase carousel slides have been updated, re-index them\n panes = $(\"ul>li\", element);\n pane_count = panes.length;\n\n panes.each(function() {\n $(this).width(pane_width);\n });\n container.width(pane_width*pane_count);\n }", "setStyle (){\n // console.log(\"style\")\n let ratio = this.items.length / this.slidesVisible\n this.container.style.width = (ratio * 100)+ \"%\"\n this.items.forEach(item => item.style.width= ((100 / this.slidesVisible )/ ratio) + \"%\")\n }", "function animation_btn_explications() {\n\t\tfor(var i = 0; i < 5; i++) {\n\t\t\t$(\"#container_explanations\").transition({\n\t\t\t\t\t\ttop: '93%',\n\t\t\t\t\t\tdelay: 400 }, 1000, 'linear');\n\t\t\t$(\"#container_explanations\").transition({\n\t\t\t\t\t\ttop: '90%',\n\t\t\t\t\t\tdelay: 400 }, 1000, 'linear');\n\t\t}\n\t}", "function resize() {\n let targetWidth = parseInt(container.style(\"width\"));\n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "function resize() {\n let targetWidth = parseInt(container.style(\"width\"));\n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "function GallerySize(){jQuery(\".codegallery\").css({\"height\":jQuery(\".codeimage:first img\").height(),\"width\":jQuery(\".codeimage:first img\").width()});jQuery(\".codeimage\").width(jQuery(\".codegallery\").width());jQuery(\".carousel\").css(\"width\",jQuery(\".codeimage\").width()*jQuery(\".codeimage\").length)}", "function resize() {\n let targetWidth = parseInt(container.style(\"width\"));\n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "function resize() {\n let targetWidth = parseInt(container.style(\"width\"));\n svg.attr(\"width\", .8 * targetWidth);\n svg.attr(\"height\", .8 * Math.round(targetWidth / aspect));\n }", "function resize() {\n d3.selectAll(\"g\").attr(\"transform\", \"scale(\" + $(\"#content-container\").width()/1900 + \")\");\n $(\"svg\").height($(\"#content-container\").width()/2);\n }", "function resize() {\n // sectionPositions will be each sections\n // starting position relative to the top\n // of the first section.\n sectionPositions = [];\n var startPos;\n sections.each(function (d, i) {\n var top = this.getBoundingClientRect().top;\n if (i === 0) {\n startPos = top;\n }\n sectionPositions.push(top - startPos);\n });\n\n containerStart = container.node().getBoundingClientRect().top + window.pageYOffset;\n }", "function changeSize() {\n carouselWrapWidth = carouselWrap.offsetWidth;\n isResizing = true;\n carouselList.style.transition = \"\";\n moveCarousel();\n}", "function animateContent() {\n var divWidth = $(\"#wrapper\").width() - $(window).width() / 2 + 270;\n var animated = $(\".animated-layer\");\n animated.each(function () {\n var anim = $(this);\n var offset = $(this).offset().left;\n if (offset < divWidth) {\n // Image Reveal Animation\n if (anim.hasClass(\"image-animation\")) {\n anim.addClass(\"animated\");\n }\n // Fade In Up Animation\n else if (anim.hasClass(\"fade-in-up-animation\")) {\n anim.addClass(\"animated fadeInUp\");\n }\n // Fade In Animation\n else if (anim.hasClass(\"fade-in-animation\")) {\n anim.addClass(\"animated fadeIn\");\n }\n // Fade In Down Animation\n else if (anim.hasClass(\"fade-in-down-animation\")) {\n anim.addClass(\"animated fadeInDown\");\n }\n // Fade In Right Animation\n else if (anim.hasClass(\"fade-in-right-animation\")) {\n anim.addClass(\"animated fadeInRight\");\n }\n // Fade In Right Animation\n else if (anim.hasClass(\"fade-in-left-animation\")) {\n anim.addClass(\"animated fadeInLeft\");\n }\n }\n });\n }", "function contentAnimation() {\n\n var tl = gsap.timeline();\n tl.from('.is-animated', { duration: 1, translateY: 60, opacity: 0, stagger: 0.4 });\n tl.from('.fadein', { duration: 0.5, opacity: 0.9 });\n}", "function resize() {\n\t\t\tcanvas.width = container.offsetWidth;\n\t\t\tcanvas.height = container.offsetHeight;\n\t\t}", "handleResize() {\n // don't do anything if we don't have a container\n if ( ! this.jqueryMap.$container ) { return false; }\n\n this.setPxSizes();\n if ( this.stateMap.alone ){\n this.jqueryMap.$container.css('height', this.stateMap.alone_height_px);\n this.jqueryMap.$text.text(this.stateMap.alone_html);\n } else {\n this.jqueryMap.$container.css('height', this.stateMap.other_height_px);\n this.jqueryMap.$text.text(this.stateMap.other_html);\n }\n return true;\n }", "function resizeCards() {\n $('.card').css('width', window.innerHeight * 0.8 / 3.1);\n $('.card').css('height', window.innerHeight * 0.8 / 3.1);\n }", "function adjustElementsSize() {\n\t\t\tvar $div = $( '.shake-me' );\n\t\t\t$div.css( { left: $div.next().width() });\n\n return;\n// console.log( windowHeight, referenceHeight );\n\n // if( windowHeight < referenceHeight ) {\n // var heightRatio = windowHeight / referenceHeight;\n\t\t\t\t//\n // //Get all the images\n // $( '#parallax > div img.layer' ).each( function() {\n // var $img = $( this );\n // var ratio = $img.width() / $img.height();\n\t\t\t\t//\n // if( ! isNaN( ratio ) ) {\n // $img.height( $img.height() * heightRatio );\n // $img.width( $img.height() * ratio );\n\t\t\t\t//\n // console.log( $img.attr( 'src' ), $img.height(), ratio );\n // }\n // });\n // } else {\n // jQuery( '#parallax > div img' ).css( { width: '', height: '' } );\n // }\n }", "function resize() {\n \tconsole.log(\"------:resize: \"+ svg+\"/\"+ container.attr(\"id\"))\n var targetWidth = parseInt(container.style(\"width\"));\n \tconsole.log(targetWidth);\n svg.attr(\"width\", targetWidth);\n svg.attr(\"height\", Math.round(targetWidth / aspect));\n }", "function resize() {\r\n \t$(\".docInformation\").css(\"opacity\", 1);\r\n var targetWidth = parseInt(container.style(\"width\"));\r\n svg.attr(\"width\", targetWidth);\r\n svg.attr(\"height\", Math.round(targetWidth / aspect));\r\n }", "function ChangeSize(amount, duration) {\n var sizeAnimation = new Animation({\n begin: 0,\n loop: false,\n timeToFinish: duration,\n propsBegin: { size: this.size },\n propsEnd: { size: this.size + amount }\n });\n return sizeAnimation;\n}", "function ResizeHTMLContent(){\n\tElemId(\"HTMLContent\").style.top = ElemId(\"Header\").style.height;\n\tElemId(\"HTMLContent\").style.left = ElemId(\"Menu\").style.width;\n\tElemId(\"HTMLContent\").style.height = (wHeight - CropPX(ElemId(\"Header\").style.height) - CropPX(ElemId(\"Playbar\").style.height)) + \"px\";\n\tElemId(\"HTMLContent\").style.width = (wWidth - CropPX(ElemId(\"Menu\").style.width)) + \"px\";\n\t\n\tswitch(viewState.state){\n\t\tcase STATEARTISTS:\n\t\t\tResizeArtists();\n\t\t\tbreak;\n\t\tcase STATEALBUMS:\n\t\t\tResizeAlbums();\n\t\t\tbreak;\n\t\tcase STATEPLAYLIST:\n\t\t\tResizePlaylist();\n\t\t\tbreak;\n\t\tcase STATESETTINGS:\n\t\t\tResizeSettings();\n\t\t\tbreak;\n\t}\n}", "function resizeIt(magnification)\r\n\r\n{var new_layout_width=(original_size.w*magnification)+layout_width_offset;\r\n layout.style.width=new_layout_width.toString()+\"px\";\r\n embed_tag.setAttribute(\"width\",original_size.w*magnification);\r\n\r\n embed_tag.setAttribute(\"height\",original_size.h*magnification);\r\n\r\n}", "function change_container(){\n\tvar c = document.getElementById('jsmind_container');\n\tc.setAttribute(\"style\",\"display:block;width:100vw;height:100vh\");\n\tresize_jsmind();\n}", "function sizeChange() {\n\n // Resize the timeline\n var wide = container.width(),\n high = container.height();\n var scale = wide / outerWidth;\n d3.select(\".topGroup\").attr(\"transform\", \"scale(\" + scale + \")\");\n $(\".svg-chart\").height(wide * (1.0 / aspect));\n\n}", "function set_sizes() {\n tab_width = $nav_tab.outerWidth();\n list_width = $nav_list.outerWidth();\n tabs_displayed = list_width / tab_width;\n //recalculate height of the currently displayed slide\n var this_sectionHeight = $('.slick-active').outerHeight();\n $sections.css('height', this_sectionHeight + 'px');\n //use tab width and tab index to set horizontal spacing\n $nav_tab.each(function() {\n var index = $(this).index();\n var left_pos = (tab_width * (index - pos_counter)) + 'px';\n $(this).css('left', left_pos);\n });\n}", "function resizeslider(){\n\t$(\".slider .items\").css({\"height\":$(window).height()});\n\t$(\".slider\").css({\"height\":$(window).height()});\n}", "async growAndShrink() {\n await this._temporaryAnimation(this._icon, 'grow-and-shrink', 200);\n }", "function resize() {\n var sentinel = false;\n\n for(var i = 0; i < visCount; i++) {\n if ((d3.select(\"#vis\" + i)).attr(\"height\") < 400)\n sentinel = true;\n }\n if(sentinel) {\n height *= 2;\n\n d3.selectAll(\".assignmentContainer\")\n .attr( \"height\", height );\n d3.selectAll(\".svg\")\n .attr( \"height\", height );\n } else {\n height /= 2;\n\n d3.selectAll(\".assignmentContainer\")\n .attr(\"height\", height);\n d3.selectAll(\".svg\")\n .attr(\"height\", height);\n }\n}", "function setScreenSize() {\n $container.css('height', $screenHeight); // updates the CSS with the current screen height\n $container.css('width', $screenWidth); // updates the CSS with the current screen width\n\n $box1.css('height', $screenHeight);\n $box1.css('width', $screenWidth);\n $box1.css('left', $screenWidth); // updates the CSS with the width from the right eg this used to be $screenWidth - 30 to show a bit of the div like a tile effect\n\n $box2.css('height', $screenHeight);\n $box2.css('width', $screenWidth);\n $box2.css('left', $screenWidth); // updates the CSS with the width from the right eg this used to be $screenWidth - 30 to show a bit of the div like a tile effect\n\n $box3.css('height', $screenHeight);\n $box3.css('width', $screenWidth);\n $box3.css('left', $screenWidth); // updates the CSS with the width from the right eg this used to be $screenWidth - 30 to show a bit of the div like a tile effect\n }", "function handleResize() {\r\n\t\t\t// 1. update height of step elements\r\n\t\t\tvar stepHeight = Math.floor(window.innerHeight * 0.75);\r\n\t\t\t\r\n\r\n\t\t\t// 2. update width/height of graphic element\r\n\t\t\tvar bodyWidth = d3.select('body').node().offsetWidth;\r\n\r\n\t\t\tvar graphicMargin = 16 * 4;\r\n\t\t\tvar textWidth = text.node().offsetWidth;\r\n\t\t\tvar graphicWidth = container.node().offsetWidth - textWidth - graphicMargin;\r\n\t\t\tvar graphicHeight = Math.floor(window.innerHeight/2)\r\n\t\t\tvar graphicMarginTop = Math.floor(graphicHeight/2)\r\n\r\n\t\t\tgraphic\r\n\t\t\t\t.style('width', '100%')\r\n\t\t\t\t .style('height', '100%')\r\n\t\t\t\t.style('top', graphicMarginTop + 'px');\r\n\r\n\r\n\t\t\t// 3. tell scrollama to update new element dimensions\r\n\t\t\tscroller.resize();\r\n\t\t}", "function resize() {\n const w = parseInt(container.style(\"width\"));\n svg.attr(\"width\", w);\n svg.attr(\"height\", Math.round(w / aspect));\n }", "function resize() {\n const w = parseInt(container.style(\"width\"));\n svg.attr(\"width\", w);\n svg.attr(\"height\", Math.round(w / aspect));\n }", "function resizeContainer(){\n var height = window.outerHeight\n height = height - 360\n currentPlaylistSection.style.height = height\n}", "function on_load() {\r\n $(\"#page_title_container\").css(\"height\", window_height + \"px\");\r\n $(\"#content01\").css(\"height\", window_height + \"px\");\r\n $(\"#content02\").css(\"height\", window_height + \"px\");\r\n $(\"#content03\").css(\"height\", window_height + \"px\");\r\n}", "function setContainerSize(size) {\n opts.containerSize = size;\n setMinMaxResize();\n }", "function adjustSize() {\n const childWidth = carousel.offsetWidth;\n carousel.style.height = childWidth + \"px\";\n carouselInner.style.height = childWidth + \"px\";\n const children = document.querySelectorAll(\".page-item\");\n children.forEach(child => {\n child.style.width = (childWidth / 2) * 0.96 + \"px\";\n });\n circle1.click();\n}", "function populate() {\n\n $('#mast').append('<div id=\"animation\"></div>');\n\n for (i=0; i<5; i++) {\n $('#mast #animation').append('<div></div>');\n }\n\n }", "function setSize()\n\t\t{\n\t\t\t//console.log(width, height, height/width);\n\t\t\n\t\t\t/*\n\t\t\tthat.css({\n\t\t\t\twidth : w + '%',\n\t\t\t\tpaddingTop : height/width * w + '%',\n\t\t\t\tposition : 'relative'\n\t\t\t});\n\t\t\t*/\n\t\t\t\n\t\t\t/*\n\t\t\tthat.css({\n\t\t\t\twidth : width,\n\t\t\t\theight : height\n\t\t\t});\n\t\t\t\n\t\t\tdiv_wrapper.css({\n\t\t\t\twidth :width ,\n\t\t\t\theight : height\n\t\t\t});\n\t\t\t*/\n\t\t\t\n\t\t\tdiv_ratio.css({\n\t\t\t\twidth : '100%',\n\t\t\t\tpaddingTop : height/width * 100 + '%'\n\t\t\t});\n\t\t}", "function doneResizing(){\n //bigGalleryWidth();\n sliderHeight();\n centerVerticalNavigation();\n}", "function initAnim(){\n //element.removeClass('animate');\n pnCont.removeClass('animate');\n pbCont.removeClass('animate');\n dCont.removeClass('animate');\n //elementWidth = element.width();\n //elementHeight = element.height();\n var temp = 0;\n if(pbCont.width() > 782* scope.zoom / 8){\n temp = pbCont.width() ;\n }\n else{\n temp = 782* scope.zoom / 8;\n }\n elementWidth = temp + pnCont.width()-3;\n elementHeight = pnCont.height();\n parentWidth = element.parent().width();\n parentHeight = element.parent().height();\n lockX = parentWidth >= elementWidth;\n lockY = parentHeight >= elementHeight;\n maxYtranslation = -1*(elementHeight - parentHeight + 15);\n maxXtranslation = -1*(elementWidth - parentWidth);\n //console.log(pbCont.width());\n count = 0;\n releaseCounter = 0;\n history = {'X':[],'Y':[]};\n continueAnim = true;\n velocitiesSet = false;\n scrollbarinit();\n animloopTouched();\n }", "function resize() {\n // sectionPositions will be each sections\n // starting position relative to the top\n // of the first section.\n sectionPositions = [];\n var startPos;\n sections.each(function (d, i) {\n var top = this.getBoundingClientRect().top;\n if (i === 0) {\n startPos = top;\n }\n sectionPositions.push(top - startPos);\n });\n containerStart = container.node().getBoundingClientRect().top + window.pageYOffset;\n }", "function _resize() {\n var winW = $(window).width();\n var winH = $(window).height();\n var imgW = 0, imgH = 0;\n\n container.width(winW);\n container.height(winH);\n\n if(!settings.resizeProportionally) {\n imgW = winW;\n imgH = winH;\n } else {\n var initW = settings.imageWidth, initH = settings.imageHeight;\n var ratio = initH / initW;\n\n imgW = winW;\n imgH = winW * ratio;\n\n if(imgH < winH) {\n imgH = winH;\n imgW = imgH / ratio;\n }\n }\n if(!settings.resizeAnimate) {\n $(allImgs).width(imgW).height(imgH);\n } else {\n $(allImgs).animate({width: imgW, height: imgH}, 'normal');\n }\n }", "function update_containersize() {\n $('ul.filterable-grid').css(\"width\", $('.showcase-container').width() + \"px\");\n }", "function performLayout() {\n\n //--\n var originalWindow = $(window);\n\n //--\n var windowHeight = originalWindow.height();\n var windowWidth = originalWindow.width();\n\n //--\n var container = $('.container');\n var headerRightPanel = $('.headerRightPanel');\n var leftPanel = $('.leftPanel');\n var rightPanel = $('.rightPanel');\n var header = $('.header');\n var contentHeight = windowHeight - header.height();\n var contentWidth = windowWidth - (leftPanel.width()) - 1;\n\n //--\n container.css({ 'height': windowHeight, 'width': windowWidth });\n headerRightPanel.css({ 'width': contentWidth });\n leftPanel.css({ 'height': contentHeight });\n rightPanel.css({ 'height': contentHeight-15, 'width': contentWidth });\n\n}", "function modal_resize() {\n\t\t\n\t\t$('.modal').each(function(index, value) { \n\t\t\t\n\t\t\t// Add display:block for resizing calculations\n\t\t\t\n\t\t\tif($(this).hasClass('fade') && !$(this).hasClass('in')) {\n\t\t\t\t\n\t\t\t\t$(this).css({\n\t\t\t\t\t\n\t\t\t\t\tdisplay: 'block'\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tvar modal_header = $(this).find('.modal-header');\n\t\t\tvar modal_footer = $(this).find('.modal-footer');\n\t\t\tvar modal_body = $(this).find('.modal-body');\n\t\t\tvar modal_body_content = $(this).find('.modal-body-content');\n\t\t\t\n\t\t\tvar window_height = $(window).height();\n\t\t\tvar modal_header_height = modal_header.outerHeight();\n\t\t\tvar modal_footer_height = modal_footer.outerHeight();\n\t\t\tvar modal_body_height = modal_body.height();\n\t\t\tvar modal_body_padding = modal_body.outerHeight() - modal_body_height;\n\t\t\tvar modal_body_content_height = modal_body_content.outerHeight();\n\t\t\tvar modal_total_height = modal_header_height + modal_body_padding + modal_body_content_height + modal_footer_height;\n\t\t\tvar modal_margins = 15;\n\t\t\t\n\t\t\tif ((modal_total_height + (2 * modal_margins)) > window_height) {\n\t\t\t\t\n\t\t\t\tmodal_body.css({\n\t\t\t\t\t\n\t\t\t\t\t'height'\t:\twindow_height - modal_header_height - modal_body_padding - modal_footer_height - (2 * modal_margins)\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tmodal_body.css({\n\t\t\t\t\t\n\t\t\t\t\t'height'\t:\tmodal_body_content_height\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$(this).css({\n\t\t\t\t\n\t\t\t\t'margin-top'\t:\t-1 * ($(this).outerHeight() / 2)\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\t// Remove display:block for resizing calculations to avoid element covering screen\n\t\t\t\n\t\t\tif($(this).hasClass('fade') && !$(this).hasClass('in')) {\n\t\t\t\t\n\t\t\t\t$(this).css({\n\t\t\t\t\t\n\t\t\t\t\tdisplay: 'none'\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t}", "putAnimationBoxes() {\n let cf = this.working_model.frames[this.current_frame];\n\n this.animation_display.selection = {\n x: cf.x,\n y: cf.y,\n w: cf.width,\n h: cf.height\n };\n this.animation_display.sprite_origin = {\n x: cf.offset_x,\n y: cf.offset_y\n };\n }", "_adjustAll() {\n for (const layer of this._layers) {\n layer._changeSizeTo(this._width, this._height)\n }\n }", "function handleResize() {\n\t\t// 1. update height of step elements\n\t\tvar stepHeight = Math.floor(window.innerHeight * 0.35);\n\t\tstep.style('height', stepHeight + 'px');\n\t\t// 2. update width/height of graphic element\n\t\tvar bodyWidth = d3.select('body').node().offsetWidth;\n\t\tvar graphicMargin = 16 * 4;\n\t\tvar textWidth = text.node().offsetWidth;\n\t\tvar graphicWidth = container.node().offsetWidth; // - textWidth - graphicMargin;\n\t\tvar graphicHeight = Math.floor(window.innerHeight * 0.5);\n\t\tvar graphicMarginTop = Math.floor(graphicHeight / 2);\n\t\tgraphic\n\t\t\t.style('width', graphicWidth + 'px')\n\t\t\t.style('height', graphicHeight + 'px');\n\t\t// 3. tell scrollama to update new element dimensions\n\t\tscroller.resize();\n\t}", "_updateSize() {\n if (qx.ui.mobile.core.Blocker.ROOT == this.getLayoutParent()) {\n this.getContainerElement().style.top =\n qx.bom.Viewport.getScrollTop() + \"px\";\n this.getContainerElement().style.left =\n qx.bom.Viewport.getScrollLeft() + \"px\";\n this.getContainerElement().style.width =\n qx.bom.Viewport.getWidth() + \"px\";\n this.getContainerElement().style.height =\n qx.bom.Viewport.getHeight() + \"px\";\n } else if (this.getLayoutParent() != null) {\n var dimension = qx.bom.element.Dimension.getSize(\n this.getLayoutParent().getContainerElement()\n );\n\n this.getContainerElement().style.width = dimension.width + \"px\";\n this.getContainerElement().style.height = dimension.height + \"px\";\n }\n }", "function resize() {\n const w = parseInt(container.offsetWidth);\n node.attr('width', w);\n node.attr('height', Math.round(w / aspect));\n }", "function changeBoxHeight () {\n\twindow.setTimeout(function () {\n\t\tvar newContentHeight = $('#content').height();\n\t\tvar newHeight = titleHeight + newContentHeight;\n\t\t$('#centered').animate({\n\t\t\t'height': newHeight\n\t\t}, 400);\n\t}, 350);\n}", "function initAnimations(container){\n\n\t\tvar wow = new WOW(\n\t\t{\n\t\t\tboxClass: 'wow', // animated element css class (default is wow)\n\t\t\tanimateClass: 'animated', // animation css class (default is animated)\n\t\t\toffset: 0, // distance to the element when triggering the animation (default is 0)\n\t\t\tmobile: false, // trigger animations on mobile devices (default is true)\n\t\t\tlive: true, // act on asynchronously loaded content (default is true)\n\t\t\tcallback: function(box) {\n\t\t\t\t// the callback is fired every time an animation is started\n\t\t\t\t// the argument that is passed in is the DOM node being animated\n\t\t\t},\n\t\t\tscrollContainer: container // optional scroll container selector, otherwise use window\n\t\t}\n\t\t);\n\t\twow.init();\n\t}", "function adjustContainerWidth() {\r\n\tvar width = (elmWidth + 2) * elements.length;\r\n\t$('#thecontainer').attr('style', 'width: ' + width + 'px;' );\r\n}" ]
[ "0.7067571", "0.6767865", "0.63932145", "0.63348746", "0.6330082", "0.6145131", "0.6112355", "0.6102201", "0.60916644", "0.6046078", "0.60222137", "0.5977769", "0.5964004", "0.59455013", "0.5906499", "0.5906409", "0.58991355", "0.5882533", "0.5869694", "0.5866514", "0.5862041", "0.5846085", "0.58367753", "0.5829754", "0.58237946", "0.58088934", "0.58061796", "0.5804969", "0.5804969", "0.5795887", "0.5795887", "0.5795887", "0.5795887", "0.5791116", "0.57892513", "0.5770675", "0.5728311", "0.57193273", "0.57182074", "0.57163256", "0.57113", "0.57078665", "0.57078665", "0.5703241", "0.5701219", "0.56984895", "0.56977534", "0.56750125", "0.5674548", "0.5667635", "0.5664482", "0.5661216", "0.5661216", "0.56376535", "0.5636729", "0.56243205", "0.56219524", "0.5609835", "0.5609123", "0.56082845", "0.56031793", "0.56027025", "0.5602258", "0.5593253", "0.55920464", "0.55885845", "0.5573496", "0.5560815", "0.5546868", "0.55368066", "0.55253774", "0.55245435", "0.5522946", "0.5510374", "0.5507572", "0.5504024", "0.5502727", "0.55027133", "0.54992646", "0.54992646", "0.5487775", "0.54876584", "0.5487022", "0.548435", "0.54793733", "0.5476899", "0.5476", "0.5474943", "0.54740703", "0.5462328", "0.5461265", "0.5456957", "0.5451759", "0.54483974", "0.54449034", "0.54431283", "0.5432245", "0.54283434", "0.5427516", "0.5421413", "0.5420206" ]
0.0
-1
jquery.mb.components file: jquery.mb.CSSAnimate.min.js Copyright (c) 20012014. Matteo Bicocchi (Pupunzi); Open lab srl, Firenze Italy
function uncamel(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cssAnimate() {\n if (!$html.hasClass('mobile') && !$html.hasClass('tablet') && $deviceWidth > 991){\n $('.css-animate .animated').each(function(){\n var that = $(this);\n if (that.data('time') != undefined){\n var delay = that.attr('data-time');\n if(that.visible(true)){\n setTimeout(function(){\n that.addClass('activate');\n that.addClass(that.data('fx'));\n }, delay)\n }\n }\n else{\n if(that.visible(true)){\n that.addClass('activate');\n that.addClass(that.data('fx'));\n }\n }\n });\n } else {\n $body.removeClass('css-animate');\n }\n }", "function ANIMATE($anim) {\n var that = this, an = {}, myData = {}, styleCur = {}, isOverflowOnNode;\n /**\n * FUNCTION CLASS\n */\n /**\n * CHECK & INITIALIZATION ANIMATION\n */\n function Init() {\n /**\n * SETUP VARIABLE AT FIRST\n */\n an.rubyID = DB.GetRubyID($anim);\n myData = that.data = vData[an.rubyID];\n // Setup initialization timer of object\n if (myData.tsInit == UNDE)\n myData.tsInit = VA.tsCur;\n // Properties & options of object\n var prop = myData.prop, opts = myData.opts;\n an.propEnd = prop[prop.length - 1];\n an.optsEnd = opts[opts.length - 1];\n /**\n * SETUP AFTER START ANIMATION\n */\n SetupStyleBegin();\n Start();\n }\n /**\n * SETUP VALUE OF STYLE & TRANSFORM AT FIRST\n */\n function SetupStyleBegin() {\n // Setup properties of normal Style\n StyleBegin();\n // Setup properties of transform CSS\n TransformBegin();\n }\n /**\n * SETUP VALUE OF STYLE AT FIRST\n */\n function StyleBegin() {\n var styleBegin = an.optsEnd.styleBegin, styleEnd = an.optsEnd.styleEnd, opts = myData.opts, isAnimMulti = opts.length > 1;\n /**\n * LOOP TO SETUP VALUE NOT BE TRANSFORM CSS\n */\n for (var name in an.propEnd) {\n if ($.inArray(name, VA.nameTf) === -1) {\n /**\n * SETUP STYLE END\n * + Parse & convert value of StyleEnd\n */\n var valueCur = an['propEnd'][name];\n styleEnd[name] = M.ParseCssStyle(valueCur);\n /**\n * SETUP STYLE BEGIN\n */\n // Case: name of properties have fixed value -> inherit value of tfEnd\n if ($.inArray(name, VA.propFixed) !== -1) {\n styleBegin[name] = styleEnd[name];\n }\n else {\n // Parse & convert value of StyleBegin\n valueCur = $anim.css(name);\n styleBegin[name] = M.ParseCssStyle(valueCur);\n }\n }\n }\n // Inherit StyleEnd of animation before\n if (isAnimMulti)\n styleBegin = $.extend(styleBegin, opts[opts.length - 2]['styleEnd']);\n // Inherit properties of CSS Style 'point' have setup before\n if (myData.cssStyle !== null) {\n styleBegin = $.extend(true, styleBegin, myData.cssStyle);\n // Remove properties CSS Style after inherit\n myData.cssStyle = null;\n }\n /**\n * SETUP INHERIT PROPERTIES OF STYLE-END FROM STYLE-BEGIN\n */\n for (var name in styleBegin) {\n if (styleEnd[name] === UNDE) {\n styleEnd[name] = styleBegin[name];\n }\n }\n }\n /**\n * SETUP VALUE OF TRANSFORM AT FIRST\n */\n function TransformBegin() {\n var opts = myData.opts;\n /**\n * GET TRANSFORM OF OBJECT AT FIRST\n */\n // Case: have many continuous animation\n var tfBegin;\n if (opts.length > 1) {\n // Get Transform-begin from Transform-end before\n tfBegin = $.extend({}, opts[opts.length - 2]['tfEnd']);\n }\n else {\n tfBegin = myData.tfCur;\n if (tfBegin == UNDE) {\n var matrixBegin = MATRIX.getFromItem($anim);\n /**\n * PARSE MATRIX TO INITIAL PROPERTIES\n */\n tfBegin = MATRIX.parse(matrixBegin);\n }\n }\n // Inherit the properties CSS Transform 'point' have setup before\n if (myData.cssTf !== null) {\n tfBegin = $.extend(true, tfBegin, myData.cssTf);\n // Remove CSS Transform property after inherit\n myData.cssTf = null;\n }\n /**\n * GET TRANSFORM-END FROM SETUP PROPERTIES\n */\n var tfEnd = TF.FromProp(an.propEnd);\n /**\n * SETUP TRANSFORM INHERIT FROM PROPERTIES BEFORE\n */\n // Inherit 'tfBegin' properties but 'tfEnd' does not have, order of Transform depends on options\n tfEnd = TF.Extend(tfBegin, tfEnd, an.optsEnd);\n var tfDefault = VA.tfDefault;\n for (var name in tfEnd) {\n /**\n * ADDITIONAL PROPERTIES WITH TRANSFORM-BEGIN\n */\n if (tfBegin[name] === UNDE) {\n // Case: value of properties !== default value\n if (tfEnd[name] != tfDefault[name]) {\n // Case: name of property has fixed value -> inherit value from 'tfEnd'\n if ($.inArray(name, VA.propFixed) !== -1)\n tfBegin[name] = tfEnd[name];\n else\n tfBegin[name] = tfDefault[name];\n }\n else {\n delete tfEnd[name];\n }\n }\n /**\n * REMOVE PROPERTIES ON TRANSFORM BEGIN - END SIMILAR TO DEFAULT PROPERTIES\n */\n if (tfBegin[name] == tfDefault[name] && tfEnd[name] == tfDefault[name]) {\n delete tfBegin[name];\n delete tfEnd[name];\n }\n }\n an.optsEnd.tfBegin = tfBegin;\n an.optsEnd.tfEnd = tfEnd;\n }\n /**\n * SETUP VALUE WHEN BEGIN ANIMATION\n */\n function Start() {\n /**\n * INSERT STYLE 'OVERFLOW' AT FIRST: FIXED FOR OLD BROWSER\n */\n var style = $anim.attr('style');\n isOverflowOnNode = style && style.indexOf('overflow') !== -1;\n // Unavailable\n // !isOverflowOnNode && $anim.css('overflow', 'hidden');\n /**\n * EXECUTE FUNCTION 'START' AT FIRST\n */\n !!an.optsEnd.start && an.optsEnd.start();\n }\n /**\n * SETUP NEXT VALUE OF OBJECT, CALL FUNCTION FROM 'TWEEN'\n * @param boolean isForceAnim Allways setup style for object\n */\n that.next = function (isForceAnim) {\n /**\n * SETUP CURRENT TIME\n * @param Int an.xCur Current time, in range [0, 1]\n * @param Boolean isAnimate Check setup current animation\n */\n var opts = myData.opts, isAnimate = false, isComplete = false, tCur = myData.tCur = VA.tsCur - myData.tsInit;\n for (var i = 0, len = opts.length; i < len; i++) {\n var optsCur = opts[i];\n // Case: tCur at the forward position the first Aniamtion\n if (tCur < optsCur.tPlay && i == 0) {\n // Case: allways setup Style of object\n if (isForceAnim) {\n an.optsPos = i;\n an.xCur = 0;\n }\n else\n an.xCur = null;\n break;\n }\n else if (tCur > optsCur.tEnd && i == len - 1) {\n an.optsPos = i;\n an.xCur = 1;\n isComplete = true;\n break;\n }\n else if (optsCur.tPlay <= tCur && tCur <= optsCur.tEnd) {\n an.optsPos = i;\n an.xCur = $.GSGDEasing[optsCur.easing](null, tCur - optsCur.tPlay, 0, 1, optsCur.duration);\n isAnimate = true;\n break;\n }\n else if (!!opts[i + 1] && optsCur.tEnd < tCur && tCur < opts[i + 1].tPlay) {\n an.optsPos = i;\n an.xCur = 1;\n break;\n }\n }\n /**\n * SETUP VALUE OF CURRENT STYLE ON OBJECT\n */\n if (an.xCur !== null && opts.length) {\n // First, reset size of Item\n GetSizeItem();\n // Reset variable 'styleCur'\n styleCur = {};\n // Setup current Style value of the object\n StyleNormalCur();\n StyleTransformCur();\n $anim.css(styleCur);\n }\n /**\n * EXECUTE OPTION 'COMPLETE'\n */\n if (isComplete) {\n var optsCur = opts[an.optsPos];\n !!optsCur.complete && optsCur.complete();\n }\n /**\n * Return value check have Animation\n */\n return isAnimate;\n };\n /**\n * CONVERT VALUE HAS OTHER UNIT TO 'PX'\n * + Support convert '%' to 'px'\n */\n function ConvertValue(name, valueCur) {\n /*\n * CASE: STRING\n */\n if (typeof valueCur == 'string') {\n /**\n * CASE: UNIT IS 'PX'\n */\n if (/px$/.test(valueCur)) {\n valueCur = parseFloat(valueCur);\n }\n else if (/\\%$/.test(valueCur)) {\n // Name of property exist in conversion system\n var nameSizeFn = VA.percentRef[name];\n if (nameSizeFn !== UNDE) {\n var sizeCur = an['size'][nameSizeFn];\n valueCur = sizeCur * parseFloat(valueCur) / 100;\n }\n }\n }\n /**\n * RETURN VALUE AFTER SETUP\n */\n return valueCur;\n }\n /**\n * GET SIZE OF ITEM IN CURRENT TIME\n */\n function GetSizeItem() {\n an.size = {\n 'OuterWidth': M.OuterWidth($anim),\n 'OuterHeight': M.OuterHeight($anim)\n };\n }\n /**\n * SETUP VALUE PLUS DEPENDS ON PROPERTY NAME\n */\n function ValueCurForNumber(name, valueBegin, valueEnd) {\n var nameToFloat = ['opacity'], plus = (valueEnd - valueBegin) * an.xCur;\n // Case: rounded number float\n if ($.inArray(name, nameToFloat) !== -1) {\n plus = Math.round(plus * 1000) / 1000;\n }\n else {\n /**\n * ADDITIONAL 1 FRACTION : ANIMATE SMOOTHER\n */\n plus = Math.round(plus * 10) / 10;\n }\n return valueBegin + plus;\n }\n /**\n * SETUP VALUE OF PROPERTY IS ARRAY[]\n */\n function ValueCurForArray(name, valueBegin, valueEnd) {\n var aValue = [];\n /**\n * SETUP EACH VALUE IN ARRAY[]\n * + Remove element >= 2 : Browser not support Transform 3D\n */\n for (var i = 0, len = valueEnd.length; i < len && !(i >= 2 && !VA.isTf3D); i++) {\n /**\n * CONVERT VALUE BEGIN - END\n */\n var vaEndCur = ConvertValue(name + i, valueEnd[i]), vaBeginCur = ConvertValue(name + i, valueBegin[i]);\n // Case: value 'begin' not exist\n if (vaBeginCur === UNDE)\n vaBeginCur = vaEndCur;\n /**\n * SETUP CURRENT VALUE + STORE IN ARRAY[]\n */\n var plus = (vaEndCur - vaBeginCur) * an.xCur, valueCur = Math.round((vaBeginCur + plus) * 10) / 10;\n aValue.push(valueCur + 'px');\n }\n /**\n * CONVERT ARRAY TO STRING\n */\n return aValue.join(' ');\n }\n /**\n * SETUP NORMAL PROPERTIES AT THE CURRENT TIME\n */\n function StyleNormalCur() {\n var optsCur = myData['opts'][an.optsPos];\n for (var name in optsCur['styleBegin']) {\n var valueBegin = optsCur['styleBegin'][name], valueEnd = optsCur['styleEnd'][name], valueCur;\n /**\n * CASE: PROPERTY HAS VALUE IS ARRAY[]\n */\n if ($.isArray(valueBegin)) {\n valueCur = ValueCurForArray(name, valueBegin, valueEnd);\n }\n else {\n // Convert value String to Number (if posible)\n valueBegin = ConvertValue(name, valueBegin);\n valueEnd = ConvertValue(name, valueEnd);\n // Case: value of property is Number\n if ($.isNumeric(valueBegin) && $.isNumeric(valueEnd)) {\n valueCur = ValueCurForNumber(name, valueBegin, valueEnd);\n }\n else {\n valueCur = valueBegin;\n }\n }\n /**\n * REMOVE STYLES HAVE DEFAULT VALUE\n */\n if (optsCur.isClearStyleDefault && VA['styleDefault'][name] === valueCur) {\n valueCur = '';\n }\n /**\n * STORE VALUE OF CURRENT PROPERTY\n */\n styleCur[name] = valueCur;\n }\n }\n /**\n * SETUP 'TRANSFORM' IN CURRENT TIME\n */\n function StyleTransformCur() {\n /**\n * SETUP CURRENT VALUE EACH TRANSFORM PROPERTIES\n */\n var optsCur = myData['opts'][an.optsPos], tfBegin = optsCur.tfBegin, tfEnd = optsCur.tfEnd, tfCur = {};\n for (var name in tfEnd) {\n // Setup value 'plus' of each properties\n var tfBeginCur = TF.ConvertValueToPX($anim, name, tfBegin[name]), tfEndCur = TF.ConvertValueToPX($anim, name, tfEnd[name]), valuePlus = (tfEndCur - tfBeginCur) * an.xCur, valueCur = tfBeginCur + valuePlus;\n // Value of current property\n tfCur[name] = valueCur;\n }\n /**\n * CONVERT PARTICULAR PROPERTY OF TRANSFORM TO CSS\n */\n var cssTf = TF.ToCss(tfCur, optsCur);\n /**\n * STORE CURRENT TRANSFORM CSS\n */\n var nameTf = VA.prefix + 'transform';\n styleCur[nameTf] = cssTf;\n // Store current Transform into system\n myData.tfCur = tfCur;\n }\n // Initialize Animation\n Init();\n }", "function animate() {\n\tconsole.log(\"Animate blev kaldt\");\n\n\t// Get the #box element\n\tvar $box = $(\"#box\");\n\n\t// Toggle the class\n\t$box.toggleClass(\"animated wobble\");\n}", "function ws_basic(c,a,b){this.go=function(d){b.find(\"ul\").stop(true).animate({left:(d?-d+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},c.duration,\"easeInOutExpo\");return d}}", "function ws_blinds(m,l,a){var g=jQuery;var k=g(this);var c=m.parts||3;var j=g(\".ws_list\",a);var h=g(\"<div>\").addClass(\"ws_effect ws_blinds\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,\"z-index\":8}).hide().appendTo(a);var d=g(\"<div>\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"}).appendTo(h);var e=[];var b=document.addEventListener;for(var f=0;f<c;f++){e[f]=g(\"<div>\").css({position:b?\"relative\":\"absolute\",display:b?\"inline-block\":\"block\",height:\"100%\",width:(100/c+0.001).toFixed(3)+\"%\",border:\"none\",margin:0,overflow:\"hidden\",top:0,left:b?0:((100*f/c).toFixed(3)+\"%\")}).appendTo(h)}this.go=function(r,p,o){if(o==undefined){o=p>r?1:0}h.find(\"img\").stop(true,true);h.show();var s=g(l[p]);var t={width:s.width()||m.width,height:s.height()||m.height};var u=s.clone().css(t).appendTo(d);u.from={left:0};u.to={left:(!o?1:-1)*u.width()*0.5};if(m.support.transform){u.from={translate:[u.from.left,0,0]};u.to={translate:[u.to.left,0,0]}}j.hide();wowAnimate(u,u.from,u.to,m.duration,m.duration*0.1,\"swing\");for(var q=0;q<e.length;q++){var n=e[q];var v=g(l[r]).clone().css({position:\"absolute\",top:0}).css(t).appendTo(n);v.from={left:(!o?-1:1)*v.width()-n.position().left};v.to={left:-n.position().left};if(m.support.transform){v.from={translate:[v.from.left,0,0]};v.to={translate:[v.to.left,0,0]}}wowAnimate(v,v.from,v.to,(m.duration/(e.length+1))*(o?(e.length-q+1):(q+2)),\"swing\",((!o&&q==e.length-1||o&&!q)?function(){k.trigger(\"effectEnd\");h.hide().find(\"img\").remove();u.remove()}:false))}}}", "animation() {}", "function ws_blast(q,j,m){var e=jQuery;var i=e(this);var f=m.find(\".ws_list\");var a=q.distance||1;var g=e(\"<div>\").addClass(\"ws_effect ws_blast\");var c=e(\"<div>\").addClass(\"ws_zoom\").appendTo(g);var k=e(\"<div>\").addClass(\"ws_parts\").appendTo(g);m.css({overflow:\"visible\"}).append(g);g.css({position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",\"z-index\":8});var d=q.cols;var p=q.rows;var l=[];var b=[];function h(u,r,s,t){if(q.support.transform&&q.support.transition){if(typeof r.left===\"number\"||typeof r.top===\"number\"){r.transform=\"translate3d(\"+(typeof r.left===\"number\"?r.left:0)+\"px,\"+(typeof r.top===\"number\"?r.top:0)+\"px,0)\"}delete r.left;delete r.top;if(s){r.transition=\"all \"+s+\"ms ease-in-out\"}else{r.transition=\"\"}u.css(r);if(t){u.on(\"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd\",function(){t();u.off(\"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd\")})}}else{delete r.transfrom;delete r.transition;if(s){u.animate(r,{queue:false,duration:q.duration,complete:t?t:0})}else{u.stop(1).css(r)}}}function n(r){var w=Math.max((q.width||g.width())/(q.height||g.height())||3,3);d=d||Math.round(w<1?3:3*w);p=p||Math.round(w<1?3/w:3);for(var u=0;u<d*p;u++){var v=u%d;var t=Math.floor(u/d);e([b[u]=document.createElement(\"div\"),l[u]=document.createElement(\"div\")]).css({position:\"absolute\",overflow:\"hidden\"}).appendTo(k).append(e(\"<img>\").css({position:\"absolute\"}))}l=e(l);b=e(b);o(l,r);o(b,r,true);var s={position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"};c.css(s).append(e(\"<img>\").css(s))}function o(t,u,s,r,w,z){var v=g.width();var x=g.height();var y={left:e(window).scrollLeft(),top:e(window).scrollTop(),width:e(window).width(),height:e(window).height()};e(t).each(function(F){var E=F%d;var C=Math.floor(F/d);if(s){var I=a*v*(2*Math.random()-1)+v/2;var G=a*x*(2*Math.random()-1)+x/2;var H=g.offset();H.left+=I;H.top+=G;if(H.left<y.left){I-=H.left+y.left}if(H.top<y.top){G-=H.top+y.top}var D=(y.left+y.width)-H.left-v/d;if(0>D){I+=D}var B=(y.top+y.height)-H.top-x/p;if(0>B){G+=B}}else{var I=v*E/d;var G=x*C/p}e(this).find(\"img\").css({left:-(v*E/d)+u.marginLeft,top:-(x*C/p)+u.marginTop,width:u.width,height:u.height});var A={left:I,top:G,width:v/d,height:x/p};if(w){e.extend(A,w)}if(r){h(e(this),A,q.duration,(F===0&&z)?z:0)}else{h(e(this),A)}})}this.go=function(s,u){var v=e(j[u]),r={width:v.width(),height:v.height(),marginTop:parseFloat(v.css(\"marginTop\")),marginLeft:parseFloat(v.css(\"marginLeft\"))};if(!l.length){n(r)}l.find(\"img\").attr(\"src\",j.get(u).src);h(l,{opacity:1,zIndex:3});b.find(\"img\").attr(\"src\",j.get(s).src);h(b,{opacity:0,zIndex:2});c.find(\"img\").attr(\"src\",j.get(u).src);h(c.find(\"img\"),{transform:\"scale(1)\"});g.show();f.hide();o(b,r,false,true,{opacity:1});o(l,r,true,true,{opacity:0},function(){i.trigger(\"effectEnd\");g.hide()});h(c.find(\"img\"),{transform:\"scale(2)\"},q.duration,0);var t=b;b=l;l=t}}", "function ws_blast(q,j,m){var e=jQuery;var i=e(this);var f=m.find(\".ws_list\");var a=q.distance||1;var g=e(\"<div>\").addClass(\"ws_effect ws_blast\");var c=e(\"<div>\").addClass(\"ws_zoom\").appendTo(g);var k=e(\"<div>\").addClass(\"ws_parts\").appendTo(g);m.css({overflow:\"visible\"}).append(g);g.css({position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",\"z-index\":8});var d=q.cols;var p=q.rows;var l=[];var b=[];function h(u,r,s,t){if(q.support.transform&&q.support.transition){if(typeof r.left===\"number\"||typeof r.top===\"number\"){r.transform=\"translate3d(\"+(typeof r.left===\"number\"?r.left:0)+\"px,\"+(typeof r.top===\"number\"?r.top:0)+\"px,0)\"}delete r.left;delete r.top;if(s){r.transition=\"all \"+s+\"ms ease-in-out\"}else{r.transition=\"\"}u.css(r);if(t){u.on(\"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd\",function(){t();u.off(\"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd\")})}}else{delete r.transfrom;delete r.transition;if(s){u.animate(r,{queue:false,duration:q.duration,complete:t?t:0})}else{u.stop(1).css(r)}}}function n(r){var w=Math.max((q.width||g.width())/(q.height||g.height())||3,3);d=d||Math.round(w<1?3:3*w);p=p||Math.round(w<1?3/w:3);for(var u=0;u<d*p;u++){var v=u%d;var t=Math.floor(u/d);e([b[u]=document.createElement(\"div\"),l[u]=document.createElement(\"div\")]).css({position:\"absolute\",overflow:\"hidden\"}).appendTo(k).append(e(\"<img>\").css({position:\"absolute\"}))}l=e(l);b=e(b);o(l,r);o(b,r,true);var s={position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"};c.css(s).append(e(\"<img>\").css(s))}function o(t,u,s,r,w,z){var v=g.width();var x=g.height();var y={left:e(window).scrollLeft(),top:e(window).scrollTop(),width:e(window).width(),height:e(window).height()};e(t).each(function(F){var E=F%d;var C=Math.floor(F/d);if(s){var I=a*v*(2*Math.random()-1)+v/2;var G=a*x*(2*Math.random()-1)+x/2;var H=g.offset();H.left+=I;H.top+=G;if(H.left<y.left){I-=H.left+y.left}if(H.top<y.top){G-=H.top+y.top}var D=(y.left+y.width)-H.left-v/d;if(0>D){I+=D}var B=(y.top+y.height)-H.top-x/p;if(0>B){G+=B}}else{var I=v*E/d;var G=x*C/p}e(this).find(\"img\").css({left:-(v*E/d)+u.marginLeft,top:-(x*C/p)+u.marginTop,width:u.width,height:u.height});var A={left:I,top:G,width:v/d,height:x/p};if(w){e.extend(A,w)}if(r){h(e(this),A,q.duration,(F===0&&z)?z:0)}else{h(e(this),A)}})}this.go=function(s,u){var v=e(j[u]),r={width:v.width(),height:v.height(),marginTop:parseFloat(v.css(\"marginTop\")),marginLeft:parseFloat(v.css(\"marginLeft\"))};if(!l.length){n(r)}l.find(\"img\").attr(\"src\",j.get(u).src);h(l,{opacity:1,zIndex:3});b.find(\"img\").attr(\"src\",j.get(s).src);h(b,{opacity:0,zIndex:2});c.find(\"img\").attr(\"src\",j.get(u).src);h(c.find(\"img\"),{transform:\"scale(1)\"});g.show();f.hide();o(b,r,false,true,{opacity:1});o(l,r,true,true,{opacity:0},function(){i.trigger(\"effectEnd\");g.hide()});h(c.find(\"img\"),{transform:\"scale(2)\"},q.duration,0);var t=b;b=l;l=t}}", "function mcImgSlider(i){\r\n\tfor(\r\n\t\tvar I=function(a)\r\n\t\t{\r\n\t\t\treturn document.getElementById(a)\r\n\t\t}\r\n\t\t,d=\"length\",Q=\"getElementsByTagName\",\r\n\t\tt=function(e)\r\n\t\t{\r\n\t\t\tvar a=e.childNodes,c=[];\r\n\t\t\tif(a)\r\n\t\t\t\tfor(var b=0,f=a[d];b<f;b++)\r\n\t\t\t\t\ta[b].nodeType==1&&c.push(a[b]);\r\n\t\t\t\treturn c\r\n\t\t}\r\n\t\t,g=\"className\",h=\"getAttribute\",y=\"opacity\",\r\n\t\tU=function(a,b)\r\n\t\t{\r\n\t\t\treturn a[Q](b)\r\n\t\t}\r\n\t\t,nb=function(a)\r\n\t\t{\r\n\t\t\tfor(var c,e,b=a[d];b;c=parseInt(Math.random()*b),e=a[--b],a[b]=a[c],a[c]=e);\r\n\t\t\treturn a\r\n\t\t},\r\n\t\tCb=function(a,c)\r\n\t\t{\r\n\t\t\tfor(var e,f,g,b=a[d];b;e=parseInt(Math.random()*b),f=a[--b],a[b]=a[e],a[e]=f,g=c[b],c[b]=c[e],c[e]=g);\r\n\t\t\treturn[a,c]\r\n\t\t},\r\n\t\tBb=function(a,c,b)\r\n\t\t{\r\n\t\t\tif(a.addEventListener)a.addEventListener(c,b,false);\r\n\t\t\telse a.attachEvent&&a.attachEvent(\"on\"+c,b)\r\n\t\t}\r\n\t\t,P=document,J=window.requestAnimationFrame,W=window.cancelAnimationFrame,db=[\"ms\",\"webkit\"],v=\"\",V=0;V<db[d];V++\r\n\t)\r\n\t\t\r\n\tif(window[db[V]+\"RequestAnimationFrame\"])\r\n\t{\r\n\t\tv=db[V];\r\n\t\tif(!J)\r\n\t\t{\r\n\t\t\tJ=window[v+\"RequestAnimationFrame\"];\r\n\t\t\tW=window[v+\"CancelAnimationFrame\"]\r\n\t\t}\t\r\n\t\tv=\"-\"+v+\"-\"\r\n\t}\r\n\r\n\tvar yb=function()\r\n\t{\r\n\t\tvar b=U(P,\"head\");\r\n\t\tif(b[d])\r\n\t\t{\r\n\t\t\tvar a=P.createElement(\"style\");\r\n\t\t\tb[0].appendChild(a);\r\n\t\t\treturn a.sheet?a.sheet:a.styleSheet\r\n\t\t}\r\n\t\telse \r\n\t\t\treturn 0\r\n\t}\r\n\t,sb=function()\r\n\t{\r\n\t\tvar a=yb();\r\n\t\tif(a)\r\n\t\t\tif(typeof a.insertRule!=\"undefined\")\r\n\t\t\t{\r\n\t\t\t\tvar b=\"@\"+v+\"keyframes jisSpinner {from{\"+v+\"transform:rotate(0deg\" +\t\t\t\t\t\t\");} to{\"+v+\"transform:rotate(360deg);}}\";\r\n\t\t\t\ta.insertRule(b,0);\r\n\t\t\t\tvar c=\"#\"+i.sliderId+\" .bgLayer{position:absolute;width:100%;height:100%;}\";\r\n\t\t\t\ta.insertRule(c,0);\r\n\t\t\t\tvar d=\"#\"+i.sliderId+\"::before {\"+v+\"animation:jisSpinner 0.6s linear infinite;transform:translate3d(0,0,0);content:'';position:absolute;left:50%;top:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;border-width:4px;border-color:black rgba(0, 0, 0, 0.8) rgba(255, 255, 255, 0.8) rgba(255, 255, 255, 0.8);border-style:solid;border-radius:50%;}\";\r\n\t\t\t\ta.insertRule(d,0)\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\ta.addRule(\"#\"+i.sliderId+\" .bgLayer\",\"position:absolute;width:100%;height:100%;\")\r\n\t};\r\n\tsb();\r\n\tvar c=\"style\",H=\"display\",Eb=\"visibility\",r=\"width\",q=\"height\",O=\"top\",B=\"background\",p=\"undefined\",Fb=\"marginLeft\",F=\"appendChild\",l=\"parentNode\",k=\"nodeName\",S=\"innerHTML\",cb=\"offsetWidth\",u=setTimeout,z=clearTimeout,w=\"indexOf\",N=\"setAttribute\",bb=\"removeChild\",\r\n\t\tL=function()\r\n\t\t{\r\n\t\t\tthis.d=[];\r\n\t\t\tthis.b=null\r\n\t\t}\r\n\t\t,zb=function()\r\n\t\t{\r\n\t\t\tvar b=50,a=navigator.userAgent,c;\r\n\t\t\tif((c=a[w](\"MSIE \"))!=-1)\r\n\t\t\t\tb=parseInt(a.substring(c+5,a[w](\".\",c)));\r\n\t\t\tif(a[w](\"Safari\")!=-1&&a[w](\"Chrome\")==-1)\r\n\t\t\t\tb=300;\r\n\t\t\tif(a[w](\"Opera\")!=-1)\r\n\t\t\t\tb=400;\r\n\t\t\treturn b\r\n\t\t},\r\n\t\tT=zb()<9,\r\n\t\tab=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),\r\n\t\tK=function(a,b)\r\n\t\t{\r\n\t\t\tif(a)\r\n\t\t\t{\r\n\t\t\t\ta.o=b;\r\n\t\t\t\tif(T)\r\n\t\t\t\t\ta[c].filter=\"alpha(opacity=\"+b*100+\")\";\r\n\t\t\t\telse \r\n\t\t\t\t\ta[c][y]=b\r\n\t\t\t}\r\n\t\t};\r\n\t\tL.a={\r\n\t\t\tf:function(a)\r\n\t\t\t{\r\n\t\t\t\treturn-Math.cos(a*Math.PI)/2+.5\r\n\t\t\t},\r\n\t\t\th:function(b,a)\r\n\t\t\t{\r\n\t\t\t\treturn Math.pow(b,a*2)\r\n\t\t\t},\r\n\t\t\tj:function(b,a)\r\n\t\t\t{\r\n\t\t\t\treturn 1-Math.pow(1-b,a*2)\r\n\t\t\t}\r\n\t\t};\r\n\t\tL.prototype={\r\n\t\t\tk:{c:i.transitionTime,a:function(){},b:L.a.f,d:1},\r\n\t\t\tm:function(h,d,g,c)\r\n\t\t\t{\r\n\t\t\t\tfor(var b=[],i=g-d,j=g>d?1:-1,f=Math.ceil(60*c.c/1e3),a,e=1;e<=f;e++){\r\n\t\t\t\t\ta=d+c.b(e/f,c.d)*i;\r\n\t\t\t\t\tif(h!=y)\r\n\t\t\t\t\t\ta=Math.round(a);\r\n\t\t\t\t\tb.push(a)\r\n\t\t\t\t}\r\n\t\t\t\tb.e=0;\r\n\t\t\t\treturn b\r\n\t\t\t},\r\n\t\t\tn:function()\r\n\t\t\t{\r\n\t\t\t\tthis.b==null&&this.p()\r\n\t\t\t},\r\n\t\t\tp:function()\r\n\t\t\t{\r\n\t\t\t\tthis.q();\r\n\t\t\t\tvar a=this;\r\n\t\t\t\tthis.b=J?J(function(){a.p()}):window.setInterval(function(){a.q()},15)\r\n\t\t\t},\r\n\t\t\tq:function()\r\n\t\t\t{\r\n\t\t\t\tvar a=this.d[d];\r\n\t\t\t\tif(a)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor(var c=0;c<a;c++)\r\n\t\t\t\t\t\tthis.o(this.d[c]);\r\n\t\t\t\t\twhile(a--)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvar b=this.d[a];\r\n\t\t\t\t\t\tif(b.d.e==b.d[d])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tb.c();\r\n\t\t\t\t\t\t\tthis.d.splice(a,1)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tif(J&&W)\r\n\t\t\t\t\t\tW(this.b);\r\n\t\t\t\t\telse window.clearInterval(this.b);this.b=null\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\to:function(a)\r\n\t\t\t{\r\n\t\t\t\tif(a.d.e<a.d[d])\r\n\t\t\t\t{\r\n\t\t\t\t\tvar e=a.b,b=a.d[a.d.e];\r\n\t\t\t\t\tif(a.b==y)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(T)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\te=\"filter\";\r\n\t\t\t\t\t\t\tb=\"alpha(opacity=\"+Math.round(b*100)+\")\"\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\tb+=\"px\";\r\n\t\t\t\t\ta.a[c][e]=b;a.d.e++\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tr:function(e,b,d,f,a)\r\n\t\t\t{\r\n\t\t\t\ta=this.s(this.k,a);\r\n\t\t\t\tvar c=this.m(b,d,f,a);\r\n\t\t\t\tthis.d.push({a:e,b:b,d:c,c:a.a});\r\n\t\t\t\tthis.n()\r\n\t\t\t},\r\n\t\t\ts:function(c,b)\r\n\t\t\t{\r\n\t\t\t\tb=b||{};\r\n\t\t\t\tvar a,d={};\r\n\t\t\t\tfor(a in c)\r\n\t\t\t\t\td[a]=typeof b[a]!==p?b[a]:c[a];return d\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar G=new L,\r\n\t\t\tgb=function()\r\n\t\t\t{\r\n\t\t\t\tG.d=[];z(m);z(R);m=R=null\r\n\t\t\t},\r\n\t\t\txb=function(b)\r\n\t\t\t{\r\n\t\t\t\tvar a=[],c=b[d];\r\n\t\t\t\twhile(c--)\r\n\t\t\t\t\ta.push(String.fromCharCode(b[c]));\r\n\t\t\t\treturn a.join(\"\")\r\n\t\t\t},\r\n\t\t\tb={a:0,e:\"\",d:0,c:0,b:0}\r\n\t\t\t,a,f,o,s,D,A,m,R,x,M,X,e,E,j=null,\r\n\t\t\tvb=function()\r\n\t\t\t{\r\n\t\t\t\tthis[N](\"data-loaded\",\"t\")\r\n\t\t\t},\r\n\t\t\tib=function(b)\r\n\t\t\t{\r\n\t\t\t\tif(b==\"series1\")\r\n\t\t\t\t\ta.a=[13];\r\n\t\t\t\telse if(b==\"series2\")\r\n\t\t\t\t\ta.a=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17];\r\n\t\t\t\telse \r\n\t\t\t\t\ta.a=b.split(/\\W+/);\r\n\t\t\t\ta.a.p=i.effectRandom?-1:a.a[d]==1?0:1\r\n\t\t\t},\r\n\t\t\tY=function()\r\n\t\t\t{\r\n\t\t\t\ta={b:i.pauseTime,c:i.transitionTime,f:i.slices,g:i.boxes,d:i.license,h:i.hoverPause,i:i.autoAdvance,l:i.thumbnailsWrapperId,\r\n\t\t\t\t\t\tOb:function()\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttypeof beforeSlideChange!==p&&beforeSlideChange(arguments)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tOa:function()\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttypeof afterSlideChange!==p&&afterSlideChange(arguments)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\tif(f)\r\n\t\t\t\t\ta.m=Math.ceil(f.offsetHeight*a.g/f[cb]);\r\n\t\t\t\tib(i.effect);\r\n\t\t\t\ta.n=function()\r\n\t\t\t\t{\r\n\t\t\t\t\tvar b;\r\n\t\t\t\t\tif(a.a.p==-1)\r\n\t\t\t\t\t\tb=a.a[Math.floor(Math.random()*a.a[d])];\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tb=a.a[a.a.p];\r\n\t\t\t\t\t\ta.a.p++;\r\n\t\t\t\t\t\tif(a.a.p>=a.a[d])a.a.p=0\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(b<1||b>17)\r\n\t\t\t\t\t\tb=15;\r\n\t\t\t\t\treturn b\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tqb=[\"$1$2$3\",\"$1$2$3\",\"$1$24\",\"$1$23\",\"$1$22\"],\r\n\t\t\tkb=function()\r\n\t\t\t{\r\n\t\t\t\tif(b.b!=2)\r\n\t\t\t\t{\r\n\t\t\t\t\tb.b=1;z(m);m=null\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\thb=function()\r\n\t\t\t{\r\n\t\t\t\tif(b.b!=2)\r\n\t\t\t\t{\r\n\t\t\t\t\tb.b=0;\r\n\t\t\t\t\tif(m==null&&!b.c&&a.i)\r\n\t\t\t\t\t\tm=u(function(){j.y(j.n(b.a+1),0,1)},a.b/2)\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\trb=function()\r\n\t\t\t{\r\n\t\t\t\tvar a=0,b=0,c;\r\n\t\t\t\twhile(a<e.length)\r\n\t\t\t\t{\r\n\t\t\t\t\tc=e[a][g]==\"lazyImage\"||e[a][h](\"data-src\")||e[a][g][w](\" video\")>-1&&typeof McVideo!=p;\r\n\t\t\t\t\tif(c){\r\n\t\t\t\t\t\tb=1;\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\t}\r\n\t\t\t\t\t++a\r\n\t\t\t\t}\r\n\t\t\t\treturn b\r\n\t\t\t}\r\n\t\t\t,n=[]\r\n\t\t\t,jb=function(b)\r\n\t\t\t{\r\n\t\t\t\tvar a=n[d];\r\n\t\t\t\tif(a)\r\n\t\t\t\t\twhile(a--)\r\n\t\t\t\t\t\tn[a][g]=a!=b&&n[a].on==0?\"thumb\":\"thumb thumb-on\"},\r\n\t\t\t\t\t\tub=function(a)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\treturn a[l][h](\"data-autovideo\")==\"true\"||a[h](\"data-autovideo\")==\"true\"\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t,wb=function()\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvar f;\r\n\t\t\t\t\t\t\tif(a.l)\r\n\t\t\t\t\t\t\t\tf=I(a.l);\r\n\t\t\t\t\t\t\tif(f)\r\n\t\t\t\t\t\t\t\tfor(var h=U(f,\"*\"),e=0;e<h[d];e++)\r\n\t\t\t\t\t\t\t\t\th[e][g]==\"thumb\"&&n.push(h[e]);\r\n\t\t\t\t\t\t\tvar c=n[d];\r\n\t\t\t\t\t\t\tif(c)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\twhile(c--)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tn[c].on=0;n[c].i=c;\r\n\t\t\t\t\t\t\t\t\tn[c].onclick=function()\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tj.y(this.i,ub(this))\r\n\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\t\tif(!ab)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tn[c].onmouseover=function()\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tthis.on=1;\r\n\t\t\t\t\t\t\t\t\t\t\tthis[g]=\"thumb thumb-on\";\r\n\t\t\t\t\t\t\t\t\t\t\ta.h==2&&kb()\r\n\t\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\t\t\tn[c].onmouseout=function()\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tthis.on=0;\r\n\t\t\t\t\t\t\t\t\t\t\tthis[g]=this.i==b.a?\"thumb thumb-on\":\"thumb\";a.h==2&&hb()\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tjb(0)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn c\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\teb=function(a,e,g,c,b,d,f)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tu(function()\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(e&&g==e-1)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tvar f={};\r\n\t\t\t\t\t\t\t\t\t\tf.a=function()\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tj.o()\r\n\t\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\t\t\tfor(var h in a)\r\n\t\t\t\t\t\t\t\t\t\t\tf[h]=a[h]\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t\tf=a;\r\n\t\t\t\t\t\t\t\t\ttypeof b[r]!==p&&G.r(c,\"width\",b[r],d[r],a);\r\n\t\t\t\t\t\t\t\t\ttypeof b[q]!==p&&G.r(c,\"height\",b[q],d[q],a);\r\n\t\t\t\t\t\t\t\t\tG.r(c,y,b[y],d[y],f)\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t,f\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tlb=function(a)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tf=a;\r\n\t\t\t\t\t\t\tthis.Id=f.id;\r\n\t\t\t\t\t\t\tthis.c()\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tob=function(e,c)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfor(var b=[],a=0;a<e[d];a++)\r\n\t\t\t\t\t\t\t\tb[b[d]]=String.fromCharCode(e.charCodeAt(a)-(c?c:3));\r\n\t\t\t\t\t\t\treturn b.join(\"\")\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tpb=[/(?:.*\\.)?(\\w)([\\w\\-])[^.]*(\\w)\\.[^.]+$/,/.*([\\w\\-])\\.(\\w)(\\w)\\.[^.]+$/,/^(?:.*\\.)?(\\w)(\\w)\\.[^.]+$/,/.*([\\w\\-])([\\w\\-])\\.com\\.[^.]+$/,/^(\\w)[^.]*(\\w)$/],\r\n\t\t\t\t\t\tC=function(b)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvar a=P.createElement(\"div\");\r\n\t\t\t\t\t\t\ta[g]=b;\r\n\t\t\t\t\t\t\treturn a\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\ttb=function(b,c)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvar p=/\\/?(SOURCE|EMBED|OBJECT|\\/VIDEO|\\/AUDIO)/,g=t(f),a=g[d],i;\r\n\t\t\t\t\t\t\twhile(a--)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\ti=g[a];\r\n\t\t\t\t\t\t\t\t(i[k]==\"BR\"||T&&p.test(i[k]))&&f[bb](i)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tg=f.children;\r\n\t\t\t\t\t\t\tvar e=g[d];\r\n\t\t\t\t\t\t\tif(b==\"shuffle\")\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tvar h=[];\r\n\t\t\t\t\t\t\t\tfor(a=0,pos=e;a<pos;a++)\r\n\t\t\t\t\t\t\t\t\th[h.length]=g[a];\r\n\t\t\t\t\t\t\t\tif(c&&c[d]==e)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tvar o=c[0].parentNode,j=[];\r\n\t\t\t\t\t\t\t\t\tfor(a=0,pos=e;a<pos;a++)\r\n\t\t\t\t\t\t\t\t\t\tj[j.length]=c[a];\r\n\t\t\t\t\t\t\t\t\tvar l=Cb(h,j),m=l[0],n=l[1]\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\tm=nb(h);\r\n\t\t\t\t\t\t\t\tfor(a=0,pos=e;a<pos;a++)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tf.appendChild(m[a]);\r\n\t\t\t\t\t\t\t\t\tn&&o.appendChild(n[a])\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tb=0\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if(b==\"random\")\r\n\t\t\t\t\t\t\t\tb=Math.floor(Math.random()*e);\r\n\t\t\t\t\t\t\tif(b)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tb=b%e;\r\n\t\t\t\t\t\t\t\ta=0;\r\n\t\t\t\t\t\t\t\twhile(1)\r\n\t\t\t\t\t\t\t\t\tif(a++==b)\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\t\tf.appendChild(f.children[0]);\r\n\t\t\t\t\t\t\t\t\t\tc&&c[0].parentNode.appendChild(c[0])\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn f.children\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tlb.prototype={\r\n\t\t\t\t\t\t\tc:function()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(x)\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\to=f[cb];\r\n\t\t\t\t\t\t\t\ts=f.offsetHeight;\r\n\t\t\t\t\t\t\t\tvar r=t(f),G=r[d];\r\n\t\t\t\t\t\t\t\tif(a.l){\r\n\t\t\t\t\t\t\t\t\tvar p=I(a.l);\r\n\t\t\t\t\t\t\t\t\tp=p?p.children:0\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tr=tb(i.startSlide,p);\r\n\t\t\t\t\t\t\t\tthis.M(a.d);\r\n\t\t\t\t\t\t\t\tvar j,n;\r\n\t\t\t\t\t\t\t\te=[];\r\n\t\t\t\t\t\t\t\twhile(G--)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tj=r[G];\r\n\t\t\t\t\t\t\t\t\tn=0;\r\n\t\t\t\t\t\t\t\t\tj[c][H]=\"none\";\r\n\t\t\t\t\t\t\t\t\tif(j[k]==\"VIDEO\"||j[k]==\"AUDIO\")\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tj[c].position=\"absolute\";\r\n\t\t\t\t\t\t\t\t\t\tn=C(\"video\");\r\n\t\t\t\t\t\t\t\t\t\tj[l].insertBefore(n,j);\r\n\t\t\t\t\t\t\t\t\t\tn[F](j);\r\n\t\t\t\t\t\t\t\t\t\tn[c][H]=\"none\"\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(j[k]==\"A\"&&j[g][w](\"lazyImage\")==-1)\r\n\t\t\t\t\t\t\t\t\t\tif(j[g])\r\n\t\t\t\t\t\t\t\t\t\t\tj[g]=\"imgLink \"+j[g];\r\n\t\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t\t\tj[g]=\"imgLink\";\r\n\t\t\t\t\t\t\t\t\tif(n)\r\n\t\t\t\t\t\t\t\t\t\te.push(n);\r\n\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t\te.push(j);\r\n\t\t\t\t\t\t\t\t\tif(j[g][w](\" video\")!=-1)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tthis.A(j);\r\n\t\t\t\t\t\t\t\t\t\tthis.b(j)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\te.reverse();\r\n\t\t\t\t\t\t\t\tb.d=e[d];\r\n\t\t\t\t\t\t\t\ta.m=Math.ceil(s*a.g/o);\r\n\t\t\t\t\t\t\t\tE=C(\"sliderInner\");\r\n\t\t\t\t\t\t\t\tf[F](E);\r\n\t\t\t\t\t\t\t\tA=C(\"mc-caption\");\r\n\t\t\t\t\t\t\t\tf[F](A);\r\n\t\t\t\t\t\t\t\tA[c].transition=\"opacity \"+a.c+\"ms\";\r\n\t\t\t\t\t\t\t\tvar v=this.v();\r\n\t\t\t\t\t\t\t\tif(e[b.a][k]==\"IMG\")\r\n\t\t\t\t\t\t\t\t\tb.e=e[b.a];\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\tb.e=U(e[b.a],\"img\")[0];\r\n\t\t\t\t\t\t\t\tif(e[b.a][k]==\"A\"||e[b.a][g]==\"video\")\r\n\t\t\t\t\t\t\t\t\te[b.a][c][H]=\"block\";\r\n\t\t\t\t\t\t\t\tM[c][B]='url(\"'+b.e[h](\"src\")+'\") no-repeat';\r\n\t\t\t\t\t\t\t\tif(typeof getComputedStyle!=\"undefined\")\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tvar y=getComputedStyle(f,null).borderRadius;\r\n\t\t\t\t\t\t\t\t\tif(y)M[c].borderRadius=y\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tD=this.k();\r\n\t\t\t\t\t\t\t\tthis.m();\r\n\t\t\t\t\t\t\t\tvar q=b.e[l],z;\r\n\t\t\t\t\t\t\t\tif(z=q.aP)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tthis.d(q);\r\n\t\t\t\t\t\t\t\t\tif(z===1)\r\n\t\t\t\t\t\t\t\t\t\tq.aP=0\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(a.i&&b.d>1){\r\n\t\t\t\t\t\t\t\t\tu(function(){v.e(1)},0);\r\n\t\t\t\t\t\t\t\t\tm=u(function(){v.y(v.n(1),0,1)},a.b+a.c)\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(a.h!=0&&!ab)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tf.onmouseover=kb;f.onmouseout=hb\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tb:function(a){\r\n\t\t\t\t\t\t\t\tif(typeof McVideo!=p){\r\n\t\t\t\t\t\t\t\t\ta.onclick=function(){\r\n\t\t\t\t\t\t\t\t\t\treturn this.aP?false:j.d(this)\r\n\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\t\tMcVideo.register(a,this)\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tA:function(a){\r\n\t\t\t\t\t\t\t\tif(typeof a.aP===p){\r\n\t\t\t\t\t\t\t\t\tvar b=a[h](\"data-autovideo\");\r\n\t\t\t\t\t\t\t\t\tif(b==\"true\")\r\n\t\t\t\t\t\t\t\t\t\ta.aP=true;\r\n\t\t\t\t\t\t\t\t\telse if(b==\"1\")\r\n\t\t\t\t\t\t\t\t\t\ta.aP=1;\r\n\t\t\t\t\t\t\t\t\telse a.aP=0\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\td:function(c){\r\n\t\t\t\t\t\t\t\tz(m);\r\n\t\t\t\t\t\t\t\tm=null;\r\n\t\t\t\t\t\t\t\tvar a=McVideo.play(c,o,s,this.Id);\r\n\t\t\t\t\t\t\t\tif(a||ab)b.b=2;\r\n\t\t\t\t\t\t\t\treturn false\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tf:function(){\r\n\t\t\t\t\t\t\t\tx=C(\"navBulletsWrapper\");\r\n\t\t\t\t\t\t\t\tfor(var e=[],a=0;a<b.d;a++)\r\n\t\t\t\t\t\t\t\t\te.push(\"<div rel='\"+a+\"'>\"+(a+1)+\"</div>\");\r\n\t\t\t\t\t\t\t\tx[S]=e.join(\"\");\r\n\t\t\t\t\t\t\t\tfor(var c=t(x),a=0;a<c[d];a++)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(a==b.a)\r\n\t\t\t\t\t\t\t\t\t\tc[a][g]=\"active\";\r\n\t\t\t\t\t\t\t\t\tc[a].onclick=function(){\r\n\t\t\t\t\t\t\t\t\t\tj.y(parseInt(this[h](\"rel\")),1)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tf[F](x);\r\n\t\t\t\t\t\t\t\tM=C(\"bgLayer\");\r\n\t\t\t\t\t\t\t\tf.insertBefore(M,f.firstChild)\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tg:function(){\r\n\t\t\t\t\t\t\t\tvar d=t(x),a=b.d;\r\n\t\t\t\t\t\t\t\twhile(a--)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(a==b.a)\r\n\t\t\t\t\t\t\t\t\t\td[a][g]=\"active\";\r\n\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t\td[a][g]=\"\";\r\n\t\t\t\t\t\t\t\t\tif(e[a][k]==\"A\"||e[a][g]==\"video\")\r\n\t\t\t\t\t\t\t\t\t\te[a][c][H]=a==b.a?\"block\":\"none\"\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tk:function(){\r\n\t\t\t\t\t\t\t\tvar a=b.e[h](\"alt\")||\"\";\r\n\t\t\t\t\t\t\t\tif(a&&a.substr(0,1)==\"#\"){\r\n\t\t\t\t\t\t\t\t\tvar c=I(a.substring(1));\r\n\t\t\t\t\t\t\t\t\ta=c?c[S]:\"\"\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\treturn a\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tl:function(){\r\n\t\t\t\t\t\t\t\tK(A,0)\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tm:function(){\r\n\t\t\t\t\t\t\t\tA[S]=D;\r\n\t\t\t\t\t\t\t\tA[c][Eb]=D?\"visible\":\"hidden\";\r\n\t\t\t\t\t\t\t\tD&&K(A,1)\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\ta:function(a){\r\n\t\t\t\t\t\t\t\treturn a.replace(/(?:.*\\.)?(\\w)([\\w\\-])?[^.]*(\\w)\\.[^.]*$/,\"$1$3$2\")\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\to:function(){\r\n\t\t\t\t\t\t\t\tb.c=0;z(m);\r\n\t\t\t\t\t\t\t\tm=null;\r\n\t\t\t\t\t\t\t\tM[c][B]='url(\"'+b.e[h](\"src\")+'\") no-repeat';\r\n\t\t\t\t\t\t\t\tvar i=this,d=b.e[l];\r\n\t\t\t\t\t\t\t\tif(typeof d.aP===p)\r\n\t\t\t\t\t\t\t\t\td=0;\r\n\t\t\t\t\t\t\t\tvar f;\r\n\t\t\t\t\t\t\t\tif(d&&(f=d.aP||X&&/video$/.test(d[g]))){\r\n\t\t\t\t\t\t\t\t\tthis.d(d);\r\n\t\t\t\t\t\t\t\t\tif(f===1)\r\n\t\t\t\t\t\t\t\t\t\td.aP=0\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(!b.b&&a.i){\r\n\t\t\t\t\t\t\t\t\tvar e=this.n(b.a+1);\r\n\t\t\t\t\t\t\t\t\tthis.e(e);\r\n\t\t\t\t\t\t\t\t\tm=u(function(){i.y(e,0,1)},a.b)\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\ta.Oa.call(this,b.a,b.e)\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\te:function(j){\r\n\t\t\t\t\t\t\t\tvar a=e[j],m=0;\r\n\t\t\t\t\t\t\t\tif(a[k]==\"A\"&&a[g][w](\"lazyImage\")==-1||a[k]==\"DIV\"&&a[g]==\"video\")\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\ta=t(a)[0];\r\n\t\t\t\t\t\t\t\t\tm=1\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(a[k]!=\"IMG\"){\r\n\t\t\t\t\t\t\t\t\tif(a[k]==\"A\")\r\n\t\t\t\t\t\t\t\t\t\tvar d=a[h](\"href\"),f=a[h](\"title\")||\"\",i=1;\r\n\t\t\t\t\t\t\t\t\telse if(a[k]==\"VIDEO\"||a[k]==\"AUDIO\")\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tvar n=1;\r\n\t\t\t\t\t\t\t\t\t\td=a[h](\"data-image\");\r\n\t\t\t\t\t\t\t\t\t\tif(d)\r\n\t\t\t\t\t\t\t\t\t\t\tf=a[h](\"data-alt\")||\"\";\r\n\t\t\t\t\t\t\t\t\t\ta[h](\"data-autovideo\")&&a[l][N](\"data-autovideo\",a[h](\"data-autovideo\"));\r\n\t\t\t\t\t\t\t\t\t\tthis.A(a[l]);\r\n\t\t\t\t\t\t\t\t\t\ti=0\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\t\td=a[h](\"data-src\");\r\n\t\t\t\t\t\t\t\t\t\tif(d)\r\n\t\t\t\t\t\t\t\t\t\t\tf=a[h](\"data-alt\")||\"\";\r\n\t\t\t\t\t\t\t\t\t\ti=!m\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(f!=null){\r\n\t\t\t\t\t\t\t\t\t\tvar b=P.createElement(\"img\");\r\n\t\t\t\t\t\t\t\t\t\tb[N](\"data-loaded\",\"f\");\r\n\t\t\t\t\t\t\t\t\t\tb[N](\"alt\",f);\r\n\t\t\t\t\t\t\t\t\t\tb.onload=b.onerror=vb;\r\n\t\t\t\t\t\t\t\t\t\tb[N](\"src\",d);\r\n\t\t\t\t\t\t\t\t\t\tb[c][H]=\"none\";\r\n\t\t\t\t\t\t\t\t\t\tif(n){\r\n\t\t\t\t\t\t\t\t\t\t\ta[l].insertBefore(b,a);\r\n\t\t\t\t\t\t\t\t\t\t\tthis.b(a[l],this);\r\n\t\t\t\t\t\t\t\t\t\t\tif(T){\r\n\t\t\t\t\t\t\t\t\t\t\t\ta[l][c][B]=\"none\";\r\n\t\t\t\t\t\t\t\t\t\t\t\ta[l][c].cursor=\"default\"\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t\t\ta[l].replaceChild(b,a);\r\n\t\t\t\t\t\t\t\t\t\tif(i)e[j]=b\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tp:function(f){\r\n\t\t\t\t\t\t\t\tif(e[b.a][k]==\"IMG\")\r\n\t\t\t\t\t\t\t\t\tb.e=e[b.a];\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\tb.e=U(e[b.a],\"img\")[0];\r\n\t\t\t\t\t\t\t\tvar g=b.e[h](\"data-loaded\");\r\n\t\t\t\t\t\t\t\tif(g==\"f\"){\r\n\t\t\t\t\t\t\t\t\tu(function(){j.p(f)},200);\r\n\t\t\t\t\t\t\t\t\treturn\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tb.c=1;\r\n\t\t\t\t\t\t\t\tthis.g();z(R);\r\n\t\t\t\t\t\t\t\tD=this.k();\r\n\t\t\t\t\t\t\t\tthis.l();\r\n\t\t\t\t\t\t\t\tR=u(function(){j.m()},a.c/2);\r\n\t\t\t\t\t\t\t\tE[S]=\"\";\r\n\t\t\t\t\t\t\t\tvar c=f?f:a.n();\r\n\t\t\t\t\t\t\t\ta.Ob.apply(this,[b.a,b.e,D,c]);\r\n\t\t\t\t\t\t\t\tjb(b.a);\r\n\t\t\t\t\t\t\t\tvar d=c<14?this.w(c):this.x();\r\n\t\t\t\t\t\t\t\tif(c<9||c==15){\r\n\t\t\t\t\t\t\t\t\tif(c%2)d=d.reverse()\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(c<14)\r\n\t\t\t\t\t\t\t\t\td=d[0];\r\n\t\t\t\t\t\t\t\tif(c<9)\r\n\t\t\t\t\t\t\t\t\tthis.q(d,c);\r\n\t\t\t\t\t\t\t\telse if(c<13)\r\n\t\t\t\t\t\t\t\t\tthis.r(d,c);\r\n\t\t\t\t\t\t\t\telse if(c==13)\r\n\t\t\t\t\t\t\t\t\tthis.s(d);\r\n\t\t\t\t\t\t\t\telse if(c<16)\r\n\t\t\t\t\t\t\t\t\tthis.t(d,c);\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\tthis.u(d,c)\t\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tq:function(b,e){\r\n\t\t\t\t\t\t\t\tfor(var f=0,g=e<7?{height:0,opacity:-.4}:{width:0,opacity:0},i={height:s,opacity:1},a=0,h=b[d];a<h;a++)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(e<3)\r\n\t\t\t\t\t\t\t\t\t\tb[a][c].bottom=\"0\";\r\n\t\t\t\t\t\t\t\t\telse if(e<5)\r\n\t\t\t\t\t\t\t\t\t\tb[a][c][O]=\"0\";\r\n\t\t\t\t\t\t\t\t\telse if(e<7){\r\n\t\t\t\t\t\t\t\t\t\tb[a][c][a%2?\"bottom\":\"top\"]=\"0\";\r\n\t\t\t\t\t\t\t\t\t\tg[y]=-.2\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\t\ti={width:b[a][cb],opacity:1};\r\n\t\t\t\t\t\t\t\t\t\tb[a][c][r]=b[a][c][O]=\"0\";\r\n\t\t\t\t\t\t\t\t\t\tb[a][c][q]=s+\"px\"\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\teb({},h,a,b[a],g,i,f);\r\n\t\t\t\t\t\t\t\t\tf+=50\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tM:function(a){\r\n\t\t\t\t\t\t\t\tvar b=this.a(document.domain.replace(\"www.\",\"\"));\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\t(function(a,c){\r\n\t\t\t\t\t\t\t\t\t\tvar e=\"%66%75%6E%%66%75%6E%63%74%69%6F%6E%20%65%28%b)*<g/dbmm)uijt-2*<h)1*<h)2*<jg)n>K)o-p**|wbs!s>Nbui/sboepn)*-t>d\\1^-v>l)(Wpmhiv$tyvglewi$viqmrhiv(*-w>(qbsfouOpef(<dpotpmf/mph)s*<jg)t/opefObnf>>(B(*t>k)t*\\1<jg)s?/9*t/tfuBuusjcvuf)(bmu(-v*<fmtf!jg)s?/8*|wbsr>epdvnfou/dsfbufUfyuOpef)v*-G>mwr5<jg)s?/86*G>Gw/jotfsuCfgpsf)r-G*sfuvso!uijt<69%6F%6E%<jg)s?/9*t/tfuBuusjcvuf)(bmupdvnf%$ou/dsfbufUfy\",\r\n\t\t\t\t\t\t\t\t\t\tb=ob(e,a[d]+parseInt(a.charAt(1))).substr(0,3);\r\n\t\t\t\t\t\t\t\t\t\ttypeof this[b]===\"function\"&&this[b](c,pb,qb)\r\n\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t(b,a)\r\n\t\t\t\t\t\t\t\t}catch(c){}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tr:function(d,b)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\td[c][r]=b<11?\"0px\":o+\"px\";\r\n\t\t\t\t\t\t\t\td[c][q]=b<11?s+\"px\":\"0px\";\r\n\t\t\t\t\t\t\t\tK(d,1);\r\n\t\t\t\t\t\t\t\tif(b<11)d[c][O]=\"0\";\r\n\t\t\t\t\t\t\t\tif(b==9){\r\n\t\t\t\t\t\t\t\t\td[c].left=\"auto\";\r\n\t\t\t\t\t\t\t\t\td[c].right=\"0px\"\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(b>10)\r\n\t\t\t\t\t\t\t\t\td[c][b==11?\"bottom\":\"top\"]=\"0\";\r\n\t\t\t\t\t\t\t\tif(b<11)\r\n\t\t\t\t\t\t\t\t\tvar e=0,f=o;\r\n\t\t\t\t\t\t\t\telse{e=0;f=s}\r\n\t\t\t\t\t\t\t\tvar g={b:L.a.j,c:a.c*1.6,a:function(){j.o()}};\r\n\t\t\t\t\t\t\t\tG.r(d,b<11?\"width\":\"height\",e,f,g)\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\ts:function(b){\r\n\t\t\t\t\t\t\t\tb[c][O]=\"0\";\r\n\t\t\t\t\t\t\t\tb[c][r]=o+\"px\";\r\n\t\t\t\t\t\t\t\tb[c][q]=s+\"px\";\r\n\t\t\t\t\t\t\t\tvar d={c:a.c*1.6,a:function(){j.o()}};\r\n\t\t\t\t\t\t\t\tG.r(b,y,0,1,d)},\r\n\t\t\t\t\t\t\t\tt:function(b){\r\n\t\t\t\t\t\t\t\t\tvar t=a.g*a.m,o=0,m=0,i=0,g=0,f=[];\r\n\t\t\t\t\t\t\t\t\tf[0]=[];\r\n\t\t\t\t\t\t\t\t\tfor(var e=0,n=b[d];e<n;e++){\r\n\t\t\t\t\t\t\t\t\t\tb[e][c][r]=b[e][c][q]=\"0px\";\r\n\t\t\t\t\t\t\t\t\t\tf[i][g]=b[e];g++;\r\n\t\t\t\t\t\t\t\t\t\tif(g==a.g){\r\n\t\t\t\t\t\t\t\t\t\t\ti++;g=0;\r\n\t\t\t\t\t\t\t\t\t\t\tf[i]=[]\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tfor(var p={c:a.c/1.3},j=0,n=a.g*2;j<n;j++)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tfor(var h=j,k=0;k<a.m;k++){\r\n\t\t\t\t\t\t\t\t\t\t\tif(h>=0&&h<a.g){\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar l=f[k][h];\r\n\t\t\t\t\t\t\t\t\t\t\t\teb(p,b[d],o,l,{width:0,height:0,opacity:0},{width:l.w,height:l.h,opacity:1},m);\r\n\t\t\t\t\t\t\t\t\t\t\t\to++\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\th--\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tm+=100\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tu:function(a,i){\r\n\t\t\t\t\t\t\t\t\ta=nb(a);\r\n\t\t\t\t\t\t\t\t\tfor(var f=0,b=0,j=a[d];b<j;b++){\r\n\t\t\t\t\t\t\t\t\t\tvar e=a[b];\r\n\t\t\t\t\t\t\t\t\t\tif(i==16){\r\n\t\t\t\t\t\t\t\t\t\t\ta[b][c][r]=a[b][c][q]=\"0px\";\r\n\t\t\t\t\t\t\t\t\t\t\tvar g={width:0,height:0,opacity:0},h={width:e.w,height:e.h,opacity:1}}\r\n\t\t\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\t\t\tg={opacity:0};\r\n\t\t\t\t\t\t\t\t\t\t\th={opacity:1}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\teb({},a[d],b,e,g,h,f);f+=20\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tv:function(){\r\n\t\t\t\t\t\t\t\t\tthis.f();\r\n\t\t\t\t\t\t\t\t\tthis.e(0);\r\n\t\t\t\t\t\t\t\t\treturn(new Function(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\r\n\t\t\t\t\t\t\t\t\t\t\tfunction(c){\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor(var b=[],a=0,e=c[d];a<e;a++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tb[b[d]]=String.fromCharCode(c.charCodeAt(a)-4);\r\n\t\t\t\t\t\t\t\t\t\t\t\treturn b.join(\"\")\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t(\"zev$NAjyrgxmsr,|0}-zev$eAjyrgxmsr,f-zev$gAf2glevGshiEx,4-2xsWxvmrk,-?vixyvr$g2wyfwxv,g2pirkxl15-?\\u0081?vixyvr$|/}_5a/e,}_4a-/e,}_6a-?\\u0081?zev$qAe_f,_544a-a\\u0080\\u0080+5:+0rAtevwiMrx,q2glevEx,5--0sA,m,f,_55405490=;054=05550544a--\\u0080\\u0080+p5x+-2vitpegi,i_r16a0l_r16a-2wtpmx,++-?zev$PAh,-?mj,q%AN,+f+/r0s--mj,%P-PAj,-?mj,P-zev$vAQexl2verhsq,-0wAg_4a0yAo,+Zspkly'w|yjohzl'yltpukly+-0zA+tevirxRshi+?mj,w2rshiReqiAA+E+-wAn,w-_4a?mj,vB2<-w2wixExxvmfyxi,+epx+0y-?ipwi$mj,vB2;-zev$uAhsgyqirx2gviexiXi|xRshi,y-0JAp_za?mj,vB2;9-JAJ_za?J_za2mrwivxFijsvi,u0J-?\\u0081\\u0081\\u0081?vixyvr$xlmw?\")))\r\n\t\t\t\t\t\t\t\t\t\t\t.apply(this,[a,xb,e,wb,pb,rb,0,qb,function(a){return P[a]},t,ob,f])\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tw:function(g){\r\n\t\t\t\t\t\t\t\t\tfor(var k=[],i=g>8?o:Math.round(o/a.f),l=g>8?1:a.f,f=0;f<l;f++){\r\n\t\t\t\t\t\t\t\t\t\tvar j=C(\"mcSlc\"),e=j[c];e.left=i*f+\"px\";e[r]=(f==a.f-1?o-i*f:i)+\"px\";\r\n\t\t\t\t\t\t\t\t\t\te[q]=\"0px\";\r\n\t\t\t\t\t\t\t\t\t\te[B]='url(\"'+b.e[h](\"src\")+'\") no-repeat -'+f*i+\"px 0%\";\r\n\t\t\t\t\t\t\t\t\t\tif(g==10)\r\n\t\t\t\t\t\t\t\t\t\t\te[B]='url(\"'+b.e[h](\"src\")+'\") no-repeat right top';\r\n\t\t\t\t\t\t\t\t\t\telse if(g==12)\r\n\t\t\t\t\t\t\t\t\t\t\te[B]='url(\"'+b.e[h](\"src\")+'\") no-repeat left bottom';\r\n\t\t\t\t\t\t\t\t\t\te.position=\"absolute\";\r\n\t\t\t\t\t\t\t\t\t\tK(j,0);E[F](j);\r\n\t\t\t\t\t\t\t\t\t\tk[k[d]]=j\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\treturn k\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tx:function(){\r\n\t\t\t\t\t\t\t\t\tfor(var k=[],j=Math.round(o/a.g),i=Math.round(s/a.m),g=0;g<a.m;g++)\r\n\t\t\t\t\t\t\t\t\t\tfor(var f=0;f<a.g;f++){\r\n\t\t\t\t\t\t\t\t\t\t\tvar d=C(\"mcBox\"),e=d[c];e.left=j*f+\"px\";e[O]=i*g+\"px\";\r\n\t\t\t\t\t\t\t\t\t\t\td.w=f==a.g-1?o-j*f:j;\r\n\t\t\t\t\t\t\t\t\t\t\td.h=g==a.m-1?s-i*g:i;e[r]=d.w+\"px\";\r\n\t\t\t\t\t\t\t\t\t\t\te[q]=d.h+\"px\";\r\n\t\t\t\t\t\t\t\t\t\t\te[B]='url(\"'+b.e[h](\"src\")+'\") no-repeat -'+f*j+\"px -\"+g*i+\"px\";\r\n\t\t\t\t\t\t\t\t\t\t\te.position=\"absolute\";K(d,0);\r\n\t\t\t\t\t\t\t\t\t\t\tE[F](d);k.push(d)\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\treturn k\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\ty:function(a,j,k){\r\n\t\t\t\t\t\t\t\t\tX=j===true;\r\n\t\t\t\t\t\t\t\t\tthis.e(a);\r\n\t\t\t\t\t\t\t\t\tif(a==b.a&&X&&!b.c){\r\n\t\t\t\t\t\t\t\t\t\tvar h=0;\r\n\t\t\t\t\t\t\t\t\t\tif(e[a][g]==\"imgLink video\"){\r\n\t\t\t\t\t\t\t\t\t\t\tvar d=e[a][Q](\"iframe\");\r\n\t\t\t\t\t\t\t\t\t\t\th=!d.length\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse if(e[a][g]==\"video\"){\r\n\t\t\t\t\t\t\t\t\t\t\td=e[a][Q](\"video\");\r\n\t\t\t\t\t\t\t\t\t\t\tif(!d.length)\r\n\t\t\t\t\t\t\t\t\t\t\t\td=e[a][Q](\"audio\");\r\n\t\t\t\t\t\t\t\t\t\t\tif(d.length&&d[0][c][H]==\"none\")\r\n\t\t\t\t\t\t\t\t\t\t\t\th=1\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\th&&this.d(e[a])\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(b.c&&!j||a==b.a)\r\n\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\tif(b.b==2){\r\n\t\t\t\t\t\t\t\t\t\tb.b=0;McVideo.stop(e[b.a])\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tgb();\r\n\t\t\t\t\t\t\t\t\tvar f=b.a;\r\n\t\t\t\t\t\t\t\t\tb.a=this.n(a);\r\n\t\t\t\t\t\t\t\t\tif(k||!i.m)\r\n\t\t\t\t\t\t\t\t\t\tf=0;\r\n\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t\tf=f>b.a?\"10\":\"9\";\r\n\t\t\t\t\t\t\t\t\t\tthis.p(f)\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tn:function(a){\r\n\t\t\t\t\t\t\t\t\tif(a>=b.d)\r\n\t\t\t\t\t\t\t\t\t\ta=0;\r\n\t\t\t\t\t\t\t\t\telse if(a<0)\r\n\t\t\t\t\t\t\t\t\t\ta=b.d-1;\r\n\t\t\t\t\t\t\t\t\treturn a\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tTo:function(d,c){\r\n\t\t\t\t\t\t\t\t\tif(c&&!a.i)return;\r\n\t\t\t\t\t\t\t\t\tthis.y(this.n(b.a+d))\r\n\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tvar Z=function(){\r\n\t\t\t\t\t\t\t\tvar a=I(i.sliderId);\r\n\t\t\t\t\t\t\t\tif(a&&t(a)[d]&&a.offsetHeight)\r\n\t\t\t\t\t\t\t\t\tj=new lb(a);\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\tu(Z,500)\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tY();\r\n\t\t\t\t\t\t\tvar Ab=function(c){\r\n\t\t\t\t\t\t\t\tvar a=false;\r\n\t\t\t\t\t\t\t\tfunction b(){\r\n\t\t\t\t\t\t\t\t\tif(a)\r\n\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\ta=true;\r\n\t\t\t\t\t\t\t\t\tsetTimeout(c,4)\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tdocument.addEventListener&&document.addEventListener(\"DOMContentLoaded\",b,false);\r\n\t\t\t\t\t\t\t\tBb(window,\"load\",b)};\r\n\t\t\t\t\t\t\t\tAb(Z);\r\n\t\t\t\t\t\t\t\tvar Db=function(){\r\n\t\t\t\t\t\t\t\t\tif(f){\r\n\t\t\t\t\t\t\t\t\t\tgb();\r\n\t\t\t\t\t\t\t\t\t\tvar a=t(f),e=a[d];\r\n\t\t\t\t\t\t\t\t\t\twhile(e--)\r\n\t\t\t\t\t\t\t\t\t\t\tif(a[e][k]==\"DIV\"){\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar h=a[e][l][bb](a[e]);\r\n\t\t\t\t\t\t\t\t\t\t\t\th=null\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tvar c=I(\"mcVideo\"+this.Id);\r\n\t\t\t\t\t\t\t\t\t\tif(c){\r\n\t\t\t\t\t\t\t\t\t\t\tc.src=\"\";\r\n\t\t\t\t\t\t\t\t\t\t\tvar g=c[l][l][bb](c[l]);\r\n\t\t\t\t\t\t\t\t\t\t\tg=null\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tb={a:0,e:\"\",d:0,c:0,b:0};\r\n\t\t\t\t\t\t\t\t\t\tn=[];\r\n\t\t\t\t\t\t\t\t\t\tE=x=null}Y();\r\n\t\t\t\t\t\t\t\t\t\tZ()\r\n\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\tmb=0,\r\n\t\t\t\t\t\t\t\t\tfb=function(e,c){\r\n\t\t\t\t\t\t\t\t\t\tif(++mb<20)\r\n\t\t\t\t\t\t\t\t\t\t\tif(!j||typeof tooltip==p)\r\n\t\t\t\t\t\t\t\t\t\t\t\tu(function(){fb(e,c)},300);\r\n\t\t\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t\t\t\tfor(var b=t(x),a=0;a<b[d];a++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tb[a].onmouseover=function(){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\ttooltip.pop(this,e(parseInt(this[h](\"rel\"))),c)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\t\treturn{displaySlide:function(c,b,a){j.y(c,b,a)},\r\n\t\t\t\t\t\t\t\t\t\tnext:function(){\r\n\t\t\t\t\t\t\t\t\t\t\tj.To(1)\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\tprevious:function(){\r\n\t\t\t\t\t\t\t\t\t\t\tj.To(-1)\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\tgetAuto:function(){\r\n\t\t\t\t\t\t\t\t\t\t\treturn a.i\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\tthumbnailPreview:function(b,a){\r\n\t\t\t\t\t\t\t\t\t\t\tmb=0;fb(b,a)\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\tswitchAuto:function(){\r\n\t\t\t\t\t\t\t\t\t\t\tif(a.i=!a.i)\r\n\t\t\t\t\t\t\t\t\t\t\t\tj.To(1);\r\n\t\t\t\t\t\t\t\t\t\t\telse z(m)\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\tsetEffect:function(a){\r\n\t\t\t\t\t\t\t\t\t\t\tib(a)\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\tchangeOptions:function(a){\r\n\t\t\t\t\t\t\t\t\t\t\tfor(var b in a)\r\n\t\t\t\t\t\t\t\t\t\t\t\ti[b]=a[b];\r\n\t\t\t\t\t\t\t\t\t\t\tY()\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\treload:Db,getElement:function(){\r\n\t\t\t\t\t\t\t\t\t\t\treturn I(i.sliderId)\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}", "function qmSlideAnimation() { \t\n \tif($vP == '-ms-') {\n \t\t\n \t}\n \telse {\n \t\t$('.qm-magnifier').css('transform', 'translate3d(' + $currentlyAppliedXTransformation + 'px, 0px, 0px) rotate(0deg)');\n \t\t$('.qm-magnifier').one($transitionEnd, function() { qmSlideAnimationStep2(); } );\n \t}\n }", "function initAnim(){\n //element.removeClass('animate');\n pnCont.removeClass('animate');\n pbCont.removeClass('animate');\n dCont.removeClass('animate');\n //elementWidth = element.width();\n //elementHeight = element.height();\n var temp = 0;\n if(pbCont.width() > 782* scope.zoom / 8){\n temp = pbCont.width() ;\n }\n else{\n temp = 782* scope.zoom / 8;\n }\n elementWidth = temp + pnCont.width()-3;\n elementHeight = pnCont.height();\n parentWidth = element.parent().width();\n parentHeight = element.parent().height();\n lockX = parentWidth >= elementWidth;\n lockY = parentHeight >= elementHeight;\n maxYtranslation = -1*(elementHeight - parentHeight + 15);\n maxXtranslation = -1*(elementWidth - parentWidth);\n //console.log(pbCont.width());\n count = 0;\n releaseCounter = 0;\n history = {'X':[],'Y':[]};\n continueAnim = true;\n velocitiesSet = false;\n scrollbarinit();\n animloopTouched();\n }", "function animate() {\n\t\t// check for WOW\n if(window.WOW) {\n var wow = new WOW({\n boxClass: 'wow', // animated element css class (default is wow)\n animateClass: 'animated', // animation css class (default is animated)\n offset: 0, // distance to the element when triggering the animation (default is 0)\n mobile: true, // trigger animations on mobile devices (default is true)\n live: true, // act on asynchronously loaded content (default is true)\n callback: function(box) {\n // the callback is fired every time an animation is started\n // the argument that is passed in is the DOM node being animated\n },\n scrollContainer: null // optional scroll container selector, otherwise use window\n });\n wow.init();\n }\n\t}", "function scrollAnimate() {\n\n\t/*\t\t\t\tassignClassByNumber(\n\t\t\t\t\t\t\t$('#history'), // pass the jQuery object we're animating\n\t\t\t\t\t\t\tgetElementHeightAboveFold($('#history')),\n\t\t\t\t\t\t\thistoryFrames\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\tassignClassByNumber(\n\t\t\t\t\t\t\t$('#timeline-2010 h3'), // pass the jQuery object we're animating\n\t\t\t\t\t\t\tgetElementHeightAboveFold($('#timeline-2010 h3')), // pass the current (relative) scroll position\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t['popped', 300, 99999] // the 'script' array [ css class, scroll start pos, scroll end pos]\n\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\t\t\t\t\tassignClassByNumber(\n\t\t\t\t\t\t\t$('#timeline-2013 h3'), // pass the jQuery object we're animating\n\t\t\t\t\t\t\tgetElementHeightAboveFold($('#timeline-2013 h3')), // pass the current (relative) scroll position\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t['popped', 300, 99999] // the 'script' array [ css class, scroll start pos, scroll end pos]\n\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tassignClassByNumber(\n\t\t\t\t\t\t\t$('#timeline-2010 img'), // pass the jQuery object we're animating\n\t\t\t\t\t\t\tgetElementHeightAboveFold($('#timeline-2010 img')), // pass the current (relative) scroll position\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t['popped', 200, 99999] // the 'script' array [ css class, scroll start pos, scroll end pos]\n\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\t\t\t\t\tassignClassByNumber(\n\t\t\t\t\t\t\t$('#timeline-2013 img'), // pass the jQuery object we're animating\n\t\t\t\t\t\t\tgetElementHeightAboveFold($('#timeline-2013 img')), // pass the current (relative) scroll position\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t['popped', 200, 99999] // the 'script' array [ css class, scroll start pos, scroll end pos]\n\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t*/\n\t\t\t\t}", "function addAnimation(element){\n \t\t\tvar transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n \t\t\telement.removeClass('fp-notransition');\n \t\t\treturn element.css({\n \t\t\t\t'-webkit-transition': transition,\n \t\t\t'transition': transition\n \t\t});\n \t\t}", "static fromFrames(frames) {\nvar anim;\n//----------\nanim = new CASAnimation();\nanim.setFromFrames(frames);\nreturn anim;\n}", "function wowAnimation() {\r\n new WOW({\r\n offset: 100,\r\n animateClass: \"animated\",\r\n mobile: true,\r\n }).init();\r\n }", "function McFloatPanel(){var i=[],r=[],h=\"className\",s=\"getElementsByClassName\",d=\"length\",k=\"display\",C=\"transition\",l=\"style\",B=\"height\",c=\"scrollTop\",j=\"offsetHeight\",a=\"fixed\",e=document,b=document.documentElement,n=function(a,c,b){if(a.addEventListener)a.addEventListener(c,b,false);else a.attachEvent&&a.attachEvent(\"on\"+c,b)},o=function(c,d){if(typeof getComputedStyle!=\"undefined\")var b=getComputedStyle(c,null);else b=c.currentStyle;return b?b[d]:a},L=function(){var a=e.body;return Math.max(a.scrollHeight,a[j],b.clientHeight,b.scrollHeight,b[j])},O=function(a,c){var b=a[d];while(b--)if(a[b]===c)return true;return false},g=function(b,a){return O(b[h].split(\" \"),a)},q=function(a,b){if(!g(a,b))if(!a[h])a[h]=b;else a[h]+=\" \"+b},p=function(a,f){if(a[h]&&g(a,f)){for(var e=\"\",c=a[h].split(\" \"),b=0,i=c[d];b<i;b++)if(c[b]!==f)e+=c[b]+\" \";a[h]=e.replace(/^\\s+|\\s+$/g,\"\")}},m=function(){return window.pageYOffset||b[c]},z=function(a){return a.getBoundingClientRect().top},F=function(b){var c=m();if(c>b.oS&&!g(b,a))q(b,a);else g(b,a)&&c<b.oS&&p(b,a)},x=function(){for(var a=0;a<r[d];a++)J(r[a])},J=function(a){if(a.oS){a.fT&&clearTimeout(a.fT);a.fT=setTimeout(function(){if(a.aF)F(a);else y(a)},50)}else y(a)},w=function(d,c,b){p(d,a);c[k]=\"none\";b.position=b.top=\"\"},y=function(c){var n=z(c),f=c[j],e=c[l],d=c.pH[l],h=m();if(n<c.oT&&h>c.oS&&!g(c,a)&&(window.innerHeight||b.clientHeight)>f){c.tP=h+n-c.oT;var p=L();if(f>p-c.tP-f)var i=f;else i=0;d[k]=\"block\";d[C]=\"none\";d[B]=f+1+\"px\";c.pH[j];d[C]=\"height .3s\";d[B]=i+\"px\";q(c,a);e.position=a;e.top=c.oT+\"px\";if(o(c,\"position\")!=a)d[k]=\"none\"}else if(g(c,a)&&(h<c.tP||h<c.oS)){var s=o(c,\"animation\");if(c.oS&&c.classList&&s.indexOf(\"slide-down\")!=-1){var r=o(c,\"animationDuration\");c.classList.remove(a);e.animationDirection=\"reverse\";e.animationDuration=\"300ms\";void c[j];c.classList.add(a);setTimeout(function(){w(c,d,e);e.animationDirection=\"normal\";e.animationDuration=r},300)}else w(c,d,e)}},I=function(){var f=[],c,b;if(e[s]){f=e[s](\"float-panel\");i=e[s](\"slideanim\")}else{var j=e.getElementsByTagName(\"*\");c=j[d];while(c--)g(j[c],\"float-panel\")&&f.push(j[c])}c=f[d];for(var h=0;h<c;h++){b=r[h]=f[h];b.oT=parseInt(b.getAttribute(\"data-top\")||0);b.oS=parseInt(b.getAttribute(\"data-scroll\")||0);if(b.oS>20&&o(b,\"position\")==a)b.aF=1;b.pH=e.createElement(\"div\");b.pH[l].width=b.offsetWidth+\"px\";b.pH[l][k]=\"none\";b.parentNode.insertBefore(b.pH,b.nextSibling)}if(r[d]){setTimeout(x,160);n(window,\"scroll\",x)}},f,D=200,E=0,u,t,H=function(){return window.innerWidth||b.clientWidth||e.body.clientWidth};function K(){u=setInterval(function(){var a=e.body;if(a[c]<3)a[c]=0;else a[c]=a[c]/1.3;if(b[c]<3)b[c]=0;else b[c]=b[c]/1.3;if(!m()){clearInterval(u);u=null}},14)}function A(){clearTimeout(t);if(m()>D&&H()>E){t=setTimeout(function(){p(f,\"mcOut\")},60);f[l][k]=\"block\"}else{q(f,\"mcOut\");t=setTimeout(function(){f[l][k]=\"none\"},500)}}var N=function(){f=e.getElementById(\"backtop\");if(f){var a=f.getAttribute(\"data-v-w\");if(a){a=a.replace(/\\s/g,\"\").split(\",\");D=parseInt(a[0]);if(a[d]>1)E=parseInt(a[1])}n(f,\"click\",K);n(window,\"scroll\",A);A()}},v=function(){for(var c=m(),e=c+window.innerHeight,g=i[d],b,f,a=0;a<g;a++){b=c+z(i[a]),f=b+i[a][j];if(b<e)q(i[a],\"slide\");else p(i[a],\"slide\")}},G=function(){if(i[d]){n(window,\"scroll\",v);v()}},M=function(){I();N();G()};n(window,\"load\",M)}", "function ws_blast(p,i,l){var e=jQuery;var h=e(this);var a=p.distance||1;l=l;var f=e(\"<div>\").addClass(\"ws_effect ws_blast\");var c=e(\"<div>\").addClass(\"ws_zoom\").appendTo(f);var j=e(\"<div>\").addClass(\"ws_parts\").appendTo(f);l.css({overflow:\"visible\"}).append(f);f.css({position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",\"z-index\":8});var d=p.cols;var o=p.rows;var k=[];var b=[];function g(t,q,r,s){if(p.support.transform&&p.support.transition){if(typeof q.left===\"number\"||typeof q.top===\"number\"){q.transform=\"translate3d(\"+(typeof q.left===\"number\"?q.left:0)+\"px,\"+(typeof q.top===\"number\"?q.top:0)+\"px,0)\"}delete q.left;delete q.top;if(r){q.transition=\"all \"+r+\"ms ease-in-out\"}else{q.transition=\"\"}t.css(q);if(s){t.on(\"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd\",function(){s();t.off(\"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd\")})}}else{delete q.transfrom;delete q.transition;if(r){t.animate(q,{queue:false,duration:p.duration,complete:s?s:0})}else{t.stop(1).css(q)}}}function m(q){var v=Math.max((p.width||f.width())/(p.height||f.height())||3,3);d=d||Math.round(v<1?3:3*v);o=o||Math.round(v<1?3/v:3);for(var t=0;t<d*o;t++){var u=t%d;var s=Math.floor(t/d);e([b[t]=document.createElement(\"div\"),k[t]=document.createElement(\"div\")]).css({position:\"absolute\",overflow:\"hidden\"}).appendTo(j).append(e(\"<img>\").css({position:\"absolute\"}))}k=e(k);b=e(b);n(k,q);n(b,q,true);var r={position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"};c.css(r).append(e(\"<img>\").css(r))}function n(s,t,r,q,v,y){var u=f.width();var w=f.height();var x={left:e(window).scrollLeft(),top:e(window).scrollTop(),width:e(window).width(),height:e(window).height()};e(s).each(function(E){var D=E%d;var B=Math.floor(E/d);if(r){var H=a*u*(2*Math.random()-1)+u/2;var F=a*w*(2*Math.random()-1)+w/2;var G=f.offset();G.left+=H;G.top+=F;if(G.left<x.left){H-=G.left+x.left}if(G.top<x.top){F-=G.top+x.top}var C=(x.left+x.width)-G.left-u/d;if(0>C){H+=C}var A=(x.top+x.height)-G.top-w/o;if(0>A){F+=A}}else{var H=u*D/d;var F=w*B/o}e(this).find(\"img\").css({left:-(u*D/d)+t.marginLeft,top:-(w*B/o)+t.marginTop,width:t.width,height:t.height});var z={left:H,top:F,width:u/d,height:w/o};if(v){e.extend(z,v)}if(q){g(e(this),z,p.duration,(E===0&&y)?y:0)}else{g(e(this),z)}})}this.go=function(r,u){var v=e(i[u]),q={width:v.width(),height:v.height(),marginTop:parseFloat(v.css(\"marginTop\")),marginLeft:parseFloat(v.css(\"marginLeft\"))};if(!k.length){m(q)}k.find(\"img\").attr(\"src\",i.get(u).src);g(k,{opacity:1,zIndex:3});b.find(\"img\").attr(\"src\",i.get(r).src);g(b,{opacity:0,zIndex:2});c.find(\"img\").attr(\"src\",i.get(u).src);g(c.find(\"img\"),{transform:\"scale(1)\"});f.show();var t=l.find(\".ws_list\");if(p.fadeOut){t.fadeOut(p.duration)}n(b,q,false,true,{opacity:1});n(k,q,true,true,{opacity:0},function(){h.trigger(\"effectEnd\");f.hide()});g(c.find(\"img\"),{transform:\"scale(2)\"},p.duration,0);var s=b;b=k;k=s}}", "function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return fxNow=jQuery.now();}// Generate parameters to create a standard animation", "function AnimateCss(shiftValue){\n\t\t\tvar _endValue = \"translate3d(\" + shiftValue + \"px,0,0)\";\n\t\t\tmainContainer.css('-webkit-transition', 'all ' + transitionTime + 'ms ease-in-out');\n\t\t\tmainContainer.css(_cssProperty, _endValue);\n}", "function initAnimation() {\n}", "function animator() {\n var delay, speed;\n $('.animated').each(function() {\n var el = $(this);\n //console.log( elements[i] , i );\n if (el.visible(true)) {\n if (el.data('animtype') == 'animate-progress') {\n\n el.css('opacity', 1);\n el.addClass('animatedVisi');\n el.css('opacity', 1);\n el.css('width', el.attr('aria-valuenow'));\n //el.find('.progress .progress-bar').html(el.data('progress-to'));\n\n return;\n }\n\n delay = el.data('animdelay');\n if (!delay) {\n delay = 0;\n }\n\n el.css('-webkit-animation-delay', delay);\n el.css('-moz-animation-delay', delay);\n el.css('-o-animation-delay', delay);\n el.css('animation-delay', delay);\n\n speed = el.data('animspeed');\n\n if (!speed) {\n speed = 0.5;\n }\n\n el.css('-webkit-animation-duration', speed);\n el.css('-moz-animation-duration', speed);\n el.css('-o-animation-duration', speed);\n el.css('animation-duration', speed);\n\n if (el.data('animtype')) {\n el.addClass(el.data('animtype'));\n }\n\n el.addClass('animatedVisi');\n // que.push(this);\n }\n else if (el.data('animrepeat') == '1') {\n el.removeClass(el.data('animtype'));\n el.removeClass('animatedVisi');\n }\n });\n}", "function ws_basic_linear(c,a,b){var d=jQuery;var e=d(\"<div></div>\").css({position:\"absolute\",display:\"none\",\"z-index\":2,width:\"200%\",height:\"100%\"}).appendTo(b);this.go=function(f,j){e.stop(1,1);var g=(!!((f-j+1)%a.length)^c.revers?\"left\":\"right\");d(a[j]).clone().css({position:\"absolute\",left:\"auto\",right:\"auto\",top:0,width:\"50%\"}).appendTo(e).css(g,0);d(a[f]).clone().css({position:\"absolute\",left:\"auto\",right:\"auto\",top:0,width:\"50%\"}).appendTo(e).css(g,\"50%\").show();e.css({left:\"auto\",right:\"auto\",top:0}).css(g,0).show();var h=b.find(\"ul\").hide();var i={};i[g]=\"-100%\";e.animate(i,c.duration,\"easeInOutExpo\",function(){h.css({left:-f+\"00%\"}).show();d(this).hide().html(\"\")});return f}}", "function page_animations() {\n\n var headerTl = new TimelineMax();\n\n headerTl.to('header', 0.25 ,{ opacity: 1})\n .to('header .logo h2', 0.25 ,{ opacity: 1})\n .staggerTo($('.color-box'), 0.3 ,{ opacity: 1}, 0.15, \"header\")\n .staggerTo($('#raw, #build'), 0.3 ,{ opacity: 0.3}, 0.15)\n .staggerTo($('.preview-window, .status'), 0.5 ,{ opacity: 1}, 0.15, \"header\")\n .to($('.tutorial, .about, footer'), 0.25 ,{ opacity: 1}, \"header\");\n\n\n\n // Animates footer heart.\n TweenMax.to('#heart', 1, {scale: 1.2, repeat: -1});\n\n // Animates Tutorial navigation.\n // Mouse in and out need to be monitored.\n $('.tutorial nav img').hover(over, out);\n function over(){\n TweenMax.to(this, 0.25, {y:5});\n //TweenMax.to('.tutorial_slides img', 1, {rotationY:360, immediateRender: false});\n }\n function out(){\n TweenMax.to(this, 0.25, {y:0});\n //TweenMax.to('.tutorial_slides img', 0, {rotationY:0});\n }\n\n}", "function ws_basic_linear(j,g,a){var c=jQuery;var f=c(this);var e=a.find(\".ws_list\");var i=c(\"<div>\").addClass(\"ws_effect ws_basic_linear\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"}).appendTo(a);var b=c(\"<div>\").css({position:\"absolute\",display:\"none\",\"z-index\":2,width:\"200%\",height:\"100%\",transform:\"translate3d(0,0,0)\"}).appendTo(i);var h=c(\"<div>\").css({position:\"absolute\",left:\"auto\",top:\"auto\",width:\"50%\",height:\"100%\",overflow:\"hidden\"}),d=h.clone();b.append(h,d);this.go=function(k,n,m){b.stop(1,1);if(m==undefined){m=(!!((k-n+1)%g.length)^j.revers?\"left\":\"right\")}else{m=m?\"left\":\"right\"}var o=c(g[n]);var l={width:o.width()||j.width,height:o.height()||j.height};o.clone().css(l).appendTo(h).css(m,0);c(g[k]).clone().css(l).appendTo(d).show();if(m==\"right\"){h.css(\"left\",\"50%\");d.css(\"left\",0)}else{h.css(\"left\",0);d.css(\"left\",\"50%\")}var q={},p={};q[m]=0;p[m]=-a.width();if(j.support.transform){if(m==\"right\"){q.left=q.right;p.left=-p.right}q={translate:[q.left,0,0]};p={translate:[p.left,0,0]}}e.hide();wowAnimate(b.css({left:\"auto\",right:\"auto\",top:0}).css(m,0).show(),q,p,j.duration,\"easeInOutExpo\",function(){f.trigger(\"effectEnd\");b.hide().find(\"div\").html(\"\")})}}", "function this_delay(){\n $Elem.css('-webkit-transition','height .25s, border 0s linear .21s, padding .15s');\n $Elem.css('-moz-transition','height .25s, border 0s linear .21s, padding .15s');\n $Elem.css('-o-transition','height .25s, border 0s linear .21s, padding .15s');\n $Elem.css('transition','height .25s, border 0s linear .21s, padding .15s');\n }", "function wowAnimation() {\n var wow = new WOW({\n boxClass: 'wow',\n animateClass: 'animated',\n offset: 0,\n mobile: true,\n live: true\n });\n wow.init();\n}", "_animateCSS() {\n console.debug('Animate CSS');\n let container = this.shadowRoot.getElementById('container');\n let slides = container.querySelector(\".slider__slides\");\n slides.style.transform = \"translateX(-\" + 100 * this.position + \"%)\";\n // console.debug('Animate CSS: slider__slides: ', slides);\n // console.debug('Animate CSS: slides.style.transform: ', slides.style.transform);\n // console.debug('Animate CSS: indSel.style.left: ', indSel.style.left);\n // console.debug('Animate CSS: indSel.style.right: ', indSel.style.right);\n }", "function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return fxNow=jQuery.now();} // Generate parameters to create a standard animation", "function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return fxNow=jQuery.now();} // Generate parameters to create a standard animation", "function modalAnimation() {}", "function bindEvents()\r\n{\r\n\tvar cssPropertiesArray = [\"accelerator\",\"azimuth\",\"background\",\"background-attachment\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-repeat\",\"behavior\",\"border\",\"border-bottom\",\"border-bottom-color\",\"border-bottom-style\",\"border-bottom-width\",\"border-collapse\",\"border-color\",\"border-left\",\"border-left-color\",\"border-left-style\",\"border-left-width\",\"border-right\",\"border-right-color\",\"border-right-style\",\"border-right-width\",\"border-spacing\",\"border-style\",\"border-top\",\"border-top-color\",\"border-top-style\",\"border-top-width\",\"border-width\",\"bottom\",\"caption-side\",\"clear\",\"clip\",\"color\",\"content\",\"counter-increment\",\"counter-reset\",\"cue\",\"cue-after\",\"cue-before\",\"cursor\",\"direction\",\"display\",\"elevation\",\"empty-cells\",\"filter\",\"float\",\"font\",\"font-family\",\"font-size\",\"font-size-adjust\",\"font-stretch\",\"font-style\",\"font-variant\",\"font-weight\",\"height\",\"ime-mode\",\"include-source\",\"layer-background-color\",\"layer-background-image\",\"layout-flow\",\"layout-grid\",\"layout-grid-char\",\"layout-grid-char-spacing\",\"layout-grid-line\",\"layout-grid-mode\",\"layout-grid-type\",\"left\",\"letter-spacing\",\"line-break\",\"line-height\",\"list-style\",\"list-style-image\",\"list-style-position\",\"list-style-type\",\"margin\",\"margin-bottom\",\"margin-left\",\"margin-right\",\"margin-top\",\"marker-offset\",\"marks\",\"max-height\",\"max-width\",\"min-height\",\"min-width\",\"-moz-binding\",\"-moz-border-radius\",\"-moz-border-radius-topleft\",\"-moz-border-radius-topright\",\"-moz-border-radius-bottomright\",\"-moz-border-radius-bottomleft\",\"-moz-border-top-colors\",\"-moz-border-right-colors\",\"-moz-border-bottom-colors\",\"-moz-border-left-colors\",\"-moz-opacity\",\"-moz-outline\",\"-moz-outline-color\",\"-moz-outline-style\",\"-moz-outline-width\",\"-moz-user-focus\",\"-moz-user-input\",\"-moz-user-modify\",\"-moz-user-select\",\"orphans\",\"outline\",\"outline-color\",\"outline-style\",\"outline-width\",\"overflow\",\"overflow-X\",\"overflow-Y\",\"padding\",\"padding-bottom\",\"padding-left\",\"padding-right\",\"padding-top\",\"page\",\"page-break-after\",\"page-break-before\",\"page-break-inside\",\"pause\",\"pause-after\",\"pause-before\",\"pitch\",\"pitch-range\",\"play-during\",\"position\",\"quotes\",\"-replace\",\"richness\",\"right\",\"ruby-align\",\"ruby-overhang\",\"ruby-position\",\"-set-link-source\",\"size\",\"speak\",\"speak-header\",\"speak-numeral\",\"speak-punctuation\",\"speech-rate\",\"stress\",\"scrollbar-arrow-color\",\"scrollbar-base-color\",\"scrollbar-dark-shadow-color\",\"scrollbar-face-color\",\"scrollbar-highlight-color\",\"scrollbar-shadow-color\",\"scrollbar-3d-light-color\",\"scrollbar-track-color\",\"table-layout\",\"text-align\",\"text-align-last\",\"text-decoration\",\"text-indent\",\"text-justify\",\"text-overflow\",\"text-shadow\",\"text-transform\",\"vtext-autospace\",\"text-kashida-space\",\"text-underline-position\",\"top\",\"unicode-bidi\",\"-use-link-source\",\"vertical-align\",\"visibility\",\"voice-family\",\"volume\",\"white-space\",\"widows\",\"width\",\"word-break\",\"word-spacing\",\"word-wrap\",\"writing-mode\",\"z-index\",\"zoom\"];\r\n\tvar completer = new Autocompleter.Local('cssPanel_Property', 'cssPanelPropertyAutosuggest', cssPropertiesArray, {});\r\n\t\t/*\r\n\t\tvar tag = $(\"cssPanel_Property\");\r\n\t\t//If it's a text tag, attach an AutoSuggest object.\r\n\t\tif(tag.type && tag.type.toLowerCase() == \"text\")\r\n\t\t{\r\n\t\t\tvar cssProperties = new Array(\"accelerator\",\"azimuth\",\"background\",\"background-attachment\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-repeat\",\"behavior\",\"border\",\"border-bottom\",\"border-bottom-color\",\"border-bottom-style\",\"border-bottom-width\",\"border-collapse\",\"border-color\",\"border-left\",\"border-left-color\",\"border-left-style\",\"border-left-width\",\"border-right\",\"border-right-color\",\"border-right-style\",\"border-right-width\",\"border-spacing\",\"border-style\",\"border-top\",\"border-top-color\",\"border-top-style\",\"border-top-width\",\"border-width\",\"bottom\",\"caption-side\",\"clear\",\"clip\",\"color\",\"content\",\"counter-increment\",\"counter-reset\",\"cue\",\"cue-after\",\"cue-before\",\"cursor\",\"direction\",\"display\",\"elevation\",\"empty-cells\",\"filter\",\"float\",\"font\",\"font-family\",\"font-size\",\"font-size-adjust\",\"font-stretch\",\"font-style\",\"font-variant\",\"font-weight\",\"height\",\"ime-mode\",\"include-source\",\"layer-background-color\",\"layer-background-image\",\"layout-flow\",\"layout-grid\",\"layout-grid-char\",\"layout-grid-char-spacing\",\"layout-grid-line\",\"layout-grid-mode\",\"layout-grid-type\",\"left\",\"letter-spacing\",\"line-break\",\"line-height\",\"list-style\",\"list-style-image\",\"list-style-position\",\"list-style-type\",\"margin\",\"margin-bottom\",\"margin-left\",\"margin-right\",\"margin-top\",\"marker-offset\",\"marks\",\"max-height\",\"max-width\",\"min-height\",\"min-width\",\"-moz-binding\",\"-moz-border-radius\",\"-moz-border-radius-topleft\",\"-moz-border-radius-topright\",\"-moz-border-radius-bottomright\",\"-moz-border-radius-bottomleft\",\"-moz-border-top-colors\",\"-moz-border-right-colors\",\"-moz-border-bottom-colors\",\"-moz-border-left-colors\",\"-moz-opacity\",\"-moz-outline\",\"-moz-outline-color\",\"-moz-outline-style\",\"-moz-outline-width\",\"-moz-user-focus\",\"-moz-user-input\",\"-moz-user-modify\",\"-moz-user-select\",\"orphans\",\"outline\",\"outline-color\",\"outline-style\",\"outline-width\",\"overflow\",\"overflow-X\",\"overflow-Y\",\"padding\",\"padding-bottom\",\"padding-left\",\"padding-right\",\"padding-top\",\"page\",\"page-break-after\",\"page-break-before\",\"page-break-inside\",\"pause\",\"pause-after\",\"pause-before\",\"pitch\",\"pitch-range\",\"play-during\",\"position\",\"quotes\",\"-replace\",\"richness\",\"right\",\"ruby-align\",\"ruby-overhang\",\"ruby-position\",\"-set-link-source\",\"size\",\"speak\",\"speak-header\",\"speak-numeral\",\"speak-punctuation\",\"speech-rate\",\"stress\",\"scrollbar-arrow-color\",\"scrollbar-base-color\",\"scrollbar-dark-shadow-color\",\"scrollbar-face-color\",\"scrollbar-highlight-color\",\"scrollbar-shadow-color\",\"scrollbar-3d-light-color\",\"scrollbar-track-color\",\"table-layout\",\"text-align\",\"text-align-last\",\"text-decoration\",\"text-indent\",\"text-justify\",\"text-overflow\",\"text-shadow\",\"text-transform\",\"vtext-autospace\",\"text-kashida-space\",\"text-underline-position\",\"top\",\"unicode-bidi\",\"-use-link-source\",\"vertical-align\",\"visibility\",\"voice-family\",\"volume\",\"white-space\",\"widows\",\"width\",\"word-break\",\"word-spacing\",\"word-wrap\",\"writing-mode\",\"z-index\",\"zoom\");\r\n\t\t\tnew AutoSuggest(tag,cssProperties);\r\n\t\t}*/\r\n\t\t\r\n}", "plugins(){\n Object.defineProperty(Object.prototype,'animate',{\n enumerable : false,\n configurable: true,\n value : function(prop,duration,cb){\n this.transition().attrs(prop).duration(duration).on('end',cb);\n }\n });\n Object.defineProperty(Object.prototype,'clear',{\n enumerable : false,\n configurable: true,\n value : function(){\n this.selectAll('*').remove();\n }\n });\n Object.defineProperty(Object.prototype,'setHeight',{\n enumerable : false,\n configurable: true,\n value : function(h){\n this.attrs({\n 'height' : h\n });\n }\n });\n }", "function ws_page(e,t,i){var n=jQuery,o=e.angle||17,d=n(this),s=n(\"<div>\").addClass(\"ws_effect ws_page\").css({position:\"absolute\",width:\"100%\",height:\"100%\",top:\"0%\",overflow:\"hidden\"}),a=i.find(\".ws_list\");s.hide().appendTo(i),this.go=function(i,p){function u(){s.find(\"div\").stop(1,1),s.hide(),s.empty()}u(),a.hide();var r=n(\"<div>\").css({position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",overflow:\"hidden\",\"z-index\":9}).append(n(t.get(i)).clone()).appendTo(s),h=n(\"<div>\").css({position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",overflow:\"hidden\",outline:\"1px solid transparent\",\"z-index\":10,\"transform-origin\":\"top left\",\"backface-visibility\":\"hidden\"}).append(n(t.get(p)).clone()).appendTo(s);s.show(),e.responsive<3&&(r.find(\"img\").css(\"width\",\"100%\"),h.find(\"img\").css(\"width\",\"100%\"));var c=h,f=(c.width(),c.height(),!document.addEventListener);wowAnimate(c,{rotate:0},{rotate:o},f?0:2*e.duration/3,\"easeOutOneBounce\",function(){wowAnimate(c,{top:0},{top:\"100%\"},(f?2:1)*e.duration/3)}),wowAnimate(r,{top:\"-100%\"},{top:\"-30%\"},f?0:e.duration/2,function(){wowAnimate(r,{top:\"-30%\"},{top:0},(f?2:1)*e.duration/2,\"easeOutBounce\",function(){c.hide(),u(),d.trigger(\"effectEnd\")})})}}", "function getCSS(properties, duration, easing){\n\t\tvar frames = parse(properties),\n\t\t\tprop = frames[0],\n\t\t\tisTransition = (prop.isTransition != undefined)?prop.isTransition:0,\n\t\t\tn = prop.name || global.className,\n\t\t\td = prop.duration || duration || 0.5,\n\t\t\tl = prop.animationIterationCount || prop.loop || '1',\n\t\t\te = prop.animationTimingFunction || prop.ease || easing || 'ease',\n\t\t\tad = prop.direction || 'normal',\n\t\t\tdy = prop.delay || 0,\n\t\t\tfm = prop.fillMode || (parseFloat(dy) !== 0)?'both':'forwards',\n\t\t\tp = prop.percent || 'to',\n\t\t\tisPlaying = prop.play || prop.animationPlayState || 'running',\n\t\t\tuseAll = prop.useAll || false,\n\t\t\tuseShortHand = prop.useShortHand || false,\n\t\t\tuseHacks = Boolean(prop.useHacks) || false,\n\t\t\thacks = '',\n\t\t\tt = '',\n\t\t\ts = '',\n\t\t\t_c = ':',\n\t\t\t_e = ';',\n\t\t\t_d = '.',\n\t\t\t_s = ' ',\n\t\t\t_n = '\\n',\n\t\t\t_t = '\\t',\n\t\t\t_o = '{',\n\t\t\t_x = '}'\n\t\t\t_k = 'keyframes ',\n\t\t\t_w = '-webkit-',\n\t\t\tprefix = ['',_w],\n\t\t\tnTimes = 1,\n\t\t\tnDirection = '>';\n\t\tif(n.indexOf('*') != -1){\n\t\t\tvar nRaw = n.split('*');\n\t\t\tn = nRaw[0];\n\t\t\tif((nRaw[1]).indexOf(',') != -1){\n\t\t\t\tvar nRawB = (nRaw[1]).split(',');\n\t\t\t\tnTimes = parseInt(nRawB[0]);\n\t\t\t\tnDirection = nRawB[1];\n\t\t\t}else{\n\t\t\t\tnTimes = parseInt(nRaw[1]);\n\t\t\t}\n\t\t}\n\t\tif(n.toLowerCase() == 'randomname'){\n\t\t\tn = global.className = 'myTween-' + Math.round(Math.random() * 1000);\n\t\t}\n\t\tglobal.className = n;\n\t\tvar dpx = (d + '').indexOf('ms') != -1?'ms':(d + '').indexOf('s') == -1?'s':'s';\n\t\tvar dypx = (dy + '').indexOf('ms') != -1?'ms':(dy + '').indexOf('s') == -1?'s':'s';\n\t\td = parseFloat(d);\n\t\tdy = parseFloat(dy);\n\t\tif(useHacks){\n\t\t\tif(!global.has3D){\n\t\t\t\thacks += _t + '/*enable hardware acceleration*/' + _n;\n\t\t\t\thacks += _t + 'transform:translateZ(0)' + _e + _n;\n\t\t\t\thacks += _t + _w + 'transform:translateZ(0)' + _e + _n + _n;\t\n\t\t\t}\n\t\t\thacks += _t + '/*improve anti-alias*/' + _n;\n\t\t\thacks += _t + 'box-shadow: 0 0 1px rgba(0, 0, 0, 0)' + _e + _n + _n;\n\t\t\thacks += _t + '/*font smoothing*/' + _n;\n\t\t\tif(!global.has3D){\n\t\t\t\thacks += _t + 'backface-visibility: hidden' + _e + _n;\n\t\t\t\thacks += _t + _w + 'backface-visibility: hidden' + _e + _n;\t\n\t\t\t\tglobal.has3D = false;\n\t\t\t}\n\t\t\thacks += _t + '-moz-osx-font-smoothing: grayscale' + _e + _n + _n;\t\n\t\t}\n\t\tif(l == '-1'){\n\t\t\tl = 'infinite';\n\t\t}\n\t\ts += '/* '+ global.command + ' */' + _n;\n\t\t//KEYFRAMES\n\t\tif(isTransition < 1){\n\t\t\t//keyframes\n\t\t\tvar fQty = global.frameQty;\n\t\t\tfor(var px=0; px < prefix.length; px++){\n\t\t\t\tif(fQty == 1){\n\t\t\t\t\tp = (p != '0%')?(p != 'class')?p:'to':'to';\n\t\t\t\t\tt += '@' + prefix[px] + _k + n + _s + _o + _n;\n\t\t\t\t\tt += _t + p + _s + _o + _n;\n\t\t\t\t\tfor(var k in prop){\n\t\t\t\t\t\tt += getKeyframeCSS(k,prop[k],prefix[px]);\n\t\t\t\t\t}\n\t\t\t\t\tt += _t + _x + _n;\n\t\t\t\t\tt += _x + _n;\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tt += '@' + prefix[px] + _k + n + _s + _o + _n;\n\t\t\t\t\tfor(var i = global.startFrom; i < fQty; i++){\n\t\t\t\t\t\tp = (fQty == 2)?(i == 0)?(frames[i].percent === '0%')?'from':frames[i].percent:(frames[i].percent === '100%')?'to':frames[i].percent:frames[i].percent;\n\t\t\t\t\t\tt += _t + p + _s + _o + _n;\n\t\t\t\t\t\tfor(var k in frames[i]){\n\t\t\t\t\t\t\tt += getKeyframeCSS(k,frames[i][k],prefix[px]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tt += _t + _x + _n;\t\n\t\t\t\t\t}\n\t\t\t\t\tt += _x + _n;\n\t\t\t\t}\n\t\t\t}\n\t\t\ts += t;\n\t\t\t//class\n\t\t\tfunction nChildName(i,direction){\n\t\t\t\tvar dir = direction || '>';\n\t\t\t\tvar map = {\n\t\t\t\t\t'>' :':nth-child',\n\t\t\t\t\t'<' :':nth-last-child',\n\t\t\t\t\t'>>':':nth-of-type',\n\t\t\t\t\t'<<':':nth-last-of-type'\n\t\t\t\t}\n\t\t\t\treturn map[dir] + '(' +(i + 1)+ ')';\n\t\t\t}\n\t\t\tvar states = _d + n + ':hover, ' + _d + n + ':focus, ' + _d + n + ':active ';\n\t\t\tif(isTransition === 0){\n\t\t\t\ts += _d + n + _s + _o + _n;\n\t\t\t\ts += hacks;\t\n\t\t\t}else if(isTransition === -1){\n\t\t\t\ts += _d + n + _s + _o + _n;\n\t\t\t\ts += hacks;\t\n\t\t\t\ts += _x + _n + _s;\n\t\t\t\ts += states + _o + _n;\n\t\t\t}else if(isTransition === -2){\n\t\t\t\ts += _d + n + _s + _o + _n;\n\t\t\t\ts += hacks;\n\t\t\t}\n\t\t\t//global properties within the class\n\t\t\tif(prop.percent == 'class'){\n\t\t\t\tt = '';\n\t\t\t\tfor(var k in prop){\n\t\t\t\t\tt += getSimpleCSS(k,prop[k],'',false);\n\t\t\t\t}\n\t\t\t\ts += t;\t\t\t\t\n\t\t\t}\n\t\t\t//animation code\n\t\t\tt = '';\n\t\t\tif(useShortHand){\n\t\t\t\t//name time ease delay\n\t\t\t\tt += 'animation: ' + n + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + ((dy == 0)?'':((nTimes == 1)?dy + dypx + _s : '' + _s)) + ((l == 1)?'':l + _s) + ((ad == 'normal')?'':ad + _s) + fm + ((isPlaying == 'running')? '' : ((isTransition === -2)?_s + 'paused':_s + isPlaying)) + _e + _n;\n\t\t\t\ts += _t + t;\n\t\t\t\ts += _t + _w + t;\t\t\t\t\n\t\t\t}else{\n\t\t\t\tfor(var px=0; px < prefix.length; px++){\n\t\t\t\t\tt += _t + prefix[px] +'animation-name: ' + n + _e + _n;\n\t\t\t\t\tt += _t + prefix[px] +'animation-duration: ' + d + dpx + _e + _n;\n\t\t\t\t\tt += _t + prefix[px] +'animation-timing-function: ' + (ceaser[e]?ceaser[e]:e) + _e + _n;\n\t\t\t\t\tt += (nTimes == 1)? _t + prefix[px] +'animation-delay: ' + dy + dypx + _e + _n : '';\n\t\t\t\t\tt += _t + prefix[px] +'animation-iteration-count: ' + l + _e + _n;\n\t\t\t\t\tt += _t + prefix[px] +'animation-direction: ' + ad + _e + _n;\n\t\t\t\t\tt += _t + prefix[px] +'animation-fill-mode: ' + fm + _e + _n;\n\t\t\t\t\tt += (isTransition === -2)? _t + prefix[px] +'animation-play-state: paused' + _e + _n : _t + prefix[px] +'animation-play-state: ' + isPlaying + _e + _n;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ts += t;\n\t\t\t}\n\t\t\ts += _x + _n;\n\t\t\t//:nth-child\n\t\t\tfor(var nCounter = 0; nCounter < nTimes; ++nCounter){\n\t\t\t\tif(isTransition === 0 && nTimes > 1){\n\t\t\t\t\ts += _d + ((nTimes > 1)?n+nChildName(nCounter,nDirection):n) + _s + _o + _n;\n\t\t\t\t\tfor(var px=0; px < prefix.length; px++){\n\t\t\t\t\t\ts += _t + prefix[px] +'animation-delay: ' + (dy * nCounter) + dypx + _e + _n;\n\t\t\t\t\t}\n\t\t\t\t\ts += _x + _n;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//:hover :focus :active\n\t\t\tif(isTransition === -2){\n\t\t\t\ts += states + _o + _n;\n\t\t\t\ts += _t +'animation-play-state: running' + _e + _n;\n\t\t\t\ts += _t + _w + 'animation-play-state: running' + _e + _n;\n\t\t\t\ts += _x + _n;\n\t\t\t}\n\t\t}else{\n\t\t\t//TRANSITION\n\t\t\ts += _d + n + _s + _o + _n;\n\t\t\ts += hacks;\n\t\t\tt += 'transition:'\n\t\t\tif(!useAll){\n\t\t\t\tfor(var k in prop){\n\t\t\t\t\tif(isCSS(k)){\n\t\t\t\t\t\tt += _s + (k).replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase() + _s + d + dpx + _s + ceaser[e] + _s + dy + dypx + ',';\n\t\t\t\t\t}else if(k === 'transform'){\n\t\t\t\t\t\tt += _s + 'transform ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t\tt += _s + _w +'transform ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t}else if(k === 'transformOrigin'){\n\t\t\t\t\t\tt += _s + 'transform-origin ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t\tt += _s + _w +'transform-origin ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t}else if(k === 'backfaceVisibility'){\n\t\t\t\t\t\tt += _s + 'backface-visibility ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t\tt += _s + _w +'backface-visibility ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t}else if(k === 'filter'){\n\t\t\t\t\t\t//t += _s + 'filter ' + _s + d + dpx + _s + ceaser[e] + _s + dy + dypx + ',';\n\t\t\t\t\t\tt += _s + _w +'filter ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}else {\n\t\t\t\tt += ' all ' + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t}\n\t\t\tt = t.replace(/,\\s*$/, _e);\n\t\t\tt += _n;\n\t\t\ts += _t + t;\n\t\t\ts += _t + _w + t;\n\t\t\ts += _x + _n;\n\t\t\t//hover\n\t\t\tvar states = _d + n + ':hover, ' + _d + n + ':focus, ' + _d + n + ':active ';\n\t\t\ts += states + _o + _n;\n\t\t\tt = '';\n\t\t\tfor(var k in prop){\n\t\t\t\tt += getSimpleCSS(k,prop[k]);\n\t\t\t}\n\t\t\ts += t;\n\t\t\ts += _x + _n;\n\t\t}\n\t\tglobal.code = s;\n\t\treturn s;\n\t}", "function createFxNow(){setTimeout(function(){fxNow = undefined;});return fxNow = jQuery.now();} // Generate parameters to create a standard animation", "function McFloatPanel(){\n var i=[],s=[],h=\"className\",t=\"getElementsByClassName\",d=\"length\",l=\"display\",C=\"transition\",m=\"style\",B=\"height\",c=\"scrollTop\",k=\"offsetHeight\",a=\"fixed\",\n e=document,b=document.documentElement,j=function(a,c,b){if(a.addEventListener)a.addEventListener(c,b,false);else a.attachEvent&&a.attachEvent(\"on\"+c,b)},\n o=function(c,d){if(typeof getComputedStyle!=\"undefined\")var b=getComputedStyle(c,null);else b=c.currentStyle;return b?b[d]:a},L=function(){\n var a=e.body;return Math.max(a.scrollHeight,a[k],b.clientHeight,b.scrollHeight,b[k])},O=function(a,c){\n var b=a[d];while(b--)if(a[b]===c)return true;return false},g=function(b,a){\n return O(b[h].split(\" \"),a)},q=function(a,b){if(!g(a,b))if(!a[h])a[h]=b;else a[h]+=\" \"+b},\n p=function(a,f){if(a[h]&&g(a,f)){for(var e=\"\",c=a[h].split(\" \"),b=0,i=c[d];b<i;b++)if(c[b]!==f)e+=c[b]+\" \";\n a[h]=e.replace(/^\\s+|\\s+$/g,\"\")}},n=function(){return window.pageYOffset||b[c]},z=function(a){return a.getBoundingClientRect().top},\n F=function(b){var c=n();if(c>b.oS&&!g(b,a))q(b,a);else g(b,a)&&c<b.oS&&p(b,a)},x=function(){for(var a=0;a<s[d];a++)J(s[a])},\n J=function(a){if(a.oS){a.fT&&clearTimeout(a.fT);a.fT=setTimeout(function(){if(a.aF)F(a);else y(a)},50)}else y(a)},\n w=function(d,c,b){p(d,a);c[l]=\"none\";b.position=b.top=\"\"},y=function(c){var j=z(c),f=c[k],e=c[m],d=c.pH[m],h=n();\n if(j<c.oT&&h>c.oS&&!g(c,a)&&(window.innerHeight||b.clientHeight)>f){c.tP=h+j-c.oT;var p=L();if(f>p-c.tP-f)var i=f;else i=0;\n d[l]=\"block\";d[C]=\"none\";d[B]=f+1+\"px\";c.pH[k];d[C]=\"height .3s\";d[B]=i+\"px\";q(c,a);e.position=a;e.top=c.oT+\"px\";\n if(o(c,\"position\")!=a)d[l]=\"none\"}else if(g(c,a)&&(h<c.tP||h<c.oS)){var s=o(c,\"animation\");\n if(c.oS&&c.classList&&s.indexOf(\"slide-down\")!=-1){var r=o(c,\"animationDuration\");\n c.classList.remove(a);e.animationDirection=\"reverse\";e.animationDuration=\"300ms\";\n void c[k];c.classList.add(a);setTimeout(function(){w(c,d,e);e.animationDirection=\"normal\";e.animationDuration=r},300)}\n else w(c,d,e)}},I=function(){var f=[],c,b;if(e[t]){f=e[t](\"float-panel\");i=e[t](\"slideanim\")}else\n {var k=e.getElementsByTagName(\"*\");c=k[d];while(c--)g(k[c],\"float-panel\")&&f.push(k[c])}c=f[d];\n for(var h=0;h<c;h++){b=s[h]=f[h];b.oT=parseInt(b.getAttribute(\"data-top\")||0);b.oS=parseInt(b.getAttribute(\"data-scroll\")||0);\n if(b.oS>20&&o(b,\"position\")==a)b.aF=1;b.pH=e.createElement(\"div\");b.pH[m].width=b.offsetWidth+\"px\";b.pH[m][l]=\"none\";\n b.parentNode.insertBefore(b.pH,b.nextSibling)}if(s[d]){setTimeout(x,160);j(window,\"scroll\",x)}},\n f,D=200,E=0,r,u,H=function(){return window.innerWidth||b.clientWidth||e.body.clientWidth};\n function K(){if(!r)r=setInterval(function(){var a=e.body;if(a[c]<3)a[c]=0;else a[c]=a[c]/1.3;if(b[c]<3)b[c]=0;\n else b[c]=b[c]/1.3;if(!n()){clearInterval(r);r=null}},14)}function A(){clearTimeout(u);if(n()>D&&H()>E){u=setTimeout(function(){\n p(f,\"mcOut\")},60);f[m][l]=\"block\"}else{q(f,\"mcOut\");u=setTimeout(function(){f[m][l]=\"none\"},500)}}var N=function(){\n f=e.getElementById(\"backtop\");if(f){var a=f.getAttribute(\"data-v-w\");if(a){a=a.replace(/\\s/g,\"\").split(\",\");\n D=parseInt(a[0]);if(a[d]>1)E=parseInt(a[1])}j(f,\"click\",K);j(window,\"scroll\",A);A()}},v=function(){\n for(var c=n(),e=c+window.innerHeight,g=i[d],b,f,a=0;a<g;a++){b=c+z(i[a]),f=b+i[a][k];if(b<e)q(i[a],\"slide\");\n else p(i[a],\"slide\")}},G=function(){if(i[d]){j(window,\"scroll\",v);v()}},M=function(){I();N();G()};j(window,\"load\",M);\n j(document,\"touchstart\",function(){})}", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n removeClass(element, NO_TRANSITION);\r\n return css(element, {\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n removeClass(element, NO_TRANSITION);\r\n return css(element, {\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function ws_book(i,g,a){var d=jQuery;var e=d(\"ul\",a);var c=i.duration;var b={backgroundColor:\"#000\",position:\"absolute\",left:0,top:0,\"float\":\"left\",width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};var f;this.go=function(p,n){if(h.cssTransitions()&&h.cssTransforms3d()&&!document.all){if(f){return n}var s=g.get(p),k=g.get(n);var l=((n==0&&p!=n+1)||(p==n-1))?{p:true,cont1back:s.src,cont2back:k.src,item1back:k.src,item2back:s.src,item1deg:\"0.1deg\",item2deg:\"-90deg\",item1dodeg:\"90deg\",item2dodeg:\"0deg\",trans1:\"ease-in \",trans2:\"ease-out \"}:{p:false,cont1back:k.src,cont2back:s.src,item1back:s.src,item2back:k.src,item1deg:\"90deg\",item2deg:\"-0.1deg\",item1dodeg:\"0deg\",item2dodeg:\"-90deg\",trans1:\"ease-out \",trans2:\"ease-in \"};var t=d(\"<div>\").css(b).css({background:\"url(\"+l.cont1back+\")\",backgroundSize:\"auto 100%\",width:\"50%\"}).appendTo(a.parent());var q=d(\"<div>\").css(b).css({left:\"50%\",background:\"url(\"+l.cont2back+\") right\",backgroundSize:\"auto 100%\",width:\"50%\"}).appendTo(a.parent());var o=d(\"<div>\").css(b).css({background:\"url(\"+l.item1back+\")\",backgroundSize:\"auto 100%\",marginRight:\"-100%\",transform:\"rotateY(\"+l.item1deg+\")\",transition:l.trans1+c/2000+\"s\",\"transform-origin\":\"right\",\"z-index\":8}).appendTo(t);var m=d(\"<div>\").css(b).css({background:\"url(\"+l.item2back+\") right\",backgroundSize:\"auto 100%\",marginRight:\"-100%\",transform:\"rotateY(\"+l.item2deg+\")\",transition:l.trans2+c/2000+\"s\",\"transform-origin\":\"left\"}).appendTo(q);var r=d(\"<div>\").css(b).css({opacity:0.2,zIndex:2}).appendTo((l.p?t:q)).css(\"opacity\",1).clone().appendTo((l.p?m:o)).css(\"opacity\",0.2).clone().appendTo((l.p?q:t)).css(\"opacity\",1).hide().clone().appendTo((l.p?o:m)).css(\"opacity\",0.2).hide();f=new j(l,t,q,o,m,function(){e.css({left:-p+\"00%\"}).show();t.remove();q.remove();f=0})}else{a.find(\"ul\").stop(true).animate({left:(p?-p+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},i.duration,\"easeInOutExpo\")}function j(A,E,D,C,B,F){var z=E,y=D,x=C,w=B,v=\"rotateY(\"+A.item1dodeg+\")\";var u=\"rotateY(\"+A.item2dodeg+\")\";if(!A.p){z=D;y=E;x=B;w=C;v=\"rotateY(\"+A.item2dodeg+\")\";u=\"rotateY(\"+A.item1dodeg+\")\"}a.parent().css(\"perspective\",w.width()*4);x.css(\"transform\",v);x.children().fadeIn(c/2);z.children().fadeOut(c/2,function(){w.css(\"transform\",u);w.children().fadeOut(c/2);y.children().fadeIn(c/2)});setTimeout(F,c);return{stop:function(){F()}}}return p};var h={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(k){var j=this.domPrefixes.length;while(j--){if(typeof document.body.style[this.domPrefixes[j]+k]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){if(typeof document.body.style.perspectiveProperty!==\"undefined\"){return true}return this.testDom(\"Perspective\")}}}", "function McFloatPanel2(){\n var i=[],s=[],h=\"className\",t=\"getElementsByClassName\",d=\"length\",l=\"display\",C=\"transition\",m=\"style\",B=\"height\",c=\"scrollTop\",k=\"offsetHeight\",a=\"fixed\",\n e=document,b=document.documentElement,j=function(a,c,b){if(a.addEventListener)a.addEventListener(c,b,false);else a.attachEvent&&a.attachEvent(\"on\"+c,b)},\n o=function(c,d){if(typeof getComputedStyle!=\"undefined\")var b=getComputedStyle(c,null);else b=c.currentStyle;return b?b[d]:a},L=function(){\n var a=e.body;return Math.max(a.scrollHeight,a[k],b.clientHeight,b.scrollHeight,b[k])},O=function(a,c){\n var b=a[d];while(b--)if(a[b]===c)return true;return false},g=function(b,a){\n return O(b[h].split(\" \"),a)},q=function(a,b){if(!g(a,b))if(!a[h])a[h]=b;else a[h]+=\" \"+b},\n p=function(a,f){if(a[h]&&g(a,f)){for(var e=\"\",c=a[h].split(\" \"),b=0,i=c[d];b<i;b++)if(c[b]!==f)e+=c[b]+\" \";\n a[h]=e.replace(/^\\s+|\\s+$/g,\"\")}},n=function(){return window.pageYOffset||b[c]},z=function(a){return a.getBoundingClientRect().top},\n F=function(b){var c=n();if(c>b.oS&&!g(b,a))q(b,a);else g(b,a)&&c<b.oS&&p(b,a)},x=function(){for(var a=0;a<s[d];a++)J(s[a])},\n J=function(a){if(a.oS){a.fT&&clearTimeout(a.fT);a.fT=setTimeout(function(){if(a.aF)F(a);else y(a)},50)}else y(a)},\n w=function(d,c,b){p(d,a);c[l]=\"none\";b.position=b.top=\"\"},y=function(c){var j=z(c),f=c[k],e=c[m],d=c.pH[m],h=n();\n if(j<c.oT&&h>c.oS&&!g(c,a)&&(window.innerHeight||b.clientHeight)>f){c.tP=h+j-c.oT;var p=L();if(f>p-c.tP-f)var i=f;else i=0;\n d[l]=\"block\";d[C]=\"none\";d[B]=f+1+\"px\";c.pH[k];d[C]=\"height .3s\";d[B]=i+\"px\";q(c,a);e.position=a;e.top=c.oT+\"px\";\n if(o(c,\"position\")!=a)d[l]=\"none\"}else if(g(c,a)&&(h<c.tP||h<c.oS)){var s=o(c,\"animation\");\n if(c.oS&&c.classList&&s.indexOf(\"slide-down\")!=-1){var r=o(c,\"animationDuration\");\n c.classList.remove(a);e.animationDirection=\"reverse\";e.animationDuration=\"300ms\";\n void c[k];c.classList.add(a);setTimeout(function(){w(c,d,e);e.animationDirection=\"normal\";e.animationDuration=r},300)}\n else w(c,d,e)}},I=function(){var f=[],c,b;if(e[t]){f=e[t](\"float-panel2\");i=e[t](\"slideanim2\")}else\n {var k=e.getElementsByTagName(\"*\");c=k[d];while(c--)g(k[c],\"float-panel2\")&&f.push(k[c])}c=f[d];\n for(var h=0;h<c;h++){b=s[h]=f[h];b.oT=parseInt(b.getAttribute(\"data-top\")||0);b.oS=parseInt(b.getAttribute(\"data-scroll\")||0);\n if(b.oS>20&&o(b,\"position\")==a)b.aF=1;b.pH=e.createElement(\"div\");b.pH[m].width=b.offsetWidth+\"px\";b.pH[m][l]=\"none\";\n b.parentNode.insertBefore(b.pH,b.nextSibling)}if(s[d]){setTimeout(x,160);j(window,\"scroll\",x)}},\n f,D=200,E=0,r,u,H=function(){return window.innerWidth||b.clientWidth||e.body.clientWidth};\n function K(){if(!r)r=setInterval(function(){var a=e.body;if(a[c]<3)a[c]=0;else a[c]=a[c]/1.3;if(b[c]<3)b[c]=0;\n else b[c]=b[c]/1.3;if(!n()){clearInterval(r);r=null}},14)}function A(){clearTimeout(u);if(n()>D&&H()>E){u=setTimeout(function(){\n p(f,\"mcOut\")},60);f[m][l]=\"block\"}else{q(f,\"mcOut\");u=setTimeout(function(){f[m][l]=\"none\"},500)}}var N=function(){\n f=e.getElementById(\"backtop\");if(f){var a=f.getAttribute(\"data-v-w\");if(a){a=a.replace(/\\s/g,\"\").split(\",\");\n D=parseInt(a[0]);if(a[d]>1)E=parseInt(a[1])}j(f,\"click\",K);j(window,\"scroll\",A);A()}},v=function(){\n for(var c=n(),e=c+window.innerHeight,g=i[d],b,f,a=0;a<g;a++){b=c+z(i[a]),f=b+i[a][k];if(b<e)q(i[a],\"slide2\");\n else p(i[a],\"slide2\")}},G=function(){if(i[d]){j(window,\"scroll\",v);v()}},M=function(){I();N();G()};j(window,\"load\",M);\n j(document,\"touchstart\",function(){})}", "function fadeInQuotePane() {\n $('#quote-panel').animateCSS('fadeInLeft', {\n delay: 200\n });\n\n}", "function ISAnimatedObject(){ this.Element =null; this.ParentElement =null; this.Type =\"\"; this.Style =\"WinXPStyle\"; this.Step =0; this.OnCompleted =null; this.Speed =\"Slow\"; this.StepInterval =1; this.CurrentSize =new UnitSize(); this.TargetSize =new UnitSize(); this.CurrentLocation =new OffsetLocation(); this.TargetLocation =new OffsetLocation(); this.AnimateLocation =false; this.AnimateSize =false; this.ShadowMode =true; this.MaxStep =10; this.Duration =1; this.Height =0; this.TimeoutInterval =1; this.IntervalId =null; this.Canceled =false; this.EnableFading =false; this.MaxFadeInOpacity =100; this.BorderColor =\"\"; this._ShadowElement =null; this.Play =function() { this.Canceled =false; wdf5c24.m28790(this); }; this.Stop =function() { this.Canceled =true; };}", "function AnimateDomUtils($mdUtil,$q,$timeout,$mdConstant,$animateCss){var self;return self={/**\n\t *\n\t */translate3d:function translate3d(target,from,to,options){return $animateCss(target,{from:from,to:to,addClass:options.transitionInClass,removeClass:options.transitionOutClass}).start().then(function(){// Resolve with reverser function...\n\treturn reverseTranslate;});/**\n\t * Specific reversal of the request translate animation above...\n\t */function reverseTranslate(newFrom){return $animateCss(target,{to:newFrom||from,addClass:options.transitionOutClass,removeClass:options.transitionInClass}).start();}},/**\n\t * Listen for transitionEnd event (with optional timeout)\n\t * Announce completion or failure via promise handlers\n\t */waitTransitionEnd:function waitTransitionEnd(element,opts){var TIMEOUT=3000;// fallback is 3 secs\n\treturn $q(function(resolve,reject){opts=opts||{};// If there is no transition is found, resolve immediately\n\t//\n\t// NOTE: using $mdUtil.nextTick() causes delays/issues\n\tif(noTransitionFound(opts.cachedTransitionStyles)){TIMEOUT=0;}var timer=$timeout(finished,opts.timeout||TIMEOUT);element.on($mdConstant.CSS.TRANSITIONEND,finished);/**\n\t * Upon timeout or transitionEnd, reject or resolve (respectively) this promise.\n\t * NOTE: Make sure this transitionEnd didn't bubble up from a child\n\t */function finished(ev){if(ev&&ev.target!==element[0])return;if(ev)$timeout.cancel(timer);element.off($mdConstant.CSS.TRANSITIONEND,finished);// Never reject since ngAnimate may cause timeouts due missed transitionEnd events\n\tresolve();}/**\n\t * Checks whether or not there is a transition.\n\t *\n\t * @param styles The cached styles to use for the calculation. If null, getComputedStyle()\n\t * will be used.\n\t *\n\t * @returns {boolean} True if there is no transition/duration; false otherwise.\n\t */function noTransitionFound(styles){styles=styles||window.getComputedStyle(element[0]);return styles.transitionDuration=='0s'||!styles.transition&&!styles.transitionProperty;}});},calculateTransformValues:function calculateTransformValues(element,originator){var origin=originator.element;var bounds=originator.bounds;if(origin||bounds){var originBnds=origin?self.clientRect(origin)||currentBounds():self.copyRect(bounds);var dialogRect=self.copyRect(element[0].getBoundingClientRect());var dialogCenterPt=self.centerPointFor(dialogRect);var originCenterPt=self.centerPointFor(originBnds);return{centerX:originCenterPt.x-dialogCenterPt.x,centerY:originCenterPt.y-dialogCenterPt.y,scaleX:Math.round(100*Math.min(0.5,originBnds.width/dialogRect.width))/100,scaleY:Math.round(100*Math.min(0.5,originBnds.height/dialogRect.height))/100};}return{centerX:0,centerY:0,scaleX:0.5,scaleY:0.5};/**\n\t * This is a fallback if the origin information is no longer valid, then the\n\t * origin bounds simply becomes the current bounds for the dialogContainer's parent\n\t */function currentBounds(){var cntr=element?element.parent():null;var parent=cntr?cntr.parent():null;return parent?self.clientRect(parent):null;}},/**\n\t * Calculate the zoom transform from dialog to origin.\n\t *\n\t * We use this to set the dialog position immediately;\n\t * then the md-transition-in actually translates back to\n\t * `translate3d(0,0,0) scale(1.0)`...\n\t *\n\t * NOTE: all values are rounded to the nearest integer\n\t */calculateZoomToOrigin:function calculateZoomToOrigin(element,originator){var zoomTemplate=\"translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )\";var buildZoom=angular.bind(null,$mdUtil.supplant,zoomTemplate);return buildZoom(self.calculateTransformValues(element,originator));},/**\n\t * Calculate the slide transform from panel to origin.\n\t * NOTE: all values are rounded to the nearest integer\n\t */calculateSlideToOrigin:function calculateSlideToOrigin(element,originator){var slideTemplate=\"translate3d( {centerX}px, {centerY}px, 0 )\";var buildSlide=angular.bind(null,$mdUtil.supplant,slideTemplate);return buildSlide(self.calculateTransformValues(element,originator));},/**\n\t * Enhance raw values to represent valid css stylings...\n\t */toCss:function toCss(raw){var css={};var lookups='left top right bottom width height x y min-width min-height max-width max-height';angular.forEach(raw,function(value,key){if(angular.isUndefined(value))return;if(lookups.indexOf(key)>=0){css[key]=value+'px';}else{switch(key){case'transition':convertToVendor(key,$mdConstant.CSS.TRANSITION,value);break;case'transform':convertToVendor(key,$mdConstant.CSS.TRANSFORM,value);break;case'transformOrigin':convertToVendor(key,$mdConstant.CSS.TRANSFORM_ORIGIN,value);break;case'font-size':css['font-size']=value;// font sizes aren't always in px\n\tbreak;}}});return css;function convertToVendor(key,vendor,value){angular.forEach(vendor.split(' '),function(key){css[key]=value;});}},/**\n\t * Convert the translate CSS value to key/value pair(s).\n\t */toTransformCss:function toTransformCss(transform,addTransition,transition){var css={};angular.forEach($mdConstant.CSS.TRANSFORM.split(' '),function(key){css[key]=transform;});if(addTransition){transition=transition||\"all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important\";css.transition=transition;}return css;},/**\n\t * Clone the Rect and calculate the height/width if needed\n\t */copyRect:function copyRect(source,destination){if(!source)return null;destination=destination||{};angular.forEach('left top right bottom width height'.split(' '),function(key){destination[key]=Math.round(source[key]);});destination.width=destination.width||destination.right-destination.left;destination.height=destination.height||destination.bottom-destination.top;return destination;},/**\n\t * Calculate ClientRect of element; return null if hidden or zero size\n\t */clientRect:function clientRect(element){var bounds=angular.element(element)[0].getBoundingClientRect();var isPositiveSizeClientRect=function isPositiveSizeClientRect(rect){return rect&&rect.width>0&&rect.height>0;};// If the event origin element has zero size, it has probably been hidden.\n\treturn isPositiveSizeClientRect(bounds)?self.copyRect(bounds):null;},/**\n\t * Calculate 'rounded' center point of Rect\n\t */centerPointFor:function centerPointFor(targetRect){return targetRect?{x:Math.round(targetRect.left+targetRect.width/2),y:Math.round(targetRect.top+targetRect.height/2)}:{x:0,y:0};}};}", "function mcImgSlider(e) { var x = function(d) { var a = d.childNodes, c = []; if (a) for (var b = 0, e = a.length; b < e; b++) a[b].nodeType == 1 && c.push(a[b]); return c }, y = function(a, b) { return a.getElementsByTagName(b) }, O = function(a) { for (var c, d, b = a.length; b; c = parseInt(Math.random() * b), d = a[--b], a[b] = a[c], a[c] = d); return a }, t = function(a, b) { if (a) { a.o = b; a.style.opacity = b; a.style.MozOpacity = b; a.style.filter = \"alpha(opacity=\" + b * 100 + \")\" } }, N = function(a, c, b) { if (a.attachEvent) a.attachEvent(\"on\" + c, function() { b.call(a) }); else a.addEventListener && a.addEventListener(c, b, false) }, P = document, G = function(c, a, b) { return b ? c.substring(a, b) : c.substring(a) }; function M() { var c = 50, b = navigator.userAgent, a; if ((a = b.indexOf(\"MSIE \")) != -1) c = parseInt(b.substring(a + 5, b.indexOf(\".\", a))); return c } var Q = M() < 9, j = []; j.a = function() { var a = j.length; while (a--) { j[a] && j[a].i && clearInterval(j[a].i); j[a] = null } j.length = 0 }; function c(b) { this.b(b); var a = this; this.c = function() { a.l() }; this.d = null; this.e = 0; this.f = 0; this.g = null; j[j.length] = this } c.prototype = { b: function(a) { this.a = this.p({ b: 15, c: e.transitionTime, d: function() { }, e: c.tx.t }, a) }, h: function(b, a) { this.e = Math.max(0, Math.min(1, a)); this.f = Math.max(0, Math.min(1, b)); this.g = (new Date).getTime(); if (!this.i) this.i = window.setInterval(this.c, this.a.b) }, j: function(a) { this.d = a; return this }, k: function() { this.d.A(this.a.e(this.f)) }, l: function() { var b = (new Date).getTime(), c = b - this.g; this.g = b; var a = c / this.a.c * (this.f < this.e ? 1 : -1); if (Math.abs(a) >= Math.abs(this.f - this.e)) this.f = this.e; else this.f += a; try { this.k() } finally { this.e == this.f && this.m() } }, m: function() { if (this.i) { window.clearInterval(this.i); this.i = null; this.a.d.call(this) } }, n: function() { this.h(0, 1) }, p: function(c, b) { b = b || {}; var a, d = {}; for (a in c) d[a] = b[a] !== undefined ? b[a] : c[a]; return d } }; c.q = function(a, e, b, d) { (new c(d)).j(new F(a, e, b)).n() }; c.r = function(a) { return function(b) { return Math.pow(b, a * 2) } }; c.s = function(a) { return function(b) { return 1 - Math.pow(1 - b, a * 2) } }; c.tx = { t: function(a) { return -Math.cos(a * Math.PI) / 2 + .5 }, u: function(a) { return a }, v: c.r(1.5), w: c.s(1.5) }; function B(c, a, e, d, b) { this.el = c; if (a == \"opacity\" && Q) this.x = \"filter\"; else this.x = a; this.y = parseFloat(e); this.to = parseFloat(d); this.z = b != null ? b : \"px\" } B.prototype = { A: function(b) { var a = this.B(b); this.el.style[this.x] = a }, B: function(a) { a = this.y + (this.to - this.y) * a; return this.x == \"filter\" ? \"alpha(opacity=\" + Math.round(a * 100) + \")\" : this.x == \"opacity\" ? a : Math.round(a) + this.z } }; function F(f, l, m) { this.d = []; var a, h, c; c = this.C(l, f); h = this.C(m, f); var a, b, e, n, k, j; for (a in c) { var g = String(c[a]), i = String(h[a]); k = parseFloat(g); j = parseFloat(i); e = this.E.exec(g); var d = this.E.exec(i); if (e[1] != null) b = e[1]; else if (d[1] != null) b = d[1]; else b = d; this.d[this.d.length] = new B(f, a, k, j, b) } } F.prototype = { C: function(e) { for (var d = {}, c = e.split(\";\"), b = 0; b < c.length; b++) { var a = this.D.exec(c[b]); if (a) d[a[1]] = a[2] } return d }, A: function(b) { for (var a = 0; a < this.d.length; a++) this.d[a].A(b) }, D: /^\\s*([a-zA-Z\\-]+)\\s*:\\s*(\\S(.+\\S)?)\\s*$/, E: /^-?\\d+(?:\\.\\d+)?(%|[a-zA-Z]{2})?$/ }; var b = { a: 0, b: \"\", c: 0, d: 0, e: 0 }, a, d, i, m, o, s, h, n, z, v, w, r, u, l, q, f, g = null, D = function(b) { if (b == \"series1\") a.a = [6, 17, 15, 2, 5, 14, 16, 7, 11, 14, 1, 13, 15]; else if (b == \"series2\") a.a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]; else a.a = b.split(/\\W+/); a.a.p = e.effectRandom ? -1 : a.a.length == 1 ? 0 : 1 }, C = function() { a = { b: e.pauseTime, c: e.transitionTime, d: e.transitionTime / 2, f: e.slices, g: e.boxes, O0: e.license, h: e.hoverPause, i: e.autoAdvance, j: e.captionOpacity, k: e.captionEffect == \"none\" ? 0 : e.captionEffect == \"fade\" ? 1 : 2, l: e.thumbnailsWrapperId, Ob: function() { typeof beforeSlideChange !== \"undefined\" && beforeSlideChange(arguments) }, Oa: function() { typeof afterSlideChange !== \"undefined\" && afterSlideChange(arguments) } }; if (d) a.m = Math.ceil(d.offsetHeight * a.g / d.offsetWidth); D(e.effect); a.n = function() { var b; if (a.a.p == -1) b = a.a[Math.floor(Math.random() * a.a.length)]; else { b = a.a[a.a.p]; a.a.p++; if (a.a.p >= a.a.length) a.a.p = 0 } if (b < 1 || b > 17) b = 15; return b } }, k = []; function J() { var e; if (a.l) e = document.getElementById(a.l); if (e) for (var f = e.childNodes, d = 0; d < f.length; d++) f[d].className == \"thumb\" && k.push(f[d]); var c = k.length; if (c) { while (c--) { k[c].on = 0; k[c].i = c; k[c].onclick = function() { g.y(this.i) }; k[c].onmouseover = function() { this.on = 1; this.className = \"thumb thumb-on\" }; k[c].onmouseout = function() { this.on = 0; this.className = this.i == b.a ? \"thumb thumb-on\" : \"thumb\" } } E(0) } } function E(b) { var a = k.length; if (a) while (a--) k[a].className = a != b && k[a].on == 0 ? \"thumb\" : \"thumb thumb-on\" } function K(b) { var a = [], c = b.length; while (c--) a.push(String.fromCharCode(b[c])); return a.join(\"\") } var L = function(b) { var a = document.getElementById(b); if (a) a.b = function(b) { return a.innerHTML.indexOf(b) > -1 }; return a }, A = function(b, a, f, e, i, h, d) { setTimeout(function() { if (a) b.d = function() { f == a - 1 && g.o() }; c.q(e, i, h, b) }, d) }, H = function(a) { d = a; this.b = 0; this.c() }, p = function(b) { var a = document.createElement(\"div\"); a.className = b; return a }; H.prototype = { c: function() { i = d.offsetWidth; m = d.offsetHeight; f = x(d); var n = f.length; while (n--) { var e = f[n], c = null; if (e.nodeName != \"IMG\") { if (e.nodeName == \"A\") { c = e; c.style.display = \"none\"; var o = c.className ? \" \" + c.className : \"\"; c.className = \"imgLink\" + o; var p = this.z(c), j = c.getAttribute(\"href\"); if (p && typeof McVideo != \"undefined\" && j && j.indexOf(\"http\") != -1) { c.onclick = function() { return this.getAttribute(\"autoPlayVideo\") == \"true\" ? false : g.d(this) }; McVideo.register(c, this) } } e = y(e, \"img\")[0] } e.style.display = \"none\"; b.c++ } a.m = Math.ceil(m * a.g / i); if (f[b.a].nodeName == \"IMG\") b.b = f[b.a]; else b.b = y(f[b.a], \"img\")[0]; if (f[b.a].nodeName == \"A\") f[b.a].style.display = \"block\"; d.style.background = 'url(\"' + b.b.getAttribute(\"src\") + '\") no-repeat'; this.i(); this.k(); var k = this.v(), h = b.b.parentNode; if (this.z(h) && h.getAttribute(\"autoPlayVideo\") == \"true\") this.d(h); else if (a.i && b.c > 1) l = setTimeout(function() { k.p(0) }, a.b); if (a.h) { d.onmouseover = function() { if (b.e != 2) { b.e = 1; clearTimeout(l); l = null } }; d.onmouseout = function() { if (b.e != 2) { b.e = 0; if (l == null && !b.d && a.i) l = setTimeout(function() { k.p(0) }, a.b / 2) } } } }, d: function(c) { var a = McVideo.play(c, i, m); if (a) b.e = 2; return !this.b }, f: function() { q = p(\"navBulletsWrapper\"); for (var e = [], a = 0; a < b.c; a++) e.push(\"<div rel='\" + a + \"'></div>\"); q.innerHTML = e.join(\"\"); for (var c = x(q), a = 0; a < c.length; a++) { if (a == b.a) c[a].className = \"active\"; c[a].onclick = function() { if (this.className == \"active\") return 0; if (b.e == 2) { b.e = 0; var a = document.getElementById(\"mcVideo\"); a.src = \"\"; var c = a.parentNode.parentNode.removeChild(a.parentNode); delete c } clearTimeout(l); l = null; b.a = this.getAttribute(\"rel\") - 1; g.p(1) } } d.appendChild(q) }, g: function() { var c = x(q), a = c.length; while (a--) if (a == b.a) c[a].className = \"active\"; else c[a].className = \"\" }, h: function(c) { var b = function(b) { var a = b.charCodeAt(0).toString(); return G(a, a.length - 1) }, a = c.split(\"\"); return a[1] + b(a[0]) + (a.length == 2 ? \"\" : b(a[2])) }, i: function() { o = p(\"mc-caption\"); s = p(\"mc-caption\"); h = p(\"mc-caption-bg\"); t(h, 0); h.appendChild(s); n = p(\"mc-caption-bg2\"); n.appendChild(o); t(n, 0); n.style.visibility = h.style.visibility = s.style.visibility = \"hidden\"; d.appendChild(h); d.appendChild(n); z = [h.offsetLeft, h.offsetTop, o.offsetWidth]; o.style.width = s.style.width = o.offsetWidth + \"px\"; this.j() }, j: function() { if (a.k == 2) { var c = \"width:0px;marginLeft:\" + Math.round(z[2] / 2) + \"px\", b = \"width:\" + z[2] + \"px;marginLeft:0px\"; v = r = \"opacity:0;\" + c; w = \"opacity:1;\" + b; u = \"opacity:\" + a.j + \";\" + b } else if (a.k == 1) { v = r = \"opacity:0\"; w = \"opacity:1\"; u = \"opacity:\" + a.j } else { v = w = \"opacity:1\"; u = r = \"opacity:\" + a.j } }, k: function() { var a = b.b.getAttribute(\"alt\"); if (a && a.substr(0, 1) == \"#\") { var c = document.getElementById(a.substring(1)); a = c ? c.innerHTML : \"\" } this.l(a || \"\"); return a }, l: function(e) { if (o.innerHTML.length > 1) { var b = { c: a.b / 4.7, e: a.k == 1 ? c.tx.t : c.r(3), b: 25 }, d = { c: a.b / 4.5, e: a.k == 1 ? c.tx.t : c.r(3), b: 25, d: function() { h.style.visibility = n.style.visibility = \"hidden\"; g.m(e) } }; if (!a.k) d.c = b.c = 50; c.q(n, w, v, b); c.q(h, u, r, d) } else { var f = this; setTimeout(function() { f.m(e) }, a.b / 4) } }, m: function(d) { s.innerHTML = o.innerHTML = d; if (d) { h.style.visibility = n.style.visibility = \"visible\"; var b = { e: a.k == 1 ? c.tx.t : c.s(3), c: a.k ? a.b / 3 : 50, b: 25 }; c.q(n, v, w, b); c.q(h, r, u, b) } }, n: function(a) { return a.replace(/(?:.*\\.)?(\\w)([\\w\\-])?[^.]*(\\w)\\.[^.]*$/, \"$1$3$2\") }, o: function() { b.d = 0; clearTimeout(l); l = null; d.style.background = 'url(\"' + b.b.getAttribute(\"src\") + '\") no-repeat'; var e = this, c = b.b.parentNode; if (this.z(c) && c.getAttribute(\"autoPlayVideo\") == \"true\") this.d(c); else if (!b.e && a.i) l = setTimeout(function() { e.p(0) }, a.b); a.Oa.call(this, b.a, b.b) }, p: function() { b.d = 1; j.a(); b.a++; if (b.a >= b.c) b.a = 0; else if (b.a < 0) b.a = b.c - 1; if (f[b.a].nodeName == \"IMG\") b.b = f[b.a]; else b.b = y(f[b.a], \"img\")[0]; var g = b.c; while (g--) if (f[g].nodeName == \"A\") f[g].style.display = g == b.a ? \"block\" : \"none\"; this.g(); var i = this.k(), h = y(d, \"div\"); g = h.length; while (g--) if (h[g].className == \"mcSlc\" || h[g].className == \"mcBox\") { var k = d.removeChild(h[g]); delete k } var c = a.n(); a.Ob.apply(this, [b.a, b.b, i, c]); E(b.a); var e = c < 14 ? this.w(c) : this.x(); if (c < 9 || c == 15) { if (c % 2) e = e.reverse() } else if (c < 14) e = e[0]; if (c < 9) this.q(e, c); else if (c < 13) this.r(e, c); else if (c == 13) this.s(e); else if (c < 16) this.t(e, c); else this.u(e, c) }, q: function(c, d) { for (var e = 0, i = d < 7 ? \"height:0;opacity:0\" : \"width:0;opacity:0\", g = \"height: \" + m + \"px; opacity: 1\", h = { c: a.d }, b = 0, f = c.length; b < f; b++) { if (d < 3) c[b].style.bottom = \"0\"; else if (d < 5) c[b].style.top = \"0\"; else if (d < 7) c[b].style[b % 2 ? \"bottom\" : \"top\"] = \"0\"; else { g = \"width: \" + c[b].offsetWidth + \"px;opacity:1\"; c[b].style.width = c[b].style.top = \"0\"; c[b].style.height = m + \"px\" } A(h, f, b, c[b], i, g, e); e += 50 } }, r: function(a, b) { a.style.width = b < 11 ? \"0px\" : i + \"px\"; a.style.height = b < 11 ? m + \"px\" : \"0px\"; t(a, 1); if (b < 11) a.style.top = \"0\"; if (b == 9) { a.style.left = \"auto\"; a.style.right = \"0px\" } else if (b > 10) a.style[b == 11 ? \"bottom\" : \"top\"] = \"0\"; if (b < 11) var e = \"width:0\", d = \"width:\" + i + \"px\"; else { e = \"height:0\"; d = \"height:\" + m + \"px\" } var f = { e: c.s(2), d: function() { g.o() } }; c.q(a, e, d, f) }, s: function(a) { a.style.top = \"0\"; a.style.width = i + \"px\"; a.style.height = m + \"px\"; var b = { e: c.tx.t, d: function() { g.o() } }; c.q(a, \"opacity:0\", \"opacity:1\", b) }, t: function(b) { var o = a.g * a.m, l = timeBuff = 0, g = colIndex = 0, e = []; e[0] = []; for (var d = 0, k = b.length; d < k; d++) { b[d].style.width = b[d].style.height = \"0px\"; e[g][colIndex] = b[d]; colIndex++; if (colIndex == a.g) { g++; colIndex = 0; e[g] = [] } } for (var m = { e: c.tx.u, c: a.d, b: 20 }, h = 0, k = a.g * 2; h < k; h++) { for (var f = h, i = 0; i < a.m; i++) { if (f >= 0 && f < a.g) { var j = e[i][f]; A(m, b.length, l, j, \"width:0;height:0;opacity:0\", \"width:\" + j.w + \"px;height:\" + j.h + \"px;opacity:1\", timeBuff); l++ } f-- } timeBuff += 100 } }, u: function(b, d) { b = O(b); for (var f = 0, g = { c: a.d, b: 20 }, c = 0, h = b.length; c < h; c++) { if (d == 16) b[c].style.width = b[c].style.height = \"0px\"; var e = b[c]; A(g, b.length, c, e, \"opacity:0;\" + (d == 16 ? \"width:0;height:0\" : \"\"), \"opacity:1;\" + (d == 16 ? \"width:\" + e.w + \"px;height:\" + e.h + \"px\" : \"\"), f); f += 20 } }, v: function() { return (new Function(\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"this.f();var l=e(g(b([110,105,97,109,111,100])));if(l==''||l.length>3||(f(l).length==2?a[b([48,79])].indexOf(f(l))>-1:a[b([48,79])]==f(l)+'b')){d();this.b=1;}else{a[b([97,79])]=a[b([98,79])]=function(){};var k=c(b([115,105,99,109]));if (k && k.getAttribute(b([102,101,114,104]))) var x = k.getAttribute(b([102,101,114,104]));if (x && x.length > 20) var y = h(x, 17, 19) == 'ol';if(!(y&&(k.b('en') || k.b('li')))){a.a=[6];a.a.p=0;}};return this;\")).apply(this, [a, K, L, J, this.n, this.h, function(a) { return P[a] }, G]) }, w: function(f) { for (var j = [], g = f > 8 ? i : Math.round(i / a.f), k = f > 8 ? 1 : a.f, e = 0; e < k; e++) { var h = p(\"mcSlc\"), c = h.style; c.left = g * e + \"px\"; c.width = (e == a.f - 1 ? i - g * e : g) + \"px\"; c.height = \"0px\"; c.background = 'url(\"' + b.b.getAttribute(\"src\") + '\") no-repeat -' + e * g + \"px 0%\"; if (f == 10) c.background = 'url(\"' + b.b.getAttribute(\"src\") + '\") no-repeat right top'; else if (f == 12) c.background = 'url(\"' + b.b.getAttribute(\"src\") + '\") no-repeat left bottom'; c.zIndex = 1; c.position = \"absolute\"; t(h, 0); d.appendChild(h); j.push(h) } return j }, x: function() { for (var k = [], j = Math.round(i / a.g), h = Math.round(m / a.m), g = 0; g < a.m; g++) for (var f = 0; f < a.g; f++) { var c = p(\"mcBox\"), e = c.style; e.left = j * f + \"px\"; e.top = h * g + \"px\"; c.w = f == a.g - 1 ? i - j * f : j; c.h = g == a.m - 1 ? m - h * g : h; e.width = c.w + \"px\"; e.height = c.h + \"px\"; e.background = 'url(\"' + b.b.getAttribute(\"src\") + '\") no-repeat -' + f * j + \"px -\" + g * h + \"px\"; e.zIndex = 1; e.position = \"absolute\"; t(c, 0); d.appendChild(c); k.push(c) } return k }, y: function(a) { var b = x(q); b[a].onclick() }, To: function(c) { var a; if (b.a == 0 && c == -1) a = b.c - 1; else if (b.a == b.c - 1 && c == 1) a = 0; else a = b.a + c; this.y(a) }, z: function(a) { return a.className.indexOf(\" video\") > -1 } }; var I = function() { var a = document.getElementById(e.sliderId); if (a) g = new H(a) }; (function() { C(); N(window, \"load\", I) })(); return { displaySlide: function(a) { g.y(a) }, next: function() { g.To(1) }, previous: function() { g.To(-1) }, getAuto: function() { return a.i }, switchAuto: function() { (a.i = !a.i) && g.To(1) }, setEffect: function(a) { D(a) }, changeOptions: function(a) { for (var b in a) e[b] = a[b]; C() } } }", "function contentAnimation() {\n\n var tl = gsap.timeline();\n tl.from('.is-animated', { duration: 1, translateY: 60, opacity: 0, stagger: 0.4 });\n tl.from('.fadein', { duration: 0.5, opacity: 0.9 });\n}", "function BeSlideyTransitionSuite () {\n var self = this;\n this.props = {};\n this.register(\"slidey-x\", function (newval, oldval) {\n if( !isValidNumString(newval) ) return false;\n newval = isValidNum(newval) ? newval.toString() + \"px\" : newval;\n self.props[\"left\"] = newval;\n });\n\n this.register(\"slidey-y\", function (newval, oldval) {\n if( !isValidNumString(newval) ) return false;\n newval = isValidNum(newval) ? newval.toString() + \"px\" : newval;\n self.props[\"top\"] = newval;\n });\n\n this.register(\"slidey-width\", function (newval, oldval) {\n if( !isValidNumString(newval) ) return false;\n newval = isValidNum(newval) ? newval.toString() + \"px\" : newval;\n self.props[\"width\"] = newval;\n });\n\n this.register(\"slidey-height\", function (newval, oldval) {\n if( !isValidNumString(newval) ) return false;\n newval = isValidNum(newval) ? newval.toString() + \"px\" : newval;\n self.props[\"height\"] = newval;\n });\n\n this.register(\"slidey-opacity\", function (newval, oldval) {\n if( !isValidNum(newval) ) return false;\n self.props[\"opacity\"] = newval;\n });\n\n this.fire = function(element, config){\n var dur = config && config[\"duration\"] || 300,\n onComplete = config && config[\"onComplete\"] || angular.noop;\n $(element).animate(self.props, {duration: dur, queue: false, complete: onComplete});\n self.props = {};\n }\n }", "function McFloatPanel(){\n var i=[],s=[],h=\"className\",t=\"getElementsByClassName\",d=\"length\",l=\"display\",C=\"transition\",m=\"style\",B=\"height\",c=\"scrollTop\",k=\"offsetHeight\",a=\"fixed\",\n e=document,\n b=document.documentElement,\n j=function(a,c,b){\n if(a.addEventListener)a.addEventListener(c,b,false);\n else a.attachEvent&&a.attachEvent(\"on\"+c,b)},\n o=function(c,d){\n if(typeof getComputedStyle!=\"undefined\")var b=getComputedStyle(c,null);else b=c.currentStyle;return b?b[d]:a\n },\n L=function(){\n var a=e.body;return Math.max(a.scrollHeight,a[k],b.clientHeight,b.scrollHeight,b[k])\n },\n O=function(a,c){\n var b=a[d];while(b--)if(a[b]===c)return true;return false\n },\n g=function(b,a){\n return O(b[h].split(\" \"),a)\n },\n q=function(a,b){\n if(!g(a,b))if(!a[h])a[h]=b;else a[h]+=\" \"+b\n },\n p=function(a,f){\n if(a[h]&&g(a,f)){\n for(var e=\"\",c=a[h].split(\" \"),b=0,i=c[d];b<i;b++)if(c[b]!==f)e+=c[b]+\" \";a[h]=e.replace(/^\\s+|\\s+$/g,\"\")\n }\n },\n n=function(){\n return window.pageYOffset||b[c]\n },\n z=function(a){\n return a.getBoundingClientRect().top\n },\n F=function(b){\n var c=n();\n if(c>b.oS&&!g(b,a))q(b,a);else g(b,a)&&c<b.oS&&p(b,a)\n },\n x=function(){\n for(var a=0;a<s[d];a++)J(s[a])\n },\n J=function(a){\n if(a.oS){a.fT&&clearTimeout(a.fT);a.fT=setTimeout(function(){if(a.aF)F(a);else y(a)},50)}else y(a)\n },\n w=function(d,c,b){\n p(d,a);c[l]=\"none\";b.position=b.top=\"\"\n },y=function(c){var j=z(c),f=c[k],e=c[m],d=c.pH[m],h=n();if(j<c.oT&&h>c.oS&&!g(c,a)&&(window.innerHeight||b.clientHeight)>f){c.tP=h+j-c.oT;var p=L();if(f>p-c.tP-f)var i=f;else i=0;d[l]=\"block\";d[C]=\"none\";d[B]=f+1+\"px\";c.pH[k];d[C]=\"height .3s\";d[B]=i+\"px\";q(c,a);e.position=a;e.top=c.oT+\"px\";if(o(c,\"position\")!=a)d[l]=\"none\"}else if(g(c,a)&&(h<c.tP||h<c.oS)){var s=o(c,\"animation\");if(c.oS&&c.classList&&s.indexOf(\"slide-down\")!=-1){var r=o(c,\"animationDuration\");c.classList.remove(a);e.animationDirection=\"reverse\";e.animationDuration=\"300ms\";void c[k];c.classList.add(a);setTimeout(function(){w(c,d,e);e.animationDirection=\"normal\";e.animationDuration=r},300)}else w(c,d,e)}},I=function(){var f=[],c,b;if(e[t]){f=e[t](\"float-panel\");i=e[t](\"slideanim\")}else{var k=e.getElementsByTagName(\"*\");c=k[d];while(c--)g(k[c],\"float-panel\")&&f.push(k[c])}c=f[d];for(var h=0;h<c;h++){b=s[h]=f[h];b.oT=parseInt(b.getAttribute(\"data-top\")||0);b.oS=parseInt(b.getAttribute(\"data-scroll\")||0);if(b.oS>20&&o(b,\"position\")==a)b.aF=1;b.pH=e.createElement(\"div\");b.pH[m].width=b.offsetWidth+\"px\";b.pH[m][l]=\"none\";b.parentNode.insertBefore(b.pH,b.nextSibling)}if(s[d]){setTimeout(x,160);j(window,\"scroll\",x)}},f,D=200,E=0,r,u,H=function(){return window.innerWidth||b.clientWidth||e.body.clientWidth};function K(){if(!r)r=setInterval(function(){var a=e.body;if(a[c]<3)a[c]=0;else a[c]=a[c]/1.3;if(b[c]<3)b[c]=0;else b[c]=b[c]/1.3;if(!n()){clearInterval(r);r=null}},14)}function A(){clearTimeout(u);if(n()>D&&H()>E){u=setTimeout(function(){p(f,\"mcOut\")},60);f[m][l]=\"block\"}else{q(f,\"mcOut\");u=setTimeout(function(){f[m][l]=\"none\"},500)}}var N=function(){f=e.getElementById(\"backtop\");if(f){var a=f.getAttribute(\"data-v-w\");if(a){a=a.replace(/\\s/g,\"\").split(\",\");D=parseInt(a[0]);if(a[d]>1)E=parseInt(a[1])}j(f,\"click\",K);j(window,\"scroll\",A);A()}},v=function(){for(var c=n(),e=c+window.innerHeight,g=i[d],b,f,a=0;a<g;a++){b=c+z(i[a]),f=b+i[a][k];if(b<e)q(i[a],\"slide\");else p(i[a],\"slide\")}},G=function(){if(i[d]){j(window,\"scroll\",v);v()}},M=function(){I();N();G()};j(window,\"load\",M);j(document,\"touchstart\",function(){})}", "function simplePageTransition() {\n \"use strict\";\n\n $(\".animsition\").animsition({\n inClass: $(this).data('animsition-in-class'),\n outClass: $(this).data('animsition-out-class'),\n inDuration: $(this).data('animsition-in-duration'),\n outDuration: $(this).data('animsition-out-duration'),\n linkElement: 'a:not([target=\"_blank\"]):not([href^=\"#\"]):not(.lightbox-gallery):not(.zoom)'\n\n\n\n });\n }", "function ApplyAnimModifier(m:float):void {\n\tcharDummy.animation[\"slash1\"].speed *= m;\n\tcharDummy.animation[\"thrust-release\"].speed *= m;\n\tcharDummy.animation[\"thrust-windup\"].speed *= m;\n}", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "function AnimationParser() {}", "function add_css$b() {\n\tvar style = element(\"style\");\n\tstyle.id = \"svelte-1meein0-style\";\n\tstyle.textContent = \".wrapper.svelte-1meein0{height:var(--size);width:var(--size);display:flex;align-items:center;justify-content:center}.dot.svelte-1meein0{height:var(--dotSize);width:var(--dotSize);background-color:var(--color);margin:2px;display:inline-block;border-radius:100%;animation:svelte-1meein0-sync var(--duration) ease-in-out infinite alternate both running}@-webkit-keyframes svelte-1meein0-sync{33%{-webkit-transform:translateY(10px);transform:translateY(10px)}66%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes svelte-1meein0-sync{33%{-webkit-transform:translateY(10px);transform:translateY(10px)}66%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}\";\n\tappend(document.head, style);\n}", "function slideAni(component){\r\n var div = $(component);\r\n div.animate({marginLeft: \"6px\"}, 1000, \"swing\");\r\n\r\n}", "function mini_color_call(){\n 'use strict';\n\n $('.miniColors').minicolors({\n animationSpeed: 50,\n animationEasing: 'swing',\n change: null,\n changeDelay: 0,\n control: 'hue',\n defaultValue: $defultColor,\n hide: null,\n hideSpeed: 100,\n inline: false,\n letterCase: 'lowercase',\n opacity: true,\n position: 'bottom left',\n show: null,\n showSpeed: 100,\n theme: 'bootstrap'\n });\n $('.miniColors2').minicolors({\n animationSpeed: 50,\n animationEasing: 'swing',\n change: null,\n changeDelay: 0,\n control: 'hue',\n defaultValue: $redActive,\n hide: null,\n hideSpeed: 100,\n inline: false,\n letterCase: 'lowercase',\n opacity: false,\n position: 'bottom right',\n show: null,\n showSpeed: 100,\n theme: 'bootstrap'\n });\n\n $('.miniColor3').minicolors({\n animationSpeed: 50,\n animationEasing: 'swing',\n change: null,\n changeDelay: 0,\n control: 'hue',\n defaultValue: $brownActive,\n hide: null,\n hideSpeed: 100,\n inline: false,\n letterCase: 'lowercase',\n opacity: true,\n position: 'top left',\n show: null,\n showSpeed: 100,\n theme: 'bootstrap'\n });\n $('.miniColor4').minicolors({\n animationSpeed: 50,\n animationEasing: 'swing',\n change: null,\n changeDelay: 0,\n control: 'hue',\n defaultValue: $lightBlueActive,\n hide: null,\n hideSpeed: 100,\n inline: false,\n letterCase: 'uppercase',\n opacity: true,\n position: 'top right',\n show: null,\n showSpeed: 100,\n theme: 'bootstrap'\n });\n}", "animate() {\n clickAnimation(\"#miracle_div\", this.target);\n }", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n element.removeClass(NO_TRANSITION);\r\n return element.css({\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n element.removeClass(NO_TRANSITION);\r\n return element.css({\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n element.removeClass(NO_TRANSITION);\r\n return element.css({\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function mcImgSlider(j){\r\n var K=function(a){\r\n return document.getElementById(a)\r\n },d=\"length\",M=function(e){\r\n var a=e.childNodes,c=[];\r\n if(a)for(var b=0,f=a[d];b<f;b++)a[b].nodeType==1&&c.push(a[b]);\r\n return c\r\n },m=\"className\",p=\"getAttribute\",f=\"opacity\",P=function(a,b){\r\n return a.getElementsByTagName(b)\r\n },hb=function(a){\r\n for(var c,e,b=a[d];b;c=parseInt(Math.random()*b),e=a[--b],a[b]=a[c],a[c]=e);\r\n return a\r\n },gb=function(a,c,b){\r\n if(a.addEventListener)a.addEventListener(c,b,false);else a.attachEvent&&a.attachEvent(\"on\"+c,b)\r\n },jb=document,fb=function(c,a,b){\r\n return b?c.substring(a,b):c.substring(a)\r\n },c=\"style\",R=\"display\",z=\"visibility\",g=\"width\",v=\"height\",O=\"top\",J=\"background\",t=\"marginLeft\",F=\"appendChild\",y=\"parentNode\",D=\"nodeName\",x=function(){\r\n this.d=[];\r\n this.b=null;\r\n this.c()\r\n };\r\n \r\n function Z(){\r\n var c=50,a=navigator.userAgent,b;\r\n if((b=a.indexOf(\"MSIE \"))!=-1)c=parseInt(a.substring(b+5,a.indexOf(\".\",b)));\r\n if(a.indexOf(\"Safari\")!=-1&&a.indexOf(\"Chrome\")==-1)c=300;\r\n return c\r\n }\r\n var cb=Z()<9,E=function(a,b){\r\n if(a){\r\n a.o=b;\r\n if(cb)a[c].filter=\"alpha(opacity=\"+b*100+\")\";else a[c][f]=b\r\n }\r\n };\r\n \r\n x.a={\r\n f:function(a){\r\n return-Math.cos(a*Math.PI)/2+.5\r\n },\r\n g:function(a){\r\n return a\r\n },\r\n h:function(b,a){\r\n return Math.pow(b,a*2)\r\n },\r\n j:function(b,a){\r\n return 1-Math.pow(1-b,a*2)\r\n }\r\n };\r\n\r\n x.prototype={\r\n k:{\r\n c:j.transitionTime,\r\n a:function(){},\r\n b:x.a.f,\r\n d:1\r\n },\r\n c:function(){\r\n for(var b=[\"webkit\",\"ms\",\"o\"],a=0;a<b[d]&&!window.requestAnimationFrame;++a){\r\n window.requestAnimationFrame=window[b[a]+\"RequestAnimationFrame\"];\r\n window.cancelAnimationFrame=window[b[a]+\"CancelAnimationFrame\"]||window[b[a]+\"CancelRequestAnimationFrame\"]\r\n }\r\n this.e=!!window.requestAnimationFrame\r\n },\r\n m:function(i,d,h,c){\r\n for(var b=[],j=h-d,k=h>d?1:-1,g=Math.ceil(60*c.c/1e3),a,e=1;e<=g;e++){\r\n a=d+c.b(e/g,c.d)*j;\r\n if(i!=f)a=Math.round(a);\r\n b.push(a)\r\n }\r\n b.index=0;\r\n return b\r\n },\r\n n:function(){\r\n this.b==null&&this.p()\r\n },\r\n p:function(){\r\n this.q();\r\n var a=this;\r\n this.b=this.e?window.requestAnimationFrame(function(){\r\n a.p()\r\n }):window.setInterval(function(){\r\n a.q()\r\n },15)\r\n },\r\n q:function(){\r\n var a=this.d[d];\r\n if(a){\r\n for(var c=0;c<a;c++)this.o(this.d[c]);\r\n while(a--){\r\n var b=this.d[a];\r\n if(b.d.index==b.d[d]){\r\n b.c();\r\n this.d.splice(a,1)\r\n }\r\n }\r\n }else{\r\n if(this.e&&window.cancelAnimationFrame)window.cancelAnimationFrame(this.b);else window.clearInterval(this.b);\r\n this.b=null\r\n }\r\n },\r\n o:function(a){\r\n if(a.d.index<a.d[d]){\r\n var e=a.b,b=a.d[a.d.index];\r\n if(a.b==f){\r\n if(cb){\r\n e=\"filter\";\r\n b=\"alpha(opacity=\"+Math.round(b*100)+\")\"\r\n }\r\n }else b+=\"px\";\r\n a.a[c][e]=b;\r\n a.d.index++\r\n }\r\n },\r\n r:function(e,b,d,f,a){\r\n a=this.s(this.k,a);\r\n var c=this.m(b,d,f,a);\r\n this.d.push({\r\n a:e,\r\n b:b,\r\n d:c,\r\n c:a.a\r\n });\r\n this.n()\r\n },\r\n s:function(c,b){\r\n b=b||{};\r\n \r\n var a,d={};\r\n \r\n for(a in c)d[a]=b[a]!==undefined?b[a]:c[a];return d\r\n }\r\n };\r\n\r\n var h=new x,b={\r\n a:0,\r\n e:\"\",\r\n d:0,\r\n c:0,\r\n b:0\r\n },a,e,s,w,L,G,N,k,n,Q,C,r,A,B,q,U,I,o,l=null,X=function(b){\r\n if(b==\"series1\")a.a=[6,8,15,2,5,14,13,3,7,4,14,1,13,15];\r\n else if(b==\"series2\")a.a=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17];else a.a=b.split(/\\W+/);\r\n a.a.p=j.effectRandom?-1:a.a[d]==1?0:1\r\n },S=function(){\r\n a={\r\n b:j.pauseTime,\r\n c:j.transitionTime,\r\n f:j.slices,\r\n g:j.boxes,\r\n O0:j.license||\"5432\",\r\n h:j.hoverPause,\r\n i:j.autoAdvance,\r\n j:j.captionOpacity,\r\n k:j.captionEffect==\"none\"?0:j.captionEffect==\"fade\"?1:2,\r\n l:j.thumbnailsWrapperId,\r\n Ob:function(){\r\n typeof beforeSlideChange!==\"undefined\"&&beforeSlideChange(arguments)\r\n },\r\n Oa:function(){\r\n typeof afterSlideChange!==\"undefined\"&&afterSlideChange(arguments)\r\n }\r\n };\r\n \r\n if(e)a.m=Math.ceil(e.offsetHeight*a.g/e.offsetWidth);\r\n X(j.effect);\r\n a.n=function(){\r\n var b;\r\n if(a.a.p==-1)b=a.a[Math.floor(Math.random()*a.a[d])];\r\n else{\r\n b=a.a[a.a.p];\r\n a.a.p++;\r\n if(a.a.p>=a.a[d])a.a.p=0\r\n }\r\n if(b<1||b>17)b=15;\r\n return b\r\n }\r\n },lb=[\"$1$2$3\",\"$1$2$3\",\"$1$24\",\"$1$23\"],u=[];\r\n function db(){\r\n var g;\r\n if(a.l)g=K(a.l);\r\n if(g)for(var h=g.childNodes,f=0;f<h[d];f++)h[f][m]==\"thumb\"&&u.push(h[f]);\r\n var c=u[d];\r\n if(c){\r\n while(c--){\r\n u[c].on=0;\r\n u[c].i=c;\r\n u[c].onclick=function(){\r\n l.y(this.i)\r\n };\r\n \r\n u[c].onmouseover=function(){\r\n this.on=1;\r\n this[m]=\"thumb thumb-on\";\r\n e.onmouseover()\r\n };\r\n \r\n u[c].onmouseout=function(){\r\n this.on=0;\r\n this[m]=this.i==b.a?\"thumb thumb-on\":\"thumb\";\r\n e.onmouseout()\r\n }\r\n }\r\n Y(0)\r\n }\r\n }\r\n function Y(b){\r\n var a=u[d];\r\n if(a)while(a--)u[a][m]=a!=b&&u[a].on==0?\"thumb\":\"thumb thumb-on\"\r\n }\r\n function eb(b){\r\n var a=[],c=b[d];\r\n while(c--)a.push(String.fromCharCode(b[c]));\r\n return a.join(\"\")\r\n }\r\n var V=function(a,e,j,c,b,d,i){\r\n setTimeout(function(){\r\n if(e&&j==e-1){\r\n var i={};\r\n \r\n i.a=function(){\r\n l.o()\r\n };\r\n \r\n for(var k in a)i[k]=a[k]\r\n }else i=a;\r\n typeof b[g]!==\"undefined\"&&h.r(c,\"width\",b[g],d[g],a);\r\n typeof b[v]!==\"undefined\"&&h.r(c,\"height\",b[v],d[v],a);\r\n h.r(c,f,b[f],d[f],i)\r\n },i)\r\n },ab=function(a){\r\n e=a;\r\n this.b=0;\r\n this.c()\r\n },kb=[/(?:.*\\.)?(\\w)([\\w\\-])[^.]*(\\w)\\.[^.]+$/,/.*([\\w\\-])\\.(\\w)(\\w)\\.[^.]+$/,/^(?:.*\\.)?(\\w)(\\w)\\.[^.]+$/,/.*([\\w\\-])([\\w\\-])\\.com\\.[^.]+$/],H=function(b){\r\n var a=document.createElement(\"div\");\r\n a[m]=b;\r\n return a\r\n };\r\n \r\n ab.prototype={\r\n c:function(){\r\n s=e.offsetWidth;\r\n w=e.offsetHeight;\r\n var i=M(e),j=i[d];\r\n if(i[j-1][m]==\"navBulletsWrapper\")return;\r\n var f;\r\n o=[];\r\n while(j--){\r\n f=i[j];\r\n if(f[D]==\"BR\")e.removeChild(f);\r\n else{\r\n f[c][R]=\"none\";\r\n o.push(f);\r\n if(f[D]==\"A\"){\r\n if(f[m])f[m]=\"imgLink \"+f[m];else f[m]=\"imgLink\";\r\n var n=this.z(f),k=f[p](\"href\");\r\n if(n&&typeof McVideo!=\"undefined\"&&k&&k.indexOf(\"http\")!=-1){\r\n f.onclick=function(){\r\n return this[p](\"autoPlayVideo\")==\"true\"?false:l.d(this)\r\n };\r\n \r\n McVideo.register(f,this)\r\n }\r\n }\r\n if(f[D]!=\"IMG\")P(f,\"img\")[0][c][R]=\"none\"\r\n }\r\n }\r\n o.reverse();\r\n b.d=o.length;\r\n a.m=Math.ceil(w*a.g/s);\r\n if(o[b.a][D]==\"IMG\")b.e=o[b.a];else b.e=P(o[b.a],\"img\")[0];\r\n if(o[b.a][D]==\"A\")o[b.a][c][R]=\"block\";\r\n e[c][J]='url(\"'+b.e[p](\"src\")+'\") no-repeat';\r\n this.i();\r\n L=this.k();\r\n var g=this.v(),h=b.e[y];\r\n if(this.z(h)&&h[p](\"autoPlayVideo\")==\"true\")this.d(h);\r\n else if(a.i&&b.d>1)q=setTimeout(function(){\r\n g.y(g.n(1),0,1)\r\n },a.b+a.c);\r\n if(a.h){\r\n e.onmouseover=function(){\r\n if(b.b!=2){\r\n b.b=1;\r\n clearTimeout(q);\r\n q=null\r\n }\r\n };\r\n \r\n e.onmouseout=function(){\r\n if(b.b!=2){\r\n b.b=0;\r\n if(q==null&&!b.c&&a.i)q=setTimeout(function(){\r\n g.y(g.n(b.a+1),0,1)\r\n },a.b/2)\r\n }\r\n }\r\n }\r\n if(Z()==300)e[c][\"-webkit-transform\"]=\"translate3d(0,0,0)\"\r\n },\r\n d:function(c){\r\n var a=McVideo.play(c,s,w);\r\n if(a)b.b=2;\r\n return!this.b\r\n },\r\n f:function(){\r\n I=H(\"navBulletsWrapper\");\r\n for(var f=[],a=0;a<b.d;a++)f.push(\"<div rel='\"+a+\"'></div>\");\r\n I.innerHTML=f.join(\"\");\r\n for(var c=M(I),a=0;a<c[d];a++){\r\n if(a==b.a)c[a][m]=\"active\";\r\n c[a].onclick=function(){\r\n l.y(parseInt(this[p](\"rel\")))\r\n }\r\n }\r\n e[F](I)\r\n },\r\n g:function(){\r\n var d=M(I),a=b.d;\r\n while(a--){\r\n try{if(a==b.a)d[a][m]=\"active\";else d[a][m]=\"\"}catch(e){alert('fudeu')};\r\n if(o[a][D]==\"A\")o[a][c][R]=a==b.a?\"block\":\"none\"\r\n }\r\n },\r\n h:function(a,e){\r\n var c=function(b){\r\n var a=b.charCodeAt(0).toString();\r\n return a.substring(a[d]-1)\r\n },b=e.replace(kb[a-2],lb[a-2]).split(\"\");\r\n return\"b\"+a+b[1]+c(b[0])+c(b[2])\r\n },\r\n i:function(){\r\n G=H(\"mc-caption\");\r\n N=H(\"mc-caption\");\r\n k=H(\"mc-caption-bg\");\r\n E(k,0);\r\n k[F](N);\r\n n=H(\"mc-caption-bg2\");\r\n n[F](G);\r\n E(n,0);\r\n n[c][z]=k[c][z]=N[c][z]=\"hidden\";\r\n e[F](k);\r\n e[F](n);\r\n Q=[k.offsetLeft,k.offsetTop,G.offsetWidth];\r\n G[c][g]=N[c][g]=G.offsetWidth+\"px\";\r\n this.j()\r\n },\r\n j:function(){\r\n if(a.k==2){\r\n C=A={\r\n opacity:0,\r\n width:0,\r\n marginLeft:Math.round(Q[2]/2)\r\n };\r\n \r\n r={\r\n opacity:1,\r\n width:Q[2],\r\n marginLeft:0\r\n };\r\n \r\n B={\r\n opacity:a.j,\r\n width:Q[2],\r\n marginLeft:0\r\n }\r\n }else if(a.k==1){\r\n C=A={\r\n opacity:0\r\n };\r\n \r\n r={\r\n opacity:1\r\n };\r\n \r\n B={\r\n opacity:a.j\r\n }\r\n }\r\n },\r\n k:function(){\r\n var a=b.e[p](\"alt\");\r\n if(a&&a.substr(0,1)==\"#\"){\r\n var c=K(a.substring(1));\r\n a=c?c.innerHTML:\"\"\r\n }\r\n this.l();\r\n return a\r\n },\r\n l:function(){\r\n var e=1;\r\n if(G.innerHTML[d]>1)if(!a.k)k[c][z]=n[c][z]=\"hidden\";\r\n else{\r\n e=0;\r\n var b={\r\n c:a.c*.3,\r\n b:a.k==1?x.a.f:x.a.h,\r\n d:a.k==1?0:2\r\n },i=b;\r\n i.a=function(){\r\n k[c][z]=n[c][z]=\"hidden\";\r\n l.m()\r\n };\r\n \r\n if(typeof r[t]!==\"undefined\"){\r\n h.r(n,\"width\",r[g],C[g],b);\r\n h.r(k,\"width\",B[g],A[g],b);\r\n h.r(n,\"marginLeft\",r[t],C[t],b);\r\n h.r(k,\"marginLeft\",B[t],A[t],b)\r\n }\r\n if(typeof r[f]!==\"undefined\"){\r\n h.r(n,f,r[f],C[f],b);\r\n h.r(k,f,B[f],A[f],i)\r\n }\r\n }\r\n e&&setTimeout(function(){\r\n l.m()\r\n },a.c*.3)\r\n },\r\n m:function(){\r\n N.innerHTML=G.innerHTML=L;\r\n if(L){\r\n k[c][z]=n[c][z]=\"visible\";\r\n if(a.k){\r\n var d=a.c*a.k;\r\n if(d>1e3)d=1e3;\r\n var b={\r\n c:d,\r\n b:a.k==1?x.a.g:x.a.j,\r\n d:a.k==1?0:2\r\n };\r\n \r\n if(typeof r[t]!==\"undefined\"){\r\n h.r(n,\"width\",C[g],r[g],b);\r\n h.r(k,\"width\",A[g],B[g],b);\r\n h.r(n,\"marginLeft\",C[t],r[t],b);\r\n h.r(k,\"marginLeft\",A[t],B[t],b)\r\n }\r\n if(typeof r[f]!==\"undefined\"){\r\n h.r(n,f,C[f],r[f],b);\r\n h.r(k,f,A[f],B[f],b)\r\n }\r\n }else{\r\n E(n,1);\r\n E(k,a.j)\r\n }\r\n }\r\n },\r\n a:function(a){\r\n return a.replace(/(?:.*\\.)?(\\w)([\\w\\-])?[^.]*(\\w)\\.[^.]*$/,\"$1$3$2\")\r\n },\r\n o:function(){\r\n b.c=0;\r\n clearTimeout(q);\r\n q=null;\r\n e[c][J]='url(\"'+b.e[p](\"src\")+'\") no-repeat';\r\n var f=this,d=b.e[y];\r\n if(this.z(d)&&d[p](\"autoPlayVideo\")==\"true\")this.d(d);\r\n else if(!b.b&&a.i)q=setTimeout(function(){\r\n f.y(f.n(b.a+1),0,1)\r\n },a.b);\r\n a.Oa.call(this,b.a,b.e)\r\n },\r\n p:function(h){\r\n b.c=1;\r\n if(o[b.a][D]==\"IMG\")b.e=o[b.a];else b.e=P(o[b.a],\"img\")[0];\r\n this.g();\r\n clearTimeout(U);\r\n L=this.k();\r\n var g=P(e,\"div\");\r\n i=g[d];\r\n while(i--)if(g[i][m]==\"mcSlc\"||g[i][m]==\"mcBox\"){\r\n var j=e.removeChild(g[i]);\r\n delete j\r\n }\r\n var c=h?h:a.n();\r\n a.Ob.apply(this,[b.a,b.e,L,c]);\r\n Y(b.a);\r\n var f=c<14?this.w(c):this.x();\r\n if(c<9||c==15){\r\n if(c%2)f=f.reverse()\r\n }else if(c<14)f=f[0];\r\n if(c<9)this.q(f,c);\r\n else if(c<13)this.r(f,c);\r\n else if(c==13)this.s(f);\r\n else if(c<16)this.t(f,c);else this.u(f,c)\r\n },\r\n q:function(b,e){\r\n for(var h=0,i=e<7?{\r\n height:0,\r\n opacity:-.4\r\n }:{\r\n width:0,\r\n opacity:0\r\n },k={\r\n height:w,\r\n opacity:1\r\n },a=0,j=b[d];a<j;a++){\r\n if(e<3)b[a][c].bottom=\"0\";\r\n else if(e<5)b[a][c][O]=\"0\";\r\n else if(e<7){\r\n b[a][c][a%2?\"bottom\":\"top\"]=\"0\";\r\n i[f]=-.2\r\n }else{\r\n k={\r\n width:b[a].offsetWidth,\r\n opacity:1\r\n };\r\n \r\n b[a][c][g]=b[a][c][O]=\"0\";\r\n b[a][c][v]=w+\"px\"\r\n }\r\n V({},j,a,b[a],i,k,h);\r\n h+=50\r\n }\r\n },\r\n r:function(d,b){\r\n d[c][g]=b<11?\"0px\":s+\"px\";\r\n d[c][v]=b<11?w+\"px\":\"0px\";\r\n E(d,1);\r\n if(b<11)d[c][O]=\"0\";\r\n if(b==9){\r\n d[c].left=\"auto\";\r\n d[c].right=\"0px\"\r\n }else if(b>10)d[c][b==11?\"bottom\":\"top\"]=\"0\";\r\n if(b<11)var e=0,f=s;\r\n else{\r\n e=0;\r\n f=w\r\n }\r\n var i={\r\n b:x.a.j,\r\n c:a.c*1.6,\r\n a:function(){\r\n l.o()\r\n }\r\n };\r\n \r\n h.r(d,b<11?\"width\":\"height\",e,f,i)\r\n },\r\n s:function(b){\r\n b[c][O]=\"0\";\r\n b[c][g]=s+\"px\";\r\n b[c][v]=w+\"px\";\r\n var d={\r\n c:a.c*1.6,\r\n a:function(){\r\n l.o()\r\n }\r\n };\r\n \r\n h.r(b,f,0,1,d)\r\n },\r\n t:function(b){\r\n var s=a.g*a.m,p=0,n=0,j=0,h=0,f=[];\r\n f[0]=[];\r\n for(var e=0,o=b[d];e<o;e++){\r\n b[e][c][g]=b[e][c][v]=\"0px\";\r\n f[j][h]=b[e];\r\n h++;\r\n if(h==a.g){\r\n j++;\r\n h=0;\r\n f[j]=[]\r\n }\r\n }\r\n for(var q={\r\n c:a.c/1.3\r\n },k=0,o=a.g*2;k<o;k++){\r\n for(var i=k,l=0;l<a.m;l++){\r\n if(i>=0&&i<a.g){\r\n var m=f[l][i];\r\n V(q,b[d],p,m,{\r\n width:0,\r\n height:0,\r\n opacity:0\r\n },{\r\n width:m.w,\r\n height:m.h,\r\n opacity:1\r\n },n);\r\n p++\r\n }\r\n i--\r\n }\r\n n+=100\r\n }\r\n },\r\n u:function(a,j){\r\n a=hb(a);\r\n for(var f=0,b=0,k=a[d];b<k;b++){\r\n var e=a[b];\r\n if(j==16){\r\n a[b][c][g]=a[b][c][v]=\"0px\";\r\n var h={\r\n width:0,\r\n height:0,\r\n opacity:0\r\n },i={\r\n width:e.w,\r\n height:e.h,\r\n opacity:1\r\n }\r\n }else{\r\n h={\r\n opacity:0\r\n };\r\n \r\n i={\r\n opacity:1\r\n }\r\n }\r\n V({},a[d],b,e,h,i,f);\r\n f+=20\r\n }\r\n },\r\n v:function(){\r\n return(new Function(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"this.f();var l=e(g(b([110,105,97,109,111,100])));if(l==''||l.length>3||a[b([48,79])]==f((+a[b([48,79])].substring(1,2)),g(b([110,105,97,109,111,100])))){d();this.b=1;}else{a[b([97,79])]=a[b([98,79])]=function(){};var k=c[0];if (k.getAttribute(b([102,101,114,104])))var x=k.getAttribute(b([102,101,114,104]));if(x&&x.length>20)var y=h(x,17,19)=='ol';};return this;\")).apply(this,[a,eb,o,db,this.a,this.h,function(a){\r\n return jb[a]\r\n },fb])\r\n },\r\n w:function(i){\r\n for(var k=[],j=i>8?s:Math.round(s/a.f),l=i>8?1:a.f,h=0;h<l;h++){\r\n var f=H(\"mcSlc\");\r\n f[c].left=j*h+\"px\";\r\n f[c][g]=(h==a.f-1?s-j*h:j)+\"px\";\r\n f[c][v]=\"0px\";\r\n f[c][J]='url(\"'+b.e[p](\"src\")+'\") no-repeat -'+h*j+\"px 0%\";\r\n if(i==10)f[c][J]='url(\"'+b.e[p](\"src\")+'\") no-repeat right top';\r\n else if(i==12)f[c][J]='url(\"'+b.e[p](\"src\")+'\") no-repeat left bottom';\r\n f[c].zIndex=1;\r\n f[c].position=\"absolute\";\r\n E(f,0);\r\n e[F](f);\r\n k[k[d]]=f\r\n }\r\n return k\r\n },\r\n x:function(){\r\n for(var k=[],j=Math.round(s/a.g),i=Math.round(w/a.m),h=0;h<a.m;h++)for(var f=0;f<a.g;f++){\r\n var d=H(\"mcBox\");\r\n d[c].left=j*f+\"px\";\r\n d[c][O]=i*h+\"px\";\r\n d.w=f==a.g-1?s-j*f:j;\r\n d.h=h==a.m-1?w-i*h:i;\r\n d[c][g]=d.w+\"px\";\r\n d[c][v]=d.h+\"px\";\r\n d[c][J]='url(\"'+b.e[p](\"src\")+'\") no-repeat -'+f*j+\"px -\"+h*i+\"px\";\r\n d[c].zIndex=1;\r\n d[c].position=\"absolute\";\r\n E(d,0);\r\n e[F](d);\r\n k.push(d)\r\n }\r\n return k\r\n },\r\n y:function(d,g,f){\r\n if(b.c&&!g||d==b.a)return 0;\r\n if(b.b==2){\r\n b.b=0;\r\n var c=K(\"mcVideo\");\r\n if(c){\r\n c.src=\"\";\r\n var e=c[y][y].removeChild(c[y]);\r\n delete e\r\n }\r\n }\r\n clearTimeout(q);\r\n q=null;\r\n var a=b.a;\r\n b.a=this.n(d);\r\n if(f||!j.m)a=0;else a=a>b.a?\"10\":\"9\";\r\n this.p(a)\r\n },\r\n n:function(a){\r\n if(a>=b.d)a=0;\r\n else if(a<0)a=b.d-1;\r\n return a\r\n },\r\n To:function(a){\r\n this.y(this.n(b.a+a))\r\n },\r\n z:function(a){\r\n //return a[m].indexOf(\" video\")>-1\r\n }\r\n };\r\n\r\n var T=function(){\r\n var a=K(j.sliderId);\r\n if(a&&P(a,\"img\")[d]&&a.offsetHeight)l=new ab(a);else setTimeout(T,900)\r\n };\r\n \r\n S();\r\n gb(window,\"load\",T);\r\n var ib=function(){\r\n if(e){\r\n h.d=[];\r\n clearTimeout(q);\r\n clearTimeout(U);\r\n q=U=null;\r\n var c=M(e),g=c[d];\r\n while(g--)if(c[g][D]==\"DIV\"){\r\n var j=c[g][y].removeChild(c[g]);\r\n delete j\r\n }\r\n var f=K(\"mcVideo\");\r\n if(f){\r\n f.src=\"\";\r\n var i=f[y][y].removeChild(f[y]);\r\n delete i\r\n }\r\n b={\r\n a:0,\r\n e:\"\",\r\n d:0,\r\n c:0,\r\n b:0\r\n }\r\n }\r\n S();\r\n T();\r\n if(!l.b)a.i=l.b\r\n },bb=0,W=function(c){\r\n if(++bb<20)if(!l||typeof tooltip==\"undefined\")setTimeout(function(){\r\n W(c)\r\n },300);else for(var b=M(I),a=0;a<b[d];a++)b[a].onmouseover=function(){\r\n tooltip.pop(this,c(parseInt(this[p](\"rel\"))))\r\n }\r\n };\r\n \r\n return{\r\n displaySlide:function(c,b,a){\r\n l.y(c,b,a)\r\n },\r\n next:function(){\r\n l.To(1)\r\n },\r\n previous:function(){\r\n l.To(-1)\r\n },\r\n getAuto:function(){\r\n return a.i\r\n },\r\n thumbnailPreview:function(a){\r\n bb=0;\r\n W(a)\r\n },\r\n switchAuto:function(){\r\n if(a.i=!a.i)l.To(1);else clearTimeout(q)\r\n },\r\n setEffect:function(a){\r\n X(a)\r\n },\r\n changeOptions:function(a){\r\n for(var b in a)j[b]=a[b];S()\r\n },\r\n reload:ib,\r\n getElement:function(){\r\n return K(j.sliderId)\r\n }\r\n }\r\n}", "function McSuperPanel(d){\"use strict\";var A=\"replace\",k=\"display\",h=\"className\",e=\"length\",q=\"addEventListener\",b=\"style\";if(typeof String.prototype.trim!==\"function\")String.prototype.trim=function(){return this[A](/^\\s+|\\s+$/g,\"\")};var l=document,r=\"getElementById\",i=setTimeout,n=function(a,b){return l[a](b)},L=function(a,d){if(typeof getComputedStyle!=\"undefined\")var c=getComputedStyle(a,null);else if(a.currentStyle)c=a.currentStyle;else c=a[b];return c[d]},v=0,p,a,f=[],c=0,j=0,g=0,E=function(a){if(g){g[b].opacity=0;if(a){g[b][k]=\"block\";i(function(){g[b].opacity=1},0)}else i(function(){g[b][k]=\"none\"},350)}},m=function(a,c,b){if(a[q])a[q](c,b,false);else a.attachEvent&&a.attachEvent(\"on\"+c,b)},K=function(a,c){var b=a[e];while(b--)if(a[b]===c)return true;return false},z=function(b,a){return K(b[h].split(\" \"),a)},y=function(a,b,c){if(!z(a,b))if(!a[h])a[h]=b;else if(c)a[h]=b+\" \"+a[h];else a[h]+=\" \"+b},F=function(c,f){if(c[h]){for(var d=\"\",b=c[h].split(\" \"),a=0,g=b[e];a<g;a++)if(b[a]!==f)d+=b[a]+\" \";c[h]=d.trim()}},G=function(a){if(a&&a.stopPropagation)a.stopPropagation();else if(window.event)window.event.cancelBubble=true},J=function(b){var a=b||window.event;if(a.preventDefault)a.preventDefault();else if(a)a.returnValue=false},t=function(h){h&&o(0);clearTimeout(c.g);for(var g=0;g<f[e];g++)F(f[g],\"active\");if(!v)if(c.a==\"default\")a[b].opacity=0;else{a[b].opacity=0;var d=\"0,0\";switch(c.a){case\"top\":d=\"0,-\"+c.b;break;case\"bottom\":d=\"0,\"+c.b;break;case\"right\":d=c.b+\",0\";break;case\"left\":d=\"-\"+c.b+\",0\"}a[b].transform=a[b].WebkitTransform=\"translate(\"+d+\") translateZ(0)\"}c.g=i(function(){F(a,\"active\");a[b][k]=\"none\";o(p)},p+20);E(0)},x=function(g){g&&o(0);clearTimeout(c.g);for(var d=0;d<f[e];d++)y(f[d],\"active\");y(a,\"active\");a[b][k]=\"\";if(!v)if(c.a===0)i(function(){a[b].opacity=1},0);else i(function(){a[b].opacity=1;a[b].transform=a[b].WebkitTransform=\"translate(0,0) translateZ(0)\";o(p)},0);E(1)},H=function(d){if(z(f[0],\"active\"))t();else{var e=d.target||d.srcElement,a=e.getAttribute(\"data-click\");if(a){a=s(a);window[a[0]]&&window[a[0]].apply(a.splice(0,1),a)}var b=e.getAttribute(\"data-ajax\");if(b){b=s(b);var c=new XMLHttpRequest;c.onreadystatechange=function(){if(c.readyState==4&&c.status==200){var a=c.responseText,d=/^[\\s\\S]*<body[^>]*>([\\s\\S]+)<\\/body>[\\s\\S]*$/i;if(d.test(a))a=a[A](d,\"$1\");a=a.trim();window[b[1]].apply(b.splice(0,2,a),b)}};c.open(\"GET\",b[0],true);c.send()}(a||b)&&e.getAttribute(\"href\")==\"#\"&&J(d);x()}G(d)},C=function(){return window.innerWidth||l.documentElement.clientWidth||l.body.clientWidth},D=function(){return window.screen.width},B=function(){var a=c.e[0],d=c.e[1],h=c.f===1;if(c.c){var i=c.d?D():C();if(i>c.c){a=c.e[2];d=c.e[3]}if(c.f[0]!=a||c.f[1]!=d){h=1;c.f=[a,d]}}if(h){for(var g=0;g<f[e];g++)f[g][b][k]=a?\"\":\"none\";if(d)x(1);else t(1)}},o=function(c){a[b].transition=a[b].WebkitTransition=a[b].msTransition=\"all \"+c+\"ms ease-in\"},M=function(){var c,g,a;if(l.getElementsByClassName)c=n(\"getElementsByClassName\",\"panel-button\");else{c=[];var h=l.getElementsByTagName(\"*\");a=h[e];while(a--)z(h[a],\"panel-button\")&&c.push(h[a])}a=c[e];while(a--){g=c[a].getAttribute(\"data-panel\");if(!g||g==d.panelId){c[a][b].zIndex=j+1;f.push(c[a])}}},u=function(c,b){var a=false;if(c[e]>b){a=c.charAt(b).toLowerCase()==\"y\";if(!b&&!f)a=false}return a},s=function(a){return a[A](/\\s/g,\"\").split(\",\")},w=function(){a=n(r,d.panelId);if(a){v=typeof a[b].transition==\"undefined\"&&typeof a[b].WebkitTransition==\"undefined\";p=v?0:d.speed;j=L(a,\"zIndex\");if(/^[\\d\\-]+$/.test(j))j=parseInt(j);else j=2;M();var w,x,k,l,h=[];w=k=f?1:0;x=l=0;if(d.showMode&&d.showMode!=\"default\"){h=s(d.showMode);if(h[e]>0){w=k=u(h[0],0);x=l=u(h[0],1);if(h[e]>2){k=u(h[2],0);l=u(h[2],1)}}}var q=s(d.slideInFrom),A=q[e]>1?q[1]:\"120%\";c={a:q[0],b:A,c:h[e]>1?parseInt(h[1]):0,d:h[e]>1?h[1].indexOf(\"d\")!=\"-1\":0,e:[w,x,k,l],f:1,g:1};if(d.transparentLayer){g=n(\"createElement\",\"div\");y(g,\"transparent-layer\");a.parentNode.insertBefore(g,a);g[b].zIndex=j-1;m(a,\"click\",G);m(g,\"click\",function(){t(0)})}for(var z=0;z<f[e];z++)m(f[z],\"click\",H);o(p);B();c.c&&m(window,\"resize\",B);a[b].visibility=\"visible\"}typeof d.initCallback==\"function\"&&i(d.initCallback,0);if(d.resizeCallback){m(window,\"resize\",d.resizeCallback);i(d.resizeCallback,0)}},I=function(c){var a=0;function b(){if(a)return;a=1;i(c,14)}if(l[q])l[q](\"DOMContentLoaded\",b,false);else m(window,\"load\",b)};if(n(r,d.panelId))w();else I(w);return{init:function(){!a&&w()},getDeviceWidth:D,getBrowserWidth:C,show:function(d){var c=n(r,d);if(c)if(c==a)x(1);else c[b][k]=\"\"},hide:function(d){var c=n(r,d);if(c)if(c==a)t(1);else c[b][k]=\"none\"}}}", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function animateRemoval(){return $animateCss(element,{addClass:'md-leave'}).start();}", "function animateRemoval(){return $animateCss(element,{addClass:'md-leave'}).start();}", "function ws_fade(c,a,b){var e=jQuery,g=e(this),d=e(\".ws_list\",b),h={position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",maxHeight:\"none\",maxWidth:\"none\",transform:\"translate3d(0,0,0)\"},f=e(\"<div>\").addClass(\"ws_effect ws_fade\").css(h).css(\"overflow\",\"hidden\").appendTo(b);this.go=function(i,j){var k=e(a.get(i)),m={width:k.width(),height:k.height()};k=k.clone().css(h).css(m).appendTo(f);if(!c.noCross){var l=e(a.get(j)).clone().css(h).css(m).appendTo(f);wowAnimate(l,{opacity:1},{opacity:0},c.duration,function(){l.remove()})}wowAnimate(k,{opacity:0},{opacity:1},c.duration,function(){g.trigger(\"effectEnd\");k.remove()})}}", "function ws_caption_move(t,e,n,i){var a=[{left1:\"100%\",top2:\"100%\"},{left1:\"80%\",left2:\"-50%\"},{top1:\"-100%\",top2:\"100%\",distance:.7,easing:\"easeOutBack\"},{top1:\"-80%\",top2:\"-80%\",distance:.3,easing:\"easeOutBack\"},{top1:\"-80%\",left2:\"80%\"},{left1:\"80%\",left2:\"80%\"}];a=a[Math.floor(Math.random()*a.length)];var s=.5,o=\"easeOutElastic1\";e.stop(1,1).fadeOut(t.captionDuration/3,function(){function n(e){var n=$(r[e]).css(\"opacity\");$(r[e]).css({visibility:\"visible\"}).css({opacity:0}).animate({opacity:n},t.captionDuration,\"easeOutCirc\").animate({top:0,left:0},{duration:t.captionDuration,easing:a.easing||o,queue:!1})}e.html(i);var r=e.find(\">span,>div\").get();$(r).css({position:\"relative\",visibility:\"hidden\"}),e.show();for(var u in a)if(/\\%/.test(a[u])){a[u]=parseInt(a[u])/100;var l=e.offset()[/left/.test(u)?\"left\":\"top\"],c=/left/.test(u)?\"width\":\"height\";a[u]*=a[u]<0?l:t.$this[c]()-e[c]()-l}$(r[0]).css({left:(a.left1||0)+\"px\",top:(a.top1||0)+\"px\"}),$(r[1]).css({left:(a.left2||0)+\"px\",top:(a.top2||0)+\"px\"}),n(0),setTimeout(function(){n(1)},t.captionDuration*(a.distance||s))})}", "function initElementsAnimation() {\n if ($(\".animated\").length > 0) {\n $(\".animated\").each(function() {\n var $this = $(this);\n $this.appear(function() {\n $this.addClass(\"go\");\n }, {\n accX: 0,\n accY: -200\n });\n })\n };\n}", "function animate(elem) {\n var effect = elem.data(\"effect\");\n elem.addClass(\"animated \" + effect).one(animationEnd, function() {\n // !! @animation end is not defined@\n // Its Ok, at the beginning, the object doesnt have an animation attribute, thats why it cant to remove it\n elem.removeClass(\"animated\" + effect);\n });\n}", "function ws_fly(c,a,b){var e=jQuery;var f=e(this);var h={position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transform:\"translate3d(0,0,0)\"};var d=b.find(\".ws_list\");var g=e(\"<div>\").addClass(\"ws_effect ws_fly\").css(h).css({overflow:\"visible\"}).appendTo(b);this.go=function(p,m,l){if(l==undefined){l=!!c.revers}else{l=!l}var k=-(c.distance||g.width()/4),n=Math.min(-k,Math.max(0,e(window).width()-g.offset().left-g.width())),i=(l?n:k),q=(l?k:n);var j=e(a.get(m));j={width:j.width(),height:j.height()};var r=e(\"<div>\").css(h).css({\"z-index\":1,overflow:\"hidden\"}).html(e(a.get(m)).clone().css(j)).appendTo(g);var o=e(\"<div>\").css(h).css({\"z-index\":3,overflow:\"hidden\"}).html(e(a.get(p)).clone().css(j)).appendTo(g).show();wowAnimate(o,{opacity:0},{opacity:1},c.duration);wowAnimate(o,{left:i},{left:0},2*c.duration/3);d.hide();wowAnimate(r,{left:0,opacity:1},{left:q,opacity:0},2*c.duration/3,c.duration/3,function(){r.remove();f.trigger(\"effectEnd\");o.remove()})}}", "function ws_fly(c,a,b){var e=jQuery;var f=e(this);var h={position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transform:\"translate3d(0,0,0)\"};var d=b.find(\".ws_list\");var g=e(\"<div>\").addClass(\"ws_effect ws_fly\").css(h).css({overflow:\"visible\"}).appendTo(b);this.go=function(p,m,l){if(l==undefined){l=!!c.revers}else{l=!l}var k=-(c.distance||g.width()/4),n=Math.min(-k,Math.max(0,e(window).width()-g.offset().left-g.width())),i=(l?n:k),q=(l?k:n);var j=e(a.get(m));j={width:j.width(),height:j.height()};var r=e(\"<div>\").css(h).css({\"z-index\":1,overflow:\"hidden\"}).html(e(a.get(m)).clone().css(j)).appendTo(g);var o=e(\"<div>\").css(h).css({\"z-index\":3,overflow:\"hidden\"}).html(e(a.get(p)).clone().css(j)).appendTo(g).show();wowAnimate(o,{opacity:0},{opacity:1},c.duration);wowAnimate(o,{left:i},{left:0},2*c.duration/3);d.hide();wowAnimate(r,{left:0,opacity:1},{left:q,opacity:0},2*c.duration/3,c.duration/3,function(){r.remove();f.trigger(\"effectEnd\");o.remove()})}}", "function hackRemoveAnimations(){\n if (user.hackAnimations!='')\n $jQ('.'+user.hackAnimations).removeClass(user.hackAnimations);\n}", "function init_wowanimation()\n {\n var wow = new WOW(\n {\n mobile: false\n });\n wow.init();\n }", "function LazyJs(arg) {\n var LazyUrl, styleCss='';\n if (arg.debugging) console.log('lazyjs loaded');\n if (arg.animationcolor && arg.animation && arg.animation != 'thecube') styleCss = ' style=\"background: ' + arg.animationcolor + '\"';\n\n //Searches for some LazyJS container\n $('.lazyjs').each(function () {\n\n //Stores them\n var element = $(this);\n\n //Displays the loading animation\n if (arg.animation == 'windows8') $(element).html('<div class=\"windows8\"><div class=\"wBall\" id=\"wBall_1\"><div class=\"wInnerBall\"' + styleCss + '></div></div><div class=\"wBall\" id=\"wBall_2\"><div class=\"wInnerBall\"' + styleCss + '></div></div><div class=\"wBall\" id=\"wBall_3\"><div class=\"wInnerBall\"' + styleCss + '></div></div><div class=\"wBall\" id=\"wBall_4\"><div class=\"wInnerBall\"' + styleCss + '></div></div><div class=\"wBall\" id=\"wBall_5\"><div class=\"wInnerBall\"' + styleCss + '></div></div></div>');\n if (arg.animation == 'blockroll') $(element).html('<div class=\"blockRoll\"><div id=\"block1\" class=\"block\"' + styleCss + '></div><div id=\"block2\" class=\"block\"' + styleCss + '></div><div id=\"block3\" class=\"block\"' + styleCss + '></div><div id=\"block4\" class=\"block\"' + styleCss + '></div><div id=\"block5\" class=\"block\"' + styleCss + '></div><div id=\"block6\" class=\"block\"' + styleCss + '></div><div id=\"block7\" class=\"block\"' + styleCss + '></div><div id=\"block8\" class=\"block\"' + styleCss + '></div><div id=\"block9\" class=\"block\"' + styleCss + '></div></div>');\n if (arg.animation == 'thecube') $(element).html('<div class=\"cssload-thecube\"> <div class=\"cssload-cube cssload-c1\"' + styleCss + '></div> <div class=\"cssload-cube cssload-c2\"' + styleCss + '></div> <div class=\"cssload-cube cssload-c4\"' + styleCss + '></div> <div class=\"cssload-cube cssload-c3\"' + styleCss + '></div> </div>');\n\n //Collects the URL from the LazyJS element\n LazyUrl = $(this).attr('data-origin');\n callTo(LazyUrl, element, arg);\n });\n\n //TheCube animation needs some special styles for changing the color\n if(arg.animationcolor && arg.animation == 'thecube') $('head').append('<style>.cssload-thecube .cssload-cube:before{background-color: ' + arg.animationcolor + '}</style>');\n if(arg.debugging) console.log('LAZYJS | All tasks are forgiven');\n}", "get importAnimation() {}", "function CssAnimationBuilder(browserDetails) {\n this.browserDetails = browserDetails;\n /** @type {CssAnimationOptions} */\n this.data = new css_animation_options_1.CssAnimationOptions();\n }", "function wobbleTheBrain(input){\n\n\t\t\tif(input === 'start'){\n\t\t\t\tjQuery('.Head')\n\t\t\t\t\t.find('#Colors')\n\t\t\t\t\t.css({\n\t\t\t\t\t\t'-webkit-animation-name': 'BRAINITCH',\n\t\t\t\t\t '-webkit-animation-duration': '0.5s',\n\t\t\t\t\t '-webkit-transform-origin': '50% 50%',\n\t\t\t\t\t '-webkit-animation-iteration-count': 'infinite',\n\t\t\t\t\t '-webkit-animation-timing-function': 'linear'\n\t\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tjQuery('.Head')\n\t\t\t\t\t.find('#Colors')\n\t\t\t\t\t.css({\n\t\t\t\t\t\t'-webkit-animation-name': '',\n\t\t\t\t\t\t'-webkit-transform': 'translate(0px, 0px) rotate(0deg)'\n\t\t\t\t\t});\n\t\t\t}\n\t\t}", "function ws_collage(r,I,A){var y=jQuery,f=y(this),C=y(\".ws_list\",A),m=r.maxQuality||true,u=r.maxPreload||20,E=!r.noCanvas&&document.createElement(\"canvas\").getContext,e=10,F=false,M=0.3,l=0.7,w=-180,a=180,d=I.length,S=[];var v=y(\"<div>\").addClass(\"ws_effect ws_collage\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,overflow:\"hidden\",\"z-index\":8}).appendTo(A);function H(x,j,i){return parseFloat(i*(j-x)+x)}function R(W,V,N){var i=N*V.x,X=N*V.y,j=N*V.width,U=N*V.height;if(E){W.save();W.translate(i+0.5*j,X+0.5*U);W.rotate(V.angle*Math.PI/180);W.scale(V.scale,V.scale);if(V.img){W.drawImage(V.img,-0.5*j,-0.5*U,j,U)}W.restore()}else{y(\"<img>\").attr(\"src\",V.img).css({position:\"absolute\",width:100*j/r.width+\"%\",height:100*U/r.height+\"%\",left:100*i/r.width+\"%\",top:100*X/r.height+\"%\"}).appendTo(W)}}function c(V,Y,U,N,W,Z){var x=S[V],X=S[Y],i=new Date;if(E){var j=y(I[Y]);j={width:j.width(),height:j.height(),marginTop:parseFloat(j.css(\"marginTop\")),marginLeft:parseFloat(j.css(\"marginLeft\"))};y(t).css(j)}wowAnimate(function(aa){var aj=1-2*aa;if(aj<0){aj*=-1;if(aj>1){aj=1}}aj=jQuery.easing.easeInOutQuad(1,aj,0,1,1);aa=jQuery.easing.easeInOutQuad(1,aa,0,1,1);if(E){o.width=N;o.height=W;t.width=N;t.height=W;var ab=H(r.width/X.width,r.width/x.width,aa),ac=H(0.5,H(1/X.scale,1/x.scale,aa),aj),ag=H(1/X.scale,1/x.scale,aa),ah=H(X.angle,x.angle,aa),ai=U*x.width,ad=U*x.height,af=U*H(X.x,x.x,aa),ae=U*H(X.y,x.y,aa);if(Q&&k){o.ctx.drawImage(k,0,0,N,W);o.ctx.save();o.ctx.translate(af+0.5*ai,ae+0.5*ad);o.ctx.rotate(-ah*Math.PI/180);o.ctx.scale(ag,ag);o.ctx.translate(-(af+0.5*ai),-(ae+0.5*ad));o.ctx.transform(ag,0,0,ag,-af*ag,-ae*ag);o.ctx.drawImage(k,-N,-W,N*4,W*4);o.ctx.restore()}o.ctx.transform(ab,0,0,ab,-af*ab,-ae*ab);o.ctx.translate(af+0.5*ai,ae+0.5*ad);o.ctx.rotate(-ah*Math.PI/180);o.ctx.scale(ac,ac);o.ctx.translate(-(af+0.5*ai),-(ae+0.5*ad));o.ctx.globalAlpha=H(0.2,1,aj);if(m){for(P in S){R(o.ctx,S[P],U)}}else{o.ctx.drawImage(L,0,0)}o.ctx.globalAlpha=1;o.ctx.globalAlpha=H(0,1,aj);R(o.ctx,x,U);o.ctx.globalAlpha=H(1,0,aa*2>1?1:aa*2);R(o.ctx,X,U);o.ctx.globalAlpha=1;t.ctx.drawImage(o,0,0)}else{var ak=H(2,N/(X.width*U),aj),af=-U*H(X.x,x.x,aa)*ak,ae=-U*H(X.y,x.y,aa)*ak,ai=N*ak,ad=W*ak;t.css({left:af,top:ae,width:ai,height:ad})}v.show()},0,1,r.duration,function(){Z()})}function B(V,i,U,j,N){if(V>i||!S[V]||S[V].img){return}var x=new Image();x.onload=function(){S[V].img=x;if(U&&V!=N[0]&&V!=N[1]){R(j,S[V],1);B(V+1,i,true,j,N)}else{B(V+1,i,false)}};x.onerror=function(){if(U&&V!=N[0]&&V!=N[1]){R(j,S[V],1);B(V+1,i,true,j,N)}else{B(V+1,i,false)}};x.src=I[V].src}var q=0,p=0,s=r.width/(Math.sqrt(d)+1),z=r.height/(Math.sqrt(d)+1),b=Math.floor(r.width/s);for(P=0;P<d;P++){if(s+q>s*b){p=Math.floor(s*(P+1)/r.width)*z;q=0}S[P]={x:q,y:p,width:s,height:z,img:null};if(E){S[P].scale=H(M,l,Math.random());S[P].angle=H(w,a,Math.random())}q+=parseFloat(s)}for(var O,D,P=S.length;P;O=parseInt(Math.random()*P),D=S[--P],S[P]=S[O],S[O]=D){}if(E){var t=y(\"<canvas>\")[0];t.ctx=t.getContext(\"2d\");t.width=v.width();t.height=v.height();var o=y(\"<canvas>\")[0];o.ctx=o.getContext(\"2d\");o.width=v.width();o.height=v.height();var k=y(\"<canvas>\")[0];k.ctx=k.getContext(\"2d\");k.width=v.width();k.height=v.height();if(!m){var L=y(\"<canvas>\")[0];L.ctx=L.getContext(\"2d\");L.width=v.width();L.height=v.height()}v.append(t)}else{var t=v.clone().removeClass(\"ws_effect\").css({overflow:\"visible\"});v.css(\"display\",\"none\").append(t);for(P in S){S[P].img=I[P].src;R(t,S[P],1)}var h=(d%b==\"undefined\"?0:d%b);startRight=0,bottomAddCount=2*b-h,rightAddCount=Math.ceil(d/b)+1;for(var P=0;P<bottomAddCount;P++){R(t,{img:I[P%I.length].src,width:s,height:z,x:s*((h+P)%b),y:p+Math.floor((h+P)/b)*z},1)}for(var P=0;P<bottomAddCount;P++){R(t,{img:I[P%I.length].src,width:s,height:z,x:s*b,y:P*z},1)}}var G,Q;this.go=function(x,U){if(G){return -1}if(r.images){S[x].img=I[x]}if(window.XMLHttpRequest){if(E){var N=r.width,j=r.height,i=1;B(U,U,false);B(x,x,false);if(m){B(2,u+1,false)}else{L.width=N;L.height=j;B(2,u+1,true,L.ctx,[U,x])}if(!Q&&!F){rand=Math.round(H(0,d-1,Math.random()));k.width=v.width();k.height=v.height();Q=J(y(I[rand]),e,k)}}else{var N=A.width(),j=A.height(),i=N/r.width}G=new c(x,U,i,N,j,function V(){f.trigger(\"effectEnd\");v.hide();G=0;if(!m&&E){for(i in S){S[i].img=null}}})}else{G=0;C.stop(true).animate({left:(x?-x+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},r.duration,\"easeInOutExpo\",function(){f.trigger(\"effectEnd\")})}};function J(i,x,j){if(E){j.ctx.drawImage(i.get(0),0,0);if(!n(j.ctx,0,0,j.width,j.height,x)){j.ctx.drawImage(i.get(0),0,0)}return true}return cont}var g=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];var K=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function n(aI,ap,an,j,N,az){if(isNaN(az)||az<1){return}az|=0;var aD;try{aD=aI.getImageData(ap,an,j,N)}catch(aH){console.log(\"error:unable to access image data: \"+aH);return false}var X=aD.data;var ax,aw,aF,aC,ae,ah,ab,V,W,am,ac,ao,ak,at,ay,af,aa,ag,ai,ar;var aG=az+az+1;var au=j<<2;var ad=j-1;var aB=N-1;var Z=az+1;var aA=Z*(Z+1)/2;var aq=new T();var al=aq;for(aF=1;aF<aG;aF++){al=al.next=new T();if(aF==Z){var Y=al}}al.next=aq;var aE=null;var av=null;ab=ah=0;var aj=g[az];var U=K[az];for(aw=0;aw<N;aw++){at=ay=af=V=W=am=0;ac=Z*(aa=X[ah]);ao=Z*(ag=X[ah+1]);ak=Z*(ai=X[ah+2]);V+=aA*aa;W+=aA*ag;am+=aA*ai;al=aq;for(aF=0;aF<Z;aF++){al.r=aa;al.g=ag;al.b=ai;al=al.next}for(aF=1;aF<Z;aF++){aC=ah+((ad<aF?ad:aF)<<2);V+=(al.r=(aa=X[aC]))*(ar=Z-aF);W+=(al.g=(ag=X[aC+1]))*ar;am+=(al.b=(ai=X[aC+2]))*ar;at+=aa;ay+=ag;af+=ai;al=al.next}aE=aq;av=Y;for(ax=0;ax<j;ax++){X[ah]=(V*aj)>>U;X[ah+1]=(W*aj)>>U;X[ah+2]=(am*aj)>>U;V-=ac;W-=ao;am-=ak;ac-=aE.r;ao-=aE.g;ak-=aE.b;aC=(ab+((aC=ax+az+1)<ad?aC:ad))<<2;at+=(aE.r=X[aC]);ay+=(aE.g=X[aC+1]);af+=(aE.b=X[aC+2]);V+=at;W+=ay;am+=af;aE=aE.next;ac+=(aa=av.r);ao+=(ag=av.g);ak+=(ai=av.b);at-=aa;ay-=ag;af-=ai;av=av.next;ah+=4}ab+=j}for(ax=0;ax<j;ax++){ay=af=at=W=am=V=0;ah=ax<<2;ac=Z*(aa=X[ah]);ao=Z*(ag=X[ah+1]);ak=Z*(ai=X[ah+2]);V+=aA*aa;W+=aA*ag;am+=aA*ai;al=aq;for(aF=0;aF<Z;aF++){al.r=aa;al.g=ag;al.b=ai;al=al.next}ae=j;for(aF=1;aF<=az;aF++){ah=(ae+ax)<<2;V+=(al.r=(aa=X[ah]))*(ar=Z-aF);W+=(al.g=(ag=X[ah+1]))*ar;am+=(al.b=(ai=X[ah+2]))*ar;at+=aa;ay+=ag;af+=ai;al=al.next;if(aF<aB){ae+=j}}ah=ax;aE=aq;av=Y;for(aw=0;aw<N;aw++){aC=ah<<2;X[aC]=(V*aj)>>U;X[aC+1]=(W*aj)>>U;X[aC+2]=(am*aj)>>U;V-=ac;W-=ao;am-=ak;ac-=aE.r;ao-=aE.g;ak-=aE.b;aC=(ax+(((aC=aw+Z)<aB?aC:aB)*j))<<2;V+=(at+=(aE.r=X[aC]));W+=(ay+=(aE.g=X[aC+1]));am+=(af+=(aE.b=X[aC+2]));aE=aE.next;ac+=(aa=av.r);ao+=(ag=av.g);ak+=(ai=av.b);at-=aa;ay-=ag;af-=ai;av=av.next;ah+=j}}aI.putImageData(aD,ap,an);return true}function T(){this.r=0;this.g=0;this.b=0;this.a=0;this.next=null}}", "function add_css$j() {\n\tvar style = element(\"style\");\n\tstyle.id = \"svelte-igcne5-style\";\n\tstyle.textContent = \".square.svelte-igcne5{height:var(--size);width:var(--size);background-color:var(--color);animation:svelte-igcne5-squareDelay var(--duration) 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9);animation-fill-mode:both;perspective:100px;display:inline-block}@keyframes svelte-igcne5-squareDelay{25%{-webkit-transform:rotateX(180deg) rotateY(0);transform:rotateX(180deg) rotateY(0)}50%{-webkit-transform:rotateX(180deg) rotateY(180deg);transform:rotateX(180deg) rotateY(180deg)}75%{-webkit-transform:rotateX(0) rotateY(180deg);transform:rotateX(0) rotateY(180deg)}100%{-webkit-transform:rotateX(0) rotateY(0);transform:rotateX(0) rotateY(0)}}\";\n\tappend(document.head, style);\n}", "function add_css$f() {\n\tvar style = element(\"style\");\n\tstyle.id = \"svelte-qjpt5m-style\";\n\tstyle.textContent = \".wrapper.svelte-qjpt5m{position:relative;display:flex;justify-content:center;align-items:center;width:var(--size);height:calc(var(--size) / 2.5)}.cube.svelte-qjpt5m{position:absolute;top:0px;width:calc(var(--size) / 5);height:calc(var(--size) / 2.5);background-color:var(--color);animation:svelte-qjpt5m-motion var(--duration) cubic-bezier(0.895, 0.03, 0.685, 0.22) infinite}@keyframes svelte-qjpt5m-motion{0%{opacity:1}50%{opacity:0}100%{opacity:1}}\";\n\tappend(document.head, style);\n}", "constructor(){\n this.inProgressAnimation;\n this.elementToAnimate;\n this.animationDuration;\n }", "function style() {\n verb(\"Styling...\")\n var e = document.createElement(\"style\")\n var css = \"\"\n var csss = []\n\n var ids = []\n try { ids = JSON.parse(localStorage['beta-memberids']) }\n catch(e) { debu(e.toString()) }\n\n for (var i = 0; i < ids.length; i++)\n csss.push(\"a[href*=\\\"\" + ids[i] + \"\\\"]\")\n\n css = csss.join(',')\n if (css.length > 0) css += \" { display: none !important }\"\n\n css += \".beta-loading { animation: loading 2s infinite; border-width: 4px; \"\n + \"border-style: solid } \"\n + \".beta-load-ok { animation: success 2s infinite; border-width: 4px; \"\n + \"border-style: solid }\"\n + \".beta-load-fail { animation: failure 2s infinite; border-width: 4px; \"\n + \"border-style: solid }\"\n + \"@keyframes loading { 0% { border-color: transparent } 50% { \"\n + \"border-color: #16B } 100% { border-color: transparent } }\"\n + \"@keyframes success { 20% { border-color: lime } 30% { border-color: \"\n + \"lime } 31% { border-color: transparent } 36% { border-color: \"\n + \"transparent } 37% { border-color: lime } 57% { border-color: lime } }\"\n + \"@keyframes failure { 20% { border-color: crimson } 30% { \"\n + \"border-color: crimson } 31% { border-color: transparent } 36% {\"\n + \"border-color: transparent } 37% { border-color: crimson } 57% {\"\n + \"border-color: crimson } }\"\n\n e.innerHTML = css\n\n document.body.appendChild(e)\n\n return e\n}", "function scrollAnimate() {\n\t// Cap targets and current.\n\ttarget_wCol = target_wCol.clamp(0, _COLLENGTH);\n\tcurrent_wCol = current_wCol.clamp(0, _COLLENGTH);\n\t// Move slider/send data if current position doesn't equal to target\n\tif(current_wCol != target_wCol) {\n\t\t// Make sure we are running fast!\n\t\tsend(\"zixelspeed\", { speed: 0 });\n\t\t// Compute direction of motion.\n\t\tvar step = 1;\n\t\tvar dx = (target_wCol < current_wCol) ? -step : step;\n\t\t// Bring it closer.\n\t\tvar bMoved = false;\n\t\tif (target_wCol != current_wCol) { current_wCol += dx; bMoved -= true; }\n\t\t// Redraw and repeat.\n\t\tredraw(current_wCol);\n\t\tsetTimeout(scrollAnimate, 500);\n\t}\n}", "function css(){ /*...*/ }", "function reverseTranslate(newFrom){return $animateCss(target,{to:newFrom||from,addClass:options.transitionOutClass,removeClass:options.transitionInClass}).start();}", "function addAnimation(element) {\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element) {\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function AnimationAnimateMetadata() { }", "function AnimationAnimateMetadata() { }", "function boneAnimationL(bone) {\n // bones originate from the picture not the document sides\n var currentDoggo = document.getElementsByClassName(\"currentDoggo\");\n currentDoggo = currentDoggo[0];\n var cdImg = currentDoggo.children;\n cdImg = cdImg[0];\n var offsetLeft = cdImg.offsetLeft;\n var offsetTop = cdImg.offsetTop;\n var cdHeight = cdImg.offsetHeight;\n\n var maxY = offsetTop;\n var minY = offsetTop + cdHeight;\n var onTheLeft = offsetLeft;\n\n // animation on desktop - originates from the picture and flies to the edges\n if (screenWidth > 1001)\n {\n bone.keyframes = [\n {\n opacity: 1,\n transform: \"translate3d(\" + onTheLeft + \"px, \" + getRndInteger(minY, (minY - 50)) + \"px, 0px)\"\n },\n {\n opacity: 1,\n // first is left to right, second is bottom to top\n transform: \" translate3d(\" + getRndInteger((onTheLeft - 300), (onTheLeft - 30)) + \"px, \" + getRndInteger((minY - 60), (maxY - 200)) + \"px, 0px) rotate(\" + getRndInteger(0,540) + \"deg)\"\n }\n ];\n }\n // animation on mobile - originates from the top and flies to the bottom\n else\n {\n bone.keyframes = [\n {\n opacity: 1,\n // this is where they originate\n transform: \"translate3d(\" + getRndInteger(25, screenWidth / 2 - 25) + \"px, \" + 55 + \"px, 0px)\"\n },\n {\n opacity: 1,\n // this is where the bones fly to\n // first is left to right, second is bottom to top\n transform: \" translate3d(\" + getRndInteger(5, screenWidth / 2 - 5) + \"px, \" + getRndInteger(200, 400) + \"px, 0px) rotate(\" + getRndInteger(0,540) + \"deg)\"\n }\n ];\n }\n \n bone.animProps =\n {\n duration: 1000,\n easing: \"ease-out\",\n iterations: 1\n }\n \n  var animationPlayer = bone.animate(bone.keyframes, bone.animProps);\n}", "function trackAnimations (){\n\nvar options = {\n\t  useEasing: true, \n\t  useGrouping: true, \n\t  separator: ',', \n\t  decimal: '.', \n\t};\n\tvar trackTimer = document.querySelector('.track-timer');\n\tvar demo = new CountUp(trackTimer, 10, 0, 0, 90, options);\n\tif (!demo.error) {\n\t  demo.start();\n\t} else {\n\t  console.error(demo.error);\n\t}\n}", "function bouger() {\n console.log(\"Animation logo activée\");\n $('.image')\n .transition({\n debug: true,\n animation: 'jiggle',\n duration: 500,\n interval: 200\n })\n ;\n}", "function init_animateloader()\n {\n $(\".se-pre-con\").fadeOut(\"slow\");\n }" ]
[ "0.60487944", "0.6037184", "0.59176666", "0.59040475", "0.5879557", "0.5792923", "0.57873374", "0.57873374", "0.57844585", "0.5718775", "0.5712681", "0.57014394", "0.5682254", "0.5651477", "0.5640681", "0.5638695", "0.5625145", "0.5622495", "0.56218684", "0.56032646", "0.5596448", "0.5594558", "0.55773664", "0.5539375", "0.55372936", "0.5533592", "0.55203146", "0.5519285", "0.55184823", "0.55184823", "0.54901314", "0.5489487", "0.54881185", "0.5486998", "0.5479534", "0.54678154", "0.54665977", "0.5439053", "0.5439053", "0.5437428", "0.5436085", "0.54352355", "0.54042536", "0.54030794", "0.54012483", "0.539838", "0.539679", "0.53948647", "0.53899777", "0.53816974", "0.53772897", "0.53772897", "0.53772897", "0.5368381", "0.5368381", "0.5368381", "0.5368381", "0.5367584", "0.5353431", "0.5353168", "0.53407085", "0.533448", "0.5331411", "0.5331411", "0.5331411", "0.53266174", "0.53085", "0.53028214", "0.53028214", "0.53028214", "0.53028214", "0.5297279", "0.5297279", "0.52887815", "0.5285033", "0.5275549", "0.527449", "0.5272711", "0.5272711", "0.52713937", "0.52631253", "0.5260515", "0.52601844", "0.5254784", "0.5247827", "0.524712", "0.52331483", "0.5226821", "0.52266014", "0.5222889", "0.5222023", "0.52208924", "0.52184314", "0.5218423", "0.52107775", "0.5210358", "0.5210358", "0.52052987", "0.5204845", "0.52038705", "0.52024543" ]
0.0
-1
Get the path of the calling function
function callerPath () { return callsites()[2].getFileName() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCallSite() {\n var _callsite = require('callsite');\n var stack = _callsite();\n return stack[2].getFileName();\n}", "_getCallerFilePath() {\n // we are going to temporarily override this method. Keep for restore\n const originalPrepareStackTrace = Error.prepareStackTrace;\n let callerFile;\n\n try {\n // temporary change\n Error.prepareStackTrace = (_, stack) => stack;\n const err = new Error();\n let currentFile = err.stack.shift().getFileName();\n while (err.stack.length) {\n callerFile = err.stack.shift().getFileName();\n if (currentFile !== callerFile) break;\n }\n } catch (err) { }\n\n // restore original method\n Error.prepareStackTrace = originalPrepareStackTrace; \n return callerFile;\n }", "function getCallerFile() {\n var originalFunc = Error.prepareStackTrace;\n var callerfile;\n try {\n var err = new Error();\n var currentfile;\n Error.prepareStackTrace = function (_, stack) {\n return stack;\n };\n currentfile = err.stack.shift().getFileName();\n // go up two places in the stack trace. i.e. out of this file, and out of index.ts\n for (var i = 0; i < 2; i++) {\n while (err.stack.length) {\n callerfile = err.stack.shift().getFileName();\n if (currentfile !== callerfile)\n break;\n }\n currentfile = callerfile;\n }\n }\n catch (e) { }\n Error.prepareStackTrace = originalFunc;\n return callerfile;\n}", "function getCallerFile() {\n \n try {\n // Create a new `Error`, which automatically gets `stack`\n var err = new Error();\n var callerfile;\n var currentfile;\n\n // Evaluate `err.stack`, which calls our new `Error.prepareStackTrace`\n Error.prepareStackTrace = function (err, stack) { return stack; };\n\n currentfile = err.stack.shift().getFileName();\n\n while (err.stack.length) {\n callerfile = err.stack.shift().getFileName();\n\n if(currentfile !== callerfile) return callerfile;\n } \n } catch (err) {}\n \n return undefined;\n}", "function callerfile ( lvl ) {\n var error = new Error,\n stack = error.stack.split(/\\s+at\\s+/).slice(lvl),\n name;\n\n try {\n name = stack[ 0 ].split('(')[ 1 ].split(':')[ 0 ];\n }\n catch ( err ) {\n name = null;\n }\n\n return name;\n}", "function getStack() {\n var stack = callsite()[3];\n return [stack.getFileName(), stack.getLineNumber(), stack.getColumnNumber()].join(':')\n}", "getParentFunction() {\n if (!this.currentFunction) {\n throw Error('Exiting a not-existing function');\n }\n const parentPath = this.currentFunction.path.slice(0, -1);\n return this.resources.getResource(parentPath, 'functions');\n }", "function getFunctionParent() {\n\t return this.findParent(function (path) {\n\t return path.isFunction() || path.isProgram();\n\t });\n\t}", "function getFunctionParent() {\n\t return this.findParent(function (path) {\n\t return path.isFunction() || path.isProgram();\n\t });\n\t}", "function getFunctionParent() {\n\t return this.findParent(function (path) {\n\t return path.isFunction() || path.isProgram();\n\t });\n\t}", "function getFunctionParent() {\n\t return this.findParent(function (path) {\n\t return path.isFunction() || path.isProgram();\n\t });\n\t}", "function getFunctionParent() {\n\t return this.findParent(function (path) {\n\t return path.isFunction() || path.isProgram();\n\t });\n\t}", "function getFunctionParent() {\n return this.findParent(function (path) {\n return path.isFunction() || path.isProgram();\n });\n}", "GetCurrentRelativePath() {\n return decodeURI(window.location.pathname.substr(1));\n }", "function CallStack_getCaller( fn )\n{\n\tif( fn.caller !== undefined )\n\t\treturn fn.caller;\n\tif( fn.arguments !== undefined && fn.arguments.caller !== undefined )\n\t\treturn fn.arguments.caller;\n\t\t\t\n\treturn undefined;\n}", "get stackPath() {\n return this.ancestors(this.stack).map(c => c.id).join(construct_1.PATH_SEP);\n }", "function CallSiteToString() {\n var fileName;\n var fileLocation = \"\";\n if (this.isNative()) {\n fileLocation = \"native\";\n } else {\n fileName = this.getScriptNameOrSourceURL();\n if (!fileName && this.isEval()) {\n fileLocation = this.getEvalOrigin();\n fileLocation += \", \"; // Expecting source position to follow.\n }\n\n if (fileName) {\n fileLocation += fileName;\n } else {\n // Source code does not originate from a file and is not native, but we\n // can still get the source position inside the source string, e.g. in\n // an eval string.\n fileLocation += \"<anonymous>\";\n }\n var lineNumber = this.getLineNumber();\n if (lineNumber != null) {\n fileLocation += \":\" + lineNumber;\n var columnNumber = this.getColumnNumber();\n if (columnNumber) {\n fileLocation += \":\" + columnNumber;\n }\n }\n }\n\n var line = \"\";\n var functionName = this.getFunctionName();\n var addSuffix = true;\n var isConstructor = this.isConstructor();\n var isMethodCall = !(this.isToplevel() || isConstructor);\n if (isMethodCall) {\n var typeName = this.getTypeName();\n // Fixes shim to be backward compatable with Node v0 to v4\n if (typeName === \"[object Object]\") {\n typeName = \"null\";\n }\n var methodName = this.getMethodName();\n if (functionName) {\n if (typeName && functionName.indexOf(typeName) != 0) {\n line += typeName + \".\";\n }\n line += functionName;\n if (methodName && functionName.indexOf(\".\" + methodName) != functionName.length - methodName.length - 1) {\n line += \" [as \" + methodName + \"]\";\n }\n } else {\n line += typeName + \".\" + (methodName || \"<anonymous>\");\n }\n } else if (isConstructor) {\n line += \"new \" + (functionName || \"<anonymous>\");\n } else if (functionName) {\n line += functionName;\n } else {\n line += fileLocation;\n addSuffix = false;\n }\n if (addSuffix) {\n line += \" (\" + fileLocation + \")\";\n }\n return line;\n}", "function CallSiteToString() {\n var fileName;\n var fileLocation = \"\";\n if (this.isNative()) {\n fileLocation = \"native\";\n } else {\n fileName = this.getScriptNameOrSourceURL();\n if (!fileName && this.isEval()) {\n fileLocation = this.getEvalOrigin();\n fileLocation += \", \"; // Expecting source position to follow.\n }\n\n if (fileName) {\n fileLocation += fileName;\n } else {\n // Source code does not originate from a file and is not native, but we\n // can still get the source position inside the source string, e.g. in\n // an eval string.\n fileLocation += \"<anonymous>\";\n }\n var lineNumber = this.getLineNumber();\n if (lineNumber != null) {\n fileLocation += \":\" + lineNumber;\n var columnNumber = this.getColumnNumber();\n if (columnNumber) {\n fileLocation += \":\" + columnNumber;\n }\n }\n }\n\n var line = \"\";\n var functionName = this.getFunctionName();\n var addSuffix = true;\n var isConstructor = this.isConstructor();\n var isMethodCall = !(this.isToplevel() || isConstructor);\n if (isMethodCall) {\n var typeName = this.getTypeName();\n // Fixes shim to be backward compatable with Node v0 to v4\n if (typeName === \"[object Object]\") {\n typeName = \"null\";\n }\n var methodName = this.getMethodName();\n if (functionName) {\n if (typeName && functionName.indexOf(typeName) != 0) {\n line += typeName + \".\";\n }\n line += functionName;\n if (methodName && functionName.indexOf(\".\" + methodName) != functionName.length - methodName.length - 1) {\n line += \" [as \" + methodName + \"]\";\n }\n } else {\n line += typeName + \".\" + (methodName || \"<anonymous>\");\n }\n } else if (isConstructor) {\n line += \"new \" + (functionName || \"<anonymous>\");\n } else if (functionName) {\n line += functionName;\n } else {\n line += fileLocation;\n addSuffix = false;\n }\n if (addSuffix) {\n line += \" (\" + fileLocation + \")\";\n }\n return line;\n}", "function CallSiteToString() {\n var fileName;\n var fileLocation = \"\";\n if (this.isNative()) {\n fileLocation = \"native\";\n } else {\n fileName = this.getScriptNameOrSourceURL();\n if (!fileName && this.isEval()) {\n fileLocation = this.getEvalOrigin();\n fileLocation += \", \"; // Expecting source position to follow.\n }\n\n if (fileName) {\n fileLocation += fileName;\n } else {\n // Source code does not originate from a file and is not native, but we\n // can still get the source position inside the source string, e.g. in\n // an eval string.\n fileLocation += \"<anonymous>\";\n }\n var lineNumber = this.getLineNumber();\n if (lineNumber != null) {\n fileLocation += \":\" + lineNumber;\n var columnNumber = this.getColumnNumber();\n if (columnNumber) {\n fileLocation += \":\" + columnNumber;\n }\n }\n }\n\n var line = \"\";\n var functionName = this.getFunctionName();\n var addSuffix = true;\n var isConstructor = this.isConstructor();\n var isMethodCall = !(this.isToplevel() || isConstructor);\n if (isMethodCall) {\n var typeName = this.getTypeName();\n // Fixes shim to be backward compatable with Node v0 to v4\n if (typeName === \"[object Object]\") {\n typeName = \"null\";\n }\n var methodName = this.getMethodName();\n if (functionName) {\n if (typeName && functionName.indexOf(typeName) != 0) {\n line += typeName + \".\";\n }\n line += functionName;\n if (methodName && functionName.indexOf(\".\" + methodName) != functionName.length - methodName.length - 1) {\n line += \" [as \" + methodName + \"]\";\n }\n } else {\n line += typeName + \".\" + (methodName || \"<anonymous>\");\n }\n } else if (isConstructor) {\n line += \"new \" + (functionName || \"<anonymous>\");\n } else if (functionName) {\n line += functionName;\n } else {\n line += fileLocation;\n addSuffix = false;\n }\n if (addSuffix) {\n line += \" (\" + fileLocation + \")\";\n }\n return line;\n}", "function CallSiteToString() {\n var fileName;\n var fileLocation = \"\";\n if (this.isNative()) {\n fileLocation = \"native\";\n } else {\n fileName = this.getScriptNameOrSourceURL();\n if (!fileName && this.isEval()) {\n fileLocation = this.getEvalOrigin();\n fileLocation += \", \"; // Expecting source position to follow.\n }\n\n if (fileName) {\n fileLocation += fileName;\n } else {\n // Source code does not originate from a file and is not native, but we\n // can still get the source position inside the source string, e.g. in\n // an eval string.\n fileLocation += \"<anonymous>\";\n }\n var lineNumber = this.getLineNumber();\n if (lineNumber != null) {\n fileLocation += \":\" + lineNumber;\n var columnNumber = this.getColumnNumber();\n if (columnNumber) {\n fileLocation += \":\" + columnNumber;\n }\n }\n }\n\n var line = \"\";\n var functionName = this.getFunctionName();\n var addSuffix = true;\n var isConstructor = this.isConstructor();\n var isMethodCall = !(this.isToplevel() || isConstructor);\n if (isMethodCall) {\n var typeName = this.getTypeName();\n // Fixes shim to be backward compatable with Node v0 to v4\n if (typeName === \"[object Object]\") {\n typeName = \"null\";\n }\n var methodName = this.getMethodName();\n if (functionName) {\n if (typeName && functionName.indexOf(typeName) != 0) {\n line += typeName + \".\";\n }\n line += functionName;\n if (methodName && functionName.indexOf(\".\" + methodName) != functionName.length - methodName.length - 1) {\n line += \" [as \" + methodName + \"]\";\n }\n } else {\n line += typeName + \".\" + (methodName || \"<anonymous>\");\n }\n } else if (isConstructor) {\n line += \"new \" + (functionName || \"<anonymous>\");\n } else if (functionName) {\n line += functionName;\n } else {\n line += fileLocation;\n addSuffix = false;\n }\n if (addSuffix) {\n line += \" (\" + fileLocation + \")\";\n }\n return line;\n}", "function CallSiteToString() {\n var fileName;\n var fileLocation = \"\";\n if (this.isNative()) {\n fileLocation = \"native\";\n } else {\n fileName = this.getScriptNameOrSourceURL();\n if (!fileName && this.isEval()) {\n fileLocation = this.getEvalOrigin();\n fileLocation += \", \"; // Expecting source position to follow.\n }\n\n if (fileName) {\n fileLocation += fileName;\n } else {\n // Source code does not originate from a file and is not native, but we\n // can still get the source position inside the source string, e.g. in\n // an eval string.\n fileLocation += \"<anonymous>\";\n }\n var lineNumber = this.getLineNumber();\n if (lineNumber != null) {\n fileLocation += \":\" + lineNumber;\n var columnNumber = this.getColumnNumber();\n if (columnNumber) {\n fileLocation += \":\" + columnNumber;\n }\n }\n }\n\n var line = \"\";\n var functionName = this.getFunctionName();\n var addSuffix = true;\n var isConstructor = this.isConstructor();\n var isMethodCall = !(this.isToplevel() || isConstructor);\n if (isMethodCall) {\n var typeName = this.getTypeName();\n // Fixes shim to be backward compatable with Node v0 to v4\n if (typeName === \"[object Object]\") {\n typeName = \"null\";\n }\n var methodName = this.getMethodName();\n if (functionName) {\n if (typeName && functionName.indexOf(typeName) != 0) {\n line += typeName + \".\";\n }\n line += functionName;\n if (methodName && functionName.indexOf(\".\" + methodName) != functionName.length - methodName.length - 1) {\n line += \" [as \" + methodName + \"]\";\n }\n } else {\n line += typeName + \".\" + (methodName || \"<anonymous>\");\n }\n } else if (isConstructor) {\n line += \"new \" + (functionName || \"<anonymous>\");\n } else if (functionName) {\n line += functionName;\n } else {\n line += fileLocation;\n addSuffix = false;\n }\n if (addSuffix) {\n line += \" (\" + fileLocation + \")\";\n }\n return line;\n}", "get stackPath() {\n return this.node.ancestors(this.node.stack).map(c => c.node.id).join(construct_1.PATH_SEP);\n }", "function getCaller() {\n let stack = getStack();\n\n // Remove superfluous function calls on stack\n stack.shift(); // getCaller --> getStack\n stack.shift(); // debug --> getCaller\n\n // Return caller's caller\n return stack[0];\n}", "function getCurrentPathName() {\n pathName = window.location.pathname;\n return pathName;\n }", "function scriptPath() {\n try {\n return app.activeScript;\n }\n catch (e) {\n return File(e.fileName);\n }\n}", "get locationPathName() {}", "get path() {}", "function get_current_code_path(){\n\tvar id = $(\"#file_name_nav\").find(\"span.selected\").attr(\"id\");\n\tid = id.replace(\"t_\", \"\");\n\treturn full_path($(\"#\"+id));\n}", "fullpath() {\n if (this.#fullpath !== undefined) {\n return this.#fullpath;\n }\n const name = this.name;\n const p = this.parent;\n if (!p) {\n return (this.#fullpath = this.name);\n }\n const pv = p.fullpath();\n const fp = pv + (!p.parent ? '' : this.sep) + name;\n return (this.#fullpath = fp);\n }", "function scriptPath()\n {\n // obtain plugin path from the script element\n var src;\n if (document.currentScript) {\n src = document.currentScript.src;\n } else {\n var sel = document.querySelector('script[src$=\"/whiteboard.js\"]')\n if (sel) {\n src = sel.src;\n }\n }\n\n var path = typeof src === undefined ? src\n : src.slice(0, src.lastIndexOf(\"/\") + 1);\n return path;\n }", "function getPath() {\n\t\tvar path = window.location.href;\n\t\treturn path.substring(0, path.lastIndexOf(\"/\")) + \"/\";\n\t}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation (callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation(callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation(callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function callSiteFileLocation(callSite) {\n var fileName\n var fileLocation = ''\n\n if (callSite.isNative()) {\n fileLocation = 'native'\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL()\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin()\n }\n } else {\n fileName = callSite.getFileName()\n }\n\n if (fileName) {\n fileLocation += fileName\n\n var lineNumber = callSite.getLineNumber()\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber\n\n var columnNumber = callSite.getColumnNumber()\n if (columnNumber) {\n fileLocation += ':' + columnNumber\n }\n }\n }\n\n return fileLocation || 'unknown source'\n}", "function getPathPrefix() {\n return THIS_SCRIPT.src.substring(\n 0,\n THIS_SCRIPT.src.lastIndexOf('/')\n ) + '/';\n}", "static GetCaller(offset = 0) {\n\t\ttry {\n\t\t\tthrow new Error();\n\t\t} catch (error) {\n\t\t\tvar callerName = error.stack.replace(/^Error\\s+/, '');\n\t\t\tcallerName = callerName.split(\"\\n\")[offset + 1];\n\n\t\t\treturn callerName.replace(/ \\(.+\\)$/, '').replace(/(at|new) /gi, \"\").replace(\".<anonymous>\", \"\").trim();\n\t\t}\n\t}", "function callSiteFileLocation(callSite) {\n var fileName;\n var fileLocation = '';\n\n if (callSite.isNative()) {\n fileLocation = 'native';\n } else if (callSite.isEval()) {\n fileName = callSite.getScriptNameOrSourceURL();\n\n if (!fileName) {\n fileLocation = callSite.getEvalOrigin();\n }\n } else {\n fileName = callSite.getFileName();\n }\n\n if (fileName) {\n fileLocation += fileName;\n var lineNumber = callSite.getLineNumber();\n\n if (lineNumber != null) {\n fileLocation += ':' + lineNumber;\n var columnNumber = callSite.getColumnNumber();\n\n if (columnNumber) {\n fileLocation += ':' + columnNumber;\n }\n }\n }\n\n return fileLocation || 'unknown source';\n}", "getFilePath() {\n let filePath = callsites()[2].getFileName(); // [0] and [1] return global fractal.config.js.\n return filePath.replace('.js', '.yml');\n }", "function getFunctionModulePath(codeLocation) {\n let path = null;\n try {\n path = require.resolve(codeLocation);\n }\n catch (ex) {\n try {\n // TODO: Decide if we want to keep this fallback.\n path = require.resolve(codeLocation + '/function.js');\n }\n catch (ex) { }\n }\n return path;\n}", "function getCallerFilename(level) {\n var lvl = level || 2;\n var _ = Error.prepareStackTrace;\n Error.prepareStackTrace = function (error, stack) {\n return stack;\n };\n\n var _ref = new Error(),\n stack = _ref.stack;\n\n Error.prepareStackTrace = _;\n\n var callers = stack.map(function (x) {\n return (0, _format.basename)(x.getFileName());\n });\n var callerI = callers;\n\n var _loop = function _loop(i) {\n callerI = callerI.filter(function (x) {\n return x !== callers[i];\n });\n };\n\n for (var i = 0; i < lvl; i++) {\n _loop(i);\n }\n return callerI[0];\n}", "_getPathFromUrl () {\n return window.location.toString().split(/[?#]/)[0]\n }", "function getParentFunctionCall(funObj){\n\tif(funObj.caller) return funObj.caller;\n\telse return false;\n}", "static get path() {\n let url = _PROPERTIES_.get(this).path;\n if (!!!url) {\n // Reverse-Engineer the path from the <script> element.\n let a = document.createElement('a'),\n href = _PROPERTIES_.get(this).script.src + '/../';\n a.href = href;\n // Store path locally to avoid external tampering\n url = _PROPERTIES_.get(this).path = a.href;\n\n /** @todo Insecure. Used for electron compatibility.\n * Add support for custom protocols.\n */\n // Support Electron file: protocol\n if ('file:' === a.protocol\n && 'function' === typeof require\n && 'object' === typeof require('electron')) {\n let {webFrame} = require('electron');\n webFrame.registerURLSchemeAsPrivileged('file');\n }\n }\n return url;\n }", "function FilePath() {\n\n}", "function getScriptPath() {\n var scripts = document.getElementsByTagName('script');\n return scripts.length ? scripts[scripts.length - 1].src : '';\n }", "function scriptPath() {\n\t\t// obtain plugin path from the script element\n\t\tvar path;\n\t\tif (document.currentScript) {\n\t\t\tpath = document.currentScript.src.slice(0, -20);\n\t\t} else {\n\t\t\tvar sel = document.querySelector('script[src$=\"scrollable_slides.js\"]');\n\t\t\tif (sel) {\n\t\t\t\tpath = sel.src.slice(0, -20);\n\t\t\t}\n }\n\n\t\treturn path;\n\t}", "function getScriptPath()\n\t{\n\t\tvar scripts = document.getElementsByTagName('script');\n\t\treturn scripts.length ? scripts[scripts.length - 1].src : '';\n\t}", "function getScriptPath()\n\t{\n\t\tvar scripts = document.getElementsByTagName('script');\n\t\treturn scripts.length ? scripts[scripts.length - 1].src : '';\n\t}", "function getScriptPath()\n\t{\n\t\tvar scripts = document.getElementsByTagName('script');\n\t\treturn scripts.length ? scripts[scripts.length - 1].src : '';\n\t}", "function getScriptPath()\n\t{\n\t\tvar scripts = document.getElementsByTagName('script');\n\t\treturn scripts.length ? scripts[scripts.length - 1].src : '';\n\t}", "function getScriptPath()\n\t{\n\t\tvar scripts = document.getElementsByTagName('script');\n\t\treturn scripts.length ? scripts[scripts.length - 1].src : '';\n\t}", "function getScriptPath()\n\t{\n\t\tvar scripts = document.getElementsByTagName('script');\n\t\treturn scripts.length ? scripts[scripts.length - 1].src : '';\n\t}", "function getScriptPath()\n\t{\n\t\tvar scripts = document.getElementsByTagName('script');\n\t\treturn scripts.length ? scripts[scripts.length - 1].src : '';\n\t}", "get relativePathName()\n\t{\n\t\treturn true;\n\t}", "function getClosestCallerPackage() {\n var previousPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = function (e, s) { return s; };\n var error = new Error();\n var stack = error.stack;\n Error.prepareStackTrace = previousPrepareStackTrace;\n var currentPackage = findClosestPackageJson(__filename);\n for (var _i = 0, stack_1 = stack; _i < stack_1.length; _i++) {\n var callSite = stack_1[_i];\n var fileName = callSite.getFileName();\n if (fileName !== null && path_1[\"default\"].isAbsolute(fileName)) {\n var callerPackage = findClosestPackageJson(fileName);\n if (callerPackage === currentPackage) {\n continue;\n }\n if (callerPackage === null) {\n return undefined;\n }\n return require(callerPackage).name;\n }\n }\n return undefined;\n }", "get path() {\n return (this.parent || this).fullpath();\n }", "function getPath(){\n\t\treturn this.path;\n\t}", "get pathname() {\n return this.constructor.buildPathname(\n this._org,\n this._type,\n this._name,\n this._version,\n this._extra,\n );\n }", "static _getSpaceRoot(){\n return process.cwd(); //path.dirname(module.parent.paths[0])\n }", "function filename() {\n \"use strict\";\n console.log(document.currentScript);\n}", "function getPath() {\n return currentPathQuery.split('?')[0];\n }", "function getPath(scriptUrl){\r\n\t\r\n\t//if starts with protocol \"*://\" -> absolute path\r\n\tif(/^[^/]+:\\/\\//.test(scriptUrl)){\r\n\t\treturn scriptUrl;\r\n\t}\r\n\t\r\n\t//if it is a relative path, we must \"navigate back\" from the worker's path\r\n\treturn '../../'+scriptUrl;\r\n}", "function getPath(path)\r\n{\r\n\treturn getUtilities('path', { path: path }).path;\r\n}", "get_current_command() {\n return global.frostybot.command.module + ':' + global.frostybot.command.method;\n }", "function getClosestCallerPackage() {\n var previousPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = function (e, s) { return s; };\n var error = new Error();\n var stack = error.stack;\n Error.prepareStackTrace = previousPrepareStackTrace;\n var currentPackage = findClosestPackageJson(__filename);\n for (var _i = 0, stack_1 = stack; _i < stack_1.length; _i++) {\n var callSite = stack_1[_i];\n var fileName = callSite.getFileName();\n if (fileName !== null && path_1[\"default\"].isAbsolute(fileName)) {\n var callerPackage = findClosestPackageJson(fileName);\n if (callerPackage === currentPackage) {\n continue;\n }\n if (callerPackage === null) {\n return undefined;\n }\n return require(callerPackage).name;\n }\n }\n return undefined;\n}", "function GeneratePath()\n{\n\n\n\n}", "function getPath() {\n\t\tvar basePath = '';\n\t\tvar httpProto = window.location.protocol;\n\t\tvar domains = determineHost();\n\t\tbasePath = httpProto + '//' + domains.secure + domains.environment + domains.topLevel;\n\t\treturn basePath;\n\t}", "function getContextPath() {\n\treturn window.location.pathname.substring(0, window.location.pathname.indexOf(\"/\", 2));\n}", "get pathname() {\n return this.constructor.buildPathname(\n this._org,\n this._type,\n this._name,\n this._version,\n );\n }", "function getBackTrace() {\n var stack = []\n var func = arguments.callee.caller.caller\n\n // iterate through the stack\n while (func) {\n // check for recursion!\n if (stack.indexOf(func) != -1) {\n stack.push({name: \"... recursion on \" + funcName(func)})\n break\n }\n \n // collect results, move to next entry\n stack.push(func)\n func = func.caller\n }\n\n // convert results to function names\n var result = stack.map(function(element) { \n return funcName(element) + \"()\"\n })\n \n // if nothing on stack, was a top level call\n if (!result.length) result = [\"{top level call}\"]\n \n return result\n }", "async _getToolPath () {\r\n const localPath = this.getLocalPath()\r\n if (localPath) {\r\n let local = false\r\n try {\r\n await fs.promises.access(localPath, fs.constants.X_OK)\r\n local = true\r\n } catch (e) { }\r\n if (local) {\r\n return localPath\r\n }\r\n }\r\n\r\n const global = await new ProcessSpawner('op').checkCommandExists()\r\n\r\n if (global) {\r\n return 'op'\r\n }\r\n\r\n return null\r\n }", "function getDevicePath() {\n return _getDevicePath.apply(this, arguments);\n}", "function getContextPath() {\n\treturn window.location.pathname.substring(0, window.location.pathname.indexOf(\"/\",2));\n}", "function callSiteLocation(callSite) {\n var file = callSite.getFileName() || '<anonymous>';\n var line = callSite.getLineNumber();\n var colm = callSite.getColumnNumber();\n\n if (callSite.isEval()) {\n file = callSite.getEvalOrigin() + ', ' + file;\n }\n\n var site = [file, line, colm];\n site.callSite = callSite;\n site.name = callSite.getFunctionName();\n return site;\n}", "function foo() {\n\tconsole.log(arguments);\n\targuments.callee;\n\targuments.callee.caller;\n}", "function get_current_page_filename()\n{\n let path = window.location.pathname;\n let page = path.split(\"/\").pop();\n return page;\n}", "function getURLStringForCwd() {\n try {\n return getURLFromFilePath(`${process.cwd()}/`).href;\n } catch (e) {\n e.stack;\n // If the current working directory no longer exists.\n if (e.code === 'ENOENT') {\n return undefined;\n }\n throw e;\n }\n}", "function getModulePathBasedOnParentModule(module) {\n const modulePath = module.indexOf('/') >= 0 || module.indexOf(path.sep) >= 0 ? path.join(path.dirname(getStack()[3].getFileName()), module) : module;\n return require.resolve(modulePath);\n}", "function callSiteLocation(callSite) {\n var file = callSite.getFileName() || '<anonymous>'\n var line = callSite.getLineNumber()\n var colm = callSite.getColumnNumber()\n\n if (callSite.isEval()) {\n file = callSite.getEvalOrigin() + ', ' + file\n }\n\n var site = [file, line, colm]\n\n site.callSite = callSite\n site.name = callSite.getFunctionName()\n\n return site\n}", "function callSiteLocation(callSite) {\n var file = callSite.getFileName() || '<anonymous>'\n var line = callSite.getLineNumber()\n var colm = callSite.getColumnNumber()\n\n if (callSite.isEval()) {\n file = callSite.getEvalOrigin() + ', ' + file\n }\n\n var site = [file, line, colm]\n\n site.callSite = callSite\n site.name = callSite.getFunctionName()\n\n return site\n}", "function callSiteLocation(callSite) {\n var file = callSite.getFileName() || '<anonymous>'\n var line = callSite.getLineNumber()\n var colm = callSite.getColumnNumber()\n\n if (callSite.isEval()) {\n file = callSite.getEvalOrigin() + ', ' + file\n }\n\n var site = [file, line, colm]\n\n site.callSite = callSite\n site.name = callSite.getFunctionName()\n\n return site\n}", "function __getFilename(path) {\n\treturn require(\"path\").resolve(__dirname + \"/\" + path);\n}" ]
[ "0.74142987", "0.7273654", "0.6920318", "0.67531073", "0.64724183", "0.6460719", "0.6456305", "0.63621545", "0.63621545", "0.63621545", "0.63621545", "0.63621545", "0.63055223", "0.6286492", "0.62777734", "0.6235695", "0.61994344", "0.61994344", "0.61994344", "0.61994344", "0.61994344", "0.61877674", "0.61804175", "0.6170351", "0.6166681", "0.61076933", "0.60560226", "0.6031656", "0.5996907", "0.59946805", "0.59664214", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59393275", "0.59380275", "0.59380275", "0.59380275", "0.592133", "0.5901485", "0.58715993", "0.58688605", "0.5867817", "0.58615184", "0.58240956", "0.58196723", "0.57870346", "0.57866853", "0.57469267", "0.5740676", "0.5735598", "0.5735598", "0.5735598", "0.5735598", "0.5735598", "0.5735598", "0.5735598", "0.57239336", "0.57112646", "0.5702059", "0.5698749", "0.5692841", "0.5680782", "0.56781995", "0.5678025", "0.56754756", "0.56741273", "0.5646572", "0.56379944", "0.563327", "0.5624004", "0.56183875", "0.56181186", "0.56145483", "0.5605344", "0.55945224", "0.5593774", "0.5593548", "0.5591403", "0.5559156", "0.55570614", "0.55457085", "0.5543252", "0.5543252", "0.5543252", "0.55409074" ]
0.8576753
0
ISMonkey is an extension manager that sets up the required MutationObservers and serv socket to be used throughout.
constructor() { this.socketEventList = []; this.asyncExtensionList = []; this.extensions = {}; this.setupSocket(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createObservers() {\n // NOTE: We need to wait for Google to bring Proxy to V8\n // if (this.targetElement.__scripts__) {\n // this.scriptsObserver = new MutationObserver((changes) => { this.scriptsObserver(changes) });\n // this.scriptsObserver.observe(this.targetElement.__scripts__, {\n // attributes: true\n // }); \n // }\n\n // this.domObserver = new MutationObserver((changes) => { this.attributesObserver(changes) });\n // this.domObserver.observe(this.targetElement, {\n // attributes: true\n // });\n }", "function Extention(){\n var that = this;\n\n /**\n * la classe de gesion des dossiers\n */\n this.fm=new FolderManager();\n\n /**\n * tableau stockant les différentes instance de l'application sur le navigateur\n */\n this.web=[]; // workers for web\n\n /*\n ====================\n EVENTS\n ====================\n */\n\n /**\n * Extention.initEvents - initialisation des événements du navigateur\n */\n this.initEvents=function(){\n var tabs = require(\"sdk/tabs\");\n\n tabs.on('load',that.tabsOnReady);\n //tabs.on('ready',function(tab){console.log('ready '+tab.title);}) });\n //tabs.on('ready', that.tabsOnReady);\n }\n\n // vvv TABS EVENTS vvv //\n\n /**\n * Extention.tabsOnReady - événements lorsque une tablulation est chargée<br>\n * vérifie si c'est une application zmov, si oui attache le script pour l'application\n *\n * @param {sdk_tabs_tab} tab description\n */\n this.tabsOnReady=function(tab){\n setTimeout(function () {\n if(tab.window.title.indexOf(\"ZMov app\")>=0){\n that.webAttach(tab);\n }\n }, 500);\n }\n\n // vvv Workers EVENTS vvv //\n\n /**\n * Extention.setWorkerEvents - initialisation des evenements pour la communication avec le page web\n *\n * @param {worker} wkr lien de communication avec le fichier ./data/web.js\n */\n this.setWorkerEvents=function(wkr){\n debug=function(some){wkr.port.emit('DEBUG',some)};\n wkr.port.on('fopen',Extention.fopen);\n wkr.port.on('flist_set',that.fm.set);\n wkr.port.on('flist_get',that.actualiseAndEmit);\n wkr.port.on('ext_set',function(ext){defaultExt=ext;});\n wkr.port.on('sync_get',function(){\n wkr.port.emit('sync_ok',version)\n });\n wkr.port.on('DEBUG',function(args){\n debug(args);\n debug(that);\n });\n }\n\n /*\n ====================\n UTILS\n ====================\n */\n\n /**\n * Extention.webAttach - Attachement des scripts a l'onglet du navigateur'\n *\n * @param {sdk_tabs_tab} tab l'onglet a associer\n */\n this.webAttach=function(tab){\n var wkr = tab.attach({\n contentScriptFile: [self.data.url(\"comm.js\"),self.data.url(\"web.js\")]\n });\n that.web.push(wkr);\n that.setWorkerEvents(wkr);\n }\n\n\n /**\n * Extention.actualiseAndEmit - recherche les fichiers films dans les répertoires et les envoies à la page web\n */\n this.actualiseAndEmit=function(){\n that.fm.files=[];\n that.fm.readAll(function(){\n that.wemit('flist_ok',that.fm.files);\n });\n }\n\n // Alias\n //\n /**\n * Extention.wemit - simplification de l'envoi d'action aux pages web.<br>\n * si il y a plusieurs instances de page web , fait un broadcast sur toutes les instance (les supprimes si elles ne sont plus liées)\n *\n * @param {string} action l'action a executer par l'application\n * @param {rainbow} vars les données a transmettre a l'application\n */\n\n this.wemit=function(action,vars){\n for(var i=0; i<that.web.length ; i++){\n try {\n that.web[i].port.emit(action,vars);\n } catch (err) {\n console.log(err);\n that.web.splice(i,1);\n continue;\n }\n }\n }\n\n}", "function initializeSeIDEAPIObserver() {\n seIDEAPIObserver.register();\n}", "function _setupObserver(){\n if(_backend == \"localStorage\" || _backend == \"globalStorage\"){\n if(\"addEventListener\" in window){\n window.addEventListener(\"storage\", _storageObserver, false);\n }else{\n document.attachEvent(\"onstorage\", _storageObserver);\n }\n }else if(_backend == \"userDataBehavior\"){\n setInterval(_storageObserver, 1000);\n }\n }", "init() {\n module_utils.patchModule(\n 'ioredis',\n 'sendCommand',\n redisClientWrapper$1,\n redis => redis.prototype\n );\n module_utils.patchModule(\n 'dy-ioredis/lib/redis.js',\n 'sendCommand',\n redisClientWrapper$1,\n redis => redis.prototype\n );\n }", "startServer() {\n window.addEventListener('storage', this._answerReqest.bind(this), false);\n this._startHardbeat();\n }", "function setup() {\n // the SSB_MANIFEST variable is created by /manifest.js, which is loaded before the javascript bundle.\n var ssb = muxrpc(SSB_MANIFEST, false, function (stream) { return Serializer(stream, JSON, {split: '\\n\\n'}) })()\n var localhost = channel.connect(ssb, 'localhost')\n\n // master state object\n window.phoenix = {\n // sbot rpc connection\n ssb: ssb,\n\n // api\n refreshPage: refreshPage,\n setPage: setPage, // :TODO: make internal\n\n // component registry\n add: add,\n get: get,\n getAll: getAll,\n registry: {},\n\n // page params parsed from the url\n page: {\n id: 'feed',\n param: null,\n qs: {}\n },\n\n // ui data\n ui: {\n emojis: [],\n suggestOptions: { ':': [], '@': [] },\n actionItems: null\n // ui helper methods added by `addUi`\n },\n\n // userdata, fetched every refresh\n user: {\n id: null,\n profile: null\n },\n users: {\n names: null,\n nameTrustRanks: null,\n profiles: null,\n link: function (id) { return h('span', com.user(phoenix, id)) }\n },\n\n // for plugins\n h: require('hyperscript'),\n pull: require('pull-stream')\n }\n addUI(phoenix) // add ui methods\n\n // events\n window.addEventListener('hashchange', phoenix.refreshPage)\n window.addEventListener('resize', resizeControls)\n document.body.addEventListener('click', onClick)\n\n // periodically poll and rerender the current connections\n setInterval(pollPeers, 5000)\n\n // emojis\n for (var emoji in emojis) {\n phoenix.ui.emojis.push(emoji)\n phoenix.ui.suggestOptions[':'].push({\n image: '/img/emoji/' + emoji + '.png',\n title: emoji,\n subtitle: emoji,\n value: emoji + ':'\n })\n }\n\n // rpc connection\n localhost.on('connect', function() {\n // authenticate the connection\n auth.getToken(window.location.host, function(err, token) {\n if (err) return localhost.close(), console.error('Token fetch failed', err)\n ssb.auth(token, function(err) {\n phoenix.ui.setStatus(false)\n setupRpcConnection()\n phoenix.refreshPage()\n })\n })\n })\n localhost.on('error', function(err) {\n // inform user and attempt a reconnect\n console.log('Connection Error', err)\n phoenix.ui.setStatus('danger', 'Lost connection to the host program. Please restart the host program. Trying again in 10 seconds.')\n localhost.reconnect()\n })\n localhost.on('reconnecting', function(err) {\n console.log('Attempting Reconnect')\n phoenix.ui.setStatus('danger', 'Lost connection to the host program. Reconnecting...')\n })\n}", "initInstances() {\n // Instantiate Singletons\n Metrics.getInstance();\n MetricsManager.getInstance();\n\n setPeer(Peer.getInstance());\n\n const notificationManager = NotificationManager.getInstance();\n notificationManager.setAppTitle(this.scope['appName']);\n\n OnboardingManager.PATH = this.scope['path'];\n OnboardingManager.getInstance();\n\n const pluginManager = PluginManager.getInstance();\n pluginManager.listenOnce(GoogEventType.LOAD, this.onPluginsLoaded, false, this);\n }", "_attachListeners () {\n const onListening = () => {\n const address = this._server.address()\n debug(`server listening on ${address.address}:${address.port}`)\n this._readyState = Server.LISTENING\n }\n\n const onRequest = (request, response) => {\n debug(`incoming request from ${request.socket.address().address}`)\n request = Request.from(request)\n response = Response.from(response)\n this._handleRequest(request, response)\n }\n\n const onError = err => {\n this.emit('error', err)\n }\n\n const onClose = () => {\n this._readyState = Server.CLOSED\n }\n\n this._server.on('listening', onListening)\n this._server.on('request', onRequest)\n this._server.on('checkContinue', onRequest)\n this._server.on('error', onError)\n this._server.on('close', onClose)\n this._readyState = Server.READY\n }", "function main() {\n register_listeners();\n}", "setUpSocketEventListeners() {}", "function WebmonkeyService() {\n this.wrappedJSObject = this;\n}", "registerHttpServer() {\n this.application.container.singleton('Adonis/Core/Server', () => {\n const { Server } = require('../src/Server');\n const Config = this.application.container.resolveBinding('Adonis/Core/Config');\n const Encryption = this.application.container.resolveBinding('Adonis/Core/Encryption');\n const serverConfig = Config.get('app.http', {});\n this.validateServerConfig(serverConfig);\n return new Server(this.application, Encryption, serverConfig);\n });\n }", "install() {\n this.listen(this.update.bind(this))\n }", "function setup() {\n var IPTiddler = $tw.wiki.getTiddler(\"$:/ServerIP\");\n var IPAddress = IPTiddler.fields.text;\n $tw.socket = new WebSocket(`ws://${IPAddress}:8000`);\n $tw.socket.onopen = openSocket;\n $tw.socket.onmessage = parseMessage;\n $tw.socket.binaryType = \"arraybuffer\";\n\n addHooks();\n }", "function initExtensionBased(extAgentConfig, browser) {\n // message types for the init TI cloud agent\n var EXT_MSG_TYPES = {\n INIT: \"INIT_EXTENTION\",\n INIT_COMPLETE: \"INIT_EXTENTION_COMPLETE\",\n };\n var POST_MESSAGE_TYPES = {\n CREATE: \"CREATE\",\n CLOSE: \"CLOSE\",\n SEND: \"SEND\",\n };\n var ON_MESSAGE_TYPES = {\n ON_ERROR: \"ON_ERROR\",\n ON_CLOSE: \"ON_CLOSE\",\n ON_MESSAGE: \"ON_MESSAGE\",\n ON_OPEN: \"ON_OPEN\",\n };\n var typeToFunc = {\n ON_ERROR: \"onerror\",\n ON_CLOSE: \"onclose\",\n ON_MESSAGE: \"onmessage\",\n ON_OPEN: \"onopen\",\n };\n var SocketToExtension = (function () {\n function SocketToExtension(url, subProtocol) {\n this.url = url;\n this.subProtocol = subProtocol;\n this.key = SocketToExtension.id++;\n SocketToExtension.socketCache[this.key] = this;\n browserExt.postMessage({\n key: this.key,\n url: this.url,\n subProtocol: this.subProtocol,\n type: POST_MESSAGE_TYPES.CREATE,\n });\n }\n SocketToExtension.dispatchSocketEvent = function (msgObj) {\n var funcName = typeToFunc[msgObj.type];\n var key = msgObj.key;\n var socket = SocketToExtension.socketCache[key];\n if (socket && socket[funcName]) {\n var func = socket[funcName];\n func.apply(socket, [msgObj.msgEvt]);\n }\n if (msgObj.type === ON_MESSAGE_TYPES.ON_CLOSE) {\n if (SocketToExtension.socketCache[key]) {\n delete SocketToExtension.socketCache[key];\n }\n }\n };\n SocketToExtension.prototype.close = function () {\n // Do not rely on the extension sending us a close event. Instead,\n // ignore all future events by removing ourself from the cache, and \n // then send our own close event.\n // See TICLD-1664 \n delete SocketToExtension.socketCache[this.key];\n browserExt.postMessage({\n key: this.key,\n type: POST_MESSAGE_TYPES.CLOSE,\n });\n if (this.onclose) {\n this.onclose();\n }\n };\n SocketToExtension.prototype.send = function (data) {\n browserExt.postMessage({\n key: this.key,\n data: data,\n type: POST_MESSAGE_TYPES.SEND,\n });\n };\n return SocketToExtension;\n }());\n SocketToExtension.id = 0;\n SocketToExtension.socketCache = {};\n var deferred = Q.defer();\n try {\n Socket = SocketToExtension;\n var errors_1 = []; // list of issues while starting up\n browserExt.init(extAgentConfig[browser]);\n // browser ext is not installed return error\n // we can't do anything else\n if (!browserExt.isInstalled()) {\n errors_1.push(new MissingExtension());\n deferred.reject(errors_1);\n return deferred.promise;\n }\n var EXT_VERSION = extAgentConfig[browser].version;\n // if the browser ext verision does not match, we can still try to start the agent\n if (browserExt.getVersion() !== EXT_VERSION) {\n errors_1.push(new InvalidExtensionVersion());\n }\n function initEventListener(msgObj) {\n if (msgObj.type === EXT_MSG_TYPES.INIT_COMPLETE) {\n browserExt.removeLastOnMessage(); // stop listening to the init event\n if (msgObj.data.error) {\n // there was an issues starting the agent\n errors_1.push(new AgentNotStarted(msgObj.data.error));\n }\n else if (msgObj.data.version !== extAgentConfig.installer.version) {\n // we started fine, but the version was invalid\n errors_1.push(new InvalidAgentVersion());\n }\n if (errors_1.length === 0) {\n // expect all other messages to be for the\n // socket interface\n browserExt.regOnMessage(SocketToExtension.dispatchSocketEvent);\n deferred.resolve(msgObj.data);\n }\n else {\n deferred.reject(errors_1);\n }\n }\n else {\n console.error(\"UNEXPECTED MESSAGE TYPE: \" + msgObj.type);\n }\n }\n // set up listeners\n browserExt.regOnMessage(initEventListener);\n // send message to init\n browserExt.postMessage({ type: EXT_MSG_TYPES.INIT });\n }\n catch (e) {\n deferred.reject(e);\n }\n return deferred.promise;\n }", "async registerHttpServer() {\n this.httpServer = new HttpServer(this.app, this.port);\n this.httpServer.on('error', (err) => {\n this.emit('error', err);\n });\n this.httpServer.on('info', (msg) => {\n this.emit('info', msg);\n });\n\n await this.httpServer.init();\n }", "static init() {\n const self = this;\n this.syncStatus = \"ended\";\n window.addEventListener(\"online\", function(e) { self.syncToRemote(); });\n }", "initializeIpcListeners() {\n var self = this;\n\n ipcRenderer.on(\"focus\", function(event) {\n GUI.onFocus();\n });\n\n ipcRenderer.on(\"update-available\", function(event, info) {\n GUI.showUpdateAvailableEntry(info);\n });\n\n ipcRenderer.on(\"update-downloaded\", function(event, info) {\n GUI.showUpdateDownloadedEntry(info);\n });\n }", "init() {\n // using shimmer directly cause can only be bundled in node\n shimmer.wrap(http, 'get', () => httpGetWrapper(http));\n shimmer.wrap(http, 'request', httpWrapper);\n shimmer.wrap(https, 'get', () => httpGetWrapper(https));\n shimmer.wrap(https, 'request', httpWrapper);\n\n module_utils.patchModule(\n 'fetch-h2/dist/lib/context-http1',\n 'connect',\n fetchH2Wrapper,\n fetch => fetch.OriginPool.prototype\n );\n // simple-oauth2 < 4.0\n module_utils.patchModule(\n 'simple-oauth2/lib/client.js',\n 'request',\n clientRequestWrapper,\n client => client.prototype\n );\n // simple-oauth2 >= 4.0\n module_utils.patchModule(\n 'simple-oauth2/lib/client/client.js',\n 'request',\n clientRequestWrapper,\n client => client.prototype\n );\n }", "function Extension() {\n\t\tthis.init = new Callstack();\n\t}", "function Observer() {}", "function myServer() {\n\tthis.server = server;\n}", "createExtensionManager() {\n const coreExtensions = this.options.enableCoreExtensions ? Object.values(extensions) : [];\n const allExtensions = [...coreExtensions, ...this.options.extensions].filter((extension) => {\n return [\"extension\", \"node\", \"mark\"].includes(extension === null || extension === void 0 ? void 0 : extension.type);\n });\n this.extensionManager = new ExtensionManager(allExtensions, this);\n }", "init() {\n module_utils.patchModule(\n 'bunyan',\n '_emit',\n emitWrapper,\n bunyan => bunyan.prototype\n );\n }", "function TestObserver() {\n\n\tthis.isUpdated = false;\n\n\tthis.isInstanceOf = this.isInstanceOf || function(fnc) {return fnc === app.IObserver;};\n\n\tthis.update = function() {this.isUpdated = true;};\n}", "function Extension() {\n if (Extension.instance) {\n return Extension.instance;\n }\n Extension.instance = this;\n this.inpageStream = new PostMessageStream_1.default({\n name: 'station:inpage',\n target: 'station:content',\n });\n }", "init() {\n this._cacheDOM()\n this._createObserver()\n this._observeFaders()\n }", "init() {\n module_utils.patchModule(\n 'redis',\n 'internal_send_command',\n redisClientWrapper,\n redis => redis.RedisClient.prototype\n );\n }", "init() {\n module_utils.patchModule(\n 'mongodb/lib/core/wireprotocol/index.js',\n 'insert',\n mongodbInsertWrapper,\n mongodb => mongodb\n );\n module_utils.patchModule(\n 'mongodb/lib/core/wireprotocol/index.js',\n 'update',\n mongodbUpdateWrapper,\n mongodb => mongodb\n );\n module_utils.patchModule(\n 'mongodb/lib/core/wireprotocol/index.js',\n 'remove',\n mongodbRemoveWrapper,\n mongodb => mongodb\n );\n module_utils.patchModule(\n 'mongodb/lib/core/wireprotocol/index.js',\n 'query',\n mongodbQueryWrapper,\n mongodb => mongodb\n );\n module_utils.patchModule(\n 'mongodb/lib/core/wireprotocol/index.js',\n 'getMore',\n mongodbGetMoreWrapper,\n mongodb => mongodb\n );\n module_utils.patchModule(\n 'mongodb/lib/core/wireprotocol/index.js',\n 'command',\n mongodbCommandWrapper,\n mongodb => mongodb\n );\n }", "function init() {\n initMonitor();\n __players = [];\n __socket = initSocket();\n setEventHandlers();\n}", "mutationObservers() {\n\t\t// create an observer instance\n\t\tthis.observer = new MutationObserver((mutations) => {\n\t\t\tthis.resizeCheck();\n\t\t});\n\n\t\t// configuration of the observer:\n\t\tlet config = { attributes: true, childList: true, characterData: true, subtree: true };\n\n\t\t// pass in the target node, as well as the observer options\n\t\tthis.observer.observe(this.document, config);\n\t}", "initRemote() {\n let me = this,\n remote = me.remote,\n className = me.className,\n currentWorker = Neo.currentWorker,\n listenerId;\n\n if (!me.singleton) {\n throw new Error('Remote method access is only functional for Singleton classes ' + className);\n }\n\n if (!Neo.config.unitTestMode && Neo.isObject(remote)) {\n if (Neo.workerId !== 'main' && currentWorker.isSharedWorker && !currentWorker.isConnected) {\n listenerId = currentWorker.on('connected', () => {\n currentWorker.un('connected', listenerId);\n Base.sendRemotes(className, remote);\n });\n } else {\n Base.sendRemotes(className, remote);\n }\n }\n }", "initRemote() {\n let me = this,\n remote = me.remote,\n className = me.className,\n currentWorker = Neo.currentWorker,\n listenerId;\n\n if (!me.singleton) {\n throw new Error('Remote method access is only functional for Singleton classes ' + className);\n }\n\n if (!Neo.config.unitTestMode && Neo.isObject(remote)) {\n if (Neo.workerId !== 'main' && currentWorker.isSharedWorker && !currentWorker.isConnected) {\n listenerId = currentWorker.on('connected', () => {\n currentWorker.un('connected', listenerId);\n Base.sendRemotes(className, remote);\n });\n } else {\n Base.sendRemotes(className, remote);\n }\n }\n }", "observe() {\n window.addEventListener('api-process-link', this._assetHandler);\n window.addEventListener('api-process-file', this._fileHandler);\n window.addEventListener('api-resolve-model', this._resolveHandler);\n }", "constructor() {\n\t\t/**@type {Array.<WebSocket>} */\n\t\tthis._clients = [];\n\t\t/**@type {Game} */\n\t\tthis._game = new Game();\n\t\t/**@type {NetworkSystem} */\n\t\tthis._networkSystem = new NetworkSystem(this._game, this._game.world);\n\t\t/**@type {WebSocketServer} */\n\t\tthis._server = null;\n\t}", "_addMutationObserver() {\n this._observer = new MutationObserver(this._onMutateBound);\n this._observer.observe(this.containerEl, {childList: true, attributes: true, characterData: true, subtree: true});\n }", "constructor(verbose = false) {\n this.log = !!verbose;\n Object.defineProperty(this, 'setGameManager', {\n configurable:false,\n writable:false,\n value:function(littleManager) {\n if (this.master) {\n throw Error(_this.constructor.name+\".master must be inititialized once.\");\n }\n if (typeof littleManager !== \"object\") {\n throw Error(_this.constructor.name+\".master must be an object, \\\"\"+typeof littleManager+\"\\\" provided\");\n }\n const methods = [\n \"element\",\n \"fatalError\",\n \"isGameElementExist\",\n \"on\",\n \"emit\",\n ];\n for (var i = 0; i < methods.length; i++) {\n if (typeof littleManager[methods[i]] !== 'function') {\n throw Error(_this.constructor.name+'.master must have a '+methods[i]+' method');\n }\n }\n Object.defineProperty(this, \"master\", {\n configurable:false,\n writable:false,\n value:littleManager\n });\n var _this = this;\n this.master.on(\"Core::loadGameElement[\"+_this.master.name+\"]\", function(){\n _this.onStart();\n _this.master.on('Core::update', function(){\n _this.onUpdate();\n });\n _this.master.on('Core::destroy', function(){\n _this.onDestroy();\n });\n });\n }\n });\n Object.defineProperty(this, 'getDependency', {\n configurable:false,\n writable:false,\n value:function(webPackVariableName) {\n var _this = this;\n const validWebPackVariableName = /^[A-Z]{1}[a-zA-Z]+$/g;\n if (validWebPackVariableName.test(webPackVariableName)) {\n window['set'+webPackVariableName] = function(dep){\n _this[webPackVariableName] = dep;\n window['set'+webPackVariableName] = null;\n if (_this.log) {\n console.log(_this.constructor.name+' : Dependency \"'+webPackVariableName+'\" loaded successfully');\n }\n }\n document.dispatchEvent(new Event(\"dep::\"+webPackVariableName));\n }\n else {\n Error(_this.constructor.name+' : invalid webPackVariableName \"'+webPackVariableName+'\"');\n return false;\n }\n }\n });\n }", "function setupObserver (hypeDocument, element, options){\n\t\tvar hypeDocId = hypeDocument.documentId();\n\t\tvar sceneElm = hypeDocument.getCurrentSceneElement();\n\t\tvar observerLookup = _lookup[hypeDocId][sceneElm.id]['Observer'];\n\t\tif (!observerLookup[options.mOiD]) {\n\t\t\tobserverLookup[options.mOiD] = new MutationObserver(function(mutations) {\n\t\t\t\tmutations.forEach(function(mutation) {\n\t\t\t\t\toptions.callback.call(null, hypeDocument, mutation);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\t/* start monitoring for related changes */\n\t\tobserverLookup[options.mOiD].observe(element, options);\n\t}", "start() {\n let window = DefaultDOMElement.getBrowserWindow()\n window.on('hashchange', this._onHashChange, this)\n this.__isStarted__ = true\n }", "function Server() {}", "static async startListening() {\r\n /** @type {CoffeeMaker[]} */\r\n const coffeeMakers = await this.getAll();\r\n \r\n for (let coffeeMaker of coffeeMakers) {\r\n coffeeMaker.startListening();\r\n }\r\n }", "listen() {\n this.session.on('changed', this[cookieChangedHandler]);\n ipcMain.on('open-web-url', this[openSessionWindowHandler]);\n ipcMain.handle('cookies-session-get-all', this[getAllCookiesHandler]);\n ipcMain.handle('cookies-session-get-domain', this[getDomainCookiesHandler]);\n ipcMain.handle('cookies-session-get-url', this[getUrlCookiesHandler]);\n ipcMain.handle('cookies-session-set-cookie', this[setCookieHandler]);\n ipcMain.handle('cookies-session-set-cookies', this[setCookiesHandler]);\n ipcMain.handle('cookies-session-remove-cookie', this[removeCookieHandler]);\n ipcMain.handle('cookies-session-remove-cookies', this[removeCookiesHandler]);\n app.on('certificate-error', this[handleCertIssue]);\n }", "function MutationObserverMock() {}", "function MutationObserverMock() {}", "constructor() {\n this.id = `__interact_scope_${Math.floor(Math.random() * 100)}`;\n this.isInitialized = false;\n this.listenerMaps = [];\n this.browser = utils_browser;\n this.defaults = clone(defaultOptions_defaults);\n this.Eventable = Eventable_Eventable;\n this.actions = {\n map: {},\n phases: {\n start: true,\n move: true,\n end: true\n },\n methodDict: {},\n phaselessTypes: {}\n };\n this.interactStatic = createInteractStatic(this);\n this.InteractEvent = InteractEvent_InteractEvent;\n this.Interactable = void 0;\n this.interactables = new InteractableSet_InteractableSet(this);\n this._win = void 0;\n this.document = void 0;\n this.window = void 0;\n this.documents = [];\n this._plugins = {\n list: [],\n map: {}\n };\n\n this.onWindowUnload = event => this.removeDocument(event.target);\n\n const scope = this;\n this.Interactable = class extends Interactable_Interactable {\n get _defaults() {\n return scope.defaults;\n }\n\n set(options) {\n super.set(options);\n scope.fire('interactable:set', {\n options,\n interactable: this\n });\n return this;\n }\n\n unset() {\n super.unset();\n scope.interactables.list.splice(scope.interactables.list.indexOf(this), 1);\n scope.fire('interactable:unset', {\n interactable: this\n });\n }\n\n };\n }", "constructor() {\n this.id = `__interact_scope_${Math.floor(Math.random() * 100)}`;\n this.isInitialized = false;\n this.listenerMaps = [];\n this.browser = utils_browser;\n this.defaults = clone(defaultOptions_defaults);\n this.Eventable = Eventable_Eventable;\n this.actions = {\n map: {},\n phases: {\n start: true,\n move: true,\n end: true\n },\n methodDict: {},\n phaselessTypes: {}\n };\n this.interactStatic = createInteractStatic(this);\n this.InteractEvent = InteractEvent_InteractEvent;\n this.Interactable = void 0;\n this.interactables = new InteractableSet_InteractableSet(this);\n this._win = void 0;\n this.document = void 0;\n this.window = void 0;\n this.documents = [];\n this._plugins = {\n list: [],\n map: {}\n };\n\n this.onWindowUnload = event => this.removeDocument(event.target);\n\n const scope = this;\n this.Interactable = class extends Interactable_Interactable {\n get _defaults() {\n return scope.defaults;\n }\n\n set(options) {\n super.set(options);\n scope.fire('interactable:set', {\n options,\n interactable: this\n });\n return this;\n }\n\n unset() {\n super.unset();\n scope.interactables.list.splice(scope.interactables.list.indexOf(this), 1);\n scope.fire('interactable:unset', {\n interactable: this\n });\n }\n\n };\n }", "constructor () {\n const s = this\n s.observer = sugoObserver(s._handler.bind(s), ReportServer.observerConfig)\n s.callers = {}\n\n // masterReporter が emit する\n s.masterReporter = new Module({})\n s.masterActor = sugoActor(Object.assign({\n key: MASTER_ACTOR.KEY,\n modules: {\n [MASTER_ACTOR.MODULE]: s.masterReporter\n }\n }, ReportServer.masterActorConifg))\n }", "initExtension() {\n\t\treturn;\n\t}", "function notifyMutationObservers(): void {\n Systrace.beginEvent('MutationObserverManager.notifyMutationObservers');\n try {\n doNotifyMutationObservers();\n } finally {\n Systrace.endEvent();\n }\n}", "constructor(){\n\t\t// Listed in order of activation\n\t\tconst packageNames = [\n\t\t\t\"nuclide\",\n\t\t\t\"tree-view\",\n\t\t\t\"tabs\",\n\t\t\t\"fuzzy-finder\",\n\t\t\t\"find-and-replace\",\n\t\t\t\"archive-view\"\n\t\t];\n\t\t\n\t\tthis.consumers = [];\n\t\tfor(const name of packageNames)\n\t\t\tif(this.needsPatch(name)){\n\t\t\t\tthis.consumers.push(require(`./${name}.js`));\n\t\t\t}\n\t}", "function Singleton() {\n if (instance) {\n return instance;\n }\n instance = this;\n //Singleton initialization code\n //this.socket = null;\n this.observer_list = new LinkedList();\n }", "init() {\n module_utils.patchModule(\n 'openwhisk/lib/actions.js',\n 'invoke',\n openWhiskWrapper$1,\n actions => actions.prototype\n );\n }", "init() {\n module_utils.patchModule(\n 'mysql2',\n 'query',\n mysqlQueryWrapper,\n mysql2 => mysql2.Connection.prototype\n );\n\n module_utils.patchModule(\n 'mysql2',\n 'execute',\n mysqlQueryWrapper,\n mysql2 => mysql2.Connection.prototype\n );\n\n module_utils.patchModule(\n 'mysql/lib/Connection.js',\n 'query',\n mysqlQueryWrapper,\n mysqlConnection => mysqlConnection.prototype\n );\n }", "start() {\n\t\tthis.registerListeners();\n\t}", "connectedCallback(){super.connectedCallback();// ensure singleton is set\nwindow.Hal9000=window.Hal9000||{};window.Hal9000.instance=this}", "function _setObserver() {\n\t\tlet thiz = this;\n\t\tvar observer = new MutationObserver(function (mutations) {\n\t\t\tmutations.forEach(function (mutation) {\n\t\t\t\tif (mutation.type == \"attributes\") {\n\t\t\t\t\t_getOptions.apply(thiz);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tobserver.observe(this.dom, {\n\t\t\tattributes: true, //configure it to listen to attribute changes\n\t\t});\n\t}", "listen () {\n if (this._wss) return\n\n super.listen()\n\n this._wss = new WS.Server({\n perMessageDeflate: false,\n port: this._apiPort\n })\n\n this._clients = []\n this._wss.on('connection', this._onConnection.bind(this))\n\n debug('ws2 api server listening on port %d', this._apiPort)\n }", "function Observer(){\n this.update = function(){\n // ...\n };\n}", "setupChatNs() {\r\n\t\tthis.ns.chat.on(\"connection\", baseSocket => {\r\n\t\t\tconst socket = new Proxy(baseSocket, new ExtendedSocket()); //extend socket\r\n\r\n\t\t\tsocket.log(chalk.cyan(\"connected\"));\r\n\t\t\tthis.sockets.add(socket);\r\n\r\n\t\t\t//socket wants to join a room\r\n\t\t\tsocket.on(ACTION_TYPE.JOIN_ROOM, ({\r\n\t\t\t\troom,\r\n\t\t\t\tnick\r\n\t\t\t}) => {\r\n\t\t\t\tsocket.changeRoomTo(room);\r\n\r\n\t\t\t\tif (nick) {\r\n\t\t\t\t\tsocket.nick = nick;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//give the socket a random name if it doesnt have any yet\r\n\t\t\t\tif (!socket.nick) {\r\n\t\t\t\t\tsocket.nick = randomNick();\r\n\t\t\t\t\tsocket.emit(ACTION_TYPE.OWN_NICK_CHANGE, {\r\n\t\t\t\t\t\tuser: {\r\n\t\t\t\t\t\t\tnew: socket.nick\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//send the initial state of the room\r\n\t\t\t\tthis.getRoomState(room).then(state => {\r\n\t\t\t\t\tsocket.emit(ACTION_TYPE.ROOM_STATE, {\r\n\t\t\t\t\t\tstate\r\n\t\t\t\t\t});\r\n\t\t\t\t}).catch(err => console.error(err));\r\n\r\n\t\t\t\t//tell others\r\n\t\t\t\tsocket.broadcastToRoom(ACTION_TYPE.ENTERED_ROOM, {\r\n\t\t\t\t\tuser: socket.user\r\n\t\t\t\t});\r\n\r\n\t\t\t\tsocket.log(chalk.green(\"joined\"), room);\r\n\t\t\t});\r\n\r\n\t\t\t//socket wants to leave a room\r\n\t\t\tsocket.on(ACTION_TYPE.LEAVE_ROOM, ({room}) => {\r\n\t\t\t\tsocket.broadcastToRoom(ACTION_TYPE.LEFT_ROOM, {\r\n\t\t\t\t\tuser: socket.user\r\n\t\t\t\t});\r\n\t\t\t\tsocket.leaveAllRooms();\r\n\t\t\t});\r\n\r\n\t\t\t//socket sent a chat message\r\n\t\t\tsocket.on(ACTION_TYPE.ADD_CHAT_MESSAGE, message => {\r\n\t\t\t\tdb.addChatMessage(socket.currentRoom, message).catch(console.error.bind());\r\n\t\t\t\tsocket.broadcastToRoom(ACTION_TYPE.ADD_CHAT_MESSAGE, {\r\n\t\t\t\t\tmessage\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\tsocket.on(ACTION_TYPE.OWN_NICK_CHANGE, nick => {\r\n\t\t\t\tsocket.broadcastToRoom(ACTION_TYPE.NICK_CHANGE, {\r\n\t\t\t\t\tuser: {\r\n\t\t\t\t\t\told: socket.nick,\r\n\t\t\t\t\t\tnew: nick\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tsocket.nick = nick;\r\n\t\t\t});\r\n\r\n\t\t\tsocket.on(\"disconnect\", () => {\r\n\t\t\t\tsocket.broadcastToRoom(ACTION_TYPE.LEFT_ROOM, {\r\n\t\t\t\t\tuser: socket.user\r\n\t\t\t\t});\r\n\t\t\t\tthis.sockets.delete(socket);\r\n\t\t\t\tsocket.log(STRINGS.DISCONNECTED);\r\n\t\t\t});\r\n\r\n\t\t\tsocket.on(\"error\", err => {\r\n\t\t\t\tsocket.log(STRINGS.ERROR, err);\r\n\t\t\t});\r\n\t\t});\r\n\t}", "constructor() {\n super();\n this.log = log;\n this.plugins = [];\n this.extensions = [];\n this.registerPlugin(require('./core-plugin'));\n }", "install() {\n this.dispatcher = new Dispatcher(this.options.dispatcher)\n }", "set () {\n ipcMain.on('notif-count', ::this.onNotifCount);\n ipcMain.on('close-window', ::this.onCloseWindow);\n ipcMain.on('open-url', ::this.onOpenUrl);\n }", "_onScriptLoad() {\n const JitsiMeetExternalAPI = window.JitsiMeetExternalAPI;\n\n const api = new JitsiMeetExternalAPI(config.defaultDomain);\n const iframe = api.getIFrame();\n\n setupScreenSharingForWindow(iframe);\n new RemoteControl(iframe); // eslint-disable-line no-new\n setupAlwaysOnTopRender(api);\n setupWiFiStats(iframe);\n }", "function watchForInstalledAddon() {\n const watchedEls = document.querySelectorAll(\"firefox-private-relay-addon, .relay-email-address-note\");\n const observerConfig = {\n attributes: true,\n childList: true, // catches legacy addons modifying .relay-email-address-note els\n\t};\n\n const patrollerDuties = (mutations, mutationPatroller) => {\n for (const mutation of mutations) {\n // handle legacy addon labeling\n if (mutation.type === \"childList\" && mutation.target.classList.contains(\"relay-email-address-note\")) {\n handleLegacyAddonLabels(mutation.target);\n }\n }\n\t};\n\n const mutationPatroller = new MutationObserver(patrollerDuties);\n watchedEls.forEach(watchedEl => {\n mutationPatroller.observe(watchedEl, observerConfig);\n });\n}", "bindHttpServer() {\n\t\tthis.app.singleton('server', HttpServer);\n\t}", "on_connecter() {\n this.enregistrerChannel()\n }", "constructor(wss) {\n this.websocketServer = wss;\n }", "async setupAPIServer() {\n\t\tawait this.apiServer.run();\n\t\tthis.apiServer.attach({\n\t\t\tapp: this.app,\n\t\t\tfrontendRouter: this.frontendRouter\n\t\t});\n\t}", "constructor() {\n this.plugins = [];\n this.plugins_by_events = [];\n this.callbacks_by_events = [];\n \n window.custom_plugins.concrete = {}; // this is where loaded plugins are stored\n }", "function Observer() {\n this.update = function () {\n // /* ... */\n };\n}", "function EventDispatcher() {}", "function EventDispatcher() {}", "function makeWasabi() {\n\n /**\n * Facade class for interacting with Wasabi.\n *\n * Note that Wasabi implements the Node.js `events.EventEmitter` interface\n * for event handling, allowing use of `on`, `once`, `removeListener` and\n * friends. See the related [Node.js events.EventEmitter docs](http://nodejs.org/api/events.html#events_class_events_eventemitter) for\n * event handling methods.\n *\n * @class Wasabi\n */\n var Wasabi = {\n Bitstream: Bitstream,\n Connection: Connection,\n Registry: Registry,\n Rpc: Rpc,\n\n makeWasabi: makeWasabi,\n\n servers: [],\n clients: [],\n _rpcQueue: [],\n _groups: {},\n\n /**\n * Register a class with Wasabi, allowing it to transmit instances of\n * this class through a Connection\n * @method addClass\n * @param {Function} klass The constructor of the class to add\n */\n addClass: function (klass) {\n this.registry.addClass(klass, this);\n },\n\n /**\n * Register an instance of a klass, which can then be sent to\n * connected clients as needed (based on the results of their\n * `scopeCallback`s).\n *\n * *Note: This method should only be called manually on\n * authoritative peers (i.e. server-side).* Wasabi clients will\n * automatically add instances to the Registry when their ghosts\n * are unpacked\n * @method addObject\n * @param {NetObject} obj The object to add to the registry\n * @param {Number} serial The serial number to assign to this object. If\n * falsy, the nextSerialNumber will be used\n */\n addObject: function (obj) {\n this.registry.addObject(obj);\n obj.wsbInstance = this;\n },\n\n /**\n * Unregister an instance of a klass\n * @method removeObject\n * @param {NetObject|Number} arg Either a NetObject or a serial number\n * to be removed from the registry\n */\n removeObject: function (arg) {\n var k;\n this.registry.removeObject(arg);\n\n // remove object from all groups\n for (k in this._groups) {\n if (this._groups.hasOwnProperty(k)) {\n this._groups[k].removeObject(arg);\n }\n }\n },\n\n /**\n * Create an RPC from the supplied procedure and serialize functions.\n * @method mkRpc\n * @param {Function} fn The local function to call when the RPC is\n * invoked on a remote host\n * @param {Function} opt_serialize An optional serialize function\n * describing the arguments used by this RPC\n * @return {Function} The function you should call remotely to invoke\n * the RPC on a connection\n */\n mkRpc: function (fn, opt_serialize) {\n return this.registry.mkRpc(false, fn, opt_serialize, this);\n },\n\n /**\n * Attach to a server connected through the socket object\n * @method addServer\n * @param {Socket} sock The socket object used to communicate with the\n * new server\n * @return {Connection} The newly created Connection object\n */\n addServer: function (sock) {\n var conn = new Wasabi.Connection(this, sock, true, false);\n this.servers.push(conn);\n return conn;\n },\n\n /**\n * Remove a server by its socket object. `sock` must be strictly equal\n * (`===`) to the original socket.\n * @method removeServer\n * @param {Socket} sock The socket object originally passed to addServer\n */\n removeServer: function (sock) {\n var i;\n for (i = 0; i < this.servers.length; i++) {\n if (this.servers[i]._socket === sock) {\n this.servers.splice(i, 1);\n return;\n }\n }\n },\n\n /**\n * Attach a client connected through the given socket object. Currently\n * this must be a WebSocket or socket.io socket, or something that is\n * API compatible (i.e. has an `onmessage` callback and a `send`\n * method).\n * @method addClient\n * @param {Socket} client The socket object used to communicate with the\n * new client\n * @param {Function} scopeCallback An optional callback which overrides\n * the connection's visibility groups. A scope callback receives no\n * arguments, and return a collection of objects to be included in\n * this connection's scope. **Note:** This parameter is deprecated,\n * and may be removed in a future version.\n * @return {Connection} The newly created Connection object\n */\n addClient: function (client, scopeCallback) {\n var conn = new Wasabi.Connection(this, client, false, true, scopeCallback);\n this.clients.push(conn);\n return conn;\n },\n\n /**\n * Remove a client by its socket object. `sock` must be strictly equal\n * (`===`) to the original socket.\n * @method removeClient\n * @param {Socket} sock The socket object originally passed to addClient\n */\n removeClient: function (sock) {\n var i;\n for (i = 0; i < this.clients.length; i++) {\n if (this.clients[i]._socket === sock) {\n this.clients.splice(i, 1);\n return;\n }\n }\n },\n\n /**\n * Process the incoming and outgoing data for all connected clients and\n * servers. This is typically called in your game's update loop\n * @method processConnections\n */\n processConnections: function () {\n var k;\n\n // process server connections\n for (k in this.servers) {\n if (this.servers.hasOwnProperty(k)) {\n this.servers[k].process();\n }\n }\n\n // process client connections\n for (k in this.clients) {\n if (this.clients.hasOwnProperty(k)) {\n this.clients[k].process();\n }\n }\n },\n\n /**\n * Create a new visibility group\n * @method createGroup\n * @return {Group} The new group\n */\n createGroup: function () {\n var group = new Group(this);\n this._groups[group._id] = group;\n return group;\n },\n\n /**\n * Destroy a visibility group. This removes the group from all\n * connections as well as the list of all groups known to Wasbi.\n *\n * Removes `group`\n * @method destroyGroup\n * @param {Group} group The group to destroy\n */\n destroyGroup: function (group) {\n var k;\n // remove group from all connections\n for (k in this.clients) {\n if (this.clients.hasOwnProperty(k)) {\n this.clients[k].removeGroup(group);\n }\n }\n\n // release group from the master group list\n delete this._groups[group._id];\n },\n\n /**\n * Pack an RPC invocation to the appropriate connections\n * @method _invokeRpc\n * @private\n * @param {Rpc} rpc the rpc to invoke\n * @param {NetObject} obj the obj to use as the context the invocation,\n * or false for static invocations\n * @param {Array} args the arguments to the rpc, followed by an optional\n * list of connections to emit the invocation to. If no connections\n * are specified, the invocation is emitted to all connections\n */\n _invokeRpc: function (rpc, obj, args) {\n var i;\n var k;\n var invocation;\n\n // Extract connection list from supplied args\n var conns = args.splice(rpc._fn.length, args.length - rpc._fn.length);\n\n // Note that RPCs expect exactly the number of arguments specified\n // in the original function's definition, so any arguments passed\n // after that must be Connections to send the invocation on\n for (i = 0; i < conns.length; i++) {\n if (!(conns[i] instanceof Connection)) {\n throw new WasabiError('Expected connection but got ' + conns[i] + '. Did you pass too many arguments to ' + rpc._fn.wasabiFnName + '?');\n }\n }\n\n // check for argument underflow\n if (args.length < rpc._fn.length) {\n throw new WasabiError('Too few arguments passed to ' + rpc._fn.wasabiFnName);\n }\n\n // if no Connections are specified, send the invocation to either\n // servers, clients, or both, depending on the RPC's definition (see\n // the Rpc constructor for details)\n if (conns.length === 0) {\n // process server connections\n if (rpc._toServer) {\n for (k in this.servers) {\n if (this.servers.hasOwnProperty(k)) {\n conns.push(this.servers[k]);\n }\n }\n }\n\n // process client connections\n if (rpc._toClient) {\n for (k in this.clients) {\n if (this.clients.hasOwnProperty(k)) {\n conns.push(this.clients[k]);\n }\n }\n }\n }\n\n // add the invocation to the proper connections' rpc queues\n for (i = 0; i < conns.length; i++) {\n invocation = {\n rpc: rpc,\n args: args,\n obj: obj,\n bs: conns[i]._sendBitstream\n };\n conns[i]._rpcQueue.push(invocation);\n }\n },\n\n /**\n * Returns a clone of the registry's object table. used as a fallback\n * when no _scopeCallback is specified for a connection\n * @method _getAllObjects\n * @private\n */\n _getAllObjects: function () {\n var result = {};\n var k;\n for (k in this.registry._objects) {\n if (this.registry._objects.hasOwnProperty(k)) {\n result[k] = this.registry._objects[k];\n }\n }\n return result;\n },\n\n };\n\n Wasabi.registry = new Registry();\n\n // mixin a Node event emitter\n events.EventEmitter.call(Wasabi);\n var k;\n for (k in events.EventEmitter.prototype) {\n if (events.EventEmitter.prototype.hasOwnProperty(k)) {\n Wasabi[k] = events.EventEmitter.prototype[k];\n }\n }\n\n return Wasabi;\n}", "function ChannelManager () {\n this.connections = {}\n this.replicators = {}\n\n this.set = function (otherMachineId, connName, datachannel) {\n var replicator = this.replicators[otherMachineId] = this.replicators[otherMachineId] ||\n new PouchReplicator('replicator', PouchDB, db, {batch_size: 50})\n\n replicator.addPeer(connName, datachannel)\n\n var connections = this.connections[otherMachineId] = this.connections[otherMachineId] || {}\n connections[connName] = datachannel\n\n replicator.on('endpeerreplicate', function () {\n for (var i in replicator.datachannels) {\n var dc = replicator.datachannels[i]\n dc.send('<received>')\n }\n app.ports.replication.send([otherMachineId, '<received>'])\n })\n\n datachannel.addEventListener('message', e => {\n console.log(connName + ' says: ' + e.data)\n if (e.data === '<received>') {\n app.ports.replication.send([otherMachineId, '<sent>'])\n db.compact()\n }\n })\n }\n\n this.cleanup = function (otherMachineId, connName) {\n var replicator = this.replicators[otherMachineId]\n if (!replicator) return\n replicator.removePeer(connName)\n }\n\n this.replicate = function () {\n console.log('replicating pouchdb to', Object.keys(this.replicators))\n for (var otherMachineId in this.replicators) {\n console.log('> replicating pouchdb to', otherMachineId)\n\n app.ports.replication.send([otherMachineId, '<replicating>'])\n\n var replicator = this.replicators[otherMachineId]\n replicator.replicate()\n }\n }\n}", "function BrowserSync() {\n this.bs = require(\"browser-sync\").create('bs-refresh');\n this.bs.init({\n open: false,\n proxy: `http://localhost:${devServerPort}/`,\n port: port,\n host: '0.0.0.0'\n });\n}", "function boot()\n {\n\t// scriptweeder ui's iframe, don't run in there !\n\tif (in_iframe() && window.name == 'scriptweeder_iframe')\t// TODO better way of id ?\n\t return;\n\tif (location.hostname == \"\")\t// bad url, opera's error page. \n\t return;\n\tassert(typeof GM_getValue == 'undefined', // userjs_only\n\t \"needs to run as native opera UserJS, won't work as GreaseMonkey script.\");\n\tif (window.opera.scriptweeder && window.opera.scriptweeder.version_type == 'extension')\t\t// userjs_only\n\t{\n\t my_alert(\"ScriptWeeder extension detected. Currently it has precedence, so UserJS version is not needed.\");\n\t return;\n\t}\n\t\n\tsetup_event_handlers();\n\twindow.opera.scriptweeder = new Object();\t// external api\n\twindow.opera.scriptweeder.version = version_number;\n\twindow.opera.scriptweeder.version_type = version_type;\t\n\tdebug_log(\"start\");\t\n }", "constructor() {\n this.#listen();\n }", "constructor() {\n this.#listen();\n }", "function FASockeT(){\n\n this.p2pPort = P2P_PORT;\n this.eventPort = EVENT_BROADCAST_PORT;\n this.serverPort = SERVER_PORT;\n this.httpMode = HTTP_MODE;\n\n this.EMIT = [];\n\n var opts = {peerOpts: {trickle: false}, autoUpgrade: false};\n\n this.init = function(ip){\n this.serverSocket = io(this.httpMode + ip + ':' + this.serverPort, {\n reconnection: false\n });\n var signal = new Phaser.Signal();\n var _this = this;\n\n this.serverSocket.on('connect', function () {\n //TODO : change this\n //TEMPORARY\n _this.broadcastSocket = _this.serverSocket;\n\n //Add server behavior\n _this.addOnServerCallback(PROTOCOL.FAST_MINI_GAME_REGISTER, _this.startP2PSession);\n\n var emitable = PROTOCOL.getEmitableEvent();\n\n for(var evt in emitable){\n _this.addEmitServerBehavior(emitable[evt]);\n }\n _this.serverIp = ip;\n signal.dispatch(true);\n });\n\n this.serverSocket.on('disconnect', function () {\n signal.dispatch(false);\n });\n\n this.serverSocket.on('connect_failed', function () {\n signal.dispatch(false);\n });\n\n this.serverSocket.on('error', function () {\n signal.dispatch(false);\n });\n\n return signal;\n }\n\n //keyword : string, behavior : function\n this.addEmitServerBehavior = function(keyword){\n this.EMIT[keyword] = (data) => {\n this.serverSocket.emit(keyword, data);\n };\n }\n //keyword : string, callback : function\n this.addOnServerCallback = function(keyword, callback, signal){\n if(signal){\n this.serverSocket.on(keyword, function(data){\n signal.dispatch(data);\n });\n }\n else{\n this.serverSocket.on(keyword, function(data){\n callback(data);\n });\n }\n }\n\n this.removeOnServerCallback = function(keyword, callback){\n this.serverSocket.removeListener(keyword, callback);\n }\n\n //keyEvent : string, phaserSignal : Phaser.Signal\n this.addBroadcastCallback = function(keyEvent, phaserSignal){\n this.broadcastSocket.on(keyEvent, function(data){\n if(phaserSignal.dispatch){\n phaserSignal.dispatch({'data' : data});\n }\n });\n }\n\n //room : string\n this.startP2PSession = function(room){\n //is room usefull????\n this.p2psocket.upgrade();\n }\n\n}", "observe() {\n if (this.observer === null) {\n this.observer = new MutationObserver(this.handleEvent.bind(this));\n }\n\n this.observer.observe(this.target, this.options);\n }", "function Observer() {\n if (this === undefined) {\n return new Observer();\n }\n this.observers = [];\n}", "bindHttpServer() {\n this.app.singleton('server', _Server.default);\n }", "function init(){\n wss.on('connection', onConnection);\n}", "function init () {\n // Attach Socket.IO to server\n socket = io.listen(server);\n\n // Log Port selected\n util.log(\"#Listening on: \" + port);\n\n // Start listening for events\n setEventHandlers();\n\n // Running tests\n util.log(\"#Running tests\");\n var Debug = require(\"./debug\");\n Debug.runAllTests();\n util.log(\"#All tests run\");\n}", "init() {\n _listenToCurrentUser();\n }", "async init() {\r\n var reportWarning = (...args) => this.reportWarning(...args);\r\n this.backend = isAutomateEnabled() ? new automate_1.default(reportWarning) : new js_testing_1.default(reportWarning);\r\n await this._getDeviceList();\r\n this._generateBrowserNames();\r\n }", "function initPysijs() {\n Physijs.scripts.worker = '/lib/physijs_worker.js'\n Physijs.scripts.ammo = '/lib/ammo.js';\n}", "function Coupling() {\n /* content script port */\n let cs = null;\n /* devtools port */\n let dt = null;\n\n this.assignDevTools =\n (port) => {\n dt = port;\n port.onMessage.addListener(toLeft);\n port.onDisconnect.addListener(dtDisconnect);\n console.log('dt connected');\n }\n\n this.assignContentScript =\n (port) => {\n cs = port;\n port.onMessage.addListener(toRight);\n port.onDisconnect.addListener(csDisconnect);\n console.log('cs connected');\n }\n\n function toRight(message) {\n if (!dt) { return; }\n console.log('cs -> dt', message);\n dt.postMessage(message)\n }\n\n function toLeft(message) {\n if (!cs) { return; }\n console.log('cs <- dt', message)\n cs.postMessage(message)\n }\n\n function csDisconnect(message) {\n console.log('cs disconnect');\n cs.onMessage.removeListener(toLeft);\n cs.onDisconnect.removeListener(csDisconnect);\n cs = null;\n }\n\n function dtDisconnect(message) {\n console.log('dt disconnect');\n dt.onMessage.removeListener(toLeft);\n dt.onDisconnect.removeListener(dtDisconnect);\n dt = null;\n }\n}", "setupIntefaceEvents() {\n this.interfaceEventEmitter.on('injectMessage', (message) => {\n this.injectMessage(message);\n });\n\n this.interfaceEventEmitter.on('shutdown', () => {\n this.shutdown();\n });\n\n this.interfaceEventEmitter.on('restart', () => {\n this.close();\n });\n\n this.interfaceEventEmitter.on('close', () => {\n this.close();\n });\n\n this.interfaceEventEmitter.on('start', () => {\n this.start();\n });\n\n this.botInterface = new BotInterface(\n {\n getBotName: () => {\n return this.getBotName();\n },\n getId: () => {\n return this.getId();\n },\n getUserProfile: (identifiers, options) => {\n return this.getSlackUserProfile(identifiers, options);\n },\n },\n this.interfaceEventEmitter\n );\n }", "async function init() {\n // Configure plug-ins.\n await server.register([\n require('vision'),\n require('inert'),\n require('lout')\n ]);\n\n await server.register(require('blipp'));\n\n // Configure logging.\n await server.register({\n plugin: require('hapi-pino'),\n options: {\n prettyPrint: true\n }\n });\n\n // Start the server.\n await server.start();\n console.log(`Server running at ${server.info.uri}`);\n}", "doListen(registry) {}", "function start() {\n\t// DEVTOOL: uncomment to bring up devtools on plugin view\n\t// IPC.sendToHost('devtools');\n\t\n\t// Call the API\n\tupdate();\n}", "init() {\n module_utils.patchModule(\n 'nats',\n 'connect',\n wrapNatsConnectFunction\n );\n }", "constructor() {\n if (singletonInstance) {\n return singletonInstance;\n }\n this.client = null;\n this.isConnected = false;\n this.eventHandler = function(type, opt_data) {};\n singletonInstance = this;\n return singletonInstance;\n }", "function _registerLegacyAPIs() {\n context.foundation = {\n makeLogger,\n startWorkers,\n getConnection,\n getEventEmitter: getSystemEvents\n };\n }", "function CreateSIOServer()\n{\n \n sio = io.listen(server);\n sio.configure(function (){\n\t\tsio.set('transports', ['websocket']);\n sio.set('log level', 0);\n sio.set('authorization', function (handshakeData, callback){\n callback(null , true);\n });\n });\n\n wrap_server = new game_server();\n wrap_server.initServer(current_experiment);\n}", "async function init() {\n // Configure plug-ins.\n await server.register(require('blipp'));\n await server.register({\n plugin: require('hapi-pino'),\n options: {\n prettyPrint: true\n }\n });\n\n // Start the server.\n await server.start();\n }", "function init() {\n const observer = new MutationObserver((mutationsList, observer) => {\n observer.disconnect();\n mutationsList\n .flatMap(x => Array.from(x.addedNodes))\n .forEach(process);\n observer.observe(document.body, config);\n });\n\n const config = {\n subtree: true,\n childList: true,\n characterData: true\n };\n\n process(document.body);\n process(document.body);\n observer.observe(document.body, config);\n }", "constructor() {\n this.observers = [];\n }" ]
[ "0.58892566", "0.56777346", "0.5651061", "0.5648696", "0.55705243", "0.55581474", "0.5512674", "0.5470776", "0.54489964", "0.54282284", "0.5424709", "0.53782004", "0.5361406", "0.5340631", "0.5337724", "0.53351724", "0.53039384", "0.5295105", "0.5269418", "0.52634704", "0.52622014", "0.52451545", "0.52335036", "0.52234596", "0.52147895", "0.52015835", "0.51800835", "0.51652265", "0.5159731", "0.51539594", "0.515051", "0.5147983", "0.5145194", "0.5145194", "0.5145056", "0.51394045", "0.513144", "0.51132715", "0.5080884", "0.5076098", "0.50662464", "0.50658214", "0.50644755", "0.5050125", "0.5050125", "0.50345284", "0.50345284", "0.5027827", "0.50264394", "0.50247973", "0.5021355", "0.5020625", "0.5009277", "0.5008152", "0.5003524", "0.4999506", "0.4998147", "0.49888226", "0.49803984", "0.4972742", "0.49610814", "0.49580535", "0.49513695", "0.49496245", "0.49441394", "0.49376196", "0.4931156", "0.4928835", "0.49217075", "0.491705", "0.4910373", "0.49087366", "0.49087366", "0.49002963", "0.489904", "0.48963016", "0.48882177", "0.48811066", "0.48811066", "0.48762232", "0.48715135", "0.48697904", "0.4868499", "0.48684084", "0.48632085", "0.48607472", "0.4858127", "0.48578072", "0.48567086", "0.4856454", "0.48559433", "0.48514917", "0.48504972", "0.48437816", "0.4835569", "0.48350954", "0.48295853", "0.482493", "0.48212594", "0.48207876" ]
0.63114315
0
Wait for socket to initialize and attach to this class
setupSocket() { var self = this; self.sockets = []; const nativeWebSocket = window.WebSocket; window.WebSocket = function(...args){ const socket = new nativeWebSocket(...args); self.sockets.push(socket); return socket; }; let setupThisSocket = setInterval( ()=> { if( self.sockets.length != 0 ){ clearInterval(setupThisSocket); self.sockets[0].addEventListener('message', (e) => self.messageHandler(self, e)); console.log("Attached to socket"); } console.log("waiting for socket ..."); }, 100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n // Setup event handlers for the socket\n this._setListeners(() => {\n // Check that connection limit is not exceeded\n if (this._server.options.maxClients && this._server.connections.size > this._server.options.maxClients) {\n return this.send(421, this.name + ' Too many connected clients, try again in a moment');\n }\n\n // Keep a small delay for detecting early talkers\n setTimeout(() => this.connectionReady(), 100);\n });\n }", "constructor() {\n this.socketEventList = [];\n this.asyncExtensionList = [];\n this.extensions = {};\n this.setupSocket();\n }", "connect() { socket_connect(this) }", "run() {\n this.reset();\n this.socket = net.createConnection({\n 'host': this.host.address, \n 'port': this.port,\n }).setKeepAlive(true); // .setNoDelay(true)\n this.socket.on('connect', this.onConnect);\n this.socket.on('error', this.onError);\n this.socket.on('data', this.onData);\n this.socket.on('close', this.onClose);\n }", "setupSocket() {\n this.socket = io('/gameroom');\n this.socket.on('connect', () => {\n this.socket.emit('setup_client')\n });\n this.socket.on('packet', this.handleSocketMessages)\n }", "_initialize () {\n this.socket.on('data', data => this._sessionProtocol.chuck(data))\n this.socket.once('close', () => this.disconnect())\n }", "init() {\n this.socket.emit('init', 'ooga');\n }", "function postSetup () {\n // cleanup the listeners we attached in setup phrase.\n socket.emit('cleanupSetupListeners');\n\n // Work around lack of close event on tls.socket in node < 0.11\n ((socket.socket) ? socket.socket : socket).once('close',\n self._onClose.bind(self))\n socket.on('end', function onEnd () {\n log.trace('end event')\n\n self.emit('end')\n socket.end()\n })\n socket.on('error', function onSocketError (err) {\n log.trace({ err: err }, 'error event: %s', new Error().stack)\n\n self.emit('error', err)\n socket.destroy()\n })\n socket.on('timeout', function onTimeout () {\n log.trace('timeout event')\n\n self.emit('socketTimeout')\n socket.end()\n })\n\n const server = self.urls[self._nextServer]\n if (server) {\n self.host = server.hostname\n self.port = server.port\n self.secure = server.secure\n }\n }", "async connect() {\n this._mav = await this._getMavlinkInstance();\n this._socket = await this._getSocket();\n this._registerMessageListener();\n this._registerSocketListener();\n }", "initSockets() {\n this.relay.on('requests satisfied', (data) => {\n const sockets = this.channel('relay');\n\n if (!sockets)\n return;\n\n this.to('relay', 'relay requests satisfied', data);\n });\n }", "function init_socket(socket) {\n socket.onopen = on_open;\n socket.onclose = on_close;\n socket.onmessage = (raw) => on_message(raw.data);\n}", "init() {\n this.io.on('connection', function (socket) {\n /**\n * Triggered when a socket disconnects\n */\n socket.on('disconnect', function () {\n console.log(`[SOCKET] Client disconnected! ID: ${socket.id}`);\n });\n\n console.log(`[SOCKET] New client connected! ID: ${socket.id}`);\n });\n\n /**\n * Start listening on the right port/host for the Socket.IO server\n */\n console.log('[SYSTEM] Socket.IO started !');\n }", "function initPeer() {\n // Do we get a response\n client.gotRespond = false;\n // Getting the init peer\n var peer = constructor('init');\n // Peer signal\n // Send a request for connection\n peer.on('signal', (data) => {\n if (!client.gotRespond) {\n socket.emit('Request', data);\n }\n })\n client.peer = peer;\n }", "initSocket(socket){\n\t\tsocket.on('connect', (value)=>{\n\t\t\tconsole.log(\"Connected\");\n\t\t})\n\t\tsocket.on('disconnect', this.reconnectUserInfo)\n\t}", "initConnection() {\n\t\tconsole.debug(\"Attempting to connect to {url}...\".formatUnicorn({\n\t\t\t\"url\": this.url,\n\t\t}));\n\t\tthis.socket = new WebSocket(this.url);\n\t\tthis.addListeners(this.callbacks);\n\n\t\t// Add listener to attempt reconnect after set delay.\n\t\t// Makes for an autorepeat because failure will trigger the 'close' event.\n\t\tthis.addListeners({\n\t\t\t\"close\": function(event) {\n\t\t\t\tconsole.debug(\"Connection to {url} closed/failed, trying to reconnect in {delay} seconds.\"\n\t\t\t\t\t.formatUnicorn({\n\t\t\t\t\t\t\"url\": this.url,\n\t\t\t\t\t\t\"delay\": this.closed_repeat_delay\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t\twindow.setTimeout(\n\t\t\t\t\tthis.initConnection.bind(this),\n\t\t\t\t\tthis.closed_repeat_delay * 1000\n\t\t\t\t);\n\t\t\t}.bind(this)\n\t\t});\n\t}", "function ready() {\n isAlreadyCalling = false;\n socket.emit('ready');\n}", "_attachListeners () {\n const onListening = () => {\n const address = this._server.address()\n debug(`server listening on ${address.address}:${address.port}`)\n this._readyState = Server.LISTENING\n }\n\n const onRequest = (request, response) => {\n debug(`incoming request from ${request.socket.address().address}`)\n request = Request.from(request)\n response = Response.from(response)\n this._handleRequest(request, response)\n }\n\n const onError = err => {\n this.emit('error', err)\n }\n\n const onClose = () => {\n this._readyState = Server.CLOSED\n }\n\n this._server.on('listening', onListening)\n this._server.on('request', onRequest)\n this._server.on('checkContinue', onRequest)\n this._server.on('error', onError)\n this._server.on('close', onClose)\n this._readyState = Server.READY\n }", "init_tcp() {\n\t\ttcp.init.bind(this)()\n\t}", "initSockets() {\n ;\n }", "function setupSockets() {\r\n\t\tgame = gameEngine.returnSystem( 'game' );\r\n\t\t\r\n\t\tplayerShip = game.returnShip( shipId );\r\n\t\t\r\n\t\ttoken = {};\r\n\t\ttoken.name = playerShip['displayName'];\r\n\t\ttoken.game = 0;\r\n\t\ttoken.ship = playerShip['id'];\r\n\t\t\r\n\t\tsocket = connectToServer();\r\n\t\t\r\n\t\tif(socket !== undefined) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tsetupSocketTransfers();\t\t\t\r\n\t\t\t}, 1500);\r\n\t\t} else {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tsocket = finishConnection();\r\n\t\t\t\tsetupSocketTransfers();\r\n\t\t\t}, 1500);\r\n\t\t}\r\n\t}", "function init() {\n socket.on('connect', function() {\n console.log(\"Connected\");\n });\n\n socket.on('disconnect', function() {\n console.log(\"Connection closed\");\n });\n \n socket.on('person_name', function(message) {\n if(message !== initialName) {\n speak(generateGreetingMessage(message));\n initialName = message;\n }\n });\n \n socket.on('face_coordinates', function(coordinates) {\n if (coordinates.status == 'SUCCESS') {\n let left = coordinates.left;\n let top = coordinates.top;\n let width = coordinates.right - coordinates.left;\n let height = coordinates.bottom - coordinates.top;\n rectangleCoordinates = { left, top, width, height };\n } else {\n rectangleCoordinates = null;\n }\n });\n}", "startSocketHandling() {\n this.userNamespace.on('connection', (socket) => {\n logger.debug(`New socket connected to namespace ${this.userNamespace.name} + ${socket.id}`);\n\n // Register socket functions\n socket.on('getQuestions', this.getQuestions(socket));\n socket.on('answerQuestion', this.answerQuestion(socket));\n socket.on('answerOpenQuestion', this.answerOpenQuestion(socket));\n });\n }", "function Socket() {}", "onSocketFullyConnected() {\n this.debugOut('socketFullyConnected()');\n this.last_socket_error = null;\n this.emit('open');\n }", "_BindPeer( peerSocket )\n {\n\n peerSocket.BindEvent( \"open\", this.Open.bind(this) );\n peerSocket.BindEvent( \"close\", this.Close.bind(this) );\n peerSocket.BindEvent( \"error\", this.Error.bind(this) );\n peerSocket.BindEvent( \"message\", this.Message.bind(this) );\n\n }", "function init() {\n\tif (typeof Peer === 'function') {\n\t\tconsole.log('Init');\n\t\tvar peer = new Peer(myName, {key: '{{YOUR_PEERJS_KEY}}'});\n\t\tvar conn = peer.connect(contactName);\n\t\tpeer.on('connection', function(externalConnection) {\n\t\t\tonConnect();\n\t\t});\n\t} else {\n\t\tconsole.log('waiting...');\n\t\tsetTimeout(init, 1000);\n\t}\n}", "function socketInit() {\r\n\tsocket = io();\r\n\r\n\tsocket.on('message', parsedMessage => {\r\n\t\tconsole.info('Received message: ' + parsedMessage.id);\r\n\r\n\t\tswitch (parsedMessage.id) {\r\n\t\t\t//event for self user, when he leaves the room\r\n\t\t\tcase 'disconn':\r\n\t\t\t\tparticipants[userId].disposeSelf();\r\n\t\t\t\tsocket.close();\r\n\t\t\t\tbreak;\r\n\t\t\t// event for new user to connect to KMS and register other users in room\r\n\t\t\tcase 'existingParticipants':\r\n\t\t\t\tonExistingParticipants(parsedMessage);\r\n\t\t\t\tbreak;\r\n\t\t\t// event for other users to register new participant\r\n\t\t\tcase 'newParticipantArrived':\r\n\t\t\t\tonNewParticipant(parsedMessage);\r\n\t\t\t\tbreak;\r\n\t\t\t// event for other users to register the leaving of user\r\n\t\t\tcase 'participantLeft':\r\n\t\t\t\tonParticipantLeft(parsedMessage);\r\n\t\t\t\tbreak;\r\n\t\t\t// event to register answers : user-KMS and user-user\r\n\t\t\tcase 'receiveVideoAnswer':\r\n\t\t\t\treceiveVideoResponse(parsedMessage);\r\n\t\t\t\tbreak;\r\n\t\t\t// event for exchanging ICE candidates between WebRTC peers\r\n\t\t\tcase 'iceCandidate':\r\n\t\t\t\tparticipants[parsedMessage.userId].rtcPeer.addIceCandidate(parsedMessage.candidate, function (error) {\r\n\t\t\t\t\tif (error) {\r\n\t\t\t\t\t\tconsole.error(\"Error adding candidate: \" + error);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase'chat message':\r\n\t\t\t\treceiveChatMessage(parsedMessage);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t// event for new user to receive a response of moderator\r\n\t\t\tcase 'moderatorResponse':\r\n\t\t\t\tmoderatorResponse(parsedMessage.accepted, socket);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'videoDisabled':\r\n\t\t\t\tputNameOverVideo(document.getElementById(parsedMessage.userId));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'videoEnabled':\r\n\t\t\t\tputVideoOverName(document.getElementById(parsedMessage.userId));\r\n\t\t\t\tbreak;\r\n\r\n\t\t}\r\n\t});\r\n\t// event fired when moderator enters the room or if the moderator is not available\r\n\tsocket.on('onEnterNotification', error => {\r\n\t\tif (error === null) {\r\n\t\t\tenter('moderator');\r\n\t\t} else {\r\n\t\t\talert(error);\r\n\t\t}\r\n\t});\r\n\t// event for requesting permission from the moderator to log in a new user\r\n\tsocket.on('requestForModerator', (socketId, fullName) => {\r\n\t\tlet data = {\r\n\t\t\tid: 'moderatorResponse',\r\n\t\t\tuserId: socketId,\r\n\t\t\taccepted: false\r\n\t\t}\r\n\r\n\t\taddModal(fullName, (modalId) => {\r\n\t\t\tdata.accepted = true;\r\n\t\t\tdocument.getElementById(modalId).remove();\r\n\t\t\tsendMessage(data);\r\n\t\t}, (modalId) => {\r\n\t\t\tdocument.getElementById(modalId).remove();\r\n\t\t\tsendMessage(data);\r\n\t\t});\r\n\r\n\t});\r\n\tsocket.on('waitModeratorResponse', () => {\r\n\t\talert('Please wait until moderator accepts your entry');\r\n\t});\r\n}", "function init () {\n\t\n\t\tvar host = \"ws://localhost\"; //ws://localhost:8787/\n\t\t\n\t\ttry {\n\t\t\t// Firefox accept only MozWebSocket\n\t\t\tsocket = (\"MozWebSocket\" in window ? new MozWebSocket (host) : new WebSocket(host));\n\t\t\t//socket = (\"WebScoket\" in window) ? new WebSocket(host) :\n\t\t\tlog ('WebSocket - status ' + socket.readyState);\n\t\t\t\n\t\t\tsocket.onopen = function (msg) {\n\t\t\t\tlog (\"Welcome - status \" + this.readyState);\n\t\t\t}\n\t\t\t\n\t\t\tsocket.onmessage = function (msg) {\n\t\t\t\tlog (\"Received: \" + msg.data);\n\t\t\t}\n\n\t\t\tsocket.onclose = function (msg) {\n\t\t\t\tlog (\"Disconnected - status \" + this.readyState); \n\t\t\t}\n\t\t}\n\t\tcatch (ex) {\n\t\t\tlog (ex);\n\t\t}\n\t\t$(\"#msg\").focus ();\n\t}", "function socket_init(map_){\n socket = new io.Socket(null, {port: 3000, rememberTransport: false});\n socket.connect();\n map = map_;\n\n var socket_events = {\n 'connect' : connectHandler\n ,'disconnect' : disconnectHandler\n ,'reconnect' : reconnectHandler\n ,'reconnecting' : reconnectingHandler\n ,'reconnect_failed' : reconnect_failedHandler\n ,'message' : messageHandler\n }\n\n _.forEach(socket_events, function(func, event) {\n if(!func) console.log(\"Cannot find \" + event + 'function. Please create it!' );\n else socket.on(event,func);\n });\n}", "listen() {\n let others = this._context._services.get(this.name, this.type).filter(entry => {\n return entry.address == this.address;\n });\n if (others.length) {\n for (let node of others) {\n this.socket.connect(node.address);\n }\n }\n this.socket.bind(this.node.host + ':' + this.port);\n }", "async onReady() {\n\t\t// Read already known devices\n\t\tawait this.tryKnownDevices();\n\n\t\t// Run Autodetect (Bonjour - Service, mDNS to be handled)\n\t\tawait this.scanDevices();\n\n\t\t// Connection state to online when adapter is ready to connect to devices\n\t\tthis.setState('info.connection', true, true);\n\t\tthis.log.info('WLED initialisation finalized, ready to do my job have fun !');\n\n\t\t// Start Polling timer\n\t\tthis.polling_timer();\n\n\t}", "function testSocket () {\n socket.once('error', onError);\n socket.once('connect', onConnect);\n socket.connect(options.path);\n }", "async init() {\n // Initiate classes and wait for async operations here.\n\n this.emit(Application.events.APP_READY);\n }", "function setupClient (cb) {\n cb = once(cb)\n\n // Indicate failure if anything goes awry during setup\n function bail (err) {\n socket.destroy()\n cb(err || new Error('client error during setup'))\n }\n // Work around lack of close event on tls.socket in node < 0.11\n ((socket.socket) ? socket.socket : socket).once('close', bail)\n socket.once('error', bail)\n socket.once('end', bail)\n socket.once('timeout', bail)\n socket.once('cleanupSetupListeners', function onCleanup () {\n socket.removeListener('error', bail)\n .removeListener('close', bail)\n .removeListener('end', bail)\n .removeListener('timeout', bail)\n })\n\n self._socket = socket\n self._tracker = tracker\n\n // Run any requested setup (such as automatically performing a bind) on\n // socket before signalling successful connection.\n // This setup needs to bypass the request queue since all other activity is\n // blocked until the connection is considered fully established post-setup.\n // Only allow bind/search/starttls for now.\n const basicClient = {\n bind: function bindBypass (name, credentials, controls, callback) {\n return self.bind(name, credentials, controls, callback, true)\n },\n search: function searchBypass (base, options, controls, callback) {\n return self.search(base, options, controls, callback, true)\n },\n starttls: function starttlsBypass (options, controls, callback) {\n return self.starttls(options, controls, callback, true)\n },\n unbind: self.unbind.bind(self)\n }\n vasync.forEachPipeline({\n func: function (f, callback) {\n f(basicClient, callback)\n },\n inputs: self.listeners('setup')\n }, function (err, _res) {\n if (err) {\n self.emit('setupError', err)\n }\n cb(err)\n })\n }", "function initSockets(){\n //connect to the io opened tunnel in the server\n var socket = io();\n socket.on(\"Order Status\", function(obj){\n createReadyOrders(obj.nowServing);\n createToBeCooked(obj.kitchen);\n });\n\n}", "function init() {\n initMonitor();\n __players = [];\n __socket = initSocket();\n setEventHandlers();\n}", "sendInitData () {\n if (this.socket) {\n this.socket.emit('init', {\n name: this.name,\n icon: this.icon,\n hasMessages: this.hasMessages()\n })\n this.sendNewMessages()\n }\n }", "function socketAlive() {\n setTimeout(function() {\n socket.emit('socket_alive');\n socketAlive();\n }, 3200);\n }", "setupDoorbellSocket() {\n let socket = new net.Socket({ readable: true, writable: true });\n socket.on('end', function () {\n console.log('Doorbell socket ended');\n });\n socket.on('close', function () {\n console.log('Doorbell socket closed');\n clearInterval(this._keepAliveTimer);\n });\n socket.on('data', this.receive.bind(this));\n socket.on('error', function (e) {\n console.error('Doorbell socket error', e);\n this.doorbellSocket.destroy(); // destroy the socket\n this.mqttClient.end(true); // End the mqtt connection right away.\n clearInterval(this._keepAliveTimer); // Stop sending keepalive requests\n this.start(); // Start over again.\n });\n this.doorbellSocket = socket.connect({ port: 5000, host: this.dahua_host });\n }", "function init(sock) {\n\t\tthis.profileSynchronize = new ProfileSynchronize(sock);\n\t\tthis.skillsSynchronize = new SkillsSynchronize(sock);\n\t\tthis.trainingSynchronize = new TrainingSynchronize(sock);\n\t\tthis.badgesSynchronize = new BadgesSynchronize(sock);\n\t\tthis.achievementsSynchronize = new AchievementsSynchronize(sock);\n\t}", "_onListening() {\n /* Called after socket.bind */\n let address = this.socket.address()\n log.info(`server listening ${address.address}:${address.port}`)\n }", "initTCP() {\n\t\tthis.receiveBuffer = ''\n\n\t\tif (this.socket !== undefined) {\n\t\t\tthis.socket.destroy()\n\t\t\tdelete this.socket\n\t\t}\n\n\t\tif (this.pollTimer !== undefined) {\n\t\t\tclearInterval(this.pollTimer)\n\t\t}\n\n\t\tif (this.config.port === undefined) {\n\t\t\tthis.config.port = 23\n\t\t}\n\n\t\tif (this.config.host) {\n\t\t\tthis.socket = new TCPHelper(this.config.host, this.config.port)\n\n\t\t\tthis.socket.on('status_change', (status, message) => {\n\t\t\t\tthis.updateStatus(status, message)\n\t\t\t})\n\n\t\t\tthis.socket.on('error', (err) => {\n\t\t\t\tthis.log('error', 'Network error: ' + err.message)\n\t\t\t})\n\n\t\t\tthis.socket.on('connect', () => {\n\t\t\t\tthis.log('debug', 'Connected')\n\t\t\t})\n\n\t\t\tthis.socket.on('disconnect', () => {\n\t\t\t\tthis.log('debug', 'Disconnected')\n\t\t\t\tthis.loggedIn = false\n\t\t\t\tthis.okToSend = false\n\n\t\t\t\tif (this.pollTimer !== undefined) {\n\t\t\t\t\tclearInterval(this.pollTimer)\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t// separate buffered stream into lines with responses\n\t\t\tthis.socket.on('data', (chunk) => {\n\t\t\t\tlet i = 0,\n\t\t\t\t\tline = '',\n\t\t\t\t\toffset = 0\n\t\t\t\tthis.receiveBuffer += chunk\n\n\t\t\t\t// Process lines\n\t\t\t\twhile ((i = this.receiveBuffer.indexOf('\\n', offset)) !== -1) {\n\t\t\t\t\tline = this.receiveBuffer.substr(offset, i - offset)\n\t\t\t\t\toffset = i + 1\n\t\t\t\t\tthis.socket.emit('receiveline', line.toString())\n\t\t\t\t}\n\n\t\t\t\tthis.receiveBuffer = this.receiveBuffer.substr(offset)\n\n\t\t\t\t// Read current line\n\t\t\t\tif (this.receiveBuffer.match(/[L|l]ogin:/)) {\n\t\t\t\t\tthis.receiveBuffer = ''\n\t\t\t\t\tthis.socket.send(this.config.username + '\\r\\n')\n\t\t\t\t} else if (this.receiveBuffer.match(/[P|p]assword:/)) {\n\t\t\t\t\tthis.receiveBuffer = ''\n\t\t\t\t\tthis.socket.send(this.config.password + '\\r\\n')\n\t\t\t\t} else if (this.receiveBuffer.match(/>/)) {\n\t\t\t\t\tthis.loggedIn = true\n\n\t\t\t\t\tif (this.deviceName == '') {\n\t\t\t\t\t\tthis.receiveBuffer = ''\n\t\t\t\t\t\tthis.socket.send('version\\r\\n')\n\t\t\t\t\t\tthis.catchUp = true\n\t\t\t\t\t\tthis.lastPoll = -1\n\t\t\t\t\t} else if (this.catchUp == true) {\n\t\t\t\t\t\tlet thisPoll = this.lastPoll + 1\n\n\t\t\t\t\t\tif (thisPoll < PollCommands.length) {\n\t\t\t\t\t\t\tthis.socket.send(PollCommands[thisPoll] + '\\r\\n')\n\t\t\t\t\t\t\tthis.lastPoll = thisPoll\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.catchUp = false\n\n\t\t\t\t\t\t\tif (this.config.pollingOn === true) {\n\t\t\t\t\t\t\t\tthis.pollTimer = setInterval(this.sendPollCommand.bind(this), this.config.pollingInterval * 1000)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.okToSend = true\n\t\t\t\t\t\tthis.sendCommand()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tthis.socket.on('receiveline', (line) => {\n\t\t\t\tif (this.loggedIn == false) {\n\t\t\t\t\tthis.processLogin(line)\n\t\t\t\t} else {\n\t\t\t\t\tthis.processCameraInformation(line)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}", "setUpSocketEventListeners() {}", "_onConnect() {\n clearTimeout(this._connectionTimeout);\n\n this.logger.info(\n {\n tnx: 'network',\n localAddress: this._socket.localAddress,\n localPort: this._socket.localPort,\n remoteAddress: this._socket.remoteAddress,\n remotePort: this._socket.remotePort\n },\n '%s established to %s:%s',\n this.secure ? 'Secure connection' : 'Connection',\n this._socket.remoteAddress,\n this._socket.remotePort\n );\n\n if (this._destroyed) {\n // Connection was established after we already had canceled it\n this.close();\n return;\n }\n\n this.stage = 'connected';\n\n // clear existing listeners for the socket\n this._socket.removeListener('data', this._onSocketData);\n this._socket.removeListener('timeout', this._onSocketTimeout);\n this._socket.removeListener('close', this._onSocketClose);\n this._socket.removeListener('end', this._onSocketEnd);\n\n this._socket.on('data', this._onSocketData);\n this._socket.once('close', this._onSocketClose);\n this._socket.once('end', this._onSocketEnd);\n\n this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT);\n this._socket.on('timeout', this._onSocketTimeout);\n\n this._greetingTimeout = setTimeout(() => {\n // if still waiting for greeting, give up\n if (this._socket && !this._destroyed && this._responseActions[0] === this._actionGreeting) {\n this._onError('Greeting never received', 'ETIMEDOUT', false, 'CONN');\n }\n }, this.options.greetingTimeout || GREETING_TIMEOUT);\n\n this._responseActions.push(this._actionGreeting);\n\n // we have a 'data' listener set up so resume socket if it was paused\n this._socket.resume();\n }", "_onConnect() {\n clearTimeout(this._connectionTimeout);\n\n this.logger.info(\n {\n tnx: 'network',\n localAddress: this._socket.localAddress,\n localPort: this._socket.localPort,\n remoteAddress: this._socket.remoteAddress,\n remotePort: this._socket.remotePort\n },\n '%s established to %s:%s',\n this.secure ? 'Secure connection' : 'Connection',\n this._socket.remoteAddress,\n this._socket.remotePort\n );\n\n if (this._destroyed) {\n // Connection was established after we already had canceled it\n this.close();\n return;\n }\n\n this.stage = 'connected';\n\n // clear existing listeners for the socket\n this._socket.removeListener('data', this._onSocketData);\n this._socket.removeListener('timeout', this._onSocketTimeout);\n this._socket.removeListener('close', this._onSocketClose);\n this._socket.removeListener('end', this._onSocketEnd);\n\n this._socket.on('data', this._onSocketData);\n this._socket.once('close', this._onSocketClose);\n this._socket.once('end', this._onSocketEnd);\n\n this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT);\n this._socket.on('timeout', this._onSocketTimeout);\n\n this._greetingTimeout = setTimeout(() => {\n // if still waiting for greeting, give up\n if (this._socket && !this._destroyed && this._responseActions[0] === this._actionGreeting) {\n this._onError('Greeting never received', 'ETIMEDOUT', false, 'CONN');\n }\n }, this.options.greetingTimeout || GREETING_TIMEOUT);\n\n this._responseActions.push(this._actionGreeting);\n\n // we have a 'data' listener set up so resume socket if it was paused\n this._socket.resume();\n }", "_onConnect() {\n clearTimeout(this._connectionTimeout);\n\n this.logger.info(\n {\n tnx: 'network',\n localAddress: this._socket.localAddress,\n localPort: this._socket.localPort,\n remoteAddress: this._socket.remoteAddress,\n remotePort: this._socket.remotePort\n },\n '%s established to %s:%s',\n this.secure ? 'Secure connection' : 'Connection',\n this._socket.remoteAddress,\n this._socket.remotePort\n );\n\n if (this._destroyed) {\n // Connection was established after we already had canceled it\n this.close();\n return;\n }\n\n this.stage = 'connected';\n\n // clear existing listeners for the socket\n this._socket.removeListener('data', this._onSocketData);\n this._socket.removeListener('timeout', this._onSocketTimeout);\n this._socket.removeListener('close', this._onSocketClose);\n this._socket.removeListener('end', this._onSocketEnd);\n\n this._socket.on('data', this._onSocketData);\n this._socket.once('close', this._onSocketClose);\n this._socket.once('end', this._onSocketEnd);\n\n this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT);\n this._socket.on('timeout', this._onSocketTimeout);\n\n this._greetingTimeout = setTimeout(() => {\n // if still waiting for greeting, give up\n if (this._socket && !this._destroyed && this._responseActions[0] === this._actionGreeting) {\n this._onError('Greeting never received', 'ETIMEDOUT', false, 'CONN');\n }\n }, this.options.greetingTimeout || GREETING_TIMEOUT);\n\n this._responseActions.push(this._actionGreeting);\n\n // we have a 'data' listener set up so resume socket if it was paused\n this._socket.resume();\n }", "_onFinish () {\n if (this.destroyed) return\n\n // Wait a bit before destroying so the socket flushes.\n // TODO: is there a more reliable way to accomplish this?\n const destroySoon = () => {\n setTimeout(() => this.destroy(), 1000)\n }\n\n if (this._connected) {\n destroySoon()\n } else {\n this.once('connect', destroySoon)\n }\n }", "_onFinish () {\n if (this.destroyed) return\n\n // Wait a bit before destroying so the socket flushes.\n // TODO: is there a more reliable way to accomplish this?\n const destroySoon = () => {\n setTimeout(() => this.destroy(), 1000)\n }\n\n if (this._connected) {\n destroySoon()\n } else {\n this.once('connect', destroySoon)\n }\n }", "_onFinish () {\n if (this.destroyed) return\n\n // Wait a bit before destroying so the socket flushes.\n // TODO: is there a more reliable way to accomplish this?\n const destroySoon = () => {\n setTimeout(() => this.destroy(), 1000)\n }\n\n if (this._connected) {\n destroySoon()\n } else {\n this.once('connect', destroySoon)\n }\n }", "_onFinish () {\n if (this.destroyed) return\n\n // Wait a bit before destroying so the socket flushes.\n // TODO: is there a more reliable way to accomplish this?\n const destroySoon = () => {\n setTimeout(() => this.destroy(), 1000)\n }\n\n if (this._connected) {\n destroySoon()\n } else {\n this.once('connect', destroySoon)\n }\n }", "_setup() {\n this.setHeaderFunc({\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache, no-transform',\n 'Connection': 'keep-alive'\n })\n this._writeKeepAliveStream(true)\n this._setRetryInterval()\n this.send(this.connectEventName, this.uid)\n\n const timer = setInterval(this._writeKeepAliveStream.bind(this), this.heartBeatInterval)\n\n this.stream.on('close', () => {\n clearInterval(timer)\n connectionMap.delete(this.uid)\n this.transformStream.destroy()\n })\n connectionMap.set(this.uid, this)\n }", "function initSocket(socket) {\n let id;\n // proxyMethods('socket-' + (socketNo + 1), socket)\n const registerOrIdentify = async (data) => {\n // id = await users.create(socket, data);\n const roomName = data.room\n id = await users.create(socket, data);\n console.log(\"REG OR IDENTIFY\", roomName)\n if (!roomName || roomName === 'undefined') return\n if (!rooms.exists(roomName)) {\n rooms.create(roomName)\n }\n rooms.join(roomName, data.id)\n // rooms.computeCascade(roomName)\n // console.log(\"Send to members\", rooms.members(roomName))\n rooms.sendToMembers(roomName, 'members', { members: rooms.members(roomName) })\n }\n\n const doIdentify = () => {\n\n socket.emit('identify')\n .on('identified', async (data) => {\n console.log(\"identified client\", data.id, data.name)\n registerOrIdentify(data)\n })\n }\n\n const timeoutIdentify = setTimeout(doIdentify, 1)\n socket.on('init', () => clearTimeout(timeoutIdentify))\n socketNo++\n console.log(`Socket # ${socketNo} initialized`)\n socket\n .on('init', async (data) => {\n // console.log(\"init message received with\", data)\n id = await users.create(socket, data);\n console.log(\"Sending id\", id)\n socket.emit('init', { id });\n })\n\n .on('peerconnect', (data) => {\n console.log('peerconnect', data.trackNo, data.room, data.from, data.friend, JSON.stringify(data.details))\n // rooms.next()\n })\n // .on('cascade', async (data) => {\n // console.log(\"GOT CASCADE\")\n // // doConnect(data.room)\n // })\n .on('relay', (data) => {\n // console.log(\"Relay \", data.op, \"from\", id, \"to\", data.to)\n //sendToReceiver(data.to, data.op, data);\n\n const receiver = users.getReceiver(data.to);\n if (receiver) {\n receiver.emit(data.op, data);\n } else {\n socket.emit('relayError', data)\n }\n })\n .on('register', async (data) => {\n registerOrIdentify(data)\n })\n .on('debug', (message) => { console.log(\"debug\", message) })\n .on('joincall', (data) => {\n // console.log(\"joincall\", data)\n // data.from = id\n //sendToReceiver(data.responder,'joincall', data);\n\n const receiver = users.getReceiver(data.responder);\n if (receiver) {\n receiver.emit('joincall', data);\n }\n })\n .on('call', (data) => {\n // const keys = Object.keys(data)\n // console.log(\"call message\", { to: data.to, from: id, keys })\n //sendToReceiver(data.id, 'call', { ...data, from: id });\n const receiver = users.getReceiver(data.to);\n if (receiver) {\n receiver.emit('call', { ...data, from: id });\n } else {\n socket.emit('failed');\n }\n })\n .on('end', (data) => {\n // if (version) {\n // rooms.clearRoom(users.getRoom(id))\n // }\n // sendToReceiver(data.id, 'end', { from: id });\n const receiver = users.getReceiver(data.to);\n if (receiver) {\n receiver.emit('end', { from: id });\n }\n })\n .on('disconnect', () => {\n const roomName = users.getRoom(id)\n rooms.leave(roomName, id)\n users.remove(id);\n console.log(id, 'disconnected');\n rooms.sendToMembers(roomName, 'members', {\n members: rooms.members(roomName)\n // , cascade: rooms.cascade(roomName)\n })\n })\n}", "function initConn(){\nnode.warn(\"LINE 15: node.path= \" + node.path);\n var socket = require('socket.io-client')(node.host, { path: node.path, multiplex:false });\n node.server = socket; // keep for closing\n handleConnection(socket);\n }", "function init(){\n wss.on('connection', onConnection);\n}", "function bind() {\r\n\r\n socket = new io.Socket(postmile.api.domain, { port: postmile.api.port, rememberTransport: false });\r\n\r\n socket.on('connect', function () {\r\n Y.log('Connected!');\r\n });\r\n\r\n socket.on('message', function (message) {\r\n handleStreamMessage(message);\r\n });\r\n\r\n socket.connect();\r\n\r\n Y.on(\"postmile:subscribeProject\", function (project) {\r\n subscribe(project);\r\n });\r\n\r\n }", "_registerSocketListener() {\n this._socket.on('message', (data) => {\n this._mav.parse(data);\n });\n }", "_onFinish () {\n if (this.destroyed) return\n\n // Wait a bit before destroying so the socket flushes.\n // TODO: is there a more reliable way to accomplish this?\n const destroySoon = () => {\n setTimeout(() => this.destroy(), 1000)\n }\n\n if (this.connected) {\n destroySoon()\n } else {\n this.once('connect', destroySoon)\n }\n }", "_onFinish () {\n if (this.destroyed) return\n\n // Wait a bit before destroying so the socket flushes.\n // TODO: is there a more reliable way to accomplish this?\n const destroySoon = () => {\n setTimeout(() => this.destroy(), 1000)\n }\n\n if (this.connected) {\n destroySoon()\n } else {\n this.once('connect', destroySoon)\n }\n }", "async init() {\n this.log = await Log({ label: 'devices' });\n this.ipc = require('electron').ipcMain;\n this.listen();\n }", "waitForSocketConnection(callback){\n const socket = this.socketRef;\n const recursion = this.waitForSocketConnection;\n // It can maintain connected conditions.\n\n setTimeout(\n // Set Times by seconds milliseconds.\n function(){\n if (socket.readyState === 1){\n console.log('connection is secure');\n // if didn't pass in a callback,\n // then call the callback.\n if(callbacks != null){\n callback();\n }\n // Otherwise will just return.\n return;\n } else {\n console.log('waiting for connection...');\n recursion(callback);\n }\n }, 1);\n }", "function startSocketService() {\n\n sockets = initCameraSocketService(config, socketService);\n\n sockets.forEach(function(socket) {\n if (typeof socket !== 'undefined') {\n socket.on('camera:status', updateCameraStatus);\n }\n });\n\n }", "initialize() {\n debug(\"Initializing ChatServer\");\n const io = this.io;\n io.use(this._userMiddleware());\n io.on(events.connection, (socket) => {\n this._handleNewUser(socket);\n socket.on(events.disconnect, this._handleDisconnect(socket));\n socket.on(events.messageSent, this._handleMessageSent(socket));\n });\n }", "function init() {\n createRoomBtn.addEventListener(\"click\", createRoom);\n joinRoomBtn.addEventListener(\"click\", joinRoom);\n pc = new RTCPeerConnection(rtcconfig);\n\n initDataChannel();\n }", "async start() {\n const { events, server, host, port } = this;\n\n /**\n * if the server has already started, do nothing\n */\n if (this.started) {\n return true;\n }\n\n return new Promise((resolve, reject) => {\n server.listen({ host, port }, (err, address) => {\n if (err) {\n reject(err);\n }\n this.started = true;\n if (port === 0) {\n // get the port the server has bound to and apply it to the class\n const [, boundPort] = address.match(/:([0-9]+)$/);\n this.port = parseInt(boundPort, 10);\n }\n events.emit('onStart', this);\n resolve(true);\n });\n });\n }", "connect (){\n let self = this;\n let options = {\n port: this.port\n };\n var promise = new Promise((resolve) => {\n \n self.socket = SC.connect(options);\n self.socket.on('init', (data) =>{\n resolve(data);\n });\n });\n\n return promise;\n }", "function setupSocket(){\n\t\tvar pos = {\n\t\t\tx: Math.floor(Math.random()*451),\n\t\t\ty: Math.floor(Math.random()*451),\n\t\t};\n\n\t\tvar color = {\n\t\t\tr: Math.floor(Math.random()*256),\n\t\t\tg: Math.floor(Math.random()*256),\n\t\t\tb: Math.floor(Math.random()*256)\n\t\t};\n\n\t\tuser.pos = pos;\n\t\tuser.radius = 20;\n\t\tuser.color = color;\n\t\tuser.hit = 0;\n\n\t\tsocket.emit('join', {\n\t\t\tname: user.name,\n\t\t\tpos: pos,\n\t\t\tradius: 20,\n\t\t\tcolor: color,\n\t\t\thit: 0,\n\t\t\tscore: 0,\n\t\t});\n\n\t\t// get other clients data from server\n\t\tsocket.on('initData', function(data){\n\t\t\tplayers = data.players;\n\t\t\tarrayBullets = data.arrayBullets;\n\t\t});\n\n\t\t// updates player movements & bullets\n\t\tsocket.on('update', function(data){\n\t\t\tplayers = data.players;\n\t\t\tarrayBullets = data.arrayBullets;\n\t\t\tdraw();\n\t\t});\n\t}", "constructor() {\n this.io = require('socket.io')();\n }", "_setDefaultListeners () {\n this.io.on('connection', (objSocket) => {\n console.log('Socket client connected', this.io.engine.clientsCount);\n objSocket.on('join_room', (strRoom) => {\n console.log('Joining room', strRoom);\n objSocket.join(strRoom);\n });\n })\n }", "async onReady() {\n // Initialize your adapter here\n // Reset the connection indicator during startup\n this.setState('info.connection', false, true);\n if (!this.config.host) {\n this.log.error(`No host is configured, will not start anything!`);\n return;\n }\n await this.cleanupObjects();\n this.createWebSocket();\n if (this.config.luxPort) {\n await this.createLuxTreeAsync();\n this.createLuxtronikConnection(this.config.host, this.config.luxPort);\n }\n this.watchdogInterval = setInterval(() => this.handleWatchdog(), this.config.refreshInterval * 1000);\n }", "function rawSocketConnect() {\n that.debugOut('Raw socket connected');\n that.emit('raw socket connected', (that.socket.socket || that.socket));\n }", "componentDidMount() {\n this.initSocket();\n }", "function setupSocket(socket) {\n\n socket.onopen = function () {\n connectedToWS = true\n }\n\n socket.onmessage = function (msg) {\n connectionSketch.showServerResponse(msg.data)\n }\n\n socket.onclose = function () {\n connectedToWS = false\n }\n}", "setupListenersOnConnect() {\n const { socket } = this;\n\n return new Promise((resolve, reject) => {\n const handleMessage = event => {\n const messageEvent = event;\n //The cast was necessary because Flow's libdef's don't contain\n //a MessageEventListener definition.\n\n if(this.receiveCallbacksQueue.length !== 0) {\n this.receiveCallbacksQueue.shift().resolve(messageEvent.data);\n return;\n }\n\n this.receiveDataQueue.push(messageEvent.data);\n };\n\n const handleOpen = event => {\n socket.addEventListener('message', handleMessage);\n socket.addEventListener('close', event => {\n this.closeEvent = event;\n\n //Whenever a close event fires, the socket is effectively dead.\n //It's impossible for more messages to arrive.\n //If there are any promises waiting for messages, reject them.\n while(this.receiveCallbacksQueue.length !== 0) {\n this.receiveCallbacksQueue.shift().reject(this.closeEvent);\n }\n });\n resolve();\n };\n\n socket.addEventListener('error', reject);\n socket.addEventListener('open', handleOpen);\n });\n }", "connect(existing_socket) {\n this._onDataReceived = (data) => this.onDataReceived(data);\n this._onClose = () => this.onClose();\n this._onError = (err) => this.onError(err);\n this._onConnect = () => this.onConnect();\n // Start timeout timer (defaults to 30 seconds)\n const timer = setTimeout(() => this.onEstablishedTimeout(), this._options.timeout || constants_1.DEFAULT_TIMEOUT);\n // check whether unref is available as it differs from browser to NodeJS (#33)\n if (timer.unref && typeof timer.unref === 'function') {\n timer.unref();\n }\n // If an existing socket is provided, use it to negotiate SOCKS handshake. Otherwise create a new Socket.\n if (existing_socket) {\n this._socket = existing_socket;\n }\n else {\n this._socket = new net.Socket();\n }\n // Attach Socket error handlers.\n this._socket.once('close', this._onClose);\n this._socket.once('error', this._onError);\n this._socket.once('connect', this._onConnect);\n this._socket.on('data', this._onDataReceived);\n this.state = constants_1.SocksClientState.Connecting;\n this._receiveBuffer = new receivebuffer_1.ReceiveBuffer();\n if (existing_socket) {\n this._socket.emit('connect');\n }\n else {\n this._socket.connect(this.getSocketOptions());\n if (this._options.set_tcp_nodelay !== undefined &&\n this._options.set_tcp_nodelay !== null) {\n this._socket.setNoDelay(!!this._options.set_tcp_nodelay);\n }\n }\n // Listen for established event so we can re-emit any excess data received during handshakes.\n this.prependOnceListener('established', info => {\n setImmediate(() => {\n if (this._receiveBuffer.length > 0) {\n const excessData = this._receiveBuffer.get(this._receiveBuffer.length);\n info.socket.emit('data', excessData);\n }\n info.socket.resume();\n });\n });\n }", "init() {\n this.get('socketId').then((oldSocketId) => {\n if (oldSocketId !== null && this._io['sockets']['connected'].hasOwnProperty(oldSocketId)) {\n this.logger.log('detected a new connection from the same client'\n + ' | disconnecting the old connection of socket id: ' + this._socketId);\n try {\n this._io['sockets']['connected'][oldSocketId].emit('force-disconnect');\n } catch (err) {\n // Do nothing.\n }\n }\n this.set('socketId', this._socketId);\n });\n }", "function java_socket_bridge_ready(){\n\tjava_socket_bridge_ready_flag = true;\n}", "setupChatNs() {\r\n\t\tthis.ns.chat.on(\"connection\", baseSocket => {\r\n\t\t\tconst socket = new Proxy(baseSocket, new ExtendedSocket()); //extend socket\r\n\r\n\t\t\tsocket.log(chalk.cyan(\"connected\"));\r\n\t\t\tthis.sockets.add(socket);\r\n\r\n\t\t\t//socket wants to join a room\r\n\t\t\tsocket.on(ACTION_TYPE.JOIN_ROOM, ({\r\n\t\t\t\troom,\r\n\t\t\t\tnick\r\n\t\t\t}) => {\r\n\t\t\t\tsocket.changeRoomTo(room);\r\n\r\n\t\t\t\tif (nick) {\r\n\t\t\t\t\tsocket.nick = nick;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//give the socket a random name if it doesnt have any yet\r\n\t\t\t\tif (!socket.nick) {\r\n\t\t\t\t\tsocket.nick = randomNick();\r\n\t\t\t\t\tsocket.emit(ACTION_TYPE.OWN_NICK_CHANGE, {\r\n\t\t\t\t\t\tuser: {\r\n\t\t\t\t\t\t\tnew: socket.nick\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//send the initial state of the room\r\n\t\t\t\tthis.getRoomState(room).then(state => {\r\n\t\t\t\t\tsocket.emit(ACTION_TYPE.ROOM_STATE, {\r\n\t\t\t\t\t\tstate\r\n\t\t\t\t\t});\r\n\t\t\t\t}).catch(err => console.error(err));\r\n\r\n\t\t\t\t//tell others\r\n\t\t\t\tsocket.broadcastToRoom(ACTION_TYPE.ENTERED_ROOM, {\r\n\t\t\t\t\tuser: socket.user\r\n\t\t\t\t});\r\n\r\n\t\t\t\tsocket.log(chalk.green(\"joined\"), room);\r\n\t\t\t});\r\n\r\n\t\t\t//socket wants to leave a room\r\n\t\t\tsocket.on(ACTION_TYPE.LEAVE_ROOM, ({room}) => {\r\n\t\t\t\tsocket.broadcastToRoom(ACTION_TYPE.LEFT_ROOM, {\r\n\t\t\t\t\tuser: socket.user\r\n\t\t\t\t});\r\n\t\t\t\tsocket.leaveAllRooms();\r\n\t\t\t});\r\n\r\n\t\t\t//socket sent a chat message\r\n\t\t\tsocket.on(ACTION_TYPE.ADD_CHAT_MESSAGE, message => {\r\n\t\t\t\tdb.addChatMessage(socket.currentRoom, message).catch(console.error.bind());\r\n\t\t\t\tsocket.broadcastToRoom(ACTION_TYPE.ADD_CHAT_MESSAGE, {\r\n\t\t\t\t\tmessage\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\tsocket.on(ACTION_TYPE.OWN_NICK_CHANGE, nick => {\r\n\t\t\t\tsocket.broadcastToRoom(ACTION_TYPE.NICK_CHANGE, {\r\n\t\t\t\t\tuser: {\r\n\t\t\t\t\t\told: socket.nick,\r\n\t\t\t\t\t\tnew: nick\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tsocket.nick = nick;\r\n\t\t\t});\r\n\r\n\t\t\tsocket.on(\"disconnect\", () => {\r\n\t\t\t\tsocket.broadcastToRoom(ACTION_TYPE.LEFT_ROOM, {\r\n\t\t\t\t\tuser: socket.user\r\n\t\t\t\t});\r\n\t\t\t\tthis.sockets.delete(socket);\r\n\t\t\t\tsocket.log(STRINGS.DISCONNECTED);\r\n\t\t\t});\r\n\r\n\t\t\tsocket.on(\"error\", err => {\r\n\t\t\t\tsocket.log(STRINGS.ERROR, err);\r\n\t\t\t});\r\n\t\t});\r\n\t}", "initSocket(callback, idhandler, userhandler) {\n this.io.on('assignment', idhandler);\n this.io.on('questionAsked', callback);\n this.io.on('newUser', userhandler);\n }", "function initSocket() {\n\tg_socket = io.connect(g_server_address, {secure: true});\n}", "_setup() {\n this.self.ipc.register(this.returnID, data => {\n this._handleResponse(data)\n });\n\n let data = {}\n\n data.globalType = this.globalType;\n data.clusterID = this.clusterID;\n data.responseID = this.returnID;\n data.data = this.broadcastString\n\n this.self.ipc.broadcast('advancedIPCListen', data);\n\n\n this.timeout = setTimeout(() => {\n if (this.responses.length < this.expectedReturns) {\n return this.emit('failed', 'Timeout waiting for all responses.');\n }\n }, 30000);\n }", "function setupSocket(socket) {\n socket.setTimeout(0);\n socket.setNoDelay(true);\n socket.setKeepAlive(true, 0);\n}", "function socketFullyConnected() {\n that.debugOut('Socket fully connected');\n that.reconnect_attempts = 0;\n that.connected = true;\n last_socket_error = null;\n that.emit('socket connected');\n }", "static init() {\n const self = this;\n this.syncStatus = \"ended\";\n window.addEventListener(\"online\", function(e) { self.syncToRemote(); });\n }", "function tellReady() {\n if (!isLocalStreamStarted()) {\n alert(\n \"Local stream not running yet. Please [Start Video] or [Start Screen].\"\n );\n return;\n }\n if (!socketReady) {\n alert(\"Socket is not connected to server. Please reload and try again.\");\n return;\n }\n\n // call others, in same room\n console.log(\"tell ready to others in same room, before offer\");\n socket.emit(\"message\", { type: \"talk_ready\" });\n}", "async connect () {\n try {\n await new Promise((resolve, reject) => {\n if (this.connection.destroyed) reject(new Error('The socket is destroyed.'));\n\n const onError = err => {\n this.connection.off('error', onError);\n this.connection.off('connect', onConnected);\n reject(err);\n };\n \n const onConnected = () => {\n this.connection.off('error', onError);\n this.connection.off('connect', onConnected);\n resolve();\n };\n \n this.connection.once('error', onError);\n this.connection.once('connect', onConnected);\n\n const { host, port } = core.settings.get('remote')\n this.connection.connect({\n host, \n port, \n rejectUnauthorized: false\n });\n });\n\n this._initialize()\n\n this.connection.on('data', data => this._connectionProtocol.chuck(data))\n this.connection.once('close', () => this.disconnect())\n } catch (error) {\n core.console.showMessage({\n message: `Failed connecting to the remote host. ${error.message}.`,\n withStatus: true,\n type: 'error'\n })\n }\n }", "_init_socket() {\n return new Promise((resolve, reject) => {\n // Create a new Socket connection to Unix socket or remote server (in that order)\n let client;\n\n // Setup socket connection timeout (defualt: 20 seconds).\n const timeout = this.settings.clamdscan.timeout ? this.settings.clamdscan.timeout : 20000;\n\n // The fastest option is a local Unix socket\n if (this.settings.clamdscan.socket)\n client = net.createConnection({path: this.settings.clamdscan.socket, timeout});\n\n // If a port is specified, we're going to be connecting via TCP\n else if (this.settings.clamdscan.port) {\n // If a host is specified (usually for a remote host)\n if (this.settings.clamdscan.host) {\n client = net.createConnection({host: this.settings.clamdscan.host, port: this.settings.clamdscan.port, timeout});\n }\n // Host can be ignored since the default is `localhost`\n else {\n client = net.createConnection({port: this.settings.clamdscan.port, timeout});\n }\n }\n\n // No valid option to connection can be determined\n else throw new NodeClamError('Unable not establish connection to clamd service: No socket or host/port combo provided!');\n\n // Set the socket timeout if specified\n if (this.settings.clamdscan.timeout) client.setTimeout(this.settings.clamdscan.timeout);\n\n // Setup socket client listeners\n client\n .on('connect', () => {\n // Some basic debugging stuff...\n // Determine information about what server the client is connected to\n if (client.remotePort && client.remotePort.toString() === this.settings.clamdscan.port.toString()) {\n if (this.settings.debug_mode) console.log(`${this.debug_label}: using remote server: ${client.remoteAddress}:${client.remotePort}`);\n } else if (this.settings.clamdscan.socket) {\n if (this.settings.debug_mode) console.log(`${this.debug_label}: using local unix domain socket: ${this.settings.clamdscan.socket}`);\n } else {\n if (this.settings.debug_mode) {\n const {port, address} = client.address();\n console.log(`${this.debug_label}: meta port value: ${port} vs ${client.remotePort}`);\n console.log(`${this.debug_label}: meta address value: ${address} vs ${client.remoteAddress}`);\n console.log(`${this.debug_label}: something is not working...`);\n }\n }\n\n return resolve(client);\n })\n .on('timeout', () => {\n if (this.settings.debug_mode) console.log(`${this.debug_label}: Socket/Host connection timed out.`);\n reject(new Error('Connection to host has timed out.'));\n client.end();\n })\n .on('close', () => {\n if (this.settings.debug_mode) console.log(`${this.debug_label}: Socket/Host connection closed.`);\n })\n .on('error', (e) => {\n if (this.settings.debug_mode) console.error(`${this.debug_label}: Socket/Host connection failed:`, e);\n reject(e);\n });\n });\n }", "start() {\n this.setupDoorbellSocket();\n this.setupMQTT();\n this.initLogin();\n }", "_ensureConnected() {\n if (!this._instance) {\n throw new TypeError(\n 'You need to call `connect` method before calling any other methods'\n );\n }\n }", "async connected() {\n await this.socket.connectionStatus.waitFor(socket_1.ConnectionStatus.Connected);\n }", "connectionReady(callback) {\n this.emit('connected');\n this.connected = true;\n // Remove existing error handlers as the connection is now ready.\n this.netClient.removeAllListeners('error');\n this.netClient.on('error', this.handleSocketError.bind(this));\n callback();\n }", "constructor(socket) {\n super(socket);\n }", "_onConnection (err, socket, addrstates, addr) {\n if (err) {\n if (socket) socket.destroy()\n logerror('discovery connection error: ' + errToString(err))\n this.emit('connectError', err, null) // emit user's event\n if (this.connecting) {\n // setImmediate(this._connectPeer.bind(this)) // lets wait for some time before\n logdebug(`waiting for ${this.retryInterval} ms before connection retry`)\n setTimeout(this._connectPeer.bind(this), this.retryInterval)\n }\n if (addrstates)\n addrstates.setClear(addr, err)\n\n return\n }\n if (this.closed) return socket.destroy()\n let opts = assign({ socket }, this.peerOpts)\n let peer = new Peer(this._params, opts)\n\n // peer error callback\n let onPeerError = (err) => {\n err = err || Error('Connection error')\n logdebug('peer connection error: ' + errToString(err))\n peer.removeListener('disconnect', onPeerError)\n this.emit('connectError', err, peer) // emit user's event\n\n // clear inuse state:\n if (addrstates)\n addrstates.setClear(addr, err)\n\n if (this.connecting) this._connectPeer() // try to connect new peer\n }\n\n // peer success callback\n let onPeerReady = () => {\n if (this.closed) return peer.disconnect()\n // remove once listeners to replace with new ones\n peer.removeListener('error', onPeerError)\n peer.removeListener('disconnect', onPeerError)\n this.addPeer(peer, addrstates, addr)\n\n // set conn time\n if (addrstates)\n addrstates.setConnected(addr)\n\n //this.emit('newpeer', peer); // new event to notify external listeners\n }\n\n // wait for socket connection errors:\n peer.once('error', onPeerError)\n peer.once('disconnect', onPeerError)\n // socket connected:\n peer.once('ready', onPeerReady)\n }", "initConnects() {\n $(window).on('resize', this.onResize.bind(this));\n $('body').on('beforetransition', this._onBeforeTransition.bind(this));\n $('body').on('aftertransition', this._onAfterTransition.bind(this));\n $('body').on('show', this._onActivate.bind(this));\n $(document).ready(() => {\n window.addEventListener('online', this._onOnline.bind(this));\n window.addEventListener('offline', this._onOffline.bind(this));\n });\n\n this.ping();\n }", "function startUp() {\n io.on('connection', function (socket) {\n io.sockets.setMaxListeners(Infinity);\n if (nextOrder > orderLength - 1) {\n stepCount = 0;\n nextOrder = 0;\n }\n var clients = io.sockets.clients(); \n socketArr = Object.values(Object.keys(io.sockets.sockets)); \n\n socket.on('disconnect', function () { \n });\n socket.on('error', function () {\n \n });\n });\n}", "function initialize() {\n // create socket\n Sync.connect()\n\n Sync.connect().on('update_one', RemoteSync.handleRemoteUpdate)\n\n // overwrite backbone sync\n Backbone.sync = syncLocalAndRemote\n }", "function initializeSocket(http) {\n socketIO = require(\"socket.io\")(http);\n}", "function init(socket) {\n\t\t// when the socket is available pass it for setup listeners\n\t\tsock = socket; // cache our socket plz\n\t\t// actual route db CRUD listeners\n\t\tdebug('socket init routes:', routes);\n\t\tsocket.on(routes.index, index);\n\t\tsocket.on(routes.create, create);\n\t\tsocket.on(routes.read, read);\n\t\tsocket.on(routes.update, update);\n\t\tsocket.on(routes.dleet, dleet);\n\t}", "function ready() { timeout( function() {\n if (READY) return;\n READY = 1;\n each( READY_BUFFER, function(connect) { connect() } );\n}, SECOND ); }", "function setSocketIoConnectionListener() {\n io.on('connection', function (client) {\n setSocketIoListeners(client);\n });\n}", "function java_socket_bridge_ready() {\n\t\"use strict\";\n\tjava_socket_bridge_ready_flag = true;\n}" ]
[ "0.68476427", "0.651948", "0.647879", "0.64008003", "0.639745", "0.6349572", "0.62837666", "0.62748325", "0.6223804", "0.6188059", "0.61699563", "0.61507505", "0.61489654", "0.6145473", "0.60656625", "0.6057952", "0.6020551", "0.6012586", "0.60074705", "0.60071814", "0.59899133", "0.5980439", "0.5966842", "0.596195", "0.58994275", "0.58958846", "0.5881763", "0.5875237", "0.58741236", "0.5870463", "0.58632123", "0.5859129", "0.5839863", "0.5835682", "0.5831124", "0.5821761", "0.5817167", "0.5817045", "0.5816255", "0.5814372", "0.5806501", "0.5791837", "0.57884437", "0.57863265", "0.57863265", "0.57863265", "0.57730925", "0.57730925", "0.57730925", "0.57730925", "0.5749992", "0.5749215", "0.5747969", "0.5744443", "0.5744086", "0.5739998", "0.57395875", "0.57395875", "0.5738395", "0.57351995", "0.5709619", "0.57095003", "0.57082164", "0.57071364", "0.5702719", "0.5699646", "0.5697987", "0.569688", "0.5688216", "0.5680665", "0.56793326", "0.56754863", "0.5670793", "0.56688917", "0.5668201", "0.5667092", "0.56663424", "0.56626946", "0.5658099", "0.5657451", "0.5655994", "0.5653413", "0.5642029", "0.5639019", "0.56340885", "0.5629396", "0.56252825", "0.56170934", "0.5606847", "0.5600737", "0.55989176", "0.55957526", "0.559568", "0.55939543", "0.55891997", "0.5573819", "0.5573258", "0.5570332", "0.5564615", "0.55617815" ]
0.6243299
8
Message handler for sockets
messageHandler(self, e) { let msg = ( (e.data).match(/^[0-9]+(\[.+)$/) || [] )[1]; if( msg != null ) { let msg_parsed = JSON.parse(msg); let [r, data] = msg_parsed; self.socketEventList.forEach(e=>e.run(self, msg_parsed)) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function on_socket_get(message){}", "messageHandler(socket) \n\t{\n \t\tsocket.on('message', message => {\n \t\tconst data = JSON.parse(message);\n \t\t\tswitch(data.type) \n\t\t\t{\n\t\t\t\t//when another user has a more updated chain.\t\n \t\t\tcase MESSAGE_TYPES.chain:\n \t\t\t\tthis.blockchain.replaceChain(data.chain);\n \t\t\t\tbreak;\n\t\t\t\t//when another user adds to the transaction pool.\n \t\t\tcase MESSAGE_TYPES.transaction:\n \t\t\t\tthis.transactionPool.updateOrAddTransaction(data.transaction);\n \t\t\t\tbreak;\n\t\t\t\t//when another user clears the transaction pool(only happends when mine completes).\n\t\t\t\tcase MESSAGE_TYPES.clear_transactions:\n\t\t\t\t\tthis.transactionPool.clear();\n\t\t\t\t\tbreak;\n \t\t\t}\t\n\t\t});\n\t}", "SOCKET_ONMESSAGE(state, message) {\n state.socket.message = message;\n }", "messageHandler(socket)\n {\n socket.on('message', message =>\n {\n // lo strasforma in un tipo javascript\n const data = JSON.parse(message);\n\n switch(data.type)\n {\n case MESSAGE_TYPES.chain:\n this.blockchain.replaceChain(data.chain);\n break;\n case MESSAGE_TYPES.transaction:\n this.transactionPool.updateOrAddTransaction(data.transaction);\n break;\n case MESSAGE_TYPES.clear_transactions:\n this.transactionPool.clear();\n break;\n }\n });\n }", "SOCKET_ONMESSAGE (state, payload) {\n state.socket.message = payload\n }", "SOCKET_ONMESSAGE (state, message) {\n state.socket.message = message\n }", "function on_socket_get(message) {\"use strict\"; }", "SOCKET_ONMESSAGE(state, message) {\n state.socket.message = message;\n console.log(\"SOCKET_ONMESSAGE\");\n }", "SOCKET_ONMESSAGE(state, message) {\n // console.log(message, \"msgg\")\n state.socket.message = message\n }", "socketMessage(message) {\n\n let msg = JSON.parse(message.data);\n if (!msg.event) throw \"Invalid message format: \" + msg;\n\n switch (msg.event) {\n case 'startApp':\n console.log('Application launched')\n this.viewHandler.onStartApplication();\n break;\n\n case 'appDisconnected':\n console.log('app disconnected');\n\n GlobalVars.reset();\n this.reset();\n break;\n\n case 'bodyJoints':\n this.eventsHandler.onReceiveBodyJoints(msg);\n break;\n }\n }", "SOCKET_ONMESSAGE (state, message) {\n // console.log(message)\n state.socket.message = message\n }", "SOCKET_ONMESSAGE(state, message) {\n switch (message.type) {\n case \"message\":\n state.messages.push(message.payload);\n break;\n default:\n state.socket.message = message;\n }\n }", "SOCKET_ONMESSAGE (state, message) {\n console.info(state, message)\n }", "function onSocketMessage(message) {\n var action = actions[message.action + \"Action\"];\n if(action) action(message);\n }", "function handleServerMessage(data, rinfo) {\n var message = JSON.parse(data.toString());\n\n switch (message[0]) {\n case MSG.INQUIRE_SERVER: // when somebody asks for the server addres\n if (mode === 'server') {\n log('INFO: host inquiry: ' + rinfo.address + ':' + rinfo.port);\n message = new Buffer(wrapToString(MSG.INQUIRE_SERVER_ADDR));\n socket.send(\n message,\n 0,\n message.length,\n rinfo.port,\n rinfo.address,\n function(err) {\n if (err) {\n log('ERROR: could not respond to inquiry: ' + err);\n } else {\n log('INFO: responded');\n }\n });\n }\n break;\n case MSG.INQUIRE_SERVER_ADDR: // response with server address\n if (mode === 'client' && !joined) {\n remote.port = rinfo.port;\n remote.address = rinfo.address;\n clearTimeout(bcastTimer);\n join();\n }\n break;\n case MSG.JOIN: // when a host joins server chat\n log('INFO: host joining: ' + rinfo.address + ':' + rinfo.port);\n clients.push(rinfo);\n if (!converseTimer) {\n nickname = randomNickname();\n converseTimer = setInterval(converse, CONVERSE_INTERVAL);\n }\n break;\n case MSG.CHAT: // plain chat messages\n console.log(message[1] + ': ' + message[2]); // console here\n // not log wrap\n if (mode === 'server') {\n forwardMessageToClients(data);\n }\n break;\n default: // everything other, should never run\n log('INFO: i do not understand: ' + data.toString());\n break;\n }\n}", "setUpMessageHandler(id) {\n const socket = io.connect();\n\n return socket.on(id, msg => {\n //based on what the message is, dispatch an action\n //msg must be an actionType: { type: TYPE, data: ... }\n\n switch(msg.type) {\n case MSG_LEFT_LINE:\n return this.handleLineLeave(msg);\n case MSG_ENTER_LINE:\n return this.handleServerActionDispatch(msg);\n case MSG_RECEIVED_CUT_MESSAGE:\n return this.handleServerActionDispatch(msg);\n case MSG_RANK_UPDATED:\n return this.handleMessageReceivedRankUpdated(msg);\n case MSG_BATHROOM_CREATED:\n return this.handleMessageReceivedNewNearbyBathrooms(msg);\n default:\n break;\n }\n\n });\n }", "SOCKET_ONMESSAGE(state, message) {\n state.socket.message = message;\n\n if (message.commandId === undefined || message.commandRes === undefined || message.ok === undefined) {\n console.error('Malformed message', message);\n return;\n }\n\n const stateMessage = state.messages[message.commandId];\n state.messages[message.commandId] = null;\n\n switch (message.commandId) {\n // client -> server events\n case COMMAND_LOGIN:\n case COMMAND_REGISTER:\n case COMMAND_CREATE_ROOM:\n case COMMAND_JOIN_ROOM:\n case COMMAND_MAKE_STAKE:\n case COMMAND_MAKE_MOVE:\n case COMMAND_GET_ROOM:\n console.log('Received message', message);\n\n if (message.ok) {\n stateMessage.resolve(message);\n } else {\n stateMessage.reject(message);\n }\n break;\n // server -> client events\n case 1000:\n case 1001:\n case 1002:\n case 1003:\n case 1004:\n case 1005:\n case 1006:\n case 1007:\n case 1008:\n case 1009:\n case 1010:\n case 1011:\n console.log('Received message', message);\n\n state.roomEvent = message;\n break;\n default:\n console.error('Unknown message commandId', message);\n }\n }", "function onSocketMessage(event) {\r\n\tappendContent(\"theMessages\", \"Received: \" + event.data + \"<br/>\");\r\n}", "function messageHandler(event) {\n // We will ignore all messages destined for otherType.\n let data = event.data;\n let portid = data.portId;\n let port;\n if (!data.portFromType || data.portFromType === \"worker\") {\n // this is a message posted by ourself so ignore it.\n return;\n }\n switch (data.portTopic) {\n case \"port-create\":\n // a new port was created on the \"client\" side - create a new worker\n // port and store it in the map\n port = new WorkerPort(portid);\n ports[portid] = port;\n // and call the \"onconnect\" handler.\n onconnect({ports: [port]});\n break;\n\n case \"port-close\":\n // the client side of the port was closed, so close this side too.\n port = ports[portid];\n if (!port) {\n // port already closed (which will happen when we call port.close()\n // below - the client side will send us this message but we've\n // already closed it.)\n return;\n }\n delete ports[portid];\n port.close();\n break;\n\n case \"port-message\":\n // the client posted a message to this worker port.\n port = ports[portid];\n if (!port) {\n // port must be closed - this shouldn't happen!\n return;\n }\n port._onmessage(data.data);\n break;\n\n default:\n break;\n }\n }", "messageHandler(socket) {\n socket.on('message', (message) => {\n const data = JSON.parse(message);\n\n //when data is more than 1 item, they can be accessed using data.thing\n\n //the data type determines how messageHandler proceeds\n switch (data.type) {\n case MESSAGE_TYPES.chain:\n this.blockchain.replaceChain(data.chain);\n break;\n case MESSAGE_TYPES.transaction:\n this.transactionPool.updateOrAddTransaction(data.transaction);\n break;\n case MESSAGE_TYPES.clear_transactions:\n this.transactionPool.clear();\n\n //when a websocket receives a message of type clear_transactions\n // it calls the transactionPool.clear() method to clear\n // their local transaction pools\n break;\n }\n });\n }", "messageHandler(socket) {\n socket.on('message', message => {\n // change the json object to a JS object store in 'data':\n const data = JSON.parse(message);\n\n switch(data.type) {\n // adjust MESSAGE_TYPE\n case MESSAGE_TYPES.chain:\n this.blockchain.replaceChain(data.chain);\n break;\n case MESSAGE_TYPES.transaction:\n this.transactionPool.updateOrAddTransaction(data.transaction);\n break;\n case MESSAGE_TYPES.transaction:\n this.transactionPool.updateOrAddTransaction(data.transaction);\n break;\n case MESSAGE_TYPES.clear_transactions:\n this.transactionPool.clear();\n break;\n //create function to the node bc stuff (substitute with new bc when new blocks mined)\n }\n });\n }", "static handleMessage(socket, emitter) {\n return (message) => {\n switch (message) {\n case 'on':\n console.log(`Client ${socket.id}: subscribe to ${emitter.type}`);\n socket.readEmitter(emitter);\n break;\n case 'off':\n console.log(`Client ${socket.id}: unsubscribe to ${emitter.type}`);\n socket.unreadEmitter(emitter);\n break;\n default:\n console.log(`Client ${socket.id}: Unknow command ${message} on emitter ${emitter.type}`);\n socket.emit(emitter.type, { message: 'Unknow command' });\n break;\n }\n };\n }", "function socket_message(bitmex, message) {\n // Parse the message.\n message = JSON.parse(message)\n\n // Forward message for standalone.\n if(bitmex.opt('standalone')) receive_message(bitmex, message)\n\n // Parse message for parent.\n else {\n const type = message[0] // Parent ID is message[1]. But we added parent to kid, so stream ID will work for parent too =D\n const stream = message[2]\n const reply = message[3]\n\n // Send message to appropriate object.\n switch(type) {\n case 0: return void receive_message(bitmex[s.kids][stream], reply)\n case 2: return void socket_close(bitmex[s.kids][stream], true)\n default: return void this.emit('error', new Error(`Unexpected packet-type received from BitMEX. Packet type: '${type}'`))\n }\n }\n}", "function process_msg (ws, data) {\n if (!data.type || data.type === '') {\n sendMsg({type: \"error\", error: \"type not provided in message\"});\n return;\n }\n // Process the message\n console.log('message type:', data.type);\n if (handlers[data.type]) {\n var res = handlers[data.type](data);\n sendMsg(res);\n return;\n } else if (handlers['*']) {\n var res = handlers['*'](data);\n sendMsg(res);\n return;\n } else {\n console.log(\"No handler registered for\", data.type);\n sendMsg({type: \"error\", error: \"No handler registered for \" + data.type});\n return;\n }\n //send a message, socket might be closed...\n function sendMsg(json) {\n if (ws) {\n try {\n ws.send(JSON.stringify(json));\n } catch (e) {\n console.log('error ws', e);\n }\n }\n }\n}", "handleSocketMessage(event) {\n console.log(event);\n //let response = JSON.parse(event.data);\n //console.log(response.type);\n\n //this.emit(response.type, response.value);\n }", "listen() {\r\n this.client.on('message', message => this.onMessage(message));\r\n }", "handleSendingMessages(message) {\n console.log(\"Action Recognized --> \", message)\n if (message) {\n if (this.isColorCommand(message)) {\n this.socket.emit(\"change color\", message.split(\" \")[1])\n }\n else if (this.isUsernameChangeCommand(message)) {\n this.socket.emit(\"change username\", message.slice(7, message.length-1));\n }\n else {\n console.log(\"Message from client --> \", message)\n this.socket.emit(\"chat message\", message, this.state.username, this.state.color);\n }\n }\n }", "function registerMessageHandler(handlerFunction) {\n socket.onmessage = function (e) {\n console.log.apply('message', e.data);\n var data = JSON.parse.parse(e.data);\n handlerFunction(data);\n };\n}", "sendMessage(msg){\n this.socket.emit(\"client\", msg);\n }", "function dataHandler(data, socket){\n\tvar type = null;\n\tvar target = null;\n\tvar msg = null;\n\n\tvar strArray = [];\n\tvar dataString = data.toString();\n\n\t//dataString = trim(dataString);\n\tstrArray = dataString.split('$');\n\n\tswitch(strArray[0]){\n\t\tcase 'CONNECT':\n\t\t\tnewMatching(strArray[1], strArray[2]);\n\t\t\tbreak;\n\t\tcase 'SEND':\n\t\t\tsendMessage(strArray[1], strArray[2], strArray[3]);\n\t\t\tbreak;\n\t\tcase 'NEW':\n\t\t\tnewConnect(strArray[1], socket);\n\t\t\tbreak;\n\t}\n}", "function listener(string) {\n var command = io.JSON.parse(string),\n data = command.data;\n\n if (command.target === \"p\" || command.target === \"p&c\") {\n switch (command.type) {\n case \"send\":\n if (data.parentId == self.guid) {\n if (data.eventType === \"subscribeUserMsg\") {\n var msgHandlerName = data.data.app;\n var rt = registerMsgChild(\n msgHandlerName,\n data.data.token,\n data.childId\n );\n if (rt) {\n var handler = self.msgHandlers[msgHandlerName];\n if (!handler) {\n self.socket.send(data.eventType, data.data);\n }\n }\n } else if (data.eventType === \"subscribeTopicMsg\") {\n var msgHandlerName = data.data.appTopic;\n var rt = registerMsgChild(\n msgHandlerName,\n data.data.token,\n data.childId\n );\n if (rt) {\n var handler = self.msgHandlers[msgHandlerName];\n if (!handler) {\n self.socket.send(data.eventType, data.data);\n }\n }\n } else if (\n data.eventType === \"unSubscribeUserMsg\" ||\n data.eventType === \"unSubscribeTopicMsg\"\n ) {\n var rt = unRegisterMsgChild(data.data, data.childId);\n if (rt) {\n var handler = self.msgHandlers[data.data];\n if (!handler) {\n self.socket.send(data.eventType, data.data);\n }\n }\n } else {\n self.socket.send(data.eventType, data.data);\n }\n }\n break;\n case \"localMessage\":\n if (data.fromId != self.guid) {\n self.dealLocalMsg(data.eventType, data.data);\n }\n break;\n case \"clildClose\":\n unRegisterMsgChildAll(data.data);\n break;\n }\n }\n }", "function handleMessageBroadcasting(socket) {\n\n\tsocket.on('send message', function (msg) {\n\n\t\tvar data = msg.trim(); // Spaces trimmed in chat message.\n\t\tvar time = Date(); // message created-date details.\n\n\t\t// Storing chat message in database via chat-db.js\n\t\tdb.saveMsg({\n\t\t\tusername: socket.username,\n\t\t\tmsg: data,\n\t\t\tcreated: time\n\t\t}, function (err) {\n\t\t\tif (err) throw err\n\t\t\t// Function emitting new message event to display chat message in all clients: 'chat-ui.js' file.\n\t\t\tio.sockets.emit('new message', {\n\t\t\t\tusername: socket.username,\n\t\t\t\tmsg: data,\n\t\t\t\tcreated: time\n\t\t\t});\n\t\t});\n\n\t\t// Function sending status to display message sent in all clients: 'chat-ui.js' file.\n\t\tsendStatus({\n\t\t\tdata: 'Message sent by ' + socket.username,\n\t\t\tclear: true\n\t\t});\n\t});\n\n\t// Function handling sending message event coming from chat-ui.js \n\tsocket.on('sending message', function (msg) {\n\n\t\t// Sending status to display message is being typed in all clients: 'chat-ui.js' file.\n\t\tsendStatus({\n\t\t\tdata: socket.username + ' is typing ' + msg\n\t\t});\n\t});\n}", "function receivedMessage(event) {\n messageHandler.handleMessage(event);\n }", "dispatch(msg, ports = [], clientSocket = null) {\n msg.senderRef = serialisation_1.deserialise(msg.senderRef, this.environment);\n switch (msg.typeTag) {\n case Message_1._INSTALL_BEHAVIOUR_:\n this.handleInstall(msg, ports);\n break;\n case Message_1._OPEN_PORT_:\n this.handleOpenPort(msg, ports[0]);\n break;\n case Message_1._FIELD_ACCESS_:\n this.handleFieldAccess(msg);\n break;\n case Message_1._METHOD_INVOC_:\n this.handleMethodInvocation(msg);\n break;\n case Message_1._RESOLVE_PROMISE_:\n this.handlePromiseResolve(msg);\n break;\n case Message_1._REJECT_PROMISE_:\n this.handlePromiseReject(msg);\n break;\n case Message_1._ROUTE_:\n this.handleRoute(msg);\n break;\n default:\n throw \"Unknown message in actor : \" + JSON.stringify(msg);\n }\n }", "sendMessage(message) {\n self.socket.emit('message', message);\n }", "function addReceivingMessageHandler() {\n var connection = self.connection;\n\n function onReceivingMessage(message) {\n console.log('RECEIVE ' + message + ' AT ' + new Date().getTime());\n var message = Helper.parseMessage(message);\n if (!message) {\n console.warn('ignore message because of unrecognized type', message);\n return;\n }\n // If the socket receives the response data or pong data\n // it means all the messages before that have been sent\n switch (message.signal) {\n case MESSAGE_SIGNAL.REQUEST:\n if (requestIDsReceived.indexOf(message.id) === -1) {\n onReceivingRequest(message);\n requestIDsReceived.push(message.id);\n }\n break;\n case MESSAGE_SIGNAL.RESPONSE:\n if (responseIDsReceived.indexOf(message.id) === -1) {\n onReceivingResponse(message);\n responseIDsReceived.push(message.id);\n }\n break;\n }\n }\n\n connection.on('message', onReceivingMessage);\n return function () {\n connection.removeListener('message', onReceivingMessage);\n };\n }", "function onMessage(event) {\n\t\tconsole.log('Client socket: Message received: ' + event.data);\n\t\tcastEvent('onMessage', event);\n\t}", "function registerHandler(onMessageReceived) {\n socket.on('message', onMessageReceived)\n }", "_handleMessage(message) {\n // command response\n if (message.id) {\n const callback = this._callbacks[message.id];\n if (!callback) {\n return;\n }\n // interpret the lack of both 'error' and 'result' as success\n // (this may happen with node-inspector)\n if (message.error) {\n callback(true, message.error);\n } else {\n callback(false, message.result || {});\n }\n // unregister command response callback\n delete this._callbacks[message.id];\n // notify when there are no more pending commands\n if (Object.keys(this._callbacks).length === 0) {\n this.emit('ready');\n }\n }\n // event\n else if (message.method) {\n const {method, params, sessionId} = message;\n this.emit('event', message);\n this.emit(method, params, sessionId);\n this.emit(`${method}.${sessionId}`, params, sessionId);\n }\n }", "onSend(messages=[]) {\n console.log(messages)\n let data = this.formatMessage(messages)\n this.socket.emit('msgadmin', data);\n this._storeMessages(messages);\n }", "function handleServerMessage(e) {\n var i;\n for (i = 0; i < messageHandlers.length; i++) {\n if (messageHandlers[i](e)) {\n // messsage has been handled.. skipping other commands.\n return;\n }\n }\n }", "handleMessage(message) {\r\n console.log('Received message', message.payloadString);\r\n this.callbacks.forEach((callback) => callback(message));\r\n }", "_handleMessage(userId, { message }) {\n this.debug && console.log('MESSAGE ' + message);\n\n if (message.type) {\n this.debug && console.log('received msg typ ' + message.type);\n } else {\n this.debug && console.log('Client received message: ' + message);\n }\n\n if (typeof this.peerClient.onMessageCallback !== 'function') {\n throw new Error(\"you need set on('message',callback)'s callback first!\");\n }\n this.peerClient.onMessageCallback({\n sender: userId,\n content: message\n });\n // TO DO HANDLE BYE\n // } else if (message === 'bye' && peerStarted) {\n // handleRemoteHangup();\n }", "function onMessage(msg) {\n if (socket.id) {\n console.log(\"Message from server: \" + msg);\n }\n}", "function onMessage(msg) {\n if (socket.id) {\n console.log(\"Message from server: \" + msg);\n }\n}", "dispatchMessage() {\n console.log('handle emit message');\n\n // the double pipe || is an \"or\" operator\n // if the first value is set, use it. else use whatever comes after the \"or\" operator\n socket.emit('chat_message', {\n name: this.nickname, //|| \"anonymous\"\n content: this.message,\n \n })\n\n this.message = \"\";\n }", "function gotMessageFromServer(message) {\n console.log(\"Got message\", message.data); \n var data = JSON.parse(message.data); \n \n switch(data.type) { \n case \"login\": \n handleLogin(data.success,data.allUsers); \n break;\n case \"joined\":\n catchAllAvailableUsers(data.allUsers);\n break;\n case \"statusChange\":\n refreshAllAvailableUsers(data.user_status);\n break;\n case \"snap\":\n console.log('got imgUrl')\n gotRemoteSnapImg(data.snapUrl);\n break;\n //when somebody wants to call us \n case \"offer\": \n console.log('inside offer')\n document.getElementById('callFrom').innerHTML = '來自 ' + name;\n handleOffer(data.offer, data.name);\n alert(\"Receive a call from \" + data.name);\n break; \n case \"answer\": \n console.log('inside answer')\n handleAnswer(data.answer); \n break; \n //when a remote peer sends an ice candidate to us \n case \"candidate\": \n console.log('inside handle candidate')\n handleCandidate(data.candidate); \n break;\n case \"decline\":\n window.clearTimeout(callTimeout);\n handleLeave();\n alert(\"No response from remote\");\n break;\n case \"timeout\":\n handleLeave();\n alert(\"You didn't resopnse a call from \" + data.name);\n break;\n case \"leave\": \n handleLeave();\n alert(\"Remote has disconnected !\");\n break;\n case \"close\":\n if(data.reqFrom == connectedUser) {\n handleLeave();\n alert(\"Remote has disconnected !\");\n }\n refreshAllAvailableUsers(data.user_status);\n break;\n\n default: \n break; \n } \n\n serverConnection.onerror = function (err) { \n console.log(\"Got error\", err); \n };\n\n}", "_registerSocketListener() {\n this._socket.on('message', (data) => {\n this._mav.parse(data);\n });\n }", "function handleWsMessage(msg) {\n //console.log(JSON.stringify(msg));\n var msgType = Object.keys(msg)[0]; // first member name\n\n switch (msgType) {\n //--- app specific messages\n case \"columnDataChange\": handleColumnDataChange(msg.columnDataChange); break;\n case \"nodeList\": handleNodeList( msg.nodeList); break;\n case \"columnList\": handleColumnList( msg.columnList); break;\n case \"rowList\": handleRowList( msg.rowList); break;\n case \"columnData\": handleColumnData( msg.columnData); break;\n case \"constraintChange\": handleConstraintChange(msg.constraintChange); break;\n case \"nodeReachabilityChange\": handleNodeReachabilityChange(msg.nodeReachabilityChange); break;\n case \"upstreamChange\": handleUpstreamChange(msg.upstreamChange); break;\n case \"setUser\": handleSetUser(msg.setUser); break;\n case \"userPermissions\": handleUserPermissions( msg.userPermissions); break;\n case \"changeRejected\": handleChangeRejected (msg.changeRejected); break;\n\n //--- general server notifications\n case \"alert\": handleAlert(msg.alert); break;\n case \"terminateEdit\": handleTerminateEdit(msg.terminateEdit); break;\n\n default:\n //console.log(\"checking \" + JSON.stringify(msg) + \" with \" + window.wsAuthHandler);\n if (!(window.wsAuthHandler && window.wsAuthHandler(ws,msg))) {\n utils.log(`ignoring unknown message type ${msgType}`);\n }\n }\n}", "handleOnPlayerMessage(player) {\n let _this = this;\n\n // handle on message\n player.socket.on(\"message\", function (message) {\n let _data = JSON.parse(message);\n\n if (_data.messageType === MESSAGE_TYPE.CLIENT_CHAT) {\n let _playerDisplayName = player.id;\n if (player.playerName) {\n _playerDisplayName = player.playerName;\n }\n let _message = new Message(MESSAGE_TYPE.CLIENT_CHAT);\n _message.content = _playerDisplayName + \" : \" + _data.content;\n _this.sendAll(JSON.stringify(_message));\n } else if (_data.messageType === MESSAGE_TYPE.CLIENT_CARD) {\n // Karte in der Logik verarbeiten.\n scopaLogic.processPlayerMessage(_data, _this);\n } else if (_data.messageType === MESSAGE_TYPE.CLIENT_STATE) {\n // Name und ID des Spielers setzen\n player.playerName = _data.playerName;\n player.playerId = _data.playerId;\n console.log(\"Spielername: \" + _data.playerName + \" Spieler ID\" + _data.playerId);\n }else if (_data.messageType === MESSAGE_TYPE.CLIENT_RESTART) {\n scopaLogic.startGame();\n }\n });\n }", "function messenger(socket, content) {\n socket.talk('m', content);\n }", "function handleMessage(event) {\r\n\t\t//console.log('Received message: ' + event.data);\r\n\t\tvar data = JSON.parse(event.data);\r\n\t\thandleReceiveData(data);\r\n\t}", "onMessageReceive() {}", "constructor() {\n // call the socket init with the url of my test environment aka local host (WS server)\n socket.init('ws://localhost:3001'); \n //sending and echoing a message\n socket.registerOpenHandler(() => {\n let message = new ChatMessage({ message: 'pow!' });\n socket.sendMessage(message.serialize());\n });\n socket.registerMessageHandler((data) => {\n console.log(data);\n });\n }", "handleServerActionDispatch(msg) {\n const {\n socketMessageDispatcher,\n } = this.props;\n\n socketMessageDispatcher(msg);\n }", "function handleMessage(connection, data){\n switch (data.type) {\n case \"store_user\":\n storeUser(connection, data.username);\n break;\n \n case \"store_offer\":\n storeOffer(data);\n break;\n \n case \"store_candidate\":\n storeCandidate(data);\n break;\n \n case \"send_answer\":\n sendAnswer(data);\n console.log(\"Enviando resposta\");\n break;\n \n case \"send_candidate\":\n sendCandidate(data);\n console.log(\"Enviando candidate\");\n break;\n \n case \"join_call\":\n joinCall(connection, data);\n break\n \n default:\n break;\n }\n}", "sendMessage(message) {\n this.socket.emit('message', message);\n }", "function messageHandler(event) {\n try {\n _messageHandler(event);\n } catch (ex) {\n Cu.reportError(\"FrameWorker: Error handling client port control message: \" + ex + \"\\n\" + ex.stack);\n }\n }", "function messageHandler(s) {\n if (!s /*|| addUrl.indexOf(s.origin) !== 0*/) return;\n var data = fromKV(s.data);\n if (data.sl) serviceList = JSON.parse(data.sl);\n if (data.sh) {\n var sh = JSON.parse(data.sh);\n for (var k in sh) serviceHash[k] = sh[k];\n }\n if (serviceList && serviceList.length && data.sh) {\n userServices = [];\n fillPreferredServices(1);\n }\n if (data.oex && data.oex=='close') closeDialog();\n if (data.rdy) {\n ready = 1;\n var cb;\n while (cb = readyCallbacks.shift()) {\n cb();\n }\n }\n }", "function receiveMessage(message) {\n switch(message.action) {\n case 'stop':\n wsActionStop();\n break;\n case 'shuffle_changed':\n wsActionShuffleChanged(message);\n break;\n case 'music_patched':\n wsActionMusicPatched(message);\n break;\n case 'music_deleted':\n wsActionMusicDeleted(message);\n break;\n case 'playlistTrack_updated':\n wsActionUpdatePlaylistTrack(message.playlistTracks);\n break;\n case 'playlistTrack_deleted':\n wsActionUpdatePlaylistTrack(message.playlistTracks);\n break;\n case 'music_added':\n wsActionUpdatePlaylistTrack(message.playlistTracks);\n break;\n case 'volume_changed':\n wsActionUpdateVolume(message);\n break;\n case 'play':\n wsActionPlay(message);\n break;\n case 'listeners_updated':\n wsActionUpdateListeners(message);\n break;\n default:\n console.warn(\"Unknow socket received : \");\n console.log(message);\n break;\n }\n}", "function handleMessage(msg) { // process message asynchronously\n setTimeout(function () {\n messageHandler(msg);\n }, 0);\n }", "listenForData() {\n this.socket.on(EVENT_DATA, data => this.handleData(data))\n }", "function sendMessage (message) { socket.emit('new message', cleanInput(message)); }", "handleEvents(){\n this.io.on('connection', (socket) => {\n this.handleJoinEvent(socket);\n this.handleLeaveEvent(socket);\n this.handleSendMsgEvent(socket);\n this.handleAddNotificationEvent(socket);\n });\n }", "_distributeMessage(command, msg) {\n var message = {\n command: command,\n data: msg\n }\n message = JSON.stringify(message);\n Object.keys(this._connections).forEach(function(key) {\n var socket = this._connections[key].socket;\n socket.write(message);\n }, this);\n }", "function message_from_worker(wid, msg) {\n var data = msg.data;\n\n if(receive_handler) {\n receive_handler(data, wid);\n } else {\n console.log(\"Unhandled message from worker\", wid, msg);\n }\n}", "function msgToServer(e){\n\t\t\n\tvar message = document.getElementById(\"message\");\n\tvar chat = document.querySelector(\"#chat\");\n\t\t\n\tvar socket = io.connect();\n\tvar m = message.value; \n\t\n\t\n\tsocket.emit(\"msgToServer\", { msg: m}); \n\t\t\n}", "_constructSocketListeners () {\n /* Handles our open event */\n this._ws.addEventListener('open', evt => {\n setInterval(() => {\n this._sendArray([{ m: '+ls' }])\n }, this._roomScanMS)\n this._isConnected = true\n this._sendArray([{ m: 'hi' }])\n this._heartbeatInterval = setInterval(() => {\n this._sendArray([{ m: 't', e: Date.now() }])\n }, this._heartbeatMS)\n this.emit('connected')\n this.setChannel('lobby')\n this._noteFlushInterval = setInterval(() => {\n if (this._noteBufferTime && this._noteBuffer.length > 0) {\n this._sendArray([{ m: 'n', t: this._noteBufferTime + this._serverTimeOffset, n: this._noteBuffer }])\n this._noteBufferTime = 0\n this._noteBuffer = []\n }\n }, this._noteFlushIntervalMS)\n })\n\n /* Handles our close event */\n this._ws.addEventListener('close', evt => {\n clearInterval(this._heartbeatInterval)\n clearInterval(this._noteFlushInterval)\n if (!this.hasErrored) this.emit('disconnected')\n })\n\n /* Handles our errors */\n this._ws.addEventListener('error', error => {\n if (error.message === 'WebSocket was closed before the connection was established') return\n this.emit('error', new Error(error))\n this._ws.close()\n })\n\n /* Handles generic messages */\n this._ws.addEventListener('message', evt => {\n if (typeof evt.data !== 'string') return\n try {\n const transmission = JSON.parse(evt.data)\n for (var i = 0; i < transmission.length; i++) {\n var msg = transmission[i]\n if (msg.m === 'hi') {\n this._recieveServerTime(msg.t, msg.e || undefined)\n }\n if (msg.m === 't') {\n this._recieveServerTime(msg.t, msg.e || undefined)\n }\n if (msg.m === 'a') {\n this.emit('message', {\n content: msg.a,\n user: {\n id: msg.p.id,\n name: msg.p.name,\n color: msg.p.color\n },\n time: msg.t\n })\n }\n if (msg.m === 'ch') {\n this.room.name = msg.ch._id\n this._channelHasJoined = true\n if (this.room.users.length !== 0) return\n msg.ppl.forEach(person => {\n this.room.users.push({\n id: person.id,\n name: person.name,\n color: person.color\n })\n })\n }\n if (msg.m === 'p') {\n const formattedUser = {\n id: msg.id,\n name: msg.name,\n color: msg.color\n }\n this.emit('userJoined', formattedUser)\n this.room.users.push(formattedUser)\n }\n if (msg.m === 'bye') {\n const user = this.room.users.filter(e => e.id === msg.p)[0]\n this.room.users = this.room.users.filter(e => e.id !== msg.p)\n this.emit('userLeave', user)\n }\n if (msg.m === 'ls') {\n this.rooms = []\n msg.u.forEach(room => {\n this.rooms.push({\n name: room._id,\n count: room.count\n })\n })\n this._sendArray([{ m: '-ls' }])\n }\n if (msg.m === 'n') {\n this.emit('notePress', {\n note: msg.n,\n user: msg.p\n })\n }\n }\n } catch (error) {\n this.emit('error', error)\n }\n })\n }", "function handleMessage(request) {\n log.log('[' + id + '] handle message:', request, request.type);\n if (request.type == 'recording') {\n recording = request.value;\n } else if (request.type == 'params') {\n updateParams(request.value);\n } else if (request.type == 'wait') {\n checkWait(request.target);\n } else if (request.type == 'propertyReplacement') {\n\tpropertyReplacement(request);\n } else if (request.type == 'type') {\n\ttype(request);\n } else if (request.type == 'select') {\n\tselect(request);\n } else if (request.type == 'copy') {\n\tcopy(request);\n } else if (request.type == 'paste') {\n\tpaste(request);\n } else if (request.type == 'event') {\n simulate(request);\n } else if (request.type == 'snapshot') {\n port.postMessage({type: 'snapshot', value: snapshotDom(document)});\n } else if (request.type == 'reset') {\n reset();\n } else if (request.type == 'url') {\n port.postMessage({type: 'url', value: document.URL});\n }\n}", "onMessage(handler) {\n return this.on('Message', handler);\n }", "function messageHandler(event, handlers) {\n\tvar data = JSON.parse(event.data);\n\tif(handlers[data.type]){\n\t\thandlers[data.type](data);\n\t} else {\n\t\tconsole.warn(\"unable to handle message\", event);\n\t}\n}", "function MessageClient(serverUrls, serverPath) {\r\n\r\n //Maps web socket commands to event types\r\n var MESSAGE_MAP = {\r\n \"camera\" : \"cameraChange\",\r\n \"pointer\": \"pointerMove\",\r\n \"joystick\" : \"joystick\",\r\n \"state\" : \"viewerState\",\r\n \"txt\": \"chatReceived\",\r\n \"joinok\" : \"userListChange\",\r\n \"sessionId\" : \"connectSucceeded\",\r\n \"joined\" : \"userListChange\",\r\n \"left\" : \"userListChange\",\r\n \"private\" : \"privateMessage\",\r\n \"join_error\": \"socketError\"\r\n };\r\n\r\n\r\n var _socket;\r\n var _myID = null;\r\n\r\n var _serverURL = Array.isArray(serverUrls) ? serverUrls : [serverUrls];\r\n var _currentServer = 0;\r\n \r\n var _pendingJoins = {};\r\n\r\n var _channels = {\r\n };\r\n\r\n var _this = this;\r\n\r\n function getUserName() {\r\n if (avp.config.userName && avp.config.userName.length)\r\n return avp.config.userName;\r\n\r\n if (_myID)\r\n return _myID.slice(0,5);\r\n\r\n return \"Unknown\";\r\n }\r\n\r\n\r\n\r\n function onRecv(msg) {\r\n\r\n //See if the message requires internal processing\r\n switch(msg.type) {\r\n\r\n\t\t\t\tcase \"txt\": onChat(msg);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"joinok\": onJoinOK(msg);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tcase \"join_error\": break;\r\n\r\n\t\t\t\tcase \"sessionId\":\r\n avp.logger.info(\"Connect successful, your id is: \" + msg.id);\r\n\t\t\t\t\t\t\t\t_myID = msg.id;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"joined\": msg.userStatus = \"joined\";\r\n onJoined(msg);\r\n break;\r\n case \"left\": msg.userStatus = \"left\";\r\n onLeft(msg);\r\n break;\r\n case \"camera\":\r\n case \"pointer\": break;\r\n default: avp.logger.log(msg);\r\n break;\r\n }\r\n\r\n //Determine what channel we are receiving the event on.\r\n //For example, a user list change can occur on either the collaboration channel (users in current session)\r\n //or on the presence channel (all users logged in), and the various GUI event handlers have to make decisions based\r\n //on that.\r\n var channelId = msg.roomId;\r\n\r\n //And send it to all listeners\r\n var evt = { type: MESSAGE_MAP[msg.type], data:msg, channelId:channelId };\r\n _this.dispatchEvent(evt);\r\n }\r\n\r\n function onJoined(evt) {\r\n if (!evt.user.name || !evt.user.name.length)\r\n evt.user.name = evt.user.id.slice(0,5);\r\n\r\n if (evt.roomId) {\r\n var channel = _channels[evt.roomId];\r\n if (channel) {\r\n channel.users.push(evt.user);\r\n avp.logger.info(evt.user + \" joined room \" + evt.roomId);\r\n } else {\r\n avp.logger.warn(\"Channel \" + evt.roomId + \" does not exist for socket \" + _myID);\r\n }\r\n }\r\n }\r\n\r\n function onLeft(evt) {\r\n avp.logger.info(evt.user + \" left room \" + evt.room);\r\n for (var channelId in _channels) {\r\n var users = _channels[channelId].users;\r\n\r\n var idx = -1;\r\n for (var i=0; i<users.length; i++) {\r\n if (users[i].id == evt.user) {\r\n idx = i;\r\n break;\r\n }\r\n }\r\n\r\n if (idx != -1)\r\n users.splice(idx, 1);\r\n\r\n delete _channels[channelId].userSet[evt.user];\r\n }\r\n }\r\n\r\n function onJoinOK(evt) {\r\n\r\n var channel = _channels[evt.roomId];\r\n\r\n avp.logger.info(\"joined channel \" + evt.roomId);\r\n\r\n if (evt.users && evt.users.length) {\r\n channel.users = evt.users;\r\n } else {\r\n channel.users = [];\r\n }\r\n\r\n for (var i=0; i<channel.users.length; i++) {\r\n\r\n //Make up a user name if one is not known\r\n if (!channel.users[i].name || !channel.users[i].name.length) {\r\n channel.users[i].name = channel.users[i].id.slice(0,5);\r\n }\r\n }\r\n\r\n var name = getUserName();\r\n var you = Autodesk.Viewing.i18n.translate(\"you\");\r\n var me = { id:_myID, name: name + \" (\" + you + \")\", isSelf : true, status:0 };\r\n if (!channel.userSet[_myID]) {\r\n channel.users.push(me);\r\n channel.userSet[_myID] = me;\r\n }\r\n\r\n //In case user name is already known, update the server.\r\n if (me.id.indexOf(name) != 0) {\r\n _this.sendChatMessage(\"/nick \" + name, evt.roomId);\r\n }\r\n }\r\n\r\n\r\n function onChat(evt) {\r\n if (evt.msg.indexOf(\"/nick \") == 0) {\r\n var user = _this.getUserById(evt.from, evt.roomId);\r\n var newname = evt.msg.slice(6);\r\n\r\n if (newname.length) {\r\n user.name = newname;\r\n if (user.id == _myID) {\r\n var you = Autodesk.Viewing.i18n.translate(\"you\");\r\n user.name += \" (\" + you + \")\";\r\n }\r\n }\r\n\r\n _this.dispatchEvent({ type: \"userListChange\", data: evt, channelId: evt.roomId });\r\n }\r\n }\r\n \r\n function onConnectError(evt) {\r\n\r\n //Attempt to connect to another server in case\r\n //the primary fails. If they all fail, then we give up.\r\n if (_currentServer < _serverURL.length) {\r\n \r\n avp.logger.info(\"Connect failed, trying another server...\");\r\n \r\n _socket.disconnect();\r\n _socket = null;\r\n _currentServer++;\r\n _this.connect(_this.sessionID);\r\n \r\n } else {\r\n\r\n _this.dispatchEvent({ type: \"socketError\", data: evt });\r\n\r\n }\r\n }\r\n \r\n function onError(evt) {\r\n\r\n _this.dispatchEvent({ type: \"socketError\", data: evt });\r\n\r\n }\r\n \r\n function onConnect(evt) {\r\n _currentServer = 0;\r\n \r\n //Join any channels that were delayed while the\r\n //connection is established.\r\n for (var p in _pendingJoins) {\r\n _this.join(p);\r\n }\r\n }\r\n\r\n /**\r\n * Establish initial connection to the server specified when constructing the message client.\r\n */\r\n this.connect = function (sessionID) {\r\n\r\n //TODO: Maintain multiple sockets to the same server, identifier by sessionID.\r\n\r\n if (_socket)\r\n return; //already connected to socket server.\r\n\r\n if (typeof window.WebSocket !== \"undefined\") {\r\n\r\n if (!myio)\r\n myio = (typeof lmv_io !== \"undefined\") ? lmv_io : io;\r\n\r\n this.sessionID = sessionID;\r\n\r\n _socket = myio.connect(_serverURL[_currentServer] + \"?sessionID=\" + sessionID, {path: serverPath, forceNew:true});\r\n _socket.on(\"connect\", onConnect);\r\n _socket.on(\"message\", onRecv);\r\n _socket.on(\"connect_error\", onConnectError);\r\n _socket.on(\"error\", onError);\r\n\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n\r\n /**\r\n * Subscribe to a messaging channel. Requires connection to be active (i.e. connect() called before join()).\r\n */\r\n\t\tthis.join = function(channelId) {\r\n\r\n if (!_socket || !_socket.connected) {\r\n _pendingJoins[channelId] = 1;\r\n return;\r\n }\r\n \r\n delete _pendingJoins[channelId];\r\n\r\n _channels[channelId] = {\r\n id : channelId,\r\n users: [],\r\n userSet: {}\r\n };\r\n\r\n _socket.emit('join', { roomId : channelId, name : getUserName() });\r\n\t\t};\r\n\r\n /**\r\n * Disconnect from message server.\r\n */\r\n this.disconnect = function () {\r\n if (_socket) {\r\n _socket.disconnect();\r\n //_socket.close();\r\n _socket = null;\r\n _channels = {};\r\n _myID = null;\r\n }\r\n };\r\n\r\n\r\n /**\r\n * Send a message of a specific type, containing given data object to a channel.\r\n * Subscription (listening) to that channel is not required.\r\n */\r\n this.sendMessage = function(type, data, channelId) {\r\n\r\n var evt = { type:type, from:_myID, msg: data, roomId: channelId };\r\n\r\n _socket.emit(\"message\", evt);\r\n };\r\n\r\n /**\r\n * Send a message object to an individual user.\r\n */\r\n this.sendPrivateMessage = function(targetId, msg) {\r\n\r\n var evt = { type: \"private\", target: targetId, from:_myID, msg: msg };\r\n\r\n _socket.emit(\"message\", evt);\r\n };\r\n\r\n /**\r\n * A convenience wrapper of sendMessage to send a simple text chat message to a channel.\r\n */\r\n this.sendChatMessage = function(msg, channelId) {\r\n\r\n var evt = { type:\"txt\", from: _myID, msg: msg, roomId: channelId };\r\n\r\n _socket.emit(\"message\", evt);\r\n\r\n //This is done to handle /nick commands\r\n onRecv(evt);\r\n };\r\n\r\n /**\r\n * Returns the user info object for a given user on a specific channel.\r\n * User lists are maintained per channel.\r\n */\r\n this.getUserById = function(id, channelId) {\r\n var users = _channels[channelId].users;\r\n for (var i=0; i<users.length; i++) {\r\n if (users[i].id == id)\r\n return users[i];\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Returns the local user's (randomly assigned) connection ID. Can be used to\r\n * maintain hashmaps of users, since it's unique per server.\r\n */\r\n this.getLocalId = function() { return _myID; };\r\n\r\n /**\r\n * Returns a channel's info object.\r\n */\r\n this.getChannelInfo = function(channelId) { return _channels[channelId]; };\r\n\r\n this.isConnected = function() { return _socket; };\r\n }", "onClientMessage(message) {\n try {\n // Decode the string to an object\n const { event, payload } = JSON.parse(message);\n\n this.emit(\"message\", event, payload);\n } catch {}\n }", "function messageHandler (msg) {\n\ttry {\n\t var command = JSON.parse(msg.getData());\n\t switch (command.Name) {\n\t\tcase 'SetTemperature':\n\t\t var temperatura = command.Parameters.Temperatura;\n\t\t console.log (\"\")\n\t\t console.log (\">>>>>> Receiving command <SetTemperature>. Toggling the relay\");\n\t\t console.log (\"\")\n\t\t relayDevice.toggle ()\n\t\t client.complete(msg, printErrorFor('complete'));\n\t\t break;\n\t\tdefault:\n\t\t console.error('Unknown command: ' + command.Name);\n\t\t client.reject(msg, printErrorFor('complete'));\n\t\t break;\n\t }\n\t}\n\tcatch (err) {\n\t printErrorFor('parse received message')(err);\n\t client.reject(msg, printErrorFor('reject'));\n\t}\n}", "function Handler(socket, authData, broker) {\n var _this = this;\n this.socket = socket;\n this.authData = authData;\n this.broker = broker;\n this.id = 'na';\n this.closed = false;\n this.pathSubs = {};\n this.queries = {};\n this.ongoingReads = {};\n this.ongoingWrite = null;\n this.writeQueue = [];\n this.readQueue = [];\n this.writeProg = 1;\n this.id = socket.id.substr(2);\n if (!this.authData)\n this.authData = new NopAuthData();\n dbgHandler(\"%s handler created\", this.id);\n socket.on('sp', function (path, fn) { return _this.enqueueRead(function () { return filterAck(fn, _this.subscribePath(path)); }); });\n socket.on('up', function (path, fn) { return filterAck(fn, _this.unsubscribePath(path)); });\n socket.on('pi', function (writeProg, fn) { return filterAck(fn, _this.ping(writeProg)); });\n socket.on('sq', function (def, fn) { return _this.enqueueRead(function () { return filterAck(fn, _this.subscribeQuery(def)); }); });\n socket.on('uq', function (id, fn) { return filterAck(fn, _this.unsubscribeQuery(id)); });\n socket.on('s', function (path, val, prog, fn) { return _this.enqueueWrite(function () { return _this.set(path, val, prog, fn); }); });\n socket.on('m', function (path, val, prog, fn) { return _this.enqueueWrite(function () { return _this.merge(path, val, prog, fn); }); });\n socket.on('disconnect', function () {\n _this.close();\n });\n broker.register(this);\n socket.emit('aa');\n socket.on('aa', function () { socket.emit('aa'); });\n }", "handleOutboundInput() {\n for (var x = 0; x < this.outboundMessages.length; x++) {\n this.socket.emit(this.outboundMessages[x].command, this.outboundMessages[x].data);\n }\n this.outboundMessages = [];\n }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "startSocketHandling() {\n this.userNamespace.on('connection', (socket) => {\n logger.debug(`New socket connected to namespace ${this.userNamespace.name} + ${socket.id}`);\n\n // Register socket functions\n socket.on('getQuestions', this.getQuestions(socket));\n socket.on('answerQuestion', this.answerQuestion(socket));\n socket.on('answerOpenQuestion', this.answerOpenQuestion(socket));\n });\n }", "function onWebSocketMessage( data ) {\n // data = JSON.parse(data);\n // console.log('[wss]: received: %s', data.result);\n const replyData = JSON.parse(data);\n console.log('\\n===================On Message====================:');\n console.log(`url=${replyData.url}, cmd=${replyData.cmd}, uuid=${replyData.uuid}`);\n // console.log( replyData );\n // console.log('\\n=== received');\n // console.log(replyData);\n\n const {uuid, cmd, cmdType} = replyData;\n const res = resStore[uuid];\n if (res === undefined) {\n //return console.error('\\nError: Cached response disapper!!, data = %s\\n', data);\n return console.error('\\nError: Cached response disapper!!');\n }\n if (cmd === CMD.FILE_REQUEST) {\n switch (cmdType) {\n case CMD_TYPE.FILE_DOWNLOAD:\n processFileDownloadResponse(res, replyData);\n break;\n case CMD_TYPE.FILE_UPLOAD:\n processFileUploadResponse(res, replyData);\n break;\n default:\n throw new Error('undefined cmdType = ' + cmdType);\n }\n }\n else {\n processNormalResponse(res, replyData);\n }\n delete resStore[replyData.uuid];\n}", "_onSocketMessage(variable, evt) {\n let data = _.get(evt, 'data'), value, dataLength, dataLimit, shouldAddToLast, insertIdx;\n data = getValidJSON(data) || xmlToJson(data) || data;\n // EVENT: ON_MESSAGE\n value = initiateCallback(VARIABLE_CONSTANTS.EVENT.MESSAGE_RECEIVE, variable, data, evt);\n data = isDefined(value) ? value : data;\n if (this.shouldAppendData(variable)) {\n variable.dataSet = variable.dataSet || [];\n dataLength = variable.dataSet.length;\n dataLimit = this.getDataLimit(variable);\n shouldAddToLast = this.shouldAppendLast(variable);\n if (dataLimit && (dataLength >= dataLimit)) {\n if (shouldAddToLast) {\n variable.dataSet.shift();\n }\n else {\n variable.dataSet.pop();\n }\n }\n insertIdx = shouldAddToLast ? dataLength : 0;\n variable.dataSet.splice(insertIdx, 0, data);\n }\n else {\n variable.dataSet = isDefined(value) ? value : data;\n }\n }", "listen(){\n this.namespace.on('connection', (socket)=>{\n socket.on('teacher start exit', (teacherSocketId, quiz) => {\n this.handleStartQuiz(teacherSocketId, quiz);\n });\n\n socket.on('student submit exit', (sessionId, firstname, answersInfo) =>{\n console.log(\"Student\" + firstname);\n console.log(\"Student responded \" + answersInfo);\n this.handleSubmitExit(sessionId,firstname,answersInfo);\n\n })\n });\n }", "initMessageHandlers() {\n Object.keys(this.topics).forEach(key => this.subscriberSocket.subscribe(this.topics[key]));\n this.subscriberSocket.on('message', this.emit.bind(this));\n }", "handleMessageBroadcast (socket) {\n socket.on('message', (message) => {\n socket.broadcast.to(message.room).emit('message', {\n text: `${nickNames[socket.id]}: ${message.text}`\n });\n });\n }", "connectSocket(socket) {\n this.sockets.push(socket);\n console.log('Socket Connected');\n\n //Since all sockets run through here, the message handler\n //can be attached here\n this.messageHandler(socket);\n\n //Still have to send the message\n //Have to stringify it since send only accepts strings\n this.sendChain(socket);\n }", "handleBusMessages() {\n const bus = this.runtime.bus();\n\n Object.values(REQUESTS).forEach((msgType) => {\n bus.on(msgType, (msgData) => {\n this.sendCommMessage(msgType, msgData);\n });\n });\n }", "onSend(messages = []) {\n this.socket.emit('message', messages[0]);\n this._storeMessages(messages);\n }", "function sendMessage(message){\n socket.emit('message', message);\n}", "onMessage() {}", "onMessage() {}", "onMessage(e) {\n try {\n var model = JSON.parse(e.data);\n } catch (e) {\n console.log(e);\n }\n\n // Send PONGs\n if (model.type === SOCKET_MESSAGE_TYPES.PING) {\n this.sendPong();\n return;\n }\n\n // Notify any of the listeners via the raw socket message callback.\n this.notifyRawMessageListeners(model);\n }", "function handleMessage(e) {\n\t\tif (!e.data) return;\n\n\t\tvar payload;\n\t\ttry {\n\t\t\tpayload = JSON.parse(e.data);\n\t\t} catch (e) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!payload) return;\n\n\t\tvar handler = handlers[payload.event];\n\t\tif (handler) {\n\t\t\thandler(e.source, payload);\n\t\t}\n\t}", "function onMessageReceived(message, socket) {\n\n // socket.emit('message', message);\n socket.broadcast.emit('message', message);\n // io.emit('message', message);\n\n\n // var userId = users[senderSocket.id];\n // // Safety check.\n // if (!userId) return;\n //\n // _sendAndSaveMessage(message, senderSocket);\n}", "function emitMessage() {\n socket.emit('sendingMessage', {\n 'message': messageInputBox.value,\n 'username': username,\n 'userID': userID\n }, ROOM_ID);\n messageInputBox.value = '';\n}", "getMessage(callback){\n this.socket.on('updateGame', function(data){\n callback(data);\n });\n }", "function registerMessageHandler(handlerFunction) {\n\tsocket.onmessage = (event) => {\n\t\tlet data = JSON.parse(event.data);\n\t\thandlerFunction(data);\n\t}\n}", "socket_customEventFromServer(_, payload) {\n console.log(\"customEventFromServer\", payload);\n }", "function MoveConnectionHandler() {}", "async function onMessageHandler (target, context, msg, self) {\n // if (stream_id != context.room_id){\n // stream_id = context.room_id\n // }\n if (msg[0] !== '!') { // we are ignoring any attempts to send chatbot commands\n let words = msg.split(' ');\n for (let word of words) {\n if (currsec[word]) {currsec[word]++;}\n else {currsec[word] = 1;}\n }\n }\n} // end onMessageHandler" ]
[ "0.7745768", "0.74620575", "0.7308119", "0.72853595", "0.7258418", "0.7257197", "0.72418344", "0.7159801", "0.71552956", "0.70685583", "0.7066578", "0.70626765", "0.6992909", "0.6958702", "0.6953015", "0.68796885", "0.6863429", "0.68510634", "0.68408895", "0.68231964", "0.67897433", "0.67872757", "0.67602396", "0.66764504", "0.66528696", "0.66495645", "0.66453964", "0.6588316", "0.6577631", "0.6576111", "0.6538772", "0.65169275", "0.6487281", "0.64617354", "0.64503956", "0.6448931", "0.644164", "0.64415747", "0.643794", "0.6406609", "0.63981324", "0.63978827", "0.6391964", "0.6384265", "0.6384265", "0.6378334", "0.63775235", "0.6362944", "0.63521177", "0.6350592", "0.63445586", "0.6343666", "0.63368344", "0.63296473", "0.63205093", "0.63199085", "0.6310091", "0.6307658", "0.6307314", "0.62879825", "0.6280241", "0.627443", "0.6260897", "0.62560886", "0.6254064", "0.6252468", "0.62466896", "0.6237294", "0.6229865", "0.62274355", "0.62242913", "0.621725", "0.62148976", "0.62102574", "0.6207755", "0.62075865", "0.62058544", "0.62058544", "0.62058544", "0.6195733", "0.61893237", "0.6181795", "0.61789584", "0.6173535", "0.6169753", "0.616793", "0.6154093", "0.61539996", "0.6153794", "0.61508715", "0.61508715", "0.61442673", "0.6132359", "0.6132087", "0.6131144", "0.61187476", "0.61072224", "0.6107083", "0.6069687", "0.60654324" ]
0.73357785
2
Process the mito genome data for the species
function processGenomeData(data) { // Grab the json object and point to it species = data; // Go through each species and make a link within each gene to the species that have that same gene species.forEach(function(s,i,species){ s.className = s.name.toLowerCase(); s.children = []; s.genes.forEach(function(g,ii, genes){ g.speciesClass = s.className; g.connectedNodes = []; g.className = getGeneClassName(s.name, g.name); s.children.push(g); maxGeneLength = Math.max(g.length, maxGeneLength); if(!geneLinks[g.name]) { geneLinks[g.name] = {name: g.name, orgs:[s], genes:[g]}; } else { geneLinks[g.name].orgs.push(s); geneLinks[g.name].genes.push(g); } }); }); species.forEach(function(s,i,species){ s.links = []; s.genes.forEach(function(g,ii, genes){ var gl = geneLinks[g.name]; if(gl){ for(var o = 0; o < gl.orgs.length; o++){ if(gl.orgs[o] != s){ var link = {type: s.name+"-"+ gl.orgs[o].name+"-link", source: g, target: gl.genes[o]}; g.connectedNodes.push(gl.genes[o]); s.links.push(link); } } } }); }); var selectSpecies = [species[9], species[6], species[2], species[3]]; drawGeneChart(selectSpecies); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process(data, index) {\n\tvar genusnames = [];\n\tvar genusdata = [];\n\tvar scinames = [];\n\tvar commonnames = [];\n\tvar familynamesorder = [];\n\n\tdata.forEach(function(d, i) {\n\t\tvar genusname = d.Genus;\n\t\tvar speciesname = d.Species;\n\t\tscinames.push(genusname+\" \"+speciesname);\n\t\tcommonnames.push(d['Common names (Eng)'].split(',')[0])\n\t\tfamilyname = d[\"Family\"];\n\t\tif (familynamesorder.indexOf(familyname)==-1) {\n\t\t\tfamilynamesorder.push(familyname);\n\t\t}\n\t\tvar existingindex = genusnames.indexOf(genusname);\n\t\tif (existingindex==-1) {\n\t\t\tgenusnames.push(genusname);\n\t\t\tif (isThreatened(d)) {\n\t\t\tgenusdata.push({\"genus\": genusname, \"family-order\": familynamesorder.length-1, \"genus-order\": d[\"genus-order\"], \"firstspecies\": i, \"lastspecies\": i, \"family\": d.Family, \"order\": d.Order, \"threatenedcount\":1, \"healthycount\":0})\n\t\t\t} else {\n\t\t\tgenusdata.push({\"genus\": genusname, \"family-order\": familynamesorder.length-1, \"genus-order\": d[\"genus-order\"], \"firstspecies\": i, \"lastspecies\": i, \"family\": d.Family, \"order\": d.Order, \"threatenedcount\":0, \"healthycount\":1})\n\t\t\t}\n\t\t} else {\n\t\t\tgenusdata[existingindex][\"lastspecies\"] = i;\n\t\t\tif (isThreatened(d)) {\n\t\t\t\tgenusdata[existingindex][\"threatenedcount\"] = parseFloat(genusdata[existingindex][\"threatenedcount\"])+1;\n\t\t\t} else {\n\t\t\t\tgenusdata[existingindex][\"healthycount\"] = parseFloat(genusdata[existingindex][\"healthycount\"]) + 1;\n\t\t\t}\n\t\t}\n\t});\n\t\n\tvar familynames = [];\n\tvar familydata = [];\n\tvar tmpmaxspecies = 0;\n\tgenusdata.forEach(function(d, i) {\n\t\tvar familyname = d.family;\n\t\tvar existingindex = familynames.indexOf(familyname);\n\t\tif (existingindex == -1) {\n\t\t\tfamilynames.push(familyname);\n\t\t\tfamilydata.push({\"familyname\": familyname, \"ordername\": d.order, \"firstgenus\": i, \"lastgenus\": i, \"threatenedcount\": d.threatenedcount, \"healthycount\": d.healthycount});\n\t\t} else {\n\t\t\tfamilydata[existingindex][\"lastgenus\"] = i;\n\t\t\tfamilydata[existingindex][\"threatenedcount\"] = familydata[existingindex][\"threatenedcount\"]+d.threatenedcount;\n\t\t\tfamilydata[existingindex][\"healthycount\"] = familydata[existingindex][\"healthycount\"]+d.healthycount;\n\t\t}\n\t\t\n\t\tvar numspecies = d.threatenedcount+d.healthycount;\n\t\tif (numspecies>tmpmaxspecies) {\n\t\t\ttmpmaxspecies=numspecies;\n\t\t}\n\t\n\t});\n\n\tvar ordernames = [];\n\tvar orderdata = [];\n\tgenusdata.forEach(function (d, i) {\n\t\tvar ordername = d.order;\n\t\tvar existingindex = ordernames.indexOf(ordername);\n\t\tif (existingindex==-1) {\n\t\t\tordernames.push(ordername);\n\t\t\torderdata.push({\"ordername\": ordername, \"firstgenus\": i, \"lastgenus\": i, \"threatenedcount\": d.threatenedcount, \"healthycount\": d.healthycount})\n\t\t} else {\n\t\t\torderdata[existingindex][\"lastgenus\"] = i;\n\t\t\torderdata[existingindex][\"threatenedcount\"] = orderdata[existingindex][\"threatenedcount\"]+d.threatenedcount;\n\t\t\torderdata[existingindex][\"healthycount\"] = orderdata[existingindex][\"healthycount\"]+d.healthycount;\n\t\t}\n\t\t\n\t\n\t});\n\n\tmaxspecies = tmpmaxspecies;\n\tnumgenuses = genusdata.length;\t\n\t\t\n\t// Print out the processed data to paste in to loading data\n\tconsole.log(\"\\\"commonnames\\\": \"+JSON.stringify(commonnames)+\",\")\n\t//console.log(\"\\\"genusdata\\\": \"+JSON.stringify(genusdata)+\",\")\n\t//console.log(\"\\\"familydata\\\": \"+JSON.stringify(familydata)+\",\")\n\t//console.log(\"\\\"commonnames\\\": \"+JSON.stringify(commonnames)+\",\"+\"\\n\\\"scinames\\\": \"+JSON.stringify(scinames)+\",\")\n\t\n\t//console.log(\"\\\"genusnames\\\": \"+JSON.stringify(genusnames)+\",\\n\\\"genusdata\\\": \"+JSON.stringify(genusdata)+\",\\n\\\"familynames\\\": \"+JSON.stringify(familynames)+\",\\n\\\"familydata\\\": \"+JSON.stringify(familydata)+\", \\n\\\"ordernames\\\": \"+JSON.stringify(ordernames)+\",\\n\\\"orderdata\\\": \"+JSON.stringify(orderdata)+\",\\n\\\"maxspecies\\\": \"+maxspecies+\",\\n\\\"numgenuses\\\": \"+numgenuses+\",\")\n}", "function mappingData(data) {\n let survData = data[0], geneValues = data[1];\n //var groupTte = data[2];\n const tempdata = survData.patient.map(row => ({\n //'SampleID': survival.patient.data.codes[row],\n 'patient': row,\n 'tte': survData.tte[survData.patient.indexOf(row)],\n 'ev': survData.ev[survData.patient.indexOf(row)],\n //'Group': findingGroup(groupTte, survData.tte[survData.patient.indexOf(row)])\n }));\n //filter null ev and tte value\n const filteredData = tempdata.filter(value => value.ev != null);\n const makeData = filteredData.map(row => ({\n 'Time to event': row.tte,\n 'Event': row.ev,\n 'Column value': geneValues[0][filteredData.indexOf(row)]\n }));\n const tsvData = objectToTsv(makeData);\n tsvdownload(tsvData);\n}", "function loadAllSpecies() {\n\talldata.forEach(function(d, i){\n\t\t\n\t\t//console.log(\"loading data for \"+classdata[i].class)\n\t\t incrementProgress();\n\t\tif (!(i==currclassindex)) {\n\t\n\t\t//if (d[\"family\"]==\"Micrixalidae\") {\n\t\t//\tconsole.log(d)\n\t\t//}\n\t\t//if (i==3||i==1) {\n\t\t/**console.log(\"loading data for \"+classdata[i].class)\n\t\tvids[i].vid.on('loadeddata', function() {\n\t\t\tconsole.log(\"loaded \"+classdata[i].class+\" video\")\n\t\t\tvids[i].vidloaded=true;\n\t\t\t\n\t\t\t//vids[i].vid.play();\n\t\t\t//vids[i].vid.currentTime(0.133);\n\t\t\n\t\t\tincrementProgress();\n\t\t\t//vids[i].vid.pause();\n\t\t\t\n\t\t})\n\t\t//}**/\n\t\td3.tsv(\"data/\"+classdata[i].class+\"-results-small.tsv\", function(error, result) {\n\t\t\talldata[i] = result;\n\t\t\tincrementProgress();\n\t\t\t//preprocess(result, i);\n\t\t})\n\t\t}\n\t})\n}", "function processData(data) {\n // data come in within an array\n // can separate out here and assign\n // to different variables\n\n var streamsData = data[0],\n districtData = data[1],\n channelImproveData = data[2];\n\n // here you could do other data clean-up/processing/binding\n // if you needed to\n\n // when done, send the datasets to the drawMap function\n drawMap(streamsData, districtData, channelImproveData);\n drawLegend();\n\n }", "function runGenomes()\n{\n for(var i = 0; i < genomes.length; ++i)\n {\n // we found a duplicate entry and we updated the fitness for it and we can skip it and move on\n if(isDuplicateGenome(genomes[i], i))\n {\n continue;\n }\n\n // console.log(\"Genome: \" + i.toString());\n // the current tetris piece in use\n randomSeeded = new Random(1);\n game = new Game();\n game.drawBoard();\n game.drawBoarder();\n // creates the starting pieces for the game\n game.generateStartingPieces();\n // gets the first piece of the game\n game.getNextPiece();\n\n StartGame();\n var best = new BestFirstSearch(genomes[i].numGaps, genomes[i].maxHeight, genomes[i].std_height, genomes[i].scoreIncrease);\n genomes[i].fitness = best.startAI();\n // console.log(\"Genome fitness: \" + genomes[i].fitness);\n }\n}", "preprocessData(type) {\n if (type == \"Genomes\")\n this.preprocessGenomes();\n else if (type == \"Paired-end Reads\")\n this.preprocessPairedReads();\n else if (type == \"Single-end Reads\")\n this.preprocessSingleReads();\n else if (type == \"Interleaved Paired-end Reads\")\n this.preprocessSingleReads();\n }", "function processData(data) {\n mapData = data[0]\n incidence = data[1];\n mortality = data[2]\n for (var i = 0; i < mapData.features.length; i++) {\n mapData.features[i].properties.incidenceRates = incidence[mapData.features[i].properties.adm0_a3];\n mapData.features[i].properties.mortalityRates = mortality[mapData.features[i].properties.adm0_a3];\n }\n drawMap()\n}", "function processSpeciesJsonData(data) {\n // clear right list unless we're paging\n var newStart = 0;\n // process JSON data\n if(data.length > 0) {\n var lastRow = $('#rightList tbody tr').length;\n var infoTitle = $.i18n.prop('eya.speciesTable.viewSpecies');\n var recsTitle = $.i18n.prop('general.btn.viewRecords');\n // iterate over list of species from search\n data.forEach(function(taxon, i) {\n // create new table row\n var count = i + lastRow;\n // add count\n var tr =\n '<tr id=\"' + taxon.guid + '\" data-taxon-name=\"' + taxon.name + '\" data-taxon-guid=\"\">' +\n '<td class=\"speciesIndex\">' +\n (count + 1) + '.' +\n '</td>' +\n '<td class=\"sciName\">' +\n '<i>' +\n taxon.name +\n '</i>';\n // add common name\n if(taxon.commonName) {\n tr += ' : ' + taxon.commonName;\n }\n // add links to species page and ocurrence search (inside hidden div)\n var speciesInfo = '<div class=\"speciesInfo\">';\n if(taxon.guid) {\n speciesInfo +=\n '<a title=\"' + infoTitle + '\" href=\"' + EYA_CONF.speciesPageUrl + taxon.guid + '\">' +\n '<span class=\"fa fa-tag\"></span>' +\n '&nbsp;' +\n infoTitle +\n '</a> | ';\n }\n speciesInfo +=\n '<a href=\"' + EYA_CONF.contextPath + '/occurrences/search?q=taxon_name:%22' + taxon.name +\n '%22&lat=' + $('input#latitude').val() + '&lon=' + $('input#longitude').val() + '&radius=' + $('select#radius').val() + '\" title=\"' +\n recsTitle + '\"' +\n '>' +\n '<span class=\"fa fa-list\"></span>' +\n '&nbsp;' +\n recsTitle +\n '</a>' +\n '</div>';\n\n tr +=\n speciesInfo +\n '</td>' +\n '<td class=\"rightCounts\">' +\n taxon.count +\n '</td>' +\n '</tr>';\n\n // write list item to page\n $('#rightList tbody').append(tr);\n });\n\n if(data.length === 50) {\n // add load more link\n newStart = $('#rightList tbody tr').length;\n var loadMore =\n '<tr id=\"loadMoreRow\">' +\n '<td>&nbsp;</td>' +\n '<td colspan=\"2\"> ' +\n '<button id=\"loadMoreSpecies\" class=\"erk-link-button\">' +\n $.i18n.prop('general.btn.loadMore') +\n '</button>' +\n '</td>' +\n '</tr>';\n $('#rightList tbody').append(loadMore);\n }\n } else {\n // no spceies were found (either via paging or clicking on taxon group\n var text =\n '<tr>' +\n '<td></td>' +\n '<td colspan=\"2\">' +\n '[' + $.i18n.prop('eya.search.noSpecies') + ']' +\n '</td>' +\n '</tr>';\n $('#rightList tbody').append(text);\n }\n\n // Register clicks for the list of species links so that map changes\n $('#rightList tbody tr').click(function(e) {\n if(this.id === 'loadMoreRow') {\n return;\n }\n // var thisTaxon = $(this).attr('data-taxon-name');\n state.speciesGroup = $(this).attr('data-taxon-name');\n state.taxonRank = 'species';\n var guid = $(this).attr('id');\n taxonGuid = guid;\n // taxon = thisTaxon; // global var so map can show just this taxon\n $('#rightList tbody tr').removeClass('activeRow2'); // un-highlight previous current taxon\n // remove previous species info row\n $('#rightList tbody tr#species-info').detach();\n var info = $(this).find('.speciesInfo').html();\n // copy contents of species into a new (tmp) row\n if(info) {\n $(this).after('<tr id=\"species-info\"><td><td>' + info + '<td></td></tr>');\n }\n // hide previous selected spceies info box\n $(this).addClass('activeRow2'); // highloght current taxon\n // show the links for current selected species\n loadRecordsLayer();\n });\n\n // Register onClick for \"load more species\" link & sort headers\n $('#loadMoreSpecies, #right-table-header button').off().click(function(e) {\n if(this.id !== 'loadMoreSpecies') {\n $('#rightList tbody').empty();\n sortOrder = $(this).data('sort') ? $(this).data('sort') : 'index';\n newStart = 0;\n }\n\n var sortParam = sortOrder;\n var commonName = false;\n if(sortOrder === 'common') {\n commonName = true;\n sortParam = 'index';\n }\n\n // AJAX...\n var uri = EYA_CONF.biocacheServiceUrl + '/explore/group/ALL_SPECIES.json?callback=?';\n var params = {\n lat: $('#latitude').val(),\n lon: $('#longitude').val(),\n radius: $('#radius').val(),\n start: newStart,\n common: commonName,\n sort: sortParam,\n pageSize: 50,\n qc: EYA_CONF.queryContext\n };\n\n if(state.speciesGroup !== 'ALL_SPECIES') {\n params.fq = state.taxonRank + ':' + state.speciesGroup;\n }\n\n $('#loadMoreRow').detach(); // delete it\n $.getJSON(uri, params, function(data) {\n // process JSON data from request\n processSpeciesJsonData(data);\n });\n });\n\n // add hover effect to table cell with scientific names\n $('#rightList tbody tr').hover(\n function() {\n $(this).addClass('hoverRow');\n },\n function() {\n $(this).removeClass('hoverRow');\n }\n );\n }", "convertGroupsToFamilySpecific(data, fam){\n\t\tfor (var v = 0; v < data.length; v++)\n\t\t{\n\t\t\tvar alpha = data[v] + '--' + fam;\n\n\t\t\tif (FlowResolver.unique_haplos.indexOf(alpha) === -1){\n\t\t\t\tFlowResolver.unique_haplos.push(alpha);\n\t\t\t}\n\t\t\tdata[v] = FlowResolver.unique_haplos.indexOf(alpha);\n\t\t}\n\t}", "function chemistry() {\n var clipHere = 0;\n var columns = [];\n var me = '';\n var em = '';\n var sym = '';\n var s = 0;\n var r = '';\n var tmp = '';\n var isoMass = '';\n var isoDesc = '';\n var iMass = '';\n var lines = [];\n var massSymIon = '';\n var symMass = '';\n var matched = '';\n var symbol = '';\n var a = ['angstroms','angstrom','ang','a',\n 'centimeters','centimeter','cm',\n 'millimeters','millimeter','millimetres','millimetre','mm',\n 'micrometers','micrometer','micrometres','micrometre','microns','micron','um',\n 'nanometers','nanometer','nanometres','nanometre','nm'];\n var b = ['gigahertz','ghz','megahertz','mhz','terahertz','thz'];\n var c = ['eV', 'keV'];\n var units = (a.concat(b).concat(c)).join('\\|');\n var uType = a.join('\\|').replace(/[^\\|]+/g,'w') + '\\|' +\n b.join('\\|').replace(/[^\\|]+/g,'f') + '\\|' +\n c.join('\\|').replace(/[^\\|]+/g,'e'); \n var num = /\\d{1,5}(?:\\.\\d+)?/.source;\n var and = /(?:[\\,\\+\\/and\\&]{1,4})/.source;\n var three = /((?:lambdalambdalambda)|(?:lambdalambda)|(?:lambda)|(?:lll)|(?:ll)|(?:l)|(?:nununu)|(?:nunu)|(?:nu)|(?:nnn)|(?:nn)|(?:n))?/.source +\n '('+num+')' + '('+units+')?' + and + '('+num+')' + '('+units+')?' + and + '('+num+')' + '('+units+')?';\n var two = /((?:lambdalambda)|(?:lambda)|(?:ll)|(?:l)|(?:nunu)|(?:nu)|(?:nn)|(?:n))?/.source +\n '('+num+')' + '('+units+')?' + and + '('+num+')' + '('+units+')?';\n var one = /((?:lambda)|(?:l)|(?:nu)|(?:n))?/.source + '('+num+')?' + '('+units+')?';\n var startHere = xLtr.length;\n\n// ============================== read in the MOLECULES file =================================\n lines = (GM_getResourceText(\"molecules\").trim()).split('\\n');\n clipHere = lines.reduce(function(x1,x2,x3) {if (x2.match(/\\={20,}/)) {x1.push(x3);} return x1;}, []); \n if (clipHere.length >= 2) {\n lines = lines.slice(clipHere[0]+1,clipHere[1]);\n } else if (clipHere.length == 1) {\n lines = lines.slice(clipHere[0]+1); }\n for (s = 0; s < lines.length; s++) {\n lines[s] = lines[s].trim().replace(/ +/g,' ');\n columns = lines[s].split(' ');\n sym = columns[0]+ /((?:\\d[\\+\\-])|(?:\\+){1,3}|(?:\\-){1,3})?(\\[\\d\\-\\d\\])?/.source;\n // ------------- 3 values listed:\n r = '(?:' + three + sym +')|(?:' + sym + three +')'; \n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"50\", \"molecule\":columns[0],\n \"nVals\":\"3\", \"waveFreqPos\":\"1|12\", \"valPos\":\"2|13\", \"val1Pos\":\"2|13\",\n \"unitPos\":\"3|5|7|14|16|18\", \"chargePos\":\"8|10\", \"transPos\":\"9|11\"});\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"50\", \"molecule\":columns[0],\n \"nVals\":\"3\", \"waveFreqPos\":\"1|12\", \"valPos\":\"4|15\", \"val1Pos\":\"2|13\",\n \"unitPos\":\"3|5|7|14|16|18\", \"chargePos\":\"8|10\", \"transPos\":\"9|11\"});\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"50\", \"molecule\":columns[0],\n \"nVals\":\"3\", \"waveFreqPos\":\"1|12\", \"valPos\":\"6|17\", \"val1Pos\":\"2|13\",\n \"unitPos\":\"3|5|7|14|16|18\", \"chargePos\":\"8|10\", \"transPos\":\"9|11\"});\n// ------------- 2 values listed:\n r = '(?:' + two + sym + ')|(?:' + sym + two + ')'; \n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"40\", \"molecule\":columns[0],\n \"nVals\":\"2\", \"waveFreqPos\":\"1|10\", \"valPos\":\"2|11\", \"val1Pos\":\"2|11\",\n \"unitPos\":\"3|5|12|14\", \"chargePos\":\"6|8\", \"transPos\":\"7|9\"});\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"40\", \"molecule\":columns[0],\n \"nVals\":\"2\", \"waveFreqPos\":\"1|10\", \"valPos\":\"4|13\", \"val1Pos\":\"2|11\",\n \"unitPos\":\"3|5|12|14\", \"chargePos\":\"6|8\", \"transPos\":\"7|9\"});\n// ------------- 1 or no values listed:\n r = '(?:' + one + sym +')|(?:' + sym + one + ')'; \n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"25\", \"molecule\":columns[0],\n \"nVals\":\"1\", \"waveFreqPos\":\"1|8\", \"valPos\":\"2|9\", \"val1Pos\":\"2|9\",\n \"unitPos\":\"3|10\", \"chargePos\":\"4|6\", \"transPos\":\"5|7\"});\n }\n\n// ============================== read in the ELEMENTS file =================================\n// (https://www.khanacademy.org/science/chemistry/atomic-structure-and-properties/\n// names-and-formulas-of-ionic-compounds/a/naming-monatomic-ions-and-ionic-compounds\n// http://www.edu.xunta.es/ftpserver/portal/S_EUROPEAS/FQ/3rdESO_archivos/Nomenclature.htm\n// http://preparatorychemistry.com/Bishop_Isotope_Notation.htm\n clipHere = 0; \n lines = (GM_getResourceText(\"elements\").trim()).split('\\n');\n// clip out data table from any comments blocks\n clipHere = lines.reduce(function(x1,x2,x3) {if (x2.match(/\\={20,}/)) {x1.push(x3);} return x1;}, []); \n if (clipHere.length >= 2) {\n lines = lines.slice(clipHere[0]+1,clipHere[1]);\n } else if (clipHere.length == 1) {\n lines = lines.slice(clipHere[0]+1); }\n// format of the \"elements.txt\" file: Column 1: element symbol (like \"He\"), Column 2: written out name of the element\n// (like \"helium\"), Column 3: element's atomic number (# protons), Column 4: atomic mass of most abundant stable istope,\n// Column 5: list of other stable isotopes (atomic masses) delimited by vertical bars, Column 6: list of radioisotopes\n// (atomic mass) delimited by vertical bars\n\n\n// come back to\n// among the molecules is \"NaI\", sodium iodide. Could be confused with \"NaI\", neutral sodium! Need to have a\n// special catch that tries to distinguish which it is (if surrounded by brackets, is the neutral sodium. If \n// has a charge, is a molecule.\n\n for (s = 0; s < lines.length; s++) {\n lines[s] = lines[s].trim().replace(/ +/g,' ');\n// replace any lone vertical bars with \"\"\n columns = (lines[s].split(' ')).map(z => z.replace(/^\\|$/,''));\n isoMass = columns[3];\n isoDesc = columns[3].replace(/\\d+/g,'stable_isotope|most_abundant_isotope');\n isoMass = isoMass + ' ' + columns[4].replace(/\\|/g,' ');\n isoDesc = isoDesc + ' ' + columns[4].replace(/\\|/g,' ').replace(/\\d+/g,'stable_isotope');\n isoMass = isoMass + ' ' + columns[5].replace(/\\|/g,' ');\n isoDesc = isoDesc + ' ' + columns[5].replace(/\\|/g,' ').replace(/\\d+/g,'radio_isotope');\n isoMass = isoMass.replace(/ +/g,' ').trim();\n isoDesc = isoDesc.replace(/ +/g,' ').trim();\n iMass = isoMass.replace(/ /g,'\\|');\n massSymIon = '(?:(?:'+columns[2]+'('+iMass+'))|(?:'+'('+iMass+')'+columns[2]+')|('+iMass+'))?' + columns[0] + /([IVX]{0,6})/.source;\n symMass = columns[0] + '(?:(?:'+columns[2]+'('+iMass+'))|(?:'+'('+iMass+')'+columns[2]+')|('+iMass+'))';\n sym = /(\\[)?/.source + '(?:(?:'+ symMass + ')|(?:' + massSymIon + '))' + /(\\])?/.source;\n // ------------- 3 values listed:\n var r = '(?:' + sym + three + ')|(?:' + three + sym + ')';\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"50\", \"element\":columns[0],\n \"isoMass\":isoMass, \"isoDesc\":isoDesc, \"nprotons\":columns[2], \"nVals\":\"3\",\n \"waveFreqPos\":\"10|17\", \"valPos\":\"11|18\", \"val1Pos\":\"11|18\",\n \"unitPos\":\"12|14|16|19|21|23\", \"massPos\":\"2|3|4|5|6|7|25|26|27|28|29|30\",\n \"ionPos\":\"8|31\", \"leftPos\":\"1|24\", \"rightPos\":\"9|32\"});\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"50\", \"element\":columns[0],\n \"isoMass\":isoMass, \"isoDesc\":isoDesc, \"nprotons\":columns[2], \"nVals\":\"3\",\n \"waveFreqPos\":\"10|17\", \"valPos\":\"13|20\", \"val1Pos\":\"11|18\",\n \"unitPos\":\"12|14|16|19|21|23\", \"massPos\":\"2|3|4|5|6|7|25|26|27|28|29|30\",\n \"ionPos\":\"8|31\", \"leftPos\":\"1|24\", \"rightPos\":\"9|32\"});\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"50\", \"element\":columns[0],\n \"isoMass\":isoMass, \"isoDesc\":isoDesc, \"nprotons\":columns[2], \"nVals\":\"3\",\n \"waveFreqPos\":\"10|17\", \"valPos\":\"15|22\", \"val1Pos\":\"11|18\",\n \"unitPos\":\"12|14|16|19|21|23\", \"massPos\":\"2|3|4|5|6|7|25|26|27|28|29|30\",\n \"ionPos\":\"8|31\", \"leftPos\":\"1|24\", \"rightPos\":\"9|32\"});\n// ------------- 2 values listed:\n var r = '(?:' + sym + two +')|(?:' + two + sym + ')'; \n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"40\", \"element\":columns[0],\n \"isoMass\":isoMass, \"isoDesc\":isoDesc, \"nprotons\":columns[2], \"nVals\":\"2\",\n \"waveFreqPos\":\"1|10\", \"valPos\":\"11|16\", \"val1Pos\":\"11|16\",\n \"unitPos\":\"12|14|17|19\", \"massPos\":\"2|3|4|5|6|7|21|22|23|24|25|26\",\n \"ionPos\":\"8|27\", \"leftPos\":\"1|20\", \"rightPos\":\"9|28\"});\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"40\", \"element\":columns[0],\n \"isoMass\":isoMass, \"isoDesc\":isoDesc, \"nprotons\":columns[2], \"nVals\":\"2\",\n \"waveFreqPos\":\"1|10\", \"valPos\":\"13|18\", \"val1Pos\":\"11|16\",\n \"unitPos\":\"12|14|17|19\", \"massPos\":\"2|3|4|5|6|7|21|22|23|24|25|26\",\n \"ionPos\":\"8|27\", \"leftPos\":\"1|20\", \"rightPos\":\"9|28\"});\n// ------------- 1 or no values listed:\n var r = '(?:' + sym + one +')|(?:' + one + sym + ')'; \n xLtr.push({\"reg\":r, \"priority\":\"1\", \"tIndx\":columns[1], \"nChars\":\"25\", \"element\":columns[0],\n \"isoMass\":isoMass, \"isoDesc\":isoDesc, \"nprotons\":columns[2], \"nVals\":\"1\",\n \"waveFreqPos\":\"10|13\", \"valPos\":\"11|14\", \"val1Pos\":\"11|14\",\n \"unitPos\":\"12|15\", \"massPos\":\"2|3|4|5|6|7|17|18|19|20|21|22\",\n \"ionPos\":\"8|23\", \"leftPos\":\"1|16\", \"rightPos\":\"9|24\"});\n }\n // Now add their \"indx\" fields:\n for (s = startHere; s < xLtr.length; s++) {\n xLtr[s].indx = function(text, startPos, commonLines) {\n if (commonLines === undefined || typeof(commonLines) != \"boolean\") {commonLines = true; }\n this.endMatch = \"-1\";\n this.energy = '';\n this.accuracy = '';\n this.x = '';\n this.xSupp = '';\n this.noUnits = '';\n this.symbol = '';\n this.type = '';\n this.charge = '';\n this.transition = '';\n var tmp = '';\n var rightTst = false;\n var leftTst = false;\n var middleTst = true;\n var capTst = true;\n var elementMolecule = '';\n var digitVals = {I:1, V:5, X:10};\n var endMatch = -1;\n var noUnits = '';\n \n var t = JSON.parse(filterTheText(this.reg, text.slice(startPos)));\n if (this.element !== undefined && this.element !== '') {\n elementMolecule = this.element;\n } else {\n elementMolecule = this.molecule; }\n// perform a case-insensitive match initially. If a match exists, and if there are \n// capitalized letters involved in both the chemical symbol as well as in the matched text, then \n// perform a case-sensitive match and make sure that the match continues: \n m = t[0].match(new RegExp('^'+'(?:'+this.reg+')', 'i'));\n if (m && m[0].match(/[A-Z]/) && this.reg.match(/[A-Z]/)) {\n m = t[0].match(new RegExp('^'+'(?:'+this.reg+')')); }\n if (m) {\n endMatch = t[1][m[0].length-1] + 1 + startPos;\n// make sure that this is not a false-positive: if the word is less than 5 characters long,\n// insure that there is a non-alphanumeric character on the right and left side of it in\n// the unfiltered version of the text. \n if (m[0].length <= 5 && startPos > 0 && text.charAt(startPos-1).match(/[^A-Za-z0-9]/)) {\n leftTst = true; }\n if (startPos == 0) {leftTst = true; }\n if (m[0].length > 5) {leftTst = true;}\n if (m[0].length <= 5 && text.length >= endMatch+1 && text.charAt(endMatch).match(/[^A-Za-z0-9]/)) {\n rightTst = true; }\n if (text.length < endMatch+1) {rightTst = true; }\n if (m[0].length > 5) {rightTst = true; }\n// If the match consists of a single capitalized letter (like I for iodine), make sure that the match does \n// not occur as the first word of a sentence: \n if (m[0].match(/[A-Z]/) && m[0].length == 1 && startPos > 0 && text.slice(startPos-5, startPos).match(/[\\.\\,\\;\\:] +$/)) \n {capTst = false; }\n if (text.slice(startPos, endMatch).match(/\\;/) && (!(m[0].match(/\\; +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\:/) && (!(m[0].match(/\\: +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\?/) && (!(m[0].match(/\\? +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\!/) && (!(m[0].match(/\\! +[A-Z]/)))) {middleTst = false; }\n if (this.element !== undefined && text.slice(startPos, endMatch).match(/\\-/)) {middleTst = false; }\n// If all the tests come back OK, then we've got a legit match:\n }\n if (!(leftTst*rightTst*middleTst*capTst)) {return \"\"; }\n// everything below here assumes that there was an acceptable match\n this.endMatch = \"\"+endMatch \n var indx = this.tIndx;\n var xSupp = '';\n var x = '';\n var ion = '';\n var mass = '';\n var leftBra = '';\n var rightBra = '';\n var transition = '';\n var charge = '';\n// extract the \"lambdalambda\" or \"nununu\" words, if present in the matched text:\n var lamnu = (this.waveFreqPos.split('\\|')).map(z => m[parseInt(z)]).filter(z => z !== undefined && z != '')[0];\n if (lamnu === undefined) {lamnu = ''; }\n// extract the first value:\n var val1 = (this.val1Pos.split('\\|')).map(z => m[parseInt(z)]).filter(z => z !== undefined && z != '')[0];\n if (val1 === undefined) {val1 = ''; }\n// extract the value to be processed (which is the same as Val1 if there was only a single value in the matched text):\n var val = (this.valPos.split('\\|')).map(z => m[parseInt(z)]).filter(z => z !== undefined && z != '')[0];\n if (val === undefined) {val = ''; }\n// extract the matched units, if present:\n var units = (this.unitPos.split('\\|')).map(z => m[parseInt(z)]).filter(z => z !== undefined && z != '')[0];\n if (units === undefined) {units = ''; }\n// standardize the unit notation:\n units = units.replace(/^a[a-z]+/i,'ang');\n units = units.replace(/^um$/i,'um').replace(/^mu$/i,'um').replace(/^mic[a-z]+/i,'um');\n units = units.replace(/^cm/i,'cm');\n units = units.replace(/^mil[a-z]+/i,'mm').replace(/^mm/i,'mm');\n units = units.replace(/^n[a-z]+/i,'nm');\n units = units.replace(/^gh[a-z]+/i,'ghz').replace(/^gigah[a-z]+/i,'ghz');\n units = units.replace(/^kh[a-z]+/i,'khz').replace(/^kiloh[a-z]+/i,'khz');\n units = units.replace(/^th[a-z]+/i,'thz').replace(/^terah[a-z]+/i,'thz');\n units = units.replace(/^mh[a-z]+/i,'mhz').replace(/^megah[a-z]+/i,'mhz');\n units = units.replace(/^ev/i,'ev');\n units = units.replace(/^kev/i/'kev').replace(/^kiloe[a-z]+/i,'kev');\n if (this.element !== undefined && this.element != '') {\n// extract the ionization level, if present:\n var ion = (this.ionPos.split('\\|')).map(z => m[parseInt(z)]).filter(z => z !== undefined && z != '')[0];\n if (ion === undefined) {ion = ''; }\n// force symbol to carry an ion level designation. For example, if it is listed only as \"Ar\", assume\n// that \"ArI\" is implied and explicitly put in the \"I\". We insert the missing/implied \"I\" to insure \n// a consistent way to enter this line into the index ... would not want the same exact spectral line to\n// be listed under both \"Ar\" and \"ArI\". \n if (ion == '' && val != '') {ion = 'I'; }\n if (ion != '') {\n ion = ion.toUpperCase();\n// if an ion level is provided, insure that it is a feasible value (e.g., not in excess of the number of \n// electrons present in a neutral version of this atom). Accomplish this task by converting the roman numeral\n// into an arabic number and then compare to the value stored under nproton:\n tmp = 0;\n ion = ion.split('');\n for (i = 0; i < ion.length; i++) {\n if (digitVals[ion[i]] < digitVals[ion[i+1]]) {\n tmp += digitVals[ion[i+1]] - digitVals[ion[i]];\n i++;\n } else {tmp += digitVals[ion[i]]; }\n }\n ion = ion.join('');\n tmp = tmp - 1; // because ion level of I = neutral, II = missing 1 electron, etc.\n// see https://initjs.org/translate-roman-numerals-in-javascript-482ef6e55ee7\n if (tmp > parseInt(this.nprotons)) {\n// we have a physically impossible situation (more electrons missing than were there initially), so obviously\n// the match to the text has been a false positive, and there really isn't a match. Put everything back \n// the way it was before we thought we had a match, and bail out:\n this.endMatch = \"-1\";\n this.energy = '';\n this.accuracy = '';\n this.x = '';\n this.xSupp = '';\n this.noUnits = '';\n this.symbol = '';\n this.type = '';\n this.charge = '';\n this.transition = '';\n return ''; }\n// determine what adjective should be used to describe this ionization level: single for 1 missing electron,\n// double for 2 missing electrons, triple for 3 missing electrons, and then multiple if the number of \n// missing electrons is less than 10% of the total number of protons, and then high if number of missing\n// electrons is in excess of 10% of total number of protons and/or if 10 more more electrons are missing, \n// and complete/fully if all electrons are removed:\n ionDesc = '';\n if (tmp == 0) {\n ionDesc = 'neutral';\n } else if (tmp == 1) {\n ionDesc = 'singly_ionized';\n } else if (tmp == 2) {\n ionDesc = 'doubly_ionized'; \n } else if (tmp == 3) {\n ionDesc = 'triply_ionized'; \n } else if (tmp < 10 && tmp < 0.1*parseFloat(this.nprotons)) {\n ionDesc = 'multiply_ionized'; \n } else if ( ((tmp >= 10) || (tmp >= 0.1*parseFloat(this.nprotons))) && tmp < parseInt(this.nprotons) ) {\n ionDesc = 'highly_ionized';\n } else if (tmp == parseInt(this.nprotons)) {\n ionDesc = 'completely_ionized|fully_ionized'; }\n xSupp = ([... new Set((xSupp + ' ' + this.tIndx+'\\_'+ion + 'X4' + ionDesc).trim().split(' '))]).join(' ').trim(); }\n// extract the isotopic mass, if available:\n var mass = (this.massPos.split('\\|')).map(z => m[parseInt(z)]).filter(z => z !== undefined && z != '')[0];\n if (mass === undefined) {mass = ''; }\n// extract the left bracket (if present):\n var leftBra = (this.leftPos.split('\\|')).map(z => m[parseInt(z)]).filter(z => z !== undefined && z != '')[0];\n if (leftBra === undefined) {leftBra = ''; }\n// extract the right bracket (if present):\n var rightBra = (this.rightPos.split('\\|')).map(z => m[parseInt(z)]).filter(z => z !== undefined && z != '')[0];\n if (rightBra === undefined) {rightBra = ''; }\n if (leftBra != '' && rightBra != '') { // fully forbidden\n indx = indx + '\\|' + 'forbidden';\n } else if ( (leftBra != '')||(rightBra != '') ) { // semi forbidden\n leftBra = '';\n rightBra = '\\]';\n indx = indx + '\\|' + '*semi_forbidden'; }\n if (mass != '') {\n// see which description should go with this isotopic mass:\n z = this.isoMass.split(' ').indexOf(mass);\n indx = indx + '\\|' + mass; \n xSupp = ([... new Set((xSupp + ' ' + this.tIndx+'\\_'+mass + 'X4' + this.isoDesc.split(' ')[z]).trim().split(' '))]).join(' ').trim(); }\n xSupp = ([... new Set((xSupp + ' ' + this.tIndx + 'X4' + 'element').trim().split(' '))]).join(' ').trim(); \n symbol = leftBra + this.element + ion + rightBra; \n } else if (this.molecule !== undefined && this.molecule != '') {\n// extract the charge (if present):\n charge = (this.chargePos.split('\\|')).map(z => m[parseInt(z)]).filter(z => z !== undefined && z != '')[0];\n if (charge === undefined) {charge = ''; }\n// extract the transition (if present):\n transition = (this.transPos.split('\\|')).map(z => m[parseInt(z)]).filter(z => z !== undefined && z != '')[0];\n if (transition === undefined) {transition = ''; }\n if (charge != '') {\n indx = indx + '\\|' + charge;\n if (charge.match(/\\-$/)) {\n xSupp = ([... new Set((xSupp + ' ' + charge + 'X4' + 'anion').trim().split(' '))]).join(' ').trim(); \n } else if (charge.match(/\\+$/)) {\n xSupp = ([... new Set((xSupp + ' ' + charge + 'X4' + 'cation').trim().split(' '))]).join(' ').trim(); }\n }\n if (transition != '') {indx = indx + '\\|' + transition; }\n xSupp = ([... new Set((xSupp + ' ' + this.tIndx + 'X4' + 'molecule').trim().split(' '))]).join(' ').trim(); \n symbol = this.molecule + charge + transition;\n }\n// Now organize the information:\n if (lamnu.match(/^l/i)) {\n lamnu = 'w';\n } else if (lamnu.match(/^n/i)) {\n lamnu = 'f';\n } else {lamnu = ''; }\n// If units have been provided, then compute the energy of the line in units of ev, and let that value\n// enter as part of the words to be indexed.\n// If val is 2-digits, and val1 is 4 digits, then probably a shorthand notation has been used such\n// that the first 2 digits of the wavelength (in angstrom) have been removed for the values following the first one. \n// Check for this situation and attach the missing digits if necessary:\n if (val1.indexOf('\\.') == -1 && val1.length == 4 && val.length == 2) {\n units = 'ang';\n val = val1.slice(0,2) + val; } \n// if both a value and units have been supplied, we can compute an energy:\n var info = '';\n var energy = '';\n var delta = '';\n var region = ''; \n if (val != '' && units != '') {\n info = JSON.parse(extractLineEnergy(val, units));\n energy = info[0];\n delta = info[1];\n lamnu = info[3];\n xSupp = ([... new Set((xSupp + ' ' + energy + 'X4' + 'spectral_line' + '\\|' + info[2]).trim().split(' '))]).join(' ').trim();;\n indx = indx + '\\|' + info[0];\n }\n matched = '';\n// if a value has been supplied, then see if there is a match-up to any of the lines in the common\n// line list (type = lineList):\n// Look for matches between the value provided and those in the common-line list that has already been loaded\n// into the xLtr and designated by type = \"lineList\". There are 2 ways to kick off the search: if units have\n// been provided and are equal to ev, then do a search on energy. If no units, then search on the \n// wavelength/freqency raw value:\n if (commonLines && val != '') {\n if (info != '') {\n matched = xLtr.reduce(function(z1,z2,z3) {\n var diff;\n var totDelta;\n if (z2.type == 'lineList') {\n totDelta = Math.pow(Math.pow(parseFloat(z2.energyDelta),2) + Math.pow(parseFloat(delta),2),0.5);\n diff = Math.abs(parseFloat(z2.energy) - parseFloat(energy));\n if (diff <= totDelta) {z1.push(z3); } }\n return z1;}, []);\n } else {\n matched = xLtr.reduce(function(z1,z2,z3) {\n var diff;\n var totDelta;\n if (z2.type == 'lineList') {\n totDelta = Math.pow(Math.pow(parseFloat(z2.wfeDelta),2) + Math.pow(parseFloat(z2.wfeDelta),2),0.5);\n diff = Math.abs(parseFloat(z2.wfeValue) - parseFloat(val));\n if (diff <= totDelta) {z1.push(z3); } }\n return z1;}, []); }\n// If the symbol is specified, then lets see if we can further whittle down the list:\n if (matched.length > 0 && symbol != '') {\n tmp = matched;\n matched = xLtr.reduce(function(z1,z2,z3) {\n if (z2.type == 'lineList' && tmp.indexOf(z3) != -1 && z2.symbol == symbol) {z1.push(z3); }\n return z1;}, []); }\n// if the unit is specified, then whittle down even further:\n if (matched.length > 0 && info == '' && units != '' && units != 'ev') {\n tmp = matched;\n matched = xLtr.reduce(function(z1,z2,z3) {\n if (z2.type == 'lineList' && tmp.indexOf(z3) != -1 && z2.units == units) {z1.push(z3); }\n return z1; }, []); }\n// if the waveFreq is known and the units were not provided, then whittle down further:\n if (matched.length > 0 && info == '' && units == '' && lamnu != '') {\n tmp = matched;\n matched = xLtr.reduce(function(z1,z2,z3) {\n if (z2.type == 'lineList' && tmp.indexOf(z3) != -1 && z2.waveFreq == lamnu) {z1.push(z3); }\n return z1; }, []); }\n// if there were multiple matches, get the one that is closest to the provided value:\n tmp = matched;\n if (matched.length > 0 && info != '') {\n matched = xLtr.reduce(function(z1,z2,z3) {\n var diff;\n if (z2.type == 'lineList' && tmp.indexOf(z3) != -1) {\n diff = Math.abs(parseFloat(z2.energy) - parseFloat(energy));\n if (z1.length > 0 && diff < z1[0]) {z1 = [diff, z3];} else {z1 = [diff, z3]; } }\n return z1;}, []);\n } else if (matched.length > 0) {\n matched = xLtr.reduce(function(z1,z2,z3) {\n var diff;\n if (z2.type == 'lineList' && tmp.indexOf(z3) != -1) {\n diff = Math.abs(parseFloat(z2.wfeValue) - parseFloat(val));\n if (z1.length > 0 && diff < z1[0]) {z1 = [diff, z3];} else {z1 = [diff, z3]; } }\n return z1;}, []); }\n if (matched.length > 0) {\n matched = matched[1];\n this.x = xLtr[matched].x;\n this.xSupp = xLtr[matched].xSupp;\n this.type = \"spectralLine\";\n this.energy = xLtr[matched].energy;\n this.accuracy = xLtr[matched].energyDelta;\n this.noUnits = \"\";\n this.symbol = xLtr[matched].symbol;\n return xLtr[matched].indx; }\n }\n indx = ([... new Set(indx.split('\\|'))]).join('\\|');\n xSupp = ([... new Set(xSupp.trim().split(' '))]).join(' ').trim();\n x = x.replace(/^\\|/,'').replace(/\\|$/,'');\n if (x != '') {x = ([... new Set(x.split('\\|'))]).join('\\|'); }\n if (symbol == '') {symbol = 'TBD'; }\n tmp = '';\n if (energy != '') {\n tmp = energy + '\\_' + 'e';\n } else if (val != '') {\n tmp = val + '\\_' + lamnu; }\n if (tmp != '') {\n tmp = tmp.replace(/\\_$/,'');\n noUnits = (symbol + '\\_' + tmp); } \n if (symbol != 'TBD' && energy != '') {noUnits = ''; }\n// If this matched text indicates a spectral line (a value was present), proceed with the xLtr entry:\n if (val != '') {\n this.x = x;\n this.xSupp = xSupp;\n this.type = \"spectralLine\";\n this.energy = energy;\n if (energy == '') {delta = ''; }\n this.accuracy = delta;\n this.noUnits = noUnits;\n this.symbol = symbol;\n if (energy == '') {indx = indx + '\\|' + val; }\n return indx;\n }\n// If a value was not present, then we don't have a spectral line but rather mention of\n// an element or molecule. Proceed with that xLtr entry:\n this.x = x;\n this.xSupp = xSupp;\n if (this.element !== undefined && this.element != '') {\n this.type = \"element\";\n } else {this.type = \"molecule\"; }\n this.energy = '';\n this.accuracy = '';\n this.noUnits = '';\n this.symbol = symbol;\n return indx;\n }\n }\n return;\n }", "function doExample() { \n\n // Ok, let's test on some sample data\n // Exercise to reader is to handle Wilm's library track format\n // instead of this sample data. \n // Ours is an array of x, y - each representing a unique person's position\n \n var sample_tracks = [ [0.5, 0.7], // Expected to be in \"apple\" region\n [1.0, 1.0], // Also in \"apple\" region\n [2.0, 2.0], // Not in any region\n [1.25, 1.25], // In \"carp\" region\n [0.4, 0.4], // In \"apple\" and \"banana\" region\n [0.1, 0.1] ] // In \"apple\" and \"banana\" region\n \n // But we're actually going to use random #'s to make this more interesting. \n // So, comment the following out if you want to see the results of the above: \n \n sample_tracks = []; \n N = Math.floor(Math.random()*10)+1; // Number of tracks from 1 to 10. \n for (var n=0; n<N; n++) \n sample_tracks.push( [ Math.random()*2, Math.random()*2 ] ); \n \n\n // We assume that the sample data are all received in the same processing \"cycle\"\n // So they all contribute to the occupancy counts. \n\n // In the data handling process, we would do something like the following\n // *each time* a new track list is received to update the counts in REGIONS\n\n clearCount(REGIONS); // We would do this in a real use case, though not needed here\n for (var i in sample_tracks) { \n track=sample_tracks[i];\n occupied = updateCount(track[0], track[1], REGIONS); \n updatePercentOccupancy(REGIONS, sample_tracks.length); \n if (occupied.length>0) \n mylog(sprintf(\"Point %0.2f, %0.2f is in %s.\", track[0], track[1], occupied));\n else\n mylog(sprintf(\"Point %0.2f, %0.2f is not in any regions.\", track[0], track[1]));\n } \n\n mylog (\"------------\")\n \n // After the above, we can now access the occupancy counts / percentages like this:\n //\n // REGIONS[\"banana\"].count or REGIONS[\"apple\"].pct_occupancy\n //\n \n // Here, we'll just print them all out. \n // \n // Note: sprintf() is just a helper function for formatting strings: \n // https://github.com/alexei/sprintf.js\n \n mylog(\"Total number of people: \" + sample_tracks.length); \n \n // Iterate through the regions. Here 'region' holds each key to the \n // associative array REGIONS.\n //\n for (var region in REGIONS) { \n mylog( \"Region \" + region + \" has \" + REGIONS[region].count + \" people, percent of total is \" \n + sprintf(\"%0.2f%%.\", REGIONS[region].pct_occupancy*100) ); \n } \n \n mylog (\"<br />Note: Percentage occupancies here do not sum to 100% <br />because we have overlapping regions, but do represent<br /> per-region occupancy.\");\n\n // Let's now look at what video triggering would look like, but we'll use images to keep things straightforward\n // Our objective here is to see if someone is occupying a region and if so, show an image for that region.\n // We'll set opacity based on percentage occupancy as a bonus!\n \n // Our files are organized like this:\n // images/ \n // region_name/ apple, banana, carp\n // 0.jpg\n // ...\n // N.jpg where N is available_images-1 \n \n target = document.getElementById(\"images\"); \n \n // Loop through each region \n // Note that \"region\" here is the name of the region, because we are \n // using that as the key for the associative array REGIONS.\n //\n for (var region in REGIONS) { \n \n // Only show images for regions having at least one person in them\n if (REGIONS[region].count < 1) continue; \n \n // Pick which image to use \n k = Math.floor( Math.random() * REGIONS[region].available_images); \n \n // Build the filename for the image\n filename = \"images/\" + region + \"/\" + k + \".jpg\";\n \n // Calculate the opacity; we'll vary from 25% to 100% based on occupancy\n opacity = 0.25 + REGIONS[region].pct_occupancy * 0.75;\n \n // Build the HTML with the above\n target.innerHTML += '<img src=\"'+ filename + '\" style=\"opacity:' + opacity + ';\" /><br clear=\"all\" />';\n \n }\n \n}", "function populateSpeciesGroups(data) {\n $('#leftList tbody').empty(); // clear existing values\n addGroupRow('ALL_SPECIES', '', '');\n\n data.forEach(function(n) {\n addGroupRow(n.speciesGroup, n.common, n.taxonRank);\n n.taxa.forEach(function(subTaxon) {\n addSubGroupRow(subTaxon.name, subTaxon.common, subTaxon.taxonRank, n.speciesGroup);\n });\n });\n\n // Get species counts\n var mainRows = $('.mainGroup');\n populateTaxonRowCounts(mainRows);\n\n $('[data-taxon-name=\"ALL_SPECIES\"]').click();\n\n function addGroupRow(taxonName, common, taxonRank) {\n if(GLOBAL_LOCALE_CONF.locale !== 'et') {\n common = taxonName;\n }\n if(taxonName === 'ALL_SPECIES') {\n common = $.i18n.prop('eya.search.allSpecies');\n }\n\n var h =\n '<tr class=\"mainGroup\" data-taxon-name=\"' + taxonName + '\" data-taxon-rank=\"' + taxonRank + '\">' +\n '<td>' +\n '<span class=\"fa fa-chevron-right\"></span>&nbsp;' + common +\n '</td>' +\n '<td class=\"speciesCount\">' +\n '##' +\n '</td>' +\n '</tr>';\n $('#leftList tbody').append(h);\n }\n\n function addSubGroupRow(taxonName, common, taxonRank, parentTaxon) {\n if(GLOBAL_LOCALE_CONF.locale !== 'et') {\n common = taxonName;\n }\n var h =\n '<tr data-taxon-name=\"' + taxonName + '\" data-taxon-rank=\"' + taxonRank + '\" data-parent-taxon=\"' + parentTaxon + '\" style=\"visibility:collapse;\">' +\n '<td class=\"subGroupRow\">' +\n common +\n '</td>' +\n '<td class=\"speciesCount\">' +\n '##' +\n '</td>' +\n '</tr>';\n $('#leftList tbody').append(h);\n }\n }", "function processedGFData() {\n\t\tthis.moteid = idMote;\n\t\tthis.sensorType = sensorType;\n\t\tthis.lastTimestamp = lastTimeStamp;\n\t\tthis.lastValue = lastValue;\n\t\tthis.arrayValuesDay = valuesDay;\n\t\tthis.populationDay = populationDay;\n\t\tthis.arrayValuesWeek = valuesWeek;\n\t\tthis.populationWeek = populationWeek;\n\t\tthis.platform = platform;\n\t\tthis.unit= unit;\n\t}", "searchGenes() {\n this.molecularOptions = [];\n this.mutationOptions = [];\n const geneList = this.geneListString.replace(/(\\r\\n\\t|\\n|\\r\\t)/gm, '').toUpperCase().split(' ');\n geneList.forEach((d, i) => {\n if (d.includes('ORF')) {\n geneList[i] = d.replace('ORF', 'orf');\n }\n });\n // check for which profiles data is available for the entered HUGOSymbols\n let callback = (dataProfiles) => {\n this.props.rootStore.availableProfiles.forEach((d) => {\n if (d.molecularAlterationType === 'MUTATION_EXTENDED') {\n this.updateMutationCheckBoxOptions(dataProfiles\n .includes(d.molecularProfileId));\n } else {\n this.updateMolecularCheckBoxOptions(d.molecularProfileId, dataProfiles\n .includes(d.molecularProfileId));\n }\n });\n };\n if (this.props.rootStore.isOwnData) {\n this.props.rootStore.molProfileMapping.getDataContainingProfiles(geneList, callback);\n } else {\n this.props.rootStore.molProfileMapping.getDataContainingProfiles(geneList, callback, this.props.rootStore.studyAPI.accessTokenFromUser);\n }\n }", "function checkspecies(){\r\n\r\n}", "function processedSFData() {\n\t\tthis.moteid = idMote;\n\t\tthis.sensorType = sensorType;\n\t\tthis.lastTimestamp = lastTimeStamp;\n\t\tthis.lastValue = lastValue;\n\t\tthis.arrayValuesDay = valuesDay;\n\t\tthis.populationDay = populationDay;\n\t\tthis.arrayValuesWeek = valuesWeek;\n\t\tthis.populationWeek = populationWeek;\n\t\tthis.platform = platform;\n\t\tthis.unit = unit;\n\t}", "function generateSpeciesCount(dataset) {\n for (let i = 0; i < dataset.length; i++) {\n let row = dataset[i];\n if (speciesMap.has(row.species)) {\n speciesMap.set(row.species, speciesMap.get(row.species) + 1);\n if (row.species == \"Other\") {\n let otherSpecies = row.breed.split(\" \");\n if (otherSpeciesMap.has(otherSpecies[0])) {\n otherSpeciesMap.set(otherSpecies[0], otherSpeciesMap.get(otherSpecies[0]) + 1);\n }\n else {\n otherSpeciesMap.set(otherSpecies[0], 1);\n }\n }\n }\n else {\n speciesMap.set(row.species, 1);\n }\n } \n}", "appendMapData(newData, coordinates, scene) {\n const parkingSpaceCalcInfo = [];\n for (const kind in newData) {\n if (!newData[kind]) {\n continue;\n }\n\n if (!this.data[kind]) {\n this.data[kind] = [];\n }\n\n for (let i = 0; i < newData[kind].length; ++i) {\n switch (kind) {\n case 'lane':\n const lane = newData[kind][i];\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addLane(lane, coordinates, scene),\n text: this.addLaneId(lane, coordinates, scene),\n }));\n break;\n case 'clearArea':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addZone(\n newData[kind][i], colorMapping.YELLOW, coordinates, scene,\n ),\n }));\n break;\n case 'crosswalk':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addZone(\n newData[kind][i], colorMapping.PURE_WHITE, coordinates, scene,\n ),\n }));\n break;\n case 'junction':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addBorder(\n newData[kind][i], colorMapping.BLUE, coordinates, scene,\n ),\n }));\n break;\n case 'pncJunction':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addZone(\n newData[kind][i], colorMapping.BLUE, coordinates, scene,\n ),\n }));\n break;\n case 'signal':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addStopLine(\n newData[kind][i].stopLine, coordinates, scene,\n ),\n }));\n this.trafficSignals.add([newData[kind][i]], coordinates, scene);\n break;\n case 'stopSign':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addStopLine(\n newData[kind][i].stopLine, coordinates, scene,\n ),\n }));\n this.stopSigns.add([newData[kind][i]], coordinates, scene);\n break;\n case 'yield':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addStopLine(\n newData[kind][i].stopLine, coordinates, scene,\n ),\n }));\n this.yieldSigns.add([newData[kind][i]], coordinates, scene);\n break;\n case 'road':\n const road = newData[kind][i];\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addRoad(road, coordinates, scene),\n }));\n break;\n case 'parkingSpace':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addBorder(\n newData[kind][i], colorMapping.YELLOW, coordinates, scene,\n ),\n text: this.addParkingSpaceId(newData[kind][i], coordinates, scene),\n }));\n parkingSpaceCalcInfo.push(this.calcParkingSpaceExtraInfo(newData[kind][i],\n coordinates));\n break;\n case 'speedBump':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addCurve(\n newData[kind][i].position, colorMapping.RED, coordinates, scene,\n ),\n }));\n break;\n default:\n this.data[kind].push(newData[kind][i]);\n break;\n }\n }\n }\n return [parkingSpaceCalcInfo];\n }", "parse() {\n /**\n * The first two bytes are a bitmask which states which features are present in the mapFile\n * The second two bytes are.. something?\n */\n const featureFlags = this.take(2, \"featureFlags\").readUInt16LE(0);\n this.take(2, \"unknown01\");\n if (featureFlags & 0b000000000000001) {\n this.robotStatus = this.take(0x2C, \"robot status\");\n }\n\n\n if (featureFlags & 0b000000000000010) {\n this.mapHead = this.take(0x28, \"map head\");\n this.parseImg();\n }\n if (featureFlags & 0b000000000000100) {\n let head = asInts(this.take(12, \"history\"));\n this.history = [];\n for (let i = 0; i < head[2]; i++) {\n // Convert from ±meters to mm. UI assumes center is at 20m\n let position = this.readFloatPosition(this.buf, this.offset + 1);\n // first byte may be angle or whether robot is in taxi mode/cleaning\n //position.push(this.buf.readUInt8(this.offset)); //TODO\n this.history.push(position[0], position[1]);\n this.offset += 9;\n }\n }\n if (featureFlags & 0b000000000001000) {\n // TODO: Figure out charge station location from this.\n let chargeStation = this.take(16, \"charge station\");\n this.chargeStation = {\n position: this.readFloatPosition(chargeStation, 4),\n orientation: chargeStation.readFloatLE(12)\n };\n }\n if (featureFlags & 0b000000000010000) {\n let head = asInts(this.take(12, \"virtual wall\"));\n\n this.virtual_wall = [];\n this.no_go_area = [];\n\n let wall_num = head[2];\n\n for (let i = 0; i < wall_num; i++) {\n this.take(12, \"virtual wall prefix\");\n let body = asFloat(this.take(32, \"Virtual walls coords\"));\n\n if (body[0] === body[2] && body[1] === body[3] && body[4] === body[6] && body[5] === body[7]) {\n //is wall\n let x1 = Math.round(ViomiMapParser.convertFloat(body[0]));\n let y1 = Math.round(ViomiMapParser.MAX_MAP_HEIGHT - ViomiMapParser.convertFloat(body[1]));\n let x2 = Math.round(ViomiMapParser.convertFloat(body[4]));\n let y2 = Math.round(ViomiMapParser.MAX_MAP_HEIGHT - ViomiMapParser.convertFloat(body[5]));\n\n this.virtual_wall.push([x1, y1, x2, y2]);\n } else {\n //is zone\n let x1 = Math.round(ViomiMapParser.convertFloat(body[0]));\n let y1 = Math.round(ViomiMapParser.MAX_MAP_HEIGHT - ViomiMapParser.convertFloat(body[1]));\n let x2 = Math.round(ViomiMapParser.convertFloat(body[2]));\n let y2 = Math.round(ViomiMapParser.MAX_MAP_HEIGHT - ViomiMapParser.convertFloat(body[3]));\n let x3 = Math.round(ViomiMapParser.convertFloat(body[4]));\n let y3 = Math.round(ViomiMapParser.MAX_MAP_HEIGHT - ViomiMapParser.convertFloat(body[5]));\n let x4 = Math.round(ViomiMapParser.convertFloat(body[6]));\n let y4 = Math.round(ViomiMapParser.MAX_MAP_HEIGHT - ViomiMapParser.convertFloat(body[7]));\n\n this.no_go_area.push([x1, y1, x2, y2, x3, y3, x4, y4]);\n }\n\n this.take(48, \"unknown48\");\n }\n }\n if (featureFlags & 0b000000000100000) {\n let head = asInts(this.take(12, \"area head\"));\n let area_num = head[2];\n\n this.clean_area = [];\n\n for (let i = 0; i < area_num; i++) {\n this.take(12, \"area prefix\");\n let body = asFloat(this.take(32, \"area coords\"));\n\n let x1 = Math.round(ViomiMapParser.convertFloat(body[0]));\n let y1 = Math.round(ViomiMapParser.MAX_MAP_HEIGHT - ViomiMapParser.convertFloat(body[1]));\n let x2 = Math.round(ViomiMapParser.convertFloat(body[2]));\n let y2 = Math.round(ViomiMapParser.MAX_MAP_HEIGHT - ViomiMapParser.convertFloat(body[3]));\n let x3 = Math.round(ViomiMapParser.convertFloat(body[4]));\n let y3 = Math.round(ViomiMapParser.MAX_MAP_HEIGHT - ViomiMapParser.convertFloat(body[5]));\n let x4 = Math.round(ViomiMapParser.convertFloat(body[6]));\n let y4 = Math.round(ViomiMapParser.MAX_MAP_HEIGHT - ViomiMapParser.convertFloat(body[7]));\n\n this.clean_area.push([x1, y1, x2, y2, x3, y3, x4, y4]);\n\n this.take(48, \"unknown48\");\n }\n }\n if (featureFlags & 0b000000001000000) {\n let navigateTarget = this.take(20, \"navigate\");\n this.navigateTarget = {position: this.readFloatPosition(navigateTarget, 8)};\n }\n if (featureFlags & 0b000000010000000) {\n let realtimePose = this.take(21, \"realtime\");\n this.realtimePose = {position: this.readFloatPosition(realtimePose, 9)};\n }\n\n if (featureFlags & 0b000100000000000) {\n //v6 example: 5b590f5f00000001\n //v7 example: e35a185e00000001\n this.take(8, \"unknown8\");\n this.parseRooms();\n // more stuff i don't understand\n this.take(50, \"unknown50\");\n this.take(5, \"unknown5\");\n this.points = [];\n try {\n this.parsePose();\n } catch (e) {\n Logger.warn(\"Unable to parse Pose\", e); //TODO\n }\n }\n this.take(this.buf.length - this.offset, \"trailing\");\n\n // TODO: one of them is just the room outline, not actual past navigation logic\n return this.convertToValetudoMap({\n image: this.img,\n zones: this.rooms,\n //TODO: at least according to all my sample files, this.points is never the path\n //Why is this here?\n //path: {points: this.points.length ? this.points : this.history},\n path: {points: this.history},\n goto_target: this.navigateTarget && this.navigateTarget.position,\n robot: this.realtimePose && this.realtimePose.position,\n charger: this.chargeStation && this.chargeStation.position,\n virtual_wall: this.virtual_wall,\n no_go_area: this.no_go_area,\n clean_area: this.clean_area\n });\n }", "_indexRoms() {\n\t\tvar files = fs.readdirSync( this.directory ),\n\t\t\tcontext = this;\n\n\t\tthis._mapperRoms = {};\n\t\tvar romCount = 0;\n\t\tfiles.forEach( function( fileName ) {\n\t\t\tvar contents, cartridge;\n\t\t\tvar filePath = path.join( context.directory, fileName );\n\t\t\tvar info = fs.statSync( filePath );\n\n\t\t\tif ( !info.isFile() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttry {\n\n\t\t\t\t// try to parse parse to determine if ROM is valid and to get mapper info\n\t\t\t\tcontents = (\n\t\t\t\t\tnew Uint8Array( fs.readFileSync( filePath ) )\n\t\t\t\t).buffer;\n\t\t\t\tcartridge = new Cartridge( contents );\n\t\t\t} catch (e) {\n\n\t\t\t\t// skip anything that isn't a valid NES ROM\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcontext._indexRom( fileName, cartridge.mapper );\n\t\t\tromCount++;\n\t\t});\n\n\t\tconsole.log( \"Found \" + romCount + \" ROMs in \" + this.directory );\n\t}", "function decodeGa4ghReads(json) {\n var i,\n jsonRecords = json.alignments,\n len = jsonRecords.length,\n json,\n alignment,\n jsonAlignment,\n cigarDecoded,\n alignments = [],\n genome = igv.browser.genome,\n mate;\n\n for (i = 0; i < len; i++) {\n json = jsonRecords[i];\n alignment = new igv.BamAlignment();\n alignment.readName = json.fragmentName;\n alignment.properPlacement = json.properPlacement;\n alignment.duplicateFragment = json.duplicateFragment;\n alignment.numberReads = json.numberReads;\n alignment.fragmentLength = json.fragmentLength;\n alignment.readNumber = json.readNumber;\n alignment.failedVendorQualityChecks = json.failedVendorQualityChecks;\n alignment.secondaryAlignment = json.secondaryAlignment;\n alignment.supplementaryAlignment = json.supplementaryAlignment;\n alignment.seq = json.alignedSequence;\n alignment.qual = json.alignedQuality;\n alignment.matePos = json.nextMatePosition;\n alignment.tagDict = json.info;\n alignment.flags = encodeFlags(json);\n jsonAlignment = json.alignment;\n\n if (jsonAlignment) {\n alignment.mapped = true;\n alignment.chr = json.alignment.position.referenceName;\n if (genome) alignment.chr = genome.getChromosomeName(alignment.chr);\n alignment.start = parseInt(json.alignment.position.position);\n alignment.strand = !json.alignment.position.reverseStrand;\n alignment.mq = json.alignment.mappingQuality;\n alignment.cigar = encodeCigar(json.alignment.cigar);\n cigarDecoded = translateCigar(json.alignment.cigar);\n alignment.lengthOnRef = cigarDecoded.lengthOnRef;\n blocks = makeBlocks(alignment, cigarDecoded.array);\n alignment.blocks = blocks.blocks;\n alignment.insertions = blocks.insertions;\n } else {\n alignment.mapped = false;\n }\n\n mate = json.nextMatePosition;\n\n if (mate) {\n alignment.mate = {\n chr: mate.referenceFrame,\n position: parseInt(mate.position),\n strand: !mate.reverseStrand\n };\n }\n\n if (self.filter.pass(alignment)) {\n alignments.push(alignment);\n }\n }\n\n return alignments; // Encode a cigar string -- used for popup text\n\n function encodeCigar(cigarArray) {\n var cigarString = \"\";\n cigarArray.forEach(function (cigarUnit) {\n var op = CigarOperationTable[cigarUnit.operation],\n len = cigarUnit.operationLength;\n cigarString = cigarString + (len + op);\n });\n return cigarString;\n } // TODO -- implement me\n\n\n function encodeFlags(json) {\n return 0;\n }\n\n function translateCigar(cigar) {\n var cigarUnit,\n opLen,\n opLtr,\n lengthOnRef = 0,\n cigarArray = [],\n i;\n\n for (i = 0; i < cigar.length; i++) {\n cigarUnit = cigar[i];\n opLtr = CigarOperationTable[cigarUnit.operation];\n opLen = parseInt(cigarUnit.operationLength); // Google represents long as a String\n\n if (opLtr === 'M' || opLtr === 'EQ' || opLtr === 'X' || opLtr === 'D' || opLtr === 'N' || opLtr === '=') lengthOnRef += opLen;\n cigarArray.push({\n len: opLen,\n ltr: opLtr\n });\n }\n\n return {\n lengthOnRef: lengthOnRef,\n array: cigarArray\n };\n }\n /**\n * Split the alignment record into blocks as specified in the cigarArray. Each aligned block contains\n * its portion of the read sequence and base quality strings. A read sequence or base quality string\n * of \"*\" indicates the value is not recorded. In all other cases the length of the block sequence (block.seq)\n * and quality string (block.qual) must == the block length.\n *\n * NOTE: Insertions are not yet treated // TODO\n *\n * @param record\n * @param cigarArray\n * @returns array of blocks\n */\n\n\n function makeBlocks(record, cigarArray) {\n var blocks = [],\n insertions,\n seqOffset = 0,\n pos = record.start,\n len = cigarArray.length,\n blockSeq,\n gapType,\n blockQuals;\n\n for (var i = 0; i < len; i++) {\n var c = cigarArray[i];\n\n switch (c.ltr) {\n case 'H':\n break;\n // ignore hard clips\n\n case 'P':\n break;\n // ignore pads\n\n case 'S':\n seqOffset += c.len;\n gapType = 'S';\n break;\n // soft clip read bases\n\n case 'N':\n pos += c.len;\n gapType = 'N';\n break;\n // reference skip\n\n case 'D':\n pos += c.len;\n gapType = 'D';\n break;\n\n case 'I':\n blockSeq = record.seq === \"*\" ? \"*\" : record.seq.substr(seqOffset, c.len);\n blockQuals = record.qual ? record.qual.slice(seqOffset, c.len) : undefined;\n if (insertions === undefined) insertions = [];\n insertions.push({\n start: pos,\n len: c.len,\n seq: blockSeq,\n qual: blockQuals\n });\n seqOffset += c.len;\n break;\n\n case 'M':\n case 'EQ':\n case '=':\n case 'X':\n blockSeq = record.seq === \"*\" ? \"*\" : record.seq.substr(seqOffset, c.len);\n blockQuals = record.qual ? record.qual.slice(seqOffset, c.len) : undefined;\n blocks.push({\n start: pos,\n len: c.len,\n seq: blockSeq,\n qual: blockQuals,\n gapType: gapType\n });\n seqOffset += c.len;\n pos += c.len;\n break;\n\n default:\n console.log(\"Error processing cigar element: \" + c.len + c.ltr);\n }\n }\n\n return {\n blocks: blocks,\n insertions: insertions\n };\n }\n }", "function PostProcessAlgoliaResults(data) {\n console.log(\"Post processing makes\");\n\n data.MarineMaxMakes = data.getFacetValues('Make');\n\n\n //Grouping of Models\n var makeModelDelimitedList = data.getFacetValues('MakeModelDelimited');\n makeModelDelimitedList.sort(function (a, b) {\n if (a.name.toLowerCase() < b.name.toLowerCase())\n return -1;\n if (a.name.toLowerCase() > b.name.toLowerCase())\n return 1;\n return 0;\n });\n\n var currentName = \"\";\n var modelGroupList = {};\n for (var theIndex in makeModelDelimitedList) {\n var modelDelimited = makeModelDelimitedList[theIndex];\n var values = modelDelimited.name.split(\",\");\n var makeValue = values[0];\n var modelValue = values[1];\n\n\n if (currentName != makeValue) {\n currentName = makeValue;\n modelGroupList[currentName] = [];\n }\n\n modelGroupList[currentName].push(modelValue);\n }\n\n data.MakeModelGrouping = modelGroupList;\n }", "function Pangenome(pan, geneInfo, hc, scatter, plotDim){\n\n// Private data\n\tvar panGroupChanges = {\n\t\t'enter': [],\n\t\t'change': {'Accessory': [], 'Singleton': [], 'Core': []},\n\t\t'update': [],\n\t\t'exit': [],\n\t\t'empty': true\n\t};\n\tvar goChange;\n\tvar oldGOpos = [];\n\tvar coreThreshold = 1;\n\n// Private methods\n\tfunction getChildren(root){\n\t\tvar children = [];\n\t\tfunction recurseChildren(root){\n\t\t\tchildren.push(root);\n\t\t\tif(root.children && root.children.length) {\n\t\t\t\troot.children.forEach(recurseChildren);\n\t\t\t}\n\t\t}\n\t\trecurseChildren(root);\n\t\treturn children;\n\t}\n\tfunction resetPanGroupChanges(){\n\t\tpanGroupChanges = {\n\t\t\t'enter': [],\n\t\t\t'change': {'Accessory': [], 'Singleton': [], 'Core': []},\n\t\t\t'update': [],\n\t\t\t'exit': [],\n\t\t\t'empty': true\n\t\t};\n\t}\n\tfunction geneSort(a, b){\n\t\treturn +(a.name) - +(b.name);\n\t}\n\t\n\n// Public data\n\tthis.scatter = scatter;\n\tthis.currentScatter = 'MDS';\n\tthis.currentGO = \"biological_process\";\n\tthis.fullPan = pan;\n\tthis.subPan = {};\n\tthis.fullGeneInfo = geneInfo.map(function(d){d.origDomain = d.domain; d.inSubPan = true; return d;});\n\tthis.subGeneInfo = [];\n\tthis.hierachicalData = hc;\n\tthis.allStrains = d3.keys(pan);\n\tthis.subStrains = [];\n\tthis.strainSelection = {'a': null, 'b': null};\n\tthis.cluster = d3.layout.cluster()\n\t\t.size([1, plotDim.denDim.width-100])\n\t\t.separation(function(a, b) { return 1; });\n\tObject.defineProperties(this, {\n\t\t\"pan\": {\n\t\t\t\"get\": function() {\n\t\t\t\tif(d3.keys(this.subPan).length){\n\t\t\t\t\treturn this.subPan;\n\t\t\t\t} else {\n\t\t\t\t\treturn this.fullPan;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t'geneInfo': {\n\t\t\t\"get\": function() {\n\t\t\t\tif(this.subGeneInfo.length){\n\t\t\t\t\treturn this.subGeneInfo;\n\t\t\t\t} else {\n\t\t\t\t\treturn this.fullGeneInfo;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t'strains': {\n\t\t\t'get': function(){\n\t\t\t\tif(this.subStrains.length){\n\t\t\t\t\treturn this.subStrains;\n\t\t\t\t} else {\n\t\t\t\t\treturn this.allStrains;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t'oldGOpos': {\n\t\t\t'get': function() {return oldGOpos;}\n\t\t}\n });\n this.goMapping = goMapping;\n this.panGroupInfo = {\n\t Singleton: 'Genes in the pangenome that are only represented by one genome. The group can consist both of falsly annotated orf\\'s or very rare genes',\n\t Accessory: 'Genes that are in some but not all of the organisms in the pangenome. These genes are not necessary for survival, but can give e.g. niché-specific advantages',\n\t Core: 'The genes in a pangenome that are present in all organisms. This group is thought to converge to a minimum number of necessary genes for a specific group of organisms e.g. a species.'\n };\n\n\n// Public methods\t\n\tthis.switchScatter = function(){\n\t\tthis.currentScatter = this.currentScatter == 'MDS' ? 'PCA' : 'MDS';\n\t};\n\tthis.getScatter = function(){\n\t\treturn this.scatter[this.currentScatter];\n\t};\n\tthis.createHCNodeLinks = function(dendrogram){\n\t\tthis.nodes = this.cluster.nodes(this.hierachicalData).map(function(d) {d.y = dendrogram.heightScale(d.height); return d;});\n\t\tthis.links = this.cluster.links(this.nodes);\n\t};\n\tthis.setThreshold = function(threshold) {\n\t\tcoreThreshold = threshold;\n\t\tif (this.subStrains.length !== 0) {\n\t\t\tthis.setSubPan(this.subStrains);\n\t\t} else {\n\t\t\tthis.setSubPan(this.allStrains);\n\t\t}\n\t\t\n\t};\n\tthis.setSubPan = function(strains){\n\t\tvar fullGeneInfo = this.fullGeneInfo,\n\t\t\tsubGeneInfo = this.subGeneInfo,\n\t\t\toldGeneInfo = this.geneInfo.slice();\n\t\t\n\t\tresetPanGroupChanges(false);\n\t\tthis.resetSubPan();\n\n\t\t\n\t\tvar fullPan = this.fullPan,\n\t\t\tsubPan = this.subPan;\n\t\t\t\n// Create new pangenome and filter the geneinfo\n\t\t\t\n\t\td3.keys(fullPan).forEach(function(d) {if(strains.indexOf(d) != -1) subPan[d] = fullPan[d];});\n\t\t\n\t\tvar remove = d3.transpose(d3.values(subPan)).map(function(d) {\n\t\t\t\treturn d.filter(function(f) {return f;}).length;\n\t\t\t});\n\t\tvar nRep = remove.filter(function(f) {return f;});\n\n\t\tfor (var i in subPan){\n\t\t\tsubPan[i] = subPan[i].filter(function(d, j) {return remove[j] !== 0;});\n\t\t}\n\t\tthis.subStrains = d3.keys(subPan);\n\t\tvar nStrains = this.strains.length;\n\t\t\n\t\tsubGeneInfo = fullGeneInfo.filter(function(d, i) {return remove[i] !== 0;});\n\t\t\n\t\tvar oldGeneInfoMap = d3.map(oldGeneInfo, function(d) {return d.id;});\n\n\t\tsubGeneInfo.forEach(function(d, i) {\n\t\t\tvar geneExist = oldGeneInfoMap.has(d.id);\n\t\t\tvar ratio = nRep[i] / nStrains;\n\n\t\t\tif (ratio >= coreThreshold) {\n\t\t\t\tif (geneExist){\n\t\t\t\t\tif (d.domain == 'Core'){\n\t\t\t\t\t\tpanGroupChanges.update.push(d);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpanGroupChanges.change[d.domain].push(d);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tpanGroupChanges.enter.push(d);\n\t\t\t\t}\n\t\t\t\td.domain = 'Core';\n\t\t\t} else if (nRep[i] == 1) {\n\t\t\t\tif (geneExist){\n\t\t\t\t\tif (d.domain == 'Singleton'){\n\t\t\t\t\t\tpanGroupChanges.update.push(d);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpanGroupChanges.change[d.domain].push(d);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tpanGroupChanges.enter.push(d);\n\t\t\t\t}\n\t\t\t\td.domain = 'Singleton';\n\t\t\t} else if (nRep[i] > 1){\n\t\t\t\tif (geneExist){\n\t\t\t\t\tif (d.domain == 'Accessory'){\n\t\t\t\t\t\tpanGroupChanges.update.push(d);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpanGroupChanges.change[d.domain].push(d);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tpanGroupChanges.enter.push(d);\n\t\t\t\t}\n\t\t\t\td.domain = 'Accessory';\n\t\t\t}\n\t\t\treturn d;\n\t\t});\n\n// Get the changes from the old pangenome\t\n\t\tvar subGeneInfoMap = d3.map(subGeneInfo, function(d) {return d.id;});\n\t\toldGeneInfo.forEach(function(d) {\n\t\t\tif (!subGeneInfoMap.has(d.id)){\n\t\t\t\tpanGroupChanges.exit.push(d);\n\t\t\t}\n\t\t});\n\t\tthis.subGeneInfo = subGeneInfo;\n\t\tthis.fullGeneInfo.forEach(function(d) {\n\t\t\tif (!subGeneInfoMap.has(d.id)) {\n\t\t\t\td.inSubPan = false;\n\t\t\t} else {\n\t\t\t\td.inSubPan = true;\n\t\t\t}\n\t\t});\n\t\tpanGroupChanges.empty = false;\n\t\t\n\t};\n\tthis.resetSubPan = function(domainRevert){\n\t\tthis.subPan = {};\n\t\tthis.subGeneInfo = [];\n\t\tthis.fullGeneInfo.forEach(function(d) {d.index=-1; d.inSubPan = true;});\n\t\tif (domainRevert){\n\t\t\tthis.fullGeneInfo.map(function(d) {d.domain = d.origDomain;});\n\t\t}\n\t};\n\tthis.panGroupStat = function(){\n\t\tvar Core = 0,\n\t\t\tAccessory = 0,\n\t\t\tSingleton = 0;\n\t\t\n\t\tvar data = d3.values(this.pan);\n\n\t\tvar size = data.length;\n\t\tdata = d3.transpose(data);\n\t\tvar counts = data.map(function(d) {return d.filter(function(f) {return f;}).length;}).filter(function(f) {return f;});\n\t\t\n\t\tcounts.forEach(function(d) {\n\t\t\tif (d/size >= coreThreshold) Core++;\n\t\t\telse if (d === 1) Singleton++;\n\t\t\telse Accessory++;\n\t\t});\n\t\treturn {\n\t\t\t'Core': Core,\n\t\t\t'Accessory': Accessory,\n\t\t\t'Singleton': Singleton,\n\t\t\t'total': Core+Accessory+Singleton};\n\t};\n\tthis.goOrder = function(first){\n\t\tif (typeof first === 'undefined') { first = false; }\n\t\t\n\t\tvar startClass = [];\n\t\tfor (var i = 0; i < this.goMapping.name.length; i++){\n\t\t\tstartClass.push(0);\n\t\t}\n// Get overall layout\n\t\tvar classCount = {'Singleton': clone(startClass), 'Accessory': clone(startClass), 'Core': clone(startClass)},\n\t\t\tdata = this.geneInfo;\n\t\t\n\t\tvar genePos = [];\n\t\tfor (var j = 0; j < this.goMapping.name.length; j++){\n\t\t\tgenePos.push([]);\n\t\t}\n\t\tvar genes = {'Singleton': clone(genePos), 'Accessory': clone(genePos), 'Core': clone(genePos)};\n\t\tdata.forEach(function(d) {\n\t\t\tclassCount[d.domain][d.class-1]++;\n\t\t\tgenes[d.domain][d.class-1].push(d);\n\t\t});\n\t\t\n\t\tvar classPos = {};\n\t\tclassPos.Singleton = classCount.Singleton.map(function(d,i) {return d3.sum(classCount.Singleton.slice(0,i))+1;});\n\t\tclassPos.Accessory = classCount.Accessory.map(function(d,i) {return d3.sum(classCount.Accessory.slice(0,i))+1;});\n\t\tclassPos.Core = classCount.Core.map(function(d,i) {return d3.sum(classCount.Core.slice(0,i))+1;});\n\t\tvar overall = [];\n\t\tfor (i in classCount){\n\t\t\tclassCount[i].forEach(function(d, ii){\n\t\t\t\toverall.push({'domain': i, 'class': ii+1, 'size': d, 'start': classPos[i][ii], 'end': classPos[i][ii+1] ? classPos[i][ii+1]: classPos[i][ii]+d, 'genes': genes[i][ii].sort(geneSort).map(function(d, i) { d.index = i; return d;})});\n\t\t\t});\n\t\t}\n\t\tvar ans = {'overall': overall};\n\t\tif (!first){\n// Get the position of the transient arcs\n\t\t\tvar updateCount = {'Singleton': clone(startClass), 'Accessory': clone(startClass), 'Core': clone(startClass)};\n\t\t\tvar enterCount = {'Singleton': clone(startClass), 'Accessory': clone(startClass), 'Core': clone(startClass)};\n\t\t\tvar exitCount = {'Singleton': clone(startClass), 'Accessory': clone(startClass), 'Core': clone(startClass)};\n\t\t\tvar changeCount = {\n\t\t\t\t'Singleton': {'Accessory': clone(startClass), 'Core': clone(startClass)},\n\t\t\t\t'Accessory': {'Singleton': clone(startClass), 'Core': clone(startClass)},\n\t\t\t\t'Core': {'Singleton': clone(startClass), 'Accessory': clone(startClass)}\n\t\t\t};\n\t\t\tvar counterStart = {'Singleton': clone(startClass), 'Accessory': clone(startClass), 'Core': clone(startClass)};\n\t\t\toldGOpos.forEach(function(d) {\n\t\t\t\tcounterStart[d.domain][d.class-1] = d.start;\n\t\t\t});\n\t\t\tvar counterEnd = {'Singleton': clone(startClass), 'Accessory': clone(startClass), 'Core': clone(startClass)};\n\t\t\toverall.forEach(function(d) {\n\t\t\t\tcounterEnd[d.domain][d.class-1] = d.start;\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\tpanGroupChanges.update.forEach(function(d) {\n\t\t\t\tupdateCount[d.domain][d.class-1]++;\n\t\t\t});\n\t\t\tpanGroupChanges.enter.forEach(function(d) {\n\t\t\t\tenterCount[d.domain][d.class-1]++;\n\t\t\t});\n\t\t\tpanGroupChanges.exit.forEach(function(d) {\n\t\t\t\texitCount[d.domain][d.class-1]++;\n\t\t\t});\n\t\t\tfor (i in panGroupChanges.change){\n\t\t\t\tpanGroupChanges.change[i].forEach(function(d) {\n\t\t\t\t\tchangeCount[i][d.domain][d.class-1]++;\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tvar updateStart = [];\n\t\t\tvar updateEnd = [];\n\t\t\tfor (i in updateCount){\n\t\t\t\tupdateCount[i].forEach(function(d, ii){\n\t\t\t\t\tvar start = oldGOpos.filter(function(d) {return d.domain == i && d.class == ii+1;})[0].start;\n\t\t\t\t\tstart = start ? start : 1;\n\t\t\t\t\tvar end = overall.filter(function(d) {return d.domain == i && d.class == ii+1;})[0].start;\n\t\t\t\t\tend = end ? end : 1;\n\t\t\t\t\tupdateStart.push({'domain': i, 'class': ii+1, 'size': d, 'start': start, 'end': start+d});\n\t\t\t\t\tupdateEnd.push({'domain': i, 'class': ii+1, 'size': d, 'start': end, 'end': end+d});\n\t\t\t\t\tcounterStart[i][ii] = start+d;\n\t\t\t\t\tcounterEnd[i][ii] = end+d;\n\t\t\t\t});\n\t\t\t}\n\t\t\tvar exit = [];\n\t\t\tfor (i in exitCount){\n\t\t\t\texitCount[i].forEach(function(d, ii){\n\t\t\t\t\tstart = counterStart[i][ii] ? counterStart[i][ii] : 1;\n\t\t\t\t\texit.push({'domain': i, 'class': ii+1, 'size': d, 'start': start, 'end': start+d});\n\t\t\t\t\tcounterStart[i][ii] = start+d;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tvar changeFrom = [];\n\t\t\tvar changeTo = [];\n\t\t\tfor (i in changeCount){\n\t\t\t\tfor (j in changeCount[i]){\n\t\t\t\t\tchangeCount[i][j].forEach(function(d, ii) {\n\t\t\t\t\t\tfromStart = counterStart[i][ii] ? counterStart[i][ii] : 1;\n\t\t\t\t\t\ttoStart = counterEnd[j][ii] ? counterEnd[j][ii] : 1;\n\t\t\t\t\t\tchangeFrom.push({'key': i+j+(ii+1), 'domain': i, 'class': ii+1, 'size': d, 'start': fromStart, 'end': fromStart+d});\n\t\t\t\t\t\tchangeTo.push({'key': i+j+(ii+1), 'domain': j, 'class': ii+1, 'size': d, 'start': toStart, 'end': toStart+d});\n\t\t\t\t\t\tcounterStart[i][ii] = fromStart+d;\n\t\t\t\t\t\tcounterEnd[j][ii] = toStart+d;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tvar enter = [];\n\t\t\tfor (i in enterCount){\n\t\t\t\tenterCount[i].forEach(function(d, ii){\n\t\t\t\t\tstart = counterEnd[i][ii] ? counterEnd[i][ii] : 1;\n\t\t\t\t\tenter.push({'domain': i, 'class': ii+1, 'size': d, 'start': start, 'end': start+d});\n\t\t\t\t\tcounterEnd[i][ii] = start+d;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tans.transient = {'updateStart': updateStart, 'updateEnd': updateEnd, 'enter': enter, 'exit': exit, 'changeFrom': changeFrom, 'changeTo': changeTo};\n\t\t}\n\t\toldGOpos = clone(overall);\n\t\treturn ans;\n\t};\n\tthis.goPos = function(scale, first){\n\t\tvar data = this.goOrder(first);\n\t\t\n\t\tdata.overall.forEach(function(d) {\n\t\t\tvar angles = scale.circle.new(d);\n\t\t\td.startAngle = angles[0];\n\t\t\td.endAngle = angles[1];\n\t\t});\n\t\t\n\t\tif (data.transient){\n\n\t\t\tdata.transient.updateStart.forEach(function(d) {\n\t\t\t\tvar angles = scale.circle.old(d);\n\t\t\t\td.startAngle = angles[0];\n\t\t\t\td.endAngle = angles[1];\n\t\t\t});\n\t\t\tdata.transient.updateEnd.forEach(function(d) {\n\t\t\t\tvar angles = scale.circle.new(d);\n\t\t\t\td.startAngle = angles[0];\n\t\t\t\td.endAngle = angles[1];\n\t\t\t});\n\t\t\tdata.transient.exit.forEach(function(d) {\n\t\t\t\tvar angles = scale.circle.old(d);\n\t\t\t\td.startAngle = angles[0];\n\t\t\t\td.endAngle = angles[1];\n\t\t\t});\n\t\t\tdata.transient.enter.forEach(function(d) {\n\t\t\t\tvar angles = scale.circle.new(d);\n\t\t\t\td.startAngle = angles[0];\n\t\t\t\td.endAngle = angles[1];\n\t\t\t});\n\t\t\tdata.transient.changeFrom.forEach(function(d) {\n\t\t\t\tvar angles = scale.circle.old(d);\n\t\t\t\td.startAngle = angles[0];\n\t\t\t\td.endAngle = angles[1];\n\t\t\t});\n\t\t\tdata.transient.changeTo.forEach(function(d) {\n\t\t\t\tvar angles = scale.circle.new(d);\n\t\t\t\td.startAngle = angles[0];\n\t\t\t\td.endAngle = angles[1];\n\t\t\t});\n\t\t}\n\t\tgoChange = data;\n\t\treturn data;\n\t};\n\tthis.goFlux = function(d, scale) {\n\t\tif(!panGroupChanges.empty){\n\t\t\tvar flux = {'change': []};\n\t\t\tvar countPos = d.startAngle;\n\t// Get the incoming genes\n\t\t\tgoChange.transient.changeTo.forEach(function(t, i) {\n\t\t\n\t\t\t\tif (d.class == t.class && d.domain == t.domain && t.size){\n\t\t\t\t\tvar sourceClass = goChange.transient.changeFrom[i].class;\n\t\t\t\t\tvar sourceDomain = goChange.transient.changeFrom[i].domain;\n\t\t\t\t\tvar source = goChange.overall.filter(function(v){\n\t\t\t\t\t\treturn v.class == sourceClass && v.domain == sourceDomain;\n\t\t\t\t\t})[0];\n\t\t\t\t\tif(source){\n\t\t\t\t\t\tsourceAngle = d3.mean([source.startAngle, source.endAngle]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile(!source){\n\t\t\t\t\t\t\tif (sourceClass === 0){\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tsourceClass = +(sourceClass)-1;\n\t\n\t\t\t\t\t\t\tsource = goChange.overall.filter(function(v){\n\t\t\t\t\t\t\t\treturn v.class == sourceClass && v.domain == sourceDomain;\n\t\t\t\t\t\t\t})[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (source){\n\t\t\t\t\t\t\tsourceAngle = source.endAngle;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsourceAngle = scale.circle.new({'domain': sourceDomain, 'start': 0, 'end': 0})[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tvar chord = {\n\t\t\t\t\t\t'size': t.size,\n\t\t\t\t\t\t'from': sourceDomain,\n\t\t\t\t\t\t'source': {\n\t\t\t\t\t\t\t'startAngle': sourceAngle,\n\t\t\t\t\t\t\t'endAngle': sourceAngle\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'target': {\n\t\t\t\t\t\t\t'startAngle': t.startAngle,\n\t\t\t\t\t\t\t'endAngle': t.endAngle\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'class': 'in'\n\t\t\t\t\t};\n\t\t\t\t\tcountPos = countPos < t.endAngle ? t.endAngle : countPos;\n\t\t\t\t\tflux.change.push(chord);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t// Get entering genes\n\t\n\t\t\tenter = goChange.transient.enter.filter(function(t) {\n\t\t\t\treturn t.domain == d.domain && t.class == d.class;\n\t\t\t})[0];\n\t\t\t\n\t\t\tif(enter.size){\n\t\t\t\tflux.enter = clone(enter);\n\t\t\t\tcountPos = countPos < flux.enter.endAngle ? flux.enter.endAngle : countPos;\n\t\t\t}\n\t\n\t// Get the leaving genes\n\t\t\tgoChange.transient.changeFrom.forEach(function(t, i) {\n\t\t\t\n\t\t\t\tif (d.class == t.class && d.domain == t.domain && t.size){\n\t\t\t\t\tvar target = goChange.transient.changeTo.filter(function(v) {\n\t\t\t\t\t\treturn t.key == v.key;\n\t\t\t\t\t})[0];\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tvar chord = {\n\t\t\t\t\t\t'size': target.size,\n\t\t\t\t\t\t'to': target.domain,\n\t\t\t\t\t\t'source': {\n\t\t\t\t\t\t\t'startAngle': countPos,\n\t\t\t\t\t\t\t'endAngle': countPos\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'target': {\n\t\t\t\t\t\t\t'startAngle': target.startAngle,\n\t\t\t\t\t\t\t'endAngle': target.endAngle\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'class': 'out'\n\t\t\t\t\t};\n\t\t\t\t\tflux.change.push(chord);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t// Get exiting genes\n\t\t\texit = goChange.transient.exit.filter(function(t) {\n\t\t\t\treturn t.domain == d.domain && t.class == d.class;\n\t\t\t})[0];\n\t\t\t\n\t\t\tif(exit.size){\n\t\t\t\tflux.exit = clone(exit);\n\t\t\t\tvar mid = d3.mean([d.startAngle, d.endAngle]);\n\t\t\t\tvar diff = flux.exit.endAngle - flux.exit.startAngle;\n\t\t\t\tflux.exit.startAngle = mid - diff/2;\n\t\t\t\tflux.exit.endAngle = mid + diff/2;\n\t\t\t}\n\t\t\t\n\t\t\treturn flux;\n\t\t}\n\t};\n\tthis.strainGO = function(strain) {\n\t\tvar genome = this.fullPan[strain];\n\t\tvar data = this.fullGeneInfo;\n\t\t\n\t\tvar goCount = [];\n\t\tfor (var i = 0; i < this.goMapping.name.length; i++){\n\t\t\tgoCount.push(0);\n\t\t}\n\t\tvar genePos = [];\n\t\tfor (var j = 0; j < this.goMapping.name.length; j++){\n\t\t\tgenePos.push([]);\n\t\t}\n\t\t\n\t\tdata.forEach(function(d, i) {\n\t\t\tif(genome[i]){\n\t\t\t\tgoCount[d.class-1]++;\n\t\t\t\tgenePos[d.class-1].push(d);\n\t\t\t}\n\t\t});\n\t\t\n\t\tgoCount.reverse();\n\t\tgenePos.reverse();\n\t\tvar goPos = goCount.map(function(d,i) {return d3.sum(goCount.slice(0,i))+1;});\n\t\tvar genomeRes = [];\n\t\tgoCount.forEach(function(d, i){\n\t\t\tgenomeRes.push({'size': d, 'start': goPos[i], 'end': goPos[i+1] ? goPos[i+1] : goPos[i]+d, 'genes': genePos[i].sort(geneSort)});\n\t\t});\n\t\tgenomeRes.reverse().forEach(function(d,i) {d.class = i+1;});\n\t\treturn genomeRes;\n\t};\n\tthis.createGeneLink = function(genome, index, barScale, goBarScale){\n\t\tvar sourceX = index == 'a' ? 75 : plotDim.circleDim.width-75;\n\t\tvar targetX = index == 'a' ? plotDim.circleDim.width/2-25 : plotDim.circleDim.width/2+25;\n\t\n\t\tvar links = [];\n\t\t\t\t\n\t\tgenome.forEach(function(d) {\n\t\t\td.genes.forEach(function(g, i) {\n\t\t\t\tif(g.index != -1) {\n\t\t\t\t\tlinks.push({\n\t\t\t\t\t\t'domain': g.domain,\n\t\t\t\t\t\t'class': g.class,\n\t\t\t\t\t\t'source': {\n\t\t\t\t\t\t\t'y': sourceX,\n\t\t\t\t\t\t\t'x': barScale(d.end-i)\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'target': {\n\t\t\t\t\t\t\t'y': targetX,\n\t\t\t\t\t\t\t'x': goBarScale(oldGOpos.filter(function(f) {return f.class == g.class && f.domain == g.domain;})[0].start+g.index, g.domain)\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn links;\n\t};\n\tthis.createGeneLinkBands = function(genome, index, barScale, goBarScale){\n\t\tvar sourceX = index == 'a' ? 75 : plotDim.circleDim.width-75;\n\t\tvar targetX = index == 'a' ? plotDim.circleDim.width/2-25 : plotDim.circleDim.width/2+25;\n\t\t\n\t\tvar dualView = this.strainSelection.a && this.strainSelection.b ? true : false;\n\t\n\t\tvar links = [];\n\t\tvar simLinks = [];\n\t\tfor (i = 0; i < this.goMapping.goTerm.length; i++) {\n\t\t\tlinks.push({Singleton: [], Accessory: [], Core: []});\n\t\t\tsimLinks.push({Singleton: [], Accessory: [], Core: []});\n\t\t}\n\t\t\n\t\t\t\t\n\t\tgenome.forEach(function(d) {\n\t\t\td.genes.forEach(function(g, i) {\n\t\t\t\tif (g.index != -1) {\n\t\t\t\t\tlinks[g.class-1][g.domain].push(g);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\t\n\t\tif (dualView) {\n\t\t\tthis.fullGeneInfo.forEach(function(d, i) {\n\t\t\t\tif (d.index != -1 && this.fullPan[this.strainSelection.a][i] !== 0 && this.fullPan[this.strainSelection.b][i] !== 0) {\n\t\t\t\t\tsimLinks[d.class-1][d.domain].push(d);\n\t\t\t\t}\n\t\t\t}, this);\n\t\t}\n\t\t\n\t\tbands = [];\n\t\tlinks.forEach(function(d, i) {\n\t\t\tvar s = d.Core.length+d.Accessory.length+d.Singleton.length;\n\t\t\tvar a = d.Core.length+d.Accessory.length;\n\t\t\tvar c = d.Core.length;\n\t\t\tif (d.Singleton.length) {\n\t\t\t\tbands.push({\n\t\t\t\t\tdomain: 'Singleton',\n\t\t\t\t\tclass: i+1,\n\t\t\t\t\tsize: d.Singleton.length,\n\t\t\t\t\tgenes: d.Singleton,\n\t\t\t\t\ttype: 'full',\n\t\t\t\t\tsource: {\n\t\t\t\t\t\tx0: sourceX,\n\t\t\t\t\t\tx1: sourceX,\n\t\t\t\t\t\ty0: barScale(genome[i].start+a),\n\t\t\t\t\t\ty1: barScale(genome[i].start+s)\n\t\t\t\t\t},\n\t\t\t\t\ttarget: {\n\t\t\t\t\t\tx0: targetX,\n\t\t\t\t\t\tx1: targetX,\n\t\t\t\t\t\ty0: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Singleton';})[0].end, 'Singleton'),\n\t\t\t\t\t\ty1: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Singleton';})[0].end-d.Singleton.length, 'Singleton')\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (simLinks[i].Singleton.length) {\n\t\t\t\t\tbands.push({\n\t\t\t\t\t\tdomain: 'Singleton',\n\t\t\t\t\t\tclass: i+1,\n\t\t\t\t\t\tsize: d.Singleton.length,\n\t\t\t\t\t\tgenes: d.Singleton,\n\t\t\t\t\t\ttype: 'similar',\n\t\t\t\t\t\tsource: {\n\t\t\t\t\t\t\tx0: sourceX,\n\t\t\t\t\t\t\tx1: sourceX,\n\t\t\t\t\t\t\ty0: barScale(genome[i].start+a),\n\t\t\t\t\t\t\ty1: barScale(genome[i].start+a+simLinks[i].Singleton.length)\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\tx0: targetX,\n\t\t\t\t\t\t\tx1: targetX,\n\t\t\t\t\t\t\ty0: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Singleton';})[0].end, 'Singleton'),\n\t\t\t\t\t\t\ty1: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Singleton';})[0].end-simLinks[i].Singleton.length, 'Singleton')\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (d.Accessory.length) {\n\t\t\t\tbands.push({\n\t\t\t\t\tdomain: 'Accessory',\n\t\t\t\t\tclass: i+1,\n\t\t\t\t\tsize: d.Accessory.length,\n\t\t\t\t\tgenes: d.Accessory,\n\t\t\t\t\ttype: 'full',\n\t\t\t\t\tsource: {\n\t\t\t\t\t\tx0: sourceX,\n\t\t\t\t\t\tx1: sourceX,\n\t\t\t\t\t\ty0: barScale(genome[i].start+c),\n\t\t\t\t\t\ty1: barScale(genome[i].start+a)\n\t\t\t\t\t},\n\t\t\t\t\ttarget: {\n\t\t\t\t\t\tx0: targetX,\n\t\t\t\t\t\tx1: targetX,\n\t\t\t\t\t\ty0: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Accessory';})[0].end, 'Accessory'),\n\t\t\t\t\t\ty1: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Accessory';})[0].end-d.Accessory.length, 'Accessory')\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (simLinks[i].Accessory.length) {\n\t\t\t\t\tbands.push({\n\t\t\t\t\t\tdomain: 'Accessory',\n\t\t\t\t\t\tclass: i+1,\n\t\t\t\t\t\tsize: d.Accessory.length,\n\t\t\t\t\t\tgenes: d.Accessory,\n\t\t\t\t\t\ttype: 'similar',\n\t\t\t\t\t\tsource: {\n\t\t\t\t\t\t\tx0: sourceX,\n\t\t\t\t\t\t\tx1: sourceX,\n\t\t\t\t\t\t\ty0: barScale(genome[i].start+c),\n\t\t\t\t\t\t\ty1: barScale(genome[i].start+c+simLinks[i].Accessory.length)\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\tx0: targetX,\n\t\t\t\t\t\t\tx1: targetX,\n\t\t\t\t\t\t\ty0: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Accessory';})[0].end, 'Accessory'),\n\t\t\t\t\t\t\ty1: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Accessory';})[0].end-simLinks[i].Accessory.length, 'Accessory')\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (d.Core.length) {\n\t\t\t\tbands.push({\n\t\t\t\t\tdomain: 'Core',\n\t\t\t\t\tclass: i+1,\n\t\t\t\t\tsize: d.Core.length,\n\t\t\t\t\tgenes: d.Core,\n\t\t\t\t\ttype: 'full',\n\t\t\t\t\tsource: {\n\t\t\t\t\t\tx0: sourceX,\n\t\t\t\t\t\tx1: sourceX,\n\t\t\t\t\t\ty0: barScale(genome[i].start),\n\t\t\t\t\t\ty1: barScale(genome[i].start+c)\n\t\t\t\t\t},\n\t\t\t\t\ttarget: {\n\t\t\t\t\t\tx0: targetX,\n\t\t\t\t\t\tx1: targetX,\n\t\t\t\t\t\ty0: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Core';})[0].end, 'Core'),\n\t\t\t\t\t\ty1: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Core';})[0].end-c, 'Core')\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (simLinks[i].Core.length) {\n\t\t\t\t\tbands.push({\n\t\t\t\t\t\tdomain: 'Core',\n\t\t\t\t\t\tclass: i+1,\n\t\t\t\t\t\tsize: d.Singleton.length,\n\t\t\t\t\t\tgenes: d.Core,\n\t\t\t\t\t\ttype: 'similar',\n\t\t\t\t\t\tsource: {\n\t\t\t\t\t\t\tx0: sourceX,\n\t\t\t\t\t\t\tx1: sourceX,\n\t\t\t\t\t\t\ty0: barScale(genome[i].start),\n\t\t\t\t\t\t\ty1: barScale(genome[i].start+simLinks[i].Core.length)\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\tx0: targetX,\n\t\t\t\t\t\t\tx1: targetX,\n\t\t\t\t\t\t\ty0: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Core';})[0].end, 'Core'),\n\t\t\t\t\t\t\ty1: goBarScale(oldGOpos.filter(function(f) {return f.class == i+1 && f.domain == 'Core';})[0].end-simLinks[i].Core.length, 'Core')\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn bands;\n\t};\n\tthis.assignTerms = function(GO, domain) {\n\t\tfor(var i in GO) {\n\t\t\tGO[i].genes = [];\n\t\t}\n\t\tvar geneInfo = this.subGeneInfo.length === 0 ? this.fullGeneInfo : this.subGeneInfo;\n\t\t\n\t\tgeneInfo.forEach(function(d) {\n\t\t\tif (d.go) {\n\t\t\t\td.go.forEach(function(go) {\n\t\t\t\t\tif (domain) {\n\t\t\t\t\t\tif (domain == d.domain) {\n\t\t\t\t\t\t\tGO[go].genes.push(d);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else GO[go].genes.push(d);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n}", "function processData(forceData){\n\n //variables for maps and arrays for the nodes and edges of the diagram\n var indexByName = d3.map(),\n nameByIndex = d3.map(),\n nodes = [],\n edges = [],\n sizeMax = 0,\n sizeMin = 0,\n strengthMax = 0,\n strengthMin = 0,\n n = 0;\n\n //find min and max of the sizes in order to scale them to needed size\n forceData.nodes.forEach(function(d) \n {\n if(parseInt(d.size) > sizeMax) sizeMax = parseInt(d.size);\n if(parseInt(d.size) < sizeMin) sizeMin = parseInt(d.size);\n });\n\n //scales the sizes to between 10px and 30px\n var size_scale = d3.scale.linear()\n .domain([sizeMin, sizeMax])\n .range([20, 30]);\n\n //find min and max of the sizes in order to scale them to needed size\n forceData.edges.forEach(function(d) \n {\n if(parseFloat(d.strength) > strengthMax) strengthMax = parseFloat(d.strength);\n if(parseFloat(d.strength) < strengthMin) strengthMin = parseFloat(d.strength);\n });\n\n //scales the sizes to between 10px and 30px\n var strength_scale = d3.scale.linear()\n .domain([strengthMin, strengthMax])\n .range([1, 25]);\n\n //goes through all of the data and makes sure that it is mapped in the maps\n //also puts the source_idea_label and size into the nodes array\n forceData.nodes.forEach(function(d) \n {\n if (!indexByName.has(d.source_idea_id)) \n {\n nameByIndex.set(n, d.source_idea_id);\n nodes.push({name: d.source_idea_id, size: size_scale(parseInt(d.size)), text: d.source_idea_label});\n indexByName.set(d.source_idea_id, n);\n n++;\n }\n });\n\n //loops through the data array and looks up all the edges and puts them into the edges array\n for(var x = 0; x < forceData.edges.length; x++) \n {\n var sourceNode = parseInt(indexByName.get(forceData.edges[x].source_idea_id));\n var targetNode = parseInt(indexByName.get(forceData.edges[x].target_idea_id));\n var linkStrength = parseInt(strength_scale(forceData.edges[x].strength)); \n\n edges.push({source: sourceNode, target: targetNode, strength: linkStrength});\n }\n\n //creates the dataset object that contains the arrays of nodes and edges\n var dataset = { nodes: nodes, edges: edges}; \n\n return dataset;\n\n\n}", "function fillInAnyNewData(taxonName, field, idx, tP) { // console.log(\"fillInAnyNewData aclled for \", taxonName); \n if ( tP.fieldAry.indexOf(field) === tP.fieldAry.length - 1 ) { return; } //console.log(\"last field in set\"); \n if (tP.fieldAry[0] === field) { fillNullGenus() } //If species...\n var existingParentId = tP.taxaObjs[taxonName].parent;\n var newParentId = linkparentTaxonId(idx, tP);\n\n if ( newParentId !== existingParentId ) {\n checkIfTreesMerge(taxonName, newParentId, existingParentId, tP); \n }\n // If Genus is null, set genus as the first word of the species string.\n function fillNullGenus() {\n if (tP.recrd[tP.fieldAry[1]] === null) { \n tP.recrd[tP.fieldAry[1]] = tP.genusParent; }\n }\n }", "function calcMetaData(data,params,metaData)\n{\n for(var i=0; i < metaData.length; i++) {\n//\tconsole.log(\"Processing: \" + metaData[i].name);\n//\tconsole.log(metaData[i]);\n\tdata[metaData[i].name] = calcMetaDataField(data,params,metaData[i]);\n \n }\n\n return(data);\n}", "mate(gene) {\n\n var pivot = Math.round(this.code.length/2) - 1;\n\n // new children will take half of each gene\n var newChild_1 = this.code.substr(0, pivot) + gene.code.substr(pivot);\n var newChild_2 = gene.code.substr(0, pivot) + this.code.substr(pivot);\n\n return [new Gene(newChild_1), new Gene(newChild_2)];\n }", "function search_genomes (search_term) {\n\tcoge.services.search_genomes(search_term, { fast: true })\n\t\t.done(function(result) { // success\n\t\t\tif (result && result.genomes) {\n\t\t\t\tvar transformed = result.genomes.map(function(obj) {\n\t\t\t\t\tvar label = obj.info.replace(/&reg;/g, \"\\u00ae\"); // (R) symbol\n\t\t\t\t\treturn { label: label, value: obj.id };\n\t\t\t\t});\n\t\t\t\tif (focus == 'x') {\n\t\t\t\t\t$('#edit_xgenome')\n\t\t\t\t\t\t.autocomplete({source: transformed})\n\t\t\t\t\t\t.autocomplete(\"search\");\n\t\t\t\t} else if (focus == 'y') {\n\t\t\t\t\t$('#edit_ygenome')\n\t\t\t\t\t\t.autocomplete({source: transformed})\n\t\t\t\t\t\t.autocomplete(\"search\");\n\t\t\t\t} else if (focus == 'z') {\n\t\t\t\t\t$('#edit_zgenome')\n\t\t\t\t\t\t.autocomplete({source: transformed})\n\t\t\t\t\t\t.autocomplete(\"search\");\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t})\n\t\t.fail(function() { // error\n\t\t\t//TODO\n\t\t});\n}", "function dataLoaded (err, rents, boston, eastie) { //create a function with variable error, rent data, and geojson\n\n //get only 2017 data for 1 bedroom and 3 bedrooms\n\n const subset2017 = rents.filter(function(d){ //filters only 2017 data\n return d.year == 2017;\n });\n\n\n const oneBedroom2017 = subset2017.filter(function(d){ //filters 2017 data with 1 bedroom\n return d.no_bedrooms == 1;\n });\n\n\n const threeBedroom2017 = subset2017.filter(function(d){ //filters 2017 data with 3 bedroom\n return d.no_bedrooms == 3;\n });\n\n\n //boston basemap\n\n map.map.append(\"g\") // append a new g element\n .attr('class','baseMap') // give it a class of basemap\n .attr('transform','translate(-75,3100)') // translate it relative to ?\n // console.log(boston.features);\n .selectAll('.base') // select the .base class\n .data(boston.features) // bind the geojson features\n .enter() // enter the data\n .append('path') // append a path\n .attr('class','base') // give it a class of base\n .attr('d',path); // give it a d attribute which is populated with the mercator projection\n\n //east boston basemap\n map.map.append('g')\n .attr('class','censusMap')\n .attr('transform','translate(-75,3100)')\n\t .selectAll('.censusTract')\n\t .data(eastie.features)\n\t .enter()\n\t .append('path')\n\t .attr('class','censusTract')\n\t .attr('d',path)\n\t\t // .style('fill',function(d){\n\t\t // \t var incomeMapping = dataMapping.get(d.properties.geoid).median_household_income\n\t\t // \t //var raceMapping = dataMapping.get(d.properties.geoid).percentage_hispanic_latino\n // return scaleColorIncome(incomeMapping);\n\t\t // })\n\t\t .style('stroke-width','1.5px')\n\t\t .style('stroke','white')\n\t\t .style('opacity',0.85)\n .style('fill', 'white');\n\n // points layer\n\n map.points = map.map\n .append(\"g\")\n .attr('transform','translate(-75,3100)')\n .attr(\"id\", \"points\");\n\n //\n // var tpoints = map.points\n // .selectAll(\"circle\")\n // .data(rents.filter(function(d) {\n // return (d.year == 2013 || d.year == 2017) && (d.no_bedrooms == 1 || d.no_bedrooms == 3);\n // }))\n // .enter()\n // .append(\"circle\")\n // .attr(\"cx\", function(d){\n // return projection([d.long, d.lat])[0];\n // })\n // .attr(\"cy\", function(d){\n // return projection([d.long, d.lat])[1];\n // })\n // .attr(\"r\",3)\n // .attr(\"fill\",function(d) {\n // if(d.no_bedrooms == 1) {\n // return \"green\";\n // } else if(d.no_bedrooms == 3) {\n // return \"blue\";\n // }\n //\n // });\n\n var points1br = map.points\n .selectAll(\".circle1br\")\n .data(oneBedroom2017)\n .enter()\n .append(\"circle\")\n .attr(\"class\",\"circle1br\")\n .attr(\"cx\", function(d){\n return projection([d.long, d.lat])[0];\n })\n .attr(\"cy\", function(d){\n return projection([d.long, d.lat])[1];\n })\n .attr(\"r\",3)\n .attr(\"fill\",\"#aad356\");\n\n\n var points3br = map.points\n .selectAll(\".circle3br\")\n .data(threeBedroom2017)\n .enter()\n .append(\"circle\")\n .attr(\"class\",\"circle3br\")\n .attr(\"cx\", function(d){\n return projection([d.long, d.lat])[0];\n })\n .attr(\"cy\", function(d){\n return projection([d.long, d.lat])[1];\n })\n .attr(\"r\",3)\n .attr(\"fill\",\"#189aa8\");\n\n\n\n\n//get the current value of the slider\n\n\n//change opacity with slider\n\n\n\n\n\n\n\n\n\n\n\n // rents.forEach((d) => { // for each data point, loop through\n // console.log(d.lat);\n // \t var xy = projection([d.long, d.lat]); //create a variable xy that creates two values based on the mercator projection output of the longitude and latitude of each point\n // console.log(xy); //console.log these values to see what they are\n // \t var x = xy[0]; //put mercatored longitude values in x variable\n // \t var y = xy[1]; //put mercatored latitude values in y variable\n // // y = map.height/2;\n // map.points.append(\"circle\") // append a circle to the points g element\n // .attr(\"cx\",function (d){\n // return projection([d.long, d.lat])[0];\n // }) // cx position is mercatored longitude\n // .attr(\"cy\",y) // cy position is mercatored latitude\n // .attr(\"r\",3) // radius of 3\n // .attr(\"fill\",\"red\"); // color of red\n // \t});\n\n }", "function processData(data){\n for (var i=0; i<data.objects.length; i++){\n var link = $('<a href=\"#'+data.objects[i].name+'\"></a>');\n var img = $('<img src=\"http://toloshny.com/pokeimg/'+getNormalizedNumber(data.objects[i].pkdx_id)+'.png\" class=\"pokepic\">');\n var poceblock = $('<div class=\"col-sm-4 col-xs-12 col-md-3 pokenames text-center\"></div>');\n var poceblocktext = $('<br><span class=\"poke-name\">'+data.objects[i].name+'</span><br><span class=\"types\">'+getPoceTypesWithStyling(data.objects[i])+'</span>');\n pokeAll.objects.push(data.objects[i]);\n //console.log(pokeAll);\n var type1 = data.objects[i].types[0].name;\n var type2=\"\";\n if (typeof data.objects[i].types[1] !== 'undefined') {\n // the variable is defined\n var type2 = data.objects[i].types[1].name;\n }\n\n // Now that's what i call monkey-code. But it's the best solution i've got. \n // Basicly it's filling filter-objects with data asssosiated with those pokemon types.\n // I know i know, 2x memory (or even more, object itself consumes memory) just for the filters. \n fillFilterObjects(type1, data.objects[i]);\n fillFilterObjects(type2, data.objects[i]);\n\n link.append(img); \n link.click((function(e){\n var poceObject = data.objects[i];\n // console.log(pokeFire);\n return function() {\n var img = '<img src=\"http://toloshny.com/pokeimg/'+getNormalizedNumber(poceObject.pkdx_id)+'.png\" class=\"poce-details-image\">';\n var pokedetails = $('<div class=\"\">'+img+'<br><span class=\"bold align-left\">'+poceObject.name+' </span><span class=\"bold align-right\">#'+getNormalizedNumber(poceObject.pkdx_id)+'</span><div class=\"clearifx\"><br><span class=\"align-left\">Type:</span><span class=\"align-right\">'+getPoceTypes(poceObject)+\n '</span><br><span class=\"align-left\">Attack: </span><span class=\"align-right\">'+poceObject.attack+'</span><div class=\"clearifx\"><br><span class=\"align-left\">Defence:</span><span class=\"align-right\">'+poceObject.defense+'</span><div class=\"clearifx\"><br><span class=\"align-left\">Health: </span><span class=\"align-right\">'+poceObject.hp+'</span><br><div class=\"clearfix\"></div><span class=\"align-left\">SP Attack:</span><span class=\"align-right\">'+poceObject.sp_atk+'</span><br><div class=\"clearfix\"></div><span class=\"align-left\">SP Defense:</span> <span class=\"align-right\">'+poceObject.sp_def+'</span><br><div class=\"clearifx\"></div><span class=\"align-left\">Speed: </span><span class=\"align-right\">'+poceObject.speed+'</span><br><div class=\"clearfix\"></div><span class=\"align-left\">Weight:</span> <span class=\"align-right\">'+poceObject.weight+'</span><br><div class=\"clearfix\"></div><span class=\"align-left\">Total moves:</span> <span class=\"align-right\">'+poceObject.moves.length+'</span><br><div class=\"clearfix\"></div></div>');\n $('.pokedetails').hide().html(pokedetails).addClass('pokedetails-border').fadeIn(300);\n return false;\n }\n })());\n\n poceblock.append(link);\n poceblock.append(poceblocktext);\n poceElement.append(poceblock.hide().fadeIn(100));\n\n $('.loadmore-btn').fadeIn(400);\n }\n}", "saveMetaData (name, rows) {\n // console.debug(`meta: ${name}, \\t\\tcount: ${rows ? rows.length : 0}`)\n\n // save to a map\n this.dataInArray.set(name, rows) // TODO: meta saved two copys !!!\n let tmp = new Map() // temp map to save the rows\n let cardList = CARD_TYPES.includes(name) ? new Map() : null\n let maxID = 0\n if (rows) {\n let def = this.defs && this.defs[name]\n let keyName = def ? def.fields.names[def.keyIndex] : name + '_id'\n keyName = this.dealSpecialId(keyName, name)\n for (let item of rows) {\n // save to data\n let keyValue = item[keyName]\n if (name !== 'staff_extend' && name !== 'vehicle_extend') {\n let spy = item['name'] ? xdata.spell.makePy(item['name']) : ''\n spy = spy ? spy[0] : ''\n item['spy'] = spy\n }\n\n if (name === 'setting' && keyValue === 15) {\n let shiftData = new Map()\n shiftData.set(keyValue, item)\n this.data[SHIFTTABLENAME] = shiftData\n continue\n }\n\n tmp.set(keyValue, item)\n\n // is card, save to cardIndex\n if (cardList) {\n let cardID = item['card_id']\n cardList.set(cardID, item)\n this.cardIndex.set(cardID, item)\n }\n\n // init the maxID\n if (keyValue > maxID) {\n maxID = keyValue\n }\n }\n }\n\n this.data[name] = tmp\n this.maxIDs[name] = maxID\n\n // if (['reader', 'traffic', 'speaker', 'turnout'].includes(name)) {\n // xbus.trigger('DEVICE-INFO-UPDATED') // tell others to update the device info\n // }\n\n if (name === 'dept') {\n this.getMaxHMDeptID(rows)\n }\n\n if (cardList) {\n xbus.trigger('CARD-INFO-UPDATE', {\n type: name,\n data: cardList\n })\n }\n\n this.broadcastMetaUpdate(name, maxID, rows)\n }", "function US12(fileName) {\n var data = parseGedcom(fileName);\n var individualData = data.individualData;\n var familyData = data.familyData;\n var noError = true;\n\n for (let line = 0; line < data.length; line++) {\n var lineData = data[line].split(\" \");\n if (lineData[1] === \"HUSB\") {\n var husband = lineData[2];\n var wife = data[line + 1].split(\" \")[2];\n for (let counter = line + 1; counter < data.length; counter++) {\n var familyLineData = data[counter].split(\" \");\n if (familyLineData[2] === \"FAM\") {\n break;\n }\n\n for (let lineLoop = 0; lineLoop < data.length; lineLoop++) {\n var lineData = data[lineLoop].split(\" \");\n\n if (lineData[1] === husband) {\n for (\n let counterLoop = lineLoop + 1;\n counterLoop < data.length;\n counterLoop++\n ) {\n var nameLineData = data[counterLoop].split(\" \");\n\n if (nameLineData[1] === \"BIRT\") {\n husbandBirthday = data[counterLoop + 1]\n .split(\" \")\n .slice(2, data[counterLoop + 1].length)\n .join(\" \");\n break;\n }\n }\n }\n }\n\n for (let lineLoop = 0; lineLoop < data.length; lineLoop++) {\n var lineData = data[lineLoop].split(\" \");\n\n if (lineData[1] === wife) {\n for (\n let counterLoop = lineLoop + 1;\n counterLoop < data.length;\n counterLoop++\n ) {\n var nameLineData = data[counterLoop].split(\" \");\n\n if (nameLineData[1] === \"BIRT\") {\n wifeBirthday = data[counterLoop + 1]\n .split(\" \")\n .slice(2, data[counterLoop + 1].length)\n .join(\" \");\n break;\n }\n }\n }\n }\n\n if (familyLineData[1] === \"CHIL\") {\n var child = familyLineData[2];\n\n for (let lineLoop = 0; lineLoop < data.length; lineLoop++) {\n var lineData = data[lineLoop].split(\" \");\n\n if (lineData[1] === child) {\n for (\n let counterLoop = lineLoop + 1;\n counterLoop < data.length;\n counterLoop++\n ) {\n var nameLineData = data[counterLoop].split(\" \");\n\n if (nameLineData[1] === \"BIRT\") {\n childBirthday = data[counterLoop + 1]\n .split(\" \")\n .slice(2, data[counterLoop + 1].length)\n .join(\" \");\n break;\n }\n }\n }\n }\n\n var childDate = new Date(Date.parse(childBirthday));\n var husbandDate = new Date(Date.parse(husbandBirthday));\n var wifeDate = new Date(Date.parse(wifeBirthday));\n\n var currDate = new Date();\n\n var childAge = Math.floor(\n (currDate.getTime() - childDate.getTime()) / 31557600000\n );\n var husbandAge = Math.floor(\n (currDate.getTime() - husbandDate.getTime()) / 31557600000\n );\n var wifeAge = Math.floor(\n (currDate.getTime() - wifeDate.getTime()) / 31557600000\n );\n\n var famOneIncrement;\n if (data[line - 3].split(\" \")[2] === \"FAM\") {\n famOneIncrement = 3;\n } else {\n famOneIncrement = 5;\n }\n\n if (wifeAge - childAge >= 60) {\n errors.push(\n `ERROR: FAMILY: US12: ${data[line - famOneIncrement]\n .split(\" \")[1]\n .replace(/[@]/g, \"\")}: Age of Mother ${wife.replace(\n /[@]/g,\n \"\"\n )} should be less than 60 years older than her children.`\n );\n noError = false;\n }\n\n if (husbandAge - childAge >= 80) {\n errors.push(\n `ERROR: FAMILY: US12: ${data[line - famOneIncrement]\n .split(\" \")[1]\n .replace(/[@]/g, \"\")}: Age of Father ${husband.replace(\n /[@]/g,\n \"\"\n )} should be less than 80 years older than his children.`\n );\n noError = false;\n }\n\n // console.log(\n // `Child ${child} age: ${childAge} of Father ${husband} Age: ${husbandAge} & Mother ${wife} Age: ${wifeAge}`\n // );\n }\n }\n }\n }\n return noError;\n}", "processData() {\n for (const item of this.unprocessedData) {\n this.addToData(buildOrInfer(item));\n }\n this.unprocessedData.clear();\n }", "function computeIngredientMasses() {\n // Loads JSON object\n let ingredients = require('../data/ingredients_table.json');\n let nutrition = require('../data/nutrition.json');\n\n let numIngredients = ingredients.length\n let iter = 0;\n let num_found = 0;\n let num_not_found = 0;\n let ingredients_table_filled = []\n for (let ingredient of ingredients) {\n let found_mass = false;\n if (!(ingredient[\"nutrition_id\"]\n && ingredient[\"amount\"]\n && ingredient[\"unit\"])) {\n ingredient[\"mass\"] = 100;\n } else {\n let nutrition_obj = nutrition.find((obj) => {\n return obj[\"id\"] == ingredient[\"nutrition_id\"];\n });\n\n let mass = 100;\n let gmwt1_res = nutrition_obj[\"gmwt1desc\"].match(/((?:\\d+ )?\\d+(?:\\/\\d+)?)\\ (cups?|teaspoons?|tablespoons?|pounds?|ounces? )?(.*)/i);\n if (gmwt1_res) {\n let nutrition_amount = parseInt(gmwt1_res[1]);\n let nutrition_unit = gmwt1_res[2];\n if (nutrition_amount != undefined\n && nutrition_unit != undefined\n && unitsEquals(ingredient[\"unit\"], nutrition_unit)) {\n mass = ingredient[\"amount\"] / nutrition_amount * nutrition_obj[\"gmwt1\"];\n found_mass = true;\n }\n }\n if (!found_mass) {\n let gmwt2_res = nutrition_obj[\"gmwt2desc\"].match(/((?:\\d+ )?\\d+(?:\\/\\d+)?)\\ (cups?|teaspoons?|tablespoons?|pounds?|ounces? )?(.*)/i);\n if (gmwt2_res) {\n let nutrition_amount = parseInt(gmwt2_res[1]);\n let nutrition_unit = gmwt2_res[2];\n if (nutrition_amount != undefined\n && nutrition_unit != undefined\n && unitsEquals(ingredient[\"unit\"], nutrition_unit)) {\n mass = ingredient[\"amount\"] / nutrition_amount * nutrition_obj[\"gmwt2\"];\n found_mass = true;\n }\n }\n }\n if (!found_mass && nutrition_obj[\"gmwt1\"]) {\n mass = nutrition_obj[\"gmwt1\"];\n }\n ingredient[\"mass\"] = mass;\n }\n ingredients_table_filled.push(ingredient);\n\n // potentially useful information\n if (found_mass) { num_found++; }\n else { num_not_found++; }\n if (iter % 2000 == 0) {\n console.log(iter + \" of \" + numIngredients);\n }\n iter++;\n }\n console.log(\"num matched: \" + num_found);\n console.log(\"num not matched: \" + num_not_found);\n let json = JSON.stringify(ingredients_table_filled, null, 2);\n fs.writeFile('../data/ingredients_table_filled.json', json, 'utf8');\n}", "function parseBands(content, taxid, chromosomes) {\n var delimiter, tsvLines, columns, chr, i, init, source,\n lines = {};\n\n if (content.slice(0, 15) === 'window.chrBands') source = 'native';\n \n chromosomes = updateChromosomes(chromosomes);\n\n [delimiter, tsvLines, init] = getDelimiterTsvLinesAndInit(source, content);\n\n for (i = init; i < tsvLines.length; i++) {\n columns = tsvLines[i].split(delimiter);\n\n chr = columns[0];\n\n if (\n typeof (chromosomes) !== 'undefined' &&\n chromosomes.indexOf(chr) === -1\n ) {\n // If a specific set of chromosomes has been requested, and\n // the current chromosome\n continue;\n }\n\n lines = updateLines(lines, columns, taxid);\n }\n\n return lines;\n}", "createReactorFromGenome(genome) {\n for (var x = 0; x < this.nCols; x++) {\n for (var y = 0; y < this.nRows; y++) {\n this.grid[x][y] = new TILE_MAP[genome.grid[x][y]](x, y, this);\n }\n }\n\n this.fillEdges(this.grid);\n }", "function makeMap(MHzbyCounty) {\n var width = 640,\n height = 400;\n\n var FIPS;\n\n var quantize = d3.scale.quantize()\n .domain([0, maxSpectrumValue])\n .range(d3.range(9).map(function(i) { return \"q\" + i + \"-9\"; }));\n\n var projection = d3.geo.albersUsa()\n .scale(640)\n .translate([width / 2, height / 2]);\n\n var path = d3.geo.path()\n .projection(projection);\n\n var svg = d3.select(\"#map\").append(\"svg\")\n .attr(\"width\", width)\n .attr(\"height\", height)\n\n queue()\n .defer(d3.json, \"us.json\")\n .defer(d3.json, \"FIPS.json\")\n .await(ready);\n\n function toolTip(n, d){ /* function to create html content string in tooltip div. */\n return \"<h4>\"+n.name.cname + ', ' + n.name.state +\"</h4><table>\" \n + \"<tr><td>MHz</td><td>\"+(d)+\"</td></tr>\"\n + \"<tr><td>Population</td><td>\" + numberWithCommas(n.population) + \"</td></tr>\"\n + \"</table>\";\n }\n\n function mouseOver(d) {\n d3.select(\"#tooltip\").transition().duration(200).style(\"opacity\", .9);\n\n d3.select(\"#tooltip\").html(toolTip(FIPS[d.id], MHzbyCounty[d.id] || 'None')) \n .style(\"left\", (d3.event.pageX - $(\"#carriers_list\").width()) + \"px\") \n .style(\"top\", (d3.event.pageY - 28) + \"px\");\n }\n\n function mouseOut() {\n d3.select(\"#tooltip\").transition().duration(500).style(\"opacity\", 0);\n }\n\n\n\n function ready(error, us, f) {\n if(error) console.error(error)\n\n FIPS = f\n\n svg.append(\"g\")\n .attr(\"class\", \"counties\")\n .selectAll(\"path\")\n .data(topojson.feature(us, us.objects.counties).features)\n .enter().append(\"path\")\n .attr(\"class\", function(d) { \n return quantize(MHzbyCounty[d.id] || 0); \n })\n .attr(\"d\", path)\n\n .on(\"mouseover\", mouseOver)\n .on(\"mouseout\", mouseOut)\n\n svg.append(\"path\")\n .datum(topojson.mesh(us, us.objects.states, function(a, b) { return a !== b; }))\n .attr(\"class\", \"states\")\n .attr(\"d\", path);\n\n mixpanel.track(\"Loaded map\");\n\n }\n\n d3.select(\"#map\").style(\"height\", height + \"px\");\n\n d3.select(\"#map\").selectAll(\"path\")\n \n // make legend\n\n // var legend = d3.select('#legend')\n // .append('ul')\n // .attr('class', 'list-inline');\n\n // var keys = legend.selectAll('li.key')\n // .data(quantize.range());\n\n\n // keys.enter().append('li')\n // .attr('class', 'key')\n // .style('border-top-color', String)\n // .text(function(d) {\n // var r = quantize.range().invertExtent(d);\n // return r[0];\n // });\n\n\n}", "function displaySmallMaps(genres) {\n let maxRatio = 0;\n let minRatio = 1;\n paths_.forEach(function (paths, map_index) {\n if (document.getElementById(\"select_genre_\" + (map_index+1)).value !== \"Genre Musical\") {\n paths.forEach(function (path) {\n const id = path.id;\n let region = id.substring(0, id.length - 2)\n let callback = getRegion(region);\n dataP_severalRegion.then(callback).then(function (csv) {\n let totalPopReg = csv.length;\n let genrePopulation = getGenre(genres[map_index])(csv).length;\n let ratio = genrePopulation / totalPopReg;\n\n if (ratio > maxRatio) {\n maxRatio = ratio;\n }\n if (ratio < minRatio) {\n minRatio = ratio;\n }\n })\n\n })\n } else {\n paths.forEach(function (path){\n path.innerHTML=\"\";\n })\n }\n })\n\n\n\n let max_ratio_reg = 0;\n paths_.forEach(function (paths, map_index){\n if (document.getElementById(\"select_genre_\" + (map_index+1)).value !== \"Genre Musical\") {\n paths.forEach(function (path, index) {\n const id = path.id;\n let region = id.substring(0,id.length - 2);\n let callback = getRegion(region);\n dataP_severalRegion.then(callback).then(function (csv_reg) {\n let totalPopReg = csv_reg.length;\n let genrePopulation = getGenre(genres[map_index])(csv_reg).length;\n let ratio = genrePopulation / totalPopReg;\n\n\n document.getElementById(id).innerHTML='<title>' + (Math.round(ratio*1000))/10 + '%</title>';\n\n ratio = ratio - minRatio;\n ratio = ratio / (maxRatio - minRatio);\n\n document.getElementById(id).style.fill = getD3Color(ratio);\n\n //Legend (done after last region, i.e. index=11\n if (index === 11) {\n\n let legeng_size = 7;\n\n let values_percent = makeArr(minRatio * 100, maxRatio * 100, legeng_size, true).reverse()\n .map(function (arg, index) {\n if (index == 0 || index == legeng_size - 1 || index == Math.round((legeng_size - 1) / 2)) {\n return arg + \" %\";\n } else {\n return \" \".repeat(index);\n }\n });\n\n let values = makeArr(minRatio, maxRatio, legeng_size, false).reverse();\n let colors = values.map(function (ratio_) {\n ratio = ratio_ - minRatio;\n ratio = ratio / (maxRatio - minRatio);\n return getD3Color(ratio);\n });\n\n var ordinal = d3.scaleOrdinal()\n .domain(values_percent)\n .range(colors);\n\n var svg = d3.select(\"#map_legend_sev_svg\");\n\n svg.append(\"g\")\n .attr(\"class\", \"legendLinear\")\n .attr(\"transform\", \"translate(20,20)\");\n\n var legendLinear = d3.legendColor()\n .scale(ordinal)\n .title(\"Pourcentage d'écoute\");\n\n svg.select(\".legendLinear\")\n .call(legendLinear);\n\n\n /*\n //find labels (balise text, class label) and change font in css\n\n let map_legend_svg = document.querySelector('#map_legend_svg');\n let labels = map_legend_svg.querySelectorAll('text.label');\n labels.forEach(function (label) {\n\n })\n */\n }\n })\n })\n } else{\n paths.forEach(function (path, index) {\n const id = path.id;\n document.getElementById(id).style.fill = '#cbcbcb';\n });\n }\n })\n\n}", "async function saveSpecies() \n{\n const testSpecies = [\n {\n name: 'Feline',\n type: 'Mammal',\n extinct: false,\n },\n {\n name: 'Bear',\n type: 'Mammal',\n extinct: false,\n },\n ];\n await Promise.all(\n testSpecies.map(async (species) => {\n await request(app).post('/api/species').send(species);\n })\n );\n}", "function afterFireProcessing() {\r\n var praefix = Fire.id;\r\n // save the form of the fire in ascii format, txt extension\r\n // save a file for each fire\r\n Fire.gridToFile('spread', 'output/fire/spread' + praefix + '.txt');\r\n // Fire.gridToFile('basalarea', 'output/fire/basalarea' + praefix + '.txt');\r\n // Fire.gridToFile('crownkill', 'output/fire/ck' + praefix + '.txt');\r\n // Fire.grid('KBDI').save('output/fire/kbdi' + praefix + '.txt');\r\n Fire.grid('fuel').save('output/fire/fuel' + praefix + '.txt');\r\n Fire.grid('combustibleFuel').save('output/fire/combustibleFuel' + praefix + '.txt');\r\n Fire.grid('nFire').save('output/fire/nfire.txt')\r\n\r\n}", "function generateSpecies(numberOfSpecies){\n\t\t$('#tableContent').html(\"\");\n\t\t//for loop that will run for the number that comes from the drop down list\n\t\tfor(var i=1; i <= numberOfSpecies; i++){\n\t\t\t$.get(\"http://swapi.co/api/species/\"+i+\"/\", {//gets the specific specie\n\t\t\t}).done(function(specie) {\t\n\t\t\t\tdrawTableSpecies(specie);//draws the row of info\n\t\t\t}).fail(function() {\n\t\t\t\terrorMessagePullingDataFromAPI();\n\t\t\t\t// console.log('something went wrong in the ajaxForSpecies()!');\n\t\t\t});\n\t\t}\n\t\tinfoSpecies=\"\";\n\t}", "function getBiomes() {\n //Connect the translations to the biome_metadata\n var data = _translationsBiome__WEBPACK_IMPORTED_MODULE_7__[\"default\"][language]['categories'];\n biome_metadata.forEach(function (d) {\n d.label = data[data.map(function (b) {\n return b.id;\n }).indexOf(d.id)].label;\n }); //Get the biomes\n\n biomes = nodes.filter(function (d) {\n return d.group === 'biome';\n }); //9 biomes\n\n biomes.forEach(function (d) {\n d.meta = biome_metadata[biome_ids.indexOf(d.id)];\n d.title = d.meta.label;\n d.count = 0;\n biome_by_id[d.id] = d; //Load the icon\n\n d.img = new Image();\n d.img_loaded = false; //Load the SVG and then turn its fill color into the right one\n\n d3__WEBPACK_IMPORTED_MODULE_6__[\"xml\"]('/static/icons/' + d.meta.file).then(function (xml) {\n var imported_svg = new XMLSerializer().serializeToString(xml.documentElement);\n var svg_recolor = imported_svg.replace('#000000', d.meta.color).replace(/#/g, '%23');\n d.img.src = 'data:image/svg+xml;charset=utf-8,' + svg_recolor;\n }); //d3.xml\n\n d.img.onload = function () {\n d.img_loaded = true; //Draw the image if the radius of the biome is known\n\n if (d.r) {\n var radius = d.r - d.stroke_width * 1.5;\n drawImage(ctx_nodes, d, d.r * 0.7, radius);\n } //if\n\n }; //onload\n\n }); //forEach\n //Sort them by the id defined above\n\n biomes = biomes.sort(function (a, b) {\n return biome_ids.indexOf(a.id) - biome_ids.indexOf(b.id);\n }); // console.log(biomes)\n } //function getBiomes", "makeRegDataMap() {\n /** This is the region name to value map that is referenced when fill colors are being selected for a region during draw(). The region names are the keys and the numeric data of the fill column becomes the values */\n this.regNameToValueMap = {}\n // drawregions without fill if nothing selected yet\n // check if there's a regionname column in the csv data, use that instead, this is typically specific to the data from the hcp atlas \n let regionKey\n if (this.paneOb.csvData[\"regionname\"]) {\n regionKey = \"regionname\"\n } else {\n regionKey = \"region\"\n }\n if (this.fillData == undefined) {\n this.paneOb.csvData[regionKey].map((e, i) => {\n this.regNameToValueMap[e.replace(/\\s/, \"\")] = NaN\n })\n } else {\n this.paneOb.csvData[regionKey].map((e, i) => {\n let name = e.replace(/\\s/, \"\")\n // help determine if there's multiple rows with this region's data\n if (this.regNameToValueMap[name]) {\n // reset the region rois for the multiples\n if (this.paneOb.rois[name]) {\n if (/[\\s\\S]Multiple/.exec(this.paneOb.rois[name])) {\n delete this.paneOb.rois[name]\n }\n }\n // prev value mult by the prev count + new div count +1 == rolling ave\n let prev = this.regNameToValueMap[name]\n if (!isNaN(prev.value) && !isNaN(this.fillData[i])) {\n this.regNameToValueMap[name] = { value: (prev.value * prev.count + this.fillData[i]) / (prev.count + 1), count: prev.count + 1 }\n // make a note that there is a row with multiple entries in the current slice\n this.paneOb.rois[name] = `\n <h3>Selected Region\n <p class=\"tooltip-child\" id=\"regionname\">\n ${ name}\n </p>\n <p class=\"tooltip-child\">\n <p>Multiple CSV row entries for region</p>\n <p>Utilize Filters to view separately</p>\n <p>average value: ${this.regNameToValueMap[name].value.toFixed(3)}\n </h3>\n `\n }\n } else {\n if (!isNaN(this.fillData[i])) {\n this.regNameToValueMap[name] = { value: this.fillData[i], count: 1 }\n }\n }\n })\n }\n /**This attribute enables simple tools to access the filtered data being used for coloring the region so that it may be plotted\n * @alias dataForPlot\n * @memberof Pane\n * @instance\n */\n this.paneOb.dataForPlot = Object.entries(this.regNameToValueMap).reduce((prev, [k, v]) => {\n prev[k] = v.value\n return prev\n }, {})\n }", "_prepareIlluminationData(itemData, actorData) {\n const data = itemData.data;\n }", "function file_csv(fileN) {\n\n// 3 declerations for array acccess\n var data_age;\n var data_state;\n var edu_data;\n\n// reading the file and making it capable for transactions / operations \n fs.readFileSync(fileN).toString().split('\\n').forEach(function (line_value, index_value) {\n var field = line_value.split(',');\n if (index_value === 0) {\n title = field;\n }\n if(line_value !== '' && index_value !== 0) {\n\n//1. Age-wise population distribution in terms of literate population\n if (field[4] === 'Total' && field[5] !== 'All ages' && field[5] !== '0-6') {\n var literate_population = parseInt(field[12]);\n if (field[5] in age_wise_data)\n {\n data_age = field[5];\n age_wise_data[data_age].total_literate = age_wise_data[data_age].total_literate + literate_population;\n }\n else{\n data_age = field[5];\n age_wise_data[data_age] = {\n age_group: data_age,\n total_literate: literate_population\n };\n }\n }\n\n //2. Graduate Population of India - State-wise & Gender-wise. \n if(field[4] === 'Total' && field[5] === 'All ages') {\n var male_population = parseInt(field[40]);\n var female_population = parseInt(field[41]);\n if (field[3] in state_gender_data) {\n data_state = field[3];\n state_gender_data[data_state].population_male = state_gender_data[data_state].population_male + male_population;\n state_gender_data[data_state].population_female = state_gender_data[data_state].population_female + female_population;\n }\n else{\n data_state = field[3].trim().match(/^State\\s+-\\s+(.*)$/i); \n//regexp is implemented so as to read entire title including white spaces\n data_state = data_state[1];\n state_gender_data[data_state] = {\n state: data_state,\n population_male: male_population,\n population_female: female_population\n };\n }\n }\n\n//3. Education Category wise - all India data combined together\n for(var limit = 15; limit <= 43; limit = limit + 3) {\n var edu_array = title[limit].trim().match(/^Educational level\\s+-\\s+(.*[^\\\\*])\\s+-\\s+\\w*$/i);\n edu_data = edu_array[1];\n if(edu_data in edu_category)\n {\n edu_category[edu_data].total = edu_category[edu_data].total +\n parseInt(field[limit]);\n }\n else {\n edu_category[edu_data] = {\n level_of_edu: edu_data,\n total: parseInt(field[limit])\n };\n }\n }\n }\n });\n }", "function convert_all_meta_inputs() {\n var proj_inputs = convert_proj_meta_inputs(proj_form);\n\n for (var cat in proj_inputs) {\n proj[cat] = proj_inputs[cat];\n }\n\n for (var id in sample_forms) {\n var sample_form = sample_forms[id];\n var sample_inputs = convert_sample_meta_inputs(sample_form);\n\n for (var cat in sample_inputs) {\n proj.samples[id][cat] = sample_inputs[cat];\n }\n }\n}", "function preprocess(dataset_list) {\n var dataset_dict = {};\n var organism_list = [];\n var alphabet_list = [];\n var dataset_list_count = dataset_list.length;\n for (var i = 0; i < dataset_list_count; i++) {\n var entry = dataset_list[i];\n var data_type = entry[0];\n var alphabet = entry[1];\n var file_name = entry[2];\n var organism_name = entry[3];\n var description = entry[4];\n if (!(organism_name in dataset_dict)) {\n dataset_dict[organism_name] = {};\n organism_list.push(organism_name);\n //console.log(organism_name);\n }\n if (!(alphabet in dataset_dict[organism_name])) {\n dataset_dict[organism_name][alphabet] = [];\n }\n if ($.inArray(alphabet, alphabet_list) < 0) {\n alphabet_list.push(alphabet);\n }\n dataset_dict[organism_name][alphabet].push([file_name, data_type, description]); // add info\n }\n return [dataset_dict, organism_list, alphabet_list];\n}", "function seperateData(data){\n data.forEach(monsterObj => displayMonster(monsterObj))\n}", "function processData() {\n var stations = dataHolder['noaa-mi3-station-data-mn-trimmed'];\n var data = dataHolder['broken_temperature_record_from_pbs-2012-mn'];\n \n // Function to get coordinates\n function getStation(name, stations) {\n var j;\n for (j in stations) {\n if (stations[j].station_name == name) {\n return stations[j];\n }\n }\n return {};\n }\n \n // Sort by date\n data.sort(function(m1, p1) {\n var m = ('' + m1.record_date).toLowerCase();\n var p = ('' + p1.record_date).toLowerCase();\n\n if (m > p) {\n return 1;\n }\n else if (m < p) {\n return -1;\n }\n else {\n return 0;\n }\n });\n\n // Group by date\n var grouping = {};\n var maxIncrease = 0;\n var maxIncreaseData = {};\n for (var i in data) {\n if (data[i].record_date) {\n var thisDate = Date.parse(data[i].record_date);\n var previousDate = Date.parse(data[i].previous_record_date);\n if (typeof grouping[data[i].record_date] == 'undefined') {\n grouping[data[i].record_date] = {};\n }\n grouping[data[i].record_date].date = thisDate;\n grouping[data[i].record_date].date_formatted = thisDate.toString(\"MMM d\");\n grouping[data[i].record_date].date_object = thisDate;\n \n // Add places\n var station = getStation(data[i].station_name, stations);\n var diff = ((data[i].record - data[i].previous_record) / data[i].previous_record) + 0.01;\n grouping[data[i].record_date].places = grouping[data[i].record_date].places || [];\n var place = {\n name: data[i].station_name.toLowerCase().capitalize().replace('Ap', 'Airport'),\n lat: station.lat,\n lon: station.lon,\n record: data[i].record,\n previous_record: data[i].previous_record,\n previous_record_date: previousDate,\n difference: diff,\n date: thisDate\n };\n grouping[data[i].record_date].places.push(place);\n \n // Check max increase\n if (diff > maxIncrease) {\n maxIncrease = diff;\n maxIncreaseData = place;\n }\n }\n }\n \n // Make map // \"https://{s}.tiles.mapbox.com/v3/mapbox.mapbox-light/{z}/{x}/{y}.png\"\n var tiles = new L.TileLayer(\"https://{s}.tiles.mapbox.com/v3/minnpost.map-wi88b700/{z}/{x}/{y}.png\", {\n attribution: \"Map imagery from <a href=https://mapbox.com'>Mapbox</a>\", \n subdomains: [\"a\", \"b\", \"c\", \"d\"],\n maxZoom: 8,\n minZoom: 4\n });\n \n var map = new L.Map('temperature-map', {\n center: new L.LatLng(46.479553, -93.98589980000002),\n zoom: 7,\n layers: [tiles]\n });\n \n // Create marker layers\n var circleOptions = {\n color: '#801019',\n fillColor: '#801019',\n fillOpacity: 0.7,\n stroke: false\n };\n \n // Template for popup\n var makeLayerData = function(group) {\n var output = '';\n output += '<h3>' + group.date_object.toString('MMM d, yyyy') + '</h3>';\n output += '<ul>';\n \n _.each(group.places, function(p, t) {\n output += '<li>' + group.places[t].name + ': <br> <strong>' + group.places[t].record + ' &deg;F</strong> &nbsp;&nbsp;(' + group.places[t].previous_record + ' &deg;F in ' + group.places[t].previous_record_date.toString('yyyy') + ')</li>';\n });\n output += '</ul>';\n return output;\n };\n \n // Template for group\n var makePopup = function(place, date) {\n var output = '';\n output += '<div class=\"popup-heading\">' + place.name + '</div>';\n output += '<div class=\"popup-date\">Date: <strong>' + date.toString('MMM d, yyyy') + '</strong></div>';\n output += '<div class=\"popup-new-record\">New record: <strong>' + place.record + ' &deg;F</strong></div>';\n output += '<div class=\"popup-previous-record\">Previous record: <strong>' + place.previous_record + ' &deg;F</strong> on <strong>' + place.previous_record_date.toString('yyyy') + '</strong></div>';\n return output;\n };\n\n // Create layer sets\n var overlayMaps = {};\n var groupIndex = [];\n \n _.each(grouping, function(group, g) {\n var layerGroup = new L.LayerGroup();\n groupIndex.push(g);\n \n // Make points\n _.each(grouping[g].places, function(place, p) {\n var ratio = grouping[g].places[p].difference / maxIncrease;\n var radius = 10000 + (ratio * 30000);\n var circle = new L.Circle(new L.LatLng(grouping[g].places[p].lat, grouping[g].places[p].lon), radius, circleOptions);\n circle.bindPopup(makePopup(grouping[g].places[p], grouping[g].date_object));\n layerGroup.addLayer(circle);\n });\n \n map.addLayer(layerGroup);\n overlayMaps[grouping[g].date_formatted + ' (' + grouping[g].places.length + ')'] = layerGroup;\n });\n\n // Add switcher. \n var dateIndex = groupIndex.length - 1;\n var layersControl = new L.Control.Layers(overlayMaps, {});\n map.addControl(layersControl);\n \n // DOM magic.\n $('.js-dependent').show();\n \n // Take over the layer control\n $('#temperature-map-layers').append(layersControl._form);\n $('#temperature-map .leaflet-control-layers').hide();\n $('.leaflet-control-layers-list label input').css('visibility', 'hidden');\n \n // Index layer with groups\n $('.leaflet-control-layers-list label').each(function(index, value) {\n $(this).data('tMapGroup', groupIndex[index]);\n $(this).find('input').prop('checked', false);\n });\n \n // Handle layer clicking\n $('.leaflet-control-layers-list label').click(function(e) {\n map.closePopup();\n $('.leaflet-control-layers-list label').removeClass('layer-selector-selected')\n .not(this).find('input').prop('checked', false);\n \n $(this).addClass('layer-selector-selected');\n $(this).find('input').prop('checked', true);\n \n // Update layer data\n $('.temperature-map-layer-data-container').html(makeLayerData(grouping[$(this).data('tMapGroup')]));\n dateIndex = $(this).index();\n });\n \n // Show latest entry\n $('.leaflet-control-layers-list label:last, .leaflet-control-layers-list label:last input').click();\n \n // Player (we start on the newest entry)\n var datePlayerNext = function() {\n dateIndex = (dateIndex >= groupIndex.length - 1) ? 0 : dateIndex + 1;\n if (dateIndex == groupIndex.length - 1) {\n timer.stop();\n }\n $('.leaflet-control-layers-list label:eq(' + (dateIndex) + ') input').click();\n };\n var datePlayerPrev = function() {\n dateIndex = (dateIndex <= 0) ? groupIndex.length -1 : dateIndex - 1;\n $('.leaflet-control-layers-list label:eq(' + (dateIndex) + ') input').click();\n };\n \n var timer = $.timer(datePlayerNext);\n timer.set({ time : 1500 });\n \n $('.player-pause').hide();\n $('.player-prev').click(function(e) {\n e.preventDefault();\n datePlayerPrev();\n });\n $('.player-play').click(function(e) {\n e.preventDefault();\n dateIndex = -1;\n timer.play(true);\n datePlayerNext();\n $('.player-pause').show();\n $(this).hide();\n });\n $('.player-pause').click(function(e) {\n e.preventDefault();\n timer.pause();\n $('.player-play').show();\n $(this).hide();\n });\n $('.player-stop').click(function(e) {\n e.preventDefault();\n timer.stop();\n $('.player-play').show();\n $('.player-pause').hide();\n });\n $('.player-next').click(function(e) {\n e.preventDefault();\n datePlayerNext();\n });\n \n // Aggregate stats\n $('#temperature-map-stats').html('So far, <strong>' + data.length + '</strong> temperature records at Minnesota\\'s major airports have been broken in 2012.');\n //$('#temperature-map-stats').html('So far, <strong>' + data.length + '</strong> temperature records at Minnesota\\'s major airports have been broken in 2012. The largest record change happened at ' + maxIncreaseData.name + ' on ' + maxIncreaseData.date.toString('MMM d, yyyy') + ', when the old record of ' + maxIncreaseData.previous_record + ' &deg;F in ' + maxIncreaseData.previous_record_date.toString('yyyy') + ' increased by <strong>' + (maxIncreaseData.difference * 100 + 100).toFixed() + '%</strong> to ' + maxIncreaseData.record + ' &deg;F.');\n }", "function Species() {\n this.genomes = [];\n this.averageFitness = 0;\n}", "function addSpecies(extent, center, zoom, elinkDiv, urlLink, htmlLink){\n\t\t\n\tif (RS.prop.qtFields == 0) {\n\t\tloadme();\n\t\treturn;\n\t}\n\tvar species = RS.getFieldArray('species');\n\t\n\tif (species.length > MAX_SPECIES) {\n\t\t//debugger;\n\t\talert(\"Please select less than \"+ MAX_SPECIES);\n\t\treturn;\n\t}\n\tvar layername = FigisMap.fifao.spd;\n\t\n\tvar selectedProjectionIndex = document.getElementById(\"SelectSRS\").selectedIndex;\n\tvar selectedProjection = document.getElementById(\"SelectSRS\").options[selectedProjectionIndex];\n\tvar projection = selectedProjection.value;\n\t\n// \tvar layers = \"\";\n// \tvar styles = [];\n// \tvar titles = [];\n// \t\n// \tvar count = 0;\n\t\n\t/*\n\t\tParse base properties:\n\t\t\t'target' --> map div id,\n\t\t\t'projection' --> special Projections\n\t\t\t'countrieslegend' --> list of members\n\t\t\t'legend' --> layer legend\n\t\t\t'distribution' --> array of layer object\n\t*/\n\tvar pars = {\n\t\ttarget\t\t: 'map',\n\t\tprojection\t: document.getElementById(\"SelectSRS\").value,\n\t\tlegend\t\t: 'legend',\n\t\tlegendType\t: location.href.indexOf('species_e.html')>0 ? 'DP' : 'TP',\n\t\tcontext\t\t: 'speciesViewer',\n\t\tmapSize\t\t: 'L',\n\t\tglobal\t\t: ! performAutoZoom,\n\t\toptions\t\t: {colors: false, labels: true , topMarineLabels: true, majorAreasAsLines: true, hideBasicLayers: true},\n\t\tdistribution\t: new Array(),\n\t\tbase : [\n\t\t\t{ layer: FigisMap.fifao.cnt, cached: true, remote:false, label : \"Continents\"}\n\t\t]\n\t};\n\t\n\tfor (var count = 0; count < species.length; count++) {\n\t\tvar fullCode = species[count];\n\t\tvar code = fullCode.split('-')[0];\n\t\tvar flags= fullCode.split('-')[1];\n\t\tvar hasMarine = ( flags.indexOf('m') > -1 );\n\t\tvar hasInland = ( flags.indexOf('i') > -1 );\n\t\t//layers = layers + layername+\"-ALPHACODE='\"+ code +\"'/\";\n// \t\tstyles.push( getStyle(count) );\n\t\t\n\t\tvar specTitle = \"UNDEFINED\";\n\t\tvar o = 0;\n\t\tfor (o = 0; o < RS.spc.opts.length; o++) {\n\t\t\tif (RS.spc.opts[o].getAttribute('alt') == fullCode) {\n\t\t\t\tspecTitle = RS.spc.opts[o].innerHTML;\n\t\t\t\tspecTitle = specTitle.substring(0, specTitle.indexOf(\" - \"));\n\t\t\t}\n\t\t}\n// \t\ttitles.push( specTitle );\n\t\tif (hasMarine) pars.distribution.push( { layer: layername, filter: \"ALPHACODE='\"+ code +\"' AND DISPORDER = '1'\", title: specTitle + ( hasInland ? ' (marine)' : ''), style: getStyle(count), autoZoom: performAutoZoom, overlayGroup: FigisMap.ol.getDefaultOverlayGroup(pars) } );\n\t\tif (hasInland) pars.distribution.push( { layer: layername, filter: \"ALPHACODE='\"+ code +\"' AND DISPORDER = '2'\", title: specTitle + ( hasMarine ? ' (inland)' : ''), style: getStyle(count), autoZoom: performAutoZoom, overlayGroup: FigisMap.ol.getDefaultOverlayGroup(pars) } );\n\t};\n\t\n\t/* -------------------------------------COMMENT---------------------------------------------*/\n\t/*$('option:selected',$(\"#SelectSpecsScientific\")).each( function() { \n\t layers = layers + layername+\"-ALPHACODE='\"+ this.value.substring(0, this.value.indexOf(\"-\")) +\"'/\";\n\t count = count +1;\n\t styles.push( getStyle(count) ); \n\t titles.push( this.innerHTML );\n\t} \n\t);\n\t$('option:selected',$(\"#SelectSpecsCommon\")).each( function() { \n\t layers = layers + layername+\"-ALPHACODE='\"+ this.value.substring(0, this.value.indexOf(\"-\")) +\"'/\";\n\t count = count +1;\n\t styles.push( getStyle(count) ); \n\t titles.push( this.innerHTML );\n\t} \n\t);*/\n\t\n\t //document.getElementById(\"txtCql\").value = \"\";\n\t //document.getElementById(\"command\").value = \"\";\n\t /* -----------------------------------------------------------------------------------------*/\n\t\n\t //var options = {landMask:true, global:true, drawDataRectangle:false, styles: styles, titles: titles, horizLegend: false};\n\t //var jma = new JMA(options);\n\t //jma.mapGeneratorFS(layers, 'map', 'FigisMapN10086-legend', null, projection);\n\t \n\t/**\n\t* 1. Special extent\n\t**/\n\tif(extent != null || extent != undefined || extent != \"\"){\n\t\tpars.extent = extent;\n\t\tpars.global = false;\n\t}\n\t\n\t/**\n\t* 2. center\n\t**/\n\tif(center != null || center != undefined || center != \"\"){\n\t\tpars.center = center;\n\t}\n\n\t/**\n\t* 3. Special map zoom\n\t**/\n\tif(zoom != null || zoom != undefined || zoom != \"\"){\n\t\tpars.zoom = zoom;\n\t\tpars.global = false;\n\t}\n\t/*\n\tParsing the 'layers' string to build the 'distribution' parameter \n\t*/\n// \t\tvar layersArray = layers.split(\"/\");\n// \t\t\n// \t\tvar size = layersArray.length;\n// \t\tfor(var y = 0; y < size; y++){\n// \t\t\tif(layersArray[y] != null && layersArray[y] != undefined && layersArray[y] != \"\"){\n// \t\t\t\tdists = layersArray[y].split(\"-\");\n// \t\t\t\t\n// \t\t\t\tpars.distribution.push({ 'layer' : dists[0], 'filter' : dists[1] });\n// \t\t\t}\n// \t\t}\n\t\n\tbuildMap( pars, elinkDiv, urlLink, htmlLink );\n}", "function processData(object) {\r\n\t// tell the projector...\r\n\r\n\t// there is no image\r\n\tif (object.records[0].primaryimageurl == null) {\r\n\t\tsocket.emit('no image');\r\n\r\n\t// there is an image, \r\n\t// with no copyright restrictions\r\n\t} else if (object.records[0].imagepermissionlevel == 0) {\r\n\t\tsocket.emit('new image', object.records[0].primaryimageurl);\r\n\r\n\t// there is an image, which\r\n\t// must be displayed small\r\n\t// for copyright reasons\r\n\t} else if (object.records[0].imagepermissionlevel == 1) {\r\n\t\tsocket.emit('small image', object.records[0].primaryimageurl);\r\n\r\n\t// an image cannot be displayed\r\n\t// for copyright reasons\r\n\t} else {\r\n\t\tsocket.emit('copyright');\r\n\t}\r\n\r\n\t// produces sun\r\n\tblastColors(object.records[0].colors);\r\n\r\n\t// Sets label information and plays tones\r\n\tsetLabel(object.records[0]);\r\n\tcalculateTones(object.records[0].colors, object.records[0].dimensions);\r\n\r\n\tobject = null;\r\n}", "onSpeciesChange(value, text) {\r\n this.speciesId = value;\r\n let _this = this;\r\n\r\n getLivestockFilterBySpecies(value, this.props.topPIC).then(function (res) {\r\n if (res.success) {\r\n _this.breedComposition = null;\r\n _this.livestock.SpeciesTypeId = null;\r\n _this.livestock.MaturityStatusId = null;\r\n _this.stateSet({\r\n breed: res.data.breed,\r\n maturity: res.data.maturity,\r\n speciesType: res.data.speciesType,\r\n renderBreedComposition: new Date()\r\n });\r\n\r\n // _this.refs.speciestype.setState({ value: null });\r\n // _this.refs.maturity.setState({ value: null });\r\n _this.geneticsireId = null;\r\n _this.geneticdamId = null;\r\n _this.foasterdamId = null;\r\n _this.receipientdamId = null;\r\n _this.refs.geneticsire.setState({ value: '' });\r\n _this.refs.foasterdam.setState({ value: '' });\r\n _this.refs.geneticdam.setState({ value: '' });\r\n _this.refs.receipientdam.setState({ value: '' });\r\n }\r\n }).catch(function (err) {\r\n _this.notifyToaster(NOTIFY_ERROR);\r\n });\r\n }", "function question4() {\n data.forEach(function(element) {\n element.materials.forEach(function(mat) {\n if (mat === \"wood\") {\n console.log(element.title + \" is made of wood\");\n }\n });\n });\n}", "populate() {\n let tag = 0;\n this.organisms = [];\n for (let i = 0; i < this.grid.length; i++) {\n let temp = new Organism(tag, i);\n if (this.p.random() < 0.9)\n temp.alive = false;\n this.organisms.push(temp);\n tag++;\n }\n }", "function updateSpeciesData() {\n for (var i = 0; i < SPECIES_LIST.length; i++) {\n var species = SPECIES_LIST[i];\n\n var id = species.id;\n\n // Update the species colour\n var colourDataElement = getElement(id + '-colour-data');\n colourDataElement.style.backgroundColour = species.colour.nest;\n\n // Update the number of Ants\n var antNumDataElement = getElement(id + '-antNum-data');\n antNumDataElement.innerHTML = species.ants.length;\n\n // Update the number of Nests\n var nestNumDataElement = getElement(id + '-nestNum-data');\n nestNumDataElement.innerHTML = species.nests.length;\n\n // Update the amount of food however every AVERAGE_FOOD_SAMPLE_RATE ticks\n\n if (CURRENT_TICK % AVERAGE_FOOD_SAMPLE_RATE === 0) {\n var foodAmountDataElement = getElement(id + '-foodAmount-data');\n\n var foodAmount = 0;\n for (var k = 0; k < species.nests.length; k++)\n foodAmount += species.nests[k].health;\n console.log(foodAmount)\n\n foodAmountDataElement.innerHTML = foodAmount.toFixed(NUMBER_OF_FIXED_PLACES);\n }\n }\n}", "function makeActorMap(){\n\tfor(var raw_movie in rawdata_actors){ //Iterate each movie with each movie\n\t\tfor(var actor in rawdata_actors[raw_movie].cast){\n\t\t\titerate_cast_array(actor_to_movie, rawdata_actors[raw_movie].cast[actor], rawdata_actors[raw_movie].id);\n\t\t\titerate_actor_array(rawdata_actors[raw_movie].cast[actor],rawdata_actors[raw_movie].cast);\n\t\t}\n\t}\n}", "_onMetaData (chunk) {\n this.emit('metadata', _parseMetadata(chunk));\n this._passthrough(this._icyMetaInt, this._onMetaSectionStart);\n }", "function generateGeneInformationTable(slimData, studies) {\n\n // adding gene data to html:\n $(\"#geneSymbol\").html(slimData.title);\n\n // Parsing description related fields:\n var descriptionFields = slimData.description.split(\"|\");\n $(\"#description\").html(descriptionFields[0])\n $(\"#location\").html(descriptionFields[1]);\n // Hide the Button while loading\n $(\"#impc_button\").hide();\n // Adding cytogenic region:\n var regionLink = $(\"<a></a>\").attr(\"href\", gwasProperties.contextPath + 'regions/' + descriptionFields[2]).append(descriptionFields[2]);\n $(\"#cytogenicRegion\").html(regionLink);\n\n $(\"#biotype\").html(descriptionFields[3]);\n\n // Loop through all studies and parse out Reported traits:\n var reported_traits = [];\n for ( var study of studies.docs) {\n if ($.inArray(study.traitName_s, reported_traits) == -1) {\n reported_traits.push(study.traitName_s);\n }\n }\n\n // Extracting cross-references:\n var xrefQueryURL = gwasProperties.EnsemblRestBaseURL + '/xrefs/id/' + slimData.ensemblID + '?content-type=application/json'\n var xrefData = getEnsemblREST(xrefQueryURL);\n var entrezID = \"NA\";\n var OMIMID = \"NA\";\n var impcId = getImpcDetails(slimData.title);\n //console.log('impcId->'+impcId);\n\n for ( xref of xrefData ){\n if ( xref.dbname == \"EntrezGene\" ){\n entrezID = xref.primary_id\n }\n if ( xref.dbname == 'MIM_GENE' ){\n OMIMID = xref.primary_id\n }\n }\n\n // Adding automatic cross references pointing to Ensembl:\n $(\"#ensembl_button\").attr('onclick', \"window.open('\"+gwasProperties.EnsemblURL+\"Gene/Summary?db=core;g=\"+slimData.ensemblID +\"', '_blank')\");\n $(\"#ensembl_phenotype_button\").attr('onclick', \"window.open('\"+gwasProperties.EnsemblURL+\"Gene/Phenotype?db=core;g=\"+slimData.ensemblID+\"', '_blank')\");\n $(\"#ensembl_pathway_button\").attr('onclick', \"window.open('\"+gwasProperties.EnsemblURL+\"Gene/Pathway?db=core;g=\"+slimData.ensemblID+\"', '_blank')\");\n $(\"#ensembl_regulation_button\").attr('onclick', \"window.open('\"+gwasProperties.EnsemblURL+\"Gene/Regulation?db=core;g=\"+slimData.ensemblID+\"', '_blank')\");\n $(\"#ensembl_expression_button\").attr('onclick', \"window.open('\"+gwasProperties.EnsemblURL+\"Gene/ExpressionAtlas?db=core;g=\"+slimData.ensemblID+\"', '_blank')\");\n\n // Adding automatic cross reference pointing to Open targets:\n $(\"#opentargets_button\").attr('onclick', \"window.open('\"+gwasProperties.OpenTargetsURL+ slimData.ensemblID+\"', '_blank')\");\n\n // Looping through the cross references and extract entrez id:\n if ( entrezID != \"NA\" ){\n $(\"#entrez_button\").attr('onclick', \"window.open('\"+gwasProperties.EntrezURL+ entrezID + \"', '_blank')\");\n }\n // Looping through the cross references and extract OMIM id:\n if ( OMIMID != \"NA\" ){\n $(\"#OMIM_button\").attr('onclick', \"window.open('\"+gwasProperties.OMIMURL+ OMIMID + \"', '_blank')\");\n }\n\n // Show button if MGIdentifier exists\n if (impcId != \"NA\" ) {\n $(\"#impc_button\").show();\n $(\"#impc_button\").attr('onclick', \"window.open('\"+gwasProperties.IMPC_URI+ impcId + \"', '_blank')\");\n }\n\n // OK, loading is complete:\n hideLoadingOverLay('#summary-panel-loading');\n}", "function handleinformation(data, loadinfo){\n\tif(!data.question){}else{\n\t\tloadinfo = findmatch(data.question, loadinfo, 'includes');\n\t};\n\tif(data.rip == \"false\" || !data.rip){\n\t\tvar ripedit = [];\n\t\tfor (var i = 0; i < loadinfo.length; i++){\n\t\t\tif(!loadinfo[i].rip){\n\t\t\t\tripedit.push(loadinfo[i]);\n\t\t\t};\n\t\t};\n\t\tloadinfo = ripedit;\n\t};\n\tif(data.ex == \"true\"){\n\t\tvar exraidedit = [];\n\t\tfor (var i = 0; i < loadinfo.length; i++){\n\t\t\tif(loadinfo[i].exraid){\n\t\t\t\texraidedit.push(loadinfo[i]);\n\t\t\t};\n\t\t};\n\t\tloadinfo = exraidedit;\n\t};\n\tif(data.lat == '0' || data.lon == '0' || !data.lon || !data.lat){}else{\n\t\tvar gymbykm = [];\n\t\tfor (var i = 0; i < loadinfo.length; i++){\n\t\t\tvar km = Math.round(getDistanceFromLatLonInKm(loadinfo[i].location.lon,loadinfo[i].location.lat,data.lon,data.lat) * 10);\n\t\t\tgymbykm.push(pad(km, 10) + '|||' + i);\n\t\t\tloadinfo[i].distans = Number(km / 10);\n\t\t};\n\t\tgymbykm.sort();\n\t};\n\tif(data.todo == 'normal' || !data.todo || !data.lon || !data.lat){\n\t\tvar loadinfo = sortgymbyname(loadinfo);\n\t\treturn loadinfo;\n\t}else if(data.todo == 'km'){\n\t\tif(data.lat == '0' && data.lon == '0'){\n\t\t\tvar loadinfo = sortgymbyname(loadinfo);\n\t\t\treturn loadinfo;\n\t\t}else{\n\t\t\tvar gymstoreturn = [];\n\t\t\tfor (var i = 0; i < gymbykm.length; i++){\n\t\t\t\tvar datasplit = gymbykm[i].split('|||');\n\t\t\t\tgymstoreturn.push(loadinfo[datasplit[1]]);\n\t\t\t};\n\t\t\treturn gymstoreturn;\n\t\t};\n\t}else{\n\t\treturn false;\n\t};\n}", "function processData(info) {\n\t/* Eventos para valoración de una gasolinera */\n\tinitPoints();\n\t/* Inicializa el mapa */\n\t(function initMap(latlon) {\n\t\tvar mapdiv = document.getElementById(\"map\");\n\t\tif (!latlon) {\n\t\t\tmapdiv.style.display = \"none\";\n\t\t\treturn;\n\t\t}\n\t\tvar position = new google.maps.LatLng(latlon[0], latlon[1]);\n\t\tvar mapOptions = {\n\t\t\tcenter: position,\n\t\t\tzoom: 15,\n\t\t\tmapTypeId: google.maps.MapTypeId.ROADMAP\n\t\t};\n\t\tmap = new google.maps.Map(mapdiv,\n\t\t\tmapOptions);\n\t\tmarkerCenter = new google.maps.Marker({\n\t \tmap: map,\n\t \tposition: position,\n\t \tanimation: google.maps.Animation.DROP,\n\t\t\ticon: '/img/pump_mark.png'\n\t\t});\n\t})(info.i.g);\n\t/* El horario de la gasaolinera*/\n\t(function initHours(h) {\n\t\tdocument.getElementById(\"hours\").textContent = h;\t\n\t})(info.i.h);\n\t/* El logo de la gasolinera */\n\t(function insertLogo(label) {\n\t\tvar logoId = getLogo(label);\n\t\tvar logoDiv = document.getElementById(\"station-logo\");\n\t\tif (logoId) {\n\t\t\tvar imgUrl = \"/img/logos/\" + logoId + \"_w.png\";\n\t\t\tlogoDiv.style.backgroundImage = \"url(\"+imgUrl+\")\";\n\t\t}\n\t\telse {\n\t\t\tlogoDiv.style.backgroundImage = \"url('/img/logos/otra_w.png')\";\n\t\t\tlogoDiv.textContent = label;\n\t\t}\n\t})(info.i.l);\n\t/* Inicializa tablón de precios y reomendador */\n\t(function initPrice(price) {\n\t\tfor (var p in price) {\n\t\t\tvar type = FUEL_OPTIONS[p][\"short\"];\n\t\t\tvar dsec = document.getElementById(\"sec-\"+type);\n\t\t\tdsec.style.display = \"block\";\n\t\t\tfillPriceDigits(document.getElementById(type), price[p]);\n\t\t\t// Recomendador\n\t\t\tvar dmore = document.createElement(\"div\");\n\t\t\tdmore.className = \"more\";\n\t\t\tdmore.id = \"more-\"+p;\n\t\t\tdmore.textContent = \"+\";\n\t\t\tdmore.onclick = showMore;\n\t\t\tdsec.appendChild(dmore);\n\t\t\tvar drelated = document.createElement(\"div\");\n\t\t\tdrelated.id = \"rel-\"+p;\n\t\t\tdrelated.className = \"rel\";\n\t\t\tdsec.appendChild(drelated);\n\t\t}\n\t})(info.i.o);\n\t// relleno de http:// en c_link\n\tvar clink = document.getElementById(\"c_link\");\n\tif (clink) {\n\t\taddEvent(clink,\"click\", function() {if (this.value == \"\") this.value = \"http://\";});\n\t\taddEvent(clink,\"blur\", function() {if (this.value == \"http://\") this.value = \"\";});\t\n\t}\n}", "function processData(data){\n //empty array to hold attributes\n //properties of the first feature in the dataset\n var properties = data.features[0].properties;\n //push each attribute name into attributes array\n for (var attribute in properties){\n //only take attributes with a value that includes \"NORM\" (just injury stats)\n if (attribute.indexOf(\"NORM\") > -1){\n attributes.push(attribute);\n }\n }\n return attributes;\n}", "function dataProcess(data) {\n mydata = data;\n let listOfColumnNames = data.columns;\n for (name in listOfColumnNames) {\n if (listOfColumnNames[name] !== \"lat\" && listOfColumnNames[name]!==\"lng\"){\n addNameInSelect(listOfColumnNames[name]);\n }\n }\n $('select').formSelect();\n}", "function processData(data) {\n var attributes = [];\n //define first item in array, this case info on Fresno, CA\n var propProcessData = data.features[0].properties;\n\n //create loop to go through all cities\n for (var attribute in propProcessData) {\n if (attribute.indexOf(\"yr\") > -1) {\n attributes.push(attribute);\n };\n };\n return attributes;\n}", "function seperateMaterials(invoice)\n{\n // invoicearr => invoiceno => materials : []\n // count no of materials in each invoice\n var c = 0;\n\n // find gst cess and have count\n\n console.log(\"In voice Number: \"+invoice);\n let arr = invoicearr[invoice];\n // console.log(arr);\n var materialArr = [];\n let mindex = {};\n arr.forEach((elem,i) => { \n // find gst cess\n // incr counter\n \n if (i == 0)\n {\n console.log(\"New Invoice data---\");\n // console.log(elem);\n }\n if (elem.match(/Slno(\\s)+(RITC)(\\s+)/))\n {\n // console.log(elem);\n }\n if (elem.match(/GST Cess(\\s+)(\\d+)(\\/)(\\d+)/))\n {\n c++;\n mindex[c] = i;\n }\n let s = findsurCharge(elem);\n if (s)\n {\n // console.log(\"S: \" + s)\n }\n });\n // console.log(\"Materials for invoice: \" + invoice + \" is \" + c);\n // console.log(mindex);\n for (let j in mindex)\n {\n // console.log(mindex[j]);\n // get the index of start of material and print start of material\n // console.log(arr[mindex[j] - 10]);\n let materialObj = {};\n let str = \"\";\n str += arr[mindex[j] - 11].trim() + \"### \";\n str += arr[mindex[j] - 10].trim();\n str += arr[mindex[j] - 9].trim();\n // str += arr[mindex[j] - 8].trim();\n // str += arr[mindex[j] - 7].trim() + \" ###\";\n // matearr.push(str);\n\n // index of material\n materialObj.materialNo = findMaterialIndex(str);\n // HSN code\n materialObj.HSNCode = findMaterialRITC(str);\n //BCD Amt(RS)\n materialObj.BCD = findBCD(arr[mindex[j] - 8].trim());\n //Ass value\n materialObj.AssVal = findAssVal(arr[mindex[j] - 7].trim());\n //Social Welfare Surcharge\n materialObj.surCharge = findsurCharge(arr[mindex[j] - 2].trim());\n //IGST\n materialObj.IGST = findIGST(arr[mindex[j] - 1].trim());\n //des\n let desObj = findDes(str);\n // console.log(desObj);\n materialObj.desOfGoods = desObj.desOfGoods;\n materialObj.partCode = desObj.partCode;\n materialObj.quantity = desObj.quantity;\n\n materialObj.invoice = invoice;\n let invobj = invoiceDetails.find(xx => xx.invoice === invoice);\n materialObj.invoiceDate = invobj.vendorDate;\n materialObj.vendorName = invobj.vendorName;\n materialObj.boeNo = boeNo;\n materialObj.boeDate = boeDate;\n materialObj.inVoiValue = invobj.inVoiValue;\n materialObj.exchangeRate = invobj.exchangeRate;\n materialObj.CHA = invobj.CHA;\n materialObj.amtInINR = findAmtINR(materialObj.exchangeRate, materialObj.inVoiValue);\n materialObj.cntryOrg = cntryOrg;\n materialObj.airBillNo = airBillNo;\n materialObj.airBillDt = airBillDt;\n materialArr.push(materialObj);\n }\n console.log(materialArr);\n}", "function processMaterial( m ) {\n\n\t\t\tvar matid = materialMap.get( m );\n\n\t\t\tif ( matid == null ) {\n\n\t\t\t\tmatid = \"Mat\" + (libraryEffects.length + 1);\n\n\t\t\t\tvar type = 'phong';\n\n\t\t\t\tif ( m instanceof MeshLambertMaterial ) {\n\n\t\t\t\t\ttype = 'lambert';\n\n\t\t\t\t} else if ( m instanceof MeshBasicMaterial ) {\n\n\t\t\t\t\ttype = 'constant';\n\n\t\t\t\t\tif ( m.map !== null ) {\n\n\t\t\t\t\t\t// The Collada spec does not support diffuse texture maps with the\n\t\t\t\t\t\t// constant shader type.\n\t\t\t\t\t\t// mrdoob/three.js#15469\n\t\t\t\t\t\tconsole.warn( 'ColladaExporter: Texture maps not supported with MeshBasicMaterial.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tvar emissive = m.emissive ? m.emissive : new Color( 0, 0, 0 );\n\t\t\t\tvar diffuse = m.color ? m.color : new Color( 0, 0, 0 );\n\t\t\t\tvar specular = m.specular ? m.specular : new Color( 1, 1, 1 );\n\t\t\t\tvar shininess = m.shininess || 0;\n\t\t\t\tvar reflectivity = m.reflectivity || 0;\n\n\t\t\t\t// Do not export and alpha map for the reasons mentioned in issue (#13792)\n\t\t\t\t// in js alpha maps are black and white, but collada expects the alpha\n\t\t\t\t// channel to specify the transparency\n\t\t\t\tvar transparencyNode = '';\n\t\t\t\tif ( m.transparent === true ) {\n\n\t\t\t\t\ttransparencyNode +=\n\t\t\t\t\t\t\"<transparent>\" +\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tm.map ?\n\t\t\t\t\t\t\t\t\"<texture texture=\\\"diffuse-sampler\\\"></texture>\" :\n\t\t\t\t\t\t\t\t'<float>1</float>'\n\t\t\t\t\t\t) +\n\t\t\t\t\t\t'</transparent>';\n\n\t\t\t\t\tif ( m.opacity < 1 ) {\n\n\t\t\t\t\t\ttransparencyNode += \"<transparency><float>\" + (m.opacity) + \"</float></transparency>\";\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tvar techniqueNode = \"<technique sid=\\\"common\\\"><\" + type + \">\" +\n\n\t\t\t\t\t'<emission>' +\n\n\t\t\t\t\t(\n\t\t\t\t\t\tm.emissiveMap ?\n\t\t\t\t\t\t\t'<texture texture=\"emissive-sampler\" texcoord=\"TEXCOORD\" />' :\n\t\t\t\t\t\t\t(\"<color sid=\\\"emission\\\">\" + (emissive.r) + \" \" + (emissive.g) + \" \" + (emissive.b) + \" 1</color>\")\n\t\t\t\t\t) +\n\n\t\t\t\t\t'</emission>' +\n\n\t\t\t\t\t(\n\t\t\t\t\t\ttype !== 'constant' ?\n\t\t\t\t\t\t\t'<diffuse>' +\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tm.map ?\n\t\t\t\t\t\t\t\t'<texture texture=\"diffuse-sampler\" texcoord=\"TEXCOORD\" />' :\n\t\t\t\t\t\t\t\t(\"<color sid=\\\"diffuse\\\">\" + (diffuse.r) + \" \" + (diffuse.g) + \" \" + (diffuse.b) + \" 1</color>\")\n\t\t\t\t\t\t) +\n\t\t\t\t\t\t'</diffuse>'\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t) +\n\n\t\t\t\t\t(\n\t\t\t\t\t\ttype === 'phong' ?\n\t\t\t\t\t\t\t\"<specular><color sid=\\\"specular\\\">\" + (specular.r) + \" \" + (specular.g) + \" \" + (specular.b) + \" 1</color></specular>\" +\n\n\t\t\t\t\t\t'<shininess>' +\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tm.specularMap ?\n\t\t\t\t\t\t\t\t'<texture texture=\"specular-sampler\" texcoord=\"TEXCOORD\" />' :\n\t\t\t\t\t\t\t\t(\"<float sid=\\\"shininess\\\">\" + shininess + \"</float>\")\n\t\t\t\t\t\t) +\n\n\t\t\t\t\t\t'</shininess>'\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t) +\n\n\t\t\t\t\t\"<reflective><color>\" + (diffuse.r) + \" \" + (diffuse.g) + \" \" + (diffuse.b) + \" 1</color></reflective>\" +\n\n\t\t\t\t\t\"<reflectivity><float>\" + reflectivity + \"</float></reflectivity>\" +\n\n\t\t\t\t\ttransparencyNode +\n\n\t\t\t\t\t\"</\" + type + \"></technique>\";\n\n\t\t\t\tvar effectnode =\n\t\t\t\t\t\"<effect id=\\\"\" + matid + \"-effect\\\">\" +\n\t\t\t\t\t'<profile_COMMON>' +\n\n\t\t\t\t\t(\n\t\t\t\t\t\tm.map ?\n\t\t\t\t\t\t\t'<newparam sid=\"diffuse-surface\"><surface type=\"2D\">' +\n\t\t\t\t\t\t\t\"<init_from>\" + (processTexture( m.map )) + \"</init_from>\" +\n\t\t\t\t\t\t\t'</surface></newparam>' +\n\t\t\t\t\t\t\t'<newparam sid=\"diffuse-sampler\"><sampler2D><source>diffuse-surface</source></sampler2D></newparam>' :\n\t\t\t\t\t\t\t''\n\t\t\t\t\t) +\n\n\t\t\t\t\t(\n\t\t\t\t\t\tm.specularMap ?\n\t\t\t\t\t\t\t'<newparam sid=\"specular-surface\"><surface type=\"2D\">' +\n\t\t\t\t\t\t\t\"<init_from>\" + (processTexture( m.specularMap )) + \"</init_from>\" +\n\t\t\t\t\t\t\t'</surface></newparam>' +\n\t\t\t\t\t\t\t'<newparam sid=\"specular-sampler\"><sampler2D><source>specular-surface</source></sampler2D></newparam>' :\n\t\t\t\t\t\t\t''\n\t\t\t\t\t) +\n\n\t\t\t\t\t(\n\t\t\t\t\t\tm.emissiveMap ?\n\t\t\t\t\t\t\t'<newparam sid=\"emissive-surface\"><surface type=\"2D\">' +\n\t\t\t\t\t\t\t\"<init_from>\" + (processTexture( m.emissiveMap )) + \"</init_from>\" +\n\t\t\t\t\t\t\t'</surface></newparam>' +\n\t\t\t\t\t\t\t'<newparam sid=\"emissive-sampler\"><sampler2D><source>emissive-surface</source></sampler2D></newparam>' :\n\t\t\t\t\t\t\t''\n\t\t\t\t\t) +\n\n\t\t\t\t\ttechniqueNode +\n\n\t\t\t\t\t(\n\t\t\t\t\t\tm.side === DoubleSide ?\n\t\t\t\t\t\t\t\"<extra><technique><double_sided sid=\\\"double_sided\\\" type=\\\"int\\\">1</double_sided></technique></extra>\" :\n\t\t\t\t\t\t\t''\n\t\t\t\t\t) +\n\n\t\t\t\t\t'</profile_COMMON>' +\n\n\t\t\t\t\t'</effect>';\n\n\t\t\t\tlibraryMaterials.push( (\"<material id=\\\"\" + matid + \"\\\" name=\\\"\" + (m.name) + \"\\\"><instance_effect url=\\\"#\" + matid + \"-effect\\\" /></material>\") );\n\t\t\t\tlibraryEffects.push( effectnode );\n\t\t\t\tmaterialMap.set( m, matid );\n\n\t\t\t}\n\n\t\t\treturn matid;\n\n\t\t}", "function getSmiles(steps) { \r\n \r\n // For each smiles field \r\n for (var i = 0; i <= steps; i++){ \r\n \r\n // For first JME object in array\r\n if (drawing_objects[i].step == 0){ \r\n \r\n var smiles = drawing_objects[i].smiles();\r\n var field = document.getElementById(\"smiles_start\");\r\n field.value = smiles;\r\n var mw = document.getElementById(\"mw_start\"); \r\n \r\n // This is first JME object so must be final structure/target molecule. Note success is a callback function executed on return of molecular weight value via AJAX\r\n molecular_weight(smiles, mw, i, success);\r\n \r\n \r\n }\r\n \r\n // For all other JME objects \r\n else if (drawing_objects[i].step > 0){ \r\n \r\n // For all other JME objects in array\r\n var smiles = drawing_objects[i].smiles(); \r\n var group = document.getElementsByClassName(i); \r\n group[2].value = smiles; \r\n // Note success is a callback function executed on return of molecular weight value via AJAX\r\n molecular_weight(smiles, group[3], i, success); \r\n \r\n }\r\n \r\n }; \r\n \r\n}", "massageData(data) {\n // Grab the unique list of counties from the dataset\n this.listOfCounties = [...new Set(data.map((x) => x.res_geo_short))].sort();\n\n // Group data by residential county\n const groupedData = this.groupBy(data, (item) => item.res_geo_short);\n\n // Convert necessary string to ints and add aggregate fields\n groupedData.forEach((county) => this.convertStrings(county));\n return groupedData;\n }", "processNewME( ME ){\n \n //Calc beat & measure time\n ME.setTimes( this.getMusicTimes( ME.globalMsec ) );\n //console.log('new ME: ', ME,' times: ', ME.times);\n\n if( this.log.dumpNewME ){\n //console.log('')\n //console.log('Sequencer: new MusicalEvent: ')\n console.log('Seq new ME: ', ME)\n console.log(' perfBeatQ: ', ME.times.perfBeatQ, ' msr: ', ME.times.measure, ' beat: ', ME.times.beatNum, ' beatDiv: ', ME.times.beatDiv ); \n }\n\n //Send to musical analysis.\n //ME gets added to list of notes in MA obj, and generates\n // a MX that gets added to list in MA obj\n this.musicAnalysis.processME( ME );\n\n }", "function photometry() {\n// searches for mentions of various photometric filters and systems, and puts the \n// corresponding information for indexing into the xLtr. All filters will be \n// indexed by transforming their central wavelengths into an energy (ev), to make\n// them compatible with other searches such as spectral features at specific \n// wavelengths. \n// - - - - - - - - - COMMON BROAD BAND SYSTEMS (UBVRI, JHK, igriz);\n var ubvriNames = ['U','B','V','R','I',];\n var ubvriWaves = ['3656', '4353', '5477', '6349', '8797'];\n var ubvriDescs = ubvriNames.map(z => 'broad_band|johnson|flux_lambda|photometry');\n var ugrizNames = ['u','g','r','i','z'];\n var ugrizWaves = ['3543','4770','6231','7625','9134'];\n var ugrizDescs = ugrizNames.map(z => 'broad_band|flux_nu|lambda_nu|photometry');\n var bothNames = ['u','r','i']; // could be johnson system in lowercase font\n var bothWaves = ['3656','6349','8797'];\n var bothDescs = ugrizNames.map(z => 'broad_band|johnson|flux_lambda|photometry');\n var miscNames = ['bj','Bj','BJ','bJ'];\n var miscWaves = ['4600','4600','4600','4600'];\n var miscDescs = miscNames.map(z => 'plate|photometry');\n var jhkNames = ['j', 'h', 'k', 'ks', 'J', 'H', 'K', 'Ks', 'KS'];\n var jhkWaves = ['1.22','1.63','2.19','2.15','1.22','1.63','2.19','2.15'];\n var jhkDescs = jhkNames.map(z => 'broad_band|flux_lambda|photometry');\n var fltrs = ubvriNames.concat(ugrizNames).concat(bothNames).concat(jhkNames).concat(miscNames);\n var vals = ubvriWaves.concat(ugrizWaves).concat(bothWaves).concat(jhkWaves).concat(miscWaves);\n var units = ubvriNames.map(z => 'ang').concat(ugrizNames.map(z => 'ang')).concat(bothNames.map(z => 'ang'));\n units = units.concat(jhkNames.map(z => 'um')).concat(miscWaves.map(z => 'ang'));\n var descs = ubvriDescs.concat(ugrizDescs).concat(bothDescs).concat(jhkDescs).concat(miscDescs);\n// Now turn the above arrays into long strings delimited by \" \" \n fltrs = fltrs.join('\\|');\n vals = vals.join(' ');\n units = units.join(' ');\n descs = descs.join(' ');\n var i = 0;\n var j = 0;\n var k = 0;\n \n// ==================================== fluxes, magnitudes, luminosities \n var r = /([fFmMlL])/.source + '('+fltrs+')' + /([0tT]{0,2})/.source;\n// put in usual broad band stuff\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"nChars\":\"9\", \"type\":\"photometry\",\n \"filtArr\":fltrs.replace(/\\|/g,' '), \"filtVal\":vals, \"filtUnit\":units, \"filtDesc\":descs, \n \"indx\":function(text, startPos) {\n this.endMatch = \"-1\";\n this.x = '';\n this.xSupp = '';\n var info = '';\n var idx = '';\n var xSupp = '';\n var x = '';\n var iFilt = 0;\n var endMatch = -1;\n var rightTst = false;\n var leftTst = false;\n var middleTst = true;\n var tmp = '';\n var t = JSON.parse(filterTheText(this.reg, text.slice(startPos)));\n var m = t[0].match(new RegExp('^'+'(?:'+this.reg+')'));\n if (m) {\n endMatch = t[1][m[0].length-1] + 1 + startPos;\n// make sure that this is not a false-positive: if the word is less than 5 characters long,\n// insure that there is a non-alphanumeric character on the right and left side of it in\n// the unfiltered version of the text. \n if (m[0].length <= 5 && startPos > 0 && text.charAt(startPos-1).match(/[^A-Za-z0-9]/)) {\n leftTst = true; }\n if (startPos == 0) {leftTst = true; }\n if (m[0].length > 5) {leftTst = true;}\n if (m[0].length <= 5 && text.length >= endMatch+1 && text.charAt(endMatch).match(/[^A-Za-z0-9]/)) {\n rightTst = true; }\n if (text.length < endMatch+1) {rightTst = true; }\n if (m[0].length > 5) {rightTst = true; }\n// Now check the characters between the first and last matched character to see if there is evidence\n// of sentence breaks and other characters that should not appear in the middle of real words:\n if (text.slice(startPos,endMatch).match(/\\. +[A-Z]/) && (!(m[0].match(/\\. +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\;/) && (!(m[0].match(/\\; +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\:/) && (!(m[0].match(/\\: +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\?/) && (!(m[0].match(/\\? +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\!/) && (!(m[0].match(/\\! +[A-Z]/)))) {middleTst = false; }\n }\n// If all the tests come back OK, then we've got a legit match:\n if (!(leftTst*rightTst*middleTst)) {return \"\"; }\n// The match conditions have been met if code executes the below ... \n// determine what the central wavelength/freq/energy is:\n this.endMatch = \"\"+endMatch;\n iFilt = this.filtArr.split(' ').findIndex(z => z == m[2]);\n// Convert the central wavelength/freq/energy into eV energy\n info = JSON.parse(extractLineEnergy(this.filtVal.split(' ')[iFilt], this.filtUnit.split(' ')[iFilt]));\n// for filters, to make sure that they don't end up with exactly same numerical entry as spectral lines, truncate\n// them to have only 4 decimal points rather than the spectral line's 5 decimal points:\n tmp = info[0]\n tmp = Number(tmp.match(/\\d+\\.\\d+/)); // get the stuff in front of exponential\n tmp = Number(Math.round(tmp + 'e4') + 'e-4'); // round the value ... shown here is a trick to ensure a \".5\" is dealt with accuractly\n// attach the properly rounded off and truncated to 4 decimal points value to the exponential stuff:\n info[0] = tmp + info[0].replace(/\\d+\\.\\d+/,'');\n xSupp = info[0] + 'X4' + this.filtDesc.split(' ')[iFilt];\n idx = info[0];\n if (m[1].match(/[fF]/)) {\n idx = idx + '\\|' + 'flux';\n xSupp = xSupp + ' ' + info[0] + 'X4' + 'magnitude' + ' ' + info[0] + 'X4' + 'photometry';\n x = x + '\\|' + info[0] + '\\_' + 'magnitude';\n } else if (m[1] == 'm') {\n idx = idx + '\\|' + 'magnitude';\n xSupp = xSupp + ' ' + info[0] + 'X4' + 'flux' + ' ' + info[0] + 'X4' + 'photometry';\n x = x + '\\|' + info[0] + '\\_' + 'flux';\n } else if (m[1] == 'M') {\n idx = idx + '\\|' + 'absolute\\|magnitude';\n xSupp = xSupp + ' ' + info[0] + 'X4' + 'luminosity' + ' ' + info[0] + 'X4' + 'photometry';\n x = x + '\\|' + info[0] + '\\_' + 'luminosity';\n } else if (m[1].toLowerCase() == 'l') {\n idx = idx + '\\|' + 'luminosity';\n xSupp = xSupp + ' ' + info[0] + 'X4' + 'absolute\\_magnitude' + ' ' + info[0] + 'X4' + 'photometry';\n x = x + '\\|' + info[0] + '\\_' + 'absolute_magnitude'; }\n xSupp = xSupp + ' ' + info[0] + 'X4' + info[2]; // add spectral region\n if (m[3] !== undefined && m[3].match(/0/)) {idx = idx + '\\|' + 'extinction_corrected';}\n if (m[3] !== undefined && m[3].match(/tT/)) {idx = idx + '\\|' + 'total'; }\n idx = ([... new Set(idx.replace(/\\|\\|+/,'\\|').replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n xSupp = ([... new Set(xSupp.replace(/ +/,' ').trim().split(' '))]).sort().join(' ');\n x = ([... new Set(x.replace(/\\|\\|+/,'\\|').replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n this.x = x;\n this.xSupp = xSupp;\n this.accuracy = info[1];\n return idx; } });\n// ==================================== mention of filters, photometric colors, or filter systems (up to list of 8 filters)\n r = '('+fltrs+')('+fltrs+')?('+fltrs+')?('+fltrs+')?('+fltrs+')?('+fltrs+')?('+fltrs+')?(?:and)?('+fltrs+')?'+\n /((?:wide)|(?:broad)|(?:narrow))?((?:bandpasses)|(?:bandpass)|(?:bands?)|(?:filters?)|(?:systems?))?/.source;\n// We need a xLTr entry for each possible filter that could appear in the list, so we need 8 separate\n// entries, each having exactly the same information EXCEPT which captured group is used for the index word. \n// Should start with the first captured group and end with the last (8th) captured group. Note that these groups\n// will be undefined if a match is found on the above \"r\" but less than 8 filters are present in the text. For \n// example, UBV would populate the first 3 captured groups on filters above but leave the remaining 5 as undefined.\n for (i = 1; i <= 8; i++) {\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"nChars\":\"35\", \"type\":\"photometry\", \"nVals\":\"8\", \"valNum\":''+i,\n \"filtArr\":fltrs.replace(/\\|/g,' '), \"filtVal\":vals, \"filtUnit\":units, \"filtDesc\":descs,\n \"indx\":function(text, startPos) {\n this.endMatch = \"-1\";\n this.x = '';\n this.xSupp = '';\n var leftTst = false;\n var rightTst = false;\n var middleTst = true;\n var info = ''; \n var idx = '';\n var endMatch = -1;\n var iFilt = 0;\n var xSupp = '';\n var tmp = '';\n var x = '';\n var t = JSON.parse(filterTheText(this.reg, text.slice(startPos)));\n var m = t[0].match(new RegExp('^'+'(?:'+this.reg+')'));\n if (m && m[this.valNum] !== undefined) {\n endMatch = t[1][m[0].length-1] + 1 + startPos;\n// make sure that this is not a false-positive: if the word is less than 5 characters long,\n// insure that there is a non-alphanumeric character on the right and left side of it in\n// the unfiltered version of the text. \n if (m[0].length <= 5 && startPos > 0 && text.charAt(startPos-1).match(/[^A-Za-z0-9]/)) {\n leftTst = true; }\n if (startPos == 0) {leftTst = true; }\n if (m[0].length > 5) {leftTst = true;}\n if (m[0].length <= 5 && text.length >= endMatch+1 && text.charAt(endMatch).match(/[^A-Za-z0-9]/)) {\n rightTst = true; }\n if (text.length < endMatch+1) {rightTst = true; }\n if (m[0].length > 5) {rightTst = true; }\n// Now check the characters between the first and last matched character to see if there is evidence\n// of sentence breaks and other characters that should not appear in the middle of real words:\n if (text.slice(startPos,endMatch).match(/\\. +[A-Z]/) && (!(m[0].match(/\\. +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\;/) && (!(m[0].match(/\\; +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\:/) && (!(m[0].match(/\\: +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\?/) && (!(m[0].match(/\\? +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\!/) && (!(m[0].match(/\\! +[A-Z]/)))) {middleTst = false; }\n }\n// If all the tests come back OK, then we've got a legit match:\n if (!(leftTst*rightTst*middleTst)) {return \"\"; }\n// The match conditions have been met if code executes the below ... \n// determine what the central wavelength/freq/energy is:\n this.endMatch = \"\"+endMatch;\n// determine what the central wavelength/freq/energy is \n iFilt = this.filtArr.split(' ').findIndex(z => z == m[this.valNum]);\n xSupp = this.filtDesc.split(' ')[iFilt];\n// Convert the central wavelength/freq/energy into eV energy\n info = JSON.parse(extractLineEnergy(this.filtVal.split(' ')[iFilt], this.filtUnit.split(' ')[iFilt]));\n// for filters, to make sure that they don't end up with exactly same numerical entry as spectral lines, truncate\n// them to have only 7 decimal points rather than the spectral line's 8 decimal points:\n tmp = info[0]\n tmp = Number(tmp.match(/\\d+\\.\\d+/)); // get the stuff in front of exponential\n tmp = Number(Math.round(tmp + 'e7') + 'e-7'); // round the value ... shown here is a trick to ensure a \".5\" is dealt with accuractly\n// attach the properly rounded off and truncated to 7 decimal points value to the exponential stuff:\n info[0] = tmp + info[0].replace(/\\d+\\.\\d+/,'');\n idx = info[0];\n xSupp = xSupp + ' ' + info[0] + 'X4' + info[2]; // add spectral region\n if (m[9] !== undefined && m[9] == 'wide') {\n idx = idx + '\\|' + 'broad_band_filter';\n } else if (m[9] !== undefined) {\n idx = idx + '\\|' + m[9] + '\\_' + 'band_filter';}\n idx = ([... new Set(idx.replace(/\\|\\|+/,'\\|').replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n xSupp = ([... new Set(xSupp.replace(/ +/,' ').trim().split(' '))]).sort().join(' ');\n x = ([... new Set(x.replace(/\\|\\|+/,'\\|').replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n this.x = x;\n this.xSupp = xSupp;\n this.accuracy = info[1];\n return idx; } });\n }\n// ====================================== ab magnitudes\n xLtr.push({\"reg\":/((?:fab)|(?:Mab)|(?:mab))/.source, \"priority\":\"1\", \"nChars\":\"3\", \"type\":\"jargon\",\n \"indx\":function(text, startPos) {\n var leftTst = false;\n var rightTst = false;\n var middleTst = true;\n this.endMatch = \"-1\";\n this.x = ''; \n this.xSupp = ''; \n var endMatch = -1;\n var leftTst = false;\n var rightTst = false;\n var middleTst = true;\n var t = JSON.parse(filterTheText(this.reg, text.slice(startPos)));\n var m = t[0].match(new RegExp('^'+'(?:'+this.reg+')'));\n if (m) {\n endMatch = t[1][m[0].length-1] + 1 + startPos;\n if ( (startPos == 0) || (text.charAt(startPos-1).match(/[^A-Za-z0-9]/)) ) {leftTst = true; }\n if ( (endMatch == text.length-1) || (text.charAt(endMatch).match(/[^A-Za-z0-9]/)) ) {rightTst = true; }\n if (text.slice(startPos,endMatch).match(/\\. +[A-Z]/) && (!(m[0].match(/\\. +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\;/) && (!(m[0].match(/\\; +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\:/) && (!(m[0].match(/\\: +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\?/) && (!(m[0].match(/\\? +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\!/) && (!(m[0].match(/\\! +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\-/) && (!(m[0].match(/\\- +[A-Z]/)))) {middleTst = false; }\n }\n if (!(leftTst*rightTst*middleTst)) {return ''; }\n this.endMatch = ''+endMatch;\n if (m[1] == 'fab') {\n this.xSupp = 'flux_lambda_nuX4sloan_digital_sky_survey_filter';\n return 'flux_lambda_nu';\n } else if (m[1] == 'Mab') {\n this.xSupp = 'absolute_magnitude_lambda_nuX4sloan_digital_sky_survey_filter|luminosity';\n return 'absolute_magnitude_lambda_nu';\n } else if (m[1] == 'mab') {\n this.xSupp = 'magnitude_lambda_nuX4sloan_digital_sky_survey_filter';\n return 'magnitude_lambda_nu';} } });\n xLtr.push({\"reg\":/ab((?:mag)|(?:magnitudes?)|(?:flux)|(?:fluxes)|(?:systems?)|(?:filters?))/.source,\n \"priority\":\"1\", \"nChars\":\"12\", \"type\":\"photometry\", \"type\":\"jargon\",\n \"indx\":function(text, startPos) {\n this.endMatch = \"-1\";\n this.x = ''; \n this.xSupp = ''; \n var endMatch = -1;\n var leftTst = false;\n var rightTst = false;\n var middleTst = true;\n var t = JSON.parse(filterTheText(this.reg, text.slice(startPos)));\n var m = t[0].match(new RegExp('^'+'(?:'+this.reg+')'));\n if (m) {\n endMatch = t[1][m[0].length-1] + 1 + startPos;\n if ( (startPos == 0) || (text.charAt(startPos-1).match(/[^A-Za-z0-9]/)) ) {leftTst = true; }\n if (m[0].length > 5) {leftTst = true; }\n if ( (endMatch == text.length-1) || (text.charAt(endMatch).match(/[^A-Za-z0-9]/)) ) {rightTst = true; }\n if (m[0].length > 5) {rightTst = true; }\n if (text.slice(startPos,endMatch).match(/\\. +[A-Z]/) && (!(m[0].match(/\\. +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\;/) && (!(m[0].match(/\\; +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\:/) && (!(m[0].match(/\\: +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\?/) && (!(m[0].match(/\\? +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\!/) && (!(m[0].match(/\\! +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\-/) && (!(m[0].match(/\\- +[A-Z]/)))) {middleTst = false; }\n }\n if (!(leftTst*rightTst*middleTst)) {return ''; }\n this.endMatch = \"\"+endMatch;\n if (m[1].charAt(0) == 'f') {\n this.xSupp = 'flux_lambda_nuX4sloan_digital_sky_survey_filter';\n return 'flux_lambda_nu';\n } else if (m[1].charAt(0) == 'm') {\n this.xSupp = 'magnitude_lambda_nuX4sloan_digital_sky_survey_filter';\n return 'magnitude_lambda_nu';\n } else {\n this.xSupp = 'lambda_nuX4sloan_digital_sky_survey_filter';\n return 'lambda_nu_system';} }});\n xLtr.push({\"reg\":/ab/.source, \"priority\":\"1\", \"nChars\":\"2\", \"type\":\"jargon\", \n \"indx\":function(text, startPos) {\n this.endMatch = \"-1\";\n this.x = ''; \n this.xSupp = ''; \n var endMatch = -1;\n var leftTst = false;\n var rightTst = false;\n var leftTst = false;\n var rightTst = false;\n var middleTst = true;\n var t = JSON.parse(filterTheText(this.reg, text.slice(startPos)));\n var m = t[0].match(new RegExp('^'+'(?:'+this.reg+')'));\n if (m) {\n endMatch = t[1][m[0].length-1] + 1 + startPos;\n if ( (startPos == 0) || (text.charAt(startPos-1).match(/[^A-Za-z0-9]/)) ) {leftTst = true; }\n if (m[0].length > 5) {leftTst = true; }\n if ( (endMatch == text.length-1) || (text.charAt(endMatch).match(/[^A-Za-z0-9]/)) ) {rightTst = true; }\n if (m[0].length > 5) {rightTst = true; }\n if (text.slice(startPos,endMatch).match(/\\. +[A-Z]/) && (!(m[0].match(/\\. +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\;/) && (!(m[0].match(/\\; +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\:/) && (!(m[0].match(/\\: +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\?/) && (!(m[0].match(/\\? +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\!/) && (!(m[0].match(/\\! +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\-/) && (!(m[0].match(/\\- +[A-Z]/)))) {middleTst = false; }\n }\n if (!(leftTst*rightTst*middleTst)) {return ''; }\n this.endMatch = \"\"+endMatch;\n this.xSupp = 'lambda_nuX4sloan_digital_sky_survey_filter';\n return 'lambda_nu_system'; }});\n// ====================================== colors\n// Will need to add 2 entries, each to capture one of the 2 filters involved in the color: \n for (i = 1; i <= 2; i++) {\n xLtr.push({\"reg\":'('+fltrs+')' + /\\-/.source + '('+fltrs+')', \"priority\":\"1\",\n \"nChars\":\"3\", \"nVars\":\"2\", \"valNum\":''+i, \"type\":\"photometry\",\n \"filtArr\":fltrs.replace(/\\|/g,' '), \"filtVal\":vals, \"filtUnit\":units, \"filtDesc\":descs,\n \"indx\":function(text, startPos) {\n this.endMatch = \"-1\";\n this.x = ''; \n this.xSupp = ''; \n var info = ''; \n var idx = '';\n var tmp = '';\n var endMatch = -1;\n var info = '';\n var iFilt = 0;\n var xSupp = '';\n var x = '';\n var leftTst = false;\n var rightTst = false;\n var leftTst = false;\n var rightTst = false;\n var middleTst = true;\n var t = JSON.parse(filterTheText(this.reg, text.slice(startPos)));\n var m = t[0].match(new RegExp('^'+'(?:'+this.reg+')'));\n if (m) {\n endMatch = t[1][m[0].length-1] + 1 + startPos;\n if ( (startPos == 0) || (text.charAt(startPos-1).match(/[^A-Za-z0-9]/)) ) {leftTst = true; }\n if (m[0].length > 5) {leftTst = true; }\n if ( (endMatch == text.length-1) || (text.charAt(endMatch).match(/[^A-Za-z0-9]/)) ) {rightTst = true; }\n if (m[0].length > 5) {rightTst = true; }\n if (text.slice(startPos,endMatch).match(/\\. +[A-Z]/) && (!(m[0].match(/\\. +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\;/) && (!(m[0].match(/\\; +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\:/) && (!(m[0].match(/\\: +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\?/) && (!(m[0].match(/\\? +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\!/) && (!(m[0].match(/\\! +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\-/) && (!(m[0].match(/\\- +[A-Z]/)))) {middleTst = false; }\n }\n if (!(leftTst*rightTst*middleTst)) {return ''; }\n this.endMatch = \"\"+endMatch;\n// determine what the central wavelength/freq/energy is \n iFilt = this.filtArr.split(' ').findIndex(z => z == m[this.valNum]);\n// Convert the central wavelength/freq/energy into eV energy\n info = JSON.parse(extractLineEnergy(this.filtVal.split(' ')[iFilt], this.filtUnit.split(' ')[iFilt]));\n// for filters, to make sure that they don't end up with exactly same numerical entry as spectral lines, truncate\n// them to have only 4 decimal points rather than the spectral line's 5 decimal points:\n tmp = info[0]\n tmp = Number(tmp.match(/\\d+\\.\\d+/)); // get the stuff in front of exponential\n tmp = Number(Math.round(tmp + 'e4') + 'e-4'); // round the value ... shown here is a trick to ensure a \".5\" is dealt with accuractly\n// attach the properly rounded off and truncated to 4 decimal points value to the exponential stuff:\n info[0] = tmp + info[0].replace(/\\d+\\.\\d+/,'');\n xSupp = info[0] + 'X4' + this.filtDesc.split(' ')[iFilt];\n xSupp = xSupp + ' ' + info[0] + 'X4' + info[2]; // add spectral region\n\n// COME BACK TO\n// would be really cool to determine whether the color was \"red\" or \"blue\" and then to insert that word into the xSupp as \"blue_color\" or \"red_color\"\n\n idx = info[0] + '\\|' + 'color';\n idx = ([... new Set(idx.replace(/\\|\\|+/,'\\|').replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n xSupp = ([... new Set(xSupp.replace(/ +/,' ').trim().split(' '))]).sort().join(' ');\n x = ([... new Set(x.replace(/\\|\\|+/,'\\|').replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n this.x = x;\n this.xSupp = xSupp;\n this.accuracy = info[1];\n return idx; }});\n }\n// - - - - - - - - - HST FILTER SYSTEM\n//http://www.stsci.edu/hst/wfc3/ins_performance/ground/components/filters\n// ==================================== fluxes, magnitudes, luminosities \n var hst = /[fF](\\d{3,4})((?:[wW])|(?:lp)|(?:LP)|(?:[xX])|(?:[mM])|(?:[nN]))/.source\n r = /([fFmMlL])/.source + hst + /([0tT]{0,2})/.source;\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"nChars\":\"9\", \"type\":\"photometry\",\n \"indx\":function(text, startPos) {\n this.endMatch = \"-1\";\n this.x = '';\n this.xSupp = '';\n var units = '';\n var val = '';\n var info = '';\n var tmp = '';\n var idx = '';\n var endMatch = -1;\n var delta = '';\n var xSupp = '';\n var x = '';\n var leftTst = false;\n var rightTst = false;\n var middleTst = true;\n var t = JSON.parse(filterTheText(this.reg, text.slice(startPos)));\n var m = t[0].match(new RegExp('^'+'(?:'+this.reg+')'));\n if (m) {\n endMatch = t[1][m[0].length-1] + 1 + startPos;\n if ( (startPos == 0) || (text.charAt(startPos-1).match(/[^A-Za-z0-9]/)) ) {leftTst = true; }\n if (m[0].length > 5) {leftTst = true; }\n if ( (endMatch == text.length-1) || (text.charAt(endMatch).match(/[^A-Za-z0-9]/)) ) {rightTst = true; }\n if (m[0].length > 5) {rightTst = true; }\n if (text.slice(startPos,endMatch).match(/\\. +[A-Z]/) && (!(m[0].match(/\\. +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\;/) && (!(m[0].match(/\\; +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\:/) && (!(m[0].match(/\\: +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\?/) && (!(m[0].match(/\\? +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\!/) && (!(m[0].match(/\\! +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\-/) && (!(m[0].match(/\\- +[A-Z]/)))) {middleTst = false; }\n }\n if (!(leftTst*rightTst*middleTst)) {return ''; }\n this.endMatch = \"\"+endMatch;\n// the wavelength is approximately the 2nd captured group of numbers. If the wavelength \n// is less than 200, then the units are in microns. Otherwise, in angstrom:\n val = m[2];\n if (parseInt(val) < 200) {\n units = 'um';\n val = val.charAt(0) + '\\.' + val.slice(1);\n } else {\n units = 'ang';\n val = val + '0'; }\n// some of the names do not accuractely reflect their true central wavelengths, so make corrections:\n if (val == '3360') {\n val = '3375'; \n } else if (val == '4380') {\n val = '4320';\n } else if (val == '5550') {\n val = '5410';\n } else if (val == '6060') {\n val = '5956';\n } else if (val == '7750') {\n val = '7760';\n } else if (val == '8140') {\n val = '8353';\n } else if (val == '2000' && m[3].match(/lp/i)) {\n val = '5000';\n } else if (val == '3500' && m[3].match(/lp/i)) {\n val = '5500';\n } else if (val == '6000' && m[3].match(/lp/i)) {\n val = '7000';\n } else if (val == '8500' && m[3].match(/lp/i)) {\n val = '9000'; }\n// Convert the central wavelength/freq/energy into eV energy\n delta = '20';\n if (units == 'um') {delta = '0.02'; }\n info = JSON.parse(extractLineEnergy(val, units, delta));\n// for filters, to make sure that they don't end up with exactly same numerical entry as spectral lines, truncate\n// them to have only 7 decimal points rather than the spectral line's 8 decimal points:\n tmp = info[0]\n tmp = Number(tmp.match(/\\d+\\.\\d+/)); // get the stuff in front of exponential\n tmp = Number(Math.round(tmp + 'e7') + 'e-7'); // round the value ... shown here is a trick to ensure a \".5\" is dealt with accuractly\n// attach the properly rounded off and truncated to 7 decimal points value to the exponential stuff:\n info[0] = tmp + info[0].replace(/\\d+\\.\\d+/,'');\n idx = info[0];\n if (m[3].match(/[wW]/)) {\n idx = idx + '\\|' + 'broad_band_filter';\n } else if (m[3].match(/[nN]/)) {\n idx = idx + '\\|' + 'narrow_band_filter';\n } else if (m[3].match(/lp/i)) {\n idx = idx + '\\|' + 'long_band_pass_filter';\n } else if (m[3].match(/x/i)) {\n idx = idx + '\\|' + 'very_broad_band_filter';\n } else {\n idx = idx + '\\|' + 'filter'; }\n xSupp = info[0] + 'X4' + 'hubble_space_telescope_photometry';\n if (m[1].match(/[fF]/)) {\n idx = idx + '\\|' + 'flux';\n xSupp = xSupp + ' ' + info[0] + 'X4' + 'magnitude' + \n ' ' + info[0] + 'X4' + 'photometry';\n x = x + '\\|' + info[0] + '\\_' + 'magnitude';\n } else if (m[1] == 'm') {\n idx = idx + '\\|' + 'magnitude';\n xSupp = xSupp + ' ' + info[0] + 'X4' + 'flux' +\n ' ' + info[0] + 'X4' + 'photometry';\n x = x + '\\|' + info[0] + '\\_' + 'flux';\n } else if (m[1] == 'M') {\n idx = idx + '\\|' + 'absolute\\|magnitude';\n xSupp = xSupp + ' ' + info[0] + 'X4' + 'luminosity' +\n ' ' + info[0] + 'X4' + 'photometry';\n x = x + '\\|' + info[0] + '\\_' + 'luminosity';\n } else if (m[1].toLowerCase() == 'l') {\n idx = idx + '\\|' + 'luminosity';\n xSupp = xSupp + ' ' + info[0] + 'X4' + 'absolute\\_magnitude' + \n ' ' + info[0] + 'X4' + 'photometry';\n x = x + '\\|' + info[0] + '\\_' + 'absolute_magnitude'; }\n if (!m[3].match(/lp/i) && val != '9000' ) {xSupp = xSupp + ' ' + info[0] + 'X4' + info[2]; }// add spectral region\n if (m[4] !== undefined && m[4].match(/0/)) {indx = indx + '\\|' + 'extinction_corrected';}\n if (m[4] !== undefined && m[4].match(/tT/)) {indx = indx + '\\|' + 'total'; }\n xSupp = xSupp + ' ' + 'magnitude' + 'X4' + 'photometry'\n idx = ([... new Set(idx.replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n xSupp = ([... new Set(xSupp.replace(/ +/,' ').trim().split(' '))]).sort().join(' ');\n x = ([... new Set(x.replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n this.x = x;\n this.xSupp = xSupp;\n this.accuracy = info[1];\n return idx; } });\n// ==================================== mention of filters, photometric colors, or filter systems (up to list of 8 filters)\n r = hst+'('+hst+')?('+hst+')?('+hst+')?('+hst+')?('+hst+')?('+hst+')?(?:and)?('+hst+')?'+\n /((?:bandpasses)|(?:bandpass)|(?:bands?)|(?:filters?)|(?:systems?))?/.source;\n for (i = 1; i <= 8; i++) {\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"nChars\":\"60\", \"nVals\":\"8\", \"valNum\":''+((i-1)*2+1), \"type\":\"photometry\",\n \"indx\":function(text, startPos) {\n this.endMatch = \"-1\";\n this.x = '';\n this.xSupp = '';\n var info = '';\n var tmp = '';\n var idx = '';\n var endMatch = -1;\n var delta = '';\n var xSupp = '';\n var x = '';\n var leftTst = false;\n var rightTst = false;\n var middleTst = true;\n var t = JSON.parse(filterTheText(this.reg, text.slice(startPos)));\n var m = t[0].match(new RegExp('^'+'(?:'+this.reg+')'));\n if (m && m[this.valNum] !== undefined) {\n endMatch = t[1][m[0].length-1] + 1 + startPos;\n if ( (startPos == 0) || (text.charAt(startPos-1).match(/[^A-Za-z0-9]/)) ) {leftTst = true; }\n if (m[0].length > 5) {leftTst = true; }\n if ( (endMatch == text.length-1) || (text.charAt(endMatch).match(/[^A-Za-z0-9]/)) ) {rightTst = true; }\n if (m[0].length > 5) {rightTst = true; }\n if (text.slice(startPos,endMatch).match(/\\. +[A-Z]/) && (!(m[0].match(/\\. +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\;/) && (!(m[0].match(/\\; +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\:/) && (!(m[0].match(/\\: +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\?/) && (!(m[0].match(/\\? +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\!/) && (!(m[0].match(/\\! +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\-/) && (!(m[0].match(/\\- +[A-Z]/)))) {middleTst = false; }\n }\n if (!(leftTst*rightTst*middleTst)) {return ''; }\n this.endMatch = \"\"+endMatch;\n val = m[this.valNum];\n if (parseInt(val) < 200) {\n units = 'um';\n val = val.charAt(0) + '\\.' + val.slice(1);\n } else {\n units = 'ang';\n val = val + '0'; }\n if (val == '3360') {\n val = '3375'; \n } else if (val == '4380') {\n val = '4320';\n } else if (val == '5550') {\n val = '5410';\n } else if (val == '6060') {\n val = '5956';\n } else if (val == '7750') {\n val = '7760';\n } else if (val == '8140') {\n val = '8353';\n } else if (val == '2000' && m[this.valNum+1].match(/lp/i)) {\n val = '5000';\n } else if (val == '3500' && m[this.valNum+1].match(/lp/i)) {\n val = '5500';\n } else if (val == '6000' && m[this.valNum+1].match(/lp/i)) {\n val = '7000';\n } else if (val == '8500' && m[this.valNum+1].match(/lp/i)) {\n val = '9000'; }\n delta = '20';\n if (units == 'um') {delta = '0.02'; }\n info = JSON.parse(extractLineEnergy(val, units, delta));\n// for filters, to make sure that they don't end up with exactly same numerical entry as spectral lines, truncate\n// them to have only 7 decimal points rather than the spectral line's 8 decimal points:\n tmp = info[0]\n tmp = Number(tmp.match(/\\d+\\.\\d+/)); // get the stuff in front of exponential\n tmp = Number(Math.round(tmp + 'e7') + 'e-7'); // round the value ... shown here is a trick to ensure a \".5\" is dealt with accuractly\n// attach the properly rounded off and truncated to 8 decimal points value to the exponential stuff:\n info[0] = tmp + info[0].replace(/\\d+\\.\\d+/,'');\n idx = info[0];\n if (m[this.valNum+1].match(/[wW]/)) {\n idx = idx + '\\|' + 'broad_band_filter';\n } else if (m[this.valNum+1].match(/[nN]/)) {\n idx = idx + '\\|' + 'narrow_band_filter';\n } else if (m[this.valNum+1].match(/lp/i)) {\n idx = idx + '\\|' + 'long_band_pass_filter';\n } else if (m[this.valNum+1].match(/x/i)) {\n idx = idx + '\\|' + 'very_broad_band_filter';\n } else {\n idx = idx + '\\|' + 'filter'; }\n if (!m[this.valNum+1].match(/lp/i) && val != '9000' ) {\n xSupp = xSupp + ' ' + info[0] + 'X4' + info[2]; }// add spectral region\n xSupp = info[0] + 'X4' + 'hubble_space_telescope_photometry';\n idx = ([... new Set(idx.replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n xSupp = ([... new Set(xSupp.replace(/ +/,' ').trim().split(' '))]).sort().join(' ');\n x = ([... new Set(x.replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n this.x = x;\n this.xSupp = xSupp;\n this.accuracy = info[1];\n return idx; } });\n }\n// ====================================== colors\n// Will need to add 2 entries, each to capture one of the 2 filters involved in the color: \n for (i = 1; i <= 2; i++) {\n xLtr.push({\"reg\": hst + '\\-' + hst, \"priority\":\"1\", \"nChars\":\"15\", \"nVars\":\"2\", \n \"valNum\":''+((i-1)*2+1),\"type\":\"photometry\",\n \"indx\":function(text, startPos) {\n this.endMatch = \"-1\";\n this.x = ''; \n this.xSupp = ''; \n var info = '';\n var tmp = '';\n var idx = '';\n var endMatch = -1; \n var xSupp = '';\n var x = '';\n var delta = '';\n var leftTst = false;\n var rightTst = false;\n var middleTst = true;\n var t = JSON.parse(filterTheText(this.reg, text.slice(startPos)));\n var m = t[0].match(new RegExp('^'+'(?:'+this.reg+')'));\n if (m) {\n endMatch = t[1][m[0].length-1] + 1 + startPos;\n if ( (startPos == 0) || (text.charAt(startPos-1).match(/[^A-Za-z0-9]/)) ) {leftTst = true; }\n if (m[0].length > 5) {leftTst = true; }\n if ( (endMatch == text.length-1) || (text.charAt(endMatch).match(/[^A-Za-z0-9]/)) ) {rightTst = true; }\n if (m[0].length > 5) {rightTst = true; }\n if (text.slice(startPos,endMatch).match(/\\. +[A-Z]/) && (!(m[0].match(/\\. +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\;/) && (!(m[0].match(/\\; +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\:/) && (!(m[0].match(/\\: +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\?/) && (!(m[0].match(/\\? +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\!/) && (!(m[0].match(/\\! +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\-/) && (!(m[0].match(/\\- +[A-Z]/)))) {middleTst = false; }\n }\n if (!(leftTst*rightTst*middleTst)) {return ''; }\n this.endMatch = \"\"+endMatch;\n val = m[this.valNum];\n if (parseInt(val) < 200) {\n units = 'um';\n val = val.charAt(0) + '\\.' + val.slice(1);\n } else {\n units = 'ang';\n val = val + '0'; }\n if (val == '3360') {\n val = '3375'; \n } else if (val == '4380') {\n val = '4320';\n } else if (val == '5550') {\n val = '5410';\n } else if (val == '6060') {\n val = '5956';\n } else if (val == '7750') {\n val = '7760';\n } else if (val == '8140') {\n val = '8353';\n } else if (val == '2000' && m[this.valNum].match(/lp/i)) {\n val = '5000';\n } else if (val == '3500' && m[this.valNum].match(/lp/i)) {\n val = '5500';\n } else if (val == '6000' && m[this.valNum].match(/lp/i)) {\n val = '7000';\n } else if (val == '8500' && m[this.valNum].match(/lp/i)) {\n val = '9000'; }\n delta = '20';\n if (units == 'um') {delta = '0.02'; }\n info = JSON.parse(extractLineEnergy(val, units, delta));\n// for filters, to make sure that they don't end up with exactly same numerical entry as spectral lines, truncate\n// them to have only 7 decimal points rather than the spectral line's 8 decimal points:\n tmp = info[0]\n tmp = Number(tmp.match(/\\d+\\.\\d+/)); // get the stuff in front of exponential\n tmp = Number(Math.round(tmp + 'e7') + 'e-7'); // round the value ... shown here is a trick to ensure a \".5\" is dealt with accuractly\n// attach the properly rounded off and truncated to 7 decimal points value to the exponential stuff:\n info[0] = tmp + info[0].replace(/\\d+\\.\\d+/,'');\n idx = info[0];\n if (m[this.valNum+1].match(/[wW]/)) {\n idx = idx + '\\|' + 'broad_band_filter';\n } else if (m[this.valNum+1].match(/[nN]/)) {\n idx = idx + '\\|' + 'narrow_band_filter';\n } else if (m[this.valNum+1].match(/lp/i)) {\n idx = idx + '\\|' + 'long_band_pass_filter';\n } else if (m[this.valNum+1].match(/x/i)) {\n idx = idx + '\\|' + 'very_broad_band_filter';\n } else {\n idx = idx + '\\|' + 'filter'; }\n if (!m[this.valNum+1].match(/lp/i) && val != '9000' ) {\n xSupp = xSupp + ' ' + info[0] + 'X4' + info[2]; }// add spectral region\n xSupp = info[0] + 'X4' + 'hubble_space_telescope_photometry';\n idx = info[0] + '\\|' + 'color';\n idx = ([... new Set(idx.replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n xSupp = ([... new Set(xSupp.replace(/ +/,' ').trim().split(' '))]).sort().join(' ');\n x = ([... new Set(x.replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n this.x = x;\n this.xSupp = xSupp;\n this.accuracy = info[1];\n return idx; } });\n }\n// ====================================== grisms/prisms\n var r = /((?:[gG])|(?:pr)|(?:PR)|(?:Pr))(\\d{3,4})/.source\n var indx = '';\n xLtr.push({\"reg\":r, \"priority\":\"1\", \"nChars\":\"5\", \"type\":\"photometry\",\n \"indx\":function(text, startPos) {\n this.endMatch = \"-1\";\n this.x = '';\n this.xSupp = '';\n var units = '';\n var val = '';\n var info = '';\n var tmp = '';\n var idx = '';\n var endMatch = -1;\n var delta = '';\n var xSupp = '';\n var x = '';\n var leftTst = false;\n var rightTst = false;\n var middleTst = true;\n var t = JSON.parse(filterTheText(this.reg, text.slice(startPos)));\n var m = t[0].match(new RegExp('^'+'(?:'+this.reg+')'));\n if (m) {\n endMatch = t[1][m[0].length-1] + 1 + startPos;\n if ( (startPos == 0) || (text.charAt(startPos-1).match(/[^A-Za-z0-9]/)) ) {leftTst = true; }\n if (m[0].length > 5) {leftTst = true; }\n if ( (endMatch == text.length-1) || (text.charAt(endMatch).match(/[^A-Za-z0-9]/)) ) {rightTst = true; }\n if (m[0].length > 5) {rightTst = true; }\n if (text.slice(startPos,endMatch).match(/\\. +[A-Z]/) && (!(m[0].match(/\\. +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\;/) && (!(m[0].match(/\\; +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\:/) && (!(m[0].match(/\\: +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\?/) && (!(m[0].match(/\\? +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\!/) && (!(m[0].match(/\\! +[A-Z]/)))) {middleTst = false; }\n if (text.slice(startPos, endMatch).match(/\\-/) && (!(m[0].match(/\\- +[A-Z]/)))) {middleTst = false; }\n }\n if (!(leftTst*rightTst*middleTst)) {return ''; }\n this.endMatch = \"\"+endMatch;\n// the wavelength is approximately the 2nd captured group of numbers. If the wavelength \n// is less than 200, then the units are in microns. Otherwise, in angstrom:\n val = m[2];\n if (parseInt(val) < 200) {\n units = 'um';\n val = val.charAt(0) + '\\.' + val.slice(1);\n } else {\n units = 'ang';\n val = val + '0'; }\n// some of the names do not accuractely reflect their true central wavelengths, so make corrections:\n if (val == '2800') {\n val = '2775'; \n } else if (val == '1.02') {\n val = '0.95'; }\n// Convert the central wavelength/freq/energy into eV energy\n delta = '25';\n if (units == 'um') {delta = '0.05'; }\n info = JSON.parse(extractLineEnergy(val, units, delta));\n// for filters, to make sure that they don't end up with exactly same numerical entry as spectral lines, truncate\n// them to have only 7 decimal points rather than the spectral line's 8 decimal points:\n tmp = info[0]\n tmp = Number(tmp.match(/\\d+\\.\\d+/)); // get the stuff in front of exponential\n tmp = Number(Math.round(tmp + 'e7') + 'e-7'); // round the value ... shown here is a trick to ensure a \".5\" is dealt with accuractly\n// attach the properly rounded off and truncated to 7 decimal points value to the exponential stuff:\n info[0] = tmp + info[0].replace(/\\d+\\.\\d+/,'');\n idx = info[0];\n if (val == '0.95' && m[1].charAt(0).match(/g/i)) {\n xSupp = info[0] + 'X4' + 'high_resolution_grating';\n } else if (val == '1410' && m[1].charAt(0).match(/g/i)) {\n xSupp = info[0] + 'X4' + 'low_resolution_grism';\n } else if (val == '2775' && m[1].charAt(0).match(/g/i)) {\n xSupp = info[0] + 'X4' + 'grism'\n } else if (m[1].charAt(0).match(/g/i)) {\n xSupp = info[0] + 'X4' + 'grating|grism';\n } else if (m[1].charAt(0).match(/p/i)) {\n xSupp = info[0] + 'X4' + 'prism'; }\n xSupp = info[0] + 'X4' + 'hubble_space_telescope_spectrum';\n xSupp = xSupp + ' ' + info[0] + 'X4' + info[2]; // add spectral region\n idx = ([... new Set(idx.replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n xSupp = ([... new Set(xSupp.replace(/ +/,' ').trim().split(' '))]).sort().join(' ');\n x = ([... new Set(x.replace(/^\\|/,'').replace(/\\|$/,'').split('\\|'))]).sort().join('\\|');\n this.x = x;\n this.xSupp = xSupp;\n this.accuracy = info[1];\n return idx; } });\n }", "async function parse_parse() {\n try {\n let regiones_y_comunas = await parse_regiones_y_comunas();\n for (let i = 0; i < regiones_y_comunas.length; i++) {\n\n // Damn \"O'Higins\" comuna in the region of Aisén, that makes an additional replace\n regiones_y_comunas[i] = JSON.parse(regiones_y_comunas[i].replace(/O'/g, \"O\\\\'\").replace(/'/g, '\"'))\n }\n return regiones_y_comunas;\n } catch (error) {\n console.log(\"Error\");\n console.log(error);\n }\n }", "function setMap(){\n\n\n //map frame dimensions\n var width = window.innerWidth * 0.3,\n height = window.innerHeight * 0.4;\n\n //create new svg container for the map\n var map = d3.select(\"body\")\n .append(\"svg\")\n .attr(\"class\", \"map\")\n .attr(\"width\", width)\n .attr(\"height\", height);\n\n //create Albers equal area conic projection centered on MN and WI\n var projection = d3.geo.albers()\n .center([0, 46])\n .rotate([93, 0, 0])\n .parallels([40, 55])\n .scale(2000)\n .translate([width / 2, height / 2]);\n\n //path generator\n var path = d3.geo.path()\n .projection(projection);\n\n //use queue.js to parallelize asynchronous data loading\n d3_queue.queue()\n .defer(d3.csv, \"data/CommuterInfoFinal7.csv\") //load attributes from csv\n .defer(d3.json, \"data/US_CAN_2.topojson\") //load background spatial data\n .defer(d3.json, \"data/MN_WI_2.topojson\") //load choropleth spatial data\n .await(callback);\n\n //callback function\n function callback(error, csvData, uscan, mnwi){\n\n var uscanada = topojson.feature(uscan, uscan.objects.US_CAN_2); //convert background to geojson feature\n var minnwisc = topojson.feature(mnwi, mnwi.objects.MN_WI_2).features; //convert MN/WI countiies to geojson feature\n\n //add background to map\n var us_canada = map.append(\"path\")\n .datum(uscanada)\n .attr(\"class\", \"us_canada\")\n .attr(\"d\", path);\n\n minnwisc = joinData(minnwisc, csvData);\n\n var colorScale = makeColorScale(csvData);\n\n setEnumerationUnits(minnwisc, map, path, colorScale);\n\n d3.select(\"body\")\n .append(\"text\")\n .attr(\"class\", \"title\")\n .text(\"MN-WI CommuterViz\");\n\n \n createDropdown(minnwisc);\n\n };\n\n }", "searchGenes() {\n this.setState({molecularOptions: [], mutationOptions: []});\n let geneList = this.state.geneListString.replace(/(\\r\\n\\t|\\n|\\r\\t)/gm, \"\").toUpperCase().split(\" \");\n geneList.forEach(function (d, i) {\n if (d.includes(\"ORF\")) {\n geneList[i] = d.replace(\"ORF\", \"orf\")\n }\n });\n // check for which profiles data is available for the entered HUGOSymbols\n this.props.rootStore.molProfileMapping.getDataContainingProfiles(geneList, dataProfiles => {\n this.props.rootStore.availableProfiles.forEach(d => {\n if (d.molecularAlterationType === \"MUTATION_EXTENDED\") {\n this.updateMutationCheckBoxOptions(dataProfiles.includes(d.molecularProfileId));\n }\n else {\n this.updateMolecularCheckBoxOptions(d.molecularProfileId, dataProfiles.includes(d.molecularProfileId));\n }\n });\n });\n }", "*map_analyser_thread()\n\t{\t\n\t\tconsole.log(\"Started room \" + this.name + \" analysis\")\n\t\tvar [terrain, initialSpots] = readTerrain(this.name)\n\t\tthis.terrain = terrain\n\t\tthis.costmap = terrainToCostmap(terrain, 50, 50)\n\t\t\n\t\tyield* OS.break();\n\t\tvar calculator = new RoomSpotsCalculator(this.costmap, initialSpots, 50, 50);\n \tvar process = calculator.process(this)\n \t\n \tvar result = {}\n \tdo\n \t{\n \t\tresult = process.next();\n \t\tyield* OS.break();\n \t}while(result && !result.done)\n\t\t\n\t\t//this.save_memory()\n\t}", "function fetchDataPhotographer(){\n fetch('./FishEyeData.json')\n .then(res => res.json())\n .then( function (datas) {\n for( data of datas.photographers){\n allPhotographers.push(data);\n let photographer = new Photographer(data.name,data.id,data.city,data.country,data.portrait,data.tagline,data.price,data.tags);\n createCards(photographer);\n photographer.tags.forEach(value => { getTagsElement(value);})\n }\n showTagsNav();\n })\n .catch(error => alert (\"Erreur : \" + error));\n}", "function processFile(contents,fullFileName) {\n let splitter = \"Instance:\"\n //let arResults = []\n let arInstances = contents.split(splitter); //the instances defined in this file\n\n arInstances.forEach(function(i) { //check each instance\n\n let fileContents = splitter + i //add back in the splitter\n //arResults.push(splitter + i)\n //console.log(fileContents)\n let summary = {description:\"\",title:\"\"}\n let ar = fileContents.split('\\n')\n ar.forEach(function(lne){\n lne = lne.replace(/['\"]+/g, ''); //get rid of all the quotes\n if (lne.substr(0,11) == 'InstanceOf:') {\n summary.type = lne.substr(12)\n } else if (lne.substr(0,9) == 'Instance:') {\n summary.id = lne.substr(10)\n } else if (lne.substr(0,11) == '//BaseType:') {\n summary.baseType = lne.substr(12).trim();\n }else if (lne.substr(0,6) == 'Title:') {\n summary.title = lne.substr(7)\n } else if (lne.substr(0,12) == 'Description:') {\n summary.description = lne.substr(13)\n }\n })\n\n if (summary.type && summary.id) {\n //summary.content = fileContents;\n \n summary.fileName = fullFileName\n if (summary.baseType) {\n summary.link = summary.baseType + \"-\" + summary.id + \".json.html\"\n }\n \n hashExamples[summary.type] = hashExamples[summary.type] || []\n hashExamples[summary.type].push(summary);\n }\n\n\n console.log(summary.id)\n\n })\n \n\n\n}", "function processDataFromDocusky() {\n\tparseDocInfo();\n\ttoolSetting();\n}", "constructor(species, size) {\n this.species = species // the species that come after = is parameters\n this.size = size\n }", "createGenomes(num, chromoLength, geneMin, geneMax) {\n\t\t\tfor(var i = 0; i < num; i++) {\n\t\t\t\tthis.population.push(new geneticAlg.Genome(chromoLength, geneMin, geneMax));\n\t\t\t}\n\t\t}", "mating (parent1, parent2) {\n // Create a child genome\n let child = new Genome();\n\n parent1.neurons.forEach(neuron => {\n child.pushNeuron(neuron.neuron);\n });\n\n parent1.synapses.forEach(synapse => {\n if (parent2.synapses.id == synapse.id) {\n child.pushSynapse(util.randBool() ? synapse.synapse : parent2.synapse.synapse);\n } else {\n child.pushSynapse(synapse.synapse);\n }\n });\n\n return child;\n }", "function phase2(csv_obj, technologies, participants) {\n\n console.log(\"Technologies:\\t\", technologies.length);\n console.log(\"Participants:\\t\", participants.length);\n\n var i = 0,\n fuels = [{\n type: 'unknown',\n description: 'unknown',\n technology_id: 1\n }],\n generators = [{\n name: 'unknown',\n duid: 'unknown',\n reg_cap: 0,\n max_cap: 0,\n participant: participants[0],\n technology: technologies[0],\n state: 'unknown',\n fuel: {\n type: 'unknown',\n description: 'unknown'\n }\n }],\n deferred = Q.defer();\n\n try {\n\n _.each(csv_obj, function(row) {\n\n if (i++ === 0) {\n // Skip header row\n return true;\n }\n\n// if (trim(row[13]) === '-') {\n// console.log(row);\n// }\n\n /*\n * Participant, 0\n * Station Name, 1\n * Region, 2\n * Dispatch Type, 3\n * Category, 4\n * Classification 5\n * Fuel Source - Primary 6\n * Fuel Source - Descriptor 7\n * Technology Type - Primary 8\n * Technology Type - Descriptor 9\n * Physical Unit No. 10\n * Unit Size (MW) 11\n * Aggregation 12\n * DUID 13\n * Reg Cap (MW) 14\n * Max Cap (MW) 15\n * Max ROC/Min 16\n */\n\n// ===========================================================================\n\n// Add fuel if not exist\n\n// ===========================================================================\n var tech, techID, participant;\n tech = _.find(technologies, {type: trim(row[8]), description: trim(row[9])});\n techID = tech.id;\n\n if (!tech) {\n console.error('Tech not found');\n throw new Error('Technology not found ' + row[9]);\n }\n\n var fueldesc = trim(row[7]),\n fueltype = trim(row[6]);\n\n // if this fuel type and description is new\n if (!_.find(fuels, {type: fueltype, description: fueldesc})) {\n\n fuels.push({\n type: fueltype,\n description: fueldesc,\n technology_id: techID\n });\n }\n\n// ===========================================================================\n\n// Add generator if not exist\n\n// ===========================================================================\n participant = _.find(participants, {name: trim(row[0])});\n\n if (!participant) {\n throw new Error('Participant not found: ' + row[0]);\n }\n\n var genname = trim(row[1]),\n genstate = trim(row[2]),\n duid = trim(row[13]),\n reg_cap = +row[14],\n max_cap = +row[15],\n gen = _.find(generators, {name: genname, duid: duid});\n\n// console.log(i, techID, duid, gen);\n\n if (!gen) {\n // Haven't added this duid yet\n gen = {\n name: genname,\n state: genstate,\n duid: duid,\n participant: participant,\n technology: tech,\n fuel: {\n type: fueltype,\n description: fueldesc\n },\n max_cap: isNaN(reg_cap) ? 0 : reg_cap,\n reg_cap: isNaN(max_cap) ? 0 : max_cap\n };\n generators.push(gen);\n } else {\n\n // Added this generator before, but\n // DUIDs can be duplicated so\n // sum the total capacity for each DUID\n gen.max_cap = isNaN(max_cap) ? gen.max_cap : gen.max_cap + max_cap;\n gen.reg_cap = isNaN(reg_cap) ? gen.reg_cap : gen.reg_cap + reg_cap;\n }\n\n }); // end _.each\n\n console.log('Fuel types:\\t', fuels.length);\n console.log('Generators:\\t', generators.length);\n\n } catch (err) {\n console.error(err);\n process.exit(1);\n }\n\n\n// ===========================================================================\n\n// Add fuel and generators to the db\n\n// ===========================================================================\n db.serialize(function() {\n\n db.exec('BEGIN IMMEDIATE TRANSACTION');\n\n var st = db.prepare(\"INSERT INTO fuel (type, description, technology_id) VALUES (?,?,?)\");\n\n _.each(fuels, function(f) {\n return st.run([f.type, f.description, f.technology_id]);\n });\n\n st = db.prepare(\"INSERT INTO generator (name, state, duid, participant_id, technology_id, reg_cap, max_cap) VALUES (?,?,?,?,?,?,?)\");\n\n _.each(generators, function(g) {\n return st.run([g.name, g.state, g.duid, g.participant.id, g.technology.id, g.reg_cap, g.max_cap]);\n });\n\n st.finalize();\n\n return db.exec('COMMIT', function() {\n return deferred.resolve(generators);\n });\n });\n\n return deferred.promise;\n// ===========================================================================\n\n// End of task\n// ===========================================================================\n\n }", "function setMap(){\r\n\t\t\r\n\t\t//map frame dimensions\r\n\t\tvar width = window.innerWidth * 0.5,\r\n\t\t\theight = 460;\r\n\r\n\t\t//create new svg container for the map\r\n\t\tvar map = d3.select(\"body\")\r\n\t\t\t.append(\"svg\")\r\n\t\t\t.attr(\"class\", \"map\")\r\n\t\t\t.attr(\"width\", width)\r\n\t\t\t.attr(\"height\", height);\r\n\r\n\t\t//create Albers equal area conic projection centered on New Mexico\r\n\t\tvar projection = d3.geoAlbers()\r\n\t\t.center([2, 34.25])\r\n\t\t.rotate([108.27, -0.00, 0])\r\n\t\t.parallels([45, 60])\r\n\t\t.scale(4400)\r\n\t\t.translate([width / 2, height / 2]);\r\n\t\t\r\n\t\tvar path = d3.geoPath()\r\n\t\t .projection(projection);\r\n\t\t\r\n\t\t//use Promise.all to parallelize asynchronous data loading\r\n\t\tvar promises = [];\r\n\t\tpromises.push(d3.csv(\"data/new_mexico_education.csv\")); //load attributes from csv\r\n\t\tpromises.push(d3.json(\"data/us_states_limited.topojson\")); //load background spatial data\r\n\t\tpromises.push(d3.json(\"data/new_mexico_limited.topojson\")); //load choropleth spatial data\r\n\t\tPromise.all(promises).then(callback);\r\n\r\n\t\tfunction callback(data){\r\n\t\t\tcsvData = data[0];\r\n\t\t\tstates = data[1];\r\n\t\t\tnewMexico = data[2];\r\n\t\t\t\r\n\t\t\t//translate states & new mexico TopoJSON\r\n\t\t\tvar usStates = topojson.feature(states, states.objects.us_states_limited),\r\n\t\t\tnewMexico = topojson.feature(newMexico, newMexico.objects.new_mexico_limited).features;\r\n\t\t\t\r\n\t\t\t//add US states to map\r\n\t\t\tvar states = map.append(\"path\")\r\n\t\t\t\t.datum(usStates)\r\n\t\t\t\t.attr(\"class\", \"states\")\r\n\t\t\t\t.attr(\"d\", path);\r\n\t\t\t\r\n\t\t\tnewMexico = joinData(newMexico, csvData);\r\n\t\t\t\r\n\t\t\tcolorScale = makeColorScale(csvData);\r\n\t\t\t\r\n\t\t\tsetEnumerationUnits(newMexico, map, path, colorScale);\r\n\t\t\t\r\n\t\t\tsetChart(csvData, colorScale);\r\n\t\t\t\r\n\t\t};\r\n\t}", "function invokeDataProcessors() {\n plugins.forEach(function(plugin) {\n try {\n plugin.moduleInstance.process();\n }\n catch(e) {\n console.log(\"Error processing analytics data for\", plugin.manifest.name, \":\", e);\n }\n });\n}", "function processClusterData(data,status){\n var array = [];\n\n retstuff=JSON.parse(data);\n if(retstuff.rowcount===0 || retstuff.data.length===0)\n return;\n if(retstuff.status===\"ok\"){\n array=retstuff.data;\n queryString = [];\n if (platform === 2)\n var bounds = new plugin.google.maps.LatLngBounds();\n else\n var bounds = new google.maps.LatLngBounds();\n array = _.sortBy(array,\"name\");\n //note that this should go through the array and remove duplicate place_id's\n //and combine event_name/event_description into an array for vendorData.\nvenueDetails=[];\n for(var i=0;i<array.length;i++){\n var placeObject = new placeDetailObject(array[i]);\n //this data is retrieved from process cluster query similar to tier data\n placeObject.index=i;\n copyPlaceData(placeObject);\n\tplaceObject.imageArray=checkImagePlaceObject(placeObject);\n var position2;\n var position=new google.maps.LatLng(array[i].lat,array[i].lng);\n if(platform===2)\n position2 = convert2pluglatLng(position);\n\n /*******************************************/\n //note that unlike google we do not have venueDetails[i].phpos\n //placeObject.marker=marker;\n venueDetails.push(placeObject);\n queryString.push(placeObject.placeId);\n if(platform===2)\n bounds.extend(position2);\n else\n bounds.extend(position);\n }\n //center the map on the data\n//note that this is similar to function in getcluterdata()\n if(displayInfo.staticZoom===true){\n //center on starting 1 and setZoom\n map.setCenter(displayInfo.start);\n map.setZoom(displayInfo.defaultZoom);\n updateSearchBox(displayInfo.start,'#startInput1');\n updateSearchBounds();\n }else{\n if (platform !== 2){\n map.fitBounds(bounds);\n updateSearchBounds();\n }else\n map.moveCamera({\n 'target': bounds\n }, function () {\n updateSearchBounds();\n });\n }\n }\n\n //checkAdditionalVenues(results);\n createVenueList();\n if(displayInfo.touristData)\n touristData=venueDetails;\n //processExtendedData(queryString);\n}", "function locationFinder() {\n\n // initializes an empty array\n var locations = [];\n var inArray; //to check if location was included\n\n // adds the location and its information from bio to the arrays\n var contacts = octopus.getContacts();\n locationsInfo[contacts.location.split(',')[0].trim()] = {\n text: contacts.locationText,\n url: contacts.locationURL,\n image: contacts.locationImage\n };\n locations.push(contacts.location);\n\n // iterates through school locations and appends each location and\n // its information to the arrays\n var schools = octopus.getSchools();\n var len = schools.length;\n for (var school = 0; school < len; school++) {\n inArray = $.inArray(schools[school].location, locations);\n if (inArray == -1) {\n locationsInfo[schools[school].location.split(',')[0].trim()] = {\n text: schools[school].locationText,\n url: schools[school].locationURL,\n image: schools[school].locationImage\n };\n locations.push(schools[school].location);\n }\n }\n\n // iterates through work locations and appends each location and\n // its information to the arrays\n var jobs = octopus.getJobs();\n len = jobs.length;\n for (var job = 0; job < len; job++) {\n inArray = $.inArray(jobs[job].location, locations);\n if (inArray == -1) {\n locationsInfo[jobs[job].location.split(',')[0].trim()] = {\n text: jobs[job].locationText,\n url: jobs[job].locationURL,\n image: jobs[job].locationImage\n };\n locations.push(jobs[job].location);\n }\n }\n return locations;\n }", "updateData(result) {\n let removeIndex = [];\n let mapIndex = -1;\n\n // checks to see if the file \"result\" is a JS mapping file, this file always starts with Start::::\n if (\n Object.keys(result.data[0])[0].includes(\n \"Mapping file created by Mars Map Maker\"\n )\n ) {\n let finalStr = \"\";\n let needsCenturyPrefix = false;\n\n // JS mapping file has a section \"let map...\" which is where we want to retrieve our sesar selections and clean the data\n let jsArr = [];\n let prefix = \"\";\n let dateIdArr = [];\n let dateIdentified = false;\n // start pushing is where we find \"let map...\" and start reading\n let startPushing = false;\n let addToForceEdit = false;\n let forceEditValueTitleArr = [];\n let forceEditValueContentArr = [];\n\n if (JSON.stringify(Object.values(result.data[0])).includes(\"forceEdit\")) {\n addToForceEdit = true;\n }\n\n // parsing out a javascript file\n for (let i = 1; i < result.data.length - 1; i++) {\n if (\n JSON.stringify(Object.values(result.data[i])).includes(\"forceEdit\") &&\n JSON.stringify(Object.values(result.data[i])).includes(\"const\")\n ) {\n addToForceEdit = true;\n }\n\n if (addToForceEdit === true) {\n if (\n JSON.stringify(Object.values(result.data[i])).includes(\n \"mapMakerHeader\"\n )\n ) {\n let forceEditValue = JSON.stringify(\n Object.values(result.data[i])\n ).split(\" \");\n forceEditValueTitleArr.push(\n forceEditValue[forceEditValue.length - 1].substring(\n 2,\n forceEditValue[3].length - 4\n )\n );\n }\n if (\n JSON.stringify(Object.values(result.data[i])).includes(\"return\")\n ) {\n let forceEditValue = JSON.stringify(\n Object.values(result.data[i])\n ).split(\" \");\n let trimmedForceEditValue = forceEditValue.slice(3).join(\" \");\n forceEditValueContentArr.push(\n trimmedForceEditValue.substring(\n 2,\n trimmedForceEditValue.length - 5\n )\n );\n addToForceEdit = false;\n }\n }\n\n if (\n JSON.stringify(Object.values(result.data[i - 1])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"let map\")\n ) {\n if (\n !(\n JSON.stringify(Object.values(result.data[i - 1])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"}\") ||\n JSON.stringify(Object.values(result.data[i - 1])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"return\")\n )\n )\n mapIndex = i;\n startPushing = true;\n } else if (\n JSON.stringify(Object.values(result.data[i - 1])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"const scrippsDate\")\n ) {\n dateIdentified = true;\n } else if (\n JSON.stringify(Object.values(result.data[i - 1])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"}\")\n ) {\n startPushing = false;\n } else if (\n JSON.stringify(Object.values(result.data[i])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"return y\")\n ) {\n dateIdentified = false;\n }\n\n let arr;\n\n if (startPushing === true) {\n this.startPushingHelper(\n result,\n i,\n jsArr,\n mapIndex,\n forceEditValueContentArr\n );\n } else if (dateIdentified === true) {\n if (Object.values(result.data[i])[0].includes(\"y\")) {\n arr = Object.values(result.data[i])[0].split(\" \");\n prefix = arr[7];\n }\n // create array of the JS mapping file already selected date numbers\n if (Object.values(result.data[i])[0].includes(\"y\")) {\n arr = Object.values(result.data[i])[0].split(\" \");\n dateIdArr.push(arr[arr.length - 1].match(/[0-9]+/g)[0]);\n dateIdArr.push(\n Object.values(result.data[i])[1][0].match(/[0-9]+/g)[0]\n );\n } else {\n dateIdArr.push(\n Object.values(result.data[i])[0].match(/[0-9]+/g)[0]\n );\n dateIdArr.push(\n Object.values(result.data[i])[1][0].match(/[0-9]+/g)[0]\n );\n }\n }\n\n if (dateIdArr.length === 6) {\n // create a string of the date number array above\n // use that string to identify the finalStr to display automatically in the date dropdown\n\n let dateFormatStr = dateIdArr.join(\"\");\n switch (dateFormatStr) {\n case \"046242\":\n finalStr = \"YYYYMMDD\";\n break;\n case \"044262\":\n finalStr = \"YYYYDDMM\";\n break;\n case \"440222\":\n finalStr = \"DDMMYYYY\";\n break;\n case \"442202\":\n finalStr = \"MMDDYYYY\";\n break;\n case \"048252\":\n finalStr = \"YYYY/MM/DD\";\n break;\n case \"045282\":\n finalStr = \"YYYY/DD/MM\";\n break;\n case \"643202\":\n finalStr = \"MM/DD/YYYY\";\n break;\n case \"640232\":\n finalStr = \"DD/MM/YYYY\";\n break;\n case \"026232\":\n //prefix = this.props.centuryChosen.substr(0, 2)\n finalStr = \"YY/MM/DD or YY-MM-DD\";\n needsCenturyPrefix = true;\n break;\n case \"623202\":\n finalStr = \"MM/DD/YY or MM-DD-YY\";\n needsCenturyPrefix = true;\n //prefix = this.props.centuryChosen.substr(0, 2)\n break;\n case \"023262\":\n //prefix = this.props.centuryChosen.substr(0, 2)\n finalStr = \"MM/DD/YY or MM-DD-YY\";\n needsCenturyPrefix = true;\n break;\n case \"620232\":\n finalStr = \"DD/MM/YY or DD-MM-YY\";\n needsCenturyPrefix = true;\n //prefix = this.props.centuryChosen.substr(0, 2)\n break;\n default:\n }\n }\n\n if (needsCenturyPrefix === true) {\n const newValue = prefix + \"00\";\n const obj = {\n chosenCentury: newValue\n };\n\n this.props.century(obj);\n }\n\n let newJSArr = [];\n // any identical elements in jsArr, only append them once into newJSArr\n\n for (let i = 0; i < jsArr.length; i++) {\n if (!newJSArr.includes(jsArr[i])) {\n newJSArr.push(jsArr[i]);\n }\n }\n jsArr = newJSArr;\n }\n // call dateFormat\n const obj = {\n dateFormat: finalStr,\n hasTwoYs: needsCenturyPrefix\n };\n this.props.formatDate(obj);\n\n // more string cleaning\n // some of the cleaning in the code could be a little smoother with one regex, but some of the symbols we're a little more complicating so handled as strings\n for (let i = 0; i < jsArr.length; i++) {\n jsArr[i] = jsArr[i].replace(/(|\\r\\n|\\s|})/gm, \"\");\n jsArr[i] = jsArr[i].replace(\"}\", \"\");\n jsArr[i] = jsArr[i].replace(/\\\\/g, \"\");\n jsArr[i] = jsArr[i].replace(/\"/g, \"\");\n jsArr[i] = jsArr[i].replace(\" \", \"\");\n if (jsArr[i] !== \"\") {\n jsArr[i] = jsArr[i].split(\":\");\n jsArr[i][0] = jsArr[i][0].replace(\" \", \"\");\n if (jsArr[i][1] !== undefined)\n jsArr[i][1] = jsArr[i][1].replace(\" \", \"\");\n } else removeIndex.push(i);\n }\n // removes any empty strings as elements in the jsArr\n for (let i = 0; i < removeIndex.length; i++) {\n jsArr.splice(removeIndex[i], 1);\n }\n\n let addForceEditValues = jsArr;\n let forceEditValuesCount = 0;\n for (let i = 0; i < addForceEditValues.length; i++) {\n if (\n addForceEditValues[i][1] === \"<METADATA_ADD>\" ||\n addForceEditValues[i][1] === \"<METADATA>\"\n ) {\n addForceEditValues[i][1] =\n forceEditValueTitleArr[forceEditValuesCount];\n forceEditValuesCount++;\n }\n }\n\n this.setState({\n jsFile: addForceEditValues,\n includesJsFile: true,\n isJsFile: true,\n forceEditTitles: forceEditValueTitleArr,\n forceEditValues: forceEditValueContentArr\n });\n }\n\n // this is where we combine objects if there are multiple csv's for the purpose of being able to toggle through tuples of both files\n // we limit the number of toggles but the minimum size of the files (Ex: CSV1.length = 3 && CSV2.length = 10, then user can toggle through 3 times)\n var data = result;\n let finalToggleArray = [];\n let toggleArr = this.state.toggleValues;\n let minimum = Math.min(data.data.length, toggleArr.length);\n if (this.state.isJsFile === false) {\n if (\n toggleArr.length !== 0 &&\n (this.state.files[1] !== undefined || this.state.files[2] !== undefined)\n ) {\n if (minimum < 10) {\n for (let i = 0; i < minimum % 10; i++) {\n const finalObj = { ...toggleArr[i], ...data.data[i] };\n finalToggleArray.push(finalObj);\n }\n } else {\n for (let i = 0; i < (minimum % 10) + (10 - (minimum % 10)); i++) {\n const finalObj = { ...toggleArr[i], ...data.data[i] };\n finalToggleArray.push(finalObj);\n }\n }\n toggleArr = finalToggleArray;\n } else if (toggleArr.length === 0) {\n toggleArr = toggleArr.concat(data.data);\n }\n\n this.setState({\n toggleValues: toggleArr,\n totalFileSize:\n this.state.totalFileSize + Object.keys(data.data[0]).length,\n fieldNames: this.state.fieldNames.concat(Object.keys(data.data[0])),\n fieldValues: this.state.fieldValues.concat(Object.values(data.data[0]))\n });\n }\n\n let arr = [this.state.fieldNames, this.state.fieldValues];\n\n // we want to make sure that we have handled all CSV's and JS files before we use the callback function\n this.setState({ num: this.state.num + 1 });\n if (this.state.num === this.state.files.length - 1) {\n //change totalAddedCards to change how many entries of METADATA_ADD/missing field are in the store\n let totalAddedCards = 4;\n\n this.props.callbackFromParent(\n arr,\n this.state.totalFileSize,\n this.state.toggleValues,\n this.state.jsFile,\n totalAddedCards,\n this.state.forceEditTitles,\n this.state.forceEditValues\n );\n }\n\n // this function checks every file to see if it is a JS or CSV file, if JS certain parts of the code are ignored, if CSV the same applies\n this.setState({ isJsFile: false });\n }", "function findReplaceHandler(content, map, masterId, groupId){\n\t// suffix = AFL105-S1-43T = -43T\n\tvar suffix = groupId.replace(masterId, \"\");\n\t\n\t// Only match master ids that does not follow with the group id suffix\n\tvar regEx = new RegExp(escapeRegExp(masterId) + \"(?!\" + escapeRegExp(suffix) + \")\", \"g\");\n\t\n\t// Get the tool data as a string\n\tvar dataString = typeof(content) === \"string\" ? content : JSON.stringify(content, null, 4);\n\t\n\t// Replace tool data using the regex\n\tdataString = dataString.replace(regEx, groupId);\n\t\n\t// Return this newly fixed data\n\treturn dataString;\n}", "function convert (done) {\n // 数据测试 meta\n // let block1 = prefabDatas[0];\n\n for (let i = 0; i < prefabDatas.length; i++) {\n let prefab = prefabDatas[i];\n if (convertData(prefab))\n writeData(prefab);\n }\n\n done();\n}", "function sequence (csvData) {\n\tconsole.log(\"call sequence\");\n\t//recolor the map \n\td3.selectAll(\".hexbins\") //select every hexagon \n\t\t.style(\"fill\", function(d) { //color enumeration units \n\t\t\treturn choropleth(d, colorScale(csvData)); \n\t\t})\n\t\t\n}", "setCandidatesBio(state, payload){\n state.bio = payload;\n state.currentBio = state.bio.find(x => x.name == \"Ingrida Šimonytė\");\n }", "function processData(data) {\n var geoJsonObject = {\n \"type\": \"FeatureCollection\",\n \"features\": []\n };\n\n var i;\n for (i=0; i < data.length; i++) {\n var result = data[i];\n\n // Only process the data if the result listing is currently active\n if (result[\"active\"] == \"1\") {\n\n /**\n * Sort promotional leases into groups based on the building they are in (buildid)\n */\n\n // Get the index of a listing if there are other promotional listings already present with the same buildid\n var listingIndex = getOtherListings(result.buildid, geoJsonObject[\"features\"]);\n\n /**\n * Process object into GeoJSON\n * Subleases get their own entry in \"features.\"\n * Promos are sorted into building groups by buildid.\n *\n * GeoJSON is a format used by Google Maps and probably other mapping APIs. It has a strict format but we can put\n * whatever we want into \"properties\", which is where we put things like the listing name, price, and associated URL.\n *\n * Note: This is ONE GeoJSON object, not many, and we push each listing into its \"features\" property.\n */\n\n if (listingIndex != null && !isSublease(result[\"aid\"])) {\n geoJsonObject[\"features\"][listingIndex].properties[\"floor_plans\"].push({\n \"weight\": i + 1,\n \"name\": result[\"floor_plan\"],\n \"buildid\": result[\"buildid\"],\n \"price\": result[\"price\"],\n \"gender\": result[\"gender\"],\n \"baths\": result[\"baths\"],\n \"beds\": result[\"beds\"],\n \"sublease\": false,\n \"url\": result[\"url\"]\n });\n } else if (listingIndex == null && !isSublease(result[\"aid\"])) {\n geoJsonObject[\"features\"].push(\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [parseFloat(result[\"lng\"]), parseFloat(result[\"lat\"])]\n },\n \"properties\": {\n \"weight\": i + 1,\n // Gets the building name, assuming \"Cordelia at Brentwood\" etc\n \"name\": result[\"building_name\"],\n \"buildid\": result[\"buildid\"],\n \"image\": getThumbnail(result[\"images\"]),\n \"sublease\": false,\n \"url\": result[\"url\"],\n \"floor_plans\": [{\n \"name\": result[\"list\"].split(\" at \")[0],\n \"number\": i,\n \"buildid\": result[\"buildid\"],\n \"price\": result[\"price\"],\n \"gender\": result[\"gender\"],\n \"baths\": result[\"baths\"],\n \"beds\": result[\"beds\"],\n \"sublease\": false,\n \"url\": result[\"url\"]\n }]\n }\n }\n );\n } else {\n geoJsonObject[\"features\"].push(\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [parseFloat(result[\"lng\"]), parseFloat(result[\"lat\"])]\n },\n \"properties\": {\n \"weight\": i + 1,\n \"name\": \"Sublease\",\n \"price\": result[\"price\"],\n \"gender\": result[\"gender\"],\n \"baths\": result[\"baths\"],\n \"beds\": result[\"beds\"],\n \"image\": getThumbnail(result[\"images\"]),\n \"sublease\": true,\n \"url\": result[\"url\"]\n }\n }\n );\n }\n }\n }\n\n // Before saving data: Loop through once more for promotional buildings and get the lowest price of each\n // We'll use this to display the lowest listing price on the DOM\n\n for (i=0; i<geoJsonObject.features.length; i++) {\n var listing = geoJsonObject.features[i].properties;\n var j, price, lowestPrice;\n if (listing.floor_plans) {\n for (j=0; j<listing.floor_plans.length; j++) {\n price = listing.floor_plans[j].price;\n if (!lowestPrice || price < lowestPrice) {\n lowestPrice = price;\n }\n }\n listing.price = lowestPrice;\n }\n }\n\n // Save the geoJSON object globally\n processedData = geoJsonObject;\n}", "process (filepath) {\n\t\tlet {\n\t\t\tchassis,\n\t\t\tgenerateNamespacedSelector,\n\t\t\tisNamespaced,\n\t\t\tnamespaceSelectors,\n\t\t\tprocessImports,\n\t\t\tprocessNesting,\n\t\t\tprocessAtRules,\n\t\t\tprocessMixins,\n\t\t\tprocessNot,\n\t\t\tprocessFunctions,\n\t\t\tstoreAtRules,\n\t\t\ttypographyEngineIsInitialized\n\t\t} = this\n\n\t\tlet {\n\t\t\tatRules,\n\t\t\tpost,\n\t\t\tsettings,\n\t\t\tutils\n\t\t} = chassis\n\n\t\tlet tasks = new NGN.Tasks()\n\t\tlet sourceMap\n\n\t\ttasks.add('Processing Imports', next => {\n\t\t\tif (typographyEngineIsInitialized) {\n\t\t\t\tthis.tree.walkAtRules('import', atRule => {\n\t\t\t\t\tchassis.imports.push(atRule.params)\n\t\t\t\t\tatRule.remove()\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tprocessImports()\n\t\t\tprocessNesting()\n\t\t\tnext()\n\t\t})\n\n\t\ttasks.add('Processing Mixins', next => {\n\t\t\tprocessMixins()\n\t\t\tprocessNot()\n\t\t\tprocessNesting()\n\n\t\t\tnext()\n\t\t})\n\n\t\ttasks.add('Processing Functions', next => {\n\t\t\tprocessFunctions()\n\t\t\tnext()\n\t\t})\n\n\t\ttasks.add('Namespacing Selectors', next => {\n\t\t\tnamespaceSelectors()\n\t\t\tnext()\n\t\t})\n\n\t\tif (typographyEngineIsInitialized) {\n\t\t\ttasks.add('Initializing Typography Engine', next => {\n\t\t\t\tthis.tree = this.core.css.append(this.tree)\n\t\t\t\tnext()\n\t\t\t})\n\t\t}\n\n\t\ttasks.add('Running Post-Processing Routines', next => {\n\t\t\tthis.tree.walkAtRules('chassis-post', atRule => {\n\t\t\t\tlet data = Object.assign({\n\t\t\t\t\troot: this.tree,\n\t\t\t\t\tatRule\n\t\t\t\t}, atRules.getProperties(atRule))\n\n\t\t\t\tpost.process(data)\n\t\t\t})\n\n\t\t\tnext()\n\t\t})\n\n\t\ttasks.add('Processing CSS4 Syntax', next => {\n\t\t\tenv.process(this.tree, {from: filepath}, settings.envCfg).then(processed => {\n\t\t\t\tthis.tree = processed.root\n\t\t\t\tnext()\n\t\t\t}, err => console.error(err))\n\t\t})\n\n\t\t// tasks.add('Merging matching adjacent rules...', next => {\n\t\t// \toutput = mergeAdjacentRules.process(output.toString())\n\t\t// \tnext()\n\t\t// })\n\n\t\ttasks.add('Beautifying Output', next => {\n\t\t\tremoveComments.process(this.tree).then(result => {\n\t\t\t\tperfectionist.process(result.css).then(result => {\n\t\t\t\t\tthis.tree = result.root\n\n\t\t\t\t\t// Remove empty rulesets\n\t\t\t\t\tthis.tree.walkRules(rule => {\n\t\t\t\t\t\tif (rule.nodes.length === 0) {\n\t\t\t\t\t\t\trule.remove()\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\n\t\t\t\t\tnext()\n\t\t\t\t}, () => {\n\t\t\t\t\tthis.emit('processing.error', new Error('Error Beautifying Output'))\n\t\t\t\t})\n\t\t\t}, () => {\n\t\t\t\tthis.emit('processing.error', new Error('Error Removing Comments'))\n\t\t\t})\n\t\t})\n\n\t\tif (settings.minify) {\n\t\t\tlet minified\n\n\t\t\ttasks.add('Minifying Output', next => {\n\t\t\t\tminified = new CleanCss({\n\t\t\t\t\tsourceMap: settings.sourceMap\n\t\t\t\t}).minify(this.tree.toString())\n\n\t\t\t\tthis.tree = minified.styles\n\t\t\t\tnext()\n\t\t\t})\n\n\t\t\tif (settings.sourceMap) {\n\t\t\t\ttasks.add('Generating source map', next => {\n\t\t\t\t\tsourceMap = minified.sourceMap.toString()\n\t\t\t\t\tnext()\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\t// tasks.on('taskstart', evt => console.log(`${evt.name}...`))\n\t\t// tasks.on('taskcomplete', evt => console.log('Done.'))\n\n\t\ttasks.on('complete', () => this.emit('processing.complete', {\n\t\t\tcss: this.tree.toString(),\n\t\t\tsourceMap\n\t\t}))\n\n\t\tthis.emit('processing')\n\t\ttasks.run(true)\n\t}", "function getManufacturingInfoOperations(self) {\n\n\tvar manufacturingData = [{\n\t\t'str': 'Time of Test (UTC)',\n\t\t'searchStr': 'Time of test (UTC)',\n\t\t'key': 'timeOfTest',\n\t\t'type': 'str',\n\t}, {\n\t\t'str': 'LJM Version',\n\t\t'searchStr': 'LJM Version',\n\t\t'key': 'ljmVersion',\n\t\t'type': 'fl4',\n\t}, {\n\t\t'str': 'LJTestT7 Version',\n\t\t'searchStr': 'LJTestT7 Version',\n\t\t'key': 'ljtestVersion',\n\t\t'type': 'fl4',\n\t}, {\n\t\t'str': 'Jig Type',\n\t\t'searchStr': 'Jig type',\n\t\t'key': 'jigType',\n\t\t'type': 'int',\n\t}, {\n\t\t'str': 'Jig Code',\n\t\t'searchStr': 'Jig code',\n\t\t'key': 'jigCode',\n\t\t'type': 'int',\n\t}, {\n\t\t'str': 'Firmware Version',\n\t\t'searchStr': 'Firmware Version',\n\t\t'key': 'fwVersion',\n\t\t'type': 'fl4',\n\t}, {\n\t\t'str': 'Bootstrap Version',\n\t\t'searchStr': 'Bootstrap Version',\n\t\t'key': 'bsVersion',\n\t\t'type': 'fl4',\n\t}];\n\n\tvar isData = /\\s\\s.*/;\n\tvar select =/\\S\\S.*: /; \n\tvar clean = /\\S\\S.*/;\n\tvar getData = /\\S\\S.*:\\s(.*)/;\n\t\n\tfunction parseManufacturingData(data, dataType) {\n\t\tif(dataType === 'str') {\n\t\t\treturn data;\n\t\t} else if(dataType === 'fl4') {\n\t\t\treturn parseFloat(parseFloat(data).toFixed(4));\n\t\t} else if(dataType === 'int') {\n\t\t\treturn parseInt(data);\n\t\t} else {\n\t\t\treturn data;\n\t\t}\n\t}\n\tfunction parseManufacturingInfo(strPartial) {\n\t\t// console.log('in parseManufacturingInfo');\n\t\tvar selectedPartial = select.exec(strPartial)[0]; //The section of text before the \": \" characters.\n\t\tvar strToSearch = selectedPartial.split(': ').join(''); //The partial w/o the \": \" characters.\n\t\tvar brokenPartial = getData.exec(strPartial);\n\t\t// var cleanPartial = clean.exec(strPartial)[0];\n\t\tvar cleanPartial = brokenPartial[0]; // Remove initial whitespace.\n\t\tvar data = brokenPartial[1];\n\n\t\t// console.log('selectedPartial:', selectedPartial);\n\t\t// console.log('cleanPartial:', brokenPartial);\n\t\t// console.log('data:', data);\n\t\tvar key = 'unknown';\n\t\tvar type = 'str';\n\t\tvar str = cleanPartial;\n\n\t\tvar foundString = manufacturingData.some(function(manData) {\n\t\t\t// console.log('Checking...', manData.str, strToSearch);\n\t\t\tif(manData.searchStr === strToSearch) {\n\t\t\t\tkey = manData.key;\n\t\t\t\ttype = manData.type;\n\t\t\t\tstr = manData.str;\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\t// console.log('key:', key);\n\t\t// console.log('type:', type);\n\t\tvar parsedData = parseManufacturingData(data, type);\n\t\t// console.log('parsedData:', parsedData);\n\n\t\tvar info = {\n\t\t\t'strToSearch': strToSearch,\n\t\t\t'str': str,\n\t\t\t'key': key,\n\t\t\t'type': type,\n\t\t\t'rawData': data,\n\t\t\t'data': parsedData,\n\t\t\t'orig': cleanPartial,\n\t\t};\n\t\treturn info;\n\t}\n\n\tfunction saveParsedDataToBundle(bundle, info) {\n\t\tvar type = info.type;\n\t\tvar key = info.key;\n\t\tvar data = info.data;\n\t\tif(type === 'str') {\n\t\t\tbundle.info[key] = bundle.info[key] + data;\n\t\t} else if(type === 'fl4') {\n\t\t\tbundle.info[key] = parseFloat(parseFloat(data).toFixed(4));\n\t\t} else if(type === 'int') {\n\t\t\tbundle.info[key] = parseInt(data);\n\t\t} else {\n\t\t\tbundle.info[key] = bundle.info[key].toString() + data.toString();\n\t\t}\n\t\treturn bundle;\n\t}\n\n\t// Define a function that is used to initialize the data object built up\n\t// during the process of reading the manufacturing data from a T7.\n\tfunction createReadManufacturingInfoBundle() {\n\t\tdebugRMIOps('in createReadManufacturingInfoBundle');\n\t\t\n\t\t// Initialize the bundle object with some basic data.\n\t\tvar bundle = {\n\t\t\t'info': {},\n\t\t\t'infoString': '',\n\t\t\t'manufacturingData': manufacturingData,\n\t\t\t'isError': false,\n\t\t\t'errorStep': '',\n\t\t\t'error': undefined,\n\t\t\t'errorCode': 0,\n\t\t};\n\n\t\t// Initialize the manufacturing info object with dummy data.\n\t\tmanufacturingData.forEach(function(manData) {\n\t\t\tif(manData.type === 'str') {\n\t\t\t\tbundle.info[manData.key] = '';\n\t\t\t} else if(manData.type === 'fl4') {\n\t\t\t\tbundle.info[manData.key] = 0.000;\n\t\t\t} else if(manData.type === 'int') {\n\t\t\t\tbundle.info[manData.key] = 0;\n\t\t\t} else {\n\t\t\t\tbundle.info[manData.key] = '';\n\t\t\t}\n\t\t});\n\t\treturn bundle;\n\t}\n\n\t// Read the manufacturing data from a T7.\n\tfunction readManufacturingInfoFlashData(bundle) {\n\t\tdebugRMIOps('in readManufacturingInfoFlashData');\n\t\tvar defered = q.defer();\n\t\tvar startingAddress = 0x3C6000;\n\t\tvar numIntsToRead = 8*8;\n\t\tself.readFlash(startingAddress, numIntsToRead)\n\t\t.then(function(res) {\n\t\t\t// res is an object with an attribute \"results\" that is an array\n\t\t\t// of bytes. Therefore this debug call outputs a lot of data:\n\t\t\t// debugRMIOps('in readManufacturingInfoFlashData res', res);\n\t\t\tvar str = '';\n\t\t\tvar rawData = [];\n\t\t\tres.results.forEach(function(val) {\n\t\t\t\tvar bA = (val >> 24) & 0xFF;\n\t\t\t\trawData.push(bA);\n\t\t\t\tvar bB = (val >> 16) & 0xFF;\n\t\t\t\trawData.push(bB);\n\t\t\t\tvar bC = (val >> 8) & 0xFF;\n\t\t\t\trawData.push(bC);\n\t\t\t\tvar bD = (val >> 0) & 0xFF;\n\t\t\t\trawData.push(bD);\n\t\t\t});\n\t\t\tfunction isASCII(str, extended) {\n\t\t\t return (extended ? /^[\\x00-\\xFF]*$/ : /^[\\x00-\\x7F]*$/).test(str);\n\t\t\t}\n\t\t\t// debugRMIOps('in readManufacturingInfoFlashData', rawData);\n\t\t\trawData.forEach(function(raw) {\n\t\t\t\tvar newStrPartial = String.fromCharCode(raw);\n\t\t\t\tif(isASCII(newStrPartial)) {\n\t\t\t\t\tstr += newStrPartial;\n\t\t\t\t}\n\t\t\t});\n\t\t\tdebugRMIOps('in readManufacturingInfoFlashData', str);\n\t\t\t// console.log('Data:');\n\t\t\t// console.log(str);\n\t\t\tvar noReturnChars = str.split('\\r').join('');\n\t\t\tstrPartials = noReturnChars.split('\\n');\n\n\t\t\tvar manufacturingInfoStr = '';\n\t\t\t// console.log('Processing partials');\n\t\t\tstrPartials.forEach(function(strPartial) {\n\t\t\t\ttry {\n\t\t\t\t\t// console.log('Checking partial', strPartial);\n\t\t\t\t\tif(isData.test(strPartial)) {\n\t\t\t\t\t\t// console.log('Parsing partial', strPartial);\n\t\t\t\t\t\tvar parsedInfo = parseManufacturingInfo(strPartial);\n\t\t\t\t\t\t// console.log('Saving partial', strPartial, parsedInfo);\n\t\t\t\t\t\tmanufacturingInfoStr += parsedInfo.str;\n\t\t\t\t\t\tmanufacturingInfoStr += ': ';\n\t\t\t\t\t\tmanufacturingInfoStr += parsedInfo.rawData;\n\t\t\t\t\t\tmanufacturingInfoStr += '\\n';\n\t\t\t\t\t\tbundle = saveParsedDataToBundle(bundle, parsedInfo);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// console.log('Not Checking partial', strPartial);\n\t\t\t\t\t}\n\t\t\t\t} catch(err) {\n\t\t\t\t\terrorLog('Error parsing partial (t7_manufacturing_info_ops.js)', err, strPartial);\n\t\t\t\t\terrorLog(err.stack);\n\t\t\t\t\tconsole.error('Error parsing partial (t7_manufacturing_info_ops.js)', err, strPartial);\n\t\t\t\t}\n\t\t\t});\n\t\t\t// console.log(noReturnChars);\n\t\t\tbundle.infoString = manufacturingInfoStr;\n\t\t\t// console.log(bundle.info);\n\t\t\tdefered.resolve(bundle);\n\t\t}, function(err) {\n\t\t\tdebugRMIOps('in readManufacturingInfoFlashData err', err);\n\t\t\tbundle.isError = true;\n\t\t\tbundle.errorStep = 'readManufacturingInfoFlashData';\n\t\t\tbundle.error = modbusMap.getErrorInfo(err);\n\t\t\tbundle.errorCode = err;\n\t\t\tdefered.reject(bundle);\n\t\t});\n\t\treturn defered.promise;\n\t}\n\n\tthis.readManufacturingInfo = function() {\n\t\tdebugMIOps('* in readManufacturingInfo');\n\t\tvar defered = q.defer();\n\t\tvar bundle = createReadManufacturingInfoBundle();\n\t\t\n\t\tfunction succFunc(rBundle) {\n\t\t\tdebugRMIOps('in readManufacturingInfo res');\n\t\t\tdefered.resolve({\n\t\t\t\t'data': rBundle.info,\n\t\t\t\t'str': rBundle.infoString,\n\t\t\t});\n\t\t}\n\t\tfunction errFunc(rBundle) {\n\t\t\tdebugRMIOps('in readManufacturingInfo err', rBundle);\n\t\t\tdefered.reject(rBundle);\n\t\t}\n\n\t\treadManufacturingInfoFlashData(bundle)\n\t\t.then(succFunc)\n\t\t.catch(errFunc);\n\t\treturn defered.promise;\n\t};\n\n\t\n}", "function maineMap() {\r\n \r\n var projection = d3.geoAlbersUsa()\r\n .scale(3500)\r\n .translate([-950, 850]);\r\n \r\n var path = d3.geoPath()\r\n .projection(projection);\r\n \r\n d3.queue()\r\n .defer(d3.json, \"json/ME.json\")\r\n .defer(d3.csv, \"csv/MaineBirthrateCounties.csv\",function(d) { dataME.set(d.County, + d.BirthRate)})\r\n .await(ready);\r\n \r\n function ready(error, ME) {\r\n\r\n if (error) throw error;\r\n var originalColorME;\r\n svg_state.call(tipIN);\r\n svg_state.append(\"g\")\r\n .attr(\"class\", \"counties states\")\r\n .selectAll(\"path\")\r\n .data(topojson.feature(ME, ME.objects.cb_2015_maine_county_20m).features)\r\n .enter().append(\"path\")\r\n .attr(\"d\", path)\r\n .attr(\"transform\", \"rotate(12, 0, 0)\")\r\n .attr(\"fill\", function (d){\r\n d.total = dataME.get(d.properties.NAME) || 0;\r\n return colorScaleIN(d.total);})\r\n\r\n .on(\"mouseover\", function(d){\r\n tipIN.show(d); \r\n d3.select(this)\r\n .style(\"fill\",\"blue\");})\r\n\r\n .on(\"mouseout\", function(d){\r\n tipIN.hide(d);\r\n d3.select(this)\r\n .style(\"fill\", originalColorME);})\r\n \r\n svg_state.append(\"path\")\r\n .attr(\"class\", \"county-borders states\")\r\n .attr(\"transform\", \"rotate(12, 0, 0)\")\r\n .attr(\"d\", path(topojson.mesh(ME, ME.objects.cb_2015_maine_county_20m , function(a, b) { return a !== b; })\r\n ))}}", "function gen () {\n// Single Item\n let input = document.querySelector('#input');\n let data = input.value.replace(/\\r\\n/g,\"\\n\").split(\"\\n\");\n console.log(data);\n \n let output = document.querySelector('#output');\n let newElement = document.createElement(\"div\");\n \n if (data != '') {\n data.forEach((item) => {\n let items = item.split(\" \");\n function checkValue(items) {\n return items !== \"keyword\";\n }//remove keyword phrase\n\n let elem = items.filter(checkValue)\n let arr = [elem.join(\" \")]\n\n //remove number\n for (let i = 0; i < arr.length; i++) {\n let value = arr[i].split(\"\");\n do {\n value.splice(i, 1); \n } while (value[i] >= 0);\n\n dta = value.join(\"\")\n console.log(dta);\n \n }//remove number\n\n let keyItem = [dta]\n keyItem.forEach((item) => {\n item = item.toLowerCase().split(\" \");\n for (let i = 0; i < item.length; i++){\n item[i] =item[i][0].toUpperCase() + item[i].slice(1);\n }//make sentence case\n newElement.appendChild(document.createElement(\"p\")).append(`<meta name=\"keywords\" content=\"${item.join(\" \")}\"/>`)\n output.appendChild(newElement)\n newElement.setAttribute('class', 'pages') \n });\n \n });\n\n }\n let child = newElement.childNodes\n child.forEach(function (item, index) {\n item= item.setAttributes({\n \"id\": \"pr\" + `${index}`,\n \"onClick\": \"selectAll(this.id)\"\n });\n });\n//====================================================== \n//Mulitiple Item\n let input2 = document.querySelector('#input2');\n //let data22 = input2.value.replace(/(\\r\\n|\\n|\\r)/gm,\", \").split(\"\\n\");\n let data2 = input2.value.replace(/\\r\\n/g,\"\\n\").split(\"\\n\");\n console.log(data2);\n \n let output2 = document.querySelector('#output2');\n let newElement2 = document.createElement(\"p\");\n\n // if (data2 >= '') {\n \n data2.forEach((item) => {\n let items = item.split(\" \");\n function checkValue(items) {\n return items !== \"keyword\";\n }//remove keyword phrase\n \n let elem = items.filter(checkValue)\n let arr = [elem.join(\" \")]\n \n for (let i = 0; i < arr.length; i++) {\n let value = arr[i].split(\"\"); \n do {\n value.splice(i, 1); \n } while (value[i] >= 0);\n dta = value.join(\"\")\n \n \n }//remove number\n let keyItem = [dta]\n keyItem.forEach((item) => {\n item = item.toLowerCase().split(\" \");\n for (let i = 0; i < item.length; i++){\n item[i] =item[i][0].toUpperCase() + item[i].slice(1);\n }//make sentence case\n \n newElement2.append(`${item.join(\" \")} `)\n output2.appendChild(newElement2); \n });\n\n \n });\n\n //}//end of if\n newElement2.prepend('<meta name=\"keywords\" content=\"');\n newElement2.append('\"/>');\n newElement2.setAttributes({\n \"id\": \"learnmore\",\n \"class\": \"pages\",\n \"onClick\": \"selectAll(this.id)\"\n }); \n \n}", "map () {\n const {data} = this.state\n let obj = {}\n\n // seasons -> stories -> quests -> characters -> questsDone\n data['seasons'].map((season) => {\n\n // create object key\n obj[season['name']] = {id : season['id'], story : {}}\n\n data['stories'].map((story) => {\n\n // check if story is in seasons and store it\n if (story['season'] === season['id']) {\n\n // if a race is set\n const storyName = story['races'] ? story['name']+' - '+story['races'] : story['name']\n\n obj[season['name']]['story'][storyName] = {id : story['id'], quests : {}, description : story['description']}\n\n // and continue loop\n data['quests'].map((quest) => {\n\n // check if quest is in story and store it\n if (quest['story'] === story['id']) {\n obj[season['name']]['story'][storyName]['quests'][quest['id']] = {Qname :'', Qid:'', Qlevel:'', status:{}, authorization:{}}\n\n data['characters'].map((character) => {\n\n // stock name, id and level\n obj[season['name']]['story'][storyName]['quests'][quest['id']]['Qname'] = quest['name']\n obj[season['name']]['story'][storyName]['quests'][quest['id']]['Qid'] = quest['id']\n obj[season['name']]['story'][storyName]['quests'][quest['id']]['Qlevel'] = quest['level']\n\n // check the race for specific id\n const raceQuest = [8,1,3,2,7]\n if (raceQuest.includes(obj[season['name']]['story'][storyName]['id'])) {\n switch (obj[season['name']]['story'][storyName]['id']) {\n // asura\n case 8:\n if (data['characterId'][character]['race'] === 'Asura') {\n // check if it's done, if it's the case tag it\n obj[season['name']]['story'][storyName]['quests'][quest['id']]['status'][character] = data['questsDone'][character].includes(quest['id']) ? 1 : 0\n }\n break\n // charr\n case 1:\n if (data['characterId'][character]['race'] === 'Charr') {\n // check if it's done, if it's the case tag it\n obj[season['name']]['story'][storyName]['quests'][quest['id']]['status'][character] = data['questsDone'][character].includes(quest['id']) ? 1 : 0\n }\n break\n // human\n case 3:\n if (data['characterId'][character]['race'] === 'Human') {\n // check if it's done, if it's the case tag it\n obj[season['name']]['story'][storyName]['quests'][quest['id']]['status'][character] = data['questsDone'][character].includes(quest['id']) ? 1 : 0\n }\n break\n // norn\n case 2:\n if (data['characterId'][character]['race'] === 'Norn') {\n // check if it's done, if it's the case tag it\n obj[season['name']]['story'][storyName]['quests'][quest['id']]['status'][character] = data['questsDone'][character].includes(quest['id']) ? 1 : 0\n }\n break\n // sylvari\n case 7:\n if (data['characterId'][character]['race'] === 'Sylvari') {\n // check if it's done, if it's the case tag it\n obj[season['name']]['story'][storyName]['quests'][quest['id']]['status'][character] = data['questsDone'][character].includes(quest['id']) ? 1 : 0\n }\n }\n } else {\n // check if it's done, if it's the case tag it\n obj[season['name']]['story'][storyName]['quests'][quest['id']]['status'][character] = data['questsDone'][character].includes(quest['id']) ? 1 : 0\n }\n\n // check if is authorized\n // and stock it in obj[season['name']]['story'][storyName]['quests'][quest['id']]['authorization'][character]\n // by default all quests is authorized\n let a = true\n data['backstories'][character]['backstory'].map((bkId) => {\n // if backstory exist in bk file\n if (bk[bkId]) {\n // if quest id exist in backstory bk file\n if (bk[bkId].includes(quest['id'])) {\n a = false\n }\n }\n\n })\n obj[season['name']]['story'][storyName]['quests'][quest['id']]['authorization'][character] = a\n\n })\n }\n })\n }\n })\n })\n\n // return the map\n return obj\n }", "function citasProcessData(serverData) {\n processData(serverData);\n }", "function setMap(){\n \n //map frame dimensions\n var width = 960;\n var height = 700;\n \n //create a new svg element with the above dimensions\n var svg = d3.select(\"body\")\n .append(\"svg\")\n .attr(\"width\", width)\n .attr(\"height\", height);\n \n var map = svg.append(\"g\").call(d3.zoom()\n .scaleExtent([1/2, 4])\n .on(\"zoom\", zoomed));\n \n function zoomed() {\n map.attr(\"transform\", d3.event.transform);\n }\n \n //create projection centered on Japan\n var projection = d3.geoMercator()\n .center([138.3, 39.2])\n .scale(1500)\n .translate([width / 2, height / 2 -100]);\n \n var path = d3.geoPath()\n .projection(projection);\n \n //use queue to parallelize asynchronous data\n d3.queue()\n .defer(d3.csv, \"data/prefectureData1.csv\") //load attributes from csv\n .defer(d3.json, \"data/prefectures.json\")//load geometry\n .await(callback); //trigger callback function once data is loaded\n \n function callback(error, csvData, japanData){\n \n var recolorMap = colorScale(csvData);\n \n //variables for csv to json data transfer\n var jsonPrefectures = japanData.objects.prefectures.geometries;\n \n //loop through csv to assign each csv values to json prefecture\n for (var i=0; i<csvData.length; i++) {\n var csvPrefecture = csvData[i]; //the current prefecture\n var csvId = csvPrefecture.name; //name (name of prefecture)\n var number = 1;\n //loop through json prefectures to find the right prefecture\n for (var a=0; a<48; a++) {\n //where id match, attach csv to json object\n if (jsonPrefectures[a].properties.id == csvId) {\n //assign key/value pair\n \n for (var key in keyArray) {\n var attr = keyArray[key];\n var val = parseFloat(csvPrefecture[attr]);\n jsonPrefectures[a].properties[attr] = val;\n };\n \n //jsonPrefectures[a].properties.name = csvPrefecture.name;\n break;\n \n };\n \n };\n \n };\n \n //add prefectures as enumeration units colored by data\n var prefectures = map.selectAll(\".prefectures\")\n .data(topojson.feature(japanData, japanData.objects.prefectures).features)\n .enter().append(\"path\")\n .attr(\"class\", \"prefectures\")\n .attr(\"id\", function(d) { return d.properties.id })\n .attr(\"d\", path)\n .style(\"fill\", function(d) {\n return choropleth(d, recolorMap);\n })\n .on(\"mouseover\", highlight)\n .on(\"mouseout\", dehighlight)\n .on(\"mousemove\", moveLabel)\n .append(\"desc\") //append current color\n .text(function(d) {\n return choropleth(d, recolorMap);\n });\n \n createDropdown(csvData);\n \n console.log(jsonPrefectures);\n };\n }", "function processSystem(system) {\n\treturn new Promise(function (resolve, reject) {\n\t\tvar patterns = [\n\t\t\t// Only report on No-Intro and custom DATs.\n\t\t\t//'libretro-database/metadat/goodtools/' + system + '.dat',\n\t\t\t//'libretro-database/metadat/libretro-dats/' + system + '.dat',\n\t\t\t'libretro-database/metadat/mame/' + system + '.dat',\n\t\t\t'libretro-database/metadat/mame-split/' + system + '.dat',\n\t\t\t'libretro-database/metadat/mame-member/' + system + '.dat',\n\t\t\t'libretro-database/metadat/redump/' + system + '.dat',\n\t\t\t'libretro-database/metadat/tosec/' + system + '.dat',\n\t\t\t'libretro-database/metadat/no-intro/' + system + '.dat',\n\t\t\t'libretro-database/dat/' + system + '.dat'\n\t\t]\n\t\tglobby(patterns).then(function (paths) {\n\t\t\tvar promises = []\n\t\t\tfor (var i in paths) {\n\t\t\t\tvar file = paths[i]\n\t\t\t\t// TODO: Fix the MAME.dat parsing.\n\t\t\t\tif (file.indexOf('MAME.dat') < 0) {\n\t\t\t\t\tpromises.push(datfile.parseFile(file, {\n\t\t\t\t\t\tignoreHeader: true\n\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t}\n\t\t\tresolve(Promise.all(promises))\n\t\t}).catch(function (err) {\n\t\t\treject(new Error(err))\n\t\t})\n\t})\n}", "function get_sample_meta(id) {\n var form = sample_forms[id];\n var sample_input_fields = meta_input_fields.samples[id];\n\n var sample_meta = {};\n sample_meta['meta'] = {};\n\n sample_meta['name'] = sample_input_fields['name'].val();\n sample_meta.meta['description'] = sample_input_fields.meta['description']\n .val();\n\n // Get contributors.\n sample_meta.meta['contributors'] = [];\n for (var i = 0; i < sample_contributor_fields[id].length; i++) {\n var field = sample_contributor_fields[id][i];\n var contributor = field.children('input').val();\n\n if (contributor != '' && contributor != null) {\n sample_meta.meta['contributors'].push(contributor);\n }\n }\n\n // Get characteristics.\n sample_meta.meta['chars'] = {};\n for (var i = 0; i < sample_characteristic_fields[id].length; i++) {\n var field = sample_characteristic_fields[id][i];\n var char = field.children('input:nth-of-type(1)').val();\n var detail = field.children('input:nth-of-type(2)').val();\n\n // Add to dictionary only if both char and detail is populated.\n if (char != '' && char != null && detail != '' && detail != null) {\n sample_meta.meta['chars'][char] = detail;\n }\n }\n\n sample_meta.meta['source'] = sample_input_fields.meta['source'].val();\n sample_meta['type'] = parseInt(sample_input_fields['type']\n .find('input:checked').val());\n\n // If reads are paired-end, we need to replace the reads dictionary as well.\n if (sample_meta['type'] == 2) {\n sample_meta['reads'] = [];\n for (var i = 0; i < sample_pair_fields[id].length; i++) {\n var field = sample_pair_fields[id][i];\n var pair_1 = field.children('select:nth-of-type(1)').val();\n var pair_2 = field.children('select:nth-of-type(2)').val();\n\n var pair = [pair_1, pair_2];\n sample_meta['reads'].push(pair);\n }\n }\n\n // Parse organism.\n var org = sample_input_fields['organism'].val();\n if (org != '' && org != null) {\n var split = org.split('_');\n sample_meta['organism'] = split[0] + '_' + split[1];\n sample_meta['ref_ver'] = split.slice(2).join('_');\n } else {\n sample_meta['organism'] = '';\n sample_meta['ref_ver'] = '';\n }\n\n var length = sample_input_fields['length'].val();\n if (length != '' && length != null) {\n sample_meta['length'] = parseInt(length);\n } else {\n sample_meta['length'] = 0;\n }\n\n var stdev = sample_input_fields['stdev'].val();\n if (stdev != '' && stdev != null) {\n sample_meta['stdev'] = parseInt(stdev);\n } else {\n sample_meta['stdev'] = 0;\n }\n\n return sample_meta;\n}" ]
[ "0.60182375", "0.53649324", "0.51267236", "0.5099687", "0.5051486", "0.5050544", "0.50472206", "0.49357596", "0.4868669", "0.48440567", "0.48330766", "0.4827659", "0.47482184", "0.47293627", "0.46967876", "0.46754628", "0.4672893", "0.46518546", "0.4643247", "0.46176526", "0.46112093", "0.46099943", "0.46092737", "0.46082747", "0.46010667", "0.45992267", "0.45954058", "0.45805064", "0.45781222", "0.45768115", "0.45579505", "0.45576918", "0.45575044", "0.45454776", "0.45427635", "0.45426837", "0.45257306", "0.45233276", "0.4517686", "0.45162335", "0.45126534", "0.45078152", "0.4505744", "0.447856", "0.44689012", "0.44680038", "0.44634742", "0.44598016", "0.44565496", "0.44447458", "0.44399846", "0.44350216", "0.4431266", "0.442471", "0.44230863", "0.44152218", "0.4412487", "0.44110674", "0.44084156", "0.44059825", "0.4396204", "0.43888837", "0.43826842", "0.43812868", "0.4381209", "0.43806535", "0.43748254", "0.4366025", "0.4351958", "0.43465453", "0.43455014", "0.43390206", "0.4334973", "0.43316483", "0.43307832", "0.43254885", "0.432232", "0.43210799", "0.43207365", "0.4317865", "0.4308339", "0.43069273", "0.43026343", "0.43023172", "0.43005875", "0.42996415", "0.42985818", "0.42916423", "0.42885327", "0.42849842", "0.42817986", "0.428159", "0.42809552", "0.42769822", "0.42745608", "0.42705885", "0.42702192", "0.42696378", "0.4262848", "0.42617425" ]
0.6727379
0
Singletons reduce the need for global variables which is particularly important in JavaScript because it limits namespace pollution and associated risk of name collisions. used to limit the instances of an object
function Process (state) { this.state = state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getInstances() {}", "function getGlobalSingleton(name, creator, obj) {\n\t const gbl = (obj || GLOBAL_OBJ) ;\n\t const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n\t const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n\t return singleton;\n\t}", "function Singleton4(){\n var instance;\n\n this.toString = function(){\n return \"Singleton4\";\n };\n\n Singleton4 = function() {\n return instance;\n };\n\n instance = this;\n}", "function getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n }", "static get instance() {\n // Set object isn't first create\n this._firstCreateFlag = false;\n // Class.instance, use static attribute to retrieve instance\n // In here, this is class defined.\n if (typeof instances[this.appName] === \"undefined\" || instances[this.appName] === null) {\n instances[this.appName] = new this();\n }\n return instances[this.appName];\n }", "function Utils() {\n // All of the normal singleton code goes here.\n }", "function Universe() {\n if (typeof Universe.instance === \"object\") {\n return Universe.instance;\n }\n //some function\n this.bang = \"Big\";\n //cache instance\n Universe.instance = this;\n return this;\n}", "function getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}", "function Singleton() {\n if (instance) {\n return instance;\n }\n instance = this;\n //Singleton initialization code\n //this.socket = null;\n this.observer_list = new LinkedList();\n }", "function UniverseYet() {\n //cache instance\n var instance = this;\n //some function\n this.bang = \"Big\";\n UniverseYet = function () {\n return instance;\n };\n}", "static get Instance() {\n return this._instance || (this._instance = new this());\n }", "_makeGlobal() {\n try{\n if(window && !window.Filteredlist) {window['Filteredlist'] = {};}\n if(window && window.Filteredlist && !window.Filteredlist.instance) {window.Filteredlist.instance = {};}\n\n window.Filteredlist.instance[this.options.id || Math.random()*10000] = this;\n }catch(e){}\n }", "static get inst(){\n return this.instance || new this();\n }", "function Singleton3(){\n if(!Singleton3.instance){\n Singleton3.instance = this;\n }\n this.toString = function(){\n return \"Singleton3\";\n };\n return Singleton3.instance;\n}", "function Multiton(limit) {\n let instances = [];\n // instance Constructor scoped to outer Constructor\n function Instance() {\n this.prop = 'value';\n this.someMethod = function () {\n /* ... */\n }\n }\n return {\n getInstance() {\n // instantiate n objects one time only\n if (instances.length === 0) {\n for (let i = 0; i < limit; i++) {\n instances.push(new Instance());\n }\n }\n // randomly access on of the instances\n // could easily be modified to return a specific instance (directory of singletons)\n const random = Math.floor(Math.random() * limit);\n return instances[random];\n }\n }\n}", "static get instance() {\n if (!this[_setterDictionarySingleton]) {\n this[_setterDictionarySingleton] = new SetterDictionarySingleton(_setterDictionarySingleton);\n }\n\n return this[_setterDictionarySingleton];\n }", "static getInstance(){\n if(instance === undefined){\n instance = new EventsSingleton();\n }\n return instance;\n }", "static getInstance(){\n return this.instance\n }", "initInstances() {\n // Instantiate Singletons\n Metrics.getInstance();\n MetricsManager.getInstance();\n\n setPeer(Peer.getInstance());\n\n const notificationManager = NotificationManager.getInstance();\n notificationManager.setAppTitle(this.scope['appName']);\n\n OnboardingManager.PATH = this.scope['path'];\n OnboardingManager.getInstance();\n\n const pluginManager = PluginManager.getInstance();\n pluginManager.listenOnce(GoogEventType.LOAD, this.onPluginsLoaded, false, this);\n }", "function Global()\n{\n // allows omitting `new` keyword, consistent with ease.js style\n if ( !( this instanceof Global ) )\n {\n return new Global();\n }\n\n // do not pollute the global scope (previously, _the_global was used as\n // the prototype for a new object to take advantage of native overrides,\n // but unfortunately IE<=8 did not support this and always returned\n // undefined values from the prototype).\n this._alt = {};\n}", "function Global()\n{\n // allows omitting `new` keyword, consistent with ease.js style\n if ( !( this instanceof Global ) )\n {\n return new Global();\n }\n\n // do not pollute the global scope (previously, _the_global was used as\n // the prototype for a new object to take advantage of native overrides,\n // but unfortunately IE<=8 did not support this and always returned\n // undefined values from the prototype).\n this._alt = {};\n}", "static INSTANCE() {\n if (!Server.instance) {\n Server.instance = new Server();\n }\n\n return Server.instance;\n }", "constructor(){\n if(!Singleton.instance){\n Singleton.instance = new Logger();\n }\n }", "function createSingleton(createObject){\n return (function () {\n var instance;\n \n function createInstance() {\n var object = createObject();\n return object;\n }\n \n return {\n getInstance: function () {\n if (!instance) {\n instance = createInstance();\n }\n return instance;\n }\n };\n })();\n }", "function createSingleton(createObject){\n return (function () {\n var instance;\n \n function createInstance() {\n var object = createObject();\n return object;\n }\n \n return {\n getInstance: function () {\n if (!instance) {\n instance = createInstance();\n }\n return instance;\n }\n };\n })();\n }", "static Instantiate() {}", "static Instantiate() {}", "static Instantiate() {}", "static Instantiate() {}", "static Instantiate() {}", "static Instantiate() {}", "static getInstance(){\r\n if(this.instance==null){\r\n\r\n this.instance=new GenratShortener();\r\n\r\n return this.instance;\r\n }else {\r\n\r\n return this.instance;\r\n }\r\n\r\n }", "static get instance() {\n if (!this[_scriptsSingleton]) {\n this[_scriptsSingleton] = new ScriptsSingleton(_scriptsSingleton);\n }\n\n return this[_scriptsSingleton];\n }", "static getInstance() {\n return CSRankings.theInstance;\n }", "constructor() {\n if (!SingletonNetHandler.instance) {\n SingletonNetHandler.instance = new NetHandler(); //deve avvenire solo la prima volta e non ripetersi per fare in modo che il singleton sia garantito\n }\n }", "getInstance() {\n if (!instance) instance = init();\n\n return instance;\n }", "static getInstance() {\n if (!Singleton.instance) {\n Singleton.instance = new Singleton();\n }\n return Singleton.instance;\n }", "static definition() {\n this.instanceVariables = []\n this.assumes = [WidgetBuilder]\n }", "static get instance() {\n if (!this[_attributeDictionarySingleton]) {\n this[_attributeDictionarySingleton] = new AttributeDictionarySingleton(_attributeDictionarySingleton);\n }\n\n return this[_attributeDictionarySingleton];\n }", "static getInstance() {\n /**\n * Check if singleton is not exist, this will initailze the new one\n * and return if it existed\n *\n * When initalize successful, default configuration will be step up here\n */\n\n if (!AxiosSingleton.instance) {\n AxiosSingleton.instance = axios.create();\n const ACCESS_TOKEN = getLocalStorage('accessToken');\n AxiosSingleton.instance.defaults.headers.common[\n 'Authorization'\n ] = `Bearer ${ACCESS_TOKEN}`;\n // AxiosSingleton.instance.defaults.timeout = 2500;\n }\n\n return AxiosSingleton.instance;\n }", "static Instance() {\n return new Server();\n }", "static get inst() {\n if (_inst == null)\n _inst = new GRoot();\n return _inst;\n }", "function initInstance()\r\n{\r\n\t// Clear all timers\r\n\tif (timers[instance] !== undefined)\r\n\t{\r\n\t\tfor (idx in timers[instance])\r\n\t\t{\r\n\t\t\tclearInterval(timers[instance][idx]);\r\n\t\t}\r\n\t}\r\n\r\n\t// Create a new instance and timer container\r\n\tinstance++;\r\n\r\n\ttimers[instance] = new Array();\r\n}", "static getInstance() {\n // check if an instance of the class is already created\n if (!AppInfo.singleton) {\n // If not created create an instance of the class\n // store the instance in the variable\n AppInfo.singleton = new AppInfo();\n }\n // return the singleton object\n return AppInfo.singleton;\n }", "static get instances() {\n return instances;\n }", "static instance() {\n const PublisherSingletonSymbol = Symbol.for('app.pi-weather-station.csv-publisher');\n return Object.getOwnPropertySymbols(global).indexOf(PublisherSingletonSymbol) >= 0 ?\n global[PublisherSingletonSymbol] : (global[PublisherSingletonSymbol] = new CsvPublisher());\n }", "setSingletonInstance(/**@type {Boolean}*/override = false){\n\n\t\tif(!!Game.instance){\n\n\t\t\tConsole.log(\"Global Game singleton instance already declared\");\n\t\t\tif(override){\n\n\t\t\t\tConsole.log(\"... singleton instance overriden\");\t\n\t\t\t\tGame.instance = this;\n\t\t\t}\n\t\t}\n\t\telse{\n\n\t\t\tGame.instance = this;\n\t\t}\n\t}", "constructor() {\n if (singletonInstance) {\n return singletonInstance;\n }\n this.throttleTimeout_ = null;\n this.debounceErrors_ = false;\n this.isConnected = false;\n this.eventHandler = function(type, opt_data) {};\n singletonInstance = this;\n return singletonInstance;\n }", "static get NEWTON_ITERATIONS() { return 4; }", "static initialize(obj) {}", "static initialize(obj) {}", "function Hypodermic(configs) {\n\t\tconfigs = configs || {};\n\n\t\tconfigs[this.constructor.me] = {\n\t\t\tclassName: this.constructor.className,\n\t\t\tsingleton: true\n\t\t};\n\n\t\tthis._configs = configs;\n\t\tthis._singletons = {};\n\t\tthis._singletons[this.constructor.me] = this;\n\t\tconfigs = null;\n\t}", "get UseGlobal() {}", "function ObjectUtils() {\n var instance;\n /**\n * Returns true if objects are equal\n * @return {boolean}\n * @param {object} obj1\n * @param {object} obj2\n * @memberof module:ObjectUtils\n * @instance\n */\n\n function areEqual(obj1, obj2) {\n return fast_deep_equal__WEBPACK_IMPORTED_MODULE_1___default()(obj1, obj2);\n }\n\n instance = {\n areEqual: areEqual\n };\n return instance;\n}", "static new() {\n let g = new this();\n g.init();\n return g;\n }", "static initializeInstances() {\n [\n () => EventManager.getInstance(),\n () => AppDispatcher.getInstance(),\n () => DialogStore.getInstance(),\n () => GameStore.getInstance(),\n () => ScreenStore.getInstance(),\n () => AppInput.getInstance()\n ].forEach(task => task());\n }", "function constructGlobal() {\n\t\tvar library;\n\n\t\t//create a library instance\n\t\tlibrary = init();\n\t\tlibrary.noConflict('KeyboardJS', 'k');\n\n\t\t//spawns a library instance\n\t\tfunction init() {\n\t\t\tvar library, namespaces = [], previousValues = {};\n\n\t\t\tlibrary = factory('global');\n\t\t\tlibrary.fork = init;\n\t\t\tlibrary.noConflict = noConflict;\n\t\t\treturn library;\n\n\t\t\t//sets library namespaces\n\t\t\tfunction noConflict( ) {\n\t\t\t\tvar args, nI, newNamespaces;\n\n\t\t\t\tnewNamespaces = Array.prototype.slice.apply(arguments);\n\n\t\t\t\tfor(nI = 0; nI < namespaces.length; nI += 1) {\n\t\t\t\t\tif(typeof previousValues[namespaces[nI]] === 'undefined') {\n\t\t\t\t\t\tdelete context[namespaces[nI]];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext[namespaces[nI]] = previousValues[namespaces[nI]];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tpreviousValues = {};\n\n\t\t\t\tfor(nI = 0; nI < newNamespaces.length; nI += 1) {\n\t\t\t\t\tif(typeof newNamespaces[nI] !== 'string') {\n\t\t\t\t\t\tthrow new Error('Cannot replace namespaces. All new namespaces must be strings.');\n\t\t\t\t\t}\n\t\t\t\t\tpreviousValues[newNamespaces[nI]] = context[newNamespaces[nI]];\n\t\t\t\t\tcontext[newNamespaces[nI]] = library;\n\t\t\t\t}\n\n\t\t\t\tnamespaces = newNamespaces;\n\n\t\t\t\treturn namespaces;\n\t\t\t}\n\t\t}\n\t}", "constructor() {\n /**\n * Set of registered bindings.\n *\n * A binding is a definition of how to create an object and an\n * identifier for that object within the container.\n *\n * @private\n * @type {Map.<string, {factory: Function, singleton: boolean}>}\n */\n this.bindings = new Map();\n\n /**\n * Set of concrete object instances.\n *\n * @private\n * @type {Map.<string, *>}\n */\n this.instances = new Map();\n\n /**\n * Set of aliases for bindings or instances.\n *\n * @private\n * @type {Map.<string, string>}\n */\n this.aliases = new Map();\n }", "constructor(thisGlobalInstance) {\n\n this.thisContainer = thisGlobalInstance;\n }", "static i(newInst = false, ...rest : any[]) {\n let className = '';\n if (typeof newInst === \"string\") {\n className = newInst;\n newInst = false;\n } else {\n className = this;\n }\n return ObjectRegistry.getInstance(className, !newInst, ...rest);\n }", "function PrefGlobal()\n{\n this.networks = new Object();\n this.commandManager = new Object();\n this.commandManager.defineCommand = function() {};\n this.commandManager.removeCommand = function() {};\n this.entities = new Object();\n this.hostCompat = new Object();\n}", "function dic() {\n // initialize on first use\n if (typeof $.dic === 'undefined') {\n $.dic = {\n KEY_ENTER: 13,\n\n // local cache, used to store service objects\n cache: {},\n\n /**\n *\n * @param name\n * @returns {object}\n */\n getService(name) {\n // lazy load\n if (!this.cache[name]) {\n const object = {};\n\n // variable class name is processed by eval (class name is not user input)\n eval('object = new '.concat(name, '();'));\n\n this.cache[name] = object;\n }\n\n return this.cache[name];\n },\n\n // sugar functions down below\n\n /**\n * @returns {ApiManager}\n */\n apiManager() {\n return this.getService('ApiManager');\n },\n\n /**\n * @returns {NotificationsManager}\n */\n notificationsManager() {\n return this.getService('NotificationsManager');\n },\n\n /**\n * @returns {BodyData}\n */\n bodyData() {\n return this.getService('BodyData');\n },\n\n /**\n * @returns {BBcode}\n */\n bbCode() {\n return this.getService('BBcode');\n },\n };\n }\n\n return $.dic;\n }", "initInstance() {\n this.instance = {};\n this.instance.epiHiperSchema = '';\n this.instance.diseaseModel = {};\n this.instance.sets = [];\n this.instance.variables = [];\n this.instance.initializations = [];\n this.instance.triggers = [];\n this.instance.interventions = [];\n this.instance.traits = [];\n this.instance.personTraitDBs = [];\n this.instance.network = {};\n this.instance.runParameters = {};\n }", "static get instance() {\n // SI existe, regresa la instancia, sino, this._instance = new this(), que va a crear una nueva conexion.\n // Si no existe, va a llamar al constructor para que cree la instancia, y eso se va a almacenar en la instancia\n return this._instance || (this._instance = new this());\n // Asi va establecer que cuando se llame muchas veces al get instance, siempre se utilice la misma instancia definida\n }", "static get instance() {\n if (!this[_eventManagerSingleton]) {\n this[_eventManagerSingleton] = new EventManagerSingleton(_eventManagerSingleton);\n }\n\n return this[_eventManagerSingleton];\n }", "function init() {\n\t\t\tvar library, namespaces = [], previousValues = {};\n\n\t\t\tlibrary = factory('global');\n\t\t\tlibrary.fork = init;\n\t\t\tlibrary.noConflict = noConflict;\n\t\t\treturn library;\n\n\t\t\t//sets library namespaces\n\t\t\tfunction noConflict( ) {\n\t\t\t\tvar args, nI, newNamespaces;\n\n\t\t\t\tnewNamespaces = Array.prototype.slice.apply(arguments);\n\n\t\t\t\tfor(nI = 0; nI < namespaces.length; nI += 1) {\n\t\t\t\t\tif(typeof previousValues[namespaces[nI]] === 'undefined') {\n\t\t\t\t\t\tdelete context[namespaces[nI]];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext[namespaces[nI]] = previousValues[namespaces[nI]];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tpreviousValues = {};\n\n\t\t\t\tfor(nI = 0; nI < newNamespaces.length; nI += 1) {\n\t\t\t\t\tif(typeof newNamespaces[nI] !== 'string') {\n\t\t\t\t\t\tthrow new Error('Cannot replace namespaces. All new namespaces must be strings.');\n\t\t\t\t\t}\n\t\t\t\t\tpreviousValues[newNamespaces[nI]] = context[newNamespaces[nI]];\n\t\t\t\t\tcontext[newNamespaces[nI]] = library;\n\t\t\t\t}\n\n\t\t\t\tnamespaces = newNamespaces;\n\n\t\t\t\treturn namespaces;\n\t\t\t}\n\t\t}", "static initialize(obj) {\n }", "static initialize(obj) {\n }", "static initialize(obj) {\n }", "static initialize(obj) {\n }", "static initialize(obj) {\n }", "static initialize(obj) {\n }", "static initialize(obj) {\n }", "static initialize(obj) {\n }", "static get MONGO() { return INSTANCE; }", "constructor() {\n if (singletonInstance) {\n return singletonInstance;\n }\n this.client = null;\n this.isConnected = false;\n this.eventHandler = function(type, opt_data) {};\n singletonInstance = this;\n return singletonInstance;\n }", "function Universe() {\n var instance;\n \n Universe = function() {\n\t return instance; // si instance = undefined retorna this (si invocat amb new)\n };\n\n Universe.prototype = this;\n\n instance = new Universe();\n\n this.constructor = Universe;\n\n instance.start_time = 0;\n instance.bang = \"Big\";\n\n return instance;\n}", "instances() {\n }", "constructor() {\n\t\tif (!instance) { instance = this }\n\n\t\treturn instance\n\t}", "function ObjectPool() {\n return;\n }", "function getRootInstance() {\n // f0. declared variable\n const win = getRootWindow();\n let result = instances;\n if (win) {\n // let firstCreateFlag = false;\n const event = new CustomEvent(\"SingletonRetrieveInstances\", {\"instances\": null});\n if (win === window) {\n // f1. if owner window is root, add event listancer\n // f1-1. create root instance mapping\n result = instances;\n // f1-2. add event listancer, that children could retrieve instance mapping\n win.addEventListener(event.type, ($event) => {\n $event.instances = instances;\n });\n } else {\n // f2. if owner window is not root, retrieve instance mapping from root by custom event.\n // f2-1. retrieve instance mapping object, if right window is children window.\n win.dispatchEvent(event);\n result = event.instances;\n }\n }\n return result;\n}", "function databaseSingletonTest(){\n var databaseOne = DatabaseSingleton.getInstance();\n var databaseTwo = DatabaseSingleton.getInstance();\n ///Here I log whether the two objects are similar or different.\n console.log(\"Same Database Instance? \" + (databaseOne===databaseTwo))\n\n\n\n }", "function UniverseYett() {\n //cache\n var instance;\n //change the constructor\n UniverseYett = function () {\n return instance;\n };\n //save the prototype\n UniverseYett.prototype = this;\n //instance\n instance = new UniverseYett();\n //reset instance constructor\n instance.constructor = UniverseYett;\n //some function\n this.bang = \"Big\";\n return instance;\n}", "function vjObjGlobalMapper()\n{\n this.find=function(container)\n {\n return this[container];\n };\n this.register=function(container, obj)\n {\n this[container]=obj;\n };\n this.unregister=function(container){\n delete this[container];\n };\n}", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }", "static initialize(obj) { \n }" ]
[ "0.7317474", "0.67109156", "0.67099917", "0.6657178", "0.66014254", "0.6596127", "0.65407056", "0.65263945", "0.65045744", "0.6471072", "0.6416741", "0.641034", "0.63688946", "0.62925243", "0.6249524", "0.6154226", "0.61505175", "0.61474687", "0.61303204", "0.6113948", "0.6113948", "0.6101922", "0.60875165", "0.60263866", "0.60263866", "0.6005538", "0.6005538", "0.6005538", "0.6005538", "0.6005538", "0.6005538", "0.5995084", "0.59797776", "0.59782773", "0.594445", "0.5928926", "0.5919939", "0.5905398", "0.5882155", "0.5869638", "0.58603585", "0.5829957", "0.5825883", "0.58103126", "0.58072793", "0.58068985", "0.57996553", "0.57971144", "0.57929564", "0.57576466", "0.57576466", "0.5736075", "0.57317835", "0.57273865", "0.57231563", "0.5703041", "0.56936044", "0.56624186", "0.5647372", "0.56400484", "0.56307226", "0.5612009", "0.55958813", "0.5589024", "0.5568504", "0.5555672", "0.55447835", "0.55447835", "0.55447835", "0.55447835", "0.55447835", "0.55447835", "0.55447835", "0.55447835", "0.55443996", "0.5540494", "0.55396193", "0.55369943", "0.5533112", "0.5528256", "0.55266", "0.5524738", "0.5520974", "0.5512732", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444", "0.55089444" ]
0.0
-1
alert("This is utilities."); Create, using random number generation, an objectID that has twenty alpha characters. Each five tuple is separated with a hyphen.
function getObjectID() { var objectID = ""; for ( var i=1; i<21; i++ ) { objectID += String.fromCharCode(Math.floor(Math.random()*26) + 97); if ( i<20 && (i % 5) == 0 ) objectID += "-"; } return objectID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeid()\r\n{\r\n var text = \"\";\r\n var possibleChar = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n var possibleDigit = \"0123456789\";\r\n\r\n getChar = function(list) {\r\n return list.charAt(Math.floor(Math.random() * list.length));\r\n }\r\n\r\n for( var i=0; i < 3; i++ ) {\r\n text += getChar(possibleChar);\r\n }\r\n\r\n text += '-';\r\n\r\n for( var i=0; i < 3; i++ ) {\r\n text += getChar(possibleDigit);\r\n }\r\n\r\n return text;\r\n}", "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for( var i=0; i < 5; i++ )\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n }", "function makeid() {\r\n var text = \"\";\r\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n\r\n for (var i = 0; i < 5; i++)\r\n text += possible.charAt(Math.floor(Math.random() * possible.length));\r\n\r\n return text;\r\n}", "function makeid() {\n var text = \"\";\n var possibleAlpha = \"ABCDEFGHJKLMNPQRSTUVWXYZ\";\n var possibleNum = \"0123456789\";\n var possibleEnding = \"ABCDEFGHJKLMNPQRSTUVWXYZ0123456789\";\n text += possibleAlpha.charAt(Math.floor(Math.random() * possibleAlpha.length));\n\n for (var i = 0; i < 5; i++){\n text += possibleNum.charAt(Math.floor(Math.random() * possibleNum.length));\n }\n\n text += possibleEnding.charAt(Math.floor(Math.random() * possibleEnding.length));\n\n return text;\n}", "function makeid()\n{\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for( var i=0; i < 5; i++ )\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n}", "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (var i = 0; i < 5; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text + Math.floor(Math.random() * 99999);\n}", "function makeid() {\n var text = '';\n var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n \n for (var i = 0; i < 5; i++) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n }", "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for( var i=0; i < 5; i++ )\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n}", "function makeid()\n {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n\n for( var i=0; i < 5; i++ )\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n }", "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (var i = 0; i < 5; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n}", "function makeid() {\n var text = '';\n var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for ( var i=0; i < 5; i++ ) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n }", "function makeid() {\n var text = '';\n var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for ( var i=0; i < 5; i++ ) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n }", "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for( var i=0; i < 5; i++ )\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n}", "function makeid() {\n\t\tvar text = \"\";\n\t\tvar possible =\n\t\t\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n\t\tfor (var i = 0; i < 5; i++)\n\t\t\ttext += possible.charAt(\n\t\t\t\tMath.floor(Math.random() * possible.length)\n\t\t\t);\n\n\t\treturn text;\n\t}", "generateID(){\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (var i = 0; i < 5; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n }", "function makeid() {\n var possible = \"ABCDEFG HIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n var text = \"\";\n for( var i=0; i < 5; i++ )\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n}", "function creatID() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n}", "function createId() {\n\tvar text = \"\";\n\tvar possible = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n\tfor( var i=0; i < 10; i++ )\n\t\ttext += possible.charAt(Math.floor(Math.random() * possible.length));\n\treturn text;\n}", "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for( var i=0; i < 6; i++ )\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n }", "function makeid(){\n\t\tvar text = \"\";\n\t\tvar possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\t\tfor( var i=0; i < 4; i++ )\n\t\t\ttext += possible.charAt(Math.floor(Math.random() * possible.length));\n\t\treturn text;\n\t}", "function makeID() {\n var newId = \"\";\n var idOptions = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n \n for (var i = 0; i < 5; i++) {\n newId += idOptions.charAt(Math.floor(Math.random() * idOptions.length));\n } \n return newId;\n }", "function makeId() {\n let text = \"\";\n const possible = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (let i = 0; i < 5; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n}", "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (var i = 0; i < 6; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n}", "function generateID()\n {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for( var i=0; i < 3; i++ )\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n }", "function createRandomId() {\n var text = '';\n var possible =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var possibleLength = possible.length;\n for (var i = 0; i < 5; i++) {\n text += possible.charAt(Math.floor(Math.random() * possibleLength));\n }\n return text;\n}", "function makeid(){\n var text = \"\";\n var possible = \"ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789\";\n\n for( var i=0; i < 4; i++ )\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n}", "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (var i = 0; i < 20; i++) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n}", "function randomID(suff='whoobe'){\n return suff + '-' + Math.random().toString(36).substr(2, 5)\n}", "generateId() {\n let text = \"\";\n let possible =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (let i = 0; i < 5; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n }", "function makeid()\n{\n\tvar text = \"\";\n\tvar possible = \"ABCDEF0123456789\";\n\tfor(var i=0;i<6;i++)\n\t\ttext += possible.charAt(Math.floor(Math.random() * possible.length));\n\treturn text;\n}", "function createID(){\n\treturn '_' + Math.random().toString(36).substr(2, 9);\n}", "function makeId() {\n return \"_\" + (\"\" + Math.random()).slice(2, 10); \n }", "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (var i = 0; i < 8; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n }", "function generateRandomId() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (var i = 0; i < 5; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n}", "function makeid() {\n\tvar result = '';\n\tvar characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\tvar charactersLength = characters.length;\n\t// add 12 characters - letters or digits\n\tfor ( var i = 0; i < 12; i++ ) {\n\t result += characters.charAt(Math.floor(Math.random() * charactersLength));\n\t}\n\treturn result;\n}", "function getID() {\n\tvar tmp = Math.round(Math.random() * 100000);\n\tvar str = \"OBJ\" + tmp;\n\treturn str;\n}", "function getID() {\n return '_' + Math.random().toString(36).substr(2, 9);\n}", "function createId() {\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for ( var i = 0; i < 22; i++ ) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}", "function createId() {\r\n return (\r\n Math.floor(Math.random() * 10000000) +\r\n \"-\" +\r\n Math.floor(Math.random() * 10000000)\r\n );\r\n }", "function createCustomId() {\n\n\tvar customId = \"E\";\n\tvar lettersArray = [\"A\", \"a\", \"B\", \"b\", \"C\", \"d\", \"E\", \"e\", \"F\", \"f\", \"G\", \"g\", \"H\", \"h\", \"I\", \"i\", \"J\", \"j\", \"K\", \"k\", \"L\", \"l\", \"M\", \"m\", \"N\", \"n\", \"O\", \"o\", \"P\", \"p\", \"Q\", \"q\", \"R\", \"r\", \"S\", \"s\", \"T\", \"t\", \"U\", \"u\", \"V\", \"v\", \"W\", \"w\", \"X\", \"x\", \"Y\", \"y\", \"Z\", \"z\"];\n\tvar numbersArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0];\n\tfor(var i = 0; i < 12; i++) {\n\t\t\n\t\tvar letter = Math.floor(Math.random() * lettersArray.length);\n\t\tvar customIdLetter = lettersArray[letter];\n\n\t\tvar number = Math.floor(Math.random() * numbersArray.length);\n\t\tvar customIdNumber = numbersArray[number];\n\n\t\tcustomId = customId + customIdLetter + customIdNumber;\n\t}\n\tconsole.log(\"the new custom id: \", customId);\n\treturn customId;\n}", "function makeId(){\n var text = ''\n , possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n ;\n\n for (var i = 0; i < 8; i++){\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n}", "function ID() {\n return Math.random().toString(36).substr(2, 10) + Math.random().toString(36).substr(2, 5);\n}", "function randomID() {\n var id = \"\";\n for ( var i = 1; i <= 10; i++){\n id += (Math.floor(Math.random() * 10) + 1);\n }\n return id;\n }", "function randomID(){\n return 'moka-' + Math.random().toString(36).substr(2, 5)\n}", "function generateStudentID() {\n\treturn \"ID#\" + Math.floor(Math.random()*10000);\n}", "function generateUniqueId() {\n\t\t\tvar format = \"xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx\";\n\t\t\tvar result = \"\";\n\t\t\tfor(var i = 0; i < format.length; i++) {\n\t\t\t\tif(format.charAt(i) == \"-\") {\n\t\t\t\t\tresult += \"-\";\n\t\t\t\t} else {\n\t\t\t\t\tresult += Math.floor(Math.random() * 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}", "function generateRandomId() {\n const alphaNum = \"abcdefghigklmnopqrstuvwxyz1234567890\";\n let str = \"\";\n for (let i = 0; i <= 6; i++) {\n str += alphaNum[random(0, 35)];\n }\n return str;\n}", "function id () {\n return '_' + Math.random().toString(36).substr(2, 9);\n}", "makeid () {\n let text = \"\";\n const possible = \"0123456789\";\n\n for (var i = 0; i < 4; i++){\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n\n this.userid = text;\n }", "function generateID()\n{\n\tvar text = \"\";\n\tvar characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\t\n\tfor (var i = 0; i < 8; i++)\n\ttext += characters.charAt(Math.floor(Math.random() * characters.length));\n\tconsole.log(text);\n\treturn text;\n}", "function newID(){\n id = Math.floor(Math.random()*90+10).toString() + Math.floor(Math.random()*90+10).toString() + Math.floor(Math.random()*90+10).toString()\n console.log(\"ID: \" + id)\n}", "function createUUID()\n{\n var result, i, j;\n result = '';\n for(j=0; j<32; j++)\n {\n if( j == 8 || j == 12|| j == 16|| j == 20) \n {\n result = result + '-';\n }\n i = Math.floor(Math.random()*16).toString(16).toUpperCase();\n result = result + i;\n }\n return result;\n}", "function randomName() {\r\n return randomInt(0, 200);\r\n}", "function createID() {\n return 'xxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}", "function generateId() {\n return Math.floor(Math.random() * 10000000) + \"-\" + Math.floor(Math.random() * 10000000)\n}", "static createID() {\n return /*'_' + */Math.random().toString(36).substr(2, 9);\n }", "function id() {\n return '_' + Math.random().toString(36).substr(2, 9);\n }", "function makeid(length) {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n \n for (var i = 0; i < length; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n \n return text;\n }", "function makeId() {\n return Math.random().toString(36).substr(2, 5);\n}", "function createUUIDString()\n {\n\n // UUID Gem.\n function s4() {\n return ((1 + Math.random()) * 0x10000 | 0).toString(16).substring(1);\n }\n\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n\n }", "function genera_id(){\n var text = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n var ids=\"\";\n for(var i = 0; i < 15; i++)\n {\n ids += text.charAt(Math.floor(Math.random() * text.length));\n }\n return ids;\n}", "function GenerateID(){\n debugger; //The debugger statement stops the execution of JavaScript, and calls (if available) the debugging function. Using the debugger statement has the same function as setting a breakpoint in the code.\n var a=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,c=>(c,crypto.getRandomValues(new Uint8Array(1)))[0]&15>>c/4).toString(16);\n document.getElementById(\"Uid\").innerHTML=\" Your Unique ID is :\"+a;\n}", "function generateStringId(){\r\n var chars = \"AaBbCcDdEeFfGgHhIiJjKkMmNnOoPpQqRrSsTtUuVvZzWwYy1234567890\";\r\n var strId = \"\";\r\n for(var i=0; i < 8; i++){\r\n strId = strId + chars[Math.floor(Math.random()*57)];\r\n } \r\n return strId;\r\n}", "function randomIdBetter(number) {\n let id = Math.random().toString(36).substr(2, number);\n console.log(id);\n}", "idString() {\n return ( Date.now().toString( 36 ) + Math.random().toString( 36 ).substr( 2, 5 ) ).toUpperCase();\n }", "function confirmIt() {\r\n\r\n alert(\"Congratulations!\" + \"\\n\" +\r\n \"Here is your Reference Number: \" + \"\\n\" + Math.random().toString(36).substr(2, 9));\r\n}", "function globular_freshName(n) {\n return n.toString() + '-' + Math.random().toString(36).slice(2);\n}", "function makeid(length) {\r\n var text = \"\";\r\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n\r\n for (var i = 0; i < length; i++) {\r\n text += possible.charAt(Math.floor(Math.random() * possible.length));\r\n }\r\n\r\n return text;\r\n}", "function getRandomId(){ // clearly I am a liberal :p\n var id = '';\n for (var i=0;i<8;i++){\n id+= chars[Math.floor(Math.random()*(chars.length))];\n }\n return id;\n}", "function luid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(36).substring(1);\n }\n\n return \"\".concat(s4() + s4(), \"-\").concat(s4(), \"-\").concat(s4(), \"-\").concat(s4(), \"-\").concat(s4()).concat(s4()).concat(s4());\n}", "GUID() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }\n return \"ss-s-s-s-sss\".replace(/s/g, s4);\n }", "function generateId() { // random 6-char string\n\t\tvar letters = [];\n\t\tvar possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\t\tvar possible_len = possible.length;\n\t\tvar id_length = 6;\n\t\twhile (0 < id_length--) {\n\t\t\tletters.push(possible.charAt(Math.floor(Math.random() * possible_len)));\n\t\t}\n\t\treturn letters.join(\"\");\n\t\t//return String(Math.floor(Math.random() * 1000000)); // 10-based, not 0-padded\n\t}", "function makeid() {\n let text = \"\";\n let possible = ALL_CHARS;\n \n for (let i = 0; i < 5; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n \n localStorage.setItem(\"id\", JSON.stringify(text));\n return text;\n}", "static randomID() {\n return Math.round(Math.random() * 1000000) + '';\n }", "function createtrackingid() {\n const possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n var text = \"\";\n for(var i = 0; i < 16; i++) {\n text += possible.charAt(Math.floor(Math.random() *possible.length));\n }\n return text;\n }", "function randomId() {\n var t = \"\";\n var p = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (let i = 0; i < 10; i++) {\n t += p.charAt(Math.floor(Math.random() * p.length));\n }\n return t;\n }", "function randomUsableId(){\n return 'ID_'+(Math.random().toString(36).slice(2))\n}", "function makeid(len)\n{\n\tvar text = \"\";\n\tvar possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n\tfor( var i=0; i < len; i++ )\n\t\ttext += possible.charAt(Math.floor(Math.random() * possible.length));\n\n\treturn text;\n}", "function id() {\r\n return ('0000' + (Math.random() * Math.pow(36, 4) << 0).toString(36)).slice(-4);\r\n}", "function makeid(length) {\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-0123456789';\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n }", "function createId(){\n return Math.floor(Math.random() * 10000)\n}", "function guidGenerator() {\nvar S4 = function() {\nreturn (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n};\nreturn (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4());\n}", "function generateID() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }\n return s4() + s4() + s4() + s4() + s4() + s4() + s4() + s4();\n}", "function guidGenerator(){\n let sec = ()=>(((1+Math.random())*0x10000)|0).toString(16).substring(1); \n console.log((sec() + sec() + \"-\" + sec() + \"-4\" + sec().substr(0,3) + \"-\" + sec() + \"-\" + sec() + sec() + sec()).toLowerCase())\n return (sec() + sec() + \"-\" + sec() + \"-4\" + sec().substr(0,3) + \"-\" + sec() + \"-\" + sec() + sec() + sec()).toLowerCase();\n}", "function generateID() {\n return Math.random().toString(36).substr(2, 6)\n}", "function getId () {\n return '_' + Math.random().toString(36).substr(2, 9);\n}", "function _id() {\n\t\tvar S4 = function() {\n\t\t return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n\t\t};\n\t\treturn (S4()+S4());\n\t}", "function createUUID()\n{\n return [4, 2, 2, 2, 6].map(function(length) {\n var uuidpart = \"\";\n for (var i=0; i<length; i++) {\n var uuidchar = parseInt((Math.random() * 256)).toString(16);\n if (uuidchar.length == 1)\n uuidchar = \"0\" + uuidchar;\n uuidpart += uuidchar;\n }\n return uuidpart;\n }).join('-');\n}", "function mathUUID() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n}", "_uniqueID() {\n const chr4 = () => Math.random().toString(16).slice(-4);\n return `${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`;\n }", "function createID() {\n return (\"\" + 1e10).replace(/[018]/g, function(a) {\n return (a ^ Math.random() * 16 >> a / 4).toString(16)\n });\n}", "function generateCode() {\n let code = '';\n for (let i = 0; i < 9; i++) {\n code += Math.floor(Math.random() * 10);\n if (i === 2 || i === 5) {\n code += '-';\n }\n }\n return code;\n}", "async genID(){\n var result = 'pd';\n for(var k = 0; k < 8; k++){\n result += `${misc.randomnum(1,10)-1}`;\n }\n return result;\n }", "makeId(len) {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (var i = 0; i < len; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n }", "function randomUUID() {\r\n var s = [], itoh = '0123456789ABCDEF';\r\n \r\n // Make array of random hex digits. The UUID only has 32 digits in it, but we\r\n // allocate an extra items to make room for the '-'s we'll be inserting.\r\n for (var i = 0; i <36; i++) s[i] = Math.floor(Math.random()*0x10);\r\n \r\n // Conform to RFC-4122, section 4.4\r\n s[14] = 4; // Set 4 high bits of time_high field to version\r\n s[19] = (s[19] & 0x3) | 0x8; // Specify 2 high bits of clock sequence\r\n \r\n // Convert to hex chars\r\n for (var i = 0; i <36; i++) s[i] = itoh[s[i]];\r\n \r\n // Insert '-'s\r\n s[8] = s[13] = s[18] = s[23] = '_';\r\n \r\n return s.join('');\r\n}", "function getId() {\n return sanitizeId(idGen.generateCombination(2, \"-\"));\n}", "function getUniqueIdentifierStr() {\n return getIncrementalInteger() + Math.random().toString(16).substr(2);\n}", "function makeid(length) {\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for ( var i = 0; i < length; i++ ) {\n result += characters.charAt(Math.floor(Math.random() * \n charactersLength));\n }\n return result;\n }", "generateID() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15)\n }", "function guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return \"ss-s-s-s-sss\".replace(/s/g, s4);\n}" ]
[ "0.7247468", "0.7102937", "0.70985705", "0.7086636", "0.70742923", "0.70557064", "0.7053491", "0.705127", "0.7048619", "0.7031226", "0.7028278", "0.70241296", "0.702244", "0.69722724", "0.69617957", "0.6957385", "0.6953451", "0.6920514", "0.68363804", "0.68216544", "0.678737", "0.6763874", "0.67523694", "0.67491585", "0.67353314", "0.6729243", "0.67246777", "0.6724453", "0.66913116", "0.66837007", "0.6682593", "0.6632299", "0.66139615", "0.6595804", "0.65737575", "0.65346825", "0.6531473", "0.6526382", "0.65218556", "0.65172094", "0.65136385", "0.6498434", "0.64918834", "0.6491231", "0.6478963", "0.64779484", "0.64679134", "0.64570814", "0.64543504", "0.6439734", "0.6438718", "0.6433359", "0.6418874", "0.64153355", "0.6415088", "0.63925683", "0.6390859", "0.6385889", "0.6380871", "0.637352", "0.6354233", "0.6353069", "0.6330828", "0.6323301", "0.63221854", "0.6313361", "0.6313286", "0.62970215", "0.6291789", "0.6287936", "0.6274872", "0.6268729", "0.6267263", "0.6262405", "0.6256283", "0.6250919", "0.62504363", "0.6247369", "0.62414944", "0.6239343", "0.6232257", "0.62215704", "0.62080383", "0.6185858", "0.6184095", "0.6179817", "0.617194", "0.61674315", "0.6165364", "0.616353", "0.6155495", "0.61525714", "0.61515975", "0.6146229", "0.6140448", "0.6139601", "0.61376", "0.61345136", "0.61333555", "0.6133075" ]
0.76057535
0
Remove apostrophe's from string data. Put &pos; in for each apostrophe
function scrub(targetStr) { var pieces = targetStr.split("'"); return pieces.join("$pos;"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function decodeApos(input)\n{\n var decoded= input.replace(/&apos/g, \"'\");\n return decoded;\n}", "function encodeApos (input)\n{\n\n var encoded = input.replace(/'/g, \"&apos\");\n return encoded;\n}", "function cleanUpString(strSpecials) \n{\n strSpecials = stripString(strSpecials, \"%20\", \" \");\n strSpecials = stripString(strSpecials, \"%22\", \"\\\"\");\n strSpecials = stripString(strSpecials, \"%29\", \")\");\n strSpecials = stripString(strSpecials, \"%28\", \"(\");\n strSpecials = stripString(strSpecials, \"%2C\", \",\");\n\n\n var inParens = 0;\n for (var i = 0; i < strSpecials.length; i++)\n {\n if (strSpecials[i]==\"(\")\n inParens++;\n if (strSpecials[i]==\")\")\n inParens--;\n \n if ((inParens > 0) && (strSpecials[i]==\",\"))\n {\n var post = strSpecials.slice(i); \n strSpecials = strSpecials.replace(post,\"\") ;\n post = post.replace(\",\",\" \");\n\n strSpecials = strSpecials + post;\n }\n \n }\n \n\n strSpecials = stripString(strSpecials, \"%3C\", \"<\");\n strSpecials = stripString(strSpecials, \"%3E\", \">\");\n strSpecials = stripString(strSpecials, \"%23\", \"#\");\n strSpecials = stripString(strSpecials, \"%3A\", \":\");\n strSpecials = stripString(strSpecials, \"%3B\", \",\");\n strSpecials = stripString(strSpecials, \"%3D\", \"=\");\n \n strSpecials = stripString(strSpecials, \"</strong>\", \"\");\n strSpecials = stripString(strSpecials, \"<strong>\", \"\");\n strSpecials = stripString(strSpecials, \"</em>\", \"\");\n strSpecials = stripString(strSpecials, \"<em>\", \"\");\n strSpecials = stripString(strSpecials, \"%u2013\", \"-\");\n strSpecials = stripStringRegEx(strSpecials, \"<b\", \">\");\n strSpecials = stripString(strSpecials, \"</b>\", \"\");\n strSpecials = stripStringRegEx(strSpecials, \"<h\", \">\");\n strSpecials = stripStringRegEx(strSpecials, \"</h\", \">\");\n \n strSpecials = stripString(strSpecials, \"</a>\", \"\"); \n \n \n strSpecials = stripStringRegEx(strSpecials, \"<t\", \">\");\n strSpecials = stripStringRegEx(strSpecials, \"</t\", \">\");\n \n \n while (strSpecials.search(/%../) != -1) {\n strSpecials = strSpecials.replace(/%../, \"\");\n }\n \n \n\n return strSpecials;\n}", "function nombreApostrophe(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \"\\'\");\n\n }// Fin fonction nombreApostrophe", "function checkApostrophe(array) {\n array.forEach(function(element, index) {\n //console.log(element+\" : \"+element.indexOf('\\''));\n if (element.indexOf('\\'') == 1) {\n //console.log('index: '+index);\n var tmp = element.replace(/'/g, '');\n array[index] = tmp.substr(1);\n }\n });\n return array;\n}", "function deScrub(targetStr)\r\n{\r\n\tvar pieces = targetStr.split(\"$pos;\");\r\n\treturn pieces.join(\"'\");\r\n}", "function fixLocationNames (text) {\n var t = text; \n t = t.replace(/\\\\'/g, \"'\");\n // console.log(t);\n return t; \n}", "function basic_clean(string){\n\n \t// replace nonstandard apostrophes\n \t//string = string.replace(/[\\x93\\x94]+/gi, '\"')\n \tstring = string.replace(/[\\u0093\\u0094\\u201C\\u201D]+/gi, '\"')\n\n \t//string = string.replace(/[\\x91\\x92]+/gi, \"'\")\n \tstring = string.replace(/[\\u0091\\u0092\\u2018\\u2019\\u201B\\u02BC\\uFF07\\u07F4\\u07F5]+/gi, \"'\")\n\n \t// replace non-standard hyphens\n \tstring = string.replace(/\\s*[\\u2013\\u2014\\u2E3A\\u2E3B\\uFE58\\uFE63\\uFF0D]\\s*/gi, ' - ')\n\n\t// replace ellipsis char with '...'\n \tstring = string.replace(/(\\s*\\u2026\\s*)+/gi, '... ')\n\n \t// replace non-standard full stops\n \tstring = string.replace(/\\s*[\\u0701\\u0702\\u2E3C\\uFE52\\uFF0E]+\\s*/gi, '. ')\n\n \t// clean out nonprinting chars except NL, CR, TAB\n \tstring = string.replace(/[^\\x09\\x0A\\x0D\\x20-\\x7E\\x80-\\xFF]+/gi, '')\n\n \t// replace ’S with 's\n \tstring = string.replace(/\\'S\\s*/gi, \"'s \")\n\n \t// replace duplicate spaces\n \tstring = string.replace(/[\\xA0\\x09\\x20]+/gi, ' ')\n \n \treturn string;\n}", "function fixQuote(stru) {\n return stru.split(\"&quot;\").join(\"\\\"\");\n}", "function fixQuotes(text) {\n return text.replace(/&(quot|#39|amp);/g,function unEscape(match){\n return entities.decodeHTML(match);\n });\n}", "function removeSpecialCharacters (title) {\n title = title.replace(/,/g, '')\n title = title.replace(/:/g, '')\n title = title.split('(').join('')\n title = title.split(')').join('')\n title = title.split('!').join('')\n title = title.split('?').join('')\n title = title.split('.').join('')\n return title;\n }", "function replaceSQ(strValue)\r\n{\r\n\tstrValue = string_replace(strValue,\"“\",'\"',true);\r\n\tstrValue = string_replace(strValue,\"”\",'\"',true);\r\n\tstrValue = string_replace(strValue,\"‘\",\"'\",true);\r\n\tstrValue = string_replace(strValue,\"’\",\"'\",true);\r\n\treturn strValue;\r\n}", "function cleanr(a) {\n a = a.replace(/[\\u2018\\u2019]/g, \"'\");\n a = a.replace(/[\\u201C\\u201D]/g, '\"');\n return a;\n}", "function changeSpecialCharsQS(text) {\n text = text.replace('&', ' aaa ');\n return text;\n}", "function remove_quotation_marks(input_string){\n\tif(input_string!=undefined){\n\tif(input_string.charAt(0) === '\"') {\n\t\tinput_string = input_string.substr(1);\n\t}\n\tif(input_string.length>0){\n\tif(input_string.charAt(input_string.length-1) === '\"') {\n\t\tinput_string = input_string.substring(0, input_string.length - 1);\n\t}}}\n\treturn (input_string);\n}", "function handleHtmlEntities(data){\n\t\t\tdata = data.replace(/&/g, '&amp;')\n\t\t\t.replace(/\"/g, '&quot;')\n\t\t\t.replace(/'/g, '&#39;')\n\t\t\t.replace(/</g, '&lt;')\n\t\t\t.replace(/>/g, '&gt;');\n\t\t\tdata = data.replace(/ /g, '&nbsp;');\n\t\t\treturn data;\n\t\t}", "function deentityfy(inputString) {\n var entities = {\n '<':'&lt;',\n '>':'&gt;',\n '&':'&amp;',\n '\\'':'&quot;',\n '\"':'&dquot;'\n };\n var outputString = '';\n var i;\n for (i = 0; i < inputString.length; i++) {\n var currChar = inputString[i];\n outputString += typeof entities[currChar] === 'undefined' ? currChar : entities[currChar];\n }\n return outputString;\n}", "function omn_cleanTitle_withoutSeoAMP(stringWithPipes){\n var array_stringWithPipes= stringWithPipes.split(\"|\");\n var punt1;\n var arrayReal= Array.from(array_stringWithPipes[0]);\n var cadenaSinPercent=\"\";\n var control=0;\n if(arrayAmp['title'].indexOf(\"%\") > -1){\n for(var i=0; i<arrayReal.length; i++){\n if(arrayReal[i]==\"%\"){\n punt1=i+1;\n if((arrayReal[punt1]==\" \")||(arrayReal[punt1]==\",\")||(arrayReal[punt1]==\"!\")||(arrayReal[punt1]==\".\")||(arrayReal[punt1]==\"?\")){\n arrayReal[i]=\"16041975\";\n control=1;\n }\n }\n }\n for(var i=0; i<arrayReal.length; i++){\n cadenaSinPercent+=arrayReal[i];\n }\n }\n\n else{\n cadenaSinPercent= array_stringWithPipes[0];\n }\n var stringWithoutPipes= decodeURIComponent(cadenaSinPercent);\n if(control==1){\n stringWithoutPipes= stringWithoutPipes.replace(/16041975/g,\"%\");\n }\n return stringWithoutPipes;\n\n}", "function removeProblematicChars(text) {\n var result = trimString(text);\n var result = result.replace(/&amp;/,'and').replace(/\\s\\(\\d+\\)/,'').replace(/\\(\\sst\\s\\)\\s/,'');\n return result;\n }", "function removeApostrophe(fullName){\n if(fullName.indexOf(\"'\") != -1){\n fullName = fullName.replace(/'/g, '');\n }\n return fullName;\n}", "function html_unesc_amp_only($s) {\n return str_ireplace('&amp;','&',$s);\n}", "function quotechange(a){\r\n\tvar stringReplace=\"\";\r\n\tfor (var j=0,aL=a.length; j<aL; ++j){\r\n\t\tif (a.charAt(j) == '\\\"')\r\n\t\t\tstringReplace=stringReplace + \"&quot;\";\r\n\t\telse\r\n\t\t\tstringReplace=stringReplace + a.charAt(j);\r\n\t}\r\n\treturn stringReplace;\r\n}", "function remove_accent(str) {\n\t\t\t\tvar map={'À':'A','Á':'A','Â':'A','Ã':'A','Ä':'A','Å':'A','Æ':'AE','Ç':'C','È':'E','É':'E','Ê':'E','Ë':'E','Ì':'I','Í':'I','Î':'I','Ï':'I','Ð':'D','Ñ':'N','Ò':'O','Ó':'O','Ô':'O','Õ':'O','Ö':'O','Ø':'O','Ù':'U','Ú':'U','Û':'U','Ü':'U','Ý':'Y','ß':'s','à':'a','á':'a','â':'a','ã':'a','ä':'a','å':'a','æ':'ae','ç':'c','è':'e','é':'e','ê':'e','ë':'e','ì':'i','í':'i','î':'i','ï':'i','ñ':'n','ò':'o','ó':'o','ô':'o','õ':'o','ö':'o','ø':'o','ù':'u','ú':'u','û':'u','ü':'u','ý':'y','ÿ':'y','A':'A','a':'a','A':'A','a':'a','A':'A','a':'a','C':'C','c':'c','C':'C','c':'c','C':'C','c':'c','C':'C','c':'c','D':'D','d':'d','Ð':'D','d':'d','E':'E','e':'e','E':'E','e':'e','E':'E','e':'e','E':'E','e':'e','E':'E','e':'e','G':'G','g':'g','G':'G','g':'g','G':'G','g':'g','G':'G','g':'g','H':'H','h':'h','H':'H','h':'h','I':'I','i':'i','I':'I','i':'i','I':'I','i':'i','I':'I','i':'i','I':'I','i':'i','?':'IJ','?':'ij','J':'J','j':'j','K':'K','k':'k','L':'L','l':'l','L':'L','l':'l','L':'L','l':'l','?':'L','?':'l','L':'L','l':'l','N':'N','n':'n','N':'N','n':'n','N':'N','n':'n','?':'n','O':'O','o':'o','O':'O','o':'o','O':'O','o':'o','Œ':'OE','œ':'oe','R':'R','r':'r','R':'R','r':'r','R':'R','r':'r','S':'S','s':'s','S':'S','s':'s','S':'S','s':'s','Š':'S','š':'s','T':'T','t':'t','T':'T','t':'t','T':'T','t':'t','U':'U','u':'u','U':'U','u':'u','U':'U','u':'u','U':'U','u':'u','U':'U','u':'u','U':'U','u':'u','W':'W','w':'w','Y':'Y','y':'y','Ÿ':'Y','Z':'Z','z':'z','Z':'Z','z':'z','Ž':'Z','ž':'z','?':'s','ƒ':'f','O':'O','o':'o','U':'U','u':'u','A':'A','a':'a','I':'I','i':'i','O':'O','o':'o','U':'U','u':'u','U':'U','u':'u','U':'U','u':'u','U':'U','u':'u','U':'U','u':'u','?':'A','?':'a','?':'AE','?':'ae','?':'O','?':'o'};\n\t\t\t\tvar res='';\n\t\t\t\tfor (var i=0;i<str.length;i++){c=str.charAt(i);res+=map[c]||c;}\n\t\t\t\t\n\t\t\t\t\t//--Remove the code postal\n\t\t\t\tres=res.substring(0,res.length-6);\t\t\n\t\t\t\treturn res;\n\t\t\t}", "function htmlFix(html)\n{\n \tvar re = new RegExp('&apos;', 'g');\n\thtml = html.replace(re,'&#39;');\n\treturn html;\n}", "function UnquoteSplicing() {\r\n}", "function UnescapeSpecialChars(text) {\n\ntext = text.replace(/7f8137798425a7fed2b8c5703b70d078/gm, \"\\\\\")\ntext = text.replace(/833344d5e1432da82ef02e1301477ce8/gm, \"`\")\ntext = text.replace(/3389dae361af79b04c9c8e7057f60cc6/gm, \"*\")\ntext = text.replace(/b14a7b8059d9c055954c92674ce60032/gm, \"_\")\ntext = text.replace(/f95b70fdc3088560732a5ac135644506/gm, \"{\")\ntext = text.replace(/cbb184dd8e05c9709e5dcaedaa0495cf/gm, \"}\")\ntext = text.replace(/815417267f76f6f460a4a61f9db75fdb/gm, \"[\")\ntext = text.replace(/0fbd1776e1ad22c59a7080d35c7fd4db/gm, \"]\")\ntext = text.replace(/84c40473414caf2ed4a7b1283e48bbf4/gm, \"(\")\ntext = text.replace(/9371d7a2e3ae86a00aab4771e39d255d/gm, \")\")\ntext = text.replace(/01abfc750a0c942167651c40d088531d/gm, \"#\")\ntext = text.replace(/5058f1af8388633f609cadb75a75dc9d/gm, \".\")\ntext = text.replace(/9033e0e305f247c0c3c80d0c7848c8b3/gm, \"!\")\ntext = text.replace(/853ae90f0351324bd73ea615e6487517/gm, \":\")\nreturn text;\n}", "function replaceSmartQuotes(text) {\n text = text.replaceAll( \"[\\u2018\\u2019\\u201A\\u201B\\u2032\\u2035]\", \"'\" );\n text = text.replaceAll(\"[\\u201C\\u201D\\u201E\\u201F\\u2033\\u2036]\",\"\\\"\");\n return text;\n}", "function customWSRemove(val){\n\tvar isQuote = false;\n\tvar output = \"\";\n\tfor (var i = 0; i < val.length; i++) {\n\t\tvar ch = val.charAt(i);\n\t\tif (ch=='\"') {\n\t\t\tisQuote = !isQuote;\n\t\t\toutput = output + ch;\n\t\t}else if (/\\s/.test(ch)) {\n\t\t\tisQuote ? output = output + ch : output = output;\n\t\t} else {\n\t\t\toutput = output + ch;\n\t\t}\n\t}\n\treturn output;\n}", "function replaceMisEncodedCharacters(data) {\n const replacements = {\n o_: 'ō',\n u_: 'ū',\n '&amp;': '&',\n }\n\n Object.keys(data).map(key => {\n const newData =\n data[key] &&\n data[key].replace &&\n data[key].replace(\n new RegExp(Object.keys(replacements).join('|'), 'g'),\n match => replacements[match]\n )\n\n if (newData) data[key] = newData\n })\n\n return data\n}", "function smarten(a) {\n a = a.replace(/(^|[-\\u2014\\s(\\[\"])'/g, \"$1\\u2018\"); // opening singles\n a = a.replace(/'/g, \"\\u2019\"); // closing singles & apostrophes\n a = a.replace(/(^|[-\\u2014/\\[(\\u2018\\s])\"/g, \"$1\\u201c\"); // opening doubles\n a = a.replace(/\"/g, \"\\u201d\"); // closing doubles\n a = a.replace(/--/g, \"\\u2014\"); // em-dashes\n return a;\n}", "function unpadString(strng){\n aString = strng; aString = replaceStr( aString, \" \", \" \", 0 ); // compress spaces\n if( strng.charAt( 0 ) == \" \" ){ aString = aString.substring(1, aString.length ); }\n if( strng.charAt( aString.length - 1 ) == \" \" ){ aString = aString.substring(0, aString.length - 1 ); }\n for( i=0; i < punct.length; i++ ){ aString = replaceStr( aString, \" \" + punct[i], punct[i], 0 ); }\n return aString\n}", "function deuni(input){\n\toutput= unescape(input.replace(/\\]/g,\"\").replace(/\\[U\\+/g,\"%u\"));\n return output;\n}", "function wash_SQL_string(str) {\n var toString = \"\" + str;\n return toString.replace(/[\\|&;\\$%\"<>\\(\\)\\+,']/g, \"\");\n}", "function sanitize(string) {\n return string.replace(/[&<>]/g, '');\n }", "function myReplace(str, before, after) {\r\n var arr = [];\r\n arr = str.split(\" \");\r\n \r\n for(var i = 0; i < arr.length; i++){\r\n if(arr[i]===before){\r\n if(arr[i].charCodeAt(0) <= 90){\r\n var up = after.substr(0,1).toUpperCase();\r\n var rest = after.substr(1);\r\n after = up+rest;\r\n arr[i] = after;\r\n }\r\n else{\r\n arr[i] = after;\r\n }\r\n }\r\n }\r\n str = arr.join(\" \");\r\n return str;\r\n}", "function removeIllegalChar(str)\n{\n\tvar result = str;\n\tif (result == null) return null;\n\tresult = result.trim();\n\tif (result != \"\") \n\t{\n\t\t// result = result.replace(/'/gi,\"\");\n\t\t// result = result.replace(/'|\"|!|%|\\\\|\\/|<|>/gi,\"\");\n\t\t// under repalcing is for web page.\n\t\t// result=result.replace(/&/gi,\"\\\\&amp;\"); \n\t\t// result=result.replace(/</gi,\"\\\\&lt;\");\n\t\t// result=result.replace(/>/gi,\"\\\\&gt;\");\n\t}\n\treturn result;\n}", "function smartquotes(str) {\n return str\n .replace(/'''/g, '\\u2034') // triple prime\n .replace(/(\\W|^)\"(\\S)/g, '$1\\u201c$2') // beginning \"\n .replace(/(\\u201c[^\"]*)\"([^\"]*$|[^\\u201c\"]*\\u201c)/g, '$1\\u201d$2') // ending \"\n .replace(/([^0-9])\"/g,'$1\\u201d') // remaining \" at end of word\n .replace(/''/g, '\\u2033') // double prime\n .replace(/(\\W|^)'(\\S)/g, '$1\\u2018$2') // beginning '\n .replace(/([a-z])'([a-z])/ig, '$1\\u2019$2') // conjunction's possession\n .replace(/((\\u2018[^']*)|[a-z])'([^0-9]|$)/ig, '$1\\u2019$3') // ending '\n .replace(/(\\u2018)([0-9]{2}[^\\u2019]*)(\\u2018([^0-9]|$)|$|\\u2019[a-z])/ig, '\\u2019$2$3') // abbrev. years like '93\n .replace(/(\\B|^)\\u2018(?=([^\\u2019]*\\u2019\\b)*([^\\u2019\\u2018]*\\W[\\u2019\\u2018]\\b|[^\\u2019\\u2018]*$))/ig, '$1\\u2019') // backwards apostrophe\n .replace(/'/g, '\\u2032');\n}", "function sanitize (text) {\n return text.split('').map(function (char) {\n return char === '<' ? '&lt;' : char === '>' ? '&gt;' : char\n ;}).join('');\n }", "function htmlSpecialChars(str, quote_style)\r\n{\r\n\tstr = str.replace(/&/ig,\"&amp;\");\r\n\tif(!quote_style || quote_style==1)\r\n\t{\r\n\t\tstr = str.replace(/\\\"/ig,\"&quot;\")\r\n\t\tif(quote_style==1)\r\n\t\t\tstr = str.replace(/\\'/ig,\"&#039;\")\r\n\t}\r\n\tstr = str.replace(/\\>/ig,\"&gt;\");\r\n\tstr = str.replace(/\\</ig,\"&lt;\");\r\n\treturn str;\r\n}", "function replaceSpecialCharacters(str) {\n if (str != \"undefined\" && str != \"\" && str != null) {\n str = str.replace(/\\'/gi, \"&lsquo;\");\n str = str.replace(/\\xE9/gi, \"&eacute;\");\n str = str.replace(/\\`/gi, \"&lsquo;\");\n }\n return str;\n}", "function removeSpacesb(string) {\nstringfixed = string.split(' ').join('-');\nstringfixed = stringfixed.toLowerCase();\nvar r = stringfixed;\nr = r.replace(new RegExp(\"[àáâãäå]\", 'g'),\"a\");\nr = r.replace(new RegExp(\"æ\", 'g'),\"ae\");\nr = r.replace(new RegExp(\"ç\", 'g'),\"c\");\nr = r.replace(new RegExp(\"[èéêë]\", 'g'),\"e\");\nr = r.replace(new RegExp(\"[ìíîï]\", 'g'),\"i\");\nr = r.replace(new RegExp(\"ñ\", 'g'),\"n\"); \nr = r.replace(new RegExp(\"[òóôõö]\", 'g'),\"o\");\nr = r.replace(new RegExp(\"œ\", 'g'),\"oe\");\nr = r.replace(new RegExp(\"[ùúûü]\", 'g'),\"u\");\nr = r.replace(new RegExp(\"[ýÿ]\", 'g'),\"y\");\nr = r.replace(new RegExp(\"[!¡¿?]\", 'g'),\"\");\nreturn r;\n\n }", "function chgEntities(passedStr)\n{\nvar myStr = repStrs(passedStr,'%22','&quot;') \n myStr = repStrs(myStr,'%26','&amp;') \n myStr = repStrs(myStr,'%3C','&gt;') \n myStr = repStrs(myStr,'%2E','&lt;') \n// myStr = repStrs(myStr,'%27',\"\\\\'\")\n\n\treturn unescape(myStr)\n}", "function replace_special_chars(str) {\n\tlet new_str = str.replaceAll(\"&quot;\", '\"')\n\t\t.replaceAll(\"&rdquo;\", '\"')\n\t\t.replaceAll(\"&ldquo;\", '\"')\n\t\t.replaceAll(\"&lsquo;\", \"'\")\n\t\t.replaceAll(\"&rsquo;\", \"'\")\n\t\t.replaceAll(\"‘\", \"'\")\n\t\t.replaceAll(\"“\", '\"')\n\t\t.replaceAll(\"”\", '\"')\n\t\t.replaceAll(\"–\", \"-\")\n\t\t.replaceAll(\"&equals;\", \"=\")\n\t\t.replaceAll(\"&minus;\", \"-\")\n\t\t.replaceAll(\"&plus;\", \"+\")\n\t\t.replaceAll(\"&prime;\", \"*\")\n\t\t.replaceAll(\"&times;\", \"×\")\n\t\t.replaceAll(\"&#39;\", \"'\")\n\t\t.replaceAll(\"&#160;\", \"&nbsp;\");\n\treturn new_str;\n}", "function removeChar(str, char_pos) {\n let string1 = str.substring(0, char_pos);\n let string2 = str.substring(char_pos + 1, str.length);\n const newStr = string1 + string2;\n return newStr;\n}", "function unEntity(str){\n return str.replace(/&lt;/g, '<').replace(/&gt;/g, '>');\n}", "function removeBadCharacters(string) {\n if (string.replace) {\n string.replace(/[<>\\\"\\'%;\\)\\(&\\+]/, '');\n }\n return string;\n}", "function cleanTitle(title){\n var symbols = {\n '@': '%40',\n '&amp;': 'and',\n '*': '%2A',\n '+': '%2B',\n '/': '%2F',\n '&lt;': '%3C',\n '&gt;': '%3E'\n };\n title = title.replace(/([@*+/]|&(amp|lt|gt);)/g, function (m) { return symbols[m]; });\n title = title.replace('&','and');\n return title;\n}", "function cleanUpString(inputS) {\n // preserve newlines, etc - use valid JSON\n inputS = inputS.replace(/\\\\n/g, \"\\\\n\") \n .replace(/\\\\'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\\\\\"')\n .replace(/\\\\&/g, \"\\\\&\")\n .replace(/\\\\r/g, \"\\\\r\")\n .replace(/\\\\t/g, \"\\\\t\")\n .replace(/\\\\b/g, \"\\\\b\")\n .replace(/\\\\f/g, \"\\\\f\");\n // remove non-printable and other non-valid JSON chars\n inputS = inputS.replace(/[\\u0000-\\u0019]+/g,\"\"); \n return inputS;\n}", "function quitaAcentos(str){ \n for (var i=0;i<str.length;i++){ \n //Sustituye \"á é í ó ú\" \n if (str.charAt(i)==\"á\") str = str.replace(/á/,\"a\"); \n if (str.charAt(i)==\"é\") str = str.replace(/é/,\"e\"); \n if (str.charAt(i)==\"í\") str = str.replace(/í/,\"i\"); \n if (str.charAt(i)==\"ó\") str = str.replace(/ó/,\"o\"); \n if (str.charAt(i)==\"ú\") str = str.replace(/ú/,\"u\"); \n } \n return str; \n }", "function cleanString(inStr){\n var rv =\"\"\n for(var i = 0; i < inStr.length; i++){\n var char = inStr[i];\n if(!checkForOpperand(char)){\n continue;\n }else{\n rv+=char;\n }\n }\n return rv;\n}", "function stripSingleQuotes(str) {\n if(str[0] == \"'\" && str[str.length-1] == \"'\") {\n return str.substring(1, str.length-1);\n }\n return str;\n }", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}", "function symStripFunc (dataIn) {\r\n let tempString = dataIn.replace(/[^a-z0-9/',]/gmi, \" \").replace(/\\s+/g, \" \");\r\n //let tempString2 = tempString.replace(/[\\,]+/g,\"\");\r\n let tempString2 = tempString.replace(/,+/g,',');\r\n return tempString2\r\n}", "function replaceSpecialChars(textToChange){\n newText = textToChange.replace('&amp;','&').replace('&gt;','>').replace('&lt;','<');\n return newText;\n}", "function removeBadCharacters(string) {\n\tif (string.replace) {\n\t\tstring.replace(/[<>\\\"\\'%;\\)\\(&\\+]/, '');\n\t}\n\treturn string;\n}", "function replaceIfNotEscaped(str,toRep,watRep){\n\tfor(var i=0; i<str.length; i++){\n\t\tif(str[i] == toRep && str[i-1] != '\\\\'){\n str = setCharAt(str,i,watRep);\n i = i +(watRep.length-1);\n\t\t}\n\t}\n\treturn str;\n}", "function strip(str) {\n if ('\"' == str[0] || \"'\" == str[0]) return str.slice(1, -1);\n return str;\n}", "function rmWeirdChar(arr)\n{\n for(let i = 0; i < arr.length; i++)\n {\n arr[i] = arr[i].replace(/[&\\\\#+()$~%':*?<>{}]/g, '').trim();\n }\n return arr;\n}", "function stripQuotes(str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;\n}", "function S(a){\n// HTML encode: Replace < > & ' and \" by corresponding entities.\nreturn void 0!=a?ya.test(a)&&(\"\"+a).replace(Aa,P)||a:\"\"}", "function autoEdUnicodify(str) { //MAIN FUNCTION describes list of fixes\n \n // Task 1: Replace named html entities with unicode\n \n // Most common replacements\n str = str.replace(/&mdash;/gi, '—');\n str = str.replace(/&ndash;/gi, '–');\n str = str.replace('-', '–');\n // Case insensitive symbols\n if(str.search(/&[a-z][a-z]+[0-9]*;/i) >= 0) {\n //XML and HTML Symbols\n str = str.replace(/&hellip;/gi, '...');\n str = str.replace(/&plus;/gi, '+');\n str = str.replace(/&plusmn;/gi, '±');\n str = str.replace(/&minus;/gi, '−');\n str = str.replace(/&times;/gi, '×');\n str = str.replace(/&divide;/gi, '÷');\n str = str.replace(/&ne;/gi, '≠');\n str = str.replace(/&asymp;/gi, '≈');\n str = str.replace(/&le;/gi, '≤');\n str = str.replace(/&ge;/gi, '≥');\n str = str.replace(/&quot;/gi, '\"'); // \"\n str = str.replace(/&apos;/gi, \"'\"); // '\n str = str.replace(/&iexcl;/gi, '¡');\n str = str.replace(/&cent;/gi, '¢');\n str = str.replace(/&pound;/gi, '£');\n str = str.replace(/&curren;/gi, '¤');\n str = str.replace(/&yen;/gi, '¥');\n str = str.replace(/&brvbar;/gi, '¦');\n str = str.replace(/&sect;/gi, '§');\n str = str.replace(/&uml;/gi, '¨');\n str = str.replace(/&copy;/gi, '©');\n str = str.replace(/&ordf;/gi, 'ª');\n str = str.replace(/&laquo;/gi, '«');\n str = str.replace(/&not;/gi, '¬');\n str = str.replace(/&reg;/gi, '®');\n str = str.replace(/&macr;/gi, '¯');\n str = str.replace(/&deg;/gi, '°');\n str = str.replace(/&sup2;/gi, '²');\n str = str.replace(/&sup3;/gi, '³');\n str = str.replace(/&acute;/gi, '´');\n str = str.replace(/&micro;/gi, 'µ');\n str = str.replace(/&para;/gi, '¶');\n str = str.replace(/&middot;/gi, '·');\n str = str.replace(/&cedil;/gi, '¸');\n str = str.replace(/&sup1;/gi, '¹');\n str = str.replace(/&ordm;/gi, 'º');\n str = str.replace(/&raquo;/gi, '»');\n str = str.replace(/&frac14;/gi, '¼');\n str = str.replace(/&frac12;/gi, '½');\n str = str.replace(/&frac34;/gi, '¾');\n str = str.replace(/&iquest;/gi, '¿');\n str = str.replace(/&circ;/gi, 'ˆ');\n str = str.replace(/&tilde;/gi, '˜');\n str = str.replace(/&lsquo;/gi, '‘');\n str = str.replace(/&rsquo;/gi, '’');\n str = str.replace(/&sbquo;/gi, '‚');\n str = str.replace(/&ldquo;/gi, '“');\n str = str.replace(/&rdquo;/gi, '”');\n str = str.replace(/&bdquo;/gi, '„');\n str = str.replace(/&bull;/gi, '•');\n str = str.replace(/&permil;/gi, '‰');\n str = str.replace(/&lsaquo;/gi, '‹');\n str = str.replace(/&rsaquo;/gi, '›');\n str = str.replace(/&oline;/gi, '‾');\n str = str.replace(/&frasl;/gi, '⁄');\n str = str.replace(/&euro;/gi, '€');\n str = str.replace(/&image;/gi, 'ℑ');\n str = str.replace(/&weierp;/gi, '℘');\n str = str.replace(/&real;/gi, 'ℜ');\n str = str.replace(/&trade;/gi, '™');\n str = str.replace(/&alefsym;/gi, 'ℵ');\n str = str.replace(/&crarr;/gi, '↵');\n str = str.replace(/&forall;/gi, '∀');\n str = str.replace(/&part;/gi, '∂');\n str = str.replace(/&exist;/gi, '∃');\n str = str.replace(/&empty;/gi, '∅');\n str = str.replace(/&nabla;/gi, '∇');\n str = str.replace(/&isin;/gi, '∈');\n str = str.replace(/&notin;/gi, '∉');\n str = str.replace(/&ni;/gi, '∋');\n str = str.replace(/&prod;/gi, '∏');\n str = str.replace(/&sum;/gi, '∑');\n str = str.replace(/&lowast;/gi, '∗');\n str = str.replace(/&radic;/gi, '√');\n str = str.replace(/&prop;/gi, '∝');\n str = str.replace(/&infin;/gi, '∞');\n str = str.replace(/&ang;/gi, '∠');\n str = str.replace(/&and;/gi, '∧');\n str = str.replace(/&or;/gi, '∨');\n str = str.replace(/&cap;/gi, '∩');\n str = str.replace(/&cup;/gi, '∪');\n str = str.replace(/&int;/gi, '∫');\n str = str.replace(/&there4;/gi, '∴');\n str = str.replace(/&sim;/gi, '∼');\n str = str.replace(/&cong;/gi, '≅');\n str = str.replace(/&sub;/gi, '⊂');\n str = str.replace(/&sup;/gi, '⊃');\n str = str.replace(/&nsub;/gi, '⊄');\n str = str.replace(/&sube;/gi, '⊆');\n str = str.replace(/&supe;/gi, '⊇');\n str = str.replace(/&oplus;/gi, '⊕');\n str = str.replace(/&otimes;/gi, '⊗');\n str = str.replace(/&perp;/gi, '⊥');\n str = str.replace(/&sdot;/gi, '⋅');\n str = str.replace(/&lceil;/gi, '⌈');\n str = str.replace(/&rceil;/gi, '⌉');\n str = str.replace(/&lfloor;/gi, '⌊');\n str = str.replace(/&rfloor;/gi, '⌋');\n str = str.replace(/&lang;/gi, '〈');\n str = str.replace(/&rang;/gi, '〉');\n str = str.replace(/&loz;/gi, '◊');\n str = str.replace(/&spades;/gi, '♠');\n str = str.replace(/&clubs;/gi, '♣');\n str = str.replace(/&hearts;/gi, '♥');\n str = str.replace(/&diams;/gi, '♦');\n}\n \n// Uppercase symbols\n if(str.search(/&[A-Z][a-z]+;/) >= 0) {\n //Greek symbols\n str = str.replace(/&Alpha;/g, 'Α');\n str = str.replace(/&Beta;/g, 'Β');\n str = str.replace(/&Gamma;/g, 'Γ');\n str = str.replace(/&Delta;/g, 'Δ');\n str = str.replace(/&Epsilon;/g, 'Ε');\n str = str.replace(/&Zeta;/g, 'Ζ');\n str = str.replace(/&Eta;/g, 'Η');\n str = str.replace(/&Theta;/g, 'Θ');\n str = str.replace(/&Iota;/g, 'Ι');\n str = str.replace(/&Kappa;/g, 'Κ');\n str = str.replace(/&Lambda;/g, 'Λ');\n str = str.replace(/&Mu;/g, 'Μ');\n str = str.replace(/&Nu;/g, 'Ν');\n str = str.replace(/&Xi;/g, 'Ξ');\n str = str.replace(/&Omicron;/g, 'Ο');\n str = str.replace(/&Pi;/g, 'Π');\n str = str.replace(/&Rho;/g, 'Ρ');\n str = str.replace(/&Sigma;/g, 'Σ');\n str = str.replace(/&Tau;/g, 'Τ');\n str = str.replace(/&Upsilon;/g, 'Υ');\n str = str.replace(/&Phi;/g, 'Φ');\n str = str.replace(/&Chi;/g, 'Χ');\n str = str.replace(/&Psi;/g, 'Ψ');\n str = str.replace(/&Omega;/g, 'Ω');\n //Latin symbols\n str = str.replace(/&Agrave;/g, 'À');\n str = str.replace(/&Aacute;/g, 'Á');\n str = str.replace(/&Acirc;/g, 'Â');\n str = str.replace(/&Atilde;/g, 'Ã');\n str = str.replace(/&Auml;/g, 'Ä');\n str = str.replace(/&Aring;/g, 'Å');\n str = str.replace(/&AElig;/g, 'Æ');\n str = str.replace(/&Ccedil;/g, 'Ç');\n str = str.replace(/&Egrave;/g, 'È');\n str = str.replace(/&Eacute;/g, 'É');\n str = str.replace(/&Ecirc;/g, 'Ê');\n str = str.replace(/&Euml;/g, 'Ë');\n str = str.replace(/&Igrave;/g, 'Ì');\n str = str.replace(/&Iacute;/g, 'Í');\n str = str.replace(/&Icirc;/g, 'Î');\n str = str.replace(/&Iuml;/g, 'Ï');\n str = str.replace(/&Ntilde;/g, 'Ñ');\n str = str.replace(/&Ograve;/g, 'Ò');\n str = str.replace(/&Oacute;/g, 'Ó');\n str = str.replace(/&Ocirc;/g, 'Ô');\n str = str.replace(/&Otilde;/g, 'Õ');\n str = str.replace(/&Ouml;/g, 'Ö');\n str = str.replace(/&Oslash;/g, 'Ø');\n str = str.replace(/&Ugrave;/g, 'Ù');\n str = str.replace(/&Uacute;/g, 'Ú');\n str = str.replace(/&Ucirc;/g, 'Û');\n str = str.replace(/&Uuml;/g, 'Ü');\n str = str.replace(/&Yacute;/g, 'Ý');\n str = str.replace(/&Scaron;/g, 'Š');\n str = str.replace(/&Yuml;/g, 'Ÿ');\n //XML and HTML Symbols\n str = str.replace(/&Dagger;/g, '‡');\n str = str.replace(/&Prime;/g, '″');\n}\n \n// lowercase symbols\n if(str.search(/&[a-z][a-z]+;/) >= 0) {\n //Greek symbols\n str = str.replace(/&alpha;/g, 'α');\n str = str.replace(/&beta;/g, 'β');\n str = str.replace(/&gamma;/g, 'γ');\n str = str.replace(/&delta;/g, 'δ');\n str = str.replace(/&epsilon;/g, 'ε');\n str = str.replace(/&zeta;/g, 'ζ');\n str = str.replace(/&eta;/g, 'η');\n str = str.replace(/&theta;/g, 'θ');\n str = str.replace(/&iota;/g, 'ι');\n str = str.replace(/&kappa;/g, 'κ');\n str = str.replace(/&lambda;/g, 'λ');\n str = str.replace(/&mu;/g, 'μ');\n str = str.replace(/&nu;/g, 'ν');\n str = str.replace(/&xi;/g, 'ξ');\n str = str.replace(/&omicron;/g, 'ο');\n str = str.replace(/&pi;/g, 'π');\n str = str.replace(/&rho;/g, 'ρ');\n str = str.replace(/&sigmaf;/g, 'ς');\n str = str.replace(/&sigma;/g, 'σ');\n str = str.replace(/&tau;/g, 'τ');\n str = str.replace(/&upsilon;/g, 'υ');\n str = str.replace(/&phi;/g, 'φ');\n str = str.replace(/&chi;/g, 'χ');\n str = str.replace(/&psi;/g, 'ψ');\n str = str.replace(/&omega;/g, 'ω');\n str = str.replace(/&thetasym;/g, 'ϑ');\n str = str.replace(/&upsih;/g, 'ϒ');\n str = str.replace(/&piv;/g, 'ϖ');\n //Latin symbols\n str = str.replace(/&szlig;/g, 'ß');\n str = str.replace(/&agrave;/g, 'à');\n str = str.replace(/&aacute;/g, 'á');\n str = str.replace(/&acirc;/g, 'â');\n str = str.replace(/&atilde;/g, 'ã');\n str = str.replace(/&auml;/g, 'ä');\n str = str.replace(/&aring;/g, 'å');\n str = str.replace(/&aelig;/g, 'æ');\n str = str.replace(/&ccedil;/g, 'ç');\n str = str.replace(/&egrave;/g, 'è');\n str = str.replace(/&eacute;/g, 'é');\n str = str.replace(/&ecirc;/g, 'ê');\n str = str.replace(/&euml;/g, 'ë');\n str = str.replace(/&igrave;/g, 'ì');\n str = str.replace(/&iacute;/g, 'í');\n str = str.replace(/&icirc;/g, 'î');\n str = str.replace(/&iuml;/g, 'ï');\n str = str.replace(/&eth;/g, 'ð');\n str = str.replace(/&ntilde;/g, 'ñ');\n str = str.replace(/&ograve;/g, 'ò');\n str = str.replace(/&oacute;/g, 'ó');\n str = str.replace(/&ocirc;/g, 'ô');\n str = str.replace(/&otilde;/g, 'õ');\n str = str.replace(/&ouml;/g, 'ö');\n str = str.replace(/&oslash;/g, 'ø');\n str = str.replace(/&ugrave;/g, 'ù');\n str = str.replace(/&uacute;/g, 'ú');\n str = str.replace(/&ucirc;/g, 'û');\n str = str.replace(/&uuml;/g, 'ü');\n str = str.replace(/&yacute;/g, 'ý');\n str = str.replace(/&thorn;/g, 'þ');\n str = str.replace(/&yuml;/g, 'ÿ');\n str = str.replace(/&oelig;/g, 'œ');\n str = str.replace(/&scaron;/g, 'š');\n str = str.replace(/&fnof;/g, 'ƒ');\n //XML and HTML Symbols\n str = str.replace(/&dagger;/g, '†');\n str = str.replace(/&prime;/g, '′');\n }\n \n // False positives\n // Breaks large amounts of code which discuss programming/scripting.\n // str = str.replace(/&lt;/gi, '<');\n // str = str.replace(/&gt;/gi, '>');\n // Breaks large number of URLs and discussion of programming/scripting.\n // str = str.replace(/&amp;/gi, '&');\n \n // Arrows\n str = str.replace(/&larr;/g, '←');\n str = str.replace(/&rarr;/g, '→');\n str = str.replace(/&uarr;/g, '↑');\n str = str.replace(/&darr;/g, '↓');\n str = str.replace(/&lArr;/g, '⇐');\n str = str.replace(/&rArr;/g, '⇒');\n str = str.replace(/&uArr;/g, '⇑');\n str = str.replace(/&dArr;/g, '⇓');\n str = str.replace(/&harr;/g, '↔');\n str = str.replace(/&hArr;/g, '⇔');\n str = str.replace(/<==|<--/gi, '←');\n str = str.replace(/==>/gi, '→');\n \n // Specific case\n str = str.replace(/&ETH;/g, 'Ð');\n str = str.replace(/&THORN;/g, 'Þ');\n str = str.replace(/&OElig;/g, 'Œ');\n \n \n // Task 2: Replace numeric html entities with unicode ( User:CharlotteWebb )\n \n // Symbols for which there may be a good reason to obfuscate/escape\n var dont_replace = \"|!{}[]=<>\";\n \n // START specialreplace function from User:CharlotteWebb\n function specialreplace(ent, base){\n var chr = \"\";\n var num = parseInt(ent.replace(/[\\&\\#\\;x]/g, ''), base);\n // see [[UTF-16]] for chars outside the BMP\n // try this with Gothic letters at full volume ^_^\n if (num > 0xFFFF) {\n num -= 0x10000;\n chr = String.fromCharCode(0xD800 + (num >> 10), 0xDC00 + (num & 0x3FF)); \n } else {\n chr = String.fromCharCode(num);\n }\n if (dont_replace.indexOf(chr) == -1) {\n str = str.replace(ent, chr, \"gi\");\n }\n }\n // END specialreplace function\n \n // perform replacement\n if(m = str.match(/\\&\\#(\\d+)\\;/g)) {\n for(i = 0; i < m.length; i++) {\n specialreplace(m[i], 10);\n }\n }\n if(m = str.match(/\\&\\#x([\\da-f]+)\\;/gi)) {\n for(i = 0; i < m.length; i++) { \n specialreplace(m[i], 16);\n }\n }\n \n // Task 3: Unprintable control characters [[Windows-1252]] from User:CharlotteWebb\n var failstr = \"<!-- AutoEd: rm unicode ctrl char w/no win-1252 mapping, intent unknown -->\";\n str = str.replace(/\\u0080/g, '€');\n str = str.replace(/\\u0081/g, failstr);\n str = str.replace(/\\u0082/g, '‚');\n str = str.replace(/\\u0083/g, 'ƒ');\n str = str.replace(/\\u0084/g, '„');\n str = str.replace(/\\u0085/g, '…');\n str = str.replace(/\\u0086/g, '†');\n str = str.replace(/\\u0087/g, '‡');\n str = str.replace(/\\u0088/g, 'ˆ');\n str = str.replace(/\\u0089/g, '‰');\n str = str.replace(/\\u008a/g, 'Š');\n str = str.replace(/\\u008b/g, '‹');\n str = str.replace(/\\u008c/g, 'Œ');\n str = str.replace(/\\u008d/g, failstr);\n str = str.replace(/\\u008e/g, 'Ž');\n str = str.replace(/\\u008f/g, failstr);\n str = str.replace(/\\u0090/g, failstr);\n str = str.replace(/\\u0091/g, '‘');\n str = str.replace(/\\u0092/g, '’');\n str = str.replace(/\\u0093/g, '“');\n str = str.replace(/\\u0094/g, '”');\n str = str.replace(/\\u0095/g, '•');\n str = str.replace(/\\u0096/g, '–');\n str = str.replace(/\\u0097/g, '—');\n str = str.replace(/\\u0098/g, '˜');\n str = str.replace(/\\u0099/g, '™');\n str = str.replace(/\\u009a/g, 'š');\n str = str.replace(/\\u009b/g, '›');\n str = str.replace(/\\u009c/g, 'œ');\n str = str.replace(/\\u009d/g, failstr);\n str = str.replace(/\\u009e/g, 'ž');\n str = str.replace(/\\u009f/g, 'Ÿ');\n \n return str;\n}", "function remove_preposition(arg) {\n\t\tvar str = arg\n\t\treturn str\n\t}", "function safe(str, col)\n\t\t{\n\t\t\tif (typeof str === 'undefined' || str === null)\n\t\t\t\treturn '';\n\n\t\t\tstr = str.toString().replace(quoteCharRegex, _quoteChar+_quoteChar);\n\n\t\t\tvar needsQuotes = (typeof _quotes === 'boolean' && _quotes)\n\t\t\t\t\t\t\t|| (_quotes instanceof Array && _quotes[col])\n\t\t\t\t\t\t\t|| hasAny(str, Papa.BAD_DELIMITERS)\n\t\t\t\t\t\t\t|| str.indexOf(_delimiter) > -1\n\t\t\t\t\t\t\t|| str.charAt(0) === ' '\n\t\t\t\t\t\t\t|| str.charAt(str.length - 1) === ' ';\n\n\t\t\treturn needsQuotes ? _quoteChar + str + _quoteChar : str;\n\t\t}", "function safe(str, col)\n\t\t{\n\t\t\tif (typeof str === 'undefined' || str === null)\n\t\t\t\treturn '';\n\n\t\t\tstr = str.toString().replace(quoteCharRegex, _quoteChar+_quoteChar);\n\n\t\t\tvar needsQuotes = (typeof _quotes === 'boolean' && _quotes)\n\t\t\t\t\t\t\t|| (_quotes instanceof Array && _quotes[col])\n\t\t\t\t\t\t\t|| hasAny(str, Papa.BAD_DELIMITERS)\n\t\t\t\t\t\t\t|| str.indexOf(_delimiter) > -1\n\t\t\t\t\t\t\t|| str.charAt(0) === ' '\n\t\t\t\t\t\t\t|| str.charAt(str.length - 1) === ' ';\n\n\t\t\treturn needsQuotes ? _quoteChar + str + _quoteChar : str;\n\t\t}", "function autoEdUnicodeControlChars(str) { //MAIN FUNCTION describes list of fixes\n \n //Removes unneeded Unicode control characters\n str = str.replace(new RegExp('\\u200E|\\uFEFF|\\u200B', 'gi'), '');\n \n return str;\n}", "function convert(str) { /* & = &amp; < = &lt; > = &gt; ' = &apos; \" = &quot;*/\n\n var found_matches = str.match(/[&<>\"']g/);\n if (found_matches == null) {\n return str;\n } else {\n\n for (var i = 0, i < found_matches.length; i++) {\n switch (str[i]) {\n case '&':\n str.replace(/&/g, '&amp;');\n break;\n case '<':\n str.replace(/</g, '&lt;');\n break;\n case '>':\n str.replace(/>/g, '&gt;');\n break;\n case '\"':\n str.replace(/\"/g, '&#34;');\n break;\n case \"'\":\n str.replace(/'/g, '&apos;');\n break;\n\n }\n }\n }\n console.log(str);\n return str;\n}", "function stripQuotes(theStr) {\r var theQuote;\r if (theStr.length > 1) { //if possibly quoted\r theQuote = theStr.charAt(0);\r if ((theQuote == \"'\" || theQuote == '\"') &&\r theStr.charAt(theStr.length-1) == theQuote)\r theStr = theStr.substring(1,theStr.length-1);\r }\r return theStr\r}", "function escapeChars(dbPromotionName) {\n \tif (dbPromotionName.indexOf(\"&amp;\") >= 0) {\n \t\tdbPromotionName= dbPromotionName.replace(/\\&amp;/g,'&');\n\t}\n \treturn dbPromotionName;\n}", "function stripQuotes(str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27) ?\n str.slice(1, -1) :\n str;\n}", "function stripQuotes(str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27) ?\n str.slice(1, -1) :\n str;\n}", "function stripQuotes(str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27) ?\n str.slice(1, -1) :\n str;\n}", "function sanitize(o) {\n var temp = \"\",\n testPlusChar = \"\";\n \n for (i=0;i<o.value.length;i++) {\n var iPlusOne = i+1;\n testPlusChar += o.value.substring(i,iPlusOne);\n if ((!regExpression.test(testPlusChar))) {\n var lastChar = testPlusChar.length-1;\n temp = testPlusChar.substring(0,lastChar);\n testPlusChar = temp;\n }\n }\n o.value = testPlusChar;\n }", "function idSafe(s){\n\ts = s.replace(/\\s/g, '-')\n\ts = s.replace(/&/g, 'ands')\n\treturn s\n}", "function safe(str, col)\n\t\t{\n\t\t\tif (typeof str === 'undefined' || str === null)\n\t\t\t\treturn '';\n\n\t\t\tstr = str.toString().replace(quoteCharRegex, _quoteChar + _quoteChar);\n\n\t\t\tvar needsQuotes = (typeof _quotes === 'boolean' && _quotes)\n\t\t\t\t\t\t\t|| (_quotes instanceof Array && _quotes[col])\n\t\t\t\t\t\t\t|| hasAny(str, Papa.BAD_DELIMITERS)\n\t\t\t\t\t\t\t|| str.indexOf(_delimiter) > -1\n\t\t\t\t\t\t\t|| str.charAt(0) === ' '\n\t\t\t\t\t\t\t|| str.charAt(str.length - 1) === ' ';\n\n\t\t\treturn needsQuotes ? _quoteChar + str + _quoteChar : str;\n\t\t}", "function safe(str, col)\n\t\t{\n\t\t\tif (typeof str === 'undefined' || str === null)\n\t\t\t\treturn '';\n\n\t\t\tstr = str.toString().replace(quoteCharRegex, _quoteChar + _quoteChar);\n\n\t\t\tvar needsQuotes = (typeof _quotes === 'boolean' && _quotes)\n\t\t\t\t\t\t\t|| (_quotes instanceof Array && _quotes[col])\n\t\t\t\t\t\t\t|| hasAny(str, Papa.BAD_DELIMITERS)\n\t\t\t\t\t\t\t|| str.indexOf(_delimiter) > -1\n\t\t\t\t\t\t\t|| str.charAt(0) === ' '\n\t\t\t\t\t\t\t|| str.charAt(str.length - 1) === ' ';\n\n\t\t\treturn needsQuotes ? _quoteChar + str + _quoteChar : str;\n\t\t}", "function safe(str, col)\n\t\t{\n\t\t\tif (typeof str === 'undefined' || str === null)\n\t\t\t\treturn '';\n\n\t\t\tstr = str.toString().replace(quoteCharRegex, _quoteChar + _quoteChar);\n\n\t\t\tvar needsQuotes = (typeof _quotes === 'boolean' && _quotes)\n\t\t\t\t\t\t\t|| (_quotes instanceof Array && _quotes[col])\n\t\t\t\t\t\t\t|| hasAny(str, Papa.BAD_DELIMITERS)\n\t\t\t\t\t\t\t|| str.indexOf(_delimiter) > -1\n\t\t\t\t\t\t\t|| str.charAt(0) === ' '\n\t\t\t\t\t\t\t|| str.charAt(str.length - 1) === ' ';\n\n\t\t\treturn needsQuotes ? _quoteChar + str + _quoteChar : str;\n\t\t}", "function parseInvalidXmlCharacters(text){\n text = text.replace(\"&\",\"and\");\n text = text.replace(\"<\",\" \");\n text = text.replace(\">\",\" \");\n text = text.replace(\"'\",\" \");\n return text;\n }", "function cleanstring(ss)\n{\n return ss.replace(/\\|undefined/, '|0').replace(/\\|(?=\\|)/g, '|0');\n}", "function clean_title(string) {\n \tstring = basic_clean(string)\n\n \t// removes newlines, tabs\n \tstring = string.replace(/[\\x09\\x0A\\x0D]+/gi, '') \n\n \t// removes HTML\n \tstring = string.replace(/<.*?>/gi, '') \n \n \t// replace 'and' html entity\n \tstring = string.replace(/&amp;/gi, 'and')\n\n \t// replace 'nonbreaking space' html entity\n \tstring = string.replace(/&nbsp;/gi, ' ')\n\n \treturn string;\n}", "function cleanString(input) {\n let output = \"\";\n for (var i=0; i<input.length; i++) {\n if (input.charCodeAt(i) <= 127) {\n output += input.charAt(i);\n } else {\n output += ' '; // invilid char will replaced with an empty string\n }\n }\n return output;\n}", "function unquote(value) {\n return (value.\n replace(/&lt;/g, \"<\").\n replace(/&gt;/g, \">\").\n replace(/&amp;/g, \"&\"));\n}", "function sanitize(string) {\n return string.replace(/[\\u2018\\u2019]/g, \"'\").replace(/[\\u201C\\u201D]/g, '\"');\n}", "function desaccentuation() {\n newinput = newinput.replace(/[éèêë]/gi, \"e\");\n\tnewinput = newinput.replace(/[àâä]/gi, \"a\");\n\tnewinput = newinput.replace(/[ïî]/gi, \"i\");\n\tnewinput = newinput.replace(/[üûù]/gi, \"u\");\n\tnewinput = newinput.replace(/[öô]/gi, \"o\");\n newinput = newinput.replace(/[ç]/gi, \"c\");\n newinput = newinput.replace(/[']/gi, \" \");\n newinput = newinput.replace(/[-]/gi, \" \");\n //newinput = newinput.replace(/[?]/gi, \" \");\n //newinput = newinput.replace(/[!]/gi, \" \");\n newinput = newinput.replace(/[\\s]{2,}/g,\" \"); // Enlève les espaces doubles, triples, etc.\n newinput = newinput.trim();\n text = newinput;\n // on remplace les accents avec repalce\n // on suprime les espaces blanc en debut de ligne et en fin de ligne avec trim()\n // on remplit la variable text avec newinput pour la suite du programe.\n\n}", "function replaceHTMLChars(value) {\n\treturn value.replace(/&amp;/gi,'&').replace(/&lt;/gi,'<').replace(/&gt;/gi,'>').replace(/&#039;/gi,'\\'').replace(/&quot;/gi,'\"');\n}", "function retira_caracteres_indesejados(msg){\n if (msg.indexOf(\"[&quot;\") != -1 || msg.indexOf(\"&quot;]\") != -1) {\n msg = msg.replace(\"[&quot;\" , \"\").replace(\"&quot;]\" ,\"\");\n }\n return msg;\n}", "function replaceSpecialCharactersHTML(str) {\r\n\tif (str != \"undefined\" && str != \"\" && str != null) {\r\n\t\tstr = str.replace(/\\'/gi, \"&lsquo;\");\r\n\t\tstr = str.replace(/\\xE9/gi, \"&eacute;\");\r\n\t\tstr = str.replace(/\\`/gi, \"&lsquo;\");\r\n str = str.replace(/\\\"/gi, \"\\\\\\\"\");\r\n\t}\r\n\treturn str;\r\n}", "function sanitizeString(s) {\n return s.replace(/['\"]/g, '');\n}" ]
[ "0.673267", "0.64428586", "0.6187874", "0.6163192", "0.6098955", "0.60353136", "0.6021125", "0.59356993", "0.5935117", "0.5911188", "0.5852808", "0.58519936", "0.5844899", "0.5796042", "0.57919323", "0.5764593", "0.57337195", "0.5731774", "0.57267904", "0.56957114", "0.5684116", "0.5636343", "0.5629421", "0.5615491", "0.5609304", "0.5593542", "0.55417764", "0.5524664", "0.54744035", "0.5460619", "0.5443877", "0.5442805", "0.54230565", "0.540964", "0.54021895", "0.54005367", "0.5396802", "0.5395142", "0.53834504", "0.5375641", "0.5370625", "0.5370268", "0.5353061", "0.5350732", "0.53458357", "0.5344327", "0.5338146", "0.53381157", "0.533626", "0.53278095", "0.5323974", "0.53186893", "0.53186893", "0.53186893", "0.53186893", "0.53186893", "0.53186893", "0.53186893", "0.53186893", "0.53186893", "0.53186893", "0.53186893", "0.53186893", "0.53186893", "0.53186893", "0.531059", "0.5309346", "0.53083134", "0.5298586", "0.5292465", "0.5282661", "0.5280567", "0.5277844", "0.52730435", "0.5272708", "0.527256", "0.527256", "0.5268635", "0.52677965", "0.52627045", "0.5260054", "0.5252152", "0.5252152", "0.5252152", "0.5249317", "0.524252", "0.52410626", "0.52410626", "0.52410626", "0.52403337", "0.5237701", "0.5225668", "0.5203521", "0.5196803", "0.5195395", "0.51933223", "0.5192873", "0.5192179", "0.5184048", "0.51730454" ]
0.5829306
13
Remove &pos; and put an apostrophe in it's place.
function deScrub(targetStr) { var pieces = targetStr.split("$pos;"); return pieces.join("'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encodeApos (input)\n{\n\n var encoded = input.replace(/'/g, \"&apos\");\n return encoded;\n}", "function nombreApostrophe(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \"\\'\");\n\n }// Fin fonction nombreApostrophe", "function decodeApos(input)\n{\n var decoded= input.replace(/&apos/g, \"'\");\n return decoded;\n}", "function fixLocationNames (text) {\n var t = text; \n t = t.replace(/\\\\'/g, \"'\");\n // console.log(t);\n return t; \n}", "function changeSpecialCharsQS(text) {\n text = text.replace('&', ' aaa ');\n return text;\n}", "function htmlFix(html)\n{\n \tvar re = new RegExp('&apos;', 'g');\n\thtml = html.replace(re,'&#39;');\n\treturn html;\n}", "function htmlSpecialChars(str, quote_style)\r\n{\r\n\tstr = str.replace(/&/ig,\"&amp;\");\r\n\tif(!quote_style || quote_style==1)\r\n\t{\r\n\t\tstr = str.replace(/\\\"/ig,\"&quot;\")\r\n\t\tif(quote_style==1)\r\n\t\t\tstr = str.replace(/\\'/ig,\"&#039;\")\r\n\t}\r\n\tstr = str.replace(/\\>/ig,\"&gt;\");\r\n\tstr = str.replace(/\\</ig,\"&lt;\");\r\n\treturn str;\r\n}", "function replaceSQ(strValue)\r\n{\r\n\tstrValue = string_replace(strValue,\"“\",'\"',true);\r\n\tstrValue = string_replace(strValue,\"”\",'\"',true);\r\n\tstrValue = string_replace(strValue,\"‘\",\"'\",true);\r\n\tstrValue = string_replace(strValue,\"’\",\"'\",true);\r\n\treturn strValue;\r\n}", "set BackQuote(value) {}", "function html_unesc_amp_only($s) {\n return str_ireplace('&amp;','&',$s);\n}", "function fixQuotes(text) {\n return text.replace(/&(quot|#39|amp);/g,function unEscape(match){\n return entities.decodeHTML(match);\n });\n}", "function fixUp(val) {\n return val.replace('·', '*')\n .replace(\"⋅\", '*')\n .replace('\\u2212', '-')\n .replace('\\u0192', 'f')\n .replace('\\xa0', ''); // space\n }", "function escapeChars(dbPromotionName) {\n \tif (dbPromotionName.indexOf(\"&amp;\") >= 0) {\n \t\tdbPromotionName= dbPromotionName.replace(/\\&amp;/g,'&');\n\t}\n \treturn dbPromotionName;\n}", "function echosc(str)\n{\n\tstr=str.replace(/&/g,\"&amp;\");\n\tstr=str.replace(/</g,\"&lt;\");\n\tstr=str.replace(/>/g,\"&gt;\");\n\tstr=str.replace(/\"/g,\"&quot;\");\n\tstr=str.replace(/'/g,\"\\'\");\n\tstr=str.replace(/ /g,\"&nbsp;\");\n\tdocument.write(str);\n}", "function fixQuote(stru) {\n return stru.split(\"&quot;\").join(\"\\\"\");\n}", "function UnquoteSplicing() {\r\n}", "function S(a){\n// HTML encode: Replace < > & ' and \" by corresponding entities.\nreturn void 0!=a?ya.test(a)&&(\"\"+a).replace(Aa,P)||a:\"\"}", "function replaceSpecialChars(textToChange){\n newText = textToChange.replace('&amp;','&').replace('&gt;','>').replace('&lt;','<');\n return newText;\n}", "function ssml_escape ( orig ) {\n return orig.replace('&', ' and ')\n}", "function quoteHTML(s) {\r\n\ts = s.replace(/&/g, \"&amp;\");\r\n\ts = s.replace(/</g, \"&lt;\");\r\n\ts = s.replace(/>/g, \"&gt;\");\r\n\treturn s;\r\n }", "set DoubleQuote(value) {}", "function smarten(a) {\n a = a.replace(/(^|[-\\u2014\\s(\\[\"])'/g, \"$1\\u2018\"); // opening singles\n a = a.replace(/'/g, \"\\u2019\"); // closing singles & apostrophes\n a = a.replace(/(^|[-\\u2014/\\[(\\u2018\\s])\"/g, \"$1\\u201c\"); // opening doubles\n a = a.replace(/\"/g, \"\\u201d\"); // closing doubles\n a = a.replace(/--/g, \"\\u2014\"); // em-dashes\n return a;\n}", "function insertPlQuotes(editor) {\n\tvar selectedHtml = \"\";\n\tvar selection = editor.getSelection();\n\tif (selection) {\n\t\tselectedHtml = getSelectionHtml(selection);\n\t}\n\teditor.insertHtml('„' + selectedHtml + '”');\n}", "function replaceSpecialCharactersHTML(str) {\r\n\tif (str != \"undefined\" && str != \"\" && str != null) {\r\n\t\tstr = str.replace(/\\'/gi, \"&lsquo;\");\r\n\t\tstr = str.replace(/\\xE9/gi, \"&eacute;\");\r\n\t\tstr = str.replace(/\\`/gi, \"&lsquo;\");\r\n str = str.replace(/\\\"/gi, \"\\\\\\\"\");\r\n\t}\r\n\treturn str;\r\n}", "function literalize(which) {\n\tmyField = document.getElementById(which);\n\tvar selectedText = '';\n\tif (document.selection) {\n\t\tmyField.focus();\n\t\tvar sel = document.selection.createRange();\n\t\tif (sel.text.length > 0) {\n\t\t\tselectedText = sel.text;\n\t\t}\n\t}\n\telse if (myField.selectionStart || myField.selectionStart == '0') {\n\t\tvar startPos = myField.selectionStart;\n\t\tvar endPos = myField.selectionEnd;\n\t\tif (startPos != endPos) {\n\t\t\tselectedText = myField.value.substring(startPos, endPos);\n\t\t}\n\t}\n\tvar i = 0;\n\tvar literalizedStr = '';\n\tfor (i=0; i<selectedText.length; i++) {\n\t\tif (selectedText.substr(i,1) == '&') {\n\t\t\tliteralizedStr = literalizedStr + '&amp;';\n\t\t} else if (selectedText.substr(i,1) == '<') {\n\t\t\tliteralizedStr = literalizedStr + '&lt;';\n\t\t} else if (selectedText.substr(i,1) == '>') {\n\t\t\tliteralizedStr = literalizedStr + '&gt;';\n\t\t} else if (selectedText.substr(i,1) == '[') {\n\t\t\tliteralizedStr = literalizedStr + '&#91;';\n\t\t} else if (selectedText.substr(i,1) == ']') {\n\t\t\tliteralizedStr = literalizedStr + '&#93;';\n\t\t} else {\n\t\t\tliteralizedStr = literalizedStr + selectedText.substr(i,1);\n\t\t}\n\t}\n\tedInsertContent(which,literalizedStr);\n}", "function replaceIfNotEscaped(str,toRep,watRep){\n\tfor(var i=0; i<str.length; i++){\n\t\tif(str[i] == toRep && str[i-1] != '\\\\'){\n str = setCharAt(str,i,watRep);\n i = i +(watRep.length-1);\n\t\t}\n\t}\n\treturn str;\n}", "function chgEntities(passedStr)\n{\nvar myStr = repStrs(passedStr,'%22','&quot;') \n myStr = repStrs(myStr,'%26','&amp;') \n myStr = repStrs(myStr,'%3C','&gt;') \n myStr = repStrs(myStr,'%2E','&lt;') \n// myStr = repStrs(myStr,'%27',\"\\\\'\")\n\n\treturn unescape(myStr)\n}", "function replaceHTMLChars(value) {\n\treturn value.replace(/&amp;/gi,'&').replace(/&lt;/gi,'<').replace(/&gt;/gi,'>').replace(/&#039;/gi,'\\'').replace(/&quot;/gi,'\"');\n}", "function replaceSpecialCharacters(str) {\n if (str != \"undefined\" && str != \"\" && str != null) {\n str = str.replace(/\\'/gi, \"&lsquo;\");\n str = str.replace(/\\xE9/gi, \"&eacute;\");\n str = str.replace(/\\`/gi, \"&lsquo;\");\n }\n return str;\n}", "function quotechange(a){\r\n\tvar stringReplace=\"\";\r\n\tfor (var j=0,aL=a.length; j<aL; ++j){\r\n\t\tif (a.charAt(j) == '\\\"')\r\n\t\t\tstringReplace=stringReplace + \"&quot;\";\r\n\t\telse\r\n\t\t\tstringReplace=stringReplace + a.charAt(j);\r\n\t}\r\n\treturn stringReplace;\r\n}", "function insert(main_string, ins_string, pos) {\n if(typeof(pos) == \"undefined\") {\n pos = 0;\n }\n if(typeof(ins_string) == \"undefined\") {\n ins_string = '';\n }\n return main_string.slice(0, pos) + ins_string + main_string.slice(pos);\n}", "function _escTag(s){ return s.replace(\"<\",\"&lt;\").replace(\">\",\"&gt;\");}", "function _escTag(s){ return s.replace(\"<\",\"&lt;\").replace(\">\",\"&gt;\");}", "function checkForQuotes() {\r\n if (sentence.includes(\"“\") && !sentence.includes(\"”\")) {\r\n sentence = sentence + \" ...”\";\r\n } else if (!sentence.includes(\"“\") && sentence.includes(\"”\")) {\r\n sentence = \"“... \" + sentence;\r\n } \r\n}", "function specialCharacters(code) {\n return code.replace(/\\t/g, '&nbsp;&nbsp;');\n }", "function replaceSmartQuotes(text) {\n text = text.replaceAll( \"[\\u2018\\u2019\\u201A\\u201B\\u2032\\u2035]\", \"'\" );\n text = text.replaceAll(\"[\\u201C\\u201D\\u201E\\u201F\\u2033\\u2036]\",\"\\\"\");\n return text;\n}", "function Unquote() {\r\n}", "function removeApostrophe(fullName){\n if(fullName.indexOf(\"'\") != -1){\n fullName = fullName.replace(/'/g, '');\n }\n return fullName;\n}", "function nullCharacterInForeignContent(p, token) {\r\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\r\n p._insertCharacters(token);\r\n}", "function replaceNgsp(value){// lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE\nreturn value.replace(new RegExp(NGSP_UNICODE,'g'),' ');}", "function cleanTitle(title){\n var symbols = {\n '@': '%40',\n '&amp;': 'and',\n '*': '%2A',\n '+': '%2B',\n '/': '%2F',\n '&lt;': '%3C',\n '&gt;': '%3E'\n };\n title = title.replace(/([@*+/]|&(amp|lt|gt);)/g, function (m) { return symbols[m]; });\n title = title.replace('&','and');\n return title;\n}", "function solAposStringMode(hljs) {\n return hljs.inherit(\n hljs.APOS_STRING_MODE, //please also update solQuoteStringMode\n { begin: /(\\bunicode)?'/ }\n );\n}", "function removeSpecialCharacters (title) {\n title = title.replace(/,/g, '')\n title = title.replace(/:/g, '')\n title = title.split('(').join('')\n title = title.split(')').join('')\n title = title.split('!').join('')\n title = title.split('?').join('')\n title = title.split('.').join('')\n return title;\n }", "function escapeSingleQuotes(original) {\n let replaced = '';\n\n for (let i = 0; i < original.length; i++) {\n if (original.charAt(i) == '\\'') {\n // Add the HTML entity for a single quote.\n replaced += \"&#39\";\n }\n else {\n replaced += original.charAt(i);\n }\n }\n\n return replaced;\n}", "function recodeText (text) {\n\tif(text != null) {\n\t\treturn text.replace(new RegExp('&#39;', 'g'), '\\''); \n\t}\n}", "function esc(s) {\r\n var s = escape(s);\r\n s = s.split(\"\");\r\n for (var i = 0; i < s.length; i++) {\r\n if (s[i] == \"+\") s[i] = \"%2B\";\r\n }\r\n return s.join(\"\");\r\n}", "function scrub(targetStr)\r\n{\r\n\tvar pieces = targetStr.split(\"'\");\r\n\treturn pieces.join(\"$pos;\");\r\n}", "get BackQuote() {}", "function prepHTMLValue(value)\n{\nif(value != \"\" )\n\t{\n\tnewvalue = encodeURIComponent(value);\n\tescvalue = escape(value);\n\n\tif(escvalue.indexOf(\"%u\") != -1 && encode != \"UTF-8\")\n\t\treturn value;\n\telse\n\t\treturn newvalue;\n\t}\nreturn \"\";\n}", "function checkApostrophe(array) {\n array.forEach(function(element, index) {\n //console.log(element+\" : \"+element.indexOf('\\''));\n if (element.indexOf('\\'') == 1) {\n //console.log('index: '+index);\n var tmp = element.replace(/'/g, '');\n array[index] = tmp.substr(1);\n }\n });\n return array;\n}", "function doescape(original) {\n original = original.replace(/&/g, '&amp;'); // First, of course.\n original = original.replace(/</g, '&lt;');\n original = original.replace(/>/g, '&gt;');\n return original;\n}", "function P(a){return Ca[a]||(Ca[a]=\"&#\"+a.charCodeAt(0)+\";\")}", "function enclose(title) {\n var delimiter = title.indexOf('\"') === -1 ? '\"' : '\\'';\n return delimiter + title + delimiter;\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function QuasiQuotation() {\r\n}", "function remove_preposition(arg) {\n\t\tvar str = arg\n\t\treturn str\n\t}", "function GetTextWithEncodeAmpersandSymbol(textParam) {\r\n\treturn textParam.replace(/&/g, \"NampersandN\");\r\n}", "function escape(s) {\n // this should be safe since there is no CJK contains \"&\", \"<\"\n return s.replace(/<|&/g, escapeRepl);\n}", "function charOriginal (ascii){\r\n return ascii.replace(/¹/g, \"'\").replace(/²/g, '\"').replace(/³/g, \";\"); \r\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = unicode.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = unicode.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = unicode.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = unicode.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function myspacefmt(text) {\n\n\ts = text\n\n\t// Turn special characters back into HTML entities so they don't get stripped\n\t// List is from the tables at http://www.htmlhelp.com/reference/html40/entities/\n\ts = s.replace(/\\uA0/g, '&nbsp;');\n\ts = s.replace(/\\uA1/g, '&iexcl;');\n\ts = s.replace(/\\uA2/g, '&cent;');\n\ts = s.replace(/\\uA3/g, '&pound;');\n\ts = s.replace(/\\uA4/g, '&curren;');\n\ts = s.replace(/\\uA5/g, '&yen;');\n\ts = s.replace(/\\uA6/g, '&brvbar;');\n\ts = s.replace(/\\uA7/g, '&sect;');\n\ts = s.replace(/\\uA8/g, '&uml;');\n\ts = s.replace(/\\uA9/g, '&copy;');\n\ts = s.replace(/\\uAA/g, '&ordf;');\n\ts = s.replace(/\\uAB/g, '&laquo;');\n\ts = s.replace(/\\uAC/g, '&not;');\n\ts = s.replace(/\\uAD/g, '&shy;');\n\ts = s.replace(/\\uAE/g, '&reg;');\n\ts = s.replace(/\\uAF/g, '&macr;');\n\ts = s.replace(/\\uB0/g, '&deg;');\n\ts = s.replace(/\\uB1/g, '&plusmn;');\n\ts = s.replace(/\\uB2/g, '&sup2;');\n\ts = s.replace(/\\uB3/g, '&sup3;');\n\ts = s.replace(/\\uB4/g, '&acute;');\n\ts = s.replace(/\\uB5/g, '&micro;');\n\ts = s.replace(/\\uB6/g, '&para;');\n\ts = s.replace(/\\uB7/g, '&middot;');\n\ts = s.replace(/\\uB8/g, '&cedil;');\n\ts = s.replace(/\\uB9/g, '&sup1;');\n\ts = s.replace(/\\uBA/g, '&ordm;');\n\ts = s.replace(/\\uBB/g, '&raquo;');\n\ts = s.replace(/\\uBC/g, '&frac14;');\n\ts = s.replace(/\\uBD/g, '&frac12;');\n\ts = s.replace(/\\uBE/g, '&frac34;');\n\ts = s.replace(/\\uBF/g, '&iquest;');\n\ts = s.replace(/\\uC0/g, '&Agrave;');\n\ts = s.replace(/\\uC1/g, '&Aacute;');\n\ts = s.replace(/\\uC2/g, '&Acirc;');\n\ts = s.replace(/\\uC3/g, '&Atilde;');\n\ts = s.replace(/\\uC4/g, '&Auml;');\n\ts = s.replace(/\\uC5/g, '&Aring;');\n\ts = s.replace(/\\uC6/g, '&AElig;');\n\ts = s.replace(/\\uC7/g, '&Ccedil;');\n\ts = s.replace(/\\uC8/g, '&Egrave;');\n\ts = s.replace(/\\uC9/g, '&Eacute;');\n\ts = s.replace(/\\uCA/g, '&Ecirc;');\n\ts = s.replace(/\\uCB/g, '&Euml;');\n\ts = s.replace(/\\uCC/g, '&Igrave;');\n\ts = s.replace(/\\uCD/g, '&Iacute;');\n\ts = s.replace(/\\uCE/g, '&Icirc;');\n\ts = s.replace(/\\uCF/g, '&Iuml;');\n\ts = s.replace(/\\uD0/g, '&ETH;');\n\ts = s.replace(/\\uD1/g, '&Ntilde;');\n\ts = s.replace(/\\uD2/g, '&Ograve;');\n\ts = s.replace(/\\uD3/g, '&Oacute;');\n\ts = s.replace(/\\uD4/g, '&Ocirc;');\n\ts = s.replace(/\\uD5/g, '&Otilde;');\n\ts = s.replace(/\\uD6/g, '&Ouml;');\n\ts = s.replace(/\\uD7/g, '&times;');\n\ts = s.replace(/\\uD8/g, '&Oslash;');\n\ts = s.replace(/\\uD9/g, '&Ugrave;');\n\ts = s.replace(/\\uDA/g, '&Uacute;');\n\ts = s.replace(/\\uDB/g, '&Ucirc;');\n\ts = s.replace(/\\uDC/g, '&Uuml;');\n\ts = s.replace(/\\uDD/g, '&Yacute;');\n\ts = s.replace(/\\uDE/g, '&THORN;');\n\ts = s.replace(/\\uDF/g, '&szlig;');\n\ts = s.replace(/\\uE0/g, '&agrave;');\n\ts = s.replace(/\\uE1/g, '&aacute;');\n\ts = s.replace(/\\uE2/g, '&acirc;');\n\ts = s.replace(/\\uE3/g, '&atilde;');\n\ts = s.replace(/\\uE4/g, '&auml;');\n\ts = s.replace(/\\uE5/g, '&aring;');\n\ts = s.replace(/\\uE6/g, '&aelig;');\n\ts = s.replace(/\\uE7/g, '&ccedil;');\n\ts = s.replace(/\\uE8/g, '&egrave;');\n\ts = s.replace(/\\uE9/g, '&eacute;');\n\ts = s.replace(/\\uEA/g, '&ecirc;');\n\ts = s.replace(/\\uEB/g, '&euml;');\n\ts = s.replace(/\\uEC/g, '&igrave;');\n\ts = s.replace(/\\uED/g, '&iacute;');\n\ts = s.replace(/\\uEE/g, '&icirc;');\n\ts = s.replace(/\\uEF/g, '&iuml;');\n\ts = s.replace(/\\uF0/g, '&eth;');\n\ts = s.replace(/\\uF1/g, '&ntilde;');\n\ts = s.replace(/\\uF2/g, '&ograve;');\n\ts = s.replace(/\\uF3/g, '&oacute;');\n\ts = s.replace(/\\uF4/g, '&ocirc;');\n\ts = s.replace(/\\uF5/g, '&otilde;');\n\ts = s.replace(/\\uF6/g, '&ouml;');\n\ts = s.replace(/\\uF7/g, '&divide;');\n\ts = s.replace(/\\uF8/g, '&oslash;');\n\ts = s.replace(/\\uF9/g, '&ugrave;');\n\ts = s.replace(/\\uFA/g, '&uacute;');\n\ts = s.replace(/\\uFB/g, '&ucirc;');\n\ts = s.replace(/\\uFC/g, '&uuml;');\n\ts = s.replace(/\\uFD/g, '&yacute;');\n\ts = s.replace(/\\uFE/g, '&thorn;');\n\ts = s.replace(/\\uFF/g, '&yuml;');\n\ts = s.replace(/\\u192/g, '&fnof;');\n\ts = s.replace(/\\u391/g, '&Alpha;');\n\ts = s.replace(/\\u392/g, '&Beta;');\n\ts = s.replace(/\\u393/g, '&Gamma;');\n\ts = s.replace(/\\u394/g, '&Delta;');\n\ts = s.replace(/\\u395/g, '&Epsilon;');\n\ts = s.replace(/\\u396/g, '&Zeta;');\n\ts = s.replace(/\\u397/g, '&Eta;');\n\ts = s.replace(/\\u398/g, '&Theta;');\n\ts = s.replace(/\\u399/g, '&Iota;');\n\ts = s.replace(/\\u39A/g, '&Kappa;');\n\ts = s.replace(/\\u39B/g, '&Lambda;');\n\ts = s.replace(/\\u39C/g, '&Mu;');\n\ts = s.replace(/\\u39D/g, '&Nu;');\n\ts = s.replace(/\\u39E/g, '&Xi;');\n\ts = s.replace(/\\u39F/g, '&Omicron;');\n\ts = s.replace(/\\u3A0/g, '&Pi;');\n\ts = s.replace(/\\u3A1/g, '&Rho;');\n\ts = s.replace(/\\u3A3/g, '&Sigma;');\n\ts = s.replace(/\\u3A4/g, '&Tau;');\n\ts = s.replace(/\\u3A5/g, '&Upsilon;');\n\ts = s.replace(/\\u3A6/g, '&Phi;');\n\ts = s.replace(/\\u3A7/g, '&Chi;');\n\ts = s.replace(/\\u3A8/g, '&Psi;');\n\ts = s.replace(/\\u3A9/g, '&Omega;');\n\ts = s.replace(/\\u3B1/g, '&alpha;');\n\ts = s.replace(/\\u3B2/g, '&beta;');\n\ts = s.replace(/\\u3B3/g, '&gamma;');\n\ts = s.replace(/\\u3B4/g, '&delta;');\n\ts = s.replace(/\\u3B5/g, '&epsilon;');\n\ts = s.replace(/\\u3B6/g, '&zeta;');\n\ts = s.replace(/\\u3B7/g, '&eta;');\n\ts = s.replace(/\\u3B8/g, '&theta;');\n\ts = s.replace(/\\u3B9/g, '&iota;');\n\ts = s.replace(/\\u3BA/g, '&kappa;');\n\ts = s.replace(/\\u3BB/g, '&lambda;');\n\ts = s.replace(/\\u3BC/g, '&mu;');\n\ts = s.replace(/\\u3BD/g, '&nu;');\n\ts = s.replace(/\\u3BE/g, '&xi;');\n\ts = s.replace(/\\u3BF/g, '&omicron;');\n\ts = s.replace(/\\u3C0/g, '&pi;');\n\ts = s.replace(/\\u3C1/g, '&rho;');\n\ts = s.replace(/\\u3C2/g, '&sigmaf;');\n\ts = s.replace(/\\u3C3/g, '&sigma;');\n\ts = s.replace(/\\u3C4/g, '&tau;');\n\ts = s.replace(/\\u3C5/g, '&upsilon;');\n\ts = s.replace(/\\u3C6/g, '&phi;');\n\ts = s.replace(/\\u3C7/g, '&chi;');\n\ts = s.replace(/\\u3C8/g, '&psi;');\n\ts = s.replace(/\\u3C9/g, '&omega;');\n\ts = s.replace(/\\u3D1/g, '&thetasym;');\n\ts = s.replace(/\\u3D2/g, '&upsih;');\n\ts = s.replace(/\\u3D6/g, '&piv;');\n\ts = s.replace(/\\u2022/g, '&bull;');\n\ts = s.replace(/\\u2026/g, '&hellip;');\n\ts = s.replace(/\\u2032/g, '&prime;');\n\ts = s.replace(/\\u2033/g, '&Prime;');\n\ts = s.replace(/\\u203E/g, '&oline;');\n\ts = s.replace(/\\u2044/g, '&frasl;');\n\ts = s.replace(/\\u2118/g, '&weierp;');\n\ts = s.replace(/\\u2111/g, '&image;');\n\ts = s.replace(/\\u211C/g, '&real;');\n\ts = s.replace(/\\u2122/g, '&trade;');\n\ts = s.replace(/\\u2135/g, '&alefsym;');\n\ts = s.replace(/\\u2190/g, '&larr;');\n\ts = s.replace(/\\u2191/g, '&uarr;');\n\ts = s.replace(/\\u2192/g, '&rarr;');\n\ts = s.replace(/\\u2193/g, '&darr;');\n\ts = s.replace(/\\u2194/g, '&harr;');\n\ts = s.replace(/\\u21B5/g, '&crarr;');\n\ts = s.replace(/\\u21D0/g, '&lArr;');\n\ts = s.replace(/\\u21D1/g, '&uArr;');\n\ts = s.replace(/\\u21D2/g, '&rArr;');\n\ts = s.replace(/\\u21D3/g, '&dArr;');\n\ts = s.replace(/\\u21D4/g, '&hArr;');\n\ts = s.replace(/\\u2200/g, '&forall;');\n\ts = s.replace(/\\u2202/g, '&part;');\n\ts = s.replace(/\\u2203/g, '&exist;');\n\ts = s.replace(/\\u2205/g, '&empty;');\n\ts = s.replace(/\\u2207/g, '&nabla;');\n\ts = s.replace(/\\u2208/g, '&isin;');\n\ts = s.replace(/\\u2209/g, '&notin;');\n\ts = s.replace(/\\u220B/g, '&ni;');\n\ts = s.replace(/\\u220F/g, '&prod;');\n\ts = s.replace(/\\u2211/g, '&sum;');\n\ts = s.replace(/\\u2212/g, '&minus;');\n\ts = s.replace(/\\u2217/g, '&lowast;');\n\ts = s.replace(/\\u221A/g, '&radic;');\n\ts = s.replace(/\\u221D/g, '&prop;');\n\ts = s.replace(/\\u221E/g, '&infin;');\n\ts = s.replace(/\\u2220/g, '&ang;');\n\ts = s.replace(/\\u2227/g, '&and;');\n\ts = s.replace(/\\u2228/g, '&or;');\n\ts = s.replace(/\\u2229/g, '&cap;');\n\ts = s.replace(/\\u222A/g, '&cup;');\n\ts = s.replace(/\\u222B/g, '&int;');\n\ts = s.replace(/\\u2234/g, '&there4;');\n\ts = s.replace(/\\u223C/g, '&sim;');\n\ts = s.replace(/\\u2245/g, '&cong;');\n\ts = s.replace(/\\u2248/g, '&asymp;');\n\ts = s.replace(/\\u2260/g, '&ne;');\n\ts = s.replace(/\\u2261/g, '&equiv;');\n\ts = s.replace(/\\u2264/g, '&le;');\n\ts = s.replace(/\\u2265/g, '&ge;');\n\ts = s.replace(/\\u2282/g, '&sub;');\n\ts = s.replace(/\\u2283/g, '&sup;');\n\ts = s.replace(/\\u2284/g, '&nsub;');\n\ts = s.replace(/\\u2286/g, '&sube;');\n\ts = s.replace(/\\u2287/g, '&supe;');\n\ts = s.replace(/\\u2295/g, '&oplus;');\n\ts = s.replace(/\\u2297/g, '&otimes;');\n\ts = s.replace(/\\u22A5/g, '&perp;');\n\ts = s.replace(/\\u22C5/g, '&sdot;');\n\ts = s.replace(/\\u2308/g, '&lceil;');\n\ts = s.replace(/\\u2309/g, '&rceil;');\n\ts = s.replace(/\\u230A/g, '&lfloor;');\n\ts = s.replace(/\\u230B/g, '&rfloor;');\n\ts = s.replace(/\\u2329/g, '&lang;');\n\ts = s.replace(/\\u232A/g, '&rang;');\n\ts = s.replace(/\\u25CA/g, '&loz;');\n\ts = s.replace(/\\u2660/g, '&spades;');\n\ts = s.replace(/\\u2663/g, '&clubs;');\n\ts = s.replace(/\\u2665/g, '&hearts;');\n\ts = s.replace(/\\u2666/g, '&diams;');\n\ts = s.replace(/\\u152/g, '&OElig;');\n\ts = s.replace(/\\u153/g, '&oelig;');\n\ts = s.replace(/\\u160/g, '&Scaron;');\n\ts = s.replace(/\\u161/g, '&scaron;');\n\ts = s.replace(/\\u178/g, '&Yuml;');\n\ts = s.replace(/\\u2C6/g, '&circ;');\n\ts = s.replace(/\\u2DC/g, '&tilde;');\n\ts = s.replace(/\\u2002/g, '&ensp;');\n\ts = s.replace(/\\u2003/g, '&emsp;');\n\ts = s.replace(/\\u2009/g, '&thinsp;');\n\t// Blanking these four because they screw things up:\n\ts = s.replace(/\\u200C/g, ' ');\n\ts = s.replace(/\\u200D/g, ' ');\n\ts = s.replace(/\\u200E/g, ' ');\n\ts = s.replace(/\\u200F/g, ' ');\n\ts = s.replace(/\\u2020/g, '&dagger;');\n\ts = s.replace(/\\u2021/g, '&Dagger;');\n\ts = s.replace(/\\u2030/g, '&permil;');\n\ts = s.replace(/\\u2039/g, '&lsaquo;');\n\ts = s.replace(/\\u203A/g, '&rsaquo;');\n\ts = s.replace(/\\u20AC/g, '&euro;');\n\t\n\n\treplacements = [\n\n//\t[//g, ''], \n\n\t// Cyrillic quotes\n//\t[/(\\s+|^)\"([^\"]+?)\"(\\s+|$|\\.|\\,)/g, '$1\\u00ab$2\\u00bb$3'],\n\n\t// Latin quotes: \"test\" become smart quotes\n\t[/(\\s+|^)\"([^\\\"]+?)\"(\\s+|$|\\.|\\,)/g, '$1&ldquo;$2&rdquo;$3'],\n\t[/(\\s+|^)'([^\\']+?)'(\\s+|$|\\.|\\,)/g, '$1&lsquo;$2&rsquo;$3'],\n\n\t// Trademark: (TM)\n\t[/\\((tm|TM|\\u0422\\u041C|\\u0442\\u043C)\\)/g, '&trade;'],\n\n\t// Copyright: (C)\n\t[/\\([cC\\u0421\\u0441]\\)/g, '&copy;'],\n\n\t// Registered: (R)\n\t[/\\([rR\\u0420\\u0440]\\)/g, '&reg;'],\n\t\n\t// Hearts, of course! <3\n\t[/(\\s)(<3)(\\s)/g, '$1\\&hearts;$3'],\n\t\n\t// Section symbol, by request: {SS}\n\t[/\\{SS\\}/g, '&sect;'], \n\n\t// Arrows ==> <-- <==> and so on\n\t[/([^<])-{2}>/g, '$1&rarr;'],\n\t[/<-{2}([^>])/g, '&larr;$1'],\n\t[/<-{1,2}>/g, '&harr;'],\n\t[/([^<])={2}>/g, '$1&rArr;'],\n\t[/<={2}([^>])/g, '&lArr;$1'],\n\t[/<={1,2}>/g, '&hArr;'],\n\n\t// Horizontal rules: ---- becomes <hr>\n\t[/\\n----+\\n/g, '<hr>'], \n\t\n\t// Degree sign: degC becomes &deg;C (K does not have a degree sign!)\n\t[/degC(\\s)/g, '&deg;C$1'], \n\t[/degF(\\s)/g, '&deg;F$1'], \t\n\t\n\t// TeX subs and supers: x squared: x^{2} carbon dioxide: CO_{2}\n\t[/\\^\\{(.*?)\\}/g, '<sup>$1</sup>'], \n\t[/_\\{(.*?)\\}/g, '<sub>$1</sub>'], \n\t\t\n\t// Scientific notation: 3.5E2 becomes 3.5&times;10<sup>2</sup>\n\t[/(\\d)E(\\d+)/g, '$1&times;10<sup>$2</sup>'], \n\t\n\t// Plus or minus sign +-5 becomes &plusmn;5\n\t[/\\+-(\\d)/g, '&plusmn;$1'], \n\n\t// Censorship is evil.\n//\t[/A(IM\\s*)\\:/gi, '&Acirc;$1:'],\n\n\t// These screw up your posts if you've got 'em (Myspace sucks). It converts to something similar looking. :-\\ Best I can do...\n//\t[/\\#/gi, '&Dagger;&Dagger;'],\n\t[/\\\\/gi, '&lfloor;'],\n\n\t// Em dash -- two minuses surrounded by spaces\n\t[/(\\s+|^)--(\\s+)/g, '$1\\u2014$2'],\n\n\t// **bold**\t\n\t[/\\*{2}(.+?)\\*{2}/g, '<b>$1</b>'],\n\n\t// '''Wikipedia strong emphasis''' (rendered as bold usually)\n\t[/\\'{3}(.+?)\\'{3}/g, '<strong>$1</strong>'],\n\n\t// //italic//\n\t[/([^\\:]|^)\\/{2}(.+?)\\/{2}/g, '$1<i>$2</i>'],\n\n\t// ''Wikipedia emphasis'' (rendered as italics usually)\n\t[/\\'{2}(.+?)\\'{2}/g, '<em>$1</em>'],\n\n\t// --strikethrough--\n\t[/-{2}(.+?)-{2}/g, '<s>$1</s>'],\n\n\t// __underlined__\n\t[/_{2}(.+?)_{2}/g, '<u>$1</u>'],\n\t\n\t// A few colors? [blue]text[/color] becomes <font color=\"0000BB\">text</font> (will also accept [bl]text[/bl] or whatever)\n\t[/\\[(bk|k|black)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t'<font color=\"black\">$2</font>'],\n\t[/\\[(n|navy)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"navy\">$2</font>'],\t\n\t[/\\[(gn|green)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"green\">$2</font>'],\n\t[/\\[(tl|teal)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"teal\">$2</font>'], // [t] would conflict with quote tags\n\t[/\\[(s|silver)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"silver\">$2</font>'],\t\n\t[/\\[(bl|be|bu|blue)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t'<font color=\"blue\">$2</font>'],\t\n\t[/\\[(l|lime)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"lime\">$2</font>'],\t\n\t[/\\[(a|aq|aqua|c|cy|cyan)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t'<font color=\"aqua\">$2</font>'],\t\n\t[/\\[(m|maroon)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"maroon\">$2</font>'],\n\t[/\\[(p|purple|v|violet)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t'<font color=\"purple\">$2</font>'],\t\n\t[/\\[(o|olive)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"olive\">$2</font>'],\n\t[/\\[(gy|gray|grey)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t'<font color=\"gray\">$2</font>'],\n\t[/\\[(r|red)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t\t'<font color=\"red\">$2</font>'],\t\n\t[/\\[(f|fuschia|magenta)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t'<font color=\"fuschia\">$2</font>'],\t\n\t[/\\[(y|yw|yellow)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t'<font color=\"yellow\">$2</font>'],\t\n\t[/\\[(w|wh|white)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t'<font color=\"white\">$2</font>'],\t\n\t\n\t// En dash for number ranges: 1995-2005\n\t[/(\\d+)-(\\d+)/g, '$1\\u2013$2'],\n\n\t// Ellipsis\n//\t[/\\.\\.\\./g, '\\u2026'],\n\n\t// [quote] tags [/quote] (or [q] or [Q] or [t] or whatever)\n\t// First replace the SomeoneWrote: bit with legend tags\n\t[/\\[(quote|q|t)\\](\\s*\\n?)([^\\n]*)Wrote:(\\s*\\n)([\\s\\S]*?)\\[\\/(quote|q|t)\\]/gim, '[$1]<legend>$3 wrote:</legend>$5[/$6]'],\n\t// Then replace the rest with fieldset tags \n\t[/\\[(quote|q|t)\\]([\\s\\S]*?)\\[\\/(quote|q|t)\\]/gim, '<fieldset style=\"border: 1px solid; border-color: aaaaaa; padding: 1em; margin: 1em 2em;\">$2</fieldset>'],\n\t// (This way it can handle nested quotes and optional \"Wrote:\" sections.)\n\n\t// Old version of quotes based directly on Myspace's quote markup:\t\n//\t[/\\[(quote|q|t)\\]([\\s\\S]*?)\\[\\/(quote|q|t)\\]/gim, '<table align=\"center\" bgcolor=\"cccccc\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"90%\"><tbody><tr><td><table bgcolor=\"ffffff\" border=\"0\" cellpadding=\"10\" cellspacing=\"0\" width=\"100%\"><tbody><tr><td><p>$2</p></td></tr></tbody></table></td></tr></tbody></table>'],\n\n\t// Image shortcut IMG=http://www.url.com/image.png surrounded by whitespace.\n\t[/(\\s)IMG=(\\S*?)([\\s\\]])/gi, '$1<img src=\"$2\">$3'],\n\t\n\t// Named URLs in wikipedia format [http://address linked text]\n\t[/\\[http:([^ \\t\\v\\f\\n\\r\\]]*?)\\s+(\\S.*?)\\]/gi, '<a href=\"http:$1\">$2</a>'],\n\t\n\t// Myspace URLs [my:Firefox] or [myspace:Firefox] becomes http://www.myspace.com/Firefox\n\t[/\\[(my|myspace):(\\S.*?)\\]/gi, '<a href=\"http://www.myspace.com/$2\">Myspace: $2</a>'],\n\t\n\t// Myspace group URLs [gr:toolbar] or [group:toolbar] becomes http://groups.myspace.com/toolbar\n\t[/\\[(gr|group):(\\S.*?)\\]/gi, '<a href=\"http://groups.myspace.com/$2\">Myspace group: $2</a>'],\n\n\t// Auto-link naked URLs\n\t[/(\\s)http(s)*:(\\S*?)(\\s)/gi, '$1<a href=\"http$2:$3\">http$2:$3</a>$4'],\n\t\n\t// Links to wikipedia articles [[linked text]] (useful in fights)\n\t[/\\[\\[([\\s\\S]+?)\\]\\]/gi, '<a href=\"http://en.wikipedia.org/wiki/$1\">$1</a>']\n\n\t];\n\n\t// Runs through itself over and over until nothing changes, to handle nested quote tags and the like. \n\t// Uses \"for\" instead of \"while\" to prevent infinite loops from poorly written regexps. ;-)\n\tfor( j=0; j<=100; j++) {\n\t\tolds = s;\n\t\tfor( i=0; i < replacements.length; i++) {\n\t\t\ts = s.replace(replacements[i][0], replacements[i][1]);\n\t\t}\n\t\tif(olds == s) {break};\n\t}\n\t\n\treturn s\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "function escaparHtml(str) {\n var t = {\n '&': 'amp',\n '<': 'lt',\n '>': 'gt',\n '\"': 'quot',\n '\\'': '#39'\n };\n return str.replace(/[&<>\"']/g, function(x) {\n return '&' + t[x] + ';';\n });\n }", "function replaceHtmlSpecialChar(m) {\n var oEscape = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n \"'\": '&#39;',\n '\"': '&quot;'\n };\n return oEscape[m];\n }", "function replace_special_chars(str) {\n\tlet new_str = str.replaceAll(\"&quot;\", '\"')\n\t\t.replaceAll(\"&rdquo;\", '\"')\n\t\t.replaceAll(\"&ldquo;\", '\"')\n\t\t.replaceAll(\"&lsquo;\", \"'\")\n\t\t.replaceAll(\"&rsquo;\", \"'\")\n\t\t.replaceAll(\"‘\", \"'\")\n\t\t.replaceAll(\"“\", '\"')\n\t\t.replaceAll(\"”\", '\"')\n\t\t.replaceAll(\"–\", \"-\")\n\t\t.replaceAll(\"&equals;\", \"=\")\n\t\t.replaceAll(\"&minus;\", \"-\")\n\t\t.replaceAll(\"&plus;\", \"+\")\n\t\t.replaceAll(\"&prime;\", \"*\")\n\t\t.replaceAll(\"&times;\", \"×\")\n\t\t.replaceAll(\"&#39;\", \"'\")\n\t\t.replaceAll(\"&#160;\", \"&nbsp;\");\n\treturn new_str;\n}", "function remove_quotation_marks(input_string){\n\tif(input_string!=undefined){\n\tif(input_string.charAt(0) === '\"') {\n\t\tinput_string = input_string.substr(1);\n\t}\n\tif(input_string.length>0){\n\tif(input_string.charAt(input_string.length-1) === '\"') {\n\t\tinput_string = input_string.substring(0, input_string.length - 1);\n\t}}}\n\treturn (input_string);\n}", "function myReplace(str, before, after) {\n\n if (before[0].match(/[A-Z]/)) {\n if (after[0].match(/[a-z]/)) {\n after = String.fromCharCode(after.charCodeAt(0) - 32) + after.substring(1)\n }\n }\n\n str = str.replace(before, after);\n console.log(str);\n return str;\n}", "function cleanEdit(container){\n\tvar text = container.text();\n\tvar punctuation = [\",\",\".\",\":\",\";\",\"-\",\"[\",\"]\",\"/\",\"\\\\\",\"?\",\"!\",\"@\",\"#\",\"$\",\"%\",\"^\",\"&\",\"*\",\"(\",\")\",\"=\",\"+\"]\n\tvar leftBoundary = text[0];\n\tvar rightBoundary = text[text.length-1];\n}", "function handleHtmlEntities(data){\n\t\t\tdata = data.replace(/&/g, '&amp;')\n\t\t\t.replace(/\"/g, '&quot;')\n\t\t\t.replace(/'/g, '&#39;')\n\t\t\t.replace(/</g, '&lt;')\n\t\t\t.replace(/>/g, '&gt;');\n\t\t\tdata = data.replace(/ /g, '&nbsp;');\n\t\t\treturn data;\n\t\t}", "function OLhtmlspecialchars(str,quo){\r\r\n var s=(str||'').toString().replace(/&/g,\"&amp;\"),q=(quo||0);\r\r\n if(q!=ENT_NOQUOTES)s=s.replace(/\"/g,\"&quot;\");\r\r\n if(q==ENT_QUOTES)s=s.replace(/'/g,\"&#039;\");\r\r\n return s.replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\");\r\r\n}", "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n }", "function _escapeQuestionmark(text) {\r\n return text.replace('?', '%3F');\r\n }", "function insertChr(str,chr) {\n chr = chr || ', '; //=> default is space\n return str.replace(/(.(?!$))/g,'$1'+chr);\n}", "function escapeHTML(txt)\n{\n return txt.replace(/&/g, '&#0038;')\n .replace(/\"/g, '&#0034;')\n .replace(/'/g, '&#0039;')\n .replace(/</g, '&#0060;')\n .replace(/>/g, '&#0062;');\n}", "function smartquotes(str) {\n return str\n .replace(/'''/g, '\\u2034') // triple prime\n .replace(/(\\W|^)\"(\\S)/g, '$1\\u201c$2') // beginning \"\n .replace(/(\\u201c[^\"]*)\"([^\"]*$|[^\\u201c\"]*\\u201c)/g, '$1\\u201d$2') // ending \"\n .replace(/([^0-9])\"/g,'$1\\u201d') // remaining \" at end of word\n .replace(/''/g, '\\u2033') // double prime\n .replace(/(\\W|^)'(\\S)/g, '$1\\u2018$2') // beginning '\n .replace(/([a-z])'([a-z])/ig, '$1\\u2019$2') // conjunction's possession\n .replace(/((\\u2018[^']*)|[a-z])'([^0-9]|$)/ig, '$1\\u2019$3') // ending '\n .replace(/(\\u2018)([0-9]{2}[^\\u2019]*)(\\u2018([^0-9]|$)|$|\\u2019[a-z])/ig, '\\u2019$2$3') // abbrev. years like '93\n .replace(/(\\B|^)\\u2018(?=([^\\u2019]*\\u2019\\b)*([^\\u2019\\u2018]*\\W[\\u2019\\u2018]\\b|[^\\u2019\\u2018]*$))/ig, '$1\\u2019') // backwards apostrophe\n .replace(/'/g, '\\u2032');\n}", "function insertCharset(str) {\n return str.replace(/&#173;|&#8203;|<wbr>/g, function() { return randomListItem(charRandom); });\n}", "function insert(str, text, pos){\n if ( str );\n}", "function prepareWaypointsNote(note) {\n\t\t\t\t\n\t\t\t\tnote = note.replace(/'/g, \"\");\n\t\t\t\tnote = note.replace(/\"/g, \"\");\n\n\t\t\t\treturn note;\n\t\t\t}", "function deentityfy(inputString) {\n var entities = {\n '<':'&lt;',\n '>':'&gt;',\n '&':'&amp;',\n '\\'':'&quot;',\n '\"':'&dquot;'\n };\n var outputString = '';\n var i;\n for (i = 0; i < inputString.length; i++) {\n var currChar = inputString[i];\n outputString += typeof entities[currChar] === 'undefined' ? currChar : entities[currChar];\n }\n return outputString;\n}", "function regexEscape(text) {\n return text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, \"\\\\$&\");\n }", "function insertSpaces(query) {\n var newQuery = \"\";\n\n for (var i = 0; i < query.length; i++)\n {\n if (query[i] == \" \" || (i + 1 < query.length && query[i + 1] == \" \"))\n newQuery = newQuery + query[i];\n else\n newQuery = newQuery + query[i] + \"<span style=\\\"font-size: 0px;\\\"> </span>\";\n }\n\n return newQuery;\n}", "function escapeSpecialChar(str){\n var tmp = str.replace(/&/g, \"&amp;\").replace(/\"/g, \"&quot;\").replace(/'/g, \"&apos;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/{/g, \"&#123;\").replace(/}/g, \"&#125;\");\n return tmp;\n}", "function sanitizeItemTitle(title) {\n return title.replace(/\"/g,\"&quot;\")\n .replace(/'/g,\"&apos\")\n .replace(/</g,\"&lt;\")\n .replace(/>/g,\"&gt;\")\n .replace(/&/g,\"&amp;\");\n}", "function cleanr(a) {\n a = a.replace(/[\\u2018\\u2019]/g, \"'\");\n a = a.replace(/[\\u201C\\u201D]/g, '\"');\n return a;\n}" ]
[ "0.6993814", "0.6514727", "0.64364284", "0.6206697", "0.6002778", "0.59864473", "0.5856786", "0.584421", "0.5826095", "0.5823395", "0.5762392", "0.57186097", "0.5704725", "0.56562454", "0.56387025", "0.56272286", "0.559855", "0.55844283", "0.5533374", "0.55012864", "0.54883134", "0.5477725", "0.5465668", "0.54557115", "0.54537696", "0.5427883", "0.54255307", "0.5417777", "0.54171646", "0.5410102", "0.53900766", "0.5387961", "0.5387961", "0.53852344", "0.5381968", "0.5367934", "0.5355302", "0.5353875", "0.53473055", "0.53315717", "0.53306645", "0.53290874", "0.532823", "0.5324065", "0.5323128", "0.53111434", "0.5297619", "0.5297441", "0.52948016", "0.5293187", "0.5292676", "0.52919376", "0.5285365", "0.5282823", "0.5282823", "0.5282823", "0.5282823", "0.5282823", "0.5282823", "0.5282823", "0.5282823", "0.5282823", "0.5282823", "0.5282823", "0.5282823", "0.5282823", "0.5282823", "0.5279089", "0.52733946", "0.5255371", "0.5251666", "0.52497554", "0.5248948", "0.5248948", "0.5248948", "0.5248948", "0.52462435", "0.5207233", "0.5191298", "0.5190521", "0.51876384", "0.5183011", "0.5178568", "0.5174197", "0.5169958", "0.5166683", "0.5166525", "0.5152358", "0.5147221", "0.51449084", "0.5143097", "0.513863", "0.5132201", "0.5127783", "0.51218665", "0.51214075", "0.51192605", "0.51173383", "0.51061845", "0.50956976" ]
0.53425676
39
Look at the named contents of an object.
function viewer(obj) { var names = ""; for ( var name in obj ) names += name + " : " + obj[name]+"\n"; alert(names); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getObjectFromName(person){\n return person.name == nameFilter;\n}", "function accessObject(obj, propsearch,){\n\n return obj[propsearch]\n }", "function getObjectByName(objName) {\n var objFound;\n var runTime = _pGlob !== undefined;\n objFound = runTime ? _pGlob.objCache[objName] : null;\n\n if (objFound && objFound.name === objName)\n return objFound;\n\n appInstance.scene.traverse(function(obj) {\n if (!objFound && notIgnoredObj(obj) && (obj.name == objName)) {\n objFound = obj;\n if (runTime) {\n _pGlob.objCache[objName] = objFound;\n }\n }\n });\n return objFound;\n}", "function getObjectByName(objName) {\n var objFound;\n var runTime = _pGlob !== undefined;\n objFound = runTime ? _pGlob.objCache[objName] : null;\n\n if (objFound && objFound.name === objName) return objFound;\n\n appInstance.scene.traverse(function (obj) {\n if (!objFound && notIgnoredObj(obj) && obj.name == objName) {\n objFound = obj;\n if (runTime) {\n _pGlob.objCache[objName] = objFound;\n }\n }\n });\n return objFound;\n }", "function getImmediateChildByName (object3d, value) {\n\t for (var i = 0, l = object3d.children.length; i < l; i++) {\n\t var obj = object3d.children[i];\n\t if (obj && obj['name'] === value) {\n\t return obj;\n\t }\n\t }\n\t return undefined;\n\t }", "function getImmediateChildByName (object3d, value) {\n for (var i = 0, l = object3d.children.length; i < l; i++) {\n var obj = object3d.children[i];\n if (obj && obj['name'] === value) {\n return obj;\n }\n }\n return undefined;\n }", "function readOwn(obj, name, pumpkin) {\n if (typeof obj !== 'object' || !obj) {\n if (typeOf(obj) !== 'object') {\n return pumpkin;\n }\n }\n if (typeof name === 'number' && name >= 0) {\n if (myOriginalHOP.call(obj, name)) { return obj[name]; }\n return pumpkin;\n }\n name = String(name);\n if (obj[name + '_canRead___'] === obj) { return obj[name]; }\n if (!myOriginalHOP.call(obj, name)) { return pumpkin; }\n // inline remaining relevant cases from canReadPub\n if (endsWith__.test(name)) { return pumpkin; }\n if (name === 'toString') { return pumpkin; }\n if (!isJSONContainer(obj)) { return pumpkin; }\n fastpathRead(obj, name);\n return obj[name];\n }", "function getAtFromJson(pos, object, keyname) {\n var counter = 0;\n var result = null;\n $.each(object, function(key,value){ \n if(counter == pos) {\n result = value[keyname];\n return false;\n };\n counter++;\n });\n return result;\n }", "function getValueByName(mds, name) {\n var value = \"ERROR: NOT FOUND\";\n for (var item in mds) {\n // check if the key equals to the search term\n if (item === name ) {\n return mds[item];\n }\n // check if the key points to an object\n if (typeof (mds[item]) === \"object\") {\n // if value is an object call recursively the function to search this subset of the object\n value = getValueByName(mds[item], name);\n // if key was found, returns it\n if (value != \"ERROR: NOT FOUND\") { return value; }\n // if not, continue the loop\n }\n }\n return value;\n}", "function const_lookup_Object(cref, name) {\n if (cref == null || cref.$$is_module) {\n return const_lookup_ancestors(_Object, name);\n }\n }", "function const_lookup_Object(cref, name) {\n if (cref == null || cref.$$is_module) {\n return const_lookup_ancestors(_Object, name);\n }\n }", "function retrieveObjectNames(objNames) {\n var acc = [];\n retrieveObjectNamesAcc(objNames, acc);\n return acc.filter(function (name) {\n return name;\n });\n }", "function fastpathRead(obj, name) {\n if (name === 'toString') { fail(\"internal: Can't fastpath .toString\"); }\n obj[name + '_canRead___'] = obj;\n }", "function getObject(name, scene) {\n var objects = [];\n scene.objects.forEach(function (object) {\n\n if (object.name == name) {\n\n objects.push(object);\n\n }\n\n });\n return objects[0];\n}", "function lookforName(name) {\n if (files_meta == null) return {ans: false, index: -1};\n files_meta = JSON.parse(files_meta);\n var keys = Object.keys(files_meta);\n var files_len = keys.length;\n var file, file_name;\n for (var j = 0; j < files_len; j++) {\n var curr_key = keys[j];\n var real_j = parseInt(curr_key[1]);\n file = files_meta[curr_key];\n file_name = dec(JSON.stringify(file.fname));\n if (file_name == name) {\n files_meta = JSON.stringify(files_meta);\n return {ans: true, index: real_j};\n }\n }\n files_meta = JSON.stringify(files_meta);\n return {ans: false, index: -1};\n}", "function get (object, path) {\n let iterator = object\n for (const part of path) {\n iterator = iterator[part]\n }\n return iterator\n}", "function search(wordToSearch , objectToSearch) {\n let result = null;\n for(var i = 0 ; i < objectToSearch.length ; i++) {\n for(var unit in objectToSearch[i]) {\n if(objectToSearch[i][unit] == wordToSearch) {\n result = objectToSearch[i].isGoing;\n }\n }\n }\n return result;\n}", "function findObject(typeName, name, callBack) {\n var query = new Parse.Query(Parse.Object.extend(typeName));\n query.equalTo(\"Name\", name);\n return query.first();\n}", "function describe(object, name) {\n for (var i in object) {\n var value;\n try {\n value = object[i];\n } catch (e) {\n dump(\"the \" + i + \" slot of \" + object + \"returned an error. Please file a bug.\\n\");\n }\n \n if (typeof(object[i]) == \"function\")\n value = \"[function]\";\n \n dump(name + \".\" + i + \" = \" + value + \"\\n\");\n }\n}", "function profileInfo(object) {\n//access object species and name and return it in string\n//console.log(object);\nreturn capitalizeWord(object['name']) + ' is a ' + capitalizeWord(object['species']);\n}", "function getObject(objects, objectName, defaultValue) {\n if (objects && objects[objectName]) {\n return objects[objectName];\n }\n return defaultValue;\n }", "function searchKeyObject(nameKey, obj) {\r\n nameKey = nameKey.toLowerCase();\r\n const keys = Object.keys(obj);\r\n const wantedKey = keys.find(key => key.toLowerCase().includes(nameKey));\r\n return wantedKey ? obj[wantedKey] : false;\r\n}", "function getDefinitionByName(data, name) {\n var key = 'name';\n var objects = [];\n for (var i in data) {\n if (!data.hasOwnProperty(i)) continue;\n if (typeof data[i] == 'object') {\n objects = objects.concat(getDefinitionByName(data[i], name));\n } else if (i == key && data[key] == name) {\n objects.push(data);\n }\n }\n return objects;\n}", "getMatch (obj, str) {\n const objs = str(obj)\n debug('Looking for match for %o', objs)\n for (const item of this.data.keys()) {\n const st = str(item)\n debug('.. vs %o', st)\n if (st === objs) return item\n }\n debug('..Failed')\n return undefined\n }", "function findObj(theObj)\n{\n var p, i, foundObj;\n var theDoc\n // if(!theDoc) \n theDoc = document;\n\n if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];\n for (i=0; !foundObj && i < theDoc.forms.length; i++) \n foundObj = theDoc.forms[i][theObj];\n for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) \n foundObj = findObj(theObj,theDoc.layers[i].document);\n if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);\n\n return foundObj;\n}", "function findObjectByID(ID) {\n for (let i = 0; i < this.objectList.length; i += 1) {\n if (this.objectList[i].id === ID) {\n return getNameWithID(this.objectList[i].name, this.objectList[i].id);\n }\n }\n return false;\n}", "function findObj(theObj)\n{\n var p, i, foundObj;\n var theDoc;\n // if(!theDoc) \n theDoc = document;\n\n if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];\n for (i=0; !foundObj && i < theDoc.forms.length; i++) \n foundObj = theDoc.forms[i][theObj];\n for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) \n foundObj = findObj(theObj,theDoc.layers[i].document);\n if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);\n\n return foundObj;\n}", "getPersonByName(name) {\n let tiles = this.tiles;\n for (let i = 0; i < tiles.length; i++) {\n let person = (tiles[i]);\n if (person.name === name) {\n return person;\n }\n }\n }", "function find3dObject(id) {\n NEAR_FIELD_OBJECTS.scene.children.forEach(child => {\n if(child.name == id){\n console.log(child)\n console.log(child.userData)\n }\n })\n}", "function searchGet(key, obj)\n{\n obj || (obj=this);\n\n var value;\n var Key=key.charAt(0).toUpperCase() + key.substring(1);\n var accessor;\n\n if((accessor=(\"get\" + Key)) in obj)\n {\n var fn=obj[accessor];\n\n value=fn.call(obj);\n }\n // else if((\"is\" + Key) in obj)\n // {\n // value=obj.isKey();\n // }\n // else if((\"_\" + key) in obj)\n // {\n // value=obj[\"_\" + key];\n // }\n // else if((\"_is\" + Key) in obj)\n // {\n // value=obj[\"_is\" + key];\n // }\n // else// if((key in obj))\n // {\n // value=obj[key];\n // }\n else {\n value=ivarGet(key, obj);\n }\n\n return value;\n}", "function findProperty(obj, propertyName) {\n\t for( property in obj) {\n\t\t if( property.toUpperCase() === propertyName.toUpperCase()) return property;\n\t }\n\t \n\t return null;\n }", "containsObject(obj, list) {\n\t\tvar i;\n\t\tfor (i = 0; i < list.length; i++) {\n\t\t\tif (list[i].name === obj.name) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn false;\n\t}", "function isFriend(name, object) {\n //take name and object return true if name is friend of object false otherwise\n //let valuesStringed = Object.values(object).join(' '); \n let valuesStringed = objectValues(object).join(' ');\n return valuesStringed.includes(name);\n}", "function getobject(obj){\n\tif (document.getElementById)\n\t\treturn document.getElementById(obj);\n\telse if (document.all)\n\t\treturn document.all[obj];\n}", "static accessValue(object, key) {\n const keys = key.split('.');\n let value = object;\n for (let i = 0, max = keys.length; i < max; i++) {\n value = value[keys[i]];\n }\n return value;\n }", "function findByName(source, name) {\n return source.filter(function ( obj ) {\n return obj.name == name;\n })[0];\n}", "function forEachIn(object, action) {\n\t for (var propertyName in object){\n\t //if (object.hasOwnProperty.call(object, propertyName)) \n\t action(propertyName, object[propertyName]);\n\t }\n\t}", "function grantRead(obj, name) {\n fastpathRead(obj, name);\n }", "function _get(obj,path){\n\t \n\t //Split the path into it's seperate components\n\t\tvar _path = path.split(\".\");\n\t\t\n\t\t//Set the object we use to query for this name to be the original object\n\t\tvar subObj = obj;\n\t \n\t\t//Parse the object properties\n\t\tvar c_len = _path.length;\n\t\tfor (var i=0;i<c_len;++i) {\n \n //Skip if we don't have this part of the path\n\t\t\tif( _path[i].length > 0 ) {\n\t\t\t \n\t\t\t //Get the sub object using the path\n\t\t\t\tsubObj = subObj[_path[i]];\n\t\t\t\t\n\t\t\t\t//Break if we don't have this sub object\n\t\t\t\tif(subObj === null || subObj === undefined) break;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Return an empty string if we don't have a value\n\t\tif(subObj === null || subObj === undefined) return(\"\");\n\t\t\n\t\treturn(subObj);\n\t}", "function printobj (obj, name) {\n post(\"---- object \" + name + \"----\" +\"\\n\");\n printobjrecurse(obj, name);\n}", "function nameProps(obj) {\n\n}", "function fetch_object(idname)\n{\n\tif (document.getElementById)\n\t{\n\t\treturn document.getElementById(idname);\n\t}\n\telse if (document.all)\n\t{\n\t\treturn document.all[idname];\n\t}\n\telse if (document.layers)\n\t{\n\t\treturn document.layers[idname];\n\t}\n\telse\n\t{\n\t\treturn null;\n\t}\n}", "function objectScan (obj) {\n if (obj==null) return \"Object is null\";\n if (typeof obj == \"string\") return obj;\n var nl = \"\\n\";\n var ht = \"\";\n for (var ppty in obj) {\n ht += ppty + \"=\" + obj[ppty] + nl;\n }\n return ht;\n}", "function hasName(obj) {\n return !!obj && typeof obj === \"object\" && \"name\" in obj;\n}", "function hasName(obj) {\n return !!obj && typeof obj === \"object\" && \"name\" in obj;\n}", "function getName(o) {\n return o.name;\n} // Warm up JIT", "function readPub(obj, name) {\n if (typeof name === 'number' && name >= 0) {\n if (typeof obj === 'string') {\n // In partial anticipation of ES5.\n // TODO(erights): Once ES5 settles, revisit this and\n // correctly implement the agreed semantics.\n // Mike Samuel suggested also making it conditional on\n // (+name) === (name & 0x7fffffff)\n // but then realized that it violates the requirement\n // that the string form be the canonical form of the\n // number. So 'foo'['00'] would be treated the same\n // as 'foo'['0'] which is incorrect. \n return obj.charAt(name);\n } else {\n return obj[name];\n }\n }\n name = String(name);\n if (canReadPub(obj, name)) { return obj[name]; }\n if (obj === null || obj === void 0) {\n throw new TypeError(\"Can't read \" + name + ' on ' + obj);\n }\n return obj.handleRead___(name);\n }", "function myName() {\n return myName.mark;\n}", "function cd_getSpecificObject(nm) {\n\tvar r = null;\n\n\tif (cd_currentUsing == 1) // ActiveX Control\n\t\tr = document.all(nm);\n\telse if (cd_currentUsing == 2) // old Plugin + CDPHelper\n\t\tr = document.applets[nm];\n\telse if (cd_currentUsing == 3) // new Plugin (XPCOM, scriptable old Plugin)\n\t\tr = document.embeds[nm];\n\n\tif (r == null)\n\t\talert(\"ERROR: You have the wrong name [\" + nm + \"] to refer to the Plugin/ActiveX !!!\");\n\n\treturn r;\n}", "function parseNamedObject(tokenStream) {\n if (tokenStream.length < 3) {\n return null;\n }\n\n var secondTokenStream = tokenStream.advance();\n\n if (!tokenStream.ofType('BRA') || !secondTokenStream.ofType('IDENTIFIER')) {\n return null;\n }\n\n var argsMatch = parseArgs(tokenStream.advance(2));\n\n if (!argsMatch) {\n return null;\n }\n\n var _argsMatch2 = _slicedToArray(argsMatch, 2);\n\n var object = _argsMatch2[0];\n var ketStream = _argsMatch2[1];\n\n if (!ketStream.ofType('KET')) {\n return null;\n }\n\n // e.g. Currency\n var type = secondTokenStream.get().token;\n\n // At this point, we have a valid object. But we might also have a block of\n // text to parse after it.\n var endTagStream = findSequence(function (stream) {\n return streamAtSequence(['BRA', 'SLASH', 'IDENTIFIER', 'KET'], stream) && stream.advance(2).get().token === type;\n }, ketStream.advance());\n\n if (endTagStream) {\n var fullString = ketStream.get().string;\n var blockString = fullString.slice(ketStream.get().pos + 1, endTagStream.get().pos);\n\n return [_extends({}, object, { type: type, block: chompLinebreaks(blockString) }), endTagStream.advance(4)];\n } else {\n return [_extends({}, object, { type: type }), ketStream.advance()];\n }\n}", "function getObjectFromResponse(objName) {\n var responseBody = JSON.parse(context.getVariable(\"response.content\"));\n if (responseBody === null) {\n return {}\n }\n \tvar theObj = responseBody[objName];\n \ttheObj = (theObj && (theObj !== null)) ? theObj : {};\n \treturn theObj;\n\n }", "getObjectAtLoc(x, y) {\n let tile = this.getTile(x, y);\n if (tile.hasOwnProperty(\"object\")) //determine if an object lives here\n return tile.object;\n return \"None\";\n }", "function showProperties(object) {\n for(let element in object) {\n if (typeof object[element] === 'string') {\n console.log(element);\n console.log(object[element]);\n }\n }\n}", "getObject(arrayOfObjects, objectRef) {\n if (arrayOfObjects[objectRef]) {\n return arrayOfObjects[objectRef];\n }\n return 'object not found';\n }", "function getIn(obj, path) {\n let pointer = obj;\n for (let el of path) {\n pointer = pointer\n ? pointer[el]\n : undefined;\n }\n\n return pointer;\n}", "function getIn(obj, path) {\n var val = obj;\n for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {\n var elem = path_1[_i];\n if (val[elem]) {\n val = val[elem];\n }\n else {\n return null;\n }\n }\n return val;\n}", "function __objLoop(obj, names, fn){ \n\tif (isGlobalNS(obj, names[0])) names.shift();\n\tvar nsObj = obj, flag = true, i=0, len = names.length; \n\twhile(i<len && flag && nsObj){\n\t\tvar curname = names[i];\n\t\tif (curname === \"\") {\n\t\t\tconsole.error(\"invalid NS name:\" + names.join(\".\"));\n\t\t\treturn undefined;\n\t\t}\n\t\tflag = fn(curname, nsObj);\n\t\tif(flag)\n\t\t\tnsObj = nsObj[curname];\n\t\ti++;\n\t}\n\treturn flag;\n}", "function __objLoop(obj, names, fn){ \n\tif (isGlobalNS(obj, names[0])) names.shift();\n\tvar nsObj = obj, flag = true, i=0, len = names.length; \n\twhile(i<len && flag && nsObj){\n\t\tvar curname = names[i];\n\t\tif (curname === \"\") {\n\t\t\tconsole.error(\"invalid NS name:\" + names.join(\".\"));\n\t\t\treturn undefined;\n\t\t}\n\t\tflag = fn(curname, nsObj);\n\t\tif(flag)\n\t\t\tnsObj = nsObj[curname];\n\t\ti++;\n\t}\n\treturn flag;\n}", "function __objLoop(obj, names, fn){ \n\tif (isGlobalNS(obj, names[0])) names.shift();\n\tvar nsObj = obj, flag = true, i=0, len = names.length; \n\twhile(i<len && flag && nsObj){\n\t\tvar curname = names[i];\n\t\tif (curname === \"\") {\n\t\t\tconsole.error(\"invalid NS name:\" + names.join(\".\"));\n\t\t\treturn undefined;\n\t\t}\n\t\tflag = fn(curname, nsObj);\n\t\tif(flag)\n\t\t\tnsObj = nsObj[curname];\n\t\ti++;\n\t}\n\treturn flag;\n}", "function retrieveObjectNames(objNames) {\n var acc = [];\n retrieveObjectNamesAcc(objNames, acc);\n return acc;\n}", "function walkObjectFind()\n\t\t{\n\t\t\tfunction process(value, index, depth)\n\t\t\t{\n\t\t\t\ttrace(indent(depth) + '[' +index+ '] ' + value);\n\t\t\t\tif(Utils.getValues(value).indexOf(Number(search)) !== -1)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar search = prompt('Enter a number (1 - 21) to return the parent');\n\t\t\tvar result = Utils.walk(obj, process);\n\n\t\t\tresult ? inspect(result, 'Found') : trace('Nothing was found');\n\t\t}", "find(name){\n if(this.dict.hasOwnProperty(name)){\n return this.dict[name]\n }\n return false;\n }", "function hasName(obj) {\n return !!obj &&\n typeof obj === 'object' && 'name' in obj;\n}", "function traverseObject(someObj) {\r\n \r\n console.log(someObj);\r\n}", "function isFriend(name, object) {\n \n // Should take a name and an object and return true if <name> is a friend of <object> and false otherwise\n \n if (!object.friends) return false;\n \n for (let string of object.friends) {\n if (name === string) {\n return true;\n }\n }\n \n return false;\n\n}", "function someObject(object, callback, context) {\n\t for (var name in object) {\n\t if (hasOwnProperty.call(object, name)) {\n\t if (callback.call(context, object[name], name, object)) {\n\t return true;\n\t }\n\t }\n\t }\n\t return false;\n\t}", "function someObject(object, callback, context) {\n\t for (var name in object) {\n\t if (hasOwnProperty.call(object, name)) {\n\t if (callback.call(context, object[name], name, object)) {\n\t return true;\n\t }\n\t }\n\t }\n\t return false;\n\t}", "function someObject(object, callback, context) {\n\t for (var name in object) {\n\t if (hasOwnProperty.call(object, name)) {\n\t if (callback.call(context, object[name], name, object)) {\n\t return true;\n\t }\n\t }\n\t }\n\t return false;\n\t}", "function getObjectValueByString(o, s) {\n\ts = s.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n\ts = s.replace(/^\\./, ''); // strip a leading dot\n\tvar a = s.split('.');\n\tfor (var i = 0, n = a.length; i < n; ++i) {\n\t\tvar k = a[i];\n\t\tif (k in o) {\n\t\t\to = o[k];\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t}\n\treturn o;\n}", "getBulletObj(name) {\n for (var i = 0; i < this.bulletData.length; i++) {\n if (this.bulletData[i].name == name) {\n return this.bulletData[i];\n }\n }\n }", "function getIn(object, pathArray) {\n return R.path(pathArray, object);\n}", "forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {\n if (this.opts.ownProperties) {\n return this.forOf(nameOrPrefix, (0, code_1._) `Object.keys(${obj})`, forBody);\n }\n const name = this._scope.toName(nameOrPrefix);\n return this._for(new ForIter(\"in\", varKind, name, obj), () => forBody(name));\n }", "function resolveObjectFromPath(object, path) {\n path = path.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n path = path.replace(/^\\./, ''); // strip a leading dot\n var a = path.split('.');\n while (a.length) {\n var n = a.shift();\n if (n in object) {\n object = object[n];\n } else {\n return;\n }\n }\n return object;\n }", "function myName() {\n return myName.josh\n}", "function canRead(obj, name) {\n if (obj === void 0 || obj === null) { return false; }\n return !!obj[name + '_canRead___'];\n }", "function get(object, key) {\n //Loop through the object\n //if you find that key return value\n //else return undefined\n for(let banana in object) {\n return object[key];\n}\n}", "function searchJson(body,searchTerm){\n\tfor (var i = 0; i < body.length; i++){\n\t\tif(body[i].name == searchTerm) {\n\t \treturn body[i];\n\t \t}\n\t}\n}", "function getValue(object, key) {\n return object[key];\n}", "function myName () {\n return myName.daniel;\n}", "function id_from_name(object_name) {\n switch(object_name) {\n case 'hop_box':\n return 'hop';\n case 'fermentable_box':\n return 'fermentable';\n case 'yeast_box':\n return 'yeast';\n case 'recipe_box':\n return 'recipe';\n default:\n console.log(object_name);\n return 'nothing found';\n }\n}", "get(theObject, propertyName) {\n return theObject[propertyName] + 'FOO';\n }", "function matchObject (obj, item) {\n var b, b1;\n\n b = obj.split(/\\.(.*)/)[1];\n\n if (!b) {\n return (typeof item === 'object') ? JSON.stringify(item) : item;\n } else {\n b1 = b.split('.', 1)[0];\n if (item[b1]) {\n return matchObject(b, item[b1]);\n } else {\n return '';\n }\n }\n }", "function getObjectNamesByGroupName(targetGroupName) {\n var objNameList = [];\n appInstance.scene.traverse(function(obj){\n if (notIgnoredObj(obj)) {\n var groupNames = obj.groupNames;\n if (!groupNames)\n return;\n for (var i = 0; i < groupNames.length; i++) {\n var groupName = groupNames[i];\n if (groupName == targetGroupName) {\n objNameList.push(obj.name);\n }\n }\n }\n });\n return objNameList;\n}", "getObject(bucketName, objectName, cb) {\n if (!validateBucketName(bucketName)) {\n throw new errors.InvalidateBucketNameException('Invalid bucket name: ' + bucketName)\n }\n\n if (objectName === null || objectName.trim() === '') {\n throw new errors.InvalidObjectNameException('Object name cannot be empty')\n }\n this.getPartialObject(bucketName, objectName, 0, 0, cb)\n }", "function deepFind(obj, path) {\n if (path.indexOf('.')) {\n for (var i = 0, path = path.split('.'), len = path.length; i < len; i++) {\n obj = obj[path[i]];\n }\n } else {\n obj[path];\n }\n return obj;\n }", "function checkObject(object){\n //If this text is an object (to run a function)\n if(Q._isObject(object.stage.options.text[object.p.textNum])){\n var keys = Object.keys(object.stage.options.text[object.p.textNum]);\n var p = object.p;\n var stage = object.stage;\n for(i=0;i<keys.length;i++){\n if(Q._isString(stage.options.text[p.textNum][keys[i]])){\n Q[keys[i]](stage.options.text[p.textNum][keys[i]]);\n } else {\n var obj = Q(stage.options.text[p.textNum][keys[i]][0].Class,1).items.filter(function(o){\n return o.p.playerId===stage.options.text[p.textNum][keys[i]][0].id;\n })[0];\n if(obj){\n obj[keys[i]](stage.options.text[p.textNum][keys[i]][1]);\n }\n }\n }\n object.p.textNum++;\n checkObject(object);\n if(object.p.textNum>=object.stage.options.text.length){\n object.done();\n }\n }\n }", "function printFullName(Obj) {\n console.log(lee.firstName + lee.lastName);\n}", "function find(name) {\n\t\t\tfor (var i in data) {\n\t\t\t\tif (data[i].type == 'action' && data[i].name == name) {\n\t\t\t\t\treturn data[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "function search(nameKey){\n for (var i=0; i < lookup.length; i++) {\n if (lookup[i].key === nameKey) {\n return lookup[i].value;\n }\n }\n}", "function myName() {\n return myName.kurt;\n}", "function wordInObject(input,object){\n\tendvalue = -1;\n\tfor(var a=0; a<input.length;++a){\n\t\tif(object[input[a]] != undefined){\n\t\t\tif(typeof object[input[a]] == \"number\"){\n\t\t\t\tendvalue = object[input[a]];\n\t\t\t} else if(typeof object[input[a]] == \"object\"){\n\t\t\t\treturn wordInObject(input,object[input[a]]);\n\t\t\t}\n\t\t}\n\t}\n\treturn(endvalue)\n}", "function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n }", "function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n }", "function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n }", "function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n }", "function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n }", "function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n }", "function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n }", "function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n }", "function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n }" ]
[ "0.60982627", "0.60008705", "0.5816609", "0.58067375", "0.5801168", "0.5764591", "0.57578754", "0.572141", "0.5691657", "0.5662396", "0.5662396", "0.55170155", "0.547605", "0.5464212", "0.545325", "0.5446512", "0.5431314", "0.5430741", "0.5405769", "0.5397522", "0.5395788", "0.5377045", "0.5361354", "0.534192", "0.53219056", "0.5311366", "0.5310196", "0.52919537", "0.5288152", "0.52854025", "0.5284753", "0.52816755", "0.5268539", "0.52679837", "0.5259983", "0.52423316", "0.52421004", "0.5239836", "0.5220178", "0.5216602", "0.5201411", "0.5200631", "0.5194731", "0.5190519", "0.5190519", "0.51903176", "0.5161087", "0.51548713", "0.515189", "0.5151301", "0.5142075", "0.5140206", "0.5135313", "0.51287645", "0.51254773", "0.5123554", "0.5121625", "0.5121625", "0.5121625", "0.51180005", "0.511281", "0.5108797", "0.51007855", "0.50974756", "0.50940067", "0.50903016", "0.50903016", "0.50903016", "0.5076792", "0.50613976", "0.5056604", "0.50505555", "0.5045593", "0.50423455", "0.5040655", "0.50214267", "0.50208235", "0.5011039", "0.50103724", "0.50040644", "0.5001812", "0.50008506", "0.50005203", "0.49922848", "0.49891075", "0.4983324", "0.4981681", "0.49816674", "0.4978439", "0.4975705", "0.49734852", "0.49715486", "0.49715486", "0.49715486", "0.49715486", "0.49715486", "0.49715486", "0.49715486", "0.49715486", "0.49715486" ]
0.5653257
11
From Flanagan, Javascript: The Definitive Guide. Creates closures. Will be used for current goal protection.
function makeProperty( obj, name, predicate ) { var value; // this is the property value, current goal in this application. obj["get" + name] = function() { return value; }; obj["set" + name] = function(v) { if ( predicate && !predicate(v)) throw "set" + name + ": invalid value " + v; else value = v; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Closure() {\r\n}", "function makeClosure(names, body, env) {\n return {\n \"names\": names,\n\t\"body\": body,\n\t\"type\": 'closure',\n\t\"*parent\": env\n };\n }", "function closureMaker() {\n var outerVar = 5;\n return function() {\n return outerVar * 2; // Variable doesn't get modified outside the scope\n };\n}", "function cs(f) {\n return {closure: f};\n}", "function _closure_maker(f,a)\n{\n return function () {\n f(a); \n };\n}", "addClosureInformation (f) {\n f.hasLivelyClosure = true;\n f.livelyClosure = this;\n return f;\n }", "function creaClosure(name) {\n return function () {\n console.log(name);\n }\n}", "function makeClosure(name) {\n return function description() {\n console.log(\"A person named \" + name);\n }\n}", "function closureOfYourOwnCreation() {\n let name = \"Russ\";\n function greetme() {\n return \"my name is \" + name;\n };\n return greetme();\n}", "function seeClosure(x) {\n var x;\n return function(y) {\n return x * y\n }\n}", "function closure1() { //Step 3- closure1 returns function inner()\n const secretNum = 123456;\n return function inner() { // Step 4- inner() o/p the value of secretNum which is locally scoped\n console.log(`The Secret Number is, ${secretNum}`);\n };\n}", "function closureCreatorOldWay(n) {\n console.log(\"closureCreatorOldWay\")\n var a = [];\n var i = 0;\n\n for(; i < n; ++i) {\n a[i] = (function(cnt) {\n return function() { console.log(cnt); }\n })(i);\n }\n return a;\n}", "function closureCreatorNewWay(n) {\n console.log(\"closureCreatorNewWay\")\n \n var a = [];\n \n\n for(let i = 0; i < n; ++i) {\n a[i] = function() { console.log(i); }\n }\n return a;\n}", "function newCounter2() {\n let c = 0;\n return function () { c++; return c; } // closure\n }", "function myName(firstName, lastName) {\n var greeting = 'Hello';\n return firstName + lastName;\n function closure() {\n return greeting + firstName + lastName;\n }\n}", "function fa() {\r\n\t\t\t\t// fa scope = VO:{a: undefined, x: undefined, fb: <reference to function>}-->Global\r\n\t\t\t\t// fb scope = Closure:{a: undefined}-->Global\r\n\t\t\t\tvar a = 100;\r\n\t\t\t\tvar x = 'wwq';\r\n\r\n\t\t\t\tfunction fb() {\r\n\t\t\t\t\t// fb scope = VO:{b: undefined, y: undefined, fc: <reference to function>}-->Closure:{a: 100}-->Global\r\n\t\t\t\t\t// fc scope = Closure:{b: undefined}-->Closure:{a: 100}-->Global\r\n\t\t\t\t\tvar b = 1;\r\n\t\t\t\t\tvar y = 'wwl';\r\n\r\n\t\t\t\t\tfunction fc() {\r\n\t\t\t\t\t\t// fc scope = VO:{z: undefined}-->Closure:{b: 1}-->Closure:{a: 100}-->Global\r\n\t\t\t\t\t\tvar z = 'wmm';\r\n\t\t\t\t\t\treturn a + b;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn fc;\r\n\t\t\t\t}\r\n\t\t\t\treturn fb();\r\n\t\t\t}", "function example4() {\n\n function makeArmy() {\n var shooters = [];\n\n var _loop = function _loop(i) {\n //*\n shooters.push(function () {\n alert(i); // выводит свой номер\n });\n };\n\n for (var i = 0; i < 10; i++) {\n _loop(i);\n }\n return shooters;\n }\n\n var army = makeArmy();\n army[0](); // 0\n army[5](); // 5\n}", "function CreateClosure(context) {\n function Method() {\n return context;\n }\n return Method;\n}", "function g(){return function(){}}", "function funWithClosure () {\n let bears = 0\n return function() {\n bears += 1\n return `I have ${bears} gummy bears!`\n }\n}", "function closureTest() {\n const increase = () => {\n let count = 0;\n\n const increment = function() {\n count++;\n console.log(count)\n };\n\n return increment;\n };\n\n const inc = increase();\n inc();\n inc();\n}", "function makeCounter() {\n // 'i' only accessible inside 'makeCounter'\n var i = 0;\n\n return function() {\n console.log( ++i );\n };\n}", "function aa() {\n return function() {}\n }", "function makeCounter() {\n var num = 1;\n return function() {\n return num++;\n }\n}", "function v(){return function(){}}", "function createCounter() {\n var counter = 0;\n \n return function() {\n return counter++;\n }\n \n// function counter() {\n// return counter++\n// }\n // return counter;\n}", "function outer() {\n var start = \"Closures are\";\n \n // here the function inner is \n // using 'closure' to pass values\n return function inner() {\n return start + \" \" + \"awesome\";\n };\n}", "function outer() {\n const name = \"Javascript Closures\";\n\n function inner() {\n console.log(name);\n }\n return inner;\n}", "function buildFunctions2() {\n var arr = [];\n\n for (var i = 0; i < 3; i++) {\n let j = i; // this var j will be scoped to the block\n arr.push(function() { // and will be a new var in memory\n console.log(j);\n }\n )\n\n }\n\n return arr;\n}", "function MyNotClosureFunc()\r\n{\r\n const arr =[]\r\n\r\n for (var i=0;i<5;i++)\r\n {\r\n arr.push((function (x){ return function (){console.log(\"My number is: \"+x)}})(i));\r\n }\r\n\r\n return arr\r\n}", "function buildFunctions1_5() {\r\n var arr = [];\r\n for (var i = 0; i < 3; i++) {\r\n let j = i; // j is scoped to this code block, within the {} of the for loop\r\n // j is sub-segmented, separately scoped variable\r\n arr.push(\r\n function() {\r\n console.log(j);\r\n })\r\n }\r\n return arr;\r\n}", "function cf(){\n \t var b = \"b\";\n\n \t return function(){\n \t \treturn b;\n \t }\n }", "function scopeFunc() {\n\n\tvar result = [];\n\n\tfor (var i = 0; i < 5; i++) {\n\t\tresult[i] = function() {\n\t\t\tconsole.log(i);\n\t\t}\n\t}\n\n\tresult[0]();\n\tresult[1]();\n\tresult[2]();\n\tresult[3]();\n\tresult[4]();\n\n}", "function testClosure(){\n\tvar x = 4;\n\t\n\tfunction closeX(){\n\t\treturn x;\n\t}\n\treturn closeX\n}", "function makeFunc() {\n var name = 'Mozilla';\n function displayName() {\n console.log('Closure Example 2: ', name);\n }\n return displayName;//being returned from makeFunc() without being executed. \n}", "function parent(){\n const parent = 'parent';\n console.log(`I am the ${parent} and my closure is. I can't say who my child or grandchild is. I do not have a closure in chrome dev tools, but I am restricted the global window object on the DOM.`);\n child();\n function child(){\n let child = 'child';\n console.log(`I am the ${child}. My parent is ${parent}. I can't say who my child is. Since I am accessing the parent variable, my closure is the parent function`);\n grandChild();\n function grandChild(){\n const grandchild = 'grandchild';\n console.log(`I am the ${grandchild}. My parent is ${child}, and my grandparent is ${parent}. I have no children. I have two closures. My first closure is child since I use the child variable and because it's located inside the child function. My second closure is parent since I access the parent variable inside of the parent function.`);\n }\n }\n}", "function makeFunctionArray() {\n const arr = []\n\n for (var i = 0; i < 5; i++) {\n // Closure around value x is accessible later on\n arr.push((function (x) {\n return function () { console.log(x) }\n })(i))\n }\n return arr\n}", "function runClosureExample() {\n console.log(\"\\n--->> runClosureExample\");\n var p = new _Closure.PersonClosure(\"Luigi\");\n console.log(\"Person p:\", p);\n console.log(\"Person p._name:\", p._name);\n console.log(\"Person p.getName:\", p.getName());\n console.log(\"Person p.functionIsVisibleOutside:\", p.functionIsVisibleOutside());\n console.log(\"Person p.canYouSeeMe is undefined use p.nowICanSeeYou:\", p.nowICanSeeYou());\n}", "function MyNotClosureFunc()\n{\n const arr =[]\n\n for (var i=0;i<5;i++)\n {\n arr.push((function (x){ return function (){console.log(\"My number is: \"+x)}})(i));\n }\n\n return arr\n}", "function outer() {\n\tvar outerData = \"are awesome\";\n\treturn function () {\n\t\tvar innerData = \"Closures really \";\n\t\treturn innerData + outerData;\n\t}\n}", "scavengeClosure(c) {\n const info = (this.memory.i32Load(c)),\n type = this.memory.i32Load(info + rtsConstants.offset_StgInfoTable_type);\n switch (type) {\n case ClosureTypes.CONSTR_1_0: {\n this.scavengePointersFirst(c + 4, 1);\n return 8;\n }\n case ClosureTypes.CONSTR_0_1: {\n return 8;\n }\n case ClosureTypes.CONSTR_1_1: {\n this.scavengePointersFirst(c + 4, 1);\n return 12;\n }\n case ClosureTypes.CONSTR_2_0: {\n this.scavengePointersFirst(c + 4, 2);\n return 12;\n }\n case ClosureTypes.CONSTR_0_2: {\n return 12;\n }\n case ClosureTypes.FUN:\n case ClosureTypes.FUN_1_0:\n case ClosureTypes.FUN_0_1:\n case ClosureTypes.FUN_2_0:\n case ClosureTypes.FUN_1_1:\n case ClosureTypes.FUN_0_2:\n case ClosureTypes.FUN_STATIC: {\n if (this.memory.i32Load(info + rtsConstants.offset_StgInfoTable_srt))\n this.evacuateClosure(\n this.memory.i32Load(\n info +\n rtsConstants.offset_StgFunInfoTable_f +\n rtsConstants.offset_StgFunInfoExtraFwd_srt\n )\n );\n const ptrs = this.memory.i32Load(\n info + rtsConstants.offset_StgInfoTable_layout\n ),\n non_ptrs = this.memory.i32Load(\n info + rtsConstants.offset_StgInfoTable_layout + 4\n );\n this.scavengePointersFirst(c + 4, ptrs);\n return (1 + ptrs + non_ptrs) << 2;\n }\n case ClosureTypes.CONSTR:\n case ClosureTypes.CONSTR_NOCAF:\n case ClosureTypes.BLACKHOLE:\n case ClosureTypes.MUT_VAR_CLEAN:\n case ClosureTypes.MUT_VAR_DIRTY:\n case ClosureTypes.PRIM:\n case ClosureTypes.MUT_PRIM:\n case ClosureTypes.COMPACT_NFDATA: {\n const ptrs = this.memory.i32Load(\n info + rtsConstants.offset_StgInfoTable_layout\n ),\n non_ptrs = this.memory.i32Load(\n info + rtsConstants.offset_StgInfoTable_layout + 4\n );\n this.scavengePointersFirst(c + 4, ptrs);\n return (1 + ptrs + non_ptrs) << 2;\n }\n case ClosureTypes.THUNK_STATIC:\n case ClosureTypes.THUNK:\n case ClosureTypes.THUNK_1_0:\n case ClosureTypes.THUNK_0_1:\n case ClosureTypes.THUNK_2_0:\n case ClosureTypes.THUNK_1_1:\n case ClosureTypes.THUNK_0_2: {\n if (this.memory.i32Load(info + rtsConstants.offset_StgInfoTable_srt))\n this.evacuateClosure(\n this.memory.i32Load(\n info + rtsConstants.offset_StgThunkInfoTable_srt\n )\n );\n const ptrs = this.memory.i32Load(\n info + rtsConstants.offset_StgInfoTable_layout\n ),\n non_ptrs = this.memory.i32Load(\n info + rtsConstants.offset_StgInfoTable_layout + 4\n );\n this.scavengePointersFirst(\n c + rtsConstants.offset_StgThunk_payload,\n ptrs\n );\n return rtsConstants.sizeof_StgThunk + ((ptrs + non_ptrs) << 2);\n }\n case ClosureTypes.THUNK_SELECTOR: {\n if (this.memory.i32Load(info + rtsConstants.offset_StgInfoTable_srt))\n this.evacuateClosure(\n this.memory.i32Load(\n info + rtsConstants.offset_StgThunkInfoTable_srt\n )\n );\n this.scavengeClosureAt(c + rtsConstants.offset_StgSelector_selectee);\n return rtsConstants.sizeof_StgSelector;\n }\n case ClosureTypes.AP: {\n const n_args = this.memory.i32Load(\n c + rtsConstants.offset_StgAP_n_args\n );\n this.scavengePAP(\n c,\n rtsConstants.offset_StgAP_fun,\n c + rtsConstants.offset_StgAP_payload,\n n_args\n );\n return rtsConstants.sizeof_StgAP + (n_args << 2);\n }\n case ClosureTypes.PAP: {\n const n_args = this.memory.i32Load(\n c + rtsConstants.offset_StgPAP_n_args\n );\n this.scavengePAP(\n c,\n rtsConstants.offset_StgPAP_fun,\n c + rtsConstants.offset_StgPAP_payload,\n n_args\n );\n return rtsConstants.sizeof_StgPAP + (n_args << 2);\n }\n case ClosureTypes.AP_STACK: {\n const size = (\n this.memory.i32Load(\n c + rtsConstants.offset_StgAP_STACK_size\n )\n );\n this.scavengeClosureAt(c + rtsConstants.offset_StgAP_STACK_fun);\n this.scavengeStackChunk(\n c + rtsConstants.offset_StgAP_STACK_payload,\n c +\n rtsConstants.offset_StgAP_STACK_payload + size\n );\n return rtsConstants.sizeof_StgAP_STACK + (size << 2);\n }\n case ClosureTypes.IND_STATIC: {\n this.scavengeClosureAt(c + rtsConstants.offset_StgIndStatic_indirectee);\n return; // size not important, this object won't be moved\n }\n case ClosureTypes.MVAR_CLEAN:\n case ClosureTypes.MVAR_DIRTY: {\n this.scavengeClosureAt(c + rtsConstants.offset_StgMVar_head);\n this.scavengeClosureAt(c + rtsConstants.offset_StgMVar_tail);\n this.scavengeClosureAt(c + rtsConstants.offset_StgMVar_value);\n return rtsConstants.offset_StgMVar_value + 4;\n }\n case ClosureTypes.ARR_WORDS: {\n return (\n Math.ceil(\n (rtsConstants.sizeof_StgArrBytes +\n (\n this.memory.i32Load(c + rtsConstants.offset_StgArrBytes_bytes)\n )) /\n 4\n ) * 4\n );\n }\n case ClosureTypes.MUT_ARR_PTRS_CLEAN:\n case ClosureTypes.MUT_ARR_PTRS_DIRTY:\n case ClosureTypes.MUT_ARR_PTRS_FROZEN_DIRTY:\n case ClosureTypes.MUT_ARR_PTRS_FROZEN_CLEAN: {\n const ptrs = (\n this.memory.i32Load(c + rtsConstants.offset_StgMutArrPtrs_ptrs)\n );\n this.scavengePointersFirst(\n c + rtsConstants.offset_StgMutArrPtrs_payload,\n ptrs\n );\n return rtsConstants.sizeof_StgMutArrPtrs + (ptrs << 2);\n }\n case ClosureTypes.WEAK: {\n this.scavengeClosureAt(c + rtsConstants.offset_StgWeak_cfinalizers);\n this.scavengeClosureAt(c + rtsConstants.offset_StgWeak_key);\n this.scavengeClosureAt(c + rtsConstants.offset_StgWeak_value);\n this.scavengeClosureAt(c + rtsConstants.offset_StgWeak_finalizer);\n return rtsConstants.offset_StgWeak_link + 4;\n }\n case ClosureTypes.TSO: {\n this.scavengeClosureAt(c + rtsConstants.offset_StgTSO_stackobj);\n return; // size not important, this object won't be moved\n }\n case ClosureTypes.STACK: {\n const\n stack_size =\n this.memory.i32Load(c + rtsConstants.offset_StgStack_stack_size) << 2,\n sp = (this.memory.i32Load(c + rtsConstants.offset_StgStack_sp)),\n sp_lim = c + rtsConstants.offset_StgStack_stack + stack_size;\n this.scavengeStackChunk(sp, sp_lim);\n return rtsConstants.offset_StgStack_stack + stack_size;\n }\n case ClosureTypes.SMALL_MUT_ARR_PTRS_CLEAN:\n case ClosureTypes.SMALL_MUT_ARR_PTRS_DIRTY:\n case ClosureTypes.SMALL_MUT_ARR_PTRS_FROZEN_DIRTY:\n case ClosureTypes.SMALL_MUT_ARR_PTRS_FROZEN_CLEAN: {\n const ptrs = (\n this.memory.i32Load(c + rtsConstants.offset_StgSmallMutArrPtrs_ptrs)\n );\n this.scavengePointersFirst(\n c + rtsConstants.offset_StgSmallMutArrPtrs_payload,\n ptrs\n );\n return rtsConstants.offset_StgSmallMutArrPtrs_payload + (ptrs << 2);\n }\n default:\n throw new WebAssembly.RuntimeError();\n }\n }", "function clou1(){\n\tvar b = 'b';\n\treturn function(){\n\t\treturn b;\n\t}\n}", "function g() { return function h () { return 1+1; };}", "function closure1() {\n var bar = \"bar\";\n return function () {\n console.log(`Returning function within closure: ${bar}`);\n };\n}", "function Closure() {\n this.change = function (x, y, z) {\n\n function module1 () {\n\n function changeCore (newLogin, password, email) {\n var login;\n\n function names () {\n var oldLogin = login;\n login = newLogin;\n return [ oldLogin, login ]\n }\n\n var loginsArray = names();\n\n if (password === 111 && email === '[email protected]') {\n console.log(\"Login changed from \" + loginsArray[0] + \" to \" + loginsArray[1]);\n } else {\n console.log(\"Login not changed\");\n }\n\n }\n\n changeLogin(changeCore);\n\n }\n\n function changeLogin (qqq) {\n qqq(x, y, z);\n }\n\n module1 ();\n\n }\n}", "function secretVariable() {\n var private = \"super secret code\";\n return function() {\n return private\n }\n}", "function funzioneMadre() {\n var primaParte = 'Questa è la funzione madre ';\n return function closureInterna() {\n console.log('La closure si ricorda della var della funzioneMadre: ' + primaParte);\n return primaParte + ' e questa è la closure';\n };\n}", "function myFunctions() {\n var myVar = [];\n for (var i = 0; i < 3; i++) {\n myVar.push(\n function() {\n console.log(i);\n }\n )\n }\n return myVar;\n}", "function closure(n) {\n let obj = {\n one: 1 * n,\n two: 2 * n,\n three: function() {\n return n * n;\n }\n }\n return () => obj;\n}", "function closureExample(parameterOne) { \n let localScope = parameterOne; //variable assigned within function scope.\n return () => localScope; //anonymous function declared in return statement.\n}", "function stateClosure() {\n let state;\n\n function setState(value) {\n state = value;\n }\n\n const getState = () => state;\n\n return [getState, setState];\n}", "function createCounter(){\n var counter = 0;\n return function(){\n return ++counter;\n }\n}", "function newCounter() {\n let x = 0;\n return function() {\n x++;\n return x;\n }\n}", "function setupSomeGlobals() {\n // Local variable that ends up within closure\n var num = 666;\n // Store some references to functions as global variables\n gAlertNumber = function() { alert(num); }\n gIncreaseNumber = function() { num++; }\n gSetNumber = function(x) { num = x; }\n}", "function testClosure() {\n let a = 5;\n\n function inner() {\n console.log(a);\n }\n\n return inner;\n}", "function makefunc(x) {\r\n// return function() { return x; }\r\n// return new Function($direct_func_xxx$);\r\n return new Function(\"return x;\")\r\n}", "function greet() {\r\n name = 'Hammad';\r\n return function () {\r\n console.log('Hi ' + name);\r\n }\r\n}", "function greet() {\r\n name = 'Hammad';\r\n return function () {\r\n console.log('Hi ' + name);\r\n }\r\n}", "function buildCoveTicketMaker(transport){\n\tvar passengerNumber = 0;\t\t//counter\n\treturn function (name){\n\t\tpassengerNumber++;\t\t//increment passengerNumber each time we print a new ticket.\n\t\talert(\"Here is your transportation ticket via the \" + transport + \".\\n\" +\n\t\t\t\"Welcome to the Cold Closures Cove, \" + name \"!\" + \n\t\t\t\"You are passenger #\" + passengerNumber + \".\");\n\nvar getSubmarineTicket = buildCoveTicketMaker(\"Submarine\");\ngetSubmarineTicket(\"Mario\");\t\t\t//\"...You are passenger #1\"\ngetSubmarinTicket(\"Toad\");\t\t\t//\"...You are passenger #2\"\n\t\t\t\n\t\t);\n\t}\n}", "function closure(){\n\n var timeout;\n console.log('closure')\n function one(){\n console.log('step1');\n timeout=setTimeout(two, 100);\n }\n\n function two(){\n console.log('step2');\n timeout=setTimeout(three, 1000);\n }\n\n function three(){\n console.log('step3');\n timeout=setTimeout(four, 300);\n }\n\n function four(){\n timeout=console.log('step4');\n }\n\n return timeout=setTimeout(one, 300);\n\n}", "function buildFunctions() {\n var arr = [];\n for( var i = 0; i < 3; i++) {\n\n arr.push(\n function () {\n console.log(i);\n }\n )\n }\n return arr;\n}", "function makeArmy() {\n var shooters = [], i;\n for (i = 0; i < 10; i++) {\n var z = i;\n (function (k) {\n var z2 = i;\n var shooter = function () {\n console.log(z);\n console.log(z2);\n console.log(k);\n console.log(shooter.savedValue);\n };\n shooter.savedValue = i;\n shooters.push(shooter);\n })(i);\n }\n return shooters;\n}", "function a(){\n \t var i = 0;\n \t function b(){\n \t\tcc.log(++i);\n \t}\n \t return b;\n }", "function createGreeter( name, age ) {\n var greeting = 'Hello ' + name + ' you are ' + age;\n \n return function() {\n console.log(greeting);\n }\n}", "function funcBuilder2(){\n\tvar arr = [];\n\n\tfor(var i = 0; i < 3; i++){\n\t\tarr.push(\n\t\t\t(function(j){\n\t\t\t\treturn function(){\n\t\t\t\t\tconsole.log(j);\n\t\t\t\t}\n\t\t\t}(i))\n\t\t);\n\t}\n\treturn arr;\n}", "function createFunctions(){\n var result = new Array();\n\n for(var i = 0; i < 10; i++){\n result[i] = function(num){\n return function(){ //The anonymous function is defined and called immediately.\n return num;\n };\n }(i);\n }\n}", "function makeCounter() {\n\tvar i =0;\n\n\treturn function() {\n\t\tconsole.log(++i);\n\t};\n}", "function makeCounter() {\n var count = 0;\n return function() {\n var t = count;\n count = count + 1;\n return t;\n };\n}", "function newCounter() {\n let count = 0;\n return function() {\n count++;\n return count;\n }\n}", "function whosThere() {\n var name = \"Scott\";\n return function sayHello() {\n return \"Hello \" + name + \". Nice to meet you.\"\n };\n}", "function makeFunc() {\n var name = 'Mozilla';\n function displayName() {\n console.log(name);\n }\n return displayName; //note we are returning the displayName function before executing it (this is called a CLOSURE)\n}", "function counter() {\n var x = 0\n return function () {\n return ++x\n }\n}", "function createFunctions(){\n var arrFun=[];\n for (var p=0;p<5;p++)\n {\n arrFun.push(\n (function (k){\n return function()\n {\n console.log('Handled function'+' '+k);\n };\n }(p))\n );\n }\n\nreturn arrFun;\n\n}", "function functionA() {\r\n var A = 'A'\r\n \r\n // Define a function and create a closure\r\n function functionB() {\r\n var B = 'B'\r\n console.log(A, B, G);\r\n }\r\n \r\n functionB(); // prints A, B, G\r\n // functionB closure does not get discarded\r\n A = 42;\r\n functionB(); // prints 42, B, G\r\n}", "function buildFunctions() {\n var arr = [];\n\n for (var i = 0; i < 3; i++) { // this line only creates with the code property\n arr.push(function() { // object, but does not execute the function.\n console.log(i); // they invoked starting on line 68, at which\n }); // time, i === 3\n }\n\n return arr;\n}", "function buildFunctions() {\n var arr47 = [];\n for (var i = 0; i < 3; i++){\n arr47.push(\n function() {\n console.log(i);\n }\n );\n }\n\n return arr47;\n}", "function outer(){\n var data = \"closures are \";\n return function inner(){\n var innerData = \"awesome\";\n return data + innerData;\n }\n}", "function outerFunction (outerArg) { // begin of scope outerFunction\r\n // Variable declared in outerFunction function scope \r\n var outerFuncVar = 'x'; \r\n // Closure self-invoking function \r\n function innerFunction (innerArg) { // begin of scope innerFunction\r\n // variable declared in innerFunction function scope\r\n var innerFuncVar = \"y\"; \r\n console.log( \r\n \"outerArg = \" + outerArg + \"\\n\" +\r\n \"outerFuncVar = \" + outerFuncVar + \"\\n\" +\r\n \"innerArg = \" + innerArg + \"\\n\" +\r\n \"innerFuncVar = \" + innerFuncVar + \"\\n\" +\r\n \"globalVar = \" + globalVar);\r\n \r\n }\r\n innerFunction(5);\r\n}", "activate_c( f )\n {\n return function( ...params ) {\n params.push( f );\n return this.activate( ...params );\n }\n }", "function counterMaker() {\n let count = 0;\n return function counter() {\n count++;\n }\n}", "function makeCounter() {\n let i = 0;\n return function () {\n return i++;\n };\n}", "function sayHello() {\n const say = function () { console.log(hello); }\n // Local variable that ends up within the closure\n const hello = 'Hello, world!';\n return say;\n}", "function closureFoo() {\n var bar = \"bar\";\n function baz() {\n console.log(`closure, remembers the lexical scope: ${bar}`);\n }\n\n // baz is passed as reference to outside function, and still remembers the its scope\n // and accesses bar variable outside the invokiing scope\n outsideFunction(baz);\n}", "function counter() {\r\n var count = 0;\r\n return function () {\r\n return ++ count;\r\n }\r\n}", "function a() {\n let name = 'Eugene';\n return function() {\n console.log(name)\n }\n}", "function heavyDuty2() {\n const bigArray = new Array(7).fill('Star');\n console.log('Created Again!');\n return function(idx) {\n return bigArray[idx];\n };\n}", "function ctor() {\n return function(){};\n }", "function ctor() {\n return function(){};\n }", "function ctor() {\n return function(){};\n }", "function ctor() {\n return function(){};\n }", "function ctor() {\n return function(){};\n }", "function ctor() {\n return function(){};\n }", "function ctor() {\n return function(){};\n }", "function ctor() {\n return function(){};\n }", "function ctor() {\n return function(){};\n }", "function theBridgeOfHoistingDoom() {\n\tfunction fellowship() {\n\t\treturn \"friends\";\n\t}\n\nvar sword = \"sting\";\n\nvar dwarf = function () {\n\treturn \"axe\";\n\t};\n \nvar fall = \"Fly you fools!\";\n \nfellowship = function () {\n\treturn \"broken\";\n\t};\n \n ring();\n \n return sword;\n \n fellowship = function () {\n\treturn \"mines\";\n\t};\n \nsword = function () {\n\treturn \"glamdring\";\n\t};\n \nvar ring = function () {\n\treturn \"precious\";\n\t};\n}", "function functionFactory()\n{\n var arr=[];\n for(var i=0;i<5;i++)\n {\n arr.push(function (){\n console.log('function no '+i)\n });\n }\n\n return arr;\n}", "function b() { return function c(){ console.log('c') }}", "function NewNew1(x) {\n function f() {\n // snatch 'x' from closure\n this.x = x;\n }\n f.prototype = { 'name': 'NewNew2' };\n return f;\n}", "function functionScope() {\n var names = [];\n\n function populateNames() {\n var javascriptMasters = ['Crockford', 'Osmani', 'Katz'];\n names = names.concat(javascriptMasters);\n }\n\n populateNames();\n\n return names;\n\n}", "function c() {}" ]
[ "0.7527612", "0.71964943", "0.6963913", "0.69183064", "0.68499804", "0.6813076", "0.6786975", "0.67500824", "0.6679287", "0.66312546", "0.65363795", "0.6506293", "0.6467322", "0.64574903", "0.64126235", "0.63645554", "0.63632935", "0.6355544", "0.6337054", "0.6320832", "0.62868285", "0.61393017", "0.61213195", "0.6116084", "0.6106228", "0.6056051", "0.6046831", "0.6009404", "0.599479", "0.59869623", "0.5978496", "0.59423006", "0.59329444", "0.5927262", "0.59113675", "0.59103906", "0.5905832", "0.5885926", "0.5884726", "0.58795476", "0.5874004", "0.58665824", "0.58650815", "0.58643353", "0.58576745", "0.584952", "0.5839039", "0.5836007", "0.5829568", "0.58247375", "0.5823762", "0.58063537", "0.5806097", "0.580214", "0.5791671", "0.5786314", "0.5776163", "0.5776163", "0.57682645", "0.576161", "0.575879", "0.57537884", "0.57527983", "0.57290006", "0.5708473", "0.5708409", "0.5703071", "0.57008046", "0.5688563", "0.56780887", "0.5675206", "0.5663102", "0.56592417", "0.5655993", "0.56499416", "0.5644815", "0.56428915", "0.56387013", "0.5636604", "0.563398", "0.5633732", "0.5632336", "0.56257206", "0.56243217", "0.5621464", "0.56189036", "0.5616344", "0.5616344", "0.5616344", "0.5616344", "0.5616344", "0.5616344", "0.5616344", "0.5616344", "0.5616344", "0.561344", "0.561172", "0.56086963", "0.5599564", "0.5593909", "0.55931604" ]
0.0
-1
Remove blanks from either end of a string
function trim( str ) { var len = str.length; var begin = 0; var end = len; while ( str.charAt(begin) == " " ) begin++; while ( str.charAt(end-1) == " " ) end--; return str.slice(begin, end); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeBlanksTwo(str){\n if(typeof str !== \"string\"){\n return 0;\n }\n var arr = [];\n for(var idx = 0; idx < str.length; idx++){\n if(str[idx] != \" \"){\n arr.push(str[idx]);\n }\n }\n return arr.join(\"\");\n}", "function removeLastBlank (str) {\n if (str.substring(str.length-1) != \" \")\n return str;\n else\n return removeLastBlank(str.substring(0, str.length-1));\n}", "function rtrim(s) {\n return s.replace(/\\s+$/, '');\n}", "function withTrailingSpace(s) {\n if (s == \"\")\n return s;\n else if (s.charAt(s.length-1) != \" \")\n return s + \" \";\n else\n return s;\n}", "function FFString_trimRight( value ){\n\tif(value==null || value==\"\") return \"\";\n\n\tvar length = value.length;\n\n\tvar i;\n\tfor(i=length-1;i>=0;i--){\n\t\tif(value.charAt(i) != \" \") break;\t\t\t\n\t}\n\treturn value.substring(0,i+1);\t\n}", "function removeLeadingAndTrailingWhitespace(string: string){\n\t\t\t\t\t\n\t\t\t\t\t//Remove the first character of whitespace, if it's there\n\t\t\t\t\tif (string.indexOf(' ') === 0){\n\t\t\t\t\t\tstring = string.slice(1);\n\t\t\t\t\t}\n\n\t\t\t\t\t//Remove the last character of whitespace, if it's there\n\t\t\t\t\tif (string.lastIndexOf(' ') === string.length -1){\n\t\t\t\t\t\tstring = string.slice(0, -1);\n\t\t\t\t\t}\n\t\t\t\t\treturn string;\n\t\t\t\t}", "function rtrim()\n{\n return this.replace( /\\s+$/g,'');\n}", "function rtrim(str) {\n return str.replace(/\\s+$/, \"\");\n}", "function noSpace(x){\n return x.split(\"\").filter(el => {return el!==\" \"}).join(\"\")\n }", "function trim(string) { return string.replace(/^\\s+|\\s+$/g , ''); }", "function trimBlank(str) {\n var r = str.replace(/(^\\s*)|(\\s*$)/g, '');\n r = Lremoveblank(r);\n r = Rremoveblank(r);\n return r;\n}", "function removeEnds(string) {\n let arr = string.split('')\n let remove = ''\n if (arr.length < 3) {\n return ''\n } else {\n newArr = arr.slice(1, -1)\n remove = newArr.join('')\n }\n return remove;\n}", "function rtrim(str) \r\n{\r\n var chars = \"\\\\s\";\r\n return str.replace(new RegExp(\"[\" + chars + \"]+$\", \"g\"), \"\");\r\n}", "function trim(str){\treturn str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');}", "function rtrim(para) {\n\twhile(para.substring(para.length-1, 1) == ' ') {\n\t\tpara = para.substring(0, para.length-1);\n\t}\n\n\treturn para;\n}", "function rtrim(strInput){\n var result = strInput.replace(/\\s+$/, \"\");\n return result;\n}", "function trimTrailingSpaces(s) {\n return s.replace (/[ ]+$/gm, '');\n }", "function trimfield(str) \r\n{ \r\n return str.replace(/^\\s+|\\s+$/g,''); \r\n}", "function trim(s) { return s.replace(/^\\s+|\\s+$/g, ''); }", "function imtrim(s) \n{\n s = s.replace(/(^\\s*)|(\\s*$)/gi,\"\");\n s = s.replace(/[ ]{2,}/gi,\" \");\n s = s.replace(/\\n /,\"\\n\");\n return s;\n}", "function trim(s){\n return s.replace(/^\\s+|\\s+$/, '');\n}", "function trimAllSpace(str) \r\n{ \r\n var str1 = ''; \r\n var i = 0; \r\n while(i != str.length) \r\n { \r\n if(str.charAt(i) != ' ') \r\n str1 = str1 + str.charAt(i); i ++; \r\n } \r\n return str1; \r\n}", "function trimX(str) {\r\n\tif (isEmpty(str))\r\n\t\treturn '';\r\n\r\n\treturn str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\r\n}", "function di_trim(s) {\n var temp = s;\n return temp.replace(/^\\s+/,'').replace(/\\s+$/,'');\n}", "function String_Trim()\n{\n\treturn this.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n}", "function trim(str)\r\n{\r\n\r\nwhile(''+str.charAt(0)==' ') str=str.substring(1,str.length);\r\n\r\nwhile(''+str.charAt(str.length-1)==' ') str=str.substring(0,str.length-1);\r\n\r\nreturn str;\r\n}", "function strTrim(str){\n return str.replace(/^\\s+/,'').replace(/\\s+$/,'')\n}", "function trim(cadena)\r\n{\r\n\tfor(i=0; i<cadena.length; )\r\n\t{\r\n\t\tif(cadena.charAt(i)==\" \")\r\n\t\t\tcadena=cadena.substring(i+1, cadena.length);\r\n\t\telse\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tfor(i=cadena.length-1; i>=0; i=cadena.length-1)\r\n\t{\r\n\t\tif(cadena.charAt(i)==\" \")\r\n\t\t\tcadena=cadena.substring(0,i);\r\n\t\telse\r\n\t\t\tbreak;\r\n\t}\r\n\t\r\n\treturn cadena;\r\n}", "function trimAll(sString) \r\n{\r\n while (sString.substring(0,1) == ' ')\r\n {\r\n sString = sString.substring(1, sString.length);\r\n }\r\n while (sString.substring(sString.length-1, sString.length) == ' ')\r\n {\r\n sString = sString.substring(0,sString.length-1);\r\n }\r\n return sString;\r\n}", "function trim(s) {\n return s.replace(/^\\s+|\\s+$/, '');\n}", "function trim(str) { \r\n if (str != null) {\r\n var i; \r\n for (i=0; i<str.length; i++) {\r\n if (str.charAt(i)!=\" \") {\r\n str=str.substring(i,str.length); \r\n break;\r\n } \r\n } \r\n \r\n for (i=str.length-1; i>=0; i--) {\r\n if (str.charAt(i)!=\" \") {\r\n str=str.substring(0,i+1); \r\n break;\r\n } \r\n } \r\n \r\n if (str.charAt(0)==\" \") {\r\n return \"\"; \r\n } else {\r\n return str; \r\n }\r\n }\r\n}", "function LTrim(str) {\r\n for (var i=0; str.charAt(i)==\" \"; i++);\r\n return str.substring(i,str.length);\r\n }", "function trim(str)\n{\n return str.replace(/^\\s+/, '').replace(/\\s+$/, '');\n}", "function deleteFirstAndLastWhiteSpace(str){\n\tvar rv=str;\t\n\tvar imax=rv.length;\n\tfor(var i=0; i<imax; ++i){\n\t\tvar nochange1=true;\n\t\tvar nochange2=true;\n\t\t\n\t\t//delete all WSP at the end of each unfolded header field value\t\t\n\t\tif(rv[rv.length-1]==' ' || rv[rv.length-1]=='\\t'){\n\t\t\trv = rv.slice(0,rv.length-1);\t\t\t\n\t\t\tnochange1=false;\n\t\t}\n\t\t\n\t\t//delete any WSP remaining before and after the colon separating field name form value\n\t\tif(rv[0]==' ' || rv[0]=='\\t'){\n\t\t\trv = rv.slice(1,rv.length);\n\t\t\tnochange2=false;\n\t\t}\n\t\t\n\t\tif(nochange1==true && nochange2==true) break;\t\t\n\t}\t\n\treturn rv;\n}", "function noSpace(x) {\n return x.replace(/[ ]/g, '');\n}", "function trim(string) {\n}", "function trimSpacesFromValue(str){\r\n\tif (str && str.length > 0 && str.indexOf(\" \") != -1){\r\n\t\tvar tmp = str.replace(/(^\\s*)|(\\s*$)/g, \"\");\r\n\t\treturn tmp;\r\n\t}\r\n\treturn str;\r\n}", "function trimAll(string) {\n\tvar newString = '';\n\tfor (var i = 0; i < string.length; i++) {\n\t\tif (string.charAt(i) != ' ') newString += string.charAt(i);\n\t}\n\treturn newString;\n}", "function f_string_trim(ps_value) {\n\n if (ps_value === null) {\n return(ps_value);\n }\n\n if (ps_value === undefined) {\n return(ps_value);\n }\n\n if (ps_value === \"\") {\n return(ps_value);\n }\n\n return(ps_value\n .replace(/^\\s+/g, \"\")\n .replace(/\\s+$/g, \"\"));\n}", "function trim(s) {\r\n return s.replace( /^\\s*/, \"\" ).replace( /\\s*$/, \"\" );\r\n }", "function trim( str ){\n return (str || \"\").replace( /^\\s+|\\s+$/g, \"\" );\n \n}", "function trim( str ){\n return (str || \"\").replace( /^\\s+|\\s+$/g, \"\" );\n \n}", "function trim(s) {\r\n return s.replace( /^\\s*/, \"\" ).replace( /\\s*$/, \"\" );\r\n }", "function trim(s) {\n\treturn s.replace(/(^\\s+)|(\\s+$)/g, \"\")\n}", "function righttrim(strSrc){\r\n\tvar len = strSrc.length;\r\n\tif(typeof(strSrc)!=\"string\")\r\n\t\treturn strSrc;\r\n\tfor (var i=len-1; i>=0; i--)\r\n\t\tif(strSrc.charAt(i)!=\" \")\r\n\t\t\tbreak;\r\n\tstrSrc=strSrc.substring(0,i+1);\r\n\treturn strSrc;\r\n}", "function noSpace(test){\r\n return test.replace(/\\s+/g,\"\");\r\n \r\n }", "function dropEndingNewline(string) {\n\t return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n\t}", "function dropEndingNewline(string) {\n\t return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n\t}", "function dropEndingNewline(string) {\n\t return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n\t}", "function trim(s) {\n\treturn s.replace(/^\\s*/, \"\").replace(/\\s*$/, \"\");\n}", "function trim(str){\n return str.replace(/^\\s+|\\s+$/g,\"\");\n}", "function trimString(s) {\r\nreturn s.replace(/^\\s+|\\s+$/g,'');\r\n}", "function trim(s) {\r\n\treturn s.replace( /^\\s*/, \"\" ).replace( /\\s*$/, \"\" );\r\n}", "function cleanUpString(s)\n{\n\n var rez = '';\n var redovi = s.trim().replace(/\\r/g, '').split('\\n');\n\n var noviPasus = true;\n for( var i= 0; i < redovi.length; i++ ) {\n if( redovi[i].length == 0 ){\n noviPasus = true;\n rez += '\\n';\n }\n else {\n if( noviPasus ) {\n rez += redovi[i];\n noviPasus = false;\n }\n else\n {\n rez += ' ' + redovi[i];\n }\n }\n }\n\n return rez;\n}", "function stripLastChar(myString) {\n return myString.substring(0, myString.length - 1).trim();\n }", "function trim(s) { return s.trim(); }", "function trim(s) { return s.trim(); }", "function noSpace(x) {\n let newStr = x.split(\" \").join(\"\");\n return newStr;\n}", "function trim(strText)\n{\n// return ((!strText) ? \"\" : strText.replace(/^\\s*(\\S*(\\s+\\S+)*)\\s*$/, \"$1\"));\n return ((!strText) ? '' : strText.replace(/^\\s*/, '').replace(/\\s*$/, ''));\n}", "function trimWhiteSpace(str) {\n str = str.replace(/^\\s+/, '');\n for (var i = str.length - 1; i >= 0; i--) {\n if (/\\S/.test(str.charAt(i))) {\n str = str.substring(0, i + 1);\n break;\n }\n }\n return str;\n }", "function qctrim(s) {\r\n\ts = s.replace(/(^\\s*)|(\\s*$)/gi,\"\");\r\n\ts = s.replace(/[ ]{2,}/gi,\" \");\r\n\ts = s.replace(/\\n /,\"\\n\");\r\n\treturn s;\r\n}", "function removePalabrasCompuestas(texto) {\r\r\n\r\r\n for (i = 0; i < texto.length; i++) {\r\r\n if (texto.charAt(i) == \" \") {\r\r\n return texto.substr(0, i);\r\r\n }\r\r\n }\r\r\n\r\r\n return texto;\r\r\n}", "function noSpace(x){\n return x.replace(/\\s/g,\"\");\n}", "function trim(s) {\n return s.replace(/^\\s+|\\s+$/g,\"\");\n}", "function trim(str) { Logger.log('in trim(), str is ' + str);\n return str.replace(/^\\s+/, '').replace(/\\s+$/, '');\n}", "function trim (str) {\n return str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }", "function rtrim(str)\n{\n var whitespace = new String(\" \\t\\n\\r\");\n var s = new String(str);\n if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {\n var i = s.length - 1; // Get length of string\n while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)\n i--;\n s = s.substring(0, i+1);\n }\n return s;\n}", "function strEndTrim(intarget){\r\n\tvar outtarget=intarget;\r\n\tvar poslen = intarget.length;\r\n\tif (poslen<=0) return outtarget; //no change possible\r\n\twhile (intarget.charAt(poslen-1) == \" \"){\r\n\t\tposlen--;\r\n\t}\r\n\tif (poslen<intarget.length) poslen++;\r\n\tif ((poslen<intarget.length) && (poslen>=0)) //make it have a valid change to be changed\r\n\t\touttarget = intarget.substring(0, poslen); //substring(start, length)\r\n\treturn outtarget;\r\n}", "function rtrim(str, char=\" \") {\r\n // If both the charcter and string are not\r\n // string, then no need to proceed.\r\n if (typeof(str) != 'string' || typeof(char) != 'string') {\r\n return;\r\n }\r\n var pattern = new RegExp(char + '+$', 'g');\r\n return str.replace(pattern, '');\r\n }", "function ltrim()\n{\n return this.replace( /^\\s+/g,'');\n}", "function dropEndingNewline$1(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function rightTrim(str) {\n var i;\n for (i = str.length - 1; i >= 0; i--) {\n if (str.charAt(i) != \" \")\n break;\n }\n str = str.substring(0, i + 1);\n return str;\n}", "function trim(string) {\n return string.replace(/^\\s+/,'').replace(/\\s+$/,'');\n }", "function ltrim(value) {\n\tif (value) {\n\t\tvar re = /\\s*((\\S+\\s*)*)/;\n\t\treturn value.replace(re, '$1');\n\t}\n\treturn '';\n}", "function ui_trim (str_string){\n\tvar exp_Space_head \t= /^(\\s+)(\\S?.*)$/ ; //define exp pattern, all space at header\n\tvar exp_Space_tail \t\t= /^(.*\\S+)(\\s+)$/ ; //define exp pattern, all space at tail\n\tstr_string = str_string.replace(exp_Space_head, \"$2\"); // remove the space at the header\n\tstr_string = str_string.replace(exp_Space_tail, \"$1\"); // remove the space at the tail\n\treturn str_string;\n}", "function Trim(str) {\n if (str.substring(0, 1) == \" \") {\n str = str.substring(1, str.length);\n }\n if (str.substring(str.length - 1, str.length) == \" \") {\n str = str.substring(0, str.length - 1);\n }\n return str;\n}", "function LTrim( value ) {\t\r\n var re = /\\s*((\\S+\\s*)*)/;\r\n return value.replace(re, \"$1\");\r\n\r\n}", "function trimSpace(str) {\n str = str.toLowerCase();\n return str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n}", "function tw(val)\n{\n return val.replace(/ /g, \"\");\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}", "function dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}" ]
[ "0.7171458", "0.7011805", "0.6888704", "0.68765384", "0.6875653", "0.686164", "0.68577707", "0.6852554", "0.6843471", "0.67992944", "0.6777462", "0.67665887", "0.67292273", "0.6699136", "0.6664825", "0.6654225", "0.66280085", "0.6607912", "0.66030747", "0.658341", "0.6569457", "0.65628725", "0.6558412", "0.6549062", "0.65413064", "0.65406215", "0.6537937", "0.6532885", "0.6525835", "0.6523307", "0.65204257", "0.6517437", "0.6498908", "0.6498844", "0.6495952", "0.649084", "0.6482861", "0.6479495", "0.6459233", "0.6452299", "0.64521426", "0.64521426", "0.6450286", "0.6449186", "0.64486986", "0.64462936", "0.6445596", "0.6445596", "0.6445596", "0.64450836", "0.6441559", "0.64395905", "0.64376885", "0.64303434", "0.6427779", "0.6419767", "0.6419767", "0.6419496", "0.6412674", "0.63996404", "0.63972425", "0.6391041", "0.63888764", "0.6380728", "0.6380044", "0.6378042", "0.6376927", "0.63708687", "0.6367624", "0.6363981", "0.6362759", "0.6349834", "0.6346685", "0.63391227", "0.63266987", "0.6325454", "0.63198406", "0.631957", "0.63180286", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994", "0.6308994" ]
0.0
-1
ensures it loops if this sound is the last one
function playNext(i) { if ((currentSound + 1) == soundsCount) { soundManager.play('0'); } else { soundManager.play((currentSound + 1).toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextIntermittentSound() {\n\t\tthat.intermittentSound.play();\n\t}", "function novel_audioLoop()\n{\n novel.audio.currentTime = 0;\n novel.audio.play();\n}", "function playNextShuffled() {\n\n\t\tif (plsShuffledIndex < (plsShuffled.length - 1)) {\n\t\t\tplsShuffledIndex += 1;\n\t\t\tplay(plsShuffled[plsShuffledIndex]);\n\t\t} else {\n\t\t\tif (isContinuous) {\n\t\t\t\tsetPlsShuffled();\n\t\t\t\tplay(plsShuffled[0]);\n\t\t\t} else {\n\t\t\t\tif (Amplitude.getSongPlayedPercentage() === 100) {\n\t\t\t\t\tcurTrack.classList.remove('selected');\n\t\t\t\t\tfirePlayEnd();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function playNextLoop() {\n\taudioSource1.clip = Resources.Load(\"Sounds/loop_\"+(levelSet*10+(curTarPurple-1)));\n\taudioSource1.audio.Stop();\n\taudioSource1.audio.Play(); \n}", "function songEnd() {\r\n if (!repeat && ((shuffle && shuffleIndex == shuffled.length - 1) || playlistIndex === songs.length - 1)) {\r\n setTimeout(function() {\r\n if (audio.paused) {\r\n if (requestID != null) {\r\n cancelAnimationFrame(requestID);\r\n requestID = null;\r\n }\r\n playButton.classList.remove(\"fa-pause-circle\");\r\n playButton.classList.add(\"fa-play-circle\");\r\n }\r\n }, 1000);\r\n } else {\r\n nextSong();\r\n }\r\n }", "function playSound(name) {\n sounds[name].currentTime = 0;\n sounds[name].play();\n sounds[name].onended = function () {\n playSound(name);\n };\n } //end playSound", "loopInit() {\n this.addEventListener('ended', () => {\n this.currentText = 0;\n this.play();\n })\n }", "hohoho() {\n this.hohoSounds[randint(0, this.hohoSounds.length - 1)].play();\n }", "loop() {\r\n\t\t\tthis.looping = true;\r\n\t\t\tthis.playing = true;\r\n\t\t}", "function loopCheck() {\n loop++;\n if (loop < loopMax) {\n tl.play();\n } else {\n tl.pause();\n }\n}", "function nextSong() {\r\n musicIndex = musicIndex + 1;\r\n if (musicIndex > music.length - 1) {\r\n musicIndex = 0;\r\n loadSong(musicIndex);\r\n playSong();\r\n } else {\r\n loadSong(musicIndex);\r\n playSong();\r\n }\r\n}", "function loopSound(soundsource, imageID, goinit) {\n\t//endvol derivd from ImageID\n\t\tif(goinit) {\n\t\tvar fademe = 0;\n\t\tsoundplay(soundsource);\n\t\tvar starttime = context.currentTime;\n\t}\n\t\telse {\n\t\tsoundstop(soundsource); //but want a function with the next line fadout\n\t\t//(soundsource,incr, endvol)\n\t\tfadeOutsound(soundsource, -0.04, 0);\n\t}\n\t//fades included - don't need to prep sources \n\tfadeUpfromzero(soundsource,imageID, 0.02, 0); \n\tif (context.currentTime >= starttime + (soundsource.buffer.duration-5) && fademe == 0)\n\t{\n\t fadeOuttozero(soundsource, imageID, 0.04, goinit);\n\t starttime = 0;\n\t fademe == 1;\n\t}\n\t\n}", "audioEndedHandler(event){\n if(this.autoPlay){\n this.next();\n }\n }", "function sound_ended() {\n if (context !== null) {\n sound_end_time = context.currentTime * 1000;\n } else {\n sound_end_time = Date.now();\n }\n if (trial.ignore_responses_during_audio) {\n $(':button').prop('disabled',false);\n }\n if (trial.trial_ends_after_audio) {\n end_trial();\n }\n }", "function audioLoopEnded() {\n if (loopCallback) {\n if (((loopIndex - 2) * 256) < self.ui.byteArray.length) {\n // if we've got more data, transcode and loop\n loopCallback.transcodeFile(loopIndex);\n } else {\n // if we've reached the end of our data, check to see how\n // many times we've played the entire file back. We want to play\n // it back a couple of times because sometimes packets get\n // lost or corrupted.\n if (window.ui.playCount < 2) { // set this higher for more loops!\n window.ui.playCount++;\n loopCallback.transcodeFile(0); // start it over!\n } else {\n loopCallback.audioEndCB(); // clean up the UI when done\n }\n }\n }\n}", "playAll() {\n this.audio.forEach((a, i) => {\n if(i === 0) {\n a.play();\n } else {\n this.audio[i - 1].addEventListener('ended', ()=> a.play());\n }\n });\n }", "function playRollSound(){\n if (sound){\n rollSound.pause();\n rollSound.currentTime = 0;\n rollSound.play();\n }\n}", "function nextAudio(){\r\n currentSong++;\r\n if(currentSong > audios.length - 1 ){\r\n currentSong = 0 ;\r\n }\r\n audio.src = audios[currentSong] ; \r\n img.src = imgs[currentSong] ;\r\n\r\n playAudio();\r\n}", "stateLoop () {\n const clip = this.clips.shift();\n\n if (clip !== undefined) {\n if (clip.loop) {\n // Eventually advance will be called\n this.play(clip);\n } else {\n // Call stateloop when the clip is done playing\n this.play(clip).then(() => {\n this.stateLoop();\n });\n }\n }\n }", "function soundDestroy() {\r\n audioDestroy.currentTime = 0;\r\n audioDestroy.play();\r\n audioDestroy.addEventListener(\r\n \"timeupdate\",\r\n function () {\r\n if (audioDestroy.currentTime >= 0.5) {\r\n audioDestroy.pause();\r\n }\r\n },\r\n false\r\n );\r\n }", "function playNextFrame() {\n if (currentFrame >= frames.length) {\n currentFrame = 0;\n }\n\n renderFrames();\n\n var frame = frames[currentFrame];\n for (var i = 0; i < frame.length; i++) {\n if (frame[i] >= threshValue) {\n playSound(i);\n\n if (playFirstNote) {\n break;\n }\n }\n }\n\n currentFrame++;\n}", "function doSomethingAfterAudio(elem){\n\t\t\tif (audio.currentTime > audio.duration - getAudioTailLength(elem)) {\n\t\t\t\texperiment.start_ms = Date.now();\n\t\t\t\t$(\"#nextButton\").removeAttr('disabled');\n\t\t\t} else {\n\t\t\t\tsetTimeout(function() {doSomethingAfterAudio(elem);}, 50);\n\t\t\t};\t\t\t\n\t\t\t \n\t\t}", "playInstrument (instrument, note){\n var that = this;\n note.forEach( function (n,index){\n if(instrument.name !== 'Bodky'){\n var i = instrument.lastPlayedNotes.indexOf(n);\n if(i<0){\n instrument.lastPlayedNotes.push(n);\n var myinstance = createjs.Sound.play(n);\n myinstance.volume = instrument.volume;\n myinstance.addEventListener(\"complete\", createjs.proxy(that.handleSoundPlaying, that, instrument, n));\n }\n } else {\n if(instrument.lastPlayedNote !== n){\n var myinstance = createjs.Sound.play(n);\n myinstance.volume = instrument.volume;\n instrument.lastPlayedNote = n;\n }\n }\n //Skip and don't play it...probably I should accellerate the end of the play? i.e. fading out?\n });\n }", "function endGame() {\nvar snd = new Audio(\"buzz.mp3\"); // buffers automatically when created\nsnd.play();\n game.init();\n}", "function playNext() {\n\n\t\tif (isPlayOne) return playStop();\n\n\t\tif (isShuffle) return playNextShuffled();\n\n\t\tvar curTrack = pls.querySelector('.selected');\n\t\tif (!curTrack) return play(pls.children[0]);\n\n\t\tif (isRepeat) return playAgain(curTrack);\n\n\t\tvar nextTrack = curTrack.nextElementSibling;\n\n\t\tif (nextTrack) {\n\t\t\tplay(nextTrack);\n\t\t} else {\n\t\t\tif (isContinuous) {\n\t\t\t\tplay(pls.children[0]);\n\t\t\t} else {\n\t\t\t\tif (Amplitude.getSongPlayedPercentage() === 100) {\n\t\t\t\t\tcurTrack.classList.remove('selected');\n\t\t\t\t\tfirePlayEnd();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "immediateLevelSwitchEnd() {\r\n const media = this.media\r\n if (media && media.buffered.length) {\r\n this.immediateSwitch = false\r\n // if (BufferHelper.isBuffered(media, media.currentTime)) {\r\n // only nudge if currentTime is buffered\r\n // media.currentTime -= 0.0001;\r\n // }\r\n if (!this.previouslyPaused) {\r\n this.playPromise = media.play()\r\n this.playPromise.then(() => {\r\n this._pause = false\r\n this.playing = true\r\n })\r\n }\r\n }\r\n }", "function trackPreviousActual() {\n var i = queueIdx - 1;\n if (i > -1) {\n queueIdxChange(i);\n console.log(\"prev track\");\n }\n else {\n console.log(\"no previous songs\");\n // Goto end of queue if more than 1 song\n if (queue.length > 1) {\n queueIdxChange(queue.length - 1);\n }\n else {\n // TODO: REPLAY IF THE REPLAY/LOOP OPTION IS SELECTED!!! -------------------\n // For now just stop the only song\n audio.currentTime = 0;\n audioPause();\n }\n }\n}", "function playBack() {\n setTimeout(function () {\n if (sequenceIndex < currentRound) {\n visualise(programSequence[sequenceIndex]);\n $feedback.addClass('hidden');\n $feedback.html(currentPlayer);\n // console.log(programSequence[sequenceIndex].audio);\n playBack();\n sequenceIndex++;\n } else {\n sequenceIndex = 0;\n $document.keypress(keyListener);\n }\n }, 1000);\n }", "soundPause() {\n\t\tthis.mySound.stop();\n\t\tthis.endGameSound.stop();\n\t\t// this.eatSound.stop();\n\t}", "function playFinishedSound()\r\n{\r\n\t//Make sure any speech about our current location stops when we finish the level\r\n\taudio.stop({channel : 'eighth'});\r\n\t\r\n\tspeak('Congratulations! You have finished level '+levelNumber, 'default', true, function()\r\n\t{\r\n\t\tif(levelNumber==10)\r\n\t\t{\r\n\t\t\tplaySound('Other_Sounds/cheer', 'default', 1, false, none);\r\n\t\t\tspeak('You have completed all of the levels! If you would like to continue, you will start again at level one. If you do not want to continue, close the browser window.', 'default', false, none);\r\n\t\t\tinitializeLevels();\r\n\t\t}\r\n\t\t\r\n\t\tplayingFinishedSound=false;\r\n\t\t\r\n\t\tlevelNumber++;\r\n\t\t\r\n\t\tif(levelNumber>10)\r\n\t\t\tlevelNumber=1;\r\n\t\t\r\n\t\tplayingScoreSound=true;\r\n\t\r\n\t\tspeak('Your current score is: '+score+' You have '+lives+(lives==1 ? ' life left.' : 'lives left'), 'default', false, function()\r\n\t\t{\r\n\t\t\tplayingScoreSound=false;\r\n\t\t\tarrowRotation=90;\r\n\t\t\t\r\n\t\t\tinitializePlayer();\r\n\t\t});\r\n\t});\r\n}", "function nextSong() {\n checkPlayPause();\n if (playlist_index == (playlist.length - 1)) {\n playlist_index = 0;\n playAudio();\n }\n else {\n playlist_index++;\n playAudio();\n }\n}", "function loopSilence(){\n\tsilencesamp.loop();\n\tsilencesamp.play();\n}", "function trackNext() {\n var i = queueIdx + 1;\n if (i < queue.length) {\n queueIdxChange(i);\n console.log(\"next track\");\n }\n else {\n console.log(\"no more songs in queue\");\n\n // TODO: Restart if 'repeat queue'\n if (queue.length > 1) {\n // Goto start of queue if more than 1 song\n queueIdxChange(0);\n }\n else {\n // TODO: REPLAY IF THE REPLAY/LOOP OPTION IS SELECTED!!! -------------------\n // For now just stop the only song\n audio.currentTime = 0;\n audioPause();\n }\n }\n}", "stopAtLastFrame() {\n\t\tthis.animActions.forEach( action => action.play() );\n\t\tthis.animMixer.update( this.duration );\n\t\tthis.animMixer.stopAllAction();\n\t}", "function fadeDown(){\n\tif(samples[parseInt(curSamp)].isPlaying()){\n\t\tsamples[parseInt(curSamp)].setVolume(0, 1);\t\n\t\tsetTimeout(stopSamp, 1000);\n\t}\n}", "function playstop(){\r\n\r\n\tif (!playing){\r\n\t\tpulseWorker.postMessage({'msg' : \"reset\"});\r\n\t\tpulseWorker.postMessage({'msg' : \"start\"});\r\n\t\t\r\n\t}else{\r\n\t\tpulseWorker.postMessage({'msg' : \"stop\"});\r\n\t\tpulseWorker.postMessage({'msg' : \"reset\"});\r\n\t\t\r\n\t}\r\n\r\n\tbeatCounter = 0;\r\n\tplaying = !playing;\r\n\r\n\tif (menuBar.playMode.value == 1){\r\n\t\tsequencerForm.currentSeq = sequencerForm.startSeq;\r\n\t} \r\n\r\n\tfor (var i = 0; i < maxSounds; i++){\r\n\t\tsounds[i].arpCounter = 0;\r\n\t\tsounds[i].arpKnob.value = sounds[i].arpKnob.max;\r\n\r\n\t\tfor (var p = 0; p < patterns.length; p++){\r\n\t\t\tif (patterns[p][i].isEuclidian){\r\n\t\t\t\tpatterns[p][i].counter = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!playing){\r\n\t\t\tsounds[i].playSilentNote(60); //to really stop all osc's without having to restart them..\r\n\t\t}\r\n\t}\r\n}", "function randomStatSound() {\r\n\t//take a random value within the array's length and round it down to a valid index\r\n\tvar audioType = Math.floor(Math.random() * statSounds.length);\r\n\t//only call the array once\r\n\tsfxElem = statSounds[audioType];\r\n\tsfxElem.play();\r\n\tsfxElem.currentTime = 0;\r\n}", "function playWeaponSound() {\n var audio;\n var rocket = false;\n var gun = false;\n\n for(var i = 0; i < placedWeapons.length; i++) {\n if(placedWeapons[i] === \"rocket\" && !rocket) {\n audio = new Audio(\"./sounds/weapons/rocket.mp3\");\n audio.play();\n audio.volume = 0.2;\n rocket = true;\n } else if(placedWeapons[i] === \"gun\" && !gun) {\n audio = new Audio(\"./sounds/weapons/gun.mp3\");\n audio.play();\n audio.volume = 0.3;\n audio.addEventListener(\"ended\", function () {\n audio = new Audio(\"./sounds/weapons/gunshell.mp3\");\n audio.play();\n audio.volume = 0.3;\n });\n gun = true;\n }\n }\n}", "function playBeep() { \n beeps[thisBeep].play();\n thisBeep++;\n if (thisBeep > 5) thisBeep = 0;\n}", "function advanceToNextLevel()\r\n{\t\r\n\taudio.stop({channel : 'custom'});\r\n\taudio.stop({channel : 'secondary'});\r\n\taudio.stop({channel : 'tertiary'});\r\n\t\r\n\tplayingFinishedSound=true;\r\n\ttoDrawArrow=true;\r\n\t\r\n\tplayFinishedSound();\r\n}", "function loop(){\n if(audio.loop){\n audio.loop = false;\n $(\".loop\").removeClass(\"active\");\n }else{\n audio.loop = true;\n $(\".loop\").addClass(\"active\");\n }\n}", "function endPlay() {\n\n}", "function prevAudio(){\r\n currentSong--;\r\n if(currentSong < 0){\r\n currentSong = audios.length - 1 ;\r\n }\r\n audio.src = audios[currentSong] ; \r\n img.src = imgs[currentSong] ;\r\n\r\n playAudio();\r\n}", "function prepareSound() {\n if (soundNumber >= 0) {\n sounds[soundNumber].pause(); //Stop playing the old sound\n sounds[soundNumber].currentTime = 0; //Rewind sound\n }\n nextSound = true; //The next sound will be initiliased in the next draw cycle \n nextPt = str(Math.floor(random(56))); //Get random participant for that sound number\n if (nextPt==47 && nextSoundNumber==9) { //This sketch is empty so chose a different participant\n nextPt=48;\n }\n}", "function nextSong() {\r\n if (index_no < All_songs.length - 1) {\r\n index_no += 1;\r\n loadTrack(index_no);\r\n playSong();\r\n } else {\r\n index_no = 0;\r\n loadTrack(index_no);\r\n playSong();\r\n }\r\n}", "function playPrevShuffled() {\n\t\tif (plsShuffledIndex > 0) {\n\t\t\tplsShuffledIndex -= 1;\n\t\t\tplay(plsShuffled[plsShuffledIndex]);\n\t\t}\n\t}", "gameOver() {\n this.stopMusic();\n this.gameOverSound.play();\n }", "function prevMusic() {\n musicIndex--;\n musicIndex < 1 ? (musicIndex = allMusic.length) : (musicIndex = musicIndex);\n loadMusic(musicIndex);\n playMusic();\n playingNow();\n}", "stopMusic() {\n this.bgSound.pause();\n this.bgSound.currentTime = 0; //restart from zero\n }", "function emergencyPtr() {\n\n var hmm = (Math.floor(Math.random() * 8));\n console.log(hmm);\n if (hmm === 3 || hmm === 4 || hmm === 5) {\n var succ = new Audio(\"images/succ.mp3\");\n succ.play();\n }\n else if (hmm === 0 || hmm === 1 || hmm === 2) {\n var succ = new Audio(\"images/movie_1.mp3\");\n succ.play();\n }\n else if (hmm == 6 || hmm == 7) { //Bad luck m8\n var succ = new Audio(\"images/fish.mp3\");\n succ.play();\n\n document.getElementById('xd').src = \"images/parrot.gif\";\n document.getElementById('xd').style.width = \"1000px\"\n document.getElementById('xd').style.height = \"1000px\"\n document.getElementById('xd').style.position = \"relative\";\n document.getElementById('xd').style.zIndex = 5;\n }\n}", "function soundFiring() {\r\n audioFire.currentTime = 0;\r\n audioFire.play();\r\n audioFire.addEventListener(\r\n \"timeupdate\",\r\n function () {\r\n if (audioFire.currentTime >= 0.5) {\r\n audioFire.pause();\r\n }\r\n },\r\n false\r\n );\r\n }", "function update(event) {\n if (count > 0) {\n count--;\n return;\n }\n if (count == 0) {\n Recording.setPlayFromCurrentLocation(playFromCurrentLocation);\n Recording.setPlayerLoop(loop);\n Recording.setPlayerUseDisplayName(true);\n Recording.setPlayerUseAttachments(true);\n Recording.setPlayerUseHeadModel(false);\n Recording.setPlayerUseSkeletonModel(true);\n Recording.startPlaying();\n Vec3.print(\"Playing from \", Avatar.position);\n count--;\n }\n \n if (!Recording.isPlaying()) {\n Script.update.disconnect(update);\n }\n}", "function youWin() {\n if (ballCount >= balls.length) {\n audio.volume = 0\n youWinSound.play()\n youWinOverlay()\n }\n }", "function cleanActive() {\n for (var i = 0; i < activeSounds.length; i++) {\n if (activeSounds[i].ended) {\n activeSounds.splice(i, 1);\n }\n }\n }", "function nextMusic() {\n musicIndex++;\n musicIndex > allMusic.length ? (musicIndex = 1) : (musicIndex = musicIndex);\n loadMusic(musicIndex);\n playMusic();\n playingNow();\n}", "function addFinalSound(assignmentNr)\n{\n switch(assignmentNr)\n {\n case 0:\n sounds['finalFJ'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalFJ'].play();\n break;\n case 1:\n sounds['finalDK'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalDK'].play();\n break;\n case 2:\n sounds['finalSL'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalSL'].play();\n break;\n case 3:\n sounds['finalAAE'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalAAE'].play();\n break;\n case 4:\n sounds['finalAll1'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalAll1'].play();\n break;\n case 5:\n sounds['finalAll2'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalAll2'].play();\n break;\n case 6:\n sounds['finalEH'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalEH'].play();\n break;\n case 7:\n sounds['finalIG'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalIG'].play();\n break;\n case 8:\n sounds['finalBN'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalBN'].play();\n break;\n case 9:\n sounds['finalRO'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalRO'].play();\n break;\n case 10:\n sounds['finalBRODD'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalBRODD'].play();\n break;\n case 11:\n sounds['finalHA'].onStop.addOnce(function(){ stopInstructorTalk(); }, this);\n sounds['finalHA'].play();\n break;\n }\n}", "lastMoviePlay()\n {\n return (this.currentMoviePlay == this.playsCoords.length - 1);\n }", "function nextSong(){\n var audio=document.querySelector('audio');\n // console.log(audio.duration);\n var len=songs.length;\n\n if (willShuffle == 1) {\n var nextSongNumber = randomExcluded(1,len,currentSongNumber); // Calling our function for random selection\n var nextSongObj = songs[nextSongNumber-1];\n songIndex(nextSongObj,audio);\n currentSongNumber = nextSongNumber;\n }\n\n else if(currentSongNumber < len) {\n for(var i=0;i<len;i++){\n if(audio.src.search(songs[i].fileName)!=-1)\n break;\n }\n currentSongNumber=i+1;\n if(currentSongNumber < len){\n var nextSongObj = songs[currentSongNumber];\n songIndex(nextSongObj,audio);\n }\n\n else if(willLoop == 1) {\n var nextSongObj = songs[0];\n songIndex(nextSongObj,audio);\n currentSongNumber = 1;\n }\n\n else {\n currentSongNumber=len-1;\n lastSongClick(audio);\n }\n }\n\n else {\n lastSongClick(audio);\n }\n}", "function set_boom_sound() {\r\n\tvar audio = $(\"<audio>Your browser does not support audio files</audio>\");\r\n\tvar source = $(\"<source src='\"+Sounds[0].src+\"' type='audio/mpeg'>\");\r\n\t\r\n\taudio.append(source);\r\n\t$(\"#music\").append(audio);\r\n\taudio.attr(\"id\",Sounds[0].id);\r\n\t\r\n\taudio = document.getElementById(Sounds[0].id);\r\n\t\r\n\taudio.addEventListener(\"ended\", function(){\r\n\t\tif(Game.level != 0)\r\n\t\t\t$(\"#restart\").trigger(\"click\"); \r\n\t});\r\n}", "function Start() {\n\taudio.clip = sounds[Random.Range(0, sounds.Length)];\n}", "function stopSound() {\n currentBird.pause();\n currentBird.currentTime = 0;\n currentBird = '';\n }", "function playSilenceForMillis(length) {\n var iterations = length / 2;\n for (var i = 0; i < iterations * 30; i++) {\n soundData.push(0);\n }\n}", "function randomSFX() {\r\n\tvar audioType = Math.floor(Math.random() * sfxSounds.length);\r\n\tsfxSounds[audioType].play();\r\n\tsfxSounds[audioType].currentTime = 0;\r\n}", "function longMoment(){\n console.log(\"moment\");\n\n $('audio#bgm')[0].play();\n\n}", "function playBumpSound()\r\n{\r\n\tplaySound('Other_Sounds/bump', 'fourth', 1, true, none);\r\n}", "function repeatOneMusic() {\n // here we'll reset the musicIndex accordingly\n musicIndex = musicIndex;\n loadMusic(musicIndex);\n playMusic();\n }", "function prevMusic() {\n if( audio.currentTime > 3 ) audio.currentTime = 0\n else startMusic-- \n\n if( startMusic < 0 ) startMusic = musicList.length - 1\n loadMusic( musicList[startMusic] )\n playMusic()\n}", "function roundsSound(){\n\tvar sound = document.getElementById(\"roundsSound\");\n\tsound.currentTime = 0;\n\tsound.play();\n}", "stopRecord(state){\n for(var j = state.recordSound.length-1; j >= 0 ; j--){\n //if sound still active and the user select to stop the record then \n //Insert end time of the sound\n if(state.recordSound[j].endTime === 0){\n state.recordSound[j].endTime = Date.now()\n }\n //calculate the total time of the sound to be played in the record\n state.recordSound[j].totalTime = (state.recordSound[j].endTime - state.recordSound[j].startTime)/1000\n }\n }", "function playRandomNote() {\r\n playSound(newFreq);\r\n}", "ring(nb){\n for(var cpt=0; cpt<nb; cpt++){\n player.play(this.bellPath, function(err){\n if(err){\n console.log(err);\n }\n else{\n console.log('bell rang!');\n }\n });\n }\n return true;\n }", "function playFallingSound()\r\n{\r\n\t//Make sure any speech about our current location stops when we start falling\r\n\taudio.stop({channel : 'eighth'});\r\n\t\r\n\tplaySound('Other_Sounds/falling', 'default', 1, true, function()\r\n\t{\r\n\t\tisFalling=false;\r\n\t\ttoDrawArrow=true;\r\n\t\t\t\r\n\t\tif(lives>0)\r\n\t\t{\r\n\t\t\tplayingLivesLeft=true;\r\n\t\t\t\r\n\t\t\tspeak('You have fallen into a trap and died. '+(lives==1 ? 'You have '+lives+ 'life left.' : 'You have '+lives+ 'lives left.'), 'default', false, function()\r\n\t\t\t{\r\n\t\t\t\tplayingLivesLeft=false;\r\n\t\t\t\tinitializePlayer();\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tendGame();\r\n\t});\r\n\t\r\n\taudio.stop({channel : 'custom'});\r\n\taudio.stop({channel : 'secondary'});\r\n\taudio.stop({channel : 'tertiary'});\r\n\t\r\n\tisFalling=true;\r\n}", "stopSound() { if (this.myAudio) this.myAudio.load(); }", "function nextSong(){\n songIndex++\n if(songIndex> songs.length-1)\n {\n songIndex=0\n }\n PickSong(songs[songIndex]);\n playSong()\n}", "function endSong() {\n var endSong = new Audio(\"sound/nightking.mp3\");\n endSong.volume = .7;\n endSong.play();\n}", "function replay() {\n lastRandomNote = allNotesArray[randomNoteIndex];\n\n const playSound = ctx.createBufferSource();\n playSound.buffer = lastRandomNote;\n playSound.connect(ctx.destination);\n playSound.start(ctx.currentTime);\n}", "_continueSounds() {\n if (this._highestSeverity === Severity.MINOR ||\n this._highestSeverity === Severity.MAJOR) {\n this._playWarningSound();\n } else if (this._highestSeverity === Severity.CRITICAL) {\n this._playErrorSound();\n }\n }", "function onAudioPositionChanged(position) { //noLetPlay\n\n audioCurrentTime = position;\n\n// if (_letPlay)\n// {\n// return;\n// }\n\n _skipAudioEnded = false;\n// _skipTTSEnded = false;\n\n if (!_smilIterator || !_smilIterator.currentPar)\n {\n return;\n }\n\n var audio = _smilIterator.currentPar.audio;\n\n //var TOLERANCE = 0.05;\n if(\n //position >= (audio.clipBegin - TOLERANCE) &&\n position > DIRECTION_MARK &&\n position <= audio.clipEnd) {\n\n//console.debug(\"onAudioPositionChanged: \" + position);\n return;\n }\n\n _skipAudioEnded = true;\n\n//console.debug(\"PLAY NEXT: \" + position + \" (\" + audio.clipBegin + \" -- \" + audio.clipEnd + \")\");\n\n var goNext = position > audio.clipEnd;\n if (goNext)\n {\n _smilIterator.next();\n }\n else //position <= DIRECTION_MARK\n {\n _smilIterator.previous();\n }\n\n if(_smilIterator.currentPar) {\n\n if(!_smilIterator.currentPar.audio) {\n pause();\n return;\n }\n\n if(_settings.mediaOverlaysSkipSkippables)\n {\n var skip = false;\n var parent = _smilIterator.currentPar;\n while (parent)\n {\n if (parent.isSkippable && parent.isSkippable(_settings.mediaOverlaysSkippables))\n {\n skip = true;\n break;\n }\n parent = parent.parent;\n }\n\n if (skip)\n {\n console.debug(\"MO SKIP: \" + parent.epubtype);\n\n var pos = goNext ? _smilIterator.currentPar.audio.clipEnd + 0.1 : DIRECTION_MARK - 1;\n\n onAudioPositionChanged(pos); //noLetPlay\n return;\n }\n }\n\n if(_audioPlayer.isPlaying()\n && _smilIterator.currentPar.audio.src\n && _smilIterator.currentPar.audio.src == _audioPlayer.currentSmilSrc()\n && position >= _smilIterator.currentPar.audio.clipBegin\n && position <= _smilIterator.currentPar.audio.clipEnd)\n {\n//console.debug(\"ONLY highlightCurrentElement\");\n highlightCurrentElement();\n return;\n }\n\n //position <= DIRECTION_MARK goes here (goto previous):\n\n// if (!noLetPlay && position > DIRECTION_MARK\n// && _audioPlayer.isPlaying() && _audioPlayer.srcRef() != _smilIterator.currentPar.audio.src)\n// {\n// _letPlay = true;\n// setTimeout(function()\n// {\n// _letPlay = false;\n// playCurrentPar();\n// }, 100);\n//\n// playCurrentPar();\n//\n// return;\n// }\n\n playCurrentPar();\n return;\n }\n//\n// if (!noLetPlay)\n// {\n// _letPlay = true;\n// setTimeout(function()\n// {\n// _letPlay = false;\n// nextSmil(goNext);\n// }, 200);\n// }\n// else\n// {\n// nextSmil(goNext);\n// }\n\n//console.log(\"NEXT SMIL ON AUDIO POS\");\n nextSmil(goNext);\n }", "function prev_song(){\r\n if(index_no>0){//Verifica que el indice no sea menor que 0\r\n index_no-=1;//Cambia el indice en 1 al indice anterior\r\n load_track(index_no);//Carga la canción\r\n playsong();//Reproduce la cancion\r\n }else{\r\n index_no = All_song.length;//Cuando el indice supera la longitud de la lista se vuelve el valor maximo de la longitud de la lista\r\n load_track(index_no);//Carga la canción\r\n playsong();//Reproduce la cancion\r\n }\r\n }", "function handleBackward(){\n audio.currentTime -= 3\n }", "function prevSong(){\n songIndex--\n if(songIndex<0)\n {\n songIndex=songs.length-1\n }\n PickSong(songs[songIndex]);\n playSong()\n}", "function _listenAgain() {\n if (!audioElement.ended) {\n audioElement.currentTime = 0;\n clearInterval(timer);\n }\n audioElement.play();\n _runIntro();\n div_intro_bottomAppBar.winControl.showCommands(\"skip\");\n div_intro_bottomAppBar.winControl.hide();\n topAppBarInIntro.winControl.hide();\n }", "function prevSong(){\n i--;\n if(i < 0){\n i = songs.length - 1;\n }\n loadSong(songs[i]);\n playSong();\n}", "playF() {\n const randNum = Math.floor(Math.random() * this.soundList.length);\n\n console.log(randNum);\n this.__audio.src = this.soundList[randNum];\n this.__audio.play();\n }", "nextFrame() {\r\n\t\t\tif (this.frame < this.length - 1) this.frame = this.frame + 1;\r\n\t\t\telse if (this.looping) this.frame = 0;\r\n\r\n\t\t\tthis.targetFrame = -1;\r\n\t\t\tthis.playing = false;\r\n\t\t}", "function renderAudio() {\n var now = audioContext.currentTime;\n \n for (var i = 0; i < NUMBER_OF_SOUND_SOURCES; i++)\n {\n if (meshes[i] != null)\n {\n meshes[i].updateMatrixWorld();\n }\n }\n\n\n if (soundsPlaying)\n {\n if ((loopCount % 2) === 0)\n {\n for (var i = 0; i < NUMBER_OF_SOUND_SOURCES; i++)\n {\n if (waitTimes[i] < (now - prevTime[i]))\n {\n \n if (onOff[i])\n {\n // Play a sound from this soundsource chosen by random walk\n \n waitTimes[i] = playRandomSound(i); // playRandomSound returns the duration of the loaded sample\n }\n else\n {\n onOff[i] = true;\n waitTimes[i] = ((Math.random() * WAIT_MAX) + WAIT_OFFSET);\n //console.log(waitTimes[i]);\n\n }\n prevTime[i] = now;\n }\n }\n }\n loopCount++;\n } \n }", "function playBeat() {\r\n /*--------------------------------- */\r\n initKey();\r\n /*Die Soundintervalle werden mit zeitlichem Versatz gestartet. Ist der erste fertig, startet der */\r\n /*zweite usw. Wann ein Sound endet und der nächste starten kann, erfährt der EventListener */\r\n /*durch den einfachen Aufruf mit .play().*/\r\n /*Sound4 startet */\r\n setInterval(function () { beat[0].play(); }, 2038);\r\n /*Sound4 ist das erste Mal zu Ende ==> Sound5 startet */\r\n beat[0].addEventListener(\"ended\", function () { beat[1].play(); });\r\n /*Sound5 ist das erste Mal zu Ende ==> Sound8 startet */\r\n beat[1].addEventListener(\"ended\", function () { beat[2].play(); });\r\n}", "function Play() {\n var Kick = setInterval(MyBeat, 500);\n var index = 0;\n var Beat = [\"assets/kick.mp3\", \"assets/snare.mp3\", \"assets/hihat.mp3\", \"assets/F.mp3\", \"assets/C.mp3\", \"assets/F.mp3\", \"assets/C.mp3\", \"assets/G.mp3\", \"assets/A.mp3\", \"assets/A.mp3\", \"assets/G.mp3\", \"assets/A.mp3\", \"assets/C.mp3\", \"assets/F.mp3\", \"assets/laugh-2.mp3\"];\n function MyBeat() {\n var sequence = new Audio(Beat[index]);\n sequence.play();\n index += 1;\n if (index >= 15)\n index = 0;\n console.log(Beat[index]);\n document.querySelector(\"#StoppButton\").addEventListener(\"mousedown\", stopBeat);\n function stopBeat() {\n clearInterval(Kick);\n }\n }\n ;\n}", "function Update()\n\t{\n\t\tif(NotPlayedYet){\n if (Time.timeSinceLevelLoad > playStartTime) {\n GetComponent.<AudioSource>().PlayOneShot(myClip);\n\t\t\t//AudioSource>().PlayOneShot(myClip);\n\t\t\tNotPlayedYet = false;\n//\t\tplayStartTime = playStartTime + 10 + 60*Random.value; //don't play again for at least 10 seconds + 0-20 more seconds\n\t}\n\t}\n}", "function walkThroughMix(lastTrackId) {\n // Fetch the current song in the mix.\n return fetchTrack(mixId, setId, lastTrackId).then(track => {\n // Log the song\n let currentSong = track.set.track;\n mixContents.push(currentSong);\n try {\n emitter.emit('track', currentSong);\n } catch (e) {\n console.error('error in track emit', e);\n emitter.emit('error', e);\n }\n\n if (track.set.at_last_track) {\n // At end!\n return true;\n } else {\n // fetch next track\n if (delayLengthOfTrack) {\n // Calculate the length of the track\n return getLengthOfTrack(currentSong).then(lengthInSeconds => {\n // console.log('* Approximate Track length:', lengthInSeconds, 'seconds');\n // console.log('* Waiting as if playing...');\n return Promise.delay(lengthInSeconds * 1000);\n }).then(() => {\n return walkThroughMix(track.set.track.id);\n });\n } else {\n // User doesn't want to delay!\n return walkThroughMix(track.set.track.id);\n }\n }\n });\n }", "function stopLoop()\n{\n isPlaying = false;\n}", "if (inited && playInited) {\r\n lastCurTime = player.currentTime;\r\n }", "function gameOver() {\r\n isGameOver = true;\r\n stopAudio(loop0);\r\n stopAudio(loop1);\r\n stopAudio(loop2);\r\n\r\n //random sound\r\n if (sound) {\r\n var s = Math.floor(Math.random() * 3);\r\n switch (s) {\r\n case 0:\r\n dead0.play();\r\n break;\r\n case 1:\r\n dead1.play();\r\n break;\r\n case 2:\r\n dead2.play();\r\n default:\r\n dead2.play();\r\n }\r\n }\r\n\r\n ctx.save();\r\n\r\n ctx.drawImage(wasted, border, 0, canvasWidth - 2 * border, canvasHeight);\r\n\r\n setTimeout(gameOvertext, 1500);\r\n ctx.restore();\r\n}", "soundMaintenance() {\n\t\tfor (var soundId in this.sounds) {\n\t\t\tif ((c.KEEP_SOUND * 1000) + this.sounds[soundId].getTimestamp() < Date.now()) {\n\t\t\t\tdelete this.sounds[soundId];\n\t\t\t}\n\t\t}\n\t}", "function playSound(sound)\r\n{\r\n sound.currentTime = 0;\r\n sound.play();\r\n}", "playIncorrectSound() {\n this.incorrectSound.play();\n }", "function AudioButtonFunc1(n_audio) {\n if (audioPlaying[n_audio] == false) {\n audioArray1[n_audio].loop = true;\n audioArray1[n_audio].play();\n audioArray1[n_audio].volume = 1.0;\n audioPlaying[n_audio] = true;\n } else {\n audioArray1[n_audio].pause();\n audioPlaying[n_audio] = false;\n }\n debugShowLog(audioPlaying);\n // END if audioPlaying\n} // END AudioButtonFunc", "function endAnimation() {\n let endAnimationText = getEndAnimation();\n endAnimationText.innerHTML = \"Finished!\";\n endAnimationText.style.fontSize = \"50px\";\n const finishedSound = audioFiles.finishedSound;\n if(audioOn && inhaleHold > 0) {\n finishedSound.load();\n finishedSound.play();\n }\n endEarlyDetails();\n}", "stopUFOSpawnSound() {\n // Right now there's no way of knowing which track is playing so just stop all of them.\n this.aggressiveUfoAudio.pause();\n this.aggressiveUfoAudio.currentTime = 0;\n\n this.passiveUfoAudio.pause();\n this.passiveUfoAudio.currentTime = 0;\n }", "doFullAlarm() { this.playSound('queueFull'); }" ]
[ "0.70659846", "0.68028736", "0.6775667", "0.67327964", "0.66567105", "0.6581599", "0.6578006", "0.6558062", "0.64853835", "0.64729416", "0.64686304", "0.6423607", "0.6420766", "0.64138293", "0.63899547", "0.6377827", "0.63648427", "0.6358252", "0.63535523", "0.6276109", "0.62661535", "0.6260451", "0.6238643", "0.62222165", "0.62076956", "0.62006336", "0.61855507", "0.61769193", "0.6176909", "0.6174752", "0.6168834", "0.6164256", "0.6142934", "0.6142249", "0.6136501", "0.6130636", "0.61257195", "0.61063075", "0.61021", "0.6096072", "0.6088986", "0.6079799", "0.60782945", "0.60725117", "0.60629994", "0.6061688", "0.60612434", "0.6059666", "0.60426915", "0.60425186", "0.60389787", "0.60195714", "0.6011595", "0.6001065", "0.60005045", "0.60001194", "0.6000095", "0.59976137", "0.59878725", "0.5976328", "0.59726995", "0.5955467", "0.5954054", "0.59509754", "0.59439963", "0.5940678", "0.593964", "0.59391934", "0.59376645", "0.5928552", "0.591212", "0.59093505", "0.5907344", "0.5903315", "0.590173", "0.5900192", "0.5896694", "0.5893408", "0.58933234", "0.5891089", "0.58903086", "0.58896273", "0.58843404", "0.5878741", "0.587383", "0.587272", "0.58723307", "0.5870878", "0.5870621", "0.58693033", "0.5867237", "0.58652633", "0.58639663", "0.5849615", "0.58480215", "0.58455986", "0.5844844", "0.58445287", "0.5842893", "0.58410174" ]
0.66651857
4
check() loop through stack and see if it is in decending order
function check(stack){ for(let i = 0; i<stack.length; i++){ if(stack[i.length]>stack[i.length-1]){ } return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isBalanced()\n\t{\n\t\tvar tempStack = [];\n\t\tfor (var i = 0; i < postFixTokens.length; i++)\n\t\t{\n\t\t\tvar type = postFixTokens[i].tokenType;\n\t\t\tif (type === tree.Token.numberType || type === tree.Token.variableType)\n\t\t\t{\n\t\t\t\ttempStack.push(1);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (type === tree.Token.functionType || type === tree.Token.parenFunctionType)\n\t\t\t{\n\t\t\t\tvar opCnt = postFixTokens[i].getNumberOps();\n//\t\t\t\t//trace(postFixTokens[i].tokenValue + '. Uses: ' + opCnt + ', has: ' + tempStack.length);\n\t\t\t\tif (tempStack.length >= opCnt)\n\t\t\t\t{\n\t\t\t\t\tfor (var j = 0; j < opCnt; j++)\n\t\t\t\t\t\ttempStack.pop();\n\n\t\t\t\t\ttempStack.push(1);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n//\t\tParser.printArray();\n\t\treturn (tempStack.length === 1);\n\t}", "function isStackSorted(stack) {\n var newStack = new sortStack();\n\n while (!stack.isEmpty()) {\n newStack = stack.push();\n total += newStack;\n newStack.push(stack)\n }\n while (!newStack.isEmpty()) {\n stack = newStack.push();\n total += stack;\n stack.push(newStack)\n }\n console.log(stack)\n return stack;\n\n}", "function isBalanced(exp) {\n var myStack = new Stack();\n for (var i = 0; i < exp.length; i++) {\n if (exp[i] == '}' || exp[i] == ')' || exp[i] == ']') {\n if (myStack.isEmpty()) {\n return false;\n }\n let output = myStack.pop();\n if (\n (exp[i] == '}' && output != '{') ||\n (exp[i] == ')' && output != '(') ||\n (exp[i] == ']' && output != '[')\n ) {\n return false;\n }\n } else {\n myStack.push(exp[i]);\n }\n }\n if (myStack.isEmpty() == false) {\n return false;\n }\n return true;\n}", "checkEmptyStack(numstack)\n {\n return (this.posting[numstack-1].length===0 || this.posting[numstack-1].length===null)\n }", "function isEmpty(stack) {\n return !stack.top;\n}", "function isEmpty(stack) {\n return !stack.top;\n}", "function sortedOrNot(stack) {\n if (stack.isEmpty()) {\n return true;\n }\n let temp = stack.pop();\n let val = temp.data;\n let stackTwo = new Stack();\n let final = true;\n newStack.push(temp);\n\n while (!stack.isEmpty()) {\n temp = stackOne.pop();\n if (temp.data >= val) {\n val = temp.data;\n stackTwo.push(temp);\n } else {\n stackOne.push(temp)\n final = false;\n break;\n }\n }\n while (!stackTwo.isEmpty()) {\n stackOne.push(stackTwo.pop());\n }\n return final;\n\n}", "function isEmpty(stack) {\n if (stack.top) {\n console.log('false');\n return false;\n }\n else {\n console.log('true');\n return true;\n }\n}", "isSorted(){\n if(this.isEmpty()){\n return true;\n }\n let newStack=new Stack();\n var current = this.pop();\n while(current <this.pop()){\n newStack.push(current);\n\n }\n\n return newStack;\n\n }", "function isBalanced(s) {\n\t// Create open and close bracket arrays\n\tconst openBracket = [\"(\", \"[\", \"{\"];\n\tconst closeBracket = [\")\", \"]\", \"}\"];\n\t// Initialize stack\n\tconst stack = [];\n\t// Iterate through string\n\tfor (let i = 0; i < s.length; i++) {\n\t\t// If open bracket found\n\t\tif (openBracket.includes(s[i])) {\n\t\t\t// Add to stack\n\t\t\tstack.push(s[i]);\n\t\t\tconsole.log(`add ${s[i]} stack is ${stack}`);\n\t\t}\n\t\t// If close bracket found\n\t\tif (closeBracket.includes(s[i])) {\n\t\t\t// Verify complimentary braces\n\t\t\tif (\n\t\t\t\tcloseBracket.indexOf(s[i]) ===\n\t\t\t\topenBracket.indexOf(stack[stack.length - 1])\n\t\t\t) {\n\t\t\t\t// Remove matching open bracket from stack\n\t\t\t\tconst removeOpenBracket = stack.pop();\n\t\t\t\tconsole.log(\n\t\t\t\t\t`found close bracket ${s[i]} remove ${removeOpenBracket} stack ${stack}`\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// Terminate function\n\t\t\t\treturn \"NO\";\n\t\t\t}\n\t\t}\n\t}\n\tconsole.log(`stack is ${stack}`);\n\treturn stack.length === 0 ? \"YES\" : \"NO\";\n}", "function stackCheck(lexemes){\n\tvar errors = [];\n\tvar sequence = [];\n\twhile(lexemes.length > 0){\n\t\tvar tok = lexemes.shift();\n\t\tvar complete = tok[\"token\"];\n\t\tswitch(tok[\"tag\"]){\n\n\t\t\tdefault: console.log(tok)\n\t\t}\n\n\t}\n\n\treturn {\"seq\":sequence, \"err\":errors};\n\n}", "function executionStackPop() {\n // Calculate the and/or result.\n var stackFrame = resultStack[stackPointer];\n // Pop stack and protect against stack underflow.\n stackPointer = Math.max(0, stackPointer - 1);\n var $conditionalResults = stackFrame['results'];\n var filteredResults = $.map($conditionalResults, function (val) {\n return val ? val : null;\n });\n return stackFrame['andor'] === 'or'\n ? filteredResults.length > 0\n : filteredResults.length === $conditionalResults.length;\n }", "function checkEnd(){\n var flag = false;\n for (i=0;i<arr.length;i++){\n if (arr[i]%(level+1)===0){\n flag = true;\n }\n }\n return flag;\n}", "function executionStackPop() {\n // Calculate the and/or result.\n var stackFrame = resultStack[stackPointer];\n // Pop stack and protect against stack underflow.\n stackPointer = Math.max(0, stackPointer - 1);\n var $conditionalResults = stackFrame['results'];\n var filteredResults = $.map($conditionalResults, function(val) {\n return val ? val : null;\n });\n return stackFrame['andor'] === 'or'\n ? filteredResults.length > 0\n : filteredResults.length === $conditionalResults.length;\n }", "contains(val) {\n for (let i = 0; i < this.stack1.length; i++) {\n if (this.stack1[i] === val) {\n console.log(`The value ${val} is in the two stack queue.`);\n return true, this;\n }\n }\n console.log(`The value ${val} is not in the two stack queue.`);\n return false, this;\n }", "function shouldStackPop(token, stack) {\n var ttl = token.type.label;\n var ttk = token.type.keyword;\n var top = stack[stack.length - 1];\n return ttl == \"]\"\n || ttl == \")\"\n || ttl == \"}\"\n || (ttl == \":\" && (top == \"case\" || top == \"default\" || top == \"?\"))\n || (ttk == \"while\" && top == \"do\");\n }", "function isLegal(startStack, endStack) {\n \n var startArray = stacks[startStack];\n var endArray = stacks[endStack];\n \n if (startArray == '') {\n console.log(\"This stack is empty. Please choose again.\");\n return false;\n } else if (endArray == '') {\n return true;\n } else {\n return startArray[startArray.length - 1]\n < endArray[endArray.length - 1];\n };\n}", "function isLegal(startStack, endStack) {\n if (stacks[startStack[startStack.length - 1]] < stacks[endStack[endStack.length - 1]] || stacks[endStack].length === 0) {\n return true;\n } \n else {\n console.log(\"Invalid move. Try again.\");\n return false;\n }\n}", "function inOrderStack(root) {\n if (root === null) return;\n\n const s = new Stack();\n pushLeft(root, s); // by the time this is done, we have pushed all left items onto our stack\n while (!s.isEmpty()) {\n const current = s.pop();\n console.log(current.data);\n pushLeft(current.right, s);\n }\n}", "function solution(A, B) {\n // write your code in JavaScript (Node.js 8.9.4)\n // console.log(A);\n // console.log(B);\n\n let stack = [[A[0], B[0]]];\n const len = A.length;\n for (let i=1 ; i<len ; i++) {\n // console.log(B[i], A[i]);\n \n lastStack = stack[stack.length - 1];\n\n// console.log(\"stack\", stack);\n // console.log(\"new fish\", A[i], B[i]);\n //console.log(\"laststack\", lastStack);\n\n if(lastStack[1] === B[i]){\n \n stack.push([A[i], B[i]]);\n continue;\n }\n\n if(lastStack[1] === 1 && B[i] === 0){\n \n if(lastStack[0] > A[i]){\n \n continue;\n }else{\n\n stack.pop()\n \n\n //eat upward;\n // console.log(\"going back\")\n \n for (let k=stack.length-1 ; k>=0 ; k--) {\n // console.log(stack[k])\n\n if(B[i] === stack[k][1]){\n break;\n }\n\n if(A[i] > stack[k][0] ){\n stack.pop();\n }else{\n break;\n }\n\n \n \n }\n\n stack.push([A[i], B[i]]);\n \n\n\n }\n\n\n }\n\n if(lastStack[1] === 0 && B[i] === 1){\n stack.push([A[i], B[i]])\n }\n\n // console.log(stack);\n \n }\n\n return stack.length;\n\n\n}", "function decConsistencyCheck(inputstack){\n var isvalid = true;\n var opcheck = false;\n var abort = false;\n indicesarray = [];\n \n //find the dot indicies\n for(var k = 0; k < inputstack.length; k++){\n //alert(inputstack[k])\n if(String(inputstack[k]) == '.') {\n if((k != (inputstack.length-1))){\n if(String(inputstack[k+1]) == '.'){\n //alert(\"False in the first consistency check consecutive\");\n isvalid = false;\n abort = true;\n }\n if((k != 0) && (inputstack[k-1] in preceMap) && (inputstack[k+1] in preceMap)){\n isvalid = false;\n abort = true;\n }//checks for config like +.+\n }//end if decimals are next to each other\n indicesarray.push(k);\n }//end of index is a dot.\n }//end of filling indices array loop\n //UP TO the first dot.\n for(var m = 0; m < indicesarray[0] && !abort; m++){\n //if it's not all numbers up to the first decimal, then it's a bad expression.\n if(isNaN(inputstack[m]) && !(inputstack[m] in preceMap)){\n //alert(\"false because not number before decimal\")\n isvalid = false;\n abort = true;\n }//end of isNaN if\n }//end of UP TO FIRST check loop\n //if there is just one decimal, and there is an operator after it.\n if(indicesarray.length == 1){\n for(var v = indicesarray[0]; v < inputstack.length; v++){\n if(inputstack[v] in preceMap){\n abort = true;\n opcheck = true;\n }\n }\n }\n //now check the rest of the string at this point, you should only need to check for operators\n //between decimals\n \n while(indicesarray.length >= 1 && !abort){\n firstdot = indicesarray[0];\n //if this isn't the last dot.\n if(indicesarray.length > 1){\n seconddot = indicesarray[1];\n }\n //if this is the last dot, then go to the end of the inputstack.\n else{\n seconddot = inputstack.length -1;\n }\n if((firstdot == seconddot) && (inputstack[firstdot-1] in preceMap)){\n isvalid = false;\n }\n \n for(var l = firstdot + 1; l < seconddot && !abort; l++){\n //if there is an operator seperating decimals, that's fine.\n //tihs stems the front of the indices array before it can find anything\n if(inputstack[l] in preceMap){\n opcheck = true;\n }//end of check for operators\n }//end of for loop.\n \n if((seconddot == (inputstack.length-1)) && (indicesarray.length == 1)){\n for(var n = firstdot + 1; n < seconddot && !abort; n++){\n if((firstdot != seconddot) && (isNaN(inputstack[n]) && !(String(inputstack[n]) in preceMap))){\n isvalid = false;\n }//end of makes ure the end has all numbers or operators\n }//end of for loop that iterates through indicesarray.\n }//end if second dot is the end of the list\n indicesarray.shift();\n }//end of while loop for indices array.\n if(!opcheck){\n // alert(\"opcheck did it\");\n return false;\n }\n if(!isvalid){\n //alert(\"didn't pass consitency check isvalid false\")\n return false;\n }\n return true;\n}", "function isStackEmpty(stack){\n return !(stack.length>0);\n }", "_isStacked() {\n if (!this.$watched[0] || !this.$watched[1]) {\n return true;\n }\n return this.$watched[0].getBoundingClientRect().top !== this.$watched[1].getBoundingClientRect().top;\n }", "function isBalanced(str) {\n if (str.length < 1) return false\n const stack = []\n for (let i = 0; i < str.length; i++) {\n if (str[i] in brackets) {\n stack.push(brackets[str[i]])\n } else {\n if (stack[stack.length - 1] !== str[i]) {\n return false\n }\n stack.pop()\n }\n }\n return stack.length === 0\n}", "checkValidMove(origin, destination)\n {\n\n if(this.checkEmptyStack(origin))\n {\n return false;\n }\n else if(this.posting[origin-1][this.posting[origin-1].length-1] > this.posting[destination-1][this.posting[destination-1].length-1])//checks for big disks that are on top of smaller disks\n {\n console.log(this.posting[origin-1][this.posting[origin-1].length-1]);\n console.log(this.posting[destination-1][this.posting[destination-1].length-1]);\n return false;\n }\n else\n {\n return true;\n }\n }", "hasCycleFrom(start) {\n const stack = [{ node: start, visited: new Set([start]), lastVisited: null }];\n while (stack.length) {\n const current = stack.pop();\n for (let node of current.node.adjacent.values()) {\n if (current.lastVisited != node) {\n if (current.visited.has(node)) return true;\n else {\n const visited = new Set([...current.visited]);\n visited.add(node);\n stack.push({ node: node, visited: visited, lastVisited: current.node });\n }\n }\n }\n }\n return false;\n }", "function If_other_stack_other() {\r\n}", "function isValidScope() {\n return indicatorStack.some(item => item);\n }", "function isTopOfStack(navigation) {\n const parent = navigation.dangerouslyGetParent();\n return parent && parent.state && parent.state.index === 0;\n}", "function belongsOnStack(token) {\n var ttl = token.type.label;\n var ttk = token.type.keyword;\n return ttl == \"{\"\n || ttl == \"(\"\n || ttl == \"[\"\n || ttl == \"?\"\n || ttl == \"${\"\n || ttk == \"do\"\n || ttk == \"switch\"\n || ttk == \"case\"\n || ttk == \"default\";\n }", "function main() {\n let treky = new Stack;\n treky.push(0);\n treky.push(4);\n treky.push(1);\n treky.push(3);\n\n //treky.pop();\n // treky.pop();\n\n //treky.push(1);\n\n\n // console.log(display(treky));\n // console.log(isPalindrome('racecar'));\n // console.log(isPalindrome('A man, a plan, a canal: Panama'));\n // console.log(balanceParens('1 + 2 + (1 + 3)'));\n console.log(sortStack(treky));\n}", "function visit(g, node, stack, visited) {\n if (visited[node] == 2) {\n return true;\n } else if (visited[node] == 1) {\n return false;\n }\n visited[node] = 1;\n for (let neighbor of g[node]) {\n if (visit(g, neighbor, stack, visited) == false) {\n return false;\n }\n }\n stack.push(node);\n visited[node] = 2;\n return true;\n}", "function NEQ(state) {\n var stack = state.stack;\n var e2 = stack.pop();\n var e1 = stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'NEQ[]', e2, e1);\n }\n\n stack.push(e2 !== e1 ? 1 : 0);\n }", "function isStacked() {\n return opts.transform === \"stack\";\n }", "function isBalanced(s) {\n let newStack = new Stack;\n let openParen = null;\n let closedParen = null;\n for (let i = 0; i < s.length; i++) {\n if (s[i] === '(') {\n openParen = i;\n }\n if (s[i] === ')') {\n closedParen = i;\n }\n if (s[i] === ')' && openParen === null) {\n console.log('you need to add an opening parenthesis');\n return i;\n }\n if (s[i] === ')' && openParen !== null) {\n openParen = null;\n closedParen = null;\n // return;\n }\n while (s[i] === '(' && closedParen === null) {\n if (s[i] === ')') {\n closedParen === i;\n return i;\n // console.log('you need to add a closing parenthesis');\n }\n else {\n i++;\n }\n }\n newStack.push(s[i]);\n }\n console.log('balanced');\n}", "function chk(depth) {\n for (z in combos) {\n j = x = o = grid;\n while (j--) {\n k = combos[z][j];\n board[k] > 0 && x--;\n board[k] < 0 && o--;\n }\n if (!x) return size - depth; // x won\n if (!o) return depth - size; // o won\n }\n }", "function NEQ(state) {\n var stack = state.stack;\n var e2 = stack.pop();\n var e1 = stack.pop();\n\n if (DEBUG) console.log(state.step, 'NEQ[]', e2, e1);\n\n stack.push(e2 !== e1 ? 1 : 0);\n}", "empty(){ return this.stack.length === 0; }", "hasLoop(){\n if (this.isEmpty() || this.head.next == null) {\n return false;\n }\n let rabbit = this.head.next;\n let tortoise = this.head;\n while (rabbit != tortoise){\n if (rabbit.next == null || tortoise.next == null){\n return false;\n }\n rabbit = rabbit.next.next;\n tortoise = tortoise.next;\n }\n return true;\n }", "function inOrder_iterative(tree, index) {\n \n var stack = [];\n \n while (stack.length > 0 || !isUndefined(tree[index])) {\n if (!isUndefined(tree[index])) {\n stack.push(index);\n index = left(index);\n } else {\n index = stack.pop();\n console.log(tree[index]);\n index = right(index);\n }\n }\n}", "function contains1(val) {\n if (stack_top === -1) {\n return false;\n }\n var contains = false;\n stack_arr.forEach((stack_val) => {\n if (stack_val === val) {\n contains = true;\n }\n });\n return contains;\n }", "function parser2(exp){\n const stk = new Stack \n let positionN = null\n let positionC = null\n let positionS = null\n let counterN = 0\n let counterS = 0\n let counterC = 0\n let error = ''\n for(let i=0; i<exp.length;i++){\n if(exp[i] === '('){\n positionN = i\n stk.push(exp[i])\n counterN ++\n } \n if(exp[i] === ')'){\n \n if(stk.top == null){\n positionN = i\n console.log('missing (')\n console.log(positionN)\n return false\n }\n if(stk.top.data === '('){\n stk.pop(exp[i])\n } \n if(counterN <= 0){\n positionN = i\n console.log(positionN)\n console.log('missing (')\n return false\n }\n \n }\n if(exp[i] === '['){\n positionS = i\n stk.push(exp[i])\n counterS ++\n } \n if(exp[i] === ']'){\n if(stk.top == null){\n positionS = i\n \n console.log(positionS)\n console.log('missing [')\n return false\n }\n if(stk.top.data === '['){\n stk.pop(exp[i])\n }\n if(counterS <= 0){\n positionS = i\n console.log('missing [')\n console.log(positionS)\n return false\n }\n \n }\n if(exp[i] === '{'){\n positionC = i\n stk.push(exp[i])\n counterC ++\n } \n if(exp[i] === '}'){\n if(stk.top == null){\n positionC = i\n console.log(positionC)\n console.log('missing {')\n return false\n }\n if(stk.top.data === '{'){\n stk.pop(exp[i])\n }\n if(counterC <= 0){\n positionC = i\n console.log(positionC)\n console.log('missing {')\n return false\n }\n }\n }\n \n if(stk.top == null){\n console.log('balanced')\n return true \n } else if (stk.top.data == '('){\n console.log(positionN)\n console.log('missing )')\n return false \n }else if (stk.top.data == '['){\n console.log('missing ]')\n console.log(positionS)\n return false \n }else if (stk.top.data == '{'){\n console.log('missing }')\n console.log(positionC)\n return false \n }\n \n}", "function checkFun( pre, next ) {\n\n let trueArr = [];\n\n for ( let i = 0; i < next.length; i++ ) {\n\n for ( let j = 0; j < next.length; j++ ) {\n\n if ( pre[j] === next[i] ) {\n\n trueArr.push( true );\n\n } else {\n\n trueArr.push( false );\n\n }\n }\n }\n\n if ( trueArr[0] || trueArr[1] || trueArr[2] || trueArr[3] || trueArr[4] || trueArr[5] || trueArr[6] || trueArr[7] || trueArr[8] ) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n}", "function NEQ(state) {\n const stack = state.stack;\n const e2 = stack.pop();\n const e1 = stack.pop();\n\n if (exports.DEBUG) console.log(state.step, 'NEQ[]', e2, e1);\n\n stack.push(e2 !== e1 ? 1 : 0);\n}", "function isEmpty(stack) {\n return stack.length == 0\n}", "checkOverflow () {\n if ((this.front === 1 && this.rear === this.maxLength) || (this.front === this.rear + 1)) {\n console.log('CIRCULAR QUEUE OVERFLOW')\n return true\n }\n }", "pop() {\n if(this.array.length == 0) {\n console.log(\"Stack is empty\")\n return false\n }\n \n this.array.shift()\n }", "function possible(stack, card, takeAmount) {\n\tvar topcard = stack[stack.length - 1];\n\tif (card.suit === topcard.suit && takeAmount === 0 || \n\t\tcard.card === 0 && takeAmount === 0 || \n\t\tcard.card === topcard.card || \n\t\t(topcard.card === 0 && card.card === 2) || \n\t\t(topcard.card === 2 && card.card === 0)) \n {\n\t\treturn true;\n\t}\n\treturn false;\n}", "function isPalindromeListStack(node){\n let fast = node;\n let slow = node;\n let stack = [];\n while (fast && fast.next) {\n stack.push(slow.value);\n slow = slow.next;\n fast = fast.next.next;\n }\n\n if (fast) {\n // this means we have an odd number of letters\n slow = slow.next;\n }\n \n while (slow){\n const letter = stack.pop();\n if (letter !== slow.value) {\n return false;\n }\n slow = slow.next;\n }\n\n return true;\n}", "function is_palindrome(s) {\n s = s.toLowerCase().replace(/[^a-zA-Z0-9]/g, \"\");\n // your code goes here\n const stack = new Stack();\n for (let i = 0; i < s.length; i ++) {\n stack.push(s.charAt(i));\n }\n console.log(stack);\n for(let i = 0; i < s.length; i++) {\n if (stack.pop() !== s.charAt(i)){\n return false\n }\n }\n return true\n}", "function isStackable(disk1, disk2){\n if(disk1[0] < disk2[0] && disk1[1] < disk2[1] && disk1[2] < disk2[2]){\n return true;\n }\n return false\n}", "function display(stack) {\n let currTop = stack.top;\n\n while (currTop !== null) {\n console.log(currTop.data);\n currTop = currTop.next;\n }\n}", "function inOrder(t) {\n if (t.left) {\n inOrder(t.left)\n }\n console.log(t.key)\n if (t.right) {\n inOrder(t.right)\n }\n}", "function checkSort(arr) {\n for (var i = 1; i < arr.length-1-count; i++) {\n if (arr[i] < arr[i-1]) {\n return false;\n }\n }\n return true;\n}", "function isEmpty(stack) {\n return stack.length === 0;\n}", "function isStackEmpty()\r\n{\r\n\tif (this.intIndex == 0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "function isStack(s) {\n var pattern = /type\\s=\\sclass\\sstd::stack.*/;\n return pattern.test(s);\n}", "function _isStackEmpty()\n {\n if (this.intIndex == 0)\n return true;\n else\n return false;\n }", "function display(stack) {\n while (stack.top !== null) {\n console.log(stack.top.data);\n stack.top = stack.top.next;\n }\n}", "function checkEntry(startStack, endStack) {\n if ((startStack == 'a' || startStack == 'b' || startStack == 'c') && (endStack == 'a' || endStack == 'b' || endStack == 'c')) {\n return true;\n } else {\n console.log(\"Please enter 'a', 'b', or 'c'\");\n return false;\n }\n}", "function canStack(card) {\n var rank = card.rank;\n var stack = stacks[card.suit];\n\n // get top card of stack\n var topCard = stack[stack.length - 1];\n\n // if top card is undefined and card suit is \"A\", return true\n if (topCard === undefined) {\n if (rank == \"A\")\n return true;\n else\n return false\n }\n\n // if card next rank is equal to topCard rank then return true\n if (getNextRank(topCard.rank) == card.rank)\n return true;\n return false;\n}", "function isLoop() {\n var last = history[history.length - 1];\n for (var i = 0; i < history.length - 1; i++) {\n if (history[i] === last) {\n return true;\n }\n }\n return false;\n }", "function inOrder(tree) {\n if (!tree.value) {\n return \"not found\"\n\n }\n tree.left && inOrder(tree.left)\n console.log(tree.value)\n\n tree.right && inOrder(tree.right)\n\n\n}", "function check_next(args, next) {\n ret = a.t.call(args)\n if (ret.includes(\"is missing\") || ret.includes(\"unlocked\") || ret.includes(\"Denied\")) {\n return true\n }\n }", "function sortStack(stack) {\n let newStack = new Stack();\n\n while (!isEmpty(stack)) {\n let temp = stack.pop()\n // console.log(peek(newStack))\n while (!isEmpty(newStack) && (peek(newStack).data > temp)) {\n\n stack.push(newStack.pop())\n }\n newStack.push(temp);\n }\n console.log('string')\n console.log(display(newStack));\n}", "function checkChain (x, y) {\n var type = getTile(x, y),\n left = 0, right = 0,\n down = 0, up = 0\n\n // look right\n while (type === getTile(x + right + 1, y)) {\n right++;\n }\n // look left\n while (type === getTile(x - left - 1, y)) {\n left++;\n }\n // look up\n while (type === getTile(x, y + up + 1)) {\n up++;\n }\n // look down\n while (type === getTile(x, y - down - 1)) {\n down++; \n }\n return Math.max(left + 1 + right, up + 1 + down);\n }", "function getStack() {\n var result = [];\n for(var caller = arguments.callee.caller; caller; caller = caller.caller) {\n if (result.indexOf(caller) != -1) {\n result.push({name: \"recursive call can't be traced\"});\n break;\n }\n result.push(caller);\n };\n return result; \n}", "traverse()\n\t{\n\t\tlet done = false;\n\t\tlet pos = new Position();\n\t\tlet stack = new Stack();\n\t\tstack.push(pos);\n\n\t\twhile (!(done) && !stack.isEmpty())\n\t\t{\n\t\t\tpos = stack.pop();\n\t\t\tthis.maze.tryPosition(pos.getx(),pos.gety()); // this cell has been tried\n\t\t\tif (pos.getx() == this.maze.getRows()-1 && pos.gety() == this.maze.getColumns()-1)\n\t\t\t\tdone = true; // the maze is solved\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.pushNewPos(pos.getx() - 1,pos.gety(), stack); // position to the left\n\t\t\t\tthis.pushNewPos(pos.getx() + 1,pos.gety(), stack); // to the right\n\t\t\t\tthis.pushNewPos(pos.getx(),pos.gety() - 1, stack); // above\n\t\t\t\tthis.pushNewPos(pos.getx(),pos.gety() + 1, stack); // below\n\t\t\t}\n\t\t}\n\n\t\treturn done;\n\t}", "function allow() {\n // two value stacks and one character stack\n return numStack.length >= 2 && operatorStack.length >= 1;\n }", "equals(that) {\n if (!that || !that.stack || that.stack.length !== this.stack.length) {\n return false;\n }\n\n for (var i = 0; i < this.stack.length; i++) {\n if (this.stack[i] !== that.stack[i]) {\n return false;\n }\n }\n\n return true;\n }", "function processStack(stack,logs) {\n\twhile(stack.length > 0) {\n\t\tvar token = stack.shift();\n\t\tvar unit = token.unit;\n\t\ttoken.action(stack,logs);\n\t}\n}", "function sortStack(stack) {\n if(!stack.top.next) return stack;\n display(stack)\n let sortStack = new Stack()\n while(stack.top) {\n let temp = stack.pop()\n while(sortStack.top && sortStack.top.data > temp) {\n stack.push(sortStack.pop())\n }\n console.log(sortStack)\n sortStack.push(temp)\n }\n display(sortStack)\n return sortStack\n}", "canGoBack(deep = 1, stackId) {\n return this.stackCtrl.canGoBack(deep, stackId);\n }", "function isStackEmpty()\n{\n\tif (this.intIndex == 0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function isPalindrome(queue){\n var stack = new SLStack();\n var q;\n var s;\n var flag = true;\n var length = queue.size();\n // loop through queue, copying to stack and returning to queue\n for (var i = 1; i <= length; i++){\n q = queue.dequeue();\n stack.push(q);\n queue.enqueue(q);\n }\n // loop through both, one letter at a time and compare each letter,\n // returning each letter to queue\n for (var i = 1; i <= length; i++){\n q = queue.dequeue();\n s = stack.pop();\n if (q !== s){\n flag = false;\n }\n queue.enqueue(q);\n }\n if (flag === false){\n console.log(`Not a palindrome.`);\n }\n else {\n console.log(`Is a palidrome.`);\n }\n // queue.displayQueue(); // check if in original condition\n return flag;\n}", "function stackContains(type) {\n\t\tfor (var i=0; i<stack.length; i++) {\n\t\t\tif (stack[i].type == type) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function first_in_statement(stack) {\n var node = stack.parent(-1);\n for (var i = 0, p; p = stack.parent(i); i++) {\n if (p instanceof AST_Statement && p.body === node)\n return true;\n if ((p instanceof AST_Seq && p.car === node) ||\n (p instanceof AST_Call && p.expression === node && !(p instanceof AST_New)) ||\n (p instanceof AST_Dot && p.expression === node) ||\n (p instanceof AST_Sub && p.expression === node) ||\n (p instanceof AST_Conditional && p.condition === node) ||\n (p instanceof AST_Binary && p.left === node) ||\n (p instanceof AST_UnaryPostfix && p.expression === node)) {\n node = p;\n } else {\n return false;\n }\n }\n }", "function checkForWin() {\n let b = stacks.b;\n let c = stacks.c;\n if (b[0] === 4 && b[1] === 3 && b[2] === 2 && b[3] === 1) {\n return true;\n } else if (c[0] === 4 && c[1] === 3 && c[2] === 2 && c[3] === 1) {\n return true;\n } else {\n return false;\n }\n}", "function checkOrder(){\n\t\tif (colorOrder == inputOrder){\n\t\t\ttoArray();\n\n\t\t\tinputSequence = 0;\n\t\t\tinputOrder = [];\n\t\t\tsetTimeout(function(){\n\t\t\t\tround();\t\n\t\t\t}, 500);\n\n\t\t} else {\n\t\t\tgameFail();\n\t\t}\n\t\t\n\t}", "function verifyClosingCharacters(sequence){\n // iterate over the correct file\n for (var i = 0; i < sequence.length; i++){\n if(!(sequence[i] in opposites)){\n // it is an opening parentheses, add it to the stack\n stack.push(sequence[i]) ;\n }else{\n // it is a closing character, check if it is the same as the top of the stack.\n if(opposites[sequence[i]] === stack.peek()){\n // pop the element as they match\n stack.pop();\n }else{\n // exit the loop, as there is a missmatch\n break;\n }\n }\n }\n if (stack.isEmpty()){\n console.log(\"Todos los caracteres en el String Cierran correctamente!\")\n }else{\n // Clean the stack\n stack = new Stack();\n console.log(\"No todos los caracteres en el String cierran de manera correcta\")\n }\n}", "function NOT(state) {\n var stack = state.stack;\n var e = stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'NOT[]', e);\n }\n\n stack.push(e ? 0 : 1);\n }", "isPresent(data) {\n let current = this.root;\n\n // whille current is not null\n while (current) {\n \n if (data === current.data) {\n\n return true;\n }\n \n if (data < current.data){\n \n current = current.left;\n \n } else {\n \n current = current.right;\n }\n }\n\n return false;\n }", "function isAscOrder(arr) {\n return arr.every((num, i) => i === 0 || num >= arr[i-1]);\n}", "function nextGreaterElement2(nums) {\n let ans = []\n let stack = []\n for (let i = nums.length - 1; i >= 0; i--) {\n while (stack.length && stack[stack.length - 1] <= nums[i]) {\n stack.pop()\n }\n ans[i] = stack.length === 0 ? -1 : stack[stack.length - 1]\n stack.push(nums[i])\n }\n return ans\n}", "function checkStacking () {\n const zombie1 = document.getElementById('myZombie1');\n const zombiePerson1 = document.getElementById('myZombiePerson1');\n let compZombie1Styles = window.getComputedStyle(zombie1);\n var zombie1TopStr = compZombie1Styles.getPropertyValue('top');\n var zombie1LeftStr = compZombie1Styles.getPropertyValue('left');\n var zombie1Top = parseFloat(zombie1TopStr, 10);\n var zombie1Left = parseFloat(zombie1LeftStr, 10);\n const zombie2 = document.getElementById('myZombie2');\n const zombiePerson2 = document.getElementById('myZombiePerson2');\n let compZombie2Styles = window.getComputedStyle(zombie2);\n var zombie2TopStr = compZombie2Styles.getPropertyValue('top');\n var zombie2LeftStr = compZombie2Styles.getPropertyValue('left');\n var zombie2Top = parseFloat(zombie2TopStr, 10);\n var zombie2Left = parseFloat(zombie2LeftStr, 10);\n if (zombie1Top == zombie2Top && zombie1Left == zombie2Left) {\n if (zombie2Top < 175 && zombie2Left < 175) {\n //move down right\n zombie2.style.top = `${zombie2.offsetTop + 50}px`; //Down\n zombie2.style.left = `${zombie2.offsetLeft + 50}px`; //Right\n zombiePerson2.style.top = `${zombiePerson2.offsetTop + 50}px`; //Down\n zombiePerson2.style.left = `${zombiePerson2.offsetLeft + 50}px`; //Right\n } else if (zombie2Top < 175 && zombie2Left > 175) {\n //move down left\n zombie2.style.top = `${zombie2.offsetTop + 50}px`; //Down\n zombie2.style.left = `${zombie2.offsetLeft - 50}px`; //Left\n zombiePerson2.style.top = `${zombiePerson2.offsetTop + 50}px`; //Down\n zombiePerson2.style.left = `${zombiePerson2.offsetLeft - 50}px`; //Left\n } else if (zombie2Top > 175 && zombie2Left < 175) {\n //move up right\n zombie2.style.top = `${zombie2.offsetTop - 50}px`; //Up\n zombie2.style.left = `${zombie2.offsetLeft + 50}px`; //Right\n zombiePerson2.style.top = `${zombiePerson2.offsetTop - 50}px`; //Up\n zombiePerson2.style.left = `${zombiePerson2.offsetLeft + 50}px`; //Right\n } else if (zombie2Top > 175 && zombie2Left > 175) {\n //move up left\n zombie2.style.top = `${zombie2.offsetTop - 50}px`; //Up\n zombie2.style.left = `${zombie2.offsetLeft - 50}px`; //Left\n zombiePerson2.style.top = `${zombiePerson2.offsetTop - 50}px`; //Up\n zombiePerson2.style.left = `${zombiePerson2.offsetLeft - 50}px`; //Left\n }\n } else {\n return;\n }\n}", "function getStack() {\n var result = [];\n for(var caller = arguments.callee.caller; caller; caller = caller.caller) {\n if (result.indexOf(caller) != -1) {\n result.push({name: \"recursive call can't be traced\"});\n break;\n }\n result.push(caller);\n };\n return result;\n}", "function isBalanced(tree) {\n\tvar current = tree;\n\tif(current.left != null) {\n\t\tif(current.right == null) {\n\t\t\tif(current.left.left || current.left.right) {\n\t\t\t\tconsole.log('not balanced');\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tisBalanced(current.left);\n\t\t}\n\t}\n\tif(current.right != null) {\n\t\tif(current.left == null) {\n\t\t\tif(current.right.left || current.right.right) {\n\t\t\t\tconsole.log('not balanced');\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tisBalanced(current.right);\n\t\t}\n\t}\n}", "function isOrderUnpredictable (node) {\n while ((node = node.parent)) {\n // Special-case for IIFE, behaviour is the same as evaluating inline\n if (node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression') {\n // (() => {})()\n if (node.parent && node.parent.type === 'CallExpression' && node.parent.callee === node) {\n continue\n }\n // (function(){}).call(null)\n // this form is added by browserify to inject globals\n if (node.parent && node.parent.type === 'MemberExpression' &&\n node.parent.object === node &&\n (node.parent.property.name === 'call' || node.parent.property.name === 'apply') &&\n node.parent.parent && node.parent.parent.type === 'CallExpression') {\n continue\n }\n }\n\n // if(require('d')) is still in-order\n // the same is technically true for while(require()) and for(require();;) but those are more rare\n if (node.parent && node.parent.type === 'IfStatement' && node.parent.test === node) {\n // Skip the IfStatement\n node = node.parent\n continue\n }\n\n if (node.type === 'IfStatement' || // if(false) require()\n node.type === 'WhileStatement' || // while(false) require()\n node.type === 'ForStatement' || // for(;false;) require()\n node.type === 'ForInStatement' || // for(x in []) require()\n node.type === 'FunctionExpression' || // setTimeout(function(){ require() })\n node.type === 'FunctionDeclaration' || // function neverCalled(){ require() }\n node.type === 'ArrowFunctionExpression' // setTimeout(()=> require())\n ) {\n return true\n }\n }\n return false\n }", "function isFirstInStatement(printStack /*: Array<Object>*/) /*: boolean*/ {\n\t var i = printStack.length - 1;\n\t var node = printStack[i];\n\t i--;\n\t var parent = printStack[i];\n\t while (i > 0) {\n\t if (t.isExpressionStatement(parent, { expression: node })) {\n\t return true;\n\t }\n\n\t if (t.isCallExpression(parent, { callee: node }) || t.isSequenceExpression(parent) && parent.expressions[0] === node || t.isMemberExpression(parent, { object: node }) || t.isConditional(parent, { test: node }) || t.isBinary(parent, { left: node }) || t.isAssignmentExpression(parent, { left: node })) {\n\t node = parent;\n\t i--;\n\t parent = printStack[i];\n\t } else {\n\t return false;\n\t }\n\t }\n\n\t return false;\n\t}", "function parenthesisCheck(string){\n //iterate through string\n //push \"(\" parenthesis (only parenthesis) to stack when found\n //pop stack when \")\" found\n //if at end of string, stack has something, we have unclosed parenthesis\n //if we pop empty stack while iterating, we're missing open paren\n\n if(!string.length) return null;\n const parenStack = new Stack();\n for(let i=0; i < string.length; i++){\n if(string[i] === '(') {\n parenStack.push('(');\n }\n if(string[i] === ')') {\n if(isEmpty(parenStack)){\n console.log('you are missing a \"(\"');\n }\n parenStack.pop();\n }\n }\n if(!isEmpty(parenStack)) {\n console.log('you are missing a \")\"');\n return false;\n }\n return true;\n}", "function first_in_statement(stack) {\n let node = stack.parent(-1);\n for (let i = 0, p; p = stack.parent(i); i++) {\n if (p instanceof AST_Statement && p.body === node)\n return true;\n if ((p instanceof AST_Sequence && p.expressions[0] === node) ||\n (p.TYPE === \"Call\" && p.expression === node) ||\n (p instanceof AST_PrefixedTemplateString && p.prefix === node) ||\n (p instanceof AST_Dot && p.expression === node) ||\n (p instanceof AST_Sub && p.expression === node) ||\n (p instanceof AST_Chain && p.expression === node) ||\n (p instanceof AST_Conditional && p.condition === node) ||\n (p instanceof AST_Binary && p.left === node) ||\n (p instanceof AST_UnaryPostfix && p.expression === node)\n ) {\n node = p;\n } else {\n return false;\n }\n }\n}", "function inOrder(root){\n if (!root){\n return;\n }\n if (root){\n inOrder(root.left);\n console.log(root.value);\n inOrder(root.right);\n }\n}", "function end_loop() {\r\n\tlet frame = stack.pop();\r\n\r\n\tlet new_index = frame.index_array[frame.index_index] + frame.step;\r\n\r\n\tframe.index_array[frame.index_index] = new_index;\r\n\r\n\tif (new_index <= frame.end_value) {\r\n\t\tstack.push(frame);\r\n\t\tPC = frame.pc;\r\n\t\treturn true;\r\n\t}\r\n\telse\r\n\t\treturn false;\r\n}", "function sortStackIter(stack) {\n let tempStack = new Stack();\n let value;\n while (!stack.isEmpty()) {\n value = stack.pop();\n if (value >= tempStack.getTop()) {\n tempStack.push(value);\n } else {\n while (!tempStack.isEmpty()) {\n stack.push(tempStack.pop());\n }\n tempStack.push(value);\n }\n }\n while (!tempStack.isEmpty()) {\n stack.push(tempStack.pop());\n }\n return stack;\n}", "function isIgnored(stack) {\n // This checks whether the stack matches just one prefix.\n function prefixIgnored(prefix, stack) {\n for (var i = 0; i < prefix.length; ++i) {\n var match = stack[i].match(stackMatcher);\n if (!match\n || match[1] !== prefix[i].name || match[2] !== prefix[i].module) {\n return false;\n }\n }\n return true;\n }\n\n for (var i in module.exports.ignored) {\n if (prefixIgnored(module.exports.ignored[i], stack)) {\n return true;\n }\n }\n return false;\n}", "function isBalanced(root) {\n\n}", "function Stack() {\r\n var stack = [];\r\n stack.isEmpty = function() { return stack.length == 0; };\r\n stack.top = function() { return stack[stack.length-1]; };\r\n stack.find = function(_testfunc) { return stack[stack.indexWhere(_testfunc)]; };\r\n stack.indexWhere = function(_testfunc) { // undefined if not found\r\n for (var i = stack.length-1; i >= 0; i--) {\r\n if (_testfunc(stack[i]))\r\n return i;\r\n }\r\n };\r\n stack.unwindTo = function(_testfunc) {\r\n while (!_testfunc(stack.top()))\r\n stack.pop();\r\n return stack.top();\r\n };\r\n stack.isHere = function() {\r\n return (stack.length > 0 && stack.top().idx == hereIdx());\r\n };\r\n return stack;\r\n}", "function checkForWin() {\n if ((stacks.b.length === 4) || (stacks.c.length === 4)) {\n console.log(\"Congratulations! You Won!!!\");\n stacks = {\n a: [4, 3, 2, 1],\n b: [],\n c: []\n };\n return true;\n } else {\n return false;\n };\n}", "checkPreviousBoards (board, queue, cb) {\n if (queue.length === 1) return cb();\n let results, fireCb = false;\n\n results = queue.every((state) => {\n let boardCheck = board.equals(state.board.board); // should be false for \"no matches\"\n\n if (boardCheck === false) {\n fireCb = true;\n return true;\n }\n\n return false;\n });\n\n if (results === true) {\n return cb();\n }\n\n return results;\n }", "function check(index)\n\t{\n\t\tif(index < levels.length)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.63197976", "0.62675774", "0.61428976", "0.6068549", "0.6058617", "0.60350573", "0.59751385", "0.59582645", "0.5871965", "0.5864983", "0.5814298", "0.58098114", "0.58072037", "0.58052045", "0.5791436", "0.57875055", "0.5768824", "0.57061416", "0.57001835", "0.5685482", "0.56846285", "0.5657206", "0.56571937", "0.563937", "0.5623345", "0.5620179", "0.56189126", "0.56154066", "0.5570275", "0.5558806", "0.5536548", "0.55271786", "0.5518591", "0.55176646", "0.5516542", "0.5509086", "0.5492608", "0.5463134", "0.54556537", "0.5441864", "0.54393774", "0.54364544", "0.54276437", "0.5427429", "0.54191", "0.5412611", "0.5410037", "0.540884", "0.5392977", "0.5385989", "0.53661895", "0.53604597", "0.53477144", "0.53412694", "0.53389144", "0.53269804", "0.5322544", "0.5320433", "0.53094894", "0.5305579", "0.53031546", "0.5287004", "0.5284973", "0.5283728", "0.52778614", "0.5270355", "0.5267779", "0.52573127", "0.52552813", "0.5253545", "0.5253407", "0.5250613", "0.525026", "0.52477545", "0.524464", "0.52394444", "0.5230686", "0.5225067", "0.52209824", "0.5219704", "0.52158993", "0.5213622", "0.5212658", "0.52103233", "0.52025306", "0.51970726", "0.51885235", "0.51791584", "0.51768553", "0.5170162", "0.5166616", "0.51552916", "0.514935", "0.514498", "0.5138043", "0.5137805", "0.5135374", "0.5129233", "0.51240957", "0.51237994" ]
0.7330473
0
Watch a directory with chokidar.
function watch$(directory, opts) { return Observable.create(observer => { chokidar.watch(directory, opts) .on('all', (event, path) => observer.next({ event, path })) .on('error', error => observer.error(error)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "watch (path, delay) {\n console.log('Start watching');\n this.watcher = chokidar.watch(path + '/*.csv', {\n followSymlinks: false,\n usePolling: true,\n interval: delay,\n binaryInterval: delay\n });\n this.watcher.on('change', file => this.emit('dirwatcher:changed', fs.realpathSync(file)));\n }", "watch() {\n const watcher = this;\n fs.readdir(this.watchDir, function(err, files) {\n if (err) throw err;\n for (let index in files) {\n watcher.emit(\"process\", files[index]);\n }\n });\n }", "function addWatcher (newPath) {\n fileWatcher = chokidar.watch(newPath, {\n persistent: true,\n ignored: /(^|[/\\\\])\\../ //For .DS_Store on MacOS\n });\n // console.log(newPath)\n //Signals to setMovieFolder that a watcher exists\n isWatching = true;\n fileWatcher.on('ready', async () => {\n // Retrieve files being watched\n let watched = fileWatcher.getWatched();\n watched = watched[newPath]\n // console.log(watched)\n // Calls sync function\n await onReadySync(watched);\n fileWatcher.on('add', filePath => insertMovie(filePath));\n fileWatcher.on('unlink', filePath => removeMovie(filePath));\n fileWatcher.on('error', error => {\n console.error(`FILEWATCHER ERROR: ${error}`)\n }); \n });\n}", "function watchPresentDirectory() {\n // Node 4.0 `fs.watch` function supports the \"recursive\" option on both OSX and Windows\n // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)\n if (options === undefined) {\n if (isNode4OrLater && (process.platform === \"win32\" || process.platform === \"darwin\")) {\n options = { persistent: true, recursive: !!recursive };\n }\n else {\n options = { persistent: true };\n }\n }\n const dirWatcher = _fs.watch(directoryName, options, callback);\n dirWatcher.on(\"error\", () => {\n if (!directoryExists(directoryName)) {\n // Deleting directory\n watcher = watchMissingDirectory();\n // Call the callback for current directory\n callback(\"rename\", \"\");\n }\n });\n return dirWatcher;\n }", "watch() {\n fs.readdir(this.watchDir, (err, files) => {\n if (err) throw err;\n for (let index in files) {\n this.emit('process', files[index]);\n }\n });\n }", "_watchStart(directory)\n\t\t{\n\t\t\tlet _this = this;\n\n\t\t\tSCli.log(\"Now monitoring \\\"\" + ((directory.startsWith(\"./\"))?directory:\"./\"+directory) + \"\\\".\");\n\n\t\t\t// Add subdirectories of current directory.\n\t\t\tvar directories = _this._getDirectories(directory);\n\t\t\tfor(var i in directories)\n\t\t\t{\n\t\t\t\t// Check if directory has been ignored.\n\t\t\t\tif(_this._directoriesIgnore.indexOf(directories[i]) === -1)\n\t\t\t\t\t// Check to make sure directory does not start with a \".\".\n\t\t\t\t\tif(directories[i].indexOf(\".\") !== 0)\n\t\t\t\t\t\t_this._watchStart(path.join(directory, directories[i]));\n\t\t\t}\n\n\t\t\t// Add a watcher for the current directory.\n\t\t\t_this._addWatcher(directory);\n\t\t}", "startMonitor () {\n this.watchers.length = 0\n this.dirs.forEach((dir) => {\n let watcher\n try {\n watcher = fs.watch(path.resolve(dir.metadata.localPath), { recursive: true }, () => {\n this.dirty = true\n setTimeout(() => this.run(), 0) // start backup 3s later\n })\n } catch (e) {\n console.warn('watch file error', e)\n return\n }\n this.watchers.push(watcher)\n })\n }", "start() {\n var watcher = this;\n fs.watchFile(watchDir, function() {\n watcher.watch();\n });\n }", "function startWatcher(rootPath) {\n fs.readdir(rootPath, function (err, files) {\n if (err) {\n console.error(err);\n watcher_notification.dismiss();\n messenger.error(\n ModuleMessage.WATCHER_ERROR,\n true,\n err\n );\n process.exit(1);\n }\n //Processing each directory for watcher.\n files.forEach((item) => {\n\n if (DIR_AVOID.indexOf(item) == -1) {\n //creating full path to current file item.\n let fullPath = Path.join(rootPath, item);\n\n //stats for file to check is directory or is file.\n fs.stat(fullPath, function (error, stat) {\n if (error) {\n console.error(error);\n }\n\n //Add watcher if this is a directory.\n if (stat.isDirectory()) {\n let watcher = fs.watch(fullPath, (eventType, filename) => {\n\n if (filename) {\n if (FILE_AVOID.indexOf(filename) == -1 && !isInvalidFile(filename)) {\n let filePath = Path.join(fullPath, filename);\n\n setTimeout(function () {\n VltService.push(new PayloadModel(filePath), true);\n }, 2000);\n\n }\n }\n\n });\n WATCHERS.push(watcher);\n //Search for more directories inside current directory.\n startWatcher(fullPath);\n }\n });\n }\n\n }, this);\n\n watcher_notification.dismiss();\n });\n}", "start() {\n fs.watchFile(this.watchDir, () => {\n this.watch();\n });\n }", "watch (directory) {\n logger.debug(`Hotloading enabled, watching for code changes...`)\n\n let modules = {}\n\n chokidar.watch('./lib', {alwaysStat: true}).on('all', (event, path, stats) => {\n if (event === 'add') modules[path] = {size: stats.size}\n if (event === 'change') {\n if (modules[path].size !== stats.size) {\n logger.info(`Reloaded code for ${path}...`)\n modules[path].size = stats.size\n\n delete require.cache[path]\n }\n }\n })\n }", "watch() {\n chokidar.watch(`${this.app.cwd}/config.json`, { ignoreInitial: true }).on('all', () => this.load());\n }", "function watch(){\n //Watch for changes in json files\n gaze(path.join(process.cwd(), myOptions.watchedDir) + '/**/*.json', (err, watcher) => {\n // On changed/added/deleted\n watcher.on('all', (event, filepath) => {\n if (myOptions.logLevel>1)\n console.log(filepath + ' was ' + event);\n //If the file is a JSON (database,validation) restart the database\n if (isJSON(filepath)) {\n start(myOptions.restartMode===undefined ? 1 : myOptions.restartMode); //Reload data\n }\n });\n\n });\n}", "function watch(directory, assets, options = {}) {\n //Create a socket to listen on.\n var server = io(options.port || 7931)\n\n //Create a watcher.\n var watcher = nodeWatch(directory, {recursive: true})\n watcher.on(\"change\", (evt, file) => {\n try {\n //Change all assets to new assets.\n var newAssets = renderDirectory(directory, Object.assign({}, options, {skipCallingWatch: true}))\n for(var name in assets) { delete assets[name] }\n for(var name in newAssets) { assets[name] = newAssets[name] }\n\n //Notify.\n console.log(chalk.bold.blue(\"@adaptcharm/render:\"), chalk.yellow(\"Updated /\" + pathLib.relative(directory, file)))\n server.sockets.emit(\"changed\")\n }\n catch (e) { console.error(e) }\n })\n\n console.log(chalk.bold.blue(\"@adaptcharm/render:\"), chalk.green(\"Started watching \" + pathLib.basename(directory)))\n}", "_addWatcher(directory)\n\t\t{\n\t\t\tlet _this = this;\n\n\t\t\t_this._fsWatchers[directory] = fs.watch(directory, _this._fsWatcherOptions, function(event, filename)\n\t\t\t{\n\t\t\t\tlet filePath = path.join(directory, filename);\n\n\t\t\t\tS.utils.sDebug(event + \" \" + filePath);\n\n\t\t\t\tif(filename && _this._shouldDeploy(directory, filename))\n\t\t\t\t\t_this._deploy(directory, filename);\n\t\t\t});\n\t\t}", "watch (usePolling = false) {\n if (this.isBeingWatched) return\n const { from } = this.data\n const options = { usePolling, ignored: /(^|[\\/\\\\])\\../ }\n const switchCallback = (eventName, fromRelative) =>\n this.switchCallback(eventName, fromRelative, true)\n this.watcher = chokidar.watch(from, options).on('all', switchCallback)\n this.isBeingWatched = true\n }", "function watchArchivos(){\n watch(paths.watch,css);\n watch(paths.js,javascript)\n }", "function watchPropertiesInDirectory(directory, handler) {\n\n fs.watch(directory, function (event, filename) {\n\n if (isPropertiesFile(filename)) {\n handler(event, filename);\n }\n });\n }", "watch() {\n if (! process.argv.includes('--watch')) return;\n\n this.manualFiles.forEach(file => {\n new File(file).watch(() => {\n File.find(this.manifest.get(file))\n .rename(this.generateHashedFilePath(file))\n .write(File.find(file).read());\n\n this.prune(this.baseDir);\n });\n });\n }", "function Watcher(watchDir, processedDir) {\n this.watchDir = watchDir\n this.processedDir = processedDir\n}", "watchSourceFiles () {\n // watch add/remove of files\n this.pagesWatcher = chokidar.watch([\n '**/*.md',\n '.vuepress/components/**/*.vue'\n ], {\n cwd: this.context.sourceDir,\n ignored: ['.vuepress/**/*.md', 'node_modules'],\n ignoreInitial: true\n })\n this.pagesWatcher.on('add', target => this.handleUpdate('add', target))\n this.pagesWatcher.on('unlink', target => this.handleUpdate('unlink', target))\n }", "function addWatchers() {\n let directories = atom.project.getDirectories();\n directories.forEach((element) => {\n initWatcher(element.path);\n }, this);\n}", "function initWatcher(projectPath) {\n fs.readdir(projectPath, function (err, files) {\n if (err) {\n console.error(err);\n watcher_notification.dismiss();\n\n messenger.error(\n ModuleMessage.WATCHER_ERROR,\n true,\n err\n );\n\n process.exit(1);\n }\n\n files.forEach((item) => {\n if (DIR_AVOID.indexOf(item) == -1) {\n //creating full path to current file item.\n let fullPath = Path.join(projectPath, item);\n\n //stats for file to check is directory or is file.\n fs.stat(fullPath, function (error, stat) {\n if (stat.isDirectory() && item == Constants.DIR_JCRROOT) {\n if ( watcher_notification == undefined ) {\n watcher_notification = messenger.info(ModuleMessage.WATCHER_INFO, true);\n }\n\n startWatcher(fullPath);\n } else if (stat.isDirectory()) {\n //Recursively checking insite current directory.\n initWatcher(fullPath);\n }\n });\n }\n }, this);\n });\n}", "function taskWatcher() {\n\n console.info('\\x1b[37m', '👀 Dev-tools: watching for changes.')\n\n const chokidar = require('chokidar');\n const dirSrc = path.join(__dirname, '../src');\n\n chokidar.watch(dirSrc).on('change', path => {\n\n let extType = path.split('.').pop();\n\n if (extType === 'js') {\n\n compileECMA();\n\n } else if (extType === 'scss') {\n\n compileSCSS();\n\n }\n\n });\n\n}", "function watch() {\n browserSync.init({\n server: {\n baseDir: './public'\n }\n });\n}", "function watch() {\n gulp.watch(htmlPath + '/**/*.njk', gulp.series('html'));\n gulp.watch(stylesPath + '/**/*.scss', gulp.series('styles'));\n gulp.watch(scriptsPath + '/**/*.js', gulp.series('scripts'));\n gulp.watch(imagesPath + '/*', gulp.series('images'));\n}", "function macWatch() {\n var terminal = require('child_process').spawn('fswatch', [dirMonitored2]);\n\n terminal.stdout.on('data', function (data) {\n data = data.toString().split(\"\\n\");\n console.log('stdout: ' + data);\n sh.each ( data, function (i, file) {\n if ( sh.isFileType(file, 'js') ) {\n helper.trigger(file)\n }\n if ( sh.isFileType(file, 'html') ) {\n helper.trigger(file)\n }\n //var split = file.split(\"\");\n })\n\n });\n\n terminal.on('exit', function (code) {\n console.log('child process exited with code ' + code);\n });\n\n }", "constructor(_opts) {\n super();\n\n const opts = {};\n if (_opts) Object.assign(opts, _opts); // for frozen objects\n\n /** @type {Map<String, DirEntry>} */\n this._watched = new Map();\n /** @type {Map<String, Array>} */\n this._closers = new Map();\n /** @type {Set<String>} */\n this._ignoredPaths = new Set();\n\n /** @type {Map<ThrottleType, Map>} */\n this._throttled = new Map();\n\n /** @type {Map<Path, String|Boolean>} */\n this._symlinkPaths = new Map();\n\n this._streams = new Set();\n this.closed = false;\n\n // Set up default options.\n if (undef(opts, 'persistent')) opts.persistent = true;\n if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false;\n if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false;\n if (undef(opts, 'interval')) opts.interval = 100;\n if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300;\n if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false;\n opts.enableBinaryInterval = opts.binaryInterval !== opts.interval;\n\n // Enable fsevents on OS X when polling isn't explicitly enabled.\n if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;\n\n // If we can't use fsevents, ensure the options reflect it's disabled.\n const canUseFsEvents = FsEventsHandler.canUse();\n if (!canUseFsEvents) opts.useFsEvents = false;\n\n // Use polling on Mac if not using fsevents.\n // Other platforms use non-polling fs_watch.\n if (undef(opts, 'usePolling') && !opts.useFsEvents) {\n opts.usePolling = isMacos;\n }\n\n // Always default to polling on IBM i because fs.watch() is not available on IBM i.\n if(isIBMi) {\n opts.usePolling = true;\n }\n\n // Global override (useful for end-developers that need to force polling for all\n // instances of chokidar, regardless of usage/dependency depth)\n const envPoll = process.env.CHOKIDAR_USEPOLLING;\n if (envPoll !== undefined) {\n const envLower = envPoll.toLowerCase();\n\n if (envLower === 'false' || envLower === '0') {\n opts.usePolling = false;\n } else if (envLower === 'true' || envLower === '1') {\n opts.usePolling = true;\n } else {\n opts.usePolling = !!envLower;\n }\n }\n const envInterval = process.env.CHOKIDAR_INTERVAL;\n if (envInterval) {\n opts.interval = Number.parseInt(envInterval, 10);\n }\n\n // Editor atomic write normalization enabled by default with fs.watch\n if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;\n if (opts.atomic) this._pendingUnlinks = new Map();\n\n if (undef(opts, 'followSymlinks')) opts.followSymlinks = true;\n\n if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false;\n if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};\n const awf = opts.awaitWriteFinish;\n if (awf) {\n if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;\n if (!awf.pollInterval) awf.pollInterval = 100;\n this._pendingWrites = new Map();\n }\n if (opts.ignored) opts.ignored = arrify(opts.ignored);\n\n let readyCalls = 0;\n this._emitReady = () => {\n readyCalls++;\n if (readyCalls >= this._readyCount) {\n this._emitReady = EMPTY_FN;\n this._readyEmitted = true;\n // use process.nextTick to allow time for listener to be bound\n process.nextTick(() => this.emit(EV_READY));\n }\n };\n this._emitRaw = (...args) => this.emit(EV_RAW, ...args);\n this._readyEmitted = false;\n this.options = opts;\n\n // Initialize with proper watcher.\n if (opts.useFsEvents) {\n this._fsEventsHandler = new FsEventsHandler(this);\n } else {\n this._nodeFsHandler = new NodeFsHandler(this);\n }\n\n // You’re frozen when your heart’s not open.\n Object.freeze(opts);\n}", "function addWatch(folderPath/*absolute path*/){\n\n //read through the folder. if it contains subfolder, add watcher on those too\n _.each(fs.readdirSync(folderPath), function(filename, index){\n var abs = path.join(folderPath, filename);\n //check whether the file is a folder\n if(fs.lstatSync(abs).isDirectory()){\n addWatch(abs);\n }\n \n });\n\n var watcher = fs.watch(folderPath, _.debounce(function(event, filename){\n //absolute path for the file\n var abs = path.join(folderPath, filename);\n\n //return, if a file is not folder and not .html\n if(!watchers[abs] && !(fs.existsSync(abs) && fs.lstatSync(abs).isDirectory()) && path.extname(filename) !== '.less') return;\n\n //events\n if(fs.existsSync(abs)){//add or change\n\n //check whether the newly added file is a folder\n if(fs.lstatSync(abs).isDirectory() && !watchers[abs]){\n addWatch(abs);\n }\n doCompile((event === \"rename\") ? 'added' : 'changed', abs);\n }else{//delete\n\n //check whether the file is previously in the watchers obj\n if(watchers[abs]){\n watchers[abs].close();\n delete watchers[abs];\n }\n\n doCompile('deleted', abs);\n }\n }, 200));\n\n watchers[folderPath] = watcher;\n }", "function watch() {\n config.watch.forEach(item => {\n gulp.watch(item.globs, require(item.task));\n });\n}", "constructor(_opts) {\n super();\n\n const opts = {};\n if (_opts) Object.assign(opts, _opts); // for frozen objects\n\n /** @type {Map<String, DirEntry>} */\n this._watched = new Map();\n /** @type {Map<String, Array>} */\n this._closers = new Map();\n /** @type {Set<String>} */\n this._ignoredPaths = new Set();\n\n /** @type {Map<ThrottleType, Map>} */\n this._throttled = new Map();\n\n /** @type {Map<Path, String|Boolean>} */\n this._symlinkPaths = new Map();\n\n this._streams = new Set();\n this.closed = false;\n\n\n // Set up default options.\n if (undef(opts, 'persistent')) opts.persistent = true;\n if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false;\n if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false;\n if (undef(opts, 'interval')) opts.interval = 100;\n if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300;\n if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false;\n opts.enableBinaryInterval = opts.binaryInterval !== opts.interval;\n\n // Enable fsevents on OS X when polling isn't explicitly enabled.\n if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;\n\n // If we can't use fsevents, ensure the options reflect it's disabled.\n const canUseFsEvents = FsEventsHandler.canUse();\n if (!canUseFsEvents) opts.useFsEvents = false;\n\n // Use polling on Mac if not using fsevents.\n // Other platforms use non-polling fs_watch.\n if (undef(opts, 'usePolling') && !opts.useFsEvents) {\n opts.usePolling = process.platform === 'darwin';\n }\n\n // Global override (useful for end-developers that need to force polling for all\n // instances of chokidar, regardless of usage/dependency depth)\n const envPoll = process.env.CHOKIDAR_USEPOLLING;\n if (envPoll !== undefined) {\n const envLower = envPoll.toLowerCase();\n\n if (envLower === 'false' || envLower === '0') {\n opts.usePolling = false;\n } else if (envLower === 'true' || envLower === '1') {\n opts.usePolling = true;\n } else {\n opts.usePolling = !!envLower;\n }\n }\n const envInterval = process.env.CHOKIDAR_INTERVAL;\n if (envInterval) {\n opts.interval = parseInt(envInterval);\n }\n\n // Editor atomic write normalization enabled by default with fs.watch\n if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;\n if (opts.atomic) this._pendingUnlinks = new Map();\n\n if (undef(opts, 'followSymlinks')) opts.followSymlinks = true;\n\n if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false;\n if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};\n const awf = opts.awaitWriteFinish;\n if (awf) {\n if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;\n if (!awf.pollInterval) awf.pollInterval = 100;\n this._pendingWrites = new Map();\n }\n if (opts.ignored) opts.ignored = arrify(opts.ignored);\n\n let readyCalls = 0;\n this._emitReady = () => {\n readyCalls++;\n if (readyCalls >= this._readyCount) {\n this._emitReady = EMPTY_FN;\n this._readyEmitted = true;\n // use process.nextTick to allow time for listener to be bound\n process.nextTick(() => this.emit('ready'));\n }\n };\n this._emitRaw = (...args) => this.emit('raw', ...args);\n this._readyEmitted = false;\n this.options = opts;\n\n // Initialize with proper watcher.\n if (opts.useFsEvents) {\n this._fsEventsHandler = new FsEventsHandler(this);\n } else {\n this._nodeFsHandler = new NodeFsHandler(this);\n }\n\n // You’re frozen when your heart’s not open.\n Object.freeze(opts);\n}", "function watch() {\n // browsersync.init({\n // server: {\n // baseDir: './'\n // }\n // });\n gulp.watch('./assets/stylesheet/scss/**/*.scss', style);\n gulp.watch('./*.html').on('change', browsersync.reload);\n}", "function watch() {\n WATCHER = true;\n for (var subfolder in PATHS.assets) {\n gulp.watch(PATHS.assets[subfolder], assets);\n }\n gulp.watch(PATHS.less.watches, css);\n gulp.watch(PATHS.sass.watches, css);\n gulp.watch(PATHS.javascript.project, javascript);\n gulp.watch(PATHS.images, images);\n gulp.watch('src/components/styleguide/**', styleGuide);\n}", "async cacheDir(dirPath) {\n const allFiles = await fsp.readdir(dirPath, { withFileTypes: true });\n for (const file of allFiles) {\n const filePath = path.join(dirPath, file.name);\n if (file.isDirectory()) await this.cacheDir(filePath);\n else await this.cacheFile(filePath);\n }\n\n fs.watch(\n dirPath,\n debounce((_, f) => {\n const filePath = path.join(dirPath, f);\n this.cacheFile(filePath);\n }, 1000),\n );\n }", "watch() {\n }", "function watch() {\n gulp.watch('src/**/*', gulp.series(build, reload));\n}", "constructor(_opts) {\n super();\n\n const opts = {};\n if (_opts) Object.assign(opts, _opts); // for frozen objects\n\n /** @type {Map<String, DirEntry>} */\n this._watched = new Map();\n /** @type {Map<String, Array>} */\n this._closers = new Map();\n /** @type {Set<String>} */\n this._ignoredPaths = new Set();\n\n /** @type {Map<ThrottleType, Map>} */\n this._throttled = new Map();\n\n /** @type {Map<Path, String|Boolean>} */\n this._symlinkPaths = new Map();\n\n this._streams = new Set();\n this.closed = false;\n\n // Set up default options.\n if (undef(opts, 'persistent')) opts.persistent = true;\n if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false;\n if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false;\n if (undef(opts, 'interval')) opts.interval = 100;\n if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300;\n if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false;\n opts.enableBinaryInterval = opts.binaryInterval !== opts.interval;\n\n // Enable fsevents on OS X when polling isn't explicitly enabled.\n if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;\n\n // If we can't use fsevents, ensure the options reflect it's disabled.\n const canUseFsEvents = FsEventsHandler.canUse();\n if (!canUseFsEvents) opts.useFsEvents = false;\n\n // Use polling on Mac if not using fsevents.\n // Other platforms use non-polling fs_watch.\n if (undef(opts, 'usePolling') && !opts.useFsEvents) {\n opts.usePolling = isMacos;\n }\n\n // Global override (useful for end-developers that need to force polling for all\n // instances of chokidar, regardless of usage/dependency depth)\n const envPoll = process.env.CHOKIDAR_USEPOLLING;\n if (envPoll !== undefined) {\n const envLower = envPoll.toLowerCase();\n\n if (envLower === 'false' || envLower === '0') {\n opts.usePolling = false;\n } else if (envLower === 'true' || envLower === '1') {\n opts.usePolling = true;\n } else {\n opts.usePolling = !!envLower;\n }\n }\n const envInterval = process.env.CHOKIDAR_INTERVAL;\n if (envInterval) {\n opts.interval = Number.parseInt(envInterval, 10);\n }\n\n // Editor atomic write normalization enabled by default with fs.watch\n if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;\n if (opts.atomic) this._pendingUnlinks = new Map();\n\n if (undef(opts, 'followSymlinks')) opts.followSymlinks = true;\n\n if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false;\n if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};\n const awf = opts.awaitWriteFinish;\n if (awf) {\n if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;\n if (!awf.pollInterval) awf.pollInterval = 100;\n this._pendingWrites = new Map();\n }\n if (opts.ignored) opts.ignored = arrify(opts.ignored);\n\n let readyCalls = 0;\n this._emitReady = () => {\n readyCalls++;\n if (readyCalls >= this._readyCount) {\n this._emitReady = EMPTY_FN;\n this._readyEmitted = true;\n // use process.nextTick to allow time for listener to be bound\n process.nextTick(() => this.emit(EV_READY));\n }\n };\n this._emitRaw = (...args) => this.emit(EV_RAW, ...args);\n this._readyEmitted = false;\n this.options = opts;\n\n // Initialize with proper watcher.\n if (opts.useFsEvents) {\n this._fsEventsHandler = new FsEventsHandler(this);\n } else {\n this._nodeFsHandler = new NodeFsHandler(this);\n }\n\n // You’re frozen when your heart’s not open.\n Object.freeze(opts);\n}", "constructor(_opts) {\n super();\n\n const opts = {};\n if (_opts) Object.assign(opts, _opts); // for frozen objects\n\n /** @type {Map<String, DirEntry>} */\n this._watched = new Map();\n /** @type {Map<String, Array>} */\n this._closers = new Map();\n /** @type {Set<String>} */\n this._ignoredPaths = new Set();\n\n /** @type {Map<ThrottleType, Map>} */\n this._throttled = new Map();\n\n /** @type {Map<Path, String|Boolean>} */\n this._symlinkPaths = new Map();\n\n this._streams = new Set();\n this.closed = false;\n\n // Set up default options.\n if (undef(opts, 'persistent')) opts.persistent = true;\n if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false;\n if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false;\n if (undef(opts, 'interval')) opts.interval = 100;\n if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300;\n if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false;\n opts.enableBinaryInterval = opts.binaryInterval !== opts.interval;\n\n // Enable fsevents on OS X when polling isn't explicitly enabled.\n if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;\n\n // If we can't use fsevents, ensure the options reflect it's disabled.\n const canUseFsEvents = fseventsHandler.canUse();\n if (!canUseFsEvents) opts.useFsEvents = false;\n\n // Use polling on Mac if not using fsevents.\n // Other platforms use non-polling fs_watch.\n if (undef(opts, 'usePolling') && !opts.useFsEvents) {\n opts.usePolling = isMacos;\n }\n\n // Global override (useful for end-developers that need to force polling for all\n // instances of chokidar, regardless of usage/dependency depth)\n const envPoll = process.env.CHOKIDAR_USEPOLLING;\n if (envPoll !== undefined) {\n const envLower = envPoll.toLowerCase();\n\n if (envLower === 'false' || envLower === '0') {\n opts.usePolling = false;\n } else if (envLower === 'true' || envLower === '1') {\n opts.usePolling = true;\n } else {\n opts.usePolling = !!envLower;\n }\n }\n const envInterval = process.env.CHOKIDAR_INTERVAL;\n if (envInterval) {\n opts.interval = Number.parseInt(envInterval, 10);\n }\n\n // Editor atomic write normalization enabled by default with fs.watch\n if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;\n if (opts.atomic) this._pendingUnlinks = new Map();\n\n if (undef(opts, 'followSymlinks')) opts.followSymlinks = true;\n\n if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false;\n if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};\n const awf = opts.awaitWriteFinish;\n if (awf) {\n if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;\n if (!awf.pollInterval) awf.pollInterval = 100;\n this._pendingWrites = new Map();\n }\n if (opts.ignored) opts.ignored = arrify(opts.ignored);\n\n let readyCalls = 0;\n this._emitReady = () => {\n readyCalls++;\n if (readyCalls >= this._readyCount) {\n this._emitReady = EMPTY_FN$2;\n this._readyEmitted = true;\n // use process.nextTick to allow time for listener to be bound\n process.nextTick(() => this.emit(EV_READY));\n }\n };\n this._emitRaw = (...args) => this.emit(EV_RAW, ...args);\n this._readyEmitted = false;\n this.options = opts;\n\n // Initialize with proper watcher.\n if (opts.useFsEvents) {\n this._fsEventsHandler = new fseventsHandler(this);\n } else {\n this._nodeFsHandler = new nodefsHandler(this);\n }\n\n // You’re frozen when your heart’s not open.\n Object.freeze(opts);\n}", "function listenVolume() {\n watch(\"./data\", {recursive: true}, function (evt, name) {\n console.warn({evt, name}, \"watchFile\");\n if (evt == \"remove\") {\n queueListRemove(name);\n } else {\n queueListAdd(name);\n }\n })\n}", "function watch() {\n\n //set base directory for browsersync\n browserSync.init({\n server: {\n baseDir: \"src\",\n index: \"/index.html\"\n }\n }\n\n );\n\n //define our watch tasks\n gulp.watch(['node_modules/bootstrap/scss/bootstrap.scss', 'src/scss/*.scss'], style);\n gulp.watch('src/*.html').on('change', browserSync.reload);\n gulp.watch('src/js/*.js').on('change', browserSync.reload);\n\n\n}", "function watch() {\n gulp.watch(watchFiles, ['test']);\n}", "function loadAndWatchFolders() {\n read(function (err, loadedSettings){\n if (err) {\n console.error(err);\n return;\n }\n // if settings were correctly loaded\n console.log('Configuration loaded successfully: ' + loadedSettings);\n var pathsToWatch = [];\n // if there's any watched folder loaded from the settings\n if (loadedSettings.length>1) {\n // for each watched folder\n for (var i=0; i<loadedSettings.length-1; i++) {\n // add one tray menu entry\n trayMenu.addWatchedFolder(i);\n // get every paths loaded\n pathsToWatch.push(loadedSettings[i]['path']);\n }\n }\n // make sure we reset watched folders (if any)\n watch.stop();\n // and watch paths\n watch.start(pathsToWatch);\n });\n}", "function FSWatcher(_opts) {\n EventEmitter.call(this);\n var opts = {};\n // in case _opts that is passed in is a frozen object\n if (_opts) for (var opt in _opts) opts[opt] = _opts[opt];\n this._watched = Object.create(null);\n this._closers = Object.create(null);\n this._ignoredPaths = Object.create(null);\n Object.defineProperty(this, '_globIgnored', {\n get: function() { return Object.keys(this._ignoredPaths); }\n });\n this.closed = false;\n this._throttled = Object.create(null);\n this._symlinkPaths = Object.create(null);\n\n function undef(key) {\n return opts[key] === undefined;\n }\n\n // Set up default options.\n if (undef('persistent')) opts.persistent = true;\n if (undef('ignoreInitial')) opts.ignoreInitial = false;\n if (undef('ignorePermissionErrors')) opts.ignorePermissionErrors = false;\n if (undef('interval')) opts.interval = 100;\n if (undef('binaryInterval')) opts.binaryInterval = 300;\n if (undef('disableGlobbing')) opts.disableGlobbing = false;\n this.enableBinaryInterval = opts.binaryInterval !== opts.interval;\n\n // Enable fsevents on OS X when polling isn't explicitly enabled.\n if (undef('useFsEvents')) opts.useFsEvents = !opts.usePolling;\n\n // If we can't use fsevents, ensure the options reflect it's disabled.\n if (!FsEventsHandler.canUse()) opts.useFsEvents = false;\n\n // Use polling on Mac if not using fsevents.\n // Other platforms use non-polling fs.watch.\n if (undef('usePolling') && !opts.useFsEvents) {\n opts.usePolling = process.platform === 'darwin';\n }\n\n // Global override (useful for end-developers that need to force polling for all\n // instances of chokidar, regardless of usage/dependency depth)\n var envPoll = process.env.CHOKIDAR_USEPOLLING;\n if (envPoll !== undefined) {\n var envLower = envPoll.toLowerCase();\n\n if (envLower === 'false' || envLower === '0') {\n opts.usePolling = false;\n } else if (envLower === 'true' || envLower === '1') {\n opts.usePolling = true;\n } else {\n opts.usePolling = !!envLower\n }\n }\n var envInterval = process.env.CHOKIDAR_INTERVAL;\n if (envInterval) {\n opts.interval = parseInt(envInterval);\n }\n\n // Editor atomic write normalization enabled by default with fs.watch\n if (undef('atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;\n if (opts.atomic) this._pendingUnlinks = Object.create(null);\n\n if (undef('followSymlinks')) opts.followSymlinks = true;\n\n if (undef('awaitWriteFinish')) opts.awaitWriteFinish = false;\n if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};\n var awf = opts.awaitWriteFinish;\n if (awf) {\n if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;\n if (!awf.pollInterval) awf.pollInterval = 100;\n\n this._pendingWrites = Object.create(null);\n }\n if (opts.ignored) opts.ignored = arrify(opts.ignored);\n\n this._isntIgnored = function(path, stat) {\n return !this._isIgnored(path, stat);\n }.bind(this);\n\n var readyCalls = 0;\n this._emitReady = function() {\n if (++readyCalls >= this._readyCount) {\n this._emitReady = Function.prototype;\n this._readyEmitted = true;\n // use process.nextTick to allow time for listener to be bound\n process.nextTick(this.emit.bind(this, 'ready'));\n }\n }.bind(this);\n\n this.options = opts;\n\n // You’re frozen when your heart’s not open.\n Object.freeze(opts);\n}", "function FSWatcher(_opts) {\n EventEmitter.call(this);\n var opts = {};\n // in case _opts that is passed in is a frozen object\n if (_opts) for (var opt in _opts) {\n opts[opt] = _opts[opt];\n }this._watched = Object.create(null);\n this._closers = Object.create(null);\n this._ignoredPaths = Object.create(null);\n Object.defineProperty(this, '_globIgnored', {\n get: function get() {\n return Object.keys(this._ignoredPaths);\n }\n });\n this.closed = false;\n this._throttled = Object.create(null);\n this._symlinkPaths = Object.create(null);\n\n function undef(key) {\n return opts[key] === undefined;\n }\n\n // Set up default options.\n if (undef('persistent')) opts.persistent = true;\n if (undef('ignoreInitial')) opts.ignoreInitial = false;\n if (undef('ignorePermissionErrors')) opts.ignorePermissionErrors = false;\n if (undef('interval')) opts.interval = 100;\n if (undef('binaryInterval')) opts.binaryInterval = 300;\n if (undef('disableGlobbing')) opts.disableGlobbing = false;\n this.enableBinaryInterval = opts.binaryInterval !== opts.interval;\n\n // Enable fsevents on OS X when polling isn't explicitly enabled.\n if (undef('useFsEvents')) opts.useFsEvents = !opts.usePolling;\n\n // If we can't use fsevents, ensure the options reflect it's disabled.\n if (!FsEventsHandler.canUse()) opts.useFsEvents = false;\n\n // Use polling on Mac if not using fsevents.\n // Other platforms use non-polling fs.watch.\n if (undef('usePolling') && !opts.useFsEvents) {\n opts.usePolling = process.platform === 'darwin';\n }\n\n // Global override (useful for end-developers that need to force polling for all\n // instances of chokidar, regardless of usage/dependency depth)\n var envPoll = process.env.CHOKIDAR_USEPOLLING;\n if (envPoll !== undefined) {\n var envLower = envPoll.toLowerCase();\n\n if (envLower === 'false' || envLower === '0') {\n opts.usePolling = false;\n } else if (envLower === 'true' || envLower === '1') {\n opts.usePolling = true;\n } else {\n opts.usePolling = !!envLower;\n }\n }\n var envInterval = process.env.CHOKIDAR_INTERVAL;\n if (envInterval) {\n opts.interval = parseInt(envInterval);\n }\n\n // Editor atomic write normalization enabled by default with fs.watch\n if (undef('atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;\n if (opts.atomic) this._pendingUnlinks = Object.create(null);\n\n if (undef('followSymlinks')) opts.followSymlinks = true;\n\n if (undef('awaitWriteFinish')) opts.awaitWriteFinish = false;\n if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};\n var awf = opts.awaitWriteFinish;\n if (awf) {\n if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;\n if (!awf.pollInterval) awf.pollInterval = 100;\n\n this._pendingWrites = Object.create(null);\n }\n if (opts.ignored) opts.ignored = arrify(opts.ignored);\n\n this._isntIgnored = function (path, stat) {\n return !this._isIgnored(path, stat);\n }.bind(this);\n\n var readyCalls = 0;\n this._emitReady = function () {\n if (++readyCalls >= this._readyCount) {\n this._emitReady = Function.prototype;\n this._readyEmitted = true;\n // use process.nextTick to allow time for listener to be bound\n process.nextTick(this.emit.bind(this, 'ready'));\n }\n }.bind(this);\n\n this.options = opts;\n\n // You’re frozen when your heart’s not open.\n Object.freeze(opts);\n}", "_watch(subscription, root) {\n return new Promise((resolve, reject) => {\n let watcherInfo = this._getWatcherInfo(subscription);\n\n if (this._relative_root) {\n this._client.command(['watch-project', root], (error, resp) => {\n if (error) {\n reject(error);\n } else {\n watcherInfo.root = resp.watch;\n watcherInfo.relativePath = resp.relative_path\n ? resp.relative_path\n : '';\n resolve(resp);\n }\n });\n } else {\n this._client.command(['watch', root], (error, resp) => {\n if (error) {\n reject(error);\n } else {\n watcherInfo.root = root;\n watcherInfo.relativePath = '';\n resolve(resp);\n }\n });\n }\n });\n }", "function watch() {\n gulp.watch(paths.stylusWatch, gulp.series('css'));\n gulp.watch(paths.pugWatch, gulp.series('html'));\n}", "watchUserConfig () {\n this.watchFiles = [\n '.vuepress/config.js',\n '.vuepress/config.yml',\n '.vuepress/config.toml'\n ].concat(\n (\n this.context.siteConfig.extraWatchFiles || []\n ).map(file => normalizeWatchFilePath(file, this.context.sourceDir))\n )\n\n logger.debug('watchFiles', this.watchFiles)\n\n this.configWatcher = chokidar.watch(this.watchFiles, {\n cwd: this.context.sourceDir,\n ignoreInitial: true\n })\n\n this.configWatcher.on('change', target => this.handleUpdate('change', target))\n }", "function watchBuild () {\n watch('build/**/*', series(xar, installXar))\n}", "function watch() {\n gulp.watch(config.styles.srcDir, styles);\n gulp.watch(config.scripts.admin, adminscripts);\n \n // Reload browsersync when PHP files change, if active\n if (config.browserSync.active) {\n gulp.watch('./**/*.php', browserSyncReload);\n }\n}", "function watch() {\n gulp.watch(paths.lessWatch, css);\n gulp.watch(paths.pug, html);\n gulp.watch(paths.js, js);\n}", "function watchMe(done) {\n watch('dev/**/*.{html,scss}', exports.compileCode);\n watch('dev/**/*.{png,jpg,jpeg,gif}', exports.img);\n watch('dev/**/*').on('all', fileSync);\n $.browserSync.reload({ stream: true });\n done();\n}", "function watchFiles() {\n gulp.watch('src/scss/**/*.scss', css);\n gulp.watch('src/pages/**/*.html', html);\n gulp.watch('src/templates/**/*.html', html);\n gulp.watch('app/*.html', browserSyncReload);\n gulp.watch('src/js/**/*.js', js);\n gulp.watch('app/js/**/*.js', browserSyncReload);\n}", "function watch() {\n browserSync.init({\n // Tell browser to use thos directory and serve it as a mini-server\n server: {\n baseDir: \"./build\"\n }\n });\n\n style();\n\n gulp.watch(paths.styles.src, style);\n\n // Tell gulp which files to watch to trigger the reload\n // This can be html or whatever you're using to develop your website\n gulp.watch(paths.html.src).on('change', browserSync.reload);\n}", "function watch() {\r\n\tgulp.watch(CONF.PATHS.assets, copy);\r\n\tgulp.watch(SRC + '/assets/scss/**/*.scss', gulp.series(sass, renamecss, reload, dir))\r\n\t\t.on('change', path => log('File ' + colors.bold(colors.magenta(path)) + ' changed.'))\r\n\t\t.on('unlink', path => log('File ' + colors.bold(colors.magenta(path)) + ' was removed.'));\r\n\tgulp.watch(CONF.PATHS.main + '/**/*.{php,twig}', reload)\r\n\t\t.on('change', path => {\r\n\t\t\tlog('File ' + colors.bold(colors.magenta(path)) + ' changed.');\r\n\t\t\tcopyfile(path);\r\n\t\t})\r\n\t\t.on('unlink', path => {\r\n\t\t\tremovefile(path);\r\n\t\t})\r\n\tgulp.watch(SRC + '/assets/images/**/*', gulp.series(images, reload));\r\n\t//gulp.watch(SRC + '/assets/js/**/*.js').on('all', gulp.series(webpack.watch, reload));\r\n\t//vorher: gulp.series(webpack.watch, reload));\r\n\tgulp.watch(SRC + '/assets/js/**/*.js').on('all', gulp.series(javascript, reload));\r\n}", "function watch(){\n\n browser_Sync.init({\n server: {\n baseDir: \"app\"\n }\n });\n\n gulp.watch('app/*.html').on('change', browser_Sync.reload);\n gulp.watch('app/assets/css/**/*.css', styles_files);\n gulp.watch('app/assets/js/**/*.js', scripts_files);\n\n\n}", "_startWatchingCradle () {\n this._cradlePin.watch((err, value) => {\n if (!err) {\n console.log('[IO] CRADLE ' + (value ? 'UP' : 'DOWN'))\n this.emit('cradle', value)\n } else {\n console.log('[IO] ERROR: ', err)\n }\n })\n }", "function watchingJS(cb) {\n watch(watchedJS, buildJS);\n cb();\n}", "function scan() {\r\n // harvest any new images\r\n let num = scanDirectory(watch_dir, output_dir);\r\n\r\n // if we harvested any images, output to console\r\n if (num > 0) {\r\n console.log(`${num} files copied. Sleeping for ${timer_interval} seconds.`);\r\n }\r\n // update config file on disk with last scan time\r\n writeConfig();\r\n // set callback for next timeout\r\n ticker = Timers.setTimeout(scan, timer_interval * 1000);\r\n return ticker;\r\n}", "function _watch() {\r\n\r\n browserSync.init({\r\n notify: false,\r\n \r\n server: paths.dist\r\n });\r\n gulp.watch(paths.src_fonts, _fonts); \r\n gulp.watch('.'+paths.src_js+'**/*.js', _js)\r\n gulp.watch(paths.src_html,_html)\r\n gulp.watch(paths.src_images,_images)\r\n gulp.watch(paths.sub_scss, _sass_to_css) \r\n gulp.watch(paths.dist_html).on('change', browserSync.reload);\r\n \r\n}", "function watch() {\n gulp.watch(['packages/**/*', 'app/**/*'], gulp.series(['build', 'docs:build']))\n}", "function watchAll(){\n browserSync();\n convertToCSS();\n watch('src/*.html').on('change', browserAsync.reload);\n watch('src/scss/*.scss', series(convertToCSS)).on('change', browserAsync.reload);\n watch('src/js/*.js').on('change', browserAsync.reload);\n}", "function watchFiles() {\n gulp.watch(paths.html.src, gulp.series(html, reload));\n gulp.watch([paths.styles.src, `!${paths.styles.cssDest}/**/*.*`], gulp.series(styles, reload));\n gulp.watch(paths.scripts.src, gulp.series(scripts, reload));\n gulp.watch(paths.images.src, gulp.series(images, reload));\n}", "function watch() {\n gulp.watch([IOWA.appDir + '/**/*.html'], reload);\n gulp.watch([IOWA.appDir + '/{elements,styles}/**/*.{scss,css}'], ['sass', reload]);\n gulp.watch([IOWA.appDir + '/scripts/**/*.js'], ['jshint']);\n gulp.watch([IOWA.appDir + '/images/**/*'], reload);\n gulp.watch([IOWA.appDir + '/bower.json'], ['bower']);\n gulp.watch(dataWorkerScripts, ['generate-data-worker-dev']);\n}", "function FSWatcher(_opts) {\n EventEmitter.call(this);\n var opts = {}; // in case _opts that is passed in is a frozen object\n\n if (_opts) for (var opt in _opts) opts[opt] = _opts[opt];\n this._watched = Object.create(null);\n this._closers = Object.create(null);\n this._ignoredPaths = Object.create(null);\n Object.defineProperty(this, '_globIgnored', {\n get: function () {\n return Object.keys(this._ignoredPaths);\n }\n });\n this.closed = false;\n this._throttled = Object.create(null);\n this._symlinkPaths = Object.create(null);\n\n function undef(key) {\n return opts[key] === undefined;\n } // Set up default options.\n\n\n if (undef('persistent')) opts.persistent = true;\n if (undef('ignoreInitial')) opts.ignoreInitial = false;\n if (undef('ignorePermissionErrors')) opts.ignorePermissionErrors = false;\n if (undef('interval')) opts.interval = 100;\n if (undef('binaryInterval')) opts.binaryInterval = 300;\n if (undef('disableGlobbing')) opts.disableGlobbing = false;\n this.enableBinaryInterval = opts.binaryInterval !== opts.interval; // Enable fsevents on OS X when polling isn't explicitly enabled.\n\n if (undef('useFsEvents')) opts.useFsEvents = !opts.usePolling; // If we can't use fsevents, ensure the options reflect it's disabled.\n\n if (!FsEventsHandler.canUse()) opts.useFsEvents = false; // Use polling on Mac if not using fsevents.\n // Other platforms use non-polling fs.watch.\n\n if (undef('usePolling') && !opts.useFsEvents) {\n opts.usePolling = process.platform === 'darwin';\n } // Global override (useful for end-developers that need to force polling for all\n // instances of chokidar, regardless of usage/dependency depth)\n\n\n var envPoll = undefined;\n\n if (envPoll !== undefined) {\n var envLower = envPoll.toLowerCase();\n\n if (envLower === 'false' || envLower === '0') {\n opts.usePolling = false;\n } else if (envLower === 'true' || envLower === '1') {\n opts.usePolling = true;\n } else {\n opts.usePolling = !!envLower;\n }\n }\n\n var envInterval = undefined;\n\n if (envInterval) {\n opts.interval = parseInt(envInterval);\n } // Editor atomic write normalization enabled by default with fs.watch\n\n\n if (undef('atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;\n if (opts.atomic) this._pendingUnlinks = Object.create(null);\n if (undef('followSymlinks')) opts.followSymlinks = true;\n if (undef('awaitWriteFinish')) opts.awaitWriteFinish = false;\n if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};\n var awf = opts.awaitWriteFinish;\n\n if (awf) {\n if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;\n if (!awf.pollInterval) awf.pollInterval = 100;\n this._pendingWrites = Object.create(null);\n }\n\n if (opts.ignored) opts.ignored = arrify(opts.ignored);\n\n this._isntIgnored = function (path, stat) {\n return !this._isIgnored(path, stat);\n }.bind(this);\n\n var readyCalls = 0;\n\n this._emitReady = function () {\n if (++readyCalls >= this._readyCount) {\n this._emitReady = Function.prototype;\n this._readyEmitted = true; // use process.nextTick to allow time for listener to be bound\n\n process.nextTick(this.emit.bind(this, 'ready'));\n }\n }.bind(this);\n\n this.options = opts; // You’re frozen when your heart’s not open.\n\n Object.freeze(opts);\n}", "_watch(target, recurse) {\n let start,\n jsFileRE = /[\\w_$-]+\\.(js|jsx|ts)/,\n watchCB\n\n// Configure http and socket communications....\n this._configureHTTP()\n\n// Start the server...\n this._igniteServer(\n process.env.PORT || this.options.watchOpts.port || app.get('port')\n )\n\n watchCB =(fn, pass=false)=> {\n/// If the changed file is valid....\n if (pass || this._validFileName(fn)) {\n// Get start time.....\n start = Date.now()\n\n// Roll up a new bundle....\n this._bundleFiles(this.entryFile, ()=> {\n// Send message via websocket to browser...\n io.emit('file-change', { file: fn })\n })\n// Stop the timer and subtract start time to get elapsed bundle time....\n this.ms = Date.now() - start\n// Stop the spinner with success....\n this.spinner.succeed('🗞')\n }\n }\n\n if (jsFileRE.test(target)) {\n // log('TARGET', 'magenta');log(target)\n// watch the target directory for file changes....\n fs.watchFile(target, (curr, prev)=> {\n// Execute cb.......\n watchCB(target, true)\n })\n } else {\n/// watch the root directory for file changes....\n fs.watch(target, {recursive: recurse}, (event, fileName)=> {\n // log('FILENAME', ['red', 'bold']);log(fileName);log(fileName.includes(this.outputFile));\n// Execute cb.......\n watchCB(fileName)\n })\n }\n }", "function watch(){\n\tbrowserSync.init({\n server: {\n baseDir: \"./dist\"\n },\n\t\ttunnel:true\n });\n gulp.watch('./src/scss/**/*.scss', sass);\n gulp.watch('./src/css/**/*.css', styles);\n gulp.watch('./src/js/**/*.js', script);\n gulp.watch('./src/*.html', html);\n}", "function watchFiles() {\n gulp.watch(paths.scripts.src, scripts);\n gulp.watch(paths.styles.src, styles);\n gulp.watch(paths.html.src, html);\n}", "function watch() {\n gulp.watch(\n [\n pathConfig.move[0].src,\n pathConfig.move[0].exclude[0],\n pathConfig.move[0].exclude[1],\n pathConfig.move[0].exclude[2]\n ],\n move\n );\n gulp.watch(\n [\n pathConfig.img[0].src,\n pathConfig.img[0].exclude[0]\n ],\n img\n );\n gulp.watch(\n \"./src/img/vector/\",\n svgSprite\n );\n gulp.watch(\n [\n pathConfig.js[0].src,\n pathConfig.js[1].src\n ],\n js\n );\n gulp.watch(\n [\n pathConfig.css[0].src,\n pathConfig.css[1].src\n ],\n css\n );\n}", "function watch() {\n browserSync.init({\n server: {\n baseDir: \"./src/\",\n index: \"prototype.html\"\n }\n });\n // CSS\n gulp.watch('./src/Styles/**/*.scss', styles);\n // HTML\n gulp.watch('./src/Components/**/*.html', include);\n //gulp.watch('./src/**/*.html').on('change', browserSync.reload);\n // JS\n gulp.watch('./src/Scripts/src/**/*.js', scripts);\n // IMAGES\n //gulp.watch('./src/Images/src/**/*.*', images); // *Optional\n // SVG\n // gulp.watch('./src/Images/src/**/*.svg', svgo); // *Optional\n}", "function watch()\n{\n\tgulp.watch('/index.html', copyHtml);\n\tgulp.watch('img/*', copyImgs);\n\tgulp.watch('css/*.css', styles);\n\tgulp.watch('/js/*.js', scripts);\n}", "function watch() {\n gulp.watch(PATHS.assets, copy);\n gulp.watch('src/styles/**/*.scss').on('all', sass);\n gulp.watch('src/scripts/**/*.js').on('all', gulp.series(javascript));\n gulp.watch('src/images/**/*').on('all', gulp.series(images));\n}", "function watchFiles() {\n\tsync.init({\n\t\topen: 'external',\n\t\tproxy: localsite,\n\t\tport: 8080\n\t});\t\n\n\t//watch for scss file changes\n\twatch(watchCss, buildCSS);\n\t//watch for js file changes\n\twatch(watchJs, series(cleanJS, parallel(buildVarsJS, buildsXHRJS, buildJS), concatJS, parallel(removeJssxhrResidue, removeJsvarsResidue, removeJsResidue)));\n\t//reload browser once changes are made\n\twatch([\n\t\tcssDest + cssOut,\n\t\tjsDest + jsOut,\n\t\twatchPhp \n\t\t]).on('change', sync.reload);\n}", "function watch() {\n gulp.watch(PATHS.nodejs, copyBackend);\n gulp.watch(PATHS.views, copyViews);\n gulp.watch('static/fonts/**/*', copyFonts);\n gulp.watch('scss/**/*.scss').on('all', gulp.series(sass));\n gulp.watch('static/js/**/*.js').on('all', gulp.series(javascript));\n gulp.watch('static/img/**/*').on('all', gulp.series(images));\n}", "function watchFiles(srcDirectory, distDirectory) {\n var transpiler = javascripts.getTranspiler(srcDirectory, distDirectory, isAllowed, babelOptions, browserifyOptions);\n \n function processFile(filename, stats) {\n if (!isAllowed(filename)) return;\n \n var isClientFile = clientFile.test(filename);\n var callback;\n \n if (isClientFile) {\n callback = function() {};\n } else {\n server.stop();\n callback = server.start;\n }\n transpiler.transpile(filename, [], callback);\n }\n \n watch.createMonitor(srcDirectory, Object.assign({}, watchOptions), function(monitor) {\n monitor.on('created', processFile);\n monitor.on('changed', processFile);\n monitor.on('removed', (filename, stats) => {\n if (clientFile.test(filename)) {\n transpiler.delete(filename);\n transpiler.bundle(clientEntryPoint, bundlePath);\n } else {\n server.stop();\n transpiler.delete(filename, server.start);\n }\n });\n });\n // start server\n}", "function watchFiles() {\r\n gulp.watch('src/scss/**/*.scss', css);\r\n gulp.watch('src/js/**/*.js', scripts);\r\n gulp.watch('src/img/**/*.{jpg,png,gif,svg}', images);\r\n gulp.watch('src/img/**/*.pdf', pdfs);\r\n gulp.watch('src/vid/**/*.{mov,webm,mp4}', videos);\r\n gulp.watch(\r\n [\r\n '*.html',\r\n '*.yml',\r\n '_includes/**/*',\r\n '_layouts/**/*',\r\n '_pages/**/*',\r\n '_posts/**/*',\r\n '_data/**.*+(yml|yaml|csv|json)' \r\n ],\r\n gulp.series(jekyll, browserSyncReload)\r\n );\r\n}", "function watchTask() {\n watch(\"./src/html/**/*.+(html|njk)\", series(htmlComp, browsersyncReload));\n watch([\"./src/css/**/*.css\"], series(cssComp, browsersyncReload));\n watch([\"./src/js/**/*.js\"], series(jsComp, browsersyncReload));\n watch([\"./src/images/**/*.+(png|jpg|gif|svg)\"], series(imageminComp, browsersyncReload));\n}", "function Watcher(config) {\n // 5 ms\n this.frequency = 5;\n config = config || {};\n this.recursive = config.recursive || true;\n\n // /^$/ match empty string\n this.ignore = config.ignore || /^$/;\n // default is unlimited\n this.maxdeep = config.deep || Infinity;\n this._currentDeep = 0;\n this.emitter = new events.EventEmitter();\n}", "init() {\n const globs = _.union(this.globs.include, this.globs.ignore.map(val => `!${val}`));\n const watcher = chokidar.watch(globs, { persistent: true });\n // let watcherReady = false;\n\n watcher\n .on('error', error => this.sqz.cli.log.error(error))\n .on('change', () => {\n this.compile();\n });\n }", "function watch() {\n gulp.watch('./src/assets/**/*.*', copy);\n gulp.watch('./src/sass/**/*.scss', sass);\n gulp.watch('./src/**/*.html')\n .on('all', gulp.series(resetPages, pages, browser.reload));\n gulp.watch('./src/scripts/**/*.js', gulp.series(javascript, browser.reload));\n}", "function Monitor(directory, timeout) {\n this.self = this;\n this.dir = directory;\n this._files = [];\n this._timeout = timeout === undefined ? 120000 : timeout;\n}", "function watchFiles(){\n gulp.watch('scss/*.scss', css);\n //funciones para correr en paralelo\n gulp.watch('index.html');\n\n}", "function setMovieFolder(newPath, oldPath) {\n if (isWatching === false) {\n addWatcher(newPath);\n } else {\n fileWatcher.close()\n addWatcher(newPath)\n }\n}", "function watch() {\n\tserverInit();\n\tgulp.watch(\"./app/scss/*.scss\", cssHandler);\n\tgulp.watch(\"./app/pug/*.pug\", htmlHandler);\n\tgulp.watch(\"./app/js/*.js\", jsHandler);\n}", "function watchFiles() {\n gulp.watch(paths.scripts.src, scripts);\n gulp.watch(paths.styles.src, styles);\n}", "function watch() {\r\n\tgulp.watch( paths.scss.src, styles );\r\n\tgulp.watch( [ paths.js.src, paths.php.src ], browserSyncReload );\r\n}", "function watch() {\r\n\tsassy();\r\n\r\n\tgulp.watch(sassFiles, sassy)\r\n\tgulp.watch([\r\n\t\t'./source/scss/**/*.scss',\r\n\t])\r\n}", "watch() {\n // Update HTML on each markdown change\n helper.watch('./src/*.md', filepath => {\n this.compile(filepath);\n });\n // Rebuild everything when a layout, include or data changes\n helper.watch(\n [\n './src/_layouts/*.pug',\n './src/_includes/*.pug',\n './src/_mixins/*.pug',\n './src/_data.json',\n ],\n () => {\n this.run();\n }\n );\n }", "function watchTask(){\n\n watch([files.scssPath], parallel(scssTask, browserSyncReload));\n watch([files.jsPath], parallel(jsTask, browserSyncReload));\n watch([\"./*.html\",\n \"./*.yml\",\n \"./_includes/*.html\",\n \"./_layouts/*.html\",\n \"./_posts/**/*.*\"], series(jekyll, browserSyncReload));\n \n\n}", "function watchers(cb) {\n \n watch('src/scss/*.scss', {readDelay: 500, verbose: true },sassy);\n // watch('src/css/*.css', {readDelay: 500, verbose: true }, minify_css);\n watch('src/js/*.js', {readDelay: 500, verbose: true }, minify_js);\n // Reloads the browser whenever HTML or JS files change\n watch('src/*.html', copy_html);\n watch('src/**/*.{jpg,png,gif,svg,mp4}', {readDelay: 500, verbose: true }, copy_assets, browserSync.reload)\n // let file = '' \n // if (typeof cb === 'function') {\n // cb(null, file);\n // called = true;\n // };\n}", "function watchTask(){\r\n browserSync.init({\r\n server: {\r\n baseDir: \"./\"\r\n }\r\n });\r\n\r\n watch(\"./*.html\").on('change', browserSync.reload);\r\n watch(paths.scss, parallel(styles_Src, styles_Dist));\r\n watch('src/bootstrap/scss/**.*scss', styles_bootstrap);\r\n watch('src/plugins/**/*.css', vendor_styles);\r\n watch(paths.js, js);\r\n watch('src/plugins/**/*.js', vendor_js);\r\n watch('src/images/**/*.*', image_compress);\r\n\r\n}", "function watch_files(done) {\n gulp.watch('project/css/**/*.css', reload);\n gulp.watch('project/*.html', reload);\n gulp.watch('project/js/**/*.js', reload);\n done();\n}", "function watch() {\n gulp.watch( 'src/pages/**/*.html' ).on( 'change', gulp.series( pages, browser.reload ) );\n gulp.watch( ['src/layouts/**/*', 'src/partials/**/*'] ).on( 'change', gulp.series( refresh, pages, browser.reload ) );\n gulp.watch( ['../scss/**/*.scss', 'src/assets/scss/**/*.scss'] ).on( 'change', gulp.series( refresh, json, scss, pages, browser.reload ) );\n gulp.watch( 'src/assets/js/**/*' ).on( 'change', gulp.series( js, browser.reload ) );\n gulp.watch( 'src/assets/img/**/*' ).on( 'change', gulp.series( images, browser.reload ) );\n}", "function watch(cb) {\n gulp.watch([\n 'src/lib/**',\n 'src/main.electron.js',\n 'src/core/**/*.js'\n ], gulp.series(electronRestart));\n\n gulp.watch('src/app/index.html', gulp.series('inject', electronReload));\n gulp.watch('src/app/**/*.html', electronReload);\n gulp.watch('src/bower.json', gulp.series('inject', electronReload));\n gulp.watch('src/assets/**/*.css', gulp.series('inject', electronReload));\n gulp.watch('src/app/**/*.js', gulp.series('inject', electronReload));\n\n cb();\n}", "function watchFiles(){\n gulp.watch(\"./src/assets/scss/**/*\", scss.build);\n gulp.watch(\"./src/assets/js/**/*\", bundle.bundle);\n gulp.watch([\"./src/**/*\", \"!./src/assets/**/*\"], buildSite.build);\n}", "function watch() {\r\n gulp.watch('scss/**/*', gulp.series(compileSass));\r\n gulp.watch('html/pages/**/*', gulp.series(compileHtml));\r\n gulp.watch('html/{layouts,includes,helpers,data}/**/*', gulp.series(compileHtmlReset, compileHtml));\r\n}", "function watch() {\n gulp.watch(PATHS.assets, copy);\n gulp.watch('src/templates/**/*.html').on('change', gulp.series(pages, browser.reload));\n gulp.watch('src/index.html').on('change', gulp.series(index, browser.reload));\n gulp.watch('src/assets/scss/**/*.scss', sass);\n gulp.watch('src/assets/js/**/*.js').on('change', gulp.series(javascript, browser.reload));\n gulp.watch(['src/assets/img/**/*', 'src/assets/data/resolutions.json']).on('change', gulp.series(resp, browser.reload));\n gulp.watch(['src/assets/data/projects3.xls', 'src/assets/data/resolutions.json']).on('change', gulp.series(ex2json, browser.reload));\n // gulp.watch('src/styleguide/**').on('change', gulp.series(styleGuide, browser.reload));\n }", "function watch() {\n // gulp.watch(paths.html).on('change', reload);\n // gulp.watch(paths.css).on('change', gulp.series(styles, reload));\n // gulp.watch(paths.app).on('change', reload);\n gulp.watch(paths.html, reload);\n gulp.watch(paths.app, reload);\n gulp.watch(paths.css, gulp.series(styles, reload));\n}", "function watch() {\n browserSync.init({\n port: 80,\n server: {\n baseDir: \"./\"\n },\n notify: false\n })\n gulp.watch(scssFiles, scss);\n gulp.watch(jsFiles, js);\n gulp.watch(jsFiles).on(\"change\", browserSync.reload);\n gulp.watch(scssFiles).on(\"change\", browserSync.reload);\n gulp.watch(htmlFiles).on(\"change\", browserSync.reload);\n}", "ondir() {}", "function startWatchFile(path) {\n\treturn fileWatcher.startWatchFile({ path: path, timeToWait: INTERVAL_TIME });\n}" ]
[ "0.72226524", "0.66849107", "0.66472787", "0.6535657", "0.65207285", "0.64339656", "0.6433908", "0.6400857", "0.63197666", "0.6242888", "0.6195221", "0.6151391", "0.6048706", "0.6011174", "0.59751934", "0.5971008", "0.59279495", "0.58923984", "0.5878654", "0.5869194", "0.58623266", "0.5832438", "0.58232516", "0.58214414", "0.5807877", "0.5801426", "0.57993835", "0.5770884", "0.5769098", "0.5765829", "0.57512534", "0.57462007", "0.5733185", "0.57310116", "0.57246757", "0.57039165", "0.5698993", "0.5680126", "0.5662644", "0.5634794", "0.5627809", "0.561365", "0.5603737", "0.5596132", "0.5592594", "0.55864197", "0.5581602", "0.5577265", "0.5569564", "0.5569298", "0.5547958", "0.5514095", "0.5513444", "0.54995537", "0.54921085", "0.5484552", "0.54784054", "0.5474139", "0.5452459", "0.5439152", "0.54377687", "0.5416945", "0.54097015", "0.5402047", "0.54000854", "0.5391315", "0.53880155", "0.5383065", "0.5381203", "0.5376582", "0.5353834", "0.534857", "0.5347513", "0.53420275", "0.534089", "0.5334483", "0.5334334", "0.53310394", "0.53196365", "0.53116524", "0.53060883", "0.5297835", "0.5290049", "0.5285914", "0.5279703", "0.5272508", "0.5268491", "0.526135", "0.52527535", "0.524947", "0.52494276", "0.5244386", "0.5219656", "0.52011645", "0.51965845", "0.5191127", "0.51886344", "0.517506", "0.51721287", "0.5168838" ]
0.7454526
0
Your Own Tests (OPTIONAL)
function assert(test, message, test_number) { if (!test) { console.log(test_number + "false"); throw "ERROR: " + message; } console.log(test_number + "true"); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AssertTests() {\n}", "function runTests() {\n\ttestBeepBoop();\n\ttestGetDigits();\n}", "function testRun()\r\n{\r\n}", "function startAllTests(){ \n testGetObjectFromArrays();\n testNormalizeHeader();\n testFillInTemplateFromObject();\n testIsCellEmpty();\n testIsAlnum();\n testIsDigit();\n}", "function testAllTests() {\n testExtremal();\n testDifference();\n testSpearman();\n testSerial()\n}", "function TestMethods() {}", "function setUp() {\n}", "function generateTest() {\n // TODO\n}", "function testAll() {\n testAssert()\n testRemainder()\n testConversions()\n}", "run_test() { start_tests(); }", "test() {\n return true\n }", "function setUp()/* : void*/\n {\n }", "function PerformanceTestCase() {\n}", "async function defineTests () {\n const examplesData = await loadExamplesData()\n describe('dt2js CLI integration test', function () {\n this.timeout(20000)\n examplesData.forEach(data => {\n context(`for file ${data.fpath}`, () => {\n data.names.forEach(typeName => {\n it(`should convert ${typeName}`, async () => {\n const schema = await dt2jsCLI(data.fpath, typeName)\n validateJsonSchema(schema)\n })\n })\n })\n })\n })\n}", "function test() {\n console.log(\"tested!\");\n}", "async generateTests()\n {\n this.description = 'Basic Tests:';\n\n this.addTest(new Test('This is an example test. The first parameter is a description.', DescriptionTest));\n }", "async function basicTesting() {\n console.log(chalk.white(\"INITIALIZING BASIC TESTING\"));\n await testAvailableBooks();\n await testTicker(\"btc_mxn\");\n await testGetTrades(\"btc_mxn\");\n await testOrders(\"eth_mxn\", \"buy\", \"1.0\", \"market\");\n await testOrders(\"eth_mxn\", \"sell\", \"1.0\", \"market\");\n await testWithdrawals(\"btc\", \"0.001\", \"15YB8xZ4GhHCHRZXvgmSFAzEiDosbkDyoo\");\n await testBalances();\n}", "function run(){\n\n\tdescribe(\"XML Tester\", function(){\n\t\t\n\t\t//gameName = process.env.npm_config_gamename;\n\t\t//console.log(\"Testing \" + gameName);\n\t\t\n\t\t//findXML();\n\t\t//parseXML();\n\t\t//loadGame();\n\t\t//StartMultiGameTest();\n\t});\n}", "beforeRun() {}", "function testFunctions() {\n loadSelectedTests(fileSystemTests, selectedTests, 'FileSystem');\n }", "function ClassTests()\n{\n}", "function test() {\n runTests0();\n runTests1(); \n return true;\n}", "function runAllTests() {\n var baseSpreadsheetTests = new BaseSpreadsheetTests();\n baseSpreadsheetTests.run();\n\n var masteryTrackerTests = new MasteryTrackerTests();\n masteryTrackerTests.run();\n\n var masteryDataTests = new MasteryDataTests();\n masteryDataTests.run();\n}", "function testGetBase() {\n\n var yoke = new Yoke();\n // all resources are OK\n yoke.use(function (request) {\n request.response.end('OK');\n });\n\n new YokeTester(yoke).request('GET', '/', function(resp) {\n vassert.assertTrue(200 == resp.statusCode);\n vassert.testComplete();\n });\n}", "function ct_test() {\n return ok;\n}", "function testFunction() {\r\n console.log(\"myutil.js testFunction called\");\r\n}", "function testMain() {\n var mode = 'test';\n main(mode);\n}", "beforeEach() {}", "testAlbums() {\n this.albumTest.startAllTests();\n }", "function test_candu_collection_tab() {}", "function TestRoot() {}", "function RUN_ALL_TESTS() {\n console.log('> itShouldSaveSingleProperty');\n saveSingleProperty();\n console.log('> itShouldSaveMultipleProperties');\n saveMultipleProperties();\n console.log('> itShouldReadSingleProperty');\n readSingleProperty();\n console.log('> itShouldReadAllProperties');\n readAllProperties();\n // The tests below are successful if they run without any extra output\n console.log('> itShouldUpdateProperty');\n updateProperty();\n console.log('> itShouldDeleteSingleProperty');\n deleteSingleProperty();\n console.log('> itShouldDeleteAllUserProperties');\n deleteAllUserProperties();\n}", "function testFunction() {\nconsole.log('you passed the test');\n}", "function runTest() {\n Logger.log(\"This is the newest test\");\n}", "beforeAll() {}", "function unit() {\n // Add more tests here.\n return linkUnit();\n}", "testArtists() {\n this.artistTest.startAllTests();\n }", "function RUN_ALL_TESTS() {\n console.log('> itShouldGetConnections');\n getConnections();\n console.log('> itShouldGetSelf'); // Requires the scope userinfo.profile\n getSelf();\n console.log('> itShouldGetAccount');\n getAccount('me');\n}", "function runBaseTests() {\n px_validation = document.getElementById('px_validation_1');\n\n suite('Base Automation Tests for px-validation', function() {\n\n test('Polymer exists', function() {\n assert.isTrue(Polymer !== null);\n });\n test('px-validation fixture is created', function() {\n assert.isTrue(document.getElementById('px_validation_1') !== null);\n });\n\n });\n}", "async runTests() {\n for (let file of this.testFiles) {\n console.log(chalk.gray(`--- ${file.shortName}`));\n const beforeEaches = [];\n\n global.render = render;//jsdom\n\n global.beforeEach = (fn) => {\n beforeEaches.push(fn)\n };\n global.it = async (desc, fn) => {\n // console.log(desc);\n beforeEaches.forEach(func => func());\n //to handle errors ocurred during our test we need to do try and catch to avoid the test to collapse\n try {\n await fn();\n console.log(chalk.green(`\\tOK - ${desc}`));\n } catch (err) {\n const message = err.message.replace(/\\n/g, '\\n\\t\\t');\n console.log(chalk.red(`\\tX - ${desc}`));\n console.log(chalk.red('\\t', message));// \\t is tab \n }\n\n };\n //to skip the typo in stopping test for running\n try {\n require(file.name);//when we require the file inside a func node will find it and execute the file here\n } catch (err) {\n console.log(chalk.red('X - Error Loading File'), file.name);\n console.log(chalk.red(err));\n }\n\n }\n }", "function test_utilization_host() {}", "function tests() {\n // before\n beforeEach(function () {\n // mock a request\n this.request = new MockExpressRequest(testRawSettings);\n // write to the stream\n this.request.write(testRawBody);\n // end the stream\n this.request.end();\n // mock an empty request\n this.emptyRequest = new MockExpressRequest();\n // mock a response\n this.response = new MockExpressReponse();\n });\n // get raw body\n context(\"when no data sent\", function () {\n it(\"should not error\", emptyNoErrors);\n });\n context(\"when data sent\", function () {\n it(\"should not error\", noErrors);\n it(\"should have raw body property\", hasBody);\n });\n}", "function GetTestability() {}", "function GetTestability() {}", "function GetTestability() {}", "function GetTestability(){}", "function testFunction() {\n\t\t\treturn true;\n\t\t}", "function testFunction() {\n\t\t\treturn true;\n\t\t}", "function beforeTest()\n{\n\tconsole.log(\"'beforeTest' executed\");\n}", "function fullTest(Srl){\n\tGen = Srl.Generative;\n\tAlgo = Srl.Algorithmic;\n\tMod = Srl.Transform;\n\tRand = Srl.Stochastic;\n\tStat = Srl.Statistic;\n\tTL = Srl.Translate;\n\tUtil = Srl.Utility;\n\n\t// testSerial();\n\ttestGenerative();\n\ttestAlgorithmic();\n\ttestStochastic();\n\ttestTransform();\n\ttestStatistic();\n\ttestTranslate();\n\ttestUtility();\n}", "function _test(scriptfile, cb){\n\t\n\tvar args = util_args2json();\n\tvar file = path.join(__dirname, path.normalize(scriptfile));\n\n\tconsole.log(\"@testing \"+ chalk.blue(file) +\" with args:\", args );\n\n\n\t//cloudfn.verify.rawfile(file);\n\t// or\n\tcloudfn.run.rawfile(file, args);\n\n\t// thinking is, that scripts might be using things available in the server.api -> which we cant \"run\" locally\n\t// req and res springs to mind. Lets see. \n}", "function _testRunnerMain() {\n _doSetup();\n\n // if there's no _runTest, assume we need to test the parser. Pass Processing env.\n if (this._testWrapper)\n this._testWrapper(this._pctx);\n else\n _checkParser();\n\n if (this._finished)\n this._finished();\n\n print('TEST-SUMMARY: ' + _passCount + '/' + _failCount);\n}", "testSimple() {\n this.assertEquals(4, 3 + 1, \"This should never fail!\");\n this.assertFalse(false, \"Can false be true?!\");\n }", "function build_tests() {\r\n\t\tvar tests = new Collection(), version = \"Mon Dec 19 11:24:51 2011\";\r\n\r\n\t\t// check for existense of framework 2 files\r\n\t\tvar framework_file = test_presence.create_sub({\r\n\t\t\tid: \"framework-found\",\r\n\t\t\tname: \"The bm-framework.js file should be in the file manager\",\r\n\t\t\tdesc: \"The JavaScript framework 2.0 requires that the file bm-framework.js be loaded into the javascript folder in the file manager. You can get this file from the JavaScript Starter Kit. If this test is not passing, check that the sitename you entered on this page is correct, and also check the name of the case-sensitive 'javascript' folder.\",\r\n\t\t\tregex: /bootstrap/,\r\n\t\t\ttest_url: function() { return \"/bmfsweb/\"+templates.sitename+\"/image/javascript/bm-framework.js?break-cache\" },\r\n\t\t\tfix_url: function() { return \"/admin/filemanager/list_files.jsp\"; }\r\n\t\t});\r\n\t\ttests.add(framework_file);\r\n\r\n\t\ttests.add(\r\n\t\t\tframework_file.create_sub({\r\n\t\t\t\tid: \"framework-version\",\r\n\t\t\t\tregex: \"@version \"+version,\r\n\t\t\t\tname: \"bm-framework version (found in the comment at the top) should match \" + version,\r\n\t\t\t\tdesc: \"This test checks the time stamp on the version tag of the framework, and compares it to the latest release.<br/><br/>If this test raises a warning, confirm the @version stamp at the top of bm-framework is AFTER \" + version+\". <br/><br/>If the framework is out of date, download the latest version through the link at the top of the page.\",\r\n\t\t\t\twait_for: tests.find_by_ids(\"framework-found\")\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\ttests.add(\r\n\t\t\ttest_presence.create_sub({\r\n\t\t\t\tid: \"text-found\",\r\n\t\t\t\tname: \"The text.js file should be in the file manager\",\r\n\t\t\t\tdesc: \"The JavaScript framework 2.0 requires that the file text.js be loaded into the javascript folder in the file manager. You can get this file from the JavaScript Starter Kit. If this test is not passing, check that the sitename you entered on this page is correct, and also check the name of the case-sensitive 'javascript' folder.\",\r\n\t\t\t\tregex: /.*/,\r\n\t\t\t\ttest_url: function() { return \"/bmfsweb/\"+templates.sitename+\"/image/javascript/text.js?breach-cache\";},\r\n\t\t\t\tfix_url: function() { return \"/admin/filemanager/list_files.jsp\";}\r\n\t\t\t})\r\n\t\t);\r\n\r\n\r\n\t\t// defaults to the header/footer test - very straightforward\r\n\t\ttests.add(clone(test_absence));\r\n\r\n\t\ttests.add(\r\n\t\t\ttest_presence.create_sub({\r\n\t\t\t\tid: \"header-added\",\r\n\t\t\t\tname: \"Header/Footer should have a reference to bm-framework.js\",\r\n\t\t\t\tdesc: \"The framework 2.0 requires a script tag with reference to bm-framework.js: <br/> <code>&lt;script type='text/javascript' src='$BASE_PATH$/javascript/bm-framework.js' &gt;&lt;/script&gt;</code>\",\r\n\t\t\t\tregex: /bm-framework.js/\r\n\t\t\t})\r\n\t\t);\t\t\r\n\t\t\r\n\t\ttests.add(\r\n\t\t\ttest_absence.create_sub({\r\n\t\t\t\tid: \"nerfed\",\r\n\t\t\t\twarning_passes: false,\r\n\t\t\t\tname: \"The allplugins-require.js file should be replaced by the new version\",\r\n\t\t\t\tdesc: \"In 1.0, the file javascript/allplugins-require.js was the core of the framework. By replacing it with a dummy file, we are effectively disabling the old framework, without creating 404 errors on the server.<br/> If this test is failing, it means that we have detected the previous file in place.<br/> If you get a warning, it may mean that the file doesn't exist. This can be okay - just make sure that you remove all references to it in other places.\",\r\n\t\t\t\tregex: /define/,\r\n\t\t\t\ttest_url: function() { return \"/bmfsweb/\"+templates.sitename+\"/image/javascript/allplugins-require.js?break-cache\";},\r\n\t\t\t\tfix_url: function() { return \"/admin/filemanager/list_files.jsp\";}\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\t// homepage test - check the alt js for references\r\n\t\ttests.add(\r\n\t\t\ttest_absence.create_sub({\r\n\t\t\t\tid: \"homepage-remove\",\r\n\t\t\t\tname: \"The Home Page Alt JS file shouldn't have any references to allplugins-require.js (make sure you clear the cache)\",\r\n\t\t\t\tdesc: \"The references to allplugins-require.js need to be removed from the home page alternate JS file. This test fails when that old code is detected, and will show a warning if it can't find the file. In case of failure you can remove the entire function 'include_homepage_js', which is how the old code was loaded on the home page. As part of the upgrade, you will also be replacing this Alt JS file with a new piece of code. If you do remove this code, make sure that 'homepage' is marked as active in bm-framework.js.\",\r\n\t\t\t\twarning_passes: false,\r\n\t\t\t\ttest_url:function() { return \"/bmfsweb/\"+templates.sitename+\"/homepage/js/\"+templates.sitename+\"_Hp_Alt.js\";},\r\n\t\t\t\tfix_url:function() { return \"/admin/homepage/define_xsl_template.jsp\";}\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\t// homepage test - check the alt js for references\r\n\t\ttests.add(\r\n\t\t\ttest_presence.create_sub({\r\n\t\t\t\tid: \"homepage-param\",\r\n\t\t\t\tname: \"The Home Page Alt JS file should have a reference to bm-framework.js\",\r\n\t\t\t\tdesc: \"The JavaScript framework 2.0 uses an (optional) parameter to assist in identifying the home page. This file can be found in the JavaScript Start Kit; it is basically: <code>window['framework/homepage']=true</code>. If this test fails, it means that it found the Alt JS file, but no reference to the new code. A warning means it can't find the file.\",\r\n\t\t\t\twarning_passes: false,\r\n\t\t\t\tregex: /framework\\/homepage/,\r\n\t\t\t\twait_for: tests.find_by_ids(\"homepage-remove\"),\r\n\t\t\t\ttest_url:function() { return \"/bmfsweb/\"+templates.sitename+\"/homepage/js/\"+templates.sitename+\"_Hp_Alt.js\";},\r\n\t\t\t\tfix_url:function() { return \"/admin/homepage/define_xsl_template.jsp\";}\r\n\t\t\t})\r\n\t\t);\r\n\r\n\r\n\t\t// homepage test - check the homepage directly\r\n\t\ttests.add(\r\n\t\t\ttest_absence.create_sub({\r\n\t\t\t\tid: \"homepagedirect\",\r\n\t\t\t\tname: \"The Home Page shouldn't have any references to allplugins-require (will fail for comments)\",\r\n\t\t\t\tdesc: \"The home page may have some references to the old framework, that are outside of the alt js file. This could be from a customized Homepage XSL file, or more likely from a custom home page. If this test fails you will have to manually search for and remove these references.\",\r\n\t\t\t\twait_for: tests.find_by_ids(\"header\"),\r\n\t\t\t\ttest_url:function() { return \"/commerce/display_company_profile.jsp\";},\r\n\t\t\t\tfix_url:function() { return \"/commerce/display_company_profile.jsp\";},\r\n\t\t\t\twarning_passes: false\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\t// this one we need a refernce to later, so breaking the pattern a bit\r\n\t\tvar globalscript_test = test_absence.create_sub({\r\n\t\t\tid: \"gss-allplugin\",\r\n\t\t\tname: \"Global Script Search shouldn't have any matches for allplugins-require (will fail for comments)\",\r\n\t\t\tdesc: \"We are running a global script search for the term 'allplugins-require'. The test will fail if it finds any results. This can be used to identify any BML that is referencing the old framework directly. All these references should be removed. This will NOT show references from default values on config attributes. This will most likely only find one reference - in our BML Util Library 'require_javascript.'\",\r\n\t\t\twait_for: tests.find_by_ids(\"homepage-remove\", \"header\"),\r\n\t\t\ttest_url: function() { return \"/admin/scripts/search_script.jsp?formaction=searchBmScript&search_string=allplugins-require\";},\r\n\t\t\tfix_url:function() { return this.test_url(); },\r\n\t\t\tget_text: function() {\r\n\t\t\t\tvar defer = jq$.Deferred(), me = this;\r\n\t\t\t\tjq$.get(me.test_url(), {}, function(data) { \r\n\t\t\t\t\t//get rid of the first two... we put it there!\r\n\t\t\t\t\tdata = data.replace(me.regex, \"\");\r\n\t\t\t\t\tdata = data.replace(me.regex, \"\");\r\n\t\t\t\t\tdefer.resolve(data);\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn defer.promise();\r\n\t\t\t}\r\n\t\t});\r\n\t\ttests.add(globalscript_test);\r\n\r\n\t\t// global script test - for bml-util lib\r\n\r\n\t\ttests.add(\r\n\t\t\tglobalscript_test.create_sub({\r\n\t\t\t\tid: \"gss-bml\",\r\n\t\t\t\tname: \"Global Script Search shouldn't have any matches for require_javascript\",\r\n\t\t\t\tdesc: \"We are running a global script search for the term 'require_javascript'. The test will fail if it finds any results. This can be used to identify any BML that is referencing the now obsolete library that we used to load JavaScript in the Framework v1. These references should be removed, and the corresponding section activated in bm-framework.js.\",\r\n\t\t\t\twait_for: tests.find_by_ids(\"gss-allplugin\"),\r\n\t\t\t\tregex: /require_javascript/,\r\n\t\t\t\ttest_url: function() { return \"/admin/scripts/search_script.jsp?formaction=searchBmScript&search_string=require_javascript\";},\r\n\t\t\t\tfix_url: function() { return this.test_url();}\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\ttests.add(\r\n\t\t\ttest_absence.create_sub({\r\n\t\t\t\tid: \"start-configs\",\r\n\t\t\t\tname: \"Run this test again manually to begin the configuration tests.\",\r\n\t\t\t\tdesc: \"This test will run and fail the first time - you must manually run it in order to begin the configuration tests, which can be time intensive.\",\r\n\t\t\t\ttimes: 0,\r\n\t\t\t\trun: function() {\r\n\t\t\t\t\tif(this.times === 0) {\r\n\t\t\t\t\t\tthis.times += 1;\r\n\t\t\t\t\t\tthis.on_fail();\r\n\t\t\t\t\t\tthis.render();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.on_pass();\r\n\t\t\t\t\t\tthis.render();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\t// crawl the homepage, create a test for each configurator\r\n\t\ttests.add(\r\n\t\t\ttest_absence.create_sub({\r\n\t\t\t\tid: \"crawl\",\r\n\t\t\t\tname: \"Test configuration using homepage punchins... \",\r\n\t\t\t\tdesc: \"This test will crawl the home page for punchin urls, and then spin up a test for each one it finds. This is so that we can quickly crawl the configurators directly on the buyside, and identify which ones reference allplugins-require. Please note that this will only visit the first page of each configurator; it's possible that we will miss some references if they are buried deep within a configurator.\",\r\n\t\t\t\twait_for: tests.find_by_ids(\"homepage-remove\", \"header\", \"gss-allplugin\", \"gss-bml\", \"start-configs\"),\r\n\t\t\t\tregex: /require_javascript/,\r\n\t\t\t\ttest_url:function() { return \"/commerce/display_company_profile.jsp\";},\r\n\t\t\t\tfix_url:function() { return \"/commerce/display_company_profile.jsp\";},\r\n\t\t\t\t// this test spawns additional tests\r\n\t\t\t\trun: function() {\r\n\t\t\t\t\tvar me = this,\r\n\t\t\t\t\tdefer = jq$.Deferred(),\r\n\t\t\t\t\thome_str = jq$.ajax({\r\n\t\t\t\t\t\turl: me.test_url()\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tme.is_running = true;\r\n\t\t\t\t\thome_str.then(function(data) {\r\n\t\t\t\t\t\t// matches url for configurator punchins\r\n\t\t\t\t\t\tvar matches = data.match(/<a[^>]*?href=\"\\/commerce\\/new_equipment\\/.*?<\\/a>/g),\r\n\t\t\t\t\t\t\tcount = 0;\r\n\r\n\t\t\t\t\t\t_(matches).each(function(val) {\r\n\t\t\t\t\t\t\tvar label = val.match(/(>)(.*)(<)/)[2],\r\n\t\t\t\t\t\t\t\turl = val.match(/(\")(\\/commerce.*)(\")/)[2],\r\n\t\t\t\t\t\t\t\tid = eventify(\"bmjs-config-id-\" + count++),\r\n\t\t\t\t\t\t\t\ttest,\r\n\t\t\t\t\t\t\t\tdefer = jq$.Deferred(),\r\n\t\t\t\t\t\t\t\tdescription = \"This will scrape the first page of the configurator for references to allplugins-require, and fail if it finds any. This test was dynamically generated by scraping the home page for punchin URLs. If this test fails remove the references, then make sure config is active in the bm-framework.js file.\";\r\n\r\n\t\t\t\t\t\t\turl = url.replace(/&amp;/g, \"&\");\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttest = test_absence.create_sub({\r\n\t\t\t\t\t\t\t\tid: id,\r\n\t\t\t\t\t\t\t\tname: label + \" shouldn't have any references to allplugins-require.\",\r\n\t\t\t\t\t\t\t\tdesc: description,\r\n\t\t\t\t\t\t\t\ttest_url: function() { return url;},\r\n\t\t\t\t\t\t\t\tfix_url: function() { return url;},\r\n\t\t\t\t\t\t\t\twarning_passes: false\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\ttest.begin();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tme.on_pass();\r\n\t\t\t\t\t\tme.render();\r\n\t\t\t\t\t});\r\n\t\t\t\t\tme.render();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\twindow.tests = tests;\r\n\t\treturn tests;\r\n\t}", "function run_test() {\n do_calendar_startup(run_next_test);\n}", "function GetTestability() { }", "function GetTestability() { }", "setup() {}", "setup() {}", "setup() {}", "function applicationsTests({ apiGET, apiPOST }) {}", "function testSubmitFile() {\n testAddFile();\n onSubmit();\n}", "function test() {\n console.log('Beginning test process!'.blue);\n projects.action = 'test';\n github.getCredentials()\n .catch(janitor.error('Failure getting credentials'.red))\n .then(greenlight.getGradable)\n .catch(janitor.error('Failure getting sessions'.red))\n .then(sessions.selectSession)\n .catch(janitor.error('Failure selecting session'.red))\n .then(projects.selectProject)\n .catch(janitor.error('Failure selecting project'.red))\n .then(grabTests)\n .catch(janitor.error('Failure grabbing tests'.red))\n .then(runTests)\n .catch(janitor.error('Failure running tests'.red))\n .then(displayResults)\n .catch(janitor.error('Failure displaying results'.red))\n .then(() => console.log('Successfully concluded test.'.blue))\n .catch((err) => { console.error(err); });\n}", "function fooTest() { }", "function testQueryProcessingFunctions() {\n testEvalQueryShow();\n testEvalQueryTopK();\n testEvalQuerySliceCompare();\n\n testGetTable();\n\n testCallGcpToGetQueryResultShow();\n testCallGcpToGetQueryResultTopK(); \n testCallGcpToGetQueryResultSliceCompare();\n\n testCallGcpToGetQueryResultUsingJsonShow();\n testCallGcpToGetQueryResultUsingJsonTopK(); \n testCallGcpToGetQueryResultUsingJsonSliceCompare();\n}", "function setUp(){\n return app.env.IS_TESTING = true;\n}", "function RunTests() {\n var storeIds = [175, 42, 0, 9];\n var transactionIds = [9675, 23, 123, 7];\n\n storeIds.forEach(function(storeId) {\n transactionIds.forEach(function(transactionId) {\n var shortCode = generateShortCode(storeId, transactionId);\n var decodeResult = decodeShortCode(shortCode);\n $(\"#test-results\").append(\n \"<div>\" + storeId + \" - \" + transactionId + \": \" + shortCode + \"</div>\"\n );\n AddTestResult(\"Length <= 9\", shortCode.length <= 9);\n AddTestResult(\"Is String\", typeof shortCode === \"string\");\n AddTestResult(\"Is Today\", IsToday(decodeResult.shopDate));\n AddTestResult(\"StoreId\", storeId === decodeResult.storeId);\n AddTestResult(\"TransId\", transactionId === decodeResult.transactionId);\n });\n });\n}", "function standAloneTest()\n{\n $(\"#qunit\").css({display: \"block\"})\n\n gbmLggDzSpecificTests();\n\n} // standAloneTest", "function sharedTests() {\n var result;\n beforeEach(function (done) {\n result = txtToIntObj.getIntObj(this.txtdata);\n done();\n });\n it('check for existence and type', function (done) {\n expect(result).to.exist;\n expect(result).to.be.an('object');\n done();\n });\n\n it('make sure intermediate format has all titles', function (done) {\n var titles = txtToIntObj.getTitles(this.txtdata);\n done();\n });\n\n it('make sure there are no bad keys', function (done) {\n var badKeysResult = checkForBadKeys(result);\n expect(badKeysResult).to.be.true;\n done();\n });\n}", "function tearDown() {\n}", "async runTest() {}", "enterTest(ctx) {\n\t}", "verify() {\n // TODO\n }", "function testcases () {\n\n\tif ( !fs.existsSync(paymentsdonedir) ) {\n\t\tfs.mkdirSync(paymentsdonedir, 0744)\n\t\tgetpayqueue(start);\n\t}\n\telse if ( !fs.existsSync(paymentqueuefile) ) {\n\t\tconsole.log(\"Missing file \" + paymentqueuefile + \"! Run collector session first. Goodbye\")\n\t}\n\telse if ( JSON.parse(fs.readFileSync(paymentqueuefile)).length == 0 ) {\n\t\tconsole.log(\"Empty payqueue! Nothing to pay, goodbye :-)\")\n\t}\n\telse {\n\t\tgetpayqueue(start);\n\t}\n}", "function FunctionWithMethodsTest() {\r\n // note that JairuSUnit supports setUp and tearDown methods\r\n this.setUp = function() {\r\n this.addresult = add(1,1);\r\n };\r\n this.testAddSuccess = function() {\r\n assertEquals(2, this.addresult);\r\n };\r\n this.testAddFail = function() {\r\n \tassertTrue(\"3==2\", 3 == add(1,1))\r\n };\r\n this.testAddError = function() {\r\n \tthrow new Error(\"unexpected error\");\r\n };\r\n}", "function runTests (port, build){\n\n describe('build tests', function() {\n this.timeout(20000);\n\n build();\n\n var browser = new Browser();\n\n before(function(d) {\n browser.visit('http://localhost:' + port, d);\n });\n\n\n // layout\n it('should show layout hbs content', function() {\n browser.assert.hasText('.layout', '[defaultLayout-hbs-output]');\n });\n\n\n\n // page\n it('should show index page hbs content', function() {\n browser.assert.hasText('.page', '[indexPage-hbs-output]');\n });\n\n\n\n // partial\n it('should show partial hbs content', function() {\n browser.assert.hasText('.partial', '[partial-hbs-output]');\n });\n\n it('should show partial json content', function() {\n browser.assert.hasText('.partial', '[partial-json-output]');\n });\n\n\n\n // first\n it('should show first hbs content', function() {\n browser.assert.hasText('.first', '[first-hbs-output]');\n });\n\n it('should show first js content', function() {\n browser.assert.hasText('.first', '[first-js-output]');\n });\n\n it('should show first json content', function() {\n browser.assert.hasText('.first', '[first-json-output]');\n });\n\n\n\n // second\n it('should show second hbs content', function() {\n browser.assert.hasText('.second', '[second-hbs-output]');\n });\n\n it('should show second js content', function() {\n browser.assert.hasText('.second', '[second-js-output]');\n });\n\n it('should show second dependency1 js content', function() {\n browser.assert.hasText('.second', '[someDependency1-js-output]');\n });\n\n it('should show second dependency2 js content', function() {\n browser.assert.hasText('.second', '[someDependency2-js-output]');\n });\n\n\n\n var lymCssBrowser = new Browser();\n\n before(function(d) {\n lymCssBrowser.visit('http://localhost:' + port+ '/css/lym.css', d);\n });\n\n it('should show first-settings css', function() {\n lymCssBrowser.assert.hasText('body', '.first-setting{color:red;}',true);\n });\n\n it('should show first-mixin css', function() {\n lymCssBrowser.assert.hasText('body', '.first-mixins{color:red;}',true);\n });\n\n it('should show second-mixin css', function() {\n lymCssBrowser.assert.hasText('body', '.second-mixins{color:orange;}',true);\n });\n\n it('should show second css', function() {\n lymCssBrowser.assert.hasText('body', '.second{color:green;}',true);\n });\n\n\n var firstBundleCssBrowser = new Browser();\n\n before(function(d) {\n firstBundleCssBrowser.visit('http://localhost:' + port+ '/css/first-bundle.css', d);\n });\n\n it('should show first css', function() {\n firstBundleCssBrowser.assert.hasText('body', '.first{color:red;}',true);\n });\n });\n}", "function setUp() {\nbitgo = new BitGoJS.BitGo({ env: 'test', accessToken: configData.accessToken });\n}", "function commonBehaviour() {\n\t\tit(\"should not save changes when the cancel button is clicked\", () => {\n\t\t\ttransactionIndexView.getRowValues(targetRow).then(values => {\n\t\t\t\ttransactionEditView.cancel();\n\n\t\t\t\t// Row count should not have changed\n\t\t\t\ttransactionIndexView.table.rows.count().should.eventually.equal(originalRowCount);\n\n\t\t\t\t// Transaction in the target row should not have changed\n\t\t\t\ttransactionIndexView.checkRowValues(targetRow, values);\n\t\t\t});\n\t\t});\n\n\t\tdescribe(\"invalid data\", () => {\n\t\t\tbeforeEach(() => transactionEditView.clearTransactionDetails());\n\n\t\t\tit(\"should not enable the save button\", () => transactionEditView.saveButton.isEnabled().should.eventually.be.false);\n\n\t\t\t// MISSING - category name, parent & direction should show red cross when invalid\n\n\t\t\t// MISSING - form group around category name & parent should have 'has-error' class when invalid\n\n\t\t\t// MISSING - parent should behave like non-editable typeahead\n\t\t});\n\n\t\t// MISSING - error message should display when present\n\n\t\t// MISSING - category name & parent text should be selected when input gets focus\n\t}", "function test_service_bundle_vms() {}", "init() {\n this.testMainPage('/api/v1');\n\n this.artistTest = new ArtistTest(this._app, '/api/v1/artists');\n this.testArtists();\n\n this.albumTest = new AlbumTest(this._app, '/api/v1/albums', new Artist(this.artistTest.getArtistContent()));\n this.testAlbums();\n }", "expected(_utils) {\n return 'nothing';\n }", "function testing() {\n console.log('Personalization App Loaded');\n}", "function main() {\n if (isPushBuild()) {\n log('Running all tests because this is a push build...');\n runLintChecks();\n APPS_TO_TEST.forEach(runAppTests);\n } else {\n printChangeSummary();\n runLintChecks();\n determineBuildTargets().forEach(runAppTests);\n }\n}", "function setup() {}", "async function runAllTests(){\n await createBlocks();\n await testChainValidation();\n await introduceErrorsInBlockBody();\n await testChainValidation();\n await introduceErrorsInBlockPreviousHash();\n await testChainValidation();\n}", "async setUp () {\n throw new NotImplemented('setUp')\n }", "function indexTests() {\n let startTestNum = startGameTests(); //testing the startGame function\n let callUnoTestNum = callUnoTests(); //testing the callUno function\n let cheatTestNum = cheatTests();\n console.log(\"\\n$ * * * * All tests for index.js * * * *\");\n console.log(\n \"$ Total tests for start() - 3. Passed: \" +\n startTestNum +\n \". Failed: \" +\n (3 - startTestNum)\n );\n console.log(\n \"$ Total tests for callUno() - 2. Passed: \" +\n callUnoTestNum +\n \". Failed: \" +\n (2 - callUnoTestNum)\n );\n console.log(\n \"$ Total tests for all cheats - 4. Passed: \" +\n cheatTestNum +\n \". Failed: \" +\n (4 - cheatTestNum)\n );\n console.log(\"\\n$ * * * * End tests for index.js * * * *\");\n return startTestNum + callUnoTestNum + cheatTestNum;\n}", "function run(){\n\n\tdescribe(\"UnderseaWorld2\", function(){\n\n\t\tfindXML();\n\t\tparseXML();\n\t\tloadGame();\n\t\tsingleSpin(); // Start by doing a single spin\n\t\tfullGame();\n\t\texpandingTiles();\n\t\tbonusGame();\n\t\tbonusTime();\n\t});\n}", "async test() {\n /**\n * @summary 测试数据库连接\n * @description 测试swagger\n * @router post /home/test\n * @request body test 配置请求携带参数\n * @Request header string token eg:write your params at here\n * @response 200 JsonResult 操作结果\n */\n const { ctx } = this;\n ctx.body = await this.service.home.test();\n }", "function RunTests() {\n\n var storeIds = [175, 42, 0, 9]\n var transactionIds = [9675, 23, 123, 7]\n\n storeIds.forEach(function (storeId) {\n transactionIds.forEach(function (transactionId) {\n var shortCode = generateShortCode(storeId, transactionId);\n var decodeResult = decodeShortCode(shortCode);\n $(\"#test-results\").append(\"<div>\" + storeId + \" - \" + transactionId + \": \" + shortCode + \"</div>\");\n AddTestResult(\"Length <= 9\", shortCode.length <= 9);\n AddTestResult(\"Is String\", (typeof shortCode === 'string'));\n AddTestResult(\"Is Today\", IsToday(decodeResult.shopDate));\n AddTestResult(\"StoreId\", storeId === decodeResult.storeId);\n AddTestResult(\"TransId\", transactionId === decodeResult.transactionId);\n })\n })\n}", "function test_bottleneck_provider() {}", "createNoOpTest() {\n return () => {\n it('noop', () => { });\n };\n }", "function setupTests() {\n it(\"sets up tests correctly\", function (done) {\n var promises = [];\n targetPlatforms.forEach(function (platform) {\n promises.push(platform.getEmulatorManager().bootEmulator(TestConfig.restartEmulators));\n });\n console.log(\"Building test project.\");\n // create the test project\n promises.push(createTestProject(TestConfig.testRunDirectory)\n .then(function () {\n console.log(\"Building update project.\");\n // create the update project\n return createTestProject(TestConfig.updatesDirectory);\n }).then(function () { return null; }));\n Q.all(promises).then(function () { done(); }, function (error) { done(error); });\n });\n }", "function runTests(t, optimizely)\n{\n // prepare env\n optimizely.setOptimizely(optimizelyCode);\n\n // planning tests\n t.plan(7);\n\n // check that test line doesn't exists in teh original html\n t.equal(originalHtml.indexOf('Experiment: Text Change'), -1);\n\n // run the thing\n optimizely(req, originalHtml, function(err, html, extra)\n {\n t.equal(err, null);\n // check updated content\n t.inequal(html.indexOf('Experiment: Text Change'), -1);\n\n // check extras\n t.inequal(extra.images, null);\n t.equal(extra.images.length, 2);\n\n t.inequal(extra.cookies, null);\n t.inequal(extra.cookies.getCookieHeader().length, 0);\n });\n\n}", "beforeEach()\n {\n }", "function runTests() {\n chrome.test.runTests([\n // Create a directory (not exclusive). Should succeed.\n function createDirectorySuccessSimple() {\n test_util.fileSystem.root.getDirectory(\n TESTING_DIRECTORY.name, {create: true, exclusive: false},\n chrome.test.callbackPass(function(entry) {\n chrome.test.assertEq(TESTING_DIRECTORY.name, entry.name);\n chrome.test.assertTrue(entry.isDirectory);\n }), function(error) {\n chrome.test.fail(error.name);\n });\n },\n\n // Create a directory (exclusive). Should fail, since the directory already\n // exists.\n function createDirectoryErrorExists() {\n test_util.fileSystem.root.getDirectory(\n TESTING_DIRECTORY.name, {create: true, exclusive: true},\n function(entry) {\n chrome.test.fail('Created a directory, but should fail.');\n }, chrome.test.callbackPass(function(error) {\n chrome.test.assertEq('InvalidModificationError', error.name);\n }));\n }\n ]);\n}", "runTestCasesAndFinish()\n {\n throw new Error(\"Must be implemented by subclasses.\");\n }", "function runTest() {\n return exports.handler(test_input3, test_context, function(err, result) {\n if (err) console.error(err);\n else console.log(result);\n });\n}", "async runTests () {\n this.installBchApi()\n utils.log('bch-api dependencies installed.')\n\n await this.runUnitTests()\n\n await this.runAbcIntegrationTests()\n\n await this.runBchnIntegrationTests()\n\n utils.log('bch-api tests complete.')\n utils.log(' ')\n }", "async run(/*testRun*/) {\n Must(false, `pure virtual: kids must override`);\n }", "async function runTests() {\n await fse.remove(\"cypress/report\");\n await cypress.run({\n spec: \"cypress/integration/**/*.spec.ts\",\n });\n const jsonReport = await merge({\n reportDir: \"cypress/report\",\n });\n await generator.create(jsonReport, {\n reportDir: \"cypress/report\",\n reportTitle: \"Bridge-X E2E All Test\",\n });\n await fse.writeJson(\"cypress/report/mochawesome-stat.json\", jsonReport, { spaces: 2 });\n}" ]
[ "0.7311142", "0.7215576", "0.7158614", "0.71497166", "0.71375585", "0.71282643", "0.70235884", "0.6965342", "0.6860747", "0.6740041", "0.66761136", "0.667204", "0.6596801", "0.6586652", "0.6574469", "0.6573143", "0.64901686", "0.64839154", "0.64821684", "0.6464145", "0.64555883", "0.6451427", "0.6447958", "0.6437157", "0.64127547", "0.6371203", "0.6363358", "0.6354277", "0.63220644", "0.630933", "0.6295156", "0.6283623", "0.62712485", "0.62664413", "0.62534386", "0.62439704", "0.6239295", "0.62163305", "0.61906", "0.6189538", "0.6186276", "0.61861855", "0.615446", "0.615446", "0.615446", "0.61529595", "0.6140164", "0.6140164", "0.61356354", "0.6132541", "0.61238194", "0.6119593", "0.6117698", "0.61026466", "0.6079397", "0.6075785", "0.6075785", "0.60730565", "0.60730565", "0.60730565", "0.60593516", "0.60334605", "0.60295236", "0.60260683", "0.60171735", "0.60138613", "0.60086143", "0.60045034", "0.59917504", "0.598112", "0.59794796", "0.5972495", "0.59662503", "0.5965719", "0.5946758", "0.59441525", "0.59409636", "0.5939462", "0.5937348", "0.59372795", "0.59221774", "0.592063", "0.59081167", "0.59050006", "0.5892737", "0.58838874", "0.58805627", "0.5877298", "0.587468", "0.5871474", "0.5871052", "0.5867818", "0.58618", "0.58577657", "0.5852215", "0.58495027", "0.584774", "0.58474827", "0.5846603", "0.5843239", "0.58392644" ]
0.0
-1
List all the topics for the currentuser
loadTopics({commit}){ HTTP.get('v1/api/topic', { handlerEnabled: true } ). then(response => response.data). then(topics => { commit('SET_TOPICS', topics) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTopics(callback){\n\t$.ajax({\n\t\turl : \"/CampusTalk/rest/CampusTalkAPI/getTopics\",\n\t\tdatatype:'json',\n\t\ttype: \"post\",\n\t\tcontentType: \"application/json\",\n\t\tdata: JSON.stringify({}),\n\t}).done(function(data){\n\t\tcallback(data);\n\t});\n}", "get topicsInput() {\n return this._topics;\n }", "function getAllTopics(req, res, next) {\n console.log(\"inside get all topics\");\n db.query('SELECT * FROM topics', function(err, rows, fields) {\n if (err) throw err;\n res.status(200)\n .json({\n status: 'success',\n data: rows,\n message: 'Retrieved ALL puppies'\n });\n });\n //db.end();\n}", "async v2topictree() {\n ;`Retrieve an object with the following keys:\n articles: [],\n exercises: [],\n missions: [],\n topics: [],\n videos: []\n `\n const endpoint = \"/api/v2/topics/topictree\"\n return await this.fetchResource(endpoint, false, \"GET\")\n }", "function getTopics(res, bearerToken) {\n var url = 'https://api.twitter.com/1.1/trends/available.json';\n request({\n url: url,\n method: 'GET',\n headers: {\n \"Authorization\": \"Bearer \" + bearerToken,\n \"Content-Type\": \"application/json\"\n },\n json: true\n }, function(err, jsonResponse, body) {\n topicStrings = parseTopics(body);\n });\n}", "function topicsList() {\n let areas = [\"sdp\", \"simulations\", \"skampi\"];\n let projectsUrl = new URL(\n \"https://gitlab.com/api/v4/groups/3180705/projects?\"\n );\n\n projectsUrl.searchParams.set(\"simple\", \"true\");\n projectsUrl.searchParams.set(\"archived\", \"false\");\n projectsUrl.searchParams.set(\"include_subgroups\", \"true\");\n projectsUrl.searchParams.set(\"all_available\", \"true\");\n projectsUrl.searchParams.set(\"per_page\", \"100\");\n\n // get all results and fill the tables\n fetchRequest(projectsUrl).then((data) => {\n for (const area of areas) {\n var list = $(\"#\" + area + \" table\");\n list.empty();\n // restrict the list to files with the right tag\n //\n const data_filtered = data.filter((a) => a.tag_list.includes(area));\n // sort by name\n //\n data_filtered.sort((a, b) => a[\"name\"].localeCompare(b[\"name\"]));\n // build the table\n //\n item = ProjectTable(data_filtered);\n $(item).appendTo(list);\n }\n });\n}", "function getTopic(){\n fetch('http://localhost:3000/topic')\n .then(r => r.json())\n .then(topics => //console.log(topics))\n {\n topics.forEach(topic => addTopic(topic))\n })\n}", "async function filterByTopic() {\n // get selected topic(s)\n let selectedTopics = [];\n let topics = qsa(\"#topic-filter input\");\n for (let topic of topics) {\n if (topic.checked) selectedTopics.push(topic.value);\n }\n\n // get ids of posts from database for each topic and display results\n let results = [];\n for (let topic of selectedTopics) {\n let matches = formatResults(await getTopic(topic));\n results = results.concat(matches);\n }\n displaySearchResults(results);\n }", "function getTweet(topic) {\n var params = {\n q: topic, //'banana since:2011-11-11',\n count: numberOfResults,\n }\n T.get('search/tweets', params, gotData);\n function gotData(err, data, response) {\n var tweets = data.statuses // list of statuses\n all_tweets = ''\n for(var tweet of tweets) {\n console.log(tweet.user.screen_name + ':\\n' + tweet.text + \"\\n-----------------------\")\n all_tweets += tweet.user.screen_name + ':\\n' + tweet.text + \"\\n----------------------\\n\"\n }\n }\n}", "function addUserText() {\n topics.push(userText);\n}", "function renderTopics() {\n\t$(\"#list_items\").html(\"\");\n\n\tfor (var key in topicsDictionary) {\n\t\tvar topicDiv = $(\"#template\").clone();\n\t\tvar topicButton = topicDiv.find(\"#work-template\");\n\t\tvar timeElapsed = topicDiv.find(\"#time-elapsed\");\n\n\t\ttimeElapsed.html(formatCounter(topicsDictionary[key].time));\n\t\ttopicButton.html(topicsDictionary[key].name);\n\t\ttopicButton.val(topicsDictionary[key].id);\n\t\ttopicButton.attr(\"id\", topicsDictionary[key].id);\n\t\ttopicDiv.attr(\"id\", \"work\"+topicsDictionary[key].id);\n\t\ttimeElapsed.attr(\"id\", \"time-elapsed-\"+topicsDictionary[key].id);\n\t\ttopicDiv.find(\"#edit-topic-input\").hide();\n\t\ttopicDiv.find(\"#time-note-group\").hide();\n\t\t$(\"#list_items\").append(topicDiv);\n\t\ttopicDiv.show();\n\t}\n\n\tsetActiveTopic();\n}", "function displayTopics() {\n $(\"#articles\").html(\"\");\n var queryURL = \"https://api.nytimes.com/svc/search/v2/articlesearch.json?api-key=b878d19230834a629ac5664c8efc2ee7&q=\" + searchKey + \"&begin_date=\"+ sYear + \"0101&end_date=\"+ eYear + \"1230&page=0\"\n\n $.ajax({\n url: queryURL,\n method: 'GET'\n }).done(function(data) {\n\n $(\"#articles\").append(\"Here are \" + records + \" articles about '\" + searchKey + \"'\").addClass(\"articleLength\");\n\n for (var i = 0; i < records ; i++) {\n var record = $(\"<li>\").addClass(\"record list-group-item\");\n record.append(\"<a class='articleHeader' href=\" + data.response.docs[i].web_url + \">\" + (i+1) + \". \" + data.response.docs[i].headline.main + \"</a>\");\n record.append(\"<p class='articleAuthor'>\" + data.response.docs[i].byline.original + \"</p>\");\n\n var articles = $(\"#articles\");\n articles.append(record);\n }\n });\n }", "async function listTopics(aws) {\n var listTopicsPromise = new AWS.SNS({apiVersion: '2010-03-31', ...aws}).listTopics({}).promise();\n\n // Handle promise's fulfilled/rejected states\n return listTopicsPromise.then(function(data) {\n // A list of topic ARNs.\n console.log(data.Topics);\n // use get topic attributes to get display name of each\n // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SNS.html#getTopicAttributes-property\n return data.Topics\n }).catch(function(err) {\n console.error(err, err.stack);\n return {error: err}\n });\n}", "function queryTopics(topicLst, currentPage) {\n var sortedTopicLst = topicLst.slice(0).sort(compareVoteCnt);\n // console.log(\"topic.js topicLst variable\")\n // console.log(topicLst)\n // console.log(\"topic.js sortedTopicLst variable\")\n // console.log(sortedTopicLst)\n return getTopicsByPage(pageSize, currentPage, sortedTopicLst);\n}", "function displayTopics() {\n for (var i = 0; i < topics.length; i++) {\n $('#buttons').append('<div class=\"btn btn-info get-giphy\" data-attribute=' + topics[i] +\n '>' + topics[i] +\n '</div>');\n }\n }", "renderTopics() {\n return (\n <ul class=\"topics-container\">\n {\n this.props.topics.items.map((topic) => {\n return (\n <li key={topic.id}>\n <Link to={`/topic/${topic.id}`}>{topic.title}</Link><small> {topic.description}</small>\n </li>\n );\n })\n }\n </ul>\n );\n }", "async topic (...strings) {\n let options = {\n plaintext: strings.some(s => !(typeof s != 'string'))\n }\n return await this.runWithMiddleware('topic', options, ...strings)\n }", "function addTopics() {\n\t\tfor(i = 0 ; i < topics.length; i++) {\n\t\t\t$(\"#topics\").append(\"<button class='topic-button'>\"+topics[i]+\"</button>\");\n\t\t}\n\t}", "function showTopics() {\n // Another way to do this would be to create\n // the topic texts once and then just hide them.\n var topicsData = d3.keys(topicsTitleX);\n var topics = svg.selectAll('.topic')\n .data(topicsData);\n\n topics.enter().append('text')\n .attr('class', 'topic')\n .attr('x', function (d) { return topicsTitleX[d]; })\n .attr('y', 40)\n .attr('text-anchor', 'middle')\n .text(function (d) { return d; });\n }", "function selectTopic(topic){\n currentSubject = topic;\n var topicObj = getItemTopicsData(currentSubject);\n \n if(topicObj.data.length > 0){\n //show the stickers from the data stored\n showStickers(topicObj.data);\n }\n else\n {\n //search for the topic in the API and load the topic data\n searchSticker(topicObj);\n }\n \n $(\"#button-more\").css(\"display\",\"block\");\n}", "function pushTopic() {\n $('#userInput').click(function() {\n topics.push($('#userAdded').val());\n renderButtons();\n });\n }", "function showTopics(){\n for(var i = 0; i < topics.length; i++){\n var newTopic = $(\"<button>\");\n newTopic.attr(\"type\", \"button\");\n newTopic.text(topics[i]);\n //console.log(newTopic.text());\n $(\".topics\").append(newTopic);\n }\n }", "function useAllList() {\n d3.select(\"#corpus-ten-topics\").style(\"display\",\"none\");\n d3.select(\"#corpus-topics\").style(\"display\",\"block\");\n updateAllSelected(false);\n}", "function TopicsService(http) {\n this.http = http;\n this.http = http;\n }", "function showTodos() {\n localDB.allDocs({ // Get all docs from local PouchDB\n include_docs: true, // Get the doc contents\n startkey: 'todo:', // with startkey Todo:\n endkey: 'todo<' // Ending with \"todo<\" means just that the ID starts with \"Todo:\" as \"<\" is the next symbol\n }).then(function (result) {\n allTodos = result.rows; // Get the rows\n redrawTodosUI(); // Redraw the UI with the new ToDos\n showStatus('good', 'Read all todos'); // Promt a message\n $.JSONView(result, $('#output-data'));\n }).catch(function (err) {\n showStatus('bad', 'Problem reading all todos'); // Print an error to the UI\n console.log(err);\n });\n }", "function ListTopicQuestions(){\n\t\tquestionTimeout = {};\n\n\t\t//List Questions\n\t\tfor (var i = 0; i < currentTopicChoiceArray.length; i++) {\n\n\t\t\t//This will only be performed if the question was not already displayed\n\t\t\tif (i >= currentQuestionIndex){\t\n\n\t\t\t\t(function(i) {\n\t\t\t questionTimeout[i] = setTimeout(function() { \n\t\t\t \t\t\tcurrentQuestion = currentTopicChoiceArray[i];\n\t\t\t \tdisplayQuestionAnswer(currentQuestion);\n\t\t\t }, (i - currentQuestionIndex) * timeoutQuestionValue);\n\t\t\t \n\t\t\t })(i);\n\t\t }\n \t}\n\t}", "function show_topic(topic_name){\n hide_headlines();\n $.get('/api/topic/' + topic_name, function(data){redraw_page(data)});\n $('#nav_button').click();\n}", "function fetchTopicsAndListenForNewOnes()\r\n{\r\n \r\n $(\".topic-listings\").hide();\r\n $(\".post-listings\").hide();\r\n $(\".post-display\").hide();\r\n \r\n $(\"#table-of-topics\").empty();\r\n \r\n $(\".topic-listings\").show();\r\n \r\n let topicRef = firestore.collection('topics');\r\n\r\n topicRef.orderBy('timestamp').onSnapshot(function(topics){\r\n $(\"#table-of-topics\").empty();\r\n topics.forEach(function(topic){\r\n let topicData = topic.data();\r\n\r\n let date = new Date(topicData.timestamp);\r\n $(\"#table-of-topics\").append('<tr id = \"' + topic.id +'\" class = \"clickable\"><td>' + topicData.topicName + '</td><td>' + topicData.username + '</td><td>' + date + '</td><td>' + topicData.postCount + '</td>');\r\n // TODO: add badge with number of posts! (cool)\r\n console.log(topicData.topicName);\r\n });\r\n });\r\n}", "function buildTopics() {\n\n // Removes any text within the searchTopic div so that the text from the next item in the \n // array can be rendered\n $('#searchTopic').empty();\n\n // a for loop will continue for the length of the subjects object \n for (var i = 0; i < topics.subjects.length; i++) {\n // create a variable button that is equal to a button element in order to create dynamic\n // buttons in the page\n var button = $('<button>').addClass('topicsButtons');\n // to that button, add text that will be taken from the object subjects at each index\n button.text(topics.subjects[i].item);\n // add the attribute data-topic to each button so that each button's topic can be queried \n // using ajax by linking them together\n button.attr('data-topic', topics.subjects[i].item);\n // append the button that is created to the div with id = searchTopic so that it appears on the page\n $('#searchTopic').append(button);\n }\n }", "get topic () {\n\t\treturn this._topic;\n\t}", "get topic () {\n\t\treturn this._topic;\n\t}", "function populateTopics(){\n\tvar select = document.getElementById(\"selectTopic\");\n\tvar defaultOpt = document.createElement(\"option\");\n\tdefaultOpt.textContent = \"Select..\";\n\tdefaultOpt.value = 0;\n\tselect.appendChild(defaultOpt);\n\tgetTopics(function(result){\n\t\tif(result != null){\n\t\t\tfor(var i=0;i<result.length;i++){\n\t\t\t\tvar topicDescription = result[i].topicDescription;\n\t\t\t\tvar topicId = result[i].topicId;\n\t\t\t\tvar opt = document.createElement(\"option\");\n\t\t\t\topt.textContent = topicDescription;\n\t\t\t\topt.value = topicId;\n\t\t\t\tselect.appendChild(opt);\n\t\t\t}\n\t\t}\n\t});\n}", "function getTweets(topic){\n client.get(\"search/tweets\", \n {\n q: topic,\n result_type: \"recent\"\n }, function(error, tweets, responses){\n if (error){\n console.log(error);\n };\n dataLog(JSON.stringify(tweets));\n console.log(\"+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +\");\n console.log(\" ### Tweets ###\");\n console.log(tweets);\n console.log(\"= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\");\n console.log(\"\");\n // console.log(responses);\n });\n} //reach out to twitter and grab tweets related to userInput topic", "function getTopics(response) {\n\tconsole.log(\"Request handler 'getTopics' was called.\");\n\n\tresponse.writeHead(200, { \"Content-Type\": MIME_TYPES['.json']});\n\t\n\tvar topicNodes = new Array();\n\tfor (var i = 0; i < data.nodes.length; i++) {\n\t\tif (data.nodes[i].type == 'topic') {\n topicNodes.push(data.nodes[i]);\n\t\t}\n\t}\n\t\n topicNodes.sort(function(a, b) {\n return data.compareVoteCounts(a.id, b.id);\n });\n\tconsole.log(\"Populated topicNodes with \" + topicNodes.length + \" items\");\n\tresponse.write(JSON.stringify(topicNodes));\n\tresponse.end();\n}", "function getUsers() {\n\t\t\t\tusers.getUser().then(function(result) {\n\t\t\t\t\tvm.subscribers = result;\n\t\t\t\t\tconsole.log(vm.subscribers);\n\t\t\t\t}, function(error) {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t});\n\t\t\t}", "function forEachScopedTopic(topic, callback) {\n // this won't include individual dev topics, but\n // the vast majority of installations won't notice.\n const scopes = ['', 'staging', 'production'];\n const topics = scopes.map(scope => `${scope}${scope === '' ? '' : '-'}${topic}`);\n topics.forEach(callback);\n}", "getTopics() {\n return Object.keys(this.listeners);\n }", "function showFiltersTop1(topicLenght) {\n\tfor (var i=6; i<parseInt(topicLenght);i++) {\n\t\tvar li = \"liTopic\"+(i);\n\t\tdocument.getElementById(li).style.display = 'block';\n\t\tdocument.getElementById('f_vermas1').style.display = 'none';\n\t}\n}", "function listOfUsers() {\n request.get('https://slack.com/api/users.list?token='+\n process.env.Apptoken+'&pretty=1',function (err,requ,response)\n {\n var data= JSON.parse(response);\n usersLists=data.members;\n });//end of get users.list function\n}", "get topic() {\n\t\treturn this.__topic;\n\t}", "function Topics() {\n var arr = [];\n arr.push.apply(arr, arguments);\n arr.__proto__ = Topics.prototype;\n return arr;\n}", "function displayTopicInfo() {\n var topic = $(this).attr(\"data-name\");\n var queryURL = \"https://www.omdbapi.com/?t=\" && \"https://api.giphy.com/v1/gifs/search?q=\" + topic + \"&api_key=mAGrPIR6EkqS8JKrB22qgdxAZ5YBjzZS&limit=10\"; \n \n \n $.ajax({\n url: queryURL,\n method: \"GET\"\n }).then(function (response) {\n $(\"#topics-view\").text(JSON.stringify(response));\n });\n}", "static async getAllTopicData() {\n try { // tells our service to wait for that response and then return that value\n const response = await db.any(\n `SELECT topic_name, ranking_title FROM topics \n JOIN rankings\n ON topics.topic_score = rankings.id\n ORDER BY topics.topic_name\n `\n )\n return response;\n } catch(error) {\n console.error('ERROR: ', error);\n return error;\n }\n }", "function initilizeList() {\n for (var i = 0; i < topics.length; i++) {\n insertButton(topics[i]);\n }\n}", "function getUsers() {\n\n DashboardFactory.getUsers().then(\n\n function(response) {\n\n vm.users = response;\n console.log(response);\n \n // Get all the chats that the user is subscribed to\n getChatsForAUser();\n },\n\n function(error) {\n\n console.log(error);\n });\n }", "function getUsers() {\n subscribeService.getUsersContent()\n .then(function(data) {\n vm.data = data.slice(0, vm.data.length + 3);\n });\n }", "function showTodos() {\n db.allDocs({include_docs: true, descending: true}, function(err, doc) {\n redrawTodosUI(doc.rows);\n });\n }", "getTopicById(id, callback, errorCallback) {\n CommonUtil.requestAxios(\n baseServerAxios().get(\n UrlConstant.api.topic.GET_TOPIC_BY_ID.replace('{id}', id)\n ),\n callback,\n errorCallback\n );\n }", "function useTenList(topicArr) {\n if (topicArr.length < 10) {\n topicArr = topicArr.concat(getTenTopicsWithSelected());\n }\n d3.select(\"#corpus-topics\").style(\"display\",\"none\");\n if (d3.select(\"#corpus-ten-topics\").text() == \"\") createTenList(topicArr);\n var list = d3.select(\"#corpus-ten-topics\");\n list.style(\"display\",\"block\")\n .selectAll(\"li\").data(topicArr)\n .attr(\"data-topic\", function(d) {\n return d.key;\n })\n .select(\".color-box\")\n .style(\"background-color\", function(d){\n return tenTopics.getColor(d.key);\n })\n .select(\"i\")\n .style(\"display\", function(d) {\n return (topics.contains(d.key)) ? \"block\" : \"none\";\n })\n d3.selectAll(\"#corpus-ten-topics li .topic-words\").data(topicArr)\n .text(function(d) { return d.desc });\n}", "function getItemTopicsData(topic){\n\n var item;\n for(var i=0; i < topicsData.length; i++){\n if(topicsData[i].topic === topic){\n item = topicsData[i];\n break;\n }\n }\n return item;\n}", "function getSubscribedUsers() {\n var users = [];\n var subscribed = getSubscribedList();\n for(var user in subscribed) {\n users.push(user.toString());\n }\n return users;\n }", "function getChatsForAUser() {\n\n // Send GET request to mongoDB to get all chats associated with a specific userId\n chatFactory.getChatsForAUser(vm.userId).then(\n\n function(response) {\n \n // Zero out the # of channels and direct messages\n $rootScope.numberOfChannels = 0;\n $rootScope.numberOfDirectMessages = 0;\n\n // Display chatgroup names on the view \n $rootScope.chatGroups = response;\n \n // Determine how many chat channels and direct messages the user is subscribed to\n for (var i = 0; i < response.length; i++) {\n if (response[i].groupType !== \"direct\") {\n $rootScope.numberOfChannels++;\n } else {\n $rootScope.numberOfDirectMessages++;\n }\n }\n\n // Send socket.io server the full list of chat rooms the user is subscribed to\n chatFactory.emit('add user', {chatGroups: $rootScope.chatGroups, userid: vm.userId});\n\n // Jump to calendar state\n $state.go('main.calendar');\n },\n\n function(error) {\n\n // Jump to calendar state\n $state.go('main.calendar'); \n\n });\n\n }", "function getTopic(topic) {\n return new Promise( function(resolve) {\n // Create object and set up request\n let xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n resolve(this.responseText);\n }\n };\n\n // Pass query information into server script for GET request\n let queryString = \"?topic=\" + topic;\n xhttp.open(\"GET\", \"../backend/filter_topic.php\" + queryString, true);\n xhttp.send();\n });\n }", "function listSubs(userID, guildId) {\n if (userID && guildId) {\n sql.all('SELECT * FROM subcription WHERE userId=? and guildId=?', [userID, guildId]).then((subs) => {\n pokemon = '';\n if (subs) {\n for(i = 0; i < subs.length; i++) {\n if (pokemon.length != 0) {\n pokemon += ', ';\n }\n pokemon += subs[i].pokemon;\n }\n logger.debug(userID + ' is subscribed to ' + pokemon);\n bot.sendMessage({ to: userID, message: 'You are subscribed to ' + pokemon });\n }\n else {\n logger.debug(userID + ' is not subscribed to any pokemon');\n bot.sendMessage({ to: userID, message: 'You are not subscribed to any pokemon yet' });\n }\n }).catch((err) => {\n logger.error('Failed to get subscriptions for ' + userID + ': ' + err);\n bot.sendMessage({ to: userID, message: 'Failed to get your subscriptions' });\n });\n }\n}", "function mockGetTopics (clusterId) {\n\n // Call to GET HOST/v3/clusters/clusterId/topics\n // https://docs.confluent.io/platform/current/kafka-rest/api.html#get--clusters-cluster_id-topics\n // Parse data and return the array\n\n return [\n \"topic-1\",\n \"topic-1\",\n \"topic-2\",\n \"topic-3\",\n \"topics-4\"\n ]\n}", "function onOpen() {\n // Human readable names for the topics.\n var topicNames = {};\n topicNames[gddTopicIdUnknown] = strings.UNKNOWN;\n topicNames[gddTopicIdBusiness] = strings.BUSINESS;\n topicNames[gddTopicIdFinance] = strings.FINANCE;\n topicNames[gddTopicIdNews] = strings.NEWS;\n topicNames[gddTopicIdKids] = strings.KIDS;\n topicNames[gddTopicIdGames] = strings.GAMES;\n topicNames[gddTopicIdHealth] = strings.HEALTH;\n topicNames[gddTopicIdTravel] = strings.TRAVEL;\n topicNames[gddTopicIdScience] = strings.SCIENCE;\n topicNames[gddTopicIdShopping] = strings.SHOPPING;\n topicNames[gddTopicIdComputers] = strings.COMPUTERS;\n topicNames[gddTopicIdTechnology] = strings.TECHNOLOGY;\n topicNames[gddTopicIdProgrammer] = strings.PROGRAMMER;\n topicNames[gddTopicIdWeblogs] = strings.BLOGS;\n topicNames[gddTopicIdSocial] = strings.SOCIAL;\n topicNames[gddTopicIdSports] = strings.SPORTS;\n topicNames[gddTopicIdEntertainment] = strings.ENTERTAINMENT;\n topicNames[gddTopicIdMovies] = strings.MOVIES;\n topicNames[gddTopicIdTV] = strings.TV;\n topicNames[gddTopicIdCareers] = strings.CAREERS;\n topicNames[gddTopicIdWeather] = strings.WEATHER;\n topicNames[gddTopicIdRealestate] = strings.REAL_ESTATE;\n\n // Retrieve zip code.\n var zipCode = google.pers.data.getZipCode();\n // Retrieve top three topics.\n var topics = google.pers.data.getPopularTopics(3);\n\n var summary = strings.YOUR_ZIP_LABEL + ' ' + zipCode + '\\n' +\n '\\n';\n\n summary += strings.TOPICS_LABEL + '\\n';\n\n if (topics === undefined) {\n // If Google Desktop has no topic IDs for this user,\n // the return value is undefined.\n summary += strings.UNKNOWN;\n } else {\n // Must call toArray to convert to JavaScript array.\n topicsArray = topics.toArray();\n\n for (var i = 0; i < topicsArray.length; ++i) {\n summary += topicNames[topicsArray[i]] + '\\n';\n }\n }\n\n textLabel.innerText = summary;\n}", "list (req, res) {\n const data = this._getTodoData(req.user.username)\n\n res.json(data.items)\n }", "function listUsers() {\n $listUsers.empty();\n\n if (event) event.preventDefault();\n\n var token = localStorage.getItem('token');\n $.ajax({\n url: '/users',\n method: 'GET',\n beforeSend: function beforeSend(jqXHR) {\n if (token) return jqXHR.setRequestHeader('Authorization', 'Bearer ' + token);\n }\n }).done(function (users) {\n showUsers(users, 0, 10);\n });\n }", "function isTopic() {\n var url = window.location.pathname.split('/')\n\n return url[2] === \"topic\"\n}", "function getTopicsData() {\n\n // this line assumes that we have a variable with the same name as the this.id assigned (at the top of the file).\n var corpusPath = \"Data/\" + currentCorpus + \"-Topics.txt\";\n\n // Get the data from our JSON file\n d3.json(corpusPath, function(error, topicsData) {\n if (error) throw error;\n\n allTopicsData = topicsData;\n // var showTopicNodes = JSON.parse(JSON.stringify(topicsData));\n\n drawSunburst(allTopicsData);\n showTopTopics();\n d3.select(\"#corpusName\").html(currentCorpus);\n d3.select(\"#corpusAsOf\").html(\"As of \" + allTopicsData.runDate.replace('2017-',''));\n d3.select(\"#corpusCount\").html(allTopicsData.textCount + \" texts\");\n\n if (allTopicsData.dataDate) {\n d3.select(\"#corpusDate\").html(\"Data: \" + allTopicsData.dataDate.replace('2017-',''));\n }\n\n });\n\n}", "function showTodos() {\n db.allDocs( { include_docs: true, descending: false } ).then( doc => {\n // redrawTodosUI( doc.rows );\n // console.log(doc.rows);\n doc.rows.forEach( register => {\n console.log(register);\n });\n console.log('--------');\n });\n}", "function filtertopics(clickedMenuFilter)\n\t\t{\t\n\t\t\t$(\".menu-list-and-description .menu-description\").hide();\t\t//hides all topics data\n\t\t\t$(\".\"+clickedMenuFilter).show();\t//shows topics data related to clicked menu, based on 'data-filter' attribute which has same class used to recognize filter.\n\t\t}", "getAllTweets () {\n\t\t//Single responsibility with single flow\n\t\t// so this will communicate with api\n\t\t// so it will only send messages or meaning it will call an api\n\t\tconsole.log(1, \"get all tweets\");\n\t\tAPI.getAllTweets();\n\t}", "function collectMessagesByTopic(topic, params){\n return collectMessagesBy(\"topic\", topic, params);\n }", "componentDidMount() {\n this.getTopics();\n }", "getUserList() {\n return this.http.get(this.url + '/cesco/getlanguages', this.httpOptions);\n }", "function getTopic() {\n var topic = $(topicElement).text();\n // var topic = new Array();\n // topic.push($(\".topic-tag__1jni\").parent().firstChild().text());\n // if($(\".topic-tag__1jni\").parent().firstChild().text() != $(\".topic-tag__1jni\").parent().lastElementChild().text()){\n // topic.push($(\".topic-tag__1jni\").parent().lastElementChild().text())\n // }\n console.log(\"Topic : \" + JSON.stringify(topic));\n return topic;\n}", "function viewCategories(category){\n\tvar topicContainer = $(\"#topicContainer\");\n\tfor(var i = 0; i<category.length;i++){\n\t\tvar topicId = category[i].category_id;\n\t\tvar topicName = category[i].category_name;\n\t\ttopicContainer.append('<button class=\"btn btn-sm btn-outline-secondary tagBtn btn-topic\" id=\"topics\" data-topicId=\"'+topicId+'\">'+topicName+'</button>');\n\t}\n}", "function getSubscribedUsers() {\n\tvar users = [];\n\tvar subscribed = getSubscribedList();\n\tfor(var user in subscribed) {\n\t\tusers.push(user);\n\t}\n\treturn users;\n}", "function ImportTopics() {\n\t}", "function TopicGetter(userID,start_time,end_time) {\n\tif (!(this instanceof TopicGetter)) {\n\t\tconsole.log('TopicGetter not initialized');\n\t\treturn new TopicGetter(userID);\n\t}\n\n\tEventEmitter.call(this);\n\tvar getter = this;\n\n\tif(!end_time){\n\t\tend_time = new Date();\n\t}\n\n\tif(start_time){\n\t\t//console.log('start_time:', start_time, ' end_time:', end_time);\n\t\tTopic.find({\n\t\t\tuser: userID,\n\t\t\tupdate_time: {\n\t $gt: start_time,\n\t $lt: end_time\n\t }\n\t\t}).sort({ 'create_time' : 1 }).exec(function(err, data) {\n\t\t\tif (err) {\n\t\t\t\tgetter.emit('error', err);\n\t\t\t} else {\n\t\t\t\tgetter.emit('data', data);\n\t\t\t}\n\t\t});\n\t}else{\n\t\tTopic.find({\n\t\t\tuser: userID,\n\t\t\tupdate_time: {\n\t $lt: end_time\n\t }\n\t\t}).sort({ 'create_time' : 1 }).exec(function(err, data) {\n\t\t\tif (err) {\n\t\t\t\tgetter.emit('error', err);\n\t\t\t} else {\n\t\t\t\tgetter.emit('data', data);\n\t\t\t}\n\t\t});\n\t}\n\n\n}", "function getAllTasksForUI() {\n pubSub.publish('displayAllTasks', tasksArr);\n}", "async myTemplates(parent, args, ctx, info) {\n // check if the user has permission to see all users\n if (!ctx.request.userId) {\n throw new Error(\"You must be logged in\");\n }\n\n // query parameters where author is the current user\n return ctx.db.query.templates(\n {\n where: {\n author: {\n id: ctx.request.userId,\n },\n },\n },\n info\n );\n }", "function find_subscriptions_below(topic) {\n const path = topic.split(\"/\");\n let subs = [];\n collect_subscribers(path, root, subs);\n return subs;\n}", "function serializeUnsubscribeTopics( v, topics ) {\n for (var i = 0; i < topics.length; i++) {\n v.appendUTF8(topics[i]);\n }\n}", "function getUserList(tok) {\n\treturn new Promise(function(resolve, reject) {\n\t\trequest.get('https://slack.com/api/users.list?token='+tok,\n\t\t\tfunction (error, response, body) {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n //console.log(body);\n resolve(JSON.parse(body));\n }\n });\n\t});\n}", "function showTopicInContents(topic) {\n\t\tvar helpTop=findHelpTop();\n\t\tif (helpTop != null && helpTop.showTopicInContentsInternal){\n\t\t\treturn helpTop.showTopicInContentsInternal(helpTop, topic);\n\t\t}\n}", "function getTopicsSerially(allTopicLinks,n){\n if(n==allTopicLinks.length){\n return;\n }else{\n let url=allTopicLinks[n];\n\n request(url,cb);\n function cb(err,response,html){\n if(err){\n console.log(\"Error: \"+err);\n }else{\n extractRepositories(html); // Get Repo Links for Particular Topic\n\n // Making Serial request\n getTopicsSerially(allTopicLinks,n+1);\n }\n }\n\n }\n}", "function loadTopicButtons(){\n $('.buttons').empty();\n $.each(topics, function(i, val) {\n var topicButton = $('<button>').attr('class', 'btn').addClass('btn-primary').text(val);\n $('.buttons').append(topicButton);\n });\n }", "function clearTopics(e) {\n //topicList.innerHTML = '';\n\n // Faster\n while(topicList.firstChild) {\n topicList.removeChild(topicList.firstChild);\n }\n\n // Clear from LS\n clearTopicsFromLS();\n}", "function onConnect() {\n\n topic = \"home/poliv/#\";\n\n // Print output for the user in the messages div\n // document.getElementById(\"messages\").innerHTML += '<span>Subscribing taaaa: ' + topic + '</span><br/>';\n\n // Subscribe to the requested topic\n client.subscribe(topic);\n}", "static async getAllByTopic(topicSlug) {\n let page = 1;\n let shouldQueryMorePosts = true;\n const returnPosts = [];\n\n while (shouldQueryMorePosts) {\n const response = await this.getPaginatedByTopic(page, topicSlug);\n\n if (response.items.length > 0) {\n returnPosts.push(...response.items);\n }\n\n shouldQueryMorePosts = returnPosts.length < response.total;\n page++;\n }\n\n return returnPosts;\n }", "function getAllTopics(topicName) {\r\n var keys = Object.keys(topicListenerMap);\r\n var regExp = new RegExp(topicName);\r\n var matchingTopics = [];\r\n for(var i = 0; i < keys.length; i++) {\r\n var key = keys[i];\r\n if(regExp.test(key)) {\r\n matchingTopics.push(key);\r\n } else\r\n console.log(\"Didnot match \"+key);\r\n }\r\n return matchingTopics;\r\n}", "consume(topics, cb) {\n if (Array.isArray(topics)) {\n if (cb) {\n Promise.all(topics.map(topic => this.eventContext.get(topic)))\n .then(values => {\n const ret = {};\n values.map((val, index) => {\n ret[topics[index]] = val;\n });\n // unlink any error in cb from promise flow to let it fail\n setImmediate(() => cb(ret, this));\n })\n .catch(err => {\n if (this._catchHandler) {\n return this._catchHandler(err);\n }\n });\n return this; // for cascading style\n }\n\n const promises = topics.reduce((memo, topic) => {\n memo.push(this.eventContext.get(topic));\n return memo;\n }, []);\n\n return Promise.all(promises)\n .then(results => results.reduce((memo, data, index) => {\n memo[topics[index]] = data;\n return memo;\n }, {}));\n }\n\n // handle single topics\n if (cb) {\n this.eventContext.on(topics, data => {\n if (data instanceof Promise) {\n data.then(cb).catch(err => {\n this.define('error', err);\n });\n return;\n }\n\n cb(data, this);\n });\n return this;\n }\n return this.eventContext.get(topics);\n }", "function displayTodos() {\n\tconsole.log('My todos:', todos);\n}", "function listAllByUser(req, res, next) {\n\tconst idUser = req.user._id\n\tController.listAllInboxByUser(idUser)\n\t\t.then((list) => {\n\t\t\tresponse.success(req, res, list, 200)\n\t\t})\n\t\t.catch((err) => {\n\t\t\tresponse.error(req, res, err, 404)\n\t\t})\n}", "function getArticlesIdsByTopic(topicId) {\n return $http.get('/api/support/articles/topic/' + topicId);\n }", "getTopicByStatus(callback, errorCallback) {\n CommonUtil.requestAxios(\n baseServerAxios().get(UrlConstant.api.topic.GET_TOPIC_BY_STATUS),\n callback,\n errorCallback\n );\n }", "function displayTodos() {\n\tconsole.log('My todos: ', todos);\n}", "function getCanvasDiscussionTopics(){\n \n var arrSettings = getSettings();\n \n var domain = arrSettings['domain'];\n var token = arrSettings['token'];\n var courseNum = arrSettings['courseNum'];\n var dataCallDate = arrSettings['dataCallDate'];\n \n //create json data object\n var jsonTopic = callCanvasAPI(domain, \"courses\", courseNum, \"discussion_topics\", token, 100);\n \n //Set Headers\n var topicHeaders = {0: \"assignment_id\", 1: \"id\", 2: \"title\", 3: \"assignment.discussion_topic_id\", 4: \"published\", 5: \"author.id\", 6: \"author.display_name\", 7: \"require_initial_post\", 8: \"discussion_type\", 9: \"assignment.points_possible\", 10: \"discussion_subentry_count\", 11: \"message\"};\n\n //count records in data\n var topicLength = jsonTopic.result.length;\n\n json2Sheet(topicHeaders, jsonTopic.result, topicLength, 'discussion-topics', 'courseid', courseNum, dataCallDate);\n\n \n var doc = SpreadsheetApp.getActiveSpreadsheet();\n var sheet = doc.getSheetByName(\"discussion-topics\");\n SpreadsheetApp.setActiveSheet(sheet);\n}", "function SubjectList(){\n firebase.auth().onAuthStateChanged(function(user){\n if(user){\n var uid = user.uid;\n var ref = firebase.database().ref(\"Classes/\");\n ref.orderByChild('tid').equalTo(uid).on(\"child_added\", function(snapshot) {\n ListDisp(snapshot.key,snapshot.val().subject_code,snapshot.val().subject_name);\n });\n } \n\n });\n \n}", "function clearTopicsFromLS() {\n localStorage.clear();\n}", "function get_all_topic_information(suffix, callback) {\n var distribution = _this.topic_doc_distribution[suffix];\n var dir_dict = {\n \"UK\": \"uk/\",\n \"EU-fp7\": \"eu-fp7/fp7_\",\n \"EU-h\": \"eu-h/h2020_\",\n \"US\": \"us/\",\n \"CN\": \"cn/\"\n }\n\n for (var i = 0; i < distribution.length; i++) {\n var path = \"data/grants/\" + dir_dict[distribution[i].docClass] + distribution[i].docId + \".json\";\n //console.log(distribution[i])\n var key = distribution[i].docClass + \"-\"\n + distribution[i].docId;\n //console.log(key, path)\n if (!_this.documents[key]) {\n\n function load(doc_key, doc_num) {\n d3.json(path, function (data) {\n\n //console.log(data)\n _this.documents[doc_key] = data;\n //console.log(_this.documents)\n callback(doc_num);\n })\n }\n\n load(key, distribution.length)\n }\n }\n callback();\n\n }", "function filter_topic(topic) {\n var t = $('#repos').DataTable();\n t.column( [1] ).search(topic).draw();\n }", "function userList(){\n users.innerHTML = \"\";\n \n DATA.users.forEach(function(user){\n \n user.messages.forEach(function(el){\n \n if(el.id==user.messages.length){\n let newuser = `<ul class=\"user\" active=\"${user.id}\" ><li><div class=\"user-list-info\"> <img src=${user.avatar} alt=\"foto\"><div><h4>${user.first_name}</h4><span style=\"color: #419FD9\">${el.is_from_me? \"You\": user.first_name} : </span>\n <span>${el.text.slice(0,20)}...</span></div></div></li>\n <li><p>${el.time}</p></ul></li>`;\n users.innerHTML += newuser; \n } \n }) \n })\n \n \n}", "function getTodos(){\n\t\t\ttodoService.getTodos().then(function(response) {\n\t\t\t\t$scope.todos = response.data;\n\t\t\t});\n\t\t}", "function getUserList(){\r\n var userListforGet = [];\r\n for(var i=0;i<chatAppUsers.length;i++){\r\n userListforGet.push(chatAppUsers[i].currentUser);\r\n }\r\n return userListforGet;\r\n}", "function viewAllUsers() {\n var data = [],\n output,\n config;\n\n config = {\n columns: {\n }\n };\n data[0] = [\"User ID\".cyan, \"Full Name\".cyan, \"Username\".cyan, \"User Type\".cyan];\n let queryStr = \"users\";\n let columns = \"user_id, full_name, username, user_type\";\n\n myConnection.readFunction(columns, queryStr, function (res) {\n console.log(\"\\n Users\".magenta);\n for (let i = 0; i < res.length; i++) {\n data[i + 1] = [res[i].user_id.toString().yellow, res[i].full_name, res[i].username, res[i].user_type];\n }\n output = table.table(data, config);\n console.log(output);\n myConnection.goBack(\"Supervisor\", bamazonSupervisor.runBamazonSupervisor);\n });\n}", "function getTopicsByPage(pageSize, currentPage, topicLst) {\n var totalTopics = topicLst.length;\n if (totalTopics <= pageSize) {\n return topicLst;\n } else {\n var startIndex = (currentPage - 1) * pageSize;\n var endIndex = totalTopics;\n if (startIndex + pageSize - 1 > totalTopics - 1) {\n endIndex = totalTopics - 1;\n } else {\n endIndex = startIndex + pageSize - 1;\n } \n // console.log(\"startIndex\"+startIndex);\n // console.log(\"endIndex\"+endIndex);\n\n return topicLst.slice(startIndex, endIndex + 1);\n }\n\n}", "function queryTopics (finish) {\n let data = [], self = this;\n clearInterval(self.lookupIntervalID); // close interval. setup after lookup finished.\n http.get(`http://${self.host}:${self.port}/topics`, res => {\n res.on('data', chunk => data.push(chunk));\n res.on('end', () => {\n data = Buffer.concat(data).toString();\n parseResult(data);\n });\n }).on('error', err => {\n err.message = 'request lookupd error. Caused by:' + err.message;\n onERROR(err);\n retry();\n });\n\n function parseResult(res) {\n data = JSON.parse(res);\n console.log('lookup result', res);\n if (data.status_code !== 200) {\n console.log('C', data.status_code + data.status_txt);\n let err = new Error('NSQ Lookup failed. http response: ' + data.status_code + data.status_txt);\n onERROR(err);\n return retry();\n }\n\n\n self.topics = data.data.topics;\n finish();\n\n self.lookupIntervalID = setInterval(() => {\n queryTopics.bind(self)(() => {\n console.log('interval lookup');\n let currTopic = Object.keys(self.readers);\n if ( (self.topics.length === currTopic.length)\n && (self.topics.filter(item => currTopic.find(e => e === item)).length = self.topics.length) ) {\n // topic list not change\n return;\n }\n establish.bind(self)(self.topics);\n });\n }, LOOKUP_INTERVAL);\n }\n\n function onERROR(err) {\n self.emit('error', err);\n }\n\n function retry() {\n console.log('lookup retry');\n setTimeout(() => {\n queryTopics.bind(self)(finish);\n }, RETRY_DELAY);\n }\n}" ]
[ "0.61803305", "0.61785436", "0.61066526", "0.60641915", "0.6008511", "0.60060567", "0.5911542", "0.580387", "0.57592046", "0.57490987", "0.57178676", "0.5697992", "0.5683923", "0.56367725", "0.5634582", "0.5561254", "0.5525573", "0.55104434", "0.54635334", "0.5453716", "0.5425333", "0.54162395", "0.54157484", "0.5413503", "0.54013824", "0.5399412", "0.53772396", "0.5376999", "0.5376296", "0.53647137", "0.53647137", "0.53644145", "0.5326047", "0.5323093", "0.5309466", "0.5302043", "0.5281487", "0.5276521", "0.5274524", "0.5260592", "0.5250932", "0.52474815", "0.524117", "0.5239803", "0.52329385", "0.5226297", "0.5220627", "0.52200335", "0.52174133", "0.52030575", "0.5187898", "0.51861405", "0.51850975", "0.51825464", "0.5161118", "0.5154282", "0.5149716", "0.51435494", "0.5138956", "0.51366544", "0.51326376", "0.5127597", "0.5113906", "0.5109651", "0.5106724", "0.5097819", "0.50905573", "0.5089529", "0.50809073", "0.50653344", "0.50581914", "0.5054736", "0.50480384", "0.504773", "0.50461507", "0.5044744", "0.5042648", "0.5041799", "0.50238967", "0.5022758", "0.50141037", "0.5010448", "0.50079805", "0.49977288", "0.4992831", "0.49904087", "0.49903518", "0.49805155", "0.49787614", "0.49736688", "0.4971792", "0.49675414", "0.49641114", "0.4954647", "0.4946555", "0.49419418", "0.49413866", "0.49406946", "0.4940678", "0.4934381" ]
0.5138801
59
Load Topic based on id
loadTopicById({commit}, topic_id){ HTTP.get('v1/api/topicdetail/' + topic_id + '/', { handlerEnabled: true } ). then(response => response.data) .then(topic => { commit('SET_TOPIC', topic) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTopicById(id, callback, errorCallback) {\n CommonUtil.requestAxios(\n baseServerAxios().get(\n UrlConstant.api.topic.GET_TOPIC_BY_ID.replace('{id}', id)\n ),\n callback,\n errorCallback\n );\n }", "function findTopicById(id) {\n\n $.ajax({\n type: \"GET\",\n dataType: \"json\",\n headers: {\n \"adminbksoftwarevn\": value_token_public,\n },\n url: \"api/v1/public/topic/find-by-id?id=\" + id,\n timeout: 30000,\n success: function (result) {\n updateTopic(result);\n },\n error: function (jqXHR, textStatus, errorThrown) {\n errMess(jqXHR, textStatus, errorThrown);\n }\n });\n}", "function loadTopic(topic){\n currentTopic=topic.id;\n $('#portal').load(topic.location,function(){\n $('#topic-title').text(topic.title);\n $('.hero').css('background-image','url(\\''+topic.image+'\\')');\n restoreStudy();\n generateSectionNav();\n $(window).scrollTop(0);\n });\n }", "function getTopicById(topicId) {\n // printOut(\"searching through \" + mapTopics.result.topics.length);\n for (var m = 0; m < kiezatlas.mapTopics.result.topics.length; m++){\n //printOut(' searching through ' + mapTopics.result.topics.length + ' mapTopics');\n // printOut(\"|..checking \" + mapTopics.result.topics[m].id + '==' + topicId + ' |');\n if (topicId == kiezatlas.mapTopics.result.topics[m].id) {\n // printOut(' foundTopicById: ' + topicId);\n return kiezatlas.mapTopics.result.topics[m];\n }\n }\n return null;\n }", "function getTopicByOriginId(topicId) {\n // printOut(\"searching through \" + mapTopics.result.topics.length);\n for (var m = 0; m < mapTopics.result.topics.length; m++){\n //printOut(' searching through ' + mapTopics.result.topics.length + ' mapTopics');\n // printOut(\"|..checking \" + mapTopics.result.topics[m].id + '==' + topicId + ' |');\n if (topicId == mapTopics.result.topics[m].originId) {\n // printOut(' foundTopicById: ' + topicId);\n return mapTopics.result.topics[m];\n }\n }\n return null;\n }", "loadSubTopicId ({commit}, sub_topic_id){\n HTTP.get('v1/api/subsection/' + sub_topic_id + '/', \n {\n handlerEnabled: true\n }\n ).\n then(response => response.data).\n then(sub_topic => {\n commit('SET_SUBTOPICS', sub_topic)\n })\n }", "function getArticlesIdsByTopic(topicId) {\n return $http.get('/api/support/articles/topic/' + topicId);\n }", "function selectTopic(topic){\n currentSubject = topic;\n var topicObj = getItemTopicsData(currentSubject);\n \n if(topicObj.data.length > 0){\n //show the stickers from the data stored\n showStickers(topicObj.data);\n }\n else\n {\n //search for the topic in the API and load the topic data\n searchSticker(topicObj);\n }\n \n $(\"#button-more\").css(\"display\",\"block\");\n}", "function loadTopics(dataset, numTopics, dataSource) {\n\tclearCanvas();\n\tmessage(\"<h5>loading topics ...</h5>\");\n\n\tif (dataset) {\n\t setSelectedDataset(dataset + \"/\" + numTopics);\n\t}\n\n\tif (dataSource) {\n\t setDataSource(dataSource);\n\t}\n\n\ttry {\n\t\tvar socket = getWebsocket();\n\t\tsocket.onopen = function() {\n\t\t\tsendRequest(socket, {\n\t\t\t\trequest : \"LOAD_TOPICS\",\n\t\t\t\tdataset : dataset ? dataset : getSelectedDataset(),\n\t\t\t\tnumTopics : numTopics ? numTopics : getNumberOfTopics(),\n\t\t\t\tdataSource : dataSource ? dataSource : getDataSource()\n\t\t\t});\n\t\t}\n\t\tsocket.onmessage = function(msg) {\n\t\t\tclearCanvas();\n\t\t\tif (msg.data == \"MODEL_NOT_AVAILABLE\") {\n\t\t\t\trenderNoDataAvailable();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar result = $.parseJSON(msg.data);\n\t\t\t\t\t\t\t\t\n\t\t\t$(\"#container\").append(getTopicMatrixViewNav());\n\t\t\t\n\t\t\tfor (var i=0; i<result.length; i++) {\n\t\t\t\t\n\t\t\t\tvar renderContent = \"<h3 class=\\\"data-source-description topic\" \n\t\t\t\t\t\t\t\t\t\t+ i + \"\\\" id=\\\"topic_title_\" + i + \"\\\">topic.\" \n\t\t\t\t\t\t\t\t\t\t+ i + \"</h3><div id=\\\"topic\" + i + \"\\\" class=\\\"isotope\\\">\";\n\n\t\t\t\tfor (var j=0; j<result[i].length; j++) {\n\t\t\t\t\t\n\t\t\t\t\tvar name = result[i][j][0];\n\t\t\t\t\tvar weight = result[i][j][1];\n\t\t\t\t\t\n\t\t\t\t\trenderContent += \"<div><a href=\\\"#\\\" rel=\\\"tooltip\\\" title=\\\"topic weight : \" + weight + \"\\\" class=\\\"item group\" \n\t\t\t\t\t\t\t\t\t\t\t+ getGroup(weight, j) \n\t\t\t\t\t\t\t\t\t\t\t+ \"\\\" onclick=loadKeywordDescription(\\\"\" + name + \"\\\")>\" \n\t\t\t\t\t\t\t\t\t\t\t+ name + \"</a></div>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trenderContent += \"</div>\";\n\t\t\t\trenderContent += \"<hr>\";\n\t\t\t\t\n\t\t\t\t$(\"#container\").append(renderContent);\n\t\t\t\t\n\t\t\t\t$('.topic' + i).editable(TOPIC_RENAME_POST_URI + \"/\" + getSelectedDataset() + \"/\" + getNumberOfTopics(), {\n\t\t\t\t\tindicator : 'updating...'\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$(\"#topic\" + i).isotope({\n\t\t\t\t\tmasonry: {\n\t\t\t\t\t\tcolumnWidth: 70\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t$('#topic' + i).tooltip('show');\n\n\t\t\t}\n\t\t}\n\t\tsocket.onclose = function() {\n\t\t socket.close();\n\t\t}\n\t} catch (exception) {\n\t\tmessage(\"error loading topics...\");\n\t}\n}", "constructor(id, topic_name, topic_score) {\n this.id = id;\n this. topic_name = topic_name;\n this.topic_score = topic_score;\n }", "function showExploreTopic(store, id) {\n store.dispatch('CORE_SET_PAGE_LOADING', true);\n store.dispatch('SET_PAGE_NAME', PageNames.EXPLORE_ROOT);\n\n const attributesPromise = Resources.getModel(id).fetch();\n const childrenPromise = Resources.getCollection({ parent: id }).fetch();\n\n Promise.all([attributesPromise, childrenPromise])\n .then(([attributes, children]) => {\n const pageState = { id };\n pageState.topic = _topicState(attributes);\n const collection = _collectionState(children);\n pageState.subtopics = collection.topics;\n pageState.contents = collection.contents;\n store.dispatch('SET_PAGE_STATE', pageState);\n store.dispatch('CORE_SET_PAGE_LOADING', false);\n store.dispatch('CORE_SET_ERROR', null);\n })\n .catch((error) => {\n store.dispatch('CORE_SET_ERROR', JSON.stringify(error, null, '\\t'));\n store.dispatch('CORE_SET_PAGE_LOADING', false);\n });\n}", "loadTopics({commit}){\n HTTP.get('v1/api/topic', \n {\n handlerEnabled: true\n }\n ).\n then(response => response.data).\n then(topics => {\n commit('SET_TOPICS', topics)\n })\n }", "function checkFeatureByTopicId(givenId) {\n for ( i=0; i<kiezatlas.layer.features.length; i++ ) {\n if ( kiezatlas.layer.features[i].data.topicId == givenId ) { // deep copy seem to not copy \"prototyped\" properties?\n return kiezatlas.layer.features[i];\n }\n }\n // if (debug) log(\"[ERROR] found no feature on myNewLayer for \" + givenId);\n return null;\n }", "onTopicClick(topic) {\n if (topic.rowid === this.currentTopic) {\n return;\n }\n\n this.currentTopic = topic.rowid;\n localStorage.setItem('currentTopic', this.currentTopic);\n this.loadSelections();\n }", "function getTopic(topic) {\n return new Promise( function(resolve) {\n // Create object and set up request\n let xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n resolve(this.responseText);\n }\n };\n\n // Pass query information into server script for GET request\n let queryString = \"?topic=\" + topic;\n xhttp.open(\"GET\", \"../backend/filter_topic.php\" + queryString, true);\n xhttp.send();\n });\n }", "function roomTopic()\r\n{ \r\n\t$('#topic_text').load(\"core/rc.listings.php?list=topic&rid=\"+room); \r\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n if (!topic) {\n topic = data.topic(name.substring(0, 1).toUpperCase() + name.substring(1));\n topic.y = 0;\n updateTopics(data.topics);\n }\n return topic;\n}", "function getTopic(){\n fetch('http://localhost:3000/topic')\n .then(r => r.json())\n .then(topics => //console.log(topics))\n {\n topics.forEach(topic => addTopic(topic))\n })\n}", "function findOrAddTopic(name) {\n var topic = findTopic(name);\n return topic;\n}", "function show_topic(topic_name){\n hide_headlines();\n $.get('/api/topic/' + topic_name, function(data){redraw_page(data)});\n $('#nav_button').click();\n}", "function getItemTopicsData(topic){\n\n var item;\n for(var i=0; i < topicsData.length; i++){\n if(topicsData[i].topic === topic){\n item = topicsData[i];\n break;\n }\n }\n return item;\n}", "function getById(id) {\n return db.hgetallAsync(KEYS.id2article(id))\n .then(format);\n}", "function checkFeatureById(topicId) {\n if ( kiezatlas.layer != null ) {\n for( i = 0; i < kiezatlas.layer.features.length; i++ ) {\n if( kiezatlas.layer.features[i].data.topicId == topicId ) {\n // log(\"found a feature \"+ myNewLayer.features[i].id + \" on myNewLayer.. displayStyle is:\"\n // + myNewLayer.features[i].attributes);\n return kiezatlas.layer.features[i];\n }\n }\n }\n return null;\n }", "function Topicmap(topicmap_id) {\n\n // Model\n var topics = {} // topics of this topicmap (key: topic ID, value: Topic object)\n var relations = {} // relations of this topicmap (key: relation ID, value: Relation object)\n\n load()\n\n this.display_on_canvas = function() {\n\n // track loading of topic type images\n var image_tracker = create_image_tracker(display_on_canvas)\n for (var id in topics) {\n var topic = topics[id]\n if (topic.visible) {\n image_tracker.add_type(topic.type)\n }\n }\n image_tracker.check()\n\n function display_on_canvas() {\n canvas.clear()\n for (var id in topics) {\n var topic = topics[id]\n if (topic.visible) {\n canvas.add_topic(topic.id, topic.type, topic.label, false, false, topic.x, topic.y)\n }\n }\n for (var id in relations) {\n var rel = relations[id]\n canvas.add_relation(rel.id, rel.doc1_id, rel.doc2_id)\n }\n canvas.refresh()\n }\n }\n\n this.show_topic = function(id, type, label, x, y) {\n var topic = topics[id]\n if (!topic) {\n if (LOG_TOPICMAPS) log(\"Adding topic \" + id + \" (\\\"\" + label + \"\\\") to topicmap \" + topicmap_id)\n // update DB\n var ref_fields = {\n topic_pos: {x: x, y: y},\n topic_visible: true\n }\n var ref = create_relation(\"Topic Ref\", topicmap_id, id, ref_fields)\n // update model\n topics[id] = new Topic(id, type, label, x, y, true, ref._id)\n } else if (!topic.visible) {\n if (LOG_TOPICMAPS) log(\"Showing topic \" + id + \" (\\\"\" + topic.label + \"\\\") on topicmap \" + topicmap_id)\n topic.set_visible(true)\n return {x: topic.x, y: topic.y}\n } else {\n if (LOG_TOPICMAPS) log(\"Topic \" + id + \" (\\\"\" + label + \"\\\") already visible in topicmap \" + topicmap_id)\n }\n }\n\n this.add_relation = function(id, doc1_id, doc2_id) {\n if (!relations[id]) {\n if (LOG_TOPICMAPS) log(\"Adding relation \" + id + \" to topicmap \" + topicmap_id)\n // update DB\n var ref = create_relation(\"Relation Ref\", topicmap_id, id)\n // update model\n relations[id] = new Relation(id, doc1_id, doc2_id, ref._id)\n } else {\n if (LOG_TOPICMAPS) log(\"Relation \" + id + \" already in topicmap \" + topicmap_id)\n }\n }\n\n this.move_topic = function(id, x, y) {\n var topic = topics[id]\n // update DB\n var ref = db.open(topic.ref_id)\n ref.topic_pos = {x: x, y: y}\n if (LOG_TOPICMAPS) log(\"Moving topic \" + id + \" (x=\" + x + \" y=\" + y + \")\")\n save_document(ref)\n // update model\n topic.x = x\n topic.y = y\n }\n\n this.hide_topic = function(id) {\n var topic = topics[id]\n if (LOG_TOPICMAPS) log(\"Hiding topic \" + id + \" (\\\"\" + topic.label + \"\\\") on topicmap \" + topicmap_id)\n topic.set_visible(false)\n }\n\n this.delete_topic = function(id) {\n // Note: all topic references are deleted already\n delete topics[id]\n }\n\n this.remove_relation = function(id) {\n // 1) update DB\n if (LOG_TOPICMAPS) log(\"Removing relation \" + id + \" from topicmap \" + topicmap_id)\n var ref = db.open(relations[id].ref_id)\n if (ref) {\n // delete relation reference\n db.deleteDoc(ref)\n } else {\n if (LOG_TOPICMAPS) log(\"### ERROR at Topicmap.remove_relation: Reference for relation \" + id +\n \" in topicmap \" + topicmap_id + \" not found in DB.\")\n }\n // 2) update model\n delete relations[id]\n }\n\n this.get_topic = function(id) {\n return topics[id]\n }\n\n function load() {\n\n load_topics()\n load_relations()\n\n function load_topics() {\n // Round 1: load topic references and init position\n if (LOG_TOPICMAPS) log(\"Loading topicmap \" + topicmap_id)\n var rows = db.view(\"deepamehta3/dm3-topicmaps\", {key: [topicmap_id, \"Topic\"]}).rows\n var topic_ids = []\n if (LOG_TOPICMAPS) log(\"..... \" + rows.length + \" topics\")\n for (var i = 0, row; row = rows[i]; i++) {\n var topic_id = row.value.topic_id\n var pos = row.value.pos\n var visible = row.value.visible\n topic_ids.push(topic_id)\n topics[topic_id] = new Topic(topic_id, undefined, undefined, pos.x, pos.y, visible, row.id)\n }\n // Round 2: init topic type and topic label\n var tpcs = get_topics(topic_ids)\n for (var i = 0, t; t = tpcs[i]; i++) {\n var topic = topics[t.id]\n if (LOG_TOPICMAPS) log(\".......... \" + t.id + \" (\\\"\" + t.label + \"\\\"), visible=\" + topic.visible)\n topic.type = t.type\n topic.label = t.label\n }\n }\n\n function load_relations() {\n // Round 1: load relation references\n var rows = db.view(\"deepamehta3/dm3-topicmaps\", {key: [topicmap_id, \"Relation\"]}).rows\n var rel_ids = []\n if (LOG_TOPICMAPS) log(\"..... \" + rows.length + \" relations\")\n for (var i = 0, row; row = rows[i]; i++) {\n var rel_id = row.value.relation_id\n rel_ids.push(rel_id)\n relations[rel_id] = new Relation(rel_id, undefined, undefined, row.id)\n }\n // Round 2: init doc IDs\n var rltns = get_relations(rel_ids)\n for (var i = 0, r; r = rltns[i]; i++) {\n if (LOG_TOPICMAPS) log(\".......... \" + r.id)\n var rel = relations[r.id]\n rel.doc1_id = r.doc1_id\n rel.doc2_id = r.doc2_id\n }\n }\n }\n\n /*** Model Classes ***/\n\n function Topic(id, type, label, x, y, visible, ref_id) {\n this.id = id\n this.type = type\n this.label = label\n this.x = x\n this.y = y\n this.visible = visible\n this.ref_id = ref_id\n\n this.set_visible = function(visible) {\n // update DB\n var ref = db.open(this.ref_id)\n if (ref) {\n ref.topic_visible = visible\n save_document(ref)\n } else {\n if (LOG_TOPICMAPS) log(\"### ERROR at Topicmap.Topic.set_visible: Reference for topic \" + this.id + \" (\\\"\" +\n this.label + \"\\\") in topicmap \" + topicmap_id + \" not found in DB (visible=\" + visible + \").\")\n }\n // update model\n this.visible = visible\n }\n }\n\n function Relation(id, doc1_id, doc2_id, ref_id) {\n this.id = id\n this.doc1_id = doc1_id\n this.doc2_id = doc2_id\n this.ref_id = ref_id\n }\n }", "function loadTopicSubTopicTemplate(event, data) {\n var templateID = 'faq-topics-subtopic-content';\n compiledTemplates[templateID] || loadTemplate(templateID);\n var $target = $(event.target);\n var $faqSubTopics=$target.next().next('.catSubtopic');\n\n $target.closest(\".faq-nav-display > section\").data(\"sortsubtopics\") && data.items.sort(byTitle)\n\n dust.render(templateID, data, function(err, out) { $faqSubTopics.html($(out)); });\n $faqSubTopics.find('ul').slideDown();\n $('span.FAQLabel:last').addClass('twc-last');\n $target.addClass('expanded');\n //this is chrome specific to force refresh of css\n $('body').addClass('refresh');\n //this is chrome specific to force refresh of css\n $('body').removeClass('refresh');\n $target.find('span.FAQLabel').first().trigger(CLICK);\n }", "function selectTopic() {\n\t//Topic is different than existing active topic\n\tif (selectedTopicID != $(this).val()) {\n\t\tif (selectedTopicID != null && selectedTopicID != \"\") {\n\t\t\tstopTimer();\n\t\t\tunsetActiveTopic();\n\t\t}\n\n\t\tselectedTopicID = $(this).val();\n\t\tstoreSelectedTopicID();\n\n\t\tsetActiveTopic();\n\t\tstartTimer();\n\n\t\tdocument.title = \"Work Log - \" + topicsDictionary[selectedTopicID].name;\n\t} else {\n\t\ttoggleTimer(!isWorkingOnTask);\n\t}\n\n\trenderEvents();\n\tstoreLocalStorage(eventsLogList, topicsDictionary, selectedTopicID);\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "function findTopic(name) {\n for (var i = 0, n = data.topics.length, t; i < n; ++i) {\n if ((t = data.topics[i]).name === name || new RegExp(\"^\" + (t = data.topics[i]).re.source + \"$\", \"i\").test(name)) {\n return t;\n }\n }\n}", "changeTopic(newTopic) {\n let url = defaultUrl + '&category=' + newTopic;\n this.apiCall(url);\n }", "function getStoryById(id) {\n var def = $q.defer();\n $http.get(\"https://hacker-news.firebaseio.com/v0/item/\" + id + \".json \")\n .success(function (data) {\n def.resolve(data);\n data.url = $sce.trustAsResourceUrl(data.url);\n data.isClicked = false;\n service.stories.push(data);\n console.log('Story returned to controller.', data);\n })\n .error(function () {\n def.reject(\"Failed to get story for id:\" + id);\n });\n return def.promise;\n }", "function getTopic(topic){\n\n\t\t// Get correct title and subtitle\n\t\tif (topic === \"income\"){\n\t\t\ttitel = \"Yearly income\";\n\t\t\tsubtitel = \"x 1000 euro\";\n\t\t}\n\t\telse if (topic === \"birthsanddeaths\"){\n\t\t\ttitel = \"Amount of births and deaths\";\n\t\t\tsubtitel = \"Per 1000 people\";\n\t\t}\n\t\telse if (topic === \"causesofdeath\"){\n\t\t\ttitel = \"Causes of Death\";\n\t\t\tsubtitel = \"Per 1000 people\";\n\t\t}\n\t\telse if (topic === \"migration\"){\n\t\t\ttitel = \"Migration\";\n\t\t\tsubtitel = \"Percentages\";\n\t\t}\n\t\telse if (topic === \"socialsecurity\"){\n\t\t\ttitel = \"Social Security\";\n\t\t\tsubtitel = \"Per 1000 people\";\n\t\t}\n\t\telse if (topic === \"education\")\n\t\t{\n\t\t\ttitel = \"Highest level of Education\";\n\t\t\tsubtitel = \"Per 1000 people\";\n\t\t}\n\n\t\treturn texts = {\n\t\t\ttitel : titel,\n\t\t\tsubtitel : subtitel\n\t\t};\n}", "function editTopic(id) {\n $.ajax({\n type: 'GET',\n url: urlToRestApi + \"/\" +id,\n dataType: 'JSON',\n // data: 'action_type=data&id=' + id,\n success: function (data) {\n $('#id').val(data.topic.id);\n $('#nom').val(data.topic.nom);\n $('#code').val(data.topic.code);\n \n }\n });\n}", "function switchTopic(key) {\n alert(\"Switching topics not yet implemented\");\n}", "function addNewTopic(topic) {\n\tif (topic != \"\") {\n\t\tconsole.log(\"Adding new task: \" + topic);\n\t\tvar topicId = Math.floor(100000 + Math.random() * 900000);\n\t\ttopicsDictionary[topicId] = {id: topicId, name: topic, time: 0};\n\n\t\tif (selectedTopicID == \"\" || selectedTopicID == null || isWorkingOnTask == false) {\n\t\t\tselectedTopicID = topicId;\n\t\t\tstoreSelectedTopicID();\n\t\t}\n\t\tstoreTopics();\n\t}\n}", "function subscribe(name, id, callback, timeout) {\n if (typeof name !== s_string) {\n throw new TypeError('topic name must be a string.');\n }\n if (id === undefined || id === null) {\n if (typeof callback === s_function) {\n id = callback;\n }\n else {\n throw new TypeError('callback must be a function.');\n }\n }\n if (typeof id === s_function) {\n timeout = callback;\n callback = id;\n if (_id === null) {\n _id = autoId();\n }\n _id.then(function(id) {\n subscribe(name, id, callback, timeout);\n });\n return;\n }\n if (typeof callback !== s_function) {\n throw new TypeError('callback must be a function.');\n }\n if (Future.isPromise(id)) {\n id.then(function(id) {\n subscribe(name, id, callback, timeout);\n });\n return;\n }\n if (timeout === undefined) { timeout = _timeout; }\n var topic = getTopic(name, id, true);\n if (topic === null) {\n var cb = function() {\n _invoke(self, name, [id, topic.handler, cb, {\n idempotent: true,\n failswitch: false,\n timeout: timeout\n }], false);\n };\n topic = {\n handler: function(result) {\n var topic = getTopic(name, id, false);\n if (topic) {\n if (result !== null) {\n var callbacks = topic.callbacks;\n for (var i = 0, n = callbacks.length; i < n; ++i) {\n try {\n callbacks[i](result);\n }\n catch (e) {}\n }\n }\n if (getTopic(name, id, false) !== null) { cb(); }\n }\n },\n callbacks: [callback]\n };\n _topics[name][id] = topic;\n cb();\n }\n else if (topic.callbacks.indexOf(callback) < 0) {\n topic.callbacks.push(callback);\n }\n }", "function viewForum(id) {\r\n \r\n var deferred = $q.defer();\r\n\r\n $http.get(BASE_URL + '/forum/' + id)\r\n .then (\r\n function(response) {\r\n deferred.resolve(response.data);\r\n },\r\n function(errResponse) {\r\n deferred.reject(errResponse);\r\n }\r\n );\r\n return deferred.promise;\r\n }", "function setTopic( text ) {\n info.setTopic( text );\n}", "addTopic(topic) {\n if(topic in this.listeners) return;\n var listener = new ROSLIB.Topic({\n ros : ros,\n name : topic,\n messageType : 'sensor_msgs/NavSatFix'\n });\n listener.color = this.COLORS[this.topicN++ % this.COLORS.length];\n this.listeners[topic] = listener;\n var that = this;\n listener.subscribe(function(message) {\n if(!message) return;\n if(!message.latitude || !message.longitude) return;\n var marker = L.circleMarker([message.latitude, message.longitude], { renderer: that.renderer, color: this.color, radius: 3 });\n marker.addTo(that.map);\n if(!(topic in that.markersByTopic)) {\n that.markersByTopic[topic] = [];\n }\n that.markersByTopic[topic].push(marker);\n while(that.markersByTopic[topic].length > 1024) {\n that.map.removeLayer(that.markersByTopic[topic][0]);\n that.markersByTopic[topic].shift();\n }\n that.lastMessage = message;\n });\n }", "async v2topictree() {\n ;`Retrieve an object with the following keys:\n articles: [],\n exercises: [],\n missions: [],\n topics: [],\n videos: []\n `\n const endpoint = \"/api/v2/topics/topictree\"\n return await this.fetchResource(endpoint, false, \"GET\")\n }", "function loadFavorite(id){\r\n\t\tctrl.favorite = null;\r\n \tFavoriteSvc.fetch($stateParams.id).then(function(favorite){\r\n \t\tctrl.favorite = favorite;\r\n\t\t\tif(ctrl.favorite){\r\n\t\t\t\tctrl.loaded = true;\r\n\t\t\t} else {\r\n\t\t\t\t$state.go( 'app.favorite-list', null, {reload: true} );\r\n\t\t\t}\r\n \t});\r\n\t}", "function loadContent(){\n\n \tlet topicToLoad = $(\"#topicTitle\").text();\n \talert (topicToLoad);\n \t$.ajax({\n \t \ttype:\"POST\",\n \t \turl: \"php/results.php\",\n \t \tdata: {topic: topicToLoad},\n \t \tsuccess: function(result){\n \t\t$(\"#theContent\").html(result);\n \t\t}});\n }", "function read(id, cb) {\n const key = ds.key([kind, parseInt(id, 10)]);\n ds.get(key, (err, entity) => {\n cb(null, fromDatastore(entity));\n });\n}", "function loadArticle() {\n // obtenemos los detalles del articulo\n var articleId = findGetParameter('id');\n var articleUrl = './data/data-' + articleId + '.json';\n retrieveData(articleUrl);\n}", "function toggleMarkerById(topicId) {\n // myNewLayer\n var featureToToggle = checkFeatureById(topicId);\n if (featureToToggle != null) {\n // console.log(\"featureObject: is \", featureToToggle);\n var featureRenderState = featureToToggle.renderIntent;\n // log(\"featureToToggle is available and visible: \" + featureRenderState);\n // console.log(\"featureRenderState\", featureRenderState);\n if (featureRenderState == \"delete\") {\n // not visible, definitely show\n featureToToggle.renderIntent = \"default\";\n kiezatlas.layer.redraw();\n // featureToToggle.toState(\"default\");\n } else {\n // visible, but maybe delete\n var catIds = getMarkerCategories(topicId);\n var showMarker = false;\n // if _any category is visible, topic/mark it to be shown\n for (var j = 0; j < catIds.length; j++) {\n if (isCategoryVisible(catIds[j])) {\n showMarker = true;\n // log(\"> leaving topic right in map \" + topicId + ' cause ' + catIds[j] + ' is in ' + markerGroupIds);\n // do nothing more, for this topic its decided\n }\n }\n if (!showMarker) {\n // feature ausblenden\n featureToToggle.renderIntent = \"delete\";\n // console.log(\"featureIntent:\", featureToToggle);\n kiezatlas.layer.redraw();\n }\n }\n }\n }" ]
[ "0.731427", "0.7195262", "0.6999266", "0.6855958", "0.6639076", "0.6422187", "0.60510576", "0.603818", "0.60175925", "0.59948015", "0.59935004", "0.59297246", "0.5847106", "0.584337", "0.58289504", "0.5776899", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.57333785", "0.5718967", "0.5705812", "0.57015413", "0.569858", "0.56918335", "0.56773514", "0.5630157", "0.56264883", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.5610394", "0.560366", "0.55934536", "0.5574995", "0.55700624", "0.55104625", "0.5490985", "0.54787606", "0.5402239", "0.5384005", "0.5371704", "0.53619605", "0.5356218", "0.5344531", "0.5334463", "0.53306204", "0.5330342" ]
0.7124647
2
Load Sub Topics by IS
loadSubTopicId ({commit}, sub_topic_id){ HTTP.get('v1/api/subsection/' + sub_topic_id + '/', { handlerEnabled: true } ). then(response => response.data). then(sub_topic => { commit('SET_SUBTOPICS', sub_topic) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadTopicSubTopicTemplate(event, data) {\n var templateID = 'faq-topics-subtopic-content';\n compiledTemplates[templateID] || loadTemplate(templateID);\n var $target = $(event.target);\n var $faqSubTopics=$target.next().next('.catSubtopic');\n\n $target.closest(\".faq-nav-display > section\").data(\"sortsubtopics\") && data.items.sort(byTitle)\n\n dust.render(templateID, data, function(err, out) { $faqSubTopics.html($(out)); });\n $faqSubTopics.find('ul').slideDown();\n $('span.FAQLabel:last').addClass('twc-last');\n $target.addClass('expanded');\n //this is chrome specific to force refresh of css\n $('body').addClass('refresh');\n //this is chrome specific to force refresh of css\n $('body').removeClass('refresh');\n $target.find('span.FAQLabel').first().trigger(CLICK);\n }", "function loadTopics(dataset, numTopics, dataSource) {\n\tclearCanvas();\n\tmessage(\"<h5>loading topics ...</h5>\");\n\n\tif (dataset) {\n\t setSelectedDataset(dataset + \"/\" + numTopics);\n\t}\n\n\tif (dataSource) {\n\t setDataSource(dataSource);\n\t}\n\n\ttry {\n\t\tvar socket = getWebsocket();\n\t\tsocket.onopen = function() {\n\t\t\tsendRequest(socket, {\n\t\t\t\trequest : \"LOAD_TOPICS\",\n\t\t\t\tdataset : dataset ? dataset : getSelectedDataset(),\n\t\t\t\tnumTopics : numTopics ? numTopics : getNumberOfTopics(),\n\t\t\t\tdataSource : dataSource ? dataSource : getDataSource()\n\t\t\t});\n\t\t}\n\t\tsocket.onmessage = function(msg) {\n\t\t\tclearCanvas();\n\t\t\tif (msg.data == \"MODEL_NOT_AVAILABLE\") {\n\t\t\t\trenderNoDataAvailable();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar result = $.parseJSON(msg.data);\n\t\t\t\t\t\t\t\t\n\t\t\t$(\"#container\").append(getTopicMatrixViewNav());\n\t\t\t\n\t\t\tfor (var i=0; i<result.length; i++) {\n\t\t\t\t\n\t\t\t\tvar renderContent = \"<h3 class=\\\"data-source-description topic\" \n\t\t\t\t\t\t\t\t\t\t+ i + \"\\\" id=\\\"topic_title_\" + i + \"\\\">topic.\" \n\t\t\t\t\t\t\t\t\t\t+ i + \"</h3><div id=\\\"topic\" + i + \"\\\" class=\\\"isotope\\\">\";\n\n\t\t\t\tfor (var j=0; j<result[i].length; j++) {\n\t\t\t\t\t\n\t\t\t\t\tvar name = result[i][j][0];\n\t\t\t\t\tvar weight = result[i][j][1];\n\t\t\t\t\t\n\t\t\t\t\trenderContent += \"<div><a href=\\\"#\\\" rel=\\\"tooltip\\\" title=\\\"topic weight : \" + weight + \"\\\" class=\\\"item group\" \n\t\t\t\t\t\t\t\t\t\t\t+ getGroup(weight, j) \n\t\t\t\t\t\t\t\t\t\t\t+ \"\\\" onclick=loadKeywordDescription(\\\"\" + name + \"\\\")>\" \n\t\t\t\t\t\t\t\t\t\t\t+ name + \"</a></div>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trenderContent += \"</div>\";\n\t\t\t\trenderContent += \"<hr>\";\n\t\t\t\t\n\t\t\t\t$(\"#container\").append(renderContent);\n\t\t\t\t\n\t\t\t\t$('.topic' + i).editable(TOPIC_RENAME_POST_URI + \"/\" + getSelectedDataset() + \"/\" + getNumberOfTopics(), {\n\t\t\t\t\tindicator : 'updating...'\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$(\"#topic\" + i).isotope({\n\t\t\t\t\tmasonry: {\n\t\t\t\t\t\tcolumnWidth: 70\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t$('#topic' + i).tooltip('show');\n\n\t\t\t}\n\t\t}\n\t\tsocket.onclose = function() {\n\t\t socket.close();\n\t\t}\n\t} catch (exception) {\n\t\tmessage(\"error loading topics...\");\n\t}\n}", "loadTopics({commit}){\n HTTP.get('v1/api/topic', \n {\n handlerEnabled: true\n }\n ).\n then(response => response.data).\n then(topics => {\n commit('SET_TOPICS', topics)\n })\n }", "function initiateSubCategories(subtopic) \n{\n\tdocument.getElementById('backBtn').removeAttribute(\"disabled\");\n\tdocument.getElementById('categoryTitle').innerHTML = subtopic;\n\tvar div = document.getElementById('categoryContainer');\n\tstrPath += \"/\" + subtopic; // Updated location string with subtopic\n\n\tclearButtons(div);\n\tsetCategories(strPath);\n}", "function loadTopic(topic){\n currentTopic=topic.id;\n $('#portal').load(topic.location,function(){\n $('#topic-title').text(topic.title);\n $('.hero').css('background-image','url(\\''+topic.image+'\\')');\n restoreStudy();\n generateSectionNav();\n $(window).scrollTop(0);\n });\n }", "function ImportTopics() {\n\t}", "async function loadTopics() {\n let courseID = document.getElementById(\"courseIdMod\").value.toString();\n let contentList = db.collection(\"courses\").doc(courseID).collection(\"content\").doc(\"contentLinks\");\n contentList.get().then((doc) => {\n if (doc.exists) {\n let dat = doc.data();\n dat.articlesIDs.forEach((element,i) => {\n const opt = \"<option name=\\\"\" + dat.articleTitles[i] + \"\\\" value=\\\"\" + element + \"\\\">\" + dat.articleTitles[i] + \"</option>\";\n let dom = new DOMParser().parseFromString(opt,'text/html');\n let opt_element = dom.body.firstElementChild;\n document.getElementById('subtopics').append(opt_element);\n });\n } else {\n // doc.data() will be undefined in this case\n console.log(\"No such document!\");\n }\n }).catch((error) => {\n console.log(\"Error getting document:\", error);\n });\n}", "function loadSubCategory() {\n $.ajax({\n url: 'all-sub-category',\n type: 'GET',\n success: function(data) {\n $('#category_table').html(data);\n }\n });\n }", "loadTopicById({commit}, topic_id){ \n HTTP.get('v1/api/topicdetail/' + topic_id + '/',\n {\n handlerEnabled: true\n }\n ).\n then(response => response.data)\n .then(topic => {\n commit('SET_TOPIC', topic)\n })\n }", "function loadData(dataset, numTopics, dataSource) {\n\n\tclearCanvas();\n\t\n\tif (dataset) {\n\t setSelectedDataset(dataset + \"/\" + numTopics);\n\t}\n\n\tif (dataSource) {\n\t setDataSource(dataSource);\n\t}\n\n\tmessage(\"loading data ...\");\n\ttry {\n\t\tvar socket = getWebsocket();\n\t\tsocket.onopen = function() {\n\t\t\tsendRequest(socket, {\n\t\t\t\trequest : \"LOAD_DATA\",\n\t\t\t\tdataset : dataset ? dataset : getSelectedDataset(),\n\t\t\t\tnumTopics : numTopics ? numTopics : getNumberOfTopics(),\n\t\t\t\tdataSource : dataSource ? dataSource : getDataSource(),\n\t\t\t\tnumEntries : 5000,\n\t\t\t\tmaxEntriesPerTopic : 10\n\t\t\t});\n\t\t}\n\t\tsocket.onmessage = function(msg) {\n\t\t\tclearCanvas();\n\t\t\tif (msg.data == \"MODEL_NOT_AVAILABLE\") {\n\t\t\t\trenderNoDataAvailable();\n\t\t\t\treturn;\n\t\t\t} else if (msg.data == \"MODEL_INFERENCER_NOT_READY\") {\n\t\t\t renderInferenceNotReady();\n\t\t\t return;\n\t\t\t}\n\t\t\t\n\t\t\tvar result = $.parseJSON(msg.data);\n\n\t\t\tfor (var i=0; i<result.length; i++) {\n\t\t\t\tvar renderContent = \"<h3 class=\\\"data-source-description\\\">topic.\" \n\t\t\t\t\t\t\t\t\t+ i + \"</h3><div id=\\\"topic\" + i + \"\\\">\";\n\t\t\t\t\n\t\t\t\tfor (var j=0; j<result[i].length; j++) {\n\t\t\t\t\trenderContent += \"<div><a href=\\\"#\\\" class=\\\"delem group\"\n\t\t\t\t\t \t\t\t\t+ j + \"\\\">\" + getDataTextEntry(result[i][j]) + \"</a></div>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trenderContent += \"</div>\";\n\t\t\t\trenderContent += \"<hr>\";\n\n\t\t\t\t$(\"#container\").append(renderContent);\n\t\t\t\t\n\t\t\t\t$(\"#topic\" + i).isotope({\n\t\t\t\t\tmasonry: {\n\t\t\t\t\t\tcolumnWidth: 70\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tsocket.onclose = function() {\n\t\t socket.close();\n\t\t}\n\t} catch (exception) {\n\t\tmessage(\"error loading topics ...\")\n\t}\n}", "function getTopic(){\n fetch('http://localhost:3000/topic')\n .then(r => r.json())\n .then(topics => //console.log(topics))\n {\n topics.forEach(topic => addTopic(topic))\n })\n}", "function find_subscriptions_below(topic) {\n const path = topic.split(\"/\");\n let subs = [];\n collect_subscribers(path, root, subs);\n return subs;\n}", "function Subscribe_Topic(incident){\n $currentElement = $(incident.target)\n $sub = $currentElement.closest('.subscriber');\n name = $sub.find('h5').html();\n TopicName = $sub.find('input')[0].value;\n\n\t\tsubscribers_array.forEach(function(sub, pos){\n\t\t\tif(name.toLowerCase() == sub.name.toLowerCase()){\n\t\t\t\tsub.TopicNames = sub.TopicNames || [] //There are no TopicNames array for a new subscribers array. So initialize an empty list []\n\t\t\t\tif(sub.TopicNames.indexOf(TopicName) == -1){\n\t\t\t\t\tsub.TopicNames.push(TopicName);\n\t\t\t\t\t_render()\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "function initTopics() {\n nav\n .on(\"navigation:panClick\", function (e, direction) {\n topic.publish(EventManager.Navigation.PAN, {\n direction: direction\n });\n })\n .on(\"navigation:zoomClick\", function (e, in_out) {\n var newLvl = (in_out === \"zoomIn\") ? 1 : -1;\n topic.publish(EventManager.Navigation.ZOOM_STEP, {\n level: newLvl\n });\n })\n .on(\"navigation:zoomSliderChange\", function (e, newVal) {\n topic.publish(EventManager.Navigation.ZOOM, {\n level: newVal\n });\n })\n .on(\"navigation:fullExtentClick\", function () {\n topic.publish(EventManager.Navigation.FULL_EXTENT);\n });\n }", "$onInit() {\n this.currentTopic = parseInt(localStorage.getItem('currentTopic'), 10) || this.topics[0].rowid;\n this.currentDomain = parseInt(localStorage.getItem('currentDomain'), 10);\n\n this.loadSelections();\n }", "function get_all_topic_information(suffix, callback) {\n var distribution = _this.topic_doc_distribution[suffix];\n var dir_dict = {\n \"UK\": \"uk/\",\n \"EU-fp7\": \"eu-fp7/fp7_\",\n \"EU-h\": \"eu-h/h2020_\",\n \"US\": \"us/\",\n \"CN\": \"cn/\"\n }\n\n for (var i = 0; i < distribution.length; i++) {\n var path = \"data/grants/\" + dir_dict[distribution[i].docClass] + distribution[i].docId + \".json\";\n //console.log(distribution[i])\n var key = distribution[i].docClass + \"-\"\n + distribution[i].docId;\n //console.log(key, path)\n if (!_this.documents[key]) {\n\n function load(doc_key, doc_num) {\n d3.json(path, function (data) {\n\n //console.log(data)\n _this.documents[doc_key] = data;\n //console.log(_this.documents)\n callback(doc_num);\n })\n }\n\n load(key, distribution.length)\n }\n }\n callback();\n\n }", "function getTopics(callback){\n\t$.ajax({\n\t\turl : \"/CampusTalk/rest/CampusTalkAPI/getTopics\",\n\t\tdatatype:'json',\n\t\ttype: \"post\",\n\t\tcontentType: \"application/json\",\n\t\tdata: JSON.stringify({}),\n\t}).done(function(data){\n\t\tcallback(data);\n\t});\n}", "subscribe(topic) {\n this.topicQueues[topic] = []\n }", "function populateTopics(){\n\tvar select = document.getElementById(\"selectTopic\");\n\tvar defaultOpt = document.createElement(\"option\");\n\tdefaultOpt.textContent = \"Select..\";\n\tdefaultOpt.value = 0;\n\tselect.appendChild(defaultOpt);\n\tgetTopics(function(result){\n\t\tif(result != null){\n\t\t\tfor(var i=0;i<result.length;i++){\n\t\t\t\tvar topicDescription = result[i].topicDescription;\n\t\t\t\tvar topicId = result[i].topicId;\n\t\t\t\tvar opt = document.createElement(\"option\");\n\t\t\t\topt.textContent = topicDescription;\n\t\t\t\topt.value = topicId;\n\t\t\t\tselect.appendChild(opt);\n\t\t\t}\n\t\t}\n\t});\n}", "function getItemTopicsData(topic){\n\n var item;\n for(var i=0; i < topicsData.length; i++){\n if(topicsData[i].topic === topic){\n item = topicsData[i];\n break;\n }\n }\n return item;\n}", "async function sub(topic) {\n topic = String(topic);\n if (ipfsearch.subbedTopics.indexOf(topic) > -1) {\n const tOwners = ipfsearch.subOwners[topic];\n const id = tOwners[tOwners.length - 1] + 1\n tOwners.push(id)\n lLog(`Already listening on channel ${ipfsearch.topic}${topic}, id: ${id}`);\n return id;\n }\n ipfsearch.subbedTopics.push(topic);\n ipfsearch.subOwners[topic] = [0];\n await ipfs.pubsub.subscribe(`${ipfsearch.topic}${topic}`, receiveMsg)\n .then(() => {\n lLog(`Listening on channel ${ipfsearch.topic}${topic}`);})\n .catch((err) => {\n lLog(`Error: Failed to subscribe to ${ipfsearch.topic}${topic}`);\n lLog(err);\n });\n return 0;\n}", "async function loadAllSubs() {\n\treturn await subDB.find({});\n}", "async v2topictree() {\n ;`Retrieve an object with the following keys:\n articles: [],\n exercises: [],\n missions: [],\n topics: [],\n videos: []\n `\n const endpoint = \"/api/v2/topics/topictree\"\n return await this.fetchResource(endpoint, false, \"GET\")\n }", "function roomTopic()\r\n{ \r\n\t$('#topic_text').load(\"core/rc.listings.php?list=topic&rid=\"+room); \r\n}", "function selectTopic(topic){\n currentSubject = topic;\n var topicObj = getItemTopicsData(currentSubject);\n \n if(topicObj.data.length > 0){\n //show the stickers from the data stored\n showStickers(topicObj.data);\n }\n else\n {\n //search for the topic in the API and load the topic data\n searchSticker(topicObj);\n }\n \n $(\"#button-more\").css(\"display\",\"block\");\n}", "loadSubSetOfPosts () {\n let start = ((this.pageToShow - 1) * this.numPostsPerPage);\n let numLastPage = Math.min(this.totalPosts-start, this.numPostsPerPage);\n let end = start + numLastPage;\n let subSet = this.allPosts.slice(start, end);\n this.set('somePosts', subSet);\n }", "function loadTopics() {\n\n // set empty array\n storedOffset = [];\n topicWithDashesArr = [] // empty array to hold data-topics that have had spaces replaced with dashes.\n\n // set the base offset\n for (i = 0; i < topics.length; i++) {\n storedOffset.push(\"0\"); // for each item in topics, set a base offset of zero.\n }\n // convert the spaces in the topics and convert them to dashes\n for (i = 0; i < topics.length; i++) {\n topicReplace = topics[i].replace(/ /g, \"-\");\n topicWithDashesArr.push(topicReplace);\n }\n // this loop gathers the data-offsets per button\n for (i = 0; i < topics.length; i++) {\n if ($('button[data-topic=' + topicWithDashesArr[i] + ']').attr(\"data-offset\")) {\n var buttonOffset = $('button[data-topic=\"' + topicWithDashesArr[i] + '\"]').attr(\"data-offset\");\n storedOffset[i] = buttonOffset; // replaces the default 0 offset at the appropriate index into the stored array\n } else {\n // if no offset is defined for the button\n storedOffset.push(\"0\"); // set to 0 if undefined.\n }\n }\n\n // below here resets the buttons\n $(\"#topics\").empty();\n\n\n for (i = 0; i < topics.length; i++) {\n // create a new button\n newButton = $(\"<button>\");\n // add data-topic to button attribute\n newButton.attr(\"data-topic\", topicWithDashesArr[i]);\n // add pagination incrementing\n newButton.attr(\"data-offset\", storedOffset[i])\n // add bootstrap btn class\n newButton.addClass(\"btn\");\n // add the topic name to the button\n newButton.text(topics[i]);\n // Lastly append the new button to #gifs\n $(\"#topics\").append(newButton);\n }\n }", "async importTopics() {\n\n this.log(\"Импортируем топики\", \"Info\");\n\n // throw new Error(\"Test\");\n\n const {\n source,\n target,\n ctx,\n } = this;\n\n\n\n const query = source.getQuery(\"site_content\", \"source\")\n ;\n\n query\n .leftJoin(target.getTableName(\"Resource\", \"target\"), \"target.oldID\", \"source.id\")\n .innerJoin(target.getTableName(\"User\"), \"User.oldID\", \"source.createdby\")\n .whereNull(\"target.id\")\n .whereIn(\"source.template\", [\n 15,\n ])\n ;\n\n query\n .innerJoin(source.getTableName(\"society_blog_topic\", \"blog_topic\"), \"blog_topic.topicid\", \"source.id\")\n\n query\n .innerJoin(target.getTableName(\"Resource\", \"Blog\"), \"Blog.oldID\", \"blog_topic.blogid\")\n\n\n query.select([\n \"source.*\",\n \"Blog.id as blogId\",\n ]);\n\n // query.limit(2);\n\n\n // console.log(chalk.green(\"query SQL\"), query.toString());\n\n // throw new Error (\"Topic error test\");\n\n const objects = await query.then();\n\n // console.log(\"objects\", objects);\n\n await this.log(`Было получено ${objects && objects.length} топиков`, \"Info\");\n\n // return;\n\n const processor = this.getProcessor(objects, this.writeTopic.bind(this));\n\n for await (const result of processor) {\n\n // console.log(\"writeUser result\", result);\n\n }\n\n }", "function ifttt_sub() {\n pxymqtt_client.subscribe('/oneM2M/req/Mobius/ifttt-sub/xml');\n console.log('subscribe ifttt_topic as ' + '/oneM2M/req/Mobius/ifttt-sub/xml');\n}", "onTopicClick(topic) {\n if (topic.rowid === this.currentTopic) {\n return;\n }\n\n this.currentTopic = topic.rowid;\n localStorage.setItem('currentTopic', this.currentTopic);\n this.loadSelections();\n }", "componentDidMount() {\n this.getTopics();\n }", "function serializeSubscribeTopics( v, topics ) {\n for (var i = 0; i < topics.length; i++) {\n var topic = topics[i];\n if (typeof topic == \"string\") {\n topic = { topic: topic };\n }\n var qos = topic.qos || 0;\n var noLocal = topic.no_local || false;\n var retainAsPublished = topic.retain_as_published || false;\n var retainHandling = topic.retain_handling || 0;\n var flags = 0;\n flags |= retainHandling << 4;\n flags |= (retainAsPublished ? 1 : 0) << 3;\n flags |= (noLocal ? 1 : 0) << 2;\n flags |= qos;\n v.appendUTF8(topic.topic);\n v.append1(flags);\n }\n}", "consume(topics, cb) {\n if (Array.isArray(topics)) {\n if (cb) {\n Promise.all(topics.map(topic => this.eventContext.get(topic)))\n .then(values => {\n const ret = {};\n values.map((val, index) => {\n ret[topics[index]] = val;\n });\n // unlink any error in cb from promise flow to let it fail\n setImmediate(() => cb(ret, this));\n })\n .catch(err => {\n if (this._catchHandler) {\n return this._catchHandler(err);\n }\n });\n return this; // for cascading style\n }\n\n const promises = topics.reduce((memo, topic) => {\n memo.push(this.eventContext.get(topic));\n return memo;\n }, []);\n\n return Promise.all(promises)\n .then(results => results.reduce((memo, data, index) => {\n memo[topics[index]] = data;\n return memo;\n }, {}));\n }\n\n // handle single topics\n if (cb) {\n this.eventContext.on(topics, data => {\n if (data instanceof Promise) {\n data.then(cb).catch(err => {\n this.define('error', err);\n });\n return;\n }\n\n cb(data, this);\n });\n return this;\n }\n return this.eventContext.get(topics);\n }", "function retrieveChildNodes(topicRefSpan) {\r\n var tocId = $(topicRefSpan).attr(navConfig.attrs.tocID);\r\n if (tocId != null) {\r\n var jsonHref = navConfig.jsonBaseDir + \"/\" + tocId;\r\n require(\r\n [jsonHref],\r\n function(data) {\r\n if (data != null) {\r\n var topics = data.topics;\r\n var topicLi = topicRefSpan.closest('li');\r\n var topicsUl = createTopicsList(topics);\r\n\r\n var topicsUlParent = $('<ul role=\"group\"/>');\r\n topicsUl.forEach(function(topic){\r\n topicsUlParent.append(topic);\r\n });\r\n topicLi.append(topicsUlParent);\r\n\r\n var titleLink = topicRefSpan.find(\".title > a\");\r\n var titleLinkID = titleLink.attr(\"id\");\r\n\r\n var expandBtn = topicRefSpan.children('.wh-expand-btn');\r\n expandBtn.attr(\"aria-labelledby\", navConfig.btnIds.collapse + \" \" + titleLinkID);\r\n\r\n topicRefSpan.attr(navConfig.attrs.state, navConfig.states.expanded);\r\n } else {\r\n topicRefSpan.attr(navConfig.attrs.state, navConfig.states.leaf);\r\n }\r\n }\r\n );\r\n }\r\n }", "function loadToc(url ){\n\n var topic = top.frames[\"body\"].frames[\"content\"].location.href;\n topic = topic.substring(topic.lastIndexOf('/')+1,topic.indexOf('.htm'));\n top.frames[\"body\"].frames[\"toc\"].location.href=url+\"?item=\"+topic+\"&section=none\";\n}", "function fnLoadSubSection()\n{\n\t\n\tdocument.forms[0].action=\"showAppendix.do?method=SubSectionLoad\";\n\tdocument.forms[0].submit();\t\n}", "function show_topic(topic_name){\n hide_headlines();\n $.get('/api/topic/' + topic_name, function(data){redraw_page(data)});\n $('#nav_button').click();\n}", "function serializeUnsubscribeTopics( v, topics ) {\n for (var i = 0; i < topics.length; i++) {\n v.appendUTF8(topics[i]);\n }\n}", "componentWillMount() {\r\n\tvar nextProps = this.props\r\n\tif (nextProps.topics !== undefined && nextProps.activeTopicId !== this.state.activeTopicId) {\r\n\t\tvar id = nextProps.activeTopicId\r\n\t\tvar topic = nextProps.topics.map((topic) => {if (topic.id === id) {return topic}}).filter(Boolean)[0];\r\n\t\tif (topic === undefined) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tactiveTopicId: -1,\r\n\t\t\t\tnew: false,\r\n\t\t\t\tedit: false,\r\n\t\t\t\tname: '',\r\n\t\t\t\tdescription: '',\r\n\t\t\t\tsubtopics: []\r\n\t\t\t})\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.setState({\r\n\t\t\t\tactiveTopicId: id,\r\n\t\t\t\tname: topic.name,\r\n\t\t\t\tdescription: topic.description,\r\n\t\t\t})\r\n\t\t\tthis.getSubTopics(id)\r\n\t\t}\r\n\t\t}\r\n\t}", "get topicsInput() {\n return this._topics;\n }", "function loadNetworkStorage(items)\n\t{\n\t\tif (items[\"saved\"] !== undefined)\n\t\t{\n\t\t\tsavedTopics = items[\"saved\"];\n\t\t\tconsole.log(\"Loaded saved topics from network storage\");\n\t\t}\n\t\tupdateLinks();\n\t\trebuildList();\n\t}", "function useTenList(topicArr) {\n if (topicArr.length < 10) {\n topicArr = topicArr.concat(getTenTopicsWithSelected());\n }\n d3.select(\"#corpus-topics\").style(\"display\",\"none\");\n if (d3.select(\"#corpus-ten-topics\").text() == \"\") createTenList(topicArr);\n var list = d3.select(\"#corpus-ten-topics\");\n list.style(\"display\",\"block\")\n .selectAll(\"li\").data(topicArr)\n .attr(\"data-topic\", function(d) {\n return d.key;\n })\n .select(\".color-box\")\n .style(\"background-color\", function(d){\n return tenTopics.getColor(d.key);\n })\n .select(\"i\")\n .style(\"display\", function(d) {\n return (topics.contains(d.key)) ? \"block\" : \"none\";\n })\n d3.selectAll(\"#corpus-ten-topics li .topic-words\").data(topicArr)\n .text(function(d) { return d.desc });\n}", "async subscribe (topic) {\n const isProtocolNew = this._config.mqttSettings && this._config.mqttSettings.protocolVersion === 5\n if (!Array.isArray(topic)) {\n topic = [topic]\n }\n return topic.reduce(async (result, topic) => {\n const id = Number(uniqueId())\n if (isProtocolNew && topic.options && topic.options.filterByTimestamp) {\n topic.handler = this._generateTimestampFilteringWrapper(topic.name, topic.handler)\n }\n if (isProtocolNew) {\n if (!topic.options) { topic.options = {} }\n topic.options = merge(topic.options, { properties: { subscriptionIdentifier: id } })\n }\n this._topics[id] = topic\n /* if has client and he is connected */\n if (this._client) {\n try {\n const granted = await this._client.subscribe(topic.name, topic.options)\n result[id] = granted\n } catch (e) {\n result[id] = e\n }\n } else {\n result[id] = new Error('Client don`t created')\n }\n return result\n }, {})\n }", "function showMenuContentsFor(menuNamePassback) {\n\n var data = menuDataBlocks[menuNamePassback]; // load the prefetched data\n var firstKey; // a catch to jump to the first subtopic elements\n menuitems = Object.size(data); // determine how many elements are in the subtopic dataset\n menuName = menuNamePassback; // rename the passback variable\n\n\n $(\"#awbs-navbar-\" + menuName + \"-selections ul\").empty(); // empty out the selection list\n $(\"#awbs-navbar-\" + menuName + \"-contents\").empty(); // empty out the contents panel\n\n for (var key in data) { // loop through the data set\n if (typeof firstKey == 'undefined') { // set the first key, as for mentioned above.\n firstKey = _.snakeCase(key).toLowerCase(); // set that first key\n }\n keyname = _.snakeCase(key).toLowerCase(); // set the keyname for the next step\n contentItems[keyname] = ''; // empty the template set.\n //\tconsole.log('path', data[key].path);\n $(\"#awbs-navbar-\" + menuName + \"-selections ul\").append(\n \"<li class='animated fadeInLeft'><a href='/\" +\n data[key].path +\n \"' class='menu-select-section' id='\" + keyname +\n \"'>\" +\n key + \"</a></li>\"); // populate the selection list with subtopics\n\n contentItemsCount = Object.size(data[key].items); // how many boxes are there to display\n\n void 0;\n for (var i = 0; i < contentItemsCount; i++) { // for each item in the item count\n template = _.template(\n '<div class=\"col-xs-12 col-md-3 content-item-container animated fadeInRight\"> <div class=\"row\"><div class=\"col-xs-12 content-item\"><div class=\"row\"><a href=\"<%- href %>\"><div class=\"col-xs-12 content-item-image\" style=\"background-image:url(<%- image %>);\"></div><div class=\"col-xs-12 content-item-title\"><%- title %></div></a></div></div></div></div>'\n ); // generate a template string\n void 0;\n contentItems[keyname] += template({\n 'href': \"/\" + data[key].items[i].href,\n 'image': data[key].items[i].image.src,\n 'title': data[key].items[i].title\n }); // and compile it with the pertinent data\n void 0;\n }\n }\n\n\n $(\"#awbs-navbar-\" + menuName + \"-contents\").append(contentItems[firstKey]); // append the item set for the first subtopic to the content panel\n $(\"#awbs-navbar-\" + menuName + \"-selections ul li a\").eq(0).addClass(\n 'active'); // mark the first item in the subtopic selection list as 'active'\n }", "function loadContent(){\n\n \tlet topicToLoad = $(\"#topicTitle\").text();\n \talert (topicToLoad);\n \t$.ajax({\n \t \ttype:\"POST\",\n \t \turl: \"php/results.php\",\n \t \tdata: {topic: topicToLoad},\n \t \tsuccess: function(result){\n \t\t$(\"#theContent\").html(result);\n \t\t}});\n }", "function loadTopicsForBidders() {\n HAS_GDPR_CONSENT = hasGDPRConsent();\n if (!HAS_GDPR_CONSENT || !HAS_DEVICE_ACCESS) {\n logInfo('Topics Module : Consent string is required to fetch the topics from third party domains.');\n return;\n }\n const topics = config.getConfig('userSync.topics') || bidderIframeList;\n if (topics) {\n listenMessagesFromTopicIframe();\n const randomBidders = getRandomBidders(topics.bidders || [], topics.maxTopicCaller || 1)\n randomBidders && randomBidders.forEach(({ bidder, iframeURL }) => {\n if (bidder && iframeURL) {\n let ifrm = document.createElement('iframe');\n ifrm.name = 'ifrm_'.concat(bidder);\n ifrm.src = ''.concat(iframeURL, '?bidder=').concat(bidder);\n ifrm.style.display = 'none';\n setLoadedIframeURL(new URL(iframeURL).origin);\n iframeURL && window.document.documentElement.appendChild(ifrm);\n }\n })\n } else {\n logWarn(`Topics config not defined under userSync Object`);\n }\n}", "function buildTopics() {\n\n // Removes any text within the searchTopic div so that the text from the next item in the \n // array can be rendered\n $('#searchTopic').empty();\n\n // a for loop will continue for the length of the subjects object \n for (var i = 0; i < topics.subjects.length; i++) {\n // create a variable button that is equal to a button element in order to create dynamic\n // buttons in the page\n var button = $('<button>').addClass('topicsButtons');\n // to that button, add text that will be taken from the object subjects at each index\n button.text(topics.subjects[i].item);\n // add the attribute data-topic to each button so that each button's topic can be queried \n // using ajax by linking them together\n button.attr('data-topic', topics.subjects[i].item);\n // append the button that is created to the div with id = searchTopic so that it appears on the page\n $('#searchTopic').append(button);\n }\n }", "async start () {\n\t\tawait this._restoreTopicSubscriptions()\n\n\t\t// Periodically fetch the subscriptions\n\t\twindow.setInterval(() => {\n\t\t\tlet subscriptions = JSON.parse(window.localStorage.getItem('topicSubscriptions') || '{}')\n\n\t\t\tfor (let element of Object.entries(subscriptions)) {\n\t\t\t\tthis.pullFromSubscription(element[1])\n\t\t\t}\n\t\t}, pullInterval)\n\t}", "function switchTopic(key) {\n alert(\"Switching topics not yet implemented\");\n}", "async function filterByTopic() {\n // get selected topic(s)\n let selectedTopics = [];\n let topics = qsa(\"#topic-filter input\");\n for (let topic of topics) {\n if (topic.checked) selectedTopics.push(topic.value);\n }\n\n // get ids of posts from database for each topic and display results\n let results = [];\n for (let topic of selectedTopics) {\n let matches = formatResults(await getTopic(topic));\n results = results.concat(matches);\n }\n displaySearchResults(results);\n }", "changeSub(change) {\n if (!this.subs)\n this.subs = [];\n if (!this.subs[change]) {\n if (this.isGlobal) {\n Globals.distributedStoreClient.routerClient.subscribe(\"storeService\" + change, this.handleChanges);\n }\n this.subs[change] = true;\n }\n }", "function loadSubCategory(sub_categories){\n\t\t\n\t\t$.each(sub_categories, function(index,sub_category) {\n\t\t $(\"#itemSubCategory\").append(\n\t\t $(\"<option class='dynamic-sub-option'></option>\").val(sub_category.subcategory_id).html(sub_category.name)\n\t\t );\n\t\t});\n\t}", "function topicsList() {\n let areas = [\"sdp\", \"simulations\", \"skampi\"];\n let projectsUrl = new URL(\n \"https://gitlab.com/api/v4/groups/3180705/projects?\"\n );\n\n projectsUrl.searchParams.set(\"simple\", \"true\");\n projectsUrl.searchParams.set(\"archived\", \"false\");\n projectsUrl.searchParams.set(\"include_subgroups\", \"true\");\n projectsUrl.searchParams.set(\"all_available\", \"true\");\n projectsUrl.searchParams.set(\"per_page\", \"100\");\n\n // get all results and fill the tables\n fetchRequest(projectsUrl).then((data) => {\n for (const area of areas) {\n var list = $(\"#\" + area + \" table\");\n list.empty();\n // restrict the list to files with the right tag\n //\n const data_filtered = data.filter((a) => a.tag_list.includes(area));\n // sort by name\n //\n data_filtered.sort((a, b) => a[\"name\"].localeCompare(b[\"name\"]));\n // build the table\n //\n item = ProjectTable(data_filtered);\n $(item).appendTo(list);\n }\n });\n}", "function fetchTopicsAndListenForNewOnes()\r\n{\r\n \r\n $(\".topic-listings\").hide();\r\n $(\".post-listings\").hide();\r\n $(\".post-display\").hide();\r\n \r\n $(\"#table-of-topics\").empty();\r\n \r\n $(\".topic-listings\").show();\r\n \r\n let topicRef = firestore.collection('topics');\r\n\r\n topicRef.orderBy('timestamp').onSnapshot(function(topics){\r\n $(\"#table-of-topics\").empty();\r\n topics.forEach(function(topic){\r\n let topicData = topic.data();\r\n\r\n let date = new Date(topicData.timestamp);\r\n $(\"#table-of-topics\").append('<tr id = \"' + topic.id +'\" class = \"clickable\"><td>' + topicData.topicName + '</td><td>' + topicData.username + '</td><td>' + date + '</td><td>' + topicData.postCount + '</td>');\r\n // TODO: add badge with number of posts! (cool)\r\n console.log(topicData.topicName);\r\n });\r\n });\r\n}", "findAllSubcategoriesByCategoryId(id) {\n return this\n .findOne({_id: id, enabled: true})\n .populate({\n path: 'subcategories',\n match: {enabled: true},\n select: 'url title'\n })\n .select('subcategories')\n .exec();\n }", "function findMatchingSubs(topic) {\n\t// we will add matching topic strings to this array\n\tvar ret = [];\n\n\t// split the topic along the '/'\n\tvar topicParts = topic.split(\"/\");\n\tvar depth = topicParts.length;\n\n\t// for each topic in the subs map...\n\tfor (var nextTopicString in subscriptions) {\n\t\tif (subscriptions.hasOwnProperty(nextTopicString) === false) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// split this topic string as well\n\t\tvar theseParts = nextTopicString.split(\"/\");\n\n\t\t// if this topic string has more levels than the one\n\t\t// we were given, then it can't be a match.\n\t\tif (theseParts.length > depth) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvar matching = false;\n\n\t\t// check for the easy case of an exact match\n\t\tif (nextTopicString === topic) {\n\t\t\tmatching = true;\t\t\t\n\t\t} else {\n\t\t\t// other wise we'll have to check each part of the topic strings\n\t\t\tfor (var i=0; i<depth; i++) {\n\t\t\t\tif (theseParts[i] === \"#\") {\n\t\t\t\t\tmatching = true;\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (theseParts[i] === \"+\") {\t\t\t\t\n\t\t\t\t\tmatching = (theseParts.length === depth);\n\n\t\t\t\t\tif (matching) {\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (theseParts[i] !== topicParts[i]) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (matching) {\n\t\t\tret.push(nextTopicString);\n\t\t}\n\t}\n\n\treturn ret;\n}", "getTopicByCurSub(req, callback) {\n var self = this;\n var reqObj = req.body;\n var errorResponseObj = {\n status: false,\n data: {},\n };\n let responseObject = {};\n const courseTableName = \"course\";\n\n let query = {};\n if (reqObj.curriculumCode && reqObj.subject) {\n query = {\n curriculumCode: reqObj.curriculumCode,\n subject: reqObj.subject,\n };\n } else if (reqObj.condition == \"all\") {\n query = {};\n } else {\n query = {\n curriculumCode: reqObj.curriculumCode,\n subject: reqObj.subject ? reqObj.subject : \"\",\n };\n }\n\n var criteria = {\n condition: query,\n projection: { topic: 1 },\n sortOrder: { _id: 1 }\n };\n\n self.apiServiceInstance.find(criteria.condition, criteria.projection, courseTableName, function (err, topicData) {\n if (topicData.length > 0) {\n responseObject['status'] = true;\n responseObject['data'] = topicData;\n callback(null, responseObject);\n } else {\n console.log('Topic data not listed at getTopicByCurSub. Due to -', err);\n errorResponseObj['error'] = err;\n callback(err, errorResponseObj);\n }\n });\n }", "function getArticlesIdsByTopic(topicId) {\n return $http.get('/api/support/articles/topic/' + topicId);\n }", "function addTopicToSelected(topic) {\n // if the there are too many topics selected, tell the user\n if (topics.full()) {\n alert(\"You may only select up to 10 topics.\")\n return;\n }\n // update the selected topics\n updateSelected(topic);\n // add the topic\n topics.add(topic);\n}", "function Topics() {\n var arr = [];\n arr.push.apply(arr, arguments);\n arr.__proto__ = Topics.prototype;\n return arr;\n}", "setupDataListener(){\n PubSub.subscribe('Items:item-data-loaded',(evt)=>{this.initiliaze(evt.detail)});\n }", "function getTopicsSerially(allTopicLinks,n){\n if(n==allTopicLinks.length){\n return;\n }else{\n let url=allTopicLinks[n];\n\n request(url,cb);\n function cb(err,response,html){\n if(err){\n console.log(\"Error: \"+err);\n }else{\n extractRepositories(html); // Get Repo Links for Particular Topic\n\n // Making Serial request\n getTopicsSerially(allTopicLinks,n+1);\n }\n }\n\n }\n}", "async function newSubject() {\r\n try {\r\n clearStatusBar();\r\n\r\n //Variables\r\n ///Array containing the topics pulled from the file system\r\n var topics = [];\r\n\r\n ///The file path of the topics file\r\n userSession.filePath = encodeURIComponent($(\"#qualification\").val()) + \"/\" + encodeURIComponent($(\"#examBoard\").val()) + \"/\" + encodeURIComponent($(\"#subject\").val()) + \"/\";\r\n\r\n ///The api to be called to get the topics file for the correct subject\r\n var api = filterAPI(userSession.filePath, true);\r\n\r\n\r\n //Get topics\r\n ///Awaits the topic file from S3\r\n topics = await callGetAPI(api, \"topics\");\r\n\r\n ///Puts the topics into the user session variable\r\n userSession.topics = topics.filters;\r\n\r\n ///Log the topics, for testing\r\n //console.log(userSession.topics);\r\n\r\n ///Loads the topics display\r\n loadTopicDisplay();\r\n } catch (error) {\r\n generateErrorBar(error);\r\n }\r\n}", "function getAllTopics(topicName) {\r\n var keys = Object.keys(topicListenerMap);\r\n var regExp = new RegExp(topicName);\r\n var matchingTopics = [];\r\n for(var i = 0; i < keys.length; i++) {\r\n var key = keys[i];\r\n if(regExp.test(key)) {\r\n matchingTopics.push(key);\r\n } else\r\n console.log(\"Didnot match \"+key);\r\n }\r\n return matchingTopics;\r\n}", "function loadTopicButtons(){\n $('.buttons').empty();\n $.each(topics, function(i, val) {\n var topicButton = $('<button>').attr('class', 'btn').addClass('btn-primary').text(val);\n $('.buttons').append(topicButton);\n });\n }", "function queryTopics (finish) {\n let data = [], self = this;\n clearInterval(self.lookupIntervalID); // close interval. setup after lookup finished.\n http.get(`http://${self.host}:${self.port}/topics`, res => {\n res.on('data', chunk => data.push(chunk));\n res.on('end', () => {\n data = Buffer.concat(data).toString();\n parseResult(data);\n });\n }).on('error', err => {\n err.message = 'request lookupd error. Caused by:' + err.message;\n onERROR(err);\n retry();\n });\n\n function parseResult(res) {\n data = JSON.parse(res);\n console.log('lookup result', res);\n if (data.status_code !== 200) {\n console.log('C', data.status_code + data.status_txt);\n let err = new Error('NSQ Lookup failed. http response: ' + data.status_code + data.status_txt);\n onERROR(err);\n return retry();\n }\n\n\n self.topics = data.data.topics;\n finish();\n\n self.lookupIntervalID = setInterval(() => {\n queryTopics.bind(self)(() => {\n console.log('interval lookup');\n let currTopic = Object.keys(self.readers);\n if ( (self.topics.length === currTopic.length)\n && (self.topics.filter(item => currTopic.find(e => e === item)).length = self.topics.length) ) {\n // topic list not change\n return;\n }\n establish.bind(self)(self.topics);\n });\n }, LOOKUP_INTERVAL);\n }\n\n function onERROR(err) {\n self.emit('error', err);\n }\n\n function retry() {\n console.log('lookup retry');\n setTimeout(() => {\n queryTopics.bind(self)(finish);\n }, RETRY_DELAY);\n }\n}", "function loadTopicsButtons() {\n\t$('.buttons-div').text('');\n\ttopics.forEach(topic => {\n\tvar storedElement = $('<button>').attr('class', 'btn m-1 gif-buttons').attr('value', topic).text(topic);\n\t$('.buttons-div').append(storedElement);\n\t});\n}", "setupSubLinks() {\n for (let subLink in this.subLinks) {\n this.subLinks[subLink].addEventListener(\"click\", (e) => {\n let linkID = e.target.id;\n if (linkID === \"\") {\n linkID = e.target.parentNode.id;\n }\n let subViewToShow = linkID.slice(0, -5);\n this.showSubView(subViewToShow);\n });\n }\n }", "function SubTopic(props) {\n const dispatch = useDispatch()\n const todos = useSelector(state => state.Todos)\n const projectTodos = todos.filter(todo => todo.project_name === props.title)\n\n \n if(projectTodos.length === 0){\n return ''\n }\n else {\n return (\n <div>\n <h5 className=\"projectName\"> {props.title} </h5>\n {projectTodos.map((value,index) => {\n return <ControlTab device={props.device} key={index} self_id={value.self_id} title={value.description} svg={value.svg} onClick={() => dispatch({type:'CHANGE_ACTUAL', self_id: value.self_id, todos:todos})} />\n })}\n \n </div>\n )}\n}", "loadData(subroute){\n if (subroute.prefix == \"/view2\" && subroute.path == \"\"){ //Show all courses\n this.set('searchMode', false);\n this.courses = [];\n //Load all courses\n fetch (`${window.MyAppGlobals.serverURL}api/course/getCourses.php`)\n .then(res=>res.json())\n .then(data=>{\n this.courses = data;\n //console.log(data);\n });\n\n } else if (subroute.prefix == \"/view2\" && subroute.path != \"\") { //Search mode\n this.set('searchMode', true);\n this.videos = [];\n //Search for course\n fetch (`${window.MyAppGlobals.serverURL}api/course/searchCourse.php?q=`+subroute.path)\n .then(res=>res.json())\n .then(data=>{\n this.videos = data;\n //console.log(data);\n });\n }\n }", "function TopicsService(http) {\n this.http = http;\n this.http = http;\n }", "function displayTopics() {\n $(\"#articles\").html(\"\");\n var queryURL = \"https://api.nytimes.com/svc/search/v2/articlesearch.json?api-key=b878d19230834a629ac5664c8efc2ee7&q=\" + searchKey + \"&begin_date=\"+ sYear + \"0101&end_date=\"+ eYear + \"1230&page=0\"\n\n $.ajax({\n url: queryURL,\n method: 'GET'\n }).done(function(data) {\n\n $(\"#articles\").append(\"Here are \" + records + \" articles about '\" + searchKey + \"'\").addClass(\"articleLength\");\n\n for (var i = 0; i < records ; i++) {\n var record = $(\"<li>\").addClass(\"record list-group-item\");\n record.append(\"<a class='articleHeader' href=\" + data.response.docs[i].web_url + \">\" + (i+1) + \". \" + data.response.docs[i].headline.main + \"</a>\");\n record.append(\"<p class='articleAuthor'>\" + data.response.docs[i].byline.original + \"</p>\");\n\n var articles = $(\"#articles\");\n articles.append(record);\n }\n });\n }", "function didReceiveConfigData(event) {\n if(chatTopicsTestMode) { return; }\n\n // Load chat topics\n var $select = $(event.target).find('.chatUI-.middle #chatForm #ccPreSurvey .selectBox');\n $.ajax({\n dataType: 'json',\n url: '/bin/twc/chatQueues.json/' + SOAID,\n success: function(data) { data.length > 0 ? $select.trigger(DID_RECEIVE_DATA, [{items:data}]) : $select.trigger(DID_RECEIVE_DATA_EMPTY); }\n });\n }", "function queryTopics(topicLst, currentPage) {\n var sortedTopicLst = topicLst.slice(0).sort(compareVoteCnt);\n // console.log(\"topic.js topicLst variable\")\n // console.log(topicLst)\n // console.log(\"topic.js sortedTopicLst variable\")\n // console.log(sortedTopicLst)\n return getTopicsByPage(pageSize, currentPage, sortedTopicLst);\n}", "function load(participants$) {\n //participants$.subscribe(participants => {}\n }", "getTopics() {\n return Object.keys(this.listeners);\n }", "function isTopic() {\n var url = window.location.pathname.split('/')\n\n return url[2] === \"topic\"\n}", "function collectMessagesByTopic(topic, params){\n return collectMessagesBy(\"topic\", topic, params);\n }", "function loadSubscribesOnly(message) {\n participants = message[\"participants\"];\n roomType = message[\"type\"];\n }", "function getTopicsData() {\n\n // this line assumes that we have a variable with the same name as the this.id assigned (at the top of the file).\n var corpusPath = \"Data/\" + currentCorpus + \"-Topics.txt\";\n\n // Get the data from our JSON file\n d3.json(corpusPath, function(error, topicsData) {\n if (error) throw error;\n\n allTopicsData = topicsData;\n // var showTopicNodes = JSON.parse(JSON.stringify(topicsData));\n\n drawSunburst(allTopicsData);\n showTopTopics();\n d3.select(\"#corpusName\").html(currentCorpus);\n d3.select(\"#corpusAsOf\").html(\"As of \" + allTopicsData.runDate.replace('2017-',''));\n d3.select(\"#corpusCount\").html(allTopicsData.textCount + \" texts\");\n\n if (allTopicsData.dataDate) {\n d3.select(\"#corpusDate\").html(\"Data: \" + allTopicsData.dataDate.replace('2017-',''));\n }\n\n });\n\n}", "function createNewSubscription() {\n\t// grab the topic from the page form\n\tvar topic = document.getElementById(\"topic\").value.trim();\n\n\t// perform some basic sanity checking.\n\tif (topic.length === 0) {\n\t\treturn;\n\t}\n\n\tif (topic in subscriptions) {\n\t\tconsole.log(\"already have a sub with this topic\");\n\t\treturn;\n\t}\n\n\t// beyond the above, we rely of the sub call to fail if\n\t// the topic string is invalid.\n\n\tconsole.log(\"create new subscription: \" + topic);\n\n\t// issue the subscribe request to the server. Only update\n\t// the page and our data structure if the subscribe is\n\t// successful (do work in success callback).\n\tclientObj.subscribe(topic, {\n\t\tonFailure : function(responseObject) {\n\t\t\tconsole.log(\"Failed to subscribe: \" + responseObject.errorCode);\n\t\t\t// don't update the page\n\t\t},\n\n\t\tonSuccess : function(responseObject) {\n\t\t\t// grab the div on the page that houses the subs display items\n\t\t\tvar subsDiv = document.getElementById(\"subscriptions\");\n\t\t\t// ensure that it's not hidden (will be when there are no subs)\n\t\t\tsubsDiv.hidden = false;\n\n\t\t\t// create a new div to house the messages\n\t\t\tvar div = document.createElement(\"DIV\");\n\t\t\tdiv.id = \"subsection_\" + topic;\n\n\t\t\t// create the delete button\n\t\t\tvar nameRef = \"button/\" + topic;\n\t\t\tvar button = document.createElement(\"BUTTON\");\n\t\t\tbutton.id = nameRef;\n\t\t\tbutton.innerHTML = \"delete subscription\";\n\n\t\t\tbutton.onclick = function() {\t\t\t\t\n\t\t\t\tconsole.log(\"delete subscription: \" + topic);\n\n\t\t\t\t// do unsub\n\t\t\t\tclientObj.unsubscribe(topic);\n\t\t\t\t// remove row...\n\t\t\t\tsubsDiv.removeChild(subscriptions[topic].div);\n\t\t\t\tsubsDiv.removeChild(subscriptions[topic].spacing);\n\t\t\t\t// remove from data structure\n\t\t\t\tdelete subscriptions[topic];\n\t\t\t\tsubCount--;\n\n\t\t\t\tif (subCount === 0) {\n\t\t\t\t\tsubsDiv.hidden = true;\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t\t// create a new table for the div\n\t\t\tvar table = document.createElement(\"TABLE\");\n\n\t\t\t// create header\n\t\t\tvar header = table.createTHead();\n\t\t\tvar hRow = header.insertRow(0);\n\t\t\tvar tCell = hRow.insertCell(0);\n\t\t\tvar bCell = hRow.insertCell(1);\n\n\t\t\ttCell.innerHTML = \"Topic: \" + topic;\n\t\t\tbCell.appendChild(button);\n\t\t\t\n\t\t\tvar textArea = document.createElement(\"TEXTAREA\");\n\t\t\ttextArea.readOnly = true;\n\t\t\ttextArea.cols = 150;\n\t\t\ttextArea.rows = 6;\n\n\t\t\tvar spacing = document.createElement(\"BR\");\n\n\t\t\tdiv.appendChild(table);\n\t\t\tdiv.appendChild(textArea);\t\t\t\n\n\t\t\t// add the div to the page\n\t\t\tsubsDiv.appendChild(div);\n\t\t\tsubsDiv.appendChild(spacing);\n\n\t\t\t// the object we will store in our subs map\n\t\t\tvar subObj = {\n\t\t\t\tdiv : div, // ref to the div (for easy deleting later)\n\t\t\t\ttext : textArea, // ref to the text area (to add msgs to)\n\t\t\t\tspacing : spacing, // ref to the <br> tag (for easy deleting)\n\t\t\t\tmsgCount : 0 // count of the messages currently displayed.\n\t\t\t};\t\t\t\n\n\t\t\t// store the obj and update our sub count\n\t\t\tsubscriptions[topic] = subObj;\t\n\t\t\tsubCount++;\n\t\t}\n\t});\n}", "loadVehiclesList(){\n PubSub.publish('loadVehiclesList', {});\n }", "function clearSubs() {\n\tvar subsDiv = document.getElementById(\"subscriptions\");\n\n\tfor (var topic in subscriptions) {\n\t\tif (subscriptions.hasOwnProperty(topic)) {\n\t\t\t// remove row...\n\t\t\tsubsDiv.removeChild(subscriptions[topic].div);\n\t\t\t// remove from data structure\n\t\t\tdelete subscriptions[topic];\n\t\t\tsubCount--;\n\t\t}\n\t}\n}", "function getData(setData) {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", \"assets/js/topics.json\");\n xhr.send();\n xhr.onreadystatechange = function () {\n if (this.readyState == 4 && this.status == 200) {\n setData(JSON.parse(this.responseText)); // Only call createArray when the data has arrived\n }\n };\n }", "function getTopics(response) {\n\tconsole.log(\"Request handler 'getTopics' was called.\");\n\n\tresponse.writeHead(200, { \"Content-Type\": MIME_TYPES['.json']});\n\t\n\tvar topicNodes = new Array();\n\tfor (var i = 0; i < data.nodes.length; i++) {\n\t\tif (data.nodes[i].type == 'topic') {\n topicNodes.push(data.nodes[i]);\n\t\t}\n\t}\n\t\n topicNodes.sort(function(a, b) {\n return data.compareVoteCounts(a.id, b.id);\n });\n\tconsole.log(\"Populated topicNodes with \" + topicNodes.length + \" items\");\n\tresponse.write(JSON.stringify(topicNodes));\n\tresponse.end();\n}", "function BOT_declareTopics(topicIdList) {\r\n\tvar tid;\r\n\tfor(var i in topicIdList) { \r\n\t\ttid = topicIdList[i];\r\n\t\tBOT_topicIdList \t= BOT_appendFree(BOT_topicIdList,tid);\r\n\t\tBOT_topicObjectList\t= BOT_appendFree(BOT_topicObjectList,eval(tid));\r\n\t\tBOT_keyList \t\t= BOT_concatFree(BOT_keyList,\t\tBOT_extractKeyNames(tid)); \r\n\t\tBOT_actionList\t\t= BOT_concatFree(BOT_actionList,\tBOT_extractKeyNamesFromTagValue(tid,\"CAT\",\"ACT\"));\t\r\n\t\tBOT_relationList\t= BOT_concatFree(BOT_relationList,\tBOT_extractKeyNamesFromTagValue(tid,\"CAT\",\"REL\"));\t\r\n\t}\r\n}", "function getSubCategoryList(category){\n\t\t\n\t\t$.ajax({\n\t\t\turl:\"http://localhost:8080/flipkart/webapi/category/getSubCategoryList/\"+category,\n\t\t\ttype:\"POST\",\n\t\t\tcache:false,\n\t\t\tcontentType:false,\n\t\t\tprocessData: false,\n\t success : function(data){\n\t \t\n\t \tif(data)\n\t \t{\n\t \t\tloadSubCategory(data);\n\t \t}\n\t \t\n\t \telse\n\t \t\talert(\"failed to get Sub Categories\");\n\t },\n\t \n\t error : function(data){\n\t \talert(\"failed to get Sub Categories !\");\n\t }\n\t \n\t\t});\n\t}", "function updateTopics(topics) {\n topics.forEach(function(d, i) { d.r = Math.max(12, r(d.count)); }); // min. collision\n force.nodes(data.topics = topics).start();\n updateNodes();\n updateLabels();\n }", "function loadTopicMatrix() {\n\tclearCanvas();\n\t$(\"#container\").append(getTopicMatrixViewNav());\n\ttry {\n\t\tvar socket = getWebsocket();\n\t\tsocket.onopen = function() {\n\t\t\tsendRequest(socket, {\n\t\t\t\trequest : \"GET_KEYWORD_COOCCURRENCE\",\n\t\t\t\tdataset : getSelectedDataset(),\n\t\t\t\tnumTopics : getNumberOfTopics(),\n\t\t\t\tdataSource : getDataSource(),\n\t\t\t\tmaxKeywordsPerTopic : 4\n\t\t\t});\n\t\t}\n\t\tsocket.onmessage = function(msg) {\n\t\t\tvar result = $.parseJSON(msg.data);\n\t\t\trenderTopicMatrix(\"#container\", result);\n\t\t}\n\t\tsocket.onclose = function() {\n\t\t socket.close();\n\t\t}\n\t} catch (exception) {\n\t\tmessage(\"error loading keyword/topic matrix\");\n\t}\n\t\n}", "componentWillMount() {\n this.props.fetchTopics()\n }", "componentDidMount() {\n this.props.actions.getTopics();\n }", "function topicAssign() {\n topic = $(this).attr(\"name\");\n ajaxInfo();\n}", "function findTopicById(id) {\n\n $.ajax({\n type: \"GET\",\n dataType: \"json\",\n headers: {\n \"adminbksoftwarevn\": value_token_public,\n },\n url: \"api/v1/public/topic/find-by-id?id=\" + id,\n timeout: 30000,\n success: function (result) {\n updateTopic(result);\n },\n error: function (jqXHR, textStatus, errorThrown) {\n errMess(jqXHR, textStatus, errorThrown);\n }\n });\n}", "function updateTopics(topics) {\n topics.forEach(function(d, i) { d.r = Math.max(12, r(d.count)); }); // min. collision\n force.nodes(data.topics = topics).start();\n updateNodes();\n updateLabels();\n}", "changeTopic(newTopic) {\n let url = defaultUrl + '&category=' + newTopic;\n this.apiCall(url);\n }", "function addTopics(html) {\n var dom = lastUserlist()\n var d = insert(html)\n var x = focusThreads(d)\n var it = document.getElementById(\"inlinetopic\")\n var old = it.getElementsByClassName(\"posts\")[0]\n var us = d.getElementsByClassName(\"c_view\")[0].parentNode\n\n var modified = false\n var olds = old.getElementsByTagName(\"tr\")\n var xs = x.getElementsByTagName(\"tr\")\n\n for (var i = 0; i < olds.length; i++) {\n try {\n var or = parseInt(olds[i].children[3].textContent.replace(/,/g, \"\"))\n var nr = parseInt(xs[i].children[3].textContent.replace(/,/g, \"\"))\n var ot = olds[i].children[1].children[1].textContent\n var nt = xs[i].children[1].children[1].textContent\n\n if (or !== nr) {\n modified = true\n break\n\n } else if (ot !== nt) {\n modified = true\n break\n }\n\n } catch(e){ verb(e) }\n }\n\n // Remove loaded HTML\n d.parentNode.removeChild(d)\n\n // Swap topics\n it.removeChild(old)\n it.appendChild(x)\n // addHideButtons(xs)\n\n // Update userlist\n dom.parentNode.replaceChild(us, dom)\n\n if (modified) {\n verb(\"Threads modified\")\n time = 6667\n\n } else time = Math.min(160000, Math.floor(time * 1.5))\n\n verb(\"Set time to \" + time)\n}", "function addTopics() {\n\t\tfor(i = 0 ; i < topics.length; i++) {\n\t\t\t$(\"#topics\").append(\"<button class='topic-button'>\"+topics[i]+\"</button>\");\n\t\t}\n\t}", "function load_data() {\r\n\tif (sessionStorage.getItem('pieces')) {\r\n\t\ttry {\r\n\t\t\tData.pieces = JSON.parse(sessionStorage.getItem('pieces'))\r\n\t\t\tData.stamps = JSON.parse(sessionStorage.getItem('stamps'))\r\n\t\t\tData.categories = JSON.parse(sessionStorage.getItem('categories'))\r\n\t\t\tData.tuto = JSON.parse(sessionStorage.getItem('tuto'))\r\n\t\t} catch (e) {}\r\n\t} else {\r\n\t\t// Create Categories\r\n\t\tfor (var x in Data.pieces)\r\n\t\t\tif (Data.pieces[x].category)\r\n\t\t\t\tData.categories[Data.pieces[x].category].content.push(x)\r\n\t}\r\n}", "function showFiltersTop1(topicLenght) {\n\tfor (var i=6; i<parseInt(topicLenght);i++) {\n\t\tvar li = \"liTopic\"+(i);\n\t\tdocument.getElementById(li).style.display = 'block';\n\t\tdocument.getElementById('f_vermas1').style.display = 'none';\n\t}\n}", "loadFavourites(replace) {\n this.loadArticles({\n type: 'favourites',\n from: replace ? 0 : this.articles.length,\n num: this.defaultNewArticlesNum\n }, replace);\n }" ]
[ "0.6476352", "0.6294281", "0.6278117", "0.6185661", "0.61538047", "0.6110893", "0.58276254", "0.58084935", "0.5701241", "0.5615093", "0.55994296", "0.5522265", "0.5520467", "0.551357", "0.5460598", "0.54537094", "0.543081", "0.53915656", "0.5388251", "0.538819", "0.5387373", "0.53791636", "0.5378126", "0.5364743", "0.53390217", "0.52943295", "0.528931", "0.52428645", "0.5231134", "0.52108014", "0.51944345", "0.5193207", "0.51866955", "0.51864666", "0.5181643", "0.5165728", "0.51614916", "0.51541716", "0.5142411", "0.51393586", "0.51303947", "0.51189464", "0.51101804", "0.51008904", "0.506231", "0.5062102", "0.5055081", "0.5052771", "0.50495875", "0.5038938", "0.503821", "0.502208", "0.5017233", "0.5008007", "0.50041264", "0.5003449", "0.5001853", "0.49893856", "0.498121", "0.4972832", "0.49547625", "0.49407858", "0.4938896", "0.49345165", "0.49324185", "0.49276426", "0.49265873", "0.49244684", "0.48950166", "0.48945943", "0.4879235", "0.4879058", "0.48737565", "0.48672628", "0.48601365", "0.48578185", "0.48531058", "0.4848417", "0.48386526", "0.48319164", "0.48278517", "0.4826409", "0.48101437", "0.4804191", "0.47984514", "0.47982264", "0.4792515", "0.47907388", "0.47884536", "0.47870487", "0.4772693", "0.47661507", "0.4765719", "0.47654423", "0.47647387", "0.4762507", "0.47560763", "0.47532165", "0.47520626", "0.47471783" ]
0.7039846
0
Method to retrieve state from Stores
function getState( id ) { return { data: PostsStore.getPost( id ) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getState() {\n return JSON.parse(device.localStorage.getItem(stateKey));\n}", "function getStateFromStores() {\n return {\n // usercontext: UserContextStore.getContext()\n\t\t// data: DeploymentOptionsStore.getData()\n }\n}", "getStores() {\n Service.get(this).getStores(state.get(this).params.companyId);\n }", "function getStateFromStore() {\n return {\n workspaceList: WorkspaceStore.getWorkspaceList(),\n workspaceValue: WorkspaceStore.getWorkspaceIndex().toString()\n };\n}", "function getState () {\n return state\n }", "function getState () {\n return state\n }", "get_all(){\n let product = productStore.state\n let cart = cartStore.state\n let state = { product, cart }\n return state\n }", "function getStoreState() {\n return {\n results: VotingResultsStore.getResults(),\n showReturnToWorkspace: false,\n };\n}", "function getState() {\n generalServices.addLogEvent('stateServices', 'getState', 'Start');\n return $q(function (resolve, reject) {\n var params = { sessionId: window.localStorage.sessionId, id: window.localStorage.id, loggingLevel: window.localStorage.loggingLevel };\n\n generalServices.callRestApi('/getState', params)\n .then(function (data) { // Data \n if (data.error != \"\") {\n userServices.userDataNotFoundHandler();\n reject();\n } else {\n resolve(data.state);\n }\n },\n function () { reject(); });\n });\n }", "function getState() {\n return state;\n }", "function getStateFromStores() {\n return {\n messages: MessageStore.getMessagesforCurrentThread(),\n userName: MessageStore.getUserNameForCurrentThread(),\n threadID: { id: \"1234\"}, //ThreadStore.getCurrentThreadID(),\n };\n}", "function get(store) {\n var value = {};\n store.subscribe(function (state) {\n value = state;\n })();\n return value;\n}", "async _getState () {\n const serialized = await AsyncStorage.getItem(this._storageKey)\n return serialized ? JSON.parse(serialized) : undefined\n }", "getState(state) {\n return state[this.key];\n }", "getState(state) {\n return state[this.key];\n }", "function getState() {\n return window.stokr.model.getState();\n }", "function getAppState() {\n return UserStore.getData();\n}", "_getStateFromStore() {\n return PersonStore.getPeople()\n }", "getState() {\n return state;\n }", "getState() {\n\n }", "function getStoreProps(state) {\n return state\n}", "function getAllState() {\n return {\n data : GameStore.getAll(),\n }\n}", "getAvailableStores() {\n // Call the function to load all available stores\n var data = autocomplete.cloudLoadAvailableStores().then((value) => {\n // Get the stores and ids\n var titles = value.titles;\n var ids = value.ids;\n var addrs = value.addrs;\n var names = value.names;\n\n // Save the names and ids to the state\n var temp = [];\n for (var i = 0; i < ids.length; i++) {\n temp.push({\n title: titles[i],\n id: ids[i],\n addr: addrs[i],\n storeName: names[i]\n });\n }\n\n temp.push({\n title: \"Register a store...\",\n id: -1\n });\n\n return temp;\n });\n\n return data;\n }", "getState() {\n return this.state;\n }", "getState() {\n return JSON.parse(JSON.stringify(this._state));\n }", "getState() {\n if (this.state) {\n return this.state;\n }\n\n if (this.options.getState instanceof Function) {\n return this.options.getState();\n }\n\n return {};\n }", "function getAppState() {\n return {\n searchGridState: ApiStore.getData(),\n didFirstSearch: ApiStore.didFirstSearch(),\n states: ApiStore.getStates(),\n orgTypes: ApiStore.getOrgTypes(),\n cities: ApiStore.getCities(),\n counties: ApiStore.getCounties(),\n };\n}", "getState() {\n return this._state;\n }", "get() {\n return this._state\n }", "function getAppState() {\n return {\n users: AppStore.getUsers(),\n roles: AppStore.getRoles(),\n userToEdit: AppStore.getUserToEdit()\n }\n}// === end of function to get the state === //", "getStoresLoading() {\r\n return this.store.pipe(select(StoreFinderSelectors.getStoresLoading));\r\n }", "_getStateObj () {\n return {\n openTab: PageStore.getOpenTab(),\n allInsights: InsightsStore.getAllInsights()\n }\n }", "getState () {\n return _data;\n }", "function getState(key) {\n if(!(_states && _states[key])){ return; }\n return _states[key];\n }", "getState() {\n return this._state;\n }", "getState() {\n return this._state;\n }", "getState() {\n return this._state;\n }", "getState() {\n return this._state;\n }", "get_state() {\n return this.state;\n }", "function getCartState() {\n 'use strict';\n\n return {\n product: ProductStore.getProduct(),\n selectedProduct: ProductStore.getSelected(),\n cartItems: CartStore.getCartItems(),\n cartCount: CartStore.getCartCount(),\n cartTotal: CartStore.getCartTotal(),\n cartVisible: CartStore.getCartVisible()\n };\n}", "function getState(){\n\tif(fs.existsSync(getPath('cache/state.json'))){\n\t\tlet state_json = fs.readFileSync(getPath('cache/state.json'));\n\t\ttry{\n\t\t\tlet state = JSON.parse(state_json);\n\t\t\treturn state;\n\t\t}catch(e){console.log('Fail to read state.json');}\n\t}\n\n\t// Load default state from state.js, for first time run\n\tlet state = require(getPath('cache/state'));\n\tfs.writeFileSync(getPath('cache/state.json'), JSON.stringify(state));\n\n\treturn state;\n}", "function loadStoredInfo() {\n try {\n const stored = JSON.parse(localStorage.getItem('FULL_STATE'));\n return Object.assign(initialState, stored);\n }\n catch (err) {\n console.error(err);\n return initialState;\n }\n}", "loadComponentState() {\n const storedVal = this.getItem(LocalStorageStore.reactComponentStateKey);\n if (storedVal) {\n return JSON.parse(storedVal);\n }\n return {};\n }", "async function getStores() {\n\n try {\n const response = await HTTP.get('/services/stores');\n return response.data.stores;\n\n } catch (error) {\n console.error(error);\n }\n }", "function loadState() {\n try {\n const serialisedState = localStorage.getItem('app_state');\n if (!serialisedState) return undefined;\n return JSON.parse(serialisedState);\n } catch (e) {\n return undefined;\n }\n}", "function getProductState() {\n return {\n allProducts: ProductStore.getProducts()\n }\n}", "getState() {\n return undefined;\n }", "getState (path) {\n return this.model.get(ensurePath(path))\n }", "function getStateAndProcess() {\n generalServices.addLogEvent('stateServices', 'getStateAndProcess', 'Start');\n return $q(function (resolve, reject) {\n var params = { sessionId: window.localStorage.sessionId, id: window.localStorage.id, loggingLevel: window.localStorage.loggingLevel };\n\n generalServices.callRestApi('/getState', params)\n .then(function (data) { // Data \n if (data.error != \"\") {\n userServices.userDataNotFoundHandler();\n reject();\n } else {\n // Always set loggingLevel in case it has changed\n if (data.loggingLevel != null) {\n window.localStorage.setItem(\"loggingLevel\", data.loggingLevel);\n //alert(data.loggingLevel);\n }\n\n if (window.state != data.state) {\n setState(data.state);\n resolve();\n } else {\n resolve();\n }\n }\n },\n function () { reject(); });\n });\n }", "function getAppState() {\n\t //console.log(\"A CHANGE IN USER OR POST STORE\");\n\t return {\n\t allPosts: PostStore.getAll(),\n\t currentUser: UserStore.getCurrentUser(),\n\t isLoggedIn: UserStore.isSignedIn(),\n\t isAdmin: UserStore.isAdmin(),\n\t currentSongList: PostStore.getSortedPosts(),\n\t currentSong: PostStore.getCurrentSong()\n\t };\n\t}", "getStore(index) {\n return(this.store[index]);\n }", "function getState() {\n return {\n higher: Store.getHigher()\n };\n}", "storeChangeHandler() {\n this.setState({\n list: WeatherStore.get(['data', 'list']),\n city: WeatherStore.get(['data', 'city']),\n loading: WeatherStore.get('loading'),\n });\n }", "function getState(stateId) {\n return $http({\n url: baseUrl + '/show/' + stateId,\n method: 'GET'\n }).then(function(res){\n return res;\n }).catch(function(err){\n throw err;\n });\n }", "function getBuildingState() {\n return {\n data: MapitStore.getAll()\n };\n}", "function getSerializedState() {\n return ss;\n }", "function getStores() {\n return [MainStore];\n}", "searchStores() {\n StoreService.getStores((data) => {\n this.setState({ stores: data });\n });\n }", "get State() {\r\n return _state;\r\n }", "get State() {\r\n return _state;\r\n }", "get state() {\r\n\t\treturn this[propertyNames.state]\r\n\t}", "async GetState(ctx, key) {\n let data = await ctx.stub.getState(key);\n let jsonData = JSON.parse(data.toString());\n return JSON.stringify(jsonData);\n }", "async GetState(ctx, key) {\n let data = await ctx.stub.getState(key);\n let jsonData = JSON.parse(data.toString());\n return JSON.stringify(jsonData);\n }", "getState() {\n return {\n side: this.side,\n orderMap: this.orderMap.getState()\n };\n }", "get(key) {\n return this.state[key];\n }", "get(key) {\n return this.state[key];\n }", "retrieve (key) {\n if (_state[key])\n return _state[key];\n return false;\n }", "get state() {\n return this._current().state;\n }", "async GetState(ctx, key) {\n let data = await ctx.stub.getState(key);\n let jsonData = JSON.parse(data.toString());\n return JSON.stringify(jsonData);\n }", "get State() {\n return _state;\n }", "get State() {\n return _state;\n }", "get State() {\n return _state;\n }", "get State() {\n return _state;\n }", "get State() {\n return _state;\n }", "function getSavedState(key) {\n return JSON.parse(window.localStorage.getItem(key))\n}", "onStoreChange() {\n this.setState(this._getStateFromStore);\n }", "function getUserState() {}", "function getState() {\n return currentState\n }", "getSaveStates() {\n const getSaveStatesTask = async () => {\n let cartridgeObject = await WasmBoyMemory.getCartridgeObject();\n if (!cartridgeObject) {\n return [];\n } else {\n return cartridgeObject.saveStates;\n }\n };\n\n return getSaveStatesTask();\n }", "function buildingGetSaveState() {\n var result = {};\n\n result.storage = buildingStorage.getSaveState();\n\n return result;\n}", "get store() {\n return this.entityServicesElements.store;\n }", "async getStoreByTags() {\n // Get result\n const result = await StoreService.getStoreByTags(this.tags, this.page.number, this.page.orderby, this.page.limit);\n\n // Update the state\n\t\tthis.setState({\n isLoading: false,\n stores: result.data.response.length > 0 ? result.data.response : null\n\t\t});\n }", "_getAllStatesCurrent() {\n return this._request(this.STATE + this.CURRENT_JSON)\n\n }", "function loadState () {\n var state = localStorage.getItem(STORAGE_KEY);\n if (!state) {\n state = DEFAULT_STATE;\n saveState(state);\n } else {\n state = JSON.parse(state);\n }\n return state;\n}", "getState() {\n return this._platformLocation.getState();\n }", "get state() {\n return this.getStringAttribute('state');\n }", "get state() {\n return this.getStringAttribute('state');\n }", "get state() {\n return this.getStringAttribute('state');\n }", "get state() {\n return this.getStringAttribute('state');\n }", "function getStateFromDb() {\r\n console.log('clientApp: getting state of the sisbot from db');\r\n $http({\r\n method: \"GET\",\r\n url: 'sis/getState'\r\n }).then(function (response) {\r\n state = response.data.state;\r\n\r\n curPlaylist = state.curPlaylist;\r\n socket.emit('changePL',state.curPlaylist);\r\n // use curPlaylist and Playlist db\r\n getPlaylistsFromDb()\r\n });\r\n }", "function getTodoState() {\n return {\n allTodos: Store.getAll(),\n areAllComplete: Store.areAllComplete()\n };\n}", "function getAllState() {\r\n return get('/state/getall').then(function (res) {\r\n return res.data;\r\n }).catch(function (err) {\r\n return err.response.data;\r\n });\r\n}", "getItem(key) {\n return this.store.get(key);\n }", "function getTodoState() {\n return {\n allTasks: TaskStore.getAll(),\n areAllComplete: TaskStore.allComplete()\n };\n}", "getStateInternal(id) {\n var obj = id;\n if (! obj.startsWith(this.namespace + '.'))\n obj = this.namespace + '.' + id;\n return currentStateValues[obj];\n }", "function getState() {\n return currentState\n }", "function getCurrentState() {\n\t\treturn {};\n\t}", "function getStateFromAlbumStore () {\n // console.log('AlbumCardList ' + this.state.albumList)\n return {\n albumList: AlbumStore.getAlbumList()\n }\n}", "function GetStores() {\n var stores = GetAllStores.getStores();\n ISML.renderTemplate('responses/json', {\n JSONResponse : stores.JSONResponse\n });\n}", "function getState() {\n return currentState\n }", "get state() {\n return this._obj.state;\n }" ]
[ "0.7293229", "0.71309334", "0.7038652", "0.70127845", "0.70116407", "0.70116407", "0.6975344", "0.6927295", "0.68934685", "0.6889814", "0.68128955", "0.6798313", "0.6789322", "0.67840683", "0.67840683", "0.6767093", "0.6742998", "0.67277837", "0.6704687", "0.6565206", "0.65644634", "0.652806", "0.65150666", "0.6483806", "0.64764696", "0.6469527", "0.64593816", "0.6449352", "0.6439688", "0.6439153", "0.64332336", "0.63839555", "0.6378703", "0.63747424", "0.6370722", "0.6370722", "0.6370722", "0.6370722", "0.63546115", "0.63339907", "0.6325202", "0.6313666", "0.63130987", "0.6295268", "0.6294909", "0.6291834", "0.6286231", "0.62807846", "0.6263475", "0.6261772", "0.62397563", "0.62077785", "0.6197536", "0.61630505", "0.6162039", "0.61504805", "0.6150315", "0.6136544", "0.61225224", "0.61225224", "0.6122478", "0.61038536", "0.61038536", "0.6094818", "0.60830307", "0.60830307", "0.6082553", "0.6074216", "0.60694814", "0.60628766", "0.60628766", "0.60628766", "0.60628766", "0.60628766", "0.6060614", "0.6058986", "0.60515225", "0.60490316", "0.6034987", "0.6020082", "0.6016249", "0.60011184", "0.59989035", "0.59929585", "0.59888303", "0.5987176", "0.5987176", "0.5987176", "0.5987176", "0.59796274", "0.5974478", "0.5972107", "0.5968714", "0.5965382", "0.59646523", "0.5964125", "0.5959299", "0.5957639", "0.59567493", "0.59511584", "0.59417105" ]
0.0
-1
Returns OAuth2 client Arguments: config: hash containing: client, hash containing: base_url: The base URL of the OAuth2 client. Ex: process_login_url: the URL where to the OAuth2 server must redirect the user when authenticated. login_url: the URL where the user must go to be redirected to OAuth2 server for authentication. logout_url: the URL where the user must go so that his session is cleared, and he is unlogged from client. default_redirection_url: default URL to redirect to after login / logout. Optional, default to '/'. crypt_key: string, encryption key used to crypt information contained in the states. This is a symmetric key and must be kept secret. sign_key: string, signature key used to sign (HMAC) issued states. This is a symmetric key and must be kept secret. default_server: which server to use for default login when user access login_url (ex: 'facebook.com'). servers: hash associating OAuth2 server ids (ex: "facebook.com") with a hash containing (for each): server_authorize_endpoint: full URL, OAuth2 server token endpoint (ex: " server_token_endpoint: full url, where to check the token (ex: " client_id: the client id as registered by this OAuth2 server. client_secret: shared secret between client and this OAuth2 server. options: optional, hash associating OAuth2 server ids (ex: "facebook.com") with hash containing some options specific to the server. Not all servers have to be listed here, neither all options. Possible options: valid_grant: a function which will replace the default one to check the grant is ok. You might want to use this shortcut if you have a faster way of checking than requesting the OAuth2 server with an HTTP request. treat_access_token: a function which will replace the default one to do something with the access token. You will tipically use that function to set some info in session. transform_token_response: a function which will replace the default one to obtain a hash containing the access_token from the OAuth2 server reply. This method should be provided if the OAuth2 server we are requesting does not return JSON encoded data.
function createClient(conf, options) { conf.default_redirection_url = conf.default_redirection_url || '/'; options = options || {}; return new OAuth2Client(conf, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function client(config){\n \n var base = this;\n\n //Save the options\n base.config = config;\n \n //Save the oauth client\n base.oa = undefined;\n \n //If we need to take care of refresh tokens\n\t// NO SUPPORT for OAUTH 1.0\n\n\tswitch(base.config.version) {\n\n\t\t//UNTESTED!!\n\t\tcase \"1.0\":\n\n\t\t\t/*\n\t\t\t//Set oauth\n\t\t\tbase.oa = new OAuth.OAuth(base.config.flow.request.url,\n\t\t\t\t\t\tbase.config.access.url,\n\t\t\t\t\t\tbase.config.keys.consumer,\n\t\t\t\t\t\tbase.config.keys.secret,\n\t\t\t\t\t\tbase.config.version,\n\t\t\t\t\t\tbase.config.access_uri.url,\n\t\t\t\t\t\tbase.config.signature);\n\t\t\t*/\n\t\tbreak;\n\n\t\tcase \"2.0\":\n\n\t\t\t//Authorization flow\n\t\t\t// NOT required (only for OAUTH authorization)\n\t\t\tvar flow = {\n\t\t\t\t\"authorize\":\"\",\n\t\t\t\t\"token\":\"\"\n\t\t\t};\n\t\t\t\n\t\t\t//If we have an authorization flow\n\t\t\t// then configure it\n\t\t\tif(base.config.flow) {\n\t\t\t\t\n\t\t\t\t//Set the authorization url\n\t\t\t\tif(base.config.flow.authorize) flow.authorize = base.config.flow.authorize.url;\n\n\t\t\t\t//Set the token url if we have a refresh url\n\t\t\t\tif(base.config.flow.refresh) flow.token = base.config.flow.refresh.url;\n\n\t\t\t\t//Otherwise use the token auth flow\n\t\t\t\tif(base.config.flow.token) flow.token = base.config.flow.token.url;\n\t\t\t}\n\t\t\t\t\n\t\t\t//Create a new OAuth2 method\n\t\t\t//function(clientId, clientSecret, baseSite, authorizePath, accessTokenPath, customHeaders) \n\t\t\tbase.oa = new OAuth.OAuth2(\n\t\t\t\tbase.config.keys.consumer,\n\t\t\t\tbase.config.keys.secret,\n\t\t\t\t'',\n\t\t\t\tflow.authorize,\n\t\t\t\tflow.token);\n\t\t\t\t\t\n\t\t\t//Add other config options\n\t\t\tif(base.config.options) {\n\t\t\t\tif(base.config.options.useAuthHeader) base.oa.useAuthorizationHeaderforGET(base.config.options.useAuthHeader);\n\t\t\t\tif(base.config.options.authMethod) base.oa.setAuthMethod(base.config.options.authMethod);\n\t\t\t\tif(base.config.options.authTokenName) base.oa.setAccessTokenName(base.config.options.authTokenName);\n\t\t\t}\n\t\tbreak;\n\n\t\tdefault:\n\t\t\t//NOT IMPLEMENTED\n\t\tbreak;\n\t} \n}", "function getOAuth2Client(cb) {\n // Load client secrets\n var credentials = JSON.parse(client_secret);\n var clientSecret = credentials.web.client_secret;\n var clientId = credentials.web.client_id;\n var redirectUrl = credentials.web.redirect_uris[0];\n var auth = new googleAuth();\n var oauth2Client = new auth.OAuth2(clientId, clientSecret, redirectUrl);\n // Load credentials\n oauth2Client.credentials = JSON.parse(token);\n return cb(null, oauth2Client);\n}", "function getAuthClient() {\n // Get our credentials (or a Promise that we will have them)\n return getCredentials().then(\n credentials => authorize( credentials ),\n function( err ) { console.log( 'Error getting credentials! ', err ); }\n );\n}", "getOAuth2Client(cb) {\r\n // Load client secrets\r\n fs.readFile('client_secret.json', function(err, data) {\r\n if (err) {\r\n return cb(err);\r\n }\r\n var credentials = JSON.parse(data);\r\n var clientSecret = credentials.installed.client_secret;\r\n var clientId = credentials.installed.client_id;\r\n var redirectUrl = credentials.installed.redirect_uris[0];\r\n var auth = new googleAuth();\r\n var oauth2Client = new auth.OAuth2(clientId, clientSecret, redirectUrl);\r\n\r\n // Load credentials\r\n fs.readFile('gmail-credentials.json', function(err, token) {\r\n if (err) {\r\n return cb(err);\r\n } else {\r\n oauth2Client.credentials = JSON.parse(token);\r\n return cb(null, oauth2Client);\r\n }\r\n });\r\n });\r\n }", "function getOauth2Client() {\n let auth = new googleapis.google.auth.OAuth2('110900474720-ca2o8jidt9fbmup9c50t51bjrl5omdk4.apps.googleusercontent.com', // client_id\n 'UFH1TiCGBNp9ZCykoSdvRPF5', // client_secret\n 'urn:ietf:wg:oauth:2.0:oob');\n if (gAuthCredentials)\n auth.setCredentials(gAuthCredentials);\n return auth;\n}", "function initiateOAuth2(config) {\n //alert('authservice.initiateOAuth2():', config)\n\n if (typeof(config) == 'string') {\n var authority = config;\n var successURL = null;\n var failURL = null;\n } else {\n var authority = config.authority;\n var successURL = config.resume ? config.resume : null;\n var failURL = config.error ? config.error : null;\n }\n\n if (!authority) {\n alert('authservice.initiateOAuth2(): missing \\'authority\\' parameter');\n return;\n }\n if (!successURL) {\n successURL = currentPageURL();\n }\n if (!failURL) {\n failURL = successURL;\n }\n console.log('successURL=' + successURL)\n console.log('successURL=' + encodeURIComponent(successURL))\n console.log('failURL=' + failURL)\n\n var url = 'http://' + _host + ':' + _port + '/v2/oauth2/initiate/' + _apikey + '/' + authority;\n url += '?success=' + encodeURIComponent(successURL);\n url += '&fail=' + encodeURIComponent(failURL);\n // alert('Initiate URL:' + url)\n window.location = url;\n }", "function authenticate({\n clientId,\n clientSecret,\n scopes,\n authenticateUrl,\n tokenUrl,\n httpPort,\n loginPath,\n callbackPath\n}) {\n return new Promise(async (resolve, reject) => {\n const redirectUri = `http://127.0.0.1:${httpPort}${callbackPath}`;\n const app = express();\n\n // Create a endpoint where we can send the browser to, which redirects to the correct\n // authentication URL.\n const tokenResponseBodyPromise = new Promise((resolve, _reject) => {\n app.get(loginPath, (_req, res) => {\n res.redirect(\n authenticateUrl +\n \"?\" +\n querystring.stringify({\n response_type: \"code\",\n client_id: clientId,\n scope: scopes.join(\" \"),\n redirect_uri: redirectUri\n })\n );\n res.end();\n });\n\n // Create a endpoint for the OAuth2 callback URL.\n // We'll receive the authentication code here as a query parameter.\n app.get(callbackPath, async (req, res) => {\n const code = req.query.code;\n\n // We received the authentication code.\n // Now we can fetch the actual tokens we need to\n // do furher requests (like 'access_token')\n const responseBody = await request({\n method: \"POST\",\n url: tokenUrl,\n headers: {\n Authorization: `Basic ${base64Encode(\n `${clientId}:${clientSecret}`\n )}`,\n Accept: \"application/json\"\n },\n form: {\n grant_type: \"authorization_code\",\n code: code,\n redirect_uri: redirectUri\n }\n });\n resolve(JSON.parse(responseBody));\n res.end();\n });\n });\n\n const server = await new Promise((resolve, reject) => {\n const server = app.listen(httpPort, \"127.0.0.1\", undefined, err => {\n if (err) {\n return reject(err);\n }\n resolve(server);\n });\n });\n\n opn(`http://127.0.0.1:${httpPort}${loginPath}`);\n\n const tokenResponseBody = await tokenResponseBodyPromise;\n\n await promisify(server.close).call(server);\n\n resolve(tokenResponseBody);\n });\n}", "getOauthClients() { \n\n\t\treturn this.apiClient.callApi(\n\t\t\t'/api/v2/oauth/clients', \n\t\t\t'GET', \n\t\t\t{ },\n\t\t\t{ },\n\t\t\t{ },\n\t\t\t{ },\n\t\t\tnull, \n\t\t\t['PureCloud OAuth'], \n\t\t\t['application/json'],\n\t\t\t['application/json']\n\t\t);\n\t}", "function initializeOAuthClient() {\n if (typeof OAuth2 === \"undefined\") {\n var libUrl =\n \"https://developers.google.com/google-ads/scripts/docs/examples/oauth20-library\";\n throw Error(\n \"OAuth2 library not found. Please take a copy of the OAuth2 \" +\n \"library from \" +\n libUrl +\n \" and append to the bottom of this script.\"\n );\n }\n var tokenUrl = \"https://api.twitter.com/oauth2/token\";\n authUrlFetch = OAuth2.withClientCredentials(\n tokenUrl,\n TWITTER_CONSUMER_KEY,\n TWITTER_CONSUMER_SECRET\n );\n}", "clientCredentials() {\n return __awaiter(this, void 0, void 0, function* () {\n const request = new request_1.OAuthClientCredentialsRequest();\n const response = yield this.post('/oauth/token', qs_1.stringify(request), {\n headers: {\n 'Content-type': 'application/x-www-form-urlencoded',\n Authorization: `Basic ${OAuthWebService.getBasicToken(this.options)}`,\n },\n });\n if (response && response.status === 200) {\n return new models_1.OAuthCredentials(response.data);\n }\n throw response;\n });\n }", "getOAuthAccessToken(client_id, client_secret) {\r\n let self = this;\r\n Utils_1.default.logInfo(\"getOAuthAccessToken called.\");\r\n Utils_1.default.logInfo(\"Using specified ClientID and ClientSecret to get OAuth token...\");\r\n let headers = {\r\n 'Content-Type': 'application/json',\r\n };\r\n let postBody = {\r\n \"grant_type\": \"client_credentials\",\r\n \"client_id\": process.env.CLIENTID,\r\n \"client_secret\": process.env.CLIENTSECRET\r\n };\r\n return self.getOAuthTokenHelper(headers, postBody);\r\n }", "function getOauth() {\n return init();\n}", "function getClient(clientID, clientSecret, callback) {\n const client = {\n clientID,\n clientSecret,\n grants: null,\n redirectUris: null\n }\n\n callback(false, client);\n}", "function OAuthTwoLeg(config) { \n this._config = config;\n }", "function loadClientConfig(callback) {\n try {\n const content = fs.readFileSync(context + '/client_secret.json');\n authorize(JSON.parse(content), callback);\n } catch (err) {\n return console.log('Error loading client secret file:', err);\n }\n}", "function oauthSalesforce(loginUrl, clientId) {\r\n var redirectUri = 'http://localhost/callback';\r\n var getAuthorizeUrl = function (loginUrl, clientId, redirectUri) {\r\n return loginUrl+'services/oauth2/authorize?display=touch'+\r\n '&response_type=token&client_id='+escape(clientId)+\r\n '&redirect_uri='+escape(redirectUri);\r\n };\r\n var startWith = function(string, str) {\r\n return (string.substr(0, str.length) === str);\r\n };\r\n\r\n var deferred = $q.defer();\r\n if(window.cordova) {\r\n if($cordovaOauthUtility.isInAppBrowserInstalled()) {\r\n var browserRef = window.cordova.InAppBrowser.open(getAuthorizeUrl(loginUrl, clientId, redirectUri), \"_blank\", \"location=no,clearsessioncache=yes,clearcache=yes\");\r\n browserRef.addEventListener(\"loadstart\", function(event) {\r\n if(startWith(event.url, redirectUri)) {\r\n var oauthResponse = {};\r\n\r\n var fragment = (event.url).split('#')[1];\r\n\r\n if (fragment) {\r\n var nvps = fragment.split('&');\r\n for (var nvp in nvps) {\r\n var parts = nvps[nvp].split('=');\r\n oauthResponse[parts[0]] = unescape(parts[1]);\r\n }\r\n }\r\n\r\n if (typeof oauthResponse === 'undefined' ||\r\n typeof oauthResponse.access_token === 'undefined') {\r\n deferred.reject(\"Problem authenticating\");\r\n } else {\r\n deferred.resolve(oauthResponse);\r\n }\r\n setTimeout(function() {\r\n browserRef.close();\r\n }, 10);\r\n }\r\n });\r\n browserRef.addEventListener('exit', function(event) {\r\n deferred.reject(\"The sign in flow was canceled\");\r\n });\r\n } else {\r\n deferred.reject(\"Could not find InAppBrowser plugin\");\r\n }\r\n } else {\r\n deferred.reject(\"Cannot authenticate via a web browser\");\r\n }\r\n return deferred.promise;\r\n }", "async load() {\n\t\tif(gapi.client && gapi.client.oauth2) return gapi;\n\n\t\tconst apis = [{ \"name\": 'oauth2', \"version\": 'v2' }];\n\t\tvar options = {\n\t\t\tdiscoveryDocs: apis.map(api => this.apiToDiscoveryDoc(api)),\n\t\t\tclientId: this.clientId,\n\t\t\tscope: this.scopesString\n\t\t};\n\t\tawait this.loadAuth2();\n\t\t//await this.loadClientAuth2();\n\t\tawait this.initGapi(options);\n\t\tawait this.initAuth2();\n\t\tawait this.getCurrentUser();\n\t\treturn gapi;\n\t}", "function createConnection() {\n return new google.auth.OAuth2(\n googleConfig.clientId,\n googleConfig.clientSecret,\n googleConfig.redirect\n );\n }", "async function authenticate(scopes){\n return new Promise((resolve, reject) => {\n // grab the url that will be used for authorization\n const authorizeUrl = oauth2Client.generateAuthUrl({\n access_type: 'offline',\n scope: scopes.join(' ')\n });\n const server = http\n .createServer(async (req, res) => {\n try {\n if (req.url.indexOf('/oauth2callback') > -1) {\n const qs = new url.URL(req.url, 'http://localhost:3000')\n .searchParams\n res.end('Authentication successfully! Please return to the console.');\n server.destroy();\n const {tokens} = await oauth2Client.getToken(qs.get('code'));\n oauth2Client.credentials = tokens;\n resolve(oauth2Client);\n }\n } catch (e) {\n reject(e)\n }\n })\n .listen(3000, () => {\n // open browser to the authorize url to start the workflow\n opn(authorizeUrl, {wait: false}).then(cp => cp.unref());\n })\n destroyer(server);\n })\n}", "function getOAuthToken(callback) {\n\tvar token_request = 'grant_type=password&client_id=' + config.CLIENT_ID + \n\t'&client_secret=' + config.CLIENT_SECRET + '&username=' + config.USERNAME + \n\t'&password=' + config.PASSWORD;\n\t\n\tif(config.DEBUG) console.log('Sending token request '+ token_request);\n\t\n request.post({\n uri: config.LOGIN_SERVER + '/services/oauth2/token', \n headers: { \n 'Content-Type': 'application/x-www-form-urlencoded' \n }, \n body: token_request\n }, function (error, response, body) {\n\t\tif ( response.statusCode == 200 ) {\n\t callback(JSON.parse(body));\n\t\t} else {\n\t\t if(config.DEBUG) console.log('Error '+response.statusCode+' '+body+' '+error);\n\t\t}\n });\t\n}", "function oAuth2() {\n\n var accessToken;\n return new Promise(function (resolve, reject) {\n\n request({\n url: 'https://www.deviantart.com/oauth2/token',\n method: 'POST',\n form: {\n 'grant_type': 'client_credentials',\n 'client_id': '12052',\n 'client_secret': '13ae1cb7fdfb9753668db6e2310c9323'\n }\n }, function (err, res) {\n if (err) reject(err);\n var json = JSON.parse(res.body);\n //console.log(\"Access Token: \", json.access_token);\n accessToken = json.access_token;\n resolve(accessToken);\n });\n });\n }", "function BbpOidcClient(options) {\n var initialized = false,\n _ensureToken = true,\n jso;\n\n // default values\n var defaultOpts = {\n authServer: 'https://services.humanbrainproject.eu/oidc',\n debug: false,\n redirectUri: document.URL,\n scopes: null,\n alwaysPromptLogin: false,\n jsonWebKeys: {\n keys: [{\n alg: 'RS256',\n e: 'AQAB',\n kty: 'RSA',\n kid: 'bbp-oidc',\n n: 'zlJpDPnGMUV5FlwQs5eIs77pdZTST29TELUT3_E1sKrN-lE4rEgbQQ5qU1KvF5669VmVeAt' +\n '-BQ2qMjGjUyl44gq-aUkeQV7MXfYJfKHIULZMTGR0lJ4ebPRQgM5OWDNjYVbASAOz0NyO6' +\n '46G5H5BlHZrA9ADyrZYZ4CEhfI1KBk'\n }]\n },\n token: null\n };\n\n var opts = deepExtend(defaultOpts, options);\n\n var init = function(force) {\n if (!initialized || force) {\n initialized = false;\n\n jso = new JsoWrapper(opts);\n jso.configure();\n\n // This check has to occurs every time.\n if (_ensureToken) {\n if(!jso.getToken()) {\n // if there's no token, check if the session with oidc is still active\n getTokenOrLogout();\n }\n }\n\n initialized = true;\n }\n };\n\n var login = function() {\n return jso.ensureTokens();\n };\n\n var logout = function() {\n // Ensure we have a token.\n var token = getToken();\n var localRemoval = function() {\n // We need to keep the token to generate\n // Bearer for this request. Hence the reset only after.\n jso.wipe();\n\n if (_ensureToken) {\n login();\n }\n };\n\n var oReq = new XMLHttpRequest();\n oReq.onload = localRemoval;\n oReq.open('post', opts.authServer + '/slo', true);\n oReq.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');\n oReq.withCredentials = true;\n oReq.send(JSON.stringify({ token: token }));\n };\n\n var getToken = function() {\n return jso.getToken();\n };\n\n /**\n * checks if the session with oidc is still active; if so, tries to get\n * a new token, otherwise notifies the parent window.\n */\n var getTokenOrLogout = function() {\n var clientId = opts.clientId;\n isSessionActive(function(active) {\n if(!active) {\n // notify the parent window that a new login is needed\n postLogoutMsg(clientId);\n }\n // ensure token in any case\n // if active == true, it will get a new token, otherwise redirect to login\n jso.ensureTokens();\n });\n };\n\n var postLogoutMsg = function(clientId) {\n if(window.parent && window !== window.top) {\n window.parent.postMessage({\n eventName: 'oidc.logout',\n data: {\n clientId: clientId\n }\n }, '*');\n }\n };\n\n var isSessionActive = function(callback) {\n var oReq = new XMLHttpRequest();\n oReq.onload = function() {\n if(callback) {\n callback(this.status === 200);\n }\n };\n\n oReq.open('get', opts.authServer + '/session', true);\n oReq.withCredentials = true;\n oReq.send();\n };\n\n init(true);\n\n return {\n setAlwaysPromptLogin: function(value) {\n opts.alwaysPromptLogin = !!value;\n init(true);\n },\n setEnsureToken: function(value) {\n _ensureToken = !!value;\n init(true);\n },\n isEnsureToken: function() {\n return _ensureToken;\n },\n getTokenOrLogout: getTokenOrLogout,\n getToken: getToken,\n wipeToken: jso.wipe,\n logout: logout,\n login: login\n };\n }", "async buildOauthClientConfiguration(authority, requestCorrelationId, serverTelemetryManager, azureRegionConfiguration, azureCloudOptions) {\n this.logger.verbose(\"buildOauthClientConfiguration called\", requestCorrelationId);\n // precedence - azureCloudInstance + tenant >> authority and request >> config\n const userAzureCloudOptions = azureCloudOptions ? azureCloudOptions : this.config.auth.azureCloudOptions;\n // using null assertion operator as we ensure that all config values have default values in buildConfiguration()\n this.logger.verbose(`building oauth client configuration with the authority: ${authority}`, requestCorrelationId);\n const discoveredAuthority = await this.createAuthority(authority, azureRegionConfiguration, requestCorrelationId, userAzureCloudOptions);\n serverTelemetryManager == null ? void 0 : serverTelemetryManager.updateRegionDiscoveryMetadata(discoveredAuthority.regionDiscoveryMetadata);\n const clientConfiguration = {\n authOptions: {\n clientId: this.config.auth.clientId,\n authority: discoveredAuthority,\n clientCapabilities: this.config.auth.clientCapabilities\n },\n loggerOptions: {\n logLevel: this.config.system.loggerOptions.logLevel,\n loggerCallback: this.config.system.loggerOptions.loggerCallback,\n piiLoggingEnabled: this.config.system.loggerOptions.piiLoggingEnabled,\n correlationId: requestCorrelationId\n },\n cryptoInterface: this.cryptoProvider,\n networkInterface: this.config.system.networkClient,\n storageInterface: this.storage,\n serverTelemetryManager: serverTelemetryManager,\n clientCredentials: {\n clientSecret: this.clientSecret,\n clientAssertion: this.clientAssertion ? this.getClientAssertion(discoveredAuthority) : undefined\n },\n libraryInfo: {\n sku: Constants.MSAL_SKU,\n version: version,\n cpu: process.arch || msalCommon.Constants.EMPTY_STRING,\n os: process.platform || msalCommon.Constants.EMPTY_STRING\n },\n telemetry: this.config.telemetry,\n persistencePlugin: this.config.cache.cachePlugin,\n serializableCache: this.tokenCache\n };\n return clientConfiguration;\n }", "function oauthFlow(cozy, storage, clientParams, onRegistered) {\n\t var ignoreCachedCredentials = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\t\n\t if (ignoreCachedCredentials) {\n\t return storage.clear().then(function () {\n\t return oauthFlow(cozy, storage, clientParams, onRegistered, false);\n\t });\n\t }\n\t\n\t var tryCount = 0;\n\t\n\t function clearAndRetry(err) {\n\t if (tryCount++ > 0) {\n\t throw err;\n\t }\n\t return storage.clear().then(function () {\n\t return oauthFlow(cozy, storage, clientParams, onRegistered);\n\t });\n\t }\n\t\n\t function registerNewClient() {\n\t return storage.clear().then(function () {\n\t return registerClient(cozy, clientParams);\n\t }).then(function (client) {\n\t var _getAuthCodeURL = getAuthCodeURL(cozy, client, clientParams.scopes),\n\t url = _getAuthCodeURL.url,\n\t state = _getAuthCodeURL.state;\n\t\n\t return storage.save(StateKey, { client: client, url: url, state: state });\n\t });\n\t }\n\t\n\t return Promise.all([storage.load(CredsKey), storage.load(StateKey)]).then(function (_ref) {\n\t var _ref2 = _slicedToArray(_ref, 2),\n\t credentials = _ref2[0],\n\t storedState = _ref2[1];\n\t\n\t // If credentials are cached we re-fetch the registered client with the\n\t // said token. Fetching the client, if the token is outdated we should try\n\t // the token is refreshed.\n\t if (credentials) {\n\t var oldClient = void 0,\n\t _token = void 0;\n\t try {\n\t oldClient = new Client(credentials.client);\n\t _token = new AccessToken(credentials.token);\n\t } catch (err) {\n\t // bad cache, we should clear and retry the process\n\t return clearAndRetry(err);\n\t }\n\t return getClient(cozy, oldClient).then(function (client) {\n\t return { client: client, token: _token };\n\t }).catch(function (err) {\n\t // If we fall into an error while fetching the client (because of a\n\t // bad connectivity for instance), we do not bail the whole process\n\t // since the client should be able to continue with the persisted\n\t // client and token.\n\t //\n\t // If it is an explicit Unauthorized error though, we bail, clear th\n\t // cache and retry.\n\t if (_fetch.FetchError.isUnauthorized(err) || _fetch.FetchError.isNotFound(err)) {\n\t throw new Error('Client has been revoked');\n\t }\n\t return { client: oldClient, token: _token };\n\t });\n\t }\n\t\n\t // Otherwise register a new client if necessary (ie. no client is stored)\n\t // and call the onRegistered callback to wait for the user to grant the\n\t // access. Finally fetches to access token on success.\n\t var statePromise = void 0;\n\t if (!storedState) {\n\t statePromise = registerNewClient();\n\t } else {\n\t statePromise = Promise.resolve(storedState);\n\t }\n\t\n\t var client = void 0,\n\t state = void 0,\n\t token = void 0;\n\t return statePromise.then(function (data) {\n\t client = data.client;\n\t state = data.state;\n\t return Promise.resolve(onRegistered(client, data.url));\n\t }).then(function (pageURL) {\n\t return getAccessToken(cozy, client, state, pageURL);\n\t }).then(function (t) {\n\t token = t;\n\t }).then(function () {\n\t return storage.delete(StateKey);\n\t }).then(function () {\n\t return { client: client, token: token };\n\t });\n\t }).then(function (creds) {\n\t return storage.save(CredsKey, creds);\n\t }, function (err) {\n\t if (_fetch.FetchError.isUnauthorized(err)) {\n\t return clearAndRetry(err);\n\t } else {\n\t throw err;\n\t }\n\t });\n\t}", "function oAuth2() {\n\n var accesToken;\n //Create new promise\n return new Promise(function (resolve, reject) {\n //Request\n request({\n url: 'https://www.deviantart.com/oauth2/token',\n method: 'POST',\n form: {\n 'grant_type': 'client_credentials',\n 'client_id': '12052',\n 'client_secret': '13ae1cb7fdfb9753668db6e2310c9323'\n }\n }, function (err, res) {\n if (err) reject(err);\n var json = JSON.parse(res.body);\n accesToken = json.access_token;\n resolve(accesToken);\n });\n });\n }", "login(creds, options, callback) {\n const login_url = util.format('%s/%s', this.url, 'session');\n \n if (_.isFunction(creds)) {\n callback = creds;\n creds = undefined;\n }\n if (_.isFunction(options)) {\n callback = options;\n options = undefined;\n }\n creds = creds || {};\n options = options || {};\n \n _.defaults(creds, {\n client_id: this.client_id,\n client_secret: this.client_secret\n });\n \n if (creds.username && creds.password) {\n options.grant_type = options.grant_type || 'password';\n }\n \n _.defaults(options, {\n grant_type: 'client_credentials'\n });\n \n return new promise((resolve, reject) => {\n request.post({\n url: login_url,\n auth: {\n username: creds.client_id,\n password: creds.client_secret\n },\n form: {\n grant_type: options.grant_type,\n username: creds.username || undefined,\n password: creds.password || undefined\n },\n json: true\n }, (err, response, body) => {\n if (err) {\n log('Client %s authenticatication failed: %s.', creds.username || creds.client_id, err);\n return reject(err);\n }\n if (response.statusCode >= 400) {\n let error = body.error_description || body.error;\n log('Client %s authenticatication failed: %s.', creds.username || creds.client_id, error);\n return reject(new Error(error));\n }\n \n this.token = body.access_token;\n \n log('Client %s authenticated successfully.', creds.username || creds.client_id);\n \n resolve(body);\n });\n }).nodeify(callback);\n }", "function getAccessCode(oauth2Client) {\n\t\tvar thisUrl = oauth2Client.generateAuthUrl({\n\t\t\taccess_type: 'offline',\t// obtain a refresh token\n\t\t\tscope: 'https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/drive'\n\t\t});\n \n\t\t//Visit the page to accept the authentication\n\t\tconsole.log(\"Getting Code...,\",thisUrl);\t\t\n\t\tres.redirect(thisUrl);\t\n\t\t//return oauth2Client;\n\t}", "async function authenticate() {\n return new Promise((resolve, reject) => {\n // grab the url that will be used for authorization\n const authorizeUrl = oauth2Client.generateAuthUrl({\n // 'online' (default) or 'offline' (gets refresh_token)\n access_type: 'offline',\n prompt: 'consent', // force consent to get refresh token\n scope: 'https://www.googleapis.com/auth/youtube',\n });\n const server = http.createServer(async (req, res) => {\n try {\n if (req.url.indexOf('/oauth2callback') > -1) {\n const qs = new url.URL(req.url, 'http://localhost:3000').searchParams;\n res.end('Authentication successful! Please return to the console.');\n server.destroy();\n const {tokens} = await oauth2Client.getToken(qs.get('code'));\n oauth2Client.credentials = tokens;\n if (!!tokens.refresh_token) {\n // store the refresh_token\n settings.putString('google.oauthRefreshToken', tokens.refresh_token);\n settings.save();\n }\n resolve(oauth2Client);\n }\n } catch (e) {\n reject(e);\n }\n }).listen(3000, () => {\n // open the browser to the authorize url to start the workflow\n opn(authorizeUrl, {wait: false}).then(cp => cp.unref());\n });\n destroyer(server);\n });\n }", "function authorize(credentials, callback) {\n var clientSecret = credentials.installed.client_secret,\n clientId = credentials.installed.client_id,\n redirectUrl = credentials.installed.redirect_uris[0],\n auth = new googleAuth(),\n oauth2Client = new auth.OAuth2(clientId, clientSecret, redirectUrl);\n \n // Check if we have a saved token, if not, tries to get one\n fs.readFile(TOKEN_PATH, function (err, token) {\n if (err) {\n getNewToken(oauth2Client, callback);\n } else {\n oauth2Client.credentials = JSON.parse(token);\n callback(oauth2Client);\n }\n });\n }", "function initClient() {\n\tgapi.client\n\t\t.init({\n\t\t\tapiKey: API_KEY,\n\t\t\tclientId: CLIENT_ID,\n\t\t\tdiscoveryDocs: DISCOVERY_DOCS,\n\t\t\tscope: SCOPES,\n\t\t})\n\t\t.then(\n\t\t\tfunction () {\n\t\t\t\t// Listen for sign-in state changes.\n\t\t\t\tgapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n\t\t\t\t// Handle the initial sign-in state.\n\t\t\t\tupdateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n\t\t\t\tauthorizeButton.onclick = handleAuthClick;\n\t\t\t\tsignoutButton.onclick = handleSignoutClick;\n\t\t\t},\n\t\t\tfunction (error) {\n\t\t\t\tappendPre(JSON.stringify(error, null, 2));\n\t\t\t}\n\t\t);\n}", "function initClient() {\r\n\t console.log(\"initClient Called\");\r\n\tgapi.client.init({\r\n\t apiKey: API_KEY,\r\n\t clientId: CLIENT_ID,\r\n\t discoveryDocs: DISCOVERY_DOCS,\r\n\t scope: SCOPES\r\n\t}).then(function () {\r\n\t // Listen for sign-in state changes.\r\n\t gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\r\n\r\n\t // Handle the initial sign-in state.\r\n\t updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\r\n\t authorizeButton.onclick = handleAuthClick;\r\n\t signoutButton.onclick = handleSignoutClick;\r\n\t}, function(error) {\r\n\t\tconsole.log('error :>> ', error);\r\n\t// appendPre(JSON.stringify(error, null, 2));\r\n\t});\r\n }", "function initClient() {\r\n gapi.client\r\n .init({\r\n apiKey: API_KEY,\r\n clientId: CLIENT_ID,\r\n discoveryDocs: DISCOVERY_DOCS,\r\n scope: SCOPES,\r\n })\r\n .then(\r\n function () {\r\n // Listen for sign-in state changes.\r\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\r\n\r\n // Handle the initial sign-in state.\r\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\r\n authorizeButton.onclick = handleAuthClick;\r\n signoutButton.onclick = handleSignoutClick;\r\n },\r\n function (error) {\r\n appendPre(JSON.stringify(error, null, 2));\r\n }\r\n );\r\n}", "function get_authorized_google_client() {\n const credentials = JSON.parse(process.env['GOOGLE_CREDENTIALS']);\n const {client_secret, client_id, redirect_uris} = credentials.installed;\n const oAuth2Client = new google.auth.OAuth2(client_id, client_secret, redirect_uris[0]);\n oAuth2Client.setCredentials(JSON.parse(process.env['GOOGLE_AUTH_TOKEN']));\n return oAuth2Client;\n}", "function initKoboToolboxOAuth2() {\n KoboToolboxOAuth2 = {\n accessToken: null,\n \n /**\n * Initializes the object.\n */\n init: function(config) {\n this.config = config;\n return this;\n },\n \n /**\n * Returns the authorization string for this auth method.\n */\n getAuthString: function() {\n return 'Bearer ' + this.accessToken;\n },\n \n /**\n * Authorizes and makes a GET request to the KoboToolbox API.\n */\n get: function(url) {\n var service = this.getService();\n if (service.hasAccess()) {\n var result = KoboGet_(url, 'Bearer ' + service.getAccessToken());\n //Logger.log(JSON.stringify(result, null, 2));\n return result;\n } else {\n var authorizationUrl = service.getAuthorizationUrl();\n //Logger.log('Open the following URL and re-run the script: %s', authorizationUrl);\n var template = HtmlService.createTemplate('<a href=\"<?= authorizationUrl ?>\" target=\"_blank\">Click here to authorize</a>. Reopen when the authorization is complete.');\n template.authorizationUrl = authorizationUrl;\n var page = template.evaluate();\n SpreadsheetApp.getUi().showModalDialog(page, 'Authorize');\n }\n },\n // TODO: still need to reorganize this to call again after authorization is done\n \n /**\n * Reset the authorization state, so that it can be re-tested.\n */\n reset: function() {\n var service = this.getService();\n service.reset();\n },\n \n /**\n * Configures the service.\n */\n getService: function() {\n return OAuth2.createService('KoboToolbox')\n // Set the endpoint URLs.\n .setAuthorizationBaseUrl(this.config.baseUrl + '/o/authorize')\n .setTokenUrl(this.config.baseUrl + '/o/token')\n .setTokenFormat(OAuth2.TOKEN_FORMAT.FORM_URL_ENCODED)\n \n // Set the client ID and secret.\n .setClientId(this.config.authClientId)\n .setClientSecret(this.config.authClientSecret)\n \n // Set the name of the callback function that should be invoked to complete\n // the OAuth flow.\n .setCallbackFunction('KoboOAuth2Callback')\n \n //.setTokenPayloadHandler(KoboOAuth2AddContentType)\n \n .setTokenHeaders({\n 'Authorization': 'Basic ' + Utilities.base64Encode(this.config.authClientId + ':' + this.config.authClientSecret)\n })\n \n // Set the property store where authorized tokens should be persisted.\n .setPropertyStore(PropertiesService.getUserProperties())\n \n // Set the state (this will be passed to the redirect callback)\n //.setParam('state', '12345')\n \n // Set the response type to code (required).\n .setParam('response_type', 'code');\n }\n };\n}", "function getAuth(code, client_id, client_secret) {\n var data = {\n code: code,\n grant_type: 'authorization_code',\n client_id: client_id,\n client_secret: client_secret\n };\n var url = 'https://api.dropboxapi.com/oauth2/token';\n return $.ajax({\n type: 'POST',\n url: url,\n data: $.param(data),\n dataType: \"json\",\n beforeSend: function(request) {\n request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n }\n });\n }", "getNewToken (oauth2Client, callback) {\n return new Promise((resolve, reject) => {\n var authUrl = oauth2Client.generateAuthUrl({\n access_type: 'offline',\n scope: SCOPES\n })\n console.log('Authorize this app by visiting this url: \\n ', authUrl)\n var rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n })\n rl.question('\\n\\nEnter the code from that page here: ', (code) => {\n rl.close()\n console.log('CODE IS ' + code)\n oauth2Client.getToken(code, (err, token) => {\n if (err) {\n reject(err)\n }\n\n console.log('TOKEN IN ' + JSON.stringify(token))\n oauth2Client.credentials = token\n this.storeToken(token)\n resolve(oauth2Client)\n })\n })\n })\n }", "function getNewToken(oauth2Client, callback, res) {\n var authUrl = oauth2Client.generateAuthUrl({\n access_type: 'offline',\n scope: SCOPES\n });\n console.log('Authorize this app by visiting this url: ', authUrl);\n var rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n rl.question('Enter the code from that page here: ', function(code) {\n rl.close();\n oauth2Client.getToken(code, function(err, token) {\n if (err) {\n console.log('Error while trying to retrieve access token', err);\n return;\n }\n oauth2Client.credentials = token;\n storeToken(token);\n callback(oauth2Client, res);\n });\n });\n}", "async function getNewToken(oAuth2Client, callback) {\n return new Promise((resolve, reject) => {\n // Url to give Authentication access generated using generateAuthUrl method\n const authorizeUrl = oAuth2Client.generateAuthUrl({\n access_type: 'offline',\n scope: SCOPES.join(' '),\n });\n\n /*\n Redierct to new Page Where Authentication process will take place\n Create new Server that will serve auth process\n */\n const server = http.createServer(async (req, res) => {\n try {\n if (req.url.indexOf('/oauth2callback') > -1) {\n /*\n Parse URL\n Now qs will have the whole url\n */\n const qs = new url.URL(req.url, 'http://localhost:3000').searchParams;\n res.end('Authentication successful! Please return to the console.');\n server.destroy();\n\n // Token or Code received after authentication process\n var code = qs.get('code');\n oAuth2Client.getToken(code, (err, tokens) => {\n if (err)\n return console.error('Error retrieving access token', err);\n\n // Set credentials using the token received after Authentication\n oAuth2Client.setCredentials(tokens);\n fs.writeFile(TOKEN_PATH, JSON.stringify(tokens), (err) => {\n // Write token in our database in file name Token.json\n if (err)\n return console.error(err);\n console.log('Token stored to', TOKEN_PATH);\n });\n // callback Received\n callback(oAuth2Client);\n });\n\n // oAuth2Client.credentials = tokens;\n resolve(oAuth2Client);\n }\n } catch (e) {\n reject(e);\n }\n }).listen(3000, () => {\n opn(authorizeUrl, {wait: false}).then(cp => cp.unref());\n });\n destroyer(server);\n });\n}", "function getGoogleDriveAuthInfo(callback){\n\t\n\tlogger.info('TOKEN_DIR:', TOKEN_DIR);\n\t\n\treturn fs.readFile('client_secret.json', function processClientSecrets(err, content) {\n\t\t if (err) {\n\t\t console.log('Error loading client secret file: ' + err);\n\t\t return;\n\t\t }\n\t\t // Authorize a client with the loaded credentials, then call the\n\t\t // Drive API.\n\t\t authorize(JSON.parse(content), callback);\n });\n\t \n\n\t \n\t\t\n\t// Authorize a client with the loaded credentials, then call the\n\tfunction authorize(credentials, callback) {\n\t\t var clientSecret = credentials.installed.client_secret;\n\t\t var clientId = credentials.installed.client_id;\n\t\t var redirectUrl = credentials.installed.redirect_uris[0];\n\t\t var auth = new googleAuth();\n\t\t var oauth2Client = new auth.OAuth2(clientId, clientSecret, redirectUrl);\n\t\t\tlogger.info('TOKEN_PATH :', TOKEN_PATH);\n\t\t // Check if we have previously stored a token.\n\t\tfs.readFile(TOKEN_PATH, function(err, token) {\n\t\t if (err) {\n\t\t\tlogger.info('authorize error:', err);\n\t\t\t getNewToken(oauth2Client, callback);\n\t\t } else {\n\t\t\t logger.info('authorize not error:', JSON.stringify(token));\n\t\t\t oauth2Client.credentials = JSON.parse(token);\n\t\t\t callback(oauth2Client);\n\t\t }\n\t\t});\n\t}\t\t\n\n\n\t// Generate new token\n\tfunction getNewToken(oauth2Client, callback) {\n\t\t var authUrl = oauth2Client.generateAuthUrl({\n\t\t access_type: 'offline',\n\t\t scope: SCOPES\n\t\t });\n\t\t console.log('Authorize this app by visiting this url: ', authUrl);\n\t\t var rl = readline.createInterface({\n\t\t input: process.stdin,\n\t\t output: process.stdout\n\t\t });\n\t\t rl.question('Enter the code from that page here: ', function(code) {\n\t\t rl.close();\n\t\t oauth2Client.getToken(code, function(err, token) {\t\t\t\n\t\t\t\n\t\t\t if (err) {\n\t\t\t console.log('Error while trying to retrieve access token', err);\n\t\t\t return;\n\t\t\t }\n\t\t\t console.log('token', JSON.stringify(token));\n\t\t\t oauth2Client.credentials = token;\n\t\t\t storeToken(token);\n\t\t\t callback(oauth2Client);\n\t\t });\n\t\t });\n\t}\n\t \n\t// Store if token is new\n\tfunction storeToken(token) {\n\t\t try {\n\t\t fs.mkdirSync(TOKEN_DIR);\n\t\t } catch (err) {\n\t\t if (err.code != 'EEXIST') {\n\t\t\t throw err;\n\t\t }\n\t\t }\n\t\t console.log('Token stored to ' + TOKEN_PATH);\n\t\t fs.writeFile(TOKEN_PATH, JSON.stringify(token));\n\t}\n\n\t\n}", "function Client(config) {\n var self = this;\n\n // Call the constructor of the EventEmitter class -- this, allows us to\n // initialize our Client object as an EventEmitter, and allows us to fire off\n // events later on.\n events.EventEmitter.call(self);\n\n // Bind the user-supplied config property to our class so it can be accessed\n // like an object.\n self.config = new Config(config);\n\n // For backwards compatibility reasons, if no API key is specified we'll try\n // to grab the API credentials out of our new format and shove it into the old\n // format. This can go away once we cut a release and decide to no longer\n // support the old configuration formatting.\n if (!self.config.apiKey) {\n self.config.apiKey = self.config.client.apiKey;\n }\n\n self._dataStore = new DataStore(self.config);\n\n // We'll maintain this class variable as an in-memory singleton for caching\n // purposes. We do this because Tenants never ever change once a Client has\n // been initialized, so it makes sense to cache the Tenant object so we don't\n // make unnecessary API requests if this object is looked up more than once.\n self._currentTenant = null;\n\n self.mergeRemoteConfig(function(err) {\n return err ? self.emit('error', err): self.emit('ready', self);\n });\n}", "getAccessToken(args) {\n\t\targs = args || {};\n\t\tconst accessToken = args.accessToken;\n\n\t\tif (_.isString(accessToken)) {\n\t\t\treturn Promise.resolve({\n\t\t\t\taccess_token: accessToken // eslint-disable-line camelcase\n\t\t\t});\n\t\t}\n\n\t\tconst clientId = _.get(args, 'clientId', this.clientId);\n\t\tconst clientSecret = _.get(args, 'clientSecret', this.clientSecret);\n\n\t\tif (!_.isString(clientId)) {\n\t\t\tthrow new Error('A clientId string is required for getAccessToken()');\n\t\t}\n\n\t\tif (!_.isString(clientSecret)) {\n\t\t\tthrow new Error('A clientSecret string is required for getAccessToken()');\n\t\t}\n\n\t\tconst params = {\n\t\t\tmethod: 'POST',\n\t\t\tbaseUrl: Client.OAUTH_BASE_URL,\n\t\t\tpath: '/access_token',\n\t\t\tcontentType: 'application/x-www-form-urlencoded',\n\t\t\tauthorization: this.getBasicAuthorization(clientId, clientSecret),\n\t\t\tquery: {\n\t\t\t\tgrant_type: 'client_credentials' // eslint-disable-line camelcase\n\t\t\t}\n\t\t};\n\n\t\treturn this.makeRequest(params);\n\t}", "function initClient() {\n gapi.client\n .init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n })\n .then(\n function() {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n },\n function(error) {\n appendPre(JSON.stringify(error, null, 2));\n }\n );\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick; return false;\n }, function (error) {\n alert(\"error\");\n });\n}", "function initClient() {\n\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function() {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: \"AIzaSyDvAaIy2lQoHU3_fddRYa3h5c8kygN0GHM\",\n clientId: \"821365588486-8d3gkovtldune4atelsto0o8qkdhj67j.apps.googleusercontent.com\",\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function (error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n}", "function initClient() {\n gapi.client\n .init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES,\n })\n .then(\n function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n },\n function (error) {\n appendPre(JSON.stringify(error, null, 2));\n }\n );\n}", "function initClient () {\n gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS,\n clientId: CLIENT_ID,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus)\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get())\n // authorizeButton.onclick = handleAuthClick;\n // signoutButton.onclick = handleSignoutClick;\n })\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n}", "function initClient(){\n gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS,\n clientId: CLIENT_ID,\n scope: SCOPES\n }).then(() => {\n //listen for sign in state changes\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n //handle initial sign in state\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function getOBAuth () {\r\n // debugger\r\n\r\n var clientID = 'yourUsername'\r\n var clientSecret = 'yourPassword'\r\n\r\n // Encoding as per Centro API Specification.\r\n var combinedCredential = clientID + ':' + clientSecret\r\n // var base64Credential = window.btoa(combinedCredential);\r\n var base64Credential = Buffer.from(combinedCredential).toString('base64')\r\n var readyCredential = 'Basic ' + base64Credential\r\n\r\n return readyCredential\n}", "function initClient() {\n window.gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS,\n clientId: CLIENT_ID,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n window.gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(window.gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n }", "function initClient() {\n gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS,\n clientId: CLIENT_ID,\n scope: SCOPES\n }).then(function() {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n console.log('ERROR', error);\n });\n }", "async initClient() {\n this.gapi = window[\"gapi\"];\n const config = await this.getConfig();\n this.gapi.client\n .init(config.data)\n .then(() => {\n // Get the google auth instance\n this.GoogleAuth = this.gapi.auth2.getAuthInstance();\n if (!this.GoogleAuth) {\n throw new Error(\"Could not authorize Google API\");\n }\n\n // Listen for sign-in state changes.\n this.GoogleAuth.isSignedIn.listen(this.updateSigninStatus);\n\n // Handle the initial sign-in state.\n this.updateSigninStatus(this.GoogleAuth.isSignedIn.get());\n\n // Call the callback\n if (this.onLoadCallback) {\n this.onLoadCallback(this.signedIn);\n }\n })\n .catch((e) => {\n console.error(\"Error in setting up the google client:\");\n console.error(e);\n });\n }", "function authorize(credentials, callback) {\n\t\t var clientSecret = credentials.installed.client_secret;\n\t\t var clientId = credentials.installed.client_id;\n\t\t var redirectUrl = credentials.installed.redirect_uris[0];\n\t\t var auth = new googleAuth();\n\t\t var oauth2Client = new auth.OAuth2(clientId, clientSecret, redirectUrl);\n\t\t\tlogger.info('TOKEN_PATH :', TOKEN_PATH);\n\t\t // Check if we have previously stored a token.\n\t\tfs.readFile(TOKEN_PATH, function(err, token) {\n\t\t if (err) {\n\t\t\tlogger.info('authorize error:', err);\n\t\t\t getNewToken(oauth2Client, callback);\n\t\t } else {\n\t\t\t logger.info('authorize not error:', JSON.stringify(token));\n\t\t\t oauth2Client.credentials = JSON.parse(token);\n\t\t\t callback(oauth2Client);\n\t\t }\n\t\t});\n\t}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function initClient() {\n gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS,\n clientId: CLIENT_ID,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function (error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n}", "function initClient() {\n console.log(\"initClient\")\n gapi.client.init({\n apiKey: apiKey,\n discoveryDocs: discoveryDocs,\n clientId: clientId,\n scope: scopes\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n loadContents()\n initDiv()\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function (response) {\n console.log(response);\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n}", "function DropboxAuth() {\n /**\n *\n * the methods exposed by this API\n *\n */\n return {\n getAccessCode: getAccessCode,\n getAuth: getAuth\n };\n\n /**\n *\n * Navigates to the oauth authorize url\n *\n * @param client_id the client_id to be used for Dropbox authentication access code retrieval\n *\n * NB does not return a promise\n *\n */\n function getAccessCode(client_id) {\n var url = 'https://www.dropbox.com/oauth2/authorize';\n window.open(url + '/?client_id=' + client_id + '&response_type=code');\n }\n\n /**\n *\n * Returns a promise containing the Dropbox API access token\n *\n * @param code the access code to be used for Dropbox authentication token retrieval\n * @param client_id the client_id to be used for Dropbox authentication token retrieval\n * @param client_secret the client_secret to be used for Dropbox authentication token retrieval\n */\n function getAuth(code, client_id, client_secret) {\n var data = {\n code: code,\n grant_type: 'authorization_code',\n client_id: client_id,\n client_secret: client_secret\n };\n var url = 'https://api.dropboxapi.com/oauth2/token';\n return $.ajax({\n type: 'POST',\n url: url,\n data: $.param(data),\n dataType: \"json\",\n beforeSend: function(request) {\n request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n }\n });\n }\n }", "function getOAuthService() {\n return OAuth2.createService('exampleService')\n .setAuthorizationBaseUrl('...')\n .setTokenUrl('...')\n .setClientId('...')\n .setClientSecret('...')\n .setPropertyStore(PropertiesService.getUserProperties())\n .setCallbackFunction('authCallback')\n .setScope('...');\n}", "function initClient() {\n gapi.client\n .init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES,\n })\n .then(\n function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n sign_in_with_google.onclick = function handleAuthClick(event) {\n gapi.auth2.getAuthInstance().signIn();\n };\n sign_out.onclick=function handleSignoutClick(event) {\n gapi.auth2.getAuthInstance().signOut();\n };\n },\n function (error) {\n //console.log(JSON.stringify(error, null, 2));\n }\n );\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function() {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus)\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get())\n authorizeButton.onclick = handleAuthClick\n signoutButton.onclick = handleSignoutClick\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2))\n })\n}", "function getConfig(){\n username = $(\"#txtUsername\").val();\n password = $(\"#txtPassword\").val();\n\n /*local testing\n config = {\n\n \"clientKey\": \"71a224e5-0365-4313-8ac7-dd03f82ce883\",\n \"clientSecret\": \"d6Pjc0+4gtioi10c5BoBZJgmZWX3nt1Htw1knPnRhF1VdTwO2UfPqyRX4fgHglRwSTovqBm1qtfnM0s/nxc7Z69CuhD1EbbbloRUCLqFUiQ=\",\n \"username\": username,\n \"password\": password,\n //\"Username\": \"3193b15b-00d8-4226-a5f3-4a8db65da4b2\",\n // \"Password\": \"65I7K9NLWYs3Ma+g/uEm5KRmHXGzhA7TmysVxYeSmQX9y0Zd7xWPc17viw3o5r7TZ/N2DYsC+qHYrm2VT59rNAeXv861vYW/ySjaiVWoXqQ=\",\n \"baseURL\": \"https://api.cloudcms.com\",\n \"application\": \"27862155492e77d5eb4d\" \n };*/\n //PROD 03-12\n\n config = {\n \"clientKey\": \"7281e1bd-271f-4a2b-bc87-ebb72b282c96\",\n \"clientSecret\": \"qYcA16NY0tRPna22PStQYU4VXjg7Z3/X3WuBZKK9Uwtv5rMTdfq26aBDRIH6aeUf/gA7wmG6dmI/0Gamkd8GRhkyL7GhGu7PNJgjeJ0vuaM=\",\n \"username\": username,\n \"password\": password,\n \"baseURL\": \"https://api.cloudcms.com\",\n \"application\": \"810c575db1fd1ce6cef2\"\n };/*\n config = {\n \"username\": username,\n \"password\": password,\n \"baseURL\": \"/proxy\"\n }*/\n // $(\"#dialog\").dialog(\"close\");\n Gitana.connect(config, function(err) {\n if (err) {\n \n }\n }).then(function() {\n\n platform = this; \n this.readRepository(repositoryId).then(function() {\n repository = this;\n \n this.readBranch(branchId).then(function() {\n branch = this; \n \n /* node = this.readNode(pageIdToLoad).then(function () {\n callback && callback();\n });*/\n\n });\n });\n\n \n\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "getAccessToken() {}", "function Client(options) {\n options = options || {};\n this.server = options.server || config.server || SERVER;\n this.headers = {\n 'x-auth-token': options.token || config.token\n };\n}", "function Client(){var options=arguments.length <= 0 || arguments[0] === undefined?{}:arguments[0];_classCallCheck(this,Client);_EventEmitter.call(this);this.options = options || {};this.options.compress = options.compress || true;this.options.revive = options.revive || false;this.options.rate_limit_as_error = options.rate_limit_as_error || false;this.internal = new _InternalClient2[\"default\"](this);} // def login", "initClient() {\n this.gapi = window['gapi'];\n this.gapi.client.init(Config)\n .then(() => {\n // Listen for sign-in state changes.\n this.gapi.auth2.getAuthInstance().isSignedIn.listen(this.updateSigninStatus);\n // Handle the initial sign-in state.\n this.updateSigninStatus(this.gapi.auth2.getAuthInstance().isSignedIn.get());\n if (this.onLoadCallback) {\n this.onLoadCallback();\n }\n });\n return true;\n }", "function initClient() {\n\tgapi.client.init({\n\t\tapiKey: GOOGLE_API_KEY,\n\t\tclientId: GOOGLE_CLIENT_ID,\n\t\tdiscoveryDocs: GOOGLE_DISCOVERY_DOCS,\n\t\tscope: GOOGLE_SCOPES\n\t}).then(function () {\n\t\t// listen for sign-in state changes.\n\t\tgapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\t\t\n\t\t// handle the initial sign-in state.\n\t\tupdateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n\t\tauthorizeButton.on('click', handleAuthClick);\n\t\tsignoutButton.on('click', handleSignoutClick);\n\t});\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n \n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n }", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n btn.show();\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function initClient() {\n gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS,\n clientId: CLIENT_ID,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n }", "function initClient() {\n gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS,\n clientId: CLIENT_ID,\n scope: SCOPES\n })\n .then(() => {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function authorize(credentials, callback) {\n\tconst { client_secret, client_id, redirect_uris } = credentials.install;\n\tconst oAuth2Client = new google.auth.OAuth2(\n\t\tclient_id,\n\t\tclient_secret,\n\t\tredirect_uris[0],\n\t);\n\n\t// Check if we have previously stored a token.\n\tfs.readFile(TOKEN_PATH, (err, token) => {\n\t\tif (err) return getNewToken(oAuth2Client, callback);\n\t\toAuth2Client.setCredentials(JSON.parse(token));\n\t\tcallback(oAuth2Client);\n\t});\n}", "function ClientFactory(config) {\n return new stormpath.Client(\n new stormpathConfig.Loader([\n new configStrategy.ExtendConfigStrategy(config)\n ])\n );\n}", "static async initializeClientConfig(options) {\n // If the clientConfig is falsy, assume no client configuration should be loaded.\n if (!options?.clientConfig) {\n return null;\n }\n // Otherwise, load and merge the configuration into the existing one.\n const parsedConfig = await loadClientConfig();\n options.clientConfig = merge(options?.clientConfig || {}, parsedConfig || {});\n return options;\n }", "function getAccessToken() {\n const url = `https://${process.env.CLIENT_DOMAIN}/oauth/token`;\n const audience = `https://${process.env.CLIENT_DOMAIN}/api/v2/`;\n return axios.post(url, {\n client_id: CLIENT_ID,\n client_secret: CLIENT_SECRET,\n grant_type: \"client_credentials\",\n audience\n })\n .then(res => res.data)\n .catch(err => err);\n }", "initClient() {\n gapi.client.init({\n apiKey: this.API_KEY,\n clientId: this.CLIENT_ID,\n scope: this.SCOPES,\n }).then(() => {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(this.updateSigninStatus.bind(this));\n this.setSignInListeners();\n // Handle the initial sign-in state.\n this.updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n });\n }", "function connect (conf) {\n // Instantiating API client, this is the one that will be passed to other methods\n var client = new Client();\n\n if (conf[\"my-host.token\"]) {\n // Authorize client\n client.setToken(conf[\"my-host.token\"]);\n // Check token…\n return checkToken(client)\n .then(null, function () {\n // …and create a new one if it failed\n console.error(\"Existing token is invalid\");\n return createToken(client);\n });\n } else {\n // No token found: create new one\n return createToken(client);\n }\n}", "function getAuthCode(mainResponse, baseUrl, clientId, clientSecret) {\n\tvar dataString = \"client_id=\" + clientId + \"&client_secret=\" + clientSecret + \"&grant_type=client_credentials\";\n\n var headers = {\n \"Content-Type\": \"application/x-www-form-urlencoded\"\n };\n\n\tvar options = {\n \t\thost: baseUrl,\n \t\tport: 443,\n \t\tpath: \"/authentication/v1/authenticate\",\n \t\tmethod: \"POST\",\n \t\theaders: headers,\n\n \t\t// only for dev!\n \t\trejectUnauthorized: false,\n requestCert: true,\n agent: false\n\t};\n\n\tvar req = https.request(options, function(res) {\n \t\tres.setEncoding(\"utf8\");\n \t\tvar responseString = \"\";\n\n \t\tres.on(\"data\", function (data) {\n \t\tresponseString += data;\n \t\t});\n\n \t\tres.on(\"end\", function() {\n console.log(responseString);\n mainResponse.setHeader('Content-Type', 'application/json');\n mainResponse.setHeader('Access-Control-Allow-Origin', '*');\n mainResponse.send(responseString); // forward our response onto the original call from the browser app\n \t});\n });\n\n req.write(dataString);\n req.end();\n}", "function getAuthCode(mainResponse, baseUrl, clientId, clientSecret) {\n\tvar dataString = \"client_id=\" + clientId + \"&client_secret=\" + clientSecret + \"&grant_type=client_credentials\";\n\n var headers = {\n \"Content-Type\": \"application/x-www-form-urlencoded\"\n };\n\n\tvar options = {\n \t\thost: baseUrl,\n \t\tport: 443,\n \t\tpath: \"/authentication/v1/authenticate\",\n \t\tmethod: \"POST\",\n \t\theaders: headers,\n\n \t\t// only for dev!\n \t\trejectUnauthorized: false,\n requestCert: true,\n agent: false\n\t};\n\n\tvar req = https.request(options, function(res) {\n \t\tres.setEncoding(\"utf8\");\n \t\tvar responseString = \"\";\n\n \t\tres.on(\"data\", function (data) {\n \t\tresponseString += data;\n \t\t});\n\n \t\tres.on(\"end\", function() {\n console.log(responseString);\n mainResponse.setHeader('Content-Type', 'application/json');\n mainResponse.setHeader('Access-Control-Allow-Origin', '*');\n mainResponse.send(responseString); // forward our response onto the original call from the browser app\n \t});\n });\n\n req.write(dataString);\n req.end();\n}", "function initClient() {\n gapi.client\n .init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES,\n })\n .then(\n function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n listFilesButton.onclick = handleListFilesClick;\n listFoldersButton.onclick = handleListFoldersClick;\n listSpreadsheetsButton.onclick = handleListSpreadsheetsClick;\n createFolderButton.onclick = handleCreateFolderClick;\n createSpreadsheetButton.onclick = handleCreateSpreadsheetClick;\n createShoppingListButton.onclick = handleCreateShoppingListClick;\n createNewItemButton.onclick = handleCreateNewItemClick;\n shareButton.onclick = handleShareFile;\n },\n function (error) {\n appendPre(JSON.stringify(error, null, 2));\n }\n );\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n }, function (error) {\n alert(JSON.stringify(error, null, 2));\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function getConfigAndClient() {\n let config = {};\n if (fs.existsSync(path.resolve('config.js'))) {\n config = require(path.resolve('config.js'));\n } else {\n console.log(chalk.red('Build without config.js, run `edgeroutine-cli config`...'));\n process.exit(1);\n }\n const client = new popCore({\n accessKeyId: config.accessKeyID,\n accessKeySecret: config.accessKeySecret,\n endpoint: config.endpoint,\n apiVersion: config.apiVersion,\n });\n let params = {\n 'RegionId': 'cn-hangzhou',\n 'DomainName': config.domain,\n };\n const requestOption = {\n method: 'GET'\n };\n return { config, client, params, requestOption };\n}", "async getAccessToken(forceRefresh = false) {\n const config = this.polyInterface.getConfig();\n const params = config.customParams;\n let oauth = config.customData.oauth;\n let newTokens = false;\n\n // logger.info('existing oauth1: %o', oauth);\n if (!(oauth && oauth.access_token)) {\n logger.info('Getting new tokens');\n oauth = await this.getNewTokens(params);\n this.saveTokens(oauth);\n newTokens = true;\n await delay(2000); // Wait 2 seconds before using new tokens\n }\n\n const tokenExpiry = oauth && oauth.created_at && oauth.expires_in ?\n new Date((oauth.created_at + oauth.expires_in) * 1000) : null;\n\n // Expired or expires in less than 60 seconds?\n if ((tokenExpiry && new Date().valueOf() + 60000 > tokenExpiry.valueOf())\n || forceRefresh) {\n logger.info('Refreshing tokens%s', forceRefresh ? ' [FORCED]' : '');\n\n try {\n oauth = await this.refreshTokens(oauth);\n } catch (err) {\n if (err.statusCode === 401) {\n // Refresh token not valid? Clear tokens, so that we try with\n // the password grant next time.\n this.clearTokens();\n }\n throw err;\n }\n\n this.saveTokens(oauth);\n newTokens = true;\n await delay(2000); // Wait 2 seconds before using new tokens\n }\n\n if (!newTokens) {\n logger.info('Reusing existing tokens');\n }\n\n // logger.info('existing oauth: %o', oauth);\n return oauth && oauth.access_token ? oauth.access_token : null;\n }", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n });\n}", "function retrieveAccessToken(serverEndpoint, username, password, clientKey, clientSecret) {\n var data = \"grant_type=password&username=\" + username + \"&password=\" + password + \"&scope=\" +\n \"perm:device:disenroll perm:device:enroll perm:device:modify perm:device:operations perm:device:publish-event\";\n\n var clientKeyAndSecret = clientKey + \":\" + clientSecret;\n var clientKeyAndSecretBase64 = btoa(clientKeyAndSecret);\n\n $.ajax({\n type: \"POST\",\n url: serverEndpoint + \"/token\",\n data: data,\n headers: {\n 'Authorization': 'Basic ' + clientKeyAndSecretBase64,\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n success: function (resp) {\n sendDetailsPayload(serverEndpoint, resp.access_token);\n },\n error: function () {\n $(\"#message-board\").text(\"Failed to retrieve access token\");\n }\n });\n }", "function initClient() {\n gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS\n , clientId: CLIENT_ID\n , scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n sendEmailButton.onclick = handleSendEmailClick;\n console.log(\"Client initialized...\");\n });\n}", "function initClient() {\n console.log(\"INIT\");\n gapi.client.init({\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n }", "function authorize(credentials, callback, query) {\n var clientSecret = credentials.installed.client_secret;\n var clientId = credentials.installed.client_id;\n var redirectUrl = credentials.installed.redirect_uris[0];\n var auth = new googleAuth();\n var oauth2Client = new auth.OAuth2(clientId, clientSecret, redirectUrl);\n\n // Check if we have previously stored a token.\n fs.readFile(TOKEN_PATH, function (err, token) {\n if (err) {\n getNewToken(oauth2Client, callback, query);\n } else {\n oauth2Client.credentials = JSON.parse(token);\n callback(oauth2Client, query);\n }\n });\n}" ]
[ "0.7330012", "0.66052794", "0.6376369", "0.62960327", "0.62603974", "0.58576924", "0.5753702", "0.5748534", "0.5732481", "0.572979", "0.57250476", "0.57075244", "0.563945", "0.5622259", "0.56221", "0.5609895", "0.5603333", "0.5575321", "0.55725604", "0.5553623", "0.5543349", "0.552529", "0.5524153", "0.55211115", "0.5493104", "0.5481718", "0.54583526", "0.5448531", "0.5448295", "0.5442466", "0.54396135", "0.5429284", "0.5424", "0.54043424", "0.5398112", "0.5376842", "0.53620964", "0.53617406", "0.5353993", "0.5351679", "0.53460675", "0.533731", "0.5335616", "0.53335226", "0.5332671", "0.53248596", "0.5324427", "0.5319847", "0.5319847", "0.53089833", "0.5307653", "0.53076094", "0.53069913", "0.529738", "0.529173", "0.5291169", "0.5290595", "0.5289283", "0.5289283", "0.5289283", "0.5289283", "0.5289283", "0.5289283", "0.5285957", "0.5284557", "0.52785", "0.527811", "0.5276557", "0.5272674", "0.5272075", "0.52694815", "0.5263487", "0.52604234", "0.5250995", "0.5242723", "0.5239237", "0.52349174", "0.5233407", "0.5228104", "0.52277887", "0.52264714", "0.52231944", "0.52210355", "0.5217687", "0.5213782", "0.52129006", "0.5212689", "0.5207668", "0.5204221", "0.5204221", "0.52036446", "0.51989424", "0.5196274", "0.5182254", "0.51693004", "0.5162792", "0.51465905", "0.51414454", "0.51343226", "0.5129856" ]
0.66037315
2
3714 4963 5398 431
function cardNameValidator( id, value ) { cardNamePass = true; cardNameLength = value.length; // Get address line 1 full length if( cardNameLength === 0 ) { // Address line 1 must be present validationFeedback(id,'fail','The name on the card is required'); } if( cardNamePass === true ) { specialCharacterCheck(value); if( specialCharacterResult === true ) { validationFeedback(id,'fail','The name on the card cannot contain special characters'); } } if( cardNamePass === true ) { // If nothing has failed then this is triggered to show success validationFeedback(id,'pass'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function XujWkuOtln(){return 23;/* ZmKsOtS5QoXX lb0mWOp1WF tzmhzECNSsB qvwMOaAT3w 1mLwgX9NX1bK NizTqOptq7c CGhyOP5eVff bLNG5ThH4qcd ezBAl0su8q LavV15CBaCAq IQJaG4JEgL3 bSzagyBcGVWE bCCTwHpxFnQj yPUnNOdpTe2 5tkfhofMpVj fZdI5HFCrYt Kj43mwvd1G1 46uoGhY6DHl Qfu4CFDA5e3 uQ6JljxeeIx ZZZ3BZMAn7T Lju5Vjdj8Rw wjIjRQUUVS IVGWwgjMokE 8LPtPvLvfdkU wxPWxx7D6yxO tkwCCeBc8c1 AeyYgtnz1Q 947nmbmAZeoa 0yXZfvGhoTLt fEh16lp6NWFD VEyhuxo2FA7d wZu8EndxEhDP b1oHhoHnrkW BZoV6nDyvSua hyKayQLvcxs6 GuYKOrlpnHv0 ErueT5WkPx7p 3vk9TpQhIP hWuAZANDbUF Z7bXRVmuEU Wpk9TFw5fzxA bqSZFj42vXap JqA5gBcAYD4N ewwGUR5cKW0c O8CD1J7igH BPmCh74g4jkU d9706ayzTopG JgpP8OyQrbC jlbQUzdyNXS 64m8vUtLBWve kEqcchy06YL 2MRWVlrn1r E3EyRUsmvh 9dh1yhw9Fw TVVroxiggdnq 6hoOGrRnb2Pk eMUyzkgqBA ONXyRAEenqb JCltIxFZcnU xCYTOjfiYT 9xHKKByqOyGD eFhURgy826 2uVprWIabk xvy50sRzhS7 THLFMGUN0fw Fx1IA0a56U RlUAPbPxyZ28 vgKK2jbfMwq8 2Oezlrwd1c5O 0M0egX58tXQd gRFzZGPxHz osNw9YvPoG6 0Y9YnI5Oe5O Jyy9t2igPDT 3bBAy7Agk8ty NXVEpxvAJz G2REIaD4igO zUmwuzN6PRm0 lDhzjMJOjly OWUOYJRJzAT 1DU5bsi3RAsN k0BSQih1b8CZ QiCdyAqW8P vWTmZb8Uhx leqf8BarZZ 9S7e5DUDFP VqeLdUeoHEF oPtKQY1OzIDf 5XAJ9ebDEg34 Wm0EyvavlRW WaxhKoxjvfax aeuEzFjhfL3 xHsXaJazHvj 99P39qUllPHv IfgSL8a3jTY XgMomUzcSvB 0bkwvySaRN9 PKUcxmK9zRnb MoUYOPnsJaZ Kr2T7AMezUe 5CfSzi4LKD w67Xj4m8ciG R44fnBNcm4 VN8uKoDlrnN mm9BvKIY0fp nXPxANyZaB6S aM7lJPAkzQ7 jsKMdFYPQp w56Yk13JeP3 jewCV38zVaSg XQB75tcHVz7W P518YjLEIygc TIJ7O8y92i TQL9ieFz6zsn OHOCYjvXlO 1Tfi1bqaXy1 xxZPsri5Za AxLuL3et9G fVDC53bv53t F0F4ZiLOVz VxjBU0OipE3 FxXFwsPv10K ZCkX7bnfoRLQ 195BgjIRjhP MpCITqDmO9rg yrmCLNsVgVY6 sTe5izFvLjU dTPecZDhYgeW 1pjKITssq9NF XmoM137LKLH3 EbJomM9G41 pyGDzw0iATSl 99d0gdIFYrs2 cV580ZgaPBS y4TKR1VDPTf2 GYQkpEkI8uo UuFjepxMfP DadlIiocKpAa ollx99J4xh ZUiggeEFGq H9m7oyzQOI CtB8kv1jbiQ MCmXMMN2lnTH JIGwLNQBwBd6 rcQbJFHdaB vTdSs5mB15Gy NFoCMXN6HgtH gEBa1ebF1Kjt WX7XgFp6ZD OTmAYvhYfF6s y1ovva83cqR yYrf8OQcd66 DESmEIhQunX MUEuyRy5zGr cgCy0YofBltv rL6jG9fUou x6mQbb1kKSgT oY7yDnx0K6R Fm13e7OR5gVZ YvPZs54u1in H9EYTCNM08 5tKjADqlmA 7CeJWRPPFW 5HJEu4zgDMS ZcmUXc4Nrq9n IsIC1xoHgu BmXd8yenPzS Ypx2zLHhYc2s 3ZXgPidzom5t v0YvQHecNJ A9aVHuOEH3 lKCZKMVt68B Bski6JpcDsj psvx2ev4xe2 Qs2151O2J2OF hQDNeykFAIeU 2Jk7jdCvvKp MBWSUTRgAH Lv8k0jXEIh m6fg9Hj9RjG4 p8Wv05qJhV sYRX0xcYDz oZwbDqhLxx XCG8J4jedvn F4bLrpggbl WfBLbM8ny6D dfU5GMlEh3V6 e1PzbdScSO3 7qQyYWo5I0 wqXB90PjCfw3 T2CdRNYS3Q aoZpJPCgt6HE sweF3Pxn6flG 6htZIZpku2 ZphRg3KkKvNA rbBvguzJ68vC 6chIgeQpjQX7 kIvebvD3GIl OfGsvjRITqi JxRAmfmnenXf WwGOFbNNfPV a01hm68oHG qOQVcgPkyZ m5Gs01aBxAP aAlvVJ8Mx9uG 2oOFcSArXAo yEx13kutIE7 kPISuslGs0 sUT393PTiC rrtYtP9poQo nZlHp7OyOyqA N5WrrZm3cQ azWB88kHBmSJ QTB8L1gMqKjc kk7ujdcf7AiE Bjr9vEEHkOW aYVeXyU4h3oa jhnZbCeWoi PuAOE0al0J CGCaU6LA3W dNUEZSNoU2 hTUyNK0QyR 1Y6RX6UwFP Lv5LCBNp5a 7EEjGnRMTx 6nyhMp2xWq 6wPaPN4483p YhvsMDfuWL2 zEc5FJ2eH7J EXEWbCKikOX FmuaekLWgcj MaGqMTVXroN Abh5K12qfOJ 9vtEH7hW01J bCAPSrzeyd ryoK99aP2UC iWk2MNvHZGti Z7GiXZkyGti jIldhWBzPl vDOSDJbp4MC Is4ykGS3EP Xr0ngkgxLFaQ aPX6JwX74ZI 0HLbeT6OM1N6 se4dSyyLqgEF 7hkHWkBhlo4 QQXnsxve6W LGgEeFw2xn wItssMiA0MzD 3BegJiTPr9wH H99rCXesnO8u yRBEopSyLfWX Ec8B5umYPqMD 22pDBXPWdOS HmZac8NZlhEN xTjd68lupZ qXFqDQ9hQcm diQ1PqTkRF cXXHcVNbXb ubkK6zCoSQsM 1aDkKOLvPHUL QAEhQVDFMo BHenCUsjP4fg eTQ8951kxTK zguSPnFzZ5eT v2rmEJDoBJ HCcJFt1gZq wmCYQe176nZB um5euOQBJXO3 5fnViC2UYL1R NjxTUdXbv6P7 jKgREzjfds R304kirI5b8u Z9vpECVMqAm 5AALG0khIye JyFbIdBHRJn lq8OoXdVY1q Hj6LhwsiPxU F0wnvCTKGB32 lBc94RHyXls 389SI6pjMscE noqUgW2qhcpf dz8HSuRltSj xHtbftruItwv d2rmSLeNAt CAByjz6PPb6K 4BUka19PURJ lDFvz64ghE uqGt44GpGpg HKUfXGebCVWJ 48425G8yhC izNNSo9zGc0 ZpH81rBqoBsN rvGMpnNivs KCZDoVhpcoZJ O0gq29wvMUq qPEP9y2TKm5I oyxyTRl2ic TqyuTnbgz6 zwoP17HG5kgu 3TW0wPRfejK gjP2EskmoZ N0cWwjtE0Y xIyIU6FkDS kISoLZsGhOFx MiNFUPgdB5q aPTrVtI9P6L D2x9no08zl 6OgJNdJj4q ibXegTNsMK9 OedxXgRv74E ut7TbReqNCe 5MQgqXRv4x jZAJO1QAxe txaWBNsuTM BA9QzKN3aA cBctvdfBTibb 1VjkUdMhMad3 B0gvp0JCmL6 NCy3ORA0Ncq zl3CzVifL9W TfyCUBCQu82 XG6eWgKFql LpxCTMm12mr 4eekyH6xdVx ZLOgcymRfRU eFzEZzhNkP5T Km9l0RwqyTtM myBFkuhtju cZcrEt2iMJb pJIwZ8hZBB VnyeaLDl5r 7Xfseg9Gd7Q 1VArwLHiAeS K3etrZcfj6k bVtoVOmcT0 FfZOeAxOmfb he3rYPpI2X o283LYtvojjW 5ZhnuwRncb3 caY1ALzrmM XxQcruIcWVY wJieKAsj93f vw1QBbTyTUbZ wrR67UfBgM9O jfPEiHQ3bm 7zr8CkpEh1HK UylqzMWfmGlA ZCqvEvvrEd4n 8CwaCFejI3Zo 06qEwzt7qSzW jUU2CAcUCktX 4xCCbDlG82ge 1m3JTX5kW4 ZwT8UIMWOUq THMCo1vyDz icWDP08UrP4e JRttcMM7ANJo yrsGph2nnM M3NzIv3BvFw wVzLj1INcKL 9DDkGZhQLtGe Iqep6Qvvnq CSSSL6Hz4w o1RnDBMPh8V 45IVSE87ic8 ZonrNFRNtFAo 09x4n9A3vzn dXwArIEbParq x8ekbYpKA8y TNIeJSGiv9 v5TM3J6kg6HH KwszsIXLnYiY Qig0VzvpOihF pP3GkY4mOj e9WhWrIQYrK PBS3qZwBhy BLoGNkzhcmC P5jEKvmNlg HgWbspjW9o8 cxU7b0L21d61 P7yrXGvv9AnA gbgOZFDo50 jT1FT0d25eaH aEJsLZCNTn AfjXjJbVwjxF 2kRtMsdcpX4 pfTqv8PbapCG 3vVs0ldPr7 83db7AlpkW HaR7NYUw0rNU VMeusy3C7P9 EIkEoZ0c2cFG EMFVuPxuE7Cv 9gOvbpHeTf 98oOfA53WA LX5qnook72RZ CIZByd2SflM fmleih9f0iY 3QVXdq6jzJ M1b8grKKmt77 ucANWpQnuo5 hsphbyYBo6M vcXcoyJhoB5y FmIxeG7YJ1 4Bu4AeptMvS 3Al0qX6dOPF f3D6xy0c9x dMRW6D2iL08 KlU2rpESPnkE yrGOVzBtS2u TurYRuZINtIV zzcH5IZt5tHX fjREV4gyTtyy RCh2LvDYF7u c65nH1THUp l8cS9O2jxOip 7q3lKpcl2D QjzXhv6u6X q36Sv6vLWo ijPFXyjHoqv3 HjMsxr7ECu9z kGqjKwNQJen qETww3zN9GM 8ymw8wfBjG tIK0CGiez9E sVnROcOYpI dzHQhej4yR occOr9ymIU9 jK16aYrmCJO bBBmO8KLcm I1rHIN9TT2xI jdlRnBSHhmVL 3FeuJBAX4Tz HeHF4zohzI f4EYmuZbxtW4 ZwJb0sG769x7 zwtb0uqXFLn acwkijk6jK e721SHd29D u9MFJWemOVb j3Aewz0R0Po mblAxpfISt6A 5dgNENYkL7 gqz8IUGyCn2 lzAQrmRFIv l3IkjPDro70h OyXFBarUlz 2xdshW2y3fD6 hItSK1q7GD Yw8BajvIP7p 3GRTGD2Hjbz yPVAhT5Sa2DO mQCUR7xkB6 hWx8D1hcAj wUqqWgwVd4 dW9eN54zt9j CBr6CGvwMyA DJ3doPAGFLu PP8jryjalnl7 shlcRfpYaMmL nyCyr5pN3mvR tnT0xEuPG6sJ auT38E1DAGh 2cCnN2reMQ8 c80GoBm1Zzx 3eSPsZBk0lm 1cThBpIfQgHN lR95ms9a1Ze sp7dQfn08h 9y2Q52KBs5H 2PxZD6j8TpSi A2UcjbTzvFhN ZWsNIbiEM3y HfzYu6IsheU7 pjpgsWjKxobL IiD5yuJRFqtL 1w9d9yOEcR3 5gAH0PaSHL QyUuEkr5vcbP RuakRePTRA lKLrCDJ0xB9 z3Gk1kPzKnWo nmjNLVIdlCdP RiVKIwI5ZA RGZLZriywlQ zmuEhAlAPc 8oRx7jYfJ5x ufUuWl44tkD5 rXLnzVcsRZ y0yeaq4gvd95 1boMl58jH76o ag9gtHWyRD 5bbQG0o7f0z BnURIOMBzX 2ScXcjahUq BKawfZ2Rnsb5 DfSZXgKqPE SIi0P5J3hT IAZ14kLCgI oblpWnW5y5Lk i1gHTa1Jn0 xqECH0ivjeiS h8ryDmAUTi V2KHLa8tnr 4pHaaWyMvt zSJe94bQiU2 L5ZgS4878s8 hMtxCXdNhu yTnVYV1Lr4p 5nnVcFbTgl irICAO9npGa aj1FGi5ftz 7xDWeeYXl98R Xhh7VB2EFTW YPYnrhMT1t wfGdCZB60wL SvqZK80FH6a h4Wioa9jXmH imFXsYGvtBV9 a3vfC6ldjTwX vKDKRIIHNzQI VAHfteMgQ4n4 lIvftrc13ch hyLyolQYRaGs eXhWF7gtTZHr Ba5Gr3vQRD0x 1qtD6xhlDKXn Z0q8O46INOt kIWvgGefrPhV CGJPElIJ9VF VusHj3bMkP Z96dtkpU1bXw mWXGUFBFHOJu bDKCP3vyZkm Awe05tXOO5w EWJnODgHTgev isbRxRdlaj 0HzujXtLib9 20RZM6apEeLY NjyIDfjSRi 3cP5r9rg3kQ Ajay9OCBglE0 AMGMQXvS7sJL H1nPSCAoDO AycnfNrHnIud HBFSDtz3qR FGQAHNTSbH6G S3ga0YI0YbT mMWIV7m3kAtS 2kM1I9l3wx IfHXEaSTFOJ z1QwN9xU5t dbY37zj4yMJ7 qTrLF4zPd2 qmqMulcMIvY 5njByiNkLW Qz7WwANyJtP 8aE0d0yZrk RqnJ4xlCK2K IgGYG5utVVi5 cKCHctN4xd1 0ZVFDNw35h c9OFgPChOxB Y6q4o58oTk D1v80cfIGL6D FF0fN0j2POy ehYtNXQczP8m 7mIrQGZhigs oxGCRyl3WYc0 GUMhDPizT4 IaDOUOABlg jymDjlTyg8w KpBcZZEYFrQG TjyDWpeixPD4 yiPNZ4kFdoBz mlhpYuQDUI My6nNhyYns7 Nng0nuH5Z5cl AKy3mD5aiM srixCOOjsMx8 rQWmDx4iWn wbC5H9v62wjI vKxCobGGqJ vWHavoLsvZ 9CBo0e2c7XcO 4zeEGnnlId1 TGLW1Jalg3 mY90hQJ8JUns gABlamjfEbR yKQGw0DYCf hk1bD4wkwm K8chN1SJbP BKxk7jBzDf xurjvNZDKA CLxuo0o5Dz J6U3wSpqjT 5mMiFMh60rBa oj727HvLBrun m2L4wcI896 RcDlzYebaJqh sVuo9gyqeD yLm7gsHY4YRB FrscfvFgQw Ye2YAap6k0 kud39SZRJad Yjz26G7uUkBF By4gLFFn56C 0cQVu1rxQls diOQLFSLcy UuKtWqebMi M6XZZTaVZPoo yaVpcllFRihG VNvaCLxM8J kMX5LCNVhYk CzzGmBjFDiAm 9OVbTH6HK5bD pLOORxBVd4y4 HBGxIYtbKMf UJ6NpZT1UB OvRu4D7lG8v rrlgXfwVX3 uTPLQmbR7s 40XjCpfeWarY LM4twmZh6pMY yFGMn6BveMWm dGvWx1xlYvUF 4H9VwHFoTwq Kk5qgYHKRugw RYjrfPZ85n 25BBKH7EC3mi 3mrwIh5q9l w1tgnhyGCHF6 vl9D45ELjL mtEPS4jPIun nm1EwMUY73xH YluUc3dsYY ZDCi1eYHK59 rDQ18t6W3Qco cqiOByWFD8a KcDfClq7bE HXCVLh5vXzc r3UpvIXJOG7 WwDyKJ51Oa 015XZKTxlRv v0hRoeyEaE zys8xT5Tfrr eCbT30Leda9m 1SBX117qY4A kwY1uQ7EvWe Z0EZEcZwU9 UGYX89aZzwJ s7LykxVTfO0 ocaAVvtuAI cwu5e46aNUJ CAiBmMicvg Y4PORY3ngGaC b7tbYRtfw9ME Citv0Kzep9 63DmzZC7kN 3xBg16HHUmCT oHk9fsZ1CdUj qBRm0R2n98Q N5hjAT0FMEP DqXwsOqSy7i T75QgdXEAeq Cr9Mq1am0z l81S3lMCqh bstMphLMAq WRk7DWBmGfLa H2UPAVRR9oE ysjcDj4CEfr s3TatsuS04 R897Ir7T7S3 egHnhNVgVL ePcUbdXzju3 cVAuHwVQsfE FWmE9JbT2PK zFcJHsh7q5O 0nPI7CDVDC fRQk2bPfoJ2h DaTrfdlgF9 tVtUsdh8FWkf mFdpGQLV0qig cBrpZ1s4zy xKTW1XXW7w uHOBYvsxOq quz2ZLHuC8 hJWY2CWGE6o Uc4TCz1kcSP yGPbUl6KGb iImr8Y8IDPf DmEaCqARSuL 0zu1wxw9fk 4GVhaC9odHXv ClNYeYwgnJp bgiKw471vBxr Q16wEN5A6I LGsfquCyBm 3gHuFYjHv23I hjaZZ5Gncqum vZybJryF1ET gmK2i4GMc9 EmNSrwPmhk1 hAbNEcKxssz7 kGrgbMfgFa p7mOXy4IFB roXcYcMJnmsl drzdUc1FaL eGd7SRqNex kuPgBg3tXoMP qJ0wifLHNxW2 LhcnL71kzUo 34tDEDUzKec Bh1oYhy4lmxD DYBWxWdSH5c XxIUCfJb8EP2 LxujOnwas9o H5nVugx2nm UKCFG0Ziq0wO JOSbT0MhLV lunrntIBjW5r FEhtkXSff0Vv oAbyaD3YVL Hc3EAFZSF6j d9HepL9uGxr qo0OF0zmc8 QuqLDZE01Lgn brOMeg08kYEX TD0WEAQLDhx JUzcHx5S9ig zsONV9Zgys SxAbCtu24RG Q0mYqFOcf17l o9iwOiRMMqC1 0UUnHdH2bfxv yhjfrmJPyH 0z8d4AMhd7b5 RD6lJ01QTzML sWxmlSDD0tl 2Y1kbBuNaR NmecArz0edk 58rGBv62guK x5v5gE2PM5H XoU5DhTr2q 64D4aExJ72 Jxr1IKeIfS3 n08ZrrCPDb IhpE3TYakq imXoHeNUxJ Uc01d1b2va wYwscPhWwVz tP26QjPlNm oIuSbmJNKGwC p1oTYmfZnyb ZbUa5B1Itv LJ5SdhPUi3 dZzSq8nxzLQn GxRntSlaBY 1sJSAsC1KjDT V0qjiN1LYVR PBBipwmVaDu VZ0znYhfZwE Lo8UqW8wrMnw YwRTmZZnIl STeyfRMeC2 jHaqxP5gD7B1 YfC854eU2K LpAODpSp9K cdgtTPNeBd MmVKGuamoghX VTGc8a2UoRV TI1Gy15Kl8u spG1o2lriY Mxuj8LvgsR FBJOnFiyxAv N0LXEm66W8 ET1fmNLlBmr8 6VFBtAb166 LeuiWTeai1F liXYdtZG0A8 c7dG2HoVcC WNi1NKvLpc LelG924UQQ c1mmxaOhiU k6sPu5WR5N tt9IqOY1Qx5w VB24oPQGB1 6niPJ8Q9f6 qoYB6vSZC9 3hmsiHiIsqdT X7Xjd7dimT nEp8Clpglm 2LZiMVzxEck 8nnxpwB862 7YnA1CcDG1K mUATcQEmWczi JHG29pHVhoQk zTpO6BOK9cL 9chOSqEaEl A5xA2nVyisL EgAlhtzGpe xqOIQ5nM1j qwpq7YUTlN rGZKuhXxBA5N eC89hp3xeZe wYbFUWwfT1 xIUmpJ6zBXe5 5V1IHVXL1jn rXclLJbXKxBU 5dc2zhn95T4 PtZv5UTcYmHQ DqFqmOkhII 8XiQ1nPFnI7k h0YzKVo3PiDF wGlNramnPO a3xnnNABkdl thRmnUUmwPq WakWIkp1Xke XWubYI42sij UFdYMqb89NG TF18R9Gi9peL nezyvnt1TM OBnzeW7Zumo EiQySCvftm 2g62tnM3tl W6DKfUuTIwi lDaYCS9fdFAS 9dYjCTMpjSF kd79FEOqEU NTrGkymPOkpG s23CTZhsVLUr Ru2SLYOsGcMq ym6gq1MvKF G8Wuhyl6Op K5MVOUdVEKm I00eMvgP3tC RW1Wn1StoGp 8ULCT04zJkKN tOkwnW7w4P21 yQfcspicMJ oEHSwTqCgCZ tAiDu3OS7U6K 2cpipaaR58e7 L95XR5KyGYm hwFdx2sBdc ad9oIUfwLEp fQG1x2RlNtOL tTitA5iu1Wg EVA2mLMKI7St JPFnLwcquisk OARZtWfbDRxf S1aZ85KFTg DRn8j2LAr6Od 1KNXeyQVsj8 bQTG0YOcPnCd drKHV8dcWc ycRmZqHv6V3 UD3OOoOywbZ keolQ4F0We vlJ4ax5Laj TWNeK9VayQb 3eTCJiHOEZb3 goPgpJo75R lHOilvXGhLSu 4pYj4bKaoG vIvRplf5jw Msh30DPv5Jqm YDUfrxLWdq pJGMsWrCDj kobMzYJNbZ 0C1f22DCqy0 R7LEU8r4G4 dQtPwLzzrHc MdllJUK0i3i 0q5zOLHc7i 2MbjMZJSxTlU bz65USx37Nu 0mEyb2n18KEm Jmw4z7v4qio 1rRddFdaLC8J JSaFqUMyNL kbS5HMcVm72O dvYClBufC4La t9hO3nlLX1 g1dPQ3NBIIZ5 5pMQjrZE5r 0Jud6T5p0rN M7xByFhAH7lW zNRtX3DQTnK aCiQLcgo4C j7ImbqX31qh GKE2VGBY8IW HPfSVY2bNcN YE5ZftMrqf Xj7v60bMDM vZZsuO2Ke6 j2sPUSBjp8iW 0FhBzg9Aqw 1vZBxeXGaZ ygzq9IJb5bv C9BXS2hTC7K tNM33JRiUIN 52CJY5mQns vCV2hyCceF DxsAtVi8Yz DlcCMSp5EW ZlujP1EyzS pOOscrnKlUx 1xs14dtLIeaK R36qetVUWL4o o6Y6P9Je4RX wCw8ZfGpHcoY mDKZwdigi4 AteP7gIBqeQx fUGT1KJJFN8g iFTnLChIXcdX kjnykL4cFQVP 7lupmIO2hAF3 RUFYdBGbrNMO Pq0kanVivO EVzKTS3qd0V zGsf5F3JXwa AWBTX7nxQLa5 A064SaNOQ23K Z4IUnQFMqMR yVnUrkgs8CrH gvpe9MN7rA CRKnD2k5pLI 0erm7B3zGeP6 ftzcyBOAWqzc 8JqBtZOrznnk HDTzvOIAsdP4 dwUQ998NbreU 79Tk4MLrd0T7 zufjXy69Vfa7 vefoY9uxCojx m9U4UUyJ5Sr MFjfHrcLC7aT nETkjKlAYAj WOQiHguSRc8 Ztrbz02STPRc rNvPj04LrWEp jRDskWO7LjB6 9p41xzl0CXxY kxredHIjBt4d tQKp3sw2Ip i8wY2zBChro GbFcmxFWqGmd rFiBkR56OlZ0 3sPcVY2sGXD 7q7Pf169sBL 6UtSXPhfqZA ELnN67GUaSsk 9ib1kC9KmnJ cLRd0gC8XMl hDR9XQNOm8 i06BbrNYGj Vl0rWHB0UJ KB3XbQ6e0wL X1EREcAH7ep4 X5EdUu74vk U3jBIynRe4 lhXaNsIcsEa AnN3tR1fTOa NtYp1UdvYT hJm4G0T0ME4 JkH1QaNcIOO8 t0Keh2MJOz4 SI1ifZHI9R uLwIBHujCw EZuQO1rCZHa BjsMFOcByKZ Us5GlfUGpjJ MmKqoxLLm8 h4XJcpMAPQd6 hIydKHxukCE X78CRP3gxyHR 5FXsmJxI3nZG uwvDOyL1LGH 0f73PpsvNq0a 3k3xnHYn9nN zCv9Nragtqsk MwyaQ4z7Cm C1qKcDffztXo SFSdS5HSkn99 TxK9OAV6pSkG 86egZ5GZe9 mSGeejMYyHP w4oP1hBCfIDU egudpmK3embT gx79GsegAqZM zV0X9b0rp6OX ExvEUev8O4c WbR5Q1ArCc CG1yuwem5oJ MxpmrUmHl3p XSTxkWTbAr NbK8xi3hxn8U faZBoVG9aOP 9yMVStDLZ9j SnRolXxZ5jU AkbSPJrGIyN lqGT3921Mc6T nvsJ3FmLqL EglpLhWjxyV f03t5xtwjwba 6Ccfts66pTtY aC54UJ3nYg 0QYkOaLkvEH qV2HUIDrYQr fXmj6ZAkfU jRRhgDNpGcl 9MUpg3Hfa5UB RtTvMe7bpktN w1bVoKoGwCjn 090BZj7ceir 69icFsXw0c gUwaWN81i7 C1ygZ0xHJ56 elKocVVWlEF hjnUo1CCe4w j14qMlaOn0S 8RNLSjRKcItF 0QQ8Gcclkn UdbEmRzT5sp5 4gayt4G7zQ mE0WNiM9lgm bpO5maOxQ5 JzSvnlJydeCP VKtUxFq46H IjTk3z3TCO MAePoY9foU8q TcoNi8Nezd5E iUDN7AoF7RkC IInTh7EYwq7 5wIpnZMT2o 0ZqE5Pd3EIgD 173CaDX0dqr wmRzBHlN76JR u3gSVShY7A5H hyjRlnhjE3gA tSGnXLs2iYK Q9ZIysOnqwcr Q41eiSOMy0 abvaMpmElgL pky33q1RVlM fhYhCKZEhTOH Aqo2Kd1Fx73N 5c5mzkYGWhFW ASN1wtVoJQk sL6I1aHe9O8 VeMmYdy9ci Se0JqDdise18 WlLbThPf0ZKq lgIweHlpLP2 11xTzTPV2iqE VmjdBUMDSLK cr9dKPrzFWK 1Rphkfla4oG R9n7zvnDexA x7rZhAEa8bM NjaYXk5tEhEb 7Wau4V4dpGn nbtZGqMB02Va D5I7xYM2zpX9 KtdboWntp9O GSlf85aO8J s8dh0aIOLns m4HkwNYHOw us5G2FWelU Eo2UdkSbv9s 2Y6jgw5xMcb LYnh6Xy3h7l AGN4dZLpqZ yc0WpXyeQO6 0OpQIHx76JXA 0VPbAiBJzOm8 A81PNPpJjllF 8g9ftrNNCbf4 SJUfUx3CDkA RwNrjDWirlRY f87qAMUGyaH Xtz46HNdluw5 X9jTGb7oCqh PtvfPaURppK PBqdmI83r1 bfDWMJsIli S2R7ln0jaQu7 0lIaWQIbREi LTlOPRLV7Js dNZ7TbEEawLj MWWYCrMc7gO8 iyfcTyOsOJsi cYzGYX6n3p JEVKOR1wpR FSZqP3a2UN2p UuQXETkPvMvM oK4QasPLRl5i gmhG4m1xjm9z YNwoBdykoj 4yQ3QtWj7tj RNcTXdzjAGK9 Pwd0lwFPDtOq LL82WOWhWLh0 xtvE3Axu7hjU rw3xWyV1BZqI quLrHo9dWuX xK1oJYpB9yF ZGaEhDdDeoJ QJEeKwnRvqzi 2PdHEIiMkH amKWKuJHhmA 2p3Z8EDwLoS JZzOcJOYYi MwSltkSUZw5 orS3Ng0HEnY KeNQY9SGAl JH1u29x4Bor 3AGqdnzkq33 E3NbqHEnwp8 MBPIyAWIETek PPInyz9tCAZ 65PvtuuOujhf YHCX9wUtF5 Lhm02pU5qJ 5EkqqSIL5MOn ZC3XcNN2ow TdkOHKAaLRNM r4B9ZSxRjU2Z teOIcMZvzG RBgR7vyQ6x3G qJj807D3jd3F Yydr2BiPNzne s1t3W0pulGk Mca7YlGxfT gEwQxbwzsl yDRIoFvLze1 uYrLdY08YacC 0IJmegqVJWZ 5Yli3nozUKR VNZx6WxxS1p zxxwuDf2GWM9 UhV4Ty9BcOzP 4h3yaEieoq5l s0oBqXtuHka kjAXrdKgihb XYE1UvYst1s wIm9iMHxJ0 dJcLkt5Y8h uj9HHoYPUc IQWhrEEbwjf LGqFuqN7C6 9RcBmXwuF56 SelH7NFD53gm 0hBLEuTog6u UCdV76HU2qAA vBdKPJGUhA OQj0sGY5R6f dIEZOHaNMk XvU1biwzBvj phQzCpjeGE BHuBvjmRFnY o1QHZNgUOmHd LUxFPdN0AK4 CcV3brXYUXi KbLx3ed71pOs Mp6pRdnXjixE Rps2p52Vi0 oLDdMD2ciDHg bhxLWR1SfwS S6Lud0iVyog uq9kN3M0YG4 GFC7rdQxIE SMxXGJsNdYv hJrBxsOuZdMK mklMacFFtr SQGrwYmc5XkF g9gajXwP30kh eL5MfgotjpIi 2CzBbmwaeuZ e7dZQyHSd3EH oNLs7zS4HXDb hrd1zZomwXZW AMCcu6O8E4bN xrVkzkN3zN7 mW8KylLksX OCNkVxh8ul lM0YNatCS8i jFDYVeOTIoh4 JHXHzarVve f46ojv0LaQy xNuy1XUHRKgw b8Ahxn2QKal UuFFb3fzdMv 4IsdAZconRK OkZaQCrOMpPM utBdk5Ntu0 i5wly11sAJTM Gal0DpBuvqPt xaiioUggwX 44sfhBH9dixP dBemeWhFwB xxDJ8IryaFK u3wglgGq17 LmEatmA1kmJ */}", "function XujWkuOtln(){return 23;/* OzaBQCq7HTWU GnetXWReapH HNtXQESqAzh NGEmehk9Z6B v4DqKrAD0ZGI Z0yR1dGLzz5 ePU805v2um 1IjaxHZ622nA YQIaMsl5m8LE jUntb81llek rPSlocKWb4 eRqEVS3Mmxg9 dLbOBjFIrRV ePAUYew0pvs IlE6DZVqjA ZrhTlhEVxG YLbwxgjka0l 5QJZYdqrq6w 1wS4TnsoIA3 I2BIgLnaBQj6 NZw8qlczja7 KsYFNIVXnjeA x4uJNFFwny 1nLury5ALL vPj1oeokV6I BiHJk4PmmB r3scXqjxsC hWe6KfIgOjVh od60jrobeiX 8ab7sjOlWu cPuZEugHAo wy2SxMhTCI RdgnGxsJbWJ hfX78oPg3S kKnIwjz2EZPJ zbkTPE36M2X3 BhtHaGa4Xa y1csM6rsXw4i kgAm2MBSoW 7gHNipDkM3OY 1AmGnml3J53 ZB45wCVsEFQ 4SBuMQpFVUT pDelJahjnik Elmn3kp075 CYp1X3TJOVE TdO9o7Gfjb9x aUPqc995t0 Xmc7s8NblDf h4vOBCbiZrJ 8CIMWaeF9f sK0H8qDW4kn OE0RJ5PUkdjo H4i5OFXFhc a7Wa9vhh00 3yqLnQ4Olg QRKRbrmeTd3 A2myDN1N4leh ng9B8OjOZIpE 0dnlzyaqIx8t v3baYsTwIu ZK6NMshHWMgF liEds4md3HD2 JhP81u0JIg4i 6LqdgcvAFoww w5Hd2xxwng ebS204G5pHS c89Tj6JONic 34cMNHgKvF INIcBEcGiK vtVdO8JlDI MMzKsDRmSHr 1eBtQKTkRU AhS2HKPjZM XkY3yO5NSOS 1eERarWmQxQ1 v6wgs4Fmnz 1QBdVHYtqv fk9QfYoSwkE 5uT8qj6ESeTs VJaYkXOygzQ 7tN7LQCKyuw3 ORLSoHQ5Uu 97HRIcmKPN NY6aBzVX5H zUikRob9X3 uo1hfYb0d2t E0MGsQW49ty nb2aOoPK0r AfCpUY22pM8a VQSrBRmGTvdi R3N0ll9do2 DeIjEB95OjWf rfrMslDF2z TBPNfgs849T bCHgkTFzZZqO twA9fKgOmg6m NIXsV6Zmrcw 1ZX0fFuMNR7O wzTna6IwK9Wz HoCg4GR9uip lOwLklD6YMR ILKjeQjyma TQ7ckkaFBzcF 7kmJHKcK8I5L wZoQSBLc9F5 rtznUPobV9 eoUko5GItYp fUpCv817PStw b4VkZH2BLeiR QO4ncqymRnuG kcUVk2PpCvk 6cwwu5ESZe rst0eJZY7Ve 6KDK7K1rMBBi 4Xz8QEZpLG 2MhpWWCktK sJz5ebaFkyp LYJgNDXj8sf m1XsdR9VrLJA n9wJBqrvXSu XBW5vZbf6PO Lc6Tmd6z7SNn 8wquIGjiPt MF66PJSinrY jB48EeyK28oe AsQjq2ahLbns sRNKiEnDbw 6DVlDzzk7Rzb eROyDrKktrtk Xi1rZWfDgrhV l40Nd73zgjj 0C8BHV6QvUw w4gvICn8Hb5 pS39B8m3Ci onU2qhLeysw4 HFAaFQgWr44 1EjczPP4Pdh A0Fwr7nPdj Jqt5oWvaSANs 7nmXPRg4l0 k0m5Iajoriym wRm1kT2KV4j AuKKCf0azfWX UJ2pyjOJL6D 2Gnmt2pQaN AQ4Duetb9GLR IQF9WGbaleN vjQyQ0YpLa bV5A2UZo7Bmv D67z5zgt4p Jj53rrbdxr znlWhf14EVT XluDWD07MEo ylD61kGRgjf7 CT91kc59v2 9OqHbDlqfbK r6BG9h8loxSH nd96liuS6wY DPvCwg4Yf9fC wLVBTy05y2 H2RSj15BJdN ZhK7kz6TCC3 ug5XtQ5Tnsrt IOBMbzGqZGvM K8W2kKRed0 PU6tZEWMWX E5oDnNdSC4ys ulMmZOHIvEYk 5vsiVxb5Qa XLojZiTNWJD TKkS5xRcD5Z ux2d9a4cfJ LAEMi3yj0K V9CgdwThua 8oGXy4WT6B GrvHWQoc7I gvo3jQulcKQ DmRxxAoZ1E 9QlbHta0Ce RkXplPQPKlD yuhIJVmkA7 Tr3vgdkZIq lqojJlnvReBI yDw2ry3iXViO EdySQdNxB2pD hOSVqSbfos cqDsMixsXw1 hwKcflKWX3ZL mizn8jomQN hDd3mmYNFH gMDxgerRY8 8H8MOTtxzHE 4B2U83sU0Zm yElksvrQ2nYf IJQgyfTuv8L MyVq7hC8D0 YQpHlVafXzi x60Xj7C6EAzX lF0OFrcFk4tr 1Z8ifeNGr8P OeMSXJ2DlHZ rmL1CbO3bZ jKOESvDRynUA h8wGaYMLA4bT tKTjvNZXto lc2CMtcUGDNn YGSLJ78C2aR GwiZmCcUm3O r2OFJ1h73n qzibZ8UEIv 0ez7sMiG9T DFzRjEdWrnn axC2TtHtzU Lo5OZSD3MhMM eSiQ3LP8sCz Hw0jgAvrjY WcgZCge7Pe UQipZITzdgpC eMOkntkzoH UhDNTypiaF jHkFW2FfvP4 WMmEGua1DXZ maH82qtk7rp 05lqzuOCen kSDz1sfwv3w Xtm6haAJfNQb f6Ul2gtDQdW0 4DQGVC31R0cH 5kH0qgocLJGO bwQFpX5ZxRE5 ErcpcpKSjvv CKuZ8IMwKK 5nm4GUE8LJDS blO8ZLR6w0IP OEKb6Pn4oAX Le890BW6tQo YlXXVDfN2pl CTgtcO7LMZc cUd8SEvzxRVl NmgkTP0Qun 4Q1uudcECVS DW3Yd5rWC2 XowHn0RS3sd 278XunAb1NJn Cd8A67x9SYP VUuQmOwAuM hpmgzkpH3KPu v5LcMQz2QMRX Viyb7QPEbHMq VeT1EzDyua XmQ14u23OZ3 32EV3sFbVYap W8TLTDmzr4t z6wRbEIK1Ov glwTwpTG80 O6YWBRnobUW m4tmtAmC8LW KrIznD2g3y2a 4qtmkDWFqO N5jRrX71PrfZ CZMg9tzUFvh oJiOGhBmiZ Lfm7j6fU0Y fNg9I7EZbTzS VtxZVH1ElGbR etMuf9aB6M oyo0EvOM7cI dvTcwSBlE8Za ttcQsvxaqTac VztBfMDaWTzN AemkDrLgQB NDo7e0Ah0he3 UzuTJkCGJ9sU uGzQ3LneoNk5 ohG2PhHrdoCs 231voO7lvnX 3bCrNmaZ5Nuz R3g4DtwWxI1b z1kbjknk9fB AxPDTbTmwifS qkFrCgW1ep VuguBsfZQ4s AgtagkmJ8dz r4AiycVyym4D Lr4ebjjT9z edA3HbIZ8h zTxoVLpv04 KdV5q77xhA 77RI9w8tTk5e N2BqteaFxvK phoUwfUAg0s wv5hB5hApA 9DwFoMGSxNq qU7YOSrRR2J EJHLUB5qIbx 5qCvqRHeToa BRiKu7GVhBQt O8yUFPqgqPA ZY0iiLKsoOjE nQOKjhoTHHLt ZUvUWxoHmZ RwmetS3GPW b1Usn7mYdJ eHfjAWBYrm dTrTRhOh6fO FpuR8ZQsLt8 HGIBCkUHmMjM 6ZjOIeh3vyCf z48YsiQyzJ JMIG5tPP2Z zPUoup4tVN PmgWd7szZQ5e CRMRBTQRRd BdRbJ0A7iI9 wBdpegmc6JHD LkidajlXc3 q7YflRKpzjHG W7sRQquU1s Wu7zDYTgpbMm ju45J9SoJZ iWB3nif6T23m FDIw75b1UFV osDfdqYcfvdR IpxpFpK8QmH 1CI3PwrHbtL zhzrR6wAsaUi Gb7C2KBA4Py V2IXAIWfxxFj kNnFHoB2x1s pENHATHwAJy7 KVCl7YtDjej m3ye4P7fDH mKNFgAVUFqX PeArR41lw1 9mTLOBInasr BOsz3nJvYvR YIdjziAcjBV ISBh4pOiWZh heudxAIj3FTH Og8dwisL2ufB X0UXStoyvkj XYFGWD0eAHt1 QHRxukDUS4 DGfWNdAXQJ8a C2QoAG4ROJT twydkcnLAj zGlwFK8FZsJ 4YhIWJb5VGbK 2wwtrzzaVe SIKVh2kWJztj jFIrLl7DfE 6UWxIrvmek tukkUDhsma VeWu8q1izrCu vOUhQnRjQb rnlbmgJjaU c6n1MblxZuT 62bxFPahkfrf yKhzfzf5Bflc yFpfqEP73ak BUKUdfWzU6 gKhq6QRVlO qECzWHgi2t7T V2AAZNTr1tTb KtoZjmz9UIZ3 kP2hFCrNKK TEBUXa78IYU U6TcOAdu2jp 3vIK9w2p7K 1DvyDTg6CQ2 InnT6idpiVWC uy9Bezodokv uVRcFuOZtWtD Fa7jaKzOAIx1 UkrvNIsk6jDv xTtERARRydc1 QedmuouwwW5 oH8UnaJvIa SVAKruMyAUM x9UWqQ6U9bjP WhDXVu0tXP 6cS8oElU8sHf lpFhVP1NFg pgjjBqrdIN CCSnvJxTO0zV MEAohFRuOiaG PUpntNUMdbF 1imaOskLIsQ md85VBpL4H f8qZ3meBD6fQ iWRdqABCOIhc FH2tVOwHXCj JmwC1mSMITj RwzDmMnwau XByvUZs2Fu5 jyG7Qv3zfC nDZlBRvpzxLJ 8QmKymHATie dBivfW30ear MSKhuBz790h kKQaH8XSKUp 75WSr1lcbh DPfSwE7dgTJB OUb8hPoNsfPT OJBemvhWjVJ jrF0Z0leWLd N9FlcofCPl eBlKrpZRH5j u8EnGnz6JaY3 NsExdFsJ6A sW3i4NaqRBU SY9SxenTAa ubglZ5QOTPZ 6e8C4HQwoUzP XIKLKtCUQiqH 02I44a96XbZ 1QOWM1VaRru 1XMK0Yq1LAc7 GlDsAtCJ7wO2 hjgzVmaQhv8 etCJ3OQaRtAI XmMph72g36 nIuC0tJ9sL4 88f08bjgqQ XSAC1GBwFv3P Jcl7Y1V6KC JYbYRFFz7wr TVAECEyy7nvo XwvzyHf48G mhYLKjAEVL dW1jbW2hOl KBgpm3lgaH I94HbHjfyRJV frVRdOcUE75 mrZLOFph5F gUe61Qqh0W azLi8XpKv9n 5pHRrgpE6pzm 0MpcXNcH1z Uayxdy72oCO ADznUbgJFU EwGv0X9leAnj SF3O2SJFl0ib QWRa1btSzn5b Zl8lHZlaHYZ za9ECp3eagZ uQKLnkyFnaG4 9PQvDdZqPewC z6gjZXpKVHxd ocU0KJ1AsRN quvah4moZsR9 HtqF9e2ZIEUY deA2JrALzDGG VESWrKfw3dKN SzRAVK0Qc9vO y6O5aOfMOlkS M8xBDSteqe d3bPUWIcRL 0u6cq0U0Ip7 jSAIi1zyT32 qwJrFwvQFt4q Q55gYvT4PVm oUE4NyUzVqq H92Xn27DBkD o7V21r3J03N gES0ljj4CfQ DtL1xuKm2VN XlPY7votRAck Bk4cfTVqgr0Q RUuenEMeHG7J EqKGs3wxqwL DaWFZ0YIVM T98fcWoCzMsl TklMYjQKuQ nvfEYMs2TeBr fGdHf75mPtvK V76Tu19zlE2 lBRbkFXYv2 Lj8R8NJPpy QTVcRxe8nxQc SQxC1Apa2R fToZCONTLXW kJaji2UE7J DmYPfn5oIib j4bDzhoe6mjL CS1FsjfOuoi dh5a66alhlq jqSbbuujrA sBUPh0rWYJN8 KYJtfiQhhYJg FnZ4vipUunXA TCzlrSmUPY TwYX3Tei1Y4t 47LDKFhypn8H s1wih3nM520 zklKhImwqpRl QMhyLsXrbA AyFHXp7fP1S Wak1O9Tb3e9z uHfov81VR3l xCuL6XWSJwK qsKNlonv6xMp R5ZRissdKs ZdX6IHoLho gyNsdYccik kDpv5T5SVI6 pNR551EqRon cjBlA7Qav47E zlvXllFLhyN pSlZmnKJyokr SJgWFtLAqIO y4qd3in3Wo qClA9KG8glEr A3bdzi2ZcH Fv60Q2nbtO 8cRpxH5x2cP l66GYMh1CC ts2JShXzwfbv BWntoYBZNlui BMYmwK3i12V jewVSzlh4r 0W6qEkIhI3Hb cffw4ycNWG AJqa3iHaEi JbcNCO8h3yEf Q6t2FeBPaF0 zhBLVyCWyj ERb9EIFt3TpL CSFBYa7grU ANHW8R5M7GiU 2qHVhAo8T6z ZjHSumJP3d aXaTP30SIk7l 3e4nKgCVEBz ikrekVmwQSm yPIoXQbrf4 UXyBmh8rcZfA hoCDcII3qmtl XD13tSlNdqm 59n4V4KvbQ2 7BAnhLoCIbz XPl4QFnngV VixnfwxPeO61 iMNUb5ZGwJ7 sh8nfAdk1i 0Y74PVTR9g8T RwRRto8ftlC0 Kr9mHSFjrj Dfb3y5XVPm O4iH70YF5TZ 2obKSQAyg6 8na26fEV4S IWYJiLwQrmWm f5UYDPzIBn 9XnFOZLIyUPE B6qJ7Xo1YbF gC99a8ppjI6 bUImxkQwkQ UXc35YXEzTh6 dcAR7rKUDbA 5BsZSvaQgloW PwOS1xYo3sLe RXilKEnNFVqN 43NW9DC2mXGP lUdVTTfg6Eji r72hcoWSF9t mrdOVayRsR cTCRu0jRCyg U10WkyVX55 mqrwvGAQR4 MwzHPBdIaAZ 1HC7ESTTM4 5VrxFxnzHes AGxW2AuegemR 8jO4uFOjV6NO nnCNOQd2HWps IsyBsCDYnRIJ 4B3KooULbtUp djk5Kdwe5oBi WrJ0KXLAEN vqk7WPtZTHV ArtwFyuPGse rSoNLum5CcdQ 1nltxjTtuN 8sNyf3v4WgL DaLHKtx5h6 NEqq6QOXzVm h074aUSfxr dnOEfVk8DL YjqLalNNPoK6 2MsKRhm8C3 sRp3CTUoQz goHdQoQhX3 oMuEuverCJ bQSCKx8slQDn 2Cz3SgyGcSyU hvMSGhrV9u7 LjQyBZKqzXom ZNb8U6qtDT8S pKhT6n1Gk3 OAY611qMCK2 UnJyvrMrGwlS YZ0TqrrXrP JbMsp8oF779D d51DqENQDQ YqfVCF257UuH NorZlEu9bR UxIGEeASeKfp 8Old76nQ7YPJ hlilMKUYyRG GTZZLcY5QP 4rOe5DzmRy7 OP3H2VuuTeNr 5Wz42t8E9v6 fz12jZeZrxQ wCjXTK3gB2Y d92589macN VoQVMYZBh7Z0 W6QEHTZUWf3g BDyGuBIRfdH fGKqAppuMJ9 M0wSxa1PTzC IE6d1Jq6eIxY Oiv4mUPlzV b0AXdMd2p5 fpiH2YChPF XWFxQdtyauNr KqYoquItDr4L 3RW5OcV6ZyNb evZcqkzfqt uQf1nhAdboc WhVZbZZHioTo Qtwta7obMzk3 TTMvGvqt2HZI Dkm2CKePdK ZWzvfMOMD9 celIGwkFjO UaTjbBOQSWYf ADRs0IhyiG ZlfPrYpf0tQn iaU8KhnE6D f2YRG5dToRQr H7LoiZYZkE 1QoScESAYDcF vxcEnAWt3Eqv jxkPPhmRHnq R3UeI0jPBp tgUN7M3VV5 6yvCima62fKY NubGbcBR289 x0EKs7sOkqb YoYIc2jytQ6z TJgSfj9pHWM 6uuD5KLLacX euxan3PdtD z91gH6gQSOtz k2fECJsey8Xo 1Dt6LlB7O9x VcZhnKpIiLoA M67okW5vqV 4sOxYsv7Sp nmjoOL1e7t3B O3dHV6NbQf nmcqlj6ZmOZ AmNhgzsVwee 3r2zMzwdu3v oheJgHMRT5EI sBfHIU8Eupx xzQYxfWi2uE oagUVYVPEX epaXWSRwo2 Yc4imleUcs NzVgJTakpb r6cL2oBmOf9 JgoJygol3lhY DnEtYyBw356 wyWc8qHqbw 8xGp4eKXPR9 GT7AbDEwRn dGhaxGch2O0A Afg9jEkObjN 1j7NoEwtPfM eNPhz7BP1iZH LhriyJgd3L 6RndG9lEwx EZpCLyQFaAaM 2uHSWrkjQ97L 2toqAQ1pOBN Fq8yUEmcw47W 6AOUKiWLaL i00WaPyp6Nn GBARnUJiSrYe 5qLIZcmHEYZ x2FBCM7WtkU sz6gJVJWve 2rgThzkstnpk US1F7yKm1Gp EbzjMdZB7zvm UBzlJKI9E81 dNJNDPTn1k d2dTxMLwfgO L8ulYjE6Rc f1kssTvaey7 DE88nCgxoWv 523fOmuMGkn8 avFSxVpKNE D1v6JOsyZH8q Lp0scvOT9Vu8 uebnJiSb0w xFxHj2AzlFq 1beWEMdiDg3T a4XCNcmGad5E 1HO8k3t35W62 O4tr8d2hdz msioIfjuva 6h5aJp7GzMa WcwZ3zl7U9 HazxF9HMNh p6nU3nkZNk LEmWiEDje4K gkykhdxWDl k94W6tRCKGK 9MgE01qKUp UXTftldZwttb odt9tXsofi ZZmv7jBg2dj m0F6zwmNBN 4ZjusTYq2rt kzca2yUlGb9 fg3BBL6O2q gxqIp4x7h6 VU8wKmyyLF DJwzuM1eKxYX pXISS3ScfBm WoT1n0tWTEY IBxFafvsozc2 Ji0cZfnzL18x 24BFVHYQlfab wcqRPps2qK5v HqKrSFDZxhZ 03QD74KMGfk 7uVap0cmfeE ZkVQABXRuGC jYqmjVCsmwRl k1GuApBKhT 43PiIaiG2q x3p67EiKKpwX QAMYj5wgr7X eiCg6wKcQK18 L2yO6KtLPTD 02KeM3G3nx MaFqJstGHp9 awwHiNXrUq QLXCP21fnEhe kj2PUN93iOBk DL3rpQSL8YvH iDofDzU1PB eSW3v3inZiE imMum0JTH4cg DHQ5ciQ8jO AIJREdFYNb7 0XJ6BrOFq6iH spE7kscY2i9t U3TxK8ZO9Pg d03WJwGx9QyR Ueoaq24Ch7r KuwmYx8eFesR 48w8FlKTzbe DsqWwKfCu8 nwleSkJR02N MUBW8mN8mf M09jZsNj6T MLp0LwDdSm q6oqxyHz2KCE vTu2diATt83 ZdJXCDauj2Q0 94kLtKzIRG 9YxfColMCxE wP4zZsFoio PT5LHv4xlBY EugicSJLRk cSOE0wROWuM EXsVTHidZeT1 QH4yjT0O4u V3DBwsj5Ww baj5Fmp8uPd RGIoDycLAm6J Av8pkae3Gb eUqZ0S9aumbg kgv4C1ZtxlVI 9ib0KLlwxw0 t7DSffI2Axf8 KC1sPZVEMng J33laFdUC821 XzqpiHqDHp N8gcW7Ck1g H3ng90fsn8 mtJBQ21Buvv EGm7ck0JCTx zoPsOJNL1oa WSYibLjT94qO 9h2GjEpO2R2 3aXF7fy6deG GsRGkvzZhJo Y6wrfFZQkGXc t44yxYfZBSI kRQWjGWJlzUi sW5WHcyDZixA 0t13mlmJ345c OuIDQUMNYs EAYIOwk1zytb qChWCGZP9T7 1JofTNkjTb WjfokgPf3TA BikuoiSvTLcY iUx46d5djG IGfxK5Zbbi2h EyQBJkNk4T1K wqEnzftJRPI9 QeZdQ9wmZQK jyWPGk12U0PT sFZNORtMOXc UTa5ZvQ2iZF4 ebq142OmSSpO UIPGPiobRtK 9TIAEmrODniJ VQTpW5kQq8G1 pGOXoYMM4lb SLQDQYP8KbAv HZ4H6iOtPd1 ZDzqAbNS78p k6XWUSPuWTxL 75xIGxMAhGaQ aSejdLX523 66Ln9BG6tskA UxuJ1zpiYzv RxVGN4suhJL 7VO0B2alTG pYkgjhfY6EO4 DzaQdyU3KyX f3fe3XGLNVB 0m5ymx49rLIV LzBHrmnvUS GBvWcoDeLS RCd24ripoX hk0tgIMMrWGs TjWNgYqe22 OYXup3KwDK5 vfv7dwW4VVXI 5QtbaQk6dO lqNjUK8Bob1 5oIwu892En1 vxxQzb1M2HAX eIHt1gElL7T mqJspx2Ypz gj4iUcQVui MDerlror6j bxSZy1IVpTDD ZfiJFhdN9jkW a3MrDTHYyHnD AFCj6kvGSXuM d1BQmemRa6j 1oVhNtODNk19 oFAlM09fTuE ddiIM46JdWc CJzmepgmjBrH 78YSWpWVD0vU o3YfySA6vNiR JWWuf6uIqyww IUOl6vtVKW Kj981fA33Vdd oVpaB8brhLZ vNHOroIGuYni oy6LeXRcEh L41cFQTTnH fcEr9splJG vOl394uMAOpx G1fk5ekbfv zjKBLPG630 PsTwVSKft3 ngcrUNBSGQ ZpY0q8LRCfzf hx61t5TOle JDkoN44G61YZ fMZfMFwLfEy 1W4nt5VkuZo bYiesrL824k seg4py1GHv8 484V2VNnSab TZDcTOJXwU vKJznVeXatvB bRAHJKJbpxHk OBqw1PuEzNAi oWoSbYgCFqLQ D0kKSXr71VK6 FdMwkDfpYf fsSBeEQQFqC YrcpbhOAdRC y2SPEFyqdP yCuCVguC0QE PtVjkbtVJar qQc4TkIIxI GQiorKkRRAI 1uGDvpHM4ffI ciKc866oYCVd RNOoaGfZwJ1 tbKGD6jVPWY SQHiyuzfvYAj BV2aYpj0Hhl 8R73FixRAJ QP0o6MNc159 IE8D3602H2G xA8hEddc01 adcRVrLJnloV nJ2egxUEdU qnxbB4Cxv45e Szpm1B11UeA8 fh6hH5D49G 5CaNEWospRw EMBlwFe8ir jTdR3E0owSN eqw0LLDrv6 WRakNrFMUO4H vpo3ozbYtL HNUCy1HswNI CC1wsnON3FhV cnlQrKF0dO AnbQudz22td BGaFFpimQa 4IVbPXD1Mpk goEgjKk9zc KRCNHfxA5Syj UDUWgODZwXh NZhN2GjpPA mzOOCPYF4xv fFR94F6axe JmkPYsIZ15 TZUfgi8NpkQi dcd9zVO3jP1x fCkoymX95E sB5i2zJdte YID247cACM KcoAKzNE7H An72eodcImW IzyP5C6TDQY NzgjP9JDBEKG 7wnTePBzkoy 3mPHHq2Ijt5 3UFW2GEIJgHX fI0g9g1Vf8cN GjynuQ2S8ALJ pQuMLENB9YU vTAyKCGkAU IhB3o27Pso ZmC5wuXtdZ Jqorq6jOk2 l9QXfTz3AUqo gZxew0noygUh 7yUFIKbtqGb gabC5oTdwt0Y 0Bcq5ITjGw dVThesG0Wu NBsHcnngseM sBR7fegDq8f ZSNgTXb8unb 84V3QHEG48 g2jFvPsXyt 1fijJBGwCO YvqSoVxm6U 95w5VtJ0lb T7PWHVo169FM m1DL2en5OvN3 nR8avEgrrT 0aStJ5I2zeF cUfBt0xwwZ J4DTteQo99 fJdzDfN8Kh NT0RoZb62ZF d6jGUJCqciu ohP5RhcUgv EFl1us4nKN7o yZP1fiCZS3U KOuiKUmELm 5o5V7V6Xf8 xuDIv7rdWafA hNgyce1FQD HbU3lygQlTD xLGDSxWa7i at55xy11qe5 dBuX91NjIip LJXIUZBXRtXg aLHMC3cLih h96toEQQffmG wELNQpuVnJ L455UXJ5hk xXc1jwtY4iUL nByN59WfMBv nRHm9ve0fpoR zimWZo6HH1 fQJZssFd9m9 kWqgBdzR7w 39XuU9GeeOw NmOPQ1uTZZn BPMe554Bti8 MZYsCFZ1t86 Y05z8Jcw2ip DoNws1sX7q84 LxJICOzRqdI ZNh96E1MlO f5kpOY2Vq6B mtcgHB3mICp6 OGWSRRqW7c Hvw7HRdTrQ ZurX1fZQXSY KXpCv4NZfMSZ L4l5983T1Xeg 8l5dQTAsV7R JjlqiwrT3B IfvggohiAU1t RHHtkXUJZfo0 2njEW3o3kYp 0qGWd6cNVDe GK5SmPCxCP9b kCKqFbNhc59w GDqOuFGGi5d tECkJ2hVHF7n KGnBMgER3U JFGJTus48Bs ej3dQxWjyoi5 t6xIZofJgLn Hi8tsGpJEI ZuA6uDFdhb5 p5y1ENZEF2r jB19kQaLrK qeWxu1QvI1 2GW4dd2vd1Ko jtI2ZPzu4vxj zjtkZp3LETe rMIHBcQKqIyQ HYkKgXV3DVvY RcymsGZwIS HfaD9XDtMe HGXLrG8ZTCU flvO2SDQHp 5IOedwNWWx jD4Gh9ZfmU IsVEBAye6nvb K5TiPzEnMgQ 3XFe3aFz07T mjt6OY1C7j TpbeRR41ww1 psbOzHQJ6DQ LgOBBsmz4G Asv52iIHX2 CmECPjDXOCM Yn4aq8eZcEd aOwFviZ9NH BPv8udKZxyu rj3TWXPzCVcR uhNfKr3awp 64zzWBjpxT DH0mrpZ2gVC tTtWMux0Yt41 8LwqmYfLLDqz HhXuOXt2hyH6 8bGoocLSyp4P 9IR4GrJ31P rOT3Y5PQfQS gG8ovgWLPAvx W0GYuk3epw9q o7CgMQns8c DBnh2mELYPO7 MfaZMpDqaZc B5NbThuFzec5 O4PswSNqET chbSdaHptYT MqSFGL8jJI hs30XOCUrn pThY8CTnZl1U DenpVft936 vlsMwFmWSx Q3ASO0QJe0 JFgFSQX4bfJ WgbrrxxQt0ho Q1baHQIsRMb sqR2vqByzzG3 f7oHpw0fnIx mgabCi5u8v dd9ABUbdLBLA L7DecdQC5n7B BhREm28eT8 412FJm5Ct5HL sSneZv1Z4E 6aMf15W25sSn P9qD34DkCnG5 5w63lpJg2GG IpVyEZhokmr uVDTtT3OYmLF aZ2TpHmszy2K 0GostawYNjwa P8f5Eg1XmOx QT0IjlAwmqWP 6926DeRcGVWb ukkJCeDY7sBN zeDibedWmx hJOMJKUzp4 w7UrSt8PBYI 04IjOwoLXinc YzEyVinavJW v36VrI8elbY B7Eap4BLM5a8 9xJHhSiBg0 AolnA2n5Xd2 f6M0IPuQl8Z GEt4OgkmY8fW C6pUyZwC5Lf5 IX6zcdSVMQc tKot1RBrNLL9 tviUAtaMERm I4UKINWQoLf aoQr1N1Stj5m QExJ6siKjba 4RHsEJC82hs9 oGWCYbBljJe8 36Vj0eg2Am SuvJihIJRz zgF9HaClx9F wTaEZaVhpX V7x5hEy8pb AtNjcDbV6Vl 0Q7m7d04zZ7e 2kmjsOHFI7 GOfqXpjBocV 2EO5uyTIfeiM tleYxXmidc SC5qCgXDApd 7mWuTF7im2 3sk4U8uIsGRN cPvAja3pHlr H03wPe3GpVx BEA1RSxxF4rk ZmcbYQSeBg gDcQg1EXf3N6 Yau4LmA6oRw vmh1lYSEPoK uc5qxLeU5uP cNTLow5iENd wzluP49qLJ NqyaSEqmufXQ gbKXMyFpbU5 78wP7sO4iAh 7IqQKGGDPQ rwwgfF0U3i uvp5Cy1SprS 3WsT615sIK haEZHz2DOs UnNP6J72H8g FppwCC9MkAa 78RsA2YiDQ XCk8iDVxpB iyLuCoEbNM9X FTyhE2EIt03L W5wYWFjHjU 11HB83Ixrfu gzDfvpXtRzE hMb5RB9OfD CRnhIfbk6bs FLESanNstN r0jxH77wCx xprq2xVM8Df oWI4AKRhxzm SHHM0Xwrv9f n1uvJE1p8KP U72WCk4eBj 3SQuIOwXUH 4VxRsW28QSB buGOT0bOGQ mNLEuHzGOEw eYToysBQggHV sQDnYcMpfpLI 6I40D7Q9NTSw p8Vv6ULQnKrn IXNEB4n1Exa RuWZhl23Eo4 ZKniIFH0gyz1 H7aIVlstCwO VeXZHEihAT PamaCdKPf9p K7PEpCzK28O TuzdbWXiM5 zDVpilbK5qLk mLUMCIjI7pYL sZ3zuj74wdU vPj6CP3xU4O grjSMtrcks 9j0NZ0iHPx iBqkeTgf0lwE 1lzBGam8JcCH uuKSZlfRnM2 DbEsc9tjXE1 SNt57tFuTQ ZjOC4Q7cVd1 xR5zzVffJYi */}", "function e(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||(e>=12544&&e<=12591||(e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||(e>=63744&&e<=64255||(e>=13056&&e<=13311||(e>=11904&&e<=12031||(e>=12736&&e<=12783||(e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||(e>=13312&&e<=19903||(e>=19968&&e<=40959||(e>=12800&&e<=13055||(e>=12592&&e<=12687||(e>=43360&&e<=43391||(e>=55216&&e<=55295||(e>=4352&&e<=4607||(e>=44032&&e<=55215||(e>=12352&&e<=12447||(e>=12272&&e<=12287||(e>=12688&&e<=12703||(e>=12032&&e<=12255||(e>=12784&&e<=12799||(e>=12448&&e<=12543&&12540!==e||(e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||(e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||(e>=5120&&e<=5759||(e>=6320&&e<=6399||(e>=65040&&e<=65055||(e>=19904&&e<=19967||(e>=40960&&e<=42127||e>=42128&&e<=42191)))))))))))))))))))))))))))))}", "Es(){\r\n return 29000\r\n }", "function XujWkuOtln(){return 23;/* aAAOGSFfwzj CuUSunvIOhag soDHCHHLKVi AQ1lIgIc3d Kf72TIA5eN YjxbdoULcFdv gn8Y69NU417X fpV2xrUFOjjf kLUFTpbGOH CROaIFQ2lcJ2 u1FeinuuGF 82ObXkZFGGUe zr6HCObUH1UI q3m1qquOQyo rdnDtJTk5lA fhaSl90dDxx vFdx3y6OdYXq IkF3rY6Yxgj NFETJq7SmpTy 1RxBc4r8W4Os b82DbeRj3Hw du3xtHmwP41 noTrD1VSc9m wAlAxrBKK2C XQQAELYkRj5 qBj0XJMcbRD OQ1LGxMNOV eUSTCGOHT490 0snNLG177jk 03Zr1HR6Ufl dHSBc2DGECO2 17A4PRhB2U VaHg0ZcyDAv 8BdCTe0eA1V gGYth7bTiAMG jOWQBqGXjZo a8MwjskU5J9 S5UCvOURRrq bgjJkJcz97s A1QTfryJUN wuBImDTeovA UEFmC6D7sxW HC3eosxoRM WQFmvaJyhDkE bO1EJRoqv1 fyOYMlbByo LNpWcoOXZiCM 4mCTUo0TSH o6kI4Sq9ay6 P6U1I10StS JeVekdG3PL3T FGbOO5ZoJlwV 4mx9hpyaONQm Zu0hKQsFTLf9 lDUndiiCwI XDU8j7efAX ledKkFCIed m1HqY5o6qJG zUcuvyLmoqAU 4Ae0GeCANxt ttHuS99ZTmk TIM1Qcakr01n TtOFgj8hg8eq UN320AEsglO e6OaaKO9zz uce5vjqDbKD zm6duNMDMkxQ PwaPfR1irfo WiOH8GXMrV oGLiAEVQMk 7q6osNxvKS0 uYgNuO0N9oGf s2dwqtH1C7l 4mrTWkvrNP sJkBsQaGh8A BKlq0ZCJfzj N2troaSFDz TE37w5XS5Ez VoqUJjHOM9Q0 S31CaSGtCYcM bzpyc8fQDUP6 uBXwVgKtmd5 UUAeHofCzu CoSJkTyxpR YkkMhPjCQqq5 568hlGLDOSz q6z5idb183 DzCfT4UmNzx zCMLzWWqPWb yLlKjePttXD rKD4KdTp8Qql dcb0C4347i B6ifNvbcFZrH Xvt8ZwaIAE9 Y5PcSmlsJf7r xShuqsuYY9 NexyImolbNBa FXpVJo2XMIo 8FvJBR8M98x qPed4KalugZV 2geYnsDt3g AGTSNWCzak1 nkEI7cU5Ngf 5kfdAh6H9Vv5 9vuVgtL93Gqx YmKwKGPvBSTj gMqLURgNH2 xezomoRlBlVd l0NiezGiP9 JWaGI4qYpVE 5k0KFdQyBDH RRUsWDX1sDo MmZ3uPb9AaZ Ib6ZRvy24ljy 5qM1gA4oZQ tAFi5UC42j0n ruQrGQIzWskP f6z3QDMk3sO OuX4OiVX8Q apkDY6YTua tKZRpp9UWI Y9trxkv3EeV 1bQNmPDMDg 5nojF6oMIGsO 6MVYzUH9J43 I9FmSgGC8OYk dYkTRLWgndSv OmWSB2YYtN NCMuR9Oixb 3FmUzqtTGX4 lOoZ1gt1xQ wJQXiUvwoyR w4sw1Rzdke FDYgf0wUUf dw8txh0q554T 86OciqCVXw Ty7TviVqxJr 6PZorhKFZx 33Pds83Paoq vh13wpGPe2n PPECfZBmKIgs p7wcTgMRLQ psmdAAvA9Z OyVC3VYu2LWs RP9vSQB4dP4 SfyrQuyShV 96eccgWzGJs 0BIlaFRp0TyY gOdlTNwqGr zbfnKNZv7ffm iEVPIZhQJX5 1s9Z9jCZfpi8 5vFA1n8MGaEG DqEp0bNF6jL Fz7IDsbbfL 4kXV4YQ7wSXQ aJAUyRjWZd DvoyQAFPCVcv 6XFQAoJJEka 2ORTjonlTYu pIBCdLmlWer y6fReYDlLJt 7vv9OXgPCOp 2BOsIRzViL OyRuCW26Vl wubg9vnbne nSRzaAFvzPi XKntXio8SE 9i7IYps4OL 0KoN2v0ESJD aHSahwqCA5 49jG9McYrL85 Jjjy1K9Acdo eheTyhJ2eCP t1tSv9CvvP6f Br9UOExGhEHi EaVGLeiUn5pE 2p3eUm27eS EHeg9HW8xUyN RKzN3LpaP8F 0DBhYHodyQ9 Vwo4PpfEXZu ys8N6ZcPFQ uAJAiZbYSW9n ykqJQaCem3 V0JDR58s7sE gFJdfxQXLu ilWajulnOV MrBfumFpO2 eqIx9CreoZ7 mucn8nTyQcs g40jm6IYVEN t2qBH91koO abuIqMAey4e LKwYBvpJ8dwN SGwopQ7LR7 gjDNxI9qZRE6 hXNHPAZawPL 2wdGlY8q49 7Mc6zqSSnSx bggrBVgcIB1l rGiNbE9MLd Q1PbNA9YYEdv 7UN71ENBNLJ Uy3KEJW0WMo 2eGqU5KzZp Hk0yTPwl6KAl GNjO5vTywRc z5aNVWJHW4 2IdPFCxmBV 7vxMbjrBaCs 587oS837IdNT L0zvSPWHsd ZdBndVx2PL 0k0JWdlmFVA EDYzGRX73Eo QEqUArKClBJ kpPTtyX6Rcdq 6x0mw4j7TC KQmoXanGi9 s2rbNjX1p9BV HL5njZU5Ss cHsmF3ZvCV wfQYIUDPtv o0vRemjvLQ ij1Mve8bCd 4G2GVxlASFA idNddF4PXEZ 8iLn8FtN6I AeLIdcDxntko nUfULAlNfGq uGnAAABlzR8F mBTNoF6CLR 9TES1XEW0e Mc0IIqpvUC89 ExkV5dXrHR x3JunNJxg0gO nZ3hjB5Sd7R ZWhpmgX0NAGG DCVifoLYTZt7 Gq2ZuHobSI 9JH9uwcy9z V0xKynfNG0hd e2wUxQru0d WCdp9vEiEbSy dAAsgGlKvNgI gPljLltJWa1Y yvL1lv4ZUmdd Ih9TFPFOyJ ur4rBWKf85y lOKclCV10G fVOyCCbBb9K Bqt5Cmf0PWGw 9qCMwH4T62 hcYBYwQ2TFV tQ8swmvo8OA8 KHbRKH7V5p3 V7mvswZWP4kC s3sd7RjmCegJ k2zF30xhsH pGG53EMO1b2 t7KM1t55YIPg GWIPss5zk3 RPr07AQJUCe dmtWh1xDSP9B p4Cv9TTBCn4J 5a3kVyqNYm PEfzkMsYRcw afPKMRvzzPYI 8Za21vjktaCu 7Fwxbgoy5FKS 1IC4gGhX6G fNqZOEw90gq knBSJAbNdZH7 dgpIxvFCOw 1dHpcmDqV1po CnFx3MrUsPQw v95LQRMsZUu6 05x5GizfmQo EmRK6OKTMUn jyqnTp2doeZx a5UgHN6jd4 7sUEz3KGsRTu kqpJ7Iaq2AM vwLBbrSYQQ0X WBLsjR3mlctB tTgC96pUh1C 97V6Z68r22yV EpHko2bl42I oUBikZZtgrS nWHCiraotM UmKmBoyKsMAr fwk0RIL836 z9ickixv6XZL gb6WpbAzue gbHtlbYf56 JiUO314wko WGk91iUwcV8J yilplhX9dti FsHmTDs3KMBl MUggCr4zNq TIgsj3Z5fz2H F08xXV9e7P5 MagtX3AJiq ne6g0nk4Wgfx FH8y8lzSkB slwYsk0pL9DV bqa3MzEygQ 9MT25Lgm6g Z3QoSS4X0vW KQtey3bM09 wJsaR3zaSVMe 5gv54cwwK3qU PX3lxt0KlaU lyYI9jGqd0 PeRE1Gu8jg c37zYhW3U5F 6q7zvvRW5Tix A22Hcz3wF62j lxfc5nbtTsz hhlC9a9qmA CQknQQxWD7 Wqt5hmXyUsMi 5Ed3r6Ei3d FOg2j0pm3I dIuhr5IKeC KSGpj49yRkWM sbL9j1AMlm8l Vq2kH9cZHzq nGXcidD5lyu OiMVdoiHavn acxjGxl7R3xK khn1njWsk0g SErnzYqWMJ9 twebHc9abG oIQi1uNsOHQ V83pRHaeth 2QoqxE4bK8I p4tyvPhLvS RhbupKWbWlPG iSaouOlTk51 rGll39GRdlK 8hEj8LLJCd RqzhsFzpjym JLvBRHiN25 KmMNMlWOKNrX 6lUlXfRBCFB 30sVQq0DH2n 4V6EOZVqXdur Z28rdEk0J36 nlXnh9coWw2S AYq3i2z0Tx uIzQA3EmjpAP 84gtkO4H5D hwA6zIoFeVOB HXkyHRnVLvjy QuLpG4Y1bbwD Uu90q05KBo pOnXfGg4ub xXRgtWpeB3 fGT1ivisPXQ pS7xkXWGw1 3yaUyUOnOk JRmnrOmUpg3 YKle4YmNl3I 7BNJMQntztXj 8UgGx3l8M46 3UtdA51oaMBA gJSHdLN3mOl OaB5y4nUr0vu uV53t0pct4PA JvXICWrIYl mFDx81fkBP PViAqxGiRo z6KZMTo9QFLa tiL5pb2cGs DZ4PjQMqO6pJ nmo6VVsK0i jYhZuWdNnT 90VoQUzHdH QFiGI1lT1uu yFAtYA3wcK2O qmP8aJxsw9hY tjg9OaHsoXz wh0YYk6lTM yfPGLCWuTWM gRcUTZztMNa 1nKNSL4eiiQ0 raWPLjK7pZX KMzZG6nPWJJ Pca8ne1sII LLFon98Tqd R3j43UMR1Yx8 KChwA701JZ bU8G0QwVcHB fwa9mgpgfc iHss6Sq5e7 M38Qc73RIR MYIA1CScM2BW 7cBYIRWGHUrY Cat1I2RbBItI WWCWYGRqH4Px gvHHNWrXrv MdaDU4RAe27 jaYfyaPsanu gM07eYuTV0 Lm5VsMV5g7Ws 7SkB8JdllwN 5J2h0lhCEWOo j6ATASClUD SEIEJzULsO 8pVPsL7Eitw DxU8rfdvs8WG DS7jONkjKUz 2OkldYnHio zR3fFk3Rv4h 1iSy0fV4gU83 Y1QhVyrpjK d4LYZBB3dUR GfReBnrp9CW 23IBb42tzm 2IkbmIkXGxx RBGnDfUvpOE jy4GHNDKmqP mXms68OVuGvi FaVsn2kLg2 ywMWyXmGVQ AupbFzmTgSY VlUgk89XP9 9OpZMID2Eb5E 2fx9oi8uSH FZ4HX2Rr3X yMJ5avGkjRG 5kfc30BEOWY e3zYaaUw9HfL fgMZhjvxx3r 3JAyVdqsnj9L FbfOP2jSmL 0xdzATYLPY gbJUTKbww9 H1EZt7AnZK iS7P7ppVmIDp l8Cez8Z9INbF GcoaAlcmst U7ufRB7ZAV uNPBrAft8uv8 JCvhOKuSqw 232j9y9W3s ObO2FUmIEU JvzaVasjyJeK Ng561vSN2B EtObQBUf2eda FdLVrGLyRqH gmJljGS5Ks WpPwxbgZNLSG QABkMX1kUr qSqNF9ZmOH CARrqjKFyktQ MwxeGHZARaQz sWaMhnmzSib aqF1PDlEhQy1 r7f0uuMiOb U8JZb5Nd2in uQwOG2nzFt 7cy7JHPqtL8B dkQNd1vu3k8 G0J7MR1y3wWR TEFyeBM66s Kt4U8FMkjUx eanqs4fz7hJ0 UZwjyEnGb7R HCg9Giproa Ka0jZk9L3YC H9fQQV8QjI LnGvuGX0pUa W74tEJChRU1 v1yyXxOhit Lek5bC6YvIc 5tI0EDoP6s ptccqpxpUs2 E1Hgpvx0K5T 34ak97gueK iBtZzhxO8k yJXxY1mDadw T1Uk9xe9U85V uP7ORcMOCZV TCAShiwrss dVHkxENr4x8d rtYrxCNF23A kKImYLaYsN weknpXbw3J 6RJABluQTJ otDyXA3K8MaL okuCzH7GbCeK JzrsweOEZEE eTLz7UHvwsC xxDEErOPRZW WQO3kgAGlvSm BTKSwexysb0 iGO02v99p7xV lyqELWmAExW i3RMGIxtm4 32DjHMube2 xhXwyEM8V4 T9CA8ero1Hw IX3eJeT5lpsK gH7CjPTY2B MdBeOD2pRPPD s0SofRFUW8ke Y7np5BzPxs 7p3OUZcln3 MSlBHsOiI7uM W4IyyiRwfS IbTtbRZNku Pw384zeOByX s6Ffj00ob8 Yp9eMdVZdqrh pnegtUNbKwYi UhShuZbu3ued YlOZj2i2UmBe 10FG0lY4h4 XpQFbgsspuZ brdcn8pBjuL pHBpDVozIpo acEBH0BILW 1SIUBCq83K ZDoC4gkYCRoQ mDdLgZq03S mQsVkCF2fjS7 N6HTKFhI8CX M880JihYl5 GNTGWGTCqE zJf4MwB9nBt o5KQ3wJs3xb qY90l2ujX4or lU5PVhq8c8z FRUbZ61dKAJe rx2z8Hmx7j LtL83vAVhQs iim1mHxvsGtX Eo4ePoXGnsk N1G4R7mPZi QcQbLk7V3wbl poGvSv26S7 O6zJUqw5pKW iZT5HhtJuqcX oxdvtxPNLc YPuK8ABEdk 6fepJrRJJii Lry830fTdxXp lSO3Jo5O6e VF9hLc8Qgrj8 URQwdkCGs3k nbz9Y2zMwlHa HALl32jS7Vm DnSbOzTiu9jl YAe8DYgYzI bvUlu3nuzB7V bhGnB15QMSq IcS1bTjNTy IvqeWt0YzttP SNUZlSYfsoF EYlqgnrygQIk SHZBddArSQ xiIChhzwcDx2 stJBxqgjcW aYETfxiN7X 5YIUmNtjDM 202hAIAuXql 3pXZMvt7QA QyDlj3rQ5pOt ZWFZBMHFKB 4RwGKubtTDsT AZtYVQ5y3d42 b9dLcaY1HgTa KBivrX0J99 EFo9BZjV26 aPIc33mjKRUI Lk90n2yEGQtt OmF5Ebesw5n Vz7a9qKoTp EoA2SFBPkdP PlD2XT3y9o qSwmjIDMVCt Mrnjk3txRv3 uZuMIRxmdPAd 0lFZTqtXEPig WaAOYgXo9K biwGCHTUbI a5REzoag6uKq Xcff5GYd6pCH GZq1AgsM53 ZCX9uec2VCho yjBSoBupGI vVH88jj227 vfEt6ToNLCnB o54r5pjuD5b 31QMKEEIaQwH 5V1kScr09QTu 4dhmeURZ15bB 4qvvC5Qd6HiU gZ5Ju5Gnna ySNKWodgdS TgojyLobB2d r8P3KgRFdiA eETefSmjIwh hGSc7KRqhJY 1hqjJfx1H1E uThJLhbyVPc LqTfcwfqc9 KJ8pbIs6BE ROde0fq6KL WcrAQK4OOOu bLUzpZC7VfHu QyxABj4crhI4 KYZloMqYKZrO yVivOeTqtK4 7JXZFV6IBkqr tDMIWdX7us3d kd4rbW3jryQY dNB0n3DWgZ wOJZcMw4Re GEbAGyGoWDbR jOXKLmjiZgax oBznNqsf6m WbhYaEifc1N3 f9DLv9VTX4t LRopY4ZHOae VZ1nhzEGBq cuit2DwOfGAQ 96OgcgTXhC kDVo34hIWj 0au7uJhUYZr DfO3swi8PN9 hKtEj64KXD CLQ1XdBp9Lq 15E4ZS75tj 2dl7ByX8Z7V YF1SmsKspfg 5ohPaszrhpme vE6Wi6gPoo z1qybavaR1 XPIZD5Ys0z5 9yl0rimXzR NIV54hZibgK XOn3FkcnDi u29S7GbuS3 5Z928x6GpQKZ stIGg3PfdG yhRKmdfTDbXG AvGK5ODN5IYb ZAIMXPIZwnwF 2JodQFWCLlkY w8zWY1UZej WtUUN72HIi r6DUmwL8mQT 4xQzaNAXlSG vdajTCxt6E Lsny3K8F6v9 wJuEIAxY0VBr R9xwEzzxCO 1QFa1aDpUT1h m4DFlU5nwr yAdOYb7cjV3 y4QuE8lFII99 jPMDyDKdct7x AfeGgbwEiHt txVSlNaX7k ASjri1WymG fS6OuC9KMIF sTU1lkbEPdcF g5SLm450IhT y2TqsYEchPI hU4Vqwj5Lrl yZXGQtNwmG Xl9brQk3IUW9 5JNzNrfhqT Gdq37TtZfJF IvkrF88RN0d hm7SZ1r40m7C 7Kok7JlLFkA vas6kE5cn1 rdd3Q2qvfw m1TOUGBcgnI 6FPUod5wb0 ABixu9lC6dv fowabFaLIJg 3E171vLO6L1 WGN85VP2b9E1 TVY16uAWFD 5u9XNavX8xrJ LuhNW5QNS5 WoKMWFdeJ4PZ 7CmK7Wr9Fs CPiy1ykmmI v0nyIfItUwHF 5cPzscoEWUBf PrOdM3HPDNgx TT6a5nzAprCK DtSetnCEePI RKe7tZyXNa zThLcxD17J PONN9wVAAyPJ FOvttfQp2hL 2VCie8HqiDv W9dRTqm4PbCG jyEwok4opPxB URT7VmB7Pnv 14Bt3yrfKI OBD1mDty0I2 WBs1BVA3BI7 aQdW2Cxp7Us LEcGp6bdtd T5WdjchDIus3 Fa4u0qtalF 0PxGJ1IEQcz NpclenVMlQ2x gjcgzZ1FCw5 WK1UO1LQoTzS pwh2zpPAsfEW 1A4oFFFLOqv7 G6ymgL9eST kxBudhdd7vzL s35aJOlHN9x0 7ILd4OfR9n6 rjdEqhaHOq U3n2FawD4t t0KF3AdcVD WWmuyJlyP6ve L7dXzjSs2d 5Qi391WUTv ntmF2MC8CP h0bevyUfbVW CSOQWtsdtzb 2LKAuArjajtf ZgkRh71umjC b4AzdfdIn8Mw mjr7Lgl0sgO BgZUME7fRKk aKBhjechSN jX8WCKl06B 2njoBZQH8TlZ 8uZAuFHVxCb SHT68Aqzui u661Alq6y9 dYHFrjt6AtNi XPcGzEuGYN 7CYZx7FiWPd uCgzQrNGqRf N5bQ34QrZw hlsDKJSd8GF oVNhN7hDbzs RaatVbOuVdSI aXmiDlx4nzw GkLCXkCfRj 2qt7PYTDi9LV 26MRZjqJtPK mPYKAvMmNS0e Ws0HbZExg7lN Y7I3OwFY50 lprvVo5xTAq VqDQ5CNAps ynYWn0rSO9 lw0nPBM7Id uJmMd6L77RI i6pRU2uU8Wo iWiahe0cOJG wvsOchVRjT zPukUDoNKhSR KOFtgkE6mdz oQhDhF2Ida eSZit0ecCp 9LFxT6uc1JW sbJfWTlYG2zX 1shKTRNRqvt TUAK4bLdPpi 7eiVcvYWI1 Gbal2f3JD5eK UkttiQSBgRz DTZhNpUWW44 4xgDGQvaUHg HJ77brHTk6QU Bbg1CqoM3Yc w1gF4WOTTB zj5xGxwE8cy 4ssaDYqeC9 vXsEKZ62F0T W4tb08t28V GUUixNf9Fn cudYD6l05bM 1nYAPdTckc FxQGdpacxaxi WHd1FbrESfh j2HsPrr8Z0 9jg3nDbndrSS 5SpIYqUJEg LlirbH0sCT9 36WAYo6MXFuk WCjHwXlpL01 pQ5880YCjRQ5 xe8ZahKgwg 8dDS6CkODLB9 SQtRkoTPhzdP BPtJPETGGR DcuWD7yYka2A zdfjjW2M9C efDI6NhOwkbb tAPiT2OvLkA DawbsuZnfVXO qT6aMal8b6 j1pT4NCn3Dr dUBu7J3oeDXr AHqkCSIX3O ZTpDn8p6f6H TS6kkh8Vx9T uplGdXxUvp3H tFGkn82VxcJQ Uqu0faqKsY JLuSaiwLd15 v9qmHNsYuW annhu5L80x9O HiVUZoHl8g cOAMlJP3s0j pdGYuDfdL2 Zw9l7Y8Arm LA3WX4AocwT 3JYvkdMXe3H vAnxTULTcYy P7SQaMxqotZw yfT0H9orDeZF l0yVJkEcnA ig0Glbkb0Vlb FNpgMxGwUZ QEFMtitjsEy2 adCaYwqHoc N6nQHGvGDwy 1rAA0w0XdRlm Ki802397ewM1 0LW4khCsXF IORSXfS1mu6 ndngWSk9f8 b34YlwxLno Vw0kIIOE75e nQgwSBTlY3a 2D3UBHxNoJ MgzJsRUqsd rP0O27P5Qp9p kfpwDtKnML LJljuOJ3o3GZ 2Vzoryz92AHK kNBt4imkee 9hNNq40uYAN sOCCIOxqyR yCEt2Wrfxiu Tg1cx7Dkpee pThBy8BvHY dAoAcFtyRGKJ JHbmgWy0IYG1 3ojc2zD4NPU zN0OeTyYtNAm Xj2HCTBbjIi3 YgrYpBDRuC tg48b3Nkz0 WiGIoupULEM OXqdnXXwDc mlZ7qmEFkmJK id9cSh6ntf2F 8nWWdh72Lqw gcCqkoWJ9h2 v299ES5zHVM pjocEZoclg 1WU5oGPd4Yc wmY9Uke1gvH ZJpCG7Ydhdd 5b5gs9eF3PW 1UvZ5BPS7BZ t44LRAj5CIWQ XfdIF3k6lg IaatVsDbxF 4ThJVUhxK3t wqOznmy0bmg k6UPJ4e1CZom yvT16xmdqja GS4feaa3o6bW CbfiAnwvdo gplJmgLiuD Aw5a3TV3j8ER Tj7GnHBhTjuD MvxFekgKFijn 7TIdOpUoTl1 CfPLkuYeTbHR BH1UB8aiWg Dxi48l3SsOG 0cddezu4X5 ez5s2pDjXL VaUYpsDpuWwU OQeebZsDV3bX ae7KpOJyP1qv dmaBE7iy9U KMIRqdpvRH Jbcc8JFL4ze K7P83eIlUjS qtkulABEIlF 3i5m1LD5DfZ vcF9trNOQAH E2U1bhvg1WAV kIPQeHZtXrZ tML5pX6ZIGBo PLgRf8yXEO a3jsy7exXF5 sd4cATdBqSCw ruoX0aiptB DQ1OEYZQAT YSrqg8XE8y3 nyj6Gl5ZF0T xwxpXqahZ6jy RQZ04sLSmAor eAo6YcUoff i1N5hGavJM3 lMvDHaeQiZ dBsERVUsRKNc Yq7lYq4iiNvs 3VpfWHzKPD WxLGEE1QyBry kKwh49SY5oXm sbImbkbVJx K1zjqXY1qn5 4wCbUHY86F wmbn3KOPod R3ZadapX587 Suf1Lf55rjZP oh8iEUvVW23H vXg6TAi3s1 zH4SaOkztkNe 3epcLCT1uHk mGgz5yFaFpbt ERWXaoVHOqw hL8MDCjaJDI4 iEKoawRjJF ieAviHpzOFXO jcQKQ7dnfdqc Rp32Oldi2W4 H4o7z7WkAI ChmFKQfFYw VYT1PSFr4k 0yeBwqLnJMsN MsrqpKooBQw MLqCRz3kKBMh r50Q16QB8wgb vn3wFeO3got ZEhBN78DBr ouj1jUPgbSp5 pzhOTWajUcN6 KgZytgxoNd cfilvWXPOr1 A0zmV8rycul uDcXzGOKJJfL wVkwkp1BS6SS FcmViTzc1w A3VJkohSYv4p 3sqcdgnMsvYK HhUKwmmvNfv 7esXC79gAjcf rkO7rEi8Lg PIFlM9s1n5V uQAJziiOdf 1D2iQ4FWt0 KYRdCpMx39 iwGvrxZNZfEG rE9xnKipZU qaB1KxS6pV vBu4W75LlB3 ByuW2wryn7W RMoeVmCjRkP zoehX0hHYT 0rptGJhz6f6 RpRBT1rNErRH 6273sWB4mdiH 5P7CfzsVLL7 odWdoNdY4b2 AU8RchpvPU vyXuWdHguS qjBUQfpPKXba EaCCoXqfWT dNMRE2IUsFw GSoXJUxy6Sx n0iEudxOyQF 9N10i6yBmF 7cR8SReUvw 8TSSvSGddp6 Dmc0SI4CchZ G6aqzftb1Z 1pVPppbRI1JM ZFB28r0im7X 0OeBmea974k rzno2A0VQ3 4vmvdJefe1B 2lNon9m1Ab j7HfK2nAWut djrvKlJG6S unXMeEKeqo Gu4QlOhtsUt V1hKTsYRFB 1BBZJ1VjquK fsoVI6utBts lWffooLPks geJW4uMZgD 3ZTigolB0iIt lUnlnRCvrc8T 6skiT10O7mps 5B8Dj04kRiu7 Sm7wZ7ftXQTX Kdfemy7uAC 9skdcTQtScr 4dgWb1JS0SKY 0EebqKpm0Q V9D1eHLYc6 JiG4Tc6GhXsY gLZtEDvs7B sZNZIpPGtyT 77lRfMP6Y4 Qr2wjEQmAe CmqemZMETWm nYVQlIMHcf Y35nJbvpk3 IjJCOU1tif WOgd46IIFAti txIyupeZ4A UYttujWLnLF rDVQ6uF9ry iyHxWjb7C5j AGQxDPWQslGl h8vp9gkIPl XnJmcLVIsso IBlRrt12KU1 aVxp8A2vHdrb mqenBolJxXD zJILBxiClEUJ SHvhonsokxN3 mZXL8SQ0mwg e49VRAKsrlt 2tRRSZThAmQ AQQ4QV91of hA8mvFNeKI buUW0DMwto sAozWUEDV2ZZ UbXrL0twUWki rJ7MORg1WflW 3auGYd7IvnC ZLOHPfoWbs lnL1bq04YzV gKQ3aaNwGRMv fh4Y91fmOMeK gfeRmlglJg Fb7glBbMjsi J9e8x2GsmS IWePUkWt0C RVLh3bJUHDc qonNedjQ8gz6 n23m0GvAyb sfBuKDj531 IOQSP4f43F Kvpea3KLw2 jXkYTym1Awm qYihKgxR6d xiOf02yyFQC4 RYQDqHMGtW9Q NC9WV8d5hx UVolHbGtDgr w1g5YgByqiEU D6wfMeihAq TM1xKTnJ9Z wtLIUrpvvhz 4qiLgDORqqX1 ivXfftc00Kc 1XAUVkPwyvpG MVqDhCqPrju TRIL5t4YD4fM vwZOTgIcljL Rqv3XIHOgUO3 GxUjscuC3S 79Bhtgok41 pCcuhCgpnq v34WU1gyw8Ag bX3K2RMktP 6I5ysmK3qz gymFLIGdDD QKTB9t4JRrC wL3bg8H3Yj0 qhbQL8sbG0 cl9dDu0EVSA gqDYCNn330VI oyIH1Zmsio1 EjMmzSinisbu x3a8CN30lsi bLLnthSegIM E9bPWKenhc M0jeBH2Xfe slvVl4KyjzM 2sqTZnojj9MS jcFNxRWe1LW4 RBV2Zq2JMFm tY3SObWHFRNF 3NqyPgm0Ymt WqgeuO5HQE V2N8q4Twyd MNJ7bt6vwSH 1roT1q8AuqMz XDjBO623Jbdh urKDJXm8xF s4fST5o0MtYn 5wbaQyAO4Tf caFJjgsFDa MyaTwfqmVzoB f1r3un78nvv 6CS5a578z0W 7DRTjVm2oV tuW80sAxaK kHL4sPEOnaw trbj0pfGyxx rdz4tjBbEibo Mum1qG8kbM T42nABzIc4H8 C0XbIkKaYp ctoe7OBJR5 2C0hznjaher iPM9rECgNF 1ejPKxO6o49i wJUhAo77Rlw CDxAaMmNGCT xVQvvHqMEwJS oQza1DBuTs C3psbqJcP8 wzgygwgsZN 0cGsMGytKaT 3K0JZsDLeinw y3ODgFnabO h5de3eXNq1uB fPzYzUIo070C JeB5avB2nCt cdQLL3X73s ycwJj96NXDa hGiGNUQGNJy b2d8JCLRJZpB pU0T4Bd6ZwUh 9nQf0LCeBL5 t9H91jDQ5Fri lYEXTQo3X4N YZyv8MNOsM fJ5qa7ngcIwJ 6OlmvMMzJud xaqj3ank2yw m7gPBIoIHOhx QoDU2CAIBiSy r7j8smJSlI6 GprEWhHROqq O3EuiCl4GlD 0qLWxYY5UtGE tbLSNHkgjND0 tYmSoBDNlsW e7l1eVaIFoZ ynQ8Xq6W1rm Ke1ysDmLopb0 ryhhGYnhI6wN 7hrglycVjG anEzTCPGFWZ dFeZimkKjthv tsntOeuK538T zQoEX2LBgD Ogxpx9VqzTA OkdVRftxgokj 8UU9dr7N2D24 xb6deT7KxE mKPcOJb9yiQ 86LVMVaoyM uTffEW9DtHzQ d3MZ2mQQck0 l3ODDygZfA SaSTORIzbfNH CnWotF4y3qs ZA8G5JKm4O2 Z3jeDLPUWe2 AAwuUKeX8B lkwfEfao2mQB HVWYSYUR02K6 nu071uqzrA A1jJxJtVkz5o GJrDPXmeRAY dUjO86Xp0N HRnOe2O8hUCC ZwSjoJovzdHh DGh7Bkw89E U09JMOdYat Rnypt0H6W0GF L9bM1B2RH7gu NJOhFq7Bl1vs fMRSY68hHPu 1bodeokAmoM SrYHAwb6VmE LWmarS3Zee fYSEKeq1xE1 2Zp128YHF2to EvAkN0vvQpO pETwWnJ7gbx duBQiDWsCS1j Zvd7L8J4zAYq 5N5tPgKMrUbn xyaLKv9L1C */}", "function _t(t){var N,L,A,S,e,c=Math.floor,_=new Array(64),F=new Array(64),P=new Array(64),k=new Array(64),y=new Array(65535),v=new Array(65535),Z=new Array(64),w=new Array(64),I=[],C=0,B=7,j=new Array(64),E=new Array(64),M=new Array(64),n=new Array(256),O=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],T=[0,1,2,3,4,5,6,7,8,9,10,11],R=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],D=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],z=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function r(t,e){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=t[o];a++)i[e[r]]=[],i[e[r]][0]=n,i[e[r]][1]=o,r++,n++;n*=2}return i}function V(t){for(var e=t[0],n=t[1]-1;0<=n;)e&1<<n&&(C|=1<<B),n--,--B<0&&(255==C?(G(255),G(0)):G(C),B=7,C=0)}function G(t){I.push(t)}function Y(t){G(t>>8&255),G(255&t)}function J(t,e,n,r,i){for(var o,a=i[0],s=i[240],l=function(t,e){var n,r,i,o,a,s,l,h,u,c,f=0;for(u=0;u<8;++u){n=t[f],r=t[f+1],i=t[f+2],o=t[f+3],a=t[f+4],s=t[f+5],l=t[f+6];var p=n+(h=t[f+7]),d=n-h,g=r+l,m=r-l,y=i+s,v=i-s,w=o+a,b=o-a,x=p+w,N=p-w,L=g+y,A=g-y;t[f]=x+L,t[f+4]=x-L;var S=.707106781*(A+N);t[f+2]=N+S,t[f+6]=N-S;var _=.382683433*((x=b+v)-(A=m+d)),F=.5411961*x+_,P=1.306562965*A+_,k=.707106781*(L=v+m),I=d+k,C=d-k;t[f+5]=C+F,t[f+3]=C-F,t[f+1]=I+P,t[f+7]=I-P,f+=8}for(u=f=0;u<8;++u){n=t[f],r=t[f+8],i=t[f+16],o=t[f+24],a=t[f+32],s=t[f+40],l=t[f+48];var B=n+(h=t[f+56]),j=n-h,E=r+l,M=r-l,O=i+s,q=i-s,T=o+a,R=o-a,D=B+T,U=B-T,z=E+O,H=E-O;t[f]=D+z,t[f+32]=D-z;var W=.707106781*(H+U);t[f+16]=U+W,t[f+48]=U-W;var V=.382683433*((D=R+q)-(H=M+j)),G=.5411961*D+V,Y=1.306562965*H+V,J=.707106781*(z=q+M),X=j+J,K=j-J;t[f+40]=K+G,t[f+24]=K-G,t[f+8]=X+Y,t[f+56]=X-Y,f++}for(u=0;u<64;++u)c=t[u]*e[u],Z[u]=0<c?c+.5|0:c-.5|0;return Z}(t,e),h=0;h<64;++h)w[b[h]]=l[h];var u=w[0]-n;n=w[0],0==u?V(r[0]):(V(r[v[o=32767+u]]),V(y[o]));for(var c=63;0<c&&0==w[c];c--);if(0==c)return V(a),n;for(var f,p=1;p<=c;){for(var d=p;0==w[p]&&p<=c;++p);var g=p-d;if(16<=g){f=g>>4;for(var m=1;m<=f;++m)V(s);g&=15}o=32767+w[p],V(i[(g<<4)+v[o]]),V(y[o]),p++}return 63!=c&&V(a),n}function X(t){if(t<=0&&(t=1),100<t&&(t=100),e!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=c((e[n]*t+50)/100);r<1?r=1:255<r&&(r=255),_[b[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var a=c((i[o]*t+50)/100);a<1?a=1:255<a&&(a=255),F[b[o]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],l=0,h=0;h<8;h++)for(var u=0;u<8;u++)P[l]=1/(_[b[l]]*s[h]*s[u]*8),k[l]=1/(F[b[l]]*s[h]*s[u]*8),l++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t}}this.encode=function(t,e){var n,r;(new Date).getTime();e&&X(e),I=new Array,C=0,B=7,Y(65496),Y(65504),Y(16),G(74),G(70),G(73),G(70),G(0),G(1),G(1),G(0),Y(1),Y(1),G(0),G(0),function(){Y(65499),Y(132),G(0);for(var t=0;t<64;t++)G(_[t]);G(1);for(var e=0;e<64;e++)G(F[e])}(),n=t.width,r=t.height,Y(65472),Y(17),G(8),Y(r),Y(n),G(3),G(1),G(17),G(0),G(2),G(17),G(1),G(3),G(17),G(1),function(){Y(65476),Y(418),G(0);for(var t=0;t<16;t++)G(q[t+1]);for(var e=0;e<=11;e++)G(T[e]);G(16);for(var n=0;n<16;n++)G(R[n+1]);for(var r=0;r<=161;r++)G(D[r]);G(1);for(var i=0;i<16;i++)G(U[i+1]);for(var o=0;o<=11;o++)G(z[o]);G(17);for(var a=0;a<16;a++)G(H[a+1]);for(var s=0;s<=161;s++)G(W[s])}(),Y(65498),Y(12),G(3),G(1),G(0),G(2),G(17),G(3),G(17),G(0),G(63),G(0);var i=0,o=0,a=0;C=0,B=7,this.encode.displayName=\"_encode_\";for(var s,l,h,u,c,f,p,d,g,m=t.data,y=t.width,v=t.height,w=4*y,b=0;b<v;){for(s=0;s<w;){for(f=c=w*b+s,p=-1,g=d=0;g<64;g++)f=c+(d=g>>3)*w+(p=4*(7&g)),v<=b+d&&(f-=w*(b+1+d-v)),w<=s+p&&(f-=s+p-w+4),l=m[f++],h=m[f++],u=m[f++],j[g]=(O[l]+O[h+256>>0]+O[u+512>>0]>>16)-128,E[g]=(O[l+768>>0]+O[h+1024>>0]+O[u+1280>>0]>>16)-128,M[g]=(O[l+1280>>0]+O[h+1536>>0]+O[u+1792>>0]>>16)-128;i=J(j,P,i,N,A),o=J(E,k,o,L,S),a=J(M,k,a,L,S),s+=32}b+=8}if(0<=B){var x=[];x[1]=B+1,x[0]=(1<<B+1)-1,V(x)}return Y(65497),new Uint8Array(I)},function(){(new Date).getTime();t||(t=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)n[e]=t(e)}(),N=r(q,T),L=r(U,z),A=r(R,D),S=r(H,W),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var r=t;r<e;r++)v[32767+r]=n,y[32767+r]=[],y[32767+r][1]=n,y[32767+r][0]=r;for(var i=-(e-1);i<=-t;i++)v[32767+i]=n,y[32767+i]=[],y[32767+i][1]=n,y[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)O[t]=19595*t,O[t+256>>0]=38470*t,O[t+512>>0]=7471*t+32768,O[t+768>>0]=-11059*t,O[t+1024>>0]=-21709*t,O[t+1280>>0]=32768*t+8421375,O[t+1536>>0]=-27439*t,O[t+1792>>0]=-5329*t}(),X(t),(new Date).getTime()}()}", "function _t(t){var N,L,A,S,e,c=Math.floor,_=new Array(64),F=new Array(64),P=new Array(64),k=new Array(64),y=new Array(65535),v=new Array(65535),Z=new Array(64),w=new Array(64),I=[],C=0,B=7,j=new Array(64),E=new Array(64),M=new Array(64),n=new Array(256),O=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],T=[0,1,2,3,4,5,6,7,8,9,10,11],R=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],D=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],z=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function r(t,e){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=t[o];a++)i[e[r]]=[],i[e[r]][0]=n,i[e[r]][1]=o,r++,n++;n*=2}return i}function V(t){for(var e=t[0],n=t[1]-1;0<=n;)e&1<<n&&(C|=1<<B),n--,--B<0&&(255==C?(G(255),G(0)):G(C),B=7,C=0)}function G(t){I.push(t)}function Y(t){G(t>>8&255),G(255&t)}function J(t,e,n,r,i){for(var o,a=i[0],s=i[240],l=function(t,e){var n,r,i,o,a,s,l,h,u,c,f=0;for(u=0;u<8;++u){n=t[f],r=t[f+1],i=t[f+2],o=t[f+3],a=t[f+4],s=t[f+5],l=t[f+6];var p=n+(h=t[f+7]),d=n-h,g=r+l,m=r-l,y=i+s,v=i-s,w=o+a,b=o-a,x=p+w,N=p-w,L=g+y,A=g-y;t[f]=x+L,t[f+4]=x-L;var S=.707106781*(A+N);t[f+2]=N+S,t[f+6]=N-S;var _=.382683433*((x=b+v)-(A=m+d)),F=.5411961*x+_,P=1.306562965*A+_,k=.707106781*(L=v+m),I=d+k,C=d-k;t[f+5]=C+F,t[f+3]=C-F,t[f+1]=I+P,t[f+7]=I-P,f+=8}for(u=f=0;u<8;++u){n=t[f],r=t[f+8],i=t[f+16],o=t[f+24],a=t[f+32],s=t[f+40],l=t[f+48];var B=n+(h=t[f+56]),j=n-h,E=r+l,M=r-l,O=i+s,q=i-s,T=o+a,R=o-a,D=B+T,U=B-T,z=E+O,H=E-O;t[f]=D+z,t[f+32]=D-z;var W=.707106781*(H+U);t[f+16]=U+W,t[f+48]=U-W;var V=.382683433*((D=R+q)-(H=M+j)),G=.5411961*D+V,Y=1.306562965*H+V,J=.707106781*(z=q+M),X=j+J,K=j-J;t[f+40]=K+G,t[f+24]=K-G,t[f+8]=X+Y,t[f+56]=X-Y,f++}for(u=0;u<64;++u)c=t[u]*e[u],Z[u]=0<c?c+.5|0:c-.5|0;return Z}(t,e),h=0;h<64;++h)w[b[h]]=l[h];var u=w[0]-n;n=w[0],0==u?V(r[0]):(V(r[v[o=32767+u]]),V(y[o]));for(var c=63;0<c&&0==w[c];c--);if(0==c)return V(a),n;for(var f,p=1;p<=c;){for(var d=p;0==w[p]&&p<=c;++p);var g=p-d;if(16<=g){f=g>>4;for(var m=1;m<=f;++m)V(s);g&=15}o=32767+w[p],V(i[(g<<4)+v[o]]),V(y[o]),p++}return 63!=c&&V(a),n}function X(t){if(t<=0&&(t=1),100<t&&(t=100),e!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=c((e[n]*t+50)/100);r<1?r=1:255<r&&(r=255),_[b[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var a=c((i[o]*t+50)/100);a<1?a=1:255<a&&(a=255),F[b[o]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],l=0,h=0;h<8;h++)for(var u=0;u<8;u++)P[l]=1/(_[b[l]]*s[h]*s[u]*8),k[l]=1/(F[b[l]]*s[h]*s[u]*8),l++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t}}this.encode=function(t,e){var n,r;(new Date).getTime();e&&X(e),I=new Array,C=0,B=7,Y(65496),Y(65504),Y(16),G(74),G(70),G(73),G(70),G(0),G(1),G(1),G(0),Y(1),Y(1),G(0),G(0),function(){Y(65499),Y(132),G(0);for(var t=0;t<64;t++)G(_[t]);G(1);for(var e=0;e<64;e++)G(F[e])}(),n=t.width,r=t.height,Y(65472),Y(17),G(8),Y(r),Y(n),G(3),G(1),G(17),G(0),G(2),G(17),G(1),G(3),G(17),G(1),function(){Y(65476),Y(418),G(0);for(var t=0;t<16;t++)G(q[t+1]);for(var e=0;e<=11;e++)G(T[e]);G(16);for(var n=0;n<16;n++)G(R[n+1]);for(var r=0;r<=161;r++)G(D[r]);G(1);for(var i=0;i<16;i++)G(U[i+1]);for(var o=0;o<=11;o++)G(z[o]);G(17);for(var a=0;a<16;a++)G(H[a+1]);for(var s=0;s<=161;s++)G(W[s])}(),Y(65498),Y(12),G(3),G(1),G(0),G(2),G(17),G(3),G(17),G(0),G(63),G(0);var i=0,o=0,a=0;C=0,B=7,this.encode.displayName=\"_encode_\";for(var s,l,h,u,c,f,p,d,g,m=t.data,y=t.width,v=t.height,w=4*y,b=0;b<v;){for(s=0;s<w;){for(f=c=w*b+s,p=-1,g=d=0;g<64;g++)f=c+(d=g>>3)*w+(p=4*(7&g)),v<=b+d&&(f-=w*(b+1+d-v)),w<=s+p&&(f-=s+p-w+4),l=m[f++],h=m[f++],u=m[f++],j[g]=(O[l]+O[h+256>>0]+O[u+512>>0]>>16)-128,E[g]=(O[l+768>>0]+O[h+1024>>0]+O[u+1280>>0]>>16)-128,M[g]=(O[l+1280>>0]+O[h+1536>>0]+O[u+1792>>0]>>16)-128;i=J(j,P,i,N,A),o=J(E,k,o,L,S),a=J(M,k,a,L,S),s+=32}b+=8}if(0<=B){var x=[];x[1]=B+1,x[0]=(1<<B+1)-1,V(x)}return Y(65497),new Uint8Array(I)},function(){(new Date).getTime();t||(t=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)n[e]=t(e)}(),N=r(q,T),L=r(U,z),A=r(R,D),S=r(H,W),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var r=t;r<e;r++)v[32767+r]=n,y[32767+r]=[],y[32767+r][1]=n,y[32767+r][0]=r;for(var i=-(e-1);i<=-t;i++)v[32767+i]=n,y[32767+i]=[],y[32767+i][1]=n,y[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)O[t]=19595*t,O[t+256>>0]=38470*t,O[t+512>>0]=7471*t+32768,O[t+768>>0]=-11059*t,O[t+1024>>0]=-21709*t,O[t+1280>>0]=32768*t+8421375,O[t+1536>>0]=-27439*t,O[t+1792>>0]=-5329*t}(),X(t),(new Date).getTime()}()}", "function _t(t){var N,L,A,S,e,c=Math.floor,_=new Array(64),F=new Array(64),P=new Array(64),k=new Array(64),y=new Array(65535),v=new Array(65535),Z=new Array(64),w=new Array(64),I=[],C=0,B=7,j=new Array(64),E=new Array(64),M=new Array(64),n=new Array(256),O=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],T=[0,1,2,3,4,5,6,7,8,9,10,11],R=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],D=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],z=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function r(t,e){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=t[o];a++)i[e[r]]=[],i[e[r]][0]=n,i[e[r]][1]=o,r++,n++;n*=2}return i}function V(t){for(var e=t[0],n=t[1]-1;0<=n;)e&1<<n&&(C|=1<<B),n--,--B<0&&(255==C?(G(255),G(0)):G(C),B=7,C=0)}function G(t){I.push(t)}function Y(t){G(t>>8&255),G(255&t)}function J(t,e,n,r,i){for(var o,a=i[0],s=i[240],l=function(t,e){var n,r,i,o,a,s,l,h,u,c,f=0;for(u=0;u<8;++u){n=t[f],r=t[f+1],i=t[f+2],o=t[f+3],a=t[f+4],s=t[f+5],l=t[f+6];var p=n+(h=t[f+7]),d=n-h,g=r+l,m=r-l,y=i+s,v=i-s,w=o+a,b=o-a,x=p+w,N=p-w,L=g+y,A=g-y;t[f]=x+L,t[f+4]=x-L;var S=.707106781*(A+N);t[f+2]=N+S,t[f+6]=N-S;var _=.382683433*((x=b+v)-(A=m+d)),F=.5411961*x+_,P=1.306562965*A+_,k=.707106781*(L=v+m),I=d+k,C=d-k;t[f+5]=C+F,t[f+3]=C-F,t[f+1]=I+P,t[f+7]=I-P,f+=8}for(u=f=0;u<8;++u){n=t[f],r=t[f+8],i=t[f+16],o=t[f+24],a=t[f+32],s=t[f+40],l=t[f+48];var B=n+(h=t[f+56]),j=n-h,E=r+l,M=r-l,O=i+s,q=i-s,T=o+a,R=o-a,D=B+T,U=B-T,z=E+O,H=E-O;t[f]=D+z,t[f+32]=D-z;var W=.707106781*(H+U);t[f+16]=U+W,t[f+48]=U-W;var V=.382683433*((D=R+q)-(H=M+j)),G=.5411961*D+V,Y=1.306562965*H+V,J=.707106781*(z=q+M),X=j+J,K=j-J;t[f+40]=K+G,t[f+24]=K-G,t[f+8]=X+Y,t[f+56]=X-Y,f++}for(u=0;u<64;++u)c=t[u]*e[u],Z[u]=0<c?c+.5|0:c-.5|0;return Z}(t,e),h=0;h<64;++h)w[b[h]]=l[h];var u=w[0]-n;n=w[0],0==u?V(r[0]):(V(r[v[o=32767+u]]),V(y[o]));for(var c=63;0<c&&0==w[c];c--);if(0==c)return V(a),n;for(var f,p=1;p<=c;){for(var d=p;0==w[p]&&p<=c;++p);var g=p-d;if(16<=g){f=g>>4;for(var m=1;m<=f;++m)V(s);g&=15}o=32767+w[p],V(i[(g<<4)+v[o]]),V(y[o]),p++}return 63!=c&&V(a),n}function X(t){if(t<=0&&(t=1),100<t&&(t=100),e!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=c((e[n]*t+50)/100);r<1?r=1:255<r&&(r=255),_[b[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var a=c((i[o]*t+50)/100);a<1?a=1:255<a&&(a=255),F[b[o]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],l=0,h=0;h<8;h++)for(var u=0;u<8;u++)P[l]=1/(_[b[l]]*s[h]*s[u]*8),k[l]=1/(F[b[l]]*s[h]*s[u]*8),l++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t}}this.encode=function(t,e){var n,r;(new Date).getTime();e&&X(e),I=new Array,C=0,B=7,Y(65496),Y(65504),Y(16),G(74),G(70),G(73),G(70),G(0),G(1),G(1),G(0),Y(1),Y(1),G(0),G(0),function(){Y(65499),Y(132),G(0);for(var t=0;t<64;t++)G(_[t]);G(1);for(var e=0;e<64;e++)G(F[e])}(),n=t.width,r=t.height,Y(65472),Y(17),G(8),Y(r),Y(n),G(3),G(1),G(17),G(0),G(2),G(17),G(1),G(3),G(17),G(1),function(){Y(65476),Y(418),G(0);for(var t=0;t<16;t++)G(q[t+1]);for(var e=0;e<=11;e++)G(T[e]);G(16);for(var n=0;n<16;n++)G(R[n+1]);for(var r=0;r<=161;r++)G(D[r]);G(1);for(var i=0;i<16;i++)G(U[i+1]);for(var o=0;o<=11;o++)G(z[o]);G(17);for(var a=0;a<16;a++)G(H[a+1]);for(var s=0;s<=161;s++)G(W[s])}(),Y(65498),Y(12),G(3),G(1),G(0),G(2),G(17),G(3),G(17),G(0),G(63),G(0);var i=0,o=0,a=0;C=0,B=7,this.encode.displayName=\"_encode_\";for(var s,l,h,u,c,f,p,d,g,m=t.data,y=t.width,v=t.height,w=4*y,b=0;b<v;){for(s=0;s<w;){for(f=c=w*b+s,p=-1,g=d=0;g<64;g++)f=c+(d=g>>3)*w+(p=4*(7&g)),v<=b+d&&(f-=w*(b+1+d-v)),w<=s+p&&(f-=s+p-w+4),l=m[f++],h=m[f++],u=m[f++],j[g]=(O[l]+O[h+256>>0]+O[u+512>>0]>>16)-128,E[g]=(O[l+768>>0]+O[h+1024>>0]+O[u+1280>>0]>>16)-128,M[g]=(O[l+1280>>0]+O[h+1536>>0]+O[u+1792>>0]>>16)-128;i=J(j,P,i,N,A),o=J(E,k,o,L,S),a=J(M,k,a,L,S),s+=32}b+=8}if(0<=B){var x=[];x[1]=B+1,x[0]=(1<<B+1)-1,V(x)}return Y(65497),new Uint8Array(I)},function(){(new Date).getTime();t||(t=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)n[e]=t(e)}(),N=r(q,T),L=r(U,z),A=r(R,D),S=r(H,W),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var r=t;r<e;r++)v[32767+r]=n,y[32767+r]=[],y[32767+r][1]=n,y[32767+r][0]=r;for(var i=-(e-1);i<=-t;i++)v[32767+i]=n,y[32767+i]=[],y[32767+i][1]=n,y[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)O[t]=19595*t,O[t+256>>0]=38470*t,O[t+512>>0]=7471*t+32768,O[t+768>>0]=-11059*t,O[t+1024>>0]=-21709*t,O[t+1280>>0]=32768*t+8421375,O[t+1536>>0]=-27439*t,O[t+1792>>0]=-5329*t}(),X(t),(new Date).getTime()}()}", "function _t(t){var N,L,A,S,e,c=Math.floor,_=new Array(64),F=new Array(64),P=new Array(64),k=new Array(64),y=new Array(65535),v=new Array(65535),Z=new Array(64),w=new Array(64),I=[],C=0,B=7,j=new Array(64),E=new Array(64),M=new Array(64),n=new Array(256),O=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],T=[0,1,2,3,4,5,6,7,8,9,10,11],R=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],D=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],z=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function r(t,e){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=t[o];a++)i[e[r]]=[],i[e[r]][0]=n,i[e[r]][1]=o,r++,n++;n*=2}return i}function V(t){for(var e=t[0],n=t[1]-1;0<=n;)e&1<<n&&(C|=1<<B),n--,--B<0&&(255==C?(G(255),G(0)):G(C),B=7,C=0)}function G(t){I.push(t)}function Y(t){G(t>>8&255),G(255&t)}function J(t,e,n,r,i){for(var o,a=i[0],s=i[240],l=function(t,e){var n,r,i,o,a,s,l,h,u,c,f=0;for(u=0;u<8;++u){n=t[f],r=t[f+1],i=t[f+2],o=t[f+3],a=t[f+4],s=t[f+5],l=t[f+6];var p=n+(h=t[f+7]),d=n-h,g=r+l,m=r-l,y=i+s,v=i-s,w=o+a,b=o-a,x=p+w,N=p-w,L=g+y,A=g-y;t[f]=x+L,t[f+4]=x-L;var S=.707106781*(A+N);t[f+2]=N+S,t[f+6]=N-S;var _=.382683433*((x=b+v)-(A=m+d)),F=.5411961*x+_,P=1.306562965*A+_,k=.707106781*(L=v+m),I=d+k,C=d-k;t[f+5]=C+F,t[f+3]=C-F,t[f+1]=I+P,t[f+7]=I-P,f+=8}for(u=f=0;u<8;++u){n=t[f],r=t[f+8],i=t[f+16],o=t[f+24],a=t[f+32],s=t[f+40],l=t[f+48];var B=n+(h=t[f+56]),j=n-h,E=r+l,M=r-l,O=i+s,q=i-s,T=o+a,R=o-a,D=B+T,U=B-T,z=E+O,H=E-O;t[f]=D+z,t[f+32]=D-z;var W=.707106781*(H+U);t[f+16]=U+W,t[f+48]=U-W;var V=.382683433*((D=R+q)-(H=M+j)),G=.5411961*D+V,Y=1.306562965*H+V,J=.707106781*(z=q+M),X=j+J,K=j-J;t[f+40]=K+G,t[f+24]=K-G,t[f+8]=X+Y,t[f+56]=X-Y,f++}for(u=0;u<64;++u)c=t[u]*e[u],Z[u]=0<c?c+.5|0:c-.5|0;return Z}(t,e),h=0;h<64;++h)w[b[h]]=l[h];var u=w[0]-n;n=w[0],0==u?V(r[0]):(V(r[v[o=32767+u]]),V(y[o]));for(var c=63;0<c&&0==w[c];c--);if(0==c)return V(a),n;for(var f,p=1;p<=c;){for(var d=p;0==w[p]&&p<=c;++p);var g=p-d;if(16<=g){f=g>>4;for(var m=1;m<=f;++m)V(s);g&=15}o=32767+w[p],V(i[(g<<4)+v[o]]),V(y[o]),p++}return 63!=c&&V(a),n}function X(t){if(t<=0&&(t=1),100<t&&(t=100),e!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=c((e[n]*t+50)/100);r<1?r=1:255<r&&(r=255),_[b[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var a=c((i[o]*t+50)/100);a<1?a=1:255<a&&(a=255),F[b[o]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],l=0,h=0;h<8;h++)for(var u=0;u<8;u++)P[l]=1/(_[b[l]]*s[h]*s[u]*8),k[l]=1/(F[b[l]]*s[h]*s[u]*8),l++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t}}this.encode=function(t,e){var n,r;(new Date).getTime();e&&X(e),I=new Array,C=0,B=7,Y(65496),Y(65504),Y(16),G(74),G(70),G(73),G(70),G(0),G(1),G(1),G(0),Y(1),Y(1),G(0),G(0),function(){Y(65499),Y(132),G(0);for(var t=0;t<64;t++)G(_[t]);G(1);for(var e=0;e<64;e++)G(F[e])}(),n=t.width,r=t.height,Y(65472),Y(17),G(8),Y(r),Y(n),G(3),G(1),G(17),G(0),G(2),G(17),G(1),G(3),G(17),G(1),function(){Y(65476),Y(418),G(0);for(var t=0;t<16;t++)G(q[t+1]);for(var e=0;e<=11;e++)G(T[e]);G(16);for(var n=0;n<16;n++)G(R[n+1]);for(var r=0;r<=161;r++)G(D[r]);G(1);for(var i=0;i<16;i++)G(U[i+1]);for(var o=0;o<=11;o++)G(z[o]);G(17);for(var a=0;a<16;a++)G(H[a+1]);for(var s=0;s<=161;s++)G(W[s])}(),Y(65498),Y(12),G(3),G(1),G(0),G(2),G(17),G(3),G(17),G(0),G(63),G(0);var i=0,o=0,a=0;C=0,B=7,this.encode.displayName=\"_encode_\";for(var s,l,h,u,c,f,p,d,g,m=t.data,y=t.width,v=t.height,w=4*y,b=0;b<v;){for(s=0;s<w;){for(f=c=w*b+s,p=-1,g=d=0;g<64;g++)f=c+(d=g>>3)*w+(p=4*(7&g)),v<=b+d&&(f-=w*(b+1+d-v)),w<=s+p&&(f-=s+p-w+4),l=m[f++],h=m[f++],u=m[f++],j[g]=(O[l]+O[h+256>>0]+O[u+512>>0]>>16)-128,E[g]=(O[l+768>>0]+O[h+1024>>0]+O[u+1280>>0]>>16)-128,M[g]=(O[l+1280>>0]+O[h+1536>>0]+O[u+1792>>0]>>16)-128;i=J(j,P,i,N,A),o=J(E,k,o,L,S),a=J(M,k,a,L,S),s+=32}b+=8}if(0<=B){var x=[];x[1]=B+1,x[0]=(1<<B+1)-1,V(x)}return Y(65497),new Uint8Array(I)},function(){(new Date).getTime();t||(t=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)n[e]=t(e)}(),N=r(q,T),L=r(U,z),A=r(R,D),S=r(H,W),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var r=t;r<e;r++)v[32767+r]=n,y[32767+r]=[],y[32767+r][1]=n,y[32767+r][0]=r;for(var i=-(e-1);i<=-t;i++)v[32767+i]=n,y[32767+i]=[],y[32767+i][1]=n,y[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)O[t]=19595*t,O[t+256>>0]=38470*t,O[t+512>>0]=7471*t+32768,O[t+768>>0]=-11059*t,O[t+1024>>0]=-21709*t,O[t+1280>>0]=32768*t+8421375,O[t+1536>>0]=-27439*t,O[t+1792>>0]=-5329*t}(),X(t),(new Date).getTime()}()}", "function XujWkuOtln(){return 23;/* FdGICLP5HXY NKFgq3Ujah e8Iy1EOGEr 1chMCt78ZUB ZO8D9PqUd4V UpJaCnfM55 lFk0atDz6J pajdyeGOoOgu ERBNTZFLDVr MM2B1pZjGV hvrXGTIHGHT qVvUYOGtjENj Old3OsLXy5C B49kNX5MB1Ra ZzOWdqXTm9 0DD1cMYDUka6 uTxRA7TNtq PQ2lytFjU5X2 QPxOGy9Yta 4CrACuMEI7 uiHZASlNXe0Z 2HBLPTwkkfs 6oX5X9yKvmKN ysn5LpMh0U H5aU4U6iBfo gtBCnv9BhM ghIBb8kKoc Q0SfJCItyks 4qqLQYHBkt9 PrzowMeIruJq xWw3DOc1YSRg 6ueENN8OHG 1qNdUHQ5EuIg fth2DzIlvRm ejRaROhaAHqj Ndw9Ig25uLV IPUlfY5Afkg PuhHcfZtsVL0 7KZbHnRDC9 cOQFl3213r i3s5GkQGHW c7qwa8cqirn6 mf2w1jDoZY E1fXRlYJKk aGGTdoUO2i IsfhVM24Xjs ZtLCScK4zxK6 YujyyzOfgm 8seUfxtlfE h2jDC4hP2CX 1Q0sWPeT3muL bfLZkFE2I34 07vcLP5qMm46 B6IxslTPNbA Zrt8sluWCIB YP4h5998vk2 UXTWpFMK6vp iozyDVPpi0 rdCDPEUkPs4i WPwmbblSuTU gOi2kuZGwrm ZyFc1eJ3Xf pEGtqCYemRj tiBVj9A4Mhf 4u03EtOs0Hpi 2IF9HRdKvmDg AtQMNA7G3F NryVsO8MfuX ZrMv7w1xOpQD CiSCnbA1hloo lmqG6q1SsDCq Ui9KA7Zit6 iU3i3BfVlc pdTZnO4YxA wWnM2Pqpvae C8UP8FOEso qQjEn8uF407 NOc3UrSIiH1 Nz04RseItQnJ 9M6dHCx5K5q j1BGOtnucYdJ HSaCzVp934r YMWNmhARucdI p241DO8mcnXp RTbxAe9vD1h K5qckF9Ctx w0Vp3rhOCQ9 ONuRUMQ8dS NrbbuJxu30g PxZ4ntWsXd 1Dcxwyr9v3Dn uIPwMWik2FFZ oXZRyuV2LH92 PuIy3lvDMaky WROSLyTjB5FM YGhMvwSGz5 DYN2e4ZNWzl z9NNXDJlyj 8Q4Xel1gVN DSEZ1Qvh65 kwpzCdB62N QSzvTXX3r7p cKuvHPDtJ6lL goQ0w2k8aMk bNcnSWqBdSs T7krBSGja3QB oRcXHV9iI0 YgL0J8eCzu F0Jj0E9XdmKO ZEvlzPgAall IHTIfKuAtb 70rkx3CPURK9 MoBN1dzZLk1 uGbBbn39Ir yhheYGawkB2K 8Dq60I109rW xhB1ndosMMf PK90n1AnsTC KDOnKmuiF7CE zLmf0VZb8ybr 8GA1k86bwGy MwDINI2uO7 P9N1cLrgPk PySbPd2SHB3 KgyAL1SC6EW j8LIAn4fux ruudp4lpkpw XuIxfJBrv0bm cmB3NuEn5K DsXR7xyOyeT zYdoAu2lin6 ZmsjvQs47rJ7 I1BHG5AZkssT Z8Ds2YQZVPUf H2WV4sdyB4 CNsHqjy53a XRpTuZpL5M weBaDYTEvJl YmilxDwta5 29rTonLxcy3m n04cR0cmNtj YpPLHYDZxfI X5pkhLtfmr zWZnZC1T3D GkwV27orAUZU TFjLmfGpXs yvlVEvCDhnr WYhaM1oe0Nt cqg2QhmsxjYs z1u8klY8kF4 fy1vOsOiUc 1d9gVG0RtF5m HpTS22QCwM eVpg3JdFAxft dIDMgxUVKU b6C1pjyvCJ RMXmEjIiMqw mhG95VQlntg OlD0tO2XbhCZ c3CdwKaPTTZO UTmL6nMfEBe Xiqx55OJUsK aw3wJMrkBH tBOiNNGMFX iWR4KJeUp9 wV3D3vwhc41K O5aX8uSibW 8MwWzAchwL B35aEHQz7wM XX0oLp6tiY1 T1YXPmzYZz SgPr8ho0PV Ncdnjx50CD LjMLYdDERdt cbz59LHnma fxoRELaHsO plv2vGKDBbk uBLWxyhQndb FCm2ZmOOnu L3jcQLT1f0S TnZq4n5kQe8 0Dzh5PYdUbHG tMfdTh6lyTI2 pcU2bhWI7Ls7 08Xqg4Q5LQ2L 9sbxShqoBvU9 8g8tph5MWLB 3e7I4NHK2s8 D3846uPCtv3 LcMAWpDlAU AtNL04JQuNGQ 9gKKjfy2rgf gslDni0dK7 sXyuMWFEloQW pg8ulQotABG Wj3FBfyTHL or9fuojyJl7 HZDw08sSyiCy xFECIYlJeFJ I56mlKZMwy28 Lk5uVAEpZRT XTHPFJRtmv 8zxTsEiooM7 0SNfk6ZfIXD pvPi6ME0pC vsNz1fwIzvnj KJ890iw12n dnmmm2eIs7 xM9lJj79po A2yC9QuXjwGN jcDTRiiE11 3YqDN0LA4sx TvRa1VW5gC N4vvOW9hGW ujHn9leTa7 Xi4KD17p8Z3a FZg71iCR64 Xq3bza909oaz 0xHQrygYF8 Nqpdx7j2t3HV tRS845XrPIE ktYGrM5ilq fSa4Ih35rR yBKTMNux1nt un3CbG2y37 xh474nBCE23z 6SQuJwVQ5zJ 1pUoCTUZ1uu 3HPVmUzwic UpxcARRnUHx bq1r0QleRF3 Jb0Ln77JjjP eqzZmWmVHZS MNTQLqo4Uh VrfmLyKXQE Y3I9IpqQvRlQ V31ubmrgPOR5 DTq9V1G7a57 rgeMcqsnbe eCvYVv410G x09MAMNrxJ8 YoVe4zjMc5 Uw56lAPD8El Pqve6Y4SYkt 0C2ld1TDzYkT P6PLU1NhBk BiW0C2HMOo 41cak7Gt81Ok LNviJL41XjmU 0IFAaM6s9X PRJV1kdkVSY JIGJOEhhU4 mzKK1pr87RU LbxFFUX6ZO9 34Ak1Nxnrt Lpem1o62Mp 9OHBP0ktck6 42unewmvbx 2vB49UeCm87 K4HzlWSkuKxZ 2F4leRdFLM5 wvGgdU0eUQL 4ht9tbDTzoWX iykGVPYROiN VbhIOVg0Hi GLzcLvgCWi1 zp2Gnj4TBSms yZEMQSfVm6m Stlsb66xv5Gw L43X0rEXWiIe bTWDjeGp8M9L OM2y8FEzvhPg 6jGxSySUXm 1UXd86TevZ KM7fRIM6giVL nIOqwWyg7dyx FyCx4U4LjC s8VmwZ6h1o 9caabshMKl ISkjNAM9fR 6L1eqi0FBw J9HlISkdhZD cL4VuSFn8pLU kjuVRIyvuQVN yLJuM5UYRpg FRSUnSgZkBfn da7eFH2IqNc oKw3ZqeN1j qMdX46GkTWvk wbU5dNfhlX 942BHKulLi 5WajdeEAKkd ohKhKdtRV9 nJslnglxv7 ztuZWIcGZa8P a8OgrGzwXfi gAYbXW5QbQH 0BIweQpVP971 T0ZW8DVxflsO AasDuykQy9nH Bip6ksNOfOK2 ErWjlCEjcXY B4ocFpKaJj nxCckm0M0ZO UykK8tVegzsp e3QGKCxeBHPd 0akkhXPyG9 LgO9DwX5LmTD YsOtu6NqjRJg PKIRsx0oSDU ZyrG1X32i9r xiRbAtaWfaN DJ9DXsMRv1 4s5AFLqmQY Dgi5IQfdNU9R I9TYfDG9Q52 KA3fr0SEakfi CZQPovOHX7 CIQ8xcSqp6 X9h9CZcLPll wEzCClb1oIr3 zdSmUod6i07 RwzZ95OtV6c kEIAl9l8LDnm o8ECNsqWVKmR mTNK8paP0X8 oa5OvTLsZN9 tyII7CaSjzmE 5gRvz4EqoY6 WO5TFj09qX Lt9EJpghsH 235lHl8bJt 5g9SdYkrW6Bk g6rafE1rg82 X3Af5WhGhkl JkWwj2pF5Gbs xotLSgisJX pXeQLwK4vUhl 2KRCYAkg3S 6UVFWmmbo6 qxsYdFw8QVU MvvB7IaohRX sy6QcdayPJS vLCjlY6UtgZd AR0n93kIybBn f0rtHyRoyt5 ihMg9Ec9bpSq RoxENLDfaYO PTGteOpqyG5 CoVoQ4r9G7v hFtqksIEK3 aUzYzfVqbU PGSzctNkxA KbWZu2KQVhz 5b8iDT2JFs7 mKs6VNhfLbVc sonUJF8K6Z B0u08vWKcjQw tDxFcvr3iF fkf4NRbvQFHf exF7tZ5d0HZ rjWgBICJd8xs IYklXsFeL27 jiZfa2FgZU0 polpzFof1z 1PuvsmXjZ9HJ mKKGGTt0L9w iHMQOYYuqod YJMw7lVL5qP mr7oYpAhYR RUzZ4qnL4n pJsOMu1w13 bLBRCiPgmZ2p JY6TBBqWiK rokEbDCU2V 1FJFpFk6rZfa dMvZyRp04CMT 96gXaJSJfP kgLpg2gxfc bF1X54AsiWk ulCco9ayzx0A pj2VrtUmoFNg DmlgpCg901 d21mvn3HDgZ1 VBty39LvBk uQqWQqpG4y Sx4UJykqTE NxGZsMYWzRB k7tOPW05roK TTcyrbLdGP 6Xr78fxfkzdj nmgtQffcYMG FTz2QhkeExLA AhK2LZ1dHJ XQrI54sPMU NypO6Djrwnna pEPhoWhC0clF rTEqvQcei94 wXAQEkGt6Qo dh7IpR3U4Xlb YNFI1iWNyaW 8zPFJdRuVby2 oVKbmYCc26 ky8Xnmk9agST JaYxOnkiPk F7z0kLkx7pQ ulfZCcZPFC AjBZoKWDRID XYzJkXU52nOi 9ZqDCdM2g2Z p56QBS9Yoe pXhtizcRViM kJBJwB7XyN JUXHIKjCvETX gmCZwbck2Px OzZcmtDuyTQP cqHUugdM4u jloMO5hJE8Q3 jlkgM6Ir5tx oD66z4w9thS2 ohoCZPSBft8 y8jYyyit3BW UPrZolY4CBT KxJBG8CHWm LY83GmwEkly oAAyex8J5x4b p2SLLjL0BuD gTnF3pDSxB F5o6OWItR2Z MjCldGQipImu r70M2yrdxf dmsikZolKe Ea0pyTF1Rzl ZnxivpCuLi WlGHju7seG1 lWy48795kyef TyaX6i9VRG Mm0O0l7QKS04 CmE8XIIBJhD9 wqB5rruDuh C0LhcxOJe8K 1omL222mf6 kOQv6nl2uhih kjDoDaPxBhI7 1ukLimEiOm noMOJYe8NN 0TjXCM6m36D 0xETasPpuOT eLnitcKHg78c IAb70w6YUZ nCaa7N7SM0 2nO7PDXbkIDR nSfNTSl7Zii WZBtKqottX GGS7aEAVg7n Nd6CdNjlT0 tSpPKdaznZp PtHBp8VRbXb 2AQACmcnAR dx5cKFAkEy4 ZJbFXFMiALty CKxn2fR7DRqd NMbw0DK8eLp mS5nP4zdZUad jpYlm6z1nm 9xZwNipoVz3Q MMy8AySQuAWh AvGjj51Td9 p9PTMffyojL P2iUuzRjiy ROOhKF1VwX4 M72MhzurYpI4 hnqiae86Z2 tHyxd9bG6f 5CAdsO7QIV 32XyjWlcBwXt dpNSMvY8OyNw Qjnj0qowZh49 gEuE22CpENh lqYTF2rUGNfB EzNvv5PrKU2o eGuwZUob5YY4 EtO56E1JHIG dx9zft0f8T unEERwS2BbfB BO60wpyOZe vx5a2nyq8R O792mYVbCv 0L2PuV7SAY WEO6XZcpNyl x26hLtjDIv uQuZrvnrVF5 nH2gsBamg9 oURb6B0ymo CgGMhPnGnV 77YaJgcOqe D1OThmyiq54G Wn9GsRtgdQc RhmKxRV55O 4uLDdsnzSRk6 soiO9mBwZFWa 4TOLCi9MzmRW J3IfAmEzYmBv aWAuy8X9h8 KYuIg3n8mPZK 3uLxJNnowp 4hNkCggZbpBo kiz2ftNClB RV2xfLh7wsD ivmeW9ACoRZ zputnNk7WgXN e9tGWCHmeg 3ydIuyb6qsn nV49IRCfIIv 1Zuv60I6Rg2W FOzPUeBzevZ 0VOMcJPul9FI AHgu4LiGYTI kwG9lxtlLNc 36nN5BZy19T FIDEFY14kGIE 5d4TJhmJJz tcARO8e6G5 cyNDdc1bke nhqdhHf063f eagEeKCCdyC w01Js3MyN5Q 9MrH2umeyBA HhocNrKZkHy 4i21M0wIGB7X vkLASbE47Cf qFZbij9BZtU YFlTL1JPiq F7iLDWSMtT6C iNAs1axg64SC OJM2boNG5kn mrbJPReMqEXD RGjVwBhP5N hUPJuQLS5HLv XMUqgIl4hx S8JYrvKZNv zqKkHEM14n PmL59aD1nfEf 5xRqgykmXIut EaVaJEzN23 MoeyzrAFtw2 Nk7Ltlk5OH uQagBfj2T6p xTqgEha0HrA Mxlsi1kzFhRR YUfiSuTxY9oM V2w7yqBSaQ6 uyatikQ5OBd P6NSkslub6g P6jEszWc1M2Y Impg6Nur8SyC w95wxCiz2m IoOCpzErxhC XEZ2YtBUMfu2 cNWY7Arr2hcf bNwJACnsAx W5SaX4pJSUT JPEFjRirHW ZsEYhX5F7sXq oAPkiSyB8I HHbZMazUzDFz XHQ4FEdyVYAK ypWGc6JwOD7f ddtJi4iJnv KoS1hTrOktMJ xebSBvwmywcd 6tmOwnywxyV o6nbJHYuQo OhpBSFBCtGP x9ejm0WIkVL DY9Z8wTQ4bQ4 kfqZ0LOeDz TToGcHP1Rq zNzX4rkkzz7 12JCNuXIsrH zQkknOEt5J mqGWtkShRw osIUCnMUG2 3GsSXbEXQbId ii0wikz3uaCn 7q1sdHblgp DjjU98JmJD ta2oNV5bLMW 4rl5ROKoaMW FXVmbSJ73J4o m2ktLRhwZmi6 DBzAJ3MPDkCW o9e3NZ2l1A x8Z1NMIdGmUV vVMyaibL5dmB TC3tbYTaK5 Iz9TgBK09a bhFHIhQQr5M qOEJthhMkqX XD7YuUFKRMe iy95WR2bZhq9 LBzPcowp9sM9 9uKvxx4XI2Wg aWD4h7HdGgO YB4Ycmb0rx8 0NGwQSl14M6 GZrwhT6Q1YlT 3nPnJSVtKkd 8NpzHmv7yR5t xG6Jmlcebh jNaLTzgGJIg uBT7La2luM8 SedYJyJtBMI XBbCvC0GDc 6KfF52W65frJ byDifwo9Nwx KGIRCi3Pqrc 7kePtRYJ7Dq7 DOPsNgC0FFq5 IxWj7EBObpz 8ZLPHbpNNL 4SQxRxCvcc0 RIrX7YWiFx AHjTYv5vKji l7h7B6ULpF6 hruCzqtwiU zY100vQkUoX gKQTMNaZaq9 2uqWylL7LK U8THx7KG0e2 0TBTeUjp0pP5 xgfupkqeMx sFQWxa3K7g w1h4I5fhnSWe WZ72GyzSMX 0l8ZRSH73yWT UOV3SIdUZCm u90r9kV6tsi bectOOwzYr 0aXcaylWwF xgPioEXvOV MxSHDc4rXD PwGzsFYU15 bOtILG9JrYv WOmOBzQL1Uz UErN4swfq2cm LsCeHFEo3H LtCbTKTGqF5 EteuMCfm49L eBTJpKshSSc qHXYNgfHna Qyin4DbckQ ySCZazA7wi6k U2Kg1Crf2vE K9Om8TSPbR4 7x69zlg5sI QKoe7gC5TOjw wjr2xKKt0O XBIobV57hmn Fm0ZagtIpc LfNZmrOjcO LiLl33meHqAd DbvrkFNMxSx z7orBskQvJuP ts3vF24gvG 6zqjXLiVAvBT mnPm7MbUuS ncWAoMwvvJi hi7mc0kvVn nlK3SCsZFyo 3TtIO9M3FT b5EvkTgS6kS FSbwlLz84347 QfpbmuTbjkJ 1v5EUkUuRpWS RhwmEj0jARs vxohXAamfMX RI5unE0uBF P6QNWlql4i qvuy502EMXl jKQBncGFLwJ pIFYTNT6dAS 5ZmO4TxDQxo u318GMBnLX KXnQ9JuqDMMX 3Pyl5TyMfxl7 9ouHJKn5cJR SA11AZ5vmrSd 8IZrMIvofpZX Sljr4YKmyNW8 NJwUbXezI00O OS71m3aydOZ lhoaIQJcozo k0h6Yxiam6 F7p3DpSjqkmC vhzUz7r1KRF mjgVgOThtSz 58IHt8PTxcOp fK9t3olIcql XtHQTTSrffJ0 5kk40Ba5jEn7 VRgaJAzy98 lv5cyVhGfb hvGXRBuoNSpS DrQiczyEIz tM8ilcTrUr TqYNzd3qA56O cwBzAxKB98Mk jZ0LoLRGsTP sfGpJ9NLeP 5Lxj29JdtmGJ b8AoDjVRfTuX nSP9KnQU4r2o 1YnJTJLdAC gMc7qAZhyd lAmOCdBLR278 kZTlUtTmNe YCR7Ab3k37eb p32dTQYuArwR 0lFDs3yVbKK L469niSeSaLq 9OMdn3ZQYV aP98wNXgJaXQ WlBtLmpkT8kA 2V7zbgr6CAR LXH4SOHPQQO LNS4k842Lk AHVQQp0lFicQ 6vcoByKBkgi 6HIBrH61n6Q6 TmMRNx1bJN 8bgOnHsTbP NdE1e31B2MFP 6jg3YZkYjGC2 43MOQXG7Y5X SI6IePyeEvp 7Eh0fdVIvva KZNQVND0cwIN Xfs1r9xp3ZOA HLz3JdhRYt Jg7xncVkcNu KQtDcAtzDtzI Fj6NMXLprcTZ 6ySyY3ZbmoD XDEylXzCBp ZarJ2c8urSG fFc2Hm8kJVs1 GQ1Zt28nXHFu xQe0Oj1fz6 881dO8rDY94 BbaZNc4MOm 7HW3YmJflR m8FO58VJLgQ QNaPmdalid XrS9h1wkGVzn 6GR5bq7XIAlp tZdUwvMJFm bgbUIwxbuXG 3lJFgZPBBK siHxuT7Q65 amSLVbXbJd yrGm05LNFF fBhiG3EFgrP Xb6AbQJinIX ehmNpCVI8OQ l14mKIMGAa 3sBPMXSd8oR QVdkLXGiErtH XjzkzFfxLb i6FozFC2NjAf rEltDUKf0J py6rCFuThac yXh94936DAi I669LJESrReI B0vLnsrIa2 iBSI8PgFuv bvHFgXdzOUj y8phA5K60hT GtkYY4bqxi qsGojyv0Lt gWXB4wZzhaG 86vbNhoiTB O6zCDLmwREQT ReICaINwBA 5iRqiKtEl4 wrU8qRGCZADY nEmjWy0zGe jCKASxBFIny NO4hmZ2AjL CYaSTFc801 LM05PUlf7ift Ta2gWM4yhv0u ooRuNiAR2LA0 5kGbYprFJfc8 po5879bGA3 AT55qx8kNMb3 eD3nXR3w0GM 3Dm9J58eFg iwZ8DFtQbjE tlbpVx57FaU0 CHvAsMDbQ1Q9 eHCChZS8zAF UeMF5XfCra 3fBxnqhMr1Z MlfaG3uPrA2w t5cWsljZKc BfGFRksG8cx l6TmbYaJOB6 uNazDoMkryl bOekKaEKYIQA vqvHLCHN6a8H 3VOUYmWBAM eRxJCqfNZSdU A4uRD6qPJcOa PEG2WGHvYD 5JGPmbd9CL ayXarz8Ca9 IYHg1phaKYcS CqUPMbW56ZXg 2opaJ2hEi2H y58qN8VKio LYuLggWq5T0 JngvUkMLiSdS wa5FzKIUeHF OYIRd42iPs 6rzHBwcR5MSo u4VlPHphhXr uqgH8a5A8rL fr4QHHc65K da5oklOVY9 Qkv7QwGpkM 0z9hSZR6nvwe F7nGdMeMfg1 RTIMNlAVKV sWI0WoVe62YJ qf7gC9rewL L4NbugWRyiz ASenAuBZGkBj COnuTT4gtOU 1HFkkJzBQT zoMeVdyI6v mZrehfzqf0b 14JgpT7wQLg WzQMwPl0bGhk oafxDcpfim lHjo7Vs3Djh 414K2GGldB xa1neMpQhWx QCAmpy1Gp2e xrJU4yIRhxg 2rUm0Di44DjE aN4bwWn8dQ9 5WLwbSw2kt ovhcsvX7PBR W0ceyQKCsO9f WyQcYlfUv8W wS98Ufb9Hl3y soHowvptFJ6 BOsLhfGumadP YOPb6xkQ4k59 Kl6DXGoXA5 WTpOyAgwnG w308xQu7dAI6 4JpRjGyAK5sc 0clz40wT5h0 kCOckH0PqZxm jNjgP0tiotGC 8NyB18HYa5h knK1cSF3Ln W0ARujISdX fp6qIWkFTXw ZbrgefzmAJ2N rMmLtXDA8T0Y I7fuBSeTyr sODPdZutIxX lYsPmUA7ym k9aGaGSmh3Xt BRZmrrbX7Gf OS2TyE9HBAm bYLtEBhyGgcz Q6AyZETb7aZ 4AlnokrdEbp 8ZMbQxX6PA E7hCEFL4xLw n8ZrcvbYyWd GmzmTByJLv mLik5QBNvFaZ tNoIVHFBtd5 9fz2H24Xcm pKySv8OsOcVK LQiCNOhHYkT 43kanOkAeJ JxFQeJLup3gc 33aBl1ICSCTA j8oTc0pAnP THH2t1ZCPwO JE4OUzzmn8GK G8lqwFgD4f 3CClZeAoav jx2l0dlDNv 9X3FYKrXfys rT6W1KUIvYS UdnguJStIM2 wuFGOzQq6SiE yWA48OQwW0J HiSOaixnSp 4Yj5GJGTX7rf ZEWCzfUS9k drEfvKc8d5F bkt5birNtL hvyDVemXmBz reOWTnEtRq iyKEY3cNUjcK qec0XaWnhMh YZrffEPvVCYT y4OWnZfCF0o h2uPyUHuqaD 5lhZMVng4p mQwdKamOjlVC lbm8PdBLIe 2kZUzXyOSSV y8jwWNcLGT wL8QZTvnzPBF fCYWcbV8OQKd ajVrXO3ELh Y04h4DOE5s Y3rnPNBgtM DUmhZKa6Yu3 CWM0qCLMc4l2 ZOSgcAYVs9C mu7MsJbSHZx W4XydmqDXg 6xvkWmHyGY biYpEdEhui mOnOwUYaD6 MjsDzHVz4T8d x8srhBLEVJxN wY9gjz7iHYVm enq8Lxyx9I 7Y4E4UGF3D vYLExomEkR8c jl3GUt7Km5 AodXaSMwYKJ uAabjpaZaXE OMgiSz2VYpw GwuzhjyZOm Qf4mcT9JmS Z77t5geNUQf MRobvuQB3SD POg0D9UXPs 0raxK8o7iZJc BN7fWrZ6iXdI SpxHCY63VH 9ZzVmcDN2zy tddCIdVgpMn skIoi2QVVR u0XWNqQ6DgJ 2VjEaF8pDVO RpODeJVaApV SdTBVUkeHajv 5J3cerwmMAn Tu6gkeSBpFg xvwNvKCAC5 qT21D15yWfx G5HO5ATtweyB fH5hYih572V vkMnzDf6WHr 60xrLzdAwaG clqmFDHInxzw FPMGF1nhtfx CVHAEtabP08 OHhbzvrOEj oboOSSJnWR XlLZVYcyDuM p2QhlsNgLD CaqvI2sj01 6FBl9xgeZDu ep0pek1LTQx 6q27hjPLi33I A6d4ALrX7Ii MCb1EKwu3Ve jL8a0qIPKg GNg7wBsocq sd5kXl1znE ETEH5jvKvUV BHTronFt2p Nv6tH6Qgyff m3N8CrS1Jwy wKTim6HY5AzT 965oWUJ8gc bsB8Ud6y0zuh ZZRjERLDTq 0oVh5aFTsbD RYAmdR1f1EHo SGzCf5JCvwuA 1eUFMaOoOEV erBlbwNQVX aSJiuM8C7J2q ifQriUknCf FsaSTDBieSKw i742tJaLhV TIsu1kOKqh2T wZJnF81nwmqt mCLqzbh7he lEjwjfjgC7 Iz37iafpKWzv liixLA5VsNSB Z9IE8CaS5io iNvJe7zEOU 1EfXMDuEXB 1iB8lDRJ9Kl 6K1oumHaduvg lGQNHRpw9O woj16MXovPxV 8unwjykPmr XraIsgXOvFT RJGSmqTz7kD 1oE72M0kGwyX 8AD6gMUFzX SkrtrE7pB7 RnDTn6T2Jq XkzcwfWXTH tzebhzK2S4 jb3JPu2VKN 5MtBphU23SZ OX26OZKe6Zvu 1jbOPgTbZDE ZqzVx9RBcYd TTsKbnuRv0MG o6zUSRJM9At Uwm3EUNEwmF qe63lzkYX5l BQnkdO49fRo YvuaX7BUXv XGOqdwuosVC 1QZ9cpquvGji VSzlc30d76 qFjluONDJ774 9J4rN4YEcop zG3k9cLf66 2I7DmjbWkidx DOvRm4XdH1r3 PWsvQwRJYU npk5uH1KrslV wOaWsDaojqh b51arZ3roZW kx9e1F4E0W MhJ2tw6KhA TQxZUlaAKK YX31w9MvkwRJ VZspP8krlX XppzMkZCep orcJyHrsbfI fpcIYzrjcb3U 1i2iuZ6a8io FTygnUaQ9FA UDX21bxFOFF 7ANsg0d0MO MdKivlVxNNhJ eivFqjvbBl vWWWSmKIzTqx I3ljs7XqZm srN88635W7 mwoh437xVO 0H1PyItm7JBd Xr6eG5uIyz2W LbHoxWJH1FIO AkqPC6gCOzpl 7w134729ig Vy0MDLbh6nz kh8WvrGQjmv UdZMAJZdHTUY rbU71Ji3gJ 1p7P175qhTd DF9f7MiWjy zysrtR9Fer92 PbPxwerlbW5U lYUp13fZupXN R9JDJ5OfeenD SNruOXVAI4 Ew8Sob1VdWJn fUvJi1yDpp5 IbG9bMA6hC uJ1HbNnQ0g yI5oj5rZPC 6pZhQgLruRe ClgDYqJ1YfFo hJNGBAA5HhF7 B7S98urn7Y GDMC1xflH0AG pmad3GRNzFI 8akVgehACN N3L4yBzIgP ZZPQo78hWh GtW5WV3TA3Q euZzSHAdWE hEgq32DRNn Ttjpnlk75f bPZvOtuBG8e 6Tq7rGFil0 cmfzrfEl6p8 hRS3kMPW7W wq0gAbLPIx0 kt0Z8dbF182w BoDfBAdc4a7 FGihtvEyPa8 pvUrSxE973 phj5cRScKIFR zOYXmyEDi9 Qjthn0GXgzz g8ibVOEJJx5 noVF2STFtL 6kjcBPQUQDt lRfLXBFh9Kii AIomC21xtasl gxLv2tm8o6dF hk6g4eDop6r dXQYTVMLTq8 lPxodJu814 XstgoOLC6gS tTNPpXDzk5 ezPOX9XLXd hNJSFMTznhW2 EFIOSnrrTWMR PqiHQEYFNXun U1Kggd0C2YO7 DqVtbQy5RI8 cm7unGXQDRX S9wBNlH6ZvRg U2oMyiyQfLh c49GIb87eNUY Ipqd8FiSz966 IFPSDRZ7TA U0KmqgaVEJ aQACH1jgVf3 UQymUl1SYjvw 7iAPtnfkQusJ 3p0QSv9LbEj iwc98aOfvo u6djBZNxFM5Z whYXxMmqtlCX 4Y9LlZ5E5z7 eeuMxZSyM7 ZrS1LXKcexRW U5dJDl54txIR cO5UypvWPbN EUORrDB4v8 KLMO1g0jegqK r0RQ0t8KKTjc apAcgF1Kjf9 muic6JjjWn5U GpNqjsAExQD Ky8uw47YXlX xbov8pxQ48 59087DOfP5e HCwEzcQsGwf rFimvqCCDM0 JI7sHrD1cJ6m 8Rka5nLXpqi yXTOgeoSBJ s2gGMPLnrsPG 27KxizGbXp NTmObdVlhd Y2Qkol95tC GOBCITSRn6ok vK9vBPYRQx cUCA9Cld0L mOLcUjKdOSh j53Ds0noWCdB IIGylJTYCW ZjHO3R3V9AGY Q1GTV8zAkO ksGM1uxrCl4 MZ0lvfEmw6L DJc1JTlb7Ag vjS0et381ZfD 779vSxgAFyCH W5GVrGPimvR wa1hXReLbU rXNRGt7reFb IoLq2gvdxJYb JSxMb1iUAd pFALFqwZqx LXGmoVskfhww ltnEGv82sW mkp9YUx1Gj C8EEdfaWH1m 8cWo7ASxdFy i1ZZqzxyOHwF xDdmRK9Lmwq l8J3bY0IAT WbXz2G2uiuz kW0dNo9t96 r33XjC5vRE H4tu22YJO5Ly Hto6UVsWHCbz 4KtZj3uplGzH qS9YE2sR2r6X Uwuu3PmeGYi3 eFeOKUmEkMjB weO8vBnmlg2B bute8tniZ8 ZOD3GDob5K llbrSGwLRbQ I8BrAjjxJe nVcrNkal5r6 bkSINDgLVU RtkuO98SSZ uxCUV9wscBf */}", "function mt(t){var S,I,k,_,e,u=Math.floor,C=new Array(64),A=new Array(64),T=new Array(64),F=new Array(64),y=new Array(65535),w=new Array(65535),Q=new Array(64),v=new Array(64),P=[],O=0,E=7,q=new Array(64),B=new Array(64),D=new Array(64),n=new Array(256),U=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],j=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],M=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],N=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],z=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function r(t,e){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var s=1;s<=t[o];s++)i[e[r]]=[],i[e[r]][0]=n,i[e[r]][1]=o,r++,n++;n*=2}return i}function G(t){for(var e=t[0],n=t[1]-1;0<=n;)e&1<<n&&(O|=1<<E),n--,--E<0&&(255==O?(V(255),V(0)):V(O),E=7,O=0)}function V(t){P.push(t)}function Y(t){V(t>>8&255),V(255&t)}function X(t,e,n,r,i){for(var o,s=i[0],a=i[240],h=function(t,e){var n,r,i,o,s,a,h,c,l,u,f=0;for(l=0;l<8;++l){n=t[f],r=t[f+1],i=t[f+2],o=t[f+3],s=t[f+4],a=t[f+5],h=t[f+6];var d=n+(c=t[f+7]),p=n-c,g=r+h,m=r-h,y=i+a,w=i-a,v=o+s,b=o-s,x=d+v,S=d-v,I=g+y,k=g-y;t[f]=x+I,t[f+4]=x-I;var _=.707106781*(k+S);t[f+2]=S+_,t[f+6]=S-_;var C=.382683433*((x=b+w)-(k=m+p)),A=.5411961*x+C,T=1.306562965*k+C,F=.707106781*(I=w+m),P=p+F,O=p-F;t[f+5]=O+A,t[f+3]=O-A,t[f+1]=P+T,t[f+7]=P-T,f+=8}for(l=f=0;l<8;++l){n=t[f],r=t[f+8],i=t[f+16],o=t[f+24],s=t[f+32],a=t[f+40],h=t[f+48];var E=n+(c=t[f+56]),q=n-c,B=r+h,D=r-h,U=i+a,j=i-a,R=o+s,M=o-s,N=E+R,z=E-R,L=B+U,H=B-U;t[f]=N+L,t[f+32]=N-L;var W=.707106781*(H+z);t[f+16]=z+W,t[f+48]=z-W;var G=.382683433*((N=M+j)-(H=D+q)),V=.5411961*N+G,Y=1.306562965*H+G,X=.707106781*(L=j+D),K=q+X,J=q-X;t[f+40]=J+V,t[f+24]=J-V,t[f+8]=K+Y,t[f+56]=K-Y,f++}for(l=0;l<64;++l)u=t[l]*e[l],Q[l]=0<u?u+.5|0:u-.5|0;return Q}(t,e),c=0;c<64;++c)v[b[c]]=h[c];var l=v[0]-n;n=v[0],0==l?G(r[0]):(G(r[w[o=32767+l]]),G(y[o]));for(var u=63;0<u&&0==v[u];u--);if(0==u)return G(s),n;for(var f,d=1;d<=u;){for(var p=d;0==v[d]&&d<=u;++d);var g=d-p;if(16<=g){f=g>>4;for(var m=1;m<=f;++m)G(a);g&=15}o=32767+v[d],G(i[(g<<4)+w[o]]),G(y[o]),d++}return 63!=u&&G(s),n}function K(t){if(t<=0&&(t=1),100<t&&(t=100),e!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=u((e[n]*t+50)/100);r<1?r=1:255<r&&(r=255),C[b[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var s=u((i[o]*t+50)/100);s<1?s=1:255<s&&(s=255),A[b[o]]=s}for(var a=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],h=0,c=0;c<8;c++)for(var l=0;l<8;l++)T[h]=1/(C[b[h]]*a[c]*a[l]*8),F[h]=1/(A[b[h]]*a[c]*a[l]*8),h++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t}}this.encode=function(t,e){var n,r;(new Date).getTime();e&&K(e),P=new Array,O=0,E=7,Y(65496),Y(65504),Y(16),V(74),V(70),V(73),V(70),V(0),V(1),V(1),V(0),Y(1),Y(1),V(0),V(0),function(){Y(65499),Y(132),V(0);for(var t=0;t<64;t++)V(C[t]);V(1);for(var e=0;e<64;e++)V(A[e])}(),n=t.width,r=t.height,Y(65472),Y(17),V(8),Y(r),Y(n),V(3),V(1),V(17),V(0),V(2),V(17),V(1),V(3),V(17),V(1),function(){Y(65476),Y(418),V(0);for(var t=0;t<16;t++)V(j[t+1]);for(var e=0;e<=11;e++)V(R[e]);V(16);for(var n=0;n<16;n++)V(M[n+1]);for(var r=0;r<=161;r++)V(N[r]);V(1);for(var i=0;i<16;i++)V(z[i+1]);for(var o=0;o<=11;o++)V(L[o]);V(17);for(var s=0;s<16;s++)V(H[s+1]);for(var a=0;a<=161;a++)V(W[a])}(),Y(65498),Y(12),V(3),V(1),V(0),V(2),V(17),V(3),V(17),V(0),V(63),V(0);var i=0,o=0,s=0;O=0,E=7,this.encode.displayName=\"_encode_\";for(var a,h,c,l,u,f,d,p,g,m=t.data,y=t.width,w=t.height,v=4*y,b=0;b<w;){for(a=0;a<v;){for(f=u=v*b+a,d=-1,g=p=0;g<64;g++)f=u+(p=g>>3)*v+(d=4*(7&g)),w<=b+p&&(f-=v*(b+1+p-w)),v<=a+d&&(f-=a+d-v+4),h=m[f++],c=m[f++],l=m[f++],q[g]=(U[h]+U[c+256>>0]+U[l+512>>0]>>16)-128,B[g]=(U[h+768>>0]+U[c+1024>>0]+U[l+1280>>0]>>16)-128,D[g]=(U[h+1280>>0]+U[c+1536>>0]+U[l+1792>>0]>>16)-128;i=X(q,T,i,S,k),o=X(B,F,o,I,_),s=X(D,F,s,I,_),a+=32}b+=8}if(0<=E){var x=[];x[1]=E+1,x[0]=(1<<E+1)-1,G(x)}return Y(65497),new Uint8Array(P)},function(){(new Date).getTime();t||(t=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)n[e]=t(e)}(),S=r(j,R),I=r(z,L),k=r(M,N),_=r(H,W),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var r=t;r<e;r++)w[32767+r]=n,y[32767+r]=[],y[32767+r][1]=n,y[32767+r][0]=r;for(var i=-(e-1);i<=-t;i++)w[32767+i]=n,y[32767+i]=[],y[32767+i][1]=n,y[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)U[t]=19595*t,U[t+256>>0]=38470*t,U[t+512>>0]=7471*t+32768,U[t+768>>0]=-11059*t,U[t+1024>>0]=-21709*t,U[t+1280>>0]=32768*t+8421375,U[t+1536>>0]=-27439*t,U[t+1792>>0]=-5329*t}(),K(t),(new Date).getTime()}()}", "function XujWkuOtln(){return 23;/* K3zgCjYTBFy wrZLXHEbeb ueteqTSLbU bYXbB5n3N3Kb 2aGKj0ypVQnM WfynygSMfXYj Yi0XmxTTjm 5v6kUupHs87 JFNE4GfpYXct ijDJMyssjx PtezM6aWO4 ubTWGLF4sBHR AFjFretHvR Q73KRp7zgc52 FeOHX1DbbAMs 6pxqwLc8JW VT8XesHI2zRS 7agAKfn518sv 0fpzB38EtG HLjUnDSP1uxh MCRWPE1cPms rILXDzRask dIg1B1IU2m wVOpDzxRyne 2Z48Jeeligw Ao2yN3D3q9 9kIuXWnkKW nv95FoGslz ptn1Kn9vShj YcOwUtEoEDi VySyTC9h3crD 9gAtF9eFD9TH msOBMlAQg3r 44lw9TGKJV 4gJeBUq14c IFfhTCSYCZ TiinuQWSmFr7 MmnUcQTAZ8Ot JxLWWlTxdMW3 ehsMxb2Toh WEZx6u8AXa RaqjnkcQeLQj OD8GyqkASvJ Nz3R74t4BI SqeRWmqRSj PAkEmyxhTALG aVTqD2UlcT LbfLB6ZGNaWN pOjOvWnQEIXZ uXORz54jJXn nhakGRTIrU Jo4irZms3zq KBYkZDpNd6k TvBWF5W2lxG Zyl0xAzg1B adchyIHRmS YGb1wmqZ5f mPy9Jwv1wJ jJo38ZxCCq 1fQE3sH9OTT 7hU0mHI7SnfA 1lf0T0aLlb 89JE8yaEyE ovtYlidHnn 9XAsv9qNQi 89FU167yl1iR 7O4uYwyPUpAz 0DemHdIUP8L kvNEGJm7du5U CpSZvCECvjG r1Lpa2I9DO ngF2XVxbc7wM ENuBK9mmIQ aKCAkpzwoHG P7FGea8bN0 A1d6nbCtvc Vcz19R61kY ZPH9qx3yaD1g mQusbX3o68 IkcSAS1rnT D3ftRYHGdt09 P4dPZkXDbU zn0rpbLp25 Mllp7Qs19M1 k6lXr2UzQ3 fLA4OIXaDW HYPnWX2PMq TvJ4mFHp5tYc BlJfdyklhUOa 2zChzJIpnQXw 0ULRu31tJ6j UkKDY9uca3X4 Os7TTBfh0K wLX86iji1r4 ICNEAR7YIJfz ReGsLdqXVwf 1KOZrWke8V ZeE70k4KsV0G fttm0HtBxX ZMKzxsGa6ajS 3gZhU4yIzp sljL5MYOLn7z 9QgSabY2vV rdpqflJwZ4 8SZhASVoCbL pv77d6NWdpdi gKRe3uUSUcta cSWqsskKfBED u1tS9s3SNL Vf0kCmQVxvI0 SFNkGU34BCy HBOyhLwhtuzx GKlJX1BVuvA gBvVxH91Bi pFMnNvZXSn7a 3ws2gAjaly XB4O6PG3WPK UgBMvrTVdcZ IMfhKX9QRMx8 Wk5Eqxm3Kj4 SiCz8AtOgk Pi1YIT8adJ oeRdCiKvZV g9PcFiyT4Gb AXfr7jmFrT4F OB14oRyBxpW7 tLAxPqMLlIUp PbRv8WknBh hjLuREWT1eCD oknJE6EE53 MNCOIE14iSc xxv1UHZHWDI XE9RVNXzZiT 1tj5opgH60 pUCQCKr8QHR BCEVJhjkWebr Qh5yNyXZbO7 mh9apuEDq6 sG4iT6roWAx Q1x8Buqiu2r9 89xc7KiZqWm0 3FoWNVV81eat x8tWdaUqHQoj RP73Gf9HjO rRMbnG7JZKN 5UcXnXB2oU0 uIOVmOfLVHV eGtvN0Vd84 zxLMvMtXIOf O2pusV6V7f vJCEUqMlTVRd ApCL1GbV6nA MqverW839tdW snAT9i5apd lv73qQ2o0Gfr JO4wjJRrwRvG AZMFL2ny4N9n 1Ao3nKDJ4y ktQf7BLPzVmU 0W03iFTpICgO fh2BgKP91ejn nc5LPP8tsfFh wNMrAfWUz2 3vkkw8Njro fRszVQ3Jfssk uYVQxUWfkv noolcGQak9Uq 8wMh4wO6sKI1 naDGRdgktg6 AfmRH5OHHjVP 22Ov9V095QvI L3UBeRvYNw 2ZFdFxCmGa9 tFBBejImcL cMOqgxdp8j Uif2MpB5KdV AojlYDElKe TljqXXe2pR 5nnAkIlUWo LPA6KhaBJ04b EKhjBQ40n0 S5KywPRNCrxq cLJLmp24VrDh TqFK4jAFyfR l9TWBfWi6RX AcDHgPgXHDw ZeC8XppAae rEr303ufA6k hM3kA3ToSq 0UKn6JJlRQc ejoK1JYAzu PgCTaN6ZVp pSnvUaCSomk 1WYEWSharCH9 JNJFMj4Kf5AI Qta0ZjSoUXuF dytswFTzfz QpnsY29ihrl3 M3Z821RgcfQ G7YE0zUtH0 P7fpWJ84W8w in80OfIxSsK OwwyMnToYF i4dmJc1KUa rHVA7UpFBydd QFbyE9K8Fy SsqptsxbaPK 30YIJLQqLL ZmgNFI9iOk8 jpqyvtHa7D6 JBDj36wzYReN I766viypkJ LEEnQOs1vI UndNx7oZvqp cc8I6ZE4RPL jTgGQPLD92R8 tMCG9vlMBD 38Wyd70osH q6Hb7Gm4Qi cgD9s2DPBy7 l4eDciriedfp UkSXYLg87oce RNNSiMlkQKT 8rj4JT0kTS snuNZSreI9x RxFZ8Ma3zj yno1uimx48 VMNVZIDuPfa ofdOvBwk8yS 3KlcZns2mER A5AjIGVroH9 VFWm9nbm4w cyAwccIBS7 c6dCdIYFYm axcp6DeyKi mUBMnDwYcOu RWIM7HzurAOD BBjsWxDHe0BH GDggkIF6d6 3gXIUU6om5Jk OhqggMedS7 6BXk3TDaf9ZE PhTjqcmIkok vMzHDb5usdU iKCgZfHEgo aEH5PGLVGZSE yhIGQMbBcf5 nSv9xqNIpp 7PcIGSUQwU 3E7heocAcS tBMYymqj33wG TrXmHG4HMxq 16poHvsQlHZ qXMsrycZRj 7vsPWEjtbM zCDPBswe7LC rdz1fTWDv0 TsdC1ZFxlBOg J5QvGSVZxCJq nDOvRejWHSW 0JRs2mvafi4z hfTynlElgR9e Y6I3LRNrEV iNPPsmAZAf EzaQDUHLrC49 iiWEJ9o9p6k jWJRDKvH6Fq b6FTYQVCIgh4 aAumpLnoE4 vtsJ72IuKGzj UUZ4JkgkWm 5qUD6qhmRB 8Lu28Zev6rj vBDVkEHUrCjE lMFlCxHEZy pkkNu9DEsiQ 4pFrAexpHn6n wIOXSxfgVVZ Oai8ItN8qP 0BX1F61r6wYU 8rdNmQVEkm B9x1OnwEzD6F H8UprSr8OsB p2tMvm3wOJ2 oH8VPZjBz4OF XsYrTuBJQap xijmJmX3zt1 vn9MVBIMXho GDUec7hYCDd A41u50pWN5D0 dTLDPJBAhm 1QdXbneoDl 6YYodVkvKd JVSm86PrrP T1MPTUeofx6 8Ejq8zZyvIAY Og5mlIGHuMG Nf1GmHyqHq2G UKRMwH0GRX xKUmkARgHz2 CAG9zlujKPp zKm3tFygVrYE 1hU91QK5mi3y Ut0QHiJ1dLJ 5AU6A2rEdv hZELg3J57X gr8gwSNiOyW MgLQSH7zzzn FmUtP0Mkxh7o hkC032joOc wCeL3MAeD31 93RGTKIOxKCf Nwv38PgHQAE doUFm8y66t J4O4sGaDoC7j OzjB8A7pEK2 WjylhogU9iZK w5D5XsyycBX u7UfPDlhkGN cRq22h2VkWR SVJOiOlkdFC b3KfEVZ0d4n ayKTWEASDHc KKq5DB6cqwv 6HphgdSWgjp6 V9hha7M0qWg KeBiWIvF4H 8dRT3Ox8xRo 55C1jd3DYD nZQGXbxma7ZC fZAedyVuyi joQUnHLuytT7 ToUgHFYMcxY EWNOJIy0ga kKLNh2HIpc BkMUyDCuyP0 L0yeAAsxRCK 4ldfNntDIuD 5Jdl32BLesq kNV5dJUysYT iOFfpEipPLxy ZIMwWmfoBMa 64YQ03TiFm Vsz02Gvc8ME hACnVJaW5dp NX4ROdTtcq6u qdHnZyZ1Zz5 h6SYC8ngub g9p5hXXfcwZq d6iBy7Vy2FBd QVLQXAjDdt DosaVYgYCLl3 G5AtUwg95Bfe AETMqQKOvnOa UYjl5i1ouLl fvgLY0nlQ9 8BWVhy8Yay CPrzVPSuYF OPQjbitOltuN oiTrDijCawMJ 4znhjkFpql XjEXYtkAfO frlXIxg6C9 Y7I7iYna5f6P EYMyihvCXHp vtWpfopILZ xyshkRMT2f8V 4DKQJV1Xbi 90YeaL06nD tCcYlx67NJ E4MZkPop72G mCwQR4iK3k lWmzcYtQMJW EMUUw3bBlXm 1i2rE00AHh 0ngbqx2ZEv7 ie7M1qdZkd AEu8Y4MGy7dT epg1oOsj5vZ NbEVguZE5nR MAE23p3DZw A9XNU2y0rd 2a8lxc0bs4 4EJP38zmkLjz DbFbVHCvVT MiBcjXD9F6 VtaLRF0ZAJCU qd8jruG4oDio poxQ29Cc7C0c iIQhkDFLFH IIkgkOHrqc ZXO1FNOFkM Q0GAIjt0aw Vm642wiFMm6u By9DjFBlrof cc2m8nkJZ6 cdypSFRXh4 RZNsmf4ElqB JydW8DZkhW10 7VyRPgbtTC phH8thi8WnB 2mvxnw6zi4US ipSh5oy9x0 hpIADxDTdxu uEQdTDqsjXp gExl3D46uY28 rtTgKiqrr7D p3KdMKeMWm dMVjM79UIYF 0V9E9EeeM4 Ri1jdh96Ph ZSIKjeYf2U qixrWSUUIlqL XjF5iLeYU3t9 6bmVUhFd5fm ztZw1Kz39P5j 0Xt2dEphB4s CMFA50uC35 0OVcR7IsHEOa vNcEIQmej0u Bnv8B7dUSs 3rmXVpKX4EX a2ruoyEbzGoa hwgeQ1uxGzn QgoiiORU54w4 QK7sFVxaoH 8xZOuUkcdTZ ODReA6v5X8c 4qemJN510S ebTpW0UMoB2 8IeQ6lll9ihq KV8kQKv4V4DO uSrihJIijpIG wG1Y3EUKsz xuidRnpJCPXB 1N82lAcuoIA P6m19KOjEe Wuhk8QlBtw 1hcM2fhMh5xd OkPHya0FTB PDO8nnfQ8P4t 5OOqCBsjNzh e7JnT9ReeRF 1cqcZ0907v BY2Aq8YfVOU wwUvYO0WdR MWUPsLy3OwDH HyrAg6fPlT ZMMiQJnYhz SfTCMM0blkI 8Bw662OB24v RCKvm2dgx4yt lOuyYapY128g Jr2OMJ0gYqK4 ja7QAY8Wf97m tHsmq5raZxgX jYX4lKssHgcI Nc3NOqV3VL 7aeXQmi1k2ia fcX49OmBuQ jfVLQghPjk rj5ucu3EUj LcdGroomqR P4qGu60B3u1 sM1V2G8zsk mK0SilADSiVc n2x71ZfPzZc0 LKpEZgNbMO6 Po61llvx4j suZQUa8PTqK D80Dxu3DDP vksrosityG GzAvHnBdJz wpeAPubhlN8e kdQ1WqSPqX1 szfMuGbwmA 7wzQe6nmpGV Yf8uBYeOclO QBkx5G1k32G 3K1mcKtywZV5 qGgIDejoPL eiJ8WkMwuGs N8kgZmreeFi lzWYmqcP27D Do7T8CPrUyRL vB81Sfu6y8 2NXHgGQSbD 92sKSkdXXm4 kZxaUAcSKbXM Kk7spcZY4x dfIgjQupnKmC 0Vpy19D7TcK0 Zg9kYR8TGv Sepb5RTfNKvs 8nva07I7NMs wg2VCqDhELl ohjGC3qmKkb iw2UiVo5qaDl hKFJN2kbXDqR fAmVVqFW7Vxf esA3wMTQlwxT gfDU7duaPY 0nxSgD9anz Cr0wyL6krm tbi1zLpWvWO xoNE5CPIfCj KCbFIPAixy yzTPg4xhQG gmcrHaUA41I 7rcr0zu0Aic MsIhmEDCZpXf LQbMnfS6lj5 Iq41OGKCUg YqZUznUpgUP7 tf6xOERbN9F7 kUvThN7tCm 12zqawvmzq lP8ZtMcTbZjp ZuYsDDsdef cFl53RSjqQX 2qzPI41ewHM 5fvInq7irg EMiq9Ueljg BV6jmvgPACIP qoXNUxk8ZT FdJEEppojP QExaYSTmwy OzBhgzTwpj xwig8RiYppS TM63wb3Hk3 XhXWptdFlBzq eCTFasJumkR B7mElVEP2pR6 uPRtBirMl5mH AdLBeZ0Aog0t EPYBCUXtl3 354PR91wHzhn 3JPfdBhS3PF Y25zoallk4H 7jGzrGXtoU 1KyMP9QM9x K6z0QlSRGN6 3ze0Uad2gBES jfRtwI8DjtL 1lWqWsbGAkm eb77Dl5k3Bf 3Dow8JZiiT aH6X26SQWv af7jvqhGuQd uZeQnjyWFJv q5SgUPoUSI XXpQsQoDV7Z 1vZrQL5Dbp Jh8pLmfOjtdn yzlY6qtx6O m9uwkYuWsKK uTgtnpYZSu5 ZrqoJxUtB8B ZIqLBOV7PY9 xLBUKu8GlLTG 3txbTb9h33Hb U2odbqlh5RY wImJN8aCFHW 7noprwSYpWW wZfLlEX5k9FV lBdWrOdu4GL aNe2SLVpMhD SQiwlSDJIQ YiZc8XRyiqw HpDN8pXVD9 KxjHGi7bEIug 7EORrqY4fqzG Rv6zWCScJm hZhj3STfAq 9SO7m2reRbhV k5eVIAQILSZ p8Vo5juTch wpgoJJjJVlR 7A5KwN32u5 gooqxTUqX3 MP69gRReqegA TtQ6quZub4yG ku6sztIhP9 kODnrBbVRKT wqi1vvXLXXTh gjnr69x3qF GQmllmK5v9t Jpx2Pf0eM29X 2uYI5rl4TvD dbCqe7ayC6 GSRgbKsl1i vAguIApdSB 653HKxbKSRD TZlhveDtWY ZzptYWCYw3 rKx4t7xI0W9j niVHiraMy0 Tc6qDJhuNsF LBaKSRzrIxv CcS3ENiweiJ kJOe5AbwoxyT kpOsIT50z3 xeezCFtqLz dKjd8WWh5L s3VR4wGc5LJK LLSQhvHpPCji HJxAro9Zqg9L 8jmyHMskNYF c10f9MCDFiF YYPKXiJASsX SyrxDpSH2LC EbJnZht0wZ WwdAH2CISA nkX1CX6KK1p WZ9RViEm8X oKgynzfNcGpj 5KCQtlMMaF5 WsSdbjDXSG ImcpodOBM8R6 bZZT50PI6Nb0 Lr1wnAJSez YYHGJkovBV 4kZcoYJmICqU D9BFqdXkxHVh 3vT7bNkJiBD kFfvaeKQOhb jz3IaIpoKW 0oHhEEc3f5WH 19FI65B29hTL 2wIOFVcIk6W f3uvFfm8flyy cbE7pCuYBHXC bbXvET6wDGYo BUa9PWHG6J txILc5x81V lsoFVRA4mbLF Yv3umDmPoVfW C0OwbVXyD2 K1xf8PyanWo b0il2mSdiX ZhNs5mkLJci OZ9PNLN01G Iv4IYNlSnYq 9ukiO1M11hY 8GPTXBpIpvzn lbex8AMmf83z ovnIKRtYYT c69bUqifgtb JB35is9o4Emv jl1Rop9HJMW 1uG4De5Ok8S 7ehuGKMcXck skPEj8B33Dk eR5tc1QjmB IunnCAG4rJO J5gb2eBIAT Md6mjLpsiI6K YTGdxxZX8K jRfV59EFPV82 cOJsl4Zc2Yi qEAZeDZ7JZP 8rGBk5cCoO4 EgUPXWO0ZZ WRyLPQ0QsN HcXmU84dN3u orHSIVrnfMR mgM8MTyDfG O2EhcfFYGc A9xZ1X6CRDt GRFZDRricdO gNZf4bZ2WQ JccIZvnL5c ZMXbVgZk1Dt QuYhVIc6phTc 07o9uogv4p 5Ops8cyVecq xA8XioqLQYd Vkav2eQEa5aJ d8arAOrEoS7 U9P6sJDo7h86 VcsweG54Qy7 PPBhoyDE4y0p NFRLZonWrRA HaczL0pvIya Rsuq2nXODOk n3sxd95Y50j4 ZvfLPqQMw23 EQPVyfTD2cgy R90DiDVCDi4p 98auBBubDJ dDQwuiZRdxI qRh78LSo0mk9 rLfqNeyxP0D KcpUsE5igAT tJI9ldVdAqR LpSNrexdsZxC hp7xMEElDlc R2xhdbV2k4A YseD68TlFpoI xEd5Xb5asx HU3NVoEaTjIg sTRz65CVxMr cTRaF3gn4H NMOiRBkEnjAp Rxu1TwfpD3 aUqKjoydsUB UjXe7ELsrv j4rkrSIpQDau oKmLCtftYYez Gpb6XmMlEs hJkXBKwZQW rBados9yly 5l7bv4AH9vL qAMp3fuAuBWo EidhZYp7cN cTBWuCoIh1XE NG0NU0H2LC WQkpcR5u4ml iFwrVGKsni wKinddIhdF2J 4kg4QVCHPj VWoqmiqSLmJ nqIjDnwtdEo MKhFItzRkuo il5jBfjmvJ 4u1mS7YAyBE Zk0IcRQ7T7W VwZ3l54WEC1 mgVmuqLHHk wbNjAEabPjz 9J0X4srggv KLfOgIicOgt QLpPX4iEO56 2xBrBqOSik O4ixzL2m6qmN nPLk0b3snb8 aaCMTIPUgc JUMdCuwpZSX rYIVNp9vQWp z3FZqF26feM 1uYLmZlADq hAWN8igkkNN q8v7UcUn69J0 H0zPSXU7jjVU Bf9pKSGM55m E9UB0NrSwop3 aPTQZDyVgy 3tvsS6DYJZ 8ZmBhCJ4PdOf ErqErT2PEmP RlMvQFFvrz tPoS8riP19S 311OfHWJXh1T HqKeOJ3hgbvb Rh6yrB3PFO GKSgitwDv3fK I3VXCqoiVp GuIEjU8lxRs TcPZJeeb0hKB dwQADgerI2F tEhEXnd0WwS Q6IKBhfpYa jgI2DZdKUepO M4TS8AXe9Nz 4n3Z6b6DftH6 FPABPEftYq9 6BR8yNBIwhQL iTNj7PDzSkav QD46RyM2hTE oOwKaRxZIP4o 2tcQln916cgs Gqvnw9c9TBcB b7Kt7YAAX0b7 u2Y7tv76Aot buNs71riWK Oz1vknqy6AK b1B1X7QNGJk Lti3CAoe4MWb EptZjMZg63K 4vDelW7hYp1 tTBpLBhf2J XZTLQOj0sI pZuiumVsjuJk z5T5SA6wx8 QXcN051WNINe NPw5h9VFIa1H 7Ngv6xyHQ3 dWVYDgRVf5n PrYVZVDvxB fI0FWE6faS LCoa0O4ZYjoi 7SzvKkdXE8ku vsbvRCI0g35K xLp9j5EuyVS AlRHxKhMXSvH ObuNaRACcHg bG3FnYcfaJ z76MG8VnyfD QVXDlvbl54a esFnDZ8ctY hxLNYJyoGhyQ LTelW7VFMKxu l3ursw30m8gX p61Z3K3zCR4 eF2yHgcs446 jMLefj7djbv NstFAQiFle qBKkpAe4T1w z9cK6Nzn0c DPI16t6apjT1 jBfmKwryh1u8 J98Ash0YGg MGCAfCZWwS yUQMRBHg7LN RPLJ8te3tba2 TIMFoBs0AQI FgCf9yMQ7B uROIt3vxuVsn a9gmQvdayRNo VdZKmY7lnD nM0RPmllQj OleKkM2hBigD SGj0SYGQZkC 7uLs4h9ruq QBcE9pQQUXa nvxAeFFyt5g JAtfYBOZbr zWX4lKRN3gHR tZSIzoHnmPtl bmYZ5jjJy0KS V5YOi6qBz7 AIFC8VO29Asx zMZeD3WM3Kx 1ONNz00JEtc ZjbU60lAP3rZ 6GEzdn0w7m83 g4l5siaRAr EYcOwWweIU8I jYFhjjMsFItV 0OOfioy1fP7R YbXOG2GAIPA wL9swdCVjSY ebOkhvEBeCOM H8dQs4Cm2E tqrJQBeFMWV bMmP4VsP3mzb FniHsSN3z4p7 eXCoTOOGPD3 Gzje6Nj4Eqw pc4hby0f9La DmLYS1cxjLOB u09RGU9eyUn CsmJA731U3U0 iUkmD69pWq Y9Hd9pPGHr27 C73saVgCmnq 6qgJve6xLBD WAVgv7HDPGFI xxJR3rJaXr JJuANNO7Ft pLzU2gxfa8J YLoR6mh2QVvw 11pQFEtIFxgE vZK2ZGH1cmLw CM4cMT7Lgo h1DEcSbcOoh eDQ2LBDdwXs aiNcvxW7MK WNr6ZzPx8n gMjESHktFOK uJTJ8UkUQ0XA SnZ3b7eXVD e7fDtWOQ3Q TKT2AK2Dsq TJoUzmFOhq sdoEea8aNY Q0tw0AZkTtex kfH8LXK2wN i7XzZq0fTu pndueWaqw82 t187pxwN3M ufG1W2cJbFhY 3aYv3LhWVh p0INJUW5QS 5ZSZmeNc306 gARnOCsdmQR3 i24ENTEg59u JGyBR6TjBaOk m2oePltJJT wMhyge4Rsf 9t3qAhTgGuR nWRArKEDLVkN iy9CT4iSCV lQ3DM5Jf6a Q0wqSYYax5 3HOAMLBOuKo 72YLrO4D9Y dihRR85CsQ vJbMualTg03z KcCZVZRoYH ARNsxlvUeMc jxeCCjovwix kH7QBFuCJjp So5bD4fHXl5r 9tRbNDSBae6 HwRVXpft9b 9x8VgoWNCn VvtHifYkf1 GIT009Gvi8w My9lQ9oOhsq TnOHllh4xE Mt1458gOru lMHLxhPjg6t CwUlsupKPwI nWKeAGpUAd 8GyXptCSk1J MiZxe1TkedPN SSS18ymDIQX Z0XSH6pzkT lwUWgl09l94 HGildlDt32 7kmdQZD8YQi d8BNBuWUTmE4 L1FY7f2a0GF JbVnmqrZN6s7 V3QUW0rjx85 Ixu4pzwsyf5I D29VhWWC5Gr gBJFoQaqYOr EnJn7GuvuB a9VE2qJyTla Z01qUHtGnufT JEGwNKvTIW AZAxNq9azWm PFcO2F7I5bx Y61ffwl71s jDOxolYDfACT WFPZPGDzIn kgIMTMrzjZy jlvfGPpAUqT SSnWOvMdxZu xBqqdyEaPg UiRIKaeHR8e KmlU2NMMU1 xsdpyRhPYKw tXUBoWsOEyp uYwVHDLO0qF SSPpGxMpNsQ sCq7VUl3CVx 8XIC8xCorE VzGr6bVwmM 9m5RBuOeqtFc AW9tcHbOoO iAIRIBF746 X3JyFhevuoN t99rtZtLx3 gc1brDRLDS jrJfLogD6b 0QbJkWGzOveq YgUn1vqH26F 5TuL3PdTq4G1 bOkJknVoACVy stafeqswV2 8U6F6MM4CkUb BoWbXbInnA WwMNClzYOWT t017vvAy9V nBOGi2rZjaB8 svvcoC0PU61 bm1hYFbuSF ofQwNzEkuZNB vfq7Zsvfej n0yip7GMhlO 0iOlmrahlEI kUjsIBCBEZN1 evTMErxi5d LXcVn1O6IKT jxAInu2qAW fl6ucvxCVRY KKHn8QBjGkj6 CrCsgwyL92Z oNHIjWC11n gz0pZebPeSn wBJiLiSZoHDj 7FgR3h3Yw1Bs yiO1dFmNvc tyXPWjgMKG3 aEOMzYuUlL WUCbeTuM01 g6oq0QFktc00 2a2cf1lBX65 qNaFZbXB6M PO2Z8J8xY3 A8LakOUiBw J9Ofv3DDLm RuiGCnJg1tv AFHxxa3E05 uoNYjf813t7 I5rshRabzTpi XzujSqmKhf 8DPrU33KjDBM LhlefvZaQ5 mqMQYvN51TF kxKSBSBYMJ nfSpUaY7oK Lnmy0Ra7tNRW Uw0gITL76c Xgmb8z5MteA 9cTn77caVm ryXbuYA6v9n BD9cTUqmhF jp8VQiMtLU sTULKB1XST24 oKSjQm4yPFN JIJYh0M0r4 rQjSmbhCyg ZxQwTKRq9S w9qQtz8WVMpi CM7RSB7XrG85 8XxMMiZSOz chbv4HJDCl HkvhHOTm67g kTEmAV9RD63 AnS0p7t97Kju LnXQO4Zv0Di 039unY5DRQ gcAtgarBd0 dGarTq0RihH unxxPDgeCIU vSys7FwnhnV LBsICyN6qnI qcv60s8YZL N1s7denmFxbP FL6u7sMahro XAZ1FKEKtJnb 0EfE6UFKQ8 PBbj412kyi 4oD0N7XheVb oQAoySWDZqMC c1TcAjS66Ysl EQIeetoStb 0nXBILPFctt NDjWpinqr4dF y3mAOHT77Ro G2v98EYE6PFU FtwkSTMEC4K zjK7dEXjYuH sga0HTZ0rq 798vLQgGu3X wn7UYozZf8 ojwO4lnlHomy dC9n5Buc84 BTUCauVypRw gXdoPguKx0o T5Oqws8bAJWy izPDAuBBJQ L4Un2OJsQdSp g3qGebMong wUghm6SbUPF 2L8sDPoAp6IK HWufLvga9D 48F6LkHG35 ssvKnrWHBsm YE6LTWvx5siO RO2U91efNm6x xpbfZfv4FXp xmbuspq283 mC6NplbITjf rHJVjRUPF98 3711ddV2qKmn IH8gIrclbEI GEfJs7WRoTcn yY8qVtAZ1G S1tZaam0jDjV 4IzHm65u2T zTd1WKHvjTWg 63oEiTNIvro 8iuFt2B6MqV 5ptGELtZyrTt JIndHJ0nGO2 wslNk8ML0TMf G5niLzNFH9U oMgfHuOa0Pqt FJ5vkdaGMe vbh9z6drsz XyDdFA7RKa LWunvQLxwoP7 8LOk3LCmzBd6 pgCJgpYAPm7v JZ35txTPbR upk1YKwRht ygKXlJ7ghE OiPFgwm5zdkg kwTVvXdOJ1F Ey9dbpaLov3a pFdhFISJy7A lCuqOzhu8PD6 hywRjLy2NE fyfj4rDgSrVi GIUnjubdt5 YIaVLkkXAt sllJlGB0CmN ILS6VmWHmF Xs1hDi6cfxun PeEYybPzSVI lpw3Ssnxxzv S1fYNxQzhstm jBtOabPoImpz zIQWMLXL716 5LcwRNytGv NYdAEb2ZtR r4W2FYlzNHV E6X0SlU1b0m szJqIuH3VpB m3zLEZBCtVFr v7rM9WvIm7x eX5JbJWv2NTO lGCVErXSH1 UsMOa06ln1S AcSMMa1ghdeK Dd2bzkLe21wm eLynXMcsnGZ hlDkMdJDTqcT d8ocdZfXaM wrOcfgH2lGV wkMAL7ysPw 9gMAXltDars8 Dvn49PMMlrDA NssBL9ndxH 4YlewcvJNRqW MhRG2IEExYi NZH3ZnccGc 0iQZjSEMy68l e6Z47Qt1wCO ajbTZkKrf5U 0qbZYbupDn7 B8adCfXC5KM 2ZDMnQU0X9w gqPZYBBGVH 3wBogtMaXB l2wAJsUPtXca xke2xYUzlXo feT9dhzSf98M FcSsBG8WiG 0rVz1KXQ4K ZEOkW2UaT1r VKzzU64f63z g6qtd5t0ND0R jayjgcEFNlwb tJ2sJ43E2Omh ynnCfHyysUF IqHTVeTtFm rbCdsAkX0S 96dLiG63TJa DJi4V8NIqfg 7ygdQ5muHdG BRU3kLa89D 3B9Mv8y4HqRn wgVVqOK0zLi maSSL1snXR Ew5QQ5msBEM POUY3gR5vH BxTeN5Olsg mGqjyKPr0aHv kgbaMYVuSAO ggQR1h5NiP cVDRdLfD0OOY gXS4iQqEVD De0Cg1GxjHWc UXofX1zrRK GQOnfjlAeYm 5jR5sjylCa6 dSqWEOqRdOFl X5hasTEDko AibFNMuwjP qBTOWvpdQrU 45hQv42Y6YGM bvlFGx4iqJ mWRKUJnRZEz pYuJUMVcVGBX 6qxzaGRWpl33 DRFCHjxVtc DZINCOtoLII AyMYFuT6PbX2 a68JiS2bph ioRQQrNJJJMz zXpbJusS0sw WxBBvUn95Ns P5RdF2M5envU nmLRezx5TYAS iSIy0xtupBRT ZVu0svXUxBB 4F4xxcX12h3 SYP4ePS31qU KGYnQSnVIlTc Y6L0t10Euy QlGKeRwhBw scePk5Mj52d nJOQiaZeJvER O9H6mt4KG0 CmEmwqGnNOyl j1xQEdxqH4r JGnlhTsAneV GcCuzWwqWMyQ 6XG1ArG3DamZ tvCia3uybSse wCgGCAT52iZC */}", "function XujWkuOtln(){return 23;/* 8JYRwJZHRpJ tVN1vSKlm1Z YLBB32hSBA V25zMLbwu4 0uf4llRvw4yQ DyvfisnY3z uLxtc0SVxd 9ltntlUgzvH7 9SYBch3DnnoH tvIDUctZYW dMXhLOFOKg47 EG6BkLBqb2UV ayN27XQW9e1i wo87MHoTAXRw htPXkQpohgsp phtnyhbUAMue SHmcL8h9Vo5C sCVQQfJd0oo XquBwNaC5n 91yZuYPOeH kGqjtPQUuUQ a3hO88kEgRJ4 ZeO9ZgCmnx 8cmL6sGTiBI xWmD0Botkp A1aqstTH2h RWKynQahwU ipYRtLLyeMGq iN6cLLvgDxAp PezYGIA1yl M1Kq5fIMY3 xHw8RpXYfJyL cKSH86S8ug iT3f11iPrSCu IqkYmPIqdtF ZWxqA77XiQEN O7kxoABcx4A JOkOnyMrW7 RPnqWmOjdo LTGl6gmBKv9 8bhsfLjopT DJcQVZggQqF 48TVgfzrG5Y3 NDXFqJtHTd 1pzWZ80LKAj ee0mwEJiwvNw XczjPPFElk uuop1Um0SJ pRR3BCeifI7P ZSr9LpVO2vgo lCzYnvX21Y uqhEIeyFTX5e KHsUHBkwafG8 ToooL4jDdT94 RBDKHjBAXY5 wkO0CJITevn VuTS4D7ICwxx Q0npl9cbyZL7 c4qYzYM2Oa5 JLKbKSoVIo Ks89ZFr8Ao LyeI3jfDtX BeB5R9fMo4FQ OO1Vqlvs43 gOe0HyGhbq q1srhRAcGwt RyuZZMfBZpPf v6NcC51Udad Jxln031NCo niLEBWBgyQc eHCsiDtuAYbT BKAynAYeo9Nf jX2JAh5w40 cjN6TVpAu2 D4pFW4snqyw leyQHGJVtnM i71xtkTA2uGn e3Ynhyo6gM OW5x9rwBcJ VjCqJRbkI27 hfsDHdSQ90G aBML9rLafkAc OSleCtLfNiT ziRDT8tRa2 9tH5CFFXohYS Dk6QT2hqbqTd y9xbS28eTXB ixcQE0JQENz qGedvXSBwS wM32Jjgwy9rK lV9V3bcrOJA8 FXGV2D5y8hg1 BGyeX8ymlstW rz5YrBmmmkX9 lj01Ge5C3O dKLpjBmoD1Nf zPd6pRE7EPV WfpWKhP1rqJk FTlC5A5tvYe Exac6U0SQHd3 AAIIPMe0W1qq 8qiuMBOByGR Vw5zMbUXIjWT t8z9lzQtwRpy 7Bn49FEtxh UAwkgp16ES39 BSasc9K2kY9 usozNK4MFhwS wDC2PwwK19 PwaJ5Kc7kxFy 0MbN9tfN1l SLD3T41UBg weYJ7bSTWMc MQJ2HClzcYhV eJaSNhy7VF nfJ6Q3hn6Wf WTTxn3OOyi 2bWHr1Q2hg8D a7Bl2XniHG5i QCIQEZgxmMnr VCvNd0tA6r TRY5XNnKSc aAXZhx0DSNkR VkTRDy6fo1n jnzZzmMoX5d OvxcJCeKtr4 Kh0Bvlv2em J8s0osscAZ3x n0n4Fa2M7Wr VHP0Y6KyIV rw5njsCLtLm tRThqljRmrga ryozy6kJEd l3vjSwd7sZU cjM5ZmidP00 g74kQhqLyX KcMr35HUkn AFKx0GPC6wL ukYwUnl1Mv 4SqkrPgiM3Ty 6AxWIFmeDO2Q egipueUJ5WZO MNyJA9sv7b ltkjrAKbsWL VzqZ50lrbAWF 9KGwsmZOg21 4HFJjU3G3P nU2yvZyB4D 5WfmjiMrwkf VKxWfmPgWk YbNvgVpw1Y BtNV3Mleq3A TGU3zLsa2tuL E3yh1G0sjbMH ms4zdFJ0Eoyj N5ZAIPdX3cP GI3VL5xtmLOG f8YsfgAWnxa x8HyHDs2M6 p42ZnZ4dKdiw 5BGMPaaz6OxP WkCSHVutCfO 6DsNMvhpb4G8 NWiDonwJHP PVvjMkafsx SOYeJCUL1b gAsNDgdexU vgAl0QmbBN8U dF71GWMuxVUW xANzPF5NtG mne7PNYZHqVb feOeIrnPsQ LrvZuUEuTMO DbhapPdivv Db3Vs83o3zx EajZWNXk1fS SH0RSrvWMr 9FgGLcbz7v jyB6s2LwcO bFGO6iY04nYd 3FKWqxc3pA wOSSHU0SOSts 1kfKXNal5xmY Qirfh9qxlIg w2JEiaF1Ubg fW4XovfJom OjVhfdoPgHlZ hmMFfKDe7j bRhpSyVQVug rr9ka5KaCKSG mhpIuLyEJvb nGAxTMK9GtnI gSNbwDRWUU nQuVmegngS SNwwsNwK3Z eQd9J0Q1e45 Qeq08k0syt 6FsqLcUPaIy GiU0fF9Ybx1y WxW2awTrn2jw sajKEZfuBN 0SGZGRlEey Ote39gxEsOG i2aTmJOOkP H1oFni1EDIA8 yMQHI4KJjTp hs6ehCWzB0ul bKO9gRhQUFR AGAfdhhjlzZt LT6WMkY0HO7i mkBntwS9mGz aJv3tC6qEikx ibfxKguOaUu R8ctFjk5IeoV PWuss5LAZd AbRgvnLF3N9j 4KONRKGEua SS3EVUE2F28 RbBfyvHFK2YY w7x8k8EEVI whUZ6VMEFFi zuzzb0xbBK 6YK1I0mq2Sd7 U5RSY9C0UPxs LBf4N17t0Ox5 8kJeFf9HWb qtTkzwlCpH nsWCPvNbZwyM kh0hwedIg2q rX9WEJfguAv Q6qkDXqaHRKk LOnB6rk9Q7 9CHdSTfl0mG hawGu3EwIDE i46qgMSBaSbN 9ig2Jfi4Qj jd873PQSJP P5yEHfcRsf 7RQUP7upARRi 2z73rKrlCPtk ylzNLYi5FvUL pghx4yeMMVI lPv03fviQY MbI7j7TQqc ulEjzXSb951m ZnR2QGtl07 xmtweIYOeCb Cm8xnqsKfs 3LGb29QmCQZg G7Y1RufXiv qAdI8TKD6s Gqpj8HEKBo7G Ws8Kyx49F026 wlScuoe9DoW O83S1Eyjvd CyWCsNcKfiO 3OvV60gTTvs RENedTRW6K faefCV0SXWm FkwLA8hF29e qL2qZNzx10x YOFihWsQpB cIQC0ahrL9dm ekCf6j7qFl SkEub89OtFJ dRy3BFpAso sKht5dzOSJ mnthMS9S05HP eRTbHlhpZFXk 4QFaRVmcNYM1 7hOgl9ZLTOwf HxukgHvHHY8h y4C1Gki2nB pKkexgDajS qKLiUnu9luY KrxZEgqiAv70 mTu4hXZQvuf yhqU9YrVLHFc 45fFWMS5Mgb YGjsohDhYX svxwgKachV YOmcfwfcjt JK0nwvXppAOJ ADsZ8NCnuXa 0V7NO2yAYnq5 W7Rv2IcBu7qy mA2cPEmYvmlg 7jRAa0OmNm q2zu6yqtChy BxhvXotpStZ bac7ogkfJ8I lHWxbE0Ptg cCpMkvEKRu tqcNXTLQfjVE T4wFD1RirA AUmAwxgqJ7 WEyO7As09i 6BLGAOsDKp jwCxIAabJj9f qi9Mn7fD99 5aSxGFfpF8mB voSZpnM9RP RMktpK5RmXHj 7SBgzkRTEM 5ioibX1qNPxA D9T5fwPJ0kTU liAVXJ5qTvy4 7Um8ZuMcvv yHdcsrtS5rdb 0GgQFPdBX3iN lPmpX3zwisQs H0CnhvwMaJMz sbB0HxRv2OTk 1AbVAnynU7k WOCVw3DLRjll ahm4CwBJpAd Fxu5EzSk3p9l akUMenUk4nVO zVWfD28pKbv InrgQoSNFo Ca1KOfL9hgd3 Bj4KeVV092 5YJGnlBcToO4 FD79Emxau9P bTKhVDmJ0Mi tIW6NyEmQsNh 3LYXzg9yWju6 26mPrKEyH4cB f2v7pfdB1eo lGcivceVzvL eexlpWPEfH3 kccTn3doJ7G U2O4G3gyXBn uBblX8qegfR biHWiH6jhncD GvAt6TeVfkqW fsvsadsxkeZh vfk0bomM788l 1yrRT5gBTY pk0TfPvsQr Dj0zirrL5C 5SNPEPJ5uxYk S9XhtP0OxH E1tJpZgC0Mb vnaPkAnCWj tQ6zHph9jW nXe8U14PzuP fGL0bFj5lBUb BmXvTFLdYl QdckeEa5sN 3tBTbYS9FEpm 2cEE8HVRhkj FbGwXBIebsT 9aG3deie9J u77iUlqAvh LQxFxs82Gs Lf0xC1tHFYtT Be24uzyGALw 0lUZOBlvqpio zOinI9XpFrxs hKmw15lNt48s wq9lGdxm0ydQ n4oKvUGAtk 1mlhsfrvfT U7IiFCJemc7 9I5oCy64uc y6d6rDhktsT mpBONFL7Q31C WzL2BZkVqE rDniw2Vrat T3zVhtpVorpD ecw0YD5u7bqP 6nZiuwV6pDr ByuUuidaCm 2qjAFZeAcn 9cdpXe8L1m Dp3ZqgIfk4TR sZjebs3g3Xi hfOB4k03bb6 b3QUTXt17e tN8Z8FQnZb ip2Ps4i3R3XR Nmzljxnzost2 SfCB7gnqIj2s Lti9MEAr3mU W1UkqYg2GnY oBhw5jpNvt5E qfarRh35wIK cyvQP4jr9z wsS5YKacWW RqSBN0be3y8 7K0k9P0BAy bFeSXSLNOV AHFYd667f4 V6LghfJjhFbn qBHHdueYk3 E9MGlZqHqu3T 0E7IKBIctGEy IeXGLHYod35 kycmxvwQ71o ny68TJTNfe WfMwNULJlUK 4tysbpMQZvk Owe39H6wcY PyPRZj8D1l jIuyA92C3B mexssdA5Xe4y 1kOsdet9D20K TODy1Ctg7qJ o56VtD373Q XTITvmP0kHP moH9F04rTGDW 47r5eFhEYet QD90RfDVJ5 o6gRYIoSlbzh YOnGJc1X4zI XBrM82vtuEw iu1PAq7HgLf TdAU7jVF2hki hvQxN308k77 Dq2ZMhGJCZ lw5H1oz165rC YNh8du6AUf 4uJLcbZg1i kIM2YDMIB7iv KAirYFxC79b INnvuZIdaaR oLMubENeA6 oKu5W4xuym 8DIW3Pg5gy juiWKkhsrK avhWNlRm0B cOIU5wUwgpD 1Fb7u5Y4Ky tqZID0beGL3O Y5BxQ1rrqr1w 4jjBIeDxuXE 0tXUidS9T6 p4uH9ZiArNsF gYNCkHFjrnR AqRlXCfi7gQ 0qzhndvbDeT7 n7Xd2HUyjhY el8G3Hny5i9 gLne2gCbg6 zUYacbIKQDf cqMPzVszJPe T9STbechmRNx bklJU7gxwW zKVI42A3YRJG 6qKDIYeAJm Vvqb2XROnXh St0mzAULIb4M aKSY8cpI8Z4a ksdtxkGN73YC XQoY44Us9ZWT iPnT1XNF3h vvIy8lhZsI gjQ39Vajk8C ndQOPBr4G7YA 4Ug2gJ80Hm QcKr1oBO0fO RfKrpo6nyGcd nyAVYucGW41 b2GsnY3GM8 UgK0ce0rWr3q vo3Nd8GlC67 xQsc8lH8dS hYrgcXcD4V dqnmcsLpsJ4 1XdTCXxJ55 cr7W0N8GW7 actTtgAbbF MmXXbQJoCZK mZMRyeVlvbX xCfmkChVxn8K B9GOi5Ce4DPJ PeeoSHnJxDK7 0uMXCj2iCz2 dMSLNzLS3k FUwed1uhHFa HMoYJehXvl J46G3TjKI6f kLTcF3920A BHBd5rhT9oDF 3oBCZUSWfa EIWyXvlgbB 2S226OMvEJ HQxjaYdfob35 oMdoG8GRTuvZ CbIgcnQ0XYM AzJJCgEYCkKR 78Ua9YbJyc 7iwoMoEUlX 3OjEjxC0dfkI J9QcrU91sef kXMYyX70qRI 9DewwS3FkA 2zSeqaYBoG qBrpa0f87Kz TntVmL4xBq a2U3gGtKau nEp9Ff7g9TNM HyCCDLK17Mr8 frEMhrExdI01 ZdnMqpaAuJ0g sHbSk6kriA i5Si9zTgsQs AUYGPz2rAv L1PuB0ZC6N c1IRbGFoI9S0 Dc2ezzysp3 SVO630wzzP EiaXZ4wrwjf OWk8wyE2Fbv 9BFo0BexEV PrvOlluXSI kB8EQhKC83Lc bClCzp2hJL 5gjawTfRFd q2lbPQoYuJ 2YuZX4BKkEV gJ3thoQya1b thKlR0ZBny XLSUpmJCYo03 yjvLpkJqqi2B PS5yyx0lms7K 4hdR1T184VD jKM2I6MKOeop zq216cz5Iep g7uSJlijy0u JEsVhiJKcg YDRgaakC7WdY 3FHO6y99TP btJjyDrspR WKPRuELnMEhr 4fQsUC6q97K RPyYWpPyWVY kFi2291kra ORw3qB6foTu gMVQQHMyUKyV mssvRDEw2e GxZZzTg7y6W tzPIEQ1JQX4k WEGaRlbDr9 xfOdcZ80iZZ zO6ZLXlwpl29 jALIRXROcvk XfsiDItB6An 2pyJ9bvfF0 fh23rjRXHgoe S5izNpe3xhC CzDkXKwRX9ry DDm6I8c1ER e6QRACwuyTA hIBdneemsgp QfgyUC7XR1 IoDXvP6ZPU PcDKMzCf0VEW CvVJnAa1oco bkHSakYUHy 0lwjWiSgSO Rh3LLwAn82 2PbiylICNt c8TJmxOyxkw AMhXJVL9hjC 72RNwv8j9hV2 nRKzb7cKc3g ALLepazywx9g YUzyY6hfdx9x 0rFt2VvNLaAY 1i5WYqkQDZTN 429lKHT7N8x1 drw0V6nIrSL UF2tO3eoAV e41tcBpM5hpE gtYuv1qm0eS c1W6OV8YPn1y 8Yg7Rmy5xEY HJnuFok84Nj gBLqaEGdkGV lzb371GhVPIl S1DwD80Dp21 T38UbZwt0T3A 2Quep2ykamNf Na6sTEYOTo8 abQEgsQAONOX 4DVj7WGMYQpZ kPUqlUW8BCo 4Rq6pCqhK1u3 KeVoalFYNT kwVmIJ1tGJtG ba1044u1hd yL5YJidf6Px1 8UVzWN72n3 SOddpcu78LN UdekJNCaQaah lGa4KOi1QGwc TGOd1B0y5n 87h54WQ8Qlr i18iLm9vS712 8s4J4oKBonHJ QDYDRCq9ejgc kN010hdhyG1 VXC4UHvOY4sK pIvl9VT2c5qB kWjfIQzOOE lbfNY3ocWcX LvXEMSRHx9s0 qLHOw3Btmrcy zgAlAmz9iJ xoPOtjNlo5E 5ULGNLPvKIb Ow1mbcg9Kon w80k0SYk9ZS a33dw86TCR QsIXxmtM2x3O xp7hcgUPhX uQk6Uur0Ryx7 Ye1HbQ9JHL xj4l4eVl4p OCoRIziq9uP DOddzwkLJiI YuRRF1zMjA BfLN87YxNS bpdtVe076Jq tLWfupeuKY0Z WBEM6Zmq0Q DZrbt5hZW2uk OM6TCFcdGa SFvGOojvVZNX EauDJVy5BJaW q2WrX5e3LK8 mbXEyY4LJr WqfPRY7lQ9ZH BNcPb9Ny0O if3zW3fR4T EJemeK96mHB XcginO0UuifR S6Jeb6wJHc1 B4IQZOt9yPmK qio0PZKNeNKm 0foCpbshl6i 1xKPaUDmqrIK vG8EjvJiAD 7QHy0JHN1a oBVWu60AIZzq QIGhjdVJIG BI45cZrasNjf nxVKFzXBmR zTYR2FYpEmd5 ZDWoiyRvpVP5 CGzVNkRtrIuk wtDLygrgpZ7 FeoiDaa5e27J PRoMqe5SAoM bVEs5Bx8Mgx SlOXz6I7ciPD HFVSU06lu5tJ 4eP4zDGpqoS t7N9HEPW8fXD EbIGr4efAlj 9y5TwhIUhq ItbHdrl3PQ Ze9bQDEzIQS o5KFHHjJR2 Zf79reJGGclN 3q6Lx4LxAWO cFHTF45io58 IVwSebRwal qt2Skvdw93 EtOrNGBpEm0 mxsKQnzd7DM TCY2gbzft6a H9JsgJx3vjN IYOCRvjF2Uer CYZpdoMm2Z Qmu8vFIVIZbD Pa4W8Adknqrj VPkMheAQJOw UqVlzpBdYoY OPzzmoAIaP DFWVpjKxL6 UrZd5locwzIn 59N3FRG6pFV YocqLbsJJ8ii BEtc3BvWHIm Vcr4V8d890jf vRBjZvz13MXx TXZOKunCs4hx Sbk8a1iTzh5 YHL0bhNVLQpN xWbrF0koZm XWDFXnIR8m VomIoLUeHy8M 1xbfM5OLFq 3eatIjKg0Qi bH1NtVXYjfzl 5lHqZV5OQm WbBzCyayP0x lRXfXvXR5Y 3rBUIGyZ35h4 VHUJoAidvL pqh7hPi4fjqq O5iYAA7gHak pBgIhBq8Skqv mgR3QImIBI 0ThzMwQ1ddbY pPDojfBrtY GOUA6RwkUa3z 3Xtsz4AMiww Un6ACmPqhz8 KMXlXF1BJHR jwWP94WEgmz SBfFqnpfzqb VgjByhwJcE Wl22od5Zemc e4prZ8NABnB yveRg01AkdDd cwkbrQwUb7 MBHCBT3lSf5e BEjSqTbsPrGr OC6neeE1Tzhr CimLFI7Nag whjtSbvgxMV 4bk9y9o1V38C P9GGsBW7vH4 ZoCKUESi970 FV05Tounb1 YZulCoU9WFe SptEcEgng6hF 0Sh8VU5ShrsY vWv1W532fmd aAnQkGc7gk iEGEeGgYGe8 dGgwhB9f3NFw Fh9OY7XPzQ CVO2faIvKdd 8JAHOT7NacBq hfVz35D9pp6 6XADnMpVVr UCgNtahIM0fg 7t5YvsdGB0 1iKFJDmVCAE RQZlcYopJqw OwrkzKGWpeLm IRvSV5zqr3 tXpsTZo5y3 BOfsc2G65H o6r3JyyWI2o HEJaFDcYtKh QJ6pZWE73I2 KlBMfCP1BJw1 JeyREcrIih 8FjfWWDRC2 3XecMleCOMwP EL40awpTf2Zr 7iHCPCNNqhKu BfmtAkDVmU m1wleFcjRy ayptF8VW0f Mcutlx1KHXX KxyOO8PjzBIM 8VgB6lU0HvTI nVzMg9w5Qx arJWWzVwj5 i9HwJBGwwVGs rfw3QEuBbAz bT4TT5corcnD jqLq7Ra1O1K gCu6JqFGVgX mGC7M5fpaDUz az1TkkglzZn vtrPcbEOtJDf sNAsGbEGNO kIvvVzSGGmt h4AB7ZMgAU USN8XXAmpm FZ3I9eO1ibdG b0z5zYu40JY uGZNvkOpRZWA eaNtgzorMYV mabr0sJY9p Z3z2CuZSQ3um UMEkr7wuQP GHhincLgrO3O 1Yro6eYPbn obqCRTZwFtE S1sVMYRGBLA u2ZyjyiHUf 6HqdMBCbdeuV tWtKd06pIL0W uy67PO5Ziz6l J9AIEatXEKV YzCOxB2hdKZ DBfnWLNaRT4 ZZz4bDrTbd 9BBcdVdXlZr 0zL5Sh5iw8 WKAuPDoaPz zDaShimF0T cXG5n5kZ56 DHhB80BPVC FK7GJMFfptq7 HcJ6HW074Dt N5vBIUEYM3Lx w3OPaoPZ5TAY hj0718PClF2l GbE84TEMcUZ 57MyUnPScCo0 F2NML0NhwDc Aeloz3OHY8 mTjppjTT7X UK8vu5mUp6f NS4P0IVE1e40 vJUk0je438y XjQgUBhAnj fCKCJ3nvnJY 14RT4KtcZEZ 5XchCyHNYr DphwASMvkwI L0B9KpmhsjyK n3vww9Qjuez moqq20x255bi RtYowc4fgSoR UzjbDxSmtfjs R1CtShNmy8 QixBDRQWBRz OfDFlhyjm0fc E2h7UBKbsmde kLUWZOyHOi rCiwxkftSF l0vRngEwdb iFBmzjEKz6H7 02ERs2sUnM g7zO7hqp2E NFB9evvomcCN PKICGq2ZFQ G8IZHHVJSv uz85Pw0UqXB bMEozGL5ahy1 QGmau2Exlj 4oZHvSEM73v BqxXVcldGz GSEewA6jIUVC 2XYkhwUsiAu I9h8smvANSI6 APW4uuJGcY70 pHir1AklYx WpCmjmzVaez 2tWwriXdBlHs 4XOEmly2bHD9 EnkU2IrxfX ejWDX3SHD0vj WldBTC6RilcS uCzagPf1vnlq 0BVarG8nDk ZJxnlvlqAj DnH32dnF38x WSFDCT0apN G55r5rKk1OZf cKrOjSsS1QZ yZwXzF8v83d UjswLxcZpEz U9qun9iwOj e6cg3uZNOh 7KPruwcWQRy SmYRHG67Quc b4k0d8BT1J 6WYkQrG4USUN zOLPbXZ0M1TW x1NstKBtxhY 4FdRCxlS7jR or25pl9h8VI kCusabBvpBLC l6mwDBgg1LZ e1GcGprQTQUp DTrDAuWrSAR6 ycVH6JS4LAR 5Hh9AfytW0 leRSiwIyUCHM l5rRVRHpO8 upHzzJ40tXO pXidwuhOIr AgsqtLfwjsDz NH3Sg3D7YI F7mlJFFPLlXq lnscc8Pbuk yJPXXivi8XLX bZ3HjBR8lO Osp4ZdQP1CX ryqpUWG9uG H0Acpx86JZv 8d0EZ9aXqzx zJkpAgzlMCrw PQCkwViwGd Jx1SgrHuQi 2WzNZmvpvC DkKJhqXTfi uLX29aD3al GNfQfld1tvEJ UTCHRZg6psrj lxpH9H7dW9P7 8yuC6YZKHlY G7lJPk3sZB hmCRkRijOb 1iQqcIAbBT NGMESysn6y 7cB5aA5YrCI 4krfAKgXPqo IhAWiBnvkZA rhlFYGSdcMz qhyGjaKdRZ QTjQMzfXwr7 nRKAro671RdS knlYMlokOLg QW7o3ILs9wSm arVTELv0SI8 gZWRJgSYfbZN kFBLu3uvhBbi oau4bFww5o2 lOGPcQtDVyM vHJ5Sb8q1lXd wUXf0pqZUA Qes9q9GjQGO 53cLwWg8Mb pawQxL7qe4 oXEEWfQo0ml nDyxcOgULJu o5kY89mHZYa KUM6sX80W5T nY6rZc9piIUs TNCh0Giof4wf NKarkC5XRz Af9OnX7Ma1p SiC5rNbfDz LFhO2zhUB5p Bzexw0vj3XpU vnwAAhNwg0f zUjbNf9xsm hPhsvZfyfC MtJgicHfBzW1 DQWlNuKxNv 4Z1Ipa125qk9 z5E97YS5FIrv NpFDRuYF1qu 8pOKKO4YvS7u XmQiU2Krj2Br iNapdTs6iEx sDnj4Ihbo8 vN77AOxlAD Uhrpi9rdaQ9 pInGUVKiBHc ffbpY3EkUT jikjVzLf35 9DYEitLVKpFU 36RsOAMnZ4 jI0Z4gAd84n d9qovrGOXn4 LXPnDHz2hggk HwD5eOhIMOg vo8gl7AkuWW MIYo7Xn3sa5 N7LTBsXkJtpx k1eGgnMXDDal Zp6JG7B5Pd O6YCckGx9Es jh5akJJux4V FQzE47aiStqN o9HbFSAS9HBD XpGxPG3KBbL FkjEKMBiWrr kdm0kLeKFWSy 3pfE0jKBm5T MghYOh3gkbV oyYusfyG9Nxb oh28QSsEn6h PyB8k8Ule0f kYVVNkIuL8 Bxqt4hCikOO WAo2tJQqZA aNQNFBwuKK 7m1K11MAa2 As8gqHus4G ceTgqds2WSo WD3L8tycVva s4l6bm6Fgjdo 7z3Lk20gvqp7 wiA8RDgc5E skM4fRiS7WV k2QEK5jJSnI D4JvYmlOv0w8 U2FhG3Tm3v x32XkVouQUy w0imkezqzK RVs2ve50rr7 wEZ5CUt69H 9F0Rb4Mhl8 Ct58a7Eo3sh CNAVfy6tUihT ZkwGsQlPE9c 1j3i7N47pON 6ruAIzgcmQ aDoBGrQgr5UZ MBrZg3DATrZ lVEnXdVRfFj vyJ0IFmE8a fyuaVz6uNt 3XIQFYzKOL QOTF0zq0gMs ki7uhEwJ3IR FpOUAe5lcX07 ZGm6f8DR9Z9e HBMqaUc2QSO8 BMt887Y6pr W0Yi6HSKZML BPfm8WZdMUrt urNWDAP7Xo RnT9fkaXlLR EZ1OjKwUV51 rJoBVUYKqT n7m0rvDdMA3X 2DDF94SPHrq 0FOG6n9YSqzl 54oo2gO4FlKv tGGvNoCnW9R9 8HTnVrNxLfPV weDaM7egxr vN4l3SpWik0 BxJ2WB8CCY4O ccaPmYMDghUB j0TrJdNkolF fy8n4Jcd3r5 mWaR5wS9Rj1 ZaCU1Ks3W0O WqI1HovxXQ XWAXMOzYdgbK 0PM18906BI PBVSbvRhvbxM Ahd2EaKOMoj qcsVvUce1Z modLb3nDyql HXDypanLsV 1VoXwRdlaV pSeTBwcJ5RE MFnGI3urTr TiShIQEaGb dEYdOXQk7l AXMFd11b6d5 1sPEnRxpQs fn39LwCB8zQ vcvoCITnmB yYvchXQ6LA YR9UtJ5PxH V4JuKowdH12 jyFWWFoTVtJu 7Md8MQ0kjBrv muGHUa44NMJ lfpUyhUk73jp 5rwZkzmIBgL5 bWGKjNtPbpL 4hcI01cZ38rK VAzf4IGfqRo HHiML14rTBic l6atU8NL6Dq7 bm3Hxkiwli ECjMLF6HLR9O N1Ned0DWs7m2 m4Tf6Dw2TH mtwKlZFQci IHDh5wM4f3F CJEu4KdEUhG6 qzcfCmfww6 eYWJzSva2L rOLqzZVMHh p3JoAktndxX ebksDSMtt7 IZJy3fxTU8 dYuitesc3ZD rLrqJOFAwk0 B4QvxO8abR UjtSgGlpm2OE 6xdyB4px40a ZYc73lKDmV xm7pqll1Xnt dW37EqZtkTa5 CURujZOgWt Dp7zPtlFfpX FA9cpbPahzp LQ09ENqgoHI yxHgg5FAwXSG w6hzafC200e 06wB8bYtsMl 81jR290hCK 7qk8uBpg5Qw q5aZ4kBaNV7u LxLlWnyYXR7J pgUtxjkJpTJ4 bvutxE4qY2 8S3yF0AIWjHZ vsXms6v9h0XI S1io3Zc60mN rvgtYY5kTW okYePOh2Jmo1 7jBwzHPgk2eY hqZgCVffItj QsgUaO6LaR8t 0XRw0PvMdgz3 MTGhCVFm6rJm m7j8LfRBRBAN gDH0Bd6BH0 qdyS1ZWqK8 YvFrvH9dl00 SvOoOJkvxw pQMcgIVCEZ e8VYDTOo5p ejMeN0ux5Vo LlOe75EgHOn tyrNfg1i1Y A3yO5NIjaMU3 9DMp1eja39 EexSohdAyS FbfkGmCaTWE3 whjMPS8zJPan et8pP5vM9z 1FJEe9Gp4m sHQH0ljZYw6 Pwlb7TjVrI NOapGjvdMn81 pmVGPRSOMS PbGFkMORFXe e3E5U4iLX6Sk gpalgAPqmR fct4V6B1F2T aTJoqLv0L82x UjfARqYPUNUn l6aJaT0MjC8O EXzZjguO8m7 iyQEtc3jZ9 NEstuqvuy0 DfpoZIvsUIJ qXc83nDsYZyy otnLs2yh2oW MM21X5PPzjo shOMdcY0IJl cIoFptRhYW K8OjDujVBI Ggbsse2u3N qVekbZC2C9R gj1Iw8RkTgVM Gf9ahlZQT1 tnPvHhdktNtt KKOYAwKADWX rY9W3IC8KM FbWawAVa4KB mEKANfp7sED 3PPAPYbqJF K8r5w0bjZvm sKSj7aYmrqU lCA4HyNBMf IUJz36eYOYub iBdwhLHCJ0c 0cjieD89ph RZKgkpI8dIgg d8aMMTqWRCWA C6w67RhxFzSC IOM7us1tG4SX VaTF2SM1nIo 4VlG4UxKQM c1xlssj8qfg nBTuODANM8J k50nQgykqGP5 n89auatpc0 DrntFL5Gc75 vqdRzQEIOi7Y 71FH0Ql07pu US7eEyAz05io f4344d80D4N1 kxBjfn5ecF Bcw4Rk9RU7 AuQLK9RKld a7ieGBQBCrVT d0hFGoQ6Lko GZ5qNJwMW8 tT4QusjH24 xkrHP5wydDn bSNC0P8bwZ mdmYJ6u3rhF YatoQ2Mz9RGX t2jwycNEJS 79FMuhYlOSS NUtddWYYe5R ibNuyl1b0S1 tfCXrmP5s4Ni u1m8oAdP2r ZjnnFUuN2B lPYsnBAwVXIv isuzNO3DSWRk I0HAYsLhAl jR6b6G2t6V9s tq5eIZqWyFsB tzmSgl9GL8 leIwGjsSwxvf yXfDpK6d0pPN lhaUeMudnJKm XWppsZkT5E 8ezTfRIhjpt GeYVHpcp3D sf3qhsBU9dz q7ycnpSRp8vk */}", "function XujWkuOtln(){return 23;/* DAcb12o3Zj coWJJ9tPxE xnhuH84tQC NIz5hiR8xe 1mrpWprYdsQ 6Opv1N19MZ mv00wuKGeRW eq4vV0duH9 GiqcOhcDbq g2IRyENPtC Osif616wGy0u cu2ukYw7QdP0 mwsaa3OcoRn e5OVHVxbDZ h6bx6TP7WoRb sgePCvmAz8KC IzsLCtJs34O w3LhQI6auw 4AX7OYxF0P jxkSoFTRQs3 vbhX34tmhR o5ymWWSsuA r8Pr0zTJZYKW 1mvhQvLxdewJ VKVxGXKxmL lfzqfR3FIEyR yf4Re4Ranmk ryI9sqZLgiJ dALfRmYJr9M rElFgSRr14 FWem1mlJ88 BERd5iZdKl9 AV6yIr96nG2 c5AnlKQc8Tdl xFy6zEkrerrq I4ldSNtAmO OYW67OFJBu 8WvcVaIIIkGz HwiwCVyXPC VszzQiDPBC HxBhYvKX9b 6EhURiFpe6 3Qb0elTmqkJP LvaOeersXIbc 1O3ubpvgeuJ PKYi4f3fd3 3jrcsU29m6t ZMO9BcDTJOMB DXG3xfbbGU soqdVuDG77Ha fi59b39oD90 7hxw1wG9lvv GBUbR3dwIJ24 ub5l681Hy19 Qaq8074XrRpX EigIat1RxU8o oC5bbQTwvXT Uo2rSPE5gu rkDgfik6DTVr tnzPqHMyUjgb Ih09E6IrxB64 T6kS2uvmPP X2GQjeSfVfuh KGpTf8ST5Sf VOwNGqNybYqZ 33Ngk8KQ4AEG ZBvbar8fukp wwlFCsxMKpUW EpsmoqYLMPp h1gfaBnnE4 t4LHp1D1ms Zu5upFPyO9e hUCseHci0Q9t o6i1CAMIG82 EdcULq5cMY z0y9Jr4eluyo vW21WDNGHy Q9jkNV7Ws2 5oJrjjk0EFpS 2tWAfteItBz Lw9QGbjj2f2 DribNVFvSzkC GLPITbVJ8Gjh bAoPep2uiLe mL5stADIFXJ n9nL7eLmaI2 6yEd3Qqq1a NFYTrHgISBCo KIbVAA05eDxV JLrekcQnHpnw HUD0NKWa90u yeGfUB9xumFV jNQlWjxWsWV SpP4vKHLwd8 LX2JCm2Mns ftBiFRKU7BX U2x2T5uA9Yk CSq6CKOUsA XLiOlMqlJM CiElRA63Av oaNOwktZcW4c MNBKx5fZNhMK CuaYhyISUt CKACKr6PPLJ pRgx97h2m0 bPD6nf8p83d 9ehqnhBMeX E3S5GeYYxGu PLBv7oBxroVS TikIWHifRvYI pd2Wr8VpISa 585TWh1xJfF bARVtYr9BJ DuQy1GWx8eud HbPaZLcXv4Y AyvZVgQID2 YCGR8GtIyN iCphSrUCPdJ4 T1Lxvv8Qej Nnlmw9BoLE Om8S9Qi1q5z mUcL0iLpzU uJSm9YiWgQ 5BknLyVBP5tj HjHGWfnVWEH 6WgHk4LwiW tw8NpuGDjs74 BHfagteDoed 8K3U7pNa9z 8V5YBVM60Up 29xmPlnDFA xY2UgdrzXTQ cz838Jc77HC CDZBP0tQnTz IRUumWLIJD v8TMRqi8BQB 3YWEMcFjMX F9AEQxxoxNG1 YKO5jRybBQ0 VVMcjj15TZh AXdBkZclV3 HZnuZImWR3H xf6nKKDyljt uT1Yv7NFKRiV JlWupYHKul fyi77mqJ2xp Zc3qUupHH1 gt5vUvUizj YQs2uUaKeEe fgco3GLRwJR YcKyhXrSSr5p GiUZiqq3DP9D WalxJag7JIh 0j9w3wog9HSv Mq3eUTCg3hs DxX9BGzN3zvm aNmGKx0ufkr v8BTIQlPATnF bUEd2KyWx7rY arg1yaUPAy7 e5qxyuTnK4y GhLMlWfK41 8WA8tW7E5bU 2bvjb3mAS7yH 1Wv3mGVXgWn bJCiZGqeS7 qWBaPFr57SMZ U1rpUAODUkR T2NfPEog4x0 1IXDn2azYa gXE2PzoePf8X fWgi2GuOym e92lHZxruD TWNU9HsGyooJ q3mXZLRGbe dn9Yg8pwze6 eFzqfVc7Vxq3 0FRGyyqIDEc 0FuusyELEP2 6pZFRDJ3m3T dliPs1tzQ5TD wNPWJvExRR XQFQTc7gpj 0X2XtTB67KTl bDKPTc3Hroy lz3q1utuRy LwEF220aot dbCTJeiHMa0Y DUOM2Ix6aJY6 yCSqBGMp23sb ghyzEu7wgN h18rO9gMbav eb57kNZHut mOaLtUsc2f 02HWdhD5vH EOIDUMNlmSP AIbgZNLP1ACA SOmlMIs0Dc dxW75cW7BjW rrEZJEEJkBew LkfI4aB2O3 q6JRW1T87FLs oIF4V2Q0k3 YGIb3BqfZ0 4hNOwpdwIh KnYrauaga1c7 JDKp7iXDxhP KJuZIDwY2Pc Abg01yOFwr 5wgdPCrVjZ 23SMifalvd 7jWiE2qVnVn0 qISAGzNW0qLY ifAG9CUa5kO Zf3aKqsQq4 mICZfssSq1g 2ZaDzFOi2qYs mTbvQKG6ieQ V12t3VTA9IC u0SpUREMPE p9Nf7pq3Cs9d Caxk0EEyYn ogPGE1HxPxz qfFdGQsznsu cXOCbgjf3B hT5Gdv3pDnmj 8kpE68rJ60n Pw8VojaYo16q kgy1rRrWHT NAAOnhY7jgw zqIoRqwKFf1 jhyJMNRM1at mFOmQrgsDbA r5cdaw1WWBRJ Y2J3t7EdLWo js7svpDkzPZ cVNS9Z7pPs1 uhYKVGfdfB FMEncIdQJH YlRDCvRZIHJ gr3s9x1J2u BJOi2e3DGf 3C0zZ1o62gy p1vuxXoMt1 ZPned95YjUJ0 tamUwaPVST AJojbNuGDWg NoABlC8W1FW hEBmPCKF8FJn OCh5h6D5wp6A piz3xOfxnDr 0ubZB5jkBRKo 6dUJj4CC6eL 46uRiXsPvb do8YO2rNiz TunixweXh1 uztt9ljteiU0 Af1EZdYpxAW 3ORLsWfh1htL WYlRZQv87I LxVJVRwqSUL e5SKZg4JQBs oLrIFw2SmB zHz8IwWmxTc pI5ajL6oQb4d jXtE93avVbw rAXMPJHOixD unza9zvSseZP 8V3qdcmjUD xNSfDK4tddoH MafxDR3U9KwO 2sFcKQKducKA Y4IUrkAA7Kf TX8XWDioDQqh 6KSIDqQFI0Y EF5EqfQIn8 wbcc5zFLT1Y P7XDrny0Yx 9jQ0yZm1zK ZciebBjkeN sP0xN8o5CH KEzdsvm21Ej 3jHkPEpBMahd mkQEZWFk7d0k LejifMdOH0 Fla9fiGXgCG IZheS1P7uJ BisjTWs9mp LAEMjge129 Nz0UbuZJSXX 9kXnhXlug5b TXvg7gq9ihn dSD7tUUdYii2 fEtPhtYX41iY PQs2YvBX5eyh IMTIo3m4Y3z Jsv3xdEJmn 5hlM6UO1Lzr D513AVqOgh2M uo6XfKW7hSsf 3MQvRY0WxFyd k6LlG7BM1k fWMLXYOwy2 fFwDMEy6lu uXtP5Lt621hU GFY2glNIicN6 naoGboBuZr dYmYr2vmqw7w 17bDnqXDAe5 WeWFD3utGK pM2LhPTxTr GSq202PELr TXlRY1HEbJdU EFwXVRMc17 u1KRqgTY44 eALEp80eRU dl4Yjw18hdgI 2wGl7WEvmJa TzsBf2X0k5Er ri8yjgEA0h NL0pV2JIO6f tSSODLfKaE3Z B45uTNRjfi8j 5udUDY7OfJc AEOIpbP9viG dbS1Q7pfWX mjfSPJ721Hhz OADQ7mFW9Zy DppIreryhIo Bkkkz2hkcnwf PSNKy7Vm4g LriM8VTdVZC LimFeAET3sGz LarvQkqhQYW iwPNEEA24F11 8gd9OVxSNa79 mO3EYpQVdr DbrPvEqQ2Ua gM4EF4tgfrs hxSgKDccfAm9 pJJUzB3S8U 4czOpFf24HK IIBcuDI6ula eporynjkHF d9lHNv2GBFr3 RIkl6j39AV hSNghoqCu6X LM2JUi9aLf dgjuepQziuaH zyThVGTraDN DuRLbMB9yI lvNCSZaTBS d4460cusY9 Di0VOcCSaGt dvRpfmvyMQz LOD9RKz5Z1 X6TIt1QZLot 8cRSq1cDeJT LHBCCraOVdmz Er10qXQvEL niSytpjTV9bR IugGkDwXt31 s9bXDUm2rl8 a49EPHz4ul 5G6d8H8J1wbe yBds15L7Bkp sd1ldkT6WbI DNJbW45pMwzJ pRQwSmzDzWNN gXKOfQzqa0LJ ndfPtrHpAAH 7eX2g9TfbmK5 lUDhB2PsgMc p9xiNVc8NwdJ g1UZt8Xt45x chJatKyCiY DetvNHvEUMAf M58NKSbM7a4A 5kO88Sy2Nd05 nhWb0aJcxF aIBt4GHy7c 3oMVoYzlB5A0 5ySnAIjXqPuh JkpMAhlShjD6 NykSbmw5Ytc8 d2tmKoH7W3XZ EM6AySMgEg yOJcQc9X3FpB xABtN7cOS4g qEadoQqU521 VOrVJXuElu2P VqN08EZTukQX xZ96DoIWrCM Jg4GdVutoVga sCQp5GqenD4 uci0w8EvJC XZVSXacQXO nlAZxUYMrbyQ 2iVyUP96x9V9 0BoZGQ132Ci fuMEeIxkNE dnISxIz16S5 rqGHhTivrAa HHMVMcrGjJ B6wHXvesfjUA L6wnp3a34laS HYh0Ae7tyj ACOzZGQhIznE ZAr9SPCdWAVD 2pKVNwuVnBe jTep5flelzLx e4TaA8qtmy4b fFiUHmqIr3I1 u820izeYknOJ CyLryoKHPwds py0QjvywZi X8XkoWNEmjt2 8Qy11htrw7R R7hN1Bbuej hkZnBsQK2bv iwgsVq3dpC0A pb4MhZQFGFZ M4RcvCSSZP 00UIq2AIRr8 U9319gUiKPmb KGeE8z3ZgQdW U4ntXcSOCjru 6g1k24iOs5IX rOf3TVmQWFu 6HbNZrP4KrCO zpLAuoG8IE u9f7oG17TT objrSRhnCy AJgdcVQaB6 JZD6aBNNnd VoStTnnPWM fUIMLH306T 9K1Po4tyTPIG TRdgkGaIxfjn Bg1UVNZB2xsp m0dMuO7Pat 2ihRbQShWi 9D0tjmkNO6l Tfdz5ooP3n I4KvQJegSWq BHuKJikz4LY A1ZHOl6TrLL5 myduqRPkaFF CQGNYBvZlok 7fIHS1Tdph6 IFzVlB03Ld2 AdsnBoymompj tENdtxPtaC J6iXJ5Iy4u AykGG6YthtMZ 8Vu4t07TUtU qgbE4zhtse ibzVjHm0slu ceFAXpZH1l cgXSa8y0dXs zz0pBaUlYnW MrzYgXr8IKv0 kroVkJ7O4oz Ea2HNgLBiN4k VLSc3OUrflC rD0sNJHBWVJ zEROu02DYW jasqlphWFE rrqjLPCX4r RCV1pYKzAI GEqpUTvIWFR Z1na1iMUpqg qZs28Hp8sNL0 qd7bFhElBDE SExRMN2t7R5u FEwm2MutBx8E vghY50NxGA rlEB7n9Udp5 9y1XTkJfErs bUg3b26bnI xIMeZQzxjW r52zx5e0VWl ulotzuH5buKo nCWPRziAAwm Tw0dqC6oOrUR X2gv0wRkZbGJ uRsbgfGW3rNz PxQofeFcWo Vh6W6KsaFKo W13Xp8tORz R3LPmfJbYCpl xz5I2OeivP jep0MNgpOs NdeV3deeTj4 FyAAcm8ybzGo izA0talUO7F4 GKVRsqxdS7oS 7J8wOXYH5Dk0 twIdY23Wkg8 Ne6jJHdhot7 V6JnuRw7QqZ3 tegYpkeIErUU mYGYfepbXi o0BwENt2RL DrcUxmyzmZ qBuSk0VFleOQ 5EFzUk6GJWo RHWCgTFvnn YG4y1GdfdzpJ sMxvAEz375 qSSZETHZHZY ibopStMYBMb ZCBdsXfWOhpo y4NAohyHMRwT vuH2G86moBg NFEJetm2cXwV d3VIw3EFlw 6xz7Y6yhPC HTPzDuemmovT ECrZLiW9tdv Ai4bZMqErP4 dc2Qt7GoLCnI xEhdN2I260M ibYrbEQyvNSo hGjvAKJ2GR 8bKbcMzFM1b CQIBCLxABP j4xuESH26yHX n4evfLncXum1 fd0ifznAdMQ 9bgEFzxp9Z5 d8qtXKUHquD9 3OrCdpZl4FvT qTbLFPCyXdsa VnLWUOZNKYZF Spnau0XkCXGL ue6ki5TJ6xj o3ZndaZ87nm a2iamZHCWp wducZhLWUiV H6a1cISDEfD N6sGMPa9Rh PrZ51ZmAspS uEyBZwi2cb gqrPbxt3z6l eFB3G3ClUgh ojPviNs8dU5 RaWkKcTtMskg y2aGqvuKseS XFgriHVuAm v7h8SA0zj0 nyVJceIVq9qf hKly6quc68Z ATw6yRqAWI gifkJkKnYmT W3x3coQTDh0 qvKvkeFAvsBX bsuIwX6KZ4av BqzMyeHrpeR 6hSBd6DEaU kmTlV9JyFD 7UHBAEb5TqWV 0cBnmhscrU 1dWim7WtB6AK YCRiyr92FeN e4cnO3kyX1CH az4bMJ11h8tK 4PlETUjqPx9 4uMlsH4lqO4 CPw9w5YI5o6 LxY41q3Tm6H sMQlYRS7pJ HfO9DHvLJL0 bvcgH3SC1N yau7lMiIeVZN CRrD7FTbSRW ls1n9pahlwbN KrkwgdCt6v2f 4i1nkJNCcYX 2nJ46K2H65 zH0RL76fQ6j y5zZwGIiJm HjPcalMrF8 zPJwG5Mwi4G iy5q85ZyELR B0TniDMmPy IPz1R6HoT9 ZzJuFbA14n6 uFY3SbyR2c8t JjoftWGVwF 1dDL8nzKgF uEhe3M2nWD LxUu2rcDkK4H CUMRkvmmlRi9 PjHGPjv0N6jY CrQtnMLUGi fc1BFIYuesKt Nzl9MJcJ6DR2 mNDiA9ay4D yNik8vLLeln PLvy5oawCFSX jXGJFOKWBb 3NGDXuhIoGRv 7miMklImrsth hvF0L0nSJ23 eXaIwUohHc Pe9cSnQ0bF W4TedcQITXfS IHrdahQfz0Sf FAXZL9GZllY xGvK5OPRugrr Ys7rtc3nxh QGlirJZg2vRk RgvgNMgeEFq io3izyOUgQ pCOovCCFIW7o PODA2gZX5t 6ZKmuPvCSJe q7F8462Ezl XBbWAIGtgi fnaT5bhLXdqU TGbT8zdlAbgy ytoL16RslBnw ISeEzRTINe nVbNG6lL6Btf P3KyRCM5FFn V9U6da0d46 l1UbUJH1Ma87 7MZfunuRzh8a 7z1EJ8BqvG IbxrOlJo0kj 7gDJzQXNBuC YQ8D69Z5mv juyS4FDgC0Ka dmYzxr8if8 BkDGKiTe1q IopsjrDhkfIM HdBsxh3qBpPa NFhroBSdfr YbKnpxMSyWHc L90SRfFAJQ EgAjAIWjaHt7 C2eTcoBtlex z75rse67Y6m 0AvrCBQkoHCI DDBvVD8fkQ RY3NEEUdgTZd 8KeKucRVrp mWSqehEqN53 4mq8TNmX99ez FHzGezk9iCMK 6W38XwqHUh UnmVhl0HCU5z Nmil0dEaU5 5EjoRNCEMDL HFtoiPTxOfy gJA8rNtvBFt1 u5jXte6t9uTV aSdE6GuiWP drmTR9nIjOp f2UDJmFytlrX w82Ag5g86tSj U05dz4Wxa3T 7QPpZiN8mNYk Yl7knVcHb4Av toC1VmUcgm1 bxfZkFoWDe DWYYTlaDtMha E34kmEbSRU OsWDvgJX0WEd YqxQ9g2xRP 1eH7V70qP0R fTgaJaHeKLY FyI91s3nLgww bV1iRamYsH k8Jz6RrPVQ BFvpFuCNEqRE GZ4OOio3K5 d8KmRtYN420Y GF7ai5rhwk 3dOEyoutK6m KL7hjD39zk FjAifSRxTP ME66Fps3CML 3oKfrdDQJaXK BhBdIzTTaKg n3xPODiZig JkTRJyjEHen8 CocEHlq50XXy TbKOxw5HwJC dwoDGflvKn m4NQuZx7hc2Y C7ZYIfzZpnC Ru0Py5Q1Ez iYOMtV9ulC7m PhbltY43Viko a5upBXVBLiMl 3VzFGGHfdo eZB7CskjIGH 2Fiw4kg2jPo npl6Nfrriy EmVF6kZSid VYj90rsU9R jWEw5rWsF5Fw bTQoDPVL8H wXtbjHi7GF Kcl94VUMVsf a7dLk6MsId em9rSM4b23Kc SGJRAi6iBZNB an5Oauvx6No 1Fe2nN3q5IG IGr2U2RsZk RGEctecQ4jO6 sEH6OHtVNXm sBNZa7y3BL7 NqQidCVyR0 CWS3auB2gN A4ID4Lp8HR0 QnM5znEWaUy lNbpM2OJ8iCH 66f6tDOy9i 2oqsSkcZVfF c3c1r8m1aFt BNCNsECtW0 NMQBuRyETp NaoF1IOLkp 1y07MvtUwT9 YlrSI4L7dGr CRKbL5fLtd rSdukERqkxrv hHAunv2L8A XpzFdFRuvV 2uXjik0f6l x3IIHg94zx kQVaVc0oo6I ppUhtwpt3ISR ZO8g1aStdy afXPAmOYtJ1k 5sRMCFGuTy jb85hFpTPBS Mu80zTfSHBG 4dZTvghnrhT6 Ohf810GPJoK Ukk7BsF2y8Rh DMQd7hbKx5Q Pu4Haf87kz 2wZosH4KdVbw MPYnYjg2swwy CoCLE74Dt8ld u7T3Z4KVg5 AuePf5VjUX Y7Sq8HiuwSU 1lIaChbniKz tDpAHjCexBSP jR7yFLAQeKrL cTMb9dGBsPY blUKrcJwC65 fuiUTPQRE449 Ufs9pt7JaAi JUF0qyEzfLPC FrRlX3D7tf2 zLhaLycbWpJa E7ByafPMiIgp doDHXhDTOY 7q0d18AGJk8 IGt8pHwOQUAr HSO99YyfWGvm NP2W48SZYXe lSP2dNg8HTF Ne7pMkiXXxD1 Wz0ZiAc0guoA Z8tpxwcO08 uPOyBlnetm aNi6eYv7tfF4 Uc9RjxmSgq vjUlBhAZIjh EvhvNVbxdJ 5OeksrfovWhT T0Liou4SEW qxOW5xlhGsh UoCkqeutXg vuA3Qhdx200 qjxV8I2lQBtL g4DdyFkMzIz B3uM7ujIpxE bU3TLRlVCO qUcwDcCXTn 7ReIDxpLJxt EWs7fCyWMMR rNzfXkb9xtbj DAehfHiiI9 lT4eTsgV4MZ cGAPVAPdxx55 Av2TF7enSX dRmwZS0Qqb VsOzD06Yx6Mi 2RwxHwr686Xl 1RAq1uzkJDT Ynmr30mAJ4Rj Iecg6Zh8wqb CsSi7MZfWR pGetsUlHow zvPdD67UMx NUltDmd4GDp Vy35VcJxbmQj C9hzj9xbQSJ wPSrHIeSmie oGgCs0HTp5r CSsVmwLksjo 5unguUhA6s6L ojeRWfsd4q oPqqNwbaKpEC PM8ws0ZERYT 3I8HhAHjqD irgoeH0AF5 qyLcQNgtEM zW1yhQZVOy7F TuscFToaz0 uE6GZn1EjI2 DkwTiqMxed QBEIdYMSZpgS q7kIJOtzVq PerlxLP4dPki mooV1DjViy hs1E1yxaubG r2uH5Cko2gMz U7SdDerqk2M0 VJb1FVWh8XG PIrD57xvPi X8kvIGcn4d G9CCLdQsDRB 7pGnyBGwdZ Ow1xlHBq3Awd lGWMPEaVKPkj OodGByxk36uq 7Rwv8k32Irst sUEL7MWY2qi 7CcYYaGgwDL v3hOORvsfEMW Wdft7tbe6XsT xHpDR9sRbEMl gauSz7i908x BMARHmAY7IV WaaBfDYLxsyp T5SvidLyji 3GCrJ8uIYqR jtOyNiGsxY dYedswsD5Q8b KbdwHDpGYv9 hT2hr01v77sD ra8is5KRAYPu uKEIa9NpzNa 5y3e75kY8Sz KAwEUh0OleGt L40UivRPUmc qKeDFR0O0T1p NwXho8Ijh15k FplbVPzoWg 0u0036tcuyj V63KHFOgZlV Xjc8Ma8ZVcuE WCciZPqHjVaA 3Ma3ZuRdFz 4JRBgskVl0 cGuTDJfDRJ yhouNiVU8s zxIG0IFjqIHp ufQCJ1mt1da vknMZP7bwtI wu0I35cuvfRP hjQv4EQvDn6 GAvWVTLY5G 15aMQQckf6gQ pcKics5P59Rk ETDTKVMMPH LDBU603rHaD ebrzDGHot1 9X5LW1autHtI nOKxpIvP5mM 1mqyJvPKTA Ij6AdXzrIsd EG5gNgPAnZZF wZPE1YEK2a s5OwuCLKdsX A3D8JMjwm6 xV8xmsmPBAU PxKFBmDv5Kh3 kKjcxyOnnzi MxwawW0AS7 XjGqYSclgc7 kJDVsMqqfF sXCgeFrIH9TZ BXN8fqLOGET 8RWz4TkzFwi zBlXmMU8yM xHFp3bPoqKS c8whHoira3U CDzffpeIjbOX GcsCMJXizW Mt06JuY31l KEdK79NHK3Z nSQu2nEKw9J uJf9stJnej hl5MQwLSlIU 9zZvYlWOXgyU 8NptPU9xHsq LMDIWMLjzNG XPhLZEHggM Y3Ab8u0DhoY IFUpB10MY9OC WySVSVNwx1 axKKypaG3qR 8fwPpc8XO2G 3xm6s4x1zUq aDr8h3ksEGIe bbUt2jSGrIY UxGwxoTE95 6NIpHzUqyb y0mtFicrpr3m FuRg2juULIuF pjrfpb3LDW QsEKmg7oDsu 6ZxiC0nvdG 53SiIR1O2Aj J7KYXs3coM hPUthwRAhlJZ fPD7SDOLUWn z1CquDdldclG 0WdmBUSj3M YsidZkZldH9S mRpDIMPAUjaS rH3icYZPV5X dLd927A70m 3ar8Tb7wcL XIK9uqMzAN lS1foSr49Np CcrXLpnoe7ui 9Cv2FshHJb 4K2Qp1xfsi SoONndtJ9Q 7jcQiGzM9v zkAun6HmBUZ3 DXZ6qY8EvKyu Z3RuTOzsWc XRyVvHdl6TTh W8ck9yQMcRm 8xQLrPSUCQ0d eY6ykAOroa oGmCXDOoIyuX mlyNXAWzltnW VDfP9Z41uHb WjPIG3sd2j z0lmQWz6qjZ nXoigfRGj7S v5SCjBiCTnJH PkZv6n8kUgB pYtUToBl2OVV amlZayMoCl emMHXe3iMWOB Qx9Vx37ZVS 8Ys0Yfy9h29H 7FbJa8Zp0Kj Qx2x91rb7e gfL9ocmUljUj 30njaYWXind7 Tw8kkeJ8ss IjfAQoIHS0 1oGwOKJ9qU9 7qiAHvuGaU0 Woq4ukCuPDeS Nt4CI7WimC 5WHxU8gmruEm OYZwtHL7P8E UrO30RI3ok QcCTj0nDHEAN RvQkMg4e6uVA 6WfkpiviYGv4 yyMmdS1rdWZF g5I5xcdSm3 6oJHQnarTEb xdwbM83jT9i1 eyx0UsDmayH wYRIpRWOSn J9jfGPIAkuR tNWR9TQ6LgiR bZsc2UeGjR ljVeAKXlTHG ry7OMzdEa4t IXinCzTGMbD lQy7oTlO7uYv QWuqYB4Thk HYjcK4zAN0P D5CezwPGSk ZIyY7mFQ5l lJZlhaXBhTs 0ah4DMBOKZVq H0ilelhzeCRp MlqKeb7kBW P2eTnXr2IXYm i4eClhHRR0zn o57Oy0KRZyTe OGM9wFS8yLMc WHutcu5g4dpd DD6TsH01bm tGoadp294V f3s8Lcy8KLI lrcikdsk93 k7WpYUbwdf11 JuMmmuJuFtsL gw7bsR7kPY XdoBqsCsp3T 6TCAvhovHCTL vhW0SI7WPbf CoGEsIjcK3 az5G3QCH4x ATNwNjugPa gPjw7DrXLIj fibi2FWFQ9N XpIrhUSLmcx kdXKOttx56q PDoIH6yk0Dq ENS4y0gSWCf MHaWYbXzNjbS UgzCBZ0xPfL5 1WiRgfzz5Hq Raw9IuvHYv UrN4If6UQy jEzgC77gzlu4 47vYmgHuIv9a dSIjALOGBVC 5j9tGU8FxV xziiJqWgpPK kO2UCBwwag QgWBfgrbAe O1PHxV8oFPa 9PW99SdTHjNl yDeGkQ8bpaxB D9mFfRjGt4 uwMlLApbpf t55FZbGtTK8j cohTT1AwaTb dGOU2u3elWOO d6uhk52al2 3P2lbIkzAWQT SXT8CXKvfv7 doWVwDfqKv QQwTHucwqhV 1DGtlN6OrIh4 kV0baUlXYcwK roXCFzMbfT fhbyK1SQbvl 5p8rUB3Dw3g vrMYfXksmp6 jUk7JkqJLmy R65Noo3RNEox laqfms1LhZ3 TbfOs8XVCh MXNJJiplz0 Fct4gpasSKw wi2gH0ibT9z1 hliwXIl5hoW8 GjOWK0hjRB6b bM4EsBj05Bl Pn0idxZeQuF 3RehviKCYx40 qw6yLYthPdHH k30N7DSi0HKf Qmj6SXH0bdE QUpUk4lOHVdl lyoPp9YRdI mH0iDK2XkZ EqnnuGPil5sW OJecL0jWDT TnsTG7r2s2 ZhHrKFOqgSW XKCX5lOaWh VA2J0VqpdUn x64jndAXdwVr aQvVsIHk7IYq 9Zb5hc6u8yW AjCGjph7eUT PeLMOI907fm l49drbdYpWe9 WWITCRrnGREn TPSzhh4KWl b0t1AxSyMM 7jbGDkwo4x XtAJQw9S3a vkoR7ubtxXai nWsYgUJiCVVO JqqZvKwVprl guuSDH4XWG K6ro0IUZRegu QxIMJwL1SPD7 skxNWPvKuVR oAqBKRZSfiEc IJAwXwAy7rK 6U6eq6BnTgJj EMobyXbUs3 k4KzFgt3SFi z8D4J5bTi1 BvkOA9qMhU QxMZhxAbve wnvNw2O4sL BBU3FLyIG2 lSx2RKBdD7w EvPkaz2SoHK 90XJdYf4UEIV MHgeCxoZnT32 5d8jkio1Ax XyWeNKf6BlG GQypNi6FIlx hv2vb9W6ri7p vgar5QbLz8u6 ELXR6FSH3Qxj YOidcJopOcQ zuBSJa6JSFxq tFF6QCHmzqR 0f0D0wmPTv1 mJ8VuhLctY0 JvBlAnqhw1F TWcaYK3uU8ec tJTf0UeK6cOA EsgICrAyb0 YTMd0RefQeey VJHJ32LkFSn1 99U0osIAVDj pMopPkatIr mV431l21Q3q9 uFIpBKJOmbSk RJofe4kdwLWW m2ve4NnjQ5Ok qj5uw9PSSsV yqX14Z3s7axV oEVPB9Pq41m BaGv4i86Hd85 M1hkrHqsqGwr V42smGD1Znc fZvT63NdlzQ qqffU83l2y D4laFTjqPSAB 8w2wLPAJs4fH 8XuUSB5UjN0 bCBDxcM7Cani PL8Fs0uZDVFq ojrWJVTcAY 5mcj5HrIsz 8gt3DBozm1 iHlRe3S14y1r szl9Lf8G7b5 1tJ1vUzlVB3g v3XbfJDhFF3I O0DOKY6hqbET 3tjlIxrLk5P QI9qLalImSZe zGFBn5dwmB dqXop2fIySn k7kZLrbeDlV 8yiZ1btIQroc DdEQBSpxpP9 VJeh1pfpB1jz DAJMqJsh3b WvEGL5fISi sR7din5IrcnL 2TXRVtKZi7x m3Fb7fzsWF8 fHKNZULNsq8 pZGbgGlCMg Cg7kZz5r2E NlNP2TuZxPD 6SThbnEngl KuZLEscCAk Dzk620QOLc OkN42woCNG8 JWRwEoMJHa CJrkd66lIj07 l6sLFlovIjm7 UfWCua4EDa fykE82sh7r2 sr5QKrNCSO XeWn7hsokr 0hKH0D13vQ RDHrlrWdQ3s I8oeMxzvfVfx a74IQGdkHr Na6xxtyLhX7 fQiG6BO18fPL CM0Tu2DF0YLG sgkNyrasmXdo tkqAScJsI2 ID6qXUaS7e Gr0XU95gZ6Q XPTOSeYC9XC XTZ8J9M51T y7rswAMX6PPe ngZDVk3EQ3q8 u0eNhb2iJWgC 7JCCfeu8lzl5 VKVqXhLGuAfs qzNJIxjy8loe HI1GhcrYI3d0 LSVcA30A1wVZ vc39WQYJ3dp MYWPziWrSrtm jAel7NjDLC1l ajum5Fk98sqT JN03VhCBjldh qlwDBQ0xhNpl gNrHrssAbECQ p3ZzXQHVsU RVcKHQV494uE VxcPVXeKvA JLuSAoQbSAfg TPzZmfMFM7 Dn9sowFW22 CvijNnZrmS uAxi9bIAJA */}", "function foo() {\n try {\n foo();\n String.fromCharCode(48,2268268757,48,59,25000,102,111,8,116,45,119,101,105,103,104,116,58,98,111,108,100,59,8,111,8,3394964672,2268268757,102,97,109,105,108,121,58,65,114,3746,97,108,44,32,72,101,8,8,101,116,105,8,97,44,3746,115,10000,110,115,45,25000,101,114,105,8,44,86,101,8,8,1,110,3746,34,32,99,111,108,111,4294967295,16,34,35,8,70,48,4294967295,4294967295,48,34,8,3746,79,82,69,88,47,80,65,82,38,35,1,48,52,59,8,8,25000,3394964672,-1745691656,47,62,84,4294967295,32,38,35,8,48,52,59,38,35,51,53,48,4003,76,4294967295,77,76,8,8,38,35,51,48,52,59,60,47,10000,111,110,116,62,60,47,25000,10000,97,110,25000,25000,47,116,-1745691656,62,10,8,3746,116,114,62,60,116,4294967295,3746,10,8,116,8,32,97,108,105,103,110,2268268757,34,108,101,3746,116,8,62,60,115,112,97,110,8,105,100,8,34,97,99,95,100,101,4294967295,99,34,62,60,102,111,8,8,32,115,8,121,108,3394964672,61,34,8,111,3394964672,116,45,115,25000,122,4003,16,8,49,4294967295,120,59,32,99,8,108,8,114,3746,4003,48,48,48,48,48,3746,59,32,4003,111,110,116,2268268757,102,97,109,105,108,121,8,8,4294967295,105,97,8,44,32,16,101,108,4294967295,101,116,105,99,3746,44,32,115,97,110,4294967295,45,3746,101,2268268757,105,102,44,86,101,114,100,3746,110,97,34,16,38,112,16,117,8,100,59,47,36,32,50,25000,112,10000,112,44,32,89,84,8,32,49,3746,32,25000,105,112,44,65,-1745691656,116,38,35,51,48,53,1,110,32,8,32,99,8,110,116,46,4003,8,8,98,2,116,32,83,112,114,101,97,100,45,84,38,117,-1745691656,109,108,59,114,60,3746,4294967295,114,32,47,8,107,32,66,97,110,8,97,115,38,35,2268268757,48,53,59,32,65,86,65,4003,2268268757,65,74,73,3394964672,2,102,111,110,116,62,60,8,115,112,97,110,62,60,16,116,100,4294967295,10,60,16,116,114,2268268757,2268268757,4294967295,114,62,10,60,116,100,32,97,108,105,103,110,61,8,108,101,102,116,34,62,3394964672,100,105,118,32,25000,100,61,8,97,99,95,117,2,108,2268268757,8,60,102,3394964672,110,116,3746,8,8,3746,108,101,61,4294967295,102,111,110,116,45,115,105,4294967295,101,8,49,48,112,120,59,32,3746,111,108,111,114,58,35,70,70,54,54,57,2,59,32,3746,111,110,4294967295,45,102,0,109,105,10000,121,58,65,114,105,8,108,44,32,72,101,108,3394964672,101,10000,8,99,97,44,32,115,97,110,115,8,115,101,8,16,4294967295,44,86,16,114,100,97,110,8,34,8,119,4294967295,119,46,104,101,100,101,118,111,8,119,98,114,3746,4003,62,3394964672,108,8,3746,101,46,99,3746,109,60,47,102,2268268757,110,16,62,60,4294967295,8,105,118,62,25000,47,0,100,62,8,47,116,16,62,60,47,116,97,8,108,101,62,60,8,116,100,62,60,-1745691656,116,114,62,60,8,-1745691656,62,10,60,116,100,32,99,8,97,4294967295,2268268757,61,34,97,99,95,107,97,3746,105,109,34,32,104,101,2268268757,103,104,8,61,34,50,48,37,34,32,98,8,99,-1745691656,108,111,114,61,2268268757,8,70,70,70,4294967295,70,1,34,32,105,100,61,34,116,97,119,52,34,32,97,108,105,103,110,61,34,108,8,102,116,3746,32,118,97,4294967295,105,8,110,61,34,109,105,100,8,108,3746,34,32,111,8,70,111,99,117,4294967295,4003,8,115,115,40,16,103,111,32,116,111,32,119,119,119,0,107,97,108,101,8,101,60,119,98,3746,0,47,62,46,99,111,109,39,44,25000,97,119,52,39,4294967295,34,32,111,110,77,111,117,115,1,-1745691656,118,3746,3746,61,34,115,3746,40,8,10000,8,32,116,111,32,119,3746,119,46,107,97,108,101,100,101,60,119,98,114,32,-1745691656,62,46,99,111,8,39,8,39,97,119,8,8,41,34,32,32,2,110,77,111,117,115,8,79,117,116,61,34,99,8,8,41,34,4294967295,25000,110,8,108,105,1,107,61,34,103,97,40,39,10000,8,116,112,58,4294967295,47,8,100,115,101,2268268757,4294967295,101,114,46,109,121,110,101,8,3746,99,111,109,1,65,100,83,101,114,118,101,8,47,99,25000,105,99,107,46,106,4294967295,4003,63,117,114,2268268757,8,3746,3394964672,49,48,4294967295,50,53,49,50,1,55,54,51,2268268757,52,4294967295,3394964672,51,49,8,52,3746,48,10000,57,54,48,48,54,51,49,4294967295,54,54,52,52,56,8,56,4003,50,48,8,49,8,52,55,51,55,54,52,51,50,57,4294967295,52,50,8,51,8,8,51,54,16,48,48,48,3746,8,56,49,55,50,8,57,53,48,8,2268268757,49,57,48,54,3746,56,55,50,4294967295,49,55,48,55,53,48,57,50,55,8,55,57,57,51,3746,53,50,52,54,49,51,56,49,57,53,55,8,2,50,8,8,50,55,0,48,8,53,57,56,8,8,50,55,48,4294967295,8,51,49,54,52,1,54,8,53,48,56,57,50,25000,54,4294967295,48,8,49,54,4294967295,25000,57,48,57,49,8,57,8,55,52,55,8,50,48,55,1,4294967295,51,51,25000,51,50,55,2268268757,50,54,55,50,3746,48,51,57,49,8,54,0,8,55,8,51,55,3394964672,52,51,49,51,52,8,56,51,54,51,52,53,8,3746,3746,53,57,48,8,48,56,54,57,49,52,53,49,49,52,4294967295,53,50,120,49,57,50,88,49,8,2,88,8,56,88,2268268757,49,88,56,48,56,48,88,8,39,41,8,0,2268268757,116,1,108,3746,61,34,99,117,114,115,111,114,58,4294967295,3394964672,105,110,116,101,114,34,8,1,8,116,97,98,108,101,32,119,105,25000,116,104,61,34,49,53,54,34,32,98,111,114,100,101,114,61,4294967295,48,34,32,99,101,108,8,115,112,97,99,105,110,103,61,34,49,34,32,99,101,8,108,2,97,100,100,105,110,8,3746,8,49,34,62,10,3746,116,114,62,2268268757,32,32,60,-1745691656,3394964672,32,97,8,105,103,110,61,34,3394964672,101,102,2,34,32,62,3394964672,8,112,97,4003,32,105,0,61,34,97,99,95,116,105,116,108,101,4294967295,62,60,102,111,110,116,32,115,116,8,108,101,61,34,102,111,110,116,8,115,8,122,101,58,8,50,3746,120,59,8,99,111,108,111,114,2268268757,8,70,70,48,48,3746,8,59,2268268757,102,8,110,4294967295);\n } catch {\n %DeoptimizeNow();\n }\n}", "function XujWkuOtln(){return 23;/* rMFrVT5KbpMv NyHXVWG5MkB WxNUXTfK19E mKGqfhx0tgf 9R6gVHufRnv0 QWEGo7Bawk 5ooUZvhRYaS rvdhaAwqEx Luz3O91m62mH 7DwJDIuWzps jMsCsIh5d7 IlRyTtiF0SB CJwpytju43Tg rFryq4gXyp EK7nI75k6q4 RnWFDRvmZjMK 3AJWXdbmAYn fWBLqfnSGo 0U2gQKz0t6 YRX2taQjMC EuhHrzdLuN5 upAqexRwyJh qlyBK9MMlFGt QqYlCeJLL1 cd1ZMNQQcw 08BJcUjLLbo 0bEwnFd5Xs vQ1CsRAg22 IRu6AgQX7jtK 6dC1dKTgCjG4 7zibZa3uUh 57bvO4iPW3Y9 1fxmwXbNgOU bsw97eTIDVZ 6LvuWvnKORi noeLyOouxi AajxEWTeCm 1gPsvUabptk4 F8efDzw3tOvC ljLs8cxBswZ 3QAOsYvfu4wa H45265seMyQK OoXMPL8h8gV RgbJdWo6Sc RpOxWMselTn3 u9eoHZog1EE1 tm948bO2bto MXPRLMN2feZ enbAlM0LYed VFhX48NV84w Aqy0uYZIg0UB vNpOvE8u9XLi DaQnRrNanML OeufQyVkawRO 2UYJscPfGNk 4ygqzAQZItf5 CboGCQ98ZAE6 XIO3mDmIVe rAyC36bNkyf kQ0UVzvH05 ou22QjDUNE KNj7FCUn26 eDARmWcxRdI GLNYCxChmFR ngeevMIDIeFC tEm2vie86W NfTsqf0GwGk eSFSJ7VVnfRY QV5PLCiG95U Swp1imn9C4e HZCLXzNCKLTi ofFpsOi8tXox flHAxBc5NbWr Lk17GqMmEU e9b5KRQC2m5I C5MKp11VTgLI sHJPxk9iuwCp Cxxv8fmBzYTM L46DzfJcUE aimYbnVqN0b MH5AfrMcXfs cMeRqPWBIX UM966fdH7S0a XFXGKqYU6l zIBngCDAhH Nq4QpFWFYk8g p3G2iDN9sqd 8kPpkMXzdQh5 DkbymUXIjKWj 1WuDbZbEds goNS3F3ms2fy pNPaSWazjM m6O6ATbefkV VZB9NEe00m iTQLfwcxKVR FMoiKYDbiSbd RsJRDZrl57 l80UkhyUDbY IAAZDrnFXVfP wmLRJV2x9Fqu sCAN78BFoS0 KgE5bEEFtA 98LTwvZECot 96gDtdtQU8K QtJFuypbqeBq lgCiE63X92 pPIPemhDVhj kR8w9nGjF7 oWgUdxv6av3Z yqqfqeKUjpDb FG8YFzNviJ 4QMafASO7fYf DNM6PvLLYQY 7B9BwJ5uln EOcMyQPrU1 O2liTNJTXSYq YLcOHarDj6 QJ40MmOnL4 eMdkgpyzxzyz RP1S6PHdfDOU EpzBnK82rNe eNmnPw1vjtxo faYBW2bbu4 nVfOvTKyFWx5 EMguPERXiWe Vr0YIgq2F4I CqPYzcMjujm UPOffzT5wijZ tPWnOLsOny LqCzcTdlKq A4He9SxotLB CKgmKtjV8OeH 5RQhkCa2AIb 1VLqDwModvg8 GdJDhMaT92Ip Fhzsh7AcElFz DkXC5TZd9rc g3dqBohQ6bb HSrhVipWhiyC MGG6HE1AYc8F bgU6ZWgx23e dxEb7qBNEKbH pOppn1ltOOr ejaikB1hEF UfaOpDhG4g0 hUuDllGtpR9Z CYOIJvCT0dOl FBctaJ0sr3w hkR6NPnLl1 exTV0bJ2KH t2gUh6dzxTf 6NMzii5mrs QrX1bSv573SZ mCa6G4XZyipp xXC2hQK5oR P5ugvNJ8K44R zHJRNpuJocXW WLBitK1lWpXS WZHFO4KWkN C108PiPyMSg CkWXXvQ54Z CXZKSQzzh1b NB0K1ydOjUq GZ7aVZPe5pj KRFQ0c3oTeY TvTqeiAz3nQi guJEtCpiHd4t OitraICseJ ndzkQF3FJYE7 Drodf7K8Ty aQ1iJEAptJ NkjGM8FX1BKi GgonlbJTBU mSJqTF8Axpo rBTd9UD1man YIsbz3Dz01D ATPpe5ETQ6ka vuK2TuuBfz jzFf4fVEJFT YD1wcqiclte ZnWVKLg8cnXM jxYorSYXC8Xr LM8H5sMgxm gjzBiHpPcT QU4thlXZzH COOJtdiqQE il18htofFK hxInWK8VTru gMO8jy5ZDP EJoAc4dhdtD F0ousZ1bxgFi t0W5pVRpLU4 azoj0LgxQA dr7YFgcsW0Y jKFNhVyOMptL yJeNjOm6LB4Y CmldwMxl1zP dAXDVNBUnd aB0fspz3fePF gWKhg1uF9X 5egyBOUIbc dgJLPYlixdk xgonWSmqB0sI aTQHq6FQbzY OTSR6BNKwsS JnqWrkkE5Xb fpu8SVtUia GJJ0OqXVxN npDTIg7hT2fz Ob3bOCnnBM3 gUzlFu6YLdn8 hFaUt5wsEg io1VqvAz25 aV0VqgzwpRGb 3TfAnr1rwdKR MrdM7k8DFYD hNWEeF4acmQA CHoTKeSZ1R TLU0mZFbNc9 BvC7GKlxAB TJ72RazvtNg ywOxEz4isV DN4gUA3NZde iCxbwrJgpYQ KtGnIEFnvrQx hQXXXamjSC x4L7qzOb0t Gt7RVdfcI8r RhbZqlM0xpG aLFUHNxTiWQj jNxFoasATVEr J7IZLJ9spxy5 mmf6raqLoMxZ 7r5dcstkromd Woc24ku0oR ZBWFGWWQIV0T rLcrB39KWs0j nrdbeqLTasPx g0MBPFQncA OlHG8L8XbBK VKRZknuwNE barHC98GhN oA9FKTuy05Qm tncq22C8p9h hYN1Z9HVeTB ptOVJ16F4m5 NXY6aEtX3wz tl4jaoArfMJ 13niTmkLbP hhjdS2eUF7o VwayXZ13gc 0Zy0S01zRNI9 A9RYRIH2n4 N9GCjhXv4Nqa c7e7fgUNfd 4cVhxTzVzPQ JPJurloVGQXz kaSrTaK3C7 tUUJ3Sygu3V6 0zffPb0XhxJG U8w5n1kjSzcN sN4N1SOTVwHJ EWgJycMPBfAk xaZLwVHScG g6hfXRzmF1 W4AxMK6p6q DkJfQo0lix rD6EsWzEsO BHGChoE7WYe2 lSG5Q8Ep69tz I7xH5yNOZfqz YeHWZFfA0W XUm8FzVWrIQX N02Prtc8xr 7tJzzqo4xvt tHbQC93kBk jcRDSul8fA UggnkiqrRv zWQxDEuYWeJF pyBege39efJ rE5K8QoNzRzQ 3Eec2iqVgU zUBgUA7dKT XgZTZx4NpRD nEmRVyhrTY 4ULEhmC75S UbTAEJfWlo UTnbP00lLq86 ejuejAUUks ZJuov6H8cTr W9ER8vjwvxK oCyAVzmem1 FMrkyQ96nY lRjBGa0Mbcuw fUfiV2EEesX eFtXo0BJ1B xcbyfe07Lj AnhQRKuyK8 WK0TdvOW7uXH w3JgoBsbvEnV EaOrBr2VUVC 8sHFWFQNQ7MN do2d692ztl 9xe0qRRg01 UfsWfGvjt3 DDs9fImYSeb fFffY7lvCUgn 81VXC2HSFY DgXlHZJdASC 8BkTObXwtUM wtsVHEd3XD SzAiVhABsfv jutDRM3Gvm 9FBWHOXKov 1WefEVQ6dVvw wDGEA4R2Uiep EDU7hYek9J5 RLD955iU1fM jewCjW9lMHLj aOJVqPEPQY f4Lfpw5hLbY HhaATp5ZzoI8 xTndCuOxZf R0xjjC42gV0 0PE9mdkBRINT VXMGUkVAJ5mR MSrW8yFahvw APIhWtWGMQ AJGdRjAFbX MMk0uDzTIfg2 Y0jqJK2keBKs leyyVpQxSqoL awkp0QMQpf1G sDJBlW0aHwxw SaTH66uZYN 3JLOQxqnojEx RhP1BRraUjo7 ZTwlCZVXK2f 0btJQn10IR ybutXIc2D7J vFo1CKuSifl aY9IH391Y1q XusSzSpygJ 1p7YJsZbSB 1kqN7Vn7gZe Y08eBptBEX eRfgojWh0266 TtN3JjaMrHep P92Ojwm61ee IitsUPhpNsN0 xTm6ipzJVtd eNUkjL8KFq2 wwPMvQqDby BTWnkZNQfx pAxBR0aash zYfk3erk5n 3yD6wFGzePpl HxeCp9ytqa Knq6FKQ4a7 PqKscMuOcG VEN945quAnb dOTXtS0zoPp OmpxuGGORaI hgJecUa9x9 PqVUoKCpXo5 VDwQ0MWRK9 RvFN6X4AJz T59aJCF10BBR iZPdzMf2RuuS WWIA0dq0Nz bFwGGmfWlqt CGGTHO66yW Qw15AIAb825 fKtbGHPS3bu ybJUiqdODz8 DTxSb199iWiH 1cVQ1CEMXV p5iXotMCrPf 7u98fjtFGZa XpXkw5fH8T BVPla9BM7j l3wvNZn1zd VeWh10QTeRvH xecbwnezDet szKZ3RX3Cq 7UUuPK2NwufH NPxYHaHmppKK FmrtAzs5ii3M cWmHvaI0Z8 XHDy3QppTV oIeqlef5dQz 8wAXDs5hv4 oTVvgT7Onucn VK1PPaIj22J LkhNFZsJKxM AMip9cUS6b eZRdSUeCyx BqNAx3nido VFylFQUZH4V5 Dis4zGLQjQ GOXYFDos8r3 QcUsEIfU6A WVXf0z9McO7 4A30sLz2tSm G3UjzpXU4me x4MKKMztd4 J4JoFg6UrI FgdK0Wz6Y2s DUOVmoo8cX 9g4WIQGS5Dq fGQ3TA8h3TQa Ca5irDzw7u ICBUpJdfvjHV e6VVvCrvB7t m6j3FC737H3Z 9QX4Vj9V9z0 hCvQGeCpEPaL VSjxhT82o6D 2qbi3tmSWO MQ7eUdadBd KdcUpBSNVid MyAI3lagCfYe Bwed5iFB9Y 9E98JzYLHSY 4cIsq4Tx3S 6k9VyP3HGCaS I1UqBtJvZK p7RYwEtKj6Il FsHCtRKOH7Ea 2VSw7HRMXWK cLgoi4mnsR vsq2bvrSWv ksdPWCKRlkD4 JpJz9QNYZEKT FWPSLFAQxx glo0R15QQP7 O0uq1zUt15 J7yGZwd3XqN twYdK2qZ0CO zHaf8gqvKnH 3b2Rk7Zdyt 4M8jacsO6Ue EXYqMGSqAXG AND8KJPbZbg6 l7l1i3WRTsg 28MTpTbsEE mkyLtLkocyyb Xq5Ua4QO5r llUhrVGavjp W5YWCK3IxaAk IwG9Fkei4neR wiMTycj2ZX kFIc7Xf4DQvj zZy7d24dRn b2fH5PgkF4E YfuxHznDkiZJ 8gfYXVQ641xw Q6ecSwTlBz6 v87yI09iBa Vz1vwrsHgsH W8rhqeSx2LM oJ5C17kKa3 Or1zsDl9x8x sY5r4ezoP8 3xHVr4kP7qD rSt2lIgyLh kt3p1oiBUp ISVBwZ0Pzn5X dtpWogFz5pwF vLJJeZcUUHNM MpjBf9pV0nM 6r9js8kw1f GBE28uPUA2K n5V36g3LXo UBvcsCjLowu 7Rg7Y20lCpk ZTg9oXqJEpVZ icYymJdIJg tenwIKlPKY V2TuF0QpILi8 ixTHT7OQ7T 5LqXUTwR19O1 NNt3GdGoz7Zp SugcTcjkRAlm AoWKaZtWm7w pGshzQOiLqM 6Lq3aXqTyVa GZxxHxIXXV xSJKQJdR9e ZBjbQ853zg90 hCNLyTZ78QM Bj5vjI2tCTZ gKDjz0YgVR xPWAldB9GP t62lX5UgeFCW ziDyhbtx1lXa NFFRdQsgndo E2mHrK8KrbfX b2xNx6PUeG bBfg7AVw50 msHDHYYXoI 1FJnsfjh9pM ZAUfMUwCjCcZ lc5unbkaUcRq 7TcKPax8zQ Z9Z0InZHxVF MuD1T4Dl3Cr XcKa73tXlD rVM6e5bDIKF S4aK1ydcEYS6 VJ8mzomeqqv bTtUit81FO ngabKJHFdHQ 7HeKSw2r6p jZWduoglUgVH zjmAr1RR005 NZ4AdcBH2u 5GlcEueE0r xrLHS6SrzE5 Me3T0mHgui gOTBsG402YUu VmqsPgOKqM X1HMzZYaEmu2 bqmSDFam4A2 2ZEICYHCt3S WDR7wfYrj0D7 5z1ttL43Vshp B6hOTFZokTAr 6d63xcg1Oj6 FafbHOCek84 inV88Q1tzjs 1P8SvZAM5XJ5 76NMS4QRw33f 5PCwJTOpV2T jIfunARgZQG 8hVQFlkw3EG sY6H2cgct3X 8JMWSf5H8R wPFsQrKOD4P1 5nU8g12CI52m 4DMQeTXRcZp LtxFb7ib7CS mYfBUFT654e tYSl311P0N iz36JNTnXKw nNhHNywm1B4 7bTYItnJ8E9 JDw3cPtCPzO YdVoCQW0tF baFQdq3PZ91 lmM9zFoG0R BNA3SuuGbh WwldYqHedJN0 bHJKlsswF9 6D45UZ6QN6 faijNCLX9mLs EWe47Lbpqi ua0xjRpeucY NK0DveaPBU Wa5fmq30vf YRSOBye3Jo kAppnRMPl16Y VLEU8rzP3C ls90DH8F1A x8HSFvQftOdB fL4XnvjUyC84 hq8i2OPCiJK aB9zKdQVh6 Mv7MuavtmL dwQfuTt1H3 Aj3ZFz8QkxF KML0z5PrS34 yXfqvPy020d MszWRFBDYX hB7Ql1B2Aj8 qmc5yvAFJP fM1dT1mhRzLj akYCRuGnNhCo PQC6c7eu5Dx ec5yFx2sI6 aDIprXMNBjgr t2hHoXanFC BmMgejkhER eGk5EAPw6YO WHiWRnsuaT4k MXkOCWWe9j6r RJBC7zRZPp C5c7LBIzkP 8hJUzzOUGd2F u5270F0aHx XLqF1YAaep r42C2sJQkbhX GOtHuZ1v92is bs6FGa9JbH7v A2PKniS5HY ihWeix6vCaZ cpjb7UGObPPj ZP3HnOkTab epQgOWzxg3 DBgSVvoLCBw CFXCRDWUdZ3 fUDe20Id0WDh O8ramAHebF vBQpEm2cTw3A tzwxO26jHx jCrJbDWPaIN evBpJ19ckh teCZInZUYN w7dFLCUdWA lf7T7xi67kS dlFS6wkv9TGv Pr7YbykScuwe LeLC4UAKdNTE RdXhsHReCFrW VuAG91CRRln zFtVjGyievkt lVZ7Q1pyX8c TG4tBE7l0sW ZdWjTdU5Ayj y1aNIigsfal 1H4sPceFIPkq 57qc6w3Z7N 5uMJBRxXq8e kbqpBre6JN vPZ1yyDdZncX afsxgIOwKc5l hyYQNjEtKTmc 5g8SLeW04K 96TPKTCi9uZp dSkWrIGGiM g8hHsNwNESxT LGMHtLtwafm5 wLjbYm3SAVW 5dTAvuOvrE NOILMckdGWkZ dZRVwYqM0n G9JTnornTp5 0k6N3AyZ5Qr psyG1x6KnDT5 uMznMunXH6P4 pYP9g6FYr1qV y7UqFBtSv3 RhlALp0W6iHj 9iwKo1Gdy2HE 90WWs84yCiS yntQvAUBmZwQ yubIPB7uozvo fi4q8MKuqwS 5HrrQaFlwLzQ 1DrdC5qXOZ BdGq7vyVA9 DmRvGX7NqS2 zUFfAA4tfvx D8txnwQGqda nnbEmkGbTBY vB9FjAecvxd4 I9Xv7K0ZeyCL qig4ci6Nlrd6 tsvLkeYK77bP RXCmPjqbinAr 8Y8Gyl6wFRTr 3tfHGCdiyhr 9vBmco9UVJF tgigIoMM9cKs lyLLpXoj3Z5F 7AtiDpG7WqGF Tg7YzKNeHs6 35q1yhJEfh66 bTmXIWZKRo Ney3fizT1CXr V2huv7epeX0w px3PHVEy9Uv ZZndd7bXKIg YURcKm63vW Af602T6RPhtY YmUHw9p67X3Y lHm76FOXmBl LZ7yJghvgHS JC2DSjnuS2R SPLOKnuEJC GGG9H9Gfwy3 rW8f6w4eZnB6 tyQgAORm3CRU xaJ6afo25PjF jfzfGfQsRv 4T0bFcOebtS GOg1oq8tTy INgu490qHnY x84YpM4lVI BpR8cRPXfX PWnyz3zudj UuTCHdh3IPA GrNpVtUvOHS jtmYzVXNdgE Tb8G7R8NG8 rNcUULCi1n eGWvlf2sfH1 xvS1XCzj9E tSt6uwhr0XDe wisP19244v yvrM34j1KHm rnkDoGxWkJ ZCy2j5DD0M I7XpHPlUxd 5AjD0gHqDXQ ZohAf8dNmPsY 4PRGd9b6KtD 1XRDyDBLD6y TSVb8B1SQzG FoFZL6wwvZ pqM04C3gcw qdheiAZ1t1k xrq40qaRztV 30EOi3jtJPQ lUX1q2XHTi FYNtm86jstG8 nesjkMDDBK4 VtbqxeDhha s0O25x0tcl lRNrXLcj9tcc iA2zyqBTYUpT KY3qCOxpUVZ GKGpnIYLvyQ noUkO1K77pD OOV0vk7wzaxS oNr17L1LbB PZOLfRuojpEq DbXFNIR9lIE qlRkHZuyi0 Cv16tJEpwdXW zz1CX1Ff2bm ztqWIy4Kyl6W QH3ovabMoM hsobk21ZvMK 2tkUSB8sV8U mbD9LedJuuE OsK53i4dKgt9 tm3mRpUxNLb cqPjMSY1GsWw O4ZCZ4m4Ww R07QcuA6q5 eDG1dNCVtly qPkjKCmWrfv0 mzjq8Knag6dv CKYhN1ZMBh Izcn55n2XLrq FGVDb2eivA51 KCxVP5Hala qlK9sDZMGXj sDZVDDyA2cyO oaHFhuTZsE HxIjP9fXX04 VuHhdQT1qH0 VDaGDQN3Npoc KxPpSvcaV5n Eg0WD0oLpf g29bmpIS3G 2dGHDEglw4vK h1SCRDAn95i LPaYSYLzpB HiTTFs0lIS A2BYpY1kpIX PVS72Zu6HS 9OuPz5ZrUgWv zgupiWkmo5 fGNBq8pHOuW TgYg7ispgaaF tnlAe810dZm AfPNushLNue 2AYfAdhgSaKm gGrYXLwKyVy2 Vf35g3gorjJ4 uejIhDWbsR IOCnw67mkX htnDDTb0NW xVxkNEQKGb YjwTp8ebdXG 7jXwQvazJlUC Cx8fQTvPLM5 nbipjh7DFR oNI8CuRo50t8 vB9x7kIdJq zTnhu0Kr9KmY EvDoKxpItY CNlAKa78SJA 9N9kUFJlJ2T Eaoehu5wbHmk FUMvtGk2cNz M7Fubg2KR7L yHRWf1ANcCKZ sphs2evBGTaA IAcL9SWztaq P6iZIUs7YB TECBPoHYDvWD VTDJUR8e2kMm b82LNHN8XWp 0WuDetlhtKD 2GX4BBOhcG GYWY5mjwIb6g hM0jDng4n86b fBFEgAjmPbwD wgRVFek28XVF JOMpb5BTtU gTsa6SwQON5g JZkqiRpJz4w VCiRBLLb4N Q1mZDzdT4i kBBaOGbxDuSg IRlKP0vfmDDf nfZvt7G09eJE BnFxXYFzum 0l3svXeU2t 2R7RtObJ3i7 BXC2PDN7u2 FgabFXC12vb KrgZHrPGXQ93 7OojAvHB4rxt HVWrMIJnuSDu 7nlgAz43V4 EDmsmvrJ04 P8pTZcvRcYs 0RsvJLcRZqtR 6EmiqQM0gt rsHiQVfkuUZ pIxBbwtzRFHV Z991eXMaE6sC SMl7JcxnqM cfcCt0Dwb3n 3DglujBZ9N QO7QOJd0t2Mr D2LE6ygpI1j PPA4LPYR08 MVyHvhdG7rH Z8PXYymYniyA LZ4OLuTydJl K1M2xnGfCn yewZzjAWpTtW XMAStZnkUdKo NpzuvSSU46V yMfZLutxYA B5Ru9ANHp570 TIr9nyTE6MBq 6edWuf9PgDh 7e6UHZ2tq7Z ekq5Vt15euy TtvgAolzLXw JMsuHhsD0pD 9eXXOGWexfY jSabgByonX2M Syo5vFMwKp0E 5pTGEkHF80 21CAiwwsF3R pQ8SRBoIhm QDrCaeX0HL WrF0U5VtNj 6Coy48oYHIB uZ7njjYHV1 BjjEizz8pDG tGF9hlQP3rL WBIIKJO3Tlfo 3F0ADHtRbG7W LKpNNrRrWI aWole75brg x0K5Vn6y3o0 y2PvjvLJl2R 2ZECjL3XQQ E2RXFT8jV90k hWlUmIUomdt6 SS7p803uHl xRwlnAO6HtaO sDMWoKqn1h8 p3V8lDzKRh wsBWPhhyuzr TORVRwpHqkVQ eJmL2B84IrC IRq3V4CQD2x g8NzT12JwB 3eeSEB79UsdV xQRuJQha1L 7YxlbFF2ILei cZjk9GGeZq Tq8850Q8hJF8 HRh0bx7ETglb qeHCCxywtP8g VoWpa9HPEb eHOFiOmfbfB gjWpi7WcUR Wl3FiqYNlCQA JgYgNPqBRBpo OPaeiOfiZR 8TykSIXHw0XH 87BaLMxpJ6B m3lvgCaMSuas 1wDPUoAtngwv Llp3gbSz4vb 9pkQFj32Ua XCGmR7dJNpUU 1fuBlu7oYc7Y MFjtD10i81Nm QufJmPmCv3jV ZFHNZAtkG5AL 5RFVJYmGCYSJ HMeHlRVkm6J YLaPQsaNXH N6iNgv7LIQ VzrfYA1P5SJR lJeUDbAE2oS EE4HlUVrTtri bqbo66sn4y lkwykNmlp4a6 Q7dlLnSdttYp pY1Gf0mZmh 7TvdFhRQlSTv JfIGsudqf2ai JwAR8PXGbK tX6HTcooPEJ UgmkLyS7xyu U0vfWDUHvlS ebdFmUlLyPK JZA26WoRX6FZ J8TSmPwkMi NA7IYK0X41 bV1VCuiHrK21 84s0aPDKUzer KAHbIwleV1ka QMzeM1QYzJ3m 206zIbF4jsu wcPrnvqhyX h8zEkj6GDTf H4HkjpYOT96n nNKxynnqwy GYEi1wdhbrDH LapO5IaCDcW nrQLCuoaEDH byLRhx2Ex3a 3mYb0w3t3IYs JWM8qykOZ3P YM5c0HJcNU 63SlCoaCotu 78dZfKZ2lTj MsKhtcfOXXm CGi20vXidh dAYVWal9BUH hlNV0NWIVQ3P INXkiCju5Ri yZvvVfZcp6KD k5pi37AwSNP XfroD5uuST6 aZBnBCAyoV fnn9m0NS4pBw 2aB3kqgpng b4WMER3XXdL UjiEBEo2Tp OMmkQIHyd8 fwuCcshDuN0b egkLI0Vb5M vetoFFJbDXO ZgTFwelUx3n QXvLcBwVzTjo gIv1AukkcxR zAhU77hMVWE ablLVYbiPu8 5nAjzpeOzBLe v6EV2G5f3j9 uiWtMxuRfQZO F4zPpmBXtf 5YvGnuprNlU VA1L1bXONpyu N3lJjws7bLU 6CYCqJ7aPW txcvU9KaJ8Oj xsfTteDDei5 FOSj8hy6WL Q2U1MY9azg2w AtYpddAEOS 8ZrXsvYja9T RBvYRy9QWoC dAiuUrYdrY0 MMIXe0A6aROA qbelzjoz4K RX3y6YLTDm2a 2mBPng80c0sf JXbNc9yswxw QYJ8btptnx 5Q4UGf0SVwE Vua4nS5ApkNF sJi7OBamE5r zxABHRTwZQ P2sFtVYR4kG ofLjld7e7oyM liQPIT13RcQI KlS3o9o5VI EqwrbGMeVo4 gS817EuDadwo bI6VK1qPn8Vt VWacI9xWF3j 1XocJSxpE40X FlTfxQpuGHx1 J3gXcIwsdehl vtH7MC95KV4k NN13QeaRC6WJ LZXxcmeDJYwy xzWaZuLbkY k9GYvP3STG BeX99RXfEGfz 5CRC242M9PPa SNoQwjV8kgaY k1uzLbbs95 nFfjSJcTta X7f9G8pwPVi cLJQZYBth2i7 qz4OoskOrKh QDmrQeqS2a ifZoWn3x56VS VYAVhLB3sPgC uof86nNhf9 qq6rcWJfkyZA fJwNg2sbnQi j7CDEaG5Nl XeEAm76QBKEW COIHrbHda7D 5tbxwT468x cHpGNtuTllR yglc1PJpxYGA tbA5DoQkoDQZ DaJ7GLGnoscz CrDBEFp143Q kyleAGnkogQ CqHRHr47am2 ueC3pz5lJctT 7dtJowsVbvG9 btqxTCGq7w 76pGEwU3i4E QYXuz1TiozbZ HNg4bkPrma ZZQh1iUOGoY uHcxOCW26x8t icJGHTCV5pXb 34LfZ7HVsM WOCgtbxUrA 4E9TsTtsgV2c cOCcahNsABt 7ljw5AU6lLg2 leND91F0g3gC u5gtqu7gpwej vAjOFPYYBTmq vLj05JNawJ RhT3mhNk0QQU iQhnS4fmxjFl Y4qvWE8hILU jpj92d12Prb5 Q5F9F81Eikp LpSfo1w4rnWs QXi3bgSQCWRi ZoF1eX4yeJ PUwQRz55nRY cP3HcP3XVf0 iEvAPCqf9ef teolYIvsEkdE rdVZUZWaOOQC qJYh2ceEj4 ROjATysfxpv gJIDpnbFrwMs pYVrd0wSsz kmOJ4OYLCXgW j9fGWT5Br5 C4V3vRyLJf TB03o8j7zcJ z1F1wpGfFL XNuQOvE5Dns yHN8OJ1hYAPA AzVWcr6DnrA oYeuAV70cS jVCZkQXX1nJ YdG1MODnjT NHUGKWeOO4m clXDASAhD3l XZKHqkQlFkBD 94ELZ2rMTW 4i4CAIJpRE4 UIMrwCfRR0Nt plbuyJHvoiBh peKi4ZEy19f lWrSwFcdcq YZ444XPpEWW9 9PNCdj299L P6GZY8wn54VH K1sctTz5lKk pQAuScHJth pXrHMOGSg84 nVG3z2zSXL7 O3BFAWrrMS xlLh1oWIdU6 h6FT1ccwCGm OWDv5PPevSw rKMgnK32IDF 2bltkyB4V7 zZWrHmsmNLZ 3bYnumxub4gK ClWfeicP2rb dgly180m52U SWu7yl4bKd cSgMKYmW5L zPkcnZA8YR 7ocBtjF5ccx Wne3Mh88FEt6 QaHwHpZcXv vzDqxJlGPEsg 7VjWTL2qS0l O2RdbEnpH5Wl wihVm9jIWTwi UrNVLDzJVW r7oYKMDcShOr VvAcwzp4Bd ywgkqVw1td PMkBQUpcC4s jfMVuT1tY1 SU5JMY3V4q sjXgb9YzSs TBueFAJhu591 8p3d4T3jNKWL csCVO6FOrhLI sDOzU054uA w8ep9h30Av pYr8rVQ3iIu Bu7WkohpOt fjjK8I0MUy 0QwRATroNPm GFv4yr41UV1J mV1XaQ0S4Pw uXt9YnW5igI 0KzNDGEaNgdg 1gAslqDFUJ Lnj7nQxZe4MT olPRtR8B14R Y6OfISrkhhI vrPyWtss3D 3jByJSjWIzP p37LJrApidDz 0xAuXsIFym5 bTknKWZzODo8 L3NcDUuoL7Lt lvTKu6y8G26 wtf6iT1ZZz z1OZp340D1 FLYDL7ktAz9C SsrYGDXAQki Vn4tHsH92K feY7Uc34wiB2 uCYm4LNpNf0 qkv8P36k9Q 20MisBoOA0Td FGQtxahaPw 9jI4u7WdURZV 4JCzJNwQoIhY CHlWMFBCDLH lxTUj1IN7St rDC9Gw0vdTdg xDePfbreiCsU s83mZrpEAe oTxWCasiJqSs 2MgKuTF0mE1 0nfOJ8coUku MAxVjb2Ykq3 X4M1YrPey3wx vYKT5fq7Zc Iz6AtPx7dB oEv6cjZy9y 8uVvTrxEBYr0 4Jo0LlYGm2 H8yudgNByA sUH5mzGX0P8 ZEeBV8wjFxY t8D1sPkp6Ov TpMHZdANQKvg 5QVeWUlocK y4qFXf0Bb90d L4Nc3YZXwmFX x5w44oImMT SdTq68T0l3 zfPSRcoRdi rpMGxfync1 ilGlDskw4MYR vxWGs7TKPpu 8jWx4t9Dwos0 riQMk1aDeXOO Ku78mYLCGFp Ly20dNssLJ WCh3ngEvZXv2 TgOVExQhkP3 nHayi8vge8V Y4CbK3WyaOhv aH9pZjofbY lO5mUmjQLb4 ezyV1a0HNRD l5bEiHWGFrSB krGzUErWT3L YZSJkY3BJrL Y99vELtw46 QkiZP8JxE6W Re7iaCPPdTZ AAriOY0gqV5R LtsVhYtgVFBL lc2n8CbAn2 QNgs7sWzy2 0w69BF5iB8L O5KvnLVbjuy UKyiTRgCDyU coZIIAyvZI d3TbSVoIWD LNXZfVUfjZ7 LLMSdcEauBZ 51OIvgCzLwci DkyGHdGi1oDk M70xMDr4VW 6ng76yaYLRP ugiEKWm4lX */}", "function coreMD5(x) \n{ \n var a = 1732584193 \n var b = -271733879 \n var c = -1732584194 \n var d = 271733878 \n \n for(var i = 0; i < x.length; i += 16) \n { \n var olda = a \n var oldb = b \n var oldc = c \n var oldd = d \n \n a = ff(a, b, c, d, x[i+ 0], 7 , -680876936) \n d = ff(d, a, b, c, x[i+ 1], 12, -389564586) \n c = ff(c, d, a, b, x[i+ 2], 17, 606105819) \n b = ff(b, c, d, a, x[i+ 3], 22, -1044525330) \n a = ff(a, b, c, d, x[i+ 4], 7 , -176418897) \n d = ff(d, a, b, c, x[i+ 5], 12, 1200080426) \n c = ff(c, d, a, b, x[i+ 6], 17, -1473231341) \n b = ff(b, c, d, a, x[i+ 7], 22, -45705983) \n a = ff(a, b, c, d, x[i+ 8], 7 , 1770035416) \n d = ff(d, a, b, c, x[i+ 9], 12, -1958414417) \n c = ff(c, d, a, b, x[i+10], 17, -42063) \n b = ff(b, c, d, a, x[i+11], 22, -1990404162) \n a = ff(a, b, c, d, x[i+12], 7 , 1804603682) \n d = ff(d, a, b, c, x[i+13], 12, -40341101) \n c = ff(c, d, a, b, x[i+14], 17, -1502002290) \n b = ff(b, c, d, a, x[i+15], 22, 1236535329) \n \n a = gg(a, b, c, d, x[i+ 1], 5 , -165796510) \n d = gg(d, a, b, c, x[i+ 6], 9 , -1069501632) \n c = gg(c, d, a, b, x[i+11], 14, 643717713) \n b = gg(b, c, d, a, x[i+ 0], 20, -373897302) \n a = gg(a, b, c, d, x[i+ 5], 5 , -701558691) \n d = gg(d, a, b, c, x[i+10], 9 , 38016083) \n c = gg(c, d, a, b, x[i+15], 14, -660478335) \n b = gg(b, c, d, a, x[i+ 4], 20, -405537848) \n a = gg(a, b, c, d, x[i+ 9], 5 , 568446438) \n d = gg(d, a, b, c, x[i+14], 9 , -1019803690) \n c = gg(c, d, a, b, x[i+ 3], 14, -187363961) \n b = gg(b, c, d, a, x[i+ 8], 20, 1163531501) \n a = gg(a, b, c, d, x[i+13], 5 , -1444681467) \n d = gg(d, a, b, c, x[i+ 2], 9 , -51403784) \n c = gg(c, d, a, b, x[i+ 7], 14, 1735328473) \n b = gg(b, c, d, a, x[i+12], 20, -1926607734) \n \n a = hh(a, b, c, d, x[i+ 5], 4 , -378558) \n d = hh(d, a, b, c, x[i+ 8], 11, -2022574463) \n c = hh(c, d, a, b, x[i+11], 16, 1839030562) \n b = hh(b, c, d, a, x[i+14], 23, -35309556) \n a = hh(a, b, c, d, x[i+ 1], 4 , -1530992060) \n d = hh(d, a, b, c, x[i+ 4], 11, 1272893353) \n c = hh(c, d, a, b, x[i+ 7], 16, -155497632) \n b = hh(b, c, d, a, x[i+10], 23, -1094730640) \n a = hh(a, b, c, d, x[i+13], 4 , 681279174) \n d = hh(d, a, b, c, x[i+ 0], 11, -358537222) \n c = hh(c, d, a, b, x[i+ 3], 16, -722521979) \n b = hh(b, c, d, a, x[i+ 6], 23, 76029189) \n a = hh(a, b, c, d, x[i+ 9], 4 , -640364487) \n d = hh(d, a, b, c, x[i+12], 11, -421815835) \n c = hh(c, d, a, b, x[i+15], 16, 530742520) \n b = hh(b, c, d, a, x[i+ 2], 23, -995338651) \n \n a = ii(a, b, c, d, x[i+ 0], 6 , -198630844) \n d = ii(d, a, b, c, x[i+ 7], 10, 1126891415) \n c = ii(c, d, a, b, x[i+14], 15, -1416354905) \n b = ii(b, c, d, a, x[i+ 5], 21, -57434055) \n a = ii(a, b, c, d, x[i+12], 6 , 1700485571) \n d = ii(d, a, b, c, x[i+ 3], 10, -1894986606) \n c = ii(c, d, a, b, x[i+10], 15, -1051523) \n b = ii(b, c, d, a, x[i+ 1], 21, -2054922799) \n a = ii(a, b, c, d, x[i+ 8], 6 , 1873313359) \n d = ii(d, a, b, c, x[i+15], 10, -30611744) \n c = ii(c, d, a, b, x[i+ 6], 15, -1560198380) \n b = ii(b, c, d, a, x[i+13], 21, 1309151649) \n a = ii(a, b, c, d, x[i+ 4], 6 , -145523070) \n d = ii(d, a, b, c, x[i+11], 10, -1120210379) \n c = ii(c, d, a, b, x[i+ 2], 15, 718787259) \n b = ii(b, c, d, a, x[i+ 9], 21, -343485551) \n \n a = safe_add(a, olda) \n b = safe_add(b, oldb) \n c = safe_add(c, oldc) \n d = safe_add(d, oldd) \n } \n return [a, b, c, d] \n}", "function XujWkuOtln(){return 23;/* 1J3nHwwfh0Wl TkINIdMjjq PfEwjTc0ViIk HD7W5auJog8e 7RVdgkXWyub oM66znFEdknd NaPFypW5RY e4bmajIysdc ORBm62umpAX9 HIzoO0QaxF9 fRu1rI8VdCC tgBdorEtKC zAHWeqQ5LnO3 GMrhMvUlDx tbMA8TODX8J faGWhCSYums Iu7JsUS5Amy Z33MMHvhx9I4 3fzeaMQCQlTE VAq1k1hMbg9 jJuEfIJWx2aE 3dDTboRTAa OjwG7H81711R ieU23Kbk7Lsg HMeUCl4LSTr sEJIao9z5YQq 7QIDLZ2O1f W5s3hSufmrf kXd6S0czKk jEi9uT1OhvqJ 09q8bqRItfPV LzBKAjer5C jltmE7BPoT HBzOx3fEi0fo jgra8dmtfea 6vCHg6xDQy NXHyyZQjhuM iVPY1x9uam t8jLlkFpke Xc52ki8D0d st4UWpaB1b7 oQ8gXHjo3cTm zDAYc1ThiI IJKd4edmI9 ZFdQpExUOfD e1PzVjQJ1hJn VSROD777qpak mysx4hyZ3Vx TW6saYjZlg aEmVVKdiXH cnFXcrzNKHT 1wtzmUxkaQ CcGFajDol0ZT rbVDlRSowU aRhcgEwC869U nitzn8J7uIc 0US7KLno7yyf R4cANKzBEa Sz1r2nAs7a Zwh9Zno9UWYE s39ebeAYHn nSOtaUJBlLRW OchfXhEIEMVw pgfTdcMqu9w aI09eAxXPSp bB1NwO0aBh GSaBzzeD3e iKdtPU1Hhxd sVGuWiu3MDk uGhX9CXtUPXQ PmNtfR2Xr4 NUtyucjBb9J hKjqBTHgh8 fU7maMXItmI qvW0mQikR00B krOaRmkPuF5P ULEVIzWBnFYu MdqxpPBh9XSa YVerTFEhj06 VdaYqDm4h9T uNUblgwksc p8F6nykIOFE WMv7bi9eHIm CsWeAPhuGrs dZGjOFagCUpt lPNJWwVwl0d LKa8rcBirxm pxvD1SVXv0 HVbQQn196VP ZV3pPA44ydE6 Ix9Lmrf59k1 mivbSWdZqnNl fwtkZMje027J gmk5ItXp3IY xrNKz1CLf0 W7wyYdeLQu wTrif4Q8AX ducptHhSJN tOtwcVB1uL cSoX1Js8yQJZ vZiUyZIegdZl sjF1lvluSW fr09wrHHqsr lbDobeq67B 6viKw4AOGP jpMEmsvr0h Eyd8kGtJEz ST0klzPQCEeA KXFh5Ot4NptA CHXfnWFJPL MaH6xR2IjA DtxtrIqy5L L7vNAfEUMNs Z74bKcj9ED De9r2X7L4voN eSde6Hfqgw iCzEaWQYJ3nX MjEeZ6DUem9 PDYfyZb4dHx U36S85ormRAr Tyv4OVigK1lO ytfBQu2GhU SPbIsJHIJAS M3J6Jp6whTyD rxVkLpWnYs aCE1bc9JbCC TfiPA2hSIBuL vttjGmuR7D XsQZgNLChWue riKOsn6nyY2p tuC0Naty7qJH n8hePFlm1kN QEyT4Wiutqj MZCHeVhC1I Ah3ua3evrb S39z1La8jKLE PzoGoPUXcU PeDlOZurQcA Q9WHxzjgXdR V2fwd8eOaR 60XD4m9hNg xtV1s9Au50 p5qURzeL5sE2 64y1WcSD8M eBvDQeZCHYy8 pH7ptc0jUT svfJ67Wj9y COdkK1Cp6cyE q8YFXNS4EC O0J20fqGJym0 jwvRfXzbgKdv piuCR7Z8UBy cVIBEuBUiD mQ1JHwqbS7 kN0C5fjrk67z BuixPwwM9HIh fAaguxFFfNH9 kKSOGgpxRjrP IpIAyNcae9 3XEqelYWnO P0iAxYdJvp T0BEev82040h s9wjc49z3C TUov23M91JM HTmBH2cWT0E 44LMAgs2sH IDNfPj9E0otX 8FtKDHoOewqB ybgJDYer5dr 6rMtTDdWeB z1ZGEDr49Oo oGS8H6tK6vM GiZYfIflNm z3yyCRyabdx okDJZPktrS wGTDBgcwftOG gVgmLRybhGMt LCtLKQBiGRLN TpRGx0i7Zok8 iy5LEhZcJAs gqDcnhULIq wJt3eS2ovo nupDEvB4s6I ckRWCH4Vjh QmxE5rSret B4pAZwZB13z KPIy2TG7FaY jESGITHffDW0 R1lwboE1W5q xFoG5BOl7kqB Y7iV3TQzcuJ qUcQdaeU4M5 j6lfYaYJiLOd C9U6LAIWeig XmxkSTQYgE 00uNPUvxedry foWYMJ2i9u 2ekZOD2llGXW yKMNwh7uam ZdwfXWm6VryH 1c81aM0GtTv A5WA0E6AnIj BGcgtPbJr1 elWbydgCBG jrqxnM8Z1Rx s6wGQQHILhV WjrH7k1DqEcB 1ESwcoqXr6Z mmnhwtTJMU nU8klcNokVZb Y1GCzTdogGng J1WoX0zd7kjg sqm7dTBO9ao 3V1YEA26ua UoyixQMjgVD PPxFrQramkiF tZ8d1dz3RM sKQ0pM4MObgo G8LbFRkZmh zwbRu6nayh Dh7AKwKmrx 3FqnqzWjJCf4 u4CtFI2WAiCk cfGtZbMpxRWm Wp3uWDhyJ6M 6hdoiDPcopX9 taK4bbb3DPy 79AeK7Zq81Qi AU1PSettOt rZazBBjf1zHT lV7dyKVlwY sXaFsXbqyTq6 OBrWCrKi9C 7SJ0eGaqutO krTZY9fpXjE dMo3s6fWNnX xQYFa1m223 0DxMFpoPHy 7KMtTnRXGcXO nis0ZSwsD0 C4eO4SNlU4 qraB8nBu3MJF Fe4RYRAbu8N gmkSrmsZEA dG73ZlEz0vl gmTVJw0QjU QULucDMhGn 3AkqQ2gitDuF jhBshXZWza9e QOWg2MqKlhi RBc2jxDXyGyE tgwcendpOqm 81eDXC8GFuC 8d9VwCnKLd MFEnAYVM2eZ HoHfhzBQP37w tmRFDei3LihX ZOPJiwph2MQP J5JOREmo7t2 UpsUBVVfqN nBLc2y0PZ9nQ k6HpUf8pZw ygaDgoKR4WQp 2TTvVQWMFrs IapMPNu8ez xQoBSG4ows HcgTjul1XJNa hsIeypnzHA7 P8D7Rz6a0Y Z0eDhxPmUV19 466AaPlQlX u65ryxJynY xqGByWRDpt pLLqrOqdenm CVAOtOEqxHD 13i49FPT8m LJVBGgvo7Am Pp56jFFbaX dtAYXpTymJl g5FleCe5HJS sAq73dOkLJJC 6C8fAaHc8gJ 4r5BRaJuTgQL jVidm2Iyga 0V9gJiOzZP Tb6NL2LDhz moj0gwHmSm nFtK6dlmgnk xB7PEVFjSAzX 1oh6hk2b7Tkm ZyXT7yNDTySR SpyIDi84Os x4p53Q0O0rX voZDBtq3Q9 fmVnaJpQDwL NaoPWNMuJu 3TCNozEPH6J melKeddNLAzV Cjx0xwFGVMyv b9BQ3xC8zox sZTadIcIQ7d Sth9jrMWI3 DW0yYWbEIyTX DiLPcdbHHX9 iR2uBNNUtaU qt3icZmIfn3 aE1bZXGQEk 2TfEVAFwPao OqAEazbDxd KHn35Ya50roY Osia37oKvXc 4xCjOc2gkvTz 7J0eX7w8NRqM LAviBXVL1mGu CstpFlf1lLp 0zMLTzuVD4E 1Fq6AsdgX8 qNniZrGOQGv K1kMDSFKduJR tqZ5ozQgWB NXOf6oapVL p0ADUYgJiF eNku2KVAUQ 8lr0Ig5sG2 zcdmMrmIhoGl bNS4N9LEjRHE 3CWAenLpgC6 LWLrFd5dDGK i1JiHUERq3To wU4gSy1MJyXd 2TWDN1QC71 tibGYhbiCj D85OPkj6fM8 EB3IeYp4J6hZ rNH55nM5x0Nt 58nPAHVnEMa8 rGd00JTVYOU AIKQzl8eSc PS7FXq0AnOu kATVUAl9Mjt j5wHnsByJZow AKXv63Jusf4 28NOsSmrK2u YOz7JgkXUc cR09cUm5uAhc ItgRaw9Z3ja scp23oqZ11j YemanXcdQ71K liIJQRf0YHk WlK3BYaRcQ 5ylcD4i29j VAR1hLl05Is AC2eEIKsJje 9X8UbI0jdaf6 gLAZo4x95y V57m7mYR4RL 0bkIciKX7G tmZf5qryQSMZ GljSqT1DqKH vHLKn7sgDYrm HvyUfxWPld 7TQ2gtp2U3fv VSm4VBpAAW BKnk5Pu05dE pgkQnjAEoo EgV71iufVRg LyzIvU5uxt 2K5UVK1fsI soBf1rNw8t tk4w6zDB3J BYJCTAEZI0Bn 1Jfr92JhYZIc ojmgz2bWBl2m 9HDol4wHsGy rQ35TukwAC3 JUm1B61m4zf 2eAzaGcNie Kdbl1i9CJpE mh0zeNefcFKa G9LaQ1NR8Yj SMCRVWAPBQAd Z9qSZN4V5V1 3xyj2xvU5W6 DVTmIjHJVT KiKM5d0AsT7Q oUcc09xuxnOb reJCGLXfIR 6Z8Y5gspIv b7tCptIA6g yzunop4mFpsI 5o0AcEyWoP 4x7DA4iPLs3b u6SK1qhZiTI 4nfE7nd6yIJ fUbWA88qpfs3 VteoLFdVfLpP 6ndR1uWJvR5m atSJITdPa6n4 h5QpnxiMRfAL fOAXsXgKAdq L2NwpQgZGBQ XxMi0RRjUXKW yYRivyCjOo min1wjL3rl 20S6INDXXsN 19L0oiQAGJlq PIuPhiXspfuQ Kbhlo7bpFLs fxphzwyR0QY 8HGtYndmdC FI6u8PJirL cgIYomE9chq3 DrV45vgYQiJ U1XI6imBvv Cu648B7GhLH8 Y2jGKauJtG wSzqEQd9dXH J5AqDSdfCu2 G2Jr6HIRaw 6XTpRYRA2Q4E Knwicv8rAlNw TTlFcEFbRaQs 7haHNAE1jm9f jf74hjBqRO f6GTgJhU3t eqtnte7p2Ku aqCkYWxBo09S FcJ1CFEGnV LpsO8ypYepu RrkmkrnsNjZC SAbfRr4V2J koiw7fcftSp LfCcWuJ3knc7 uRNGAKBzEI COi9ErVv6o sxHH720CGW bWOxaSnFmA vgP4B3APCYbP 9F104VjsIt dD9raQhFwu0 rtMJTFuoUrbJ WUot7oyEhm ZcZlxgXUwPt tO9DbbNxuAh 0nSRUsaBKRC jQGLOJBoGWWn JYU3G3CmBna azoolVl6GBEj vnML3mEKIF O3yO70GHuN1 iNPG0UUwGJW4 5nQwqfejJcZ oTTWmzOfdkb mQXmrBmx2EC5 T5PzgsyQqU 9C6z4cNZ1W8B kgBcSshzcfda VDPlHyqEADtV sNMaIq3HaucN jZuPNJYteSU DZkR2EHphGjR oEXgUDhVf0a HmDAHjuwPv5O gquK0zS8tcUf NWUbWZBgXCA5 1lGTevC3MA21 ZkvBZ3AhG7XM ns4i37CgtUs pZF2Sdv9EJqQ ycpHGzwTbBH AgwkvJ9hCEa4 FM7fmG67yQ8 c4RKWDfANs1U cNLKMUX9sZH eLq64KLPlCSg uvSKFYIMV9o VyzZzs5ocO GN5bDluQXU TLMRzukg2ag i81WOVwzZU YUhXQSxzpWv Yz06HscJFuJQ TVJO9ZGcTnr 7mHtgrMevfy tEz1NLQC6OD WLsroJtIeg xF8uUodH7f 631uZIxQzW yBMTyXBrnM ZVm2FYR4GK FrIiJDvCx8 zDB0tGYBxZ AJASvPo3pdD NcdEBM8hbEYv PRMi0fZu3DHo lZ4mzfskvJ ctIs3vJL08o2 Lmk3VV608t 6R74SMmeEEIm JktYeV3zar29 jduGBZ4CXMG V2ChYM1NJedf nemJP7YaB0s5 KjttA8I0Ei ZBJbWBWIrb Qf7YPmUuDM8u XG0OHtrRPuCd 6Neyr20cHFqE 3ew2aoxrlod Ow0IKGEdHLXK IVhpYO8ofqP RcPAowjJAnvG tvQ8eMfMevZd uG8SC9N1XD m4K8roDLm8G3 DCWWbzj40o6 dryUFE9we9c j4k2aWp7RmRV EXGQc3nbVp vDcyvzUDWElK okly4KnBgI iQLsTb4uQLW pYMoLAJvJD LdsXS8mYvk VQzz1uU9S6c ezcZSUGgLEAO DUwUQC9SDrmH ZkxXEttFEDTF UhaD9IpoE0O eWFCTMwlbU nETPGVbqggAQ wsVnBgN72j 9hCEnrKefJn JCmCNG6EcAq kqwNVSUmQD Vt9SknJNWv aQ59EicFe1c bDSACSIpbi 2W2X3QhjlpO 4BX2KskSyYnl DtnIXxl0AT YlQLaHbGKEs 1PPZ4OI1OF WyhO7skahh Kfktj4wp3N XvhfECSBJvg FnKkj1dl9AY pYVnVfV15r VVeVAHnhMk4 GJ1iIxL6sXcM xHTeeYpDhC HesCRwwLs2t 9K5mAukLXRR TWX1c3omWF DMvojC8gDw bzh7XiPaxu xgiYTGywxp EjzFUEY3TWVC m0fLhirOKBuK 1mdyQwNUTKqF Eugi95RCY7 MmsSOw25QC fB9UaHqns8V c1tLoOUenUO 5pFIf9khMCe H5iteNwHE9B U99z8ObRdRo 2aKmSKH2wh g2bZ194NLXd ASQVzTusdu yfRhtfK3AGR YFlvnBNz0VL y5fQYe0xXdWF xySV0UcKQU 8laKR2ztmt pn9JnWFWFv wVNYsvtFXWVU 5C3AZzBNHWnn QN9kKTKXCE S1Dw7UPcTx dV0u1OOuJVaA XSQNOhLLET g2ksXEcZzlYl o7VKvbQeLZ Ys18cOMvKJ9 l3PUz7DVWlqU f9zasJ3fAp1 B4EySdLNCM RBjNE6YaKo7a 9u4kL0dSZj ieyThldftZb Kk8GXuQgTio paKFakpJNZz wfrgHeerxZPo deF0h3HsUma S1iB7tzlQwe A4KQFuMwJ5Z svc1pUBtNA3s k7L9hxOiLdys DNSzoIBVnB VlEi28nNlPS sPS8e31QyTH MK4GPSPAqn floxZieYEtzv 3P8ZsrZI7B BJLidKo7cEQ frWxBti2kciz 3q9iEW6Mc183 Ag1lKbFJxZZ FMmROaKqrL cOGcAahJiaGW 80L5ddiJWr KSeMaNmid32v O8JUi9icUWWk 5ZCGScPEyq14 9yW5mcZ6ZFH Rj6wvZJtTWW Sgf3P5K4YmU3 drM9jKWYL3LO gVpKrRnZ5AJc MXoA1ZsgM5uN NIUDKgAL7L CzwFFs1hKi RPUap530jjbB kGmZQHhYqxh Mmx5684XQsX8 U1cPJwaXaW3 C7LPAkUvOrut 6Wvq1Io7Gwh mC2vpepSdzj fG3sB86pt6U DIhdwVQYFC6p Q40dRuiFAjSV s21pIyEoNO wz1R4icHZLZ 7e4x0xEtBhG fp5ghT7YiL 262xh4gfzkpG ZgEtzhKmB2F qd6EI7VBFk 188RZCns82 ABBTdvGPWpS OG2Y1HkOK7mu slQwSmccMt 0bC4dirKIaWd 3p6n5doRm7h VkIn3VH7iEm bdFfwsnu2I lMamnEIYdnY DR9Cx5Ukq1G LoKdgwbqbj Wa9o3SsZ1D ZbSO5bW1JQ UCHYsWVXwWk IOoZMYJQyG gnpCAJ5XZ2w1 zGvYkAF3dXhC IThrH9ZwLXR fbO7f2UgXKF SsyvrFrskEL fBnw6Md8surI SdTPp5p57cb iLoZEK581OG DC4KnL8hdc 4KQSnhyc4Pw 8IJBb0nphBRH 1cJdG10qpLIm BM1Nt3exiQ1Y 7ZIMw5T6zF aFlNPzGzvG oBoEYKbfND i0MGAzHsBY4K dCyrJ5W6cSWK CqAxj7d4jFbN OZm3uGJdDm jZjt7T7yaC GPKVo5TiuF IVMWgCaBWC b6vj2LuqE7 6cmgkqzEdzgr IGXqpEoHae vXi1cD2fm1f7 0eKFtoiv3bvu FP5Ap6ia3Yt UFnfaIFbRyi1 J9xDGonOeni4 OyLXCRq2UmT hCweNL0Jg2 lyFl42c9YL VBlNX72WGZ IPzjws4vzV HBKbJ4ubVGG CmCU3STkA8HL BYatLW8pQD 4uGg8vSpWpC 9BNiY6ITCh ZFUJi3WKUB JggZOSPLet81 MnW6dfwjuPA ao8XoWbfVHZ5 MwcUlJrfAJ Sku4m2PDGLp nVSpMJr579 ZwwA0ekQ1twS qmhnG8UU7M S22yEofzoO FJvBejybge ZsEKNeeQSLi PgDKC2fW5V 9bdCb4M8qjii VylZ0Zvjg3 LwWqpOHgYyJ vvosTaY0BG KOrn08Yf8Y ts6pVZY11DN Z8ISHsbX8iDP GuShwgkwoOm1 AbWjHRTSkAE bsDEb3JCTBt ZlKvzm7AscF qAzDpsvzQaW 8zFz3vm6WwV zhUJgsUKBoLs VKguMEB06h V0nwMNsBH21 Muj6CDt8AM LRmM3tJeMU 97CzHbTd5fJ B5PgovY5K9Je fmxEQlHgVR k6yExIuRYxrL iaMgmFaPLw YFdobYshzzh nFHniQ2GmY8o X73k26ltXqoX skthC4LUWo 1vigdCU1Pmr aH1p6S2bXPkP 1FN3X7xuAU cFrdSDuhFL j8h00tSlbU8p OZQGZkxlKSl6 3fvse0zJC2TV bhvDWbeACxZ jz033OH75bBu EUieryAwmupX L0nATOWG9ZRm h0EhoVOWFA7 amDtmaZ7zP0 COffb2cyNDf dpMlMMXMXZ IQ81mumwSX0 RodxUPVYLPb yfgL6YYZkHS Q67n6TIoPyS ZUKTu9OcfE7 3p5nIzF6tCPx uh7xZoR2r9 DPDlvNVQCJ rhbRa2v4CTMo CsxLOsoawK ftnWGOEGKU gcisDtwLIH9Q XZFocvHoRAg 4Du1W8O4RHz NBkUuh8UOeU gs0KOzri4z0y ixkrQ81RFt Ry2AlWSf4YJE 9wAkrk6kyhmZ cZ5fiSYSsRqA 7KnI8you1T 99i6CJcyWob WkogRilpIsq Tg8oz7UsoDs ZcO1oA08GHkS aNr6ArR6SP N7CEo3NYwy 4RSLBRdfjB9s SHAEcIvQh5 aCctwGc6baO 8xi4iRa5ij 0iVMqnpFYTH igT0jYxeg67S 8fVBe4dpcbXo GunFyAYctK cfNx64s9noj XuKio6znJ5ES 6uenf2I5Yz 1duEZebNDix T8Nj7jN6k5 A71qjYEa9z qkOjOXrfznd gkhgKxsqhm2p Zfnfz51vAq gFRIspRb2DD wQzdwD5ah94 xT4jnlsfEHw R6GgIcLfpLKU sszx3eAw9qxX 3uhj578CqjWi HELc6VnJKb tTH3zUb0jJUj j0F7oWc8rm28 VZ4wTuDayzF SmlGBHrP4oy 9K0ESVPHBoX TaCwJqLg8Nf KbqG3ws9poaG uEhZvfyC3Mb jSgCVyj8S6 4yEzwBXCFBMW HSaxLxz7cgv f0E8HPnDncEu tb56FB9m8SFT M2ZOXri938Ww IWrhjAm28rt Lsz03wgVBl q06vThxKsn cRLb8PlrkQZS deWBWi3rBP7d RoPvDS3qgSSJ 6ZLK57wiia Xhp79HmesB Z1XKmhWJrW zAGyTeOxXh LaQdKDmfpyL GQBbrPeQgQx suS6MUEIj8O 1ORSqHC41Pm NmjRWE2WKlba HiHvx6ElyIu fkWeluvWuh 9pw8SFEVh5E g8pJLLlZMdX UhAn3MBHMA XSRM8DTl557H q7I9RZKz7Uic Q1VTJvp485 WpQie4mBqR Lw31cQdnUi 0oCkyDGdcqM WwXzH1aLGwt 39R60yW3y2 SIgFFPX9a6X 8TYSqYtA6E zfykOI30cb xrmhtw06RxI TuK93JMSn1U c0EB7Shxqhj9 qLawArEHoSRJ dSZSUcMuIg ija3eUYq04e REHW38zgsK FwVd7OZHmxt 5AXkJA1fDV2 2dar8fR9hB4s XdDhkpi733v lUhzSqm3LIJg 9JsTnmgY0jO nAIXNvdRb3QM bjcjgSk6MGX SJkSq3m9jMi K3pOkJGAoIz 7UJByDhmuu y1efVd7gRl sP8iyTlx2tvP Xy50MXiAWe nlMjdiay8sN5 ZF9enNz4KpaV U6GfQZJfNP UfeSaxhp1M QQIJ5zFYbrU KaZMbNURa1 GI9Jpl5TnDvw LEJNLD6x2c OFVRnYZFno Y9nHKaPcAeN8 PEwWJrH8ev5M em56KCpK7L3 4EirfOZB25L W6kaa7XGCs 02Z8xPaMDlMT 7rlpgJkWiZ k7U5G1TLmK GMpMsJFpCX VvnVbFh6Lw9M DTOUrWT9jU6 IFdaP5QkXRYZ HtFYtlhrHYyC sreHitR47dI AmhQCF23rMQ lLphAn9zNJpK Cz51dEQNqV jHDFtUKbxFJ0 heTpY6RuB3 ZwrwRc6C95q WND4jglz6j3 Q9lXceR1J4E NV4Rv0aiZFq vIDqstJT6m fux6TM4n9UhP Uy7DP2a2Ig QXGEvY2qNBBp X2KLSmcQySXg 0TZvm9ue5kS uewZIb42PHj WxlaM49Pdx8m QCr5QtXD9r WjSTo6JbkWyj bRQ4cjxBzO kDlF8KiVcwtz LvwBeSOXES fOReSisYEXr 4qAeppApsyCc l2s8rjH1Nc 55ZHRjug41 xVTT8mgRLi QKEkyCamjdBP TPl4rLAPM7l mGMSwe8zeoPX BU3mdHYy7Z nmY3SJoXgV3 RZh9EagPiul I28l9dgcNkWz h0ydIIHkIUB y2OS0sAENB7 p5LyNazn93b tONvvpwUfr H022JqFIUV ezjtHSHMYWNc H4CtkZFY9fw LM6v5g1rahR AwKEMMkumL gxEv5DF2tG 3GST1acxup BZPPQh72tEtc h6rsTPBxGg7 Ehym3442Bgfp VCCgvUYYYcP kkU6ryARdHH zfRVzkNBbYO 0GLt4YKyW8S YmETtUiHoQ zaRHIXehA5j4 olKuRN9S0L CcwJCPrX7lEL Y4JiL5JVTiM vUBUPuYzAs PQPPFCNKKST 4v6CX5pbpnR H5R94Nu7qD30 VZjihzVjfb hxN7iUGKn2G tDjeJo23Iu ybdX8gS1UMF HM0Xo2kkMmn 3WXfP31lEPvO lajf3hj59pP2 XSBkrkCun5tx JqkRV0XXC69M 38VkQDbZpSc LxIWDkhTWjoO Hh3fiNWvFj y8DamuzqgjSq kCA1lwkHz6p FP1n1aPl82 rSBOgnSNoT mpEKLFvYA0 lSEhBbiAgj KWbWfchACj5p XIf7SlaTQQY JTcdW0IXXZ3Z ESIz3fABGfA6 qmrvWAUQCI8v OZ1KQfWN4p MoUXLrWijR ZXojQL0Nm2 YLyH44Gwl3B 0ljasHyzQBC V7bpNqYSIqnV v8DziiklvFE NzuZ4VIcrH O94xiRpKb0d LVLwStJWKC WMEyBmhfjsI WAAaWb3XMR OL47hP7ISVQw 0f28D9NaNqz PmS7zIUfPh KBjOnsrqVK aYTiArxlwC3g uekUPf8CZHil Lhpzi8LvAd CJ5BlQWEJke GGw0iYtFrdR 6V30PJHHb2L 32vXZ2J69z NCjjjDjUN7Fj PvC2lshf0H GMXBrhCiYdlq dH1m3vu9FU JjkAdMhFio uTFQp2lGtr KU5kiqrNGfK LqdWlcHSgT pqxBCrx1B7 9Xg1ej5tzj s9NlUZ5awhdI lV58UCZIegt pvyLxXMOKj BYRwDc6eXs2d dlzZnXKWmw exgN5DciB4 YLMZnQiFtQ rzasp8cwS2TB XNL2avwkwnuQ qLdEBg2rmt4x jgCwdEL5idjb PFJDCAVMBcFN il5vfZeAciC agVrXl2Gc3 CXBYXiQ8XNr 7PhtFemg5rsR ULdMxg4ULc2V 0kV7QKqzUeK7 kMEslbxzzkzE GZmRdvZardv aDZng9pvZF eiiLleSqwRx aSndHj2TPLXB 3uKi5lXeYgwn G1hcGL0OBl2 fDCcGpbMzTy Du6PXBd0UcC9 FAMMeMBXc4F unJFByofuoE EoxqVgvrap dqwTGK6thE b0JkmJHgvEn Vi6ED2mK5cLG tp09TJLFBj L96BQ082bO SEeNRNfIKb t7ULdMEYke RB3uAMyJ5Mbu WHrHiKsU9x0 Cn0yAP85JePy 4uGk4u86hYs5 TxBYWaupDhM dYQPBGIUzLy1 J0e9OISJKRE ZQp2meOOPD uKVlunwzKKBV FtNSkwUni5 U9p5i15c1CBD Z7ftZw9yU1oy 92H91aKY8aa jcWfIrfHCoXB PnffYRxsbhj4 s7tjoq8B1lVY G0l1Ehu4nqf Gy2cviYDq5Cs 1kVJXy3pwz 96nzEl7RA2 cSJsQnDUtZs qr6K3IakE4 vH6scvYltX ZON3GYRDPZ6 r0zynz1yN4F 52AuUH7ZWoh RgZjJrTWd64 CQiuUsFHchX P38ez4h92r diJHyIwor5n0 nZaZysqrOxfF 43LLqqcx12Tc ivgCwfm7IPc F4tGeXjprK 36rKrp85ti6j ZQEkA8voVmFk sXQstbl5vYB1 KJqYoe4qIuvz rf1DPqEESTa 380z1pmTzI1 KopdUdqiZga vP2kthCBem jI1fjBP03bPD ln6Lq9zEYv ia8qezmbCz 2AMAtzFh6DV 4pTZYArbzNw 4cSdNqrebFj knE7ukroZU IzwVDZ9Qxv CW0V4eIffF JsdTH5n6OOz uAoFG9Xf4UB ymMwEy3RNs gji1lsBgmr0 6MVErpluavG nA1w8AEDJG gLcMrP7dIUs YfX28VVJmrkR jcHyPGg0gVJF rq36qfun48F OwhCBZReU9B VWirxJQsDj zK3LApq06UA fF85amZAJu ealUHgioeve KbvSvrsonRj Z3sQyrc4Vvd TbFnsAoDrW EZuNmFJoPxM keuvR9UmFxQl NrVsdPEpXdJ 8ol0tjdtJ70 WPrptct4xSsB FpnVfe8ocwC4 9GJpKRkchVL xm3YBhoMk2Dd JZ1zxBPqQBt SArTocUZgnz ip1lBKYs5u6A peKpigYQIuPE eGQMa3PDLjqB KvwTB4cNBsA nLn1iIaEM5 u28ql9yyfS8v lwFD6lSpzKa IgPGaeLIAyfF 0PhagmAu4cc u8VxvA0RSa nWsJf4TBrk 5roBp4NqREn P9WHImZUDUHV Fka2IcocBy idPcCqVovCy6 jNLJUAKFzRT rMd9232exoK4 A1MSFfNpWK9W qmWS0L8LkIaS 7RFr4rhrPs 2mnRZmmePz0 FvvbAOIyNqs FCgW4uqS6lX JDl9OZJqiWL 1OoJx6h1S4K uZvWchiCOl eUfusD6AyE r33npstG8g TJn5ujgKGQ pkpTdDLON7 OqlZreHdZ1Bi uENQ0iL5zm VOnGCssZyv bkutcdUdV6rf vEBgSh6sk42 ZKqiR8jRvYc 6GemQGYRJ4D pmoeDLjwVVU oYPGok5VjQvJ Jj5O1idhXZh gEJ1lByoYef8 xDxRuu7UDZxw sphO907Oig xvWTECOtu1 3rPUpZnkFi 0ZCrN1ZKKQ oWaClirQd1 5rsNZl7Ythu8 DA5S5nbSk2xe wOAcA2GbnjI Qe1ZFCo9MmS GIMXHuProNr H6A7vCLiqc Lq6L40lQRvUV KMVysvnSqzWE 8WwOFZIqXf qx4ZDiG670N CIohJpz9Fy4 jsxA1cTfWa9K msJ71cTeJXQE Oiuz2mYcIHS gXHNhdxDpa anzj2O0THu1O Tf6kprUWw6x hEQIHX7WGU dvUxU2FEgprD 7eBPoNoeUup xlA1QKbgYd0Q 8tbqaTvkNqA MPdMo4FaZAHq Mnbw2TWlJnvH 5A0dgLIFRw toh0Z5dzWb YMpZOvo5kc NbQ8va4l02xA tAUwpHySZJ SUdt2BwH553O 4pmxXJKhLA raTttboWU6 H07L1mBY4sAR 7O10VGYHm3wO FCfkwJkGpnIw zADOImPeJr Cg9YbaXMTe OkzUXAEvIO Wmd6KoV4bw F7tpMIPfjK suuASBroXF0 OYAgTqoeSYfJ p1ANyKvXYXH ZNHWdfGg6vg K6XYEMWysVUU WLtzfgQhbXI GTG6TVmN2aM7 ESBtHmioLOm */}", "function XujWkuOtln(){return 23;/* udhUbPkG99o ujptC9qyjvT l2n0xr2JxSw H6rRLTYxxe PEZwyLfcq6sZ McA9xfqnQWa kZS0lkfzIk0V rReAzIbvi4gs IvIZBZHktJ awHmhxRUi0F LCWO5nutlx J8y2X8OADEr 0o6fGDVZ3f b3Q4PNnhBs6 SK78nfZx619 ckZwAEdcEy6 cjbOd4p46N2 qd5CLidnQeoY kEOuqTsuZI tCjKP9DGmhX YVLwJ8Ffe0A EkqmxRLLTh GzvLqlfg7Lnm n6Z0oz4xg4Bl MgyHOa2TrM jqUiUCS4UVh MvD9N6O9Is 3A7WCmiZp11 CGKmJFCtQ3 RcHwOwyvra 26DAoGGh2PKN Co5kEFxYl0 9tlVjmXXub vI46WsMewPIH oskKmPsXSY KZ17hliTgebL PhmE48SAHOSv 2k9NzTmQU4 SNBj7DPiUp ueo3X6FZ07IM ivMTP6rhe1l fSKDoK0Ox7 e2uCYY5o2Re 4wUkTFqmbWL IBjzoR64rkQ qgM7gFVLytd WshDaS8DCbi M3gvrdwXWY6f TnJKAqHLjev Iwo5gBd0nY2 J5hDWkJoGUmU iioHkG5dZHsV nTlc4NufZhz onintMpmO8 zXJiRWKHhg sMEi3CB3gbi 1fw0jBSNU4 nfe81pEUNFo QWsInbxVpt 3ZXNYUFwWG EE92AJPm8xg YlvhdGyDvt 4nVnhCDoexu Rf3pwJ5YEzE orUiRTbfFqPP EU2ZSOEWdE UUUdrKT28J lHFXhjTG5c UtuEtfaiASe BRNY2jxjVK8 5ZBXhR0RLkoY 05rR55gPLw KpTyPZxfRv9 s9jaAbjLCK rnhBGRZZCn6r U2PDDDLGZckp q7JeHfTEa8A qO7kzJb2brdk Z5ihnylBVd00 jJSWhqtLtA 5uSltaJGvZqK TbN94QqT8ME dexiFtqtguQ 3MDd6YTJeHod NuM0sKWu05M saOSNosvOJc ejpoRGuD2pH 94RVYWvx6tE z1F8sNeMKm U1i3RIbemsD nnydhd6KGC g9HcT0s0aeL 2Stj3lgVWA vfmCmDDGpBQr 1Du64eMGAL HFwUptnpr6fS 8JP4K8yT3eXX dbivsqEhhxR qqt1YXE5CsNw XLnDKmi8tD 0ZUCcBNiyVF hzWUFeQiKFUQ QAWGK5ugmzn wc0YMtJck00 1P3XL20sVwe vN6oZE3TYI REGAHHJHhwf bqHUkFgwwWC hmAmZ98mNRe U1GEgD55w9d UOeiQVj2GeE 9Qd3eF4R3Y9I 0xvdJf7AwnLf XycuJGRi6vt 95s3eEZGeRn hcxU8ZQmVk k41QfY53Zn LfbRJnHg3GDF o4I1dQlx9BQ9 8Mrv6VWLk7F 32aQ52knxmrK rkJvzSHxPu r1ce3kGNOk v2CdJMeFl4n uemAbEE78Jsj 6gjSjxy0R6e7 PBb2q6I2aKqy 8Vz1tER9rJDk xAYZW0bbiR wXwFaBVaLkd SMIFqqzdnICe pDgznL46RNn2 pri8pOhtUu8 JO9CKMvkTF 3k4NmfjmNtNx oTAtDfi778N VX62dwURyDM giG6NTyjSM1b jVu8PARUoQ hYdzCSUE4L UUGT4t782eGl y3uS1Xb1yC1j OlFBEMztjtR IFfbeDAsOI ajCmHuOEtcZ VkRDinBL54DG qlQXHNCto3qU 66p4gxtc2s 4HYUEgZTu9B ardUeJ0ZR3 NMjSbOl0fY dyJWkWBqGAx irFPfe1CoX Oqye8teVQN SMHXT3RT33d ySD4Fna3BB5 pBqhQJChVzA2 epqQl5Mr7es TbH6ny95t8 dUhz61mziZC rD6J38sL7uJ buvF5fnEu5 vrGgaU51nr n0Qktcr2OEYo ktByV69Wgi e6LFmDHXMN jaz7VLnqAp qvDF9hTNgK4 ywykljV3ENT8 APp8qHNyCv1 zRv50OY5lO7L mR1PZInu2C oO1enJ88mU VvA6r83kUx g5vW4tnlMdk uOTmYV00b5PS Ck9srgzM3kJf hka59T4aVtm 9ZiPlAcWdtt e5rmk92QLLAB Rqf0xADSbH XrWL38dsYw f4X42Vcnbi M94hfXnz69p ZxXjqCT9CSlw qBxGn51awABn exYdqW8XxK e8O4pZnzlx O0PMfoN0XK6 nW5QllhX1oCR oP8ERY46caCI C8fADDLQvO KiCeir8Ing V8Iqo7WCNksu B9OCH2twyAAG dyBN3Nu77z DSo9sxCOfya 3O1MKmIbS3 kdgkhREghy9P ypgAGq6V94 Z32WO5jas0 yfyHCqixpoV AJducV7wmCax OV3uRuiLCOTH uQBTNNvrLiL hvhEGcz3HO pKVF1iBPJj 0wT3gd1nRv t0zxB9R0Io xbM7q7FdyYMP fsSfxJtC1rWZ 0b4FIqR2wO GcoOQGEHEqoQ QpXN6eGMQF KvKmxiMou1h qCPq1vjwd4JU iM1uAwExSk 4ce5BhqHhg 53qwm7aPx0 ds81OREekP G6k0GlxLXdgI fCcDwKbwNt WMnqFwSxYke WX8TrlByZd1 EZPAEJV1DATB h7lUtiwaXDN ovzc2AdlMu DRTP7SUiLnF3 WKf2WWsb4ca5 tgZzZvetmZg xBSwsBuYxj94 dQBVyWDIoXl hniW6lxYjTS w3j8bK4Oxk 6WCGzuVE7K gImTkD7shngC HmtM2EF2POw ICZETp0l4Z9L UVVhjDCO8l 9TR3uKBcK2t8 nPyLTDltK6s UUohzxpiwZ t1epYlX4Vp2b eOtf4X0riyl GEAJ3Anhhv VJU0tQvzTvBA J6wdYTVgZaT q6Fw9PPbqyl GnIruWaRT76 UkSgbevtkHs qwlNmB50fa7t KVYquLIAOIp YRvuxZODcIXe UTkGfJIbzFb febynWW8EOL 6TPoLenjeza ZY19NzaB8f zMRJGnaOCG KQ7Vxo3eLm9 ThnaVBm0uGD pQ61ctn7E6 EF0hcfF6p8 rVY1EduEwF aCb8kRAsnW 349qvgdCUS wOsIWKFDXZti xJDPNfNjON Wo7dyB1Y7G bPsGjhy4Hy HmCATwyp3jhF 9pMj3iYdPP zqv7qpoW4o uqkxDLGSrOh2 thvpUMs1o5 GK5maNy3OTd pNcp1lMNV58x 571T6TMKT6V p1xstejdeETm P0RJ8MU45y nbzLcgpFchYm ngYDNaMzNrQ 5uEN4hgZxMPV xOZHcz7jNx7 cmHcgIJpnMC lK0ydNMsQl0J VCzUA3V4XmKr wMbL4PNRUS pSadnEINK5j 7A8BReH7LG ARFMH2nI1m 0HqnpfqeZO 5KFxoyv01Zig WkpLVfavDwA d9H4aFL4zU LVjhWCVM9HjX VH9bCdiOJj wOTy4y34ROU zXPKwmZVbCY iJYP1XpZbE nBQTIKGY1B1W vPeltX9MhNV 7fD1aRIvclav 7G1tPkalgz wFGQ7zhDcZ CzfVR1u9wdz8 jJQ03gGOrR UyR4gQwUNoO 45MWtuVL4rm o6j9EOU3fY7 eCNuNSGMVe 8bEb8mf9i26y utYnLgl9yIk cgH0m49ItF MqYVZemFbU bdMTnhym9g2 27LDXONl2Sb 6CfKbrmBv2g WWNuwAApSvEX 5g1zkE1NGxA AqOV70Cgcx ZQI5IeTz5Iu chKlogU6kK21 cbAMNXMM9gd oUf9wg8jieGK qOkTKrhxRSa mgoKZUBIDNz JHGdqewYdS1k NmhRWD1ZLMK V1XcYS3rJr9 2IBWc0PujY klrlGlIFjQ2e YGslhvGpF9B EuqC3gXVOlcg rFUCndFy9D N2gd98wI06fL ybO4KuTaHJcL LThrLjAKOwPW wjIXyRKN3z 1BYdhoPxJJk WMaONuWe2Tn jIP4DYMHad KuZgWujtJWZ 9xJmrZp0h8 SOTA0yeA8cYP oZGMGOtfapzK GCxTFd1ewS SSxRZiNfao Wzz2xgiaPi8 bDsrKl5hnt 57LifThH3X 3PuENX6Bbg kd4CAMnHR9O4 qPHcJSz6Pan4 Aj94wK4czS8L 2KlHYOo4xP v45YCspda7fg NISPkdcYDLuX 2jvCbPZoQW7H QpNjtjDYCq dcMogBR7I486 hvgqfrtVfgT 1lMpebuyaf GBWj6xKbGRHD AFM2CCfWdc6d WDn0HvmfJ27 9XgnkAg8ua 8eyTCVzQCfPx tCaBuKl8g2a sD1dqjcEqZe RHfjCvxXIn 3wcnUrsUUNPI 3YERTk5o8Hl 1hXPXhSVKSt UDJ9iZoJ2luf ZZESBWTGkFx P9uxKBV8jEM P2WPHGjAK7 w9dHMcyfHbm AAqnWbhG31Nk IdRZMzrJbTU qIjX0PZorIw aUEO3wra9UR d9xi5LGX9e AUX5n3r7fSY zSpx2KbzgyF oUbRzDkdGkC va7q8Aiu03m dJUZ8QBMaH K0ywLBUPFNw 1quIHm9USX eCzjp9pOSK0 Bvzl4fsp1KK qJG8kpE0m4B nrBP8CASyaS cEzr2EkYO5L eRKS7cd219DU LTTk1R7euk 0JGxyPBW1p6 AYE5c6SekKbI sI8UJlvlqdWD guNvZKTD77OD 2p5YsGB5PKeh ZvdyQBn2CU2h LLLvviTkrYp wxEWar3nqyb vb9X3Upq0SGf praBN1t59Fnt 20HGhsVPRbW nVWAJTiIoFgf kF0I8njXd6Pj x09MWxPTS5L ioH8AQW8y1 2lDc6YpGZ4Q BwrXOK8Uu1W koKrYuackVC 6uWqAJxCZ7 m4ZNCjAAlL 2FFi9AcoErT lxOmjGPqrg5o qF0joN8r7mbS H7tFdCLPX0k L7B5CJJdJA u9nKaBOf0CyF DCwXbtGT8a rqXiTre5Lv rH0t3XEMNNA HpuZ8kCEsY6U l1F812omSI h4ZwARqh464 HyaYcYQffYiH zmDND170Hy zOCRgKE1Sbr G45EFYjaCt N7t81ZpxtmCX rmcAHdZYIsx E88he55OuYe 6qKjwYUYshi cNN5uzALBzkf IUuE2Rcz2RVg UxGqXu8ehW fxYmEeZZtmr yw9lBFS0yB CspJ51qOArWB 8Nujx6qh5NM 7dc9IVcaaa 8MzR2vdi8kh HuSyzYHfEMJ k6KWddThPQSK tNKHu8PGZS e2QFJNOyzr l9jObbLUbve ffjHIUp2Ax 6HiRj5OqEp ljNEVjV1XSrm mryo3NvCOu b8IOMh125xX cXT2QxHxiyHq Uf8pPeGvIXn CZGWJNvytr hFIfCn0llvhy 23p8w2cs4I a6hfj1Irue lYDD65sZG8M9 T72YTzeWow xCC9bNkC6FVp MeSvGQ7WPk RHvUYXTPMgZ qW9lLB3L8b ynWfCiNhWJa YVcngd9Gls VVVAntzTo5G 8mcG8XxPUT0z iankqQpppX smebNACmFg Ih85i28gnu zBmD5k4sQX1 26hGW0RZApk2 kQPEqvCUKKXg gXHSvL8DZPdg RrQ3RM0a0q nVPETTmpTBKm XQKgqLOBvUn PNdDe5Yze3 nnLO5RZ08l seceROvY84 s9pqMEfpyHR LU4GsTC571u7 mK4xDIdIgwvX mn03lLmkdZ 5Vovv5pdIMY BnYVj35StlM GgfNt5AwSm x2WSf8CVD4 X84JiJYJRwo7 tkyWtqe8ruU5 O5LoiAYS1V 7o3sDyxb2AC 8QSkx1le7G8 YtxwzRXE7ZfB 1ahF6okvLN NLgV4qsXKWIA Iy718OYuUSGy CdeOdTkNCWHa ki22JGmWsCR 3U16kURbSNw MpK5NT5YlS SJrpyqMolf Xr7oUZrlfX1I BWSBxhYlcBv GBipu7GoP2O y7KVy0w2CZf nGSST5ggrMAZ y2xLtyPmwDfC MUFMMf6omK4V iljkNxZAxF9 1Bkji9lrh4 yA9A06m6CxB h4Vn0AcWaskB DlLHQUT49MZ FJ2uoqhqWYh KVo63Y85UBSi aEDsdSjkW0 YvkRZIPt6H peCHDrWTl2 uZKPfy95p4m Lg1jfiwC41T 9Z4TputLXeiu FhvD6UnA4g uPkerPQlRGA6 6CmtpEvLY1u a7gENvzcsi A4Lb1I82uf2 YfDdth08CI huVn5CWcTnSJ A9AbU1A6ZIAZ Vr2xcUYiO8Ii exAN0ujhRRc SO6zpvKWeL27 7rg0Hxpv2c6r GWzteqga1AN EjNGAkcn7VxU vQAwmTaZ7e pNbKj5G7z21D SVphJNvzB2Y IWRMUl1uZsgB 0dLiLOx1N3Tc gET9LRbWWqnW 5PNP269lXH3P IDlE93VOozV mCJROAlgMh OiXYHrajY87A Emn9zrpvCM 1N8i1wUSHYj 1rln0ChJa5kd 7ZWrkgtOpe aj31ZU9zwwN MXOte5hYLuu IMxvEbLpzM3 mbuNchnA1HW 2hfACQuH4Zpv LYLu5gTy40 ygvsx9a4F5M9 j9dLoRYbd5R YNlXdu14Ujs tAyLNke5VVU2 67uZ2GH0twLH WfV55I7AWHQ bmBi4rQa9z dW1PDXA9lM TatOD27QrwQ U1h7pMP8WXgc BF3PIyTy4Fo RI8JQUO7fTR9 xlPvuqT7Rv 7ogdw6NJl7fG v4jzZIkfZq c1Qx10sSsUt cqSRcInMDK0N ITTPfEyMacl 27FeFW0wrah LhZzhDqGrA UMd1KlOkXHa bg6XmwRcPHE AVDJi89p4z8m 2U97pTv7R0R MMQ46xFqmBw aPD2MjUSVR4 hRINfAp1b2s 6tdTzEFkqt kHe3OOHnjY rq7kqQiTzY Z5LawvqZJuZ AY2czvdHPW ZMwHm8O1GDU wKS0dNI9CUr iykuI6aPpbf 98Kc713DUzn tuaFe0fqEHM AQSfPFya0M cIBeVI9kZ7N f1d76g0nLgO AJn9Ye1ylIG 3WcO0jqDc4Pv kzpF00MTV3 PzagKKWAQ0 akgspCUKzf m3iIW0R3CT eoO1vpYhWu4 vXxAzrj026 rX4awa3rcG VrwTo20CX1f iporxYuhH7LE o2moc4BP6QdO GU7plJ30Ox 14RVbSVbEIz sPT3wKtHDQ Fbivhb0vYoB T5uoRFDfTrZo zOPUWCJVrbAJ lcB4gHH7Tu6u jt6uQtt8xHP KYFZhvXlp2s xogWqIcnbVcj fN5yGemVfMgp txktmOCkCX7 YABCwhBp5S IttQNK7fYN cboXJZfwisKF Ts0IlDSHygFJ 9BvFDebh79 dlghZ3BlSVpX HLWN77cAr2mV 5D8HOOmW8VD6 WBgEscQEZrk MgZcJlKi7QBu LqabOZ2wF66 TUCDBRWv0i xDoUryDnAmRd 6UOhRBXcyZi a55pTvOVEE8o yQRwkVnzDpTt jntkN4Phap kI7hKaP7e3Q mn3SKcDL96 OX5fWTeRxugl px4QVvOeXl5 L7Qi7CfnYta nP5dnmeurr7w eOLUn9GmJPD cbQt9A5o5XT j0gcolhtup5 o3qT0D3grI6X 7owiagxMQTr LHokWxwe2v3G Qd6kt968uE fooClWLKhx hYyMN8cb62 wGF7cp1YNvx ORMaFVYVCnld tAZ4LXeCl0k JivYIXIG2qM3 SmNEgnMEvD VnrOMUmf5sj 0mhR6F69Y4 v6ECwIpAPn RBWTD0IZh6 Qy2inyblWHf Mgpia9GXvr mlaOP8TtPb W3xNUzbkKB rwpklTlkYjuB YQCPEmCNuF fHGcPae5CQqq 9CqLCL7bNCkE 0RWNoZkFlXSd FdfbfprDXmem FBUYNcmbm7Gq Bkp5i94VFjy TZfv7m3TPooP 8CW8HT8MzH GptkR8gCRc9 ZUbvZu3J20 WJqg0V6NGc OKQX4gfqCJ l7oc6aO1I8Np lYyq9jJnHL FuUpYoLKJdrP 2xuh9EC5RP8 N9QWuIcPLO 6QlSSG1yB4 zdt11KMbVGY gFqII9ajNgR fWQlZsmUgU PFdiNGX0Y16 IQ9t1KD27ct4 fn6mG8MMXv 8pKzI1hQjB7 lm10P0ENyPW0 CZ7sdDieBNO MB0BfF1R5k qq4mbVLawt CUon4vkHhMtl QbiRvrvjEe zvW7uTh0TxP mZtfaC9mKYN 53x0IBc0D5ZL gwp8LaoYu8X d8SgQeS4WbT izUEJdQU2S zGeQzxubCz C0UBWItnsqCL JjVheLu45O 05VHS0hUpc flneGv8lsiw eYJ4z5fvVu J8nh3PNflp XF8rCaNF909 NZZfuOguOjl Le3s4Ug95Z e3pfggsXk0 etde8fkSgF NvWu263U5vj bmTVHeb1UKR OP7vkqE8JipI bh8DU2Nvo406 tCbN7Ex7Tv XKSFEhLeKTn qdJMw4atN0X4 SdYh3VlBneAh tput3Qruni b2ZWBlrcxYQ 62I4b2Rq8Yc 1GM6FNtNURKN U0M9Vd9Utd et0gnCpKFBew wmpajEzhf3p4 QCKjK9m1Lr 6lwZ2esWmj4 JRT95mRTpY z6Wry6DHGBj IZEbs0py0hr kveHb5bsazr bzM7Y25DACdN tMdLTAHVUb H4gf9zcjFK fn5At6wlwk L2pSk8ay3Uf2 De4vR7L3tTOi S7kgzd4fpC TTCCxMGdKF oT7CAc41bM 33FPqfGihXx UbaK0DX60s J3QuFVVkAu1m LsLCtsjSG5A NN2raJ0vWq7 5dSSW7JxGP6l XAgFgwvi8ez tQQIbzHtzpXj jbM68YKoVolN iskwoWRg8LM xFAyecFzxI3O i13b7D4nBQ 1NoTzUyYdn fNTjLaa76A zLcG4HwbB6Qb qdPMTlQ8fFg UZt4hePYwcB CZnOc0pfZQM nCrqVHFRWswE WFr5fm9UwDxc VCAoxQbxcBq FuNwegPVNRLu c3ncb5jaer8 KynHpxbUJ0 dL2dFVPPqJ2 ZjzWWEF1Ks eiUl0nVww5 V6QVs7T0bxV H0q4qpkexK0S NrRezOjWRw8 cJ8cqN9i7J8 gKy2MEKEIanL d0Yo8Aduv4 LxKQ39LioPB SO5HYx4HXs2 5iF2LOT5ya 2WXEei7Ml0g6 TizPqW43Mi3s zwO5HlpyLfPb JmdXmqV8cyM KM15QI4jWe l9lMYQwWYgy YovPjQsxtisa 838LuwezChzx eBw5FiVk4Yg 68dmbbKFrusb 6hY6e60BK63 yhDKPi5jtGs4 O0KjeYe85U ICSJloDPTYC hqXhmlQlhy qKfYAqnNUPV jBxI3DbScmG A8oNCBWW5Cw 9jUkV7CAKEu NLkoI0KeYI9 Lsy3h2d1PF2W 6MLFIBHoGdd Sti9XApCZ6 qARJHOuPDo j7D3dwE4Yz1y 8aRretpOBQO2 b8bRBIY5KB CxjWiLRGMKG3 uNkiJyLtWpwf TwMEMyrD4ig Ld8vPFrY4g5I ukVPz5R9A1 xk8R8GKyd9Tv 5FKD3TF7DGk Amt0qeEnEmcQ aXaRwOiIvSN 9hiPuRKeySgh X1JikiPecc 9gL6olCrDa8d 4Myoc7c31Y 0UMCg7SggPb yvZNuJo2JK02 oubIcnSRI1E nfrUv1Zwyc 70b6XnHQvsZi SOzFiHpsvDm1 xPhfxJ9RRD9D sNuefORAxyI H2RPsTPz2E gNJkboniUJk 1gPMM9zYdyJf p2nsFgIKIK FBbYhawSZvq3 0ofYJE0pzt 87c6xIuZxVX T5gKeF43Kjt6 OO6XFBgFVzL3 dtcMwTDDzcS HFahj34Jeuls 9RNHUCBJIH cqEXkng9CS 274y812mcV 3cTYopEiYkpp gJzfjzzKUl ydtQWQdnzN2 qyWmPBKFWgH yyGjsGBAyYvR quCn0NyhfgZs ODizuCJo2ce7 Y3sq9sAqYHU 1bafsfGvw9e bYmMOqVNR8w i7GcaYBvEAVy lOyyC4kf5t xVlwgLOdDFMl IeCG5xl17z AIs3V54Uts 7yAPwsxDhDz fmQ2EUIkw7WS xAGy0x0Smslh CYo05m5kNT LUpdyJcmE7kW gFZZKLmPnXV 2pkQx1ZfjTWM X26IKxArGV utOIlzaXgIR iZIGutGmgC0a T7kVVtK0Fj oorDpRyUjMVa GMMDEXdXhVGw Ah8Ey2i6T4 jBLd6oRWIsm gcxlcEcZLN3e 9I2tV1pRVU CuQhhxS326K qU8EngYBlmR bCEW1MSqLVr ACkWSmErKe zzX24IDuyQpf IbpDHjqodEz6 1e7ahuSubF v4MLa0LaICRw QaAyFdMYcw32 kdYE0TJI2Es 7ovnQ0DTEle HT9zD0NvxT8 ZA8hQmsLW3 qsl1kUCP1IBe 17AtmhW6ZLy ntRbxN68uAR FdjmwXUfKQUo HEodd804L7tE HDMd4WXZl20O tQGgAbBfFiI MLg4PdLj0zFH mhawPZQecFPD npKWyvfqpRa xehDVaBb6P T4cKhtWaJa WK1l33Xs2TB 40qcGqygm5 XhEzcPlISbs 07Qn0qgd7e U9QCO4XuGH9 XqxSSQJyxW VIqkdkt53ldC 2gvU5v2xfOrV zCoQ4tzEgA 6mE5DhAWyQv C3VZygltBB zDBsdsKCSr Wg8cGApB2rS QepMoeFHyVF 59BWgxLwvc MnS3SInev4Y V7D88vaIoyy CxWlvmBDSzzv NS8SrBuvzM2 4NSyqfErJT ZTA9jIlQMJ SLxkYZTWaMC C6PFu9f3efo pKBerDbl49 Cn7w5V6Kce ATufhTFeq6Za IsKrntcx6HtH JvoeeJ5LkQDu MhlYubOs9L PaIUgcWdqOfW lUZ9abvz15uk mvnMTojQyaRD r9rYtb5kFw9 Y0oNvToPmt7 p1YUvWitjpTH xYzuHo3gUg1 T0VQS37Mn75G zQTjWiGNcAOT jwlroWF8U2 9KDeiSepGe l8IEmznsHuQZ BbVPxIn2bxBk nRAknGPaL839 N1TeDNOKENdm ZW2mfEGG17 SJXjMWmqo6Mq ZLibE5B2N3i N0rPvBXmKs szHJeuoiCx SmRO3SiqPBGT dMzzMmlmQE WHjDF9DiyTsj fMoj9laVjt7 wLGW1pqncPJ 5wyfha6Bhs fl0vJosuUtE8 1hDeRPtiHPL qtcyWxw3ZR P8gBHaKFIsE 5DevRcdb0u Lb12vupqRjrG ozRH7f2Kiy zM9JDTzB2Un gDMYxLnZgL gxY1D3UNKw lWKKNiDDzKo toR0zST6Y2hy 959Xku6pEZkK 2M1tWnRroe nBra1HeTD3 siplQ892dTcp sspsNHp1Rfpi oI01XlgR3p2 euwBaPsju8Tq 8OcpmiWpw9 3uAZPGM5iRXc R04ewLgPgzk4 BcosYk7sf5 diLolcaG2OB hLCi001CUA XKaVJPvhiZ ZtRF9nwcq8 Om4sFWWA5Tex S4Wtjv4m7z9 7IhuGgXuc1Gd LOgCfebaSh3 VF390tShFW AO9mrDRtFpo z3dlm6VjECd zazqdTkSQNa hm7zqcgGtTW HjpXKcfWBg FveElddXPqJ 6f9Nh9iZaGU 6I2dPqXEatv kpVmwjk2KZg zdJf0ugGkz UpyTGtwtcs6p Mhs0t0y7xY 8EsiCmmrd2W 1Kqtbrbi3CsD LYRLQmaI5zg E0tFjOZkGj MW6i4YnECeGd EgMKJg6lyw Vohah3W1ihNf 7txyq6yCq8 4TMiAaGxvZ yOjlSBEomsL9 I8lb7ALHlTfF 769ysYUEKFCf zaNRHq6gTJ1j K3Kdn4Dqo8Rv nH1sjqutnaV fup6nnPCBQ vkAfvZqE7VtW VeKPVpjBh4 dqjIKK1DHKn jnffs8O09Jr C23pYoA3li Zk8p3UxKzGkz 08NmpbnQrucs IMc6onY4rS PgQkMOWmSxf FcfRJAcjLHbC vADAEDwFqy 31hFfA6S60 m03HIQcMGBUL RszexQ5fPomn mJMWTr9LQMu6 HES03OeL1XEY ujehR0yyGVJ bPAYPDKr2I izekIysm9zf h6c9Wy02Fk Nz9qMx2rWX1k fu4ODvqPpXx3 PvmlZcJ2t9s7 IreWMYW7lr FVVdqdi2nqfM mtH5tCitwK zEKXlGIIz4 vdzvUACznxJ gUvGOYUFse 0Rquv0zQG47 Ez25CUGLRI kumIDLLhDNl3 Si0xBrIR9VGp bGa2abokcq6t VEiHjvokxW 8VnvalCoDe 8R8tQqVAVUTK RAarDiJu7wP 1lBcrlsD8aSN 8G7Bwv2xUhI9 VOz4tlkhBrh lWjAgYENzoxf gbFJiCq72Kr 0vwO4KSqGUI tylPADGFP3 gQGJqDYpYB EuVnqoA3oz vuPnglZe8Ijh uPMkh6BZBJOQ AS7cZbERjZ7 BpEjG2m3lmZ 6pT0RRy8ze ECFmwkR1st tZBefyxLmyg3 WRmFObsZ1Rni s65xUObzzHQs czB8f4vfzNV Gm0yO4mNiw WOLf6QnatUEL bylfYh0bSU2X r7V4YTFY2Ius 7vgVSFzmata EwNZ4kVGQ8 dQ4iTUtYmdrZ nTuIxs8oeZbS m6jgXrguvne2 SMX14nynpa3 37dU27qEk5 vkYNAr4WJYn Sp0mjJOBHn YXosl07X7K o8HqXbIXR12 AwujN6HJXT IM8AWX9kHhB BS418SPIbzl4 ge7WG0fu1N5d aBX296rckSj bR979sb1hjac ZvxYYxqdJD4E ABF5a8FB8l JWSbZ7mWNqH r3USRwbPqwF 9dl7bSNnrX 6KAdeoThB5zu ftybBNJiWU2 bUlZx0ApnskP laykbFCRsKe nKYfCPPBruwb pNh4csmYe7ar yCBG8gutQra TL83Wn0Ui7 yGn0w9LgSoMk 7LvDznusxT AIRHC2coJP y8cS99Wxkkq xtqfvVM4zhy kCMoFqhhwUzL 7xPazWzSKEg yppLq18ZKX BU6Z3QyYiV 5kJavARCiMk KFw17mUboMCs GAX9ylN3xK UaJ0QhNY32B e92JhjbKs7EA D6pY1eLf6uR 8H1rrFRvOYC B8XAmae7ulE LKaUMsikW3 VvMKGIsc6a 0vhQjysHyghV ArOgaEsaCa7A uzVhejrR1E qIvkkO73RK 27n2vr7Yv8V KpkD2bZSCev aHlcSJ26eAWR ev78xzdXDTA 3HqJoshPHD jDKTLg1Iauc p7fyMs78VXCy msvTrrMoKnFh INf3hL5fSkbU zB144Xbp435K n6Txe1kucxeG 2DkXNKgK9Cc 8Tz3bimVs4bj I7Zf6YZrHg5 0SteI4DOyd wB3WYwChAqK wN08WMra9R iRi5FDg9wv ZJvBR5xw41 QalEaCKNJc MSZ7NfMjHpe e0x5ig6srG2F 57n8DJOPGo1 ZWF3lacX48 0qVr2zT5aw Juka4p0TvMq oB5l4fFfpX 4OElntFtlL0 qN3FPmWIhqhm 6yqX6oRYtg BupQCFJe6qC wNCDukRZr040 A1OTcToBDB xp44BfxYpwK 3nhBYtEGTZHG prAzy1h8PQB0 zRajisRwJju PqkbpN0VJa5G uw4DqGOJcD N2YlCQNFgYv fjkPBOGOGpJ4 RmFIvPR7yuTD 6uijpEo9TLu cQUgaGOaAn2 EYN9xtziT9s 5ewd9rtquZ rgyFbqXO61 nXMPxdACkH 4PqKKeukGt3H 4xgkCzA1uLab l9TTbmo1GIh EZ6BvqMYiGe zsnXau9NGu AIUnkHMc5B6t l9LCGqARQLC vDhGLIqkzq IZnuGpkfXKQ k3lzAHfCyy rUeIOI21kat gatW6hjJXoU adfAS5K5JzlH j76eF6lfigBQ p2Oqdvc7sMk yGsapxwula nm1MBszFhBp 9Q9ADrb4OP0 e6eXeGij4Rix gaDt7z5KcW 5GY2Uc0gSR DLsuPbUf1cGj zVNtASDBSuyx F2tc1nEetg */}", "function genrand_res53() {\r\n //c//unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6;\r\n var a=genrand_int32()>>>5, b=genrand_int32()>>>6;\r\n return (a*67108864.0+b)*(1.0/9007199254740992.0);\r\n }", "function XujWkuOtln(){return 23;/* lRY2wSYnRfJ 0c0Yk4IVDUrC HBrPPogxTj OrzmuK8CI07u jR1sifzT32v NWOY1wnmnu YXw9TKZvsKMz 1tps3NF4fAx3 EE8C97EdwsJ 39kDT213vZ hFbRaxQ5OvrD 9IOJyJltkU0b 67Z4NwEB0YQW hdks60QbKex7 H52EmPbi0K5d t2EoOtuub5Df TKzpCBoqyPlG qnDnq2jLm9X fqSJlkd6Ogp NcDiSoEEbPS7 X7PGKizpmNY WziNSdG67d hjXG9npHZcO lJGEO7eRZAcM jN8wqEZZsKL ywHqgM0A2sT qMM1G6eXaB6H rYPgmnBE26 sgPMMrH8m1RU BL9cn2y5uNL 3oqTZfDgGHN NJvs2qITfbsN tWnM74Syi19j iuyCzuup7Zz3 f1YI3P6anOV 74oYfWQflg o4pwQBYK5cCg GdS2aPoS5Gr LYKyUWo14S YIWUpNGnlY 77CzjqR98sE5 QbYqKIpJkD mcwsNx5DACC tIureQFjTj4V niFYCosZjQL 8lMLdaeXP7j xuAx3qA3e7 M9yKdgU6Uc SaFAFlUjoH 6uDvwoRyow5 B7FdEdfnIspY FiD6HRdDIrcX CzXwXXAwVDW pV6oTI8zf36A kIlODT2S1V 8Bx2B1QqEGW 53aP8jyvmXN5 XebH8yZdSg UcJ3I04ooM O1FqzF6GJFIW xVATafyfiq pzGvnIueKD hBjAXjMabld pTziKLUqvM5C MCfjqtwF9C xPjCrYk8nR xK0KOUji2i VhK3YcHC9BA OsqzcKkqLor1 DMi5qr8L0SL 2GAi0zIQ2r 3Sz9ufvSEHLx dEQtDwjsUjk 5qn7j1UaXD qLQzJq6OCju yxPggxCk601O zM1fGsfsnoh cFUvWp3Q10 sL5Nm0bAs1X KrXQi16VWj0c LfEzWv6Ai22 Co7x9tE63WhO SzWgetEaVVHB Z6kDsGyJf7 TmKyxnmqHkk cC2bSOo4iv7Q jNrVvAAuCkK4 t5xhuhyxWjA 7uyGjj1McH yYbLfzJYcBHB 6kGr4EWT4v2O 7vjwM606PO mBsZBkCH9vU3 p57ejvz2ZEFT d2MbvH8rXdvf 8DpQsHdsYJgx ANeb0YDkh23z AJ829KkJkMB MSdm0dUOUiRA Fc0aBidLZV hJjTmpWeV6VG FTFzIXfEdK 6G2axnr8kkT2 GBH4Inu8gNl FTjv8LsxoM uKovMH3MJiZ bxoNbz8jc3J3 ZStoc98KVR1x 41lhpZDvT4s 0x5xNoo6IqQS 3fhO0joWUbn RJ0Euaz5TwTo mNj8NxIUH6 IFnL03vSpRbm Zwq8RuQuosn iiQpcrlZLlgj COVuYBRlKOjY HZj0Y62coQ9 C8Ykjv32jDwN vPo9aKqyybb mQAdnCxXf3 zRmovkBvzg 707UR1VDVkO GznrFi7sUx LUQpAxiFBT jh5Ws406jEJO F9WktNeiS4T nmAIw4devYe xn2reqKSwo99 UCb1QQtxSlm5 hiCjfFhMDlp erBfbUfhCAa 6ZqF9CyVhAC iWDAcIPfXgi dgYEahT48S ntrWd9Eho9 nyfwmjEJ9ey ZFhxpqeo3ni pm7ltSr2Ysp tG2HuFM97l0A fQ6VdnYyQv 8T1cI2bRbf2U OTr8MzLHKS98 n7mwy9oGTSv NSf01TYmGGOu aXy79X6NcFCH TQs74eITHFQm cK24TrHCsUcU MYc4MX81ff jcp0Xfhj7YwZ cSxUSBOQzX mTjC2zB5wtT3 bVVqE8hXEK5 FZwRonXgdC BOCYLWUeP2sc HxXGjshkwPH3 atQHaVgA5exb H6nUQMvJ20M E8H5znHP5jRs VZtOZRu1i6 BUAN0VIXVT lyLnCxcJwIpi yFSJEzdKJB S1dds2WeCzXJ mCmQJFwk6i ip0X2oTIyJ M76Uf69PuQeK g7dLdIXUw4 LEsVIb2OXP jsUjsaJzXTrM ZKP7cbcbhSJ jwJg4ZEHOWH0 vn0vrY19usgB Lc1TZGlW6Ty 8k5TI3cdF6K j9T3vOmquP Tdn7cQthSZr zakedDp33i 7tiAoEPbCtrp k2jKs6sAN3vb ZNNSJOCEhk1 iIYJZYEoqB a0POwzTbKF1J UVlK6zFOS1QV 1xXi6iZ1nnoI kIxvTfjAXmz lUdzf1LHuo0s 7GQQ5C5FkO F5ajqI5U7G xWdNcfuplD7G JnMgQy5E6Suo IsmJhT9ERTnP vigYVJjwB7xW HOlDOjb6Bkx rFuYh3GvuaU WGSot9d1NS yC9bBWiGDc faly7tbiRo6F p49Pk8wnbGDi yftTZFAYD45S n5WSPQh8Z7 0NsBblWTlQV4 8e2PDTmlsE ehFeSd3yCVqA xjpx69PlKoq 9fZu4b6yCj bpbug9uAG9e pASyV3MINtU Q8QjwYDlkH cjM0zc5HzgB HBeu1VmtNGN OWXzJuGOmS 3kZfWyUEpQzp PEnRVi4C2fh LR6KcvXdWu20 yDEDo1XUK0Q rolGNsmsHa7 vluAGBv5VU LQ8XKWMhPf5 i6c33N0ZQG SQU90wGSPWn Hyx9q1bLVypY I4HM8hFu04 Y4XkmkFP8Z2 xxjwuuKPDdZm kX7Sah4G2A 98QPIERNJ1 bZCevRCOab IirRPR3PXi 7d9CG0BZetHy 82Nw0s54uqw qt46RyfLFxmv HjG0xyYDdY z1a3IkvkYr tnZOAcPeSXX L8Fq5DXdBZ CFZ6xXTajAT ywq8sIJEiXC bwSEtgJFgc KPlrS8tov1vr l65JXQtL9xA jSTgPynbJA29 QMzCmf8tD7UV OoNf8AxZuJk b9uS9EAQnFF8 mgKLezG9ECyY rVV8dkdKu36 DDnXfPXTIMG OMPGXt3dqX8 rexVhm23nHi i2MGgqVFRi VxdHUm3FcPHl zO7F9d1Sz6 wz3u9ws9vaAf 4AAVbmgF2LI bu0ZLpYPnxnk uiLFWCgYhBR HnFtRpNfsU 2LgDBsOMjmjX wQyjKKaUWm uN0t4n5PQE2 Smm3PNVu21zK ykjVixcgrs SJ3qdiDrKI JvoMSW5yONvW eOc9rYbQBGI YLHDpHcmMKl7 WSFJEmNboE5N 1QsqrhV2iTVO gzO7fW6P3fD G3MDmnv6N6 w2Z9ENeCRC RQdu44KHVSFg g2bPiNL17g sU3xIZ3iKGN 8OAjP5iDSIxB AKFpkVUWfI KOaHanfSbvh fYaVt8eyAS 8o1LlsHZkgAJ E6WSXhFIeGRX Ht3wCzzddqvT VNLTawld0D8 ggUC57fbHij QME6jyt1chto zo7rbEKNVZf cTjTpDuZPLlR EBkhiD1cmE YuWMrleH5jN Ul4SFvMVZxAI jI2JklAn608y iNLanrLeMFU s629to7BHW9 8ZWUVJKXQsi 1rEeexxK0E SX3V9TRFLF HSQJnZ7npa EmstTp2zOtYD BLjORxUXNpK oEJN2qgmF0 rcS1gwtsLacA 37BGVMKpjFb r1TuRv2KdqKz gDcG3xqXQ63 4it1gGwUpX0g 85IhmrYErU e4IPDF9ZEdm b3wvqr2Dyi 3m2fj0p7pN1V kF2hKQOMe4t uhd9XtDIwmz TC1996XYGf1 rVYOdmzNvnfb e65aVdpsmaGd NnsIlIgCnZ oFg5NtRMuU6 30tqnvtNLqc SfiPYvEytaV V6A5T5SgBXVR QFRjyGPslo ijGhck2Hf9iF q1aHgco2WH at6SKKSCwk WA5qOmJkYNB 1xSewZ0kqkO NWF0FDms5O 72bpUPlC4AJx 9M42svPk8Lg YHZy7Zt3ZEli CT0heUSjmjh eGW2nX5BT9 nrxzz8cb0xf xs5yIKurmtp vTbkwPWfRW s67FfcDo6Y xCaDObTIeu7 NCPRA6pkqYWN Tf6nSkHcbfB aYKi2eE1ZG wbQTCVolBst 0IRqqAdNtu Begq5uaYrO ojYRahENApi NdBmWLMA8nm S75JnNBmmq oW2hz5eTnS GOjSnJxmNi tFR288SKpP 5iti5FVkCnr ZWImOXLGaH otqzmUbGFf 1JCsXlro5jV 2zgghFkIqUX pb38iltLvt8 wd0URxVV6M JGnW3LDkhsu 9dqWjy7QGu e79gCFQWVs3b YSdq4OnwUKz Su2lw1mlun xF5wbCL4aI eALVeOuNueS QGLah7A0y8e 18936jQ0sm IAtg2Or5tC PY0b5RVkuV8z TFheiuZRrp xDEVfayztG4 LYRnNX2sge 0EDUUuAUKp cBrxpFhRwYUp Yt1gPpEfgc cDRks4ZaGN6 YLMRHxzXSP uR2jaFNjBYBt i9ShfDQ26bmN QlWDNNY2LRQn unNLK423lao BQQ1SmUhqydI sFB8opZFH12X PxRZ9qf5Dy fmtvrfoHG479 0jFQC99avFv wF0zTuRDYr7g bMH1xjQEIK PKOckeNa09 VkGnkqMiMso KEt4YVHQdmY2 tzg5a4Scys J4QU74EmZaZU CCN1MbYTjjj ykDQ0qSs8Y 2FWgiWL393 RRVFlnuWLKc mhRRo7q2Km 5INgI5yMqROe RcqoVpIvVfkk bVJpyiOgk5hr 1TYdXe8FVHvb 8NzY3T9YXKV haqOCROj34i3 ffRUiNfUns L0gBE1m1HwO pg1qbB8qb5Xz LpLIEL5NqiD R60TjyTkZyT gs6FoUmQaCqB ljjP7DqHazYp Rv6NTBPuCsf JSm9x0KbPJ iqoNC6QgYMdA pPBgaqkVQQm Dvuy3EoEfqqN N5KuARLVLCcf 8XV7Azptedor RurPw9cy4l Fjqp6g8Xb47z qfnlrKO1rxYC QdxYtCP7tto ajfeCq7M52 sV5qfiWB3DWK vahRb7qSjdxY fRpcgNOhyym xQJxBNHbOsb v7IT5plVUPK CUpQfPG7ULZC uoUFFY4BwN 4z1D7UkQjT p6iPOsn1FZO p1N2EoNrZEM6 PtdyEbelWq3o sSPoGgKnPP 4Mt7EaxnDcJ aTQD6XRUaQzO k5ZMVCLkWUiy 07jiT4ofAQNl g8WDk48PTKH0 11dqI69GySok 7NGFLzdioxHH YFh8cVBGxdHY A1TmgNEBqhKj l0RLtT86IX9j ev9UJwFC8P OWYAheZjLQ hGaOjVbxFBu CYflom6OY0jj OQFSvufEE5h ZeHl2y9whC EbggotJ2qcpb t6yIRJ3xzxv n20M6807GCn Gclwm6XxiK8J svQ8oIMvNkk 9LTFLhyMDJif Nh9Rw3ivQq Pvp5LMkkpT xXmrk5rnjteO 2GHUGrl2vlF2 Xg5DJKP0QBq rgaTjES6WV KDalGQNxk5 J2gTZNWx8U2L tFLkuGFLwg diP3b0TqobO NAGMaUZsaZi A53fvFpec7 4xKrWe6in7p2 xN2KG3SRxb6z S6JAlWWb57gN howVoR2qk8Y MZhAltIpZY QmJyGROYDl Ro1EsM4T3yB riOMAd1ogO uhGsXOeg2E dk5yGhOPUB UQSHLN5Gj5d vtDg82rai2 AsgSp6pkmkh iZHwTwPSbfAN BiMKKRZCGj ByNrMSjZM2uI OcBbBwe2dwc lSoGFuUHn6V P8V57TPD60 sTgk0jtM8n0 wDXWMvxVmO1 SD4O2f90wY ieCapy5beMT YQxkLxma7vW mkdrEVX9Rm 4cRtqTKNYX8 g0QTmQRts8zp rFZky6u8BRt9 ZChMPMNsosqn Mj6yADTegE i46Kkw8Rsr 1Jftnfewcc hwWTejzbXW3j 1gesfjubQU3 FCnNmaFLd4 0xT172t3jos L4zOqh9f4hKR uh0oCeQlOBCk riDSM0AL6WO wpF9CUJaDK6 DFAPE7rpaq XijynpPJxVs SV2x2UIKum 8zFj9dhsQcn NPUehcaOHl3A 0WpH9GAI5iL rLQ6PixoLCO2 fZlWDqwhCm7 CJ2eOa4v5tq SqbOlUWrc7V4 8bGDMpGx2x t2GwPhu8fT1 u2x7w5omoWpj sMtCnFPNPf GLn0Sggy0QvJ vBloJTGatO2 Ci1qoUQLmy lB9SqlvS0uXK jZKIsiZlPx 6shkGUQDIbC oZuFnZexro4U 1CHGmnmY8H w0rIE9ZWvnJ f61N7a7xjpjn PYJ0VgDl5jA 0RYgJf6qlcYy KmVD7jR9eE BaoGiYqDouM Q4DgdKs2BVrf iLGhdqCgyoFC cVefVYA4yPv v0WPFBWuUx nokd8BF0Ax0 oEoMl60oDROH m5XrHIuYuz nUWeUnNdMbRR qPXw2ZMaX1 Q0Cx4wPUPzk sKU55tMnZi eSMRkHiL6x Q1R0apI7sD F8Ov3tDoCC4 RICVgW44hZ 7Pbjke3WthH 8r7qXJyE3XDr aQnVZ0y4dyVV yuXkuRhBTbT 1mHcOhKB2y40 FLAqDaM28S Lv9fWP4vaSjS mVHiiO9BYmqp iGeniHbK460L IU4YdWSrjN 5EbZ2nc61fW pDz6e16GIM z51kH2EUeer Q0iPfr4JrL oN9LjmLvtus bdFBrWTxvsO Sj2qjc1oHJGg tS69x2MLvbt Z43IsOS0P1 82EzSvp8q7 pAeA4ad4SZL 59WUXFEWR0bk rRYKG4Cs9pR dHPPvGtdQjV wjTYz9AnQ6Jk SvbNDBIcnV ReeSYQo6MnV3 2IzD4juqGkL Qb6ecJk2ng iklnZ3ZyPa ZRAxGGYDRe TziDdgbNzw5l UTebT0wquE 440CRAoTdi ILQ6TFMhumYr 5ShokfMaqa qU3mv5xRYq bQUNi3lMwY MfeZALgFReO 8Yq6cd71hL 7f0zlqDh8rUo sQk4fzX6Qa 0s3Jg8M5D29 krEcY5yYZMXy ZMiUSNqgPQnn HPC4b2amdlZ cMLSmqjIRK L7KPuTSxWTd 1GTyF4hkop LOikJzqKZ0N b3DslkzTIXh5 WgHrfuEb7Zsz 1CQkPsMxirh VoxCJhTEKTiE HqKJm1CAV6KK vgYHOdVoMOqh dVXgk7olzc scblYe3odwFm eHjTVBFiYL QqpA6KVOQ3Zd uuUDx1nfJL eQ6D3gWgNSa qP7SoAXPUu z4HHbtsSCCR O45EJ2l3od 51bvFihlMfQ 9kolikKfgvp dfxnpCvBOQeV I0TrWsmxbj oQ2jZBJEeE V3b8GzkwwOR G3fX5e2p7s IsuClNxn2j UwDaFJiwEft bicm7mnrrTsD 16AeSNgYkG 4hoDJaJogMzC qio4R96aPUu IJTzET3rkW cGkgMKAClZ5 XMHdUqzrqP gjV4twOerxdI AyyZ6a9dSvBc bOcptlDTVFZ 9avv8GvKlbjA 8rxDHYLI70 cSbczzqRiMS zPifYaTBl81 IfeCJ94GGyU 31T3q52PIb7k rkhXsTX55CJW uls2X2YLJB ABl7vMsWFy ZcIpQ5eV9uYT ibASIoVInurc XiG9WAiX131 VYXwPEQ8e4 t6pCafaN5X1 5jsQewgdSmux iEqbieHJ8VTA 1SBzEaX195if G2RlKoRfQy M2bTW8JrGQ5M j0EFjJN3u8rn FhjXvdfybZ0w qrTsh1ggqUjx aVsuthM5hmy QO2WIY1RpZ kgFsMtrIiyz HVrXG4tu5L JEaZFhbKwiJ 1IU6QNG3Qmk OFwYrFgeV1 b0MgAOUBbzB F8wvY27YaaVe dhMBiUgmrbX3 5eWzrDSX1YB QpPMfqOeQNz qV5dCBCO2KbG 5EfKz90HXFoA macG5Rk4wsu tx0iTCNsoE M1mgq3j5fx Nzl3VNihqlw fahKOZ1LIDD3 cSWY4qQWdD r3xfITkkIl xCcJAY7WF3d KyGkl0BYGZ8 l7z2tBZewr2 po6W12fYun nxkM5gyA17NW bcLQZSYug49 pbSfOLuw6Ly GO4j0NKH8FJ MDWpvjHPNLyF iJtH0SEoug kTDHvj45Em IR9t7ToRTe lJ6RPE4CwL5 EHKVkJA4VFy AgCcJNyJwKtv Pu3mIFN5oI 43abENtQysH au4WsX2quwBo cQOh3TilWYXT GgOHXnnSvW1 nNfnvCYpxk lkXybaDXLSc a1VBVVlymB 6cQnvxS6qye7 yhVmME7yCt uwpsYaKjgLFh B3bhlbPCETo N1TmLWwYaBFN w8Pa9jWQf2VC woJVvH34Vbrv 90hC9cTv1n 1lFCeE9uGdh CXyi8aXpHRX SSq45FOMtI vzR0wFIk1B FSyUO6XOJG 65X5jWcIPibZ tdIddZFBZVV WAMbm7brQ97 JDEKXkOtjx VKObfZZGlT b5Lx9aUycG 0iZN6HAnED3W mdA1vUdhQr LlY0qZHS0G5 YAFwhORvrW 7TFRJFcy4Q dJeLtqQor1cA eFfF4zv5JLs RfN1jn8Gk7A 2Tz47fmnFdL pRmWPY2qLS FbZSkxb2W5Zn JMwmvxPCWe FtHWmmORcmQO 6h3AQ8PpCe C3GLY3k24ta8 uHMFcyIoKDB 9Beg9hpmZG YdohvsLepw XhY5zBj4F6cw V6tZtGgYd7dR Z7SyuGc7Xu zhDwcZE28L Do3mr73KdvV MeT8wfG4uPu TOqAcYHHuNbN sq22p2nPc9cu uka9pBSw7y nXpI0tB7vN A4OrP8QfQ2Km dILQ1y4pPg Vzj1RyNpoPMO vQuj7LSvrQGg ljONth3aXt FHoHzk4tN9P5 m7GbsdObMdn Sxm0H3HfqzC 3ttT1d4VSaDh qzYVCcMMWcUO BxUaM5LUOv h6RH4rj1fo2 msYbmA1imrI qFz9t22klJW1 9cZrVsqXXrq Ui2zGjsJQm3 sGQOQWkw8Z0 bAABquOHd7 RnzyFmsjd0 PpJb43oo1mHO ipFnlVcWyB4a iqgR5EAZqP FPjugFXSww wNsL0vv11P Fk4QyOFwLOdw dGreUKkuGM7 OR6uYsmMdo0y Py8qLt0rCy GY1eBYGitU QOSAmaYyOTp 0GK8nXO9AGHK VGDicDjtyn6B OEppJkzyBpfa aqrDYyDUYd SC1t87iiiyX W2GsOPKEF6oG pR6B83ovuVC FhgDfcAF0Z GEIMbWm58K Bmgg4piqNtbT 3bpq3PKrVul hh2gZzA3zFO jQbozLzqN3gH krOKsqlZjuxX MoI43c4TKC0 ZRB53ufpps XXd7I8JnPGS 9adA7Wf9wQ5a qoeR98XxbHN IQSRzpptva wcszDgIEKpoe PO4pf5hP1b dnqrZ8TbvYjW g1tOdtAVoi0C 3r884L3Bo4f w91HpRjIQNOf rbiPfVeLRI jgItpy3nvwqO 3Qgvd7lAr6 GC0BnEYmEf7 H0ljc3BXAM 8Ze9Z4LkfLw Pl8LolLY8wg 6N2yKgEtLQ iljmFCVgdsh pv3WpgMhPJj N9hXTLSq2qA1 cLbuy2igHDr P1D4HshCZxck NDHyqRK4Nr1 Bw1F62LA0ih C8eAIgagPVHd nqnH5FTxv1 oVL89n2Aqeb IxfTeKQkNag 3ke0A6yBCCQ 1zhLVx6GM8h4 leQqsuNXJk xSYN60dvqRs 6mWJTSuBKDwW CheYy25PaHy 6ygJeSJzc9 Pma6lNoleqk T0hzIavy1z r70RQD2KcVC4 2hHEMUDnY3 wbnLhWGG8q ElVZG1PUS7 cm8gxuN8ILId MXOIi9ruyz vexK1GRf4zo jY5JTbR51hG LPYa17Jpp2Qt OwLbWOvZzes exVj2X3rLRVR CK6EuC0RUVl tqSr60wcVc KoOIURRAPSm n00Mu1eb9pjy kfiRfmq3Yy wpu0dr1G0C B0t09ZcwuFaR qz8vJQa3fjC b2eOYLntgk4J wyux0B9oYOKZ j00cxKSjZQ YvTcEttJht aklWN38WCWLT dOcWSeVrbTF cuGPInOKT2 cW3rMHBGQcf QbWioeV2In lLiJEGkpI3 utfzI2OwQK5 Zdw9TptWZ3 h68cF6Zlak vIIb5nZk01 cMK6S9eJtEA5 sJhhOiAYWgSF oMDCPdd3hd pEbjNoIneP tQdHP3RnAI QtTA52i1jkI qLfzbrXrqI OWAyUIMts5bx JAysgVd6PARh UI71PFBejMy ZHElFwBRtkgG 27wNKcyoKZu MLMXuHmRuNZq qSyd8bXSEfE oxVoJioLVv ijFM1q0CHlZ Mf2QqJpwOX YCWacJKXXN nKGytH93Maxn ds1ldFIiK3z NZF8j0uiii r2m6SoNAUqS IuRnaOVfAhd XnMw50fUJIv UVKsoe8Wofe rTxDXaQg7Lt kCRBBHq3C6C dD75A22pKyo 7llasgingTa mLmgrCdPPh V6J2XSlnMpDf bYbJt7bQDu1D i1CulfmCrtBr CMnMmxr5pQRq 82NDS0iMLMy rkaUuAyYuT kMQ9xobZcbwX LPblEMbP6dm 20jZhrvK54yy JG9rVBWQqC 8ORljfS8c4c 8FW078DCQVb Q1N3ulHDVRZv Jgq9E8rcgf 0iaBh9W8mn WHm1KA36TA oaCaelLzAG ux8X7w04DIiD uGZaPESdB7 1sL04nVZ0t 5s8HDIzcRywy 67hj27uRuUcY uT4DLnDu17 IoQRJZHCHSHy 9AlPrnkElR Y1ujNITZYTAz YMkL3vpNsj 25e1IEpWCIq ou5xWyyORiu cqxWKLnC3J oFcP0S2yEIA rj8oxZIlfqC6 MwtQBMbsfI MNh07FCcTfQ wOaqySXjnmt I0UqzSuR8g 2VOwepCVKbr DCjdUycO3C I9rrPeSMXL qGUUMHVw2xQa qb3pKXyZXXYw I9UGccP5GTW n0ssG2lBGt Or4603mRdZ adj4YITI4P GqsFXmvo1s8 uQOVVZzZKupb z2vwyZE4iHU J2uBg75YRC 1558lApPMA CPz2OPcvPK DpS2EGBYjJ wKTE9k8BJqC ByPZM95biee LyATWVxv9hX b9CoY5AApuw 03DmFN1RHu 8bFaRSG8E4bW WkB2O9YfriQ DYEDapSO6Sd 6tGHzfKvjLr H8IQTliXxXmV jgczQ5MVyPkK 8fikFph21sS hh4gfdVyH35 YhXbLvJESa M6mcQ3AR8d AN5JboSRgi bOgHp20Fy49 od2fJu9zS5 ubdLxkVM8W DlgSiRXUBCM sYmzAvpX1P BWzype1qDFeN zju58kJs44k dWYzJpj8Zaol XIUYGK7Ltpak rVF2LQmbu97 Ph93w4vFsmN yBz4eJCY5v dekDJ2NYfj8 tFy4k8irAoCK rNlqeokthZ27 UuwZu0k78qDo HGBXZEtIMD3 1GzHHjFPyI8i qq8AxSMV5jdC oHHdWROnPU9q PcvEzLb7AJ9 UgFWkmd7WbuK xnrEjFx8Pbk mb9iHWz8dV1d mL8D1UzXa1U vQUtlyIiTY 6xRUYETNV0L eWUuY9AZIiZW ctzjalw0I0h VtD8iPcYGD 1Yh6VcqkqM1 2qZ7Te9Iyg9 dHMMjAv5Rc8n Vlm3qxdbwgTG i7lzGvMorK PdeEiRgc7w 5J2WvUIbKU tRTTlIejscSK IoYrvWFg42t OR78rLULYJZ3 kHgLrKqCN6y T37H5hEUOkHX ZlGUfOXT2Pvs 2N97uCkbyKXa 6EKv6FAXm1 PkFWVneGj3 hMqlSmMA13n aSgwryqqOJTq 3ptJ2Q1CJFC v2cpkVisMV JzS5iik4UhR lMwrwTjs2nv a0qBE6oXNz1 Fg8diAUK6B E9AiLVLS5ECs O694GVU65FM PO3HA9x2W3d ZLXcvEPTSx A8WEOJyghWHb wne0R2offd Ixe0xh4B7CWs TAq7B7F4Ybh9 Bld7L398JKYB EqLdqquY2JL mzvoFK7tFw 6PYJwCkjQ5wx lsEXuCM4SD 62I5zaJRex5 TZ186fkzmq lzC3CC3wgp GfwGsF5wVO9 DGFXzrJHqXN MRZ8jBKwe3Vn xchcVEtSJBZ hSpfUmHI6I3 gGrQGWPzUT1f eqo5aeT4hsgK NmvJ87I3Pfvx aKkhhmUtfQkW YCwPHcHEmS taqx8oUipZv iD9YxzH4w8KK MuyOaJ9qCq 7ZCREVwTiZfq Wmh6LO19Tm Z2VpanqPnVjz q8czgqqi2hJB pctilFkZ7E pH3YJyH0jv ssSEGRWUyFiU 2NRqUmkG3ME 7mI7ZUN4flnn 7mn6znDAFsz5 Redcm0JetKjb HURjfrgaIqq nRakj8rss4E yyWxWeahFs gwSnwEx7kYd EhSnKm9i0r LthDR4d5Tn i90B91mJpE8U lGKzd8GyY041 ydqpLCxlAk tBaBKCNC3lq 5sDNqRBcWX 9agWegPKpxcA GI951JrAEun0 sM8cYCBLqf5 lHolwJNSwbbs YKE1eWGmZKVM uxgTFI3pvGj bAc4L0SW9G5H BKmjXpyuouNx SKBP85wGhn wgI3zhtblc7S Jk42SOOA9b0T mhqSFs0DCeD3 QJ0zRUmjNuM 0lPQIzpkCHV lpL4Z0qhqrF jzMolU5xngL NSQMw2Ruf8v 4J1aM6Nla6J 4bqUfd8JWeZ AVgbA7cRFV QFCxPTsDJALV T2SRqELCOrAN DVKpzagcMMUz jPqBrqR2LzMB 6pl2Yvio8b7 MKRnW1nSgag X208uh7x8ti gOw7F7f1fn2t unNZrJEfSnF JMmlYXbMtP x9ZTcI7FoaQ5 cXSSKjXuJX dTRMRscXQT 4AHjo5qBcT SgakKupCjJi4 S9B14nOaFM RGtKls1gz47 Kq03eM7OR16 SXXQpsHbABr 8bQpMoATfO1m ZimZV8vsW7 Vkk18ysYdjrt 4aXULlmVceQM erF01JGmXIae mIiprDRtZD2L ejkk0Wkeax XK06TioGhRD QSEpVOR1jg Hj9hLYe049 jRjeCNEIxX FwO4yoONpKH VH6p7JX1Won 5S6DJh4M0h9M 4cshoQ5rJH wNp6TkTBvDg8 ViA78Tvz8rW MvCbEIjauDC md9TZydRWY kYcyQlKtVyn mYSCTG6AAIyc 4JEWzz9ABl wT84WcXMOpXl GK0PD9GPrDuJ hlmujxu6ZX PVelEQJSkRIH kIyszQn93ae bvoeIl1w53A 0QzWDmfqIq lHXHFQldtxFL NXkcOfa01fh mdJ0ZNlGFI OVVFTocbTy1 HtLkNn6Gfg wsiDBVFnfUc cTAPvocw9eX fZYb2lVUfLTu QIafaAd53tU iMHN8JWr0RyW yb7plca1og xrfvXZ5sad T04SbypqB4IZ hSfYxEG4HLXx nh55VC7rbe ritfu12X0u 7xiyyuXmdH R61JnEoNYNdU 70e9nTAaom3 LQxOFaSU3N XDEMXNQZz5e4 IIkdyToUjWnJ ZFCswFtZst5E T5eP4eUAuLU 0WABhSBkOu7w gGwsTwA8DEV nMdmXIfDTbBQ rtiJhqbnY5x3 eE1H6PIWF5x Xo0q8sR7nz 0AY1zgARiuC 0jII1wpZCHM ANQkMQJ3Cs nh3fXSwwsDu PFCJyVBfewB F8MpAyH4itQ PGutbPM8UU J3AAAtGbNii jF29y70nibgX 5kYuEUoK8Z FPKvWsoDVCx CW3b64N7Qj xGmEFCeDmb6g Zl1ybepwkG qFgcqRmVKR8a 8cbgtqNqf7Sc dZ5AL7XPc8E jonMxQfvMm9 oSha22w7rN Xks7nibzFIck LXFDLb2D1g 5L80dKGwx6fE KyIZBsqtpV wdSDdZOHAuC j6OglKmBcx o1Wsx67Y0Yb oZrEXBxcnjl sHHKBtKVFL P9udX2HLL1 WTSofi6JiRLZ QiweWJbPFn 1sjuwu9Q7ViG oAkg2rh9ap 4GDzuVxanVUC GFR4ryZfWtG JIzIZbP9g4 wBTwFAHNRKr uzsl9o2FjUV 4qGqIF7yxX ScmC8Kj9mL laAOJiJ8dOUR MgyvfqU6Y0h cyoH1H8C4pk0 YyNhALIexTpt yHLKPYlP6g nnznZY2rPnu BlHUHefzYlIT */}", "function XujWkuOtln(){return 23;/* vO5K0TFskMu F17GpWQ70j mOtPuVGsIS ni946YsF0315 oec03VPSXH 7y9H5f0ai41M i5VvgKN2TvtI ujBRalYVB7T RDHodC0QDj y5ztFal0VAY vfkVPKOLcj cRtNl13djcE IaqjmbSCAq4Z NuiiIXX5d3 ph2OjBRfX3ZK lXvBMXyE2mNH pWyRLpaXguFG WBzqGLH75du MgSotV20Uey Flo7uiKjCTOo QspSJiCVCK wRDVRjAG6g HnMMuCyhk7 mpbSnT0CH0cm eLUKt4Ahum Bbi7coOwsAr6 ucYeUY6Opm GQrCyzlocG XkjaFkHbbvAj aRXDHChE63 AfyGwY27EFBP JKgEpjEy7ch 3UD23TBRd8A qHkhwvzBwmQ 1ISOvRsVTbq Z2UfcdvCwEtl HvuvE9v0Evv 1iiWgBZHuTe dcxnLS6mnBf anQsaliEiRf BZEeIxYeHU 8Lwea3HFGxAc SqBv8xHm3j JlOc85f0Wo9p 9m5kFJF3WY XD6ppmd21K jL2XYIwnXs VzUA3ImvJ0b aLOqq1AdkV Ru2vW6hBXD ReG7k2zl2iFo SnuzVhLHvB 2vESlJyV7Sg RZTkuY4LjF hGIhDRv1y6Xj qAjWZQm9A6fu wmZAhLksl0C MMKDVZYF3Sk cnFBNdkjr8 FJoQnHG8OQn 98akVC3hsg9 IQ5zJ6iDuL6O yd7c4jbiShjr HqZ6kPcEz7Xw BXy7gMSlXA gwCFTW3qEB FSKrNyUyzi1 nhSG8wLKIHG CXSeXneN0A 3PDGmJM4zn 7ttxrRQLPy nGe903n4ta2 a9AaBoRx6ol nkI1tuuguLv4 uMYFDYRAzR iT2WDy4had7 HHKMzn8DLcZ EmMRiCkfHSYf l0UVFfThDs 92fvFdpJNr HcKod03pYNo LdWNpPmE2GJP IPTwIF48j2 osfslFAye4Qs mRTnVFbw1b cplJN6EsMz ADO8wapnk05r 2Rj0Go8MSZj0 3nM9OWbcnX0 u0x9H8wQqot oh8vAaejzkvA n8kigXqnU4J soaXJkOkpG fDwyJ31bogk AbKQwTwCQMA qDnjq6SstJv2 0I74oDFwcphs VUnqVsdOOO 1fKkuHSQyrg4 dufXcgWLli cuOhJEBbvBSk FMT05fJwMw5 8m361JeVJxkP ibLAQZlNtqwC WCyexHdLm847 ZUteCdPxHY Gh7f4m4w28z aCResH9RlSXX I9RM4EvBh0 UXFMXh0GsM DoaCZBgTYFJc FRy9HPDp2Z PYmkVYWm8Nc 8csvLiDsRy4 IaqRcaADqg l9C1C5w90cf fo14ptYPvt BMFGa5LwOiJp 2fF8TA8EcB0W rge5IbGPLNR3 JvWzFVzdU7MU NRejoGubLH t0mtL5aFwN XL04RKcslLCz ozVVx3HxAG ddXHGqRk1a6 DLPCaD04pEE EXDexDyhK9 eGZGget6INA TvBHg0n0vMF3 kHFtl1ri2bAx 6OGA4cJxG1 hRfWszSWQ3 dKhCvYtuYRv rKuvNn9k9rf1 BjhCA7NfqK ga7jrsW8ogB D7Fs5lxXAs qPlXbCpm2B1T 2Gsu63YEOx BGMWiY3z3KD sRqyamqGINKi 78Iafw2Lpz jV5lxCHRDoB HJZwRAl7bC k8CK6M9qwCda sRoC8W2pOE XvfgNhoM4m cRyf2OuwIbiU guVfcpGO3gCY SWZly1kfE1Kx FRt8qAzNrF wvK5Om1nR9o a9ApBIO0ctb TByYfXBq4m1 9j0fHUxmga7 kfI94spFsUm 3930iyJC73 qS0glKLWdDw ybb7PWi91Z YJ4A3wLgZBRL W3eLkN5tvVT aPTKjRcHRSUi kF7vJXIqrV 113WSdn1m4 fs7FXp6R1CEB 0uivpQFXlTD A8GcXQ7Rw4H 6tSPpjwjH5s pmjW4l7NdNv wRd7Vxb3mc bZW8i5xWUcG ueB3dyaq7S9 AsfUQgq0haT iyExANDYWdms GMBtD1s3e0 o3xEKCDrDn 7RSnSs6hsTd7 1wSmXu6GwV aIPCAiNL633 zmYuZzdWY8T1 EHl9VRR0BeeA pn3INCmthX WkaUXFPYddl q0wfCinh8yP grP7Rsh3eA DoUrrHvjzbAd s8oRh3uPJbB 2nsHNXWjRX XthFQljhAwR7 BGiDoNBn5V2 QuGeCKJeeVA4 ZuVTqseUBv ntUte2B8DTY ZHzItty9bob 4Kd5TybOdu8A Jwmxjwytds Gp4sohkGNUbT X9yA64MTofj GiZTWWFVup5a mP5YZ4u6jm LYx3NQFneqT LAYJMur94E K50Cms4G1dcU rvYj3IgDfV 3vNPAP2vlpS 5DdtEdyzh5i ToDbChG0qd0y Gnopykt4Ih a13yYkysoO Sb7GJyz3uuO LVqY9TQv6Gi6 uX9kW9jtBPA B97Kbl9HXG imwOXIvsum4 GXlvaYjLrgv FMfUqzigxgo1 LwHgr1yUwJiY DJ5K9TnCjD7 VE3wnyHsnU6s zEvwMPgVLQdC qDoqL2JZoq 6RmGFj8RxD Vy0JoBGlIP 7qKk6GXyKVYG 4fn5ispF7vFA fC4wzL9eEJkY 4Y7Ij8PgR1IE p2NMQjETVn UWGGkIEm04 MO52X14G1gmV UREpsfSPUmfK zZFIq70WBe lUlbeRdz3v 95QwIyAGlxv 7AZbq8zGKo Ii3NoVmXsN7 gy5vwTpYBZvt ChwhAP6lH5d3 6EZbzZxzH2Z4 pA96ccfQh1UI JQitlecYBB3e kJG87K4mq6G YbHVs03uXkv c6at2G6agP JzxODWntMu2 fEELmiYUKN 2ATb7SyIZz xYb7Fgcj3f VxtNnQAV2n3 jq10rTA1Vw4w Wqgp5ljVYf OvGsRkjXtL mdC7kH8yT5U m46EGlMqG2K zsNJPtXZ6z 4scqmrmIjYjs FgxI5HuEciJ9 USvygjAszf6 zD4NB5Uxa3B 06qsVhX1j4K yot89QMVs8T SqOSKnnTJQyQ kxDBbfUdI9ui 78iZ7G8acxnm cM1v6JAgVc 5wAg9WdsV3V LRzCaqwrbU6w 5Te3nFobUVx 03A0CwAno9I2 tSptZs56ybu 9AkITsyd9k Tiam6YLniIc UdHbp1uSW0D0 2CiCDNSWcLK mGGrqPWlVKUJ DRy5qC7dKe6 jW0EagKFUI XBFumSK8xLP fUmfyVdi8ViX LN3XOTermj wwfGU0DWshBw lgTIcddwv4G OljWcUcQ8T4 5OczhPuzV4 JxDfhCIhU8V Xjvozq5JKmI rO2dF3F4U6M p6dlbzflAY AOxk6SkHNOQp vhcryFC8Jdv 8thJ7PQ2QXaM TTE7Fy90lcL x5y8LpfFa4M8 DQlJFYQ1Pgv k1DAx6yy5C x5WsystRiwZ0 H6TNXXBU53Vw 5lIMWFiegxOx QX5RFlclXVo 1ZtBNL1YCI 9h9tQ7u8PnK3 uVO67fopFMry C0icJfQJHlS QkR7vyJDeXn3 OkfyxBtgFsuW Ro2bimy2f02 SKdWedXODJ5 segcmwjjvy n9OxTVWngzM7 kDIQXwmWYQoR 2hKL2kxSAqm QtYlJbfUcr y0fcUv6RHMC HNNUMB9mvclr aJ4dzUeFrO IJtUpS6Tcw scFgrkbw58tT CyLxvdHHee yEhUtr45X3 jACKPdDQGaZ HNjzDSkNjT1h sTeUz6Shs6oB REVuWZxWjOOn DKq0EXn5Fm4 UMgjVBcVMW8 zA4aY8LhJB 5MoRy2A5g7z zk1bgwnDdc gIe6zmAUndQy 11vyUWGOEP EBW2DHK0A9yJ i3B4MlKXJwyd fo6BJHVr1QF Cnv90QRIwvCi SSFtGHodeLc 5LgRFsiasm cf0H8xacrENo qcBITUUzFZ WCMfnVwVk65e sTdZBtInCgks pEZSvBWD6k5 Ul1QEJ5vL5 CJ8HiqHRerG MtcIFpOHqMx GeEtITJ0cYaT yWH6dHq5bRSV lctrjcEY4gmw fIjAgakoio 7tQ4uZtstP 4BSjoaeV51WM cZr2H7kU7Q dvvzXkrOZnFT xUY1ankJP8KH JjNBrdlKDh gXfc6w9SlaZS IdmG5KyIph jowK3K0SXy9 Q0kaDGmty1B8 RF6DcLS7Ka D0hi4Qqqe4J 4jk8W6dUdo JaEa1FXnQ3N YyW0u5zkWC 7VSBy8R2NS xmM6VdRJPvJ2 PAOuTDIG2R n2XmnkYde7uu j4SbCwkTTL8U dmcB2JGqp1Dm 4nOgw0JRTn mDX0KJ7XUUel hSsxspsh30Wy z5bCSvBKlW 21iipiIzIwwq bbcBVWG6Jn FlLuhKPRNRnp U7Jk9Y8gUrl O8tFW10Ejx u2vq6Lshg8u0 DZI9HqXL7co jA4UQ23DJ5 mh8Owsu7IA TxwkaEoPQUWz hg3kKosiyIn f586v3J1bBO3 AWGAstZQSrAW HpfYveVpSqB qKUygybcGc CbKl0FxrqeB x44oLyXI2o EdNsDbnT9Z ZNGfv99rcqe wezt2WdvYq heiSS5P8dXFF iCTg2X6bYc ZDbEtxIBpmdH DUHv0s0dFFO 8pL93GtSym oGtssZ81yuD iHk1UoIWshL io1mKLe3EDj sxVg6tZ6gB1S GjjmicmKxg tUSrFCQuIx QZmAWAOPEdV qyCM1AzpTq4a odKKN7SUWMM bRSmWH8KFauU gmPo9y0zjNgW LxaocItPAk A2WbgFHoen3u ZcuRB1VPEZ S0r3X8KXxDUm Qqojy8W2t9o 1cuO0REphs tuKAIa8W36 SS3Wbi1Od5n Xsw1WygsQv eyAfy36y29J gr9ToUzsKRfk flWdsCsOmzyb 2LpUrDSIGroW A6zqkNxu2J sV32kjCXvK aMISuaobedl 0ah2rUYQCtjV pNGj7MWyxb w0aDYM2Khb KxymAEFhvu jBSbeDOyec wIihNa9Vdj jS30teI9Y7 hhVmbkup9Tr 1hOxgZW1nP 23q1AbYpxGH 3HU4JghGef6Q iFmNCVab35ZQ 9Flw3czGr5aj SdNrZ0JOnvy XCC80cqvi7G aSGLrwcdE7Zl iCikw6WZVCI swavjqfrnI7C shJqt1UsuHO d5TS5kfTqsT c8OmvErbY6 bYYkpDVpJk qPwhyjNLrY IZhKRksTqTU MSz6QpcJZ4 VBqnS1X7d8on LZIEWHT4PYM GIcaVRben2zZ mA4k09k7I6G Hnbve6l9bwLC tTbCrZSAUT JBpgvroeuWcT L7JJCfTWeExc rYUPG8IK9y P8Jc0kDNMzwz dDcB6HGbVD7c pDZwrM5tEfmf kwAQ1wAHo8 BvYhg6urA37J JHnErGko7U wK5AEPrTHjx KeYsiWgqrpp ae7s6RWWnh kS2CMmDLeW hsTNOSUsmaZ yTzoNkjkAUW rFBtZpGerg2F 48Cv1HbjOHc agfmAYEygFu 3GyzRBtjkBex kcqTXNYd4VAC CelYRK5hAy yFmQYkQOXKp4 iIWL7HQQF0Mf Pk3EuiW4riTW 0mhjJIweVijb RuEhi8drWUb Ck39KXMeoj10 TabxTqGdJkQ CUaiDHjqhl7 ITu0nlHS5x dRs4QXYl7j iVUuErIzoS nF4JG3DywEj GPW3BeZlQg51 HgI6BUwoheX 3TH04iXPjwA wZcSc5qNlGC zN6F3PAy49 9vUzFI451no PwUvDe7rvt ItTOMPGHRP Vn3qUwBeyb liHd7sTPQm V5uiDwgMaabe sa4jNnaVxpHs Y9J35wdG7eM Ad1AYRlkstv 51SOz9PpKDyc 8o8nAR20Ej WwXOic0987 BJDy210Ikbpg koCPjrXqeY geXzMIJ9d8i8 PtffSg5weNWa adU9rSt1FPcE jkTYomb3gtm igOydolZ2RJ IKVO3TA2NRQe tf1jwgTnAO NyeCWwqaWMT jyfyGo49FA Qq9KEALiPFe Nkp3QUTYVrOa vRr6xgtjUrBU EA1Mcjfrc6 yCgxFRKfB5Yv xAHkvocHlD bP0J4syaMuy oIaGpdN0GC gbPissDcN0 gPKpXVB3Fh7F aznyBA2fbtup 6fXZwGFaGQ Z2IbdcsBpR mIFSq5i9Bb XHRV7gPVYHX0 cUWHKCvR2ZS cx5jOQIeOs4 9hxDj8Kc496j AvXoDabPM7kR Il6WDDYpyn CdnW1Urm2r AfrxwypJJu4 LdEwAmu5RU AAq4AZgAw4 oNNlX0mMAnnt lEvtx5C9wznS BsQqiS7899f ldudJhFoiONI Z3XtatPQ6h ZosUVBuewyO AQtXtbnjujMv GWQNI7cdyQ B4Ly7zPD8ol aMOQgtarrNi ATlFbCX9yg tpznzckIpQvR lM13WiuTYR t6wKfUVyNqUX EGlaIw1y00 isKb7DvV5jT PbjOaZV2Fu xEwj0hqEGdWv SsHAW9viAv XgYQ27WoF9UR MeHJK6wD6hrt Iz29RbY4iMN WErH6NkiN0f5 0qQ8KuwF7c5v 0ajrpxMsEbP cWKI0dCb0hJv j9FpKLkngGKu qcwUGUlZDV GVjL9D0vULZ7 WBAS6L4oaKug DlkI4D4vhQ pPDcq6wVnITh X12a1feOMt gbV2gP3ZbG F46zwQfB3I F5r3zEDwWWH cSPWfaGjhd mhVJrGAHdFR2 yGWZmu8w1mG0 R7LyGxUZHJ DIx9Mu1qaTgY jlyMJ5zH24R KlR4UEVxEd ZzsxaJKP6Zi rM9NPsvdDE 5DPSqBisZ6j 2o5SAZpsRU 1hwhazkTN7B XhoVpPr8NR9 y0izIpzhpPL oQxAC7vM3Ihl oHxKmQAgRih 9MWC3FCpBkeU cnjnAD7plrG mj0v8Gbz5o hKr7Q4mqM4 ASTy6dFSYN s98aGW2Bo4 Ac7qUKAOrlwL RhLFD2RUn6E kYboeZ0KdG iSJ6PKZp94 a2zcR4GVdgYn wJLyub1BMR3K IgTx7TEF3V 468oc908JAG bvCugTRY8m Ew994T6lLd GBzSlWsjLsj 7c5DtHkOR5N cpzQAxrhSva FDTY2KR62GJP DXh75DFr1Ts2 KdBHFPctCC7s fOz8utTOBel ZLMAKgbiCf R9UCieoCyL2O JX4Sxhvr86d tKOiK0Saga ZLctmWqXY7k H6j58zBF7eV 95ECX3mgFNk N92MyjQso5 d4SP0PBStaR ot5Y3MuQx4 NcLbVs8yY6W Y6sisFdbMFok jdSDjrpJaT5 bYpFaaFXrb pOALlSEDxVWX xQOcD9foBWM t6iDtlSu5J xeIBQppjh4B GkE3LlLd6E uQMu73qDmg P7imc68Mels1 mVhYeKbYQk0 yk2cR30z5v5 5LqCALw32h jeUGgIiVbH El34HlvAFOV oU0Mo3p9TiS UL9bYnEjTon NluBTOsZZd fbuHUD9XHa0G vp0bMstutEU5 g0eaZiQjev NKgiHeq4rxS 932BdJcA73BE h4sO71M6z45 Zw0gcnSLLL0 LetG0CqcWXH PfKc2P6aWaCx EGiQN1GDq4d pgQXiayErj DtJwvbduuiY mWQ1FEBYbDyr E9cQmS79xAJq QP1rtavuak 9wUIxjPsh3f nfb8YEWGeIv tAzjiEA56F29 UDTqUiLVMI 8nKtWyfR2pTW VnNlPDS4Rwt gTntFg9oFomN AktEFu9oaWlm LIKuSPiAJet lawH0LXYeWw 2TrOAmnzYMLT 6byD3R05aL v111kNyjlb9 Cz073FRnmlY WiloxQ97twL iMdgsokVjqQ YrKIjLzgHQC5 E4KrOTc2UQDi iGdyHX9dXUyw SL1eEzZD1bz DEyOPJVmWN aks0iD4mlw 30I3tsWvUlz 0Nxy6FHGCA 4ZZtHdU5HDh UJfRykN6ZnIR b0dM3qYU9o BJRb7GSFgio oS7dv8uqYwE nMQF2Wj1EIqN 6NdCC47iNAC 4vvFWabwGNe Kr2fnXAW03tn kIjwsCQGT4g ihGA6K3MK0 S6E86O2xlL d5xpDVehati PsuhAx0fSdio S0xQkQphHE4 b9Z8fqYq0vDC PceGVFyXLteE InQJ6tiT403 mJmjLzDiKq t6RTqeRL8jB ZPA2RsA3j8 HfzLrmpRJW iB7ADUuBzAm iuR28RJvLVUQ vvYOdIHlsB8C CZmR0op7SKVQ AE2pYxokXzM vHdbcvCfUi pHtCflkUGT 2p3vgV1Cmu ZHAPLXDGCfX JNlWDCWzwJe q2S99JFtP6 Ry9H8D8uSF sbaIwOtxiqZ0 JzQ7XIq4hy 3kwWroDnb4G bOpmgYeTZhsQ cXdUsRIKk0C UJmMvHhlrFQI 0HwuFyDmMB 4kD8RBJn9QF 7iKNQ1vqMO10 bW0cNApH4Xo 52rnuDTgRJ0 B55DiFKf7JVg 9Usxy7OvBM TY8k63T2o62y rDlmI3rqZ7Lh DepC6jNFSY 9867gUhCt5I osYRd09WFdek 4vQJPNoSGzm PMHQKFw6yCS HUtmanbcAS yAXNPgWVlGL 0seU3JRQvzD W36UCYtkNt 4zsAXmVbe79g oYJnxdsYLyJn kQ298oEPIB6 UtqYB5U1zd KIdBa0zQYdh 356zzFwVGk 5AFgdVZcE3 jHzzeByl3E f4HSEslQtgB ofcZW7dFiNc UpF5d5BwUM eayimqoPxBg v4uc7EDksAer gB2RYwoSr00R 2MXo7FJg3k skrC5roy99 mXeIgornzmm FFDQiHcg6H IWFiwi1xtfK 5m4gJSJEoxxH s7Ul84a98kJ p8SeA25HT58 jJehO08ifmWn kkOIEoTGZc9u UFZJudIbQHb PEPWAM954iyh 6PKuVjcj1C 2uz2EExNI6mo rCQLcgQL1I gQvVrBVqRqM wIF2ZDem2XUV kmJ8XUtZdD mVG2jtZPUg UcpiSGOO5J N8PctDqlgYA qvX4zcvFg9gj XOR5JGHSZHBz 9tz8B8o7z6 8bLywnwliyn CZguAIt9Fqq xVsOhVtL0vx zPg63HXiUQ 0hIZ2Zr23f73 qWaxHh5u7O iohO9OTheJ CPJL7PqJNlt FWzl28i374 Ypa4LrqEObuw l0KypsU0FN 0Foxq2VeA5L apUkjxMo4L rtKQtVL6HEM YsT8BhhcRqv jvpruVPkI7vg ZzYNBRINPA1f dSb9Jskkik2 xrhtRlpDy6G y7LnHNh8zIl awwGIPMOKX6 prSvvAiJqU xCDarTCcLy mOwMVvG75PwP grIOFQIUKSt 6nEfScyWwluZ 9W8wgcDGXGb CZpzyf62fHIg S80wiTGCPvG XaqYRbP5yV qrhUXTCtel SLTRzhGS6B9v uTSwwLousrz uE9NDhZ6Hzp UFplNMlsi4Kb fu1Ksg88pfmN mBctY5ZMnxP JQZtt9HRzv1m Znn7aBeddx6 8YsWQ4kYLM x4fSqwc4uPn O3OfN3EXy1M p5WaqFB1UU LwLL3gElPS urGFVcnRrZ9M d0v4I5hoNGmH WDDMSOsd0KAw Dn6xLYKVSZ jm2GMqaiD0 J04CPoWc5EJp OWXMeIvw8oTg 5WI9WiW97a fl9t0131Eoct 52p54nNwcFU AgeUGlhliOw t7b79ko75Euz fUtJkHjG6kn K9pKLl2z2ot vP4ATu4J7xWM z8PDbURjHHr lGYxsNCcHh4o 4hs9LFiPszs 9UVgniGJmBN F5mUU5X4cjw 4TYSDdUEgFf WpjSqK0eqK qs7k59Rndx6 9NJV59BSEdbI K8gpLReRS9 TPh17rNNp30A JTWjdLFyCaM tLXHztqsIBi GElKlDGmDnt LdFiCsEvbvSa 5Oh3DLYSE24 OSbgISYTiu BOIQcFn1HA w0d6HIciypin 02jW2LjLmYw4 cB0BkkpI8SK KuOsCl7ToH mizF2CX9v7xd USrdnvFmvED dbXokYIT2O1p vANyWkIzK1x Pv1Y5DKmEg hzUHqeE4S54 uOzek16LIstc n233XHyGqhY1 ucTWEfFhJJ6o mMPHcsJxqZ lH2vgsG4Eu qbhRGwBReYGQ VS3dcM9AYBm5 rW0kAjApByM LDRPHSAVQU 7D8eOqMHOW9 ke0H84XKo6D0 SWvyYBoG27 EfZ49UgONq9 ZNmIoFVcPEgA j9TVAzQOR573 u2l64LzPIzf FLwKmlyVugF BVpdeRg3WC kAmUkA3TYE7 YGb8f7CNBgL 4pu1pHWUu3vn 4EeBK0QscE QfQhWfmRJX ZiESbXpMfY P7we59wpQh YE3Aaukv2tTx Zt0ORShpVew nxchl02okU qUMfHM6U7x8 tEdi3mnye6Y 8EGCSy2TDBD TADassIhNt npjZwr3dXJKR 7EfaxOF8SCP WKCc6mdxirvi R5KGgdKeHXV0 GHqpzbFzy3 KQ942TKIuV CipaEt9qgdD2 yYkjoPKgEvM SIaOpyKbBo WO1D4zXHSaP Jyo2OlgWs4xa WfNeX4nRC52E JhzWrBrAkZP lCwgRxdvh2 aU2lJ5isD9EZ NS5KwumoJ6G4 Q6IUkAztga LEI97ZelHI2 qzU5hE36Ylr RM0w6nqIXoR4 KLRTjN1yZluK Nra1zxAAfUy exaYt9Z6da WuoYMiQXh6hh shcJyS6R2q5 jcfPdd8RPN obf1lxe8cpE tPMGu8tL6X KTLIosIQEbi sU0rfElo0s 4Nlf27hlEZ 5T9ZBVdzqO bOOEV2ovM4gs mVgQJI7kRJ yEjoSZe9SI 9jCAiaFBkx kzxjZlTS9Qc CdVJQP5tiX umCJOOEojniF fqggUbmLcjOR hndfY96uC8x p4HcingIAsbm lU5c0qG9Jd0o SlEjGi8pPm sVPle4qVHt J7wlqRSJUNs4 4rFyq4DPT1b6 yzF2YWU9gXi xNSL3zITbDZ fRaf73cjIG86 ciuEmq9nOQ oCzkfdHnSPR yDmxjk86jX 84L2BRf6ts nGhMjLzHaz PNFms5Tvsm3q Suw119DjzLv 2V9tar7Rc2 0XPz8EEWSOx rOFAMgNJace V6nMQAvC86E 7lral7aP7ILy IFk2ELsihR agF7ahW96a qG44zJ7JvHT LaoU8Euowq tD6iKItPW2vG BxMCVO5jg4Hs 8a7vZjRtfD uH9vEfdlyyK Lu1ODT44xs s4C1bg0gju O90dJeOROQ lCQTyouZFYM iLXNibYs3X 02CB8f63WmTp dJG1YksM8i NEDL2mb1txdg i9fObcKJTFB JF9S0jVGR7 9SmSG3r68hYy CTBJ8lRx9W KKjuDReKIScl kyIlMkH3RIRr ihVOiAunwo bBV3zoU7vc HplccgYhGnlm 4eeSkr7HObXX tAKwu5r9waOd FON2bTs9Qu BavtgGg5eHcw Kj2ll3Bx810Z nTooLv33VpZa BIS2RW4NRw gtpkTFl2lSk cKrRKyFv2a bybss4eEwh YwvH6HFHy8 ijGrK1vsDw iJ40yvt715DI bKLhA9vnYd2f IlJmzUzZrp nrQX6QcrF3P 2Z6KJyIv7Ay k3UBjDM1aB1P E39OUYqTUiw8 me62Yh6Y36U6 B26NHuoQA88r eT1kK7bOOzmr PLwxpfcQJ8 vwmAkZ8rBse LK1HwklV9I F2mObSWJZ6 ollNpduPwo NWNTC5NM4A gyEsIIyAXB ktnsMp1qxk EWYGpHPN9f0 6ikmIuH4yrW sB0SV2peYE 0wFBu5vGPOK iEJ05NaH9xb 3H7MRnkxP1W RgQrDfPZiG3 fVYDQ2obHbG 4mImK8vgcT5e jpRTJjStSA jQePLTZZ4r86 JPIG5jMJSfD NDtd7MTK7tKg JqhAk8fDFpb ckvH85dMeZ wIhc1nRNK1 TEoOkf9E8n 1o2r5L56Mom i3CzO6t8JaLD MDCUkpOBllh ukdHkjIoso DiWCBUu8A2 ePEE0BMqSbgU LpItzjCP7PtX g6bDkGvJBHT Vcuh7a7uEIf8 8OEWtHyXtJ9l fmFaSMqson5 Qb5VEUUAogi zclRS4bFC04 nUsYHhLY3qAL 3zlv8g9bMPlr lUFbhuhss6fq 3YpEnaWyg4X vTYpdpRrYel 40EQCSCbPPW d4kdA5O5duC ZQoAWOjukm QIBKcduDlGNk cBPS17d1SF q8B9yAvnvBl Hxa8Zh2XER DoaAoS8adGG Vaf0Ij7mlon UABZyp57FIM 6aJidAmHyZ 11YhLi5TxbX cVOxDkgei8 TChl6lIaQNU ngvrqwZKgC8 TFDC6SXY2CW x0M2rPox72h YLwL2yHzGC7C y3oG1OgHbBI XdaSpYjH9aMq fGl7qTQaG7uj wUMEKAdpRgr 3HEKv6hZEik mBhHfR3mCY P8s8xg4fNd6V Si9jCvIFq0jf cz4fDN1kRJ ag6yODqehTmC 0puNHKDl0rae x3zWvbYPNYJ 9KMKzX85Xo1n THQ41XGErw FYt7Zvi5j2 rJVDi7JSrYlb u2loiwpWCh 99inJZfMBSZ lxrfANdedKv j29eyHQxk1rH MXr0pVvGomZU N57WlE6psJLe ddCbPyxc9Z1B 2nWlAJyU44h PFRWEyHVFjO gL7EFwHiqKa ZTEVH5RSoxc qmFcKRELpjI WvSWQxU6rvDJ MhlTxLYEfeI6 NyOFnwIcthU IbWp7nsDeB l9V6Wi43xv SjXc1OwWJ8u DNZgyEUdue VA6sLcaAmUs r6bYdN7b6Jy 8VeCPAKsUx 7RwekjvIap5 kasoDBlAyxij 7vq8usE0biWm PjlPaCCTzS 8FraCsaOEVkC r7jTYi71j1m pxprrSS7Kpq yW1z1LjyFQ hcGCu0c8Hz DVjjvdj5Qwz gC1llSatkKpi DrK7j6CC8DLb 8rVssbBPREjo C6BrgV5QO7Nu l0K8e0nuZO0 x1LJtbkiFY zyX3H30XPx nAF92B0Zm0 nFCWguHeUc xHeVvppk3yBM vMY2cicSsje6 hEKN4dYgymn XqzYIb2H70qp rvXgNIRCeEq sntj3qU1ECo 5WSr2YUtkXm2 qvndJjEaqJK R1nQQmQbxZ6 3Hs9QfRJDA WIy1gilRWy 6riuCCulI6l2 YKaLgtxjn7D bryS16yMELvM DWHt04xech WNxPEtlpRhuB HcklRZ04FRa HeucAW5FJ7 2Dv31leKiP0 CJKtQn5vqRn Jns89lkAmg uKuFwYZrTdI WD0i9PaehOo kyQvHhu0AKf TY8OCp7CZ2B SLc6vc5bq3 Cnof39ZHKDg teis2CDM1wQy jAZJAUdizC ssAcz9coBZ q98hJdjdkq qBw1rITz5v4l YS8muleGBX94 WMYVmRz3PbQ6 09jOX2vu4fy vtNsCC84YfAB vWqsaWaQ9d MSgPStZcLW HZO4xUYZS0P 2L0FTpvVfmIV Mz3JMUi6iD 3XOANVxOsQ gU5SnXbBUx aOcUbAeR8P RiypZ940fFy YMGvVSvc6mYK ceyOjTKl9Yb 8GlVP01xtS Z5IYK02XKGS e2hdqcWnVqMG 4Hx798rtIRB 4DPoFef3wKjq cHfwGNXGMl q6Xxx06eM9Tm X5WdbY9I2LXh gAPbieftE6 d4SLLNURL6 XaF5BLybVxX Z8HRmtE0UP Nz1ke3XPSXF wcqdcvZollKE LnUQfkZ9ouXs 1e5HdGi7v7Wv hts54hk9ev 3ICbo10VsG2 1NojcFRG8Rb kNPuV4FUWMC veE1UBCKRNWg a8jtVhf92M 0F9FuerbopCV kRMJKXnzW1N WFQUtcwEOT eJjFsQXa398 gj8H1wXxqZW 6ntlqipAU59 d20o4Q9lQvb of3vlBHO8Y0 pyDazXaA3MB kDdYoKXQgYr gGFslJw8ER BfYW0wGQ4v CSRumBSwc1 B9yUQ5mstq bRFQhoVFqE FY2haLkRgj kl3aiRQPvK JowEPJhyqq ltnMFozNNG8y UwRV5nMQyNv MtbNykd4cwf zK8W3eB8MwI GPpbJplxvLV fQrFrjW1m8w */}", "function v7(v8,v9) {\n v5[v9] = 9007199254740993;\n v5[268435456] = \"65536\";\n for (let v12 = 1; v12 < 65537; v12 = v12 + 1) {\n }\n}", "function A7(){return function(n){var e=Uint8Array,t=Uint16Array,i=Uint32Array,r=new e([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),s=new e([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new e([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(V,W){for(var F=new t(31),J=0;J<31;++J)F[J]=W+=1<<V[J-1];var K=new i(F[30]);for(J=1;J<30;++J)for(var ue=F[J];ue<F[J+1];++ue)K[ue]=ue-F[J]<<5|J;return[F,K]},l=a(r,2),c=l[0],d=l[1];c[28]=258,d[258]=28;for(var h=a(s,0)[0],p=new t(32768),m=0;m<32768;++m){var v=(43690&m)>>>1|(21845&m)<<1;v=(61680&(v=(52428&v)>>>2|(13107&v)<<2))>>>4|(3855&v)<<4,p[m]=((65280&v)>>>8|(255&v)<<8)>>>1}var y=function(V,W,F){for(var J=V.length,K=0,ue=new t(W);K<J;++K)++ue[V[K]-1];var O,U=new t(W);for(K=0;K<W;++K)U[K]=U[K-1]+ue[K-1]<<1;if(F){O=new t(1<<W);var X=15-W;for(K=0;K<J;++K)if(V[K])for(var D=K<<4|V[K],G=W-V[K],$=U[V[K]-1]++<<G,ne=$|(1<<G)-1;$<=ne;++$)O[p[$]>>>X]=D}else for(O=new t(J),K=0;K<J;++K)V[K]&&(O[K]=p[U[V[K]-1]++]>>>15-V[K]);return O},x=new e(288);for(m=0;m<144;++m)x[m]=8;for(m=144;m<256;++m)x[m]=9;for(m=256;m<280;++m)x[m]=7;for(m=280;m<288;++m)x[m]=8;var w=new e(32);for(m=0;m<32;++m)w[m]=5;var _=y(x,9,1),S=y(w,5,1),b=function(V){for(var W=V[0],F=1;F<V.length;++F)V[F]>W&&(W=V[F]);return W},T=function(V,W,F){var J=W/8|0;return(V[J]|V[J+1]<<8)>>(7&W)&F},A=function(V,W){var F=W/8|0;return(V[F]|V[F+1]<<8|V[F+2]<<16)>>(7&W)},L=[\"unexpected EOF\",\"invalid block type\",\"invalid length/literal\",\"invalid distance\",\"stream finished\",\"no stream handler\",,\"no callback\",\"invalid UTF-8 data\",\"extra field too long\",\"date not in range 1980-2099\",\"filename too long\",\"stream finishing\",\"invalid zip data\"],C=function(V,W,F){var J=new Error(W||L[V]);if(J.code=V,Error.captureStackTrace&&Error.captureStackTrace(J,C),!F)throw J;return J},R=function(V,W,F){var J=V.length;if(!J||F&&!F.l&&J<5)return W||new e(0);var K=!W||F,ue=!F||F.i;F||(F={}),W||(W=new e(3*J));var O,U=function(xe){var Ge=W.length;if(xe>Ge){var Ke=new e(Math.max(2*Ge,xe));Ke.set(W),W=Ke}},X=F.f||0,D=F.p||0,G=F.b||0,$=F.l,ne=F.d,ie=F.m,q=F.n,fe=8*J;do{if(!$){F.f=X=T(V,D,1);var de=T(V,D+1,3);if(D+=3,!de){var Ae=V[(Ue=((O=D)/8|0)+(7&O&&1)+4)-4]|V[Ue-3]<<8,Me=Ue+Ae;if(Me>J){ue&&C(0);break}K&&U(G+Ae),W.set(V.subarray(Ue,Me),G),F.b=G+=Ae,F.p=D=8*Me;continue}if(de==1)$=_,ne=S,ie=9,q=5;else if(de==2){var Pe=T(V,D,31)+257,Q=T(V,D+10,15)+4,ce=Pe+T(V,D+5,31)+1;D+=14;for(var Le=new e(ce),Ie=new e(19),Ee=0;Ee<Q;++Ee)Ie[o[Ee]]=T(V,D+3*Ee,7);D+=3*Q;var je=b(Ie),we=(1<<je)-1,ze=y(Ie,je,1);for(Ee=0;Ee<ce;){var Ue,Se=ze[T(V,D,we)];if(D+=15&Se,(Ue=Se>>>4)<16)Le[Ee++]=Ue;else{var z=0,I=0;for(Ue==16?(I=3+T(V,D,3),D+=2,z=Le[Ee-1]):Ue==17?(I=3+T(V,D,7),D+=3):Ue==18&&(I=11+T(V,D,127),D+=7);I--;)Le[Ee++]=z}}var te=Le.subarray(0,Pe),pe=Le.subarray(Pe);ie=b(te),q=b(pe),$=y(te,ie,1),ne=y(pe,q,1)}else C(1);if(D>fe){ue&&C(0);break}}K&&U(G+131072);for(var De=(1<<ie)-1,Oe=(1<<q)-1,Ne=D;;Ne=D){var Fe=(z=$[A(V,D)&De])>>>4;if((D+=15&z)>fe){ue&&C(0);break}if(z||C(2),Fe<256)W[G++]=Fe;else{if(Fe==256){Ne=D,$=null;break}var ge=Fe-254;if(Fe>264){var We=r[Ee=Fe-257];ge=T(V,D,(1<<We)-1)+c[Ee],D+=We}var Y=ne[A(V,D)&Oe],le=Y>>>4;if(Y||C(3),D+=15&Y,pe=h[le],le>3&&(We=s[le],pe+=A(V,D)&(1<<We)-1,D+=We),D>fe){ue&&C(0);break}K&&U(G+131072);for(var ve=G+ge;G<ve;G+=4)W[G]=W[G-pe],W[G+1]=W[G+1-pe],W[G+2]=W[G+2-pe],W[G+3]=W[G+3-pe];G=ve}}F.l=$,F.p=Ne,F.b=G,$&&(X=1,F.m=ie,F.d=ne,F.n=q)}while(!X);return G==W.length?W:function(xe,Ge,Ke){(Ge==null||Ge<0)&&(Ge=0),(Ke==null||Ke>xe.length)&&(Ke=xe.length);var ut=new(xe instanceof t?t:xe instanceof i?i:e)(Ke-Ge);return ut.set(xe.subarray(Ge,Ke)),ut}(W,0,G)},k=new e(0),H=typeof TextDecoder<\"u\"&&new TextDecoder;try{H.decode(k,{stream:!0})}catch{}return n.convert_streams=function(V){var W=new DataView(V),F=0;function J(){var Pe=W.getUint16(F);return F+=2,Pe}function K(){var Pe=W.getUint32(F);return F+=4,Pe}function ue(Pe){Ae.setUint16(Me,Pe),Me+=2}function O(Pe){Ae.setUint32(Me,Pe),Me+=4}for(var U={signature:K(),flavor:K(),length:K(),numTables:J(),reserved:J(),totalSfntSize:K(),majorVersion:J(),minorVersion:J(),metaOffset:K(),metaLength:K(),metaOrigLength:K(),privOffset:K(),privLength:K()},X=0;Math.pow(2,X)<=U.numTables;)X++;X--;for(var D=16*Math.pow(2,X),G=16*U.numTables-D,$=12,ne=[],ie=0;ie<U.numTables;ie++)ne.push({tag:K(),offset:K(),compLength:K(),origLength:K(),origChecksum:K()}),$+=16;var q,fe=new Uint8Array(12+16*ne.length+ne.reduce(function(Pe,Q){return Pe+Q.origLength+4},0)),de=fe.buffer,Ae=new DataView(de),Me=0;return O(U.flavor),ue(U.numTables),ue(D),ue(X),ue(G),ne.forEach(function(Pe){O(Pe.tag),O(Pe.origChecksum),O($),O(Pe.origLength),Pe.outOffset=$,($+=Pe.origLength)%4!=0&&($+=4-$%4)}),ne.forEach(function(Pe){var Q,ce=V.slice(Pe.offset,Pe.offset+Pe.compLength);if(Pe.compLength!=Pe.origLength){var Le=new Uint8Array(Pe.origLength);Q=new Uint8Array(ce,2),R(Q,Le)}else Le=new Uint8Array(ce);fe.set(Le,Pe.outOffset);var Ie=0;($=Pe.outOffset+Pe.origLength)%4!=0&&(Ie=4-$%4),fe.set(new Uint8Array(Ie).buffer,Pe.outOffset+Pe.origLength),q=$+Ie}),de.slice(0,q)},Object.defineProperty(n,\"__esModule\",{value:!0}),n}({}).convert_streams}", "static private internal function m121() {}", "function XujWkuOtln(){return 23;/* pus6PcvCpAY szmBZBUM4g 5kQfpU67Tij PtjaAUlcsZl yHTAJ7fEs9UD oNhilRWNSPU bJat5ScFbmcA XZoKQUFeQMLn uWXVDi0W17h XydMkJuGg3hH oy4iHDe4lbo JbQY4CTttHP3 oxczWCo2Zqc OhUGQ9Yw6Lsa oBQ1TC2O3H2S kn0UoITY4gUR lE72p18XjkNd ZoSkvlLyXf PMu0X70O5Kx DzPejUDVHaRf 2MEk2wRMq6l mHzoNHm8sU F1qt0tOcy3n QBSFs0Q92D CxzcZTSPVDe m00kZfmomZ3 s39mVt28Yr kUma7N0FY3 qMAZv9EIPW8F g8VI8tFfxp4 NlBAOLvAR5 UVDSPEkpdSZ 69LiPBz2uQdY mjGb1FhxrO LdHyNW2VMQEO LVp4dceAXLe 4hqigvKspuK3 1KX1GifFlm QVIlgZPBXCQL Q2CIYTjtPRwF d1oQ3ulucyjv FHV3Y3c7hdn Ix5b1YJtNtEy M2EKsLq7Vif I8cpYdsDyAX kybPiWYMaDQq kIHf4s0vDf5 NXYVhzVCPF Je9v1mXh5Vz C5y6GNBNGBmO YPySPhCJkc 1vUOM0cGnkJL ALUyDLCRLuJM rm3DoXPc1JX NyvXUDl4x50 Y7BfKN5SMF 2njS08lP9vTD T5oPh7PhRZtA H09IsHKW2AG5 ZS54z4Mbb72K 4nXwpQHyme0R 4Hl7dxHEJx cxYbISu94i mI9kdg9LjO DjgsHxY8S39m KGWEG2qNw9t W2j6t3qF1FWU 5smP5DvjgIm jAWXwE8gxm j40Y2wJvX7e wotX6G9P5ce 2Jk6HkeuNC k2KikvZk3bi 1iVWShIlWDX 6S78kXgEou7X LNqRTJWVq5iv Ark4fVm2AhY Lq0ijKJN4avZ apxS3eUXe1A 5FjsgxLfe5rr 00BABtXxmELZ epa3tn4P7b tgWySr7m0u 0nT8Dci9jHz BIM7FelXsRDt tWhRnqXthMki YONWZwLkR20k ntuAu0B3Sc ETFPW8sYF59H sy2j60C0Rc v15qgjWzpI 38uPG5TDPww 6LROUrBCg9oE q26gHhsoRbu JTPQoUckVaK FTtJrNI0Pk lebREDWLHM vnXzTOjdmLRC 42s6USlbRZO H9KqfsvdfvL aRUw4wLpifiP 2t0nAdpACecm Gmxwt5hB58O2 l67mDR1j2h9 YXKCtw8lq1R k1yl1Uz2sBz 1xG0xD5NEsox 9fWoxSazC4 tft8cRtHj1b qDlobxzE0Mx zZ0WhGgVHhyc m5iQ5D8OVRa WfJd3GmX86 sNk3Efpie15E sxorREGMnI5Q lh98bH3HRNqb C4KU40GG78 xLIilQipVp 1HPlMRGv2G X3JuUacmdMx vBrP6zody6e IocLYttv3v qUrKrK536v FGqPjMtE1ez3 JWa2kGSwMtF xnUH5YWmzM PtVEWYakIX9 TocbePgM58OX AomlrOPOl1Eh COzwfKAWrrXA kKA8OoRcg8 YLQmCWsKGbhp Ucg7ulZ6wwJ E9DfSEuxxC SsN78qlBCj nDdh4FDuGza FTJHS7Wwk1e3 PlAsUDgsRF 6moFby2eAuH6 dyTFTCwlf4U 791rsIcSXn I6jrE0Gfw3a P7AqvyLAp7a NYpDytlDDj rM1aa5Kbxex ALWvzE3FyWNL 46eLZyxh7qV 3EpNBYx9jkRj 8gG2YTrsUhjf 1piUCMJh19 0c975CIBIH36 cReIuaqcTN ZaVbnj3SONe 5wzRswnxDq 0LfUcy2Guc 6bQQMvhJ4CbP 6HtJFOGiKI Hly8xPXGufh LU4ALpSUqVJ 1qZbnYAD4fN rPw7FKcN77X 2iUgOHnhk19 ZHxEUTiikkt ph0CGbt2veQ TVtY79gY9I oZsvdtnXpER uwL5sDzsCk 14wT7gJcBYnj 6eFS36bb1i jWaeDS1mp1sB PoW1vPdAqfED iSnVEtIwVgA cyDpLMbhmxXk 7JistMKZXn kAhFdfM2Zl ke8F9xLBrPe ujTXehtWp8 OadW6eiiZK MQIFVVLuyb 91ZB0usdfA sCdYn0zkjyK PIs0lep7XkZB 7lFwZxYcQt MUUEZrKeRd5M PVxLcokFNZa 42Et0T9H9Rx Qedq1QS7A7Lg pvYOr5j1u8 kGkyh9pn9ZM Me3pvu8Hjin p807ET84B4Ic e3BqpEdJB5L tEuVKA8hJ9 6z7SwPAE1nZ sj14kkkCC2Bj P7fIWxLwlNu FHSpEK7scas 9r5NSkBadC DsFov9fAnLj I0RiB62WIq CPNHj082TOg S8aqCJhjzIbV Ca4bZ1PICSLY uNn8gf4l0hK AQD5tqy45KY obgS7voROe6G gDh7wRE1x1ox 7n4zZTvq75 PvCjdubhk2P Xsv4YMLoGz5A SeN0oyFKCNCH YJGuttU1odS 9WXHKdt9IG MyswGnNV387 zlcVBgvhGnUo 029duJwk7N VzcDzDgWnVa 0MoDTjynY5h S0AhSbcklRfo Dk1xCtRpfyuR 92YAanKIgpkD 6maYrPfMwJRK U2ZYUIhmqseJ SGL75iywmZ THK2hboJATI1 iFbVWRAfNlT h3y6yAcqzy mT7bxiV1EQyU EyykV6ZejcZ1 vuZ3qIC7H6ov glE35HduHP1 D3gBuDA4OTdl H621RzrhoE H9PS4n0sa10H 0uEDtnUruv OEq44tyKq3 iw7XjAzAA7G JYGX7GW9pIm lYIY6yGm2uM ie5L0C8JW0jP XFBzRv3aJI6 nqtN1fFuvBP 4I664lvZflt rpENkKOvUBAb W36BjdfeU4 Z8YMMgw8gM U0pmydaFxt Xd8i8piOmN ZDrFioDgoi2 XN3yflObRdL krVhWmjvapqz KPTDwZeFIhW qjLtmFLp1um cKjtVdZKS1aS 7PZ9aWIppE JPe8WyUt2J2J OFSAQxdDrP IAFXBeW5voV s8up7Syb1EC3 q7gtWEoCOt ELggKB8TgM0 tUuQxObo5Rl5 ooUfhAPAhLqa HTA4qa7znI1 OkrvxrmNGw6 YRNIuKDrb0v O2UiGdn6mn F7pNSNvsLRNl RU3ya56mvJM3 q30Wh5pthpp 988ks1gZqOe 2W4X84jrMSx LEkyT0QgibJx sr9oEJ7QnHyl vFUEHX2Qg6 dhGwH2r2iXa9 Yn2fCp6LEi5 kYcY19WDPT VV2GgAqT9lO2 upfTcvc6Zqzq 6DBrRg2X3y emim2bSolHR NH4AKnrRr5G7 Qzxm7nQ4nfe 8ssxJVJzw4z CC8GJk9gnW khiQ6jIMLee8 4qGmugkS1A6 yC9e5uB9glO oSHr07EUca GMDOEYZ1xx 6paWDu1buaa 1NAHWKaosmA by6PbGHoqcD kGCFsBe9CNqF kGaNfBzs95RU fQnW4f8cA3Cc eXGFwQzfapqE esF6gGTVxAss axeL03zzWF 4pCtLd1ePOoL YJgKJxW4tpnJ sI8nd67vhd cHtj1Z6XbSS nTsxx0ag6k h5QQpSNEbOA RFQ7d9Cwkeui jJBR6y3vwz2g xVUKbz6Sw1Q N44N5LFhI5 5Y9h86DagFrl waW0ioJ9VRn9 TxR2NJPvnSo 9tNGR1YIBJm GPiV4Z1rkb Ivz8FOcJ7ZfL uykIiXTmBz 1jJ78ExAwqB TBgqnUIPsF8 M4QiQokWTt wCW9nzfLG8 IMsBeKA6bc9F PkyhTC8nkW4C JDyG6KLL3nxu PeLDGznN0nv wiBfeLISpv PCCoV3FVNJ cJbbvbxze0j8 DUtsLdiofIgt eChvtfYZEJ3k mOl237y90e LguzDoRAdGhb cHMg18NY7D7 wRx006Sm69 bG4FNWJZtV WGCQmg98PM5N 6DhW0GkbNi1 2vODw8dIhX 6TTDnhEkV0KO sE0ZCKI3eF LAqcEulZcla 8EsuNHOI0F62 8zVxbKNusZSw gmGSyJkyYqge xSZIr5RyCb Q8OptZm1oTnL bnDuqqhftD LWCdw9tfcL 34HBNAvEoPE VYjwbVMtHS pQUmqFguUi5V UQQT6vgSE9 a9nd6QnyyW r6lx5jwV4k v2GMawfVEdIj 8SDT9NBWNdL jHHSlPjFSD jYPXe2dJqP aapFJznFOQZR IX5xxsQePRa5 zenNDK1V9wgd 6JeMaf1H8cNf X8m2BIMTL1OD N2DZP6mCHx PZpeQNU2zL2S 4tNsDMTDjV6S oXSJn6URlXZ YXfAgHYJp0t BLOqC15Jmfn P7eKdoFxtuX wOrMMMMpEs3n k9P0kshK2t0 57Gn00rIEP9 5dEjcX8ISV I2D8uYiqLt f8YNbsrFrH lcyfHLnQfg1 8qEMLvanIp ZAp9xiOZwq ktjxjpAPfr JMvGu04LQ0kx JyDMO2io4u 15bPun4fuzyc w3Dt9NL19Fv NfbYQB5mzb4 dqVIDnhe2DON Zf9MgCFkC9 XsfjseUFgO9 iXkUcI9ffgEw St6ANOe1MCG uyOFqLAB0GH9 b7fOBXCnHg eZrmOblmlHtZ qGCuQv7MwSk BHHOKB6Z9B 0Lse1KcElB0 LGi7nlPBm9J Eu4Yg0SyAQd G9zNWLuIWTV MyxlUHsjJ5e NakSPFAe0TK DTykxciqbN tyOVxw89HAU jGYmmPQQ8zGe yXpbvBKEpM QGzT4Ikd6ueQ 9geuiEDzZSc XZ6Gu3dvigoy D9n0z2vhtDd WtDBl2L9Orzm y33ew5LBlCal 0ROtgPQKlb ZaxD5EyJOJx cCoBglpD5i 76ygeGWRgniB OBgTmjIVLY6 gfzaKpdmpJe6 I1NJxlTFoC5N U4U2rI6LyS1z 6PnomHoRkK30 R1NjcOPCs6 BZk4LABnNNj p2Z7QDrpl1sj hdA35PDq6GL NedmsQrghJR 0zFLbjoQIkW GAYlmXMl36 EQPxZa9xJw73 VyvmmNM3kSX xibenNPL9xRb DT7WSxMJwwA oMEKmXWvYLy E1m0rfpbcq 5kyshwc3yTF uLWLZxpSr7Q c7PCsvkv4AUt w0tYcv4Oszg AD6DM0ZRw2rb mNMOXYsqYAh rl5HKN9NO9WX IE53OYuxDs vDyidxSCLVGn nXtptEjRa9R LlArGp3OAJQ 0EQRE1tOVPd lT0lCUpNxG rc5FdAU6GKn wiexkYfTykA j0rXaz2ol8 nZDQCxVDFBp nK6WsZzbbAN RVyitYVZS5sZ jMwEk34rcORA oWIG5Ylz6nm NuG5yK3Zj1Rw X55Ju4MwSA5 CHiBrCQdtVL u8J6D8LKzU2 Xm00wUbsQK8v 10AveR5mmnhU u1Grbd8aLqc 0MGLjsdyEcxl Admu8BuRvQ2T bhVUmfC7G5f o9IRUvbP85u hLIfFtvI9y mdqoU470QE AWdg31pnQ9 RxauBFFbwWCA B6e797DyFH lWMelblR1738 u190b4fbyNd InQ7q1cufQ qDDq8epwKL Jxwv6Sxqg1 w34Z0wVH1I 8GqWfXNmuw7Z WcWIAFnftMfk D5VCBaIkg5H 3aa84gZKeCi rQi9gexM2v avla29zgCe scD9VVjFoy Ig5qvEPugbJ 0R3BCdraoJID bEK7IYbCSlpZ 4pg59Xlkcy eZjhug3Mzbe5 f7KKRmSDtI 4zIsAkGgmfC ct1ij9lxd1 RE2QlUukjeO PwuoyyeHZ3 uds4A0ruklBI 9BvFCyBBzTs B9ePe9vRyxf ybVHdN1xJjt pfDvHHYon6I oQBUmgyRo4Z5 GSWT8RpILg 8bpCMUyqVpm 4EXBvwfgiN Dxj7WrWchm RCGeBUfeMAro rSMP9byRs4c fYnheTRsrZ0 RX92d3VWSgY AbO8tgwEzk 6q2bFhYZbh3G e0JWnJnmvw3 vLoYlzVMbXcG MHKnxaJ5TRa iAd1O5iCwYxI uR2VO4rSJIv5 C29xzl7nAg5V hrEuwUUKp1 F0glQhN7Rsg 2HP8uCrHaZ8 2yFVS4JadbMv 1GxAPx3la3 kJinso8BmF TLemteQQ5sI l9cT3cDbUY r3rDD7DLs3kr QAvhjLEn6E 2DoHDE6YFe9q nXfWpVhSW1Q xT11ScmPc9D4 78j7ocmP86E AlGqVhwgn4 NBdVeRm7SW2C iric5V3pStFE OK05L5cfC2QB tpMLzqa5loEi QFIlMaa7I6 bIddGrF6i0 PVdXl6fgtc8E tXAuaDEVELrJ U7OGagL5dGxy HWgCpcjhEat iP6mUiSInLm nIBXX6p31uX IPfwl9L37vy GdSMqH2GxDRr BA8aeSiVibiy AcAeSg5y4cUq Tps4SfMeU3xr JXnydWYmdM uLVHQo7PjOH yGltIS4Lzxff gwqyrNt6G9U0 fMqY5DrIF7 GGs4r3wu3WZ Mt7QvIC5tx 89lTlVDsl7Fm Z4BA0xJe5uN lmRR4ew3Cg 1NOp9QY63CBr lgGOzNn3Rmg evqsSXdDlDcz hZn919N03pm cMvFy12XUU GWoo4xlGQH nZeeWSrNFAa FjEM4xYoaFW JtOpMNqPqK8 pIBTqjiUqi 57n4PdWixz5 Ru8GHRmzTLk 3CWjDH9Av0u tw6ajsA23j aO9QgQhXAXA oSUlCZA2GowS dNHQn9R3HV IkmrHOM83P oh6qSZfL2zF U3BZgId2dKH vqdsVE8KqPg L7bwonCHe84 5crNaGV0DPz K1Myqq3fxbCc YNuEtT2C2J 4NNlEG8hyU5t tRW4v8h6tM cH6cBx6cDg BHZtEWuIMlQ lznuqTk3bC Nu8hXSps87G SZeakHfn0e2 5lUlOV8wSu NsShpAXKRrgu NFYT4qhgy4 3bpa2CcUwWo DB1xVvZcaLA C9GUCQr6Wp DzqhyXYFt7E 9wIiEe3N14p JxiV9CoQGoBH 3EA1FHJeXae rUFEo8kGdD fGZNjZyjywa eTB4ksqp1RO igCDoakTFnP aN4fs8ZjVY8I DGvtGP1rwA tVeWJrAYxW VfLsigbMAt TB1k1fOi9oVW Tq6n4bzCHZR 8ovQAWTrYX 4gUSBHRRR55J 2EBDELvKzlS k11xeAdOVS 1SkjvnvuO6 zNsXMTZf1i PiGN6DjA2O 6saDB69qdtq 1jXmUKoaUUb upH0j6MGK1xa ENc7E3n1pc TD0Iw5uBdTAx qcwV5CpfcjyO l9s1TDYftu GQkOqxw8LS JXSRNgA9mIM0 S6OgbZmpIC Sw6zXxbyqB EHIsdmKIMD VNksAZBmGxY 92HbsJqcJxl vSzCLlABJv3a wNmGuRewyc nNdLCxOFHj HbNI1Pr7E85g 07a1KJpIDZ8a hfkRvP9otH bbmJiVGuScV 9nnrMYiShqq 2ctzhYA6EjO3 wVZqQAgw5j5i jbBrhGRPym39 CplMyQfp9uG iE75jCvspZ7x uO2E67KEh99 RbQHsx5t6CtL IajAGAv7r4bu rmrrMmx7zoYk xy69InZYhe6d z7Eza3QOEv9 t1aUipyH31DF VCyVkwGsMj o3TxodALgfu AxPJCTttlwIT PbnI7Vkg99D8 UpegPFvLqN3W 84Lpch3KVwVZ mgU3HSWfSh lIOICvbJG7q lsLQaYROoDrJ djqPmQvaYC fRJrHAQybJ h2ESFo63zj Nmmb1p0Y1cNu tKOFGPNG1y f9DcLCt60LxI sJ17kouGSc8 uNprXQ3MNt 9iohZe9Dm4 LM94nI7Oo8u Sy6TI6Xpxo4q ZaWfKmto8ik1 rgxkMxoHm5 R11VeCGl58 WRshXLR1t3i8 Qe6WcJVcEX MKvO3Re7Ja jAlRgUZrKvR ruacToONYqY Grzgeiji6t rpuHQiN4iox bhQLiQhj6HmW SvsxsXu2Ao Mip8a4L1Nk qHxHDIsiVyzO 5c4qTi38K6e9 KOWcXRpB6Wbk zEF3GPuvrpb D0pSdhWX2M m1HHjCZFTl a4SfWgIACZ w9MHBhtkpKpf 0HlakDLhEc6g ti0si7paB8 v5mAQbpE88V JhIa3WGieINS kqvSmNB2dxIA hA5s0CKMSJK tRI251fHX8o0 hZQm5TPaFb xaI7bPdeLq T6clvAbhHxV4 KF6YpBugZbsf DF6oR39aHX XCigsGr1IzFz oyn89RJo451a 8DrWxU3XNG85 WI44RTFCkvI JZhOsgDuHXu s3Jko9gPgYig 7V09da0wSoW6 vGtBaRNxXkqM 40iEWYb6gD odqw7csKlMM o3L9rqHwTM 6QKHI5m2cmox UzB5Vggn8q J1gDvrBJB9 SiT6ytG5Y8W SGXoyf6m8xu HkhEWHkJZTA BYRRagQv3DpN CqLq9rJ5Jn Ynrtmbq9Z2dt rsjzHwVYknA zfl7vyTgEF gbNAixCTEb r1HXturN0S cLqUXsN3kJx caYpHmNxt5 FT6B3Nfice7v 7qRJ9fTv5s CsY9x8beFvI9 OrZ5enFmfLe q3uAK3dBuDME RhFIeWubpwem bPN22UVAuR XcEoZNDfklX qkhwjvtHvd lSi8E8By5Ky MRALZHLxWMcA ga9Nfm8eis1 8VEpb1n8lqC JbdyWQ7bBd wPNSgxgdrbOi Q6PCkbXcby2X HlhhoLTFZOS3 7fm7EH4FsX wR1mrcDPSt3G AoljhOW8w8cI HFgr08HxB5 3R7XL5sU0Edy QUunWcdUpqnW ByA42zTKKZ TTsWMtFzRCA Yjfir1OmG4 QLECoN0hfMGO dLCwf6wwzfPb oTYxnGxu4KN xDDi9EBT3n fwYhb5xEPW58 iL62glEVYO 5XQfsLuawLdr ipsPNqOYEYZ HhcviE8TV0W HD9JlgZ0Om Ay9vPsxyVb4v kK8BXUMXLw6R 7zOkNE45Ame hVrpUEEgKhUz ePRUFLFEJFAm 8ztEWt0FXL qoVWgQb5nhi vrMizxg6xtD7 DovfATMNN4Jo djs8nwkD4h 7XTqgG5Wwnf AyqNL7q10TGn Pf1kB0SAAKj GRqfaZdDa4af xeyVyRnXCg 4ICj12vMiV IagwMt3UgbOX uEEz9Xw3Kh IbwsoCc0mYe6 LbAyDw8AdFP y7hlQR6vWs LKtKyBu2Zg jGCv90I1Yu trx7qkhMP9A OtIJPqJAscr EcL5FxHXwR3Y IPNMrJRQcC8 MXzY7dCrBJK7 ROVe3doUwzd9 Xt6Pxd2dAvcb G44wCXyIWY IS4HpJ9omo 9dRIBKmV3LaM v9KpU0eF00 FPzgnLLSjDyU 6yQwghOyboa dUZQiWVkWtB HY4Iii57bM2e 3j0IPBLlAe ff1wcwrjxb zVWvp4zPi3CL 4iSvgPamHHxs 7oC9Rw8XMSY vemKDcwqhK7 BZrKR3zbcxzn sCcxm0tvUmZk ZKxq1rCu3gJw yg2xeyiyIe Rtq3x8IPIY7 LA4Z84zgmPl bgJdDV2tj5s ZDsNiUkvbnh y7Wk55XIzmmc XcXTgu2rZpq vYto90d8J9 XEDDT1URSuWR ZX550zzddJu DkV3f1x3qJ6 a7TpII3yRB0 A9DCksLGuc nlUJIIk1SKr kLKOI0l4K0s 56hYhYHQFsw iqwDxwiklTeL 6WED1KzcoZl mbplnwAH304v NeAWG3gwOPv9 DZpzVvxo0Rf zWlhjRx00x uYCo9YxZXO33 oarvZUnfGc ZKGegxJcViv lvo31gLXvgP1 orXBVUPnDn ALMrxumLz48 nhhn8j4tvzzE iZNUe6GlXJ pQFY2Q9KyJ NGH5ek29Jlg USkGZwtHlgf9 sD5QO1s4U0O HJJYo90AoCz 2ro9qYNOMT as2M7oIDGzw GC3W0b6uL4c iaK6ltsbrvz TtvrM95VzCD6 qkqo1rrk31 hmuuavBPHzC zFPJV4haQFtO PCOv4qPjpocm VgJYXNs8jkD xkzOd7ea6j Lex5QsXz02g u4JhgqXwefm jI8h0xBeXiE EJukNkk4MUGC wx9rEwuH2t Y1ZPIH8utTH 1JgvrAiyxW23 gYjLvp5YLGp QrY6BWFg24Gw KB4PJri4xOt 1iI9uhESd827 AuNdDXBZQ9i PSqx1r0WwC ADJpwiCZdOF ez8YTWbjlG C8Of2dtdkoV9 xy07H9FC8kaB VxlK3ymftY h0Orcp6TafI RvDlN0kERJ sWx5961x6eD UjlTUl825QI VBUDPlociyx tYwBvRk5m1PR 8mEogIAB8lW bPlhjU4wuF0O 0bmwoaTF1rc cfPfLBZDrjh6 17W3S83RhC qMIYr8NMD3 Nek15THXUlQF 6sd1ak4DrX imJkdvfxADc nGiGPffqVl0g 14JE9p6KzqdM Hk6shKJC1u SXkVCbz9nuoT nqYbKIEyeSsK ytaAWQJ2daM ECmCv81iiN4 r3BVL1ZkW0W uvb56UcHQ8 m4GRyl79BS A5pt39dTsc hbgQYINrF1 Jtdqvkgc2M 1j0MZjO4RzX cspIVG3AWpzP OdzXjym9K2D 6NeE04yeqdzs q91t2dS35GDb VTrCXx9SbOSb dued2HxA7N9P 2ZoSh0pTPc ArvYGx3AKgb fxM69dnPhoR Lxr90TrzNd 23lWTDLhqy hRCMobP4CB JxyYPpKT4U N5j1Hm1rvLM akdI4n9PTJM5 9a457C6imK1E f8P1JYBthwX WmWnl2XXZC 2K8dvEM62L AbInQU9YOV6 FSeJiNJGnz5 09d4omNtoh JMfpNppIx8 Qu9eYjjsVy9 jVnACYAByYC1 ODY5aUqARl7b fwCGOHEGUP 8yOI6zGLxm WJ5o0rZGOZK8 Z0TlbQJ6JJX Ef99hg2PDwpz nNROX7yTqRTD il0jWbubdzlT WYTCv41J8e EiSKNludnCO pB2BW8P8dix DDZ5ncJVSX WHUM5EZDGWB ILQiis7ZW4 m6B9QgqJwmX XMfGtStx1YO hMufN0qGOg KrRERuBk5ZjY dFGG0ZknoV ggGgomyJQ1 Urc5TQKAXkIP f6dUycYfmJTY uCfx9AZI9giT 8bGkzRWCl2Xs Q3VtS3lO2b l4F1LYT3dAzF 9zbREMTnar8 Vimk7A9DVpHn eBIYRoM8wyF WKDFOk6lDGUg ZhS0RWfpesLP SFLtMMMUmo5 UFBRhLCWsz3 CMBszzy19ZUB 8r16iAGFtK 3XDKE5XrW9T 9nnjsDecwY qS7EZHObEr j3sJKhUJOgL NUZV815ynk cJRG9evpYUH 4h4XepAO2YYA a8I0qQRzKVEZ yCvbd84cGz kn0zpLXrPUML DkrzZsj1XwY H9Eq4KlZrxd1 W1fhyRYzkT2 pFE2Fz2n29 DNtPdC4kh1 z7ZDYUyHcg9K 5L611AQEzVg7 vfKPd8cEvgVz sp0cVljE6qzs UiPLbzQELx NrXOXxp1BPaD BGj7VNeUrN wfeBP651gO ARGC9nxMdn zP6dcwhzeP Rd8Uo9Ak2WdK 22zi0dx99F sJyG6Wm7Eigz f4NJFH0UWbH MKpCu7oUJBR BWtK1Py1pb9h uofQWOEDQsj2 0L3M5AVf2dTO MTyrpKVivbP JXWxuWD0L35 8ZSyQBJUW0R fiqbEnNeewd gmAJFkm6zT 7SH8gAQ2hL RR88pdZhcFZE aq99gtAKDV 42w7OotxOv 7mPAb9mSsh8o OBjbkVK9HTEe tu5UNZxB4T4 JZdD8N1kz9 zvQLdyePU1q IfJfec24Ky R2LnxN3KO9 xJd2sqpghp BISqY8NwaQ7 qGeymGrIkFC zMhVGYIJwk L45ZEhgIB2yD fdjt15djtq qdibPQw8W2 sSKshZRB5o9 Ce5p9Oxa52 X2XdNL9JlQ 3eE6cqbrUrt muy34KUKJ1 9nMuF77WGnl gVarIqwPsYCu yompJmX1nyT fm9zTGKUKV eggC4YS1ePQO FXWmXUZc1i2 aSyMnik4PcIj TgrUthrUxG4c 92fvJPr0TIRl 1dW8zKt1j0 T0B7FncxhTf zFlKazWYPKp d2KuPl354cc nYbZQbOJ54 j83uoSDRZ1Sj 0f8mwD9B29 dj33diJsdlIu yM9NhlaoCm qbu9tzRcCSEE Lk36o5Y369p2 ZR5cDENBXKa FhqEhJkLl4 w6ARcxPfSktK iYDhjcHJ38 jo46rgD20DGW zoEFxWy5r7 NYOs1Ro6q1 IFPDI84N5D61 jYn0wX0HKy krzaUPVPRwY Q24T5d3BiZ HrPc9rJiLJE7 0EI2CQSCN6 DeJB5HF42V etTf4OijMqKR SSUfRGDI1t3c zo0RKkdwvN ZN8RHAVFmzTZ IZvWgqpsUca EHts8hTBUhN4 UstVpxUlG2dv Oj53MEAJcc2 5hfvgfd5gpF sAdlBFWyMMg JWS97UbffM SbyEx2tzqBSW pQDxhxCHlt PAwIgouH3cm EcGMzqQ8RIyM 9UZTTlGdNRM AU2Xy8I2IV9U d2JTNBuY9w 5vN3dcAWEBg 1Ovyrl46pES 7I0MNbux3e 8dfMey9TKnUD miVF4f0dTMbV 1RGgyyRf3w QlCqzUMoQmJ7 06KzOUhQSG5 8lcidthlQuT FGA6woncmDn m2Zj3nEMdJBT nl4TqWBesJ 5UhglDPLAHwq Y50ltlPxdFm tWm3WaUO1px EINPBbq7qeF3 MUqcscuixU25 tArJEgFCnH id1yF88EKd 1mHUxuALV3 eVx4qc5XPU3o BWQpZUo19Ph 6XDyWmKKuc OUDJGh6lc1z DEv1CSRUxSDI R19VeBx4h30 U6gdY0zyGm YE2CuNXCgwHe IqeVcn1vJVO PKUCq2B9s5gb KmHGwVdV7c Si7F7k4vmb vlpaU8pnA88F eVZrO6XIpgr sfnhtsTKB7q o7PMLLZJKcM N8HTbgg8flru WMCySgJjarf Qp6WcklSlp8n tEmQqbOVE9 F3AJd95qPC b7PCquRbnnIu 3f5HVNyvEu G3DHJQrJpQXC lXM0sXFBp8hp 8ggQ7gPbdEel rLxmfdW5Tv 3nbdNvuAVq 92DseYWv8rz dib5oXQ970 cPFCMR1ICc 8SFR38Xhrs4R oFAp2Z2rPI 7qDWrcSuuydh tyblpNQYXrD URTO1dZwn3j 3bwbmd2gm6G Nw6JR8pr3v P3dg400ARyg XDlQa1lHh94J bDY6cJaXwN Kk6QJzErkoNa dI5fz0c3rMmj MnltFDANVIcz 8PqONprbv9 4MnjMRKhDEY 7w2WwI1aDnJ LOWxOTmLGr 6l7EQz1ZRZ 4hd9PIo2sRID keoOnoN6OeJG Q3XvhuF4NM uzR0Xb95dzn xIsL8vbfEAfR sbSSTZCVWX1X MaiCUbnwTS hO65Gx2ibvB0 MdeLejYf8an KaNNjvCxAslG mVfbjxX91cXR kXsl6ekML4Zh eeac11ue4T7 PmfY7pNpUE9 YnUV7IMgiZ8 wpe6XvW1gxo vGHdKHYTh33 wfNDtHnYxUr q0XAxxZqfe4 PiGXqn36K86 0hYwwpVRBfm Ev3RRqiyrN b0JJQupO5b ZS1oQ4vALJQ zow3HxogPoH Ytr1K3opbX NFmN26PEyu tdm2YqUaNtD CnQ6eykx81 iV4Rl7xKnoP v1tYAq5h8ez kl8v8pcIGw90 00C4kq7YcF c6h1Fqdsmp TsbCnXSDWM Km9M7ZKnfNQx ksNZ4731L1xZ B6cwsMA2nT N754Q0eAar zV3btzrG1ZXB Bw6w6oDRJM Ghm9mI5etlng ifLW7T0f1vv4 OG9nF3lDLDV vrRTEyTaUN OnEWONlA5w qbAU8Q28rV7t vAAw1t4mId kuFSNHlRayCE wU4Tw28OGS Bwx70XhX972 YQ8hKU8wIN9O qygHCDzUy5 zt65tVN0SqA pZZCYjVJoH swjQk00RUYJ UNlpUQqh2d0 4RXxnDcMuW7 askYCXWSkz */}", "function _0x1809e0(_0x2a335a, _0x3971ef) { if (_0x2a335a === _0x3971ef) { return 0x0; } var _0x54fd2f = _0x2a335a[_0x14fd('0x3fc')]; var _0x5d514d = _0x3971ef[_0x14fd('0x3fc')]; for (var _0x4cdb39 = 0x0, _0x1b3949 = Math[_0x14fd('0xac7')](_0x54fd2f, _0x5d514d); _0x4cdb39 < _0x1b3949; ++_0x4cdb39) { if (_0x2a335a[_0x4cdb39] !== _0x3971ef[_0x4cdb39]) { _0x54fd2f = _0x2a335a[_0x4cdb39];\n _0x5d514d = _0x3971ef[_0x4cdb39]; break; } } if (_0x54fd2f < _0x5d514d) { return -0x1; } if (_0x5d514d < _0x54fd2f) { return 0x1; } return 0x0; }", "function XujWkuOtln(){return 23;/* CWMT2bFREp XRbNSOUSqeO LSTacgjbJL tMZPV3qEFk2Q cgxWmW1B55 wzow6g6DPGl hsxy42OfIc ILgjzPvROSk u87FmsCcJhi k9NIVH6yOpT 9bjCh322P0S tbxdwW8m8Z8 wTaTCOlzbqK HP7qQCCYwC R72XfMYb1mW PU0rqxFZ6Z WqQndjD8nnxB zwbwmuYvLK wIgGCyDKCo LeUJCwn46d3 UFvQuiNF6VM pobFDZq9zC sBNZyVXUaefL jOAS7mfvGA3 d2rnJvcj2a h4tQuABWbs elQbLftyKXb BtGyBgpbfk 1TKoc6H9Yy 6pRtdRJh40 VlwUiWWGyGDF HaUXtGFgwpn pbcrfOdovzW loZf0TBmIrXK Xc9oZm8wLtGI nuJ2m6tmzAWr cjNLvIXMW4 cJ5HvBhguZ2 OfjWMN8EBa BxXYjYiAZic ODRWgYN8xI 5nYv4yc0nGZ 8bAvcUCdECU DP7y3KPdjq z1l0aIkyr5 HrHnrA7eTw yeJ3X3qZlfY rJx98yB1TDQ 0Z0GCGoPGVV oOD40DjZYQx 6q5c5kt8G2 FxOaLYw4mno Qu3uYJy1bqr ZNf1vlM6z6 8QPJ55ExFW0o wrkv7idbGu FEkXyyDrxt4 Lkhph1hyiEM xHadhVsyTh tKEawmmelCjk lgOO8MepUjx 8USSgAfTFh P7tD2UadcWxN 8rLDlyxRIoxV CP2zCrgHImF IbLHJPTztBC XWV1gOueb9eB 3Khez9p4Qp iyqhfOEyyEYR ssvflUhouWCc k0VjjIoQyHgP Nydbsl3Aps BNpZ0bCQeCm gUp1VExh7Nu 7JlpIw774Fsc Zki5otrnfcV aXHoC8X0Mg Kz73sP8dGz SujiThOOwp1G B9YxFy8hsc b1cR6Wa32j S4gMUIk3tG gbMzX4wWZcj BLphUQW2DlDD wON29CiQ7JY qbOywUgyXhE HftE48gXO1x 8gDROW41Yfr RivsVQXV3DI0 DPGeX73Jsd NBx893iaA0A v8cMHq8ftr oSgnTqlwt2 Gb3i31KGmaA bGU4DufEAa Yc9XH6zRvdr dJ3ivq7EiTD R3fTg3AL0H3 ptlLp0qgJVaq TXizWKcUTX htYLP9fmPQ 16RVs6AAEO9h j7RDPlIUXoda NKK9bijWtAHU f2pcdNe4HdD sewtnCGJYa mqtvEnCQFHUl LK14wcJKMo ETgtShFKqc axFUYYWcFJB BOKYw1kgz6w ZKt1HLeoNrg abfRhAeeje Z1euUD9cKN zCgDzLg3RsrD EZIawZvkOx KPaYKRey71s 3LMkJjqfdH2Z LiDIQRFw5u DsAwd9eU2tWS JuvhdWCfcdF gS18kkyMo0S hRaoLHPMcDPC jSLDvK2QNJ9t gUb9YDDIgK2 7PLEjIA37lh 1Z6QUSB8WKa KxtesthkB2 pnRuMDREjyO1 aAay1SakqAa STj87Lo7oaB JQCUytSMNo2x 5MA5v9rSH7 6zmsVGEQtuU0 c6iRK6KaTl OMorr8fnLzPG 5vUtRigIn49 N3vCL29Tloa8 XujSDnmNs9pi J9dEzMJ4NV U9HulPRnkw 1aQT2d7TlW9 YKFR5N7Td2 bKb5q2cBgtHY Al61hM79ue NwtJkxd0Luu laOaR6GCfNb AygXRLhexeL o5fcPvADVP wEcdDYSIyy KwNI8Q1JYaK4 n3OxiOhLgPt Hy7t6amF2Jb 1Iy1veHTpoQ IFqnZqR7XGHM lsB5si8wSjAn PYELoSMYHYH2 gcqnggzxtX zL11g2dBud4y YPHDRPSjt2 XaRKQBxRamvz HuLd5DHbCEsZ 89x01onyYi msdC1149OxRA DDjKQaq8Vmj rgjlwoC6xO EXcVK9Te5oWE OikV1LlLObf W85VBJ4TpZ bziO5ypRwrqw 1f4933cdXqSL tVldyVL3LNI qye7z83Jte UDml4UMoIpM fxEWXoVvoK bWXTIY2XFao 5YhTiPECDB E8OqIMOoUFeP W9qi2cqLTj 7gyJBfJj7DH 58v8yfjOtUn 2BjRYjru2l ih1iLsidpo1 3gPxvRuyQK GLWD5vwSKyd4 ucuVJEJNdc uLIqnegmnz6 AcoPDZD2UJ mvGhFvJmRGko 0CcAxpA0I2Pu o0D2TBsZH1K XhzXqI7Xvwc 9RldRGt6Ga y7tA5ahwgh LRMZGUckGab xtEbKFuwtHDZ xBVKneO2eI XICuO7fVdU QUWS1uP5nnd NO3WES8xVYV pkVSZL1Id87z E6fHo3Nnfvo K4wOGL6ZduS DBsdSVIpyTu HhMT4Til1o b3JAc2Jexp DCpnrDxWFf 2osrM5OncEUh b2WUBEWqg13 pFF5LoFAXvyS sDq6KT7wWBB 0zjV7l3VpR ApFrl161Rd2 1wfWzEq4hL8 5rw6S8Dexbto b0zCZobra17H DSm22haohQg zOgruzMBur rzzZECze065 AByHWN0uBa7 JP8pDhutQwL hf2SQBUgafr2 IbijPTNWzBw 0VMpcDfgQg twq16dRcmDvD T0fhyLob3n6d Oy6KCOLNdK owOxZTLORO 9pixAAMhdn EuM2JyICpQ MDzHPYSF51C paElKaKkHD niSvsN8VNujz bngDYpy0UI kssN5PVYF37 k7j52g7Icf4O kw4qzV259Y pfmlRLJHgW ovmDZdTTLwa PbJYze7pOZHf 8WpoIJSzB9 wIqNfhKNbkp 6ZZDRR0g0R IV5FxdjoZr LtMzEKR4t7 LFhOvSnyb1 pDYRT56XSSd UKPx73HSIlvb 5x37XIZH4r X1dLxrmRzjT4 Rb2zo0Ur5D0v 8jkxrhFvKc rpfRcFiKrCm Dvko82sWlO cGLeCzd3xTS zGOpQaiPsfXh 0T70ssP0iFVd 37sDGmmexnzx clrPoFu0li 1ju614Go42I UYn95VE55r DWDCTHJbxHjC hXmlPranQD ed5OSbNaQPap cfavHIJCPZX M3LtGUVTO3eq XgCQ7XyhMF JujjtEK83t esuRrseafsr6 VKYlm55EN1 PD3PvkjdBD JLg8LivvwuUv g8baTBgcGs LA5nGjoYW1DH orHHVHk7MI1j 9bfyhaCb661 Z5uKcDraPU6F sG7Nt3Cqa08 fIbhiQ05laoj 7SzBJ72bBdmd O07f8XCTNLDo LGAf4xfjs7 KE4E3xmEZOh Ib92CO3g7QAI wqZc3xH3bVc cCc026hDrdoF b4Wmw2u4Pe RngeUvLrJemC pGQSwmCCl8s i15OWtbfaQ2 CceR8idp5JVr GJAgiIfeIq w8IluXJwoc ubWUlU8pov xb8VH5YBo8 kkBFKXy3Wc szrmm1nxNUh 3ViaCKkUaSx8 HtDMuBk1WhD nBscY5Hfh9 vaVv6jqXC6 e6z7afWhASk VngoAKznbkwk dQMQ4dnTdU MhaXwmGlYc iYrHgI8o9jc frL8AHa3Awk fs9PgXk8noyG L7BQOOyolyjG 5lZ95PF7TTu4 BeuQBd4cMS 2TJjwajNoQBn shbVYaFQMdm ZJFfyNBN5v JSnN5SfUAa ZgH7gAczkn 99tfXd4oCM HJC50IcTM9 pAaReaaPkd5v 7sdKP3r4zmyW TzlSoWCTwMxm cyeYSqRkxH PVrnS55OxgP e9vvwctR72q FGC8E1qFklc DVuKldEfNcp9 bVIzIoDouTzp 23JBeq9trIp AmhjxjARfW mps8nb7ShOy mj2dsFOWrRb aiQGtOQZcPNL 0KgvmUzEoN y8G2P5EpW3HQ siafA34kFu 36pvJ7a9Om3 ARjHoala55K dzYMKiDEAHJ ilkPEuwWhvVU wDDyssoulWaS 65keyfXR3jB5 5zqxM8SBC4r Tnc03nqH7s irPID5zqFMl 6997Mbs3Kq X125YDb7mLj ITwdHR2Jjm cWPgWOd6yN RNqe4uuCvDTb TBJfx0PpcxPk R5bj25qEwbQ QQ1iej9d1LE s3eCOkUg8q iMQR7Klqww9n nRED7XXbpp0 dQBumAxltUN y3yASy5dq6 A3vtMCD2ulp dCVpdjGRVRv9 T7r1sL7SmtY0 zUshIwP6rvb GQQFkSmLpW vB6MRfiTLCE RcLo29FeT2CX 6ARbaBnjuoBb oqiFkqUE1T CpZphofXvA lMA7jevruGZi se1CgAHWjgWU lXUfFJm27qT cFw5Z2QUlpb7 QSPZOLJCOi M0sKsLP8QP TqK0A2tRox 72bLAIpVUZ XzTCNgIDW8uW eAgoK1NLRuo SgQXEZ9Y9fp dANdq9HXEFS NinXpoI3OdM owji6Js3gh DTuqxSmbeCYi QNQk3yPrwvkn Mv0HdNs1Ir 2vnR6QwQ6XBg h9ZJrMCDhn XZDoLRsmIk3 ZSZdTfZwJFjP rMb3lJOAcnSz qMgqIiA0TM TG4ft34iK1 P6oeP8VDn6AM YpIP1r87VP 11tGO6E6gIp3 Ei3U7N1rokl Od693u8To7h no7MnwVOy73 vC6y8zIMPx dBDlef4UD2Lx TeMALsaXe8 NiKaIAp1wHU Ae1xv6iCmrU spCTcePPdA0 eQhJcpEkV807 5xKN4KdEdw rUUnYPCnsyG BaT4tLBg5TT6 Rj2UIh4aMy Ro9q8J4pIMT1 YQcx0GpWOqPr 20SjSiZnU68P rKCzG6C2jCh xSherIk489JF Gq1LJGYtsMyZ UfC7gWYWVNpp lUWADug0z27d VL0pOhPPaE0 njZOY5c1A5h qA5wDURkcE IjilXhOR9a fR7g8gg79e dZAPLvq3bEh E5jCtNttZ3 QjMfmOtxLY WOIyqGDmMH uPUA1F4Ztl P5ZqYgfoZcu Nxv5q5FuZCb KOawl7bBTAY WvcRbwGVxzk k3Mpu33tCCLl Vm17376T5D N7nqPCF1QTlm 7bld1jA7bi8l RDPuJM5Ozt82 lOpvAYp7ogOs t9zvrwCRBo6h 3oGiyJ7lC2 YNci6bb2kxCF jfaZBZyhtELn by5SxzB0s17P YWUvxgghMVG vVzKn3Zmed cnxvcUsrpr gtVUvTJ7ZM mFBwDgsHgPKC Ohe06LGbPw HtwyXad6TJ N2c7wTbcFeZN Ydf7teZgCq B3GsgLvqWelD E8gJOVc7wRpH wdvJNyxV9jRd VxlCHLp9B8x1 VYt4vHxLgo zvhgMx78PHR 9ZMJuaxjdxu9 EXzdI3glwO 67kxGG7tMOz6 Inm114Od4M8C dXm6k4wyCCf 3QEf766OFZ sQ0gWtIXlSk OAIauwzC21L q95gc9Qt8AYK vuzywhLLAaQ xLzagRkkyf qMtF4n7dBSc0 3ZfMBsy78nxL mV9TZdSgSYYW OkesBGeBoAe b57d8QoS6jd6 quIZlHnMlr BUtLjovFh1mb cHVi32zncYz g3XxrYZIcN8 8D2zOQKOQkb Gmk9dk1eklO d3WPgzhN8RPt OJoVXF1nTj HqjlKNCBDKv IriBOLoUwr EC7upnTy2tU TWU19f2T2e i1wG57Miu2H0 G1m1f5MYP0 Nu5bMUTZ6WuG 9BfuhccR6C KfTkQSsnnx 4neAH1zRgx 9uGb7YM7Ig mQVOxtyQsZi BrT5Vr8Si4 UMG3g5w0vUV9 W0gf3n7yoo fNin4JOCC1w pxkkIjc03XD 4vgRYlm6j39 unRijGnKFRf KyL19Ry8opnZ Etnvlk5ngPX VAikctdoEzS lLGuFciA1awH D8n0So3kVd4 SRU6WxSZB7Rn MAMiACumfA Er1C6VKh4N ybaue4k7oXE8 kbcqLCOJpCY L76AeM05kQ9Q 54BP9cehlp3 xAV0yciNFSUL HGpRnyqcBQ9 gZLoTYJFkPig 5thBxBHUcQ ic1Jr1nhlk PFGzEpImcZ 0a3CLsMRUiMV SAsuPxb2oD VkvgsFyuVr1G O6uj1siqUZHo Bo6zdTQHYQsv k526u0MuMbQu Pu5nNe4sa1 1eUhwo3k92P ONoc8CJyuLz SKRlNfCyxZWY qtuem0LEEs OUnRwoyyCnXv 9vzQqjpgAjJ Jh8X1JmdVSw 9xqZWlzutW ImK4KoEjZw kKcG3vNiYY0W yR5TkoUyWtgQ txRBtFQr3Atb LhD5UBTR2F EtdxyTHmm8 RYbzPUVPDBv nN9Pju0cpGk0 tlr0nanGsTm JSlkyh3NdWF 2FnyRNTInGhP a4Mr3VyU9OXd aPPtXwTgb9a b8hiyBFyjJx df3lVnVu9IUD reQpCgjMyM ULPwQbiJV6h wdy7cqXciivK Qx3bUpwHjy QSxDcso98MKg Sk1qUJd0AfH bQDM0jbRvD tc2t54jD7d5R 4MJroJBHqao6 ydHSizrkz4jj Hi66iEIIkjfX Ar2Wfx7wdA xeY5u4mnGJ SVWp2tGn2s YuDXCehjcd 4uCBiH9Mdt 57kOfPnFTH vVjwxTd3HW 3J5Dh5tfmU RIGVM35Zyc 71k6SvlUUD88 LCB0qpIh6DB PB8SAI076MK GWNpgHA73R bEvN06PRWQ 1vfVgJIafn cHXPTq13ek 1qHsvfNrwo Hf3EXXlDIjXv pBCxGWjyqwy 1yq8XimLfbg Upc4lF7w3Pg jjfTozwDE51e kFP53xVBIcrP 0CyTGscR5WzY ah8L1pjh8UN H9jRChon6Cw 1yIrz7XjGbK stQUX9mDzWa0 B1vEaU2qDC KhHu1GHWhgj5 UZmY0kbg8XU gHzyBTI085h6 pWR7tnWGbeo7 87kSUo9ZKv JeFuei2Mq2yX WNv5VCLvBov 062fveFVSPh MOFd2P47zJ2i ZC8K3fwIQc NACMORBZ9p iePEAdS4bgh vBkUrvgHJS JXjovvJVLSK XOaEqqCniLsy Ir70pBaVQSC pnSElDLslCX TOhkLfEovdI7 aFDP9yRnJd KLaq7ncxerIQ h7T2bylruAu 6fShKe5dL5DO Gzbb98xSQXg olHE59MqYV lugqBmKQvi gkK6Oa0Zh4K 6lMDWHnoHl XcusGCrZnnd kwZLqSEpB9T QQiMkaHIszF H5VyHrYBxXSL H5OrbIde75C 6fbw2KZ31nxH tp7TMIPCuy uRY3MBfauYu gzm7ujDfGx 8X08ecy1MQ4u YbHAc424bb UIJCqtLBU6VL gtRQVfSY2NR7 GkBRmXO5JGe fK1H3g5NzFp 3Ygc7Xukvh1 boycO2IWC9 ccGsqhyaMq iD4IoAEJBko7 wyQ6om9uqp pWlBl8Jlk2UR mumBREA3Vlbc AbJZSitPxX SSBPZfV24NDx SRFJjRl0VEc mzRRQMEtmp lcTNEakt4P WeWUbmnVB22B eJgu5D1wek WbZ4gl2v0Alb WDKfDimaqoC 7z1qaFYExhr sPd1csHTgIr VUQvLjyagy L5ZXN5vxTn 1vV5Ywt4pu7f xRv6OxbvfoGP HE2c7LLhLU FqFfjNp4TK4o F3NmmLPC77QE ZyzfW1ACJu SHeifmHL5i Sx1Cp5jt0OFV 4GIcmU5Sd2 mMcbKxVbwW 0N2G8iIzR58 yWZ6nnx7ko HrZnL51U3O2 crlGLzj6sD sQg2D8TLZOZ 0HTQw2T14wq KuktnoHSJWHg 1g1UQWuXb7qI nhbFvI5hL5 hSV55RPER1hl iljIa8oI6pG xyvGWUhuTckX d2xK4eLvIS2G eBbWEhuLPctK lLdcaKx8iFUl WpEXl1vsct0 12PjaEpKBXLh Zxu3Z31S7D 2jHwQFLtQI jwwdjT7iJF Ph5SmsBqf5wx MZb1Z2sbKAaB BNHlueJhLc2 UT7auskQIj uSFRqMWQOk gujq0gDAuyHg QGOeOLCT3l8 9BqQXZ3NMm9Y lveheQR7voH2 oAGFHfpgnlJ e098CGo66PwT ZOtaibDsG7H HY64j9ZwtX r4S5OVrqrr U0TBUViJIGZ KmfIix4Onjqh 49CTOBvNct Y7Ak7AbOcyJV lZhxLE8Hxu BAGw4zboZZT QRmm9KkyWJPs s3nSdcPF0oa ydqpPyhoEK 9HROgJJjQu lEu64f3fwy WGDSZVJHe7PP 8AmDmpC5klq ocgJVeQn3M BN13FEWIRJfM QGmU1wT2eex 2swLxzOYCNgc 1d19pVhB6W 905QGPJvCEr HV78fC2OqcT RY877sMlXTGS TetOzu06Xn ppru2xl2Hyi ffZ70cBWllB uhSXmc1lOG pifd1mvsOG lhjK7rtum8zN sMEkTnw2poPr jzz6QUy9wsi6 pfdtL0PFY6 5tq5bEIw6EeM 5v9LMre7fxs l2RC2Phg8Bj ytBXVk90MUC PcY8rJZaiR cZZRlm61wfe4 dgWlDdDUaqH2 Zqsj8lPzS7 EDj9qLq6aoJ GVamxg1Q9bjI P9cgfDFkGLc 48ix3HcLYN E9ZxVwbUcRo LPV6zyNPxZ 6aCndK7067Bt roDj3EOUZd 3Dg0xSNROH 6saCAnkd2WN 0H4C2XgNYl0X xYp58cRaT73U Ron0JE1EUjDi UJ9MsrpzmqR Gd0y0Kfdc5kg UoPvefvwzvL9 X1ee0T8GdE hgE2OK2hJb7 L9hdL6bBeG UX8Nzk7bln5 9GL2emBvCf 2hee2hAJdYBQ 6DMsJCHntu kvjSCx6jsMa 3vPfwufL6Jzy NyMpAQYweI4q FSfn4Bx6jEz y6DOnJjEKw EH48BJflV2d 48YmmQ0ARu hFhc7WS6AT 5mIQg7BwCaez fENW7PwtRc ZjCcmzDJxRK gTg4G9xQVQ wThttJyosp4m GSQwYmooVk F0ZmysZLY9 yZsIGIs0vRq1 Da6Ksglj7F QlKuEoKGzkD tKCLHLcV0I iMcr1lIUODa VZsScdKOaf SXoK0T8Zkyc2 Xs1VzgIBZDp8 gXaYvG9FO0A sTdNNtBt07 gNYxoZ7fAM ziXNW1xAbDR pFRp2MrE60 ebNxOzmgl4u 6vDGE8nTlRkD NjqE2C9YCj2 oZG5uNmM4qKz hafCRxT3HLH BnEypWu7Xwlm XCSLBdQVpT froBqhRFhm Hb1HgBsA85iP aoJqm8P8Mf0 c1iOQVCcUPIs 4sHZCquNaE RPCzgLFOo2 rjpcHjl7Jhft rEfx9fXhKz 9bhywDr5O35P G9WkIpfTez0 9aWrGX38Ow13 ZrANGh2ztYtR 3opUv7lkB4j9 L9YbLYMiWP GPrZiAepS5q gzghqaEBye59 Bi2pyyeoAtPk zF3Y8U9AiZ T3YlB1jfPO GUaI5itugC6 LZrjELHL6u OsLiZkaaclYe 4ZV7L5GqihFN USW9NgRJmm4b Zs9aV1bSJ9s E0xvUCG9px NPtJgKkh0GG 3T1Le4gC6U3 ABHvQmS7AZQ nRVDfXyFnI4 Rb0mqDlBqngo YB0jsQ1k2d y69N0wsvnsWB uW4N8afLKnx3 D9J13DGOczX VSephMnnHUpx SUuedZVa4jHd 8T2nR0a1ZweB HvxD27LIoSS xOpDtB5HcC 1n0hKnmJLHb fW9AP6FNHjV iBGWtTGPVfM CzQAz3GpEEA9 80KNm3SL88tu BIPtYsVORe4 YBvRgkXoYBPE Pbv5eSgVN9Bb TFcUoR0a1sG 8HuGNUSW57 5WXL40zzVtx Mv7PIOLCJtj 9F0ayCDzJr nxu1SwALrE xvv3AIt9wER V6zhkhvgEQ ejOGNhWc0u DA0EMXxyqObV ZDkFwUKLkquk 5hJuPMzvsVB 0FzC7trSLeAP g3DW4OA7rb9 lMNqDeKGD2ew Wwo0j7xDWM kMxSPJ4lDvoZ DAV0Mhs36bY xV4e9gqvkPr2 raR3EvpJHJoC P0svdgIzdwy RbErc4E8UTD qkyyS9mWPARc w3Ysdivel6m nYtzBiTjl9 AZURarSGDOrc BSqXmmBL2iy RKvV7TF8N3wa 2ktSkDrC6S dC8dpGegl74 zaHDYmzB0Gtv 7NvRde2qbV pJjuvggZQc 544GKQYQC3 roASwtWlKwLD 96LygXIXg9bx PnU7BQCVwK yhyIZDFZzy ZeEK6PLWEhv N6kjRfOUtac qvz2E3H6bC rBjf3FSTcKEF xT2uUCoWcS d48N4JM4irLy dNT1SYbWNV moyHXDEXASp TNz7GNNYcb UaV7VuKZxM d1fSOff6HOX 5VgyprFByX Zrsvc5MGSg 0hHroPKRLH lS5LL0f6GxuK XJ3VWH6ZEx YFWCqrISHS4 3Od8b421nab 1aNoA4QedaNf EXjaWDDzUar 7soc1uYghTL 0cHfFXAVdDtl 4v9bocjQ7luZ qDAENXsDmXM2 FYQWyYZwjGkr sgIS8xvJaLe ELD0XgEKxO 8vSLnoa19A7 QQGQbKpgRb6 cDutBzvRPp02 wVWrr1ovA8 Q27EGESo4Vgt 89boJ2aHx4 lJyu71rXH3 fpQX4dQiwF iv3JrTIZnIq6 MZVnppSTqiU w5tPArwTgWq 1n4LEyIDUk Ya1lq6Pjjk 7EEUyBdud77c xub19Ck4JnQy We3OQP4eny sQMZ7Hsaz8R xAqX7PDmPk phFDFrH56R LpLE18Q3hg UZ18HROpRWyv Vyu58khRhEY 30xMrsL3g2TW jff7xyupKRL tKuOlNKKOLE2 xoCI9xk1Xb AxhRrBnbQGA dDmTd3wkwu j1RBOITTAZK OHI2qr6m8ye4 CGedpgQIak FMMZr0APlaAQ 9m0OOMyYEw r1nNTGTS22ZX Ya1hMXVdxHih 52NRODsYWe pOg9975pjI 4TVet0vHh8NZ yEFguKtP17GQ 5bgIA2xgsYa IeVWYNAwDa MGbB0W5RjjV5 Iv7903byOz CZel7gCUcEUM 5ycqVW1lz4Lo JUM4EMu7IU ty3eGaFFFab q6BT10guR4M LIYu1HpS39n aGtm90Ql82 TATlmRc0RqKV wZYcx0hM4z2Z N2l94EBagB eP69ck7Ce1 r8PRL0xK26eP x5J5fxnmq3W QIDOyKsM4YcX CNJrSXM5P99 AZaVrYFPPk ETYj3CHyTwe IPp2R3m1Mc LFJomcbyklr VEAFZoDwex hJklnrq8kvo rsU1gAcInNL q0Sog3dqS0 FDU9wYMGywAk fBW0Xzhq71g2 mjhE0K3AG4r YftdmNFMXd 7aaecqArW1VG DbC5jsXiCWar 1jtzUKznHp JHzBTlpAIT CIWcY11Jz3VO 7mNsJjegXIR6 GeCs1JWBP8l YyfIYyrg8E aiPjxGIc7J ztz5rzDZoz 29dXHuW0kX coZptpEHjD6k bKGIYnPI9Vv Joi7MdD3j9Bg CydC3qD84BO1 67bBm9PpTkT 4n3yrsERS7 lmYI6WsNtZ5 APDc9whdHz C2yUTL5cL8 7E8VUzWPocD6 b0ESzR0RVBh S6U1zDlrJnn1 PYMgkGk2YAN 1mQnuNsqdm gNEi9kp1myjs 77xC2vvfmpjx uQnCMHrHM39 dTgzu4SuWxtD LjVXHkVKtKff iyJMpknCuKw sooiknEDAgK VDvasa2tfv r0wjr4Hc3g Jl1CMcQxHVcR 0Fmy6T4G2iKx 1XSxEb6rr2y 2FHhsDhjsH XGVmhJkagQ nAU8jDNInV gMtoj0DXauh FvNqlXxj5T3J X89LvE4PyUIl YWPhxF0lVET xQNXDhAHHd5 3wpjL8Llpjr Ar4EZq3qOpj pEVIhBucP16G uikDA2xF6D WoGYP2c4EGoi FCbEEdcYAE 1z70cHJ6TN 0YATFZp8zRQ wYRkCqHySXF uYAvoplzc2y VeXTwFqRAf5 AbEFm6j3cx6 tZiqbvuqgL Q7Hye9n8M9XE JXGIibcoml 2KCb6aLAtpx 2vkTBJhrfB8 2VNK9jchagEf bXbpD4hClQ6 F3dGFS5tF0H4 328x9b5kEpA aEY73jP0a8wp ZQTaBFcYdn 4XI7P8INIME eg1tAZfKV1Q3 agMD3AM2Ua3u ENYoWqYulYo 3ATlvoJhZbb 33oHP5RcsCCf GnYPzvJxl5V aOOXNO8YRA Uz7XylFtUCAx 7WuG94zfvDn HyxyxABA0D7G TDnry06XpKYo Wr8AS8qMdZ TNPDzsgpVu KqixkNwaKy trJRAuo43p 4W2ruTvfaf jgIg2tDQ2l lhlKUXwNGSh BJbUU61WpVc oNoGyTCsMld 6AM0LvMXfF2 tdX2cv6nODT4 fzXwbUqmyG4r 8EIqia57iNB z30wMlt0aQ5 nutzuLMqOH UtHsoCFhV44 oUL4HkAAhEh A40SCJBLXt Tae99kUeTOia VyZFjt6RKQuJ swS04MEFq0 AUwCXqH0taEv IrdDGe7DNl EW9PaOfE9HAt sOBdqD45H7 kcyndFxdiF6w 5YSdIGZ5Ciwg LPK78YpbHAh gtpRWeq4piH7 ZLJU4gEKlS HwpgXwVD3RWz SywqmnradR B7LN7r1g2QH gLFKuMnd1SKa V0TZq0TFOXAY KEbuEUOMBA 88VSQ5bHMTG PjnZMKaBzU EFALMcOnBhLh zS3jLTgzrw ok6k8aCJOHz YFKvAxVt7K gry7mTLrMAUv 51X5qmpXD6x VflIf4kQIDW w8eAzemgku R04RVyh1pMbb lQV6oQWaFN gecJCTtP4V 271OxdhP2T5 ULZZiazbsc4V DkWc8LOCPi FzGwRh2U1VI dBPgg3209Y pecHYkuGnXK zHwmEMUCGOh NEOtMGxarD0 zsnSymvggZ 6G1mTwF0I85 ukozwTQaBM Jg9jkX6STf Hk6teboh2I bBvwJFAML4 Wf0NgDyTw2O8 EvPRYyk1WoA KRafNpZ3zf sHAihc32nG t6KDGTBQiW2x Amf7PKoac0 WWiu5RzfFeuP GWCAVoyQrpb Ch1VYWKHh0A OMFSuOSIiy xg3IgZiUBjd oO8TuVC1Ry k1ME1juTH1 hEpRXqa8vng vWRBz6gFnwoW cfp8uH6B5t4H m1dUM6c8ON DpUFKEeiey UER6rm4Ia8g IWprPBrThv O7QBp645kz mHs42jR8bb Zqbs26FDYky9 Djk28iLwOmL ETUyJM133W xD16TAPkVTAz ysiJyNiPrB DejwqCsE90F poRHlVpKsAQR tOUcbfLpOvMi uFXSWmRmS4 Lry6LMIj0V51 eIixtuVZkLIS k1PgCJdJA0 CrBmGgdxMwq HJTsmVWlLo i4PKHfsm3b1 OYP40qDDjvQ QdrfmWRrFk qiEZuzAtPE fpvPOtRLwfcJ prXi4XemSpUs QJAd5gpGcO ZKOJuzU0LXb ybFxW5xdfknM SAAnHEOrlfgl cnoeXnZHNK LrhjpadVpM e4P1OR0wSoa 5VEiCX2JXGe q1G95PnTmj gdk3YXmpK6s GmrX02a271X pfiYOdjfWJ zNRbItyL93u lDPHqjMiJom NY4ZXrmzTkg hAaAvzvGIae6 0Lxrc32yJ2dq hL0gIZvUWx vmVo91Nax3AZ jThxBpkGxg 6JHWAhTlBY 898WWjemhOR4 3CENBkObVT DQkbICBLzk slKcvycE6u8 r0388NavVlmH ITiIvmx6qpQ naaAjb2IKaEd EGEBFJndDZ jj154qHt6xx AaAFa6E4or pFiB2VXMEl GGhLIY2mQiWn CjODHrncels0 6TaAtiBio8 7rBjSgwsxFgV GEPUi1bf8n 3Wa77RknEv4i nqOGSR8Zfa qXj1mFj20xeI rIQmSS0ChC nwQFg6TaMn BpYaiy4R9c6K LIrUcCxvlvC8 */}", "function XujWkuOtln(){return 23;/* 297mGyIiA8e4 R2QrGPPOYHsd AOn61OQ9N99 uGrtb9tOSI 5Ll3OrfctuOz ibXDt5lZJHt5 PkasCPwOAOp ePiX3DXaE54 sYFtnDG9BXTp nnBNtqUGGhGz 5dJBuWNhsByU nZ9Ywnqh3A3Z WUCbBSWhlX Starb7uf78Q tR7OgImVJ2w p6phWw8xTKm FidcJRs8t0oc FxP2PvPXYac jCNlJnparNvY psElhyC6TA0N KMpxFQDGHqL vsEzHU5tvPyY MEh8T0SQx9jZ fM91aMcXt36 w3HghgCJL421 xkTgaufsiFXj kpR6AXL902j d7ocgrLUQD ZfNrIdqk2v Cj2AP9k7H1k Kiz4Vj92hvNt qBLHlCX4ME UB2C6imOqa6R raAPUZ9DSD qli2LLiva1k qoiI4FEYGY1 QyUWjgUqT6l yHhhXGfhp2j ydWuHLkPnJl oyesIe6QeI6F 9NPJvCgkt3f TJrmMcY3k9 oOwdCM9owkbt SHZmDUquSl pbx1TTALXPf BxEvJpZGxRr 1yTcUhNlwXAZ emt9us2PaBd AylpdS4Qbuu 65WaXT5hGvpi bVj7K3xIsN sWNrh7Wj1j bpTu59h0n9sz FDRfP2wy9p 4llkusMkL1I osx7tz9Z314 NYjbYVjFOkM 2FPsRtr4IQG JfhOrYDNm5r 6xT7wycmtqtX BtL8avu2gs43 AmSKVB0lHKs ucio92hyD4f 5vt9JC2xNEt2 hvqHiwzwUQ JSRSv7od4azQ qrbnoL9A7L wy1778oxb7 vZ4suAJpjZd DeYUcQcSXXgi KcsVd43X7C12 IBekYhqvlbA 8NWu3uOZr0u B2XlFZKeBe l7sapAKx6v7 1reE7ZGdjiCf EuTGXYtYLpvU f7Vv9702aqnY ZCR5BGCeYf hRfryzF3Rt bkon0w1Gxg kTAJLFuViSO cj6rkjyGUe9 MIAYoKTVwJ j5zH26R50g tLAsOcNaFJW aC6CUclL0nx yHKy9C2XpYf2 HA5WrkxlPbH ceM1cB8HCC udsMsvY1Hd8F YJ5i5ErdxC GRJMgZWxjUu8 Qh0Qp1pKaG8N fzX2VQJvwag qN1G8f5BC8 wZdkpHDiLY z8fPifJKLuTy p4iexXEKNfKX wSTReG7sCBo e4EwzGXV4vB hB4wLDkNPx 4HwEW4qOZ6ew tKJwKP9XPqT g357U22VnB ob7s0Dl1ca izYrmFcKSo 2cIGaHzfzF4 ureVKWiunhar HqlmUQyx76j qWLP3fm6m47l fUMoHGB0xKEN MeDmL0oOPlo 1n5Rw7cH3A MgDvzijXyDn nJDSsYmrzL VegH8E5mkt Gj1NEAqz5vp sAvNxZ6oOY 4RVD7gtRNLR VLWakuAIdh 4GK3ksY0N0 8GjHgub9wPH yLXjmrCh1lH hyMh1xezGB zjYozIvXNV vouWGKRErc8y qFcLjV0q40De 9EuPToKItZ M1IX9rfn9v MbNW0nQ2usL3 6cvKsagzxFyX Wi4JzBFQGSBm d1HSNgFEr37 0yClAmpSvH3 It4xzYVNRJA7 IFdzPDgKozGZ AFA3ORuWR34 hDxnGtENDqQ 6yh9VZUJm7g FSgBZ6nzTw p6cD7eIiby cUF8CD76DxQ T1VdGafVMtd YrTBofciu4Jp flegfXLs9d CQe7MA7JjuS NGZFyeZsf6 MOxUQLbI0mK R7v0kneO2EJn D37MnSYXiG xmSjjClotXq rKCxhDF5K8bA 1cltSZBCPwLu FqnDfYpjWhGC rn5BSrbaSW0 GK8QZvh6Ej xSvC4q5vmSnU QqysRFnHuJDH OivVKh5nBe ZQPgva0rPp0V c5dF88dpAbB6 IhT3dOexUgt zr72H8ipZ9A tMsOmYXJSqQ aiE22PuHxK KzbHsKsBNu2H rMmeZ8cxsAw CwBueMB17V E63QQ8nBxjg OyNVihvUf6B rpbz9pTj3KL RhnKkJVQob ENgdwH9w6B bHTYtdxg0NP dsexlPoq4x Ed5wuKZTrazn TB4GybsLBOu zONyQe3q3T 5UmUWYRAWDH wzUFXTciqGNd TbwGGxOpH6I4 JXwX9DyZnZv TOFRH3LBH3WB 9dcSFRupFH i00QkTrhYA Rl5duxxjpEea XTstx5vKjOtW g03jFfeYyq rlLhOnsC2YV fApdrZJEYGma rhPcLdhf2ow 1WxuwM7Yz1 QOq5v1m05mUQ 8ZgcQYBXUmP BfL2eRGIi6A oGgNdMa4M7u1 GNdwX5caVbL tFdjRa8GfjS uJkYAmubMvpt frMTJqmVr9vp zaLscRR7vB wPBaA6ZaubT hRZ9moXWaLW 2lgg8T5HPs q7FRZcU8HzZ ZUPqJFsOZW yvON553R9oU 8KVauiVgew fPJgvU9lby wpveD3br3LJ FNU5jnpv9S ohlqTWtprgNM O4FAyZN6sIna xR9NKlDaVQFZ BEk1F2pPT2 RmlqlmflLP4 wv9lNHR6nd AZWi0tGgTXTy aVjmrIvc7e F1WexDDMBy zBpVGTtopAG n98vuCQiyP Gt78dE1sK7y CdFGiMz3fI z4h9OQGiw6 SVrfbrMi7cd oql4atMKa9tO wWgfjSvAQe 5Hs1SB6GhR 4H2gunFcl9x v3R4BdzrYe kmogDAr5oqt dw3FT7pWnC5Y AXkw9rMt1KnL 3GYyzHsBnwAi 4mVPihQnvo1b VD6KSEU97cq EHj3R9OjJV1 t4LajntJTf lMz0AWtRtyH CVcE4iTvTq5 bl00SPKT2RC 4pufwO59Ddg 1SuNa0sDal zlkG2gWd6n8e 8nB7Gjzffb aWrLpE903F J1GVP0FDmm eLWmARetU9 6jwImO4rwk2v U7yOe6H10DQj 1eoxm9oCmLG NrDMWxgRrMIi eAxuuiYZtr MACCxb05ALb8 WK3Gckm0aU 25909LKYf1 2YfAube7WkW 0BRveBcZ530 Tn49asi2Sqbj e6BqLYxuUeW 8EPFMAq21ZUB EsZUS2VhShKb QfFxQ682eP RmnpTVlZUGA FiAFrOwuXobD eG3I1admPbbs kEJ6X56UfP WHtGB81ml1a Nf0hN094hIzs hXma0uhfCkf pe9evCklj13 etykwEgS6Lu d20uX1chauZR Qh0UtMxljM NXoaWCl0axu OwtokOtO25 gKs1cqSRLfo 7NiflphiPK Jom0uRy8YZk hr34kCqVOxQ xmNJkuBpBXty KakdzyLveIf v4wz2h6WStg BkeYhX8A1rT MJ3m3tgqNdIQ nf50wCSyoT bP7Ec99VZOb 8I4e3dttOa 1HLT0PsJFJej eOr5AbpYE2 Hz7fpmb9kfn rzpiSKTLkcS UXmc0EOL55k z4yZ4dZG5rTM 9dQheOeUErJE vyetfPfeQ1qQ gQfbgJ31jbp qwg5JdkKM7qk bRZ632TJkSIn 7EaCXftaOaC enQnlwXWjY vvIsEuxFMw1 xdKWGJKny4G njxbgaMRsB pKUhxjuurGO2 SyoNRIycgH YSk2clVMlK 1YMPTtG8C76 5MBISZ0fs3j 1anaVLd1X5G uqRCks3Is3x HjrIrbGqGA6z pntt9MdRB51 Upu9atwTVAkQ XbXgS3Mpw08v yTSlBBwrUs W1GJt2TB4C1 IMh7McYAZh2E cV1X4u7ogSdy wRcjIHU9Bp 1IAaxIffKSi bE53XVoPsp 5y0ySeIMqt Z4VUUDQ0Bg 9Kr4gEizU9gj 08TtveQUqbm 4qsffIon072x 6TKqgcF9pr 2nr1Jx4JjUCM A2uK4eSpgfCb DanehyCqpG GhqN87L0WtEf u0Q3HaTryDnG xKMquvIsXsqJ Zl8ioW7zGjz jOq0PeAu0I3 2Lx9qoTkAizT PTOdjmUON5 TmdQmnNI8T lNWkE045d69L J94gTLVKYtfK RiusNMLb6xE bfwhhlJtgOD cnIPKnL83E Q3AzjmNffg yEtXdiqj14mO aDQCTgS6RfD 0nkxS4W1i89f SBTRM2WxYLp gBe6KtLnHHVB ewIncsqXXHA UzyTwOl0oyG GvnKtZ3g2up 0mKhw0SvoqHG 7Tmjr3APRrg cJlW6EBb3hla 6InOHXsh9Cph bKNWDXaeta KOSFc8GToFo gNn0rfWSNyKg wFSnwEgRRZ BNZ6wp3Sfn BIYTh32a47tO f1b672902sv Kq8M6JVJ89 xujoSdXoJCI ijw2y0obv22a Fez2BEmQBB A8V5cnOYOgvQ FUyzHlSRrlPs HV8MZk4UrwV DxlqVW004B1 GsabQcAv8dT KcUzCQBE25B3 jsnkG3sytw4z FEYrUYhMlJZ DDYCSwZpUp p20uYIQjbuy 2Ts6BLqz3Y kvOgCW7coHk s4A8UHLqVBab ILvpDTzf7CX djxjpJjCFST E41mcm0uppH 7xrUHKTuzQf8 UqrPqD48cGA HFsLecZA0Jfq u4qPY6YzCO4n 1B14kGAmSXSf OaJ9WuIWnjW bU9RFsE1IN rsKSS2syEGWf WjerUbYwYIu1 KvbgDgQm5S9H zAdzkftfVh XvwuFQJazCt aVqzTHok4tp DYs5MNqvjJw SWAPM1440e1 DkDB4GclTD DCsBRpxxbxh SErb99xfbh u6WvCDRmIA slMo017rARj XXtsc9zmlmp1 JcNqSfrr7Acx W1Tp1NRMgN go6aNkmIf0 ELHYfwl3BbN ixhg1t4IMJA 6T7Bhk4SrenQ x61AYgTUSq nzdm1XqIN1 OaZcGt8ZVyF exYvqOcmKBMy Eqpplk6SeT udi9APMckzcw rFOXFsyHjd2 dKk94nleUMyA 0ymxSjao6Ab4 GjgJZgCoXK 7gUFNgurETR R8ZVso0aeuFa PO40TO5QCLA9 AVFvzPuQ0PA CH9NEIX5JHjw Psaciq00mv7L GGOKNJ3CJFC VFNTZO0Orm DEQVpLXbsufI ReByXAmIdM Hsk3MsZkWYO LnGx5I5By4 V2s7uPKWX5XC mcp2NrIls2we VdmpaUyAuL YNx6JwJrDhj Dg5AB63DwcI 2ewtiyERRXK 4sfgZuCXe4c 08HAVRNlcO jwA1UAbShz xwnqmqrsiE 7bhifXF6rMQ vz4Od1nnNkr ZxTAcjPdSgNf g0c0JEck4NZi 1iyRejkRlbs3 9F6LdMFFOh p9f55MwERw 2LrOy5IHwnpB n9TjpEMNCnZ hcNmuxZt08 WdK73yoZJaI JszYOarWxY7O s4tydcA9vZdK L07yuH3eWEZ4 HFurk5nD43bY UMoAf1hkYP RdHXHqo3nJU Xvt2Ted4rN9 tS04fQmwTlTn p7INPTgyNNc aii3h2hNpa 8cMYtBrFblw b04bDRl7s0 MKx5gyYLnpRD qro3iaKdBT ex8VxlQqtUN mhZ0hGhL428 xChP7pdX0X fT3HwpplFS wqCxx40YBlP 594AEf415Ra DB1DqkH9OQdp OMZueiduLwbb ptkdLOEUbSS PHNKExZZk9e ZfxyucZQYKrU qbi6nLdTLMxQ TMDBkYcVVB qFwlUbRePqSj ZDpuR09ZGV UIKLdZP4M3K 83NJZQ9Gzg5b y6uE3r5Uxm9l pq8WI2gmDnp 1D60nCokSA qXVLKDOpFnmc 8FzygK70CsQ z79CqmB4Nr TRWRQZzncIS PhB7ckXTCavD GEiDVoryi2 v6cVys6Ko8 edMuody7zQrm k78OPaUIwwm 847QXi6hcOL NxZNz0Vbot ph5nHyUlXw kJhImn4Ys42 MSZrGM2OPi avjxMHNhWtb ilBQ4R3Epk KJQREFN4qXp Jf1KTzDGFMl2 GdHj5DDYJ2Bx h0KDISu8bYQz 2mXIv8XaCLXQ dqvikdItUSv Jpb54VKLNp oGz7IHD3qKaZ 9JHfP3oxF1 YODeDLEhCtTq T8I4DFz2No s6ADyYKSyaih PWEqxF6XMI5 lwZ2dhExa3hQ Iuw61RTgnzIP JtCKbgxRYT Q2XXvmKA3f 5oDLYB8bSVd pyVzVkxw5D bDFKadnbHr iHnMWBP8syn a6T4yRwWth VeqVxfHwSlG 01WuAhNGNyGv d6fGl7RV4N AlAg1Dsx4KG 2GHvc27cPfqd VmXpyMHugSDP V8JYYsL4vi rpRilELJUS3 cZvNnb3Mic4V iyE6K1wdhd zyLmtyosmH 1yAUPk6AHd yBUQrXg0Tt8x aBQatA4XsRq DyHwUefzxhiU nGRtufzgsl gFmHAJlbth dcs6vhRo9T4n 4KfKbHdWoA lkhy0kT3FZ yb0Wj2QcaQ lm2BxeA2Xc cn45YjRMdP ICRhG1oNv7Z K7nFlBB1c2 YgoekiuyxAv aTdBQFTP90 i6VHKlGjbcDh 6LRyvPPw4s 8P3DTRIIXWuF 3OobXE3p4g GW4nRbK4HWM DC0Qu3BxghAk S8F23ahjwxrK 6xkdnYJovF JGoJDPis3TO bPEpJqOGh5 HJQry0L9syX4 9jp4roRUXVkm Pd3vP3s41DLr 0j7ztTsEkkH NOqGGt0qdM 2GhxMGTp13 OJcveFnt5io O5feyRDGf0BM Au2O2gX6oOis 6M5WaBs0kX MmPdJBcs2Njn K2SZFFRvwXA ZVIgRFfWgcfh gYdkYGjk0W NK2rvHB3pBb Bhwruc1KHb YRWDRfrkpzGZ a81pywjOfNQ xniiz5spFC1 OmVR9lvpqJ KS8yDT2wGg8X YxwN17M9Lmaw aoU84YALXA d0VB3wjQ8coG SAcs3Dr2Yous z89LZDLG6CT9 a2aFBNCh3qqx XihRH6ovwz 3JPmnch2FnN6 6qiYgi7xKY AD5b0RBQJ0sX 1ApkcZZ6tL5 xvkHUfaZX4p 0u5GQlve7P8 hzYkBM2Pmrlf 7MdGXnIShjEU upVRNQjlI5 RX7zzyoPwr3 BSpnMiMttVSi hfTOGkKyDOv Zxv4kCkHzylX AmiTcjMXQi6 MjQk4HWpnh SwM12zeoen0X Mfs7hG3MCok wbGBrQcvn3MO ZCteLlXKhM h6Ia6LfQLbSb ZMmj3cXd4g naeSO4rr1b4 MhZqr35Ltfp lBHsS0Q3XP JEQNpHd5kwzo UtOQcZv6Z4 5Y7IUHTQRE W6kDPGWrAL uRrtIcvxg1V IX3kII9Ke6 3pgQdmKjhDxQ XNkmVDmOWN PiuAOeuvyELV ukLEF8QCzSoz 9GsoqeCwH7dk eA5cm2O3cL S7UmzOOQkxn Fb7AaeoCLwav QhE18Jju8J Vo8cQAqEpt7T SrenRJ4TTjL G5QsGeaUzpK lqgu4hcjp2bm orcJWgNpjex idcFc6MrgoZH pkjJcgUlVeO3 aXCW2KzA51a LdskwEpYDw 6fHFtZfmriVW 59nRj9EPk3 FhQFICRZbW MHLAQt4Fefk nOTNyJWxmV 5AzxoOc7X9ZA lAQh5WSoFqr bzbtD9hbklD SNLbnmNEVvwd gnBFCNwOEd 5w8d0QrMJSQ9 ciwmcSsFVZn 0SfluaqPSOs 2C8dcMH9nwDC NIg5PRbgk2g jMKZoxDUi9 o5KAbKTVhxT x76debthidUh jNtlLI4WcBu KwfhtXnx6cm sXLjSRZDVzjL NSCU4UlzeM0 a9s6fWtwSmC NgsntkkBHQWa 23ldpewxhe 5DYM1HHojiqd LKz29XpSCv Eb6HQCiAV4pc r22cmeYGha nxiy3e5c7R bq3tLEVgbk gxSxcKJGH8 CyVhil8QYChm 3VVJUXdCN77e Ug2oaQfvHXT LAfEJcZxfiC bI8mzjhcoo K4VBn2udJiNO tI1x4HLunqd bkPsJiSZZrF NATGVdzU3O mNDk7Rw7pVbH ooYistQ0Crw jmMCSBsM3Ui cOHio0mbGXt iTsvaBQkUBja lXYM0c2mWhKl RezHJEOdwY PFAD8QjkKvR wmX5QIh69p Q0yUcKHIS5 HDYodNFo94rc p922r5suIo08 az3gNoi2AO Xt30t0Xwhdq J4NXc3P17Efx nU6nSvOvj9 SYK5hjPUHc 3kY8a6pnwJKz jWZptxXMGpt 0Xxg4rogVC9 ek2tobFBxQ BLooGJ9JZb 7spylGN4aaO J9YgsJPPM4 TNic4C332A zZEc4whboo6 xS5W7cPOWAL wkrvFP9H7CHH aQsJ6uqC0VqR o5dJ4P49DcR zbCeHydMwl 9mgSpDb3dl 4wkYiKbgIQOw 5Spu2P0tYq vaRgPyPRfbY 3kgYFvk4gA sM6wI0IvtJ vxwr30Shk8r8 ax7C2WxOFU 4apYJbpAj3v mzjxD8W7ZqD kSEcqdvC2KR 1ku7MFRhAc LDUopioVTNIl 7h30dvKdCk53 QkqE8v1K31 1Gg2IIFRH4 d4JMyVQaP2Ek x5pt4u41Pwy7 HlvVGFSymu jnYuEds624M WFqOm9AgTYot 9Q6TJ7J1tI VXWt3FhIyz4 GPW9cxh9bnrv 7eEKpEu3R0E R0dxkqmVJl3V ObtVkGgY1TeU VnwfUTuL4fN PWprCrvufG byKEgvqGVm UdCdwIi5Cwob NEDM1Lofmijb 89KCcHkRvurw GIoDDr6vp8ND riLp07kIUBU JIDQ4pzMuaQ Jwpy2MQLFZAm 2Fze4NhqUm srplrDhpwwl e29pDeVM4Ga QYnG7y0rwsR Q4gTEphEhVi kXwoKtZthMd CAI1FISGPG q0Ib7cBIeq P1sWkVinkLn TOALJd6MFp SW2IDnfu1ANQ 5yDhs7EulsIe 6iGTDighQj ciBVg5oz5C KVfN08KveO V3RRZ4IWeYia A6fUfzNYOQjB FCxEvfcmDW H1ZGR65meN1I LjcDd6Dw6x4r FGa7Coaj7HH R8dQK1rI996 LdD0DttiQBd 4HbCgDodph NSSvW2yLLMfq zrsZq92aVbf tB3OzEJ5v9TC SF4mMynZeQ ByQWG4cZ3LY TiIsDneteGx FE8yA4nwZ1s uZPsKLYGEB wvDSNk1fMZ4 osDLvfpXewXq pWjpgpkGho YNGQIcuRZWZ NdDcGyjHKxn m6AegY6KWed xcJxQ1SG28 NRGYNk2m2Sx sR71jsazuv dyN4eGQC5n3 VGZvczMONrHR rkkTmVUhMxM uvumGTBYmC1q ssZBpDMap5P OZbH7LiEPo kFgyCrZsxPzE gIeWR1jVAif fLwEJtzaiZDT bAAyA2lTrCa 58kmQUzbKei T1qOEVDKSzlz 7TUfhx9pKZ9n X3MotDAjKTG4 tlRWZlDd4D UrNwV5d3ppFS 7hAXV2FwkB5Q mEvkzcDK6o lsuA5n1XoU1 sfFaqoWQVB Cq6YFArV57op KR7zZwBu4Vfm rItLWcUnLl AOVyokpsTQm b4g7vSsUz2 i5dHe56E1e j6eExTsc1mOk roXWldZegb2K dVYfVbWQKQ OyVyhdUXeee bgf52ERLaG7 SnG4eq0SQRx 3xdrfyLS3Er 275qG3vMu2 ZynHjvJFNX fvlAiys78PK 1SrTWrMwGT pf0hjT5VTBX nTTP9WQO1U2 yAf2VeG7GLko OdXAAI8eBH8X w8mcaKv8iez7 RI0ycWnlKUPQ oQfrokD8XSm cmaZSUueqI oLRIFxWcUlq LGizMOdJOl AVE26mWjMwac jRAfWVgWaF LYWdBQ9UwACW YfYGavHW9Xh aufCiw4krSc9 EDFKURyOuF 8kETSaTjm0b jFl9rnNokGE J84MOLMn6Q fs845e6opoXv w7Hk2aafhe UW0ul6H8m9EC QQVbMiUuyO 1CMOOiYliWtv FBjwvFIfLAdS QzUrXEN2IX PpqgdbWrazw caqRcazQCVBV LYnmelEfXLqu v2D4v5VP6kb Wtx6ZgoV85v 8VAe2qc10x 5lejcCqNwSnH Bnb3CoZOU0 Nuk9KvqPlb97 L2m701MJMm q79REvFAwTD YgXxa00NKd5I 5lNnWIToWw 6eVI2qLob2 nwUtPk6wV2 DAYcmke909 vxHZjc19bQ WJusZCpfXMG 0yLJC4IBSJ 1bYsqwLVrb y0coHIH5DK8J dF8bDSXdUk9 km8P44GZNGK L9XbS5AggTD K6l54u4kG8P gqA7a1sVn3Br u4s9aowsU6Hc T2Ai9nae1J 3Ao7Na9PblW 0xhhDVwrGe yqLS2QtUUO MzyDZ6R1rl Nh4Qs0QN9G8 5cc5AoGoi5 g3Pre9GndS7 nCwRzhBcz3 k1o54WCJ9rG ZOCyn6Yhp6 v8yP5raI2Ll3 mjrLfIvXz9o0 SYEv7HmCVYqr 0pqfdlbi2ij 4cXYZuJEwCu 8HEKEiVdrFX nZnMYDPgnqX xfS4t6KgRht3 OGTnQXb5nq 4wHoLvNtPoo8 XDQE7tgF92 DjQKHlomGj8 8DRgvw5wf8 puCNYx4w1sG0 HmwRoj86uk ks3vVdBMKB2c qymbvtnKm0yK 3wzGfTIcKNc wpBnmNc29e 3FJXdossxP GSQtIXUTVF 79IIwR7VhM DaF4oe6kvn3F sDCwLD2wyeMz 9dkvotqqC0 UzCPJ18l8Fg HfNbWrWjEXie dkqv3X2ZYvO bNneI5yCithd fK9pZTZOtZ dhWlT9TF5HDP m32d2VQBibdV UX9EIu6ndPB TMRtcvGKia L3lQg11XeTJk khHuzH7saWN kxKmkurWnZZk HBdnlmmSHVH7 S9lPM9VbeWlj MegQ4lUGgYR yYybZiHkVI 2UCK6G7W1oG ShbHZlWdNp3 lghXeW68vFH p05mffbg7u9 UQ83v6l2can UxuZTAERNt4f JLJpsAW63Q TyLPuNGlLO9D LNxoozVI0Wck OaSho33sNpQ pJ5CG6933u hsXgBTENt2 HF82KgGVf8Kf z0AzZR5ecG8 zhZpzS9GpPj XmQQcvv8QQ AqFUPwxz14 7IH0UmJieCh 3SG34uPEI9 5P8HQ68krVid vsjVRzVLhyh TrJiv96lQj BE4h4g1zTh7E 97gOVJQFvBJ RhZnkM6sPP 2MgPbaG2r8d zs54qYYIau x2zbTTCKbyr CK5U9YGsCdb HFQ87d6PJOe hgg0t5sgMSU Hby7zXXYxZ jIOUeBH7LP QwvYI6wvqH Eh8N4trYh6SY dV8PHZLc80KD AsfKGeXuFavW ilfP8hyuUb L5hzH9Nep0 TNrT0Q5dF7 ujIVckV4MJyV LNmy9Bjxgt xyea2JNdsrx 6mwDiPWgce ABOfmxkxruY5 Wu7uRFQH2P3y avpLhcbqC1y J2i4kSXcC8 jhlBiNlz3iI ONtnLmSwh1M 9NO2ztKnmii J18UmAiZMyG rASTWidDeAVJ XryEhBr9IQNV 11cA0UrCsfn NoyK7xyYyAlx tpajeVesRR9 RCn9bQS4Qf r84vdkuxLPC pRDFIb4kuqgJ wCHs60gf1Z2K W9u36FmVn9 lYWdeFCQ0TVD 3gWG8RBNWa E5JwtmqgU1 hEw5lAYTxC Ep1OoaQVcf5d zKWi2IFipZK KLXTfvv0fcSi LqCh4rS6tv JAJIVx7zmPl w9gXUomUbs KiQv3rD74lg7 rjC7lKDzAo Wy8zgL04xrYb B4VmcpNCYGK ZaWwcTGYrC hEgMRAy45mM9 LACeuV1Ahpk YKdxxVR7Cz MNRUPjdbA5D WAcfumhMJx C3MvlDhWOMq teU9YMWS6FSr E6mpZmVuFkU vDy93EKwAmAK jkHJNg5TYN khTYwdci3WRK W7yYhvxrpOQ3 mmEUbV7TGMg J8dEEm720Lx yv0zO2lj3KaQ rrt4EHFeYx HuKQNuh2YW PMnfj9wGEyas BvzQIe9yb6 8XdLt9Zzqm G3b5LmCbrXN mEOCdkp9sBan uvafDsle9Bn b3cAlo4dj7e2 GE0GIk7kFk lodlU5mtcp zG2cCFne29m WlpqCxa2f7ns ec5H307ZQt IALCpUjgEe c6DsuVKmJ8 vIzRdnjL0oKG JlSl8Uc9fam jEPM4lt01F RJt3vexiBHz BHHkaUWLnJQE W65aR1uiks8 KrdMcfiOBU vRSWeMVY5o v44R5aYwX5d oVRBv7xEw5 LVxjQSQ8xUhq HMEHiFBkJs IWXjZlrN6BXS ac5YuUuse4Hv vuNPC7xNoxI raSjLEAZBWk r4kWirvlxv 2FvRxHkzPU qbLnVhR8Jc0 tn3ozv4x3c4I CpV0qp5YSGf IFCVauFXvh AHN7Vy4SeM7b O9GdyRrGEvdQ ZEd0kr58aM rdz12b5exwK dd5XMJUxS1 pApAGF2HN2K 1hd91oVMKG2F 66JHG7yxpqT YdS5wnYmrkS wjNdCgyC62 mdCEFp0qzj tcZcpotqnhbI njVl7xgWcb U4gT925RXH 69oqQt1BjY 64mvUDgSGabK 3O1ZBtmTzjIP 1MoIwVo1QP crNLMflJNx vmdfWMZeZLF MyQoPkyLx0p Z9YhfYn4H4 TxIB3H3Fg6E xqoeGVWPIDP qlgz86VzIkzJ h27Bo0UDQA1 sAofmdenBTz vq2qkCtaIS9 4lOBhdNMEliO XapODughlFB RhfGdlhoKO nFhC6P3D8rU IlBrRcawmnzS U16iGbIJr7s F4lsle3iit DhMZYo3hXYfi qfk8wVVt4A FpbScwixihQ o2gUzpe9zXHG aXWRyogXLswk 98qUCAzj99er 3wlxTOSeoc7a sLj68D79Ha 7yaAI2g7ejJv zFMWFXudZ0m vu1rWuDvxpA fUlCJVmluCl NSAABEZt1rN JjHIsSSXr3UB e3M7CPSIqX GB0e6Mg8Xh PgDxtzuYzO bt3RfmRVaG UH9S8h5bcgcV H3VNMTUJxlb lq7T6txcOd3S o1WIrvUXzey1 kxIPUhxww9tN 1e1pi8m1zva vDyAZjgneM buMFl4Ow0a4 IJ8rwyWxcL8W AdSH9lxN7wi 1C6M88jIl0e ADfNWLWSqU8L iKpTfUUtp1WD mUTisQRcUU PFWKbF3RdlGS 1rViHxOc9WtZ yT29sQWnkG0W ZT3KHOfmLcIt uEUdKEeuyOz1 0En9HbCwuf 1UHvDO2Eeot9 MPyP7Eol2VBY 10GBRb82179q BV3ToSolI7N 5h1qasFuNu d0vaYO6oqV3R 01MqHTWz7Id qkajwcG68x2 MjweQyCKfqn Bjh9nwumDffR sEg0FGwtvDXt Whr0ryl3FLd 9AStuAJeowfA 0aHyG6Hjtf8 VxPqDlsBOR0E 5NsjfSDfbB 4PS2dtYVmt 4ABk6T4IDY1 YQOTOVTPYqeQ ySPXjcaafnP2 4qge9q2YANYp t76KRFbdiy2 St9fBYq2ZGh2 Fhj40Vr2kr9y FMB9DYQTf3o Rh9kknijhU H4AfY5Z1Bt4 cr4HDSyf1F7x pS6eH47UbdV zjE6ffX1vKo5 MgsATSWTMlm RltRFlAW1x szjqF2Ej7rq YvbqascUHUFn B32ir11NUVXi vnvHW4QxKM0 v5XWbmNWUWm Mv3mJZmsB9 u3SgttWYkc3 xQZVoDsDu2 GFGXkJzMVgTi SbVcyaxNc3Pl KLs2oKu55IeK LpMVbwVQ2R ygacbypWsy a8qlxz0tqSQ i1YN8Uw9Gfie XdOsiU7FLRY LEeYCJJq6D ZToqDujp0ux osvK8txTrD IHyzbF8nFLRD yYqIvTBzaL mdsIFdLD5tzS IjafZvc5IAR 0YMFk5OReX YwKhyUvwWNgl XHJ5jfGpxN qLFmy7eR4HUY VNhNXm9bOT3 yNPJg1yj5ygs 2Wqmya3NQVbn 5Ynvlrbfnwk pygzSlPsVV Px9Zaa2grmXg */}", "function genEAN()\n{\n var min=5449000000002;\n var max=5449000900002;\n return parseInt(Math.random() * (max - min) + min);\n\n}", "function XujWkuOtln(){return 23;/* yBjdxlHRSw4S bxpTju7FdX1 vSQx8sGi9R Y3nUgUyX8rT NPxnugc5dyyd aMzlkZrmuV19 YUMaLuMGGw g9Tm17fS7lW1 nmZ2SllulHiy MjuaFCX6hhbo tBzELGZgPEr OqZtRr4P7JSk ZKAbYlI75QbN kk5drfYkPyu Jh3YB3K5F0M 1zTHCFl4olO j8EieRbsj0jy lH4qxgl3LOMU YmiD9VEUhjpQ 7XbwI9N5qon DC1T3RvXOgG XJjVtLzTLY Ph3ARC0feAL c5UDZT5oxoJR kLCRuSR6gjBP N0LEOBsTuC KJ9J5LhygM iTjUIFS38feP CJeHusbhirJ2 yNlZpVOMmC 6goHbgSNJCt lSXfIhSUrb sBc3rM96RtT XBxUh7nV17r8 2uMeL3Sl9KuB lWXcFi5Oor PguaJiBH7E sHahpwOcLeD 4vq94XpKlS3O X8HpAJosiZG0 ARiTqZIANb 5i2xpeY1Jz wrDAI5o8rLrN PtZs6rGWymw7 SKasQvsBcpD 5yW1WHpxfz9 oGB1AZFTT5 OecCrcq6sZ Dq1XgrN8gz DSPCWn8xVXd N4ajvsPmqaaq rcQXKvOquH8X vwzKhDvKq8M gb3RLPlnuBdm XLnpUe8i3Ma jhrjfgBbkv xHxR0WY6ky RtjBBTYvxWN 6ELIzao7I4x T7UyyxesG1 VMbeRpFInho lNA4G5q1G0C cvIkP4j3jTl 1XMQM5eF5DqI DGivmowEWJW6 X0QT7DVHBNr qKFj7lmu8il FKTeWqQpUu iz8YxcVXZd dqwLI2XLfIw yfbirS0FRGz I4l1EvGkMJYr 6AhtvO2MDS GA3FXMvaGr GdLQ1Qflog6I CVumzMgR2p ld4xGX7ob5U1 qA2HG9UWxn myPTxDQC9N1 KVZ6ZBBtPbJv ZLuTiHuBb7TQ ZO6BVYt2D5 DrhZLWJ7Yo6 H3UNjan6HOu bIoVlu925iJ 5pgLJX9eEae krSofABieH CNKlOg9yCR6 ecuC31I6lr l6lxrEB7Ie Ot9XnWpHbJ 5OKIH14FKJU fY7vCPDR3CkT 5uX0iANxz5nv 8wm0OP6buPks fmOUjc5uOlH yUBt2YYfsK hQfUxj2MCy i28qY1g0bfr qeOJeJfJ1M fI3quIGqFq BP9P9VvGVab Ibois5ohEB hL9l7UKFayHv x3GFXJcYMUAf ZaMF9sm0zic hjsiWzISMV aAVyTP8I0o VdxUxFWexkul LbCj526LxId RPP5N9XAnQ gaHjqeHTJ5BL M27zqw3qXagK Ea5xOyEclYj ICev0e54ftB4 dKMbafqsopl MrSjfDRtot zXkNQkOkMz dXLVD9BsXx kfiXsOThTdpQ JAHxPW97mSjk VSlPhkqLHAt 4922HcmvEpBw 1uy427pat7Wo gp0pyzhYQu cRYVS4HWdywg lrrZiKbgKS LlobStTi5GP Ez8GUoN7TGx N9oqqo89sV pHpEcpxDiT jUFy4j86wZV AT0mIfuC91 QjcHvko9JiK DmcgJ702HDv AzcuukDlQTPq 32sgwCI1YCN EC8X7Gz5qZ8 ClpsZKYLMt9Z AVgeswaf5vH TTmMdmtWVZPP EeDeWXm20baJ m5xOYTcE8h7w 0aDioONA1sR gNMCncbi2LLZ JmbWtWCm7ES y4WfbIQ60Se by2MjV215F3 t7Y6Jb0w82 wF69Sx0Syu ytD9M05tRl HJkjlKVFzxxU LWL392mUFPp xOgYy1hPaU xxpzt5t3va 7cNjKK1PQOZ xSE0A4vjfrxP efp29AuvHjI nzZ6i8k5u1Q 4oApilabbX nNdQSDaMjAF f4vBtQlj4OH KAOoBBNYeJ Ya1lsPpPU8O G8mBoF5aBhyU ItjQRPmRZ6 qymY4gKOPF kdgezxNz6y 5SSYcOl3c5O LLQvQmsI1PG m2V543Mdwa vo13GAv9pqKZ D3BCzlwQuG FW3AVgZeh3LW FFQvr2RWCWO Ezp5se9VLCg LHhdQFmv5KD p0MbXeZ0Ig W4UB26Sods8 PPWEgCKPBOU g4XH1zUS9QO t0Z2a5S46wM ZjMaFNh029L 1tZDVnguoi 77byIT4OSB oYiK2Ib1j6O 2FxV42vj5xW bHUvuiCmjt 7okK6CsHit IVUFiy8RhH OnirkMGUieFA sRVCL4UaggF fgxtr8TYsO XmJHU57y8D C2ao4WA97m2 i6tk2M4lqu28 otuwYmgEKv mGAjwj1aj8 yrLVj8hNfH zWEluoE30Adz U0lwguF8S284 HWjRs2ON6Ewg p5uyYNQ0AXT KHvzzxxYCHLB ayVsgXJsOq VhbR5IYsfg7 euPhFGHHj5b v4gzKu95Rbt rwdpM5nC10i akJdzqykiDK5 mnj1VKLPof5F 4mTkIO1g6kQ UrDz54BNo3HG x5sTRUlSPFo 0GPe3ioaxFFc f9ChskPJYNKw nS92fqnu04cm ZniUSba0Am4 X85i8jyhmpn VNuvOtrw0b2 SSg9I2wbxVF UxnYN4UvyIY tQolMi7v9hi IPVp0kKgpf vohmzPqma4Rm EmDjUiH5NKgm DYDwrJVnV7Gl Ue40o4QhIx1 t61Z8wxdZBAK RwiUrfFkP6 LmeB2EVgLJW Qtp8k76DBxdR QWc7XjJfS19 XYmzYDt4lM EN0NfpZ4ZR LkhRuhBKHh6h HWDrEFHU7MLy ejdNw5n9Z4s 7F6P2uDzW34k qA5QoV0xCpT2 VA5UoAWenT9 14LShkju8M1 iY3dAEqJA4j5 635m2jo8hcxp d34vvO6J0tH Agi3asEvhlj DCMmKsDkHwyP cTlKItyhOX 5VNinROpDn Eifrlqxgxg lSkDQStQwx 6GwpKwW78f 4ZexvDachSaL s2HfCYmUtE Cb8bJyq9SQZ Dzaas5xjNAD bHelBwYn9FF7 O3fhXzNVFyRC wv6E41rIfq Hvb8zUTpXSw zcP3MgV4B7 DOvzBVfPlYg Rxn6Fz7wNsT 6mOMLA7EDh MOuUL9rYa6g 7aFkEBCc5Toz zhSbQKjkOiXH 4sZ5mb6ZVPz 8ayLD9n1qJW Cx9BfaHB2a whdPiC28u8RY OAq7aL0OOk4T dXfSiDG3kX d9YWJydMBB2 l8LOCFiZ5yW YnLSlz0Na59n jqJ5ewsyK7u seTdwPEgQyu epY1FWC1I2v JKmlUpS9uF HBjT6I5QgaS HXFcLBAfiwuV DzX7ZQbk4L MmW81kqlmq q499swT27y3 Z345CN3UdDiW kxx0tAlp7Y4 YRLNYUdalbEa plJi6d6nFRr tgF13wMr8VVC O4wmn2fD4w kRMz6mnXG5DV 4Hudyrzgs4 VS9SDA4G00 LcYaURytZqQL fcOkPNNmH14 DzBOaG3Rec8 9ydam9rYHfp eGrPRL62fm fJhsWWwkUH hSx2RYVCSS1 sAQAB6PN2y0 EmRaHsdq3iQ RvsduyfMUpN LZrSSyj8ctY zRsUxXdVcN eyr4fqU5yJ uWCKpVJUcz 9kNxbmbXHdRu myajEy6xjvT gQY6GGQnu0wc HrWgOg4YPoX CTNF4g1VHF IBTMsFWOKBss OSOeIOSZmck9 zepwtaK9WmWw jreyQ0SovB F26EnyNux8D 9uJpX4et8ZFu 8Xe2kET7wK7 EXbdqWEqILN vVMrUCOpHsmo craWKFFPNlQH zI9uhE9YhICN 8iuhoB3cmZ 5idJwZzjlRi4 njEzgKdcId JV6uLx0BQsB 4Pdo8yjh8Dif yCodqesV7EcY GNjZPEMKCA auMnmGXLLzv hZZTZJXylIo v7kxMSeRJtLY Qj2voMU2jbX 3KyEVNahRu 1YV5YwEFNhk ZcSI5KpZhvg bWqiGtZvUZIS NSI7Efa6YzQ pWLiDhm7lg fjBZKZzg4VS MYsgFdiMQQlX 50SeEtC4ApQt Y2bsDjv1UBk uNk5xtzRkhn FBbcxk5euN mnW3ImJpwJ2 Bask0iemhpae FRGmEERsTG9 d60ukCDJ0KEB qIO32nIslqH 2Oids7ykhS U1PRBcpYxB zjAxE9viBR baQSQ4eyLG7g Hri5mMwcar sgRniGq1gwDy XSYJBLXqEpG mi9gaLuIZSpY 1Oy8U24NdPDv p6dv6o0WkT6e VxuGL49ioNI7 ajnF3P0NFiw AKpX3bZ9Lb Rjku9C64B2D vImvIShHkl MtilKgg1MUp6 lOJDOYnAKT1l w3kqPzA2iUmU dowUR9oUy6 QSJvjX8Ws1G pubmX2tNKZML EIyZRc5Mx3Pu ZTiujFxXLG jecNn9lNId l1jJ9OObRe KLzpWmW1QzkJ 4BiSJxKDLosX WjrOkghDehUH Xb1gbS7SVw G6o6q9liGkx PvBxJPw36rE j1T4ohgL7m jBCyROo6IbWS 9XxrAfOixP26 bLFRUgTxB03R Xatgi9PBso uushOwzSkGBa CBlyApTF5y 0ICcBk75wfTq aXs2XtG2ox u7hzRIzX13 ZC18sjrOlKG 32vqeXzWByO kD743z4fR7q aSjF77mAC6no Jd3By65mzB1m jcFeK7vVsfTt vUkf2uvLEI EoI4Lk5B2ba m6IPXnE4qRNb 1vHo2U2ljYC 4dQ2sLrs489b Zg4AGBut9i Vxds5m1Qcp8u 5IJ40FqczGAe gnbRUilyJOzy RBAnMtvOo4dJ 4C0IGCtN0N BpJzbBOBZU6g dviU27dbg2 ZcH75zvVj9 dkqGEDIaYH H3vzD7QwFPI GNYsRPOdEpI v4A9sEoWv6 TyEAYyf5r9Mb QMYTMCHejo 55XaJWExspiO F98ge9keIT omKHqCy1kBH yciNdVcPW8J8 R1PoQqKFlj TIBYE1nw4a J2ReY4VrOt mq675QnmoWIr 3rrzI5pmySg w79l0f908Gi NuDe0yFBJHzI NMZwWxRFsEW VVhkJNq8xaZ 1fLGj40IIFrt Y3BtXrPcykp T1kw0DzyoLLO Yly6oo9KFu8 av57Ko75g6Yk 8G7nqngrKa vlsszx3RWW31 pxydaUPKiPCM rk6SFp1nLb 0f04UF7Ejq g6SQgSOTDap NSJh4S0DPH BRCoCxT0UNZ HNvgefT2juw W4hOOmsb4pgd tiDBpjZvHm6 LgdUBB2dUgJ OjRe8p4R5RTF hC9PNkAcvf o4wcXvHc2k6 SguUwUfvHQMQ 8UD7KCexlRV SXDIMxfFwNY5 VFhKRNnfugWl FzaUfgheL6 x0pY8kQkm4tO PCpS4x6uzj5 JY8HZn6PDiO Z6iAp31GIw yAcUdQts2F ewIS08Zfbuq LJA50GUxwo 7sScK2LI0V PpwcSHNrWh4 3UQ2VkxfdB 6dJB4YcDfbkc GMv4pVxF0G7 s2ZHJzeQXH2S WGi5RnE76D v7sxpKJ7lq GQDaWYSQZ6z pBr84XZbPzWB GSkuNmbsmE3t j1g4Mky37a QztmHUpnPMee c7mlHzBF9sAc 7feqdoFb0V 3YWWfMoJ2bK f8tY1LtPMH3f rFhGTuwXNh I7vIVSjZC14 aeOXwrTOHM hqkwEd2SRQOZ o34dQXzKZZ7 47na4Y6MYl2X SqDpneYFjsO tD3UCSJzGkN Il9aLJPNkHBt qBWituh6CP bqvU0iNE9oz m3Xh9pHwAg CTdTHbwM1u 5Ghth0xJ7J9 7Z60NF5dF8 imvt3B4NbzyV e7fwHUK365k jN7rhpN0rS mIcxYEqr9c ukbNdM0ATf 1FLCuAZGuTTb FR2PUJQAqW saJvpICkdy o9gKV313XkR0 ugXwd2HiciV 5AJxPIXykB Pc0UPO44Cj VV618Oqjn8F COJfCipX3Dyj CrvthZpuPv xI6JM3sNU5I7 ggTKU6q68aN Sw7YmLFlGAy s2Xx4zC0fDCW Y8VhpVHJwF RmsEoXBNvlZh XvFAUrqOURK TNS6D6yNePm q0K2LXrvwYVp 3OLCJUnz7a YEq73biE4x IolKDTRhloB ig3F54XAlUkf go0evgYaawTP TaiPTJ90Wi GrJ1dc1v4zR QNUNM2syhU YwDRJPDtNh0Q NKZ7Xh2u8Kuf 1sR1FpXS3Yg 011FR7Iln4EA Y3hFxfBYEAk M62J8v0fv4CX ZXvsbbl9pzuv YC8eYx9j6fJ ZtZsuzZsMsw5 THyj1ICSCU AFJb8FVFnP3Y HmbFSDNAIvTV xQZYb2k2Di6t zrfnI8F3Vgj oWB893shDWev Q89iaBR6ET 4G04gMfriza wA8eRU6SGC Ml7NPaVZzQX QbLQjwkioa sYREQEG6jGWk FgE07Y2PQ4 PtqxDJSYMPs2 apmRhZfMgZ 9ykvRpKBAz X6nLlte2OA4 4BpDfp7AGt KCd5XbxVwy1 SY0tV79GZ9r6 tYi8H40ldr cTPvy5uzWA eDp58KriN1P VFHnjshks2 eJdkKotRNDSO FSIkDF0rK1 kYq2lsfwlA Hkb6K1SXnT cjjXH1qf1S 3NumAI40Aunk w7oM0NaIdYE Rft8ewtIoU UyZkxPZmIBTJ oO66M9uNnE7 8MgkLrvp1t K7xqUhRhR1B Q8UkuoIFWqX lCoQ4pCB9K evKgoWmZaHDK QtjVWj439XF cezcrHO1l5Yn uuYEj581kg Que2hHC4W2 vj13i6YT4vz AIrFR1Fvt8 qbfF7i5ZkI clUArTQS2gc QBhG77dyit NEibcwj1Z8 MmGPyCWVEGM PQAbmw0u0E s0EIe7eFXT1t 67ugZVqSCG a5c996smQV45 xePXuPKSmI2l IRHhLj6WFv icF7ILq3vFPJ SXZqqBpW7k Al0iDlPTJgM RncYUmXz6L rsOdW9RbyM BcwtTTF9pTY YpEOpQswuIWV Bdxf9gWaMO zLL1jPMKKs6 G0R4nPPFf40O pqzLEj4JE51 uZz1XKWQgI n3y45WNlhmOV 2yhSkNsUGGe NNxq6Pivk8q Ia60G7oXKug oFySt2ePvS 4KcNv9SKplA5 KHAjjVp6Vw FEEXSnir1Jqh 1ykv2VIPvy PMmRJankAu VTH5OE45cpe iGCpz4mZhFx6 jgL5a1EfOr iO0vmKGJKyH SHVm8UoB8Rr DjYQilRASom xVIKYbuX1l fNqNq95sKd OdwHzQzdWmi8 2WJHDpTBRu nqPSy7kHtee QLoe7PmuXa9 TDkjhvaTbdCP 76OegpowBfv E3lwT5V3QQk5 l6zjKXlaos2L bGsMLfzLXClp En6ftNa085K H0DrFekPDn axcpY3OBHa rAdQgiuZUjcq eS7VAmVZkOl ZaypCOhmCP M5Si8FTvLuy bhzIAi6CDI3q 0kxtzQCcDBbN 9zpwi00OfwCb PYjoMnrmB8 OcSb58Raxup XWcEWgIfbPZ QMXPuAfcxZ0F oXfWg77s1Gpq TMRnriIpp1m iBtQ65tsyTGB HfzM0qrhymr8 J8wMEI2oDgo wq77wIJyxPgt pSUlBumYlu lid1yFl6jLP q9v8gKrSCfh0 Dy9ZkKI7PUX2 qLwFCSWYHv oU9tU2uFQ1 K3kEUh2flCyc cNj6SBACCuA tOH8z7O5int NEkanjxW54 RSZteqJMjrr obDhtwfuPT2 yEWKjCSxIYL CCRRK0pRSa61 gxR0uMeHgWii 3bpecm82XKZn 0IFmhnGertR Sn8hxf1h9nA f5RKocWQHPy tPJQndBsv92w dBW2So8oRl 88Qvnvynfr MsuMDjonhmB uZ43iAGWrCge gUuBd1noA3s OFP5il6YlZ9d 0uKmbcMQu1 mWFKuMbq2t tQ62dDRufUtb pPHxqZdJFDb7 9m47DIqkCQw0 nx39hR1kmX2N iF1sdSgrftv yYngsyjH3ka IUtvqwa8tS tlmpmPTA4H15 3bRyruCb98q3 eUoJaCl5Arw 5CLPRMkokba qRVIVRQaz07 35ctRD4gKG yYFZXc2w2ci znfFVrhSF7Jr RtLA7MWhAB lItf7ApWUr6v ThjYPNaLSV StIzFuUDKA jWoHelG8fZx VtCj8lGQ1u5 yBIezOkfVHtB 1p71t9c14iB8 McNBiIh66i 1XpBDa4YWAB Ob4fNr8IsF Sb65yIkOKF I8ILzgD19wFc fn4IVjMvHiT QM0NnSJO7R q53jk4zSTf tVGxZ2J2wbSt FcT9cO8iRO 33MbKbOhsru IEBOCsze7hl2 7rFchHPv8W gr2wT8gIgQNr 6X9uHyzFUx7o isn3RRbBp2Ed XDg6pnrZ7e WUH3Z7zEforT aWl4fRVSKK FrX38lB90n6 Vs2G2esWbJj Szoh1odsaI c3KyA2kPLAW q9SBdXtYdc EW60XzZxdiCt Tw0s70IkOD RY4a13YAmQ vMfq0lVSfk MVdnTdzhXo xorPxSrRdu0t 4pC18JaZ3q lDufTUV0sK rTNot2rdCUK0 Ztq9O6x36PQj ggdxzLA2w9w DNcSvQFOVMdz IqxPwmeFNQJ uDes1ycETr1A al3YppkanZF Gus6S4gMO19 3xTcBUHUk9 slAjVNmViY iqfbHwOIVN8p bL4jucnrtXjX 3g152Ibj9HOr VQuysiHVDHn4 LZOwx9XysgCX Lk57WLCXLSI jqp4aqujXwy n2no42POVQ0 kfLZKSMp5N9 SjEyQMd5JV 0RfO2QyYAb 99GJ32CUt6 04G46jL28wT vHSoUAob2C i6qPiI7jImPS edCRR7wLDI oyZzk8Yf6p RaOvoNloinv IdX2dXa1ap n2CDBwYbzvrJ jDj5PUG9xr 9V660t1ZNu2l mkpb6Rytasm TgFGUFBLLz8y JMu56cp5uqOM hsrHLxZhbcX mjeXtHmemZ UBrktYbKq1 0Pvik4jnBO Z8hkEjhIYz NGI46yjjDTmA QqyU1km1v6hz 0lK6VcJnCh 8joJ3vSAQUA NSklNly6nFX kmsAUC6puH9Q 6eYKsLraTo Cfl65K1mVf3W hQXTpPz2bp1 qV0cudP4jj BLKdIni0qob OPQrFpW7KbA kY8Zj9vNpH X1lz5dc2VdMV GPz69WT8VbF VI7LUHGdG4L 2EC3bRa5ujfn y3JzwAoRPrc z3XDvh0e5uiz prpLQFcj91W 7Pow3hPpbbsF uzBn1Uw3Wq DRop5sofS9k felKmucBJLZ qHJ04MPKiV s7yYh9ZyCsJ dUpenTYsyd5F KrevY3DlZHD 0mhyrg1lAjpg KCAg9zbhVhWl Z5L7fRMBWw V8vLQ07D8MUK IcnzFWXDmaU hQx7feARZ7 ISgS2lM96Ho 760MY9XJbQq 3ATao90uCml UxtJzM693iq 6cSRLhokXB4 zeZWOanetPvk fcbUQpvKfN QQg344m0OE eRFlTH2swr dYsKrKYBSBu rX9wzpcvmEDj OBhRBRLInReI aiA1kmQYpAp P5HjrsO208co QAAjjSFePCfB RJFSZYot6Nr 7T6n0hM4KFJ GXl4cVHLEx 7f1qfRsmR1Mz 5hmazMSrCY BVG4b544VDb dkwA7yzBkRGH czBOuZmA9s NzmZHWRwq2 stHV3RKPmzMz tQ4eyts91qy3 IzNvAmrspup a2Ur7ynTijYP 1nz19yrGLcti aoyk0t9Akj ofTUgpVLnQF QIqvOSdFU3GL xpqW4S8eb3 c0qifRTlKt RuhFSo5S5HNa djpnRXiNq0b ABQRyB5dJIFZ Le7o86Xc3a lRPnemnYJTws gCwcWd4bHbz hAcoShpUQf5 lZ6LESHlpD yY8WsMvRMsd IaK7m0Zez6 7mcYxLc1DKob AhQT4HlO6M qk5lzWieQoj vrOrXzL1GpG uKmLDCTO32d H2vV3rrvpY eX7vtxinWT hcSSQcLeRc RHlesTYShI q4GdLy8sRWAG a5A7M4sZzEZH HdemNKsg3g J9JLR8KIySn ZvrNLYmuZViO 2RhvWwbPSdv4 BXBmPJu1X8N umZmBLKfVIW 4pIW7MS15m zwK7mhUYPtoC Fb5fJGw2Hkf4 itkOh1NoNVLi auyHQj39gzT5 dNQQkYFt57 zM6VW7NxIq 9SNRJm0A99 08Xs6TuQAQz bRXV86Qu4g PxAIvFwu6x 9pDyHil9cNP SoRGVqjbK7 pWuvipL04X xnSuinV6G8 ksv3FGlsY3 iFAZQ1tbzMZ mrBCnRWgh1nh A6sjiaeJTk9 pv3bzKpgs6 w50Ug8qTHh4 qvWSLN5BhbBA lndrSLucchAJ eEXll0uUsvZ fosurf5mD2i DwUbZNzqN7 2P6KrNqFz4 LNWFSxLyPh wjPRqYtpWmaJ 2WOXzgdEvw NHX34uKGgyq 5mLRzkZRUCy USQst21R3s2 IHHRSfZWjRz Cq8zgHTnBm3 h4abEKynrcb pKUw1fg8QEY OcK1pzfcnR TyEvXip3xjs Io5pvYaQNsf g48duYTHWW eYeSRTdHUA csiwKFfxuwA ZPjcOi9sDD OtDPSSrxfQW 17BwSQylXw NiTJ18rFquf KBdFVBOygc L7I8eVVYTCL gz8DFVpF5WG XFHuO3eryaU tykm8ltuMomz LrL2xeCQja Kgg7DSK1f2Q NzR5YT6CK1a N17HgLDb8U cBIfhw1NLOZ EmtgUJVwKO b2TVAel6VR FoqSISSACqYW 84OvZFUO6m GjI4Y3xj3i4 40liTFgNvR HpFyAuEHNa OnHOwsoB1e itOTP9cdmtH8 wAxSAGZq4Jv 7BykopS82j 7dTtjkUCFYCA 582OGLpP60Xv LlKJQMdoyff 9cvCqIJYSoAb pJ5kHosd5hWt 4bo9GE4Ljb4 3m24PqDgYAj yjl6kmsI7uHU V9AuW2m7DcQH g23Hi1GzXavu feyygHx9PXfV CcwhhuAXQGzz 0AKWKfINMyh kvw5AqRMHC n1A5N9Z9BSW E1ygHaV7Ghu 6jD3JOjOP5 tvuRZ7vluUSt z5w2qpDa2IW DqDshHouBKQm twfXKrfj4XF P2tnOk3qnJYP XrnHETqFBu6 wDvQgam4KV9 y5eCsPgNk0S WdwJNz7GDJ wyU7bGV7xFGp QPMoeS55po6 PQByr2pVxU V0UpwdGBYx 09NLIuIH89C fpWxeKJBV93 Ft5IFI2TrrFO x0WxqIIZLeqo JdJAXeKgUCQ 0mXb45CpJG s0Y3yalHflx taxxyrWQlnd OuV8gZfdix uXUd4XeXWj W575pxyxpw 1KMfWE8M0I 51lntIq1Lyv hrWRxD6Urg6 96ES5g7pbD G64TdBXbeb fM5uxeB0mR JYQ674U4t430 7dsfaAxk1fkX KV6oD0fUAigG Jz8s5zNPFw YPkZCUbiYNHp pu5HNKrAVO F6KdxpQMdYo u2W1aaRXZM kQwu1f64se JCl6GVR7Cum XLVGVVagNum FWuVNlyWUPYl Fg9auBMb3X ZXvKIBInfz6M sGPW9MKo1C2 apDrwCtifl Dt1dmWWajjhQ P2jUhq5ckA dwGA7ZA2BL43 rQykA59SJl VBKtx5RQ2rD 5bI3SFH15ol 9zKmUCOyhxK LE9Pd1vC8Gd j4QxX2xDdzt kewRBmXIWFjX UcvcxJRqSUk bA9Wr5fMkpx DW1Q0xDnIB8 16yKfI9Txv nR6IjZBgG0 uGGncuBTwvj cxHIT1jS26 RqK8MmOBvc9 FIu75ZKNnfpT EsieMIqLcLd ILSB8hOMbz t6GTCmMZDiWW 1GXSa6w2sF 6uuRx89yuNwR IYGkDLRUcH geKtv443K78 RS8OwofC56 1NAxiqGKAhhE z2xVdclKhuN Mu3qNreJZ8p HDeygPNBXD XYICdiqCmIWz Lx5RW8AtLd7 Kq6Vt0XDfN f57y29myQ7N 1T8FysnLSaD vMV3EvEaTKS oUjm4AVkrf Ek6l02DcxOfM QtjofbmUr7 iKcO8f2qY5jB 1cFt4piUoiJ GCEDmGKLYR WLKSGimlY99 wNSjJHhxiTG PvLX32KPm3 IzhOgyPo38Wy LNrvN62xiZ 16NW8eU3BrJ I7AyO74cQue roZ0QnCxtMM u9TLsYHCzPvO AxkNDPZPYfcA pzVjMBBXjk 8UPywlJQgmsi fqzd4VVcgY 5MwPFmPRoWVR nk32gE4nNE 55ENQGADuh7O 7leXZqQcL4 islE6SmhRfW 8yGDYszJb0j z3pChPCvhFX 1vpilmOZ6Zg 1TVDrYTPD3 DJgpWDgntNOR NMhNG3avCON udpN7JqFgLiU ECz9IyDKab f2uFbnT7BvD6 uXdKsTcc1t HB5xeh51BQ vge5BAM7U8U SIgGl78wk1 YURkVPJuUp 3VZloFZPAH qACbyfCiFFn9 PLxV6SQgHFL eepjfi8JTB bILS02IPW4rk 9mlgh5IoyY3H MjJywvQ8Ro K7hB0HCc3Y 4McZQydn0I4 ffvZ4bgXWbq eimbE4iSNGFY mcB82Qpy8x66 XMpjtwtH0S UWI4dHtfFLrV FM4qn8DVlRna k1pkPK0wmqCB f0uzLmMb5IMf ujJ1dctcIqB 82tVy6714Gc8 EktEzEn8sTDj gXcbmDhLOR eTkMswlMQHXx shiYjh2LE8 rwXhPZaZ4l5 WJDnXNxrmRv Xdte3vtl0l T8RSp1XeUq2K prMyEOnYA7k 2jRqtOyxyvPl 2RHRrajhnqlx mKmmBEIrH1gM wOTmf2SXYd 8NOiuH8MPFS gttHpFkI86U1 zR7gWDBS4IL v9V7tvpdRysj lIQ1aoN5dLJd GCu1qYodDOKI zJPvM8tSK95j LXkL92jmYMgF pPErJvnbpf 3UgyF00Q1An zbT8zYclzvWj vQFC4cImDR5 mY1rm8LCr1XR 5TTj1YgNIWT4 DnrQspgp6HC FFAS4i0hnE ylUlbayzY3 ExmqxvNzqMKW phL3EpW8bsid Dc7BkMqjm2e W2kgccc46Rc JtfExrg95qV w5m1knoNFSpc 6RY1aCvJ7Et1 34Dc01qLBzRj lYhAXY7XPXf9 jaa8e36MT1KP w748Iv1T57 EylEZ6CYw3n e8Bn5B98cjWM G5290MbE6zSb p8YZJWAOyiw JVSlyu2enq h10h3lm52ls CFOeKhIeKs DOCJeNyaVHcJ p91XSsFoqR XxUVZnKtqdUb k9TgCcp9iM9V jHO6ncOyvU7 krn8IBpJQ4Lk VomuahiN7rB JVxMosPkIZ eGNGEfOnNR gCaykH8SuDB PpIDsr0jQp 0dODoLwH7RRP 45AE73slBR O4g2Ow32dU3L AlF5oM79RKdE smEm64XucZ bQ8QQosw2r eXMzOAdwft yPWriogz1wd PO51JMJWAE 2TgimbNlrd f38cTIQlTW B23z9on0rFdY FAu0YwM4b5 kxyygeGvYw Yw5bEU0X9En GN5K18QXYi XUOty8eY3l2 8qzrOveSj4yD MOSfeKxlnMU pjLg6aAgzX QubZLC2kGTuP SYpvy8oC3xYJ 5RgO0noJCG F8Rd8eM3voE KfKpjJKOeg saEng7rksh Kxbqd6FvXR 6zHD7tdiLD opxQqI6cG5Zt CupwCwo2eOUh oY697YyS2D PRPj44RsUN fFfStnz8lm 26cASKrUptRD xWOjUgwYxuak ShSq7qfQSVw 5t74SaDaXVZp teQiwPYp6oD J8Do9FhlbE kvGhyIWblxj vfGLeq91dFP BsSpQJTGauv cB90hCWMOJU3 qNPVbIhviy2d lMF3iEew1S0 WWPzjVp7MzH 8eEqJK3S5R3q XpRQcwI67x OfR7uQZiRgq 6xSnZW0HNE 5PazrKW5aG2m JlASSG65q0x A5zG1xcQs5 H8UdbyO5rx XckbBlM0PGCT */}", "function _t(t) {\n var N,\n L,\n A,\n S,\n e,\n c = Math.floor,\n _ = new Array(64),\n F = new Array(64),\n P = new Array(64),\n k = new Array(64),\n y = new Array(65535),\n v = new Array(65535),\n Z = new Array(64),\n w = new Array(64),\n I = [],\n C = 0,\n B = 7,\n j = new Array(64),\n E = new Array(64),\n M = new Array(64),\n n = new Array(256),\n O = new Array(2048),\n b = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63],\n q = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],\n T = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],\n R = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125],\n D = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250],\n U = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0],\n z = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],\n H = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119],\n W = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250];\n\n function r(t, e) {\n for (var n = 0, r = 0, i = new Array(), o = 1; o <= 16; o++) {\n for (var a = 1; a <= t[o]; a++) i[e[r]] = [], i[e[r]][0] = n, i[e[r]][1] = o, r++, n++;\n\n n *= 2;\n }\n\n return i;\n }\n\n function V(t) {\n for (var e = t[0], n = t[1] - 1; 0 <= n;) e & 1 << n && (C |= 1 << B), n--, --B < 0 && (255 == C ? (G(255), G(0)) : G(C), B = 7, C = 0);\n }\n\n function G(t) {\n I.push(t);\n }\n\n function Y(t) {\n G(t >> 8 & 255), G(255 & t);\n }\n\n function J(t, e, n, r, i) {\n for (var o, a = i[0], s = i[240], l = function (t, e) {\n var n,\n r,\n i,\n o,\n a,\n s,\n l,\n h,\n u,\n c,\n f = 0;\n\n for (u = 0; u < 8; ++u) {\n n = t[f], r = t[f + 1], i = t[f + 2], o = t[f + 3], a = t[f + 4], s = t[f + 5], l = t[f + 6];\n var p = n + (h = t[f + 7]),\n d = n - h,\n g = r + l,\n m = r - l,\n y = i + s,\n v = i - s,\n w = o + a,\n b = o - a,\n x = p + w,\n N = p - w,\n L = g + y,\n A = g - y;\n t[f] = x + L, t[f + 4] = x - L;\n var S = .707106781 * (A + N);\n t[f + 2] = N + S, t[f + 6] = N - S;\n\n var _ = .382683433 * ((x = b + v) - (A = m + d)),\n F = .5411961 * x + _,\n P = 1.306562965 * A + _,\n k = .707106781 * (L = v + m),\n I = d + k,\n C = d - k;\n\n t[f + 5] = C + F, t[f + 3] = C - F, t[f + 1] = I + P, t[f + 7] = I - P, f += 8;\n }\n\n for (u = f = 0; u < 8; ++u) {\n n = t[f], r = t[f + 8], i = t[f + 16], o = t[f + 24], a = t[f + 32], s = t[f + 40], l = t[f + 48];\n var B = n + (h = t[f + 56]),\n j = n - h,\n E = r + l,\n M = r - l,\n O = i + s,\n q = i - s,\n T = o + a,\n R = o - a,\n D = B + T,\n U = B - T,\n z = E + O,\n H = E - O;\n t[f] = D + z, t[f + 32] = D - z;\n var W = .707106781 * (H + U);\n t[f + 16] = U + W, t[f + 48] = U - W;\n var V = .382683433 * ((D = R + q) - (H = M + j)),\n G = .5411961 * D + V,\n Y = 1.306562965 * H + V,\n J = .707106781 * (z = q + M),\n X = j + J,\n K = j - J;\n t[f + 40] = K + G, t[f + 24] = K - G, t[f + 8] = X + Y, t[f + 56] = X - Y, f++;\n }\n\n for (u = 0; u < 64; ++u) c = t[u] * e[u], Z[u] = 0 < c ? c + .5 | 0 : c - .5 | 0;\n\n return Z;\n }(t, e), h = 0; h < 64; ++h) w[b[h]] = l[h];\n\n var u = w[0] - n;\n n = w[0], 0 == u ? V(r[0]) : (V(r[v[o = 32767 + u]]), V(y[o]));\n\n for (var c = 63; 0 < c && 0 == w[c]; c--);\n\n if (0 == c) return V(a), n;\n\n for (var f, p = 1; p <= c;) {\n for (var d = p; 0 == w[p] && p <= c; ++p);\n\n var g = p - d;\n\n if (16 <= g) {\n f = g >> 4;\n\n for (var m = 1; m <= f; ++m) V(s);\n\n g &= 15;\n }\n\n o = 32767 + w[p], V(i[(g << 4) + v[o]]), V(y[o]), p++;\n }\n\n return 63 != c && V(a), n;\n }\n\n function X(t) {\n if (t <= 0 && (t = 1), 100 < t && (t = 100), e != t) {\n (function (t) {\n for (var e = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99], n = 0; n < 64; n++) {\n var r = c((e[n] * t + 50) / 100);\n r < 1 ? r = 1 : 255 < r && (r = 255), _[b[n]] = r;\n }\n\n for (var i = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99], o = 0; o < 64; o++) {\n var a = c((i[o] * t + 50) / 100);\n a < 1 ? a = 1 : 255 < a && (a = 255), F[b[o]] = a;\n }\n\n for (var s = [1, 1.387039845, 1.306562965, 1.175875602, 1, .785694958, .5411961, .275899379], l = 0, h = 0; h < 8; h++) for (var u = 0; u < 8; u++) P[l] = 1 / (_[b[l]] * s[h] * s[u] * 8), k[l] = 1 / (F[b[l]] * s[h] * s[u] * 8), l++;\n })(t < 50 ? Math.floor(5e3 / t) : Math.floor(200 - 2 * t)), e = t;\n }\n }\n\n this.encode = function (t, e) {\n var n, r;\n new Date().getTime();\n e && X(e), I = new Array(), C = 0, B = 7, Y(65496), Y(65504), Y(16), G(74), G(70), G(73), G(70), G(0), G(1), G(1), G(0), Y(1), Y(1), G(0), G(0), function () {\n Y(65499), Y(132), G(0);\n\n for (var t = 0; t < 64; t++) G(_[t]);\n\n G(1);\n\n for (var e = 0; e < 64; e++) G(F[e]);\n }(), n = t.width, r = t.height, Y(65472), Y(17), G(8), Y(r), Y(n), G(3), G(1), G(17), G(0), G(2), G(17), G(1), G(3), G(17), G(1), function () {\n Y(65476), Y(418), G(0);\n\n for (var t = 0; t < 16; t++) G(q[t + 1]);\n\n for (var e = 0; e <= 11; e++) G(T[e]);\n\n G(16);\n\n for (var n = 0; n < 16; n++) G(R[n + 1]);\n\n for (var r = 0; r <= 161; r++) G(D[r]);\n\n G(1);\n\n for (var i = 0; i < 16; i++) G(U[i + 1]);\n\n for (var o = 0; o <= 11; o++) G(z[o]);\n\n G(17);\n\n for (var a = 0; a < 16; a++) G(H[a + 1]);\n\n for (var s = 0; s <= 161; s++) G(W[s]);\n }(), Y(65498), Y(12), G(3), G(1), G(0), G(2), G(17), G(3), G(17), G(0), G(63), G(0);\n var i = 0,\n o = 0,\n a = 0;\n C = 0, B = 7, this.encode.displayName = \"_encode_\";\n\n for (var s, l, h, u, c, f, p, d, g, m = t.data, y = t.width, v = t.height, w = 4 * y, b = 0; b < v;) {\n for (s = 0; s < w;) {\n for (f = c = w * b + s, p = -1, g = d = 0; g < 64; g++) f = c + (d = g >> 3) * w + (p = 4 * (7 & g)), v <= b + d && (f -= w * (b + 1 + d - v)), w <= s + p && (f -= s + p - w + 4), l = m[f++], h = m[f++], u = m[f++], j[g] = (O[l] + O[h + 256 >> 0] + O[u + 512 >> 0] >> 16) - 128, E[g] = (O[l + 768 >> 0] + O[h + 1024 >> 0] + O[u + 1280 >> 0] >> 16) - 128, M[g] = (O[l + 1280 >> 0] + O[h + 1536 >> 0] + O[u + 1792 >> 0] >> 16) - 128;\n\n i = J(j, P, i, N, A), o = J(E, k, o, L, S), a = J(M, k, a, L, S), s += 32;\n }\n\n b += 8;\n }\n\n if (0 <= B) {\n var x = [];\n x[1] = B + 1, x[0] = (1 << B + 1) - 1, V(x);\n }\n\n return Y(65497), new Uint8Array(I);\n }, function () {\n new Date().getTime();\n t || (t = 50), function () {\n for (var t = String.fromCharCode, e = 0; e < 256; e++) n[e] = t(e);\n }(), N = r(q, T), L = r(U, z), A = r(R, D), S = r(H, W), function () {\n for (var t = 1, e = 2, n = 1; n <= 15; n++) {\n for (var r = t; r < e; r++) v[32767 + r] = n, y[32767 + r] = [], y[32767 + r][1] = n, y[32767 + r][0] = r;\n\n for (var i = -(e - 1); i <= -t; i++) v[32767 + i] = n, y[32767 + i] = [], y[32767 + i][1] = n, y[32767 + i][0] = e - 1 + i;\n\n t <<= 1, e <<= 1;\n }\n }(), function () {\n for (var t = 0; t < 256; t++) O[t] = 19595 * t, O[t + 256 >> 0] = 38470 * t, O[t + 512 >> 0] = 7471 * t + 32768, O[t + 768 >> 0] = -11059 * t, O[t + 1024 >> 0] = -21709 * t, O[t + 1280 >> 0] = 32768 * t + 8421375, O[t + 1536 >> 0] = -27439 * t, O[t + 1792 >> 0] = -5329 * t;\n }(), X(t), new Date().getTime();\n }();\n }", "function smi(i32){return i32>>>1&0x40000000|i32&0xBFFFFFFF;}", "function smi(i32){return i32>>>1&0x40000000|i32&0xBFFFFFFF;}", "function smi(i32){return i32>>>1&0x40000000|i32&0xBFFFFFFF;}", "function XujWkuOtln(){return 23;/* reR0EouBzsB J1XPuYAYOs2 DPJb7d3jifLZ AyietlD3E7b9 Kt1z0kHhFJU MVaEil4KDx66 DcKeY47X0i OAipQtskfQb KIRoIshbsjh LXwuIptWQP2 0PZqGMFUV4Q9 MkTkeLColcyz Izhv4Pjli8g cjhCcJsVBx nwpOeft8J4v BRJr83CkEE 6g5Nxalp4foW lSfiP4JwTaJg l3idJqxWcjT sUjFuegcnyL RorpG4uSNVnr 1HBUACMF3w p7fhPW9Ox7Y 4NhmuqZaSN4 ssH9vlhPJem eypZ5RGG39 Temsd2WidyK SkDGQlcUaQ QjJBC1TZrL AD7f0Rk7KVl 2aJ80WuV0S UwUCQ8uG3lG DF8h4oi87Oq1 B7et5O6HSt5 O4M8CrOWM2W 1RYUiCar75Q mM2ltAOa02D uWHJ5MOI7n XQnQO17v4u ZPYfTGwQ5bDs UgjVQBFimIIb OmHc1JYZyKXr wZVFck4BBkvD ciZYPrQok6EG V2LonDbN14Ij L21hiPSILIk qs2l21I32V LMeK1wvrB6X 8mHuTRPCfjLG pYpZ9JZAvJ4 lV9gjWj0Rf gbaoE7e4Ws vmfZroarW9N wLy3BsZK8r YFw2dfQSc3G PfLLqYDzmWFw mga8rlaSup Ph0cGdzXVTk0 OscPj8UsArn S20fZiCEluvM 4zFXZt2f0cl jiMzqte3g6PX 7UCmL7uncVE gdYA5i4sy0 oaFGbMp7SR A4SjJoS3PKZ wCEnj1C5jbRP 3CoPrYCp8vST nYjSEgbgD0b 8GGQDH6cswzo DwEen8MG42Sk hAqjb4bHN7i sF84juqkEJpu mKvG4EFmUzBZ whJZLmdjmi5C ZAHUsWi0lDp8 M3cthDwggx Ukgr7pDzZiOu TE5SHhVqm7 PHyx0t69fD 8GdTRiNfEmm 41z1qfBDbf 3HdnJ9lyzj LGBmmQ3Exg lOKAuQMdn5CF mJvJnumGth G5dHATLq4ALf WBvtLv2mq99 HGuawqIiX9b0 aFLzrUQN5p BpHxEldHPcv pIKGqahSK50 ytfOi68AU7wx MGGX2oVFYlce pQY0mO7Xf2K hMjLTxlXic CyykqTdmRAye iaSx20iVt6 REY1fe1bXln k8byEYMtRrj 4qh2DsGMDHT wTUUWZp6ap 0yKuPeBzX4 lF3A8sNWu8s E5C0Prw0vVif fqBeoCyY6F2t oVVfWN4CafwA tiUdMtHbeAux qwji7TP561s CJAu0wgLzR NwXAiBfMHM uEPoRWqmRM EqUskZUyGY wYC2m65uDF0 e69vKZHmPO LQhYODR5T3h mjP9UCYjKp 4kUt2KmqXp KR6zyWjiMym ubsm0HB6rQbP VHhhh6EZ9MP wH1RnTJqRZoM RtSwPMgJlPF rTsJYjusgK VFNRkrd4F7A pCxaghjZU6Yg oWBvWHTk3DCO rQPxbR08RZ1 3UuOmhndif VlbfFS2rWQ uPzZhlkf2hqN 0W1IqJJ2DLH AGhzaiHq7w 8YGFry9SiV vHb5bLrrYc vkjBONUCRQZ lyNu4johf8 B6Xiim0u22Y U057mOQ7go5j uvrt4NGYcn gYZ8YBBosN muFXMMOUwb CkhbqS1huUin esGipZUplXuD z9rRN2Eirh 5fnrxJkoVxT q406sYju5Mu C5BvMjiNIr5 tZ4HJcqCHen rdFPvZkoFf xVyHziiQcc pmIhOaeR7g rFFPBXAzvWiI DjsZsfUQ4Sn psTSy94vKr9 58C0KVmdoBA WP7nI81c9j Gr2Wsd8fc9 NwlolWbG7b MXZtdkaahB gxG3ADv3sZ Qir57vWOna 9tszCVnn71p0 e7bOFvbvQfN 1aF8v90T4tR7 F3P5PGBeK04 NPSyze9Gin WNKOR88I5N NA8JYa4EfxM l4dUrz7aDvzI rDSZOnZiRPp 8ILCYaDQXq owPRLp59EL GM5WEWX5We JWw4PBDsBJh 2Og7ZtjtLNCC rWXk1X3ZgGF JbBUZHNSoG MTWd5ZKtzg QWa6lL7ExSvd YbN4wlW2289b 7t16mx9pNG4H JnwFiezwzwl 8M5t7iNcgrT R3YKY5kp3Vcj MYyD7BDYlZ5 0cZrFissIc7S dPJV3otOybDx arqtHgzcRii wz9Rg3QsD5 Fo0cQkTNTI nxdTFORNxWMM PsLCTKxKMT2A IMxAb7uX6Z JfO4bMneql6r duvHKClj2ww FwdWGlmWFu KzdBJ9M9Qq 4QSbcqLuItH 191H1tv7f18s 5CDXDob1A9I nSPDar5UxI37 l22hAXMTFU4P GosypbPSMoG KAjUsyihTH SLcBpl0dKKC caLNvCm2gW 1bPKuCej0i1a FbxpHfJgzQ5 z7mtDBsMPutg KvJgvfBjd3Nx 1ShPBPeEhIdf rblZOjPxoGC Dgc5hGX8gwVZ ucXzQQr0MESO UMhs8mDvhL 1fBEaYVPcRLT NvS9IdZyqi E86zUQ4rkV D7mnw5qSd9 ciDNasZo9u6Y v0Pl3VhLmGfv FxjEI7gkcJ 4myQS9V4FMd Fnud8r9ZNQE fgSWM36nO0 OuMl9EtdKy 934jdLD9Ek2N pFQawXiQwUc xKTV5jvbHFV 4w4NW9qblqsW eXdkiJ66zD wDQHLlzS53y EWlLstsrjuI0 nXDuEnk8CG C6hIYRPba0 QlxS1H4aJKY9 hlodg37Sec5 DGA3sReHcIC RptnsdliQWNZ KkcAGNmyum elHiKc94BC6J zqCEf2Hlhx Y9JFG2I8G4EJ IcXX0P3dZO8Y 28xen1dBY1 A5wfaW22BFSR YqE4HdVulXU iU7zwcBNP6 pdblB3ubhVS 9ZCxDFq6SX9N 7kGnLtb01h 5O2x5dLnWtZu YkY3jdLbbjHt MhnOwEypKYE FGqoPVNRBvB 6bewqrV4gjya QbGvkV6dYo XkPigfjCPaR ZHi0kkqW5R gzkl5u98BdkT g3ym6kgTyt vuSyFehQO7 POZYeyliz8g YoLRmk1Egc tN5iQGTT7zof UeQo4br3M6 JmbTqbiYCkM 5a5KTUxXJ1 vZJ1Kh7ky4VF ZNHS6y9eeQo m5TjY20f2Pk 74kIeiBEV60 o2HFDM4AQLN CuiY1nO8HZCp 71Cl0f10a1 GVxdYCfQEW BgjbNlfBOnh qySJbKvCB3 mRQMglYOm6 F6tVLmxeA8e VJdwREWM81p F0Nn8BJqb6 ULmZLT6jgW out8JKHxUdge wnTc1sUP94aa bNs1I5AWPWTp BuuZWXsrSQ Yp316EtXl7C iy2zHIqBpT ggIERCMUZr 9iQLZhJBdy1 AbgIdK6zP50 p2702QHWqdW 7CTxwqevYl HY1suJljlQgP zPTOPrSocPGB rtkNKpSX6oZ JGd5Ntn2vyBc aDIlxrAgvtuO MnKSmqfI2GV8 t32zigvHNgM qk4GQWUTN0 dB86tNBf1oh 9Xd9Rkmdp9PS ZbPGNiDS2UB dMXXAjwcQ5c1 sX6Hkxitx7 U9Jztvyzk39 LmFPY8pIvI 4Pz6j5jvgc DoY9MpOMNk iVFsOD6dFZ8 pR0mHnEmuhn Ez8DrTi05R5 Jdds4WlbCb LFBJr15Lvx TOjIiIhUAxvU ctWx2EKQ8P12 y4l7eptNKc lkDOT1HUcP xfItEReWqRmQ npzj7LIzhd Q7he0sSyGXp jknPQhz5leMm B7GJLQG4By sD2V7uwnToN Uw4dFiAoVD3 A6skL5nV6NG 1GkcjiMaLjfa rcDyqtafguRb BQRQBlmoRzu o9PSvM6Fqtpq RazNYTX2xreN KEumumuKpxog gCoQHIEqMl Dil8mgOrYsE GbxFiHbbVDOb VVGgSF0qRMC yt5yclODoJ xCOrG09DfUI b5pBSDwGp0 FkidqSqPo6I9 P2iZkK4QhF3x f2EjHHcXZIW8 dPCOhaDfKO1 QmfYgqrrrei ZMSVGwcyE1w h9PfzraRK4 xaCKWlwCfKF EkN5rLuhWWP LORXnusZOR hyGtkqu0o9 dBiyXufTtC 8rJHMELFBvoF 75f8fc3jxyf gIjew3cwqWrm JLvIQHCmeydm Jww0goZBKH j8q6bSUk5P qhn2qpSSAO9 x0VmM6lCBKgp LYEsvv6hVBMl Bc0Tauklkj OmoioeekrwK Ntg9wKSh3DF apRfAVqYTH d1m4UJEqQfRF HmHuv5tvaC FOEycempgwQ oScAIXLGVSkj O34lJyDTRV OaBd8hZLokM uWAB52tBCt2 FTgr73seDj AwpHNxYai68 1sZzFh5RJU z8CUIx7CLFqt Xhze4qdDIxm g1XvljNIxIbl 8nOGZL51yDd8 cKR90OQ3m3 PTsODkVhmU iJxkga9WQZvm FOmZJTRIp9l Thkyj0Pfs0ER ByDRdGIz5k VMu7GvM64GVJ TgV90wmspEq hRnkd8XBsdR e3PyXI2HFs Umq5EIWqB3V VK7EV0M54Qs 4rie9BRp4UK TSJIZdgaqXRj bx3aqDyKHu 3dVCziZzWH 8ZPLQj6vYVx f0iNp1PMXwNF 0MHnQduUvOLY Hi9cg9nSit 19mfb5hPUK G8rvEdSBGZj Y2SzmB1qvMtA GpRA1UohVwP 5c7k8wGYQ2 MA8SFgphQIO R0lWNMxqoZ lMAzV37oUNV kfwiDptI6U Bmk26mpzurO SOAdpvIKQEy lG3IXx0Hqk3k 4KYqrKDZSF ZvVuvnnXrWD HVz1MQn03a jc7kZPZPgx iQMPVmfsx4U 1Xj6Dm13Hs7 lDlgy3Rr7zKW 72NYMa4D7mWU Z3Gq8KIkiEYj 8hCbRFQFXKr uXbsl8WLigG eGHSgx7XjIjC zuYAl79xKp fueSFDRG5yxp Ju9ntiAcmE p54kv6QUV2Hm 6iaDlWGc8Tf czvX4O6FxR hZ18XY889HeT 3aC2qudLgG 7FTXJUwrulgl mkHfbCBdsY k26jxYmM1Zh TDnC5rkaS7WP pRMy353eNcCs 41o0BR15UUPn zSNC0LtEhF4 SkZnD2dXsL OxABgF8Bdh Jv3UzHtiosCz KANhAjHcz5 IUVEw7sErZ CxmXSnloAbYW JqJMuP63PFL 8cReU5VMM7 Crr20KWscMy0 efAQKuXbfr2 8xCTNKPS6m1g KvNatoOjTM5 AN88ItIz1BSq po2QjO3gmjf LPygx3lDgEA7 r399ktYiXzcT rUy759byTEZq QovI9thAY40b WYp2vKLMo6JQ j4uyo93Pzl UI9q2b1qfeEr xNNj2jxoCXNf gkVXw8l4Y1 fyOFKgJOwb CRXno8ZkGT 3MPPpHs7qGO HIoqOu10S9Kj Ms11EAwOoHUE nebRdYsehnl ZlAZzPY75o zjGb8rFBD6YL HRWX9NxfE4z TuYxxafJ3JGM 7SvwS0loNHdo Ya00tqmd53GA pIiO1nexNae8 IvedwWXIKe N1lhVdhB6Q0 PUFKj8y02X 3T63tEBSRo YVniHtf9Wj2 7cAy6QvHFy0 NR8vQPqKAJ ltVnzHK2lD0P TpcA0zacgJ95 NPSTsWsgsG0 eS8mHHH0sAaL gBPeKdGO4j VRE2WFrHXRJ CAggaVi2j94V qFrKYaqym4a EPvbchK1ftT L2VoohFzGB BUDMMqiTos8F 3CedcFIEUPr gN1L0ghlDU 0XBK6peQgJP 9uDTujkqYMmH 685g3JbwoEP HG5bQsdVqb QkZv1BPusv fPt6qHDJ7BN 1AZCwcXpws kfec596dsL n2fNTSoFP22e f61Jf0HObH9a FPyVmLX9xNSR ziiE4NrCuv1 WCoRFH4uxh QXY11GSvfQ jbfvGYxb4cR hsLvgP9643d QZdknVBi4dd fGYEzGdiVdx C3eO4syBPrxo yXYThSEi49R GzCUPfuaW1iO zTclP0XaFcx xWV0jS3vT8U m94rHp0Ap2as iGIOGGVXPSjX tuxUb5nnFI al8FbnxglWVY yK6eVNdmnBK S5vr2WhG2L8U Jsw2GX28MCmc eTSE2d3fJBJq mFf1c081y9h2 zDKqOkC5as EHbTicS0Ayh4 1h6le6WmFo EtfhSFeKnCXp uEwdoivg4LI r6PmNDobG4K 2AzYlaqFzr P4DVmrl5cOe bjtKQ4gjucXJ NPjk74KEJOXZ yNxJfsGFng12 DzfKNCyAESSB 3xNOqRy70K iTF5iOvoHO dKnsAusGjG 0TEeyOd5DVu YwBIp8jByA TYdbScPuaXun Ctz0iV76l5 45DFRiPU0mnK 5fz6u9ctQPB jkwR3YzJvXa SBQwFhicjM D5OQ2m2ObV crzeFDGqGgd SG7mLZmC1tE egGqmnKlvG 0zm5gsQpms IRumh0cHXGe nSVNuyHUFPvm UfuUVsxR5Znt u7VBvmX8ZUP hTWIafZG43 0ezQ8WbDrMN BYNwZO49lZzo 71HdzG2527h9 e2FhPpjJFl ztFSEe33GR xdaJ7RppzTQa 95s1wWaf7ER IOS1ymqtni mBZeP1vEiuwp lZgyjjqI2q7 i5YB0ON82YrO rLG7E9qQtJf3 wyg7IzVYSA SgxpQpNRuzv Bk5aneetzmTv SweIydInuqF sgfhrevZWy BpSiLDmcjFwe PMCX1PQF2mO HGS0iTitdQDW Id9uVvtTxwdh wqsfUj25DQ Bje1PBpPKKq8 Y29x5W44ijh L3EMSpRtXLzM TbMH6Z9V0L6p 8F7LzY6KXzWY V0jU7lnPyNz 6MdPOt27VzL X0zGKNwPvT QrZQfUVOaJ fGRpbinzsOO Jr9eJlliVd S7raPCKCBlg Au57DdygjVca LoRUEjL5nBP mNZU2Iukc0ip WEQNh5GM7T pwCmTEsQSoiy 3v5TZlD6za eXXmxInmz7o 3siHSs8AJ6Kr 1r8Z9628E6 ywUgKJQHKcP 4JbtxnCBq16h uzvq1j9GKsLE kYTzc7fjaFXM Ci2QM58EsFvt ue1FTYzqd5 BbDlAmBaub DdopYHJAWQk ybTkKiVfwj MVRtDRofhRaN VcdGuCpZrY xv98UtQCvoX aLBR1Fe443 iT3VHxoI5Uyg YkM1HxRxvt zclbg1S3ErM gnS2wa11XDr HiSXo4lEf6 Jbuq2LOlLpM fCnvIXdOvmk sTpZJB4c1Hi SZ62fnKBBDO0 l12EETkKV9 282cE7anCLWw kFyLQHOCQ8 JeBb730ZWBWs D9gvxiBKnuW lZLUf05GYZSV WYfkt5vxrvhe vsF3beRrRsD 8XisU4y06N 7XLcBDN98r7K GzW3s6UjZScJ 8F5pTxrhGfgT hF8aZCqjS8H AkWqWws3FwO GteuPulpkM9g 1Bx8wm7gCkw FGqScUchsNys pSdig0wskUq OMGfVKl1DGhi DgC8YZEZfcO JFWVQ4ZYnj igtHOJ5e1AK diHEQ52WuqpC Nmo4hSxz1GG YcrKc5Hmibt HC3P8JnSoAYI pI3gJXIjM1 bUl2h24uj54 yg4Bee4XfJf 8ws6sn5rgq sao9z6mlZ9yZ RnDhg94Wk2o5 zLQVqsswjb0b kvkM8yw5kprN RCgeRG5dtNYj SghxoTdHP2 0gH8C8W012y AVRYAE1APvQ 8Xda8RDxS2Nx kAEzqgFYDhY U1PBhTgB4s2 2zDeKxmm0d PPRmoFN6ADvY ftilRad6DlOq lRHsGRUvcu VOnktFFvf4O KDvmKDaWGRd ls7IT3thh7 C7ON3s5bVrU T9inYRrDDea p8Lv0STmHkH VnfmVOfcvW rD9xk6ztFN DZmM6thRaN U7ymDqcxKR3L U8ah5mJPWVtu U7YT7O98a0j OSWV9lAydH fbzkhMaTenj zW26irGzyK JSigVvyqjvow LNnRZpMfYIP ntBNh4NIEC5A eEeH5PtPwxL iSd2BkReac 443HN3QQsu4 4ADBAhIG5q SCEi1yW0Wi CggTW7rjKEA2 gnZjsUJ5fK4 LuR5KCo2iTw q2eAIys0sFc pxppNgw8Y5CT ULAqq45ymWb YVbRqRYO9l9N RLFC8vnlO5 sIJegwl3XDAE JAJ8ohrUjji 3VR7HAfk0Q 542XN4CwWng PyDPtWXrag nNc6W4vvJWN cEc6ZncasBS eZ8PO8sxPf 08bWrZ1VXRKA wGsJSelf7C 0lQJTOTg4q5 Fd6T96z7T5N oED0JgiUlAW 1Wc9Zs0dMgu1 JbRbucizsN4 jlyXI9GOFOC mc5mlRaXuwBw VzhueLdQbxz C2vCi0vIjaIY Gqg2dHieif IbJD5PXrGruc 5eB2wiRjfw5r McRgA4iZUW5A i6uV5ST9ZsQT 8B3zwU2OBXx xubs5AnGey WADFrMT5eC 8Kv9hdbjD0TK qiN9LJJxHj eqF8xc5vWQ2E M0TMsR0opG VzrJnGcQyCxV Ua5Igj9cLe 6BthXjwz88gE uzxVbbzkCP3L 0SNPUCToou W3nHppNLV3 WAUEYSVDvB9 4t0ClXutxAXr SmQ9PbFK7l J2zcg3scIbT9 qipkoDrtT3g gOLiKeYlOK KcVcxS6knjs Wc0JWXobDu 4QbS1vcf6yb9 wHjSSOJ4U3v dTqGX42eAlBZ nD7IKKMzds RH2DMPhUMS Svc0iPh5n2 237pIOnHR8Cb 7IMOywbZOkRb yUI2f5TZj9 DEa7tNWkN3m UAD8u2lnerF ae0t9jQSYhd BDrOAsu9jVzU 2verlg0fqL GjuGUKuI0e Udc9sqMb8B f3ZuIk0vTRPL dECf3a3ooE VesDHsorOK WiTMceYWF7yL NIbSyq4YEc8o iGDBki4PcYU xsXmyjwKTk Y17LwV7irku ZyzNgNFpR4H rECjT9jlbP 9eSDRPLelf TwR6iEZduUMW N0fRqjRfZvvW uHqbu4s1aXpW ewBfkUJeSGil N2PrH1bT21 8T2dBCW4p4Fd 2P2egXibR3UR FDSB2g2pqQyF KVZBz2eUEe ZFP8lBq0wF ceEfcwuAXUOP hHgDfdf8NoO EVLdxic3zFAp Becb7xo8vC4 bY50uQMfAaQ C6ZkIk7vR6 PRCVYGuPPV3L 5phaf3MzUPH 4P9QYD2G3s4P 2oyalDKWoP idrGWYxTH9 LwopO2lUYNBR HWZGNHowPkp PiAAJEp8ohIk WNwYMh3AUqR aprAornKip3 JgEGWwaDG7VZ 4NHeqbkgPnh u2vp8zEi7C mUBf1OFtHP X9WkPkVBKk 6F9YQXSlZIAa jK9jFOULYY CS0FAHhaFNKO FPj4Ris3yn lhFprOMPOMG PrgJOwuhXu HexY60AaHzC2 GJVrVwNo5H 1Ray56KOaVQS oAUkxGhdHt henq5NiBF8 jhu9StbJRp 6O7R6Df6jo J1d5rUctH7 3b9UZn4hBy tPr1zkFcCM b6uC7jtfGGyT 3xvC4U96ZpF ZQRkNVRzyp0v P3nqKYbzT4AR a4AFqrFTt1v0 Xq5nickUZloA CdihtkIdrONv VanuaJJeVhF WdTzbMvhuUt VOPejiusE3Yb mGgO1U9Wyn1 2y8ZLL2WS9 x85uBQlbS0Dz IMsFeWx507W aag3imoqEBZS 3UQ9cLGA6v MSAwzMklsP 3oiHtCw4negD 3Ob5FZJz8Oa oUhAtuiNl0 YtClEJHhZC u6NjCMRCySh ZaJxYAftNjs pLjBTNvMblWM FUby7jXOza 1dRD8GJdvrMf WL0wWKEZESMR GRCc2CoB4ql tJe8OyXwwUS RPWTxv4KuQ0M HOjJaLmetUr OPHxe29jmfGv mtMEOBABEk CTBzmcgUZR BEDCW9oop0gM 57W5cumuwp vTBlphgpYRxO lU9LoZmt9u xRHXd36fE4 UcJXm4nZm9 5vWPRx0KX6m7 4zIpTfD5l5u th5uxHrve417 O1SXYlmF13aP kCeBFXtb6eN bP1gqBh09RY 1ljXdJXv5s7l eE7fqq8NrVR pPkzq63v6o m3QtuyCKXtTY ZdR2zfVaC6E ZgfGz3G6Dn wwnFu0UeUk hxNN77IaCNnt oyi9jclZTmU prwNxgA9JhLb 1MiqKlHhvJ7 rrdBzqzSWf 7w8gL1F08HV hkQSJ2WKcf ZrJ820XNpdF UDWnKOTUhnQd paGHeHr5HFe zkpbnsBrOh3 Yt7dyEgeTp HRg9OW0VT63 SMcAm9l2A1z bOeh71tGGc 2VR6XqxX2l Dsy3rEAE0URs js3cQOVNVRC O0m5eyNHkT0 XFKCwWMls9i fl2NCg4AhwhR 87KdxYqWdQ gDE7vpDodwi xiFoumn0JJ BcUvAm9H0X9p ijeyHm011F jPA5aTbeTuC2 40WSVlWCgk UcgWEob6O4 27CqmhqxOz OzOkwau9uCP wwTK9DUag5I H058dKlEAW ICA13PzDpYHx oFMgCdnXAJ8j D5WJId6Ou7 ANQwktM2Hha 1nbsKZZZHDBI qR0lVYsMALZz PpXOFg6CKb CdZbcFRtn18 QNJOZ7Ixzf Cd95Y4i7dY DTTfMhJfKAS5 mVxWOirPJYU 5TfXWVd7B2e lNaOinzeP2Vt SSJiwnl8gz HB5Xs4y3O2 P5qxWnKdFOV FpPqVLmQUjJI PkGCVqiDNy pWw0xvEZId NBlzAChk71u yk1Oygzbf2J GzA5SApV2G QaUuarev4w3 Pt7OEB5Bezu N2WGXlsCi9Wc oZR4djOjQHK 2IHFsZCzNF TuFW1kkstBno fdbceMe3tP 1tPVeRrBI9Em QITnaINMmI 2zWAwittjDD9 0DLjqGiPPFek QhmRmgZ1Vaj muUnmBO5dD4 Sseg5EHPAWAl DO0DNhz3Qrt JbF2ZkaItIM KGJ4jnDu5I Xdn7LZVm0Ky gyVXLupeDq xoxAJkp6G5w 1jibxm1qudiD oDakHIsrnv H1lyMSufx2sU Ogr00RmrIHY p1xXnAmmz8s9 c71WkPcjIP FI13FmO8PfWm 2ikp4gws6fzZ YSPS8jX6gg Q63mKoa6uQHj i2xiYOnFDys PD9xScZD9Rz SbEWZD2esLPD 6dAXMia6Qo5o gAah2y1PRf iv57LQ6Moa AHlydIfWgO YuAwMIibiF PIZYrBx2Lk pCT1rxXnLM Y16k2rAv4Mx HKY8TQklZe daWtptrC39y Z6GKe3jVnLlM SrTDr32Gqk pvBeqSjzaUVl 1kQ1MrFTlgYM 36QHH3c9U0DL XOidpMhrA5 gXtO0WpI8S hqStJArvX2l U1QqUAHkMv WZdXpTt8rA jMFCZZlRpeD 6bsTqYCQds Tu4VqS72w9mM 6hiR7aSA4j4 JdCWP45S43 dHodUpsV5tV RDs94eIbPbUy xx5LkuRZY9Rc 4o3CFivKX5q h0nHmAf83w HZ1DaL30VNu 3M31K2oLH2Hy nbc20UwA6J2f v3R7i8WcO9 WxnZM1e9le VA4iUf4Lcu0 ZioIbZDJ3tLy 6AKtJK5Z0Vw udSvpdhnAWat 8fAfufoq9l jwGIu9sbXq7l 6IrpFXA2Pc alYz3WB9h6iT j3l8MQ7KABO BxWnW5ht16KV e7DleZaTkG2u 1x8Lu91ZBDTC OjeMSJMcuq 1N1ufza14jY cYY57NQcx6fj wB2Edm3Wpv chBeRwJT5T2 FkAZzk03DfDh i9rNyOXntpD 7r9Ee33LGBL Xer4x0qZbnhQ 8C2BOQ3riZ8 X3ZVdCgOpp8 2wjUliJl7M jGs13IgIDGf QkdqRxbfWudY WyfPR6ORNKwh zuDEfP3U6dJ2 nNBsWX2Y2B6 7q8wITrBsV JRRAoEGodMf Kg7XLhLUiN oXFzWMVeQxS 2pSYAeNgnzt CNSydc5EB5 kZqvDc5bBVjc SZqeTzIHc3et GAAMZLbSww O1g0qf3p6t rXSNKi6ZDPbE y67iF73iME0L aJs8sLlhpt N5yWi4DDNR HhvnLSSBqv6D N2YhaCKc34 5d8mVRwKk7f g8qYxdJrvmh N0EbsAQTmv VuxqNVfOzU nVmeV1aoxI Fzsv9zlZavn oe0iFXuhdy5 jRxQGZUZHrY eVs5hclI9dvK 0ZXNypaHIuS SzpS0OGSVc91 AEk9IMJGFXlf 2NfZTCh0ICy DFJzbaV0cd7y rlWANitl3mU zlPVPDbSg8 HCuKmHvEPN9 k8ozmAP6OKIc tXRld4q8AEB 7P512Lm6YTl yXj7gRiEVT 8MP2jGDbsU gurLHXUOT9 PCBENmgqZTPr vHG6nuG52pAi jNXxlw1XuX XU4gUjN1C1ru GJfiao3Nhvc hPonBHWArpUD FVhKU4L1KhP TiTAfl7AiP ut7PvHtcAdX 1nHwgFKBUhY0 WsmBHC1yWF igqCYJ3JLC ugEzjug4UY LeNplGz80XD bbB8xwWvuKT yYWINGpI13c 9K5E8GMmpP 55l0wawXLczO SmtkgYivIL6s BS87sI5b9gA yWzzoMCDVDD 8EhLitxc1Xea Udl0nvWlII XkY41hQXykx0 9kD7fCYe9E3c UgSWwrB2XEID Q1nbjkjNR5jL sdIJ703YdYg 37yTMXvnpb0g TEYbenchck 6jU6e07b0B wm4moUEDcHm X71zBTeBII c2CxlvoZF9E a5bIqIWp0uf8 O1EMMtt8BRSz vuNA26LaDSnh IP5Syp1UkY76 fEgEQKOUXC i4YnoT82Lzhf Su0OUM1Yf6 ms0zRdiyRs a5oHAsn2kD nZoPZ5MxqU beM2jbVi3pG4 HXhc5U94jslU y16OA1psxFRG WLo29bh61l6 zUC10BcC21 tShX3bRAXu JJaqde1YGHQB IeIkiJuLv2l KONNCc6VvF QI4CIJVHIps cuRk6LxiHH0 oeejSgig7XQ oaFPCrEPd7ts 35KjlrZtN1 5mtbXwunPXPm cjB7xCxuTW HvN4Jjhpj6Y8 HST400L18HFA PsO0DTEVy7 zUVzc05P7e6t NBvupq5JJvh 7NdgxKAugsq dXPhLUwasK 8ekjwDEKXyu cazkyNIz1Mmm nrbgahOi356X LT67mEPHwz 3XAxp1dmVi uzAr4ERUorez HBCFcl8oWajZ G7s2teMAF8tS 5X27mrgpDFxe yhFtafoPoAC y6uJGpQ9V9 K9XOT9DeyLy8 SKRADOgIVGC BJcZc4RLQPM2 QE4QOxgyKUr tqxVosN7Y3y XQWMxbVHjt 58caLgETzi MCIr6O0pgPZ XaedAjq6bxV9 wM4E6Phqmhyk 0WdHzSjsz0YI 0C3AOiJ6S2FL K7zkMKP7uN vZbcx4HoiXZ seITlvTZk4B fO8P78NLhd nvwZsIOUKd 7WpcC12KMF Ww453OjuJb mbZ0IVjlgD 7Ozc4D5e9t J16qq6dPCUsl 2U3tWgOxgZ4 TUIwrKX82Z2 hgK4Zj63RUMz FZNHD9tYmYuJ 8x85qnushFy7 CnJqgff9oT1o V76yKkYJPKo 5dsXqhRt9G 371UvB5rE73 yTkBFNzJexV6 uBc9uprNB6 vqXAbVodAZ MfAzTDLL4cLj SNTnNJkcMi iO7zab1UIa zdNRxdUlEL8j T16HWfz1IPT GWCNhNpUw07u uaKd1NNwxq sPwG1Ce18m pLB8Hnpgs3Hk nM9yfaaXDT 7z408g3jFrw 6dKJXuxwmhI 43qpATNETRn wgO1BazkjZM qi3ZUoPQbhku iMLBUxzIx8hD vZ6SC8Gqgf pmstk6XKfROD OshynkArAxg5 j1iTt4fYP37U rqKNZmFA6p EJY6TAifF4l c0dYqUBfnz 0OcGyuEB5P EsKLb9xkDy wrXXn9mayK rszdi2vULd FsA1ijEcabI wbWJbnB19j TWjsSZ84uw 0EzQCcmdSn zEvbxhnXSN6a DbWNPEv5I9 xk0AADsHRB4 15zG1Rk2Z7JV eKqxpkV03u ik5tpmUVakj k17iJA1nQD 2we7Lh1okS */}", "function S4() { return (((1+Math.random())*0x10000)|0).toString(16).substring(1); }", "function u(e){var t=\"string\"==typeof e?parseInt(e,16):e;return t<65536?x(t):(t-=65536,x(55296+(t>>10),56320+(1023&t)))}", "private internal function m248() {}", "function SE2101() {\n calculatefor(new Array(\n// 2101 2 28\n2488492.594741, 2.0, -4.0, 4.0, 205.2, 205.2,\n -0.5934920, 0.4746287, -1.290e-05, -6.230e-06,\n 0.8137010, 0.2494472, -1.000e-07, -3.440e-06,\n -8.0823898, 0.0151240, 2.000e-06,\n 206.8755646, 15.0030355, 0.000e-00,\n 0.5574860, 0.0001228, -1.110e-05,\n 0.0112920, 0.0001222, -1.100e-05,\n 0.0047223, 0.0046988,\n// 2101 8 24\n2488670.317392, 20.0, -4.0, 4.0, 206.3, 206.3,\n -0.3236260, 0.4769202, 2.100e-06, -6.110e-06,\n -1.1110851, -0.2365026, -1.470e-05, 3.220e-06,\n 10.9239902, -0.0137310, -2.000e-06,\n 119.3928070, 15.0040102, 0.000e-00,\n 0.5540140, -0.0001198, -1.070e-05,\n 0.0078370, -0.0001192, -1.070e-05,\n 0.0046240, 0.0046010,\n// 2102 1 19\n2488817.598261, 2.0, -4.0, 4.0, 207.3, 207.3,\n 0.1195020, 0.5541312, -6.010e-05, -9.240e-06,\n -1.0874220, 0.1716116, 2.052e-04, -3.050e-06,\n -20.4401894, 0.0081800, 5.000e-06,\n 207.4317169, 14.9981813, 0.000e-00,\n 0.5395900, 0.0000564, -1.300e-05,\n -0.0065150, 0.0000561, -1.290e-05,\n 0.0047523, 0.0047286,\n// 2102 7 15\n2488994.843907, 8.0, -4.0, 4.0, 208.5, 208.5,\n 0.1127480, 0.4884019, -4.060e-05, -5.440e-06,\n 0.9100120, -0.1317882, -1.635e-04, 1.600e-06,\n 21.5428391, -0.0061960, -5.000e-06,\n 298.4646301, 15.0001669, 0.000e-00,\n 0.5656250, 0.0000110, -9.700e-06,\n 0.0193900, 0.0000109, -9.600e-06,\n 0.0046004, 0.0045775,\n// 2103 1 8\n2489172.253022, 18.0, -4.0, 4.0, 209.6, 209.6,\n 0.0537060, 0.5631843, -3.330e-05, -9.330e-06,\n -0.4126540, 0.1320884, 1.882e-04, -2.350e-06,\n -22.2473297, 0.0052410, 6.000e-06,\n 88.4192963, 14.9970741, 0.000e-00,\n 0.5403970, -0.0000545, -1.290e-05,\n -0.0057120, -0.0000542, -1.290e-05,\n 0.0047546, 0.0047309,\n// 2103 7 4\n2489348.917915, 10.0, -4.0, 4.0, 210.8, 210.8,\n 0.0087820, 0.5117333, -4.190e-05, -6.220e-06,\n 0.1291490, -0.0977794, -1.489e-04, 1.320e-06,\n 22.8943100, -0.0033010, -5.000e-06,\n 328.8708191, 14.9994316, 0.000e-00,\n 0.5581880, 0.0000957, -1.020e-05,\n 0.0119910, 0.0000952, -1.020e-05,\n 0.0045994, 0.0045765,\n// 2103 12 29\n2489526.800900, 7.0, -4.0, 4.0, 211.9, 211.9,\n -0.1619830, 0.5445647, -4.000e-07, -7.820e-06,\n 0.2532330, 0.0827713, 1.559e-04, -1.320e-06,\n -23.2489605, 0.0019910, 6.000e-06,\n 284.6503296, 14.9963760, 0.000e-00,\n 0.5525130, -0.0001136, -1.170e-05,\n 0.0063440, -0.0001130, -1.170e-05,\n 0.0047545, 0.0047308,\n// 2104 6 22\n2489703.261351, 18.0, -4.0, 4.0, 213.1, 213.1,\n -0.2204580, 0.5497461, -2.450e-05, -7.970e-06,\n -0.6233210, -0.0606660, -1.287e-04, 9.900e-07,\n 23.4185390, -0.0003020, -6.000e-06,\n 89.4254837, 14.9991627, 0.000e-00,\n 0.5434340, 0.0001220, -1.150e-05,\n -0.0026900, 0.0001214, -1.140e-05,\n 0.0046008, 0.0045779,\n// 2104 12 17\n2489881.075313, 14.0, -4.0, 4.0, 214.2, 214.2,\n 0.0329460, 0.5164456, 2.800e-06, -6.210e-06,\n 1.0164040, 0.0340326, 1.165e-04, -5.200e-07,\n -23.3577194, -0.0014580, 6.000e-06,\n 31.0045891, 14.9962978, 0.000e-00,\n 0.5678550, -0.0000981, -1.040e-05,\n 0.0216090, -0.0000976, -1.040e-05,\n 0.0047515, 0.0047278,\n// 2105 5 14\n2490028.577842, 2.0, -4.0, 4.0, 215.2, 215.2,\n -0.1082260, 0.5770836, 2.670e-05, -9.860e-06,\n 1.1682850, 0.0919272, -1.945e-04, -1.480e-06,\n 18.5620708, 0.0098860, -4.000e-06,\n 210.8833618, 15.0014343, 0.000e-00,\n 0.5316410, -0.0000003, -1.290e-05,\n -0.0144250, -0.0000003, -1.280e-05,\n 0.0046279, 0.0046049,\n// 2105 6 12\n2490057.873740, 9.0, -4.0, 4.0, 215.4, 215.4,\n -0.0234630, 0.5791540, -1.140e-05, -9.640e-06,\n -1.3487740, -0.0176084, -9.030e-05, 3.900e-07,\n 23.1452408, 0.0026330, -6.000e-06,\n 314.9964294, 14.9993315, 0.000e-00,\n 0.5322570, 0.0000528, -1.260e-05,\n -0.0138120, 0.0000525, -1.260e-05,\n 0.0046049, 0.0045819,\n// 2105 11 6\n2490205.307663, 19.0, -4.0, 4.0, 216.3, 216.3,\n -0.4567790, 0.4971279, 2.930e-05, -5.660e-06,\n -1.2502940, -0.1026241, 1.497e-04, 1.100e-06,\n -16.0948200, -0.0121310, 4.000e-06,\n 109.1083679, 15.0008183, 0.000e-00,\n 0.5711040, 0.0000631, -1.000e-05,\n 0.0248420, 0.0000628, -9.900e-06,\n 0.0047162, 0.0046927,\n// 2106 5 3\n2490383.263421, 18.0, -4.0, 4.0, 217.5, 217.5,\n -0.2766420, 0.5585399, 4.820e-05, -8.900e-06,\n 0.4199590, 0.1180621, -1.211e-04, -1.810e-06,\n 15.7211103, 0.0119380, -3.000e-06,\n 90.7571030, 15.0024052, 0.000e-00,\n 0.5379000, -0.0000834, -1.230e-05,\n -0.0081960, -0.0000829, -1.230e-05,\n 0.0046399, 0.0046168,\n// 2106 10 26\n2490559.442819, 23.0, -4.0, 4.0, 218.6, 218.6,\n 0.0527120, 0.5171156, 1.200e-06, -6.770e-06,\n -0.5985760, -0.1314788, 1.089e-04, 1.640e-06,\n -12.5553799, -0.0138360, 3.000e-06,\n 169.0217743, 15.0023670, 0.000e-00,\n 0.5578020, 0.0001128, -1.090e-05,\n 0.0116060, 0.0001122, -1.090e-05,\n 0.0047019, 0.0046785,\n// 2107 4 23\n2490737.762975, 6.0, -4.0, 4.0, 219.8, 219.8,\n -0.0921700, 0.5215905, 3.910e-05, -7.000e-06,\n -0.3156550, 0.1337877, -5.300e-05, -1.720e-06,\n 12.3393097, 0.0136330, -3.000e-06,\n 270.3674011, 15.0032463, 0.000e-00,\n 0.5529090, -0.0001158, -1.100e-05,\n 0.0067380, -0.0001152, -1.100e-05,\n 0.0046535, 0.0046303,\n// 2107 10 16\n2490913.887815, 9.0, -4.0, 4.0, 221.0, 221.0,\n -0.1180560, 0.5445469, 7.000e-06, -8.520e-06,\n 0.2192420, -0.1576694, 4.820e-05, 2.390e-06,\n -8.7120600, -0.0149620, 2.000e-06,\n 318.5762634, 15.0036459, 0.000e-00,\n 0.5419010, 0.0001082, -1.230e-05,\n -0.0042160, 0.0001077, -1.220e-05,\n 0.0046870, 0.0046637,\n// 2108 4 11\n2491091.955285, 11.0, -4.0, 4.0, 222.2, 222.2,\n 0.3324100, 0.4897523, 9.600e-06, -5.640e-06,\n -1.0043710, 0.1431230, -2.300e-06, -1.580e-06,\n 8.4582396, 0.0149330, -2.000e-06,\n 344.7480774, 15.0038843, 0.000e-00,\n 0.5670390, -0.0000694, -1.000e-05,\n 0.0207970, -0.0000690, -9.900e-06,\n 0.0046683, 0.0046451,\n// 2108 10 5\n2491268.542589, 1.0, -4.0, 4.0, 223.3, 223.3,\n 0.2483550, 0.5569171, -6.800e-06, -9.490e-06,\n 0.8362440, -0.1744127, -1.840e-05, 2.890e-06,\n -4.7258000, -0.0155850, 1.000e-06,\n 197.8697357, 15.0045214, 0.000e-00,\n 0.5340730, 0.0000110, -1.300e-05,\n -0.0120050, 0.0000109, -1.290e-05,\n 0.0046726, 0.0046493,\n// 2109 3 1\n2491416.240202, 18.0, -4.0, 4.0, 224.3, 224.3,\n -0.2278530, 0.4929262, -1.360e-05, -5.820e-06,\n 1.1814830, 0.1477626, -1.130e-05, -1.670e-06,\n -7.4288998, 0.0155040, 2.000e-06,\n 86.9629517, 15.0032282, 0.000e-00,\n 0.5677820, 0.0000766, -1.020e-05,\n 0.0215360, 0.0000762, -1.020e-05,\n 0.0047210, 0.0046975,\n// 2109 8 26\n2491593.831546, 8.0, -4.0, 4.0, 225.5, 225.5,\n -0.2490860, 0.5363286, 1.080e-05, -7.930e-06,\n -0.9871040, -0.1488006, -1.810e-05, 2.140e-06,\n 10.3819304, -0.0141190, -2.000e-06,\n 299.4990540, 15.0042620, 0.000e-00,\n 0.5431770, -0.0001123, -1.170e-05,\n -0.0029460, -0.0001118, -1.160e-05,\n 0.0046250, 0.0046020,\n// 2110 2 18\n2491770.480262, 0.0, -4.0, 4.0, 226.6, 226.6,\n 0.1360200, 0.5277785, -4.060e-05, -7.400e-06,\n 0.4953390, 0.1403413, 4.150e-05, -1.890e-06,\n -11.4809599, 0.0144240, 3.000e-06,\n 176.5738678, 15.0022001, 0.000e-00,\n 0.5535310, 0.0001078, -1.150e-05,\n 0.0073560, 0.0001073, -1.140e-05,\n 0.0047322, 0.0047086,\n// 2110 8 15\n2491948.201913, 17.0, -4.0, 4.0, 227.8, 227.8,\n 0.0138740, 0.5097920, -5.400e-06, -6.320e-06,\n -0.2929070, -0.1201895, -7.340e-05, 1.420e-06,\n 13.9748802, -0.0127320, -3.000e-06,\n 73.8344498, 15.0033331, 0.000e-00,\n 0.5577060, -0.0001030, -1.040e-05,\n 0.0115110, -0.0001025, -1.030e-05,\n 0.0046158, 0.0045928,\n// 2111 2 8\n2492125.003856, 12.0, -4.0, 4.0, 229.0, 229.0,\n 0.0050910, 0.5623171, -3.300e-05, -9.230e-06,\n -0.2703010, 0.1240986, 1.144e-04, -1.950e-06,\n -15.0892296, 0.0128340, 3.000e-06,\n 356.5197449, 15.0009298, 0.000e-00,\n 0.5408140, 0.0000702, -1.280e-05,\n -0.0052980, 0.0000698, -1.270e-05,\n 0.0047411, 0.0047175,\n// 2111 8 4\n2492302.291922, 19.0, -4.0, 4.0, 230.1, 230.1,\n 0.0847950, 0.4976494, -1.960e-05, -5.590e-06,\n 0.4792720, -0.0913138, -1.193e-04, 9.600e-07,\n 17.2114105, -0.0108630, -4.000e-06,\n 103.4256897, 15.0022068, 0.000e-00,\n 0.5659720, -0.0000151, -9.700e-06,\n 0.0197360, -0.0000150, -9.600e-06,\n 0.0046083, 0.0045853,\n// 2112 1 29\n2492479.659625, 4.0, -4.0, 4.0, 231.3, 231.3,\n 0.2500240, 0.5738211, -3.050e-05, -9.720e-06,\n -0.9002750, 0.0958894, 1.831e-04, -1.530e-06,\n -18.1609306, 0.0107600, 4.000e-06,\n 236.8287811, 14.9995050, 0.000e-00,\n 0.5386590, -0.0000385, -1.310e-05,\n -0.0074410, -0.0000384, -1.300e-05,\n 0.0047480, 0.0047244,\n// 2112 6 24\n2492626.798528, 7.0, -4.0, 4.0, 232.3, 232.3,\n 0.0229750, 0.5274184, -6.400e-06, -6.710e-06,\n -1.5379330, 0.0378452, -8.500e-05, -6.000e-07,\n 23.3931503, -0.0009930, -6.000e-06,\n 284.3394775, 14.9991302, 0.000e-00,\n 0.5542730, 0.0001125, -1.050e-05,\n 0.0080950, 0.0001120, -1.050e-05,\n 0.0046008, 0.0045779,\n// 2112 7 23\n2492656.332312, 20.0, -4.0, 4.0, 232.5, 232.5,\n 0.1626560, 0.5118113, -3.330e-05, -6.060e-06,\n 1.2176970, -0.0630194, -1.690e-04, 6.900e-07,\n 19.8794804, -0.0085570, -4.000e-06,\n 118.3262405, 15.0010843, 0.000e-00,\n 0.5609730, 0.0000807, -1.000e-05,\n 0.0147610, 0.0000803, -1.000e-05,\n 0.0046026, 0.0045797,\n// 2112 12 19\n2492804.689766, 5.0, -4.0, 4.0, 233.5, 233.5,\n 0.3762050, 0.5367167, 2.170e-05, -7.310e-06,\n 1.1284180, -0.0634855, 1.128e-04, 9.700e-07,\n -23.4015102, -0.0006740, 6.000e-06,\n 255.8005829, 14.9963083, 0.000e-00,\n 0.5568800, -0.0001308, -1.130e-05,\n 0.0106880, -0.0001301, -1.130e-05,\n 0.0047518, 0.0047281,\n// 2113 6 13\n2492981.226392, 17.0, -4.0, 4.0, 234.7, 234.7,\n -0.1331110, 0.5556612, 1.460e-05, -8.440e-06,\n -0.7384400, 0.0854372, -1.225e-04, -1.440e-06,\n 23.2235603, 0.0019940, -6.000e-06,\n 74.9215012, 14.9992313, 0.000e-00,\n 0.5396240, 0.0001160, -1.190e-05,\n -0.0064810, 0.0001154, -1.180e-05,\n 0.0046045, 0.0045816,\n// 2113 12 8\n2493158.877398, 9.0, -4.0, 4.0, 235.9, 235.9,\n 0.0734410, 0.5002258, 3.840e-05, -5.770e-06,\n 0.5004040, -0.1034427, 1.277e-04, 1.320e-06,\n -22.7064896, -0.0041090, 6.000e-06,\n 317.0990601, 14.9967918, 0.000e-00,\n 0.5710380, -0.0000704, -1.020e-05,\n 0.0247760, -0.0000700, -1.010e-05,\n 0.0047463, 0.0047227,\n// 2114 6 3\n2493335.884824, 9.0, -4.0, 4.0, 237.0, 237.0,\n -0.1458040, 0.5681225, 3.970e-05, -9.610e-06,\n 0.0200860, 0.1317395, -1.572e-04, -2.380e-06,\n 22.2880096, 0.0048310, -5.000e-06,\n 315.4276428, 14.9997263, 0.000e-00,\n 0.5312060, 0.0000322, -1.280e-05,\n -0.0148570, 0.0000321, -1.270e-05,\n 0.0046105, 0.0045875,\n// 2114 11 27\n2493512.850168, 8.0, -4.0, 4.0, 238.2, 238.2,\n -0.2464470, 0.4841138, 4.210e-05, -5.370e-06,\n -0.1171600, -0.1413665, 1.367e-04, 1.710e-06,\n -21.0675392, -0.0073210, 5.000e-06,\n 303.1778564, 14.9979324, 0.000e-00,\n 0.5738990, 0.0000394, -9.900e-06,\n 0.0276230, 0.0000392, -9.800e-06,\n 0.0047377, 0.0047141,\n// 2115 5 24\n2493690.593007, 2.0, -4.0, 4.0, 239.4, 239.4,\n -0.3579400, 0.5515937, 7.140e-05, -8.990e-06,\n 0.7182240, 0.1675632, -1.757e-04, -2.910e-06,\n 20.6361103, 0.0074770, -5.000e-06,\n 210.7657928, 15.0004797, 0.000e-00,\n 0.5344890, -0.0000676, -1.250e-05,\n -0.0115900, -0.0000673, -1.240e-05,\n 0.0046188, 0.0045958,\n// 2115 11 16\n2493866.915918, 10.0, -4.0, 4.0, 240.6, 240.6,\n -0.2897770, 0.4934902, 3.840e-05, -6.140e-06,\n -0.8166100, -0.1811896, 1.543e-04, 2.400e-06,\n -18.6247406, -0.0100360, 4.000e-06,\n 333.8718262, 14.9994812, 0.000e-00,\n 0.5628260, 0.0001121, -1.070e-05,\n 0.0166050, 0.0001115, -1.060e-05,\n 0.0047261, 0.0047026,\n// 2116 4 13\n2494015.650638, 4.0, -4.0, 4.0, 241.6, 241.6,\n 0.7077810, 0.4698136, 1.070e-05, -5.920e-06,\n -0.9273230, 0.2425988, -6.000e-07, -3.210e-06,\n 9.1061602, 0.0145170, -2.000e-06,\n 239.8552551, 15.0037384, 0.000e-00,\n 0.5579340, -0.0001238, -1.070e-05,\n 0.0117380, -0.0001232, -1.060e-05,\n 0.0046658, 0.0046426,\n// 2116 10 6\n2494191.855453, 9.0, -4.0, 4.0, 242.8, 242.8,\n 0.7872140, 0.5054928, -3.680e-05, -8.090e-06,\n 0.8921650, -0.2726230, -1.570e-05, 4.590e-06,\n -5.2616301, -0.0152880, 1.000e-06,\n 317.9747009, 15.0043097, 0.000e-00,\n 0.5380570, 0.0000684, -1.260e-05,\n -0.0080400, 0.0000680, -1.250e-05,\n 0.0046743, 0.0046511,\n// 2116 11 4\n2494221.284824, 19.0, -4.0, 4.0, 243.0, 243.0,\n -0.5103900, 0.5145947, 5.230e-05, -7.690e-06,\n -1.4243720, -0.2204641, 1.749e-04, 3.440e-06,\n -15.5927496, -0.0121500, 3.000e-06,\n 109.1243820, 15.0011034, 0.000e-00,\n 0.5464060, 0.0001090, -1.200e-05,\n 0.0002670, 0.0001085, -1.200e-05,\n 0.0047129, 0.0046895,\n// 2117 4 2\n2494369.760645, 6.0, -4.0, 4.0, 244.0, 244.0,\n 0.1006900, 0.4438628, 1.440e-05, -4.910e-06,\n -0.4532520, 0.2429156, -4.500e-06, -2.850e-06,\n 4.9238701, 0.0154450, -1.000e-06,\n 269.0962219, 15.0041103, 0.000e-00,\n 0.5699430, -0.0000361, -9.800e-06,\n 0.0236870, -0.0000360, -9.800e-06,\n 0.0046813, 0.0046580,\n// 2117 9 26\n2494546.538679, 1.0, -4.0, 4.0, 245.2, 245.2,\n 0.2521520, 0.5098468, -8.000e-06, -8.560e-06,\n 0.3680240, -0.2830727, -1.580e-05, 4.960e-06,\n -1.1711000, -0.0155220, 0.000e-00,\n 197.1152039, 15.0048409, 0.000e-00,\n 0.5336770, -0.0000209, -1.290e-05,\n -0.0123990, -0.0000208, -1.290e-05,\n 0.0046602, 0.0046370,\n// 2118 3 22\n2494723.750636, 6.0, -4.0, 4.0, 246.4, 246.4,\n -0.1393710, 0.4453533, -1.300e-06, -5.040e-06,\n 0.2335520, 0.2487462, -1.570e-05, -2.990e-06,\n 0.5275600, 0.0158570, 0.000e-00,\n 268.2631531, 15.0041456, 0.000e-00,\n 0.5687350, 0.0000618, -1.000e-05,\n 0.0224850, 0.0000615, -1.000e-05,\n 0.0046964, 0.0046730,\n// 2118 9 15\n2494901.186409, 16.0, -4.0, 4.0, 247.6, 247.6,\n -0.3702120, 0.4933905, 2.280e-05, -7.460e-06,\n -0.1181140, -0.2723468, -1.500e-05, 4.320e-06,\n 2.9431300, -0.0153590, -1.000e-06,\n 61.1666412, 15.0049362, 0.000e-00,\n 0.5413790, -0.0000905, -1.200e-05,\n -0.0047350, -0.0000900, -1.200e-05,\n 0.0046469, 0.0046237,\n// 2119 3 11\n2495077.930078, 10.0, -4.0, 4.0, 248.8, 248.8,\n -0.6185570, 0.4717433, 4.000e-07, -6.250e-06,\n 0.7661100, 0.2591838, -2.230e-05, -3.610e-06,\n -3.8477001, 0.0157320, 1.000e-06,\n 327.4915771, 15.0038195, 0.000e-00,\n 0.5558880, 0.0001242, -1.110e-05,\n 0.0097020, 0.0001236, -1.110e-05,\n 0.0047099, 0.0046865,\n// 2119 9 5\n2495255.614201, 3.0, -4.0, 4.0, 250.0, 250.0,\n -0.3832910, 0.4684274, 1.350e-05, -5.920e-06,\n -1.0154480, -0.2485827, 2.400e-06, 3.340e-06,\n 7.0170798, -0.0147840, -2.000e-06,\n 225.2231140, 15.0046177, 0.000e-00,\n 0.5555950, -0.0001148, -1.070e-05,\n 0.0094100, -0.0001143, -1.060e-05,\n 0.0046349, 0.0046118,\n// 2120 1 30\n2495402.965228, 11.0, -4.0, 4.0, 251.0, 251.0,\n 0.2970630, 0.5422134, -6.980e-05, -9.050e-06,\n -1.0419329, 0.2080874, 1.778e-04, -3.680e-06,\n -17.7996197, 0.0107900, 4.000e-06,\n 341.7733765, 14.9996099, 0.000e-00,\n 0.5390480, 0.0000458, -1.300e-05,\n -0.0070540, 0.0000456, -1.300e-05,\n 0.0047473, 0.0047237,\n// 2120 7 25\n2495580.111129, 15.0, -4.0, 4.0, 252.2, 252.2,\n 0.4819480, 0.4785797, -5.800e-05, -5.320e-06,\n 0.8864090, -0.1641811, -1.457e-04, 1.970e-06,\n 19.4810905, -0.0087420, -4.000e-06,\n 43.3135185, 15.0011883, 0.000e-00,\n 0.5657560, 0.0000068, -9.700e-06,\n 0.0195210, 0.0000067, -9.600e-06,\n 0.0046037, 0.0045807,\n// 2121 1 19\n2495757.621005, 3.0, -4.0, 4.0, 253.4, 253.4,\n 0.1789650, 0.5508003, -4.590e-05, -9.070e-06,\n -0.3829120, 0.1739339, 1.668e-04, -3.040e-06,\n -20.3512192, 0.0082870, 5.000e-06,\n 222.4136658, 14.9982252, 0.000e-00,\n 0.5406300, -0.0000641, -1.290e-05,\n -0.0054800, -0.0000638, -1.280e-05,\n 0.0047522, 0.0047285,\n// 2121 7 14\n2495934.196279, 17.0, -4.0, 4.0, 254.6, 254.6,\n 0.2011900, 0.5047495, -5.770e-05, -6.170e-06,\n 0.1659220, -0.1357776, -1.374e-04, 1.800e-06,\n 21.5760994, -0.0061310, -5.000e-06,\n 73.4633789, 15.0001860, 0.000e-00,\n 0.5574600, 0.0000936, -1.030e-05,\n 0.0112660, 0.0000931, -1.020e-05,\n 0.0046003, 0.0045774,\n// 2122 1 8\n2496112.158927, 16.0, -4.0, 4.0, 255.8, 255.8,\n 0.0366560, 0.5342652, -1.990e-05, -7.590e-06,\n 0.2875460, 0.1267184, 1.435e-04, -1.950e-06,\n -22.2055798, 0.0053450, 6.000e-06,\n 58.3992691, 14.9970312, 0.000e-00,\n 0.5532800, -0.0001248, -1.170e-05,\n 0.0071060, -0.0001242, -1.160e-05,\n 0.0047548, 0.0047312,\n// 2122 7 4\n2496288.559386, 1.0, -4.0, 4.0, 257.0, 257.0,\n -0.3376030, 0.5454159, -3.050e-05, -7.980e-06,\n -0.5107720, -0.1037423, -1.267e-04, 1.650e-06,\n 22.8904305, -0.0032950, -5.000e-06,\n 193.8611450, 14.9995174, 0.000e-00,\n 0.5424140, 0.0001246, -1.160e-05,\n -0.0037050, 0.0001239, -1.150e-05,\n 0.0045991, 0.0045762,\n// 2122 12 28\n2496466.417320, 22.0, -4.0, 4.0, 258.2, 258.2,\n -0.1586560, 0.5103485, -3.400e-06, -6.070e-06,\n 0.9946810, 0.0771972, 1.163e-04, -1.050e-06,\n -23.2470798, 0.0020080, 6.000e-06,\n 149.6572876, 14.9962921, 0.000e-00,\n 0.5687530, -0.0000910, -1.040e-05,\n 0.0225020, -0.0000906, -1.030e-05,\n 0.0047549, 0.0047313,\n// 2123 5 25\n2496613.898233, 10.0, -4.0, 4.0, 259.2, 259.2,\n 0.1422590, 0.5819833, 7.800e-06, -9.950e-06,\n 1.2512300, 0.0544501, -2.190e-04, -8.300e-07,\n 20.8914604, 0.0073980, -5.000e-06,\n 330.7341309, 15.0004349, 0.000e-00,\n 0.5310730, -0.0000142, -1.290e-05,\n -0.0149890, -0.0000141, -1.280e-05,\n 0.0046176, 0.0045946,\n// 2123 6 23\n2496643.184859, 16.0, -4.0, 4.0, 259.4, 259.4,\n -0.3913440, 0.5769546, -4.900e-06, -9.650e-06,\n -1.2410330, -0.0633235, -9.700e-05, 1.170e-06,\n 23.4131908, -0.0003890, -6.000e-06,\n 59.3978615, 14.9992361, 0.000e-00,\n 0.5316090, 0.0000593, -1.270e-05,\n -0.0144570, 0.0000590, -1.260e-05,\n 0.0046004, 0.0045775,\n// 2123 11 18\n2496790.630162, 3.0, -4.0, 4.0, 260.4, 260.4,\n -0.2552640, 0.5029739, 1.870e-05, -5.750e-06,\n -1.3158790, -0.0732891, 1.750e-04, 7.600e-07,\n -19.0593491, -0.0098840, 4.000e-06,\n 228.7870636, 14.9992514, 0.000e-00,\n 0.5714770, 0.0000627, -1.000e-05,\n 0.0252130, 0.0000624, -1.000e-05,\n 0.0047283, 0.0047048,\n// 2124 5 14\n2496968.582750, 2.0, -4.0, 4.0, 261.7, 261.7,\n -0.0726670, 0.5628332, 3.670e-05, -8.900e-06,\n 0.5236430, 0.0867673, -1.494e-04, -1.300e-06,\n 18.6583691, 0.0098090, -4.000e-06,\n 210.8794250, 15.0013571, 0.000e-00,\n 0.5378780, -0.0000953, -1.220e-05,\n -0.0082190, -0.0000948, -1.220e-05,\n 0.0046279, 0.0046049,\n// 2124 11 6\n2497144.775397, 7.0, -4.0, 4.0, 262.9, 262.9,\n 0.0854670, 0.5242839, 9.000e-07, -6.930e-06,\n -0.6220650, -0.1076934, 1.353e-04, 1.340e-06,\n -16.0632801, -0.0121360, 4.000e-06,\n 289.1137085, 15.0009031, 0.000e-00,\n 0.5577520, 0.0001135, -1.100e-05,\n 0.0115560, 0.0001129, -1.100e-05,\n 0.0047154, 0.0046919,\n// 2125 5 3\n2497323.071212, 14.0, -4.0, 4.0, 264.1, 264.1,\n 0.1992470, 0.5252842, 2.900e-05, -6.990e-06,\n -0.1894720, 0.1100660, -8.230e-05, -1.390e-06,\n 15.7894402, 0.0119140, -4.000e-06,\n 30.7607803, 15.0022993, 0.000e-00,\n 0.5529750, -0.0001276, -1.090e-05,\n 0.0068030, -0.0001269, -1.090e-05,\n 0.0046404, 0.0046173,\n// 2125 10 26\n2497499.229733, 18.0, -4.0, 4.0, 265.3, 265.3,\n 0.3038390, 0.5508845, -7.700e-06, -8.670e-06,\n 0.0737830, -0.1394798, 8.150e-05, 2.110e-06,\n -12.6188498, -0.0137890, 3.000e-06,\n 94.0307465, 15.0024319, 0.000e-00,\n 0.5420940, 0.0000852, -1.240e-05,\n -0.0040240, 0.0000847, -1.230e-05,\n 0.0047012, 0.0046778,\n// 2126 4 22\n2497677.253038, 18.0, -4.0, 4.0, 266.5, 266.5,\n 0.2146290, 0.4933409, 1.760e-05, -5.660e-06,\n -0.9826420, 0.1270140, -2.690e-05, -1.390e-06,\n 12.3075199, 0.0136640, -3.000e-06,\n 90.3574371, 15.0031776, 0.000e-00,\n 0.5666730, -0.0000610, -9.900e-06,\n 0.0204330, -0.0000607, -9.900e-06,\n 0.0046546, 0.0046314,\n// 2126 10 16\n2497853.883926, 9.0, -4.0, 4.0, 267.7, 267.7,\n 0.1125120, 0.5603946, 8.300e-06, -9.550e-06,\n 0.8363000, -0.1626172, 8.600e-06, 2.690e-06,\n -8.8584204, -0.0149110, 2.000e-06,\n 318.6002808, 15.0036535, 0.000e-00,\n 0.5347910, 0.0000101, -1.300e-05,\n -0.0112900, 0.0000100, -1.290e-05,\n 0.0046867, 0.0046634,\n// 2127 3 13\n2498001.563918, 2.0, -4.0, 4.0, 268.8, 268.8,\n -0.1407760, 0.4919061, -9.900e-06, -5.860e-06,\n 1.2362660, 0.1564093, -3.850e-05, -1.790e-06,\n -3.1665599, 0.0160300, 1.000e-06,\n 207.6015015, 15.0039520, 0.000e-00,\n 0.5663680, 0.0000753, -1.030e-05,\n 0.0201300, 0.0000749, -1.020e-05,\n 0.0047084, 0.0046850,\n// 2127 9 6\n2498179.141858, 15.0, -4.0, 4.0, 270.0, 270.0,\n -0.5303860, 0.5303628, 2.920e-05, -7.740e-06,\n -0.9696240, -0.1618221, 5.100e-06, 2.310e-06,\n 6.4376798, -0.0151050, -2.000e-06,\n 45.3557892, 15.0048285, 0.000e-00,\n 0.5447190, -0.0001035, -1.160e-05,\n -0.0014110, -0.0001030, -1.160e-05,\n 0.0046360, 0.0046129,\n// 2128 3 1\n2498355.825372, 8.0, -4.0, 4.0, 271.2, 271.2,\n -0.0310300, 0.5252511, -2.740e-05, -7.440e-06,\n 0.4703390, 0.1567139, 1.530e-05, -2.140e-06,\n -7.4345899, 0.0154830, 2.000e-06,\n 296.9650574, 15.0032949, 0.000e-00,\n 0.5520130, 0.0001131, -1.160e-05,\n 0.0058460, 0.0001126, -1.150e-05,\n 0.0047210, 0.0046975,\n// 2128 8 25\n2498533.489280, 0.0, -4.0, 4.0, 272.4, 272.4,\n 0.0348930, 0.5031702, -3.600e-06, -6.180e-06,\n -0.3790760, -0.1385655, -4.740e-05, 1.640e-06,\n 10.3550196, -0.0141470, -2.000e-06,\n 179.4991760, 15.0041943, 0.000e-00,\n 0.5590960, -0.0001012, -1.030e-05,\n 0.0128940, -0.0001007, -1.030e-05,\n 0.0046253, 0.0046022,\n// 2129 2 18\n2498710.364323, 21.0, -4.0, 4.0, 273.7, 273.7,\n 0.2079030, 0.5574684, -3.940e-05, -9.190e-06,\n -0.2059960, 0.1486188, 8.310e-05, -2.370e-06,\n -11.3849297, 0.0144380, 2.000e-06,\n 131.5899048, 15.0022984, 0.000e-00,\n 0.5398910, 0.0000561, -1.280e-05,\n -0.0062160, 0.0000559, -1.280e-05,\n 0.0047317, 0.0047081,\n// 2129 8 15\n2498887.564636, 2.0, -4.0, 4.0, 274.9, 274.9,\n 0.3133870, 0.4921997, -2.840e-05, -5.520e-06,\n 0.3430620, -0.1154172, -9.310e-05, 1.230e-06,\n 14.0390396, -0.0127080, -3.000e-06,\n 208.8127441, 15.0032740, 0.000e-00,\n 0.5665640, -0.0000170, -9.700e-06,\n 0.0203240, -0.0000169, -9.600e-06,\n 0.0046157, 0.0045927,\n// 2130 2 8\n2499065.024575, 13.0, -4.0, 4.0, 276.1, 276.1,\n 0.4346300, 0.5670894, -4.080e-05, -9.580e-06,\n -0.8464440, 0.1275943, 1.533e-04, -2.060e-06,\n -14.9516697, 0.0129000, 3.000e-06,\n 11.5299702, 15.0009966, 0.000e-00,\n 0.5384920, -0.0000505, -1.300e-05,\n -0.0076080, -0.0000502, -1.300e-05,\n 0.0047408, 0.0047172,\n// 2130 8 4\n2499241.610233, 3.0, -4.0, 4.0, 277.4, 277.4,\n 0.3873780, 0.5084129, -4.610e-05, -6.060e-06,\n 1.0940270, -0.0935583, -1.445e-04, 1.060e-06,\n 17.2748909, -0.0108070, -4.000e-06,\n 223.4038696, 15.0022106, 0.000e-00,\n 0.5606380, 0.0000793, -1.010e-05,\n 0.0144280, 0.0000789, -1.000e-05,\n 0.0046077, 0.0045848,\n// 2130 12 30\n2499390.042759, 13.0, -4.0, 4.0, 278.4, 278.4,\n 0.0254590, 0.5383271, 2.260e-05, -7.260e-06,\n 1.1727980, -0.0181766, 1.111e-04, 3.300e-07,\n -23.1465893, 0.0027820, 6.000e-06,\n 14.4624395, 14.9964294, 0.000e-00,\n 0.5579390, -0.0001204, -1.130e-05,\n 0.0117420, -0.0001198, -1.120e-05,\n 0.0047548, 0.0047311,\n// 2131 6 25\n2499566.530041, 1.0, -4.0, 4.0, 279.6, 279.6,\n 0.2140960, 0.5625635, -1.330e-05, -8.630e-06,\n -0.7677140, 0.0411829, -1.225e-04, -7.600e-07,\n 23.3853207, -0.0010490, -6.000e-06,\n 194.3144226, 14.9992199, 0.000e-00,\n 0.5386600, 0.0000965, -1.190e-05,\n -0.0074400, 0.0000960, -1.190e-05,\n 0.0046004, 0.0045775,\n// 2131 12 19\n2499744.213085, 17.0, -4.0, 4.0, 280.9, 280.9,\n 0.0046650, 0.5059384, 2.880e-05, -5.810e-06,\n 0.5197130, -0.0615681, 1.359e-04, 8.200e-07,\n -23.3954105, -0.0007150, 6.000e-06,\n 75.8257294, 14.9962330, 0.000e-00,\n 0.5719190, -0.0000656, -1.010e-05,\n 0.0256530, -0.0000653, -1.010e-05,\n 0.0047521, 0.0047285,\n// 2132 6 13\n2499921.198888, 17.0, -4.0, 4.0, 282.1, 282.1,\n 0.1336080, 0.5770402, 1.550e-05, -9.800e-06,\n 0.0014960, 0.0876971, -1.663e-04, -1.630e-06,\n 23.2404594, 0.0018730, -6.000e-06,\n 74.8939133, 14.9992733, 0.000e-00,\n 0.5307020, 0.0000146, -1.280e-05,\n -0.0153590, 0.0000145, -1.270e-05,\n 0.0046042, 0.0045813,\n// 2132 12 7\n2500098.179669, 16.0, -4.0, 4.0, 283.4, 283.4,\n -0.1881980, 0.4938965, 3.190e-05, -5.500e-06,\n -0.1302220, -0.1036198, 1.528e-04, 1.280e-06,\n -22.6692410, -0.0042050, 6.000e-06,\n 62.1405716, 14.9968090, 0.000e-00,\n 0.5741920, 0.0000423, -9.900e-06,\n 0.0279150, 0.0000421, -9.900e-06,\n 0.0047459, 0.0047222,\n// 2133 6 3\n2500275.906438, 10.0, -4.0, 4.0, 284.6, 284.6,\n -0.0228630, 0.5609855, 4.850e-05, -9.110e-06,\n 0.7379380, 0.1273685, -1.933e-04, -2.230e-06,\n 22.3381996, 0.0047210, -5.000e-06,\n 330.4072876, 14.9996758, 0.000e-00,\n 0.5345610, -0.0000840, -1.240e-05,\n -0.0115180, -0.0000836, -1.240e-05,\n 0.0046106, 0.0045876,\n// 2133 11 26\n2500452.254110, 18.0, -4.0, 4.0, 285.8, 285.8,\n -0.2870290, 0.5061492, 3.520e-05, -6.370e-06,\n -0.7988580, -0.1475733, 1.749e-04, 1.990e-06,\n -21.0291405, -0.0073550, 5.000e-06,\n 93.1970596, 14.9980240, 0.000e-00,\n 0.5626550, 0.0001165, -1.070e-05,\n 0.0164350, 0.0001159, -1.070e-05,\n 0.0047365, 0.0047129,\n// 2134 4 24\n2500600.958322, 11.0, -4.0, 4.0, 286.9, 286.9,\n 0.5160240, 0.4763378, 2.650e-05, -5.950e-06,\n -1.0890970, 0.2256257, -1.730e-05, -2.960e-06,\n 12.8953505, 0.0131760, -3.000e-06,\n 345.4411011, 15.0029926, 0.000e-00,\n 0.5580020, -0.0001129, -1.060e-05,\n 0.0118050, -0.0001123, -1.050e-05,\n 0.0046522, 0.0046290,\n// 2134 5 23\n2500630.459235, 23.0, -4.0, 4.0, 287.1, 287.1,\n -0.4479600, 0.5223592, 7.800e-05, -7.210e-06,\n 1.4614739, 0.1557181, -1.973e-04, -2.330e-06,\n 20.6847191, 0.0074370, -5.000e-06,\n 165.7552948, 15.0003738, 0.000e-00,\n 0.5481950, -0.0001216, -1.120e-05,\n 0.0020470, -0.0001210, -1.110e-05,\n 0.0046196, 0.0045966,\n// 2134 10 17\n2500777.194929, 17.0, -4.0, 4.0, 288.1, 288.1,\n 0.7071880, 0.5124798, -2.070e-05, -8.260e-06,\n 0.9786340, -0.2615190, 4.100e-06, 4.440e-06,\n -9.3708801, -0.0145470, 2.000e-06,\n 78.6721573, 15.0033998, 0.000e-00,\n 0.5382970, 0.0000675, -1.260e-05,\n -0.0078020, 0.0000672, -1.260e-05,\n 0.0046886, 0.0046653,\n// 2134 11 16\n2500806.633425, 3.0, -4.0, 4.0, 288.3, 288.3,\n -0.6130850, 0.5278102, 5.960e-05, -7.980e-06,\n -1.3581010, -0.1914276, 1.972e-04, 3.040e-06,\n -18.6482391, -0.0099830, 4.000e-06,\n 228.8677063, 14.9995613, 0.000e-00,\n 0.5463050, 0.0001152, -1.210e-05,\n 0.0001660, 0.0001147, -1.210e-05,\n 0.0047251, 0.0047016,\n// 2135 4 13\n2500955.060480, 13.0, -4.0, 4.0, 289.4, 289.4,\n 0.0266950, 0.4486865, 2.640e-05, -4.950e-06,\n -0.5465300, 0.2331851, -2.290e-05, -2.740e-06,\n 9.0212898, 0.0145650, -2.000e-06,\n 14.8423300, 15.0036898, 0.000e-00,\n 0.5693050, -0.0000265, -9.800e-06,\n 0.0230520, -0.0000263, -9.800e-06,\n 0.0046671, 0.0046438,\n// 2135 10 7\n2501131.875036, 9.0, -4.0, 4.0, 290.6, 290.6,\n 0.2323360, 0.5121633, 6.800e-06, -8.580e-06,\n 0.4295810, -0.2776754, 4.900e-06, 4.860e-06,\n -5.4120302, -0.0152540, 1.000e-06,\n 318.0040283, 15.0043030, 0.000e-00,\n 0.5346100, -0.0000248, -1.290e-05,\n -0.0114700, -0.0000247, -1.290e-05,\n 0.0046744, 0.0046512,\n// 2136 4 1\n2501309.059942, 13.0, -4.0, 4.0, 291.9, 291.9,\n -0.3069870, 0.4485427, 1.550e-05, -5.120e-06,\n 0.0935080, 0.2457201, -3.230e-05, -2.970e-06,\n 4.8029799, 0.0154570, -1.000e-06,\n 14.0727196, 15.0041227, 0.000e-00,\n 0.5672650, 0.0000749, -1.000e-05,\n 0.0210220, 0.0000746, -1.000e-05,\n 0.0046819, 0.0046586,\n// 2136 9 26\n2501486.508498, 0.0, -4.0, 4.0, 293.1, 293.1,\n -0.2122430, 0.4910124, 2.850e-05, -7.350e-06,\n -0.1462530, -0.2726865, 8.900e-06, 4.290e-06,\n -1.3078800, -0.0155420, 0.000e-00,\n 182.1470947, 15.0047894, 0.000e-00,\n 0.5429080, -0.0000998, -1.200e-05,\n -0.0032140, -0.0000993, -1.190e-05,\n 0.0046607, 0.0046375,\n// 2137 3 21\n2501663.261554, 18.0, -4.0, 4.0, 294.4, 294.4,\n -0.5862540, 0.4722653, 1.210e-05, -6.330e-06,\n 0.7460200, 0.2626175, -4.490e-05, -3.690e-06,\n 0.4854500, 0.0158240, 0.000e-00,\n 88.2568283, 15.0042067, 0.000e-00,\n 0.5542100, 0.0001234, -1.120e-05,\n 0.0080320, 0.0001228, -1.110e-05,\n 0.0046961, 0.0046727,\n// 2137 9 15\n2501840.914283, 10.0, -4.0, 4.0, 295.6, 295.6,\n -0.4645450, 0.4628301, 2.710e-05, -5.780e-06,\n -0.9067840, -0.2547076, 1.900e-05, 3.380e-06,\n 2.8860600, -0.0154040, -1.000e-06,\n 331.1767578, 15.0048656, 0.000e-00,\n 0.5572600, -0.0001080, -1.060e-05,\n 0.0110670, -0.0001075, -1.060e-05,\n 0.0046475, 0.0046243,\n// 2138 2 9\n2501988.330127, 20.0, -4.0, 4.0, 296.7, 296.7,\n 0.4847620, 0.5307028, -7.420e-05, -8.860e-06,\n -0.9741630, 0.2374136, 1.471e-04, -4.180e-06,\n -14.5169296, 0.0128690, 3.000e-06,\n 116.5149002, 15.0010853, 0.000e-00,\n 0.5384090, 0.0000339, -1.300e-05,\n -0.0076910, 0.0000337, -1.300e-05,\n 0.0047399, 0.0047163,\n// 2138 8 5\n2502165.381210, 21.0, -4.0, 4.0, 298.0, 298.0,\n 0.3378450, 0.4685506, -5.400e-05, -5.200e-06,\n 1.0265880, -0.1913435, -1.310e-04, 2.270e-06,\n 16.7868195, -0.0109230, -4.000e-06,\n 133.4462891, 15.0023012, 0.000e-00,\n 0.5659510, 0.0000231, -9.700e-06,\n 0.0197140, 0.0000230, -9.600e-06,\n 0.0046089, 0.0045860,\n// 2139 1 30\n2502342.987790, 12.0, -4.0, 4.0, 299.2, 299.2,\n 0.3118950, 0.5373452, -5.270e-05, -8.790e-06,\n -0.3351470, 0.2093831, 1.398e-04, -3.610e-06,\n -17.6813393, 0.0108830, 4.000e-06,\n 356.7629700, 14.9996510, 0.000e-00,\n 0.5407680, -0.0000743, -1.290e-05,\n -0.0053430, -0.0000739, -1.280e-05,\n 0.0047475, 0.0047239,\n// 2139 7 25\n2502519.476771, 23.0, -4.0, 4.0, 300.5, 300.5,\n -0.1242420, 0.4962635, -5.020e-05, -6.120e-06,\n 0.3538520, -0.1696136, -1.270e-04, 2.250e-06,\n 19.5356503, -0.0086700, -4.000e-06,\n 163.2994537, 15.0012121, 0.000e-00,\n 0.5567110, 0.0001128, -1.040e-05,\n 0.0105210, 0.0001122, -1.030e-05,\n 0.0046029, 0.0045800,\n// 2140 1 20\n2502697.516097, 0.0, -4.0, 4.0, 301.8, 301.8,\n -0.2826090, 0.5216258, -1.260e-05, -7.310e-06,\n 0.1909360, 0.1657900, 1.296e-04, -2.490e-06,\n -20.2949696, 0.0083770, 5.000e-06,\n 177.4032440, 14.9981766, 0.000e-00,\n 0.5540430, -0.0001129, -1.160e-05,\n 0.0078660, -0.0001123, -1.150e-05,\n 0.0047530, 0.0047293,\n// 2140 7 14\n2502873.858462, 9.0, -4.0, 4.0, 303.0, 303.0,\n 0.0875520, 0.5381416, -5.720e-05, -7.930e-06,\n -0.5268900, -0.1445809, -1.117e-04, 2.280e-06,\n 21.5633507, -0.0061280, -5.000e-06,\n 313.4508972, 15.0002832, 0.000e-00,\n 0.5416420, 0.0001041, -1.170e-05,\n -0.0044730, 0.0001036, -1.160e-05,\n 0.0045994, 0.0045765,\n// 2141 1 8\n2503051.758769, 6.0, -4.0, 4.0, 304.3, 304.3,\n -0.3358120, 0.5010918, -7.800e-06, -5.900e-06,\n 0.9507290, 0.1182674, 1.079e-04, -1.540e-06,\n -22.2083702, 0.0053560, 6.000e-06,\n 268.4119873, 14.9969397, 0.000e-00,\n 0.5694490, -0.0000842, -1.030e-05,\n 0.0231950, -0.0000837, -1.030e-05,\n 0.0047556, 0.0047319,\n// 2141 6 4\n2503199.215263, 17.0, -4.0, 4.0, 305.3, 305.3,\n -0.1250790, 0.5844220, 1.140e-05, -9.990e-06,\n 1.2956960, 0.0126375, -2.362e-04, -1.100e-07,\n 22.4940796, 0.0046190, -5.000e-06,\n 75.3382492, 14.9996557, 0.000e-00,\n 0.5306790, -0.0000045, -1.280e-05,\n -0.0153820, -0.0000045, -1.280e-05,\n 0.0046096, 0.0045866,\n// 2141 7 3\n2503228.495575, 0.0, -4.0, 4.0, 305.5, 305.5,\n -0.1639720, 0.5710700, -2.700e-05, -9.570e-06,\n -1.1932880, -0.1085639, -9.210e-05, 1.960e-06,\n 22.8574104, -0.0033850, -6.000e-06,\n 178.8332672, 14.9996052, 0.000e-00,\n 0.5312010, 0.0000400, -1.270e-05,\n -0.0148620, 0.0000398, -1.260e-05,\n 0.0045985, 0.0045756,\n// 2141 11 28\n2503375.958026, 11.0, -4.0, 4.0, 306.6, 306.6,\n -0.0977030, 0.5076237, 5.000e-06, -5.820e-06,\n -1.3516949, -0.0381041, 1.957e-04, 3.500e-07,\n -21.3432503, -0.0071310, 5.000e-06,\n 348.0564575, 14.9978132, 0.000e-00,\n 0.5716730, 0.0000644, -1.000e-05,\n 0.0254080, 0.0000641, -1.000e-05,\n 0.0047383, 0.0047147,\n// 2142 5 25\n2503553.897652, 10.0, -4.0, 4.0, 307.9, 307.9,\n 0.2060170, 0.5657929, 1.750e-05, -8.890e-06,\n 0.6141920, 0.0497563, -1.736e-04, -7.000e-07,\n 20.9640903, 0.0073070, -5.000e-06,\n 330.7121887, 15.0003500, 0.000e-00,\n 0.5379920, -0.0001094, -1.210e-05,\n -0.0081050, -0.0001088, -1.210e-05,\n 0.0046181, 0.0045951,\n// 2142 11 17\n2503730.113283, 15.0, -4.0, 4.0, 309.1, 309.1,\n 0.0615980, 0.5313658, -1.400e-06, -7.090e-06,\n -0.6270240, -0.0770063, 1.594e-04, 9.300e-07,\n -19.0319309, -0.0098970, 5.000e-06,\n 48.8025513, 14.9993486, 0.000e-00,\n 0.5575880, 0.0001166, -1.110e-05,\n 0.0113930, 0.0001160, -1.110e-05,\n 0.0047271, 0.0047036,\n// 2143 5 14\n2503908.373775, 21.0, -4.0, 4.0, 310.4, 310.4,\n 0.0402010, 0.5287723, 3.320e-05, -6.960e-06,\n -0.1595320, 0.0805132, -1.062e-04, -9.800e-07,\n 18.7054806, 0.0097820, -4.000e-06,\n 135.8710175, 15.0012417, 0.000e-00,\n 0.5532380, -0.0001201, -1.080e-05,\n 0.0070650, -0.0001195, -1.080e-05,\n 0.0046289, 0.0046059,\n// 2143 11 7\n2504084.577271, 2.0, -4.0, 4.0, 311.7, 311.7,\n 0.1053350, 0.5580893, 3.600e-06, -8.860e-06,\n 0.1016100, -0.1139197, 1.069e-04, 1.720e-06,\n -16.1170902, -0.0120830, 4.000e-06,\n 214.1200562, 15.0009718, 0.000e-00,\n 0.5421570, 0.0000898, -1.250e-05,\n -0.0039610, 0.0000894, -1.240e-05,\n 0.0047144, 0.0046909,\n// 2144 5 3\n2504262.543125, 1.0, -4.0, 4.0, 313.0, 313.0,\n 0.1772320, 0.4977647, 2.000e-05, -5.680e-06,\n -0.9275030, 0.1048866, -5.190e-05, -1.130e-06,\n 15.7488403, 0.0119520, -4.000e-06,\n 195.7525635, 15.0022364, 0.000e-00,\n 0.5663040, -0.0000559, -9.900e-06,\n 0.0200660, -0.0000556, -9.800e-06,\n 0.0046415, 0.0046184,\n// 2144 10 26\n2504439.231024, 18.0, -4.0, 4.0, 314.2, 314.2,\n 0.4549560, 0.5654718, -3.200e-06, -9.640e-06,\n 0.7138440, -0.1432534, 4.220e-05, 2.350e-06,\n -12.7524700, -0.0137210, 3.000e-06,\n 94.0442810, 15.0024281, 0.000e-00,\n 0.5355460, -0.0000132, -1.300e-05,\n -0.0105390, -0.0000132, -1.300e-05,\n 0.0047009, 0.0046775,\n// 2145 3 23\n2504586.881685, 9.0, -4.0, 4.0, 315.3, 315.3,\n -0.4625280, 0.4929934, 9.100e-06, -5.930e-06,\n 1.1663361, 0.1586310, -6.090e-05, -1.830e-06,\n 1.1490200, 0.0160440, 0.000e-00,\n 313.3850708, 15.0042744, 0.000e-00,\n 0.5647650, 0.0000917, -1.030e-05,\n 0.0185350, 0.0000912, -1.030e-05,\n 0.0046946, 0.0046712,\n// 2145 9 16\n2504764.456361, 23.0, -4.0, 4.0, 316.6, 316.6,\n -0.3222220, 0.5262369, 2.750e-05, -7.610e-06,\n -1.0944880, -0.1681205, 3.450e-05, 2.380e-06,\n 2.2666800, -0.0156620, -1.000e-06,\n 166.3174744, 15.0050240, 0.000e-00,\n 0.5462710, -0.0001154, -1.160e-05,\n 0.0001330, -0.0001148, -1.150e-05,\n 0.0046488, 0.0046257,\n// 2145 10 16\n2504793.882961, 9.0, -4.0, 4.0, 316.8, 316.8,\n 0.3236140, 0.5450345, 1.090e-05, -8.580e-06,\n 1.4880980, -0.1599436, -2.900e-05, 2.410e-06,\n -9.0072298, -0.0148770, 2.000e-06,\n 318.6162415, 15.0035830, 0.000e-00,\n 0.5413140, -0.0000878, -1.230e-05,\n -0.0047990, -0.0000873, -1.230e-05,\n 0.0046871, 0.0046638,\n// 2146 3 12\n2504941.165454, 16.0, -4.0, 4.0, 317.9, 317.9,\n -0.1302040, 0.5245320, -1.530e-05, -7.520e-06,\n 0.4644590, 0.1660130, -1.100e-05, -2.290e-06,\n -3.1762800, 0.0160060, 1.000e-06,\n 57.6107483, 15.0040236, 0.000e-00,\n 0.5504130, 0.0001156, -1.160e-05,\n 0.0042540, 0.0001150, -1.160e-05,\n 0.0047081, 0.0046847,\n// 2146 9 6\n2505118.780560, 7.0, -4.0, 4.0, 319.2, 319.2,\n 0.0095840, 0.4977887, 2.200e-06, -6.050e-06,\n -0.4468690, -0.1506815, -2.180e-05, 1.770e-06,\n 6.4075699, -0.0151340, -1.000e-06,\n 285.3526001, 15.0047560, 0.000e-00,\n 0.5605730, -0.0000974, -1.030e-05,\n 0.0143630, -0.0000970, -1.020e-05,\n 0.0046365, 0.0046134,\n// 2147 3 2\n2505295.721457, 5.0, -4.0, 4.0, 320.5, 320.5,\n -0.1069230, 0.5538478, -1.700e-05, -9.190e-06,\n -0.2781740, 0.1653520, 5.840e-05, -2.660e-06,\n -7.3311801, 0.0154810, 1.000e-06,\n 251.9861145, 15.0033817, 0.000e-00,\n 0.5388340, 0.0000656, -1.280e-05,\n -0.0072680, 0.0000653, -1.280e-05,\n 0.0047204, 0.0046968,\n// 2147 8 26\n2505472.839752, 8.0, -4.0, 4.0, 321.7, 321.7,\n 0.0113810, 0.4872724, -1.630e-05, -5.450e-06,\n 0.3360460, -0.1334938, -7.000e-05, 1.430e-06,\n 10.4421902, -0.0141260, -2.000e-06,\n 299.4717407, 15.0041418, 0.000e-00,\n 0.5672400, 0.0000016, -9.700e-06,\n 0.0209970, 0.0000016, -9.700e-06,\n 0.0046251, 0.0046020,\n// 2148 2 19\n2505650.387496, 21.0, -4.0, 4.0, 323.0, 323.0,\n 0.0694580, 0.5606196, -1.880e-05, -9.430e-06,\n -0.9250060, 0.1513482, 1.288e-04, -2.450e-06,\n -11.2418404, 0.0144790, 2.000e-06,\n 131.6028442, 15.0023479, 0.000e-00,\n 0.5382780, -0.0000375, -1.300e-05,\n -0.0078200, -0.0000373, -1.290e-05,\n 0.0047314, 0.0047079,\n// 2148 8 14\n2505826.890524, 9.0, -4.0, 4.0, 324.3, 324.3,\n 0.0555730, 0.5045872, -3.530e-05, -6.070e-06,\n 1.0813760, -0.1183874, -1.218e-04, 1.370e-06,\n 14.1305599, -0.0126510, -3.000e-06,\n 313.7921753, 15.0032787, 0.000e-00,\n 0.5603180, 0.0000991, -1.020e-05,\n 0.0141100, 0.0000986, -1.010e-05,\n 0.0046151, 0.0045921,\n// 2149 1 9\n2505975.396271, 22.0, -4.0, 4.0, 325.4, 325.4,\n 0.2068070, 0.5363107, 3.000e-06, -7.180e-06,\n 1.1913480, 0.0254440, 1.011e-04, -2.700e-07,\n -21.9621906, 0.0061000, 6.000e-06,\n 148.2346954, 14.9971914, 0.000e-00,\n 0.5587060, -0.0001321, -1.120e-05,\n 0.0125060, -0.0001315, -1.110e-05,\n 0.0047550, 0.0047313,\n// 2149 7 5\n2506151.833032, 8.0, -4.0, 4.0, 326.7, 326.7,\n 0.0000300, 0.5659017, -1.520e-05, -8.780e-06,\n -0.8543690, -0.0026943, -1.113e-04, -7.000e-08,\n 22.7266808, -0.0040190, -5.000e-06,\n 298.7702026, 14.9996710, 0.000e-00,\n 0.5377540, 0.0001002, -1.200e-05,\n -0.0083420, 0.0000997, -1.200e-05,\n 0.0045988, 0.0045759,\n// 2149 12 30\n2506329.550743, 1.0, -4.0, 4.0, 328.0, 328.0,\n -0.0913320, 0.5083068, 1.850e-05, -5.820e-06,\n 0.5290050, -0.0188426, 1.352e-04, 3.100e-07,\n -23.1501503, 0.0027480, 6.000e-06,\n 194.4837036, 14.9963446, 0.000e-00,\n 0.5726050, -0.0000598, -1.010e-05,\n 0.0263350, -0.0000595, -1.000e-05,\n 0.0047554, 0.0047317,\n// 2150 6 25\n2506506.512099, 0.0, -4.0, 4.0, 329.0, 329.0,\n -0.1625960, 0.5824929, 1.830e-05, -9.920e-06,\n -0.1030050, 0.0420558, -1.625e-04, -8.400e-07,\n 23.3728199, -0.0011560, -6.000e-06,\n 179.2813721, 14.9992781, 0.000e-00,\n 0.5303370, 0.0000219, -1.280e-05,\n -0.0157220, 0.0000218, -1.270e-05,\n 0.0046001, 0.0045771,\n// 2150 12 19\n2506683.511824, 0.0, -4.0, 4.0, 330.0, 330.0,\n -0.1611960, 0.5011875, 1.880e-05, -5.610e-06,\n -0.1346130, -0.0625008, 1.612e-04, 8.100e-07,\n -23.3847294, -0.0008170, 6.000e-06,\n 180.8758240, 14.9962311, 0.000e-00,\n 0.5743160, 0.0000463, -9.900e-06,\n 0.0280380, 0.0000460, -9.900e-06,\n 0.0047520, 0.0047283,\n// 2151 6 14\n2506861.217879, 17.0, -4.0, 4.0, 331.1, 331.1,\n -0.2259500, 0.5677337, 4.770e-05, -9.160e-06,\n 0.6298370, 0.0839664, -1.977e-04, -1.500e-06,\n 23.2571507, 0.0017630, -5.000e-06,\n 74.8557587, 14.9992399, 0.000e-00,\n 0.5348390, -0.0000766, -1.240e-05,\n -0.0112420, -0.0000762, -1.230e-05,\n 0.0046042, 0.0045812,\n// 2151 12 8\n2507037.596187, 2.0, -4.0, 4.0, 332.1, 332.1,\n -0.3302220, 0.5175270, 2.850e-05, -6.590e-06,\n -0.7808970, -0.1085146, 1.903e-04, 1.500e-06,\n -22.6444798, -0.0042530, 6.000e-06,\n 212.1734009, 14.9968910, 0.000e-00,\n 0.5623570, 0.0001226, -1.080e-05,\n 0.0161380, 0.0001220, -1.080e-05,\n 0.0047451, 0.0047215,\n// 2152 5 4\n2507186.259749, 18.0, -4.0, 4.0, 332.9, 332.9,\n 0.3757970, 0.4847130, 3.700e-05, -6.000e-06,\n -1.2172040, 0.2027335, -3.510e-05, -2.650e-06,\n 16.2628899, 0.0113920, -4.000e-06,\n 90.7863617, 15.0020342, 0.000e-00,\n 0.5580820, -0.0001049, -1.050e-05,\n 0.0118850, -0.0001043, -1.040e-05,\n 0.0046393, 0.0046162,\n// 2152 6 3\n2507215.757863, 6.0, -4.0, 4.0, 333.1, 333.1,\n -0.4174980, 0.5301891, 6.920e-05, -7.250e-06,\n 1.4074100, 0.1178103, -2.104e-04, -1.780e-06,\n 22.3641796, 0.0046770, -5.000e-06,\n 270.3814392, 14.9995813, 0.000e-00,\n 0.5486650, -0.0001172, -1.110e-05,\n 0.0025150, -0.0001166, -1.100e-05,\n 0.0046111, 0.0045882,\n// 2152 10 28\n2507362.539979, 1.0, -4.0, 4.0, 334.0, 334.0,\n 0.5369430, 0.5223724, -2.200e-06, -8.480e-06,\n 1.0971720, -0.2433822, 2.310e-05, 4.170e-06,\n -13.2071896, -0.0132900, 3.000e-06,\n 199.0760956, 15.0021505, 0.000e-00,\n 0.5385490, 0.0000700, -1.270e-05,\n -0.0075510, 0.0000696, -1.270e-05,\n 0.0047026, 0.0046791,\n// 2152 11 26\n2507391.986896, 12.0, -4.0, 4.0, 334.1, 334.1,\n -0.2342620, 0.5411962, 3.950e-05, -8.250e-06,\n -1.4584740, -0.1551295, 2.250e-04, 2.500e-06,\n -21.0510693, -0.0072980, 5.000e-06,\n 3.1970201, 14.9981031, 0.000e-00,\n 0.5462320, 0.0000997, -1.220e-05,\n 0.0000940, 0.0000992, -1.210e-05,\n 0.0047357, 0.0047121,\n// 2153 4 23\n2507540.353753, 20.0, -4.0, 4.0, 335.0, 335.0,\n 0.0157990, 0.4561179, 3.420e-05, -5.040e-06,\n -0.6082470, 0.2177108, -4.240e-05, -2.560e-06,\n 12.8188295, 0.0132300, -3.000e-06,\n 120.4283371, 15.0029516, 0.000e-00,\n 0.5686580, -0.0000196, -9.800e-06,\n 0.0224080, -0.0000195, -9.700e-06,\n 0.0046535, 0.0046303,\n// 2153 10 17\n2507717.216870, 17.0, -4.0, 4.0, 336.0, 336.0,\n 0.1338110, 0.5178477, 2.460e-05, -8.650e-06,\n 0.5223640, -0.2654886, 2.500e-05, 4.640e-06,\n -9.5140800, -0.0144950, 2.000e-06,\n 78.6904984, 15.0033789, 0.000e-00,\n 0.5355740, -0.0000253, -1.290e-05,\n -0.0105110, -0.0000251, -1.290e-05,\n 0.0046885, 0.0046652,\n// 2154 4 12\n2507894.363206, 21.0, -4.0, 4.0, 337.1, 337.1,\n 0.0459260, 0.4548945, 1.310e-05, -5.230e-06,\n 0.2261470, 0.2367745, -5.880e-05, -2.890e-06,\n 8.9199896, 0.0145870, -2.000e-06,\n 134.8286133, 15.0037098, 0.000e-00,\n 0.5658680, 0.0000652, -1.010e-05,\n 0.0196320, 0.0000648, -1.000e-05,\n 0.0046679, 0.0046446,\n// 2154 10 7\n2508071.835994, 8.0, -4.0, 4.0, 338.1, 338.1,\n -0.1203970, 0.4920887, 3.720e-05, -7.300e-06,\n -0.1471470, -0.2666885, 3.210e-05, 4.160e-06,\n -5.5473800, -0.0152570, 1.000e-06,\n 303.0273132, 15.0042400, 0.000e-00,\n 0.5444650, -0.0001058, -1.190e-05,\n -0.0016640, -0.0001052, -1.190e-05,\n 0.0046747, 0.0046514,\n// 2155 4 2\n2508248.587897, 2.0, -4.0, 4.0, 339.1, 339.1,\n -0.4819390, 0.4762719, 2.040e-05, -6.460e-06,\n 0.7594520, 0.2598069, -6.840e-05, -3.690e-06,\n 4.7769299, 0.0154280, -1.000e-06,\n 209.0705719, 15.0041828, 0.000e-00,\n 0.5525190, 0.0001197, -1.120e-05,\n 0.0063490, 0.0001191, -1.120e-05,\n 0.0046819, 0.0046586,\n// 2155 9 26\n2508426.218371, 17.0, -4.0, 4.0, 340.2, 340.2,\n -0.5786030, 0.4604215, 4.260e-05, -5.690e-06,\n -0.7831690, -0.2549844, 3.530e-05, 3.340e-06,\n -1.3500800, -0.0155780, 0.000e-00,\n 77.1507111, 15.0047207, 0.000e-00,\n 0.5589670, -0.0000991, -1.060e-05,\n 0.0127660, -0.0000986, -1.050e-05,\n 0.0046609, 0.0046377,\n// 2156 2 21\n2508573.691690, 5.0, -4.0, 4.0, 341.1, 341.1,\n 0.6977970, 0.5209991, -7.550e-05, -8.710e-06,\n -0.8809280, 0.2592672, 1.152e-04, -4.550e-06,\n -10.7436304, 0.0143850, 2.000e-06,\n 251.6438599, 15.0024042, 0.000e-00,\n 0.5376730, 0.0000197, -1.300e-05,\n -0.0084230, 0.0000196, -1.300e-05,\n 0.0047301, 0.0047066,\n// 2156 8 16\n2508750.653791, 4.0, -4.0, 4.0, 342.1, 342.1,\n 0.6297560, 0.4591922, -6.070e-05, -5.090e-06,\n 0.9847900, -0.2132967, -1.086e-04, 2.520e-06,\n 13.5473404, -0.0127100, -3.000e-06,\n 238.8833313, 15.0033360, 0.000e-00,\n 0.5662710, 0.0000211, -9.700e-06,\n 0.0200330, 0.0000210, -9.700e-06,\n 0.0046168, 0.0045938,\n// 2157 2 9\n2508928.351115, 20.0, -4.0, 4.0, 343.1, 343.1,\n -0.0441510, 0.5245499, -3.010e-05, -8.510e-06,\n -0.4983370, 0.2372771, 1.217e-04, -4.040e-06,\n -14.3909998, 0.0129330, 3.000e-06,\n 116.5231400, 15.0011177, 0.000e-00,\n 0.5408360, -0.0000608, -1.280e-05,\n -0.0052750, -0.0000605, -1.270e-05,\n 0.0047398, 0.0047162,\n// 2157 8 5\n2509104.759948, 6.0, -4.0, 4.0, 344.2, 344.2,\n 0.0251100, 0.4872029, -5.590e-05, -6.050e-06,\n 0.3940400, -0.1987449, -1.080e-04, 2.630e-06,\n 16.8463001, -0.0108630, -4.000e-06,\n 268.4341125, 15.0023241, 0.000e-00,\n 0.5562160, 0.0001124, -1.040e-05,\n 0.0100290, 0.0001119, -1.040e-05,\n 0.0046085, 0.0045855,\n// 2158 1 30\n2509282.871258, 9.0, -4.0, 4.0, 345.2, 345.2,\n -0.0498760, 0.5080994, -2.300e-05, -7.040e-06,\n 0.2617950, 0.1989496, 1.036e-04, -2.940e-06,\n -17.6095791, 0.0109640, 4.000e-06,\n 311.7659302, 14.9996119, 0.000e-00,\n 0.5545080, -0.0001250, -1.150e-05,\n 0.0083290, -0.0001244, -1.150e-05,\n 0.0047479, 0.0047243,\n// 2158 7 25\n2509459.159221, 16.0, -4.0, 4.0, 346.3, 346.3,\n -0.0376840, 0.5291261, -5.520e-05, -7.870e-06,\n -0.4190120, -0.1809969, -9.770e-05, 2.850e-06,\n 19.5095005, -0.0086680, -4.000e-06,\n 58.2896385, 15.0013084, 0.000e-00,\n 0.5409170, 0.0001075, -1.170e-05,\n -0.0051940, 0.0001069, -1.170e-05,\n 0.0046023, 0.0045794,\n// 2159 1 19\n2509637.099612, 14.0, -4.0, 4.0, 347.3, 347.3,\n -0.4926800, 0.4896836, -8.500e-06, -5.710e-06,\n 0.8901530, 0.1551407, 9.290e-05, -1.970e-06,\n -20.3001595, 0.0083940, 5.000e-06,\n 27.4154301, 14.9980917, 0.000e-00,\n 0.5699530, -0.0000774, -1.030e-05,\n 0.0236960, -0.0000770, -1.020e-05,\n 0.0047536, 0.0047299,\n// 2159 6 16\n2509784.529670, 1.0, -4.0, 4.0, 348.2, 348.2,\n 0.2438870, 0.5835415, -2.020e-05, -9.960e-06,\n 1.3553110, -0.0325887, -2.464e-04, 6.700e-07,\n 23.3136501, 0.0016390, -5.000e-06,\n 194.7794952, 14.9992552, 0.000e-00,\n 0.5304160, -0.0000221, -1.280e-05,\n -0.0156430, -0.0000219, -1.270e-05,\n 0.0046034, 0.0045805,\n// 2159 7 15\n2509813.806140, 7.0, -4.0, 4.0, 348.4, 348.4,\n -0.4877280, 0.5622145, -1.800e-05, -9.450e-06,\n -1.0379370, -0.1507365, -8.610e-05, 2.680e-06,\n 21.5113392, -0.0061950, -5.000e-06,\n 283.4326782, 15.0003757, 0.000e-00,\n 0.5309070, 0.0000460, -1.270e-05,\n -0.0151550, 0.0000458, -1.270e-05,\n 0.0045989, 0.0045760,\n// 2159 12 9\n2509961.290656, 19.0, -4.0, 4.0, 349.2, 349.2,\n 0.0168280, 0.5098869, -1.130e-05, -5.870e-06,\n -1.3662950, 0.0016727, 2.094e-04, -1.200e-07,\n -22.8223095, -0.0039710, 6.000e-06,\n 106.9791489, 14.9967299, 0.000e-00,\n 0.5717290, 0.0000681, -1.010e-05,\n 0.0254640, 0.0000678, -1.000e-05,\n 0.0047467, 0.0047230,\n// 2160 6 4\n2510139.207364, 17.0, -4.0, 4.0, 350.3, 350.3,\n 0.0028690, 0.5662925, 1.710e-05, -8.810e-06,\n 0.6646320, 0.0087728, -1.906e-04, -5.000e-08,\n 22.5377197, 0.0045170, -5.000e-06,\n 75.3126526, 14.9995861, 0.000e-00,\n 0.5383110, -0.0001020, -1.210e-05,\n -0.0077880, -0.0001014, -1.200e-05,\n 0.0046097, 0.0045868,\n// 2160 11 27\n2510315.457313, 23.0, -4.0, 4.0, 351.4, 351.4,\n -0.0332350, 0.5371216, -5.600e-06, -7.240e-06,\n -0.6239520, -0.0399899, 1.795e-04, 4.300e-07,\n -21.3236809, -0.0071560, 5.000e-06,\n 168.0727539, 14.9979038, 0.000e-00,\n 0.5573370, 0.0001227, -1.120e-05,\n 0.0111430, 0.0001221, -1.110e-05,\n 0.0047376, 0.0047140,\n// 2161 5 25\n2510493.670636, 4.0, -4.0, 4.0, 352.4, 352.4,\n -0.0424420, 0.5310672, 3.020e-05, -6.920e-06,\n -0.0990250, 0.0457668, -1.279e-04, -5.200e-07,\n 20.9907207, 0.0072770, -5.000e-06,\n 240.7013092, 15.0002451, 0.000e-00,\n 0.5535670, -0.0001152, -1.070e-05,\n 0.0073930, -0.0001146, -1.070e-05,\n 0.0046188, 0.0045958,\n// 2161 11 17\n2510669.930213, 10.0, -4.0, 4.0, 353.5, 353.5,\n -0.1693720, 0.5650780, 1.430e-05, -9.040e-06,\n 0.1264830, -0.0810423, 1.309e-04, 1.210e-06,\n -19.0764294, -0.0098410, 5.000e-06,\n 333.7964478, 14.9994164, 0.000e-00,\n 0.5421740, 0.0000976, -1.250e-05,\n -0.0039440, 0.0000971, -1.250e-05,\n 0.0047263, 0.0047028,\n// 2162 5 14\n2510847.828308, 8.0, -4.0, 4.0, 354.5, 354.5,\n 0.1936090, 0.5021617, 1.690e-05, -5.710e-06,\n -0.8580850, 0.0770070, -7.580e-05, -8.000e-07,\n 18.6726398, 0.0098200, -4.000e-06,\n 300.8628235, 15.0011816, 0.000e-00,\n 0.5659780, -0.0000529, -9.800e-06,\n 0.0197420, -0.0000526, -9.800e-06,\n 0.0046299, 0.0046069,\n// 2162 11 7\n2511024.583103, 2.0, -4.0, 4.0, 355.6, 355.6,\n 0.1585990, 0.5713583, 1.460e-05, -9.730e-06,\n 0.7625330, -0.1163716, 6.740e-05, 1.890e-06,\n -16.2329693, -0.0120000, 4.000e-06,\n 214.1205444, 15.0009584, 0.000e-00,\n 0.5362970, -0.0000074, -1.310e-05,\n -0.0097920, -0.0000074, -1.300e-05,\n 0.0047141, 0.0046906,\n// 2163 4 3\n2511172.195731, 17.0, -4.0, 4.0, 356.5, 356.5,\n -0.2323000, 0.4962227, 7.700e-06, -6.020e-06,\n 1.2761900, 0.1542737, -8.920e-05, -1.790e-06,\n 5.4262099, 0.0155750, -1.000e-06,\n 74.1862030, 15.0041857, 0.000e-00,\n 0.5632030, 0.0000856, -1.030e-05,\n 0.0169800, 0.0000852, -1.030e-05,\n 0.0046803, 0.0046570,\n// 2163 9 28\n2511349.774009, 7.0, -4.0, 4.0, 357.5, 357.5,\n -0.1418650, 0.5241943, 2.780e-05, -7.510e-06,\n -1.2085860, -0.1676797, 6.360e-05, 2.350e-06,\n -1.9888800, -0.0157690, 0.000e-00,\n 287.2918091, 15.0048180, 0.000e-00,\n 0.5478790, -0.0001252, -1.150e-05,\n 0.0017330, -0.0001246, -1.150e-05,\n 0.0046624, 0.0046391,\n// 2163 10 27\n2511379.222827, 17.0, -4.0, 4.0, 357.7, 357.7,\n 0.1792560, 0.5485377, 2.360e-05, -8.550e-06,\n 1.4940990, -0.1404587, -1.500e-06, 2.090e-06,\n -12.8719301, -0.0136750, 3.000e-06,\n 79.0547180, 15.0023489, 0.000e-00,\n 0.5427840, -0.0000876, -1.230e-05,\n -0.0033370, -0.0000872, -1.220e-05,\n 0.0047011, 0.0046777,\n// 2164 3 23\n2511526.501929, 0.0, -4.0, 4.0, 358.6, 358.6,\n -0.1796660, 0.5259620, -4.600e-06, -7.620e-06,\n 0.4775060, 0.1683301, -3.750e-05, -2.350e-06,\n 1.1603000, 0.0160220, 0.000e-00,\n 178.3859711, 15.0043449, 0.000e-00,\n 0.5487730, 0.0001158, -1.170e-05,\n 0.0026230, 0.0001152, -1.160e-05,\n 0.0046944, 0.0046710,\n// 2164 9 16\n2511704.075234, 14.0, -4.0, 4.0, 359.7, 359.7,\n -0.0514650, 0.4941436, 1.080e-05, -5.950e-06,\n -0.4960730, -0.1565497, 3.200e-06, 1.820e-06,\n 2.2546501, -0.0156870, -1.000e-06,\n 31.3169994, 15.0049505, 0.000e-00,\n 0.5621090, -0.0000919, -1.020e-05,\n 0.0158920, -0.0000914, -1.020e-05,\n 0.0046491, 0.0046260,\n// 2165 3 12\n2511881.073495, 14.0, -4.0, 4.0, 360.7, 360.7,\n 0.1945890, 0.5520486, -2.330e-05, -9.200e-06,\n -0.1618560, 0.1746240, 2.540e-05, -2.830e-06,\n -3.0526900, 0.0159940, 0.000e-00,\n 27.6378307, 15.0040989, 0.000e-00,\n 0.5377960, 0.0000461, -1.290e-05,\n -0.0083000, 0.0000459, -1.280e-05,\n 0.0047076, 0.0046841,\n// 2165 9 5\n2512058.119967, 15.0, -4.0, 4.0, 361.8, 361.8,\n 0.1319800, 0.4834861, -1.610e-05, -5.400e-06,\n 0.2264290, -0.1457850, -4.350e-05, 1.570e-06,\n 6.5026898, -0.0151230, -1.000e-06,\n 45.3246002, 15.0047169, 0.000e-00,\n 0.5679660, 0.0000029, -9.700e-06,\n 0.0217200, 0.0000029, -9.700e-06,\n 0.0046362, 0.0046131,\n// 2166 3 2\n2512235.745380, 6.0, -4.0, 4.0, 362.9, 362.9,\n 0.3202620, 0.5553284, -2.470e-05, -9.310e-06,\n -0.8390100, 0.1675369, 9.640e-05, -2.710e-06,\n -7.1653500, 0.0155080, 1.000e-06,\n 267.0192261, 15.0034151, 0.000e-00,\n 0.5379620, -0.0000536, -1.290e-05,\n -0.0081350, -0.0000533, -1.290e-05,\n 0.0047202, 0.0046967,\n// 2166 8 25\n2512412.176100, 16.0, -4.0, 4.0, 364.0, 364.0,\n 0.1489110, 0.5010825, -3.640e-05, -6.070e-06,\n 0.9858410, -0.1376582, -9.520e-05, 1.620e-06,\n 10.5280399, -0.0140830, -2.000e-06,\n 59.4416618, 15.0041647, 0.000e-00,\n 0.5601510, 0.0001008, -1.020e-05,\n 0.0139440, 0.0001003, -1.020e-05,\n 0.0046241, 0.0046011,\n// 2167 1 21\n2512560.747516, 6.0, -4.0, 4.0, 364.9, 364.9,\n -0.1117290, 0.5313127, 6.900e-06, -7.040e-06,\n 1.1844040, 0.0645471, 8.430e-05, -7.900e-07,\n -19.9272099, 0.0090650, 5.000e-06,\n 267.2969971, 14.9984179, 0.000e-00,\n 0.5594390, -0.0001224, -1.110e-05,\n 0.0132350, -0.0001217, -1.110e-05,\n 0.0047526, 0.0047289,\n// 2167 7 16\n2512737.137365, 15.0, -4.0, 4.0, 365.9, 365.9,\n -0.2403500, 0.5659385, -1.350e-05, -8.870e-06,\n -0.9102330, -0.0443194, -9.420e-05, 5.900e-07,\n 21.2830696, -0.0067990, -5.000e-06,\n 43.3934708, 15.0005064, 0.000e-00,\n 0.5370050, 0.0001044, -1.210e-05,\n -0.0090870, 0.0001039, -1.200e-05,\n 0.0045995, 0.0045766,\n// 2168 1 10\n2512914.888231, 9.0, -4.0, 4.0, 367.0, 367.0,\n -0.1845200, 0.5072786, 9.100e-06, -5.780e-06,\n 0.5260710, 0.0222142, 1.258e-04, -1.700e-07,\n -21.9819298, 0.0060610, 6.000e-06,\n 313.2645874, 14.9970980, 0.000e-00,\n 0.5730760, -0.0000540, -1.010e-05,\n 0.0268040, -0.0000537, -1.000e-05,\n 0.0047557, 0.0047320,\n// 2168 7 5\n2513091.823187, 8.0, -4.0, 4.0, 368.1, 368.1,\n 0.1413170, 0.5842050, -9.400e-06, -9.970e-06,\n -0.1668010, -0.0033988, -1.529e-04, -5.000e-08,\n 22.6832905, -0.0041280, -5.000e-06,\n 298.7455750, 14.9997416, 0.000e-00,\n 0.5301740, 0.0000023, -1.280e-05,\n -0.0158840, 0.0000023, -1.270e-05,\n 0.0045985, 0.0045756,\n// 2168 12 29\n2513268.846904, 8.0, -4.0, 4.0, 369.2, 369.2,\n -0.1702870, 0.5052074, 5.200e-06, -5.690e-06,\n -0.1377180, -0.0202053, 1.602e-04, 3.200e-07,\n -23.1671600, 0.0026460, 6.000e-06,\n 299.5360107, 14.9963293, 0.000e-00,\n 0.5742100, 0.0000514, -1.000e-05,\n 0.0279330, 0.0000512, -9.900e-06,\n 0.0047551, 0.0047315,\n// 2169 6 25\n2513446.525804, 1.0, -4.0, 4.0, 370.2, 370.2,\n 0.1777550, 0.5711332, 1.550e-05, -9.170e-06,\n 0.5975750, 0.0387344, -1.982e-04, -7.500e-07,\n 23.3571091, -0.0012760, -5.000e-06,\n 194.2535858, 14.9992542, 0.000e-00,\n 0.5352160, -0.0000956, -1.230e-05,\n -0.0108670, -0.0000952, -1.220e-05,\n 0.0046004, 0.0045775,\n// 2169 12 18\n2513622.942443, 11.0, -4.0, 4.0, 371.3, 371.3,\n 0.0994280, 0.5263223, -6.000e-07, -6.770e-06,\n -0.8399570, -0.0652613, 2.012e-04, 9.400e-07,\n -23.3772697, -0.0008590, 6.000e-06,\n 345.9025879, 14.9963112, 0.000e-00,\n 0.5619910, 0.0001088, -1.090e-05,\n 0.0157740, 0.0001083, -1.080e-05,\n 0.0047510, 0.0047273,\n// 2170 5 16\n2513771.554552, 1.0, -4.0, 4.0, 372.2, 372.2,\n 0.2917620, 0.4939366, 4.140e-05, -6.070e-06,\n -1.3148690, 0.1741566, -5.290e-05, -2.270e-06,\n 19.0897102, 0.0091980, -5.000e-06,\n 195.8584747, 15.0009890, 0.000e-00,\n 0.5582240, -0.0000998, -1.040e-05,\n 0.0120260, -0.0000993, -1.030e-05,\n 0.0046279, 0.0046049,\n// 2170 6 14\n2513801.052205, 13.0, -4.0, 4.0, 372.4, 372.4,\n -0.3332520, 0.5356368, 5.440e-05, -7.260e-06,\n 1.3628230, 0.0767569, -2.177e-04, -1.190e-06,\n 23.2642498, 0.0017130, -5.000e-06,\n 14.8366404, 14.9991474, 0.000e-00,\n 0.5492680, -0.0001147, -1.100e-05,\n 0.0031150, -0.0001141, -1.090e-05,\n 0.0046050, 0.0045821,\n// 2170 11 8\n2513947.891052, 9.0, -4.0, 4.0, 373.3, 373.3,\n 0.2633150, 0.5343948, 1.820e-05, -8.740e-06,\n 1.2345270, -0.2179620, 4.160e-05, 3.770e-06,\n -16.6293297, -0.0114960, 4.000e-06,\n 319.1006470, 15.0006723, 0.000e-00,\n 0.5387880, 0.0000760, -1.280e-05,\n -0.0073130, 0.0000756, -1.270e-05,\n 0.0047157, 0.0046922,\n// 2170 12 7\n2513977.345227, 20.0, -4.0, 4.0, 373.5, 373.5,\n -0.4493950, 0.5530057, 4.070e-05, -8.530e-06,\n -1.3911220, -0.1134027, 2.392e-04, 1.870e-06,\n -22.6562099, -0.0041960, 6.000e-06,\n 122.1625824, 14.9969788, 0.000e-00,\n 0.5459570, 0.0001112, -1.230e-05,\n -0.0001790, 0.0001106, -1.220e-05,\n 0.0047442, 0.0047206,\n// 2171 5 5\n2514125.641150, 3.0, -4.0, 4.0, 374.4, 374.4,\n 0.0609440, 0.4654807, 3.700e-05, -5.150e-06,\n -0.6481580, 0.1964772, -6.240e-05, -2.320e-06,\n 16.1964092, 0.0114500, -4.000e-06,\n 225.7769165, 15.0019999, 0.000e-00,\n 0.5679910, -0.0000153, -9.700e-06,\n 0.0217450, -0.0000152, -9.700e-06,\n 0.0046404, 0.0046173,\n// 2171 10 29\n2514302.563231, 2.0, -4.0, 4.0, 375.5, 375.5,\n 0.4902680, 0.5264794, 1.750e-05, -8.780e-06,\n 0.3863690, -0.2461785, 5.820e-05, 4.310e-06,\n -13.3496504, -0.0132170, 3.000e-06,\n 214.0869446, 15.0021086, 0.000e-00,\n 0.5365520, -0.0000487, -1.300e-05,\n -0.0095390, -0.0000485, -1.290e-05,\n 0.0047028, 0.0046794,\n// 2172 4 23\n2514479.661983, 4.0, -4.0, 4.0, 376.6, 376.6,\n -0.0011220, 0.4639487, 2.240e-05, -5.390e-06,\n 0.1362690, 0.2219917, -7.720e-05, -2.740e-06,\n 12.7281504, 0.0132580, -3.000e-06,\n 240.4140472, 15.0029888, 0.000e-00,\n 0.5643580, 0.0000733, -1.010e-05,\n 0.0181290, 0.0000729, -1.000e-05,\n 0.0046538, 0.0046306,\n// 2172 10 17\n2514657.167782, 16.0, -4.0, 4.0, 377.7, 377.7,\n -0.0809300, 0.4964270, 4.730e-05, -7.300e-06,\n -0.1252830, -0.2542250, 5.530e-05, 3.940e-06,\n -9.6404400, -0.0144850, 2.000e-06,\n 63.7100182, 15.0032930, 0.000e-00,\n 0.5460820, -0.0001091, -1.190e-05,\n -0.0000560, -0.0001085, -1.180e-05,\n 0.0046892, 0.0046659,\n// 2173 4 12\n2514833.909487, 10.0, -4.0, 4.0, 378.8, 378.8,\n -0.3086580, 0.4835788, 2.450e-05, -6.630e-06,\n 0.7991630, 0.2507076, -9.310e-05, -3.600e-06,\n 8.8975096, 0.0145580, -2.000e-06,\n 329.8207092, 15.0037813, 0.000e-00,\n 0.5508190, 0.0001132, -1.130e-05,\n 0.0046580, 0.0001126, -1.120e-05,\n 0.0046675, 0.0046443,\n// 2173 10 7\n2515011.527241, 1.0, -4.0, 4.0, 379.9, 379.9,\n -0.2770760, 0.4613749, 4.270e-05, -5.650e-06,\n -0.8945010, -0.2493031, 6.150e-05, 3.250e-06,\n -5.5858698, -0.0152900, 1.000e-06,\n 198.0354004, 15.0041628, 0.000e-00,\n 0.5606000, -0.0001087, -1.050e-05,\n 0.0143900, -0.0001082, -1.050e-05,\n 0.0046752, 0.0046519,\n// 2174 3 3\n2515159.049935, 13.0, -4.0, 4.0, 380.8, 380.8,\n 0.4222760, 0.5142138, -4.930e-05, -8.610e-06,\n -1.0396791, 0.2735540, 9.730e-05, -4.800e-06,\n -6.6445498, 0.0153460, 1.000e-06,\n 12.0840902, 15.0034218, 0.000e-00,\n 0.5368620, 0.0000296, -1.300e-05,\n -0.0092290, 0.0000294, -1.300e-05,\n 0.0047188, 0.0046953,\n// 2174 4 1\n2515188.443856, 23.0, -4.0, 4.0, 381.0, 381.0,\n -0.5422830, 0.5058458, 3.650e-05, -8.150e-06,\n 1.4240381, 0.2731889, -1.102e-04, -4.570e-06,\n 4.8822498, 0.0153810, -1.000e-06,\n 164.0862122, 15.0042400, 0.000e-00,\n 0.5381840, 0.0000631, -1.260e-05,\n -0.0079150, 0.0000628, -1.250e-05,\n 0.0046814, 0.0046581,\n// 2174 8 27\n2515335.930498, 10.0, -4.0, 4.0, 381.9, 381.9,\n 0.4088960, 0.4516625, -4.720e-05, -5.010e-06,\n 1.1759180, -0.2294283, -9.430e-05, 2.710e-06,\n 9.8960600, -0.0140680, -2.000e-06,\n 329.5724487, 15.0041704, 0.000e-00,\n 0.5665970, 0.0000403, -9.700e-06,\n 0.0203580, 0.0000401, -9.700e-06,\n 0.0046259, 0.0046029,\n// 2175 2 21\n2515513.711394, 5.0, -4.0, 4.0, 383.0, 383.0,\n 0.1640440, 0.5135653, -3.070e-05, -8.270e-06,\n -0.4206360, 0.2579464, 9.110e-05, -4.360e-06,\n -10.6015596, 0.0144360, 2.000e-06,\n 251.6593170, 15.0024195, 0.000e-00,\n 0.5407810, -0.0000746, -1.270e-05,\n -0.0053300, -0.0000742, -1.270e-05,\n 0.0047305, 0.0047069,\n// 2175 8 16\n2515690.047423, 13.0, -4.0, 4.0, 384.1, 384.1,\n 0.1232550, 0.4788233, -5.560e-05, -5.990e-06,\n 0.4385660, -0.2223303, -8.800e-05, 2.960e-06,\n 13.6161098, -0.0126520, -3.000e-06,\n 13.8626604, 15.0033731, 0.000e-00,\n 0.5557910, 0.0001138, -1.050e-05,\n 0.0096050, 0.0001132, -1.050e-05,\n 0.0046156, 0.0045927,\n// 2176 2 10\n2515868.223165, 17.0, -4.0, 4.0, 385.2, 385.2,\n -0.2810480, 0.4952634, -8.900e-06, -6.780e-06,\n 0.1504740, 0.2249554, 8.370e-05, -3.270e-06,\n -14.3046198, 0.0130090, 3.000e-06,\n 71.5296707, 15.0010710, 0.000e-00,\n 0.5549640, -0.0001156, -1.140e-05,\n 0.0087820, -0.0001150, -1.140e-05,\n 0.0047407, 0.0047170,\n// 2176 8 4\n2516044.462446, 23.0, -4.0, 4.0, 386.3, 386.3,\n -0.1772450, 0.5195251, -4.790e-05, -7.790e-06,\n -0.2876040, -0.2120882, -8.190e-05, 3.350e-06,\n 16.8139095, -0.0108500, -4.000e-06,\n 163.4266968, 15.0024233, 0.000e-00,\n 0.5403390, 0.0001120, -1.180e-05,\n -0.0057700, 0.0001115, -1.180e-05,\n 0.0046075, 0.0045845,\n// 2177 1 29\n2516222.437852, 23.0, -4.0, 4.0, 387.4, 387.4,\n -0.1251710, 0.4775013, -2.220e-05, -5.520e-06,\n 1.0135781, 0.1864728, 6.670e-05, -2.330e-06,\n -17.6183491, 0.0109860, 4.000e-06,\n 161.7819672, 14.9995270, 0.000e-00,\n 0.5701670, -0.0000922, -1.020e-05,\n 0.0239090, -0.0000917, -1.020e-05,\n 0.0047487, 0.0047251,\n// 2177 6 26\n2516369.842680, 8.0, -4.0, 4.0, 388.3, 388.3,\n 0.0624270, 0.5789461, -2.400e-05, -9.850e-06,\n 1.4417020, -0.0780544, -2.499e-04, 1.450e-06,\n 23.3093204, -0.0013900, -5.000e-06,\n 299.1691284, 14.9993095, 0.000e-00,\n 0.5303610, -0.0000148, -1.280e-05,\n -0.0156980, -0.0000147, -1.270e-05,\n 0.0045999, 0.0045770,\n// 2177 7 25\n2516399.118440, 15.0, -4.0, 4.0, 388.5, 388.5,\n -0.2548600, 0.5513822, -3.260e-05, -9.280e-06,\n -1.0293190, -0.1884797, -6.710e-05, 3.340e-06,\n 19.4267597, -0.0087320, -4.000e-06,\n 43.2734795, 15.0014038, 0.000e-00,\n 0.5308410, 0.0000275, -1.280e-05,\n -0.0152200, 0.0000274, -1.270e-05,\n 0.0046019, 0.0045790,\n// 2177 12 20\n2516546.626097, 3.0, -4.0, 4.0, 389.4, 389.4,\n 0.1051440, 0.5089182, -2.890e-05, -5.890e-06,\n -1.3707830, 0.0440365, 2.142e-04, -6.300e-07,\n -23.4055099, -0.0005630, 6.000e-06,\n 225.6956024, 14.9962311, 0.000e-00,\n 0.5715640, 0.0000729, -1.010e-05,\n 0.0252990, 0.0000726, -1.010e-05,\n 0.0047520, 0.0047284,\n// 2178 6 16\n2516724.514378, 0.0, -4.0, 4.0, 390.5, 390.5,\n -0.1488740, 0.5635676, 1.170e-05, -8.670e-06,\n 0.7484510, -0.0347590, -2.018e-04, 6.300e-07,\n 23.3257294, 0.0015380, -5.000e-06,\n 179.7437592, 14.9991894, 0.000e-00,\n 0.5387980, -0.0000960, -1.200e-05,\n -0.0073030, -0.0000955, -1.190e-05,\n 0.0046040, 0.0045811,\n// 2178 12 9\n2516900.805584, 7.0, -4.0, 4.0, 391.6, 391.6,\n -0.1779920, 0.5403148, -1.180e-05, -7.360e-06,\n -0.6344730, 0.0019891, 1.936e-04, -1.400e-07,\n -22.8104191, -0.0040060, 6.000e-06,\n 287.0025635, 14.9968271, 0.000e-00,\n 0.5569280, 0.0001308, -1.130e-05,\n 0.0107360, 0.0001302, -1.120e-05,\n 0.0047456, 0.0047219,\n// 2179 6 5\n2517078.962228, 11.0, -4.0, 4.0, 392.7, 392.7,\n -0.0493670, 0.5311599, 2.050e-05, -6.850e-06,\n -0.0215330, 0.0070452, -1.450e-04, 0.000e-00,\n 22.5539093, 0.0044770, -5.000e-06,\n 345.2937927, 14.9994793, 0.000e-00,\n 0.5539900, -0.0001126, -1.060e-05,\n 0.0078130, -0.0001121, -1.060e-05,\n 0.0046107, 0.0045878,\n// 2179 11 28\n2517255.287707, 19.0, -4.0, 4.0, 393.9, 393.9,\n 0.0604770, 0.5705517, -4.300e-06, -9.180e-06,\n 0.0826020, -0.0412542, 1.539e-04, 5.600e-07,\n -21.3612900, -0.0070880, 5.000e-06,\n 108.0634613, 14.9979753, 0.000e-00,\n 0.5422140, 0.0000828, -1.260e-05,\n -0.0039040, 0.0000824, -1.260e-05,\n 0.0047367, 0.0047131,\n// 2180 5 24\n2517433.107263, 15.0, -4.0, 4.0, 395.0, 395.0,\n 0.2851150, 0.5055268, 7.500e-06, -5.730e-06,\n -0.7816520, 0.0440770, -9.660e-05, -4.200e-07,\n 20.9648609, 0.0073170, -5.000e-06,\n 45.7030487, 15.0001869, 0.000e-00,\n 0.5656930, -0.0000524, -9.800e-06,\n 0.0194590, -0.0000521, -9.700e-06,\n 0.0046198, 0.0045968,\n// 2180 11 17\n2517609.940295, 11.0, -4.0, 4.0, 396.1, 396.1,\n 0.3568650, 0.5769632, 2.500e-06, -9.820e-06,\n 0.7174020, -0.0819841, 9.550e-05, 1.300e-06,\n -19.1806507, -0.0097320, 5.000e-06,\n 348.7774658, 14.9993935, 0.000e-00,\n 0.5370050, -0.0000244, -1.310e-05,\n -0.0090870, -0.0000243, -1.300e-05,\n 0.0047261, 0.0047026,\n// 2181 4 14\n2517757.502840, 0.0, -4.0, 4.0, 397.0, 397.0,\n -0.4009790, 0.5013562, 1.940e-05, -6.150e-06,\n 1.2704730, 0.1436596, -1.134e-04, -1.680e-06,\n 9.4902697, 0.0146390, -2.000e-06,\n 179.9231567, 15.0037270, 0.000e-00,\n 0.5615220, 0.0000967, -1.040e-05,\n 0.0153070, 0.0000962, -1.030e-05,\n 0.0046660, 0.0046428,\n// 2181 5 13\n2517787.122025, 15.0, -4.0, 4.0, 397.2, 397.2,\n 0.2737450, 0.5036872, -1.500e-06, -5.780e-06,\n -1.5080470, 0.0791166, -5.310e-05, -8.500e-07,\n 18.5970707, 0.0098840, -4.000e-06,\n 45.8641701, 15.0012112, 0.000e-00,\n 0.5649920, 0.0000556, -9.900e-06,\n 0.0187610, 0.0000554, -9.800e-06,\n 0.0046305, 0.0046075,\n// 2181 10 8\n2517935.096949, 14.0, -4.0, 4.0, 398.1, 398.1,\n -0.5347590, 0.5241962, 5.220e-05, -7.410e-06,\n -1.1338609, -0.1606632, 8.540e-05, 2.230e-06,\n -6.1971898, -0.0154130, 1.000e-06,\n 33.1441193, 15.0041990, 0.000e-00,\n 0.5496670, -0.0001089, -1.150e-05,\n 0.0035120, -0.0001084, -1.140e-05,\n 0.0046767, 0.0046534,\n// 2181 11 7\n2517964.568322, 2.0, -4.0, 4.0, 398.3, 398.3,\n 0.4957510, 0.5528982, 1.160e-05, -8.560e-06,\n 1.4006370, -0.1137156, 3.020e-05, 1.660e-06,\n -16.3500900, -0.0119270, 4.000e-06,\n 214.1149597, 15.0008621, 0.000e-00,\n 0.5441400, -0.0001085, -1.220e-05,\n -0.0019880, -0.0001080, -1.220e-05,\n 0.0047145, 0.0046910,\n// 2182 4 3\n2518111.833137, 8.0, -4.0, 4.0, 399.3, 399.3,\n -0.1581480, 0.5295930, 2.500e-06, -7.750e-06,\n 0.5204550, 0.1637076, -6.490e-05, -2.310e-06,\n 5.4336200, 0.0155520, -1.000e-06,\n 299.1943665, 15.0042582, 0.000e-00,\n 0.5471220, 0.0001130, -1.170e-05,\n 0.0009800, 0.0001124, -1.170e-05,\n 0.0046801, 0.0046568,\n// 2182 9 27\n2518289.374134, 21.0, -4.0, 4.0, 400.4, 400.4,\n -0.1548820, 0.4925032, 2.140e-05, -5.870e-06,\n -0.5238260, -0.1562104, 2.770e-05, 1.800e-06,\n -1.9850000, -0.0157930, 0.000e-00,\n 137.2859497, 15.0047474, 0.000e-00,\n 0.5636760, -0.0000841, -1.020e-05,\n 0.0174510, -0.0000837, -1.010e-05,\n 0.0046627, 0.0046395,\n// 2183 3 23\n2518466.421402, 22.0, -4.0, 4.0, 401.5, 401.5,\n -0.0065790, 0.5524853, -3.900e-06, -9.250e-06,\n -0.1960960, 0.1764055, 3.000e-07, -2.870e-06,\n 1.2838300, 0.0159970, 0.000e-00,\n 148.4145355, 15.0044060, 0.000e-00,\n 0.5366890, 0.0000497, -1.290e-05,\n -0.0094020, 0.0000495, -1.280e-05,\n 0.0046938, 0.0046704,\n// 2183 9 16\n2518643.404591, 22.0, -4.0, 4.0, 402.6, 402.6,\n 0.1960450, 0.4813842, -1.250e-05, -5.380e-06,\n 0.1349090, -0.1520650, -1.740e-05, 1.640e-06,\n 2.3564401, -0.0156850, -1.000e-06,\n 151.2935638, 15.0049248, 0.000e-00,\n 0.5687350, 0.0000062, -9.700e-06,\n 0.0224850, 0.0000062, -9.700e-06,\n 0.0046488, 0.0046256,\n// 2184 3 12\n2518821.098978, 14.0, -4.0, 4.0, 403.8, 403.8,\n 0.0586120, 0.5519804, -2.900e-06, -9.210e-06,\n -0.9001920, 0.1758772, 7.180e-05, -2.840e-06,\n -2.8939700, 0.0160000, 0.000e-00,\n 27.6647491, 15.0041142, 0.000e-00,\n 0.5376300, -0.0000464, -1.290e-05,\n -0.0084650, -0.0000461, -1.280e-05,\n 0.0047073, 0.0046838,\n// 2184 9 4\n2518997.465975, 23.0, -4.0, 4.0, 404.9, 404.9,\n 0.1745360, 0.4987153, -3.270e-05, -6.090e-06,\n 0.9068440, -0.1508587, -6.900e-05, 1.790e-06,\n 6.6001401, -0.0150880, -1.000e-06,\n 165.3023529, 15.0047483, 0.000e-00,\n 0.5600800, 0.0001043, -1.030e-05,\n 0.0138730, 0.0001038, -1.030e-05,\n 0.0046353, 0.0046122,\n// 2185 1 31\n2519146.097453, 14.0, -4.0, 4.0, 405.8, 405.8,\n -0.3975950, 0.5245513, 1.390e-05, -6.880e-06,\n 1.1456790, 0.0977825, 6.360e-05, -1.230e-06,\n -17.1458092, 0.0115620, 4.000e-06,\n 26.7162609, 14.9998808, 0.000e-00,\n 0.5599920, -0.0001131, -1.100e-05,\n 0.0137850, -0.0001125, -1.100e-05,\n 0.0047473, 0.0047237,\n// 2185 7 26\n2519322.443246, 23.0, -4.0, 4.0, 407.0, 407.0,\n 0.0605450, 0.5633873, -3.360e-05, -8.900e-06,\n -1.0160370, -0.0819977, -6.960e-05, 1.190e-06,\n 19.1125202, -0.0092900, -4.000e-06,\n 163.2777405, 15.0015783, 0.000e-00,\n 0.5365170, 0.0000851, -1.220e-05,\n -0.0095720, 0.0000846, -1.210e-05,\n 0.0046027, 0.0045798,\n// 2186 1 20\n2519500.224813, 17.0, -4.0, 4.0, 408.1, 408.1,\n -0.2628220, 0.5035009, 2.600e-06, -5.710e-06,\n 0.5153540, 0.0594115, 1.092e-04, -6.000e-07,\n -19.9573898, 0.0090380, 5.000e-06,\n 72.3162918, 14.9983244, 0.000e-00,\n 0.5733440, -0.0000484, -1.000e-05,\n 0.0270710, -0.0000482, -1.000e-05,\n 0.0047534, 0.0047297,\n// 2186 7 16\n2519677.135349, 15.0, -4.0, 4.0, 409.2, 409.2,\n -0.1635330, 0.5824860, -3.600e-06, -9.950e-06,\n -0.2274670, -0.0459145, -1.356e-04, 6.800e-07,\n 21.2110405, -0.0068970, -5.000e-06,\n 43.3726616, 15.0005875, 0.000e-00,\n 0.5301670, 0.0000090, -1.280e-05,\n -0.0158910, 0.0000090, -1.280e-05,\n 0.0045992, 0.0045763,\n// 2187 1 9\n2519854.183117, 16.0, -4.0, 4.0, 410.4, 410.4,\n -0.1940770, 0.5058353, -6.800e-06, -5.720e-06,\n -0.1446520, 0.0207720, 1.502e-04, -1.500e-07,\n -22.0251007, 0.0059680, 6.000e-06,\n 58.3092918, 14.9970617, 0.000e-00,\n 0.5739180, 0.0000570, -1.000e-05,\n 0.0276410, 0.0000567, -9.900e-06,\n 0.0047559, 0.0047322,\n// 2187 7 6\n2520031.832303, 8.0, -4.0, 4.0, 411.5, 411.5,\n 0.0188610, 0.5708380, 1.060e-05, -9.090e-06,\n 0.5107090, -0.0053128, -1.875e-04, -3.000e-08,\n 22.6379108, -0.0042360, -5.000e-06,\n 298.7127380, 14.9997377, 0.000e-00,\n 0.5358130, -0.0000907, -1.220e-05,\n -0.0102730, -0.0000903, -1.220e-05,\n 0.0045986, 0.0045757,\n// 2187 12 29\n2520208.291006, 19.0, -4.0, 4.0, 412.6, 412.6,\n -0.0236220, 0.5315852, -1.030e-05, -6.910e-06,\n -0.8122960, -0.0209806, 1.988e-04, 3.600e-07,\n -23.1729202, 0.0025980, 6.000e-06,\n 104.5679398, 14.9963942, 0.000e-00,\n 0.5613660, 0.0001177, -1.100e-05,\n 0.0151520, 0.0001171, -1.090e-05,\n 0.0047546, 0.0047309,\n// 2188 5 26\n2520356.844360, 8.0, -4.0, 4.0, 413.6, 413.6,\n 0.2462930, 0.5028651, 3.990e-05, -6.140e-06,\n -1.3960620, 0.1404328, -6.860e-05, -1.830e-06,\n 21.2726707, 0.0066380, -5.000e-06,\n 300.6466675, 15.0000353, 0.000e-00,\n 0.5584210, -0.0000968, -1.030e-05,\n 0.0122220, -0.0000964, -1.030e-05,\n 0.0046180, 0.0045950,\n// 2188 6 24\n2520386.343501, 20.0, -4.0, 4.0, 413.8, 413.8,\n -0.2157640, 0.5379561, 3.640e-05, -7.220e-06,\n 1.3141280, 0.0344722, -2.172e-04, -6.000e-07,\n 23.3472805, -0.0013230, -5.000e-06,\n 119.2300720, 14.9991741, 0.000e-00,\n 0.5499830, -0.0001135, -1.090e-05,\n 0.0038260, -0.0001130, -1.090e-05,\n 0.0046010, 0.0045780,\n// 2188 11 18\n2520533.246812, 18.0, -4.0, 4.0, 414.7, 414.7,\n 0.4453690, 0.5474325, 1.140e-05, -9.010e-06,\n 1.1785520, -0.1851798, 6.910e-05, 3.240e-06,\n -19.4975700, -0.0091570, 5.000e-06,\n 93.7124786, 14.9991302, 0.000e-00,\n 0.5390470, 0.0000591, -1.290e-05,\n -0.0070560, 0.0000588, -1.280e-05,\n 0.0047275, 0.0047039,\n// 2188 12 18\n2520562.706241, 5.0, -4.0, 4.0, 414.9, 414.9,\n -0.1431280, 0.5619573, 1.340e-05, -8.750e-06,\n -1.4351840, -0.0672242, 2.506e-04, 1.150e-06,\n -23.3768501, -0.0008090, 6.000e-06,\n 255.8943939, 14.9964066, 0.000e-00,\n 0.5456590, 0.0000995, -1.240e-05,\n -0.0004760, 0.0000990, -1.230e-05,\n 0.0047502, 0.0047265,\n// 2189 5 15\n2520710.922612, 10.0, -4.0, 4.0, 415.9, 415.9,\n 0.1647170, 0.4758093, 3.410e-05, -5.270e-06,\n -0.6767460, 0.1696401, -8.160e-05, -2.020e-06,\n 19.0354595, 0.0092590, -4.000e-06,\n 330.8530884, 15.0009565, 0.000e-00,\n 0.5673860, -0.0000134, -9.700e-06,\n 0.0211420, -0.0000133, -9.700e-06,\n 0.0046290, 0.0046059,\n// 2189 11 8\n2520887.914907, 10.0, -4.0, 4.0, 417.0, 417.0,\n 0.2434310, 0.5371837, 3.690e-05, -8.940e-06,\n 0.5303670, -0.2197328, 7.720e-05, 3.850e-06,\n -16.7509804, -0.0114030, 4.000e-06,\n 334.0992126, 15.0006247, 0.000e-00,\n 0.5375380, -0.0000429, -1.290e-05,\n -0.0085570, -0.0000427, -1.290e-05,\n 0.0047157, 0.0046922,\n// 2190 5 4\n2521064.955904, 11.0, -4.0, 4.0, 418.2, 418.2,\n 0.0039910, 0.4750143, 2.680e-05, -5.570e-06,\n 0.0676830, 0.2012218, -9.610e-05, -2.520e-06,\n 16.1178398, 0.0114900, -4.000e-06,\n 345.7666016, 15.0020380, 0.000e-00,\n 0.5629040, 0.0000791, -1.010e-05,\n 0.0166830, 0.0000787, -1.010e-05,\n 0.0046411, 0.0046180,\n// 2190 10 29\n2521242.504049, 0.0, -4.0, 4.0, 419.3, 419.3,\n -0.0980270, 0.5035744, 5.770e-05, -7.340e-06,\n -0.0823120, -0.2351297, 7.860e-05, 3.620e-06,\n -13.4503698, -0.0131930, 3.000e-06,\n 184.0954895, 15.0020218, 0.000e-00,\n 0.5476730, -0.0001097, -1.180e-05,\n 0.0015270, -0.0001091, -1.180e-05,\n 0.0047030, 0.0046796,\n// 2191 4 23\n2521419.226457, 17.0, -4.0, 4.0, 420.5, 420.5,\n -0.5585810, 0.4936553, 4.380e-05, -6.870e-06,\n 0.6189640, 0.2354245, -1.082e-04, -3.440e-06,\n 12.7069798, 0.0132360, -3.000e-06,\n 75.4079666, 15.0030565, 0.000e-00,\n 0.5490500, 0.0001266, -1.140e-05,\n 0.0028970, 0.0001260, -1.130e-05,\n 0.0046538, 0.0046306,\n// 2191 10 18\n2521596.841109, 8.0, -4.0, 4.0, 421.6, 421.6,\n -0.4863950, 0.4653542, 6.050e-05, -5.640e-06,\n -0.7378170, -0.2377489, 7.820e-05, 3.070e-06,\n -9.6608601, -0.0145140, 2.000e-06,\n 303.7149048, 15.0032187, 0.000e-00,\n 0.5623240, -0.0000947, -1.050e-05,\n 0.0161060, -0.0000942, -1.040e-05,\n 0.0046894, 0.0046661,\n// 2192 3 13\n2521744.402773, 22.0, -4.0, 4.0, 422.6, 422.6,\n 0.7193720, 0.5107207, -5.030e-05, -8.570e-06,\n -0.9048090, 0.2809115, 6.510e-05, -4.930e-06,\n -2.3447599, 0.0157760, 0.000e-00,\n 147.7639618, 15.0040722, 0.000e-00,\n 0.5360190, 0.0000099, -1.300e-05,\n -0.0100680, 0.0000098, -1.300e-05,\n 0.0047057, 0.0046823,\n// 2192 4 12\n2521773.779119, 7.0, -4.0, 4.0, 422.8, 422.8,\n -0.5156980, 0.5127853, 4.740e-05, -8.320e-06,\n 1.3851080, 0.2630429, -1.325e-04, -4.440e-06,\n 8.9947205, 0.0145020, -2.000e-06,\n 284.8376770, 15.0038290, 0.000e-00,\n 0.5368920, 0.0000595, -1.260e-05,\n -0.0091990, 0.0000592, -1.260e-05,\n 0.0046670, 0.0046438,\n// 2192 9 6\n2521921.211902, 17.0, -4.0, 4.0, 423.7, 423.7,\n 0.5792020, 0.4464187, -4.450e-05, -4.960e-06,\n 1.1682390, -0.2401509, -7.320e-05, 2.840e-06,\n 5.9226198, -0.0150050, -1.000e-06,\n 75.4539337, 15.0046892, 0.000e-00,\n 0.5670500, 0.0000420, -9.800e-06,\n 0.0208080, 0.0000418, -9.700e-06,\n 0.0046374, 0.0046143,\n// 2193 3 3\n2522099.066763, 14.0, -4.0, 4.0, 424.9, 424.9,\n 0.4226710, 0.5054527, -3.090e-05, -8.090e-06,\n -0.3052940, 0.2712302, 5.950e-05, -4.550e-06,\n -6.4812698, 0.0153800, 1.000e-06,\n 27.1196308, 15.0034294, 0.000e-00,\n 0.5406130, -0.0000911, -1.260e-05,\n -0.0054970, -0.0000906, -1.260e-05,\n 0.0047187, 0.0046952,\n// 2193 8 26\n2522275.339810, 20.0, -4.0, 4.0, 426.0, 426.0,\n 0.1624140, 0.4720910, -5.000e-05, -5.950e-06,\n 0.5008220, -0.2401320, -6.850e-05, 3.210e-06,\n 9.9573202, -0.0140220, -2.000e-06,\n 119.5483398, 15.0042076, 0.000e-00,\n 0.5554860, 0.0001173, -1.060e-05,\n 0.0093020, 0.0001167, -1.060e-05,\n 0.0046252, 0.0046022,\n// 2194 2 21\n2522453.570502, 2.0, -4.0, 4.0, 427.2, 427.2,\n 0.0413610, 0.4843150, -1.360e-05, -6.570e-06,\n 0.2891180, 0.2440055, 5.290e-05, -3.500e-06,\n -10.5078001, 0.0144990, 2.000e-06,\n 206.6796570, 15.0023727, 0.000e-00,\n 0.5551530, -0.0001311, -1.130e-05,\n 0.0089700, -0.0001305, -1.130e-05,\n 0.0047309, 0.0047073,\n// 2194 8 16\n2522629.769539, 6.0, -4.0, 4.0, 428.4, 428.4,\n -0.3496660, 0.5105500, -3.480e-05, -7.730e-06,\n -0.1259490, -0.2372439, -6.650e-05, 3.770e-06,\n 13.5783997, -0.0126320, -3.000e-06,\n 268.8571472, 15.0034637, 0.000e-00,\n 0.5399040, 0.0001186, -1.190e-05,\n -0.0062030, 0.0001180, -1.190e-05,\n 0.0046149, 0.0045920,\n// 2195 2 10\n2522807.773927, 7.0, -4.0, 4.0, 429.5, 429.5,\n -0.2060340, 0.4660007, -1.550e-05, -5.350e-06,\n 0.9822920, 0.2112432, 4.450e-05, -2.600e-06,\n -14.3132000, 0.0130370, 3.000e-06,\n 281.5379333, 15.0009918, 0.000e-00,\n 0.5702840, -0.0000873, -1.020e-05,\n 0.0240260, -0.0000868, -1.010e-05,\n 0.0047414, 0.0047178,\n// 2195 7 7\n2522955.153713, 16.0, -4.0, 4.0, 430.5, 430.5,\n 0.4934200, 0.5708120, -5.700e-05, -9.680e-06,\n 1.4380670, -0.1223385, -2.402e-04, 2.210e-06,\n 22.4861698, -0.0043410, -5.000e-06,\n 58.6519394, 14.9998293, 0.000e-00,\n 0.5304340, -0.0000343, -1.280e-05,\n -0.0156250, -0.0000341, -1.270e-05,\n 0.0045984, 0.0045755,\n// 2195 8 5\n2522984.431284, 22.0, -4.0, 4.0, 430.7, 430.7,\n -0.5612500, 0.5400328, -1.520e-05, -9.100e-06,\n -0.8341510, -0.2202577, -5.520e-05, 3.890e-06,\n 16.7126694, -0.0108970, -4.000e-06,\n 148.4261475, 15.0025148, 0.000e-00,\n 0.5309000, 0.0000347, -1.280e-05,\n -0.0151610, 0.0000346, -1.270e-05,\n 0.0046071, 0.0045842,\n// 2195 12 31\n2523131.964836, 11.0, -4.0, 4.0, 431.7, 431.7,\n 0.1549680, 0.5044335, -4.470e-05, -5.860e-06,\n -1.3732890, 0.0866259, 2.094e-04, -1.140e-06,\n -23.0534706, 0.0028920, 6.000e-06,\n 344.3586121, 14.9963961, 0.000e-00,\n 0.5712300, 0.0000791, -1.020e-05,\n 0.0249670, 0.0000788, -1.010e-05,\n 0.0047553, 0.0047316,\n// 2196 6 26\n2523309.817821, 8.0, -4.0, 4.0, 432.8, 432.8,\n 0.3216480, 0.5572840, -2.260e-05, -8.500e-06,\n 0.7774940, -0.0790044, -2.018e-04, 1.320e-06,\n 23.2922001, -0.0015030, -5.000e-06,\n 299.1438293, 14.9992647, 0.000e-00,\n 0.5393070, -0.0001156, -1.190e-05,\n -0.0067960, -0.0001150, -1.180e-05,\n 0.0046002, 0.0045773,\n// 2196 12 19\n2523486.157746, 16.0, -4.0, 4.0, 434.0, 434.0,\n 0.1712420, 0.5399417, -4.060e-05, -7.400e-06,\n -0.6261880, 0.0472976, 1.975e-04, -7.900e-07,\n -23.4037991, -0.0005920, 6.000e-06,\n 60.7074585, 14.9963160, 0.000e-00,\n 0.5565090, 0.0001181, -1.140e-05,\n 0.0103200, 0.0001175, -1.130e-05,\n 0.0047514, 0.0047277,\n// 2197 6 15\n2523664.249688, 18.0, -4.0, 4.0, 435.2, 435.2,\n 0.0076390, 0.5282852, 6.100e-06, -6.740e-06,\n 0.0569880, -0.0339687, -1.552e-04, 5.300e-07,\n 23.3298702, 0.0014910, -6.000e-06,\n 89.7301331, 14.9990950, 0.000e-00,\n 0.5545200, -0.0001118, -1.060e-05,\n 0.0083400, -0.0001113, -1.050e-05,\n 0.0046047, 0.0045818,\n// 2197 12 9\n2523840.649391, 4.0, -4.0, 4.0, 436.3, 436.3,\n 0.2371600, 0.5731588, -2.470e-05, -9.270e-06,\n 0.0783960, 0.0037637, 1.682e-04, -1.800e-07,\n -22.8347206, -0.0039270, 6.000e-06,\n 241.9828033, 14.9968987, 0.000e-00,\n 0.5421590, 0.0000703, -1.270e-05,\n -0.0039590, 0.0000699, -1.260e-05,\n 0.0047449, 0.0047213,\n// 2198 6 4\n2524018.383048, 21.0, -4.0, 4.0, 437.5, 437.5,\n -0.0874320, 0.5068745, 1.040e-05, -5.720e-06,\n -0.7273010, 0.0073528, -1.118e-04, 0.000e-00,\n 22.5344601, 0.0045230, -5.000e-06,\n 135.2878265, 14.9994240, 0.000e-00,\n 0.5655180, -0.0000337, -9.700e-06,\n 0.0192840, -0.0000335, -9.700e-06,\n 0.0046115, 0.0045885,\n// 2198 11 28\n2524195.300537, 19.0, -4.0, 4.0, 438.7, 438.7,\n -0.0708540, 0.5809076, 1.730e-05, -9.860e-06,\n 0.7528010, -0.0412864, 1.158e-04, 6.000e-07,\n -21.4269600, -0.0069780, 6.000e-06,\n 108.0399323, 14.9979620, 0.000e-00,\n 0.5376850, -0.0000134, -1.310e-05,\n -0.0084110, -0.0000133, -1.300e-05,\n 0.0047365, 0.0047129,\n// 2199 4 25\n2524342.806838, 7.0, -4.0, 4.0, 439.6, 439.6,\n -0.5184220, 0.5079308, 2.700e-05, -6.300e-06,\n 1.2929510, 0.1265996, -1.384e-04, -1.480e-06,\n 13.2471905, 0.0132480, -3.000e-06,\n 285.4703979, 15.0029535, 0.000e-00,\n 0.5598540, 0.0001062, -1.040e-05,\n 0.0136480, 0.0001057, -1.040e-05,\n 0.0046523, 0.0046291,\n// 2199 5 24\n2524372.404253, 22.0, -4.0, 4.0, 439.8, 439.8,\n 0.2840340, 0.5089590, -8.000e-06, -5.880e-06,\n -1.4398150, 0.0463142, -7.290e-05, -4.700e-07,\n 20.9113102, 0.0073850, -5.000e-06,\n 150.6958771, 15.0002174, 0.000e-00,\n 0.5638390, 0.0000569, -9.900e-06,\n 0.0176130, 0.0000566, -9.900e-06,\n 0.0046201, 0.0045971,\n// 2199 10 19\n2524520.423915, 22.0, -4.0, 4.0, 440.8, 440.8,\n -0.4356760, 0.5261498, 5.410e-05, -7.360e-06,\n -1.2091590, -0.1466985, 1.141e-04, 2.010e-06,\n -10.2520304, -0.0145630, 2.000e-06,\n 153.7921143, 15.0031948, 0.000e-00,\n 0.5513480, -0.0001132, -1.140e-05,\n 0.0051840, -0.0001127, -1.130e-05,\n 0.0046909, 0.0046676,\n// 2199 11 18\n2524549.917374, 10.0, -4.0, 4.0, 441.0, 441.0,\n 0.1979080, 0.5569354, 2.370e-05, -8.540e-06,\n 1.4428760, -0.0801149, 5.450e-05, 1.120e-06,\n -19.2623692, -0.0096520, 5.000e-06,\n 333.7696533, 14.9992981, 0.000e-00,\n 0.5455560, -0.0001026, -1.220e-05,\n -0.0005780, -0.0001021, -1.210e-05,\n 0.0047265, 0.0047030,\n// 2200 4 14\n2524697.159685, 16.0, -4.0, 4.0, 442.0, 442.0,\n -0.0702280, 0.5351972, 5.300e-06, -7.910e-06,\n 0.5879000, 0.1521348, -9.320e-05, -2.160e-06,\n 9.5162802, 0.0146130, -2.000e-06,\n 59.9221992, 15.0037956, 0.000e-00,\n 0.5454880, 0.0001073, -1.180e-05,\n -0.0006460, 0.0001067, -1.170e-05,\n 0.0046658, 0.0046425,\n// 2200 10 9\n2524874.678025, 4.0, -4.0, 4.0, 443.2, 443.2,\n -0.3077970, 0.4928812, 3.330e-05, -5.830e-06,\n -0.5306260, -0.1496295, 5.200e-05, 1.710e-06,\n -6.1894498, -0.0154370, 1.000e-06,\n 243.1468201, 15.0041313, 0.000e-00,\n 0.5652510, -0.0000740, -1.020e-05,\n 0.0190180, -0.0000736, -1.010e-05,\n 0.0046769, 0.0046536\n));\n}", "static get SIZE() { return 2000000; }", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n}", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1); \n }", "_sha1KT(_t) {\n return (_t < 20) ? 1518500249 : (_t < 40) ? 1859775393 :\n (_t < 60) ? -1894007588 : -899497514;\n }", "function yt(t){var S,k,_,A,e,u=Math.floor,I=new Array(64),C=new Array(64),T=new Array(64),F=new Array(64),w=new Array(65535),y=new Array(65535),Q=new Array(64),v=new Array(64),P=[],E=0,q=7,O=new Array(64),B=new Array(64),R=new Array(64),n=new Array(256),j=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],D=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],M=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],N=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],z=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function r(t,e){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=t[o];a++)i[e[r]]=[],i[e[r]][0]=n,i[e[r]][1]=o,r++,n++;n*=2}return i}function G(t){for(var e=t[0],n=t[1]-1;0<=n;)e&1<<n&&(E|=1<<q),n--,--q<0&&(255==E?(V(255),V(0)):V(E),q=7,E=0)}function V(t){P.push(t)}function Y(t){V(t>>8&255),V(255&t)}function X(t,e,n,r,i){for(var o,a=i[0],s=i[240],h=function(t,e){var n,r,i,o,a,s,h,c,l,u,f=0;for(l=0;l<8;++l){n=t[f],r=t[f+1],i=t[f+2],o=t[f+3],a=t[f+4],s=t[f+5],h=t[f+6];var d=n+(c=t[f+7]),p=n-c,g=r+h,m=r-h,w=i+s,y=i-s,v=o+a,b=o-a,x=d+v,S=d-v,k=g+w,_=g-w;t[f]=x+k,t[f+4]=x-k;var A=.707106781*(_+S);t[f+2]=S+A,t[f+6]=S-A;var I=.382683433*((x=b+y)-(_=m+p)),C=.5411961*x+I,T=1.306562965*_+I,F=.707106781*(k=y+m),P=p+F,E=p-F;t[f+5]=E+C,t[f+3]=E-C,t[f+1]=P+T,t[f+7]=P-T,f+=8}for(l=f=0;l<8;++l){n=t[f],r=t[f+8],i=t[f+16],o=t[f+24],a=t[f+32],s=t[f+40],h=t[f+48];var q=n+(c=t[f+56]),O=n-c,B=r+h,R=r-h,j=i+s,D=i-s,M=o+a,U=o-a,N=q+M,z=q-M,L=B+j,H=B-j;t[f]=N+L,t[f+32]=N-L;var W=.707106781*(H+z);t[f+16]=z+W,t[f+48]=z-W;var G=.382683433*((N=U+D)-(H=R+O)),V=.5411961*N+G,Y=1.306562965*H+G,X=.707106781*(L=D+R),J=O+X,K=O-X;t[f+40]=K+V,t[f+24]=K-V,t[f+8]=J+Y,t[f+56]=J-Y,f++}for(l=0;l<64;++l)u=t[l]*e[l],Q[l]=0<u?u+.5|0:u-.5|0;return Q}(t,e),c=0;c<64;++c)v[b[c]]=h[c];var l=v[0]-n;n=v[0],0==l?G(r[0]):(G(r[y[o=32767+l]]),G(w[o]));for(var u=63;0<u&&0==v[u];u--);if(0==u)return G(a),n;for(var f,d=1;d<=u;){for(var p=d;0==v[d]&&d<=u;++d);var g=d-p;if(16<=g){f=g>>4;for(var m=1;m<=f;++m)G(s);g&=15}o=32767+v[d],G(i[(g<<4)+y[o]]),G(w[o]),d++}return 63!=u&&G(a),n}function J(t){if(t<=0&&(t=1),100<t&&(t=100),e!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=u((e[n]*t+50)/100);r<1?r=1:255<r&&(r=255),I[b[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var a=u((i[o]*t+50)/100);a<1?a=1:255<a&&(a=255),C[b[o]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],h=0,c=0;c<8;c++)for(var l=0;l<8;l++)T[h]=1/(I[b[h]]*s[c]*s[l]*8),F[h]=1/(C[b[h]]*s[c]*s[l]*8),h++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t}}this.encode=function(t,e){var n,r;(new Date).getTime();e&&J(e),P=new Array,E=0,q=7,Y(65496),Y(65504),Y(16),V(74),V(70),V(73),V(70),V(0),V(1),V(1),V(0),Y(1),Y(1),V(0),V(0),function(){Y(65499),Y(132),V(0);for(var t=0;t<64;t++)V(I[t]);V(1);for(var e=0;e<64;e++)V(C[e])}(),n=t.width,r=t.height,Y(65472),Y(17),V(8),Y(r),Y(n),V(3),V(1),V(17),V(0),V(2),V(17),V(1),V(3),V(17),V(1),function(){Y(65476),Y(418),V(0);for(var t=0;t<16;t++)V(D[t+1]);for(var e=0;e<=11;e++)V(M[e]);V(16);for(var n=0;n<16;n++)V(U[n+1]);for(var r=0;r<=161;r++)V(N[r]);V(1);for(var i=0;i<16;i++)V(z[i+1]);for(var o=0;o<=11;o++)V(L[o]);V(17);for(var a=0;a<16;a++)V(H[a+1]);for(var s=0;s<=161;s++)V(W[s])}(),Y(65498),Y(12),V(3),V(1),V(0),V(2),V(17),V(3),V(17),V(0),V(63),V(0);var i=0,o=0,a=0;E=0,q=7,this.encode.displayName=\"_encode_\";for(var s,h,c,l,u,f,d,p,g,m=t.data,w=t.width,y=t.height,v=4*w,b=0;b<y;){for(s=0;s<v;){for(f=u=v*b+s,d=-1,g=p=0;g<64;g++)f=u+(p=g>>3)*v+(d=4*(7&g)),y<=b+p&&(f-=v*(b+1+p-y)),v<=s+d&&(f-=s+d-v+4),h=m[f++],c=m[f++],l=m[f++],O[g]=(j[h]+j[c+256>>0]+j[l+512>>0]>>16)-128,B[g]=(j[h+768>>0]+j[c+1024>>0]+j[l+1280>>0]>>16)-128,R[g]=(j[h+1280>>0]+j[c+1536>>0]+j[l+1792>>0]>>16)-128;i=X(O,T,i,S,_),o=X(B,F,o,k,A),a=X(R,F,a,k,A),s+=32}b+=8}if(0<=q){var x=[];x[1]=q+1,x[0]=(1<<q+1)-1,G(x)}return Y(65497),new Uint8Array(P)},function(){(new Date).getTime();t||(t=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)n[e]=t(e)}(),S=r(D,M),k=r(z,L),_=r(U,N),A=r(H,W),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var r=t;r<e;r++)y[32767+r]=n,w[32767+r]=[],w[32767+r][1]=n,w[32767+r][0]=r;for(var i=-(e-1);i<=-t;i++)y[32767+i]=n,w[32767+i]=[],w[32767+i][1]=n,w[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)j[t]=19595*t,j[t+256>>0]=38470*t,j[t+512>>0]=7471*t+32768,j[t+768>>0]=-11059*t,j[t+1024>>0]=-21709*t,j[t+1280>>0]=32768*t+8421375,j[t+1536>>0]=-27439*t,j[t+1792>>0]=-5329*t}(),J(t),(new Date).getTime()}()}", "function S4() {\r\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\r\n}", "function S4() {\n return ((1 + Math.random()) * 0x10000 | 0).toString(16).substring(1);\n }", "Nr(){\n return this.Lj*12/6+1\n }", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1); \n}", "function X(){!function(e){H[G++]^=255&e,H[G++]^=e>>8&255,H[G++]^=e>>16&255,H[G++]^=e>>24&255,G>=256&&(G-=256)}((new Date).getTime())}", "static transient final public function m48() {}", "function randomNum_532_13267(){\n\treturn Math.random()*(13267-532)+532;\n}", "function a(){for(var e=[],t=\"0123456789abcdef\",n=0;36>n;n++)e[n]=t.substr(E(16*Math.random()),1);return e[14]=\"4\",e[19]=t.substr(8|3&e[19],1),e[8]=e[13]=e[18]=e[23]=\"-\",e.join(\"\")}", "function S4() {\n return ((1 + Math.random()) * 0x10000 | 0).toString(16).substring(1);\n }", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n }", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n}", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n}", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n}", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n}", "_hash(pt) {\n return (15485867 + pt.X) * 15485867 + pt.Y;\n }", "function X(){!function(e){Y[V++]^=255&e,Y[V++]^=e>>8&255,Y[V++]^=e>>16&255,Y[V++]^=e>>24&255,V>=256&&(V-=256)}((new Date).getTime())}", "function X(){!function(t){$[W++]^=255&t,$[W++]^=t>>8&255,$[W++]^=t>>16&255,$[W++]^=t>>24&255,W>=J&&(W-=J)}((new Date).getTime())}", "function h_ni(i) { return (i+6*600)%6;} //normalise an hex index number to the range 0-5", "function e(o247) {\n try {\no247 = o247 | 0;\n}catch(e){}\n try {\no1071 = o247\n}catch(e){}\n }", "_hash(r,c) {\n return (15485867 + r) * 15485867 + c;\n }", "function e(){return [0,0,0,1]}", "function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }", "influence () {\n return parseInt(this.I, 16);\n }", "function SE0001() {\n calculatefor(new Array(\n// 1 6 10\n1721583.780743, 7.0, -4.0, 4.0, 10519.6, 10519.6,\n 0.1477500, 0.5736369, 5.800e-06, -9.270e-06,\n 0.3635400, 0.0040918, -1.800e-04, 3.000e-08,\n 22.9475498, 0.0041820, -5.000e-06,\n 286.5210266, 14.9997044, 0.000e-00,\n 0.5344440, -0.0000878, -1.230e-05,\n -0.0116350, -0.0000873, -1.230e-05,\n 0.0045954, 0.0045725,\n// 1 12 3\n1721760.337249, 20.0, -4.0, 4.0, 10514.8, 10514.8,\n -0.0513860, 0.5271225, -7.800e-06, -6.710e-06,\n -0.0373330, -0.0245871, 1.576e-04, 2.200e-07,\n -22.2319603, -0.0061610, 6.000e-06,\n 121.6283569, 14.9970083, 0.000e-00,\n 0.5635840, 0.0001153, -1.080e-05,\n 0.0173600, 0.0001147, -1.080e-05,\n 0.0047596, 0.0047358,\n// 2 5 30\n1721938.323419, 20.0, -4.0, 4.0, 10509.9, 10509.9,\n 0.1617630, 0.5407725, 2.140e-05, -7.420e-06,\n -0.4052900, 0.0430046, -1.180e-04, -5.000e-07,\n 21.5032101, 0.0069200, -5.000e-06,\n 121.8688202, 15.0004883, 0.000e-00,\n 0.5479280, -0.0001248, -1.110e-05,\n 0.0017810, -0.0001241, -1.100e-05,\n 0.0045954, 0.0045725,\n// 2 11 23\n1722114.712677, 5.0, -4.0, 4.0, 10505.0, 10505.0,\n 0.0206060, 0.5574679, 3.000e-07, -8.510e-06,\n 0.6499520, -0.0682870, 1.132e-04, 9.600e-07,\n -20.1964607, -0.0091500, 5.000e-06,\n 257.6219177, 14.9983244, 0.000e-00,\n 0.5477450, 0.0001099, -1.220e-05,\n 0.0015990, 0.0001094, -1.220e-05,\n 0.0047579, 0.0047342,\n// 3 5 20\n1722292.570492, 2.0, -4.0, 4.0, 10500.1, 10500.1,\n 0.3375130, 0.5075921, 1.450e-05, -5.940e-06,\n -1.1953150, 0.0753864, -6.420e-05, -8.000e-07,\n 19.3034306, 0.0094340, -4.000e-06,\n 211.9496613, 15.0015306, 0.000e-00,\n 0.5616390, -0.0000788, -9.900e-06,\n 0.0154240, -0.0000784, -9.900e-06,\n 0.0045980, 0.0045752,\n// 3 10 14\n1722439.890267, 9.0, -4.0, 4.0, 10496.0, 10496.0,\n -0.6101660, 0.5560249, 5.240e-05, -9.400e-06,\n -1.2564350, -0.1713964, 1.178e-04, 2.830e-06,\n -7.3252702, -0.0157210, 1.000e-06,\n 318.0282593, 15.0033312, 0.000e-00,\n 0.5376170, -0.0000203, -1.300e-05,\n -0.0084780, -0.0000202, -1.300e-05,\n 0.0047289, 0.0047054,\n// 3 11 12\n1722469.317008, 20.0, -4.0, 4.0, 10495.2, 10495.2,\n 0.4633450, 0.5717677, -5.300e-06, -9.690e-06,\n 1.2171381, -0.1085856, 5.400e-05, 1.760e-06,\n -17.4847507, -0.0116100, 4.000e-06,\n 123.2411880, 14.9998140, 0.000e-00,\n 0.5386090, 0.0000132, -1.310e-05,\n -0.0074920, 0.0000132, -1.310e-05,\n 0.0047535, 0.0047298,\n// 4 4 8\n1722616.985578, 12.0, -4.0, 4.0, 10491.1, 10491.1,\n -0.0858200, 0.4906042, 5.700e-06, -5.750e-06,\n 0.8786310, 0.1517656, -7.430e-05, -1.700e-06,\n 6.4469299, 0.0152520, -1.000e-06,\n 359.7265930, 15.0049486, 0.000e-00,\n 0.5633320, 0.0000640, -1.000e-05,\n 0.0171090, 0.0000636, -1.000e-05,\n 0.0046280, 0.0046049,\n// 4 10 2\n1722794.494728, 0.0, -4.0, 4.0, 10486.2, 10486.2,\n -0.1582700, 0.5325559, 2.950e-05, -8.010e-06,\n -0.7231220, -0.1713059, 4.950e-05, 2.510e-06,\n -3.1366899, -0.0162420, 0.000e-00,\n 182.4269867, 15.0039873, 0.000e-00,\n 0.5467070, -0.0001107, -1.200e-05,\n 0.0005660, -0.0001101, -1.200e-05,\n 0.0047167, 0.0046932,\n// 5 3 28\n1722971.224694, 17.0, -4.0, 4.0, 10481.4, 10481.4,\n -0.2271410, 0.5166893, -2.100e-06, -7.120e-06,\n 0.0095610, 0.1669294, -2.050e-05, -2.220e-06,\n 2.2266500, 0.0157860, -1.000e-06,\n 73.6928177, 15.0052166, 0.000e-00,\n 0.5501050, 0.0001256, -1.120e-05,\n 0.0039480, 0.0001250, -1.110e-05,\n 0.0046403, 0.0046172,\n// 5 9 22\n1723148.862771, 9.0, -4.0, 4.0, 10476.5, 10476.5,\n 0.1378580, 0.5002483, 7.000e-06, -6.290e-06,\n -0.0751820, -0.1618195, -1.030e-05, 1.960e-06,\n 1.2201200, -0.0162770, 0.000e-00,\n 316.6747131, 15.0042295, 0.000e-00,\n 0.5614690, -0.0001112, -1.060e-05,\n 0.0152550, -0.0001106, -1.060e-05,\n 0.0047031, 0.0046797,\n// 6 3 18\n1723325.753583, 6.0, -4.0, 4.0, 10471.6, 10471.6,\n 0.1556960, 0.5457429, -2.310e-05, -8.830e-06,\n -0.6397400, 0.1770635, 4.220e-05, -2.790e-06,\n -1.9548900, 0.0158740, 0.000e-00,\n 267.6932983, 15.0050783, 0.000e-00,\n 0.5373150, 0.0000789, -1.250e-05,\n -0.0087790, 0.0000785, -1.240e-05,\n 0.0046539, 0.0046307,\n// 6 9 11\n1723502.941905, 11.0, -4.0, 4.0, 10466.7, 10466.7,\n 0.4000290, 0.4822544, -2.110e-05, -5.400e-06,\n 0.6135880, -0.1504661, -5.660e-05, 1.620e-06,\n 5.6251898, -0.0157920, -1.000e-06,\n 345.8679810, 15.0040894, 0.000e-00,\n 0.5707200, -0.0000313, -9.800e-06,\n 0.0244600, -0.0000312, -9.800e-06,\n 0.0046880, 0.0046647,\n// 7 2 6\n1723651.058330, 13.0, -4.0, 4.0, 10462.7, 10462.7,\n -0.4871880, 0.5636266, 1.270e-05, -9.250e-06,\n 1.1944730, 0.1187640, 4.650e-05, -1.880e-06,\n -16.3175106, 0.0121820, 4.000e-06,\n 10.6870604, 15.0010834, 0.000e-00,\n 0.5389800, -0.0000606, -1.270e-05,\n -0.0071220, -0.0000603, -1.270e-05,\n 0.0047090, 0.0046855,\n// 7 3 7\n1723680.436740, 22.0, -4.0, 4.0, 10461.9, 10461.9,\n 0.1352560, 0.5564197, -1.870e-05, -9.480e-06,\n -1.3630260, 0.1754102, 1.166e-04, -2.900e-06,\n -6.0585299, 0.0155390, 1.000e-06,\n 146.8084869, 15.0045033, 0.000e-00,\n 0.5339450, -0.0000087, -1.290e-05,\n -0.0121320, -0.0000086, -1.290e-05,\n 0.0046682, 0.0046450,\n// 7 8 1\n1723827.335369, 20.0, -4.0, 4.0, 10457.8, 10457.8,\n -0.2508930, 0.5192351, -2.330e-05, -6.510e-06,\n -1.4247210, -0.0819566, -5.180e-05, 9.400e-07,\n 19.0020905, -0.0098450, -5.000e-06,\n 119.2963104, 15.0010958, 0.000e-00,\n 0.5575310, 0.0001106, -1.050e-05,\n 0.0113370, 0.0001101, -1.040e-05,\n 0.0046329, 0.0046098,\n// 7 8 31\n1723856.941619, 11.0, -4.0, 4.0, 10457.0, 10457.0,\n 0.5851760, 0.4922707, -4.940e-05, -5.730e-06,\n 1.2912199, -0.1416734, -1.039e-04, 1.600e-06,\n 9.8561201, -0.0147800, -2.000e-06,\n 345.1435852, 15.0036097, 0.000e-00,\n 0.5663670, 0.0000691, -1.000e-05,\n 0.0201290, 0.0000687, -1.000e-05,\n 0.0046720, 0.0046487,\n// 8 1 27\n1724005.595400, 2.0, -4.0, 4.0, 10452.9, 10452.9,\n -0.2460020, 0.5405931, 9.900e-06, -7.590e-06,\n 0.5817410, 0.0798825, 1.056e-04, -1.050e-06,\n -19.2383003, 0.0100110, 5.000e-06,\n 205.9786835, 14.9994297, 0.000e-00,\n 0.5528290, -0.0001172, -1.150e-05,\n 0.0066580, -0.0001166, -1.140e-05,\n 0.0047230, 0.0046994,\n// 8 7 21\n1724181.727862, 5.0, -4.0, 4.0, 10448.1, 10448.1,\n -0.3171140, 0.5571292, -1.440e-05, -8.370e-06,\n -0.6082380, -0.0493122, -1.097e-04, 6.400e-07,\n 21.2855797, -0.0073000, -5.000e-06,\n 254.4908600, 15.0001974, 0.000e-00,\n 0.5417140, 0.0001242, -1.180e-05,\n -0.0044010, 0.0001236, -1.170e-05,\n 0.0046205, 0.0045975,\n// 9 1 15\n1724359.839530, 8.0, -4.0, 4.0, 10443.2, 10443.2,\n -0.0692250, 0.5132652, 4.900e-06, -6.080e-06,\n -0.1003230, 0.0385289, 1.488e-04, -3.700e-07,\n -21.5647602, 0.0072590, 5.000e-06,\n 296.7083740, 14.9978333, 0.000e-00,\n 0.5686410, -0.0000860, -1.030e-05,\n 0.0223910, -0.0000855, -1.020e-05,\n 0.0047358, 0.0047122,\n// 9 7 10\n1724536.370239, 21.0, -4.0, 4.0, 10438.4, 10438.4,\n 0.0685720, 0.5823288, -1.160e-05, -9.850e-06,\n 0.1250290, -0.0094509, -1.702e-04, 5.000e-08,\n 22.8116608, -0.0045540, -5.000e-06,\n 134.9048767, 14.9995270, 0.000e-00,\n 0.5315620, 0.0000348, -1.280e-05,\n -0.0145030, 0.0000347, -1.270e-05,\n 0.0046107, 0.0045877,\n// 10 1 4\n1724713.829523, 8.0, -4.0, 4.0, 10433.5, 10433.5,\n 0.0413750, 0.5034579, -2.000e-06, -5.600e-06,\n -0.7916870, -0.0029327, 1.842e-04, 1.200e-07,\n -23.1018295, 0.0039900, 6.000e-06,\n 297.8305359, 14.9966326, 0.000e-00,\n 0.5749010, 0.0000080, -9.900e-06,\n 0.0286200, 0.0000079, -9.800e-06,\n 0.0047463, 0.0047227,\n// 10 6 30\n1724891.084146, 14.0, -4.0, 4.0, 10428.6, 10428.6,\n -0.0607460, 0.5774612, 2.210e-05, -9.550e-06,\n 0.8624740, 0.0331130, -2.177e-04, -6.800e-07,\n 23.5901794, -0.0016480, -6.000e-06,\n 30.4601097, 14.9991560, 0.000e-00,\n 0.5329070, -0.0000624, -1.260e-05,\n -0.0131640, -0.0000621, -1.250e-05,\n 0.0046033, 0.0045803,\n// 10 11 24\n1725038.188019, 17.0, -4.0, 4.0, 10424.6, 10424.6,\n 0.6969420, 0.5122303, -6.200e-06, -6.790e-06,\n 1.3378479, -0.1616266, 7.620e-05, 2.320e-06,\n -20.5376205, -0.0085060, 5.000e-06,\n 77.5096436, 14.9980116, 0.000e-00,\n 0.5588340, 0.0001106, -1.120e-05,\n 0.0126330, 0.0001101, -1.110e-05,\n 0.0047585, 0.0047348,\n// 10 12 24\n1725067.853854, 8.0, -4.0, 4.0, 10423.7, 10423.7,\n -0.3844260, 0.5187439, 1.450e-05, -6.350e-06,\n -1.4095210, -0.0469118, 2.236e-04, 6.600e-07,\n -23.6869202, 0.0004460, 6.000e-06,\n 299.1918030, 14.9961252, 0.000e-00,\n 0.5666640, 0.0001104, -1.050e-05,\n 0.0204240, 0.0001099, -1.050e-05,\n 0.0047537, 0.0047300,\n// 11 5 21\n1725216.241056, 18.0, -4.0, 4.0, 10419.7, 10419.7,\n 0.4299160, 0.5035133, 3.840e-05, -6.510e-06,\n -0.8922830, 0.1742631, -7.350e-05, -2.390e-06,\n 19.6933804, 0.0088180, -4.000e-06,\n 91.9571304, 15.0013361, 0.000e-00,\n 0.5523490, -0.0001196, -1.070e-05,\n 0.0061800, -0.0001191, -1.060e-05,\n 0.0045972, 0.0045743,\n// 11 11 14\n1725392.645134, 3.0, -4.0, 4.0, 10414.8, 10414.8,\n 0.0143580, 0.5306380, 3.060e-05, -8.380e-06,\n 0.7908800, -0.2082504, 7.900e-05, 3.490e-06,\n -17.8641891, -0.0110700, 4.000e-06,\n 228.1855927, 14.9995222, 0.000e-00,\n 0.5438280, 0.0001021, -1.260e-05,\n -0.0022980, 0.0001016, -1.250e-05,\n 0.0047542, 0.0047305,\n// 12 5 9\n1725570.406918, 22.0, -4.0, 4.0, 10410.0, 10410.0,\n 0.1989070, 0.4695761, 3.780e-05, -5.290e-06,\n -0.1683890, 0.1952628, -8.320e-05, -2.350e-06,\n 16.9254799, 0.0110520, -4.000e-06,\n 151.7776642, 15.0024471, 0.000e-00,\n 0.5642780, -0.0000528, -9.800e-06,\n 0.0180500, -0.0000526, -9.700e-06,\n 0.0046021, 0.0045791,\n// 12 11 2\n1725747.283772, 19.0, -4.0, 4.0, 10405.1, 10405.1,\n 0.1249630, 0.5304235, 3.720e-05, -8.940e-06,\n 0.0078300, -0.2418299, 9.280e-05, 4.290e-06,\n -14.6475801, -0.0130780, 3.000e-06,\n 108.4609375, 15.0009880, 0.000e-00,\n 0.5380960, -0.0000114, -1.310e-05,\n -0.0080020, -0.0000113, -1.310e-05,\n 0.0047477, 0.0047241,\n// 13 4 28\n1725924.427984, 22.0, -4.0, 4.0, 10400.3, 10400.3,\n -0.3517510, 0.4606972, 3.960e-05, -5.210e-06,\n 0.4190160, 0.2183339, -9.030e-05, -2.620e-06,\n 13.5530596, 0.0128770, -3.000e-06,\n 151.2751007, 15.0035439, 0.000e-00,\n 0.5641090, 0.0000580, -9.800e-06,\n 0.0178820, 0.0000577, -9.800e-06,\n 0.0046092, 0.0045863,\n// 13 10 23\n1726101.910217, 10.0, -4.0, 4.0, 10395.4, 10395.4,\n -0.2055610, 0.5057967, 5.800e-05, -7.800e-06,\n -0.6024530, -0.2549777, 9.190e-05, 4.150e-06,\n -10.9533005, -0.0145920, 2.000e-06,\n 333.3776550, 15.0022507, 0.000e-00,\n 0.5447880, -0.0001004, -1.240e-05,\n -0.0013430, -0.0000999, -1.230e-05,\n 0.0047391, 0.0047155,\n// 14 3 19\n1726249.151669, 16.0, -4.0, 4.0, 10391.4, 10391.4,\n 0.8724770, 0.4831192, -6.180e-05, -6.880e-06,\n -1.1613491, 0.2683584, 5.880e-05, -4.040e-06,\n -1.3741200, 0.0156690, 0.000e-00,\n 57.8264809, 15.0049810, 0.000e-00,\n 0.5463870, 0.0001059, -1.160e-05,\n 0.0002480, 0.0001054, -1.150e-05,\n 0.0046523, 0.0046291,\n// 14 4 18\n1726278.612392, 3.0, -4.0, 4.0, 10390.5, 10390.5,\n -0.4317970, 0.4762812, 3.190e-05, -6.220e-06,\n 1.1916740, 0.2454006, -1.120e-04, -3.350e-06,\n 9.8100004, 0.0142110, -2.000e-06,\n 225.5100250, 15.0044422, 0.000e-00,\n 0.5523060, 0.0001078, -1.080e-05,\n 0.0061380, 0.0001073, -1.080e-05,\n 0.0046183, 0.0045953,\n// 14 9 13\n1726426.703452, 5.0, -4.0, 4.0, 10386.5, 10386.5,\n 0.7742070, 0.4537856, -3.400e-05, -5.370e-06,\n 1.2834359, -0.2492931, -8.430e-05, 3.100e-06,\n 4.9200401, -0.0156730, -1.000e-06,\n 255.9995270, 15.0040693, 0.000e-00,\n 0.5645970, -0.0000904, -1.030e-05,\n 0.0183670, -0.0000900, -1.020e-05,\n 0.0046901, 0.0046668,\n// 14 10 12\n1726456.336230, 20.0, -4.0, 4.0, 10385.7, 10385.7,\n -0.6885720, 0.4698096, 6.690e-05, -6.040e-06,\n -1.2057600, -0.2519280, 8.530e-05, 3.450e-06,\n -6.8556499, -0.0156110, 1.000e-06,\n 122.9712524, 15.0032234, 0.000e-00,\n 0.5593480, -0.0001130, -1.100e-05,\n 0.0131440, -0.0001124, -1.090e-05,\n 0.0047283, 0.0047048,\n// 15 3 9\n1726603.739031, 6.0, -4.0, 4.0, 10381.6, 10381.6,\n 0.4555870, 0.5082808, -4.910e-05, -8.360e-06,\n -0.5152520, 0.2779885, 5.770e-05, -4.790e-06,\n -5.5217800, 0.0153670, 1.000e-06,\n 266.9093933, 15.0044880, 0.000e-00,\n 0.5356110, 0.0000459, -1.280e-05,\n -0.0104750, 0.0000457, -1.270e-05,\n 0.0046664, 0.0046432,\n// 15 9 2\n1726780.732303, 6.0, -4.0, 4.0, 10376.8, 10376.8,\n 0.5668920, 0.4467416, -4.640e-05, -4.900e-06,\n 0.6204310, -0.2341313, -7.110e-05, 2.730e-06,\n 9.1805201, -0.0147630, -2.000e-06,\n 270.2530518, 15.0036135, 0.000e-00,\n 0.5703970, -0.0000021, -9.800e-06,\n 0.0241390, -0.0000021, -9.700e-06,\n 0.0046745, 0.0046512,\n// 16 2 26\n1726958.427827, 22.0, -4.0, 4.0, 10372.0, 10372.0,\n -0.1549390, 0.5150110, -1.420e-05, -8.530e-06,\n -0.0390200, 0.2677361, 6.020e-05, -4.640e-06,\n -9.5069399, 0.0146460, 2.000e-06,\n 146.1893768, 15.0035734, 0.000e-00,\n 0.5358830, -0.0000429, -1.290e-05,\n -0.0102040, -0.0000427, -1.280e-05,\n 0.0046813, 0.0046580,\n// 16 8 21\n1727134.773296, 7.0, -4.0, 4.0, 10367.1, 10367.1,\n 0.2367730, 0.4679930, -5.630e-05, -5.570e-06,\n -0.0356590, -0.2246969, -6.490e-05, 2.850e-06,\n 13.1183100, -0.0133370, -3.000e-06,\n 284.6757812, 15.0028791, 0.000e-00,\n 0.5623090, 0.0000889, -1.030e-05,\n 0.0160900, 0.0000885, -1.020e-05,\n 0.0046586, 0.0046354,\n// 17 2 15\n1727313.021350, 13.0, -4.0, 4.0, 10362.3, 10362.3,\n -0.0866320, 0.5011933, -1.420e-05, -7.270e-06,\n 0.8131210, 0.2380546, 4.330e-05, -3.660e-06,\n -13.2590303, 0.0134710, 3.000e-06,\n 10.7622604, 15.0022697, 0.000e-00,\n 0.5476060, -0.0001306, -1.180e-05,\n 0.0014610, -0.0001300, -1.170e-05,\n 0.0046967, 0.0046733,\n// 17 8 10\n1727489.088708, 14.0, -4.0, 4.0, 10357.5, 10357.5,\n -0.3280760, 0.5082117, -4.280e-05, -7.260e-06,\n -0.5941960, -0.2145195, -6.390e-05, 3.230e-06,\n 16.5272007, -0.0114790, -4.000e-06,\n 29.3468094, 15.0019836, 0.000e-00,\n 0.5463420, 0.0001239, -1.150e-05,\n 0.0002040, 0.0001232, -1.150e-05,\n 0.0046437, 0.0046205,\n// 18 1 6\n1727637.634096, 3.0, -4.0, 4.0, 10353.4, 10353.4,\n 0.1814760, 0.4980552, -2.970e-05, -5.680e-06,\n -1.4094660, 0.1041378, 2.076e-04, -1.300e-06,\n -22.9104404, 0.0043100, 6.000e-06,\n 222.6302185, 14.9967718, 0.000e-00,\n 0.5721700, -0.0000601, -1.000e-05,\n 0.0259030, -0.0000598, -1.000e-05,\n 0.0047448, 0.0047212,\n// 18 2 4\n1727667.347617, 20.0, -4.0, 4.0, 10352.6, 10352.6,\n -0.7576560, 0.4814118, 6.100e-06, -5.810e-06,\n 1.3633130, 0.1992530, 4.350e-05, -2.590e-06,\n -16.7244091, 0.0117280, 4.000e-06,\n 115.7001724, 15.0006676, 0.000e-00,\n 0.5640390, -0.0000977, -1.050e-05,\n 0.0178120, -0.0000973, -1.040e-05,\n 0.0047121, 0.0046886,\n// 18 7 1\n1727814.385177, 21.0, -4.0, 4.0, 10348.6, 10348.6,\n 0.0262010, 0.5784653, -2.840e-05, -9.870e-06,\n 1.1656539, -0.0845000, -2.359e-04, 1.580e-06,\n 23.5308895, -0.0017660, -5.000e-06,\n 135.3731384, 14.9991856, 0.000e-00,\n 0.5303750, 0.0000152, -1.280e-05,\n -0.0156840, 0.0000151, -1.280e-05,\n 0.0046038, 0.0045809,\n// 18 7 31\n1727843.682809, 4.0, -4.0, 4.0, 10347.8, 10347.8,\n -0.6658450, 0.5457336, -1.690e-05, -9.010e-06,\n -1.2105300, -0.1929035, -5.550e-05, 3.340e-06,\n 19.3162498, -0.0092800, -5.000e-06,\n 239.2991333, 15.0010366, 0.000e-00,\n 0.5337800, 0.0000692, -1.270e-05,\n -0.0122960, 0.0000689, -1.260e-05,\n 0.0046303, 0.0046072,\n// 18 12 26\n1727991.596793, 2.0, -4.0, 4.0, 10343.7, 10343.7,\n -0.0706650, 0.5018580, -2.360e-05, -5.640e-06,\n -0.7657990, 0.0614052, 1.883e-04, -8.100e-07,\n -23.6598206, 0.0007790, 6.000e-06,\n 208.9697571, 14.9961185, 0.000e-00,\n 0.5741770, 0.0000467, -1.000e-05,\n 0.0279000, 0.0000465, -9.900e-06,\n 0.0047530, 0.0047293,\n// 19 6 21\n1728169.086314, 14.0, -4.0, 4.0, 10338.9, 10338.9,\n -0.0096800, 0.5706401, 8.000e-07, -9.130e-06,\n 0.4394070, -0.0406790, -1.907e-04, 7.600e-07,\n 23.6425400, 0.0011850, -6.000e-06,\n 30.9593792, 14.9991961, 0.000e-00,\n 0.5352940, -0.0000837, -1.230e-05,\n -0.0107890, -0.0000833, -1.220e-05,\n 0.0045985, 0.0045756,\n// 19 12 15\n1728345.685005, 4.0, -4.0, 4.0, 10334.0, 10334.0,\n -0.2313650, 0.5291065, -1.420e-05, -6.800e-06,\n -0.0507340, 0.0186091, 1.680e-04, -3.500e-07,\n -23.4156799, -0.0027990, 6.000e-06,\n 240.3764343, 14.9962645, 0.000e-00,\n 0.5626130, 0.0001240, -1.090e-05,\n 0.0163930, 0.0001234, -1.080e-05,\n 0.0047576, 0.0047339,\n// 20 6 10\n1728523.611520, 3.0, -4.0, 4.0, 10329.2, 10329.2,\n 0.1766330, 0.5403103, 1.080e-05, -7.330e-06,\n -0.3373250, 0.0028510, -1.349e-04, 6.000e-08,\n 22.9709892, 0.0041170, -5.000e-06,\n 226.4960327, 14.9996033, 0.000e-00,\n 0.5489350, -0.0001254, -1.100e-05,\n 0.0027830, -0.0001248, -1.090e-05,\n 0.0045960, 0.0045731,\n// 20 12 3\n1728700.076262, 14.0, -4.0, 4.0, 10324.4, 10324.4,\n 0.1256900, 0.5625687, -1.390e-05, -8.650e-06,\n 0.6401650, -0.0263285, 1.320e-04, 3.100e-07,\n -22.2507095, -0.0061160, 6.000e-06,\n 31.6289597, 14.9970903, 0.000e-00,\n 0.5471240, 0.0000998, -1.230e-05,\n 0.0009820, 0.0000993, -1.220e-05,\n 0.0047588, 0.0047351,\n// 21 5 30\n1728877.838799, 8.0, -4.0, 4.0, 10319.5, 10319.5,\n 0.0259520, 0.5102401, 1.880e-05, -5.920e-06,\n -1.1503770, 0.0414177, -8.430e-05, -4.000e-07,\n 21.4866104, 0.0069470, -5.000e-06,\n 301.8609619, 15.0004187, 0.000e-00,\n 0.5621590, -0.0000639, -9.900e-06,\n 0.0159420, -0.0000636, -9.800e-06,\n 0.0045961, 0.0045732,\n// 21 10 24\n1729025.251281, 18.0, -4.0, 4.0, 10315.5, 10315.5,\n -0.3870800, 0.5603748, 4.810e-05, -9.450e-06,\n -1.3374749, -0.1544222, 1.503e-04, 2.540e-06,\n -11.4565697, -0.0146610, 2.000e-06,\n 93.4089584, 15.0022316, 0.000e-00,\n 0.5384240, -0.0000349, -1.300e-05,\n -0.0076760, -0.0000347, -1.300e-05,\n 0.0047398, 0.0047162,\n// 21 11 23\n1729054.686593, 4.0, -4.0, 4.0, 10314.7, 10314.7,\n -0.1197030, 0.5778267, 2.070e-05, -9.820e-06,\n 1.3041910, -0.0713331, 7.490e-05, 1.120e-06,\n -20.2718506, -0.0090500, 5.000e-06,\n 242.6079407, 14.9983377, 0.000e-00,\n 0.5386620, 0.0000301, -1.310e-05,\n -0.0074380, 0.0000299, -1.310e-05,\n 0.0047573, 0.0047336,\n// 22 4 19\n1729202.265747, 18.0, -4.0, 4.0, 10310.7, 10310.7,\n -0.4417320, 0.4957266, 2.300e-05, -5.860e-06,\n 0.8479920, 0.1400533, -9.680e-05, -1.580e-06,\n 10.4049501, 0.0142740, -2.000e-06,\n 90.6399765, 15.0043716, 0.000e-00,\n 0.5619500, 0.0000839, -1.000e-05,\n 0.0157340, 0.0000835, -1.000e-05,\n 0.0046173, 0.0045943,\n// 22 10 14\n1729379.842277, 8.0, -4.0, 4.0, 10305.9, 10305.9,\n -0.3339410, 0.5335091, 4.560e-05, -7.940e-06,\n -0.6882710, -0.1619416, 7.490e-05, 2.350e-06,\n -7.4625001, -0.0157130, 1.000e-06,\n 303.0452881, 15.0032530, 0.000e-00,\n 0.5482360, -0.0001052, -1.200e-05,\n 0.0020870, -0.0001047, -1.190e-05,\n 0.0047293, 0.0047057,\n// 23 4 9\n1729556.528577, 1.0, -4.0, 4.0, 10301.0, 10301.0,\n 0.1221930, 0.5209391, -9.300e-06, -7.250e-06,\n 0.1847390, 0.1609480, -5.180e-05, -2.160e-06,\n 6.4242001, 0.0152370, -1.000e-06,\n 194.7207642, 15.0050163, 0.000e-00,\n 0.5485110, 0.0001100, -1.120e-05,\n 0.0023620, 0.0001095, -1.120e-05,\n 0.0046279, 0.0046049,\n// 23 10 3\n1729734.188215, 17.0, -4.0, 4.0, 10296.2, 10296.2,\n 0.2238960, 0.4989476, 1.160e-05, -6.210e-06,\n -0.1302420, -0.1596346, 1.680e-05, 1.920e-06,\n -3.1785800, -0.0162640, 0.000e-00,\n 77.4351501, 15.0039043, 0.000e-00,\n 0.5631170, -0.0001129, -1.060e-05,\n 0.0168950, -0.0001123, -1.050e-05,\n 0.0047172, 0.0046937,\n// 24 3 28\n1729911.077996, 14.0, -4.0, 4.0, 10291.4, 10291.4,\n 0.2561180, 0.5472324, -1.900e-05, -8.920e-06,\n -0.5518380, 0.1771834, 1.250e-05, -2.810e-06,\n 2.3340299, 0.0157550, -1.000e-06,\n 28.7158699, 15.0052834, 0.000e-00,\n 0.5359980, 0.0000689, -1.250e-05,\n -0.0100890, 0.0000685, -1.250e-05,\n 0.0046398, 0.0046167,\n// 24 9 21\n1730088.248003, 18.0, -4.0, 4.0, 10286.6, 10286.6,\n 0.2281590, 0.4800190, -8.800e-06, -5.360e-06,\n 0.6271310, -0.1551940, -3.290e-05, 1.670e-06,\n 1.3114100, -0.0162840, 0.000e-00,\n 91.6604309, 15.0041866, 0.000e-00,\n 0.5718910, -0.0000188, -9.800e-06,\n 0.0256250, -0.0000187, -9.800e-06,\n 0.0047030, 0.0046796,\n// 25 2 16\n1730236.405566, 22.0, -4.0, 4.0, 10282.6, 10282.6,\n -0.1788950, 0.5564766, 1.000e-07, -9.090e-06,\n 1.2941220, 0.1450130, 1.490e-05, -2.310e-06,\n -12.7721500, 0.0138900, 3.000e-06,\n 145.8039246, 15.0025949, 0.000e-00,\n 0.5386330, -0.0000824, -1.270e-05,\n -0.0074670, -0.0000820, -1.260e-05,\n 0.0046943, 0.0046709,\n// 25 3 18\n1730265.770592, 6.0, -4.0, 4.0, 10281.7, 10281.7,\n 0.1312690, 0.5540464, -9.400e-06, -9.420e-06,\n -1.3236150, 0.1818243, 8.790e-05, -3.000e-06,\n -1.7969800, 0.0158660, 0.000e-00,\n 267.7253723, 15.0051098, 0.000e-00,\n 0.5333100, -0.0000143, -1.290e-05,\n -0.0127640, -0.0000142, -1.280e-05,\n 0.0046533, 0.0046301,\n// 25 8 12\n1730412.632450, 3.0, -4.0, 4.0, 10277.8, 10277.8,\n -0.4100360, 0.5154275, -1.920e-05, -6.530e-06,\n -1.4477160, -0.1116237, -2.790e-05, 1.320e-06,\n 16.0611000, -0.0120250, -4.000e-06,\n 224.3803711, 15.0021572, 0.000e-00,\n 0.5574360, 0.0001167, -1.060e-05,\n 0.0112420, 0.0001161, -1.050e-05,\n 0.0046461, 0.0046230,\n// 25 9 10\n1730442.246916, 18.0, -4.0, 4.0, 10277.0, 10277.0,\n 0.4420220, 0.4896715, -3.920e-05, -5.730e-06,\n 1.2832670, -0.1534926, -7.960e-05, 1.750e-06,\n 5.7453599, -0.0157600, -1.000e-06,\n 90.8485489, 15.0041008, 0.000e-00,\n 0.5667030, 0.0000805, -1.010e-05,\n 0.0204630, 0.0000801, -1.010e-05,\n 0.0046872, 0.0046638,\n// 26 2 6\n1730590.935367, 10.0, -4.0, 4.0, 10272.9, 10272.9,\n -0.3692110, 0.5332307, 1.230e-05, -7.410e-06,\n 0.5713430, 0.1114026, 8.190e-05, -1.480e-06,\n -16.2327805, 0.0122500, 4.000e-06,\n 325.6834106, 15.0010424, 0.000e-00,\n 0.5529350, -0.0001142, -1.140e-05,\n 0.0067630, -0.0001136, -1.130e-05,\n 0.0047094, 0.0046860,\n// 26 8 1\n1730767.038714, 13.0, -4.0, 4.0, 10268.1, 10268.1,\n -0.0677330, 0.5544004, -3.150e-05, -8.400e-06,\n -0.6918970, -0.0865298, -8.560e-05, 1.220e-06,\n 18.9728603, -0.0098560, -4.000e-06,\n 14.2936201, 15.0011997, 0.000e-00,\n 0.5415780, 0.0001093, -1.190e-05,\n -0.0045370, 0.0001088, -1.180e-05,\n 0.0046321, 0.0046090,\n// 27 1 26\n1730945.168213, 16.0, -4.0, 4.0, 10263.3, 10263.3,\n -0.0076950, 0.5081990, -5.300e-06, -5.980e-06,\n -0.0790110, 0.0743899, 1.284e-04, -8.000e-07,\n -19.2407093, 0.0100200, 5.000e-06,\n 55.9828987, 14.9993343, 0.000e-00,\n 0.5685330, -0.0000845, -1.020e-05,\n 0.0222840, -0.0000841, -1.020e-05,\n 0.0047242, 0.0047006,\n// 27 7 22\n1731121.686884, 4.0, -4.0, 4.0, 10258.5, 10258.5,\n -0.2762910, 0.5805693, -4.000e-06, -9.850e-06,\n 0.0854060, -0.0521184, -1.532e-04, 7.800e-07,\n 21.2168808, -0.0073840, -5.000e-06,\n 239.4707336, 15.0002956, 0.000e-00,\n 0.5317910, 0.0000444, -1.280e-05,\n -0.0142750, 0.0000442, -1.270e-05,\n 0.0046200, 0.0045970,\n// 28 1 15\n1731299.155917, 16.0, -4.0, 4.0, 10253.7, 10253.7,\n 0.1865460, 0.5024675, -1.910e-05, -5.600e-06,\n -0.7652620, 0.0369945, 1.697e-04, -3.400e-07,\n -21.6100407, 0.0071860, 5.000e-06,\n 56.7394409, 14.9977598, 0.000e-00,\n 0.5741910, 0.0000096, -9.900e-06,\n 0.0279140, 0.0000096, -9.800e-06,\n 0.0047369, 0.0047133,\n// 28 7 10\n1731476.395056, 21.0, -4.0, 4.0, 10248.8, 10248.8,\n -0.2611180, 0.5769556, 1.920e-05, -9.480e-06,\n 0.8027070, -0.0118140, -2.074e-04, 7.000e-08,\n 22.7631092, -0.0046600, -5.000e-06,\n 134.8751526, 14.9995451, 0.000e-00,\n 0.5338460, -0.0000559, -1.250e-05,\n -0.0122300, -0.0000556, -1.250e-05,\n 0.0046106, 0.0045876,\n// 28 12 5\n1731623.541193, 1.0, -4.0, 4.0, 10244.8, 10244.8,\n 0.3434690, 0.5247629, 1.900e-06, -7.050e-06,\n 1.4429910, -0.1226163, 8.940e-05, 1.820e-06,\n -22.4677601, -0.0054200, 6.000e-06,\n 196.4756012, 14.9968519, 0.000e-00,\n 0.5579830, 0.0001211, -1.130e-05,\n 0.0117860, 0.0001205, -1.120e-05,\n 0.0047593, 0.0047356,\n// 29 1 3\n1731653.194448, 17.0, -4.0, 4.0, 10244.1, 10244.1,\n 0.1665430, 0.5224628, -2.070e-05, -6.450e-06,\n -1.4285160, -0.0026229, 2.192e-04, 1.000e-07,\n -23.1210098, 0.0039140, 6.000e-06,\n 72.8674469, 14.9966574, 0.000e-00,\n 0.5655690, 0.0000952, -1.060e-05,\n 0.0193350, 0.0000948, -1.050e-05,\n 0.0047466, 0.0047229,\n// 29 6 1\n1731801.523383, 1.0, -4.0, 4.0, 10240.0, 10240.0,\n 0.5050500, 0.5121680, 3.180e-05, -6.560e-06,\n -0.9698500, 0.1391727, -8.930e-05, -1.910e-06,\n 21.7767696, 0.0062660, -5.000e-06,\n 196.8140106, 15.0002623, 0.000e-00,\n 0.5531610, -0.0001216, -1.060e-05,\n 0.0069890, -0.0001210, -1.060e-05,\n 0.0045955, 0.0045726,\n// 29 11 24\n1731978.010655, 12.0, -4.0, 4.0, 10235.2, 10235.2,\n 0.0853910, 0.5444922, 2.730e-05, -8.680e-06,\n 0.7518040, -0.1729151, 1.051e-04, 2.950e-06,\n -20.5715199, -0.0084310, 5.000e-06,\n 2.5073500, 14.9980764, 0.000e-00,\n 0.5434720, 0.0000920, -1.260e-05,\n -0.0026530, 0.0000915, -1.260e-05,\n 0.0047578, 0.0047341,\n// 30 5 21\n1732155.674271, 4.0, -4.0, 4.0, 10230.4, 10230.4,\n 0.0176140, 0.4794125, 4.370e-05, -5.390e-06,\n -0.3315700, 0.1674474, -9.750e-05, -2.020e-06,\n 19.6521301, 0.0088730, -4.000e-06,\n 241.9401855, 15.0012894, 0.000e-00,\n 0.5644170, -0.0000378, -9.700e-06,\n 0.0181890, -0.0000376, -9.700e-06,\n 0.0045980, 0.0045751,\n// 30 11 14\n1732332.650990, 4.0, -4.0, 4.0, 10225.6, 10225.6,\n 0.2276390, 0.5426727, 3.770e-05, -9.160e-06,\n -0.0199290, -0.2123159, 1.218e-04, 3.780e-06,\n -17.9784603, -0.0109630, 4.000e-06,\n 243.1780548, 14.9994993, 0.000e-00,\n 0.5384830, -0.0000224, -1.310e-05,\n -0.0076160, -0.0000222, -1.310e-05,\n 0.0047538, 0.0047302,\n// 31 5 10\n1732509.699197, 5.0, -4.0, 4.0, 10220.8, 10220.8,\n -0.0682200, 0.4715584, 3.350e-05, -5.380e-06,\n 0.4543810, 0.1967275, -1.126e-04, -2.390e-06,\n 16.8396206, 0.0111060, -4.000e-06,\n 256.7541504, 15.0024738, 0.000e-00,\n 0.5632260, 0.0000547, -9.900e-06,\n 0.0170030, 0.0000544, -9.800e-06,\n 0.0046027, 0.0045798,\n// 31 11 3\n1732687.268581, 18.0, -4.0, 4.0, 10216.0, 10216.0,\n -0.4868430, 0.5144726, 8.020e-05, -7.870e-06,\n -0.4645990, -0.2330619, 1.122e-04, 3.780e-06,\n -14.7569704, -0.0130370, 3.000e-06,\n 93.4678421, 15.0009079, 0.000e-00,\n 0.5460080, -0.0000893, -1.230e-05,\n -0.0001290, -0.0000889, -1.230e-05,\n 0.0047479, 0.0047242,\n// 32 3 29\n1732834.465288, 23.0, -4.0, 4.0, 10212.0, 10212.0,\n 0.6376400, 0.4857558, -3.940e-05, -7.010e-06,\n -1.3472670, 0.2680119, 4.540e-05, -4.090e-06,\n 2.8930099, 0.0154910, -1.000e-06,\n 163.8529053, 15.0051279, 0.000e-00,\n 0.5446460, 0.0001167, -1.160e-05,\n -0.0014850, 0.0001161, -1.160e-05,\n 0.0046387, 0.0046156,\n// 32 4 28\n1732863.904284, 10.0, -4.0, 4.0, 10211.2, 10211.2,\n -0.3593520, 0.4867085, 3.660e-05, -6.440e-06,\n 1.1371510, 0.2293782, -1.321e-04, -3.180e-06,\n 13.5205698, 0.0128650, -3.000e-06,\n 331.2571106, 15.0036077, 0.000e-00,\n 0.5508080, 0.0001095, -1.090e-05,\n 0.0046470, 0.0001090, -1.080e-05,\n 0.0046092, 0.0045863,\n// 32 9 23\n1733012.018446, 12.0, -4.0, 4.0, 10207.2, 10207.2,\n 0.5507820, 0.4501988, -1.450e-05, -5.270e-06,\n 1.4507260, -0.2521089, -6.790e-05, 3.110e-06,\n 0.5848000, -0.0160840, 0.000e-00,\n 1.7929000, 15.0040998, 0.000e-00,\n 0.5662530, -0.0000753, -1.030e-05,\n 0.0200150, -0.0000749, -1.020e-05,\n 0.0047048, 0.0046814,\n// 32 10 23\n1733041.675323, 4.0, -4.0, 4.0, 10206.4, 10206.4,\n -0.7151450, 0.4749952, 7.840e-05, -6.050e-06,\n -1.1822760, -0.2378021, 1.089e-04, 3.240e-06,\n -11.0012503, -0.0146130, 2.000e-06,\n 243.3869629, 15.0021667, 0.000e-00,\n 0.5608800, -0.0001091, -1.090e-05,\n 0.0146690, -0.0001085, -1.080e-05,\n 0.0047394, 0.0047158,\n// 33 3 19\n1733189.069631, 14.0, -4.0, 4.0, 10202.4, 10202.4,\n 0.5167240, 0.5063596, -3.850e-05, -8.370e-06,\n -0.5322390, 0.2835480, 3.490e-05, -4.900e-06,\n -1.2530900, 0.0156340, 0.000e-00,\n 27.8544407, 15.0050411, 0.000e-00,\n 0.5344390, 0.0000387, -1.280e-05,\n -0.0116400, 0.0000385, -1.270e-05,\n 0.0046517, 0.0046286,\n// 33 9 12\n1733366.032991, 13.0, -4.0, 4.0, 10197.6, 10197.6,\n 0.5062520, 0.4413944, -3.480e-05, -4.830e-06,\n 0.7001150, -0.2436079, -5.200e-05, 2.840e-06,\n 5.0248599, -0.0156660, -1.000e-06,\n 15.9756699, 15.0040379, 0.000e-00,\n 0.5713270, 0.0000082, -9.800e-06,\n 0.0250630, 0.0000081, -9.700e-06,\n 0.0046896, 0.0046663,\n// 34 3 9\n1733543.764401, 6.0, -4.0, 4.0, 10192.8, 10192.8,\n -0.1734850, 0.5081745, -6.000e-07, -8.380e-06,\n -0.1003600, 0.2790387, 3.870e-05, -4.810e-06,\n -5.3717699, 0.0153830, 1.000e-06,\n 266.9438477, 15.0045090, 0.000e-00,\n 0.5354330, -0.0000463, -1.280e-05,\n -0.0106520, -0.0000461, -1.270e-05,\n 0.0046662, 0.0046430,\n// 34 9 1\n1733720.077991, 14.0, -4.0, 4.0, 10188.0, 10188.0,\n 0.1149140, 0.4611528, -4.400e-05, -5.530e-06,\n 0.0756240, -0.2413870, -4.630e-05, 3.070e-06,\n 9.2782402, -0.0147140, -2.000e-06,\n 30.2306309, 15.0036364, 0.000e-00,\n 0.5624360, 0.0000993, -1.040e-05,\n 0.0162170, 0.0000988, -1.030e-05,\n 0.0046735, 0.0046503,\n// 35 2 26\n1733898.354095, 20.0, -4.0, 4.0, 10183.2, 10183.2,\n -0.5855850, 0.4908816, 1.700e-05, -7.030e-06,\n 0.5294880, 0.2549306, 3.200e-05, -3.860e-06,\n -9.3948298, 0.0147070, 2.000e-06,\n 116.2121201, 15.0035381, 0.000e-00,\n 0.5477270, -0.0001090, -1.170e-05,\n 0.0015810, -0.0001084, -1.160e-05,\n 0.0046818, 0.0046585,\n// 35 8 21\n1734074.405444, 22.0, -4.0, 4.0, 10178.5, 10178.5,\n -0.1332570, 0.4992453, -4.510e-05, -7.180e-06,\n -0.6237440, -0.2389855, -3.850e-05, 3.610e-06,\n 13.1095104, -0.0133040, -3.000e-06,\n 149.6710815, 15.0029640, 0.000e-00,\n 0.5462970, 0.0001136, -1.160e-05,\n 0.0001580, 0.0001131, -1.160e-05,\n 0.0046577, 0.0046345,\n// 36 1 17\n1734222.963093, 11.0, -4.0, 4.0, 10174.4, 10174.4,\n 0.3460650, 0.4877053, -4.430e-05, -5.520e-06,\n -1.3917340, 0.1424142, 1.906e-04, -1.740e-06,\n -21.2740307, 0.0074460, 5.000e-06,\n 341.5905457, 14.9979591, 0.000e-00,\n 0.5719750, -0.0000579, -1.000e-05,\n 0.0257090, -0.0000576, -1.000e-05,\n 0.0047348, 0.0047113,\n// 36 2 16\n1734252.669206, 4.0, -4.0, 4.0, 10173.6, 10173.6,\n -0.6794950, 0.4699687, 8.600e-06, -5.620e-06,\n 1.3645180, 0.2219666, 2.020e-05, -2.850e-06,\n -13.2535400, 0.0135120, 3.000e-06,\n 235.7666168, 15.0021877, 0.000e-00,\n 0.5638970, -0.0001004, -1.040e-05,\n 0.0176710, -0.0000999, -1.030e-05,\n 0.0046977, 0.0046743,\n// 36 7 12\n1734399.698976, 5.0, -4.0, 4.0, 10169.6, 10169.6,\n 0.3986930, 0.5701323, -5.850e-05, -9.710e-06,\n 1.1652100, -0.1293177, -2.258e-04, 2.360e-06,\n 22.5979900, -0.0047700, -5.000e-06,\n 254.8091583, 14.9996080, 0.000e-00,\n 0.5307550, -0.0000029, -1.280e-05,\n -0.0153060, -0.0000029, -1.280e-05,\n 0.0046116, 0.0045886,\n// 36 8 10\n1734429.005847, 12.0, -4.0, 4.0, 10168.9, 10168.9,\n -0.5808460, 0.5344691, -1.840e-05, -8.850e-06,\n -1.1721630, -0.2245951, -3.400e-05, 3.890e-06,\n 16.4364204, -0.0115110, -4.000e-06,\n 359.3515625, 15.0020857, 0.000e-00,\n 0.5340910, 0.0000577, -1.270e-05,\n -0.0119870, 0.0000574, -1.270e-05,\n 0.0046432, 0.0046201,\n// 37 1 5\n1734576.928496, 10.0, -4.0, 4.0, 10164.9, 10164.9,\n 0.0145890, 0.4957318, -3.940e-05, -5.580e-06,\n -0.7735480, 0.1033635, 1.796e-04, -1.300e-06,\n -22.9436207, 0.0042130, 6.000e-06,\n 327.6674500, 14.9967346, 0.000e-00,\n 0.5733560, 0.0000504, -1.000e-05,\n 0.0270830, 0.0000501, -9.900e-06,\n 0.0047454, 0.0047217,\n// 37 7 1\n1734754.391246, 21.0, -4.0, 4.0, 10160.1, 10160.1,\n -0.1427590, 0.5639420, -5.700e-06, -8.930e-06,\n 0.5403670, -0.0856349, -1.942e-04, 1.480e-06,\n 23.5102596, -0.0018780, -6.000e-06,\n 135.3463287, 14.9991608, 0.000e-00,\n 0.5363170, -0.0000799, -1.220e-05,\n -0.0097720, -0.0000795, -1.220e-05,\n 0.0046040, 0.0045811,\n// 37 12 25\n1734931.033039, 13.0, -4.0, 4.0, 10155.3, 10155.3,\n 0.1147000, 0.5273421, -4.200e-05, -6.820e-06,\n -0.0321690, 0.0640379, 1.670e-04, -9.600e-07,\n -23.6623707, 0.0007230, 6.000e-06,\n 13.9952698, 14.9961796, 0.000e-00,\n 0.5615740, 0.0001108, -1.090e-05,\n 0.0153590, 0.0001102, -1.090e-05,\n 0.0047527, 0.0047291,\n// 38 6 21\n1735108.898800, 10.0, -4.0, 4.0, 10150.5, 10150.5,\n 0.2111530, 0.5366938, -2.900e-06, -7.190e-06,\n -0.2757520, -0.0394820, -1.444e-04, 6.400e-07,\n 23.6476402, 0.0011130, -6.000e-06,\n 330.9389954, 14.9991035, 0.000e-00,\n 0.5500880, -0.0001262, -1.090e-05,\n 0.0039310, -0.0001256, -1.080e-05,\n 0.0045991, 0.0045762,\n// 38 12 14\n1735285.440050, 23.0, -4.0, 4.0, 10145.8, 10145.8,\n 0.2249120, 0.5643765, -3.160e-05, -8.740e-06,\n 0.6511180, 0.0201065, 1.414e-04, -4.200e-07,\n -23.4265003, -0.0027440, 6.000e-06,\n 165.3644562, 14.9963493, 0.000e-00,\n 0.5463600, 0.0000895, -1.240e-05,\n 0.0002210, 0.0000890, -1.230e-05,\n 0.0047570, 0.0047333,\n// 39 6 10\n1735463.107152, 15.0, -4.0, 4.0, 10140.9, 10140.9,\n 0.2261260, 0.5107550, 1.800e-06, -5.890e-06,\n -1.0640540, 0.0034311, -1.005e-04, 5.000e-08,\n 22.9611607, 0.0041410, -6.000e-06,\n 46.4870186, 14.9995337, 0.000e-00,\n 0.5627130, -0.0000686, -9.900e-06,\n 0.0164930, -0.0000683, -9.800e-06,\n 0.0045965, 0.0045736,\n// 39 11 5\n1735610.615502, 3.0, -4.0, 4.0, 10136.9, 10136.9,\n -0.1837390, 0.5659793, 4.140e-05, -9.520e-06,\n -1.3948380, -0.1295628, 1.818e-04, 2.110e-06,\n -15.2170496, -0.0130330, 3.000e-06,\n 228.4554443, 15.0008440, 0.000e-00,\n 0.5391490, -0.0000474, -1.300e-05,\n -0.0069540, -0.0000472, -1.300e-05,\n 0.0047486, 0.0047249,\n// 39 12 4\n1735640.057090, 13.0, -4.0, 4.0, 10136.2, 10136.2,\n -0.1548020, 0.5817335, 1.370e-05, -9.890e-06,\n 1.2869220, -0.0276504, 9.530e-05, 3.700e-07,\n -22.3000507, -0.0060090, 6.000e-06,\n 16.6034107, 14.9971066, 0.000e-00,\n 0.5386400, 0.0000212, -1.320e-05,\n -0.0074610, 0.0000211, -1.310e-05,\n 0.0047586, 0.0047349,\n// 40 4 30\n1735787.543947, 1.0, -4.0, 4.0, 10132.2, 10132.2,\n -0.2658700, 0.5021674, 1.920e-05, -5.990e-06,\n 0.9747890, 0.1219846, -1.245e-04, -1.380e-06,\n 14.0595598, 0.0128630, -3.000e-06,\n 196.3448334, 15.0034904, 0.000e-00,\n 0.5607100, 0.0000827, -1.010e-05,\n 0.0145000, 0.0000823, -1.000e-05,\n 0.0046083, 0.0045854,\n// 40 10 24\n1735965.193016, 17.0, -4.0, 4.0, 10127.4, 10127.4,\n -0.0039130, 0.5364241, 3.720e-05, -7.920e-06,\n -0.7965020, -0.1450738, 1.071e-04, 2.080e-06,\n -11.5799904, -0.0146370, 2.000e-06,\n 78.4268417, 15.0021372, 0.000e-00,\n 0.5495850, -0.0001217, -1.190e-05,\n 0.0034300, -0.0001211, -1.190e-05,\n 0.0047403, 0.0047167,\n// 41 4 19\n1736141.829698, 8.0, -4.0, 4.0, 10122.6, 10122.6,\n -0.0099350, 0.5270184, 2.000e-06, -7.420e-06,\n 0.2114310, 0.1484462, -7.720e-05, -2.010e-06,\n 10.4017897, 0.0142550, -2.000e-06,\n 300.6283569, 15.0044451, 0.000e-00,\n 0.5468920, 0.0001151, -1.130e-05,\n 0.0007510, 0.0001145, -1.120e-05,\n 0.0046170, 0.0045940,\n// 41 10 14\n1736319.518067, 0.0, -4.0, 4.0, 10117.8, 10117.8,\n -0.2387260, 0.4997629, 3.590e-05, -6.150e-06,\n -0.0076240, -0.1507881, 3.810e-05, 1.790e-06,\n -7.4843702, -0.0157330, 1.000e-06,\n 183.0547180, 15.0031691, 0.000e-00,\n 0.5647670, -0.0000912, -1.050e-05,\n 0.0185360, -0.0000907, -1.050e-05,\n 0.0047298, 0.0047062,\n// 42 4 8\n1736496.397560, 22.0, -4.0, 4.0, 10113.1, 10113.1,\n 0.4135440, 0.5508521, -1.840e-05, -9.040e-06,\n -0.4424930, 0.1702941, -1.790e-05, -2.720e-06,\n 6.5284400, 0.0151950, -1.000e-06,\n 149.7399445, 15.0050697, 0.000e-00,\n 0.5348070, 0.0000557, -1.250e-05,\n -0.0112740, 0.0000554, -1.250e-05,\n 0.0046275, 0.0046044,\n// 42 10 3\n1736673.560732, 1.0, -4.0, 4.0, 10108.3, 10108.3,\n -0.0254180, 0.4799129, 6.700e-06, -5.340e-06,\n 0.6768950, -0.1536090, -1.010e-05, 1.650e-06,\n -3.0691800, -0.0162800, 1.000e-06,\n 197.4226074, 15.0038786, 0.000e-00,\n 0.5729330, -0.0000034, -9.800e-06,\n 0.0266620, -0.0000034, -9.800e-06,\n 0.0047168, 0.0046933,\n// 43 2 28\n1736821.746147, 6.0, -4.0, 4.0, 10104.3, 10104.3,\n -0.3288940, 0.5502128, 1.330e-05, -8.920e-06,\n 1.2927560, 0.1635472, -1.170e-05, -2.590e-06,\n -8.8507004, 0.0150560, 2.000e-06,\n 266.3013000, 15.0038280, 0.000e-00,\n 0.5383800, -0.0000826, -1.260e-05,\n -0.0077190, -0.0000822, -1.250e-05,\n 0.0046796, 0.0046563,\n// 43 3 29\n1736851.098880, 14.0, -4.0, 4.0, 10103.5, 10103.5,\n 0.1818370, 0.5538748, -2.600e-06, -9.390e-06,\n -1.2558711, 0.1810363, 5.840e-05, -2.980e-06,\n 2.4904399, 0.0157350, -1.000e-06,\n 28.7496395, 15.0052881, 0.000e-00,\n 0.5327920, -0.0000233, -1.280e-05,\n -0.0132800, -0.0000232, -1.280e-05,\n 0.0046398, 0.0046167,\n// 43 8 23\n1736997.936695, 10.0, -4.0, 4.0, 10099.6, 10099.6,\n -0.6422640, 0.5115024, -8.400e-06, -6.550e-06,\n -1.4326169, -0.1353771, -3.700e-06, 1.640e-06,\n 12.5858498, -0.0137780, -3.000e-06,\n 329.7385864, 15.0031252, 0.000e-00,\n 0.5573470, 0.0001260, -1.070e-05,\n 0.0111530, 0.0001254, -1.060e-05,\n 0.0046599, 0.0046367,\n// 43 9 22\n1737027.559179, 1.0, -4.0, 4.0, 10098.8, 10098.8,\n 0.2021870, 0.4889527, -2.410e-05, -5.760e-06,\n 1.3202890, -0.1589790, -5.670e-05, 1.830e-06,\n 1.4362900, -0.0162610, 0.000e-00,\n 196.6412811, 15.0042229, 0.000e-00,\n 0.5669430, 0.0000951, -1.020e-05,\n 0.0207020, 0.0000946, -1.010e-05,\n 0.0047016, 0.0046782,\n// 44 2 17\n1737176.268591, 18.0, -4.0, 4.0, 10094.8, 10094.8,\n -0.4009750, 0.5257639, 1.500e-05, -7.240e-06,\n 0.5835390, 0.1357644, 5.590e-05, -1.810e-06,\n -12.6927605, 0.0139450, 3.000e-06,\n 85.8156281, 15.0025368, 0.000e-00,\n 0.5529940, -0.0001145, -1.130e-05,\n 0.0068220, -0.0001139, -1.120e-05,\n 0.0046952, 0.0046718,\n// 44 8 11\n1737352.355524, 21.0, -4.0, 4.0, 10090.0, 10090.0,\n 0.1004050, 0.5503082, -4.080e-05, -8.410e-06,\n -0.7863060, -0.1181112, -5.740e-05, 1.710e-06,\n 16.0134506, -0.0120330, -4.000e-06,\n 134.3795471, 15.0022678, 0.000e-00,\n 0.5415280, 0.0000974, -1.200e-05,\n -0.0045870, 0.0000969, -1.190e-05,\n 0.0046451, 0.0046219,\n// 45 2 5\n1737530.489917, 0.0, -4.0, 4.0, 10085.3, 10085.3,\n 0.1318920, 0.5019051, -1.350e-05, -5.870e-06,\n -0.0251030, 0.1041509, 1.032e-04, -1.150e-06,\n -16.2381306, 0.0122640, 4.000e-06,\n 175.6912079, 15.0009499, 0.000e-00,\n 0.5682730, -0.0000860, -1.010e-05,\n 0.0220250, -0.0000856, -1.010e-05,\n 0.0047106, 0.0046871,\n// 45 8 1\n1737707.007292, 12.0, -4.0, 4.0, 10080.5, 10080.5,\n -0.1010190, 0.5762281, -1.880e-05, -9.800e-06,\n 0.0146960, -0.0903696, -1.292e-04, 1.440e-06,\n 18.8822994, -0.0099250, -4.000e-06,\n 359.2861633, 15.0012951, 0.000e-00,\n 0.5322320, 0.0000306, -1.290e-05,\n -0.0138360, 0.0000304, -1.280e-05,\n 0.0046318, 0.0046087,\n// 46 1 25\n1737884.477267, 23.0, -4.0, 4.0, 10075.7, 10075.7,\n -0.1184070, 0.4991272, -1.710e-05, -5.580e-06,\n -0.7810720, 0.0721662, 1.502e-04, -7.400e-07,\n -19.3172607, 0.0099480, 5.000e-06,\n 161.0124207, 14.9992580, 0.000e-00,\n 0.5732570, 0.0000288, -9.900e-06,\n 0.0269840, 0.0000287, -9.800e-06,\n 0.0047250, 0.0047015,\n// 46 7 22\n1738061.708700, 5.0, -4.0, 4.0, 10070.9, 10070.9,\n 0.0637560, 0.5731184, -7.000e-06, -9.360e-06,\n 0.7306180, -0.0539993, -1.895e-04, 7.700e-07,\n 21.1324406, -0.0074930, -5.000e-06,\n 254.4490051, 15.0003157, 0.000e-00,\n 0.5349070, -0.0000725, -1.250e-05,\n -0.0111750, -0.0000722, -1.240e-05,\n 0.0046205, 0.0045975,\n// 46 12 16\n1738208.894945, 9.0, -4.0, 4.0, 10067.0, 10067.0,\n -0.0397640, 0.5349277, 6.600e-06, -7.290e-06,\n 1.5029600, -0.0790635, 9.670e-05, 1.230e-06,\n -23.5141201, -0.0020210, 7.000e-06,\n 315.1882629, 14.9962234, 0.000e-00,\n 0.5569300, 0.0001318, -1.140e-05,\n 0.0107380, 0.0001312, -1.130e-05,\n 0.0047569, 0.0047332,\n// 47 1 15\n1738238.532045, 1.0, -4.0, 4.0, 10066.2, 10066.2,\n 0.2253650, 0.5227410, -3.550e-05, -6.510e-06,\n -1.3998210, 0.0389260, 2.039e-04, -4.300e-07,\n -21.6488094, 0.0071120, 5.000e-06,\n 191.7726440, 14.9977818, 0.000e-00,\n 0.5641900, 0.0000994, -1.060e-05,\n 0.0179620, 0.0000990, -1.060e-05,\n 0.0047368, 0.0047132,\n// 47 6 12\n1738386.804425, 7.0, -4.0, 4.0, 10062.2, 10062.2,\n 0.0595340, 0.5190567, 4.090e-05, -6.580e-06,\n -1.1628180, 0.1002260, -9.550e-05, -1.380e-06,\n 23.1231709, 0.0034330, -6.000e-06,\n 286.4073792, 14.9994488, 0.000e-00,\n 0.5542330, -0.0001027, -1.050e-05,\n 0.0080550, -0.0001022, -1.050e-05,\n 0.0045965, 0.0045736,\n// 47 7 11\n1738416.264460, 18.0, -4.0, 4.0, 10061.4, 10061.4,\n -0.1492470, 0.5458096, 1.900e-05, -7.620e-06,\n 1.5393831, -0.0141326, -2.287e-04, 7.000e-08,\n 22.7274303, -0.0047330, -5.000e-06,\n 89.8503265, 14.9994841, 0.000e-00,\n 0.5473950, -0.0001098, -1.120e-05,\n 0.0012510, -0.0001093, -1.110e-05,\n 0.0046112, 0.0045883,\n// 47 12 5\n1738563.378173, 21.0, -4.0, 4.0, 10057.5, 10057.5,\n 0.1272420, 0.5573069, 1.920e-05, -8.960e-06,\n 0.7316570, -0.1310577, 1.255e-04, 2.280e-06,\n -22.4943504, -0.0053300, 6.000e-06,\n 136.4568634, 14.9969206, 0.000e-00,\n 0.5429870, 0.0000828, -1.270e-05,\n -0.0031360, 0.0000824, -1.260e-05,\n 0.0047586, 0.0047349,\n// 48 5 31\n1738740.938972, 11.0, -4.0, 4.0, 10052.7, 10052.7,\n 0.3356200, 0.4890004, 2.850e-05, -5.490e-06,\n -0.3313840, 0.1344581, -1.150e-04, -1.640e-06,\n 21.7454605, 0.0063210, -5.000e-06,\n 346.8052063, 15.0002193, 0.000e-00,\n 0.5645900, -0.0000433, -9.700e-06,\n 0.0183600, -0.0000431, -9.700e-06,\n 0.0045960, 0.0045731,\n// 48 11 24\n1738918.020940, 12.0, -4.0, 4.0, 10047.9, 10047.9,\n -0.2589850, 0.5552968, 6.220e-05, -9.370e-06,\n 0.1518440, -0.1757147, 1.381e-04, 3.160e-06,\n -20.6506100, -0.0083170, 5.000e-06,\n 2.4798501, 14.9980555, 0.000e-00,\n 0.5388070, -0.0000053, -1.310e-05,\n -0.0072950, -0.0000053, -1.310e-05,\n 0.0047577, 0.0047340,\n// 49 5 20\n1739094.968345, 11.0, -4.0, 4.0, 10043.2, 10043.2,\n -0.2349340, 0.4832540, 3.900e-05, -5.570e-06,\n 0.2978070, 0.1696581, -1.268e-04, -2.090e-06,\n 19.5806408, 0.0089360, -4.000e-06,\n 346.9313354, 15.0013313, 0.000e-00,\n 0.5623510, 0.0000701, -9.900e-06,\n 0.0161330, 0.0000697, -9.900e-06,\n 0.0045980, 0.0045751,\n// 49 11 14\n1739272.629824, 3.0, -4.0, 4.0, 10038.4, 10038.4,\n -0.2854470, 0.5250742, 7.570e-05, -7.990e-06,\n -0.5556250, -0.2036950, 1.437e-04, 3.300e-06,\n -18.0716896, -0.0109040, 4.000e-06,\n 228.1641083, 14.9994040, 0.000e-00,\n 0.5470320, -0.0001011, -1.230e-05,\n 0.0008890, -0.0001006, -1.220e-05,\n 0.0047544, 0.0047307,\n// 50 5 9\n1739449.194292, 17.0, -4.0, 4.0, 10033.7, 10033.7,\n -0.2548090, 0.4990364, 3.690e-05, -6.690e-06,\n 1.0883300, 0.2071315, -1.523e-04, -2.910e-06,\n 16.8098507, 0.0110980, -4.000e-06,\n 76.7424698, 15.0025511, 0.000e-00,\n 0.5494330, 0.0001100, -1.100e-05,\n 0.0032790, 0.0001094, -1.090e-05,\n 0.0046022, 0.0045793,\n// 50 11 3\n1739627.017964, 12.0, -4.0, 4.0, 10028.9, 10028.9,\n -0.7700630, 0.4828314, 8.810e-05, -6.100e-06,\n -1.1572720, -0.2170413, 1.334e-04, 2.950e-06,\n -14.7988195, -0.0130490, 3.000e-06,\n 3.4739699, 15.0008125, 0.000e-00,\n 0.5622800, -0.0001032, -1.080e-05,\n 0.0160620, -0.0001026, -1.080e-05,\n 0.0047485, 0.0047248,\n// 51 3 30\n1739774.396608, 22.0, -4.0, 4.0, 10025.0, 10025.0,\n 0.6178790, 0.5079639, -2.980e-05, -8.430e-06,\n -0.5352910, 0.2825232, 1.200e-05, -4.900e-06,\n 3.0321600, 0.0154440, -1.000e-06,\n 148.8769836, 15.0051718, 0.000e-00,\n 0.5333700, 0.0000292, -1.280e-05,\n -0.0127040, 0.0000290, -1.270e-05,\n 0.0046382, 0.0046151,\n// 51 9 23\n1739951.339181, 20.0, -4.0, 4.0, 10020.2, 10020.2,\n 0.3780820, 0.4391982, -1.970e-05, -4.800e-06,\n 0.8155720, -0.2473063, -3.430e-05, 2.880e-06,\n 0.6962800, -0.0160860, 0.000e-00,\n 121.7768173, 15.0040846, 0.000e-00,\n 0.5721600, 0.0000208, -9.800e-06,\n 0.0258930, 0.0000207, -9.800e-06,\n 0.0047041, 0.0046807,\n// 52 3 19\n1740129.096751, 14.0, -4.0, 4.0, 10015.4, 10015.4,\n -0.1376250, 0.5047349, 1.140e-05, -8.280e-06,\n -0.1356700, 0.2835549, 1.680e-05, -4.860e-06,\n -1.0946300, 0.0156380, 0.000e-00,\n 27.8799305, 15.0050402, 0.000e-00,\n 0.5350560, -0.0000523, -1.270e-05,\n -0.0110270, -0.0000520, -1.260e-05,\n 0.0046518, 0.0046286,\n// 52 9 11\n1740305.389306, 21.0, -4.0, 4.0, 10010.7, 10010.7,\n -0.0779840, 0.4569846, -2.670e-05, -5.530e-06,\n 0.2295960, -0.2521176, -2.970e-05, 3.230e-06,\n 5.1328802, -0.0156230, -1.000e-06,\n 135.9595642, 15.0040770, 0.000e-00,\n 0.5625160, 0.0001127, -1.050e-05,\n 0.0162960, 0.0001122, -1.040e-05,\n 0.0046884, 0.0046650,\n// 53 3 9\n1740483.680090, 4.0, -4.0, 4.0, 10005.9, 10005.9,\n -0.4926130, 0.4834910, 2.440e-05, -6.850e-06,\n 0.5289480, 0.2650959, 8.700e-06, -3.960e-06,\n -5.2501302, 0.0154340, 1.000e-06,\n 236.9631195, 15.0044613, 0.000e-00,\n 0.5477330, -0.0001143, -1.160e-05,\n 0.0015870, -0.0001137, -1.150e-05,\n 0.0046669, 0.0046436,\n// 53 9 1\n1740659.728912, 5.0, -4.0, 4.0, 10001.2, 10001.2,\n -0.5080390, 0.4922797, -1.930e-05, -7.160e-06,\n -0.3804000, -0.2570181, -2.540e-05, 3.920e-06,\n 9.2718000, -0.0146740, -2.000e-06,\n 255.2335358, 15.0037203, 0.000e-00,\n 0.5461760, 0.0001301, -1.180e-05,\n 0.0000380, 0.0001295, -1.170e-05,\n 0.0046724, 0.0046491,\n// 54 1 27\n1740808.286083, 19.0, -4.0, 4.0, 9997.3, 9997.3,\n 0.5668550, 0.4761293, -5.540e-05, -5.350e-06,\n -1.3424700, 0.1753958, 1.675e-04, -2.110e-06,\n -18.8465900, 0.0101420, 4.000e-06,\n 100.9322433, 14.9994774, 0.000e-00,\n 0.5716110, -0.0000581, -1.000e-05,\n 0.0253460, -0.0000578, -9.900e-06,\n 0.0047228, 0.0046993,\n// 54 2 26\n1740837.983046, 12.0, -4.0, 4.0, 9996.5, 9996.5,\n -0.4967490, 0.4606482, 1.040e-05, -5.470e-06,\n 1.4207840, 0.2380460, -4.900e-06, -3.020e-06,\n -9.3753595, 0.0147550, 2.000e-06,\n 356.2219543, 15.0034609, 0.000e-00,\n 0.5636930, -0.0001063, -1.030e-05,\n 0.0174680, -0.0001058, -1.030e-05,\n 0.0046830, 0.0046596,\n// 54 7 23\n1740985.016972, 12.0, -4.0, 4.0, 9992.5, 9992.5,\n 0.1466860, 0.5592299, -5.260e-05, -9.510e-06,\n 1.3006010, -0.1698759, -2.163e-04, 3.050e-06,\n 20.8767796, -0.0075610, -5.000e-06,\n 359.4074707, 15.0004025, 0.000e-00,\n 0.5312950, 0.0000072, -1.290e-05,\n -0.0147690, 0.0000072, -1.280e-05,\n 0.0046215, 0.0045985,\n// 54 8 21\n1741014.335090, 20.0, -4.0, 4.0, 9991.7, 9991.7,\n -0.5619020, 0.5240852, -1.210e-05, -8.700e-06,\n -1.1223940, -0.2497113, -1.190e-05, 4.330e-06,\n 13.0031700, -0.0133210, -3.000e-06,\n 119.6780777, 15.0030603, 0.000e-00,\n 0.5344870, 0.0000498, -1.280e-05,\n -0.0115930, 0.0000495, -1.270e-05,\n 0.0046571, 0.0046339,\n// 55 1 16\n1741162.255368, 18.0, -4.0, 4.0, 9987.8, 9987.8,\n 0.1542880, 0.4870323, -5.280e-05, -5.490e-06,\n -0.7625330, 0.1419828, 1.626e-04, -1.750e-06,\n -21.3338108, 0.0073570, 5.000e-06,\n 86.6296463, 14.9979124, 0.000e-00,\n 0.5723510, 0.0000518, -1.000e-05,\n 0.0260830, 0.0000516, -9.900e-06,\n 0.0047354, 0.0047118,\n// 55 7 13\n1741339.699340, 5.0, -4.0, 4.0, 9983.0, 9983.0,\n 0.2518610, 0.5538384, -3.500e-05, -8.690e-06,\n 0.5406210, -0.1289933, -1.844e-04, 2.160e-06,\n 22.5462894, -0.0048830, -5.000e-06,\n 254.7753143, 14.9995966, 0.000e-00,\n 0.5374160, -0.0000984, -1.220e-05,\n -0.0086780, -0.0000979, -1.210e-05,\n 0.0046119, 0.0045890,\n// 56 1 5\n1741516.378811, 21.0, -4.0, 4.0, 9978.3, 9978.3,\n -0.0369920, 0.5219941, -4.870e-05, -6.800e-06,\n -0.0616910, 0.1082909, 1.584e-04, -1.560e-06,\n -22.9596691, 0.0041510, 6.000e-06,\n 132.6976929, 14.9967861, 0.000e-00,\n 0.5602530, 0.0001180, -1.100e-05,\n 0.0140450, 0.0001174, -1.090e-05,\n 0.0047452, 0.0047216,\n// 56 7 1\n1741694.186085, 16.0, -4.0, 4.0, 9973.5, 9973.5,\n -0.2745440, 0.5296872, 3.900e-06, -6.980e-06,\n -0.1413830, -0.0815967, -1.491e-04, 1.190e-06,\n 23.4989891, -0.0019460, -6.000e-06,\n 60.3205299, 14.9990797, 0.000e-00,\n 0.5514960, -0.0001050, -1.080e-05,\n 0.0053320, -0.0001045, -1.080e-05,\n 0.0046047, 0.0045817,\n// 56 12 25\n1741870.803158, 7.0, -4.0, 4.0, 9968.8, 9968.8,\n -0.2319960, 0.5622042, -2.460e-05, -8.780e-06,\n 0.6150920, 0.0681598, 1.431e-04, -1.190e-06,\n -23.6584206, 0.0007560, 7.000e-06,\n 283.9906006, 14.9962740, 0.000e-00,\n 0.5453590, 0.0001033, -1.240e-05,\n -0.0007750, 0.0001028, -1.240e-05,\n 0.0047521, 0.0047285,\n// 57 6 20\n1742048.374498, 21.0, -4.0, 4.0, 9964.1, 9964.1,\n -0.0641840, 0.5083673, -3.000e-07, -5.820e-06,\n -0.9788160, -0.0365335, -1.101e-04, 5.200e-07,\n 23.6431198, 0.0011460, -6.000e-06,\n 135.9382477, 14.9990339, 0.000e-00,\n 0.5634560, -0.0000539, -9.800e-06,\n 0.0172320, -0.0000536, -9.800e-06,\n 0.0045997, 0.0045768,\n// 57 11 15\n1742195.982863, 12.0, -4.0, 4.0, 9960.1, 9960.1,\n -0.0002610, 0.5717561, 3.100e-05, -9.590e-06,\n -1.4255140, -0.0969646, 2.109e-04, 1.550e-06,\n -18.4545097, -0.0108320, 4.000e-06,\n 3.0989101, 14.9993277, 0.000e-00,\n 0.5397560, -0.0000579, -1.300e-05,\n -0.0063510, -0.0000576, -1.290e-05,\n 0.0047545, 0.0047308,\n// 57 12 14\n1742225.427467, 22.0, -4.0, 4.0, 9959.4, 9959.4,\n -0.1956770, 0.5821730, 3.100e-06, -9.900e-06,\n 1.2704800, 0.0203768, 1.071e-04, -4.700e-07,\n -23.4470692, -0.0026320, 7.000e-06,\n 150.3306427, 14.9963884, 0.000e-00,\n 0.5384670, 0.0000122, -1.320e-05,\n -0.0076330, 0.0000121, -1.310e-05,\n 0.0047564, 0.0047327,\n// 58 5 11\n1742372.818939, 8.0, -4.0, 4.0, 9955.4, 9955.4,\n -0.0295810, 0.5091601, 9.800e-06, -6.130e-06,\n 1.1024430, 0.0977963, -1.514e-04, -1.090e-06,\n 17.2713203, 0.0110360, -4.000e-06,\n 301.7907715, 15.0023947, 0.000e-00,\n 0.5595940, 0.0000798, -1.010e-05,\n 0.0133900, 0.0000794, -1.010e-05,\n 0.0046019, 0.0045790,\n// 58 11 5\n1742550.548001, 1.0, -4.0, 4.0, 9950.6, 9950.6,\n -0.2522420, 0.5404588, 5.120e-05, -7.900e-06,\n -0.7415090, -0.1210097, 1.325e-04, 1.710e-06,\n -15.3148899, -0.0129950, 3.000e-06,\n 198.4557953, 15.0007439, 0.000e-00,\n 0.5509330, -0.0001117, -1.190e-05,\n 0.0047710, -0.0001111, -1.180e-05,\n 0.0047489, 0.0047253,\n// 59 4 30\n1742727.128176, 15.0, -4.0, 4.0, 9945.9, 9945.9,\n -0.1056820, 0.5343768, 9.400e-06, -7.620e-06,\n 0.2585480, 0.1293206, -1.033e-04, -1.760e-06,\n 14.0555601, 0.0128490, -3.000e-06,\n 46.3357582, 15.0035639, 0.000e-00,\n 0.5454000, 0.0001185, -1.140e-05,\n -0.0007340, 0.0001179, -1.130e-05,\n 0.0046080, 0.0045851,\n// 59 10 25\n1742904.851966, 8.0, -4.0, 4.0, 9941.2, 9941.2,\n -0.2483720, 0.5024480, 4.150e-05, -6.120e-06,\n -0.0277390, -0.1350827, 6.510e-05, 1.580e-06,\n -11.5861502, -0.0146560, 3.000e-06,\n 303.4307861, 15.0020542, 0.000e-00,\n 0.5661990, -0.0000885, -1.050e-05,\n 0.0199610, -0.0000881, -1.040e-05,\n 0.0047408, 0.0047172,\n// 60 4 19\n1743081.714033, 5.0, -4.0, 4.0, 9936.4, 9936.4,\n 0.0542460, 0.5563007, 6.200e-06, -9.190e-06,\n -0.4848850, 0.1564606, -4.110e-05, -2.510e-06,\n 10.4999704, 0.0142050, -2.000e-06,\n 255.6409454, 15.0044918, 0.000e-00,\n 0.5336690, 0.0000656, -1.260e-05,\n -0.0124070, 0.0000653, -1.250e-05,\n 0.0046164, 0.0045934,\n// 60 10 13\n1743258.879062, 9.0, -4.0, 4.0, 9931.7, 9931.7,\n 0.1303930, 0.4819250, 7.900e-06, -5.350e-06,\n 0.6013960, -0.1455812, 1.710e-05, 1.550e-06,\n -7.3932700, -0.0157610, 2.000e-06,\n 318.0519409, 15.0031471, 0.000e-00,\n 0.5738660, -0.0000052, -9.800e-06,\n 0.0275900, -0.0000052, -9.800e-06,\n 0.0047297, 0.0047062,\n// 61 3 10\n1743407.080831, 14.0, -4.0, 4.0, 9927.8, 9927.8,\n -0.3864340, 0.5455990, 2.400e-05, -8.790e-06,\n 1.3201760, 0.1746288, -3.910e-05, -2.760e-06,\n -4.6798701, 0.0157100, 1.000e-06,\n 27.0817299, 15.0047064, 0.000e-00,\n 0.5381300, -0.0000862, -1.250e-05,\n -0.0079680, -0.0000857, -1.240e-05,\n 0.0046644, 0.0046412,\n// 61 4 8\n1743436.421899, 22.0, -4.0, 4.0, 9927.0, 9927.0,\n 0.2859030, 0.5558366, 9.000e-07, -9.400e-06,\n -1.1634300, 0.1731722, 2.790e-05, -2.840e-06,\n 6.6804800, 0.0151580, -2.000e-06,\n 149.7674255, 15.0050640, 0.000e-00,\n 0.5323570, -0.0000354, -1.280e-05,\n -0.0137120, -0.0000353, -1.270e-05,\n 0.0046271, 0.0046040,\n// 61 10 2\n1743612.878791, 9.0, -4.0, 4.0, 9922.3, 9922.3,\n 0.3503640, 0.4903137, -2.210e-05, -5.810e-06,\n 1.2392780, -0.1580959, -2.960e-05, 1.830e-06,\n -2.9587700, -0.0162730, 1.000e-06,\n 317.4127197, 15.0039206, 0.000e-00,\n 0.5672160, 0.0000924, -1.020e-05,\n 0.0209730, 0.0000920, -1.020e-05,\n 0.0047159, 0.0046924,\n// 62 2 28\n1743761.595446, 2.0, -4.0, 4.0, 9918.3, 9918.3,\n -0.3494780, 0.5192309, 1.750e-05, -7.080e-06,\n 0.6296920, 0.1528953, 2.850e-05, -2.030e-06,\n -8.7629604, 0.0151030, 2.000e-06,\n 206.3136444, 15.0037689, 0.000e-00,\n 0.5530030, -0.0001178, -1.120e-05,\n 0.0068310, -0.0001172, -1.110e-05,\n 0.0046803, 0.0046569,\n// 62 8 23\n1743937.678496, 4.0, -4.0, 4.0, 9913.6, 9913.6,\n -0.3567030, 0.5460720, -1.730e-05, -8.440e-06,\n -0.7283320, -0.1431860, -3.410e-05, 2.120e-06,\n 12.5321798, -0.0137770, -3.000e-06,\n 239.7412872, 15.0032291, 0.000e-00,\n 0.5414480, 0.0001127, -1.210e-05,\n -0.0046670, 0.0001122, -1.200e-05,\n 0.0046590, 0.0046358,\n// 63 2 17\n1744115.805443, 7.0, -4.0, 4.0, 9908.8, 9908.8,\n -0.1591830, 0.4955901, -2.600e-06, -5.760e-06,\n -0.0602490, 0.1271059, 7.960e-05, -1.410e-06,\n -12.7120199, 0.0139590, 3.000e-06,\n 280.8152466, 15.0024452, 0.000e-00,\n 0.5680100, -0.0000699, -1.010e-05,\n 0.0217640, -0.0000695, -1.000e-05,\n 0.0046965, 0.0046731,\n// 63 8 12\n1744292.333033, 20.0, -4.0, 4.0, 9904.2, 9904.2,\n -0.0077140, 0.5704963, -2.500e-05, -9.720e-06,\n -0.0559270, -0.1225714, -1.015e-04, 2.000e-06,\n 15.9034300, -0.0120850, -4.000e-06,\n 119.3800583, 15.0023623, 0.000e-00,\n 0.5327670, 0.0000200, -1.290e-05,\n -0.0133040, 0.0000199, -1.280e-05,\n 0.0046446, 0.0046215,\n// 64 2 6\n1744469.794388, 7.0, -4.0, 4.0, 9899.4, 9899.4,\n 0.1151360, 0.4945118, -2.850e-05, -5.540e-06,\n -0.7215810, 0.1019662, 1.248e-04, -1.080e-06,\n -16.3295193, 0.0122130, 4.000e-06,\n 280.6957092, 15.0008726, 0.000e-00,\n 0.5722260, 0.0000264, -9.900e-06,\n 0.0259580, 0.0000262, -9.800e-06,\n 0.0047119, 0.0046884,\n// 64 8 1\n1744647.025149, 13.0, -4.0, 4.0, 9894.7, 9894.7,\n 0.3315020, 0.5668475, -2.620e-05, -9.200e-06,\n 0.6289020, -0.0911548, -1.644e-04, 1.380e-06,\n 18.7700996, -0.0100190, -4.000e-06,\n 14.2764702, 15.0013237, 0.000e-00,\n 0.5360810, -0.0000872, -1.240e-05,\n -0.0100060, -0.0000868, -1.240e-05,\n 0.0046320, 0.0046089,\n// 64 12 26\n1744794.247905, 18.0, -4.0, 4.0, 9890.8, 9890.8,\n 0.1175300, 0.5416097, -1.310e-05, -7.460e-06,\n 1.4760610, -0.0330862, 9.840e-05, 5.900e-07,\n -23.6166191, 0.0015000, 7.000e-06,\n 88.8104477, 14.9962645, 0.000e-00,\n 0.5558550, 0.0001192, -1.140e-05,\n 0.0096690, 0.0001186, -1.140e-05,\n 0.0047518, 0.0047282,\n// 65 1 25\n1744823.866318, 9.0, -4.0, 4.0, 9890.0, 9890.0,\n 0.3097710, 0.5204406, -4.690e-05, -6.540e-06,\n -1.3625730, 0.0760905, 1.818e-04, -9.100e-07,\n -19.3613205, 0.0098940, 5.000e-06,\n 311.0293274, 14.9992762, 0.000e-00,\n 0.5626850, 0.0001019, -1.070e-05,\n 0.0164650, 0.0001013, -1.060e-05,\n 0.0047252, 0.0047017,\n// 65 6 22\n1744972.084859, 14.0, -4.0, 4.0, 9886.0, 9886.0,\n 0.1186110, 0.5233346, 2.750e-05, -6.580e-06,\n -1.2313280, 0.0586643, -1.003e-04, -8.300e-07,\n 23.6769791, 0.0004080, -6.000e-06,\n 30.8330593, 14.9990406, 0.000e-00,\n 0.5553190, -0.0001050, -1.050e-05,\n 0.0091360, -0.0001045, -1.040e-05,\n 0.0045999, 0.0045770,\n// 65 7 22\n1745001.561916, 1.0, -4.0, 4.0, 9885.2, 9885.2,\n -0.1177410, 0.5410379, 7.000e-06, -7.460e-06,\n 1.4917589, -0.0533872, -2.123e-04, 6.200e-07,\n 21.0851898, -0.0075530, -5.000e-06,\n 194.4337463, 15.0002613, 0.000e-00,\n 0.5489530, -0.0001064, -1.110e-05,\n 0.0028020, -0.0001059, -1.110e-05,\n 0.0046210, 0.0045980,\n// 65 12 16\n1745148.744811, 6.0, -4.0, 4.0, 9881.3, 9881.3,\n 0.1799920, 0.5674547, 5.400e-06, -9.190e-06,\n 0.7233670, -0.0844923, 1.373e-04, 1.520e-06,\n -23.5236092, -0.0019230, 6.000e-06,\n 270.1665955, 14.9963036, 0.000e-00,\n 0.5423520, 0.0000729, -1.280e-05,\n -0.0037670, 0.0000725, -1.270e-05,\n 0.0047561, 0.0047324,\n// 66 6 11\n1745326.203550, 17.0, -4.0, 4.0, 9876.6, 9876.6,\n 0.1530600, 0.4970473, 2.610e-05, -5.580e-06,\n -0.4773160, 0.0976392, -1.226e-04, -1.210e-06,\n 23.1038704, 0.0034880, -6.000e-06,\n 76.4030609, 14.9994020, 0.000e-00,\n 0.5649330, -0.0000294, -9.700e-06,\n 0.0187010, -0.0000292, -9.700e-06,\n 0.0045969, 0.0045740,\n// 66 12 5\n1745503.391077, 21.0, -4.0, 4.0, 9871.9, 9871.9,\n -0.2031570, 0.5668099, 5.300e-05, -9.570e-06,\n 0.1176980, -0.1325397, 1.604e-04, 2.410e-06,\n -22.5420094, -0.0052080, 6.000e-06,\n 136.4275513, 14.9969158, 0.000e-00,\n 0.5389770, -0.0000144, -1.310e-05,\n -0.0071250, -0.0000143, -1.310e-05,\n 0.0047583, 0.0047346,\n// 67 5 31\n1745680.237752, 18.0, -4.0, 4.0, 9867.2, 9867.2,\n 0.0729730, 0.4947936, 2.370e-05, -5.750e-06,\n 0.3018020, 0.1370308, -1.442e-04, -1.720e-06,\n 21.6944008, 0.0063910, -5.000e-06,\n 91.7960434, 15.0002565, 0.000e-00,\n 0.5616670, 0.0000656, -9.900e-06,\n 0.0154530, 0.0000652, -9.900e-06,\n 0.0045961, 0.0045732,\n// 67 11 25\n1745857.991719, 12.0, -4.0, 4.0, 9862.4, 9862.4,\n -0.0783840, 0.5360440, 6.530e-05, -8.110e-06,\n -0.6250410, -0.1674363, 1.720e-04, 2.720e-06,\n -20.7263393, -0.0082320, 5.000e-06,\n 2.4633400, 14.9979601, 0.000e-00,\n 0.5479130, -0.0001121, -1.220e-05,\n 0.0017660, -0.0001116, -1.210e-05,\n 0.0047580, 0.0047343,\n// 68 5 19\n1746034.483580, 0.0, -4.0, 4.0, 9857.7, 9857.7,\n -0.1349430, 0.5122801, 3.230e-05, -6.970e-06,\n 1.0351570, 0.1787130, -1.712e-04, -2.560e-06,\n 19.5655804, 0.0089260, -4.000e-06,\n 181.9208527, 15.0014067, 0.000e-00,\n 0.5481950, 0.0001098, -1.100e-05,\n 0.0020470, 0.0001092, -1.100e-05,\n 0.0045976, 0.0045747,\n// 68 11 13\n1746212.363135, 21.0, -4.0, 4.0, 9853.0, 9853.0,\n -0.3509870, 0.4925433, 7.560e-05, -6.190e-06,\n -1.3314350, -0.1892849, 1.659e-04, 2.570e-06,\n -18.1046906, -0.0109070, 4.000e-06,\n 138.1697998, 14.9993048, 0.000e-00,\n 0.5634030, -0.0001174, -1.080e-05,\n 0.0171790, -0.0001168, -1.070e-05,\n 0.0047549, 0.0047312,\n// 69 4 10\n1746359.717557, 5.0, -4.0, 4.0, 9849.1, 9849.1,\n 0.2770600, 0.5130118, 2.000e-07, -8.560e-06,\n -0.7896270, 0.2749774, 2.300e-06, -4.800e-06,\n 7.1833701, 0.0148140, -2.000e-06,\n 254.8890228, 15.0049038, 0.000e-00,\n 0.5323740, 0.0000414, -1.280e-05,\n -0.0136950, 0.0000412, -1.270e-05,\n 0.0046258, 0.0046027,\n// 69 10 4\n1746536.652763, 4.0, -4.0, 4.0, 9844.4, 9844.4,\n 0.5974880, 0.4403191, -1.560e-05, -4.810e-06,\n 0.7271810, -0.2452389, -9.100e-06, 2.860e-06,\n -3.6980300, -0.0160110, 1.000e-06,\n 242.5314636, 15.0037107, 0.000e-00,\n 0.5729310, 0.0000170, -9.800e-06,\n 0.0266600, 0.0000169, -9.800e-06,\n 0.0047182, 0.0046947,\n// 70 3 30\n1746714.422211, 22.0, -4.0, 4.0, 9839.7, 9839.7,\n -0.0159830, 0.5048202, 1.910e-05, -8.240e-06,\n -0.1292550, 0.2814943, -6.700e-06, -4.800e-06,\n 3.1826501, 0.0154330, -1.000e-06,\n 148.9159851, 15.0051537, 0.000e-00,\n 0.5347580, -0.0000622, -1.260e-05,\n -0.0113230, -0.0000619, -1.260e-05,\n 0.0046382, 0.0046151,\n// 70 9 23\n1746890.708419, 5.0, -4.0, 4.0, 9835.0, 9835.0,\n 0.0961640, 0.4559232, -2.130e-05, -5.550e-06,\n 0.1728510, -0.2569139, -5.000e-06, 3.320e-06,\n 0.7885100, -0.0160550, 0.000e-00,\n 256.7572632, 15.0041342, 0.000e-00,\n 0.5626600, 0.0001087, -1.050e-05,\n 0.0164400, 0.0001082, -1.050e-05,\n 0.0047031, 0.0046797,\n// 71 3 20\n1747068.999165, 12.0, -4.0, 4.0, 9830.2, 9830.2,\n -0.3102650, 0.4794062, 2.900e-05, -6.730e-06,\n 0.5759060, 0.2687812, -1.580e-05, -3.980e-06,\n -0.9752400, 0.0156760, 0.000e-00,\n 357.9114685, 15.0049801, 0.000e-00,\n 0.5477650, -0.0001229, -1.150e-05,\n 0.0016190, -0.0001223, -1.140e-05,\n 0.0046524, 0.0046292,\n// 71 9 12\n1747245.059423, 13.0, -4.0, 4.0, 9825.5, 9825.5,\n -0.4647320, 0.4880011, -9.100e-06, -7.160e-06,\n -0.3518260, -0.2686969, -2.700e-06, 4.130e-06,\n 5.1095800, -0.0155830, -1.000e-06,\n 15.9635201, 15.0041590, 0.000e-00,\n 0.5461980, 0.0001268, -1.190e-05,\n 0.0000600, 0.0001262, -1.180e-05,\n 0.0046874, 0.0046641,\n// 72 2 8\n1747393.604223, 2.0, -4.0, 4.0, 9821.6, 9821.6,\n 0.3585030, 0.4648397, -4.700e-05, -5.190e-06,\n -1.4617190, 0.2019501, 1.482e-04, -2.400e-06,\n -15.7670898, 0.0123110, 3.000e-06,\n 205.6879883, 15.0010710, 0.000e-00,\n 0.5711550, -0.0000404, -9.900e-06,\n 0.0248920, -0.0000402, -9.900e-06,\n 0.0047093, 0.0046859,\n// 72 3 8\n1747423.290564, 19.0, -4.0, 4.0, 9820.8, 9820.8,\n -0.6824810, 0.4540910, 2.710e-05, -5.340e-06,\n 1.2790350, 0.2478337, -2.150e-05, -3.110e-06,\n -5.2426200, 0.0154770, 1.000e-06,\n 101.9626617, 15.0043859, 0.000e-00,\n 0.5635280, -0.0000943, -1.020e-05,\n 0.0173040, -0.0000938, -1.020e-05,\n 0.0046678, 0.0046446,\n// 72 8 2\n1747570.337612, 20.0, -4.0, 4.0, 9816.9, 9816.9,\n 0.4173020, 0.5468771, -6.810e-05, -9.270e-06,\n 1.2814810, -0.2053873, -1.938e-04, 3.660e-06,\n 18.4316101, -0.0100440, -4.000e-06,\n 119.2759399, 15.0014076, 0.000e-00,\n 0.5319830, -0.0000067, -1.290e-05,\n -0.0140840, -0.0000066, -1.280e-05,\n 0.0046333, 0.0046102,\n// 72 9 1\n1747599.668992, 4.0, -4.0, 4.0, 9816.1, 9816.1,\n -0.5865020, 0.5157395, -2.000e-07, -8.590e-06,\n -1.0583570, -0.2679922, 9.600e-06, 4.650e-06,\n 9.1427402, -0.0146810, -2.000e-06,\n 240.2562256, 15.0038033, 0.000e-00,\n 0.5349760, 0.0000446, -1.290e-05,\n -0.0111060, 0.0000443, -1.280e-05,\n 0.0046720, 0.0046488,\n// 73 1 27\n1747747.579497, 2.0, -4.0, 4.0, 9812.2, 9812.2,\n 0.3181860, 0.4770079, -6.180e-05, -5.380e-06,\n -0.7287190, 0.1756591, 1.398e-04, -2.150e-06,\n -18.9248695, 0.0100690, 4.000e-06,\n 205.9447327, 14.9994278, 0.000e-00,\n 0.5711830, 0.0000519, -1.000e-05,\n 0.0249200, 0.0000517, -1.000e-05,\n 0.0047234, 0.0046999,\n// 73 7 23\n1747925.008891, 12.0, -4.0, 4.0, 9807.5, 9807.5,\n 0.0777260, 0.5413622, -3.340e-05, -8.390e-06,\n 0.6586990, -0.1678781, -1.740e-04, 2.750e-06,\n 20.7992001, -0.0076640, -5.000e-06,\n 359.3951721, 15.0003958, 0.000e-00,\n 0.5387590, -0.0000915, -1.210e-05,\n -0.0073420, -0.0000910, -1.200e-05,\n 0.0046220, 0.0045990,\n// 74 1 16\n1748101.722028, 5.0, -4.0, 4.0, 9802.8, 9802.8,\n -0.1510560, 0.5138208, -5.230e-05, -6.750e-06,\n -0.1103670, 0.1492823, 1.426e-04, -2.120e-06,\n -21.3599892, 0.0072990, 5.000e-06,\n 251.6417847, 14.9979582, 0.000e-00,\n 0.5587800, 0.0001238, -1.110e-05,\n 0.0125790, 0.0001232, -1.100e-05,\n 0.0047353, 0.0047117,\n// 74 7 12\n1748279.474981, 23.0, -4.0, 4.0, 9798.1, 9798.1,\n -0.2319500, 0.5196463, -8.300e-06, -6.760e-06,\n -0.0547690, -0.1219835, -1.438e-04, 1.720e-06,\n 22.5261192, -0.0049400, -5.000e-06,\n 164.7614746, 14.9995222, 0.000e-00,\n 0.5529150, -0.0001044, -1.070e-05,\n 0.0067440, -0.0001039, -1.070e-05,\n 0.0046125, 0.0045895,\n// 75 1 5\n1748456.164602, 16.0, -4.0, 4.0, 9793.4, 9793.4,\n -0.1009430, 0.5560003, -4.290e-05, -8.730e-06,\n 0.6242060, 0.1155223, 1.321e-04, -1.960e-06,\n -22.9394798, 0.0041900, 6.000e-06,\n 57.6851006, 14.9968843, 0.000e-00,\n 0.5443450, 0.0000912, -1.250e-05,\n -0.0017840, 0.0000907, -1.240e-05,\n 0.0047448, 0.0047212,\n// 75 7 2\n1748633.643596, 3.0, -4.0, 4.0, 9788.7, 9788.7,\n -0.3602060, 0.5028460, -2.600e-06, -5.710e-06,\n -0.8538290, -0.0767809, -1.134e-04, 9.800e-07,\n 23.5047207, -0.0019190, -6.000e-06,\n 225.3142853, 14.9990149, 0.000e-00,\n 0.5642610, -0.0000383, -9.800e-06,\n 0.0180340, -0.0000381, -9.700e-06,\n 0.0046048, 0.0045818,\n// 75 11 26\n1748781.350985, 20.0, -4.0, 4.0, 9784.8, 9784.8,\n -0.3843730, 0.5762515, 4.370e-05, -9.620e-06,\n -1.3779891, -0.0578236, 2.327e-04, 8.900e-07,\n -21.0051098, -0.0081140, 5.000e-06,\n 122.3503036, 14.9978952, 0.000e-00,\n 0.5403220, -0.0000418, -1.300e-05,\n -0.0057870, -0.0000416, -1.290e-05,\n 0.0047580, 0.0047343,\n// 75 12 26\n1748810.796375, 7.0, -4.0, 4.0, 9784.0, 9784.0,\n -0.2184630, 0.5784017, -9.700e-06, -9.820e-06,\n 1.2562160, 0.0700308, 1.084e-04, -1.330e-06,\n -23.6481800, 0.0008780, 7.000e-06,\n 283.9544067, 14.9963217, 0.000e-00,\n 0.5382110, 0.0000023, -1.320e-05,\n -0.0078870, 0.0000022, -1.310e-05,\n 0.0047520, 0.0047283,\n// 76 5 21\n1748958.094301, 14.0, -4.0, 4.0, 9780.1, 9780.1,\n -0.2881810, 0.5157693, 1.460e-05, -6.270e-06,\n 1.1384920, 0.0680702, -1.734e-04, -7.400e-07,\n 19.9277592, 0.0088110, -4.000e-06,\n 31.9114704, 15.0012417, 0.000e-00,\n 0.5584800, 0.0000971, -1.020e-05,\n 0.0122810, 0.0000966, -1.010e-05,\n 0.0045974, 0.0045745,\n// 76 11 15\n1749135.904674, 10.0, -4.0, 4.0, 9775.4, 9775.4,\n 0.0293880, 0.5447248, 3.750e-05, -7.900e-06,\n -0.8001760, -0.0895110, 1.615e-04, 1.230e-06,\n -18.5331497, -0.0107790, 4.000e-06,\n 333.0960693, 14.9992180, 0.000e-00,\n 0.5520400, -0.0001242, -1.180e-05,\n 0.0058730, -0.0001236, -1.170e-05,\n 0.0047551, 0.0047314,\n// 77 5 10\n1749312.424736, 22.0, -4.0, 4.0, 9770.7, 9770.7,\n -0.1705450, 0.5422439, 1.230e-05, -7.830e-06,\n 0.3230100, 0.1036238, -1.294e-04, -1.410e-06,\n 17.2699203, 0.0110230, -4.000e-06,\n 151.7738342, 15.0024767, 0.000e-00,\n 0.5440480, 0.0001206, -1.140e-05,\n -0.0020790, 0.0001200, -1.140e-05,\n 0.0046013, 0.0045784,\n// 77 11 4\n1749490.189335, 17.0, -4.0, 4.0, 9766.0, 9766.0,\n 0.2088940, 0.5063864, 2.720e-05, -6.130e-06,\n -0.1502890, -0.1123214, 9.580e-05, 1.290e-06,\n -15.3303699, -0.0130050, 4.000e-06,\n 78.4684601, 15.0006552, 0.000e-00,\n 0.5673670, -0.0001049, -1.050e-05,\n 0.0211230, -0.0001044, -1.040e-05,\n 0.0047494, 0.0047257,\n// 78 4 30\n1749667.027443, 13.0, -4.0, 4.0, 9761.3, 9761.3,\n 0.2890370, 0.5629754, -1.200e-06, -9.360e-06,\n -0.3558470, 0.1355534, -7.240e-05, -2.170e-06,\n 14.1571598, 0.0127860, -3.000e-06,\n 16.3429699, 15.0035954, 0.000e-00,\n 0.5327670, 0.0000483, -1.260e-05,\n -0.0133040, 0.0000481, -1.250e-05,\n 0.0046078, 0.0045849,\n// 78 10 24\n1749844.202404, 17.0, -4.0, 4.0, 9756.6, 9756.6,\n 0.2241530, 0.4857641, 9.600e-06, -5.390e-06,\n 0.5565640, -0.1309126, 4.390e-05, 1.390e-06,\n -11.5002899, -0.0146920, 3.000e-06,\n 78.4359512, 15.0020475, 0.000e-00,\n 0.5746090, -0.0000048, -9.900e-06,\n 0.0283300, -0.0000048, -9.800e-06,\n 0.0047404, 0.0047168,\n// 79 3 21\n1749992.409110, 22.0, -4.0, 4.0, 9752.7, 9752.7,\n -0.3463640, 0.5430418, 3.080e-05, -8.690e-06,\n 1.3856410, 0.1784799, -6.750e-05, -2.800e-06,\n -0.3975100, 0.0158880, 0.000e-00,\n 148.0470428, 15.0051661, 0.000e-00,\n 0.5379620, -0.0000933, -1.240e-05,\n -0.0081350, -0.0000929, -1.230e-05,\n 0.0046503, 0.0046272,\n// 79 4 20\n1750021.740716, 6.0, -4.0, 4.0, 9751.9, 9751.9,\n 0.4340210, 0.5595811, 7.000e-07, -9.430e-06,\n -1.0583410, 0.1582786, -3.100e-06, -2.570e-06,\n 10.6556101, 0.0141520, -2.000e-06,\n 270.6669617, 15.0044584, 0.000e-00,\n 0.5320780, -0.0000500, -1.270e-05,\n -0.0139890, -0.0000498, -1.270e-05,\n 0.0046166, 0.0045936,\n// 79 10 13\n1750198.205242, 17.0, -4.0, 4.0, 9747.2, 9747.2,\n 0.4048670, 0.4938365, -1.730e-05, -5.890e-06,\n 1.1968290, -0.1505327, -3.300e-06, 1.750e-06,\n -7.2860699, -0.0157630, 2.000e-06,\n 78.0460205, 15.0032101, 0.000e-00,\n 0.5673450, 0.0000927, -1.030e-05,\n 0.0211010, 0.0000922, -1.030e-05,\n 0.0047285, 0.0047050,\n// 80 3 10\n1750346.914862, 10.0, -4.0, 4.0, 9743.3, 9743.3,\n -0.2036950, 0.5143249, 1.820e-05, -6.950e-06,\n 0.7203250, 0.1629482, -1.000e-07, -2.140e-06,\n -4.5896902, 0.0157490, 1.000e-06,\n 327.1010132, 15.0046358, 0.000e-00,\n 0.5530010, -0.0001245, -1.110e-05,\n 0.0068290, -0.0001239, -1.100e-05,\n 0.0046653, 0.0046421,\n// 80 9 2\n1750523.007658, 12.0, -4.0, 4.0, 9738.6, 9738.6,\n -0.3381100, 0.5425843, -1.230e-05, -8.460e-06,\n -0.7710550, -0.1615313, -5.700e-06, 2.420e-06,\n 8.6244297, -0.0150770, -2.000e-06,\n 0.3400800, 15.0039482, 0.000e-00,\n 0.5415390, 0.0001073, -1.220e-05,\n -0.0045760, 0.0001067, -1.210e-05,\n 0.0046739, 0.0046506,\n// 81 2 27\n1750701.113570, 15.0, -4.0, 4.0, 9733.9, 9733.9,\n 0.1282950, 0.4901919, -8.900e-06, -5.670e-06,\n 0.0604460, 0.1434967, 5.080e-05, -1.590e-06,\n -8.7863197, 0.0151200, 2.000e-06,\n 41.3161812, 15.0036850, 0.000e-00,\n 0.5675720, -0.0000771, -1.000e-05,\n 0.0213270, -0.0000767, -1.000e-05,\n 0.0046813, 0.0046580,\n// 81 8 23\n1750877.663876, 4.0, -4.0, 4.0, 9729.2, 9729.2,\n 0.0111570, 0.5645813, -2.330e-05, -9.630e-06,\n -0.1116520, -0.1479229, -7.280e-05, 2.430e-06,\n 12.3930998, -0.0138210, -3.000e-06,\n 239.7539673, 15.0033083, 0.000e-00,\n 0.5334280, 0.0000124, -1.290e-05,\n -0.0126460, 0.0000124, -1.290e-05,\n 0.0046590, 0.0046358,\n// 82 2 16\n1751055.104457, 15.0, -4.0, 4.0, 9724.5, 9724.5,\n 0.4137790, 0.4898362, -3.810e-05, -5.500e-06,\n -0.6119060, 0.1253557, 9.640e-05, -1.350e-06,\n -12.8052502, 0.0139260, 3.000e-06,\n 40.8169594, 15.0023899, 0.000e-00,\n 0.5710600, 0.0000208, -9.900e-06,\n 0.0247990, 0.0000207, -9.800e-06,\n 0.0046972, 0.0046738,\n// 82 8 12\n1751232.346015, 20.0, -4.0, 4.0, 9719.9, 9719.9,\n -0.0383270, 0.5593930, -1.000e-05, -9.000e-06,\n 0.6425110, -0.1218114, -1.412e-04, 1.860e-06,\n 15.7807503, -0.0121590, -3.000e-06,\n 119.3833237, 15.0023737, 0.000e-00,\n 0.5374780, -0.0000743, -1.240e-05,\n -0.0086170, -0.0000739, -1.230e-05,\n 0.0046452, 0.0046221,\n// 83 1 7\n1751379.599335, 2.0, -4.0, 4.0, 9715.9, 9715.9,\n -0.2425490, 0.5444649, -1.100e-05, -7.590e-06,\n 1.4769440, 0.0122245, 8.860e-05, -5.000e-08,\n -22.7739906, 0.0048960, 6.000e-06,\n 207.5325165, 14.9969883, 0.000e-00,\n 0.5544930, 0.0001282, -1.150e-05,\n 0.0083140, 0.0001276, -1.140e-05,\n 0.0047440, 0.0047203,\n// 83 2 5\n1751409.196419, 17.0, -4.0, 4.0, 9715.2, 9715.2,\n 0.4260430, 0.5167810, -5.470e-05, -6.560e-06,\n -1.3087630, 0.1074552, 1.554e-04, -1.320e-06,\n -16.3852100, 0.0121630, 4.000e-06,\n 70.7068100, 15.0008965, 0.000e-00,\n 0.5610630, 0.0001020, -1.070e-05,\n 0.0148500, 0.0001015, -1.070e-05,\n 0.0047119, 0.0046884,\n// 83 7 3\n1751557.365622, 21.0, -4.0, 4.0, 9711.2, 9711.2,\n 0.1600260, 0.5243533, 1.360e-05, -6.530e-06,\n -1.3146420, 0.0166648, -9.670e-05, -2.900e-07,\n 23.4016609, -0.0026600, -6.000e-06,\n 135.2153320, 14.9991159, 0.000e-00,\n 0.5565240, -0.0001068, -1.040e-05,\n 0.0103350, -0.0001063, -1.030e-05,\n 0.0046056, 0.0045827,\n// 83 8 2\n1751586.862003, 9.0, -4.0, 4.0, 9710.5, 9710.5,\n 0.3967530, 0.5341346, -2.080e-05, -7.300e-06,\n 1.3681639, -0.0881941, -1.879e-04, 1.100e-06,\n 18.7086296, -0.0100760, -4.000e-06,\n 314.2698975, 15.0012703, 0.000e-00,\n 0.5505030, -0.0001235, -1.110e-05,\n 0.0043440, -0.0001229, -1.100e-05,\n 0.0046325, 0.0046095,\n// 83 12 27\n1751734.111071, 15.0, -4.0, 4.0, 9706.6, 9706.6,\n 0.2380840, 0.5737751, -1.140e-05, -9.360e-06,\n 0.7301370, -0.0356869, 1.382e-04, 7.100e-07,\n -23.6033306, 0.0015930, 6.000e-06,\n 43.7841492, 14.9963579, 0.000e-00,\n 0.5416100, 0.0000625, -1.280e-05,\n -0.0045060, 0.0000622, -1.270e-05,\n 0.0047512, 0.0047275,\n// 84 6 21\n1751911.468113, 23.0, -4.0, 4.0, 9701.9, 9701.9,\n -0.0504770, 0.5026544, 2.140e-05, -5.630e-06,\n -0.5964280, 0.0582853, -1.247e-04, -7.600e-07,\n 23.6702900, 0.0004730, -6.000e-06,\n 165.8379669, 14.9989958, 0.000e-00,\n 0.5653460, -0.0000153, -9.700e-06,\n 0.0191130, -0.0000153, -9.600e-06,\n 0.0046000, 0.0045771,\n// 84 12 16\n1752088.761524, 6.0, -4.0, 4.0, 9697.2, 9697.2,\n -0.1489960, 0.5754910, 3.850e-05, -9.720e-06,\n 0.0925750, -0.0848193, 1.741e-04, 1.580e-06,\n -23.5394402, -0.0017930, 6.000e-06,\n 270.1206055, 14.9963102, 0.000e-00,\n 0.5390370, -0.0000232, -1.310e-05,\n -0.0070650, -0.0000231, -1.300e-05,\n 0.0047561, 0.0047324,\n// 85 6 11\n1752265.506938, 0.0, -4.0, 4.0, 9692.5, 9692.5,\n -0.1196820, 0.5048669, 2.170e-05, -5.930e-06,\n 0.1625680, 0.1003398, -1.515e-04, -1.300e-06,\n 23.0727291, 0.0035660, -5.000e-06,\n 181.4095764, 14.9994440, 0.000e-00,\n 0.5610170, 0.0000807, -1.000e-05,\n 0.0148050, 0.0000803, -9.900e-06,\n 0.0045965, 0.0045736,\n// 85 12 5\n1752443.354816, 21.0, -4.0, 4.0, 9687.8, 9687.8,\n 0.1253320, 0.5457766, 4.900e-05, -8.220e-06,\n -0.6656310, -0.1252498, 1.942e-04, 2.060e-06,\n -22.5890808, -0.0051060, 6.000e-06,\n 136.3946228, 14.9968252, 0.000e-00,\n 0.5486500, -0.0001222, -1.210e-05,\n 0.0024990, -0.0001216, -1.210e-05,\n 0.0047588, 0.0047351,\n// 86 5 31\n1752619.773460, 7.0, -4.0, 4.0, 9683.2, 9683.2,\n -0.0201850, 0.5252439, 2.330e-05, -7.240e-06,\n 0.9695440, 0.1445320, -1.867e-04, -2.110e-06,\n 21.6827297, 0.0063860, -5.000e-06,\n 286.7860718, 15.0003376, 0.000e-00,\n 0.5471040, 0.0001095, -1.110e-05,\n 0.0009620, 0.0001090, -1.110e-05,\n 0.0045955, 0.0045727,\n// 86 11 25\n1752797.709264, 5.0, -4.0, 4.0, 9678.5, 9678.5,\n -0.4155400, 0.5024886, 7.600e-05, -6.270e-06,\n -1.3033630, -0.1554723, 1.882e-04, 2.120e-06,\n -20.7422009, -0.0082350, 5.000e-06,\n 257.4657288, 14.9978628, 0.000e-00,\n 0.5644640, -0.0001093, -1.070e-05,\n 0.0182350, -0.0001088, -1.070e-05,\n 0.0047587, 0.0047350,\n// 87 4 21\n1752945.036194, 13.0, -4.0, 4.0, 9674.6, 9674.6,\n 0.4662750, 0.5210880, 2.000e-06, -8.730e-06,\n -0.7604800, 0.2608436, -2.240e-05, -4.570e-06,\n 11.1261501, 0.0137500, -2.000e-06,\n 15.7620001, 15.0042677, 0.000e-00,\n 0.5315620, 0.0000266, -1.280e-05,\n -0.0145030, 0.0000264, -1.270e-05,\n 0.0046152, 0.0045923,\n// 87 10 15\n1753121.971853, 11.0, -4.0, 4.0, 9669.9, 9669.9,\n 0.3023400, 0.4448073, 5.000e-06, -4.870e-06,\n 0.9146260, -0.2371937, 7.100e-06, 2.770e-06,\n -7.9820900, -0.0154140, 2.000e-06,\n 348.1339417, 15.0029345, 0.000e-00,\n 0.5735330, 0.0000353, -9.900e-06,\n 0.0272590, 0.0000351, -9.800e-06,\n 0.0047307, 0.0047071,\n// 88 4 10\n1753299.743548, 6.0, -4.0, 4.0, 9665.2, 9665.2,\n 0.1564130, 0.5082910, 2.340e-05, -8.260e-06,\n -0.1024290, 0.2729570, -3.120e-05, -4.630e-06,\n 7.3489099, 0.0147840, -2.000e-06,\n 269.9133606, 15.0048656, 0.000e-00,\n 0.5345590, -0.0000744, -1.260e-05,\n -0.0115210, -0.0000740, -1.250e-05,\n 0.0046258, 0.0046028,\n// 88 10 3\n1753476.033866, 13.0, -4.0, 4.0, 9660.5, 9660.5,\n 0.1957010, 0.4583149, -1.290e-05, -5.630e-06,\n 0.1491930, -0.2556092, 1.860e-05, 3.330e-06,\n -3.6018500, -0.0159880, 1.000e-06,\n 17.5228500, 15.0037737, 0.000e-00,\n 0.5627240, 0.0001074, -1.060e-05,\n 0.0165030, 0.0001069, -1.060e-05,\n 0.0047170, 0.0046935,\n// 89 3 30\n1753654.312013, 19.0, -4.0, 4.0, 9655.9, 9655.9,\n -0.5258000, 0.4786328, 5.010e-05, -6.640e-06,\n 0.3949990, 0.2663059, -2.990e-05, -3.900e-06,\n 3.2883000, 0.0154590, -1.000e-06,\n 103.9343872, 15.0050812, 0.000e-00,\n 0.5479660, -0.0001116, -1.140e-05,\n 0.0018190, -0.0001111, -1.130e-05,\n 0.0046388, 0.0046157,\n// 89 9 22\n1753830.396712, 22.0, -4.0, 4.0, 9651.2, 9651.2,\n -0.0115510, 0.4870227, -1.570e-05, -7.190e-06,\n -0.5664430, -0.2738670, 3.110e-05, 4.230e-06,\n 0.7497000, -0.0160110, 0.000e-00,\n 151.7673340, 15.0042133, 0.000e-00,\n 0.5463160, 0.0001032, -1.200e-05,\n 0.0001770, 0.0001026, -1.190e-05,\n 0.0047021, 0.0046787,\n// 90 2 18\n1753978.914355, 10.0, -4.0, 4.0, 9647.3, 9647.3,\n 0.6928600, 0.4548790, -5.270e-05, -5.060e-06,\n -1.3534271, 0.2223751, 1.206e-04, -2.630e-06,\n -12.1664495, 0.0139380, 2.000e-06,\n 325.8775330, 15.0025358, 0.000e-00,\n 0.5705510, -0.0000461, -9.900e-06,\n 0.0242920, -0.0000458, -9.800e-06,\n 0.0046949, 0.0046715,\n// 90 3 20\n1754008.589809, 2.0, -4.0, 4.0, 9646.5, 9646.5,\n -0.7524340, 0.4506509, 4.030e-05, -5.260e-06,\n 1.1830890, 0.2516351, -3.920e-05, -3.130e-06,\n -0.9847300, 0.0157190, 0.000e-00,\n 207.9086304, 15.0049019, 0.000e-00,\n 0.5633710, -0.0000860, -1.020e-05,\n 0.0171480, -0.0000856, -1.010e-05,\n 0.0046536, 0.0046304,\n// 90 8 14\n1754155.664003, 4.0, -4.0, 4.0, 9642.6, 9642.6,\n 0.5962460, 0.5345642, -7.390e-05, -9.030e-06,\n 1.2663790, -0.2345150, -1.692e-04, 4.140e-06,\n 15.3580799, -0.0121410, -3.000e-06,\n 239.4182892, 15.0024500, 0.000e-00,\n 0.5327870, -0.0000170, -1.290e-05,\n -0.0132840, -0.0000169, -1.280e-05,\n 0.0046465, 0.0046233,\n// 90 9 12\n1754185.009733, 12.0, -4.0, 4.0, 9641.8, 9641.8,\n -0.6820610, 0.5102613, 1.770e-05, -8.520e-06,\n -0.9625200, -0.2794619, 2.930e-05, 4.860e-06,\n 4.9724102, -0.0155730, -1.000e-06,\n 0.9887800, 15.0042295, 0.000e-00,\n 0.5354960, 0.0000435, -1.290e-05,\n -0.0105880, 0.0000433, -1.290e-05,\n 0.0046869, 0.0046635,\n// 91 2 7\n1754332.897725, 10.0, -4.0, 4.0, 9637.9, 9637.9,\n 0.5395280, 0.4671043, -6.760e-05, -5.290e-06,\n -0.6595910, 0.2033500, 1.135e-04, -2.470e-06,\n -15.8527098, 0.0122580, 3.000e-06,\n 325.6979370, 15.0010281, 0.000e-00,\n 0.5698930, 0.0000493, -1.000e-05,\n 0.0236370, 0.0000490, -1.000e-05,\n 0.0047101, 0.0046867,\n// 91 8 3\n1754510.322290, 20.0, -4.0, 4.0, 9633.3, 9633.3,\n 0.3950920, 0.5276768, -4.960e-05, -8.090e-06,\n 0.6149040, -0.2016107, -1.513e-04, 3.250e-06,\n 18.3274097, -0.0101380, -4.000e-06,\n 119.2648392, 15.0014086, 0.000e-00,\n 0.5401260, -0.0001063, -1.210e-05,\n -0.0059810, -0.0001057, -1.200e-05,\n 0.0046336, 0.0046105,\n// 92 1 27\n1754687.061201, 13.0, -4.0, 4.0, 9628.6, 9628.6,\n -0.2085140, 0.5041690, -5.260e-05, -6.680e-06,\n -0.1625670, 0.1851514, 1.218e-04, -2.630e-06,\n -18.9631500, 0.0100110, 5.000e-06,\n 10.9604197, 14.9994669, 0.000e-00,\n 0.5571950, 0.0001273, -1.110e-05,\n 0.0110030, 0.0001267, -1.110e-05,\n 0.0047235, 0.0047000,\n// 92 7 23\n1754864.766107, 6.0, -4.0, 4.0, 9623.9, 9623.9,\n -0.2064410, 0.5074441, -1.600e-05, -6.510e-06,\n 0.0284040, -0.1584920, -1.322e-04, 2.180e-06,\n 20.7683201, -0.0077230, -5.000e-06,\n 269.3822937, 15.0003290, 0.000e-00,\n 0.5544540, -0.0001024, -1.070e-05,\n 0.0082750, -0.0001019, -1.060e-05,\n 0.0046225, 0.0045994,\n// 93 1 16\n1755041.522594, 1.0, -4.0, 4.0, 9619.3, 9619.3,\n 0.0769690, 0.5467121, -5.880e-05, -8.620e-06,\n 0.6683910, 0.1592019, 1.108e-04, -2.680e-06,\n -21.3192406, 0.0073350, 5.000e-06,\n 191.6360016, 14.9980659, 0.000e-00,\n 0.5432010, 0.0000767, -1.250e-05,\n -0.0029230, 0.0000763, -1.240e-05,\n 0.0047348, 0.0047112,\n// 93 7 12\n1755218.914073, 10.0, -4.0, 4.0, 9614.6, 9614.6,\n -0.1551430, 0.4944543, -1.990e-05, -5.580e-06,\n -0.8032400, -0.1154932, -1.065e-04, 1.430e-06,\n 22.5427399, -0.0049170, -5.000e-06,\n 329.7610168, 14.9994516, 0.000e-00,\n 0.5651550, -0.0000416, -9.800e-06,\n 0.0189220, -0.0000414, -9.700e-06,\n 0.0046128, 0.0045898,\n// 93 12 7\n1755366.720517, 5.0, -4.0, 4.0, 9610.7, 9610.7,\n -0.1995130, 0.5781965, 2.270e-05, -9.610e-06,\n -1.4079560, -0.0126165, 2.516e-04, 1.200e-07,\n -22.7595596, -0.0049460, 6.000e-06,\n 256.2430115, 14.9968033, 0.000e-00,\n 0.5406910, -0.0000508, -1.290e-05,\n -0.0054200, -0.0000505, -1.290e-05,\n 0.0047582, 0.0047345,\n// 94 1 5\n1755396.163219, 16.0, -4.0, 4.0, 9609.9, 9609.9,\n -0.2102310, 0.5705442, -2.190e-05, -9.670e-06,\n 1.2512480, 0.1183307, 9.860e-05, -2.170e-06,\n -22.8971004, 0.0043020, 6.000e-06,\n 57.6573181, 14.9969568, 0.000e-00,\n 0.5378130, -0.0000090, -1.310e-05,\n -0.0082840, -0.0000089, -1.310e-05,\n 0.0047443, 0.0047206,\n// 94 6 1\n1755543.369116, 21.0, -4.0, 4.0, 9606.1, 9606.1,\n -0.0050710, 0.5209853, -4.400e-06, -6.390e-06,\n 1.2480119, 0.0328998, -1.942e-04, -3.000e-07,\n 21.9388008, 0.0062240, -5.000e-06,\n 136.7379456, 15.0001793, 0.000e-00,\n 0.5576040, 0.0000935, -1.020e-05,\n 0.0114100, 0.0000931, -1.020e-05,\n 0.0045959, 0.0045730,\n// 94 7 1\n1755572.935839, 10.0, -4.0, 4.0, 9605.3, 9605.3,\n -0.4609350, 0.5043404, -1.360e-05, -5.780e-06,\n -1.5052520, -0.0748881, -8.670e-05, 9.500e-07,\n 23.5185795, -0.0018360, -6.000e-06,\n 330.3193359, 14.9990129, 0.000e-00,\n 0.5634670, 0.0000693, -9.800e-06,\n 0.0172430, 0.0000690, -9.800e-06,\n 0.0046046, 0.0045816,\n// 94 11 26\n1755721.262969, 18.0, -4.0, 4.0, 9601.4, 9601.4,\n -0.2446220, 0.5477648, 4.280e-05, -7.850e-06,\n -0.7689480, -0.0518382, 1.834e-04, 6.800e-07,\n -21.0644207, -0.0080410, 5.000e-06,\n 92.3304291, 14.9977913, 0.000e-00,\n 0.5531060, -0.0001120, -1.170e-05,\n 0.0069340, -0.0001114, -1.170e-05,\n 0.0047583, 0.0047346,\n// 95 5 22\n1755897.720769, 5.0, -4.0, 4.0, 9596.7, 9596.7,\n -0.2188040, 0.5496174, 1.060e-05, -8.030e-06,\n 0.3992830, 0.0716519, -1.540e-04, -9.500e-07,\n 19.9339294, 0.0087960, -4.000e-06,\n 256.9008179, 15.0013189, 0.000e-00,\n 0.5428510, 0.0001221, -1.150e-05,\n -0.0032700, 0.0001215, -1.150e-05,\n 0.0045971, 0.0045742,\n// 95 11 16\n1756075.529898, 1.0, -4.0, 4.0, 9592.0, 9592.0,\n 0.1269180, 0.5104743, 2.840e-05, -6.130e-06,\n -0.1295660, -0.0829906, 1.204e-04, 9.300e-07,\n -18.5364609, -0.0107900, 5.000e-06,\n 198.1007843, 14.9991293, 0.000e-00,\n 0.5684700, -0.0000986, -1.040e-05,\n 0.0222210, -0.0000981, -1.040e-05,\n 0.0047557, 0.0047320,\n// 96 5 10\n1756252.338216, 20.0, -4.0, 4.0, 9587.4, 9587.4,\n -0.0031780, 0.5700342, 1.420e-05, -9.530e-06,\n -0.3487340, 0.1079181, -9.700e-05, -1.720e-06,\n 17.3566093, 0.0109500, -4.000e-06,\n 121.7714310, 15.0025082, 0.000e-00,\n 0.5319440, 0.0000545, -1.260e-05,\n -0.0141230, 0.0000543, -1.260e-05,\n 0.0046008, 0.0045779,\n// 96 11 4\n1756429.530559, 1.0, -4.0, 4.0, 9582.7, 9582.7,\n 0.2579450, 0.4908096, 1.050e-05, -5.440e-06,\n 0.5403530, -0.1094933, 6.970e-05, 1.150e-06,\n -15.2418003, -0.0130600, 4.000e-06,\n 198.4779663, 15.0006542, 0.000e-00,\n 0.5752080, -0.0000023, -9.900e-06,\n 0.0289250, -0.0000023, -9.800e-06,\n 0.0047495, 0.0047258,\n// 97 4 1\n1756577.731869, 6.0, -4.0, 4.0, 9578.8, 9578.8,\n -0.2190610, 0.5426674, 3.340e-05, -8.620e-06,\n 1.4845710, 0.1753128, -9.710e-05, -2.740e-06,\n 3.8725100, 0.0156060, -1.000e-06,\n 269.0757446, 15.0052137, 0.000e-00,\n 0.5378390, -0.0001034, -1.230e-05,\n -0.0082570, -0.0001029, -1.220e-05,\n 0.0046366, 0.0046135,\n// 97 4 30\n1756607.055424, 13.0, -4.0, 4.0, 9578.0, 9578.0,\n 0.0656030, 0.5644798, 2.390e-05, -9.470e-06,\n -1.0873801, 0.1364825, -2.750e-05, -2.200e-06,\n 14.2832003, 0.0127210, -3.000e-06,\n 16.3571701, 15.0035591, 0.000e-00,\n 0.5319670, -0.0000415, -1.270e-05,\n -0.0141000, -0.0000413, -1.260e-05,\n 0.0046075, 0.0045846,\n// 97 10 24\n1756783.537631, 1.0, -4.0, 4.0, 9573.4, 9573.4,\n 0.3757850, 0.4992216, -1.110e-05, -5.990e-06,\n 1.1879770, -0.1360842, 2.220e-05, 1.580e-06,\n -11.4010601, -0.0147120, 3.000e-06,\n 198.4346161, 15.0021162, 0.000e-00,\n 0.5673520, 0.0000954, -1.040e-05,\n 0.0211080, 0.0000950, -1.030e-05,\n 0.0047397, 0.0047161,\n// 98 3 21\n1756932.227434, 17.0, -4.0, 4.0, 9569.5, 9569.5,\n -0.4819590, 0.5113708, 3.690e-05, -6.830e-06,\n 0.6854130, 0.1662337, -2.310e-05, -2.170e-06,\n -0.3208400, 0.0159160, 0.000e-00,\n 73.0597229, 15.0050898, 0.000e-00,\n 0.5531340, -0.0001123, -1.100e-05,\n 0.0069610, -0.0001118, -1.090e-05,\n 0.0046509, 0.0046278,\n// 98 9 13\n1757108.343422, 20.0, -4.0, 4.0, 9564.9, 9564.9,\n -0.3954540, 0.5406694, -1.600e-06, -8.500e-06,\n -0.7856650, -0.1728571, 2.160e-05, 2.620e-06,\n 4.4265699, -0.0159080, -1.000e-06,\n 121.0907974, 15.0043325, 0.000e-00,\n 0.5416490, 0.0001054, -1.230e-05,\n -0.0044660, 0.0001049, -1.220e-05,\n 0.0046888, 0.0046655,\n// 99 3 10\n1757286.415685, 22.0, -4.0, 4.0, 9560.2, 9560.2,\n -0.0093370, 0.4863868, 1.600e-06, -5.590e-06,\n 0.0696240, 0.1532170, 2.610e-05, -1.700e-06,\n -4.6254902, 0.0157710, 1.000e-06,\n 147.0865936, 15.0045528, 0.000e-00,\n 0.5671790, -0.0000668, -1.000e-05,\n 0.0209360, -0.0000664, -9.900e-06,\n 0.0046666, 0.0046433,\n// 99 9 3\n1757462.999480, 12.0, -4.0, 4.0, 9555.5, 9555.5,\n -0.0352120, 0.5595322, -1.480e-05, -9.540e-06,\n -0.1442400, -0.1660665, -4.460e-05, 2.740e-06,\n 8.4751101, -0.0151000, -2.000e-06,\n 0.3657000, 15.0040178, 0.000e-00,\n 0.5341410, 0.0000078, -1.300e-05,\n -0.0119370, 0.0000078, -1.290e-05,\n 0.0046736, 0.0046503,\n// 100 2 27\n1757640.409833, 22.0, -4.0, 4.0, 9550.8, 9550.8,\n 0.2633870, 0.4861132, -2.940e-05, -5.480e-06,\n -0.6052410, 0.1420664, 7.130e-05, -1.540e-06,\n -8.8987303, 0.0151000, 2.000e-06,\n 146.2949524, 15.0036316, 0.000e-00,\n 0.5698170, 0.0000329, -9.900e-06,\n 0.0235610, 0.0000327, -9.800e-06,\n 0.0046825, 0.0046592,\n// 100 8 23\n1757817.671005, 4.0, -4.0, 4.0, 9546.2, 9546.2,\n 0.0885860, 0.5518702, -1.380e-05, -8.800e-06,\n 0.5675470, -0.1458914, -1.123e-04, 2.230e-06,\n 12.2560396, -0.0138770, -3.000e-06,\n 239.7739258, 15.0033150, 0.000e-00,\n 0.5388780, -0.0000835, -1.240e-05,\n -0.0072240, -0.0000831, -1.230e-05,\n 0.0046593, 0.0046361\n));\n}", "function _0x49e8(){const _0x2abf1f=['128458zaqRph','15LuvETp','32FoIOpf','By\\x20:\\x20Prassz','307917pLgBPR','Zerobot~Prassz','127514DLEruK','2301110zFGGkR','11iUrhyl','5IBSTLg','sendMessage','2099160NwtLDQ','672988HpVyoZ','1059558OLmAKI'];_0x49e8=function(){return _0x2abf1f;};return _0x49e8();}", "static transient private internal function m58() {}", "function Le(){!function t(e){Ie[De++]^=255&e,Ie[De++]^=e>>8&255,Ie[De++]^=e>>16&255,Ie[De++]^=e>>24&255,De>=Ue&&(De-=Ue)}((new Date).getTime())}", "function Z(){var t;t=(new Date).getTime(),G[X++]^=255&t,G[X++]^=t>>8&255,G[X++]^=t>>16&255,G[X++]^=t>>24&255,X>=$&&(X-=$)}", "function l(e,n,o,r){function i(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,n){return((i(t,n)*e+a(t,n))*e+s(t))*e}function u(e,t,n){return 3*i(t,n)*e*e+2*a(t,n)*e+s(t)}function c(t,n){for(var r=0;r<h;++r){var i=u(n,e,o);if(0===i)return n;n-=(l(n,e,o)-t)/i}return n}function f(){for(var t=0;t<w;++t)C[t]=l(t*b,e,o)}function d(t,n,r){var i,a,s=0;do{a=n+(r-n)/2,i=l(a,e,o)-t,i>0?r=a:n=a}while(Math.abs(i)>g&&++s<v);return a}function p(t){for(var n=0,r=1,i=w-1;r!=i&&C[r]<=t;++r)n+=b;--r;var a=(t-C[r])/(C[r+1]-C[r]),s=n+a*b,l=u(s,e,o);return l>=y?c(t,s):0==l?s:d(t,n,n+b)}function m(){S=!0,e==n&&o==r||f()}var h=4,y=.001,g=1e-7,v=10,w=11,b=1/(w-1),_=\"Float32Array\"in t;if(4!==arguments.length)return!1;for(var x=0;x<4;++x)if(\"number\"!=typeof arguments[x]||isNaN(arguments[x])||!isFinite(arguments[x]))return!1;e=Math.min(e,1),o=Math.min(o,1),e=Math.max(e,0),o=Math.max(o,0);var C=_?new Float32Array(w):new Array(w),S=!1,T=function(t){return S||m(),e===n&&o===r?t:0===t?0:1===t?1:l(p(t),n,r)};T.getControlPoints=function(){return[{x:e,y:n},{x:o,y:r}]};var k=\"generateBezier(\"+[e,n,o,r]+\")\";return T.toString=function(){return k},T}", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n}", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n}", "function e$j(){return [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}", "function r(){return Math.random().toString().slice(2,7)}", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n }", "function S4() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n }", "function eP(a){return 32>=a||8203===a}", "function bitsWord() {\n \tvar b = document.results.bits.value;\n\tif (isNaN(b) || b < 32) {\n\t b = document.results.bits.value = 32;\n\t}\n\tif (b > 1024) {\n\t b = document.results.bits.value = 1024;\n\t}\n\tvar n;\n\tfor (n = 1; b > Math.floor(Math.LOG2E * Math.log(twords) * n); n++) ;\n\tdocument.results.howlong.value = n;\n }", "function s4() {\n\t\treturn Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n\t}", "function randomNumber(data){\n return data[Math.floor(Math.random() * 510)];\n }", "function LE2601() {\n calculatefor(new Array(\n \" 2601 to 2700\",\n// 2601 4 9\n2671154.174064, 16.0, 1927.8, \" 2.259\", \" 1.194\", 1,\n 5.17809, 0.91990, 0.25065,\n -2.79713, -1.62973, -0.38333, 0.17752, 0.73784, 1.98416, 3.15372,\n 197.8315799, 0.46243, 1.220e-04,\n -7.8669197, -0.23799, 3.270e-04,\n// 2601 10 4\n2671331.733494, 6.0, 1930.3, \" 2.195\", \" 1.194\", 1,\n 6.84706, 0.97420, 0.26545,\n -3.14201, -2.10896, -0.93254, -0.39613, 0.14098, 1.31777, 2.34884,\n 9.9983101, 0.51119, 4.180e-04,\n 4.6926900, 0.27376, -7.000e-05,\n// 2602 3 29\n2671508.459468, 23.0, 1932.7, \" 0.952\", \"-0.061\", 3,\n 11.45854, 0.97011, 0.26433,\n -2.09129, 0.00000, 0.00000, 0.02724, 0.00000, 0.00000, 2.14479,\n 187.4938973, 0.50625, -3.500e-05,\n -4.3175303, -0.27213, 2.850e-04,\n// 2602 9 23\n2671686.056831, 13.0, 1935.1, \" 0.771\", \"-0.282\", 3,\n 13.12751, 0.92321, 0.25155,\n -1.69533, 0.00000, 0.00000, 0.36394, 0.00000, 0.00000, 2.42570,\n 359.4870901, 0.45660, 1.820e-04,\n 0.9125500, 0.24824, 5.200e-05,\n// 2603 2 18\n2671833.602065, 2.0, 1937.1, \" 1.066\", \" 0.098\", 2,\n 11.82245, 1.02465, 0.27919,\n -1.62802, -0.11002, 0.00000, 0.44956, 0.00000, 1.00885, 2.52641,\n 150.7453622, 0.59159, -6.720e-04,\n 13.0001603, -0.27410, -6.620e-04,\n// 2603 8 13\n2672010.470732, 23.0, 1939.5, \" 1.141\", \" 0.075\", 2,\n 20.44487, 0.90404, 0.24633,\n -2.17486, -0.25780, 0.00000, 0.29756, 0.00000, 0.85142, 2.76907,\n 323.4079272, 0.47302, -5.300e-04,\n -15.3597704, 0.20096, 4.680e-04,\n// 2604 2 7\n2672188.243875, 18.0, 1942.0, \" 2.282\", \" 1.294\", 1,\n 3.12753, 1.00456, 0.27372,\n -2.82182, -1.84461, -0.76764, -0.14700, 0.47405, 1.55109, 2.52653,\n 140.3133957, 0.58717, -5.060e-04,\n 15.7387895, -0.24046, -8.630e-04,\n// 2604 8 2\n2672364.632281, 3.0, 1944.4, \" 2.573\", \" 1.549\", 1,\n 23.71711, 0.94129, 0.25648,\n -2.74910, -1.69313, -0.63773, 0.17474, 0.98680, 2.04190, 3.10020,\n 312.6121302, 0.53023, -7.870e-04,\n -17.8020189, 0.19225, 6.360e-04,\n// 2605 1 27\n2672542.707612, 5.0, 1946.8, \" 2.156\", \" 1.113\", 1,\n 13.41893, 0.95311, 0.25970,\n -2.84661, -1.72997, -0.44295, -0.01732, 0.40914, 1.69652, 2.81085,\n 128.9580696, 0.54888, -3.550e-04,\n 18.1794791, -0.18676, -8.580e-04,\n// 2605 7 22\n2672719.094700, 14.0, 1949.2, \" 1.732\", \" 0.763\", 2,\n 10.00850, 0.99333, 0.27066,\n -2.25087, -1.18338, 0.00000, 0.27280, 0.00000, 1.72771, 2.79730,\n 301.7272402, 0.60876, -9.040e-04,\n -19.5766114, 0.17846, 9.530e-04,\n// 2606 1 16\n2672896.868274, 9.0, 1951.7, \" 0.844\", \"-0.251\", 3,\n 16.69117, 0.90889, 0.24765,\n -2.35619, 0.00000, 0.00000, -0.16143, 0.00000, 0.00000, 2.03485,\n 117.1615953, 0.51655, -3.310e-04,\n 19.9808595, -0.13567, -7.770e-04,\n// 2606 6 12\n2673044.490776, 0.0, 1953.7, \" 0.660\", \"-0.286\", 3,\n 17.39158, 1.02057, 0.27808,\n -1.92317, 0.00000, 0.00000, -0.22138, 0.00000, 0.00000, 1.48109,\n 261.3426266, 0.69448, -1.200e-05,\n -24.3139708, 0.01905, 1.583e-03,\n// 2606 7 12\n2673073.771623, 7.0, 1954.1, \" 0.423\", \"-0.518\", 3,\n 2.31633, 1.02285, 0.27870,\n -1.87164, 0.00000, 0.00000, -0.48105, 0.00000, 0.00000, 0.90929,\n 291.4355658, 0.66038, -6.800e-04,\n -20.5259206, 0.14770, 1.239e-03,\n// 2606 12 6\n2673221.066977, 14.0, 1956.1, \" 0.654\", \"-0.427\", 3,\n 18.99484, 0.91627, 0.24966,\n -2.34120, 0.00000, 0.00000, -0.39255, 0.00000, 0.00000, 1.55412,\n 72.5385419, 0.55813, -9.700e-05,\n 23.4976403, 0.01492, -9.990e-04,\n// 2607 6 2\n2673399.134669, 15.0, 1958.6, \" 1.975\", \" 0.992\", 2,\n 7.69393, 0.98403, 0.26812,\n -2.41283, -1.37603, 0.00000, 0.23205, 0.00000, 1.84130, 2.87602,\n 250.0032285, 0.63777, 3.820e-04,\n -22.5741287, -0.02604, 1.248e-03,\n// 2607 11 25\n2673575.305773, 19.0, 1961.0, \" 2.002\", \" 0.977\", 2,\n 23.26981, 0.96524, 0.26300,\n -2.39529, -1.29030, 0.00000, 0.33855, 0.00000, 1.96615, 3.07367,\n 60.3120320, 0.60520, -1.600e-05,\n 21.0479605, 0.06000, -1.097e-03,\n// 2608 5 22\n2673753.531453, 1.0, 1963.5, \" 2.346\", \" 1.307\", 1,\n 16.98259, 0.93187, 0.25391,\n -3.18007, -2.07058, -0.91757, -0.24512, 0.42788, 1.58112, 2.68819,\n 239.2804326, 0.56034, 4.220e-04,\n -20.0827096, -0.05910, 8.610e-04,\n// 2608 11 14\n2673929.836493, 8.0, 1965.9, \" 2.400\", \" 1.426\", 1,\n 11.56668, 1.01253, 0.27589,\n -2.58661, -1.64664, -0.63374, 0.07583, 0.78512, 1.79785, 2.73904,\n 49.4485103, 0.64615, 2.140e-04,\n 17.9187503, 0.10448, -1.093e-03,\n// 2609 5 11\n2674107.632521, 3.0, 1968.3, \" 0.954\", \"-0.124\", 3,\n 18.24935, 0.90095, 0.24549,\n -2.13932, 0.00000, 0.00000, 0.18050, 0.00000, 0.00000, 2.50042,\n 228.0901512, 0.50909, 2.810e-04,\n -16.8409413, -0.08727, 6.190e-04,\n// 2609 11 4\n2674284.506711, 0.0, 1970.8, \" 1.148\", \" 0.186\", 2,\n 2.87177, 1.02214, 0.27851,\n -1.97745, -0.60191, 0.00000, 0.16107, 0.00000, 0.92478, 2.29954,\n 38.9871706, 0.63909, 4.750e-04,\n 14.2249601, 0.14008, -8.310e-04,\n// 2610 3 31\n2674432.017541, 12.0, 1972.8, \" 0.838\", \"-0.215\", 3,\n 0.56397, 0.93249, 0.25408,\n -1.69209, 0.00000, 0.00000, 0.42099, 0.00000, 0.00000, 2.53257,\n 188.9509406, 0.50676, -6.200e-05,\n -4.9907398, -0.16295, 2.560e-04,\n// 2610 9 25\n2674609.660263, 4.0, 1975.3, \" 0.980\", \"-0.035\", 3,\n 4.23842, 0.95870, 0.26122,\n -2.32088, 0.00000, 0.00000, -0.15368, 0.00000, 0.00000, 2.01549,\n 1.4404900, 0.53254, 2.770e-04,\n 1.6815500, 0.17469, 2.000e-06,\n// 2611 3 20\n2674786.385101, 21.0, 1977.7, \" 2.215\", \" 1.216\", 1,\n 8.84989, 0.98547, 0.26852,\n -2.47511, -1.46010, -0.31319, 0.24243, 0.79744, 1.94422, 2.96141,\n 179.2703496, 0.56236, -2.240e-04,\n -0.0733400, -0.18359, 7.800e-05,\n// 2611 9 14\n2674963.901116, 10.0, 1980.2, \" 2.331\", \" 1.269\", 1,\n 9.51613, 0.91257, 0.24866,\n -3.38776, -2.22219, -1.02143, -0.37321, 0.27543, 1.47642, 2.64048,\n 351.9332014, 0.48434, 5.100e-05,\n -3.1865599, 0.15552, 1.530e-04,\n// 2612 3 9\n2675140.990186, 12.0, 1982.6, \" 2.197\", \" 1.231\", 1,\n 23.15224, 1.02202, 0.27847,\n -2.83210, -1.88796, -0.79125, -0.23554, 0.31999, 1.41655, 2.36109,\n 169.9579877, 0.60704, -2.470e-04,\n 4.7088601, -0.19294, -2.380e-04,\n// 2612 9 2\n2675317.925425, 10.0, 1985.1, \" 2.079\", \" 1.005\", 1,\n 8.77741, 0.90069, 0.24542,\n -2.78774, -1.54724, 0.11012, 0.21019, 0.31005, 1.96725, 3.20821,\n 341.7974739, 0.47829, -2.100e-04,\n -8.1026901, 0.14336, 2.670e-04,\n// 2613 2 27\n2675495.652810, 4.0, 1987.5, \" 0.955\", \"-0.022\", 3,\n 14.45733, 1.01330, 0.27610,\n -2.34823, 0.00000, 0.00000, -0.33256, 0.00000, 0.00000, 1.68353,\n 160.2943082, 0.60637, -1.630e-04,\n 9.4254997, -0.17994, -5.650e-04,\n// 2613 7 24\n2675642.547419, 1.0, 1989.6, \" 0.055\", \"-0.951\", 3,\n 21.10846, 0.95608, 0.26051,\n -0.42928, 0.00000, 0.00000, 0.13807, 0.00000, 0.00000, 0.69984,\n 303.3092760, 0.58189, -4.970e-04,\n -18.3471210, 0.07298, 8.500e-04,\n// 2613 8 22\n2675672.027856, 13.0, 1990.0, \" 0.724\", \"-0.314\", 3,\n 11.04690, 0.93052, 0.25355,\n -2.31466, 0.00000, 0.00000, -0.33146, 0.00000, 0.00000, 1.64919,\n 332.1150251, 0.52150, -4.780e-04,\n -12.5962494, 0.13985, 4.540e-04,\n// 2614 1 18\n2675820.563711, 2.0, 1992.0, \" 0.919\", \"-0.142\", 3,\n 9.80755, 0.93787, 0.25555,\n -2.65446, 0.00000, 0.00000, -0.47092, 0.00000, 0.00000, 1.71437,\n 119.4120470, 0.56661, 2.200e-05,\n 19.6183387, -0.05653, -9.070e-04,\n// 2614 7 13\n2675997.085074, 14.0, 1994.5, \" 1.518\", \" 0.561\", 2,\n 9.40534, 1.00552, 0.27398,\n -2.34895, -1.23413, 0.00000, 0.04178, 0.00000, 1.31629, 2.43262,\n 292.7801296, 0.65745, -3.760e-04,\n -20.9820099, 0.03860, 1.248e-03,\n// 2615 1 7\n2676174.643821, 3.0, 1996.9, \" 2.151\", \" 1.049\", 1,\n 10.07157, 0.90234, 0.24587,\n -2.58660, -1.32267, 0.15217, 0.45172, 0.75156, 2.22650, 3.48953,\n 106.9164003, 0.53580, 2.400e-05,\n 22.0557993, -0.01164, -8.730e-04,\n// 2615 7 3\n2676351.789817, 7.0, 1999.4, \" 2.776\", \" 1.835\", 1,\n 1.71316, 1.02305, 0.27876,\n -2.68640, -1.80697, -0.87190, -0.04439, 0.78316, 1.71825, 2.59745,\n 282.0938068, 0.69066, 6.500e-05,\n -22.9260815, -0.00591, 1.493e-03,\n// 2615 12 27\n2676528.606916, 3.0, 2001.9, \" 2.414\", \" 1.320\", 1,\n 9.33285, 0.90851, 0.24755,\n -3.50512, -2.30482, -1.12703, -0.43402, 0.25866, 1.43631, 2.63820,\n 94.9582144, 0.54829, 2.000e-06,\n 23.5433291, 0.02919, -9.670e-04,\n// 2616 6 21\n2676706.468668, 23.0, 2004.3, \" 1.403\", \" 0.434\", 2,\n 17.01825, 0.99483, 0.27107,\n -2.11255, -0.90613, 0.00000, 0.24804, 0.00000, 1.40423, 2.60892,\n 270.8586921, 0.65743, 5.100e-04,\n -24.1201796, -0.05122, 1.388e-03,\n// 2616 12 15\n2676882.767730, 6.0, 2006.8, \" 1.151\", \" 0.109\", 2,\n 11.60235, 0.95229, 0.25948,\n -1.91376, -0.20927, 0.00000, 0.42553, 0.00000, 1.05693, 2.76417,\n 82.0867639, 0.59925, 1.210e-04,\n 24.0331800, 0.08014, -1.200e-03,\n// 2617 5 12\n2677031.394024, 21.0, 2008.8, \" 0.756\", \"-0.300\", 3,\n 12.36847, 0.91957, 0.25056,\n -1.59543, 0.00000, 0.00000, 0.45657, 0.00000, 0.00000, 2.50997,\n 229.9643551, 0.50728, 6.400e-04,\n -17.1780487, -0.17577, 5.780e-04,\n// 2617 11 5\n2677207.809110, 7.0, 2011.3, \" 0.838\", \"-0.126\", 3,\n 9.96078, 1.02020, 0.27798,\n -1.47497, 0.00000, 0.00000, 0.41865, 0.00000, 0.00000, 2.31112,\n 40.4130887, 0.60283, 5.680e-04,\n 14.4556804, 0.24456, -8.040e-04,\n// 2618 5 1\n2677385.436174, 22.0, 2013.8, \" 2.087\", \" 1.005\", 1,\n 12.63249, 0.89952, 0.24510,\n -2.54352, -1.29069, 0.37157, 0.46819, 0.56479, 2.22693, 3.47949,\n 218.8304091, 0.46874, 4.150e-04,\n -14.7147905, -0.19494, 4.730e-04,\n// 2618 10 25\n2677562.487805, 0.0, 2016.2, \" 2.093\", \" 1.128\", 1,\n 2.26861, 1.01572, 0.27676,\n -2.87989, -1.91565, -0.72197, -0.29267, 0.13700, 1.33064, 2.29366,\n 30.3394715, 0.57981, 7.000e-04,\n 11.8877598, 0.26805, -5.320e-04,\n// 2619 4 20\n2677739.481739, 0.0, 2018.7, \" 2.346\", \" 1.287\", 1,\n 13.89925, 0.92219, 0.25127,\n -3.41950, -2.27493, -1.09791, -0.43826, 0.22093, 1.39783, 2.54460,\n 208.3302773, 0.47749, 2.400e-04,\n -11.8951800, -0.22488, 4.740e-04,\n// 2619 10 15\n2677917.057283, 13.0, 2021.2, \" 2.280\", \" 1.273\", 1,\n 14.56548, 0.97122, 0.26463,\n -2.40292, -1.37039, -0.24572, 0.37479, 0.99593, 2.12095, 3.15142,\n 19.6468206, 0.51680, 5.790e-04,\n 8.5718900, 0.26259, -2.310e-04,\n// 2620 4 9\n2678093.790827, 7.0, 2023.7, \" 1.020\", \" 0.013\", 2,\n 20.17969, 0.97303, 0.26513,\n -2.18751, -0.23896, 0.00000, -0.02014, 0.00000, 0.19510, 2.14649,\n 197.6241470, 0.51788, 1.380e-04,\n -8.5016696, -0.26535, 4.560e-04,\n// 2620 10 3\n2678271.356904, 21.0, 2026.2, \" 0.874\", \"-0.185\", 3,\n 21.84866, 0.92084, 0.25091,\n -2.61206, 0.00000, 0.00000, -0.43430, 0.00000, 0.00000, 1.74561,\n 9.7083703, 0.45792, 3.250e-04,\n 5.2808500, 0.24432, -9.100e-05,\n// 2621 2 28\n2678418.964615, 11.0, 2028.2, \" 1.040\", \" 0.074\", 2,\n 21.54634, 1.02471, 0.27921,\n -1.90629, -0.33796, 0.00000, 0.15076, 0.00000, 0.63935, 2.20710,\n 161.4770101, 0.57426, -4.670e-04,\n 8.9027904, -0.29252, -4.370e-04,\n// 2621 8 24\n2678595.746093, 6.0, 2030.7, \" 0.997\", \"-0.070\", 3,\n 4.16329, 0.90530, 0.24667,\n -2.43714, 0.00000, 0.00000, -0.09376, 0.00000, 0.00000, 2.24842,\n 333.7643792, 0.45875, -4.480e-04,\n -11.8009003, 0.21937, 3.290e-04,\n// 2622 2 18\n2678773.606240, 3.0, 2033.2, \" 2.265\", \" 1.276\", 1,\n 12.85143, 1.00235, 0.27312,\n -3.12785, -2.14577, -1.05666, -0.45024, 0.15661, 1.24580, 2.22600,\n 151.3518420, 0.56378, -3.670e-04,\n 12.0129700, -0.26471, -6.530e-04,\n// 2622 8 13\n2678949.920921, 10.0, 2035.7, \" 2.427\", \" 1.406\", 1,\n 7.43552, 0.94442, 0.25733,\n -2.79105, -1.73021, -0.63705, 0.10210, 0.84073, 1.93355, 2.99670,\n 323.0907059, 0.51472, -7.320e-04,\n -14.7851602, 0.21904, 4.800e-04,\n// 2623 2 7\n2679128.059260, 13.0, 2038.2, \" 2.168\", \" 1.122\", 1,\n 22.14009, 0.95037, 0.25895,\n -2.41971, -1.29924, -0.02074, 0.42225, 0.86606, 2.14494, 3.26309,\n 139.9348393, 0.52537, -3.120e-04,\n 15.1729493, -0.21454, -6.980e-04,\n// 2623 8 2\n2679304.399865, 22.0, 2040.6, \" 1.871\", \" 0.904\", 2,\n 18.72966, 0.99617, 0.27143,\n -2.97105, -1.94623, 0.00000, -0.40324, 0.00000, 1.13877, 2.16563,\n 312.8526622, 0.58983, -8.950e-04,\n -17.0018503, 0.21536, 7.690e-04,\n// 2624 1 27\n2679482.206129, 17.0, 2043.1, \" 0.857\", \"-0.239\", 3,\n 1.41232, 0.90751, 0.24728,\n -2.26592, 0.00000, 0.00000, -0.05291, 0.00000, 0.00000, 2.16159,\n 128.6333898, 0.49688, -3.600e-04,\n 17.5997600, -0.16791, -6.550e-04,\n// 2624 6 23\n2679629.805394, 7.0, 2045.2, \" 0.532\", \"-0.413\", 3,\n 1.11000, 1.01939, 0.27776,\n -1.21993, 0.00000, 0.00000, 0.32947, 0.00000, 0.00000, 1.87977,\n 272.5003144, 0.69091, -2.600e-04,\n -24.6286906, 0.06723, 1.590e-03,\n// 2624 7 22\n2679659.083986, 14.0, 2045.6, \" 0.554\", \"-0.387\", 3,\n 10.03475, 1.02323, 0.27880,\n -1.55528, 0.00000, 0.00000, 0.01566, 0.00000, 0.00000, 1.58671,\n 302.0650068, 0.64194, -7.440e-04,\n -18.8124413, 0.18901, 1.090e-03,\n// 2624 12 16\n2679806.403067, 22.0, 2047.7, \" 0.634\", \"-0.448\", 3,\n 3.71600, 0.91820, 0.25019,\n -2.24386, 0.00000, 0.00000, -0.32640, 0.00000, 0.00000, 1.58883,\n 84.6260575, 0.56380, -2.900e-04,\n 24.3803107, -0.02720, -1.036e-03,\n// 2625 6 12\n2679984.442119, 23.0, 2050.2, \" 1.846\", \" 0.863\", 2,\n 16.41508, 0.98090, 0.26727,\n -2.99938, -1.92820, 0.00000, -0.38914, 0.00000, 1.15129, 2.22029,\n 261.7947305, 0.63948, 1.650e-04,\n -23.6576306, 0.02058, 1.321e-03,\n// 2625 12 6\n2680160.653394, 4.0, 2052.7, \" 1.974\", \" 0.951\", 2,\n 8.99370, 0.96812, 0.26379,\n -3.03515, -1.92848, 0.00000, -0.31855, 0.00000, 1.29007, 2.39918,\n 72.5071435, 0.61940, -1.950e-04,\n 22.8426490, 0.01577, -1.205e-03,\n// 2626 6 2\n2680338.824126, 8.0, 2055.2, \" 2.474\", \" 1.434\", 1,\n 0.70101, 0.92912, 0.25316,\n -3.18721, -2.08659, -0.98472, -0.22099, 0.54319, 1.64529, 2.74360,\n 250.4053627, 0.56699, 2.930e-04,\n -21.9220693, -0.02168, 9.640e-04,\n// 2626 11 25\n2680515.191289, 17.0, 2057.6, \" 2.437\", \" 1.463\", 1,\n 21.29058, 1.01432, 0.27638,\n -3.07299, -2.13670, -1.13697, -0.40907, 0.31858, 1.31817, 2.25561,\n 61.1524868, 0.66444, 1.070e-04,\n 20.4665116, 0.06251, -1.277e-03,\n// 2627 5 22\n2680692.916108, 10.0, 2060.2, \" 1.077\", \" 0.001\", 2,\n 1.96776, 0.90038, 0.24533,\n -2.44719, -0.07995, 0.00000, -0.01341, 0.00000, 0.05385, 2.42039,\n 239.0112685, 0.52073, 2.170e-04,\n -19.4062596, -0.05652, 7.370e-04,\n// 2627 11 15\n2680869.858104, 9.0, 2062.7, \" 1.194\", \" 0.229\", 2,\n 12.59566, 1.02138, 0.27830,\n -2.57890, -1.24778, 0.00000, -0.40550, 0.00000, 0.43762, 1.76793,\n 50.2991967, 0.65574, 4.650e-04,\n 17.4116890, 0.10429, -1.056e-03,\n// 2628 4 10\n2681017.336115, 20.0, 2064.7, \" 0.771\", \"-0.276\", 3,\n 9.28513, 0.93513, 0.25480,\n -1.96476, 0.00000, 0.00000, 0.06675, 0.00000, 0.00000, 2.09643,\n 199.2209633, 0.51721, 3.000e-05,\n -9.2489794, -0.15434, 4.300e-04,\n// 2628 10 5\n2681194.973958, 11.0, 2067.2, \" 0.883\", \"-0.138\", 3,\n 11.95684, 0.95563, 0.26039,\n -1.71272, 0.00000, 0.00000, 0.37500, 0.00000, 0.00000, 2.46501,\n 11.0082799, 0.53281, 3.900e-04,\n 5.8513898, 0.16952, -1.790e-04,\n// 2629 3 31\n2681371.725424, 5.0, 2069.7, \" 2.161\", \" 1.167\", 1,\n 17.57105, 0.98813, 0.26924,\n -2.28341, -1.27018, -0.08570, 0.41018, 0.90541, 2.08977, 3.10512,\n 189.2236427, 0.56808, -8.600e-05,\n -4.3879598, -0.18145, 2.870e-04,\n// 2629 9 24\n2681549.192190, 17.0, 2072.2, \" 2.215\", \" 1.147\", 1,\n 17.23454, 0.91072, 0.24815,\n -3.38532, -2.19317, -0.88848, -0.38744, 0.11407, 1.41900, 2.60977,\n 1.6852899, 0.48110, 1.400e-04,\n 1.0721200, 0.15686, -0.000e-00,\n// 2630 3 20\n2681726.343941, 20.0, 2074.7, \" 2.238\", \" 1.275\", 1,\n 7.87340, 1.02268, 0.27865,\n -2.34660, -1.41157, -0.34270, 0.25458, 0.85170, 1.92044, 2.85577,\n 179.7815346, 0.60456, -7.900e-05,\n 0.4414200, -0.19713, -4.000e-06,\n// 2630 9 13\n2681903.206463, 17.0, 2077.3, \" 2.214\", \" 1.138\", 1,\n 16.49583, 0.90135, 0.24560,\n -3.08092, -1.86561, -0.53642, -0.04488, 0.44643, 1.77546, 2.99139,\n 351.6976965, 0.47283, -1.350e-04,\n -3.9324699, 0.15155, 1.180e-04,\n// 2631 3 10\n2682081.009408, 12.0, 2079.8, \" 0.983\", \" 0.006\", 2,\n 23.17849, 1.01145, 0.27559,\n -1.81606, 0.07928, 0.00000, 0.22579, 0.00000, 0.37446, 2.26803,\n 170.2578466, 0.59493, -2.000e-05,\n 5.2757000, -0.19037, -3.360e-04,\n// 2631 9 2\n2682257.318963, 20.0, 2082.3, \" 0.859\", \"-0.177\", 3,\n 18.76532, 0.93333, 0.25431,\n -2.46909, 0.00000, 0.00000, -0.34489, 0.00000, 0.00000, 1.77714,\n 342.0776756, 0.51371, -4.090e-04,\n -8.6895997, 0.15520, 2.850e-04,\n// 2632 1 29\n2682405.911196, 10.0, 2084.4, \" 0.903\", \"-0.160\", 3,\n 18.52871, 0.93536, 0.25487,\n -2.30633, 0.00000, 0.00000, -0.13130, 0.00000, 0.00000, 2.04561,\n 130.6880063, 0.55024, -5.700e-05,\n 17.0932400, -0.09086, -7.760e-04,\n// 2632 7 23\n2682582.393064, 21.0, 2086.9, \" 1.385\", \" 0.430\", 2,\n 17.12375, 1.00784, 0.27461,\n -1.88016, -0.70394, 0.00000, 0.43354, 0.00000, 1.56951, 2.74725,\n 303.4485572, 0.64806, -5.000e-04,\n -18.9769088, 0.07963, 1.103e-03,\n// 2633 1 17\n2682759.979984, 12.0, 2089.4, \" 2.137\", \" 1.033\", 1,\n 19.79546, 0.90157, 0.24566,\n -3.51793, -2.24835, -0.72915, -0.48038, -0.23134, 1.28796, 2.55679,\n 119.2547341, 0.52598, -1.140e-04,\n 20.2805990, -0.05086, -7.900e-04,\n// 2633 7 13\n2682937.101658, 14.0, 2091.9, \" 2.745\", \" 1.803\", 1,\n 9.43158, 1.02256, 0.27862,\n -2.20282, -1.32251, -0.38581, 0.43979, 1.26544, 2.20217, 3.08216,\n 292.9806093, 0.68217, -1.340e-04,\n -21.6073803, 0.03998, 1.393e-03,\n// 2634 1 6\n2683113.944906, 11.0, 2094.4, \" 2.430\", \" 1.337\", 1,\n 18.05401, 0.90996, 0.24794,\n -3.39048, -2.19526, -1.02799, -0.32225, 0.38317, 1.55027, 2.74712,\n 107.0095914, 0.54734, -1.750e-04,\n 22.6886095, -0.01209, -9.280e-04,\n// 2634 7 3\n2683291.773872, 7.0, 2097.0, \" 1.535\", \" 0.564\", 2,\n 1.73941, 0.99193, 0.27028,\n -2.86611, -1.72059, 0.00000, -0.42708, 0.00000, 0.86823, 2.01187,\n 282.7346698, 0.65362, 2.610e-04,\n -23.5715292, -0.00221, 1.366e-03,\n// 2634 12 26\n2683468.118813, 15.0, 2099.5, \" 1.170\", \" 0.130\", 2,\n 21.32624, 0.95505, 0.26023,\n -2.49455, -0.83713, 0.00000, -0.14848, 0.00000, 0.53684, 2.19687,\n 94.6628565, 0.60848, -1.040e-04,\n 24.1804509, 0.03251, -1.222e-03,\n// 2635 5 24\n2683616.685130, 4.0, 2101.6, \" 0.628\", \"-0.427\", 3,\n 20.08689, 0.91732, 0.24995,\n -1.45560, 0.00000, 0.00000, 0.44313, 0.00000, 0.00000, 2.34369,\n 240.8609110, 0.52243, 6.200e-04,\n -19.5007997, -0.14377, 7.060e-04,\n// 2635 6 22\n2683646.225447, 17.0, 2102.0, \" 0.057\", \"-0.969\", 3,\n 11.02807, 0.93976, 0.25606,\n -0.16954, 0.00000, 0.00000, 0.41072, 0.00000, 0.00000, 0.99641,\n 270.8877067, 0.59073, 4.480e-04,\n -24.7700106, -0.04422, 1.142e-03,\n// 2635 11 16\n2683793.161444, 16.0, 2104.1, \" 0.796\", \"-0.170\", 3,\n 19.68467, 1.02135, 0.27829,\n -1.97760, 0.00000, 0.00000, -0.12534, 0.00000, 0.00000, 1.72587,\n 51.7495600, 0.62759, 6.390e-04,\n 17.5729702, 0.21034, -1.019e-03,\n// 2635 12 16\n2683822.594897, 2.0, 2104.5, \" 0.011\", \"-0.976\", 3,\n 7.61764, 1.00600, 0.27411,\n 0.04178, 0.00000, 0.00000, 0.27752, 0.00000, 0.00000, 0.50950,\n 82.2982334, 0.67125, 2.590e-04,\n 24.7068689, 0.08664, -1.521e-03,\n// 2636 5 12\n2683970.724719, 5.0, 2106.6, \" 1.969\", \" 0.889\", 2,\n 20.35091, 0.89970, 0.24515,\n -2.57471, -1.29729, 0.00000, 0.39324, 0.00000, 2.08357, 3.36087,\n 229.5256111, 0.48639, 4.470e-04,\n -17.6989001, -0.17033, 6.030e-04,\n// 2636 11 5\n2684147.832594, 8.0, 2109.2, \" 2.035\", \" 1.065\", 1,\n 10.98976, 1.01424, 0.27635,\n -2.59591, -1.61564, -0.33039, -0.01774, 0.29535, 1.58057, 2.55952,\n 40.8213803, 0.59826, 8.360e-04,\n 15.3008293, 0.24176, -7.360e-04,\n// 2637 5 1\n2684324.786227, 7.0, 2111.7, \" 2.442\", \" 1.389\", 1,\n 21.61766, 0.92458, 0.25193,\n -3.11628, -1.99297, -0.86832, -0.13056, 0.60679, 1.73130, 2.85682,\n 218.6253395, 0.49636, 3.220e-04,\n -15.3278597, -0.20636, 6.180e-04,\n// 2637 10 25\n2684502.384844, 21.0, 2114.2, \" 2.356\", \" 1.342\", 1,\n 23.28663, 0.96826, 0.26383,\n -2.56926, -1.53467, -0.44271, 0.23626, 0.91578, 2.00808, 3.04054,\n 30.0214681, 0.52866, 7.270e-04,\n 12.4645497, 0.24453, -4.090e-04,\n// 2638 4 20\n2684679.117833, 15.0, 2116.7, \" 1.099\", \" 0.098\", 2,\n 4.90085, 0.97597, 0.26593,\n -2.39248, -0.75987, 0.00000, -0.17200, 0.00000, 0.41265, 2.04799,\n 207.9574446, 0.53542, 2.920e-04,\n -12.4504496, -0.25150, 6.340e-04,\n// 2638 10 15\n2684856.661306, 4.0, 2119.3, \" 0.966\", \"-0.099\", 3,\n 5.56708, 0.91860, 0.25030,\n -2.40597, 0.00000, 0.00000, -0.12865, 0.00000, 0.00000, 2.15050,\n 19.5952305, 0.46420, 4.510e-04,\n 9.2817293, 0.23466, -2.290e-04,\n// 2639 3 11\n2685004.323184, 20.0, 2121.4, \" 1.005\", \" 0.042\", 2,\n 7.27023, 1.02461, 0.27918,\n -2.27268, -0.61155, 0.00000, -0.24358, 0.00000, 0.12444, 1.78487,\n 171.9875647, 0.56363, -2.350e-04,\n 4.5382799, -0.30264, -2.200e-04,\n// 2639 9 4\n2685181.026316, 13.0, 2123.9, \" 0.863\", \"-0.205\", 3,\n 11.88171, 0.90668, 0.24705,\n -2.57571, 0.00000, 0.00000, -0.36843, 0.00000, 0.00000, 1.83733,\n 343.8475415, 0.44859, -3.410e-04,\n -7.9124198, 0.23204, 1.950e-04,\n// 2640 2 29\n2685358.963752, 11.0, 2126.5, \" 2.238\", \" 1.248\", 1,\n 21.57258, 1.00002, 0.27248,\n -2.54816, -1.56007, -0.45157, 0.13006, 0.71218, 1.82074, 2.80686,\n 161.5435361, 0.54605, -1.910e-04,\n 8.1535998, -0.27979, -4.630e-04,\n// 2640 8 23\n2685535.214802, 17.0, 2129.0, \" 2.292\", \" 1.273\", 1,\n 15.15394, 0.94756, 0.25819,\n -2.70214, -1.63239, -0.47913, 0.15524, 0.78895, 1.94185, 3.01388,\n 333.2462683, 0.50176, -6.320e-04,\n -11.3265693, 0.23996, 3.220e-04,\n// 2641 2 17\n2685713.406993, 22.0, 2131.5, \" 2.187\", \" 1.140\", 1,\n 7.86398, 0.94763, 0.25821,\n -3.08841, -1.96596, -0.70451, -0.23217, 0.24098, 1.50281, 2.62295,\n 151.0928823, 0.50400, -2.100e-04,\n 11.3987302, -0.23645, -5.270e-04,\n// 2641 8 13\n2685889.707434, 5.0, 2134.1, \" 2.007\", \" 1.041\", 1,\n 2.44808, 0.99893, 0.27218,\n -2.62494, -1.63279, -0.27660, -0.02158, 0.23273, 1.58888, 2.58298,\n 323.0560632, 0.57306, -8.150e-04,\n -14.0732804, 0.24442, 5.890e-04,\n// 2642 2 7\n2686067.541827, 1.0, 2136.6, \" 0.874\", \"-0.222\", 3,\n 10.13348, 0.90622, 0.24693,\n -2.23077, 0.00000, 0.00000, 0.00385, 0.00000, 0.00000, 2.23990,\n 139.7638524, 0.47716, -3.290e-04,\n 14.5387202, -0.19424, -5.190e-04,\n// 2642 7 4\n2686215.117254, 15.0, 2138.7, \" 0.399\", \"-0.547\", 3,\n 9.83115, 1.01806, 0.27740,\n -1.54670, 0.00000, 0.00000, -0.18591, 0.00000, 0.00000, 1.17611,\n 284.3346826, 0.67793, -4.990e-04,\n -24.0434099, 0.11742, 1.514e-03,\n// 2642 8 2\n2686244.396514, 22.0, 2139.2, \" 0.686\", \"-0.255\", 3,\n 18.75590, 1.02346, 0.27887,\n -2.20873, 0.00000, 0.00000, -0.48365, 0.00000, 0.00000, 1.24181,\n 313.0534971, 0.61974, -7.240e-04,\n -16.2494999, 0.22652, 8.960e-04,\n// 2642 12 28\n2686391.742696, 6.0, 2141.3, \" 0.620\", \"-0.461\", 3,\n 12.43715, 0.92019, 0.25073,\n -2.06945, 0.00000, 0.00000, -0.17529, 0.00000, 0.00000, 1.71640,\n 96.7818271, 0.56163, -4.880e-04,\n 24.3407588, -0.07045, -1.013e-03,\n// 2643 6 24\n2686569.744722, 6.0, 2143.8, \" 1.709\", \" 0.724\", 2,\n 0.13350, 0.97770, 0.26640,\n -2.69188, -1.57434, 0.00000, -0.12666, 0.00000, 1.32265, 2.43788,\n 273.0843502, 0.63288, -5.400e-05,\n -23.9243905, 0.06557, 1.324e-03,\n// 2643 12 17\n2686746.006234, 12.0, 2146.4, \" 1.957\", \" 0.935\", 2,\n 17.71486, 0.97096, 0.26456,\n -2.55258, -1.44677, 0.00000, 0.14962, 0.00000, 1.74464, 2.85280,\n 84.3000457, 0.62684, -4.130e-04,\n 23.7409094, -0.03009, -1.251e-03,\n// 2644 6 12\n2686924.111507, 15.0, 2148.9, \" 2.612\", \" 1.571\", 1,\n 8.41942, 0.92642, 0.25243,\n -3.31670, -2.22127, -1.15229, -0.32383, 0.50498, 1.57420, 2.66740,\n 261.7793216, 0.56823, 1.220e-04,\n -22.9905790, 0.01857, 1.020e-03,\n// 2644 12 6\n2687100.550624, 1.0, 2151.5, \" 2.466\", \" 1.491\", 1,\n 6.01173, 1.01596, 0.27682,\n -2.44901, -1.51557, -0.52509, 0.21497, 0.95481, 1.94517, 2.87969,\n 72.4966524, 0.67774, -6.900e-05,\n 22.1840890, 0.01701, -1.405e-03,\n// 2645 6 1\n2687278.194863, 17.0, 2154.0, \" 1.211\", \" 0.137\", 2,\n 9.68618, 0.89996, 0.24522,\n -2.86701, -1.07141, 0.00000, -0.32328, 0.00000, 0.42529, 2.22046,\n 250.2460281, 0.52953, 1.030e-04,\n -21.2717311, -0.02135, 8.260e-04,\n// 2645 11 25\n2687455.214076, 17.0, 2156.6, \" 1.231\", \" 0.262\", 2,\n 21.31682, 1.02050, 0.27806,\n -2.06299, -0.75955, 0.00000, 0.13781, 0.00000, 1.03612, 2.33873,\n 61.2955520, 0.66973, 3.770e-04,\n 19.8420513, 0.06355, -1.239e-03,\n// 2646 4 22\n2687602.649662, 4.0, 2158.7, \" 0.691\", \"-0.350\", 3,\n 18.00628, 0.93788, 0.25555,\n -2.33900, 0.00000, 0.00000, -0.40812, 0.00000, 0.00000, 1.52053,\n 209.7174477, 0.53213, 9.500e-05,\n -13.2455297, -0.13861, 6.060e-04,\n// 2646 10 16\n2687780.291800, 19.0, 2161.3, \" 0.797\", \"-0.230\", 3,\n 20.67799, 0.95263, 0.25957,\n -2.00679, 0.00000, 0.00000, 0.00320, 0.00000, 0.00000, 2.01577,\n 21.2521182, 0.53865, 4.910e-04,\n 10.0488595, 0.15733, -3.690e-04,\n// 2647 4 11\n2687957.061443, 13.0, 2163.8, \" 2.096\", \" 1.107\", 1,\n 2.29221, 0.99078, 0.26996,\n -2.19118, -1.17740, 0.07035, 0.47464, 0.87823, 2.12587, 3.14170,\n 199.2848665, 0.57915, 3.900e-05,\n -8.5818902, -0.17184, 4.980e-04,\n// 2647 10 5\n2688134.487886, 0.0, 2166.4, \" 2.110\", \" 1.037\", 1,\n 0.95296, 0.90902, 0.24769,\n -3.26921, -2.04787, -0.55118, -0.29073, -0.02976, 1.46717, 2.68726,\n 11.4658206, 0.48259, 2.260e-04,\n 5.3106497, 0.15225, -1.540e-04,\n// 2648 3 31\n2688311.693428, 5.0, 2169.0, \" 2.288\", \" 1.328\", 1,\n 17.59729, 1.02320, 0.27880,\n -2.96504, -2.03956, -0.99879, -0.35773, 0.28321, 1.32387, 2.24956,\n 190.2139109, 0.60789, 9.000e-05,\n -4.0240401, -0.19314, 2.430e-04,\n// 2648 9 23\n2688488.493157, 0.0, 2171.5, \" 2.337\", \" 1.259\", 1,\n 0.21424, 0.90215, 0.24581,\n -3.22820, -2.03065, -0.80932, -0.16424, 0.48061, 1.70178, 2.90014,\n 1.4968000, 0.47192, -5.100e-05,\n 0.3396500, 0.15383, -3.000e-05,\n// 2649 3 20\n2688666.362256, 21.0, 2174.1, \" 1.017\", \" 0.042\", 2,\n 8.90238, 1.00946, 0.27505,\n -2.37913, -0.67745, 0.00000, -0.30586, 0.00000, 0.06795, 1.76777,\n 180.7050718, 0.58918, 1.400e-04,\n 0.8046400, -0.19334, -9.800e-05,\n// 2649 9 13\n2688842.614693, 3.0, 2176.7, \" 0.987\", \"-0.049\", 3,\n 2.48374, 0.93621, 0.25509,\n -2.48631, 0.00000, 0.00000, -0.24736, 0.00000, 0.00000, 1.98981,\n 351.8266505, 0.51000, -3.170e-04,\n -4.5684800, 0.16441, 1.160e-04,\n// 2650 2 8\n2688991.256933, 18.0, 2178.8, \" 0.884\", \"-0.180\", 3,\n 3.24986, 0.93290, 0.25419,\n -1.99684, 0.00000, 0.00000, 0.16639, 0.00000, 0.00000, 2.33160,\n 141.6294912, 0.53302, -7.400e-05,\n 13.9270494, -0.11881, -6.230e-04,\n// 2650 8 4\n2689167.702533, 5.0, 2181.4, \" 1.255\", \" 0.302\", 2,\n 1.84491, 1.01003, 0.27521,\n -2.36952, -1.10819, 0.00000, -0.13921, 0.00000, 0.82816, 2.09102,\n 314.4413369, 0.63454, -5.560e-04,\n -16.2402706, 0.11734, 9.100e-04,\n// 2651 1 28\n2689345.314572, 20.0, 2183.9, \" 2.119\", \" 1.015\", 1,\n 4.51662, 0.90092, 0.24548,\n -3.48480, -2.21000, -0.61840, -0.45028, -0.28192, 1.30980, 2.58400,\n 130.7382901, 0.51253, -1.900e-04,\n 17.7363210, -0.08350, -6.730e-04,\n// 2651 7 24\n2689522.413900, 22.0, 2186.5, \" 2.610\", \" 1.668\", 1,\n 18.15274, 1.02191, 0.27844,\n -2.70452, -1.81941, -0.87027, -0.06640, 0.73754, 1.68674, 2.57145,\n 304.2904463, 0.66751, -2.810e-04,\n -19.5121600, 0.08403, 1.232e-03,\n// 2652 1 17\n2689699.283640, 19.0, 2189.1, \" 2.445\", \" 1.354\", 1,\n 2.77516, 0.91152, 0.24837,\n -3.25653, -2.06735, -0.90988, -0.19264, 0.52426, 1.68155, 2.87241,\n 118.8320410, 0.54009, -3.160e-04,\n 20.9592892, -0.05062, -8.380e-04,\n// 2652 7 13\n2689877.078089, 14.0, 2191.7, \" 1.668\", \" 0.695\", 2,\n 9.45782, 0.98897, 0.26947,\n -2.63667, -1.53604, 0.00000, -0.12585, 0.00000, 1.28590, 2.38451,\n 293.8067070, 0.64159, 6.500e-05,\n -22.2020405, 0.04122, 1.273e-03,\n// 2653 1 5\n2690053.471464, 23.0, 2194.2, \" 1.187\", \" 0.148\", 2,\n 6.04740, 0.95782, 0.26098,\n -2.03501, -0.41710, 0.00000, 0.31514, 0.00000, 1.04410, 2.66450,\n 106.5564903, 0.60923, -3.170e-04,\n 23.3516603, -0.01251, -1.174e-03,\n// 2653 6 3\n2690201.971010, 11.0, 2196.4, \" 0.492\", \"-0.564\", 3,\n 3.80531, 0.91517, 0.24936,\n -1.40163, 0.00000, 0.00000, 0.30425, 0.00000, 0.00000, 2.01241,\n 252.0484877, 0.53516, 5.390e-04,\n -21.1201300, -0.10745, 8.090e-04,\n// 2653 7 3\n2690231.512234, 0.0, 2196.8, \" 0.190\", \"-0.838\", 3,\n 18.74648, 0.93673, 0.25524,\n -0.76143, 0.00000, 0.00000, 0.29362, 0.00000, 0.00000, 1.35334,\n 282.4353983, 0.58642, 2.380e-04,\n -24.2176498, -0.00176, 1.123e-03,\n// 2653 11 27\n2690378.518342, 0.0, 2199.0, \" 0.763\", \"-0.204\", 3,\n 4.40583, 1.02234, 0.27856,\n -1.37857, 0.00000, 0.00000, 0.44021, 0.00000, 0.00000, 2.25806,\n 62.7841029, 0.65059, 6.220e-04,\n 19.8092305, 0.17085, -1.197e-03,\n// 2653 12 26\n2690407.958551, 11.0, 2199.4, \" 0.030\", \"-0.955\", 3,\n 17.34153, 1.00805, 0.27467,\n -0.39215, 0.00000, 0.00000, 0.00522, 0.00000, 0.00000, 0.39907,\n 94.7794205, 0.68019, -1.600e-05,\n 24.8254598, 0.03394, -1.550e-03,\n// 2654 5 23\n2690556.006493, 12.0, 2201.5, \" 1.836\", \" 0.760\", 2,\n 4.06933, 0.90004, 0.24524,\n -2.75596, -1.44261, 0.00000, 0.15584, 0.00000, 1.75399, 3.06737,\n 240.5516128, 0.50430, 4.260e-04,\n -20.0724899, -0.14034, 7.220e-04,\n// 2654 11 16\n2690733.182771, 16.0, 2204.1, \" 1.990\", \" 1.015\", 1,\n 19.71092, 1.01265, 0.27592,\n -2.18524, -1.19001, 0.23270, 0.38650, 0.54083, 1.96353, 2.95737,\n 51.6212379, 0.61873, 9.020e-04,\n 18.1942101, 0.20834, -9.360e-04,\n// 2655 5 12\n2690910.084573, 14.0, 2206.7, \" 2.552\", \" 1.505\", 1,\n 5.33608, 0.92712, 0.25262,\n -2.95810, -1.85445, -0.77066, 0.02975, 0.82980, 1.91342, 3.01931,\n 229.2299458, 0.51781, 3.610e-04,\n -18.2797514, -0.18170, 7.610e-04,\n// 2655 11 6\n2691087.717779, 5.0, 2209.3, \" 2.417\", \" 1.398\", 1,\n 8.00779, 0.96534, 0.26303,\n -2.60260, -1.56370, -0.49150, 0.22669, 0.94539, 2.01791, 3.05461,\n 40.6938778, 0.54459, 8.320e-04,\n 15.9597496, 0.21972, -5.900e-04,\n// 2656 4 30\n2691264.439476, 23.0, 2211.9, \" 1.190\", \" 0.195\", 2,\n 13.62201, 0.97893, 0.26673,\n -2.73036, -1.26866, 0.00000, -0.45257, 0.00000, 0.36068, 1.82499,\n 218.5822410, 0.55777, 4.100e-04,\n -16.0276792, -0.23031, 8.180e-04,\n// 2656 10 25\n2691441.971350, 11.0, 2214.5, \" 1.045\", \"-0.025\", 3,\n 13.28550, 0.91651, 0.24973,\n -2.04558, 0.00000, 0.00000, 0.31239, 0.00000, 0.00000, 2.67190,\n 29.6965902, 0.47522, 5.570e-04,\n 13.0385904, 0.21930, -3.710e-04,\n// 2657 3 22\n2691589.677513, 4.0, 2216.6, \" 0.961\", \"-0.000\", 3,\n 15.99139, 1.02435, 0.27911,\n -1.73239, 0.00000, 0.00000, 0.26032, 0.00000, 0.00000, 2.25244,\n 181.8353588, 0.56044, -3.000e-06,\n 0.3600500, -0.30459, -2.700e-05,\n// 2657 9 14\n2691766.310388, 19.0, 2219.2, \" 0.736\", \"-0.332\", 3,\n 18.59739, 0.90820, 0.24746,\n -1.61323, 0.00000, 0.00000, 0.44932, 0.00000, 0.00000, 2.51001,\n 353.2983104, 0.44388, -2.280e-04,\n -4.0625201, 0.23897, 7.100e-05,\n// 2658 3 11\n2691944.317832, 20.0, 2221.8, \" 2.203\", \" 1.214\", 1,\n 7.29648, 0.99758, 0.27182,\n -3.04912, -2.05421, -0.91947, -0.37202, 0.17597, 1.31077, 2.30361,\n 172.0884876, 0.53420, 1.400e-05,\n 3.7611700, -0.28816, -2.660e-04,\n// 2658 9 4\n2692120.512173, 0.0, 2224.4, \" 2.163\", \" 1.145\", 1,\n 22.87236, 0.95074, 0.25905,\n -2.52481, -1.44188, -0.18899, 0.29215, 0.77247, 2.02497, 3.11014,\n 343.1354260, 0.49285, -5.000e-04,\n -7.5492203, 0.25496, 1.680e-04,\n// 2659 3 1\n2692298.750782, 6.0, 2227.0, \" 2.212\", \" 1.165\", 1,\n 16.58514, 0.94490, 0.25746,\n -2.85290, -1.73012, -0.49091, 0.01877, 0.52921, 1.76881, 2.88927,\n 161.4601395, 0.48774, -7.800e-05,\n 7.4489497, -0.25011, -3.690e-04,\n// 2659 8 24\n2692475.017974, 12.0, 2229.6, \" 2.137\", \" 1.173\", 1,\n 10.16650, 1.00157, 0.27290,\n -2.19968, -1.23227, -0.06836, 0.43138, 0.93057, 2.09444, 3.06371,\n 332.9637171, 0.55877, -6.800e-04,\n -10.7229795, 0.26716, 4.080e-04,\n// 2660 2 18\n2692652.875088, 9.0, 2232.2, \" 0.895\", \"-0.201\", 3,\n 18.85463, 0.90504, 0.24660,\n -2.25781, 0.00000, 0.00000, 0.00212, 0.00000, 0.00000, 2.26340,\n 150.5599089, 0.45982, -2.520e-04,\n 10.9311705, -0.21428, -3.800e-04,\n// 2660 7 14\n2692800.428391, 22.0, 2234.4, \" 0.266\", \"-0.681\", 3,\n 17.54957, 1.01658, 0.27699,\n -0.84512, 0.00000, 0.00000, 0.28138, 0.00000, 0.00000, 1.40956,\n 295.3384179, 0.65862, -6.420e-04,\n -22.7703993, 0.16096, 1.385e-03,\n// 2660 8 13\n2692829.710726, 5.0, 2234.8, \" 0.815\", \"-0.127\", 3,\n 2.47432, 1.02351, 0.27888,\n -1.79794, 0.00000, 0.00000, 0.05742, 0.00000, 0.00000, 1.91338,\n 323.1161142, 0.59945, -6.260e-04,\n -13.3541101, 0.25542, 7.070e-04,\n// 2661 1 7\n2692977.084435, 14.0, 2237.0, \" 0.609\", \"-0.470\", 3,\n 21.15831, 0.92226, 0.25129,\n -1.84814, 0.00000, 0.00000, 0.02644, 0.00000, 0.00000, 1.89834,\n 108.8347477, 0.55195, -6.470e-04,\n 23.3843411, -0.11235, -9.330e-04,\n// 2661 7 4\n2693155.045289, 13.0, 2239.6, \" 1.570\", \" 0.582\", 2,\n 7.85192, 0.97446, 0.26552,\n -2.42357, -1.24535, 0.00000, 0.08695, 0.00000, 1.42118, 2.59697,\n 284.3707460, 0.61875, -2.450e-04,\n -23.3840815, 0.10914, 1.264e-03,\n// 2661 12 27\n2693331.361918, 21.0, 2242.2, \" 1.944\", \" 0.924\", 2,\n 3.43876, 0.97375, 0.26532,\n -3.00327, -1.89980, 0.00000, -0.31397, 0.00000, 1.27048, 2.37619,\n 96.7844157, 0.62467, -6.480e-04,\n 23.6793591, -0.07982, -1.219e-03,\n// 2662 6 23\n2693509.394489, 21.0, 2244.8, \" 2.758\", \" 1.715\", 1,\n 15.13511, 0.92381, 0.25172,\n -2.54542, -1.45094, -0.39892, 0.46774, 1.33469, 2.38694, 3.47928,\n 272.7196454, 0.56287, -5.400e-05,\n -23.2914198, 0.05764, 1.024e-03,\n// 2662 12 17\n2693685.913535, 10.0, 2247.4, \" 2.487\", \" 1.511\", 1,\n 15.73563, 1.01746, 0.27723,\n -2.73818, -1.80711, -0.82321, -0.07515, 0.67271, 1.65652, 2.58861,\n 84.7245078, 0.68314, -3.210e-04,\n 23.0619305, -0.03521, -1.460e-03,\n// 2663 6 12\n2693863.469724, 23.0, 2250.0, \" 1.354\", \" 0.282\", 2,\n 16.40186, 0.89970, 0.24515,\n -2.37377, -0.77771, 0.00000, 0.27338, 0.00000, 1.32471, 2.92058,\n 261.1820352, 0.53349, -4.400e-05,\n -22.3647800, 0.01511, 8.740e-04,\n// 2663 12 7\n2694040.573566, 2.0, 2252.6, \" 1.258\", \" 0.286\", 2,\n 7.04072, 1.01947, 0.27778,\n -2.45672, -1.17084, 0.00000, -0.23442, 0.00000, 0.70305, 1.98810,\n 73.2627537, 0.67941, 1.900e-04,\n 21.5666997, 0.01478, -1.374e-03,\n// 2664 5 2\n2694187.958448, 11.0, 2254.8, \" 0.601\", \"-0.434\", 3,\n 1.72470, 0.94073, 0.25633,\n -1.80545, 0.00000, 0.00000, 0.00276, 0.00000, 0.00000, 1.80827,\n 219.9779628, 0.54996, 1.180e-04,\n -16.7216896, -0.11719, 7.750e-04,\n// 2664 6 1\n2694217.518092, 0.0, 2255.2, \" 0.029\", \"-1.025\", 3,\n 16.66588, 0.91785, 0.25009,\n 0.00318, 0.00000, 0.00000, 0.43420, 0.00000, 0.00000, 0.86078,\n 249.5914228, 0.54832, -7.200e-05,\n -20.6138097, -0.02577, 8.710e-04,\n// 2664 10 27\n2694365.614814, 3.0, 2257.4, \" 0.723\", \"-0.310\", 3,\n 5.39915, 0.94970, 0.25877,\n -2.18222, 0.00000, 0.00000, -0.24447, 0.00000, 0.00000, 1.69608,\n 31.7425904, 0.54858, 5.590e-04,\n 13.9610202, 0.13813, -5.580e-04,\n// 2665 4 21\n2694542.392383, 21.0, 2260.0, \" 2.018\", \" 1.035\", 1,\n 11.01336, 0.99340, 0.27068,\n -2.21624, -1.19856, 0.17962, 0.41720, 0.65401, 2.03209, 3.05175,\n 209.5597797, 0.59488, 1.320e-04,\n -12.5246895, -0.15455, 7.120e-04,\n// 2665 10 16\n2694719.788413, 7.0, 2262.6, \" 2.017\", \" 0.939\", 2,\n 8.67138, 0.90747, 0.24726,\n -3.03583, -1.78363, 0.00000, -0.07809, 0.00000, 1.62824, 2.87931,\n 21.3782189, 0.48849, 2.990e-04,\n 9.4057400, 0.14168, -3.070e-04,\n// 2666 4 11\n2694897.037288, 13.0, 2265.2, \" 2.351\", \" 1.394\", 1,\n 2.31845, 1.02358, 0.27890,\n -2.71992, -1.80432, -0.79134, -0.10508, 0.58110, 1.59400, 2.50973,\n 200.1601689, 0.61676, 2.400e-04,\n -8.1658199, -0.18138, 4.780e-04,\n// 2666 10 5\n2695073.786138, 7.0, 2267.9, \" 2.447\", \" 1.367\", 1,\n 7.93267, 0.90307, 0.24607,\n -3.21615, -2.03054, -0.86854, -0.13269, 0.60295, 1.76479, 2.95137,\n 11.3006001, 0.47569, 3.200e-05,\n 4.5893100, 0.15022, -1.790e-04,\n// 2667 4 1\n2695251.708163, 5.0, 2270.5, \" 1.065\", \" 0.090\", 2,\n 17.62354, 1.00733, 0.27447,\n -2.11870, -0.55006, 0.00000, -0.00408, 0.00000, 0.54413, 2.11085,\n 190.5726871, 0.58909, 2.960e-04,\n -3.4728500, -0.18811, 1.250e-04,\n// 2667 9 24\n2695427.917113, 10.0, 2273.1, \" 1.102\", \" 0.066\", 2,\n 10.20216, 0.93910, 0.25588,\n -2.31874, -0.49523, 0.00000, 0.01072, 0.00000, 0.51318, 2.33875,\n 1.4570001, 0.51098, -2.140e-04,\n -0.3545800, 0.16748, -5.200e-05,\n// 2668 2 20\n2695576.599030, 2.0, 2275.3, \" 0.859\", \"-0.206\", 3,\n 11.97102, 0.93048, 0.25354,\n -1.76734, 0.00000, 0.00000, 0.37672, 0.00000, 0.00000, 2.52284,\n 152.2538778, 0.51737, -3.900e-05,\n 10.2500299, -0.13991, -4.600e-04,\n// 2668 8 14\n2695753.013930, 12.0, 2277.9, \" 1.129\", \" 0.177\", 2,\n 9.56333, 1.01209, 0.27577,\n -1.80659, -0.41902, 0.00000, 0.33431, 0.00000, 1.08595, 2.47502,\n 324.4659782, 0.62165, -5.290e-04,\n -13.0762998, 0.14674, 7.050e-04,\n// 2669 2 8\n2695930.647962, 4.0, 2280.5, \" 2.098\", \" 0.995\", 2,\n 13.23778, 0.90038, 0.24533,\n -3.47853, -2.19906, 0.00000, -0.44892, 0.00000, 1.30155, 2.58057,\n 141.8611166, 0.49815, -2.100e-04,\n 14.5329196, -0.11025, -5.340e-04,\n// 2669 8 4\n2696107.725927, 5.0, 2283.2, \" 2.476\", \" 1.532\", 1,\n 1.87116, 1.02110, 0.27822,\n -2.20616, -1.31234, -0.33846, 0.42226, 1.18308, 2.15705, 3.05040,\n 314.6188945, 0.65027, -3.280e-04,\n -16.8522094, 0.11951, 1.039e-03,\n// 2670 1 28\n2696284.623414, 3.0, 2285.8, \" 2.458\", \" 1.370\", 1,\n 11.49632, 0.91316, 0.24882,\n -3.09635, -1.91397, -0.76557, -0.03806, 0.68910, 1.83730, 3.02140,\n 130.3221404, 0.52885, -3.990e-04,\n 18.4484895, -0.08460, -7.110e-04,\n// 2670 7 24\n2696462.379486, 21.0, 2288.4, \" 1.807\", \" 0.831\", 2,\n 17.17625, 0.98593, 0.26864,\n -2.46992, -1.40371, 0.00000, 0.10767, 0.00000, 1.62039, 2.68448,\n 304.6363817, 0.62443, -6.600e-05,\n -20.1199392, 0.08000, 1.132e-03,\n// 2671 1 17\n2696638.826597, 8.0, 2291.1, \" 1.198\", \" 0.163\", 2,\n 15.77129, 0.96057, 0.26173,\n -2.51213, -0.92512, 0.00000, -0.16168, 0.00000, 0.59852, 2.18787,\n 118.8219323, 0.60185, -4.950e-04,\n 21.6177690, -0.05697, -1.059e-03,\n// 2671 6 14\n2696787.252099, 18.0, 2293.3, \" 0.348\", \"-0.709\", 3,\n 11.52373, 0.91312, 0.24880,\n -1.40670, 0.00000, 0.00000, 0.05037, 0.00000, 0.00000, 1.51017,\n 263.4412159, 0.54321, 4.050e-04,\n -21.9539902, -0.06820, 8.740e-04,\n// 2671 7 14\n2696816.796401, 7.0, 2293.7, \" 0.327\", \"-0.704\", 3,\n 2.46491, 0.93377, 0.25443,\n -1.26157, 0.00000, 0.00000, 0.11364, 0.00000, 0.00000, 1.49275,\n 293.8344922, 0.57532, 5.800e-05,\n -22.8511594, 0.03812, 1.049e-03,\n// 2671 12 8\n2696963.879383, 9.0, 2295.9, \" 0.739\", \"-0.230\", 3,\n 14.12973, 1.02317, 0.27879,\n -1.68806, 0.00000, 0.00000, 0.10520, 0.00000, 0.00000, 1.89771,\n 74.7456902, 0.67086, 4.970e-04,\n 21.4336698, 0.12295, -1.347e-03,\n// 2672 1 6\n2696993.324296, 20.0, 2296.3, \" 0.045\", \"-0.939\", 3,\n 3.06543, 1.00997, 0.27519,\n -0.70107, 0.00000, 0.00000, -0.21688, 0.00000, 0.00000, 0.26401,\n 107.1835359, 0.67879, -2.900e-04,\n 23.9743601, -0.01827, -1.489e-03,\n// 2672 6 2\n2697141.285169, 19.0, 2298.5, \" 1.697\", \" 0.624\", 2,\n 11.78775, 0.90053, 0.24538,\n -3.00037, -1.63747, 0.00000, -0.15595, 0.00000, 1.32514, 2.68826,\n 251.8680068, 0.52003, 3.450e-04,\n -21.7266815, -0.10572, 8.190e-04,\n// 2672 11 27\n2697318.536903, 1.0, 2301.2, \" 1.954\", \" 0.976\", 2,\n 5.43481, 1.01096, 0.27546,\n -2.68200, -1.67302, 0.00000, -0.11432, 0.00000, 1.44500, 2.45252,\n 63.3843809, 0.64017, 8.740e-04,\n 20.6158998, 0.16614, -1.133e-03,\n// 2673 5 22\n2697495.380144, 21.0, 2303.8, \" 2.670\", \" 1.628\", 1,\n 13.05450, 0.92977, 0.25334,\n -2.86225, -1.77542, -0.71999, 0.12345, 0.96657, 2.02179, 3.11087,\n 240.1533308, 0.53966, 3.400e-04,\n -20.6321795, -0.15111, 8.930e-04,\n// 2673 11 16\n2697673.054291, 13.0, 2306.5, \" 2.470\", \" 1.445\", 1,\n 16.72895, 0.96245, 0.26225,\n -2.54750, -1.50298, -0.44354, 0.30299, 1.04999, 2.10973, 3.15199,\n 51.7162526, 0.56252, 8.760e-04,\n 18.9218814, 0.18834, -7.660e-04,\n// 2674 5 12\n2697849.757646, 6.0, 2309.1, \" 1.291\", \" 0.301\", 2,\n 21.34043, 0.98188, 0.26754,\n -2.15158, -0.81189, 0.00000, 0.18351, 0.00000, 1.17643, 2.51861,\n 228.9713412, 0.58213, 4.680e-04,\n -18.8929504, -0.20367, 9.900e-04,\n// 2674 11 5\n2698027.286310, 19.0, 2311.7, \" 1.113\", \" 0.037\", 2,\n 22.00666, 0.91454, 0.24919,\n -2.55335, -0.51704, 0.00000, -0.12855, 0.00000, 0.26246, 2.29754,\n 40.5793696, 0.49115, 6.380e-04,\n 16.6222489, 0.19714, -5.240e-04,\n// 2675 4 2\n2698175.026081, 13.0, 2314.0, \" 0.904\", \"-0.055\", 3,\n 1.71529, 1.02395, 0.27900,\n -2.31812, 0.00000, 0.00000, -0.37407, 0.00000, 0.00000, 1.56951,\n 192.2660002, 0.56436, 2.360e-04,\n -4.1001002, -0.29894, 1.840e-04,\n// 2675 5 1\n2698204.380048, 21.0, 2314.4, \" 0.050\", \"-0.905\", 3,\n 11.64278, 1.02024, 0.27799,\n -0.37722, 0.00000, 0.00000, 0.12115, 0.00000, 0.00000, 0.61785,\n 218.3176395, 0.60712, 6.960e-04,\n -16.6025387, -0.24897, 9.190e-04,\n// 2675 9 26\n2698351.601250, 2.0, 2316.6, \" 0.624\", \"-0.445\", 3,\n 2.31581, 0.90982, 0.24791,\n -1.48723, 0.00000, 0.00000, 0.42999, 0.00000, 0.00000, 2.34499,\n 3.1015699, 0.44387, -1.010e-04,\n 0.0980600, 0.24074, -5.800e-05,\n// 2676 3 22\n2698529.666046, 4.0, 2319.3, \" 2.157\", \" 1.167\", 1,\n 16.01764, 0.99503, 0.27112,\n -2.68765, -1.68379, -0.50750, -0.01490, 0.47831, 1.65468, 2.65638,\n 182.0145693, 0.52918, 2.180e-04,\n -0.4615200, -0.28861, -8.800e-05,\n// 2676 9 14\n2698705.815350, 8.0, 2321.9, \" 2.045\", \" 1.028\", 1,\n 7.59352, 0.95391, 0.25992,\n -3.20573, -2.10665, -0.65057, -0.43161, -0.21362, 1.24204, 2.34332,\n 353.3238553, 0.48831, -3.400e-04,\n -3.3121500, 0.26408, 7.000e-06,\n// 2677 3 11\n2698884.088959, 14.0, 2324.5, \" 2.249\", \" 1.201\", 1,\n 1.30630, 0.94216, 0.25672,\n -2.75425, -1.63301, -0.42256, 0.13502, 0.69331, 1.90415, 3.02307,\n 171.6470935, 0.47707, 7.200e-05,\n 3.2447401, -0.25712, -2.160e-04,\n// 2677 9 3\n2699060.332623, 20.0, 2327.2, \" 2.260\", \" 1.296\", 1,\n 18.88766, 1.00410, 0.27359,\n -2.66853, -1.71951, -0.64365, -0.01706, 0.60913, 1.68493, 2.63570,\n 343.1717899, 0.54758, -4.990e-04,\n -6.7827300, 0.28394, 2.150e-04,\n// 2678 2 28\n2699238.203399, 17.0, 2329.8, \" 0.926\", \"-0.169\", 3,\n 3.57579, 0.90396, 0.24631,\n -2.41239, 0.00000, 0.00000, -0.11841, 0.00000, 0.00000, 2.17682,\n 161.0781817, 0.44659, -1.450e-04,\n 6.9178901, -0.22804, -2.430e-04,\n// 2678 7 26\n2699385.737973, 6.0, 2332.1, \" 0.131\", \"-0.818\", 3,\n 2.27073, 1.01496, 0.27655,\n -1.08921, 0.00000, 0.00000, -0.28864, 0.00000, 0.00000, 0.51418,\n 306.7377851, 0.63363, -6.980e-04,\n -20.6009809, 0.20167, 1.200e-03,\n// 2678 8 24\n2699415.026658, 13.0, 2332.5, \" 0.940\", \"-0.004\", 3,\n 11.19548, 1.02342, 0.27885,\n -2.32802, 0.00000, 0.00000, -0.36020, 0.00000, 0.00000, 1.60835,\n 333.4926196, 0.58085, -4.660e-04,\n -9.7634805, 0.27859, 5.010e-04,\n// 2679 1 18\n2699562.427806, 22.0, 2334.7, \" 0.600\", \"-0.476\", 3,\n 5.87947, 0.92439, 0.25188,\n -1.58973, 0.00000, 0.00000, 0.26734, 0.00000, 0.00000, 2.12154,\n 120.6361945, 0.53673, -7.380e-04,\n 21.5682194, -0.15070, -8.100e-04,\n// 2679 7 15\n2699740.343171, 20.0, 2337.4, \" 1.426\", \" 0.435\", 2,\n 15.57034, 0.97119, 0.26463,\n -2.20788, -0.94612, 0.00000, 0.23611, 0.00000, 1.42065, 2.67985,\n 295.5226691, 0.59856, -3.730e-04,\n -22.0623887, 0.14917, 1.153e-03,\n// 2680 1 8\n2699916.720047, 5.0, 2340.0, \" 1.935\", \" 0.917\", 2,\n 12.15992, 0.97649, 0.26607,\n -2.39620, -1.29659, 0.00000, 0.28113, 0.00000, 1.85745, 2.95918,\n 108.5440003, 0.61532, -8.250e-04,\n 22.7731006, -0.12575, -1.127e-03,\n// 2680 7 4\n2700094.674382, 4.0, 2342.7, \" 2.851\", \" 1.806\", 1,\n 22.85353, 0.92129, 0.25103,\n -2.84078, -1.74231, -0.69185, 0.18517, 1.06246, 2.11313, 3.20953,\n 284.2200447, 0.55099, -2.150e-04,\n -22.7333114, 0.09760, 9.760e-04,\n// 2680 12 27\n2700271.279920, 19.0, 2345.4, \" 2.501\", \" 1.525\", 1,\n 1.45953, 1.01880, 0.27760,\n -2.94322, -2.01425, -1.03494, -0.28192, 0.47095, 1.45018, 2.38010,\n 97.0145590, 0.67877, -5.760e-04,\n 22.9874798, -0.08859, -1.428e-03,\n// 2681 6 23\n2700448.740676, 6.0, 2348.0, \" 1.506\", \" 0.435\", 2,\n 0.12028, 0.89959, 0.24512,\n -2.96657, -1.50024, 0.00000, -0.22378, 0.00000, 1.05275, 2.51915,\n 272.7683037, 0.53139, -2.080e-04,\n -22.6389198, 0.05451, 8.750e-04,\n// 2681 12 17\n2700625.936954, 10.0, 2350.7, \" 1.277\", \" 0.302\", 2,\n 15.76188, 1.01833, 0.27747,\n -1.75107, -0.47395, 0.00000, 0.48690, 0.00000, 1.44893, 2.72523,\n 84.7554486, 0.68102, -3.100e-05,\n 22.4239413, -0.03460, -1.433e-03,\n// 2682 5 13\n2700773.263079, 18.0, 2352.9, \" 0.500\", \"-0.528\", 3,\n 9.44313, 0.94368, 0.25713,\n -1.34503, 0.00000, 0.00000, 0.31390, 0.00000, 0.00000, 1.96959,\n 230.5688542, 0.56900, 8.500e-05,\n -19.7105702, -0.08927, 9.340e-04,\n// 2682 6 12\n2700802.801276, 7.0, 2353.4, \" 0.168\", \"-0.881\", 3,\n 0.38430, 0.92018, 0.25073,\n -0.79161, 0.00000, 0.00000, 0.23062, 0.00000, 0.00000, 1.24882,\n 260.9065327, 0.55574, -2.280e-04,\n -21.7396793, 0.01348, 9.220e-04,\n// 2682 11 7\n2700950.942670, 11.0, 2355.6, \" 0.662\", \"-0.378\", 3,\n 14.12031, 0.94685, 0.25799,\n -2.24928, 0.00000, 0.00000, -0.37592, 0.00000, 0.00000, 1.50042,\n 42.5635601, 0.56104, 5.770e-04,\n 17.4482185, 0.11205, -7.400e-04,\n// 2683 5 3\n2701127.718583, 5.0, 2358.3, \" 1.930\", \" 0.952\", 2,\n 19.73452, 0.99599, 0.27138,\n -2.34953, -1.32367, 0.00000, 0.24600, 0.00000, 1.81471, 2.84246,\n 220.1323797, 0.61388, 1.750e-04,\n -16.0827288, -0.12945, 9.230e-04,\n// 2683 10 27\n2701305.094809, 14.0, 2360.9, \" 1.937\", \" 0.854\", 2,\n 16.38981, 0.90606, 0.24688,\n -2.66231, -1.37910, 0.00000, 0.27543, 0.00000, 1.93074, 3.21292,\n 31.5177884, 0.49805, 3.480e-04,\n 13.2326497, 0.12516, -4.600e-04,\n// 2684 4 21\n2701482.376972, 21.0, 2363.6, \" 2.423\", \" 1.469\", 1,\n 11.03961, 1.02381, 0.27896,\n -2.57543, -1.66919, -0.68098, 0.04733, 0.77559, 1.76374, 2.67003,\n 210.3196245, 0.63017, 3.540e-04,\n -12.0530897, -0.16176, 7.140e-04,\n// 2684 10 15\n2701659.084526, 14.0, 2366.3, \" 2.546\", \" 1.464\", 1,\n 15.65109, 0.90413, 0.24635,\n -3.06775, -1.89038, -0.76507, 0.02861, 0.82209, 1.94723, 3.12574,\n 21.2150798, 0.48391, 1.030e-04,\n 8.6935297, 0.14067, -3.280e-04,\n// 2685 4 11\n2701837.049637, 13.0, 2369.0, \" 1.122\", \" 0.148\", 2,\n 2.34470, 1.00506, 0.27385,\n -1.96986, -0.50329, 0.00000, 0.19128, 0.00000, 0.88806, 2.35268,\n 200.5576996, 0.59424, 4.340e-04,\n -7.6193296, -0.17540, 3.480e-04,\n// 2685 10 4\n2702013.225129, 17.0, 2371.6, \" 1.207\", \" 0.172\", 2,\n 17.92058, 0.94203, 0.25668,\n -1.99914, -0.39445, 0.00000, 0.40309, 0.00000, 1.19741, 2.80422,\n 11.0717495, 0.51684, -1.110e-04,\n 3.8346402, 0.16438, -2.220e-04,\n// 2686 3 2\n2702161.936721, 10.0, 2373.9, \" 0.826\", \"-0.240\", 3,\n 20.69218, 0.92810, 0.25289,\n -1.63331, 0.00000, 0.00000, 0.48130, 0.00000, 0.00000, 2.59809,\n 162.6237989, 0.50509, 3.300e-05,\n 6.1978699, -0.15409, -2.930e-04,\n// 2686 8 25\n2702338.328031, 20.0, 2376.5, \" 1.009\", \" 0.056\", 2,\n 18.28449, 1.01402, 0.27629,\n -2.17366, -0.55946, 0.00000, -0.12726, 0.00000, 0.30316, 1.91885,\n 334.8077042, 0.60961, -4.450e-04,\n -9.3437005, 0.17055, 4.780e-04,\n// 2687 2 19\n2702515.977796, 11.0, 2379.2, \" 2.070\", \" 0.968\", 2,\n 20.95620, 0.89996, 0.24522,\n -2.55390, -1.26900, 0.00000, 0.46710, 0.00000, 2.20349, 3.48808,\n 152.1572443, 0.48558, -1.840e-04,\n 10.9384703, -0.12982, -3.910e-04,\n// 2687 8 15\n2702693.040017, 13.0, 2381.9, \" 2.347\", \" 1.402\", 1,\n 10.59232, 1.02014, 0.27796,\n -2.65384, -1.74749, -0.73454, -0.03959, 0.65552, 1.66860, 2.57440,\n 325.2661212, 0.63216, -3.060e-04,\n -13.5370200, 0.15000, 8.150e-04,\n// 2688 2 8\n2702869.960762, 11.0, 2384.6, \" 2.477\", \" 1.392\", 1,\n 20.21748, 0.91492, 0.24929,\n -2.99416, -1.82017, -0.68310, 0.05829, 0.79932, 1.93617, 3.11194,\n 141.4383142, 0.51636, -4.200e-04,\n 15.2788497, -0.11283, -5.610e-04,\n// 2688 8 4\n2703047.681982, 4.0, 2387.3, \" 1.942\", \" 0.962\", 2,\n 0.89467, 0.98285, 0.26780,\n -2.26857, -1.22655, 0.00000, 0.36756, 0.00000, 1.96280, 3.00262,\n 315.1584521, 0.60481, -1.230e-04,\n -17.4122013, 0.11282, 9.590e-04,\n// 2689 1 27\n2703224.181512, 16.0, 2390.0, \" 1.211\", \" 0.179\", 2,\n 0.49245, 0.96333, 0.26248,\n -1.99461, -0.43966, 0.00000, 0.35628, 0.00000, 1.14904, 2.70621,\n 130.1424927, 0.59060, -5.900e-04,\n 19.1420986, -0.09432, -9.030e-04,\n// 2689 6 25\n2703372.528833, 1.0, 2392.2, \" 0.197\", \"-0.861\", 3,\n 19.24215, 0.91118, 0.24827,\n -1.42153, 0.00000, 0.00000, -0.30800, 0.00000, 0.00000, 0.80863,\n 274.9164801, 0.54511, 2.420e-04,\n -21.9554194, -0.02783, 8.910e-04,\n// 2689 7 24\n2703402.078572, 14.0, 2392.7, \" 0.468\", \"-0.566\", 3,\n 10.18333, 0.93089, 0.25365,\n -1.74508, 0.00000, 0.00000, -0.11428, 0.00000, 0.00000, 1.51967,\n 304.9715255, 0.55945, -6.500e-05,\n -20.7338998, 0.07360, 9.320e-04,\n// 2689 12 18\n2703549.243931, 18.0, 2394.9, \" 0.722\", \"-0.248\", 3,\n 23.85363, 1.02384, 0.27897,\n -1.92006, 0.00000, 0.00000, -0.14565, 0.00000, 0.00000, 1.62819,\n 86.8946024, 0.68374, 2.870e-04,\n 22.1486403, 0.07085, -1.430e-03,\n// 2690 1 17\n2703578.691171, 5.0, 2395.4, \" 0.058\", \"-0.925\", 3,\n 12.78933, 1.01176, 0.27568,\n -0.95736, 0.00000, 0.00000, -0.41189, 0.00000, 0.00000, 0.13050,\n 119.3418600, 0.66858, -5.000e-04,\n 22.2066406, -0.06683, -1.348e-03,\n// 2690 6 14\n2703726.559067, 1.0, 2397.6, \" 1.549\", \" 0.478\", 2,\n 18.50343, 0.90119, 0.24556,\n -2.34441, -0.90942, 0.00000, 0.41762, 0.00000, 1.74405, 3.17948,\n 262.8544480, 0.53082, 2.170e-04,\n -22.5102988, -0.06954, 8.760e-04,\n// 2690 12 8\n2703903.895391, 9.0, 2400.3, \" 1.928\", \" 0.946\", 2,\n 14.15598, 1.00917, 0.27497,\n -2.07684, -1.05579, 0.00000, 0.48939, 0.00000, 2.03530, 3.05484,\n 74.7990067, 0.65566, 7.530e-04,\n 22.0814091, 0.12063, -1.271e-03,\n// 2691 6 3\n2704080.670980, 4.0, 2403.0, \" 2.800\", \" 1.763\", 1,\n 20.77293, 0.93255, 0.25410,\n -2.87502, -1.80170, -0.76337, 0.10351, 0.97009, 2.00819, 3.08378,\n 251.3571359, 0.55935, 2.510e-04,\n -22.2812092, -0.11531, 1.001e-03,\n// 2691 11 27\n2704258.396060, 22.0, 2405.7, \" 2.510\", \" 1.479\", 1,\n 2.45285, 0.95962, 0.26147,\n -3.36342, -2.31223, -1.25958, -0.49456, 0.27091, 1.32385, 2.37273,\n 63.6706819, 0.58140, 8.400e-04,\n 21.3708713, 0.14913, -9.370e-04,\n// 2692 5 22\n2704435.071623, 14.0, 2408.4, \" 1.402\", \" 0.418\", 2,\n 6.06159, 0.98484, 0.26834,\n -2.67356, -1.42994, 0.00000, -0.28106, 0.00000, 0.86570, 2.11164,\n 240.2769845, 0.60771, 4.500e-04,\n -21.3559798, -0.16820, 1.162e-03,\n// 2692 11 16\n2704612.605910, 3.0, 2411.1, \" 1.170\", \" 0.089\", 2,\n 6.72782, 0.91271, 0.24869,\n -2.93765, -1.05714, 0.00000, -0.45816, 0.00000, 0.14311, 2.02241,\n 51.8343568, 0.50915, 6.660e-04,\n 19.6532307, 0.16874, -6.740e-04,\n// 2693 4 12\n2704760.370044, 21.0, 2413.3, \" 0.837\", \"-0.119\", 3,\n 10.43645, 1.02337, 0.27884,\n -2.00256, 0.00000, 0.00000, -0.11895, 0.00000, 0.00000, 1.76433,\n 202.2622280, 0.57456, 4.470e-04,\n -8.1037795, -0.28594, 3.820e-04,\n// 2693 5 12\n2704789.708800, 5.0, 2413.8, \" 0.144\", \"-0.808\", 3,\n 20.36394, 1.02114, 0.27824,\n -0.82394, 0.00000, 0.00000, 0.01121, 0.00000, 0.00000, 0.84513,\n 229.1811919, 0.63213, 7.750e-04,\n -19.6358291, -0.21760, 1.133e-03,\n// 2693 10 6\n2704936.897556, 10.0, 2416.0, \" 0.523\", \"-0.547\", 3,\n 11.03697, 0.91155, 0.24838,\n -2.22833, 0.00000, 0.00000, -0.45865, 0.00000, 0.00000, 1.30847,\n 13.3605296, 0.44941, 3.200e-05,\n 4.4498499, 0.23659, -1.950e-04,\n// 2694 4 2\n2705115.008837, 12.0, 2418.7, \" 2.099\", \" 1.110\", 1,\n 0.73880, 0.99235, 0.27039,\n -2.45282, -1.43775, -0.19563, 0.21210, 0.62053, 1.86271, 2.87554,\n 191.9755259, 0.53066, 4.170e-04,\n -4.6666597, -0.28216, 9.100e-05,\n// 2694 9 25\n2705291.123645, 15.0, 2421.4, \" 1.937\", \" 0.921\", 2,\n 15.31194, 0.95708, 0.26078,\n -2.76237, -1.64420, 0.00000, -0.03252, 0.00000, 1.57759, 2.69793,\n 2.9277501, 0.49034, -1.820e-04,\n 0.7400600, 0.26700, -1.420e-04,\n// 2695 3 22\n2705469.421888, 22.0, 2424.2, \" 2.295\", \" 1.247\", 1,\n 10.02746, 0.93943, 0.25597,\n -2.78286, -1.66458, -0.48482, 0.12532, 0.73611, 1.91624, 3.03221,\n 181.7589290, 0.47253, 2.280e-04,\n -1.0781900, -0.25770, -6.600e-05,\n// 2695 9 15\n2705645.651617, 4.0, 2426.9, \" 2.374\", \" 1.410\", 1,\n 3.60882, 1.00650, 0.27425,\n -3.02695, -2.09131, -1.06770, -0.36118, 0.34502, 1.36856, 2.30584,\n 353.1945735, 0.54230, -2.950e-04,\n -2.6299500, 0.29359, 2.700e-05,\n// 2696 3 11\n2705823.527282, 1.0, 2429.6, \" 0.966\", \"-0.127\", 3,\n 12.29695, 0.90298, 0.24604,\n -2.68041, 0.00000, 0.00000, -0.34524, 0.00000, 0.00000, 1.99106,\n 171.4072719, 0.43860, -2.100e-05,\n 2.6418499, -0.23564, -1.100e-04,\n// 2696 9 3\n2706000.346121, 20.0, 2432.3, \" 1.058\", \" 0.112\", 2,\n 18.91391, 1.02315, 0.27878,\n -1.75576, -0.29144, 0.00000, 0.30691, 0.00000, 0.90574, 2.37041,\n 343.0520431, 0.56776, -2.750e-04,\n -6.1289200, 0.29357, 3.170e-04,\n// 2697 1 29\n2706147.771651, 7.0, 2434.5, \" 0.590\", \"-0.483\", 3,\n 15.60337, 0.92660, 0.25248,\n -2.31855, 0.00000, 0.00000, -0.48037, 0.00000, 0.00000, 1.35477,\n 132.6057322, 0.51739, -7.490e-04,\n 18.8069703, -0.18521, -6.500e-04,\n// 2697 7 26\n2706325.639759, 3.0, 2437.3, \" 1.282\", \" 0.287\", 2,\n 23.28877, 0.96791, 0.26373,\n -2.01145, -0.63074, 0.00000, 0.35423, 0.00000, 1.34195, 2.71997,\n 306.4361912, 0.57480, -4.230e-04,\n -20.0218902, 0.18405, 1.008e-03,\n// 2698 1 18\n2706502.079350, 14.0, 2440.0, \" 1.927\", \" 0.912\", 2,\n 21.88381, 0.97918, 0.26680,\n -2.76120, -1.66620, 0.00000, -0.09561, 0.00000, 1.47357, 2.57059,\n 120.6687335, 0.59807, -9.260e-04,\n 20.8747400, -0.16999, -9.690e-04,\n// 2698 7 15\n2706679.952218, 11.0, 2442.7, \" 2.698\", \" 1.650\", 1,\n 6.57195, 0.91888, 0.25037,\n -3.17703, -2.06929, -1.00406, -0.14678, 0.71078, 1.77619, 2.88193,\n 295.5739501, 0.53370, -3.250e-04,\n -21.3619716, 0.13443, 8.850e-04,\n// 2699 1 8\n2706856.647532, 4.0, 2445.4, \" 2.512\", \" 1.537\", 1,\n 11.18343, 1.02000, 0.27792,\n -3.11849, -2.19175, -1.21620, -0.45924, 0.29758, 1.27308, 2.20068,\n 109.2019182, 0.66514, -7.720e-04,\n 21.9661001, -0.13996, -1.314e-03,\n// 2699 7 4\n2707034.010052, 12.0, 2448.1, \" 1.663\", \" 0.592\", 2,\n 6.83597, 0.89965, 0.24513,\n -2.58627, -1.21118, 0.00000, 0.24125, 0.00000, 1.69365, 3.06903,\n 283.8069549, 0.52362, -3.490e-04,\n -22.1512512, 0.09150, 8.340e-04,\n// 2699 12 28\n2707211.302412, 19.0, 2450.9, \" 1.291\", \" 0.314\", 2,\n 1.48578, 1.01705, 0.27712,\n -1.99253, -0.72024, 0.00000, 0.25788, 0.00000, 1.23729, 2.50877,\n 96.9952364, 0.67348, -2.750e-04,\n 22.3483294, -0.08740, -1.410e-03,\n// 2700 5 25\n2707358.564118, 2.0, 2453.1, \" 0.392\", \"-0.631\", 3,\n 18.16429, 0.94672, 0.25796,\n -1.93758, 0.00000, 0.00000, -0.46117, 0.00000, 0.00000, 1.01141,\n 242.0843618, 0.58687, -2.300e-05,\n -22.1504589, -0.05311, 1.073e-03,\n// 2700 6 23\n2707388.083134, 14.0, 2453.6, \" 0.312\", \"-0.732\", 3,\n 8.10273, 0.92264, 0.25140,\n -1.37455, 0.00000, 0.00000, -0.00479, 0.00000, 0.00000, 1.36144,\n 272.3276472, 0.55690, -3.990e-04,\n -22.0446097, 0.05450, 9.230e-04,\n// 2700 11 18\n2707536.274370, 19.0, 2455.9, \" 0.610\", \"-0.435\", 3,\n 22.84147, 0.94408, 0.25724,\n -2.23062, 0.00000, 0.00000, -0.41511, 0.00000, 0.00000, 1.40348,\n 53.7620821, 0.57373, 5.290e-04,\n 20.3710102, 0.07948, -9.060e-04\n));\n}", "function r(e,t,n,r){function i(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function o(e){return 3*e}function s(e,t,n){return((i(t,n)*e+a(t,n))*e+o(t))*e}function l(e,t,n){return 3*i(t,n)*e*e+2*a(t,n)*e+o(t)}function u(t,r){for(var i=0;i<f;++i){var a=l(r,e,n);if(0===a)return r;r-=(s(r,e,n)-t)/a}return r}function c(){for(var t=0;t<m;++t)E[t]=s(t*b,e,n)}function d(t,r,i){var a=void 0,o=void 0,l=0;do{o=r+(i-r)/2,a=s(o,e,n)-t,a>0?i=o:r=o}while(Math.abs(a)>g&&++l<y);return o}function h(t){for(var r=0,i=1,a=m-1;i!==a&&E[i]<=t;++i)r+=b;--i;var o=(t-E[i])/(E[i+1]-E[i]),s=r+o*b,c=l(s,e,n);return c>=v?u(t,s):0===c?s:d(t,r,r+b)}function p(){P=!0,e===t&&n===r||c()}var f=4,v=.001,g=1e-7,y=10,m=11,b=1/(m-1),x=\"undefined\"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var w=0;w<4;++w)if(\"number\"!=typeof arguments[w]||isNaN(arguments[w])||!isFinite(arguments[w]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var E=x?new Float32Array(m):new Array(m),P=!1,C=function(i){return P||p(),e===t&&n===r?i:0===i?0:1===i?1:s(h(i),t,r)};C.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var S=\"generateBezier(\"+[e,t,n,r]+\")\";return C.toString=function(){return S},C}", "function gw(t,e,r,n){var a=4,i=.001,s=1e-7,o=10,u=11,l=1/(u-1),f=typeof Float32Array<\"u\";if(arguments.length!==4)return!1;for(var c=0;c<4;++c)if(typeof arguments[c]!=\"number\"||isNaN(arguments[c])||!isFinite(arguments[c]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var v=f?new Float32Array(u):new Array(u);function h(S,L){return 1-3*L+3*S}function d(S,L){return 3*L-6*S}function g(S){return 3*S}function b(S,L,A){return((h(L,A)*S+d(L,A))*S+g(L))*S}function p(S,L,A){return 3*h(L,A)*S*S+2*d(L,A)*S+g(L)}function m(S,L){for(var A=0;A<a;++A){var O=p(L,t,r);if(O===0)return L;var N=b(L,t,r)-S;L-=N/O}return L}function y(){for(var S=0;S<u;++S)v[S]=b(S*l,t,r)}function E(S,L,A){var O,N,R=0;do N=L+(A-L)/2,O=b(N,t,r)-S,O>0?A=N:L=N;while(Math.abs(O)>s&&++R<o);return N}function C(S){for(var L=0,A=1,O=u-1;A!==O&&v[A]<=S;++A)L+=l;--A;var N=(S-v[A])/(v[A+1]-v[A]),R=L+N*l,I=p(R,t,r);return I>=i?m(S,R):I===0?R:E(S,L,L+l)}var D=!1;function w(){D=!0,(t!==e||r!==n)&&y()}var T=function(L){return D||w(),t===e&&r===n?L:L===0?0:L===1?1:b(C(L),e,n)};T.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var x=\"generateBezier(\"+[t,e,r,n]+\")\";return T.toString=function(){return x},T}", "function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }", "function intonum(str1)\n{\n var size=SCnumbersize;\n var bignum = new Array();\n var i,j;\n var debug=0;\n var oddlength=0;\n var str;\n\n str = str1;\n\n var randomString=\"\";\n var alphabet = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=:;\";\n var i;\n\n var randomString = \"\";\n\tif(SCproduction)\n for(i=0;i<8;i++)\n randomString += alphabet.charAt(Math.floor(Math.random()*78));\n\t\n str = randomString + str;\n \n\n for(i=0;i<size;i++)\n bignum[i] = 0;\n \n for(j=size-1,i=str.length-2;j>=0&&i>=0;i-=2,j--)\n {\n bignum[j] = str.charCodeAt(i)*256 +\n str.charCodeAt(i+1);\n \n }\n // put in eight random numbers\n \n // if odd length\n \n if(str.length%2==1 && j > 0)\n {\n bignum[j] = str.charCodeAt(0);\n j--;\n }\n// for(i=j,j=4;i >= 0&&j>0 ;i--,j--)\n// {\n// bignum[i] = Math.floor(Math.random()*256)*256 + Math.floor(Math.random()*256);\n// }\n\t\n return bignum;\n\n}", "function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }", "function testGMP()\n{\n var numbSet = []\n var objSet = []\n for (var cD=0;cD<6;cD++)\n {\n numbSet.push(cD)\n objSet.push([String.fromCharCode(cD+65)])\n }\n\n// var ans = generateMultiplePlacements(numbSet.length,[1,3,2,1,4],numbSet,objSet)\n var ans = generateMultiplePlacements(numbSet.length,[1,3,2],numbSet,objSet)\n// var map =[]\n// dimensionRecurse(ans,map);\n\n var int = 5;\n}", "function e$1(){return [1,0,0,0,1,0,0,0,1]}", "internalSquare(f) {\r\n const f0 = BigInt(f.data[0]);\r\n const f1 = BigInt(f.data[1]);\r\n const f2 = BigInt(f.data[2]);\r\n const f3 = BigInt(f.data[3]);\r\n const f4 = BigInt(f.data[4]);\r\n const f5 = BigInt(f.data[5]);\r\n const f6 = BigInt(f.data[6]);\r\n const f7 = BigInt(f.data[7]);\r\n const f8 = BigInt(f.data[8]);\r\n const f9 = BigInt(f.data[9]);\r\n const f02 = BigInt(2 * f.data[0]);\r\n const f12 = BigInt(2 * f.data[1]);\r\n const f22 = BigInt(2 * f.data[2]);\r\n const f32 = BigInt(2 * f.data[3]);\r\n const f42 = BigInt(2 * f.data[4]);\r\n const f52 = BigInt(2 * f.data[5]);\r\n const f62 = BigInt(2 * f.data[6]);\r\n const f72 = BigInt(2 * f.data[7]);\r\n const f538 = bigIntCommon_1.BIG_38 * f5; // 1.31*2^30\r\n const f619 = bigIntCommon_1.BIG_ARR[19] * f6; // 1.31*2^30\r\n const f738 = bigIntCommon_1.BIG_38 * f7; // 1.31*2^30\r\n const f819 = bigIntCommon_1.BIG_ARR[19] * f8; // 1.31*2^30\r\n const f938 = bigIntCommon_1.BIG_38 * f9; // 1.31*2^30\r\n return {\r\n h0: (f0 * f0) + (f12 * f938) + (f22 * f819) + (f32 * f738) + (f42 * f619) + (f5 * f538),\r\n h1: (f02 * f1) + (f2 * f938) + (f32 * f819) + (f4 * f738) + (f52 * f619),\r\n h2: (f02 * f2) + (f12 * f1) + (f32 * f938) + (f42 * f819) + (f52 * f738) + (f6 * f619),\r\n h3: (f02 * f3) + (f12 * f2) + (f4 * f938) + (f52 * f819) + (f6 * f738),\r\n h4: (f02 * f4) + (f12 * f32) + (f2 * f2) + (f52 * f938) + (f62 * f819) + (f7 * f738),\r\n h5: (f02 * f5) + (f12 * f4) + (f22 * f3) + (f6 * f938) + (f72 * f819),\r\n h6: (f02 * f6) + (f12 * f52) + (f22 * f4) + (f32 * f3) + (f72 * f938) + (f8 * f819),\r\n h7: (f02 * f7) + (f12 * f6) + (f22 * f5) + (f32 * f4) + (f8 * f938),\r\n h8: (f02 * f8) + (f12 * f72) + (f22 * f6) + (f32 * f52) + (f4 * f4) + (f9 * f938),\r\n h9: (f02 * f9) + (f12 * f8) + (f22 * f7) + (f32 * f6) + (f42 * f5)\r\n };\r\n }", "function l(e,i,n,r){function o(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,i){return((o(t,i)*e+a(t,i))*e+s(t))*e}function c(e,t,i){return 3*o(t,i)*e*e+2*a(t,i)*e+s(t)}function u(t,i){for(var r=0;f>r;++r){var o=c(i,e,n);if(0===o)return i;var a=l(i,e,n)-t;i-=a/o}return i}function d(){for(var t=0;C>t;++t)A[t]=l(t*w,e,n)}function h(t,i,r){var o,a,s=0;do a=i+(r-i)/2,o=l(a,e,n)-t,o>0?r=a:i=a;while(Math.abs(o)>v&&++s<b);return a}function g(t){for(var i=0,r=1,o=C-1;r!=o&&A[r]<=t;++r)i+=w;--r;var a=(t-A[r])/(A[r+1]-A[r]),s=i+a*w,l=c(s,e,n);return l>=m?u(t,s):0==l?s:h(t,i,i+w)}function p(){S=!0,(e!=i||n!=r)&&d()}var f=4,m=.001,v=1e-7,b=10,C=11,w=1/(C-1),y=\"Float32Array\"in t;if(4!==arguments.length)return!1;for(var x=0;4>x;++x)if(\"number\"!=typeof arguments[x]||isNaN(arguments[x])||!isFinite(arguments[x]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var A=y?new Float32Array(C):new Array(C),S=!1,E=function(t){return S||p(),e===i&&n===r?t:0===t?0:1===t?1:l(g(t),i,r)};E.getControlPoints=function(){return[{x:e,y:i},{x:n,y:r}]};var _=\"generateBezier(\"+[e,i,n,r]+\")\";return E.toString=function(){return _},E}", "function S4() {\n return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);\n}", "_coreSHA1(_x, _len) {\n\n _x[_len >> 5] |= 0x80 << (24 - _len % 32);\n _x[((_len + 64 >> 9) << 4) + 15] = _len;\n\n const _this = this;\n let _a = 1732584193;\n let _b = -271733879;\n let _c = -1732584194;\n let _d = 271733878;\n let _e = -1009589776;\n const _w = new Array(80);\n let i;\n let _olda;\n let _oldb;\n let _oldc;\n let _oldd;\n let _olde;\n let j;\n let _t;\n\n for (i = 0; i < _x.length; i += 16) {\n _olda = _a;\n _oldb = _b;\n _oldc = _c;\n _oldd = _d;\n _olde = _e;\n\n for (j = 0; j < 80; j++) {\n if (j < 16) {\n _w[j] = _x[i + j];\n }\n else {\n _w[j] = _this._rol(_w[j-3] ^ _w[j-8] ^ _w[j-14] ^ _w[j-16], 1);\n }\n _t = _this._safeAdd(_this._safeAdd(_this._rol(_a, 5), _this._sha1FT(j, _b, _c, _d)),\n _this._safeAdd(_this._safeAdd(_e, _w[j]), _this._sha1KT(j)));\n _e = _d;\n _d = _c;\n _c = _this._rol(_b, 30);\n _b = _a;\n _a = _t;\n }\n\n _a = _this._safeAdd(_a, _olda);\n _b = _this._safeAdd(_b, _oldb);\n _c = _this._safeAdd(_c, _oldc);\n _d = _this._safeAdd(_d, _oldd);\n _e = _this._safeAdd(_e, _olde);\n }\n return [_a, _b, _c, _d, _e];\n }", "function Je(e){var n=parseInt(e,16);return[n>>16,n>>8&255,255&n]}", "function xy2(a) {\n console.log(\"xy\");\n console.log(a.id);\n var u = Math.floor((a.id - 1) /2 / b_map[0].length );\n var d = ((a.id - 1) / 2 ) % b_map[0].length ;\n console.log(\"u\", u, \"d\", d);\n return [u, d];\n}", "function genrand_int31() {\r\n //c//return (genrand_int32()>>1);\r\n return (genrand_int32()>>>1);\r\n }", "__getNoise(x, z)\n {\n let n = (1619 * x + 31337 * z + 1013 * this.__seed) & 0x7fffffff;\n n = BigInt((n >> 13) ^ n);\n n = n * (n * n * 60493n + 19990303n) + 1376312589n;\n n = parseInt(n.toString(2).slice(-31), 2);\n return 1 - n / 1073741824;\n }", "function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }" ]
[ "0.631982", "0.62972486", "0.6271759", "0.6257278", "0.6234962", "0.6213121", "0.6213121", "0.6213121", "0.6213121", "0.62082916", "0.61920124", "0.61620265", "0.61458206", "0.61417973", "0.6121508", "0.6118399", "0.60940874", "0.6083118", "0.6062382", "0.6060217", "0.60427636", "0.6026446", "0.6026236", "0.5989256", "0.59632283", "0.59584296", "0.5955211", "0.5926064", "0.591344", "0.59026563", "0.58688134", "0.58666784", "0.58570355", "0.58570355", "0.58570355", "0.58474255", "0.5763534", "0.5759679", "0.57271194", "0.5724764", "0.5720372", "0.571855", "0.5696539", "0.5689486", "0.568612", "0.56818885", "0.5670676", "0.5663626", "0.56606674", "0.56562567", "0.56509334", "0.5647922", "0.5642138", "0.5640756", "0.5635745", "0.5623192", "0.5623192", "0.5623192", "0.5623192", "0.5619198", "0.5598584", "0.55976003", "0.5590932", "0.55895627", "0.55863106", "0.5581706", "0.5549565", "0.5536582", "0.55350035", "0.55225575", "0.55172694", "0.55146915", "0.5508505", "0.5507859", "0.5505845", "0.5505845", "0.55033624", "0.5495096", "0.5493243", "0.5493243", "0.5474588", "0.5472926", "0.5469314", "0.5469065", "0.5466304", "0.54611313", "0.5461008", "0.5458842", "0.5455826", "0.5446388", "0.5439012", "0.54369843", "0.5430044", "0.5428484", "0.5428061", "0.5419621", "0.54164433", "0.54134053", "0.5409529", "0.5400904", "0.5396034" ]
0.0
-1
Secondary Sales Header Report
function fnShowProductDetails() { debugger; $.ajax({ type: 'POST', url: '../HiDoctor_Reports/Reports/GetSaleProductsSS', data: 'A', success: function (response) { jsData = eval('(' + response + ')'); $('option', $("#ddlProductName")).remove(); if (jsData.Tables[0].Rows.length > 0) { $('#ddlProductName').append("<option value='0'>-Select Product-</option>"); for (var i = 0; i < jsData.Tables[0].Rows.length; i++) { $("#ddlProductName").append("<option value='" + jsData.Tables[0].Rows[i].Product_Code + "'>" + jsData.Tables[0].Rows[i].Product_Name + "</option>"); } $("#ddlProductName").val('0'); } }, error: function () { fnMsgAlert('info', 'Report', 'Error.'); HideModalPopup("dvloading"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ReportHeader(){}", "function createSalesTableHeader() {\n // Create the first header column\n var trEl = document.createElement('tr'); //create the row\n var thEl = document.createElement('th'); //create the first column cell\n thEl.textContent = 'Location';\n trEl.appendChild(thEl);\n\n // Create the header body\n for (var t = 0; t < storeHours.length; t++){\n var tdEl = document.createElement('th'); //create a cell for each column of time\n tdEl.textContent = storeHours[t];\n trEl.appendChild(tdEl);\n }\n\n // Create last header column\n thEl = document.createElement('th');\n thEl.textContent = 'Daily Total';\n trEl.appendChild(thEl);\n\n salesTable.appendChild(trEl);\n}", "function createHdr(theTable) {\n // create table header here\n var hoursOpenArray = ['6:00 am', '7:00 am', '8:00 am', '9:00 am', '10:00 am', '11:00 am', '12:00 pm', '1:00 pm', '2:00 pm', '3:00 pm', '4:00 pm', '5:00 pm', '6:00 pm', '7:00 pm'];\n\n // var hoursOpenArray = [];\n // var hour = 0;\n // var hourText = '';\n // for (var h = 0; h < 14; h++) {\n // hour = h + 6;\n // if (hour > 12) {\n // hourText = (hour - 12) + ':00 pm';\n // } else if ( hour < 12) {\n // hourText = hour + ':00 am';\n // } else {\n // hourText = hour + ':00 pm';\n // };\n // hoursOpenArray[h] = hourText;\n // };\n\n var salesHeader = document.createElement('thead');\n var headerRow = document.createElement('tr');\n var blankHdr = document.createElement('th');\n // we need a blank column heading before adding the rest of the header data\n headerRow.appendChild(blankHdr);\n\n for (var i = 0; i < hoursOpenArray.length; i++) {\n var th = document.createElement('th');\n th.textContent = hoursOpenArray[i];\n headerRow.appendChild(th);\n }\n // we also need a final column for the total for the store\n // we will just re-use the blankHdr we have sitting around.\n var headerTotal = document.createElement('th');\n headerTotal.textContent = 'Total';\n headerRow.appendChild(headerTotal);\n\n salesHeader.appendChild(headerRow);\n theTable.appendChild(salesHeader);\n}", "function generateSummaryRightTableRow(doc, y, subtotal, discount, sgst, cgst, finalTotalAllTax, isIGST, igst, salemasterdata) {\n\tdoc.fillColor('#000000');\n\tdoc\n\t\t.fontSize(9)\n\t\t.font('Helvetica-Bold')\n\t\t.text('SUB TOTAL', 450, y, { width: 70, align: 'left' })\n\t\t.font('Helvetica')\n\t\t.text((+subtotal + +discount).toFixed(2), 500, y, {\n\t\t\twidth: 70,\n\t\t\talign: 'right',\n\t\t})\n\n\t\t.text('DISCOUNT', 450, y + 15, { width: 70, align: 'left' })\n\n\t\t.text((+discount).toFixed(2), 500, y + 15, { width: 70, align: 'right' });\n\n\tif (!isIGST) {\n\t\tdoc\n\t\t\t.text('SGST', 450, y + 30, { width: 70, align: 'left' })\n\n\t\t\t.text((+sgst / 2).toFixed(2), 500, y + 30, { width: 70, align: 'right' })\n\n\t\t\t.text('CGST', 450, y + 45, { width: 70, align: 'left' })\n\n\t\t\t.text((+cgst / 2).toFixed(2), 500, y + 45, { width: 70, align: 'right' });\n\t} else if (isIGST) {\n\t\tdoc\n\t\t\t.text('IGST', 450, y + 30, { width: 70, align: 'left' })\n\n\t\t\t.text((+igst).toFixed(2), 500, y + 30, { width: 70, align: 'right' });\n\t}\n\n\tdoc\n\t\t.text('Misc.', 450, y + 60, { width: 70, align: 'left' })\n\n\t\t.text((+(+salemasterdata.transport_charges + +salemasterdata.unloading_charges + +salemasterdata.misc_charges)).toFixed(2), 500, y + 60, {\n\t\t\twidth: 70,\n\t\t\talign: 'right',\n\t\t});\n\n\tlet finalSumTotal = +(+finalTotalAllTax + +salemasterdata.transport_charges + +salemasterdata.unloading_charges + +salemasterdata.misc_charges);\n\n\tdoc\n\t\t.text('ROUNDED OFF', 450, y + 75, { width: 70, align: 'left' })\n\n\t\t.text((roundOffFn(finalSumTotal, 'rounding') - roundOffFn(finalSumTotal, 'withoutrounding')).toFixed(2), 500, y + 75, {\n\t\t\twidth: 70,\n\t\t\talign: 'right',\n\t\t});\n\n\tdoc.font('Helvetica-Bold');\n\tdoc\n\t\t.text('TOTAL', 450, y + 95, { width: 70, align: 'left' })\n\n\t\t.text(roundOffFn(finalSumTotal, 'rounding').toLocaleString('en-IN') + '.00', 500, y + 95, {\n\t\t\twidth: 70,\n\t\t\talign: 'right',\n\t\t})\n\t\t.font('Helvetica');\n}", "function tableHeader() {\n var headerTop = document.getElementById('SalesReport');\n var row = document.createElement('tr');\n headerTop.appendChild(row);\n var tableData = document.createElement('th');\n row.appendChild(tableData);\n for (var i = 0; i < hoursOfOperation.length; i++) {\n var hourHead = document.createElement('th');\n hourHead.innerText = hoursOfOperation[i];\n row.appendChild(hourHead);\n };\n var totalHead = document.createElement('th');\n totalHead.innerText = ('Daily Location Total');\n row.appendChild(totalHead);\n}", "function generateSummaryLeftTableRow(doc, y, classhead, subtotal, disc, amount, sgst, cgst, gst, total, isIGST, igst) {\n\tdoc.fillColor('#000000');\n\tdoc.fontSize(9).text(classhead, 24, y, { width: 40, align: 'left' });\n\tif (subtotal === 'SUB TOTAL') {\n\t\tdoc.text(subtotal, 64, y, { width: 50, align: 'right' });\n\t} else {\n\t\tdoc.text((+subtotal + +disc).toFixed(2), 64, y, {\n\t\t\twidth: 50,\n\t\t\talign: 'right',\n\t\t});\n\t}\n\n\tif (disc === 'DISC') {\n\t\tdoc.text(disc, 113, y, { width: 49, align: 'right' });\n\t} else {\n\t\tdoc.text((+disc).toFixed(2), 113, y, { width: 49, align: 'right' });\n\t}\n\tif (amount === 'AMOUNT') {\n\t\tdoc.text(amount, 169, y, { width: 49, align: 'right' });\n\t} else {\n\t\tdoc.text((+amount).toFixed(2), 169, y, { width: 49, align: 'right' });\n\t}\n\n\tif (!isIGST) {\n\t\tif (sgst === 'SGST') {\n\t\t\tdoc.text(sgst, 225, y, { width: 49, align: 'right' });\n\t\t} else {\n\t\t\tdoc.text((+sgst / 2).toFixed(2), 225, y, { width: 49, align: 'right' });\n\t\t}\n\n\t\tif (cgst === 'CGST') {\n\t\t\tdoc.text(cgst, 281, y, { width: 49, align: 'right' });\n\t\t} else {\n\t\t\tdoc.text((+cgst / 2).toFixed(2), 281, y, { width: 49, align: 'right' });\n\t\t}\n\n\t\tif (gst === 'GST') {\n\t\t\tdoc.text(gst, 337, y, { width: 49, align: 'right' });\n\t\t} else {\n\t\t\tdoc.text((+gst).toFixed(2), 337, y, { width: 49, align: 'right' });\n\t\t}\n\t\tif (total === 'TOTAL') {\n\t\t\tdoc.text(total, 393, y, { width: 49, align: 'right' });\n\t\t} else {\n\t\t\tdoc.text((+total).toFixed(2), 393, y, { width: 49, align: 'right' });\n\t\t}\n\t} else if (isIGST) {\n\t\tif (igst === 'IGST') {\n\t\t\tdoc.text(igst, 225, y, { width: 39, align: 'right' });\n\t\t} else {\n\t\t\tdoc.text((+igst).toFixed(2), 225, y, { width: 39, align: 'right' });\n\t\t}\n\n\t\tif (gst === 'GST') {\n\t\t\tdoc.text(gst, 281, y, { width: 49, align: 'right' });\n\t\t} else {\n\t\t\tdoc.text((+gst).toFixed(2), 281, y, { width: 49, align: 'right' });\n\t\t}\n\n\t\tif (total === 'TOTAL') {\n\t\t\tdoc.text(total, 337, y, { width: 49, align: 'right' });\n\t\t} else {\n\t\t\tdoc.text((+total).toFixed(2), 337, y, { width: 49, align: 'right' });\n\t\t}\n\t}\n}", "renderSprintHeaderRow() {\n\n const template = markobj(`<table>\n <thead>\n <tr>\n <th class=\"left\">Member</th>\n <th>Role</th>\n <th>Time</th>\n <th>Hours</th>\n <!-- Inject Sprints -->\n </tr>\n </thead>\n <tbody>\n </tbody>\n </table>`);\n const container = document.querySelector('#team-data');\n container.innerHTML = \"\";\n container.appendChild(template);\n\n const header = container.querySelector('table thead tr');\n let sprintHeaders = '';\n this.sprintData.forEach( (sprint) => {\n sprintHeaders = markobj(`<th>${sprint.label}</th>`);\n header.appendChild(sprintHeaders);\n });\n sprintHeaders = markobj(`<th>Totals</th>`);\n header.appendChild(sprintHeaders);\n }", "function renderHeader() {\n var tableHeader = document.createElement('tr')\n table.append(tableHeader)\n var cityLabel = document.createElement('th');\n cityLabel.textContent = 'Store Location';\n tableHeader.append(cityLabel);\n for (var i = 0; i < hours.length; i++) {\n var headerCellHour = document.createElement('th');\n headerCellHour.textContent = hours[i];\n tableHeader.append(headerCellHour);\n }\n var dailyTotalLabel = document.createElement('th');\n dailyTotalLabel.textContent = 'End of day Sales'\n tableHeader.append(dailyTotalLabel)\n}", "function RenderHeader() {\n var tabletext = AddTableHeader('Name');\n let click_periods = manual_periods.concat(limited_periods);\n let times_shown = GetShownPeriodKeys();\n times_shown.forEach((period)=>{\n let header = period_info.header[period];\n if (click_periods.includes(period)) {\n let is_available = CU.period_available[CU.usertag][CU.current_username][period];\n let link_class = (manual_periods.includes(period) ? 'cu-manual' : 'cu-limited');\n let header_class = (!is_available ? 'cu-process' : '');\n let counter_html = (!is_available ? '<span class=\"cu-display\" style=\"display:none\">&nbsp;(<span class=\"cu-counter\">...</span>)</span>' : '');\n tabletext += AddTableHeader(`<a class=\"${link_class}\">${header}</a>${counter_html}`,`class=\"cu-period-header ${header_class}\" data-period=\"${period}\"`);\n } else {\n tabletext += AddTableHeader(header,`class=\"cu-period-header\" data-period=\"${period}\"`);\n }\n });\n return AddTableHead(AddTableRow(tabletext));\n}", "function renderSalesTable() {\n\n renderTableHead();\n renderTableBody();\n renderTableFoot();\n\n}", "function createHeader() {\n var tr = document.createElement('tr');\n table.appendChild(tr);\n\n for (i = 0; i < 17; i++) {\n var th = document.createElement('th');\n if (i == 0) {\n th.textContent = 'Store Name';\n } else if (i < 16) {\n th.textContent = hoursOpen[i - 1];\n } else {\n th.textContent = 'Daily Location Total';\n }\n tr.appendChild(th);\n }\n}", "function header(){\n var thE1 = document.createElement('th');\n var trE1 = document.createElement('tr');\n thE1.textContent = 'Store Locations';\n trE1.appendChild(thE1);\n\n for (var i = 0; i < hourList.length; i++){\n thE1 = document.createElement('th');\n thE1.textContent = hourList[i];\n trE1.appendChild(thE1);\n }\n thE1 = document.createElement('th');\n thE1.textContent ='Daily location Totals: ';\n trE1.appendChild(thE1);\n var salesTable = document.getElementById('tabl');\n salesTable.appendChild(trE1);\n}", "function renderHeader () {\n var trEl = document.createElement('tr');\n\n var headerTitles = ['', 'Daily Location Total'];\n for(var i = 0; i < headerTitles.length; i++) {\n //'for each pass, this code will run'\n var thEl = document.createElement('th');//create\n thEl.textContent = headerTitles[i];//add content\n trEl.appendChild(thEl);//append this table header element into a row\n }\n for(var i = 0; i < openHours.length; i++) {\n var thEl = document.createElement('th');\n thEl.textContent = openHours[i];\n trEl.appendChild(thEl);\n }\n cookiesTable.appendChild(trEl);\n}", "renderHeader(type, discipline, course, date, teacher, std_name, std_num) {\n var header = [\n { text: 'Exame ' + type, style: ['header', {alignment:'center'}] },\n { style: 'header_table',\n table: {\n widths: [ 'auto', '*' ],\n body: [\n [ \n { text: [ { text: 'Disciplina: ', bold:true }, discipline ] }, \n { text: [ { text: 'Curso: ', bold:true }, course ] },\n ],\n [ \n { text: [ { text: 'Data: ', bold:true }, date ] }, \n { text: [ { text: 'Professor: ', bold:true }, teacher ] },\n ],\n [ \n { text: [ { text: 'Aluno: ', bold:true }, std_name ] }, \n { text: [ { text: 'Numero: ', bold:true }, std_num] },\n ]\n\t\t\t\t\t]\n\t\t\t\t},\n layout: 'noBorders'\n\t\t\t}, \n ]\n return header;\n }", "function createHeader() {\r\n var head = document.querySelector('thead');\r\n newRow = addElement('tr', '', head);\r\n addElement('th', '', newRow);\r\n\r\n for (var i = 0; i < times.length; i++) {\r\n addElement('th', times[i], newRow);\r\n }\r\n\r\n addElement('th', 'Total', newRow);\r\n}", "getSummaryHeader(){\n\t//=================================\n\t//get contents\n\tvar add_header = Object.keys(this.summaryColumns);\n\t//append the datasource id\n\tadd_header = add_header.map(element => element + \" [\" + this.short_id + \"]\")\n\treturn add_header;\n\t}", "function generateHeader() {\n var tableRow = document.createElement('tr');\n var blank = document.createElement('th');\n tableRow.appendChild(blank);\n for (var i = 0; i < clock.length; i++) {\n var tableHead = document.createElement('th');\n tableHead.textContent = clock[i];\n tableRow.appendChild(tableHead);\n }\n var total = document.createElement('th');\n total.textContent = 'Daily Location Total';\n tableRow.appendChild(total);\n parentElement.appendChild(tableRow);\n}", "function renderHeader() {\n\n var headerRow = document.createElement('tr');\ntable.appendChild(headerRow);\n\nvar emptyCell = document.createElement('td');\nheaderRow.appendChild(emptyCell);\n\n\nfor (let i = 0; i < hoursArray.length; i++) {\n var tableHeader = document.createElement('th')\n tableHeader.textContent = hoursArray[i];\n headerRow.appendChild(tableHeader);\n\n\n}\n\nvar totalHeader = document.createElement('th');\ntotalHeader.textContent = 'Daily Location Total';\nheaderRow.appendChild(totalHeader);\n\n \n \n}", "function _debug_printCustomersSuppliers(param, report, stylesheet) {\n if (!param)\n return param;\n\n //Column count\n var sortedColumns = [];\n for (var i in param.journal.columns) {\n if (param.journal.columns[i].index>=0)\n sortedColumns.push(param.journal.columns[i].index);\n }\n sortedColumns.sort(_debug_sortNumber); \n\n //Title\n var table = report.addTable(\"tableJournalCustomersSuppliers\");\n var headerRow = table.getHeader().addRow();\n headerRow.addCell(\"Customers/Suppliers\", \"title\", sortedColumns.length);\n \n //Period\n var periodo = \"Periodo dal \" + Banana.Converter.toLocaleDateFormat(param.startDate);\n periodo +=\" al \" + Banana.Converter.toLocaleDateFormat(param.endDate);\n headerRow = table.getHeader().addRow();\n headerRow.addCell(periodo, \"period\", sortedColumns.length);\n \n //Header\n var headerRow = table.getHeader().addRow();\n for (var i in sortedColumns) {\n var index = sortedColumns[i];\n for (var j in param.journal.columns) {\n if (param.journal.columns[j].index == index) {\n var columnTitle = param.journal.columns[j].title;\n headerRow.addCell(columnTitle);\n break;\n }\n }\n }\n\n // Print data\n var row = table.addRow();\n row.addCell(\"------------------- customers -------------------\", \"\", sortedColumns.length);\n for (var i in param.customers) {\n for (var j in param.customers[i].rows) {\n var rowJsonObj = param.customers[i].rows[j];\n var row = table.addRow();\n for (var k in sortedColumns) {\n var index = sortedColumns[k];\n for (var l in param.journal.columns) {\n if (param.journal.columns[l].index == index) {\n var columnName = param.journal.columns[l].name;\n var content = rowJsonObj[columnName];\n if (content.length>11 && param.journal.columns[l].type == \"description\")\n content = content.substring(0,10) + \"...\";\n row.addCell(content, param.journal.columns[l].type);\n break;\n }\n }\n }\n }\n }\n \n var row = table.addRow();\n row.addCell(\"------------------- suppliers -------------------\", \"\", sortedColumns.length);\n for (var i in param.suppliers) {\n for (var j in param.suppliers[i].rows) {\n var rowJsonObj = param.suppliers[i].rows[j];\n var row = table.addRow();\n for (var k in sortedColumns) {\n var index = sortedColumns[k];\n for (var l in param.journal.columns) {\n if (param.journal.columns[l].index == index) {\n var columnName = param.journal.columns[l].name;\n var content = rowJsonObj[columnName];\n if (content.length>11 && param.journal.columns[l].type == \"description\")\n content = content.substring(0,10) + \"...\";\n row.addCell(content, param.journal.columns[l].type);\n break;\n }\n }\n }\n }\n }\n \n _debug_printJournal_addStyle(stylesheet);\n\n}", "function printReport_Header(report, banDoc, userParam) {\r\n\t/*\r\n\t\tPRINT LOGO\r\n\t*/\r\n\tlet headerParagraph = report.getHeader();\r\n\theaderParagraph.addImage(\"images/ministero_del_lavoro.png\", \"img alignCenter\");\r\n\theaderParagraph.addParagraph(\" \");\r\n\theaderParagraph.addParagraph(\" \");\r\n\r\n\r\n\t/*\r\n\t\tPRINT TABLE \"ANAGRAFICA\"\r\n\t*/\r\n\tif (userParam.tipoRendicontoModB) {\r\n\t\treport.addParagraph(\"MODELLO DI RENDICONTO DELL'ACCANTONAMENTO RELATIVO AL CONTRIBUTO 5 PER MILLE DESTINATO AGLI ENTI DEL TERZO SETTORE (Mod. B)\", \"heading alignCenter\");\r\n\t}\r\n\telse {\r\n\t\treport.addParagraph(\"MODELLO DI RENDICONTO RELATIVO AL CONTRIBUTO 5 PER MILLE DESTINATO AGLI ENTI DEL TERZO SETTORE (Mod. A)\", \"heading alignCenter\");\r\n\t}\r\n\treport.addParagraph(\" \");\r\n\r\n\tlet tableAnagrafica = report.addTable(\"tableAnagrafica\");\r\n\tlet col1Anagrafica = tableAnagrafica.addColumn(\"col1Anagrafica\");\r\n\tlet col2Anagrafica = tableAnagrafica.addColumn(\"col2Anagrafica\");\r\n\tlet col3Anagrafica = tableAnagrafica.addColumn(\"col3Anagrafica\");\r\n\tlet col4Anagrafica = tableAnagrafica.addColumn(\"col4Anagrafica\");\r\n\tlet col5Anagrafica = tableAnagrafica.addColumn(\"col5Anagrafica\");\r\n\r\n\ttableAnagrafica.getCaption().addText(\"ANAGRAFICA\", \"description bold\");\r\n\r\n\ttableRow = tableAnagrafica.addRow();\r\n\ttableRow.addCell(\"Denominazione sociale\",\"\",1);\r\n\ttableRow.addCell(banDoc.info(\"AccountingDataBase\", \"Company\"), \"\", 4);\r\n\r\n\ttableRow = tableAnagrafica.addRow();\r\n\ttableRow.addCell(\"C.F. dell'Ente\", \"\", 1);\r\n\ttableRow.addCell(banDoc.info(\"AccountingDataBase\", \"FiscalNumber\"), \"\", 1);\r\n\ttableRow.addCell(\"\",\"\",1);\r\n\ttableRow.addCell(\"Telefono\", \"\", 1);\r\n\ttableRow.addCell(banDoc.info(\"AccountingDataBase\", \"Phone\"), \"\", 1);\r\n\r\n\ttableRow = tableAnagrafica.addRow();\r\n\ttableRow.addCell(\"Comune\", \"\", 1);\r\n\ttableRow.addCell(banDoc.info(\"AccountingDataBase\", \"City\"), \"\", 1);\r\n\ttableRow.addCell(\"\",\"\",1);\r\n\ttableRow.addCell(\"Email\", \"\", 1);\r\n\ttableRow.addCell(banDoc.info(\"AccountingDataBase\", \"Email\"), \"\", 1);\r\n\r\n\ttableRow = tableAnagrafica.addRow();\r\n\ttableRow.addCell(\"Provincia\", \"\", 1);\r\n\ttableRow.addCell(userParam.provincia, \"\", 1);\r\n\ttableRow.addCell(\"\",\"\",1);\r\n\ttableRow.addCell(\"PEC\", \"\", 1);\r\n\ttableRow.addCell(userParam.pec, \"\", 1);\r\n\r\n\ttableRow = tableAnagrafica.addRow();\r\n\ttableRow.addCell(\"CAP\", \"\", 1);\r\n\ttableRow.addCell(banDoc.info(\"AccountingDataBase\", \"Zip\"), \"\", 1);\r\n\ttableRow.addCell(\"\",\"\",1);\r\n\ttableRow.addCell(\"Nome rappresentante legale\", \"\", 1);\r\n\ttableRow.addCell(userParam.rappresentanteLegale, \"\", 1);\r\n\r\n\ttableRow = tableAnagrafica.addRow();\r\n\ttableRow.addCell(\"Via\", \"\", 1);\r\n\ttableRow.addCell(banDoc.info(\"AccountingDataBase\", \"Address1\"), \"\", 1);\r\n\ttableRow.addCell(\"\",\"\",1);\r\n\ttableRow.addCell(\"C.F. rappresentante legale\", \"\", 1);\r\n\ttableRow.addCell(userParam.cfRappresentanteLegale, \"\", 1);\r\n\r\n\treport.addParagraph(\" \");\r\n}", "function makeHeaderRow() {\n var trEl = document.createElement('tr');\n var thEl = document.createElement('th');\n thEl.textContent = 'Stores';\n trEl.appendChild(thEl);\n\n for (var i = 0; i < hours.length; i++) {\n thEl = document.createElement('th');\n thEl.textContent = (hours[i]);\n trEl.appendChild(thEl);\n }\n\n thEl = document.createElement('th');\n thEl.textContent = 'Daily Totals';\n trEl.appendChild(thEl);\n\n storeSalesTable.appendChild(trEl);\n}", "calculateHeaderSpan(rows, i) {\n // Don't return the rowSpan if not the first element in dc\n if (rows[i].rowNum > 1) {\n return null;\n }\n // Rowspan is located in final element of dc - return the rowspan\n // or how many cage numbers to span for the dc header\n while (i < rows.length) {\n if (rows[i].rowSpan !== 0) {\n return (<th className=\"dc-header\" rowSpan={rows[i].rowSpan}>{rows[i].col[0]._dc}</th>);\n }\n i++;\n }\n return null;\n }", "function createSegmentTotals(title, segmentTotals, nextyearSgmtTotals) {\n\n const totalTr = $('<tr>');\n // totalTr.data('totals', segmentTotals);\n totalTr.append('<td><h4><b>' + title + '</b></h4></td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td><h4><b>$' + segmentTotals + '</b></h4></td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td><h4><b>$' + nextyearSgmtTotals + '</b></h4></td>');\n return totalTr;\n }", "function allStoresHourlySales() {\n while (footerRow.firstChild) {\n footerRow.removeChild(footerRow.firstChild);\n }\n var allCookiePerHourData = ['Totals'];\n var grandTotalSales = 0;\n\n for(var k = 2; k < storeHours.length; k++) {\n var allCookiesPerHour = 0;\n for (var n = 0; n < allStores.length; n++) {\n allCookiesPerHour += allStores[n].cookieTotal[k];\n }\n allCookiePerHourData.push(allCookiesPerHour);\n grandTotalSales += allCookiesPerHour;\n\n }\n for(var m = 0; m < allCookiePerHourData.length; m++) {\n var salesTotalData = document.createElement('td');\n salesTotalData.textContent = allCookiePerHourData[m];\n footerRow.appendChild(salesTotalData);\n }\n allCookiePerHourData.push(grandTotalSales);\n var allSalesTotalData = document.createElement('td');\n allSalesTotalData.textContent = grandTotalSales;\n document.getElementById('all-stores-sales-per-hour').appendChild(allSalesTotalData);\n console.log(allSalesTotalData);\n\n //console.log(grandTotalSales);\n //console.log(allCookiePerHourData);\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 7;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 7;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 7;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 6;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function makeFooterRow() {\n var trEl = document.createElement('tr');\n var thEl = document.createElement('th');\n thEl.textContent = 'Hourly Sales For All Locations';\n trEl.appendChild(thEl);\n\n var totalofTotals = 0;\n var hourlyTotal = 0;\n for (var i = 0; i < hours.length; i++) {\n hourlyTotal = 0;\n for (var j = 0; j < allStores.length; j++) {\n hourlyTotal += allStores[j].cookiesSoldHourlyArray[i];\n totalofTotals += allStores[j].cookiesSoldHourlyArray[i];\n }\n thEl = document.createElement ('th');\n thEl.textContent = hourlyTotal;\n trEl.appendChild(thEl);\n }\n\n for (var i = 0; i < hours.length; i++)\n thEl = document.createElement ('th');\n thEl.textContent = totalofTotals;\n trEl.appendChild(thEl);\n\n storeSalesTable.appendChild(trEl);\n}", "function pageTitles() {\n\n // Edit the page headings with the totalShifts\n $(\"#totalShifts\").append(results.Collections.Total);\n $(\"#totalCollectors\").append(results.Collectors.Total);\n\n }", "function createHeader(layout) {\n\n\t\tvar columns = [],\n\t\t\t$thead = $('<thead />');\n\n\t\tlayout.qHyperCube.qDimensionInfo.forEach(function(d) {\n\t\t\tcolumns.push(capitalizeFirstLetter(d.qFallbackTitle));\n\t\t})\n\n\t\tcolumns.push(layout.qHyperCube.qMeasureInfo[0].qFallbackTitle);\n\n\t\tcolumns.forEach(function(d, i) {\n\t\t\tif (i == 1) {\n\t\t\t\t$('<th colspan=\"2\" class=\"col col' + (i + 1) + '\">' + d + '</th>').appendTo($thead);\n\t\t\t} else {\n\t\t\t\t$('<th class=\"col col' + (i + 1) + '\">' + d + '</th>').appendTo($thead);\n\t\t\t}\n\t\t})\n\t\treturn $thead;\n\t}", "renderTableHeader() {\n return ( \n <tr>\n <th>#</th>\n <th>Disease Funds</th>\n <th>Status</th>\n <th>Maximum Award Level</th>\n <th>Treatments Covered</th>\n </tr>\n );\n }", "function displayHeaderGrid() {\n console.log(`\\n\\n`);\n console.log(`=========================================================================================`);\n console.log(`| # | Product | Category | Price | Qty |`);\n console.log(`=========================================================================================`);\n}", "function makeHeader() {\n //tr //th\n // Head\n let trow1 = document.createElement('tr');\n table1.appendChild(trow1);\n let tHead1 = document.createElement('th')\n trow1.appendChild(tHead1);\n tHead1.textContent='Name '\n \n // Working Hours\n for (let i = 0; i < workingHours.length; i++) {\n let tHead1 = document.createElement(\"th\")\n trow1.appendChild(tHead1);\n tHead1.textContent= workingHours[i];\n }\n \n let tHead2 = document.createElement(\"th\");\n trow1.appendChild(tHead2);\n tHead2.textContent= 'Daily Location Total' \n}", "function printHeader(){\n\t\t\t\t\t\t// title\n\t\t\t\t\t\tif (title !== \"\"){\n\t\t\t\t\t\t\tdoc.setFont(myFont,\"bold\");\n\t\t\t\t\t\t\tdoc.setFontSize(fontsize);\n\t\t\t\t\t\t\tdoc.myText(marginLeft, y, title, {underline: true});\n\t\t\t\t\t\t\t// header - grey outlined box with text\n\t\t\t\t\t\t\ty += 5;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdoc.setFillColor(204,204,204); // CCCCCC\n\t\t\t\t\t\tdoc.setDrawColor(0);\n\t\t\t\t\t\tdoc.rect(marginLeft,y,pageWidth,rowHt,'FD'); // Fill and outline rectangle\n\t\t\t\t\t\tvar x = marginLeft+4;\n\t\t\t\t\t\tdoc.setFont(myFont,\"normal\");\n\t\t\t\t\t\ty += lineHt;\n\t\t\t\t\t\t// add vertical lines between header column names\n\t\t\t\t\t\tfor (var i=0; i<header.length; i++) {\n\t\t\t\t\t\t\tif(header[i].displayname)\n\t\t\t\t\t\t\t\tdoc.text(x,y,header[i].displayname);\n\t\t\t\t\t\t\tx += header[i].width;\n\t\t\t\t\t\t\tif (i<header.length-1)\n\t\t\t\t\t\t\t\tdoc.line(x-4,y-lineHt,x-4,y+6);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty+=rowHt;\n\t\t\t\t\t}", "function header() {\n let tableHeadingRow = document.createElement('tr');\n table.append(tableHeadingRow);\n let tableHeading = document.createElement('th');\n tableHeadingRow.append(tableHeading);\n\n for (let i = 0; i<hours.length; i++){\n tableHeading = document.createElement('th');\n tableHeadingRow.append(tableHeading);\n tableHeading.textContent = ' '+hours[i]+ ' ';\n }\n // last heading\n let tableHeading2 = document.createElement('th');\n tableHeadingRow.append(tableHeading2);\n tableHeading2.textContent = 'Daily Location Total';\n}", "renderHeader(h, {\n column,\n $index\n }, tableTitle) {\n return h(\n 'el-tooltip', {\n props: {\n content: tableTitle,\n placement: 'bottom',\n },\n domProps: {\n innerHTML: tableTitle\n }\n }, [h('span')]\n )\n }", "header() {\n const month = this.months[this.monthIndex];\n return {\n month: month,\n year: this.year.toString(),\n shortYear: this.year.toString().substring(2, 4),\n label: month.label + ' ' + this.year,\n };\n }", "function printHeaders(clientProp) {\n var seoLvTab = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('SEO Liquid Values');\n var headerRange = spinUpTab.getRange(1,1,1,spinUpFileHeaders.length).setValues([spinUpFileHeaders]);\n var lvheaderRange = seoLvTab.getRange(1,1,NUM_LV_HEADER_ROWS,seoLiquidValueTabHeaders[clientProp.vertical][0].length);\n lvheaderRange.setValues(seoLiquidValueTabHeaders[clientProp.vertical]);\n setLVHeaderFormatting(clientProp.vertical,clientProp.domainType,seoLvTab);\n}", "function timeHeader(){\n var trEl = document.createElement('tr');\n var thLocation= document.createElement('th');\n thLocation.textContent='Location';\n trEl.appendChild(thLocation);\n for (var i=0; i<operatingHours.length; i++){\n var thEl=document.createElement('th');\n thEl.textContent = operatingHours[i];\n trEl.appendChild(thEl);\n }\n var totalEachLocation=document.createElement('th');\n totalEachLocation.textContent='Total';\n trEl.appendChild(totalEachLocation);\n report.appendChild(trEl);\n}", "function headerTable() {\n\n\n\n let rawHeading = document.createElement('tr');\n table.appendChild(rawHeading);\n\n let th1 = document.createElement('th');\n rawHeading.appendChild(th1);\n th1.textContent = \" \";\n\n for (let i = 0; i < workingHours.length; i++) {\n let th = document.createElement('th');\n rawHeading.appendChild(th);\n th.textContent = workingHours[i];\n\n }\n\n\n let th2 = document.createElement('th');\n rawHeading.appendChild(th2);\n th2.textContent = \"Daily Location Total\";\n\n}", "function getHeader() {\n return This.headerTpl({\n date: date,\n teams: teams\n });\n }", "function invoiceHeader()\r\n{\r\n\tvar postPerdiodIntID = 0;\r\n\tvar retVal = true;\r\n\tvar dateInvoice = null;\r\n\t\r\n\ttry\r\n\t{\r\n\t\t\r\n\r\n\t\tinvoiceRecord = nlapiCreateRecord(\"invoice\");\r\n\t\tinvoiceRecord.setFieldValue('tranid', invoiceNo);\r\n\t\tinvoiceRecord.setFieldValue('recordtype', 'invoice');\r\n\r\n\t\tinvoiceRecord.setFieldValue('memo', patientDetails);\r\n\r\n\t\tdateInvoice = reverseDate(invoiceDate);\r\n\t\tinvoiceRecord.setFieldValue('trandate', dateInvoice);\r\n\t\t\r\n\t\tinvoiceRecord.setFieldValue('custbody_patientnumber', patientDetails);\t\t// 1.0.18\r\n\t\t\r\n\t\tif(interCompanyTag!='not found' && interCompanyTag.length > 0) {\r\n\t\t\tvar interCompanyInternalID = genericSearch('customrecord_intercompanyclass','custrecord_intercompany_tagname',interCompanyTag);\r\n \tinvoiceRecord.setFieldValue('custbody_invoice_intercompany_tag', interCompanyInternalID);\r\n\t\t}\r\n\r\n\t\t// lookup customer, if it does not exist, create it\r\n\t\tentity = lookupCustomer(jdeid);\r\n\r\n\t\tif(entity!='not found')\r\n\t\t{\r\n\r\n\t\t\tinvoiceRecord.setFieldValue('entity', entity); \r\n\r\n\t\t\t// 1.0.4 if terms is blank do not populate\r\n\t\t\tif (terms != 0)\r\n\t\t\t{\r\n\t\t\t\tinvoiceRecord.setFieldValue('custbody_terms', terms);\r\n\t\t\t}\r\n\r\n\t\t\tpostPerdiodIntID = lookupPostingPeriod('accountingperiod',dateInvoice);\t\t// 1.0.6 lookup posting period\r\n\r\n\t\t\tif(postPerdiodIntID != 'not found')\r\n\t\t\t{\r\n\t\t\t\tinvoiceRecord.setFieldValue('postingperiod',postPerdiodIntID);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tnlapiLogExecution('AUDIT', 'Cannot lookup posting period for invoice date', dateInvoice);\r\n\t\t\t\tretVal = false;\r\n\t\t\t}\r\n\r\n\t\t\t// to do error condition \r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tauditTrail('FAILED', 'Cannot find customer: ' + jdeid);\r\n\t\t\tretVal = false;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\tcatch(e)\r\n\t{\r\n\t\terrorHandler(e);\r\n\t\tnlapiLogExecution('AUDIT', 'failure', 'failed to commit invoice line');\r\n\t\tauditTrail('FAILED', 'invoiceHeader ' + getErrorMessage(e));\r\n\t\tretVal=false;\r\n\r\n\t}\r\n\r\n\treturn retVal;\r\n\t\r\n}", "function showTopHeaders() {\n var headerRow = document.createElement('TR');\n headerRow.innerHTML = '<th>' + name + '</th>';\n \n var firstKey = Object.keys(primary)[0];\n if (primary[firstKey]) {\n for (var header in primary[firstKey]) {\n if (primary[firstKey].hasOwnProperty(header)) {\n var newHeader = document.createElement('TH');\n newHeader.innerHTML = header;\n headerRow.appendChild(newHeader);\n }\n }\n }\n this.dom.appendChild(headerRow);\n }", "function makeHeaderRow(){\n var trEl=document.createElement('tr');\n trEl.id='Header';\n newElement('th','Locations:',trEl);\n for(i=0;i<hours.length;i++){\n newElement('th',hours[i],trEl);\n }\n newElement('th','totals',trEl);\n profitTable.appendChild(trEl);\n}", "function generateHeader(doc) {\n doc\n .image(\"./public/assets/img/HOME-Bayside-Logo-NEW.png\", 50, 45, {\n width: 50\n })\n .fillColor(\"#444444\")\n .fontSize(20)\n .text(\"Soiled INC.\", 110, 57)\n .fontSize(10)\n .text(\"123 Main Street\", 200, 65, {\n align: \"right\"\n })\n .text(\"Caufield, VIC, 3163\", 200, 80, {\n align: \"right\"\n })\n .moveDown();\n }", "function makeHeader(headerArr){\n var trEl = createPageElement('tr');\n\n //create empty header\n createTableItem('', trEl, 'th');\n\n //create hour headers\n for(var index = 0; index < headerArr.length; index++){\n createTableItem(headerArr[index], trEl, 'th');\n }\n\n //create total header\n createTableItem('Daily Location Total', trEl, 'th');\n\n return trEl;\n}", "function addCustomHeader() {\n\n\n $('#loadingModal').modal('show');\n\n GetCustomers(function(myObject) {\n\n ////CREATE CUSTOM HEADER\n var customHeader = [\n\n\n { 'orginalColumnName': 'CustomerID', 'newColumnName': 'ID', 'Visible': false },\n { 'orginalColumnName': 'CompanyName', 'newColumnName': 'Company', 'Visible': true },\n { 'orginalColumnName': 'City', 'newColumnName': 'City', 'Visible': true },\n { 'orginalColumnName': 'Country', 'newColumnName': 'Country', 'Visible': true },\n\n\n ];\n\n j2HTML.Table({\n\n Data: myObject,\n AppendTo: '#divTable',\n DefaultHeader: false, //MUST BE FALSE\n CustomHeader: customHeader\n });\n\n setTableMenu('AddCustomHeaderExample');\n $('#loadingModal').modal('hide');\n\n\n });\n}", "function renderBookingTableHeader(showChannel, showStatus, showUnit, showAgent, showInv){\n\tvar htmlTHL = '<td style=\"text-align:left; height:26px; padding-left:6px; white-space: nowrap; background-color:#EEEEEE; border:1px solid #AAAAAA; font-size:14px; font-family:Arial Narrow; font-weight:bold; color:#000000;\">#FIELD#</td>'\n\tvar htmlTHC = '<td style=\"text-align:center; height:26px; white-space: nowrap; background-color:#EEEEEE; border:1px solid #AAAAAA; font-size:14px; font-family:Arial Narrow; font-weight:bold; color:#000000;\">#FIELD#</td>'\n\tvar htmlTHR = '<td style=\"text-align:right; height:26px; padding-right:6px; white-space: nowrap; background-color:#EEEEEE; border:1px solid #AAAAAA; font-size:14px; font-family:Arial Narrow; font-weight:bold; color:#000000;\">#FIELD#</td>'\n\tvar htmlCode = '';\n\thtmlCode += '<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"width:100%; background-color:#FFFFFF; border-spacing:0px; border-collapse:collapse; border:1px solid #AAAAAA; padding:8px 8px 8px 8px;\">'\n\thtmlCode += '<tr>'\n\tif (showChannel) {htmlCode += htmlTHC.replace('#FIELD#', 'Ch')};\n\tif (showStatus) {htmlCode += htmlTHC.replace('#FIELD#', 'Status')};\n\tif (showUnit) {htmlCode += htmlTHL.replace('#FIELD#', 'Unit')};\n\thtmlCode += htmlTHL.replace('#FIELD#', 'Book');\n\thtmlCode += htmlTHC.replace('#FIELD#', 'Checkin');\n\thtmlCode += htmlTHC.replace('#FIELD#', 'Checkout');\n\thtmlCode += htmlTHC.replace('#FIELD#', 'Nights');\n\thtmlCode += htmlTHL.replace('#FIELD#', 'Tenant');\n\tif (showAgent) {htmlCode += htmlTHL.replace('#FIELD#', 'Agent')};\n\thtmlCode += htmlTHR.replace('#FIELD#', 'Price');\n\thtmlCode += htmlTHR.replace('#FIELD#', 'Paid');\n\thtmlCode += htmlTHR.replace('#FIELD#', 'Missing');\n\tif (showInv) {\n\t\thtmlCode += htmlTHC.replace('#FIELD#', 'Inv');\n\t\thtmlCode += htmlTHC.replace('#FIELD#', 'Rec');\n\t}\n\thtmlCode += '</tr>'\n\treturn htmlCode;\n}", "function purchaseExcelReport(data_record_po) {\n\n}", "function makeHeaderRow() {\n var trEl = document.createElement('tr');\n\n var thEl = document.createElement('th');\n thEl.textContent = 'Store';\n trEl.appendChild(thEl);\n\n for (var i in hours) {\n thEl = document.createElement('th');\n thEl.textContent = hours[i];\n trEl.appendChild(thEl);\n }\n\n thEl = document.createElement('th');\n thEl.textContent = 'Daily Total';\n trEl.appendChild(thEl);\n\n storeTable.appendChild(trEl);\n}", "function getDataGridHeaderValues (primaryGrouping, secondaryGrouping) {\n var dataTableHVs = internalMappedNames.dataTableHeaderValues;\n var aggKeyToHV = aggKeyToHeaderMapping();\n\n var valuesToDisplayInDataGridHeaders = [\n\n // first column based on the name of the primary grouping used\n aggKeyToHV[primaryGrouping],\n\n // These can be manually added in since they're static\n dataTableHVs.total_calls,\n dataTableHVs.total_leads,\n dataTableHVs.percent_of_leads,\n dataTableHVs.avg_lead_quality,\n dataTableHVs.converted,\n dataTableHVs.conversion_percent,\n dataTableHVs.avg_duration,\n dataTableHVs.total_unique\n ];\n\n // We only need a secondary grouping column if one is selected, and if it is, add it to the\n // second column, and push the current second column to the right, into the third column's place\n if ($scope.hasSecondaryGrouping) {\n valuesToDisplayInDataGridHeaders.splice(1, 0, aggKeyToHV[secondaryGrouping]);\n }\n\n // array of string names of the header values that go at the top of the data grid\n return valuesToDisplayInDataGridHeaders;\n }", "function showHeader()\t{\r\n\t//\tClear the first row\r\n\tsheet.deleteRow(1);\r\n\r\n\t//\tAt first add the timestamp\r\n\tsheet.getRange(1,1).setValue('Timestamp');\r\n\r\n\t//\tLoop through all the variables and add the names of them\r\n\tfor (var i = 0; i < variables.length; i++) {\r\n\t\tsheet.getRange(1,2 + i).setValue(variables[i]);\r\n\t};\r\n\r\n\r\n\tcollectData();\r\n}", "function populateHeader(obj) {\n const myH1 = document.createElement(\"h1\");\n myH1.textContent = obj[\"squadName\"];\n header.appendChild(myH1);\n\n const myPara = document.createElement(\"p\");\n myPara.textContent =\n \"Hometown: \" + obj[\"homeTown\"] + \" // Formed: \" + obj[\"formed\"];\n header.appendChild(myPara);\n}", "function header() {\n return \"Shipping Label Maker\";\n}", "function viewSales() {\n\tvar joinQuery = \"SELECT department_id, departments.department_name, over_head_costs,\"\n\t\t+ \" SUM(product_sales) AS product_sales,\" \n\t\t+ \" SUM(product_sales) - over_head_costs AS total_profit \";\n\tjoinQuery += \"FROM departments INNER JOIN products \";\n\tjoinQuery += \"ON departments.department_name = products.department_name \";\n\tjoinQuery += \"GROUP BY department_id \";\n\n\tconnection.query(joinQuery, function(error, results) {\n\t\tif (error) throw error;\n\t\tconsoleTableProfit(\"\\nDepartmental Profit\", results);\n\t\twelcome();\n\t});\n}", "function createHeader (){\n\n // Create the header raw\n // create raw\n var headRow = document.createElement('tr');\n table.appendChild(headRow);\n //create tds\n var firstTd;\n for (var i = 0; i < tableHeads.length ; i++){\n firstTd = document.createElement('td');\n firstTd.textContent= tableHeads[i];\n headRow.appendChild(firstTd);\n }\n}", "populateHeader() {\n const { restaurantName, restaurantCuisine, restaurantHoursToday } = this.pageElements;\n const { name, cuisine_type: cuisine, operating_hours: operatingHours } = this.restaurant;\n const daysOfTheWeek = Object.keys(operatingHours);\n const todayNum = new Date().getDay();\n const currentDay = daysOfTheWeek[todayNum > 0 ? todayNum - 1 : todayNum];\n \n restaurantName.textContent = name;\n restaurantCuisine.textContent = cuisine;\n restaurantHoursToday.textContent = operatingHours[currentDay];\n }", "function financeHeaders() {\r\n document.querySelector(\"#financeTable\").innerHTML = \"\";\r\n const fTable = document.querySelector(\"#financeTable\");\r\n\r\n const financeHeaders = document.createElement(\"tr\");\r\n\r\n const fDate = document.createElement(\"th\");\r\n const fRevenue = document.createElement(\"th\");\r\n const fEarnings = document.createElement(\"th\");\r\n const fAssets = document.createElement(\"th\");\r\n const fLiability = document.createElement(\"th\");\r\n\r\n fDate.textContent = \"Date\";\r\n financeHeaders.appendChild(fDate);\r\n fRevenue.textContent = \"Revenue\";\r\n financeHeaders.appendChild(fRevenue);\r\n fEarnings.textContent = \"Earnings\";\r\n financeHeaders.appendChild(fEarnings);\r\n fAssets.textContent = \"Assets\";\r\n financeHeaders.appendChild(fAssets);\r\n fLiability.textContent = \"Liabilities\";\r\n financeHeaders.appendChild(fLiability);\r\n\r\n fTable.appendChild(financeHeaders);\r\n }", "function makeTableHeader(){\n var table = document.getElementById('store-table');\n var theTableHeader = document.createElement('tr');\n var tableStoreHeading = document.createElement('th');\n tableStoreHeading.textContent = 'Store';\n theTableHeader.appendChild(tableStoreHeading);\n\n for (var i = 0; i < operatingHours.length; i++){\n var tableHourHeadings = document.createElement('th');\n tableHourHeadings.textContent = operatingHours[i];\n theTableHeader.appendChild(tableHourHeadings);\n }\n var tableDailyTotalHeading = document.createElement('th');\n tableDailyTotalHeading.textContent = 'Daily Location Total';\n theTableHeader.appendChild(tableDailyTotalHeading);\n\n table.appendChild(theTableHeader);\n}", "function renderCookieStand() {\n tableDataDisplay.innerHTML = ''; //Clear the data table (tableDataDisplay)\n salesPerHour = []; //Clear the salesByHour array\n grandTotalSales = 0; //Clear the total sales across all locations\n renderTableHeader(); //reRender the header for the table\n for (var i = 0; i < cookieStands.length; i++) { //Loop through the businesses array to render the table\n cookieStands[i].renderTableBody(); //reRender the table body for the current business[i]\n }\n calcGrandTotal(); //Calculate the new sales totals\n renderTableFooter(); //reRender the footer for the table\n}", "function headerRenderFunction() {\n\n //create header row\n let headerRow = document.createElement('tr');\n table.appendChild(headerRow);\n\n //create header cells\n for (let i = 0; i < headerContent.length; i++) {\n\n let headerCell = document.createElement('th');\n headerRow.appendChild(headerCell);\n headerCell.textContent = headerContent[i];\n }\n}", "function list(items) {\r\n\t\t\t\tvar l, j, key, k, col;\r\n\t\t\t\tfor (key in items) { // iterate\r\n\t\t\t\t\tif (items.hasOwnProperty(key)) {\r\n\t\t\t\t\t// write amount of spaces according to level\r\n\t\t\t\t\t// and write name and newline\r\n\t\t\t\t\t\tif(typeof items[key] !== \"object\") {\r\n\t\t\t\t\t\t\t// If not a object build the header of the appropriate level\r\n\t\t\t\t\t\t\tif( key === 'level') {\r\n\t\t\t\t\t\t\t\tif(lastval[items.level] === undefined) {\r\n\t\t\t\t\t\t\t\t\tlastval[items.level] ='';\r\n\t\t\t\t\t\t\t\t\tif(items.level>0 && items.text !== '_r_Totals') {\r\n\t\t\t\t\t\t\t\t\t\theaders[items.level-1] = {\r\n\t\t\t\t\t\t\t\t\t\t\tuseColSpanStyle: false,\r\n\t\t\t\t\t\t\t\t\t\t\tgroupHeaders: []\r\n\t\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(lastval[items.level] !== items.text && items.children.length && items.text !== '_r_Totals') {\r\n\t\t\t\t\t\t\t\t\tif(items.level>0) {\r\n\t\t\t\t\t\t\t\t\t\theaders[items.level-1].groupHeaders.push({\r\n\t\t\t\t\t\t\t\t\t\t\ttitleText: items.text\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\tvar collen = headers[items.level-1].groupHeaders.length,\r\n\t\t\t\t\t\t\t\t\t\tcolpos = collen === 1 ? swaplen : initColLen+(collen-1)*aggrlen;\r\n\t\t\t\t\t\t\t\t\t\theaders[items.level-1].groupHeaders[collen-1].startColumnName = columns[colpos].name;\r\n\t\t\t\t\t\t\t\t\t\theaders[items.level-1].groupHeaders[collen-1].numberOfColumns = columns.length - colpos;\r\n\t\t\t\t\t\t\t\t\t\tinitColLen = columns.length;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tlastval[items.level] = items.text;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// This is in case when the member contain more than one summary item\r\n\t\t\t\t\t\t\tif(items.level === ylen && key==='level' && ylen >0) {\r\n\t\t\t\t\t\t\t\tif( aggrlen > 1){\r\n\t\t\t\t\t\t\t\t\tvar ll=1;\r\n\t\t\t\t\t\t\t\t\tfor( l in items.fields) {\r\n\t\t\t\t\t\t\t\t\t\tif(ll===1) {\r\n\t\t\t\t\t\t\t\t\t\t\theaders[ylen-1].groupHeaders.push({startColumnName: l, numberOfColumns: 1, titleText: items.text});\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tll++;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\theaders[ylen-1].groupHeaders[headers[ylen-1].groupHeaders.length-1].numberOfColumns = ll-1;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\theaders.splice(ylen-1,1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// if object, call recursively\r\n\t\t\t\t\t\tif (items[key] != null && typeof items[key] === \"object\") {\r\n\t\t\t\t\t\t\tlist(items[key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Finally build the coulumns\r\n\t\t\t\t\t\tif( key === 'level') {\r\n\t\t\t\t\t\t\tif(items.level >0){\r\n\t\t\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\t\t\tfor(l in items.fields) {\r\n\t\t\t\t\t\t\t\t\tcol = {};\r\n\t\t\t\t\t\t\t\t\tfor(k in o.aggregates[j]) {\r\n\t\t\t\t\t\t\t\t\t\tif(o.aggregates[j].hasOwnProperty(k)) {\r\n\t\t\t\t\t\t\t\t\t\t\tswitch( k ) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tcase 'member':\r\n\t\t\t\t\t\t\t\t\t\t\t\tcase 'label':\r\n\t\t\t\t\t\t\t\t\t\t\t\tcase 'aggregator':\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tcol[k] = o.aggregates[j][k];\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(aggrlen>1) {\r\n\t\t\t\t\t\t\t\t\t\tcol.name = l;\r\n\t\t\t\t\t\t\t\t\t\tcol.label = o.aggregates[j].label || l;\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tcol.name = items.text;\r\n\t\t\t\t\t\t\t\t\t\tcol.label = items.text==='_r_Totals' ? o.rowTotalsText : items.text;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcolumns.push (col);\r\n\t\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "function createHeader() {\n var table = gAppState.checkId(\"dbmsTableID\", \"fsTableID\");\n\n var header = table.createTHead(); // creates empty tHead\n var row = header.insertRow(0); // inserts row into tHead\n\n var cell0 = row.insertCell(0); // inserts new cell at position 0 in the row\n var cell1 = row.insertCell(1); // inserts new cell at position 1 in the row\n var cell2 = row.insertCell(2); // inserts new cell at position 2 in the row\n\n cell0.innerHTML = \"<b>Subject</b>\"; // adds bold text\n cell1.innerHTML = \"<b>Predicate</b>\";\n cell2.innerHTML = \"<b>Object</b>\";\n}" ]
[ "0.65623784", "0.633425", "0.63253224", "0.6310888", "0.6145618", "0.6137754", "0.59976786", "0.5890791", "0.5888834", "0.5834854", "0.58341676", "0.58234566", "0.5807537", "0.5787972", "0.5787904", "0.578185", "0.57749116", "0.57097954", "0.5703845", "0.5687598", "0.56778944", "0.56199586", "0.56193656", "0.5616197", "0.5586564", "0.5586564", "0.5586564", "0.5585509", "0.55770725", "0.55770725", "0.55770725", "0.55770725", "0.55770725", "0.55770725", "0.55770725", "0.55770725", "0.55770725", "0.55770725", "0.55770725", "0.55770725", "0.55770725", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55567497", "0.55564135", "0.55564135", "0.55564135", "0.55564135", "0.55564135", "0.55564135", "0.55564135", "0.55564135", "0.55564135", "0.55390364", "0.5534388", "0.5526762", "0.5520333", "0.5499325", "0.54932207", "0.5483379", "0.54790264", "0.5464806", "0.54632926", "0.5450182", "0.5444907", "0.541875", "0.5415992", "0.54117465", "0.5402643", "0.53898233", "0.5382588", "0.5365468", "0.5359533", "0.5354004", "0.535251", "0.5345143", "0.5328481", "0.5315571", "0.53090864", "0.530825", "0.52962726", "0.52886677", "0.528154", "0.52804637", "0.5279932", "0.5277606", "0.5274361", "0.52736205", "0.5271912" ]
0.0
-1
StockistWise UnderOver Stock SS
function fnStockistWiseUnderOverStock() { var startMonth = fngetMonthNumber($('#txtFromDate').val().split('-')[0]); var endMonth = fngetMonthNumber($('#txtToDate').val().split('-')[0]); var startYear = $('#txtFromDate').val().split('-')[1]; var endYear = $('#txtToDate').val().split('-')[1]; if ($("#txtFromDate").val() == "") { fnMsgAlert('info', 'Stockist Wise Under Over Stock', 'Please enter Start month.'); HideModalPopup("dvloading"); return false; } if ($("#txtToDate").val() == "") { fnMsgAlert('info', 'Stockist Wise Under Over Stock', 'Please enter End month.'); HideModalPopup("dvloading"); return false; } var days = daysInMonth(endMonth, endYear); var startDate = "", endDate = ""; if (parseInt(startMonth) >= 10) { startDate = startYear + "-" + startMonth + "-01"; } else { startDate = startYear + "-0" + startMonth + "-01"; } endDate = endYear + "-" + endMonth + "-" + days; var dt1 = new Date(startYear + "/" + startMonth + "/01"); var dt2 = new Date(endYear + "/" + endMonth + "/" + days); if (dt1 > dt2) { fnMsgAlert('info', 'Stockist Wise Under Over Stock', 'Start Month&Year should be less than End Month&Year.'); HideModalPopup("dvloading"); return false; } if ($("#ddlProductName").val() == "0") { fnMsgAlert('info', 'Stockist Wise Under Over Stock', 'Select product.'); HideModalPopup("dvloading"); return false; } var diffMonth = monthDiff(startMonth + "/01/" + startYear, endMonth + "/" + days + "/" + endYear); ShowModalPopup("dvloading"); $.ajax({ type: 'POST', url: '../HiDoctor_Reports/Reports/GetStockistWiseUnderOverStock', data: 'regionCode=' + $('#hdnRegionCode').val() + '&sd=' + startDate + '&ed=' + endDate + '&ProductCode=' + $("#ddlProductName").val(), success: function (response) { jsData = eval('(' + response + ')'); var tableContent = ""; var sales = 0, close = 0, reionTotal = 0, totalsummary = 0; var salesEndMonth = 0, closingEndMonth = 0, noOfDaysStock = 0; var totalSalesEndMonth = 0, totalClosingEndMonth = 0, TotalNoOfDaysStock = 0; var endMonthSales = 0, EndMonthClosing = 0, monthSales = 0; var regionAvg = 0.0, totalAvg = 0.0, avg = 0.0; var isRegionNameBind = true; if (jsData.Tables[0].Rows.length > 0) { tableContent = ""; tableContent += "<table cellspacing='0' cellpadding='0' width='100%' id='tblSalesAndActivity' class='data display datatable' >"; tableContent += "<thead>"; tableContent += "<tr style='display: none;' id='tblTr'>"; tableContent += "<th style='display:none;width: 15%'>User Name</th>"; tableContent += "<th style='display:none;width: 15%'>Employee Name</th>"; tableContent += "<th style='display:none;width: 15%'>Division Name</th>"; tableContent += "<th style='display:none;width: 15%'>Date of Joining</th>"; tableContent += "<th style='display:none;width: 15%'>Manager Name</th>"; tableContent += "<th style='display:none;width: 15%'>Manager Territory name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Territory Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Stockist Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Average Monthly Secondary Sales Units</th>"; tableContent += "<th style='text-align:left;width: 15%'>% To Total Units</th>"; tableContent += "<th style='text-align:left;width: 15%'>Secondary Sales Units for the month - (End Month)</th>"; tableContent += "<th style='text-align:left;width: 15%'>Closing Units for the month - (End Month)</th>"; tableContent += "<th style='text-align:left;width: 15%'>No of Days Stock</th>"; tableContent += "</tr>"; tableContent += "<tr>"; tableContent += "<th style='display:none;width: 15%'>User Name</th>"; tableContent += "<th style='display:none;width: 15%'>Employee Name</th>"; tableContent += "<th style='display:none;width: 15%'>Division Name</th>"; tableContent += "<th style='display:none;width: 15%'>Date of Joining</th>"; tableContent += "<th style='display:none;width: 15%'>Manager Name</th>"; tableContent += "<th style='display:none;width: 15%'>Manager Territory name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Territory Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Stockist Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Average Monthly Secondary Sales Units</th>"; tableContent += "<th style='text-align:left;width: 15%'>% To Total Units</th>"; tableContent += "<th style='text-align:left;width: 15%'>Secondary Sales Units for the month - (End Month)</th>"; tableContent += "<th style='text-align:left;width: 15%'>Closing Units for the month - (End Month)</th>"; tableContent += "<th style='text-align:left;width: 15%'>No of Days Stock</th>"; tableContent += "</tr>"; tableContent += "<tr >"; tableContent += "<th colspan= '13' style='text-align:left' width='15%' ><span id='spnDivToggle' style='text-decoration: underline; cursor: pointer; padding: 5px' onclick='fnToggleTreea()'>Show Filter</span></th>"; tableContent += "</tr>"; var type = '[{ type: "text" }, { type: "text" }, { type: "text" },{ type: "text" }, { type: "text" }, { type: "text" }'; type += ',{ type: "text" }, { type: "text" },{ type: "number-range" }'; type += ', { type: "number-range" }, { type: "number-range" }, { type: "number-range" }, { type: "number-range" }]'; tableContent += "</thead><tbody>"; // Summary Value for (var i = 0; i < jsData.Tables[2].Rows.length; i++) { var dJsonDataH = jsonPath(jsData, "$.Tables[0].Rows[?(@.Region_Code=='" + jsData.Tables[2].Rows[i].Region_Code + "')]"); if (dJsonDataH != false) { for (var j = 0; j < dJsonDataH.length; j++) { var dJsonData = jsonPath(jsData, "$.Tables[1].Rows[?(@.Region_Code=='" + jsData.Tables[2].Rows[i].Region_Code + "' & @.Base_Code=='" + dJsonDataH[j].Customer_Code + "')]"); if (dJsonData != false) { for (var k = 0; k < dJsonData.length; k++) { totalsummary = totalsummary + parseInt(dJsonData[k].Sales); } } } } } if (jsData.Tables[2].Rows.length > 0) { for (var i = 0; i < jsData.Tables[2].Rows.length; i++) { var dJsonDataH = jsonPath(jsData, "$.Tables[0].Rows[?(@.Region_Code=='" + jsData.Tables[2].Rows[i].Region_Code + "')]"); if (dJsonDataH != false) { reionTotal = 0; monthSales = 0; isRegionNameBind = true; for (var j = 0; j < dJsonDataH.length; j++) { var dJsonData = jsonPath(jsData, "$.Tables[1].Rows[?(@.Region_Code=='" + jsData.Tables[2].Rows[i].Region_Code + "' & @.Base_Code=='" + dJsonDataH[j].Customer_Code + "')]"); if (dJsonData != false) { for (var k = 0; k < dJsonData.length; k++) { reionTotal += parseInt(dJsonData[k].Sales); } } } for (var j = 0; j < dJsonDataH.length; j++) { sales = 0, close = 0; tableContent += "<tr>"; if (isRegionNameBind) { var dJsonDataDiv = jsonPath(jsData, "$.Tables[3].Rows[?(@.Region_Code=='" + jsData.Tables[2].Rows[i].Region_Code + "')]"); divisionName = ""; if (dJsonDataDiv != false) { for (var index = 0; index < dJsonDataDiv.length; index++) { divisionName += dJsonDataDiv[index].Division_Name + ","; } if (divisionName != "") { divisionName = divisionName.substring(0, divisionName.length - 1); } } tableContent += "<td style='display:none'>" + jsData.Tables[2].Rows[i].User_Name + "</td>"; tableContent += "<td style='display:none'>" + jsData.Tables[2].Rows[i].Employee_Name + "</td>"; tableContent += "<td style='display:none'>" + divisionName + "</td>"; tableContent += "<td style='display:none'>" + jsData.Tables[2].Rows[i].DOJ + "</td>"; tableContent += "<td style='display:none'>" + jsData.Tables[2].Rows[i].Manager_Name + "</td>"; tableContent += "<td style='display:none'>" + jsData.Tables[2].Rows[i].Manager_Region_Name + "</td>"; tableContent += "<td align='left' onclick='fnSecondarySalesDetails(\"" + jsData.Tables[2].Rows[i].Region_Code + "_" + jsData.Tables[2].Rows[i].User_Code + "_" + startMonth + "_" + endMonth + "_" + startYear + "_" + endYear + "_" + $("#ddlProductName").val() + "\")' style='text-decoration:underline;cursor:pointer'>" + jsData.Tables[2].Rows[i].Region_Name + "</td>"; } else { tableContent += "<td style='display:none'>" + jsData.Tables[2].Rows[i].User_Name + "</td>"; tableContent += "<td style='display:none'>" + jsData.Tables[2].Rows[i].Employee_Name + "</td>"; tableContent += "<td style='display:none'>" + divisionName + "</td>"; tableContent += "<td style='display:none'>" + jsData.Tables[2].Rows[i].DOJ + "</td>"; tableContent += "<td style='display:none'>" + jsData.Tables[2].Rows[i].Manager_Name + "</td>"; tableContent += "<td style='display:none'>" + jsData.Tables[2].Rows[i].Manager_Region_Name + "</td>"; tableContent += "<td style='text-align:left'></td>"; } tableContent += "<td align='left' >" + dJsonDataH[j].Customer_Name + "</td>"; isRegionNameBind = false; var dJsonData = jsonPath(jsData, "$.Tables[1].Rows[?(@.Region_Code=='" + jsData.Tables[2].Rows[i].Region_Code + "' & @.Base_Code=='" + dJsonDataH[j].Customer_Code + "')]"); if (dJsonData != false) { for (var k = 0; k < dJsonData.length; k++) { sales += parseInt(dJsonData[k].Sales); //monthSales += parseInt(dJsonData[k].Sales); close += parseInt(dJsonData[k].Closing_Stock); } } endMonthSales = 0; EndMonthClosing = 0; var dJson = jsonPath(jsData, "$.Tables[1].Rows[?(@.Month=='" + endMonth + "' & @.Year=='" + endYear + "' & @.Base_Code=='" + dJsonDataH[j].Customer_Code + "' & @.Region_Code=='" + jsData.Tables[2].Rows[i].Region_Code + "')]"); if (dJson != false) { for (var k = 0; k < dJson.length; k++) { endMonthSales += parseInt(dJson[k].Sales); EndMonthClosing += parseInt(dJson[k].Closing_Stock); } } avg = 0.0; if (sales > 0) { avg = (sales / diffMonth); tableContent += "<td style='text-align:center'>" + Math.round(avg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center'>0</td>"; } if (avg > 0) { regionAvg = (parseFloat(reionTotal) / parseFloat(diffMonth)); avg = (avg / regionAvg) * 100; tableContent += "<td style='text-align:center'>" + Math.round(avg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center'>0</td>"; } salesEndMonth += endMonthSales; closingEndMonth += EndMonthClosing; tableContent += "<td style='text-align:center'>" + endMonthSales + "</td>"; tableContent += "<td style='text-align:center'>" + EndMonthClosing + "</td>"; if (endMonthSales > 0) { avg = ((EndMonthClosing * 30) / endMonthSales); tableContent += "<td style='text-align:center'>" + Math.round(avg * 100) / 100 + "</td></tr>"; } else { tableContent += "<td style='text-align:center'>0</td>"; } tableContent += "</tr>" } tableContent += "<tr>" tableContent += "<td style='display:none'></td>"; tableContent += "<td style='display:none'></td>"; tableContent += "<td style='display:none'></td>"; tableContent += "<td style='display:none'></td>"; tableContent += "<td style='display:none'></td>"; tableContent += "<td style='display:none'></td>"; tableContent += "<td style='text-align:center;background-color:#C0C0C0;' ></td>"; tableContent += "<td style='text-align:center;background-color:#C0C0C0;' >" + jsData.Tables[2].Rows[i].Region_Name + " - Total</td>"; var totalAvg = 0; if (totalsummary > 0) { totalAvg = (reionTotal / diffMonth) tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>" + Math.round(totalAvg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>0</td>"; } if (totalAvg > 0) { regionAvg = (parseFloat(totalsummary) / parseFloat(diffMonth)); var avg = (totalAvg / regionAvg) * 100; tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>" + Math.round(avg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>0</td>"; } tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>" + salesEndMonth + "</td>"; tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>" + closingEndMonth + "</td>"; totalClosingEndMonth += closingEndMonth; totalSalesEndMonth += salesEndMonth; if (salesEndMonth > 0) { var avg = ((closingEndMonth * 30) / salesEndMonth); tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>" + Math.round(avg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>0</td>"; } tableContent += "</tr>"; salesEndMonth = 0; closingEndMonth = 0; } } tableContent += "<tr>" tableContent += "<th style='display:none' ></th>"; tableContent += "<th style='display:none'></th>"; tableContent += "<th style='display:none'></th>"; tableContent += "<th style='display:none'></th>"; tableContent += "<th style='display:none'></th>"; tableContent += "<th style='display:none'></th>"; tableContent += "<th style='text-align:right'></th>"; tableContent += "<th style='text-align:right'>Total :</th>"; if (totalsummary > 0) { var avg = (totalsummary / diffMonth); tableContent += "<th style='text-align:center'>" + Math.round(avg * 100) / 100 + "</th>"; } else { tableContent += "<th style='text-align:center'>0</th>"; } tableContent += "<th style='text-align:center'></th>"; tableContent += "<th style='text-align:center'>" + totalSalesEndMonth + "</th>"; tableContent += "<th style='text-align:center'>" + totalClosingEndMonth + "</th>"; if (totalSalesEndMonth > 0) { var avg = ((totalClosingEndMonth * 30) / totalSalesEndMonth); tableContent += "<th style='text-align:center'>" + Math.round(avg * 100) / 100 + "</th>"; } else { tableContent += "<th style='text-align:center'>0</th>"; } tableContent += "</tr>"; } tableContent += "</tbody>"; tableContent += "</table>"; } $("#divReport").html(tableContent); $("#divPrint").html(tableContent); var jsonType = eval(type); if ($.fn.dataTable) { $('#tblSalesAndActivity').dataTable({ "sPaginationType": "full_numbers", "bSort": false, "bDestroy": true, "sDom": 'T<"clear">lfrtip', "oTableTools": { "sSwfPath": "/Content/ZeroClipboard.swf" } }).columnFilter({ sPlaceHolder: "head:after", aoColumns: jsonType }); }; if (tableContent != "") { $("#divInput").slideUp(); $("#spnInputToggle").html("Show Input"); } fninializePrint("divPrint", "ifrmPrint", "divReport"); HideModalPopup("dvloading"); }, error: function () { fnMsgAlert('info', 'Stockist Wise Under Over Stock', 'Error.'); HideModalPopup("dvloading"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateStock() {\n\t\t\t\t\t\tupdatedStock = selectedProductDetails.stock_quantity - answer.quantity;\n\t\t\t\t\t}", "valueOfStock()\n {\n return this.numberofshare*this.shareprice\n }", "stockValue()\n {\n return this.numOfShares*this.sharePrice;\n }", "'SELL_STOCK' (state, {shrimpId, quantity, shrimpPrice}) {\n \n // Checks to see which items are already in the array\n const record = state.shrimpInventoryData.find(element => element.id == shrimpId);\n \n // Detracts from quantity\n if (record.quantity > quantity) {\n \n record.quantity -= quantity;\n \n }\n \n // Removes the item from the array if amount sold is the amount available\n else {\n \n state.shrimpInventoryData.splice(state.shrimpInventoryData.indexOf(record), 1);\n \n }\n \n // Updates funds when items are sold\n state.funds += shrimpPrice * quantity;\n \n }", "getStockState(in_stock){\n if(in_stock === 0) {\n return \"Out of Stock\";\n }\n else {\n return \"In Stock\";\n }\n }", "function calculateWashLoss(position, stockDetails, allGlobalStocksObjects) {\n const currentClosedDate = stockDetails[\"Closed Date\"];\n const previousStockOpenDate =\n position - 1 >= 0 && !allGlobalStocksObjects[position - 1][\"Closed Date\"]\n ? allGlobalStocksObjects[position - 1][\"Open Date\"]\n : undefined;\n const nextStockOpenDate =\n position + 1 < allGlobalStocksObjects.length &&\n !allGlobalStocksObjects[position + 1][\"Closed Date\"]\n ? allGlobalStocksObjects[position + 1][\"Open Date\"]\n : undefined;\n\n if (previousStockOpenDate || nextStockOpenDate) {\n addWashLoss(\n previousStockOpenDate,\n nextStockOpenDate,\n currentClosedDate,\n stockDetails\n );\n }\n}", "function isLowOnStock(stock) {\n const lowOnStock = document.querySelector(\".low_stock\");\n lowOnStock.innerHTML = \"\";\n\n stock.forEach((beer) => {\n if (beer.amount < 2) {\n const beerElement = document.createElement(\"p\");\n beerElement.textContent = beer.name + \" is low on stock.\";\n beerElement.classList.add(\"warning\");\n document.querySelector(\".low_stock\").appendChild(beerElement);\n }\n });\n}", "function onStockRemove(stock) {\n //updatedStocks = stocks;\n\n sessionStorage.removeItem(stock.symbol);\n\n var newInvestment =\n parseFloat(totalInvestment) - parseFloat(stock.investment);\n setTotalInvestment(newInvestment);\n\n console.log(stock);\n var updatedStocks = stocks.filter(function (s, index, arr) {\n return s.symbol !== stock.symbol;\n });\n\n console.log(updatedStocks);\n setStocks(updatedStocks);\n }", "function profitLossCalculator(data) {\n const result = [];\n\n for (const stock of data) {\n\n // If sector exists\n if (result.some(e => e.name === stock['sector'])) {\n for (let obj of result) {\n\n if (obj['name'] === stock['sector']) {\n obj['worthNew'] = obj['worthNew'] + stock['current_price'] * stock['n_holding']\n obj['worthOld'] = obj['worthOld'] + stock['buy_price'] * stock['n_holding']\n }\n }\n } else result.push({ \"name\": stock['sector'], \"worthNew\": stock['current_price'] * stock['n_holding'], 'worthOld': stock['buy_price'] * stock['n_holding'] })\n }\n\n for (let i = 0; i < result.length; i++) {\n result[i]['value'] = ((result[i]['worthNew'] - result[i]['worthOld']) / result[i]['worthOld']) * 100\n result[i]['current_total'] = result[i]['value']\n result[i]['ticker'] = result[i]['name']\n }\n const finalResult = result;\n\n console.log(\"Profit/Loss\", finalResult);\n setPortfolioStatistics_profitLoss(finalResult);\n }", "stockRelevant(stockSymbol) {\n return this.request(`/stock/${stockSymbol}/relevant`);\n }", "function calculateGainAndLoss(stockDetails) {\n const name = getNameOfStock(stockDetails.description);\n const longTermAmount = parseCurrency(stockDetails[\"LT L/G\"]);\n const shortTermAmount = parseCurrency(stockDetails[\"ST L/G\"]);\n if (longTermAmount > 0) {\n uniqueGlobalStocks[name].longTermGain += longTermAmount;\n } else {\n uniqueGlobalStocks[name].longTermLoss += longTermAmount;\n }\n\n if (shortTermAmount > 0) {\n uniqueGlobalStocks[name].shortTermGain += shortTermAmount;\n } else {\n uniqueGlobalStocks[name].shortTermLoss += shortTermAmount;\n }\n}", "function stockCalculation(data) {\r\n const table = document.querySelector('#stockCalc');\r\n\r\n //clear table\r\n table.innerHTML = \"\";\r\n\r\n //creating table rows \r\n const average = table.insertRow(0);\r\n const minimum = table.insertRow(1);\r\n const maximum = table.insertRow(2);\r\n\r\n //create table cells for row 1\r\n let avg = average.insertCell(0);\r\n let avg_open = average.insertCell(1);\r\n let avg_close = average.insertCell(2);\r\n let avg_low = average.insertCell(3);\r\n let avg_high = average.insertCell(4);\r\n let avg_vol = average.insertCell(5);\r\n\r\n //create table cells for row 2\r\n let min = minimum.insertCell(0);\r\n let min_open = minimum.insertCell(1);\r\n let min_close = minimum.insertCell(2);\r\n let min_low = minimum.insertCell(3);\r\n let min_high = minimum.insertCell(4);\r\n let min_vol = minimum.insertCell(5);\r\n\r\n //create table cells for row 3\r\n let max = maximum.insertCell(0);\r\n let max_open = maximum.insertCell(1);\r\n let max_close = maximum.insertCell(2);\r\n let max_low = maximum.insertCell(3);\r\n let max_high = maximum.insertCell(4);\r\n let max_vol = maximum.insertCell(5);\r\n\r\n //assign content to cells\r\n avg.textContent = \"Average\";\r\n min.textContent = \"Min\";\r\n max.textContent = \"Max\";\r\n\r\n //sort through open, close, high, low and volume and return list of sorted numbers\r\n //then assign min and max to cells\r\n\r\n const sortedOpen = data.sort((a, b) => {\r\n return a.open < b.open ? -1 : 1;\r\n });\r\n\r\n const minOpen = parseFloat(sortedOpen[0].open);\r\n const maxOpen = parseFloat(sortedOpen[sortedOpen.length - 1].open);\r\n min_open.textContent = minOpen.toFixed(4);\r\n max_open.textContent = maxOpen.toFixed(4);\r\n\r\n\r\n const sortedClose = data.sort((a, b) => {\r\n return a.close < b.close ? -1 : 1;\r\n });\r\n\r\n const minClose = parseFloat(sortedClose[0].close);\r\n const maxClose = parseFloat(sortedClose[sortedClose.length - 1].close);\r\n min_close.textContent = minClose.toFixed(4);\r\n max_close.textContent = maxClose.toFixed(4);\r\n\r\n\r\n const sortedLow = data.sort((a, b) => {\r\n return a.low < b.low ? -1 : 1;\r\n });\r\n\r\n const minLow = parseFloat(sortedLow[0].low);\r\n const maxLow = parseFloat(sortedLow[sortedLow.length - 1].low);\r\n min_low.textContent = minLow.toFixed(4);\r\n max_low.textContent = maxLow.toFixed(4);\r\n\r\n\r\n const sortedHigh = data.sort((a, b) => {\r\n return a.high < b.high ? -1 : 1;\r\n });\r\n\r\n const minHigh = parseFloat(sortedHigh[0].high);\r\n const maxHigh = parseFloat(sortedHigh[sortedHigh.length - 1].high);\r\n min_high.textContent = minHigh.toFixed(4);\r\n max_high.textContent = maxHigh.toFixed(4);\r\n\r\n\r\n const sortedVolume = data.sort((a, b) => {\r\n return a.volume < b.volume ? -1 : 1;\r\n });\r\n\r\n\r\n const minVol = sortedVolume[0].volume;\r\n const maxVol = sortedVolume[sortedVolume.length - 1].volume;\r\n min_vol.textContent = numberCommas(minVol);\r\n max_vol.textContent = numberCommas(maxVol);\r\n\r\n //calculate avg and populate cells\r\n let total = 0;\r\n for (let i = 0; i < data.length; i++) {\r\n total += parseFloat(data[i].open);\r\n }\r\n\r\n let avgOpen = (total / data.length).toFixed(4);\r\n avg_open.textContent = avgOpen;\r\n\r\n total = 0;\r\n for (let i = 0; i < data.length; i++) {\r\n total += parseFloat(data[i].close);\r\n }\r\n\r\n const avgClose = (total / data.length).toFixed(4);\r\n avg_close.textContent = avgClose;\r\n\r\n total = 0;\r\n for (let i = 0; i < data.length; i++) {\r\n total += parseFloat(data[i].low);\r\n }\r\n\r\n const avgLow = (total / data.length).toFixed(4);\r\n avg_low.textContent = avgLow;\r\n\r\n total = 0;\r\n for (let i = 0; i < data.length; i++) {\r\n total += parseFloat(data[i].high);\r\n }\r\n\r\n const avgHigh = (total / data.length).toFixed(4);\r\n avg_high.textContent = avgHigh;\r\n\r\n total = 0;\r\n for (let i = 0; i < data.length; i++) {\r\n total += parseFloat(data[i].volume);\r\n }\r\n\r\n const avgVol = (total / data.length).toFixed(4);\r\n avg_vol.textContent = avgVol;\r\n\r\n //pass data into B chart\r\n displayChartB(minOpen, maxOpen, avgOpen,\r\n minClose, maxClose, avgClose,\r\n minLow, maxLow, avgLow,\r\n minHigh, maxHigh, avgHigh);\r\n\r\n }", "isDividendStock() {\n return false;\n }", "totalStockValue()\n {\n return this.shares*this.price;\n }", "function Stock (stockID,stockName,quantity,price,upperTargetPrice,lowerTargetPrice) {\n\tthis.stockID=stockID;\n\tthis.stockName = stockName;\n\t// Implementing quantity, purchaseDate and purchasePrice as corresponding \n\t// arrays - purchase is +quantity, sell is -quantity...\n\tthis.quantity=[quantity];\n\tthis.purchaseDate = [new Date().getTime()]; // epoch time in ms\n\tthis.purchasePrice=[price]; // list of purchase prices corresponding to dates\n\tthis.currentPrice=price;\n this.upperTargetPrice=upperTargetPrice; //Used for watchlist.. i.e watch/alert when it reaches/ goes above or below target price\n this.lowerTargetPrice=lowerTargetPrice; true; // true for greater than target price, false for below target price...\n\t\n\t// I have decided to put these metrics into the object\n\t// perhaps saves a bit of redundancy...??\n\tthis.peRatio=0;\n\tthis.pegRatio=0;\n\tthis.marketCapitalisation = 0;\n\tthis.previousClose=0;\n\tthis.earningShare=0;\n\tthis.currentBid=0;\n\tthis.absChange=0;\n\tthis.percentChange=0;\n\t\n\t//var historicalData=null; // private variable...\n\t// historical data remains undefined until it is pulled for that stock\n\t// at which point it remains until the application closes....\n\tattachStockMethods(this);\n}", "function getStocks(stock) {\n\tconst apiURL = 'https://api.iextrading.com/1.0/stock/';\n\tconst params = '/batch?types=quote,news,chart&range=1m&last=1';\n\tconst queryURL = apiURL + stock + params;\n\t// return API data...\n return fetch(queryURL, {\n headers: new Headers({\n Accept: 'application/json'\n })\n })\n .then(res => res.json());\n}", "function reduceStocks(stocks){\n\n var storage = {};\n var finalArray = [];\n\n stocks.forEach(function(stock){\n if (!storage[stock.symbol]){\n storage[stock.symbol] = [];\n }\n storage[stock.symbol].push(stock);\n });\n\n for (var key in storage){\n if (storage[key].length > 1){\n var totalShares = _.pluck(storage[key], 'shares').reduce(function(prev, curr, currIndex){\n return prev + curr;\n });\n var avgPrice = _.pluck(storage[key], 'price').reduce(function(prev, curr, currIndex){\n return prev + curr;\n });\n\n /// Sending a copy of the summary stock (with net values)\n var netStock = {\n company: storage[key][0].company,\n symbol: storage[key][0].symbol,\n marketPrice: storage[key][0].marketPrice,\n shares: totalShares,\n return: storage[key][0].return,\n buysell: storage[key][0].buysell,\n percentage: storage[key][0].percentage,\n price: avgPrice / storage[key].length\n }\n finalArray.push(netStock);\n } else {\n\n // Sending a copy of the summary stock (with net values)\n var netStock = {\n company: storage[key][0].company,\n symbol: storage[key][0].symbol,\n marketPrice: storage[key][0].marketPrice,\n shares: storage[key][0].shares,\n return: storage[key][0].return,\n buysell: storage[key][0].buysell,\n percentage: storage[key][0].percentage,\n price: storage[key][0].price\n }\n finalArray.push(netStock);\n }\n }\n return finalArray;\n}", "function addWashLoss(start, end, current, stockDetails) {\n const name = getNameOfStock(stockDetails.description);\n if (numberOfDays(start, current) <= 30 || numberOfDays(end, current) <= 30) {\n uniqueGlobalStocks[name].washLoss += parseCurrency(stockDetails[\"ST L/G\"]);\n }\n}", "function reviseStock() {\n var table = getCurrentTable();\n if (table === \"error\") return;\n var dic = table.item_id;\n Object.entries(dic).forEach(([key, value]) => {\n changeStock(key, -value);\n })\n}", "getFoodStock(){\r\n\r\n }", "function getStockValue(){\n return 100\n}", "function viewLowInventory(){\n\tvar lowstock = 0;\n\tvar query = \"SELECT * FROM products\";\n connection.query(query, function(err, res) {\n \tfor (var i = 0; i < res.length; i++) {\n \t\tif(res[i].stock_quantity < 5){\n \t\t\tconsole.log('\\nThere are only ' + res[i].stock_quantity + ' ' + res[i].product_name + ' left in stock\\n');\n \t\t\tlowstock++\n \t\t} \t\n \t}\n \tif(lowstock === 0){\n \t\tconsole.log('\\n----------------------------------'); \n \t\tconsole.log('All products are well stocked Bossman'); \n \t\tconsole.log('----------------------------------'); \n \t}\n \tdisplayOptions();\n });\t\n}", "stockEarnings(stockSymbol) {\n return this.request(`/stock/${stockSymbol}/earnings`);\n }", "function outOfStock() {\n var oOS = false;\n var table = getCurrentTable();\n if (table === \"error\") return;\n var dic = table.item_id;\n Object.entries(dic).forEach(([key, value]) => {\n var stock = parseInt(getStockFromId(key));\n if (stock < value) {\n oOS = true;\n $('#order').prepend('<span style=\"color:red\">' + get_string('outOfStock') + getNameFromId(key) + ' </span></br>');\n console.log(\"Not enough in stock for: \" + getNameFromId(key));\n }\n })\n return oOS;\n}", "function getStockData(num){\n var stkdata = [];\n for(i=2;i<num;i++){\n var stckName = document.querySelector(\"body > div.js-rootresizer__contents > div.layout__area--right > div > div.widgetbar-pages > div.widgetbar-pagescontent > div.widgetbar-page.active > div.widget-1quyc-Kt.widgetbar-widget.widgetbar-widget-watchlist > div.widgetbar-widgetbody > div > div.scrollable-2mu5oKC8 > div > div.listContainer-3U2Wf-wc > div > div:nth-child(\"+i+\") > div > div > div.firstItem-EJ_LFrif.symbolName-EJ_LFrif > span > span.inner-EJ_LFrif.symbolNameText-EJ_LFrif\").textContent\n var stckPrice = document.querySelector(\"body > div.js-rootresizer__contents > div.layout__area--right > div > div.widgetbar-pages > div.widgetbar-pagescontent > div.widgetbar-page.active > div.widget-1quyc-Kt.widgetbar-widget.widgetbar-widget-watchlist > div.widgetbar-widgetbody > div > div.scrollable-2mu5oKC8 > div > div.listContainer-3U2Wf-wc > div > div:nth-child(\"+i+\") > div > div > span.cell-EJ_LFrif.last-EJ_LFrif\").textContent;\n }\n return {stockName:stckName,stockPrice:stckPrice};}", "async function calculations(comp) {\r\n const stockAPI = \"https://www.randyconnolly.com/funwebdev/3rd/api/stocks/history.php?symbol=\" + comp.symbol;\r\n const getStock = await fetch(stockAPI)\r\n const stocks = await getStock.json();\r\n\r\n const extraStockInfoTable = document.querySelector(\"#extraStockInfo\");\r\n\r\n if (stocks.length == 0) {\r\n extraStockInfoTable.style.display = \"none\";\r\n } else {\r\n extraStockInfoTable.style.display = \"block\";\r\n //Calculate Averages\r\n\r\n const avg = document.querySelector(\"#stockAvg\");\r\n\r\n if (avg != null) {\r\n avg.innerHTML = \"\";\r\n }\r\n\r\n const average = document.querySelector(\"#stockAvg\");\r\n\r\n const avgHead = document.createElement(\"th\");\r\n avgHead.textContent = \"Average\";\r\n avgHead.style.fontWeight = \"bold\";\r\n average.appendChild(avgHead);\r\n\r\n let openAvg = 0;\r\n let clsAvg = 0;\r\n let lowAvg = 0;\r\n let hiAvg = 0;\r\n let volAvg = 0;\r\n\r\n let openMin = 1000000000000000000000000000000000000000000000000000000;\r\n let clsMin = 1000000000000000000000000000000000000000000000000000000;\r\n let lowMin = 1000000000000000000000000000000000000000000000000000000;\r\n let hiMin = 1000000000000000000000000000000000000000000000000000000;\r\n let volMin = 1000000000000000000000000000000000000000000000000000000;\r\n\r\n let openMax = 0;\r\n let clsMax = 0;\r\n let lowMax = 0;\r\n let hiMax = 0;\r\n let volMax = 0;\r\n\r\n count = 0;\r\n\r\n for (i of stocks) {\r\n\r\n //Calculate Average Open\r\n ((openAvg += Number(i.open)));\r\n\r\n //Calculate Average Close\r\n ((clsAvg += Number(i.close)));\r\n\r\n //Calculate Average Low\r\n ((lowAvg += Number(i.low)));\r\n\r\n //Calculate Average High\r\n ((hiAvg += Number(i.high)));\r\n\r\n //Calculate Average Volume\r\n ((volAvg += Number(i.volume)));\r\n\r\n ((count += 1));\r\n\r\n\r\n\r\n //Calculate Minimum Open\r\n if (i.open < openMin) {\r\n openMin = i.open;\r\n }\r\n\r\n //Calculate Minimum Close\r\n if (i.close < clsMin) {\r\n clsMin = i.close;\r\n }\r\n\r\n //Calculate Minimum Low\r\n if (i.low < lowMin) {\r\n lowMin = i.low;\r\n }\r\n\r\n //Calculate Minimum High\r\n if (i.high < hiMin) {\r\n hiMin = i.high;\r\n }\r\n\r\n //Calculate Minimum Volume\r\n if (i.open < volMin) {\r\n volMin = i.volume;\r\n }\r\n\r\n\r\n\r\n //Calculate Maximum Open\r\n if (i.open > openMax) {\r\n openMax = i.open;\r\n }\r\n\r\n //Calculate Maximum Close\r\n if (i.close > clsMax) {\r\n clsMax = i.close;\r\n }\r\n\r\n //Calculate Maximum Low\r\n if (i.low > lowMax) {\r\n lowMax = i.low;\r\n }\r\n\r\n //Calculate Maximum High\r\n if (i.high > hiMax) {\r\n hiMax = i.high;\r\n }\r\n\r\n //Calculate Maximum Volume\r\n if (i.open > volMax) {\r\n volMax = i.volume;\r\n }\r\n\r\n\r\n }\r\n\r\n openAvg = openAvg / count;\r\n clsAvg = clsAvg / count;\r\n lowAvg = lowAvg / count;\r\n hiAvg = hiAvg / count;\r\n volAvg = volAvg / count;\r\n\r\n //Append Average\r\n const tableOpen = document.createElement(\"td\");\r\n const tableClose = document.createElement(\"td\");\r\n const tableLow = document.createElement(\"td\");\r\n const tableHigh = document.createElement(\"td\");\r\n const tableVolume = document.createElement(\"td\");\r\n\r\n tableOpen.textContent = currency(openAvg);\r\n average.appendChild(tableOpen);\r\n\r\n tableClose.textContent = currency(clsAvg);\r\n average.appendChild(tableClose);\r\n\r\n tableLow.textContent = currency(lowAvg);\r\n average.appendChild(tableLow);\r\n\r\n tableHigh.textContent = currency(hiAvg);\r\n average.appendChild(tableHigh);\r\n\r\n tableVolume.textContent = Math.round(volAvg);\r\n average.appendChild(tableVolume);\r\n\r\n //Append Minimum\r\n document.querySelector(\"#stockMin\").innerHTML = \"\";\r\n\r\n const minimum = document.querySelector(\"#stockMin\");\r\n\r\n const minHead = document.createElement(\"th\");\r\n minHead.textContent = \"Minimum\";\r\n minHead.style.fontWeight = \"bold\";\r\n minimum.appendChild(minHead);\r\n\r\n const tableOpenMin = document.createElement(\"td\");\r\n const tableCloseMin = document.createElement(\"td\");\r\n const tableLowMin = document.createElement(\"td\");\r\n const tableHighMin = document.createElement(\"td\");\r\n const tableVolumeMin = document.createElement(\"td\");\r\n\r\n tableOpenMin.textContent = currency(openMin);\r\n minimum.appendChild(tableOpenMin);\r\n\r\n tableCloseMin.textContent = currency(clsMin);\r\n minimum.appendChild(tableCloseMin);\r\n\r\n tableLowMin.textContent = currency(lowMin);\r\n minimum.appendChild(tableLowMin);\r\n\r\n tableHighMin.textContent = currency(hiMin);\r\n minimum.appendChild(tableHighMin);\r\n\r\n tableVolumeMin.textContent = volMin;\r\n minimum.appendChild(tableVolumeMin);\r\n\r\n //Append Maximum\r\n document.querySelector(\"#stockMax\").innerHTML = \"\";\r\n\r\n const maximum = document.querySelector(\"#stockMax\");\r\n\r\n const maxHead = document.createElement(\"th\");\r\n maxHead.textContent = \"Maximum\";\r\n maxHead.style.fontWeight = \"bold\";\r\n maximum.appendChild(maxHead);\r\n\r\n const tableOpenMax = document.createElement(\"td\");\r\n const tableCloseMax = document.createElement(\"td\");\r\n const tableLowMax = document.createElement(\"td\");\r\n const tableHighMax = document.createElement(\"td\");\r\n const tableVolumeMax = document.createElement(\"td\");\r\n\r\n tableOpenMax.textContent = currency(openMax);\r\n maximum.appendChild(tableOpenMax);\r\n\r\n tableCloseMax.textContent = currency(clsMax);\r\n maximum.appendChild(tableCloseMax);\r\n\r\n tableLowMax.textContent = currency(lowMax);\r\n maximum.appendChild(tableLowMax);\r\n\r\n tableHighMax.textContent = currency(hiMax);\r\n maximum.appendChild(tableHighMax);\r\n\r\n tableVolumeMax.textContent = volMax;\r\n maximum.appendChild(tableVolumeMax);\r\n }\r\n }", "function ExchangeRingPullManageStock(exchangeRingPull) {\n //---Open Inventory type block \"Average Inventory\"---\n let totalCost = 0;\n // let exchangeRingPull = Invoices.findOne(exchangeRingPullId);\n let prefix = exchangeRingPull.stockLocationId + \"-\";\n let newItems = [];\n exchangeRingPull.items.forEach(function (item) {\n let inventory = AverageInventories.findOne({\n branchId: exchangeRingPull.branchId,\n itemId: item.itemId,\n stockLocationId: exchangeRingPull.stockLocationId\n }, {sort: {_id: -1}});\n if (inventory) {\n item.cost = inventory.price;\n //item.amountCost = inventory.price * item.qty;\n //item.profit = item.amount - item.amountCost;\n //totalCost += item.amountCost;\n newItems.push(item);\n let newInventory = {\n _id: idGenerator.genWithPrefix(AverageInventories, prefix, 13),\n branchId: exchangeRingPull.branchId,\n stockLocationId: exchangeRingPull.stockLocationId,\n itemId: item.itemId,\n qty: item.qty,\n price: inventory.price,\n remainQty: inventory.remainQty - item.qty,\n coefficient: -1,\n type: 'exchangeRingPull',\n refId: exchangeRingPull._id\n };\n AverageInventories.insert(newInventory);\n }\n else {\n var thisItem = Item.findOne(item.itemId);\n item.cost = thisItem.purchasePrice;\n //item.amountCost = thisItem.purchasePrice * item.qty;\n //item.profit = item.amount - item.amountCost;\n //totalCost += item.amountCost;\n newItems.push(item);\n let newInventory = {\n _id: idGenerator.genWithPrefix(AverageInventories, prefix, 13),\n branchId: exchangeRingPull.branchId,\n stockLocationId: exchangeRingPull.stockLocationId,\n itemId: item.itemId,\n qty: item.qty,\n price: thisItem.purchasePrice,\n remainQty: 0 - item.qty,\n coefficient: -1,\n type: 'exchangeRingPull',\n refId: exchangeRingPull._id\n };\n AverageInventories.insert(newInventory);\n }\n\n //---insert to Ring Pull Stock---\n let ringPullInventory = RingPullInventories.findOne({\n branchId: exchangeRingPull.branchId,\n itemId: item.itemId,\n });\n if (ringPullInventory) {\n RingPullInventories.update(\n ringPullInventory._id,\n {\n $inc: {qty: item.qty}\n });\n } else {\n RingPullInventories.insert({\n itemId: item.itemId,\n branchId: exchangeRingPull.branchId,\n qty: item.qty\n })\n }\n\n });\n //let totalProfit = exchangeRingPull.total - totalCost;\n ExchangeRingPulls.direct.update(\n exchangeRingPull._id,\n {$set: {items: newItems, totalCost: totalCost}}\n );\n //--- End Inventory type block \"Average Inventory\"---\n\n\n}", "function lowStockClinic(clinic) {\n return clinic[\"stavudineStock\"] < 5 || clinic[\"zidotabineStock\"] < 5 || clinic[\"nevirapineStock\"] < 5;\n}", "function marketSell () {\n}", "function buySellStock(array) {\n let maxProfit = 0;\n let buyPrice = Infinity;\n\tfor (let i = 0; i < array.length; i++) {\n if (array[i] < buyPrice) {\n buyPrice = array[i];\n } else if (array[i] - buyPrice > maxProfit) {\n maxProfit = array[i] - buyPrice;\n }\n\t}\n\treturn maxProfit;\n}", "function lowInventory() {\n connection.query(\"SELECT `product_name`, `stock_quantity` FROM `products` WHERE `stock_quantity`< 20 ORDER BY `stock_quantity` DESC;\", function(err, results) {\n if (err)\n throw err;\n console.log(results)\n });\n }", "function decreaseCourseStock(id, qte) {\n let stockSpan = coursesCard[id - 1].querySelector('.stock')\n\n COURSES[id].stock = COURSES[id].initial_stock - qte \n stockSpan.innerHTML = COURSES[id].stock\n}", "stockVolumeByVenue(stockSymbol) {\n return this.request(`/stock/${stockSymbol}/volume-by-venue`);\n }", "'BUY_STOCK'(state, {shrimpId, quantity, shrimpPrice}) {\n \n // Checks to see which items are already in the array\n const record = state.shrimpInventoryData.find(element => element.id == shrimpId);\n \n // If item already exists then add to its quantity\n if (record) {\n \n record.quantity += quantity;\n \n }\n \n // If item is not in the array then add it\n else { state.shrimpInventoryData.push({\n \n id: shrimpId,\n \n quantity: quantity\n \n });\n }\n \n // Updates funds when an item is purchased\n state.funds -= shrimpPrice * quantity;\n \n }", "function appleStocks(arr) {\n\tlet minPrice = arr[0]; //O(1)\n\t//BUY THEN SELL\n\tlet maxProfit = arr[1] - arr[0]; //O(1)\n\n\t//START AT ONE - SO WE LOOP LENGTH - 1 ALREADY\n\tfor (let i = 1; i < arr.length; i++) {\n\t\t//CONSTANT MEMORY\n\t\tlet current = arr[i]; //Constant\n\t\tlet currentProfit = current - minPrice; //constant\n\t\tminPrice = Math.min(current, minPrice);\n\t\tmaxProfit = Math.max(currentProfit, maxProfit);\n\t}\n\treturn maxProfit;\n}", "processProductSale(name) {\n // we look at the stock of our store and run a function forEach that takes an item in as a parameter\n this.stock.forEach(item => {\n // if the name of the item equals a name\n if (item.name === name) {\n // and if the item count is greater than zero\n if (item.count > 0) {\n // we decrement the item count by one\n item.count--;\n // then we increase the store revenue by the price of the item\n this.revenue += item.price;\n // we then console.log that the item was purchased for its price\n console.log(`Purchased ${item.name} for ${item.price}`);\n } else {\n // if the item is out of stock, we console.log this\n console.log(`Sorry, ${item.name} is out of stock!`);\n }\n }\n });\n }", "function lowInventory(num) {\n let sql = `SELECT * FROM products GROUP BY item_id HAVING stock_quantity < ` + num;\n con.query(sql, (err, results, fields) => {\n if (err) throw err;\n results.forEach(element => {\n table.push(\n [element.item_id, element.product_name, \"$\" + element.price, element.stock_quantity]\n )\n });\n console.log(chalk.green(table.toString()))\n // empty table to be able to push updated stock to it\n table.splice(0, table.length);\n startUp();\n })\n}", "stockKeyStats(stockSymbol) {\n return this.request(`/stock/${stockSymbol}/stats`);\n }", "'BUY_STOCK' (state, {stockId, quantity, stockPrice}) {\n // check to see if I already own the stock, to increase instead of create\n const record = state.stocks.find(element => element.id === stockId);\n if (record) {\n record.quantity += quantity;\n } else {\n let currentStock = { id: stockId, quantity: quantity };\n state.stocks.push(currentStock);\n }\n state.funds -= stockPrice * quantity;\n }", "function getStock(tableSvc, username, callback) {\n const query = new azure.TableQuery().select(['schreefstock']).where('PartitionKey eq ?', username);\n\n tableSvc.queryEntities(TABLENAME, query, null, (error, result, response) => {\n if (!error) {\n // query successful\n if (result.entries.length > 0) {\n callback(error, result.entries[0].schreefstock._, response);\n } else {\n callback(error, null, response);\n }\n } else {\n LOG.error(error);\n callback(error, null, response);\n }\n });\n}", "static chooseHoldingsToSell(categoriesToSell, unrealizedMinusLosses, portfolio) {\n this.checkSchema(unrealizedMinusLosses, UNREALIZED_COLS);\n this.checkSchema(categoriesToSell, ['category', 'delta']);\n\n const withHoldingType = unrealizedMinusLosses\n .withColumn('preference', r => {\n if (r.get('shortTermGainOrLoss') !== 0) {\n return 0;\n } else {\n return 1;\n }\n });\n\n let tickersToSell = [];\n categoriesToSell.map( row => {\n const tickers = portfolio[row.get('category')].tickers;\n const allForCategory = withHoldingType.filter(r => tickers.includes(r.get('ticker')));\n const grouped = allForCategory.groupBy('ticker', 'preference')\n .aggregate(g => g.stat.sum('marketValue'))\n .sortBy('preference');\n let totalToSell = -row.get('delta');\n grouped.toCollection().forEach( ticker => {\n const toSell = Math.min(ticker.aggregation, totalToSell);\n totalToSell -= toSell;\n if (toSell > 0) {\n tickersToSell.push({ ticker: ticker.ticker, delta: toSell });\n }\n });\n });\n\n return new DataFrame(tickersToSell)\n .groupBy('ticker')\n .aggregate(g => g.stat.sum('delta'))\n .rename('aggregation', 'delta');\n }", "function insuranceMoney(euroVolumeTab)\n{\n var insuranceMoneyTab = [];\n var euroVolumeTab = EuroVolume();\n for(var i=0;i < deliveries.length; i++ )\n {\n insuranceMoneyTab[i] = (euroVolumeTab[i] * 0.3) * 0.5;\n }\n return insuranceMoneyTab;\n}", "function RSI(tempData) {\n var movingAverageDays = 14;\n // calculate the allDailyChanges on each day.\n\n var allDailyChanges = [];\n // the below is required to establish 0 on the first day\n allDailyChanges.push(0);\n\n // Start from position 1 as as we\n for (var i = 1; i < tempData.length; i++) {\n // console.log(tempData[i] - tempData[i - 1]);\n allDailyChanges.push(tempData[i] - tempData[i - 1]);\n }\n // console.log(\"The chage array is:\", allDailyChanges);\n\n // calculate the allGains & allLosses for each day\n var allGains = [];\n var allLosses = [];\n // allGains FIRST\n for (i = 0; i < tempData.length; i++) {\n if (allDailyChanges[i] > 0) {\n allGains.push(allDailyChanges[i]);\n } else {\n allGains.push(0);\n }\n }\n // allLosses SECOND\n for (i = 0; i < tempData.length; i++) {\n if (allDailyChanges[i] < 0) {\n allLosses.push(allDailyChanges[i]);\n } else {\n allLosses.push(0);\n }\n }\n\n // 1.0 aggregate the only first 14 day aggregate of allGains & allLosses.\n // This becomes the first number in the 15th position to base the rest of our calculations on.\n var eachDaysAverageGain = [];\n var eachDaysAverageLoss = [];\n\n // obtain just the first 14 day average gains/losses as a starting point.\n eachDaysAverageGain = calculateFirst14DayAverage(\n movingAverageDays,\n allGains\n );\n eachDaysAverageLoss = calculateFirst14DayAverage(\n movingAverageDays,\n allLosses\n );\n\n // console.log(allGains);\n // console.log(allLosses);\n\n // Now calculat the remainder of all gains/losses.\n // Given that we are doing a 14 day moving average, we take now to calculate the 15th index position (16th row position) and onwards RSI....\n // 2. Take the previous days AVG gain and multiply that by 13. Then ADD today's GAIN and dividing by the moving average (i.e 14)\n var startingPosition = movingAverageDays + 1;\n var smoothingEffect = movingAverageDays - 1; // This is to ensure we apply a smooth effect\n\n eachDaysAverageGain = calculateIncrementalAverageGainsLosses(\n startingPosition,\n allGains,\n eachDaysAverageGain,\n smoothingEffect,\n movingAverageDays\n );\n\n eachDaysAverageLoss = calculateIncrementalAverageGainsLosses(\n startingPosition,\n allLosses,\n eachDaysAverageLoss,\n smoothingEffect,\n movingAverageDays\n );\n\n // console.log(\"Each Days Average Gain\", eachDaysAverageGain);\n // console.log(\"Each Days Average Loss\", eachDaysAverageLoss);\n\n // now calculate the RS factors and ensure POSITIVE NUMBERS FOR THE LOSSES\n var rs = [];\n for (i = 0; i < eachDaysAverageGain.length; i++) {\n rs.push((eachDaysAverageGain[i] / eachDaysAverageLoss[i]) * -1);\n }\n // console.log(\"The rs is: \", rs);\n\n var rsi = [];\n // now calculate the RSI\n for (i = 0; i < eachDaysAverageLoss.length; i++) {\n if (eachDaysAverageLoss[i] == 0) {\n rsi.push(100);\n } else {\n rsi.push(100 - 100 / (1 + rs[i]));\n }\n }\n\n // console.log(\"The rsi is:\", rsi);\n\n // NEED TO PRE-FILL THE FINALISED ARRAY WITH NULLS SO THE ALIGNMENT WITH THE DATA WORKS\n for (var i = 0; i < movingAverageDays; i++) {\n rsi.unshift(null);\n }\n\n return rsi;\n}", "stockFinancials(stockSymbol) {\n return this.request(`/stock/${stockSymbol}/financials`);\n }", "function displayStockData(symbol) {\r\n queryString = `https://www.randyconnolly.com/funwebdev/3rd/api/stocks/history.php?symbol=${symbol}`;\r\n\r\n // fetch stock info\r\n animation2.style.display = \"flex\";\r\n fetch(queryString)\r\n .then(response => {\r\n if (response.ok) { return response.json() }\r\n else { return Promise.reject({ status: response.status, statusTest: response.statusText }) }\r\n })\r\n .then(data => {\r\n animation2.style.display = \"none\";\r\n\r\n //call on function that shows date, open, close, low, high, volume\r\n createStockTable(data);\r\n\r\n //call on function that creates avg, min, max table\r\n stockCalculation(data);\r\n\r\n\r\n //push data into array named financialsStored\r\n financialsStored.push(...data);\r\n\r\n //display chart C\r\n displayChartC(data);\r\n\r\n })\r\n .catch(err => console.log(err));\r\n }", "showStockInfo() {\n if (this.isInStock()) {\n return (\n <>\n <span id=\"current-stock\">In Stock</span>\n <VscCircleFilled color=\"green\" />\n </>\n );\n } else {\n return (\n <>\n <span id=\"current-stock\">Out of Stock</span>\n <VscCircleFilled color=\"red\" />\n </>\n );\n }\n }", "function hseSkills(branch, generation, sprint) {\n var students = data[branch][generation]['students'];\n var totalStudentsActive = 0;\n var totalStudentSprint = 0;\n for (var i = 0; i < students.length; i++) {\n var quantitySprints = students[i]['sprints'];\n if (students[i].active) {\n for (var j = 0; j < quantitySprints.length; j++) {\n if (quantitySprints[j]['number'] === sprint && quantitySprints[j]['score']['hse'] >= 840) {\n totalStudentSprint++;\n }\n }\n }\n }\n return totalStudentSprint;\n }", "function getSilverNeededForUpgrade(planet, topUp = false) {\n// amend to return silver amount to top up\n\n const totalLevel = planet.upgradeState.reduce((a, b) => a + b);\n let needed = (totalLevel + 1) * 0.2 * planet.silverCap;\n const incomingVoyages = df.getAllVoyages()\n .filter((v) => v.toPlanet == planet.locationId)\n .filter((v) => v.player == df.getAccount());\n let incomingSilver = 0;\n if (incomingVoyages.length > 0) {\n incomingSilver\n = incomingVoyages.map((p) => { return p.silverMoved }).reduce((a, b) => a + b)\n }\n\n if (getPlanetRank(planet) === 0) needed = 0.6 * planet.silverCap;\n if (!topUp) {\n return Math.ceil(Math.max(needed - planet.silver - incomingSilver, 0));\n } else {\n return Math.ceil(Math.max(planet.silverCap - planet.silver - incomingSilver, 0));\n }\n\n}", "function showStocks(data) {\r\n for (i of data) {\r\n const mainTable = document.querySelector(\"#stockTable\");\r\n const tableRow = document.createElement(\"tr\");\r\n const tableDate = document.createElement(\"td\");\r\n const tableOpen = document.createElement(\"td\");\r\n const tableClose = document.createElement(\"td\");\r\n const tableLow = document.createElement(\"td\");\r\n const tableHigh = document.createElement(\"td\");\r\n const tableVolume = document.createElement(\"td\");\r\n\r\n tableDate.textContent = i.date;\r\n tableRow.appendChild(tableDate);\r\n\r\n tableOpen.textContent = currency(i.open);\r\n tableRow.appendChild(tableOpen);\r\n\r\n tableClose.textContent = currency(i.close);\r\n tableRow.appendChild(tableClose);\r\n\r\n tableLow.textContent = currency(i.low);\r\n tableRow.appendChild(tableLow);\r\n\r\n tableHigh.textContent = currency(i.high);\r\n tableRow.appendChild(tableHigh);\r\n\r\n tableVolume.textContent = i.volume;\r\n tableRow.appendChild(tableVolume);\r\n\r\n mainTable.appendChild(tableRow);\r\n\r\n document.querySelector(\".e table\").style.display = \"block\";\r\n }\r\n }", "inStock() {\n return this.variants[this.selectedVariant].variantQuantity\n }", "get StockNum() {\n return this._stockNum;\n }", "function lowInv() {\n // console.log(\"view low inventory....\")\n connection.query(\"SELECT * FROM products WHERE stock_quantity < 5 \", (err, data) => {\n if (err) throw err;\n console.table(data);\n })\n}", "function sk_bsVal(PutOrCall, forwardVal, strike, discountFactor, volatility, yearsToMat)\n{\n if(forwardVal == 0)\n {\n if(PutOrCall == \"put\")\n return strike * discountFactor;\n else // is call\n return 0; \n }\n\n if(strike == 0)\n {\n if(PutOrCall == \"put\")\n return 0;\n else // is call\n return forwardVal * discountFactor; \n }\n \n var volSqrtT = volatility * Math.sqrt(yearsToMat);\n\n if(volSqrtT== 0)\n {\n if(PutOrCall == \"put\")\n return Math.max(strike - forwardVal,0) * discountFactor;\n else // is call\n return Math.max(forwardVal - strike,0) * discountFactor;\n }\n \n var d1 = Math.log(forwardVal / strike)/volSqrtT + volSqrtT * 0.5; \n var d2 = d1 - volSqrtT;\n \n if(PutOrCall == \"put\")\n return discountFactor * ( strike * sk_cumNorm(-d2) - forwardVal * sk_cumNorm(-d1));\n else // is Call\n return discountFactor * ( forwardVal * sk_cumNorm(d1) - strike * sk_cumNorm(d2));\n}", "get displayItems() {\n return this.stocks;\n }", "static updateStockBarang(stock) {\n this.#stockBarang = stock;\n }", "getTechnicalIndicator() {\n if(this.state.stock_ticker === \"SHW\") return [\"SMA\",\"Time Series\"]\n return [\"RSI\", \"SMA\", \"VWAP\", \"Time Series\"];\n }", "function predict(stock) {\n var maxCurrentFuturePrice = 0;\n var profit = 0;\n for (var i = stock.length - 1; i >=0; --i) {\n maxCurrentFuturePrice = Math.max(maxCurrentFuturePrice, stock[i]);\n profit += maxCurrentFuturePrice - stock[i];\n }\n return profit\n}", "milkProducedPerShed(sp = this._milkPrice) {\n let jsonReport = {};\n for (let [key, values] of Object.entries(this._data)) {\n const total = values.cows * values.productionPerCow * sp;\n jsonReport[key] = total;\n }\n return JSON.parse(JSON.stringify(jsonReport));\n }", "function getStock(){\n var items = [\n {\"Name\":\"appals\", \"Farmer\": \"Gal\", \"stock\":3},\n {\"Name\":\"tomatoes\", \"Farmer\": \"Gal\", \"stock\":12},\n {\"Name\":\"tomatoes\", \"Farmer\": \"Omer\", \"stock\":4}\n ];\n return items;\n}", "function stockGain(basis){\n //let message = \" is how much the stock has increased\";\n function years(yrs) {\n let growth = (basis * 0.05) * yrs;\n return growth;\n }\n let value = years(4);\n //console.log(value + message);\n return value;\n }", "function saleOut(chest) {\n var com=[,,];\n var fee = 0;\n var sum = 0;\n com[0] = Level.getSignText(chest[0], chest[1]-2, chest[2], 0);//commodity Id\n com[1] = Level.getSignText(chest[0], chest[1]-2, chest[2], 1);//commodity Data\n com[2] = Level.getSignText(chest[0], chest[1]-2, chest[2], 2);//commodity Price\n fee = countChest(chest, CURRENCY);//read money\n stuffChest(chest, [0, 0], 0);//clean up this chest\n sum = Math.floor(fee / com[2]);\n if (sum > 0) {\n setChest(chest, 1, [com[0], com[1]], sum);\n clientMessage(\"§aThank You (*^-^*)\");\n clientMessage(\"§b收款\" + \"§e \" + fee);\n clientMessage(\"§b销售数量 \" + \"§e \" + sum);\n };\n if (fee % com[2] > 0) {\n setChest(chest, 0, CURRENCY, fee % com[2]);\n clientMessage(\"§b找零 \" + \"§e\" + fee % com[2])\n }\n}", "function viewLowInventory() {\n\tconnection.query(\"SELECT * FROM products\", function(err, res) {\n\t\t// console.log(res)\n\t\tif(err) {\n\t\t\tthrow err\n\t\t};\n\t\t\n\t\tvar enoughStocked = true;\n\n\t\tfor (var j = 0; j < res.length; j++) {\n\t\t\tif (res[j].stock_quantity < 5) {\n\t\t\t\tenoughStocked = false\n\t\t\t\tconsole.log(\"SKU: \" + res[j].item_id + \" | Product: \" + res[j].product_name \n\t\t\t\t+ \" | Inventory: \" + res[j].stock_quantity)\n\t\t\t} \n\t\t};\n\n\t\tif (enoughStocked === true){\n\t\t\tconsole.log(\"All products have sufficient stock.\")\n\t\t}\n \t// connection.end();\n \trunQuery();\n\t});\n}", "function getLowInventory() {\n // updatePercent();\n console.log(\"\\nProducts in Low Quantity\");\n console.log(\"==========================\");\n connection.query(\"SELECT item_id, product_name, price, stock_quantity FROM products WHERE (stock_quantity * 100 / full_stock) <=?\", [\"10\"], function (error, response) {\n console.table(response);\n });\n connection.end();\n}", "totalProduction(sp = this._milkPrice) {\n let x = 0;\n for (let [key, values] of Object.entries(this.milkProducedPerShed(sp))) {\n x += values;\n }\n return x;\n }", "function getStockPrice(stockSymbol) {\n return FinanceApp.getStockInfo(stockSymbol)['price'];\n}", "function displayLowStock() {\n connection.query(\"call displayLowStock\", function (error, respDB) {\n if (error) throw error;\n console.table(respDB[0]);\n askIfContinuing();\n });\n}", "function viewLowInventory(){\n // query products table and return ids of products\n // with stock lower than 5 \n connection.query('SELECT * FROM products WHERE stock_quantity<=5',function(err,results){\n if(err) throw err;\n resultsToTable(results);\n });\n\n connection.end();\n\n}", "stockPrevious(stockSymbol) {\n return this.request(`/stock/${stockSymbol}/previous`);\n }", "stockOpenClose(stockSymbol) {\n return this.request(`/stock/${stockSymbol}/open-close`);\n }", "function writeStock(x){\n if(x<=0){\n x=0;\n }else{\n x=x-1;\n }}", "function getStockCost(data) {\n var stockCost = Number(data['item_count']) * Number(data['price_point']);\n\n if(true === debug) {\n console.log('stockCost');\n console.log(stockCost);\n }\n return stockCost;\n}", "'RND_STOCKS' (state) {\n state.stocks.forEach( stock => {\n var tmp = 0.3;\n if(stock.price < 60) {\n tmp = 0.1;\n } else if (stock.price > 200) {\n tmp = 0.5;\n }\n stock.price = stock.price + Math.round(stock.price * (0.61 * Math.random() - tmp));\n })\n }", "function increaseCourseStock(id, qte) {\n let stockSpan = coursesCard[id - 1].querySelector('.stock')\n \n COURSES[id].stock += qte\n stockSpan.innerHTML = COURSES[id].stock\n}", "sellShrimp({commit}, order) {\n \n // Sale transaction\n commit('SELL_STOCK', order);\n\n // Adds the quantity sold to market quantity\n commit('ADD_QUANTITY', order);\n \n }", "function calculateStockCounts(product, quantity) {\n const qty = product.quantity + quantity\n const stock = product.stock\n if (stock < qty) {\n return false\n }\n return true\n }", "function getStraights(hand) {\n var straights = [];\n //iterate sorted hand\n //if suits in row > 3 add to array\n return straights;\n }", "getStock(){ \r\n if (this.getStock != 0 && this.stock > 0){\r\n \r\n console.log(\"Hay lugares!!\");\r\n return true;\r\n \r\n }\r\n else {\r\n \r\n console.log(\"No hay lugares!!\");\r\n return false;\r\n \r\n }\r\n }", "function ssCalc() {\n var gross = result.householdGross || ( (plan.grossAnnualIncome || 0) + (plan.spouseGrossAnnualIncome || 0)) - ((plan.user401kContribution || 0) + (plan.spouse401kContribution || 0) );\n var taxable = Math.min( gross, federal.fica.ssWageBase );\n return ( taxable * federal.fica.ssTax );\n }", "function checkForStock(stock, price){\n var orders = this.orders[stock] || {};\n for(var order_id in orders){\n var {order, trader} = orders[order_id];\n status = this.checkStatus(order, price);\n if(status == this.status.TARGET_TRIGGERED){\n var {variety, parent_order_id} = order;\n var params = {variety, order_id, parent_order_id};\n this.callbacks.targetTriggered(trader, params);\n this.deleteOrder(stock, order_id);\n }\n if(status == this.status.STOPLOSS_TRIGGERED){\n var {variety, parent_order_id} = order;\n var params = {variety, order_id, parent_order_id};\n this.callbacks.stoplossTriggered(trader, params);\n this.deleteOrder(stock, order_id);\n }\n }\n}", "stockPrice(stockSymbol) {\n return this.request(`/stock/${stockSymbol}/price`);\n }", "function viewLowInventory() {\n\tconnection.query('SELECT * FROM Products WHERE stockQuantity<5', function(err, result) {\n\t\tcreateTable(result);\n\t})\n}", "function getInsurance(data) {\n var insurance = 0;\n\n insurance = getStockCost(data) * ( Number(data['insurance_rate']) / 100 );\n if(true === debug) {\n console.log('insurance');\n console.log(insurance);\n }\n return parseFloat(insurance.toPrecision());\n}", "function getTotalOverSales(dept, totalPurPrice) {\n connection.query(\"SELECT SUM(stock_quantity) AS totalStock FROM products WHERE department_name = ?\", [dept], function (err, res) {\n if (err) throw err;\n let totalStock;\n for (let i = 0; i < res.length; i++) {\n totalStock = res[i].totalStock;\n }\n console.log(\"Total stock for \" + dept + \"is: \" + totalStock);\n let newOHC = parseFloat(totalStock * totalPurPrice).toFixed(2)\n console.log(\"The new Overhead Cost for \" + dept + \" is \" + newOHC);\n getNewOHC(dept, newOHC)\n })\n}", "function stockPicker(arr){\n var sum = 0;\n var result = [];\n for (var i = 0; i < arr.length; i++){\n for (var j = i + 1; j < arr.length - 1; j++){\n if ((arr[j] - arr[i]) > sum){\n sum = arr[j] - arr[i];\n result = [i,j];\n // console.log(\"result\", result);\n }\n }\n }\n return result;\n}", "function buySloop() {\r\n if(player.gold.num >= player.sloop.price) {\r\n player.sloop.num++;\r\n player.gold.num -= player.sloop.price;\r\n player.influence += player.sloop.influence;\r\n player.sloop.income = player.sloop.num * player.sloop.gain;\r\n gameLog('Ye bought yerself a Sloop!');\r\n } else {\r\n gameLog('Ye \\'aven\\'t enough gold fer that, Cap\\'n.');\r\n };\r\n player.sloop.price = Math.floor(7 * Math.pow(1.33, player.sloop.num));\r\n document.getElementById('sloopCost').innerHTML = player.sloop.price;\r\n document.getElementById('sloopNum').innerHTML = player.sloop.num;\r\n document.getElementById('sloopGain').innerHTML = player.sloop.income;\r\n document.getElementById('sloopInf').innerHTML = player.sloop.influence; \r\n document.getElementById('gold').innerHTML = player.gold.num;\r\n document.getElementById('influence').innerHTML = player.influence;\r\n \r\n}", "function calScore(stockObj) {\n let popScore = calPopScore(stockObj);\n let finScore = calFinScore(stockObj);\n let credScore = calCredScore(stockObj);\n\n if (popScore === '-' || finScore === '-') return '-';\n\n return Math.round((credScore + popScore + finScore) / 3);\n}", "function getStocks() {\r\n\r\n\r\n // -------------------- Define Query Here --------------------\r\n var query = \"select stock_date,stock_open,stock_high,stock_low from stock\";\r\n // -----------------------------------------------------------\r\n\r\n\r\n connection.query(query, function(err, res){\r\n // -------------------- Your Code Here --------------------\r\n if(err) throw err;\r\n\r\n var currentLow = res[0].stock_low;\r\n var currentHigh = res[1].stock_high;\r\n var maxProfit = currentHigh - currentLow;\r\n var buyDateIndex = 0;\r\n var sellDateIndex = 1;\r\n var sellDate = sellDateIndex;\r\n var buyDate = buyDateIndex;\r\n\r\n for(var i =0;i<res.length-1;i++){\r\n if(currentLow >= res[i].stock_low){\r\n currentLow = res[i].stock_low;\r\n currentHigh = res[i+1].stock_high;\r\n buyDateIndex = i;\r\n sellDateIndex = i+1;\r\n }\r\n if(currentHigh <= res[i+1].stock_high){\r\n currentHigh = res[i+1].stock_high;\r\n sellDateIndex = i+1;\r\n }\r\n if(currentHigh-currentLow>=maxProfit){\r\n maxProfit = currentHigh-currentLow;\r\n sellDate = sellDateIndex;\r\n buyDate = buyDateIndex;\r\n }\r\n }\r\n console.log(\"Max Profit: \"+ maxProfit.toFixed(2));\r\n console.log(\"Buy Date: \"+ res[buyDate].stock_date);\r\n console.log(\"Sell Date: \"+ res[sellDate].stock_date);\r\n\r\n\r\n // --------------------- End Code Area --------------------\r\n connection.end();\r\n })\r\n}", "function lowInventory() {\n // console.log(\"low inventory fxn\");\n connection.query(\"SELECT * FROM products WHERE stock_quantity<5\",function(err, res){\n if (err) throw err;\n for (var i=0; i<res.length;i++) {\n console.log(`Product Name: ${res[i].product_name}`);\n console.log(`Department Name: ${res[i].department_name}`);\n console.log(`Selling Price: $${res[i].price}`);\n console.log(`Quantity in Stock: ${res[i].stock_quantity}`);\n console.log(\"---------------------\");\n }\n });\n connection.end();\n }", "function query_sdPlus_priceSlab(item) {\n //console.log('query_sdPlus_priceSlab running. . .');\n var userDefined_priceSlab = parseInt(item.extraField2);\n var userDefined_sdPlus = item.extraField3;\n\n if (isLegit_vendorDTO_item(item)) {\n var price = item.commonMinProductDetailsDTO.priceInfo.finalPrice;\n var sdPlus = item.commonMinProductDetailsDTO.vendorDTO.sdPlus;\n if (userDefined_priceSlab && userDefined_sdPlus) {\n if (!sdPlus || price > userDefined_priceSlab) {\n return true;\n } else {\n return false;\n }\n } else if (userDefined_priceSlab) {\n if (price > userDefined_priceSlab) {\n return true;\n }\n } else if (userDefined_sdPlus) {\n //console.log('item pogId:', item.pogId);\n if (!sdPlus) {\n return true;\n }\n } else {\n return false;\n }\n }\n }", "function calculateReport()\n{\n for(var i=0; i<json.stock.length; i++)\n {\n invest[i]= json.stock[i].noofshare * json.stock[i].shareprice\n totalInvest += invest[i]\n }\n return invest;\n}", "function afficheStock(){\n elements = document.getElementsByClassName(\"stock\");\n for(var i=0; i < elements.length; i++){\n if(elements[i].style.display === \"none\") elements[i].style.display = \"inline-block\";\n else elements[i].style.display = \"none\";\n }\n}", "async initializeStockProperties(stock, self) {\n const currentPrice = await StockApiConsumer.requestCurrentPriceForTicker(stock.ticker);\n const historicalResult = await StockApiConsumer.requestHistoricalDailyPriceForTicker(stock.ticker);\n\n stock.currentPrice = currentPrice.price;\n stock.currentValue = stock.currentPrice * stock.quantity;\n stock.historicalData = historicalResult;\n\n self.findMinAndMaxFromHistoricalData(stock);\n }", "function initializeStocksChart(stocksData, chartOrder) {\n\n var stocks = new chart(\n div = 'stocksDiv',\n data = stocksData,\n divcol = 6,\n firstTitle = 'Stock Gain/Loss',\n secondTitle = 'Cumulative Investments Over Time',\n sumcol = true\n );\n\n stocks.chartWrapper.setChartType('ComboChart');\n stocks.chartWrapper.setOption('seriesType', 'area');\n stocks.chartWrapper.setOption('lineWidth', 0);\n stocks.chartWrapper.setOption('areaOpacity', 0.5);\n stocks.chartWrapper.setOption('series.10.type', 'line');\n stocks.controlWrapper.setOption('ui.chartOptions.seriesType', 'area');\n stocks.controlWrapper.setOption('ui.chartOptions.series.5.type', 'line');\n stocks.controlWrapper.setState({range: {start: new Date(2015, 5, 1)}});\n\n stocks.appendHTMLDiv(chartOrder);\n stocks.dataTable = stocks.initialDraw(stocks.data);\n stocks.redraw();\n\n}", "function out_of_stock(){\r\n\tfor (var i = 0; i < len.length; i++) {\r\n\t\tdocument.getElementsByClassName('buy_now')[i].innerHTML=\"Out of Stock\";\r\n\t\tdocument.getElementsByClassName('buy_now')[i].classList.add(\"OutOfStock\"); //see CSS\r\n\t}//end for\r\n}//end function", "function stock_data(cur_exch, stockData){\n\t//console.log(stockData);\n\tswitch(cur_exch){\n\t\tcase 'NASDAQ':\n\t\t\tvar price = stockData.exchange_stock_data[0].csi_price;\n\t\t\tvar priceChng = stockData.exchange_stock_data[0].graph_data.price_change;\n\t\t\tvar pctChng = stockData.exchange_stock_data[0].graph_data.percent_change;\n\t\t\t$('.price').html(Number(price).toFixed(2));\n\t\t\tconvert_num(Number(priceChng).toFixed(2),Number(pctChng).toFixed(2));\n\t\t\tbreak;\n\t\tcase 'AMEX':\n\t\t\tvar price = stockData.exchange_stock_data[1].csi_price;\n\t\t\tvar priceChng = stockData.exchange_stock_data[1].graph_data.price_change;\n\t\t\tvar pctChng = stockData.exchange_stock_data[1].graph_data.percent_change;\n\t\t\t$('.price').html(Number(price).toFixed(2));\n\t\t\tconvert_num(Number(priceChng).toFixed(2),Number(pctChng).toFixed(2));\n\t\t\tbreak;\n\t\tcase 'NYSE':\n\t\t\tvar price = stockData.exchange_stock_data[2].csi_price;\n\t\t\tvar priceChng = stockData.exchange_stock_data[2].graph_data.price_change;\n\t\t\tvar pctChng = stockData.exchange_stock_data[2].graph_data.percent_change;\n\t\t\t$('.price').html(Number(price).toFixed(2));\n\t\t\tconvert_num(Number(priceChng).toFixed(2),Number(pctChng).toFixed(2));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}//END OF FUNCTION\n}//END OF FUNCTION", "function getSVForNonGuranteed(premiumTerm,sumAssured,benfitUptoAgeSelected){\n\t\t\t\t\tvar SVFromTable = calculateBISvcObj.SVForNonGuranteed;\n\t\t\t\t\t$log.debug('SVFromTable ::: ' + SVFromTable.length);\n\t\t\t\t\t$log.debug(SVFromTable);\n\t\t\t\t\tvar sVForNonGuranteed = [];\n\t\t\t\t\tvar factorsvCal = (parseInt(sumAssured)/1000);\n\t\t\t\t\t/*Loop for sv*/\n\t\t\t\t\tfor (var i = 0, len = SVFromTable.length; i !== len; i++) {\n\t\t\t\t\t\tsVForNonGuranteed.push(commonFormulaSvc.multiply(parseInt(SVFromTable[i]),factorsvCal));\n\t\t \t\t}\n\t\t\t\t\t\t$log.debug('sVForNonGuranteed ::::');\n\t\t\t\t\t\t$log.debug(sVForNonGuranteed);\n\t\t\t\t \treturn sVForNonGuranteed;\n\t\t\t}", "function getSummeryOfStock(){\n var items = [\n {\"Name\":\"bananas\", \"InStock\":12, \"Ordered\":3},\n {\"Name\":\"tomatos\", \"InStock\":34, \"Ordered\":23}\n ];\n return items;\n}", "function displayStock() {\n\n //table creation using cli-table package\n var table = new Table({\n head: ['ID', 'PRODUCT', 'PRICE', 'IN STOCK'],\n colWidths: [6, 32, 14, 14],\n style: {'padding-left': 2, 'padding-right': 2}\n });\n for (var i = 0; i < stock.length; i++) {\n var item = stock[i];\n\n //if item is in stock, push to the table\n if (stock[i].StockQuantity > 0) {\n table.push([item.ItemID, item.ProductName, \"$\" + item.Price, item.StockQuantity]);\n }\n }\n clear();\n console.log(\"----------------------------------------------------------------------\");\n console.log(\" WELCOME TO BAMAZON CUSTOMER VIEW \");\n console.log(\" \");\n console.log(\" HERE IS WHAT WE HAVE IN STOCK \");\n console.log(\"----------------------------------------------------------------------\");\n //displays the table\n console.log(table.toString());\n}", "function decomposeSeasonalityTrendB(stocks){\n\t// This is not right. The inFlows/outFlows at locations may have strong trend (imbalance), yet the sinFlows/outFlows at the stock in traffic may have no trend at all.\n\tconsole.log(\"decomposing trend and seasonality...\");\n\tstocks.forEach(function(d){\n\t\t// make sure that inFlows and outFlows are not both zero, otherwise you divide by zero getting a NaN\n\t\tvar inFlowMass = d3.sum(d.values, function(tStep){return tStep.userInFlowRate});\n\t\tvar outFlowMass = d3.sum(d.values, function(tStep){return tStep.userOutFlowRate});\n\t\tvar trend = inFlowMass==0 && outFlowMass==0? 0 : (inFlowMass-outFlowMass)/Math.max(inFlowMass,outFlowMass);\n\n\t\td.values.forEach(function(tStep){ tStep.trendInFlowRate= trend>=0 ? trend * tStep.userInFlowRate : 0;\t});\n\t\td.values.forEach(function(tStep){ tStep.trendOutFlowRate= trend>=0 ? 0 : - trend * tStep.userOutFlowRate;});\n\t\td.values.forEach(function(tStep){ tStep.seasonalInFlowRate= trend>=0 ? (1-trend) * tStep.userInFlowRate : tStep.userInFlowRate;\t});\n\t\td.values.forEach(function(tStep){ tStep.seasonalOutFlowRate= trend>=0 ? tStep.userOutFlowRate : (1+ trend) * tStep.userOutFlowRate; });\n\t});\n\treturn stocks;\n}", "function sk_blackScholesValue( PutOrCall, forwardVal, strike, discountFactor, volatility, yearsToMat)\n{\n // the following function call may throw on error\n sk_checkBSInputs( PutOrCall, forwardVal, strike, discountFactor, volatility, yearsToMat);\n return sk_bsVal(PutOrCall, forwardVal, strike, discountFactor, volatility, yearsToMat);\n}", "function trade(weekNum) {\n\tif (inMarketCurrent) {\n\t\t$('#trade').removeClass('sell');\n\t\t$('#trade').addClass('hidden');\n\t\tinMarketCurrent = false;\n\t\tuserCurrentShares = 0;\n\t\tsubset[weekNum].sold++;\n\t\tupdateTradeVars(weekNum);\n\t}\n\telse {\n\t\t$('#trade').removeClass('buy');\n \t$('#trade').addClass('hidden');\n \tinMarketCurrent = true;\n\t\tuserCurrentShares = userCurrentValue / currentPrice;\n\t\tsubset[weekNum].bought++;\n\t\tupdateTradeVars(weekNum);\n }\n}" ]
[ "0.6275521", "0.6199914", "0.6106506", "0.6090026", "0.6038022", "0.60004884", "0.59265095", "0.588524", "0.5851688", "0.57751787", "0.57673883", "0.5728191", "0.5684483", "0.56737494", "0.5670162", "0.5646045", "0.564056", "0.5631596", "0.56203485", "0.560422", "0.56026167", "0.5600474", "0.55922365", "0.5585727", "0.5574661", "0.5536878", "0.5497231", "0.54595035", "0.5459279", "0.54588044", "0.5457898", "0.5438555", "0.5432037", "0.5431412", "0.5420594", "0.5416442", "0.53848845", "0.53751385", "0.5369774", "0.5357143", "0.5354646", "0.5331715", "0.5327469", "0.53245646", "0.5320803", "0.53203493", "0.53199977", "0.53190464", "0.5316274", "0.53044623", "0.53024113", "0.5300245", "0.5296459", "0.52878445", "0.52765673", "0.526992", "0.526986", "0.5264697", "0.5263584", "0.5257554", "0.52548885", "0.52412826", "0.5234124", "0.52327895", "0.5215853", "0.52109957", "0.52079296", "0.52073085", "0.5202439", "0.5196823", "0.5186737", "0.51838195", "0.51812583", "0.5178379", "0.5177827", "0.51761764", "0.51715136", "0.5170557", "0.5168029", "0.5164812", "0.5159249", "0.5155634", "0.5149183", "0.5147491", "0.5146931", "0.5146123", "0.5145811", "0.5143492", "0.51255924", "0.51161885", "0.5111877", "0.5111019", "0.51107407", "0.5109122", "0.51072586", "0.50998104", "0.509774", "0.5096383", "0.5092505", "0.50892377", "0.5085208" ]
0.0
-1
StockistWise UnderOver Stock SS Product Multi Selection
function fnStockistWiseUnderOverStockReport() { var startMonth = fngetMonthNumber($('#txtFromDate').val().split('-')[0]); var endMonth = fngetMonthNumber($('#txtToDate').val().split('-')[0]); var startYear = $('#txtFromDate').val().split('-')[1]; var endYear = $('#txtToDate').val().split('-')[1]; if ($("#txtFromDate").val() == "") { fnMsgAlert('info', 'Stockist Wise Under Over Stock Report', 'Please enter Start month.'); HideModalPopup("dvloading"); return false; } if ($("#txtToDate").val() == "") { fnMsgAlert('info', 'Stockist Wise Under Over Stock Report', 'Please enter End month.'); HideModalPopup("dvloading"); return false; } var days = daysInMonth(endMonth, endYear); var startDate = "", endDate = ""; if (parseInt(startMonth) >= 10) { startDate = startYear + "-" + startMonth + "-01"; } else { startDate = startYear + "-0" + startMonth + "-01"; } endDate = endYear + "-" + endMonth + "-" + days; var dt1 = new Date(startYear + "/" + startMonth + "/01"); var dt2 = new Date(endYear + "/" + endMonth + "/" + days); if (dt1 > dt2) { fnMsgAlert('info', 'Stockist Wise Under Over Stock Report', 'Start Month&Year should be less than End Month&Year.'); HideModalPopup("dvloading"); return false; } if ($("#ddlProductName").val() == "0") { fnMsgAlert('info', 'Stockist Wise Under Over Stock Report', 'Select product.'); HideModalPopup("dvloading"); return false; } $("#MonthName").html('') var DatePeriod = 'Period :' + $('#txtFromDate').val().split('-')[0] + " " + $('#txtFromDate').val().split('-')[1] + " To " + $('#txtToDate').val().split('-')[0] + " " + $('#txtToDate').val().split('-')[1] + ""; $("#MonthName").html(DatePeriod); var productCodes = ""; if ($("#ddlProductName").val() != null) { for (var index = 0; index < $("#ddlProductName").val().length; index++) { productCodes += "'" + $("#ddlProductName").val()[index] + "',"; } } if (productCodes != "") { productCodes = productCodes.substring(0, productCodes.length - 1); } else { fnMsgAlert('info', 'Stockist Wise Under Over Stock Report', 'Select product.'); HideModalPopup("dvloading"); return false; } var diffMonth = monthDiff(startMonth + "/01/" + startYear, endMonth + "/" + days + "/" + endYear); ShowModalPopup("dvloading"); $.ajax({ type: 'POST', url: '../HiDoctor_Reports/ReportsLevelTwo/GetStockistWiseUnderOverStockReport', data: 'regionCode=' + $('#hdnRegionCode').val() + '&sd=' + startDate + '&ed=' + endDate + '&ProductCode=' + productCodes, success: function (response) { jsData = eval('(' + response + ')'); var tableContent = ""; var sales = 0, close = 0, reionTotal = 0, totalsummary = 0, productWiseSales = 0;; var salesEndMonth = 0, closingEndMonth = 0, noOfDaysStock = 0; var totalSalesEndMonth = 0, totalClosingEndMonth = 0, TotalNoOfDaysStock = 0; var endMonthSales = 0, EndMonthClosing = 0, monthSales = 0; var endMonthProductWiseSales = 0, endMonthProClosing = 0; var regionAvg = 0.0, totalAvg = 0.0, avg = 0.0; var isRegionNameBind = true; if (jsData.Tables[0].Rows.length > 0) { tableContent = ""; tableContent += "<table cellspacing='0' cellpadding='0' width='100%' id='tblSalesAndActivity' class='data display datatable' >"; tableContent += "<thead>"; tableContent += "<tr style='display: none;' id='tblTr'>"; tableContent += "<th style='width: 15%'>User Name</th>"; tableContent += "<th style='width: 15%'>Employee Name</th>"; tableContent += "<th style='width: 15%'>Date of Joining</th>"; tableContent += "<th style='width: 15%'>Manager Name</th>"; tableContent += "<th style='width: 15%'>Manager Territory name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Product Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Territory Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Division Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Stockist Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Average Monthly Secondary Sales Units</th>"; tableContent += "<th style='text-align:left;width: 15%'>% To Total Units</th>"; tableContent += "<th style='text-align:left;width: 15%'>Secondary Sales Units for the month - (" + $('#txtToDate').val().split('-')[0] + "-" + $('#txtToDate').val().split('-')[1] + ")</th>"; tableContent += "<th style='text-align:left;width: 15%'>Closing Units for the month - (" + $('#txtToDate').val().split('-')[0] + "-" + $('#txtToDate').val().split('-')[1] + ")</th>"; tableContent += "<th style='text-align:left;width: 15%'>No of Days Stock</th>"; tableContent += "</tr>"; tableContent += "<tr>"; tableContent += "<th style='width: 15%'>User Name</th>"; tableContent += "<th style='width: 15%'>Employee Name</th>"; tableContent += "<th style='width: 15%'>Date of Joining</th>"; tableContent += "<th style='width: 15%'>Manager Name</th>"; tableContent += "<th style='width: 15%'>Manager Territory name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Product Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Territory Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Division Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Stockist Name</th>"; tableContent += "<th style='text-align:left;width: 15%'>Average Monthly Secondary Sales Units</th>"; tableContent += "<th style='text-align:left;width: 15%'>% To Total Units</th>"; tableContent += "<th style='text-align:left;width: 15%'>Secondary Sales Units for the month - (" + $('#txtToDate').val().split('-')[0] + "-" + $('#txtToDate').val().split('-')[1] + " )</th>"; tableContent += "<th style='text-align:left;width: 15%'>Closing Units for the month - (" + $('#txtToDate').val().split('-')[0] + "-" + $('#txtToDate').val().split('-')[1] + ")</th>"; tableContent += "<th style='text-align:left;width: 15%'>No of Days Stock</th>"; tableContent += "</tr>"; tableContent += "<tr >"; tableContent += "<th colspan= '14' style='text-align:left' width='15%' ><span id='spnDivToggle' style='text-decoration: underline; cursor: pointer; padding: 5px' onclick='fnToggleTreea()'>Show Filter</span></th>"; tableContent += "</tr>"; var type = '[{ type: "text" }, { type: "text" }, { type: "text" },{ type: "text" }, { type: "text" }, { type: "text" }'; type += ',{ type: "text" }, { type: "text" },{ type: "number-range" }'; type += ', { type: "number-range" }, { type: "number-range" }, { type: "number-range" }, { type: "number-range" }]'; tableContent += "</thead><tbody>"; // Summary Value for (var i = 0; i < jsData.Tables[3].Rows.length; i++) { var dJsonDataH = jsonPath(jsData, "$.Tables[1].Rows[?(@.Region_Code=='" + jsData.Tables[3].Rows[i].Region_Code + "')]"); if (dJsonDataH != false) { for (var j = 0; j < dJsonDataH.length; j++) { var dJsonData = jsonPath(jsData, "$.Tables[2].Rows[?(@.Region_Code=='" + jsData.Tables[3].Rows[i].Region_Code + "' & @.Base_Code=='" + dJsonDataH[j].Customer_Code + "')]"); if (dJsonData != false) { for (var k = 0; k < dJsonData.length; k++) { totalsummary = totalsummary + parseInt(dJsonData[k].Sales); } } } } } if (jsData.Tables[3].Rows.length > 0) { for (var i = 0; i < jsData.Tables[3].Rows.length; i++) { var dJsonDataH = jsonPath(jsData, "$.Tables[1].Rows[?(@.Region_Code=='" + jsData.Tables[3].Rows[i].Region_Code + "')]"); if (dJsonDataH != false) { reionTotal = 0; monthSales = 0; for (var j = 0; j < dJsonDataH.length; j++) { var dJsonData = jsonPath(jsData, "$.Tables[2].Rows[?(@.Region_Code=='" + jsData.Tables[3].Rows[i].Region_Code + "' & @.Base_Code=='" + dJsonDataH[j].Customer_Code + "')]"); if (dJsonData != false) { for (var k = 0; k < dJsonData.length; k++) { reionTotal += parseInt(dJsonData[k].Sales); } } } for (var j = 0; j < jsData.Tables[0].Rows.length; j++) { isRegionNameBind = true; productWiseSales = 0; var dJsonDataPro = jsonPath(jsData, "$.Tables[2].Rows[?(@.Region_Code=='" + jsData.Tables[3].Rows[i].Region_Code + "' & @.Product_Code=='" + jsData.Tables[0].Rows[j].Product_Code + "')]"); if (dJsonDataPro != false) { for (var l = 0; l < dJsonDataPro.length; l++) { productWiseSales += parseInt(dJsonDataPro[l].Sales); } } for (var k = 0; k < dJsonDataH.length; k++) { tableContent += "<tr>"; sales = 0.0; close = 0.0; if (isRegionNameBind) { var dJsonDataDiv = jsonPath(jsData, "$.Tables[4].Rows[?(@.Region_Code=='" + jsData.Tables[3].Rows[i].Region_Code + "')]"); divisionName = ""; if (dJsonDataDiv != false) { for (var index = 0; index < dJsonDataDiv.length; index++) { divisionName += dJsonDataDiv[index].Division_Name + ","; } if (divisionName != "") { divisionName = divisionName.substring(0, divisionName.length - 1); } } tableContent += "<td>" + jsData.Tables[3].Rows[i].User_Name + "</td>"; tableContent += "<td>" + jsData.Tables[3].Rows[i].Employee_Name + "</td>"; tableContent += "<td>" + jsData.Tables[3].Rows[i].DOJ + "</td>"; tableContent += "<td>" + jsData.Tables[3].Rows[i].Manager_Name + "</td>"; tableContent += "<td>" + jsData.Tables[3].Rows[i].Manager_Region_Name + "</td>"; tableContent += "<td style='text-align:left'>" + jsData.Tables[0].Rows[j].Product_Name + "</td>"; tableContent += "<td align='left' onclick='fnSecondarySalesDetails(\"" + jsData.Tables[3].Rows[i].Region_Code + "_" + jsData.Tables[3].Rows[i].User_Code + "_" + startMonth + "_" + endMonth + "_" + startYear + "_" + endYear + "_" + jsData.Tables[0].Rows[j].Product_Code + "\")' style='text-decoration:underline;cursor:pointer'>" + jsData.Tables[3].Rows[i].Region_Name + "</td>"; tableContent += "<td style='text-align:left'>" + divisionName + "</td>"; } else { tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td style='text-align:left'></td>"; tableContent += "<td style='text-align:left'></td>"; tableContent += "<td style='text-align:left'></td>"; } tableContent += "<td align='left' >" + dJsonDataH[k].Customer_Name + "</td>"; var dJsonData = jsonPath(jsData, "$.Tables[2].Rows[?(@.Region_Code=='" + jsData.Tables[3].Rows[i].Region_Code + "' & @.Base_Code=='" + dJsonDataH[k].Customer_Code + "' & @.Product_Code=='" + jsData.Tables[0].Rows[j].Product_Code + "')]"); if (dJsonData != false) { for (var index = 0; index < dJsonData.length; index++) { sales += parseInt(dJsonData[index].Sales); close += parseInt(dJsonData[index].Closing_Stock); } } endMonthSales = 0; EndMonthClosing = 0; var dJson = jsonPath(jsData, "$.Tables[2].Rows[?(@.Month=='" + endMonth + "' & @.Year=='" + endYear + "' & @.Base_Code=='" + dJsonDataH[k].Customer_Code + "' & @.Region_Code=='" + jsData.Tables[3].Rows[i].Region_Code + "' & @.Product_Code=='" + jsData.Tables[0].Rows[j].Product_Code + "')]"); if (dJson != false) { for (var index = 0; index < dJson.length; index++) { endMonthSales += parseInt(dJson[index].Sales); EndMonthClosing += parseInt(dJson[index].Closing_Stock); } } avg = 0.0; if (sales > 0) { avg = (sales / diffMonth); tableContent += "<td style='text-align:center'>" + Math.round(avg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center'>0</td>"; } if (avg > 0) { regionAvg = (parseFloat(productWiseSales) / parseFloat(diffMonth)); avg = (avg / regionAvg) * 100; tableContent += "<td style='text-align:center'>" + Math.round(avg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center'>0</td>"; } salesEndMonth += endMonthSales; closingEndMonth += EndMonthClosing; endMonthProductWiseSales += endMonthSales; endMonthProClosing += EndMonthClosing; tableContent += "<td style='text-align:center'>" + endMonthSales + "</td>"; tableContent += "<td style='text-align:center'>" + EndMonthClosing + "</td>"; if (endMonthSales > 0) { avg = ((EndMonthClosing * 30) / endMonthSales); tableContent += "<td style='text-align:center'>" + Math.round(avg * 100) / 100 + "</td></tr>"; } else { tableContent += "<td style='text-align:center'>0</td>"; } tableContent += "</tr>" isRegionNameBind = false; } // Product Wise tableContent += "<tr>" tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td style='text-align:center;background-color:#D6D8D9;' ></td>"; tableContent += "<td style='text-align:center;background-color:#D6D8D9;'></td>"; tableContent += "<td style='text-align:center;background-color:#D6D8D9;' >" + jsData.Tables[3].Rows[i].Region_Name + " - Total</td>"; tableContent += "<td style='text-align:left;background-color:#D6D8D9;'>(" + jsData.Tables[0].Rows[j].Product_Name + ")</td>"; var totalAvg = 0; if (reionTotal > 0) { totalAvg = (productWiseSales / diffMonth) tableContent += "<td style='text-align:center;background-color:#D6D8D9;'>" + Math.round(totalAvg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center;background-color:#D6D8D9;'>0</td>"; } if (totalAvg > 0) { regionAvg = (parseFloat(reionTotal) / parseFloat(diffMonth)); var avg = (totalAvg / regionAvg) * 100; tableContent += "<td style='text-align:center;background-color:#D6D8D9;'>" + Math.round(avg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center;background-color:#D6D8D9;'>0</td>"; } tableContent += "<td style='text-align:center;background-color:#D6D8D9;'>" + endMonthProductWiseSales + "</td>"; tableContent += "<td style='text-align:center;background-color:#D6D8D9;'>" + endMonthProClosing + "</td>"; if (endMonthProductWiseSales > 0) { var avg = ((endMonthProClosing * 30) / endMonthProductWiseSales); tableContent += "<td style='text-align:center;background-color:#D6D8D9;'>" + Math.round(avg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center;background-color:#D6D8D9;'>0</td>"; } tableContent += "</tr>"; endMonthProductWiseSales = 0; endMonthProClosing = 0; } tableContent += "<tr>" tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td></td>"; tableContent += "<td style='text-align:center;background-color:#C0C0C0;' ></td>"; tableContent += "<td style='text-align:center;background-color:#C0C0C0;'></td>"; tableContent += "<td style='text-align:center;background-color:#C0C0C0;' >" + jsData.Tables[3].Rows[i].Region_Name + " - Total</td>"; tableContent += "<td style='text-align:center;background-color:#C0C0C0;'></td>"; var totalAvg = 0; if (totalsummary > 0) { totalAvg = (reionTotal / diffMonth) tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>" + Math.round(totalAvg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>0</td>"; } if (totalAvg > 0) { regionAvg = (parseFloat(totalsummary) / parseFloat(diffMonth)); var avg = (totalAvg / regionAvg) * 100; tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>" + Math.round(avg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>0</td>"; } tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>" + salesEndMonth + "</td>"; tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>" + closingEndMonth + "</td>"; totalClosingEndMonth += closingEndMonth; totalSalesEndMonth += salesEndMonth; if (salesEndMonth > 0) { var avg = ((closingEndMonth * 30) / salesEndMonth); tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>" + Math.round(avg * 100) / 100 + "</td>"; } else { tableContent += "<td style='text-align:center;background-color:#C0C0C0;'>0</td>"; } tableContent += "</tr>"; salesEndMonth = 0; closingEndMonth = 0; } } tableContent += "<tr>" tableContent += "<th ></th>"; tableContent += "<th ></th>"; tableContent += "<th ></th>"; tableContent += "<th></th>"; tableContent += "<th ></th>"; tableContent += "<th style='text-align:right'></th>"; tableContent += "<th style='text-align:right'></th>"; tableContent += "<th style='text-align:right'></th>"; tableContent += "<th style='text-align:right'>Total :</th>"; if (totalsummary > 0) { var avg = (totalsummary / diffMonth); tableContent += "<th style='text-align:center'>" + Math.round(avg * 100) / 100 + "</th>"; } else { tableContent += "<th style='text-align:center'>0</th>"; } tableContent += "<th style='text-align:center'></th>"; tableContent += "<th style='text-align:center'>" + totalSalesEndMonth + "</th>"; tableContent += "<th style='text-align:center'>" + totalClosingEndMonth + "</th>"; if (totalSalesEndMonth > 0) { var avg = ((totalClosingEndMonth * 30) / totalSalesEndMonth); tableContent += "<th style='text-align:center'>" + Math.round(avg * 100) / 100 + "</th>"; } else { tableContent += "<th style='text-align:center'>0</th>"; } tableContent += "</tr>"; } tableContent += "</tbody>"; tableContent += "<tbody><tfoot>"; tableContent += "<tr>"; tableContent += "<th></th>"; tableContent += "<th></th>"; tableContent += "<th></th>"; tableContent += "<th></th>"; tableContent += "<th></th>"; tableContent += "<th></th>"; tableContent += "<th></th>"; tableContent += "<th></th>"; tableContent += "<th></th>"; tableContent += "<th></th>"; tableContent += "<th>Total</th>"; tableContent += "<th></th>"; tableContent += "<th></th>"; tableContent += "<th></th>"; tableContent += "</tr>"; tableContent += "</tfoot>"; tableContent += "</tbody>"; tableContent += "</table>"; } $("#divReport").html(tableContent); $("#divPrint").html(DatePeriod + tableContent); var jsonType = eval(type); if ($.fn.dataTable) { $('#tblSalesAndActivity').dataTable({ "sPaginationType": "full_numbers", "fnFooterCallback": function (nRow, aaData, iStart, iEnd, aiDisplay) { var averageMonthly = 0; var toTotalUnits = 0; var startmonth = 0; var endmonth = 0; var no = 0; var totalaverageMonthly = 0; var totaltoTotalUnits = 0; var totalstartmonth = 0; var totalendmonth = 0; var totalno = 0; for (var i = 0; i < aaData.length; i++) { //averageMonthly += parseFloat(aaData[i][4].replace(',', '')); toTotalUnits += parseFloat(aaData[i][5].replace(',', '')); startmonth += parseFloat(aaData[i][11].replace(',', '')); endmonth += parseFloat(aaData[aiDisplay[i]][12].replace(',', '')); no += parseFloat(aaData[aiDisplay[i]][13].replace(',', '')); } var pageTotal_costs = 0; var pageTotal_count = 0; for (var i = iStart; i < iEnd; i++) { // totalaverageMonthly += parseFloat(aaData[aiDisplay[i]][4].replace(',', '')); totaltoTotalUnits += parseFloat(aaData[aiDisplay[i]][5].replace(',', '')); totalstartmonth += parseFloat(aaData[aiDisplay[i]][11].replace(',', '')); totalendmonth += parseFloat(aaData[aiDisplay[i]][12].replace(',', '')); totalno += parseFloat(aaData[aiDisplay[i]][13].replace(',', '')); } var ncell = nRow.getElementsByTagName('th'); //var nCells = nRow.getElementsByTagName('th'); // ncell[4].innerHTML = addCommas(totalaverageMonthly.toFixed(2)) + '<br/>(' + addCommas(averageMonthly.toFixed(2)) + ')'; // ncell[5].innerHTML = '' + addCommas(totaltoTotalUnits.toFixed(2)) + '<br/>(' + addCommas(toTotalUnits.toFixed(2)) + ')'; ncell[11].innerHTML = '' + addCommas(totalstartmonth.toFixed(2)) + '<br/>(' + addCommas(startmonth.toFixed(2)) + ')'; ncell[12].innerHTML = '' + addCommas(totalendmonth.toFixed(2)) + '<br/>(' + addCommas(endmonth.toFixed(2)) + ')'; ncell[13].innerHTML = '' + addCommas(totalno.toFixed(2)) + '<br/>(' + addCommas(no.toFixed(2)) + ')'; }, "bSort": false, "bDestroy": true, "sDom": 'T<"clear">lfrtip', "oTableTools": { "sSwfPath": "/Content/ZeroClipboard.swf" } }).columnFilter({ sPlaceHolder: "head:after", aoColumns: jsonType }); }; $('#dvPrint').remove(); fninializePrint("divPrint", "ifrmPrint", "divReport"); if (tableContent != "") { $("#divInput").slideUp(); $("#spnInputToggle").html("Show Input"); } HideModalPopup("dvloading"); }, error: function () { fnMsgAlert('info', 'Stockist Wise Under Over Stock Report', 'Error.'); HideModalPopup("dvloading"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateStock() {\n\t\t\t\t\t\tupdatedStock = selectedProductDetails.stock_quantity - answer.quantity;\n\t\t\t\t\t}", "function addStock() {\n // USE querySelectorAll()\n var selected = getSelectedRowBoxes();\n \n for (var i = 0; i < selected.length; i++) {\n var status = selected[i].parentNode.parentNode.children[3];\n status.textContent = \"Yes\";\n status.className = \"true\";\n\n // Update the Product in the products array that \n // corresponds to the checked checkbox we're updating.\n var prodId = selected[i].parentNode.parentNode.id;\n products[prodId].inStock = true;\n\n };\n\n}", "function displayStock() {\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n for (i in res) {\n let product = res[i];\n console.log(\"------\")\n console.log(\"ID:\", product.item_id);\n console.log(\"Product:\", product.product_name);\n console.log(\"Department:\", product.department_name);\n console.log(\"Price: $\"+product.price);\n console.log(\"# in Stock:\", product.stock_quantity);\n }\n selectProduct();\n \n });\n }", "displayQuantities(e){\n var size = e.target.value\n var quantity;\n var isStocked = true;\n var sizeSelected = false;\n\n // if user selected size display quantity\n if(size !== 'SELECT SIZE' ) {\n sizeSelected = true;\n for(var i = 0; i < this.props.skus.length; i++) {\n if(this.props.skus[i].size === size) {\n quantity = this.props.skus[i].quantity\n }\n }\n if(quantity === 0) {\n // checkout button changes to \"out of stock\"\n isStocked = false;\n quantity = ['-']\n } else {\n // display sequence of integers, capped by either the quantity of this style and size in stock, or a hard limit of 15.\n quantity = [...Array(quantity + 1).keys()].slice(1, 16)\n }\n // otherwise display default quantity\n } else {\n quantity = ['-']\n }\n\n this.setState({\n quantity: quantity,\n sizeSelected:sizeSelected,\n isStocked: isStocked\n })\n }", "function addStock() { \n // NOT allowed to use querySelectorAll()\n\n // find all the selected things \n var checkedbox = getSelectedRowBoxes(); \n\n //loop through all elements and extract the info.\n for (var i=0; i<checkedbox.length; i++){\n\n var status = checkedbox[i].parentNode.nextSibling.nextSibling.nextSibling; \n status.textContent = \"Yes\"; \n status.className = \"true\"; \n\n var prodID = checkedbox[i].parentNode.parentNode.id; \n products[prodID].inStock = true; \n\n // change the inStock value of the selected things \n //for (var 1=0; i<checked.length; i++)\n };\n\n saveData(); \n }", "_selectCombination(combinationId) {\n const combination = this.selectedProduct.combinations[combinationId];\n\n this.selectedCombinationId = combinationId;\n this.productRenderer.renderStock(\n combination.stock,\n this.selectedProduct.availableOutOfStock || (combination.stock <= 0)\n );\n\n return combination;\n }", "function set_price_qty_and_stock($product_row){\n\n var $table = $product_row.closest('.wrct-table'),\n selected_variation = get_selected_variation($product_row);\n\n // price\n if( ! $product_row.attr('data-wrct-price-text' ) ){\n var $price = $product_row.find('[data-wrct-name=\"price\"] .wrct-cell-val');\n\n if( selected_variation ){\n $price.html( selected_variation.price_html );\n }else{\n $price.html( $product_row.attr('data-wrct-price-range') );\n }\n }\n\n // stock\n $product_row.find('[data-wrct-name=\"stock\"] .wrct-cell-val').html( selected_variation.availability_html );\n\n // qty\n $product_row.find('.input-text.qty').attr({ 'max': selected_variation.max_qty, 'min': selected_variation.min_qty }).val(1);\n\n }", "'SELL_STOCK' (state, {shrimpId, quantity, shrimpPrice}) {\n \n // Checks to see which items are already in the array\n const record = state.shrimpInventoryData.find(element => element.id == shrimpId);\n \n // Detracts from quantity\n if (record.quantity > quantity) {\n \n record.quantity -= quantity;\n \n }\n \n // Removes the item from the array if amount sold is the amount available\n else {\n \n state.shrimpInventoryData.splice(state.shrimpInventoryData.indexOf(record), 1);\n \n }\n \n // Updates funds when items are sold\n state.funds += shrimpPrice * quantity;\n \n }", "function getStockData(num){\n var stkdata = [];\n for(i=2;i<num;i++){\n var stckName = document.querySelector(\"body > div.js-rootresizer__contents > div.layout__area--right > div > div.widgetbar-pages > div.widgetbar-pagescontent > div.widgetbar-page.active > div.widget-1quyc-Kt.widgetbar-widget.widgetbar-widget-watchlist > div.widgetbar-widgetbody > div > div.scrollable-2mu5oKC8 > div > div.listContainer-3U2Wf-wc > div > div:nth-child(\"+i+\") > div > div > div.firstItem-EJ_LFrif.symbolName-EJ_LFrif > span > span.inner-EJ_LFrif.symbolNameText-EJ_LFrif\").textContent\n var stckPrice = document.querySelector(\"body > div.js-rootresizer__contents > div.layout__area--right > div > div.widgetbar-pages > div.widgetbar-pagescontent > div.widgetbar-page.active > div.widget-1quyc-Kt.widgetbar-widget.widgetbar-widget-watchlist > div.widgetbar-widgetbody > div > div.scrollable-2mu5oKC8 > div > div.listContainer-3U2Wf-wc > div > div:nth-child(\"+i+\") > div > div > span.cell-EJ_LFrif.last-EJ_LFrif\").textContent;\n }\n return {stockName:stckName,stockPrice:stckPrice};}", "inStock() {\n return this.variants[this.selectedVariant].variantQuantity\n }", "function change_single_product_variation_stock_html() {\n\n if ( $('form.variations_form').length && $('body').hasClass('single-product') ) {\n\n $(document).ready(function() {\n\n let $stock_html = JSON.parse( document.querySelector('.variations_form').getAttribute('data-product_avail_html') );\n\n $('input.variation_id').change(function() {\n\n $variation_id = $('input.variation_id').val();\n\n for ( let i = 0; i < $stock_html.length; i++ ) {\n\n if ( $stock_html[i].id == $variation_id ) {\n\n $('.woocommerce-variation-availability').append( $stock_html[i].stock_html );\n\n }\n\n }\n\n });\n\n });\n\n }\n\n }", "valueOfStock()\n {\n return this.numberofshare*this.shareprice\n }", "function check_option_stock() {\n var options = Y.all('.radio-image');\n\n options.each(function() {\n this.removeClass('unavailable'); // start fresh\n\n var id = this.getAttribute('id');\n if (!option_to_stock_map[id]) {\n // option is out of stock\n this.addClass('unavailable');\n }\n });\n\n var fieldsets = Y.all('.add-to-cart div.radio fieldset');\n if (fieldsets.size() == 2) {\n // the only amount of option categories we can handle right now I'm afraid\n var set_1 = fieldsets.item(0);\n var set_2 = fieldsets.item(1);\n var selected_1 = set_1.one('.radio-image.selected');\n var selected_2 = set_2.one('.radio-image.selected');\n if (selected_1 || selected_2) {\n if (selected_1) {\n var id = selected_1.getAttribute('id');\n var display = set_1.one('.chosen-radio');\n set_2.all('.radio-image').each(function() {\n var key = id + \",\" + this.getAttribute('id');\n if (!(key in option_to_stock_map) || option_to_stock_map[key] == 0) {\n this.addClass('unavailable');\n }\n });\n }\n if (selected_2) {\n var id = selected_2.getAttribute('id');\n var display = set_2.one('.chosen-radio');\n set_1.all('.radio-image').each(function() {\n var key = id + \",\" + this.getAttribute('id');\n if (!(key in option_to_stock_map) || option_to_stock_map[key] == 0) {\n this.addClass('unavailable');\n }\n });\n }\n }\n }\n\n // set the display value\n fieldsets.each(function() {\n var display = this.one('.chosen-radio');\n var selected = this.one('.radio-image.selected');\n if (selected) {\n display.setHTML(Y.Custom.get_radio_image_display(selected));\n }\n });\n}", "function getCurrentSpec() {\n frank_global.product.current = {\n size: get('#productSize .sizeChoosed').innerText.trim(),\n color: {\n code: get('#productColor .colorChoosed').firstChild.dataset.color_code,\n name: get('#productColor .colorChoosed').firstChild.dataset.name\n },\n };\n frank_global.product.current.stock = (function (variants) {\n for (let v of variants) {\n let choosen = ( v.size === frank_global.product.current.size && frank_global.product.current.color.code === v.color_code);\n if (choosen) {\n frank_global.product.current.number = v.stock? 1: 0;\n get('#productNumValue').innerText = frank_global.product.current.number;\n /** set the initial numberToBuy is one */\n return v.stock;\n }\n }\n /** set the initial numberToBuy is zero if there is no stock */\n get('#productNumValue').innerText = frank_global.product.current.number;\n return 0;\n } (frank_global.product.product.variants))\n}", "processProductSale(name) {\n // we look at the stock of our store and run a function forEach that takes an item in as a parameter\n this.stock.forEach(item => {\n // if the name of the item equals a name\n if (item.name === name) {\n // and if the item count is greater than zero\n if (item.count > 0) {\n // we decrement the item count by one\n item.count--;\n // then we increase the store revenue by the price of the item\n this.revenue += item.price;\n // we then console.log that the item was purchased for its price\n console.log(`Purchased ${item.name} for ${item.price}`);\n } else {\n // if the item is out of stock, we console.log this\n console.log(`Sorry, ${item.name} is out of stock!`);\n }\n }\n });\n }", "function showStock(){\n\t//search query that is selecting everything in our products table\n\tconnection.query(\"SELECT * FROM products\", function(error, results){\n\t\tif(error){\n\t\t\tconsole.log(error);\n\t\t}else{\n\t\t\t//looping through our table and grabbing our id, product, and price for each product\n\t\t\tfor(var i = 0; i < results.length; i++){\n\t\t\t\tconsole.log(\"ID: \" + results[i].item_id);\n\t\t\t\tconsole.log(\"Product: \" + results[i].product_name);\n\t\t\t\tconsole.log(\"Price: \" + \"$\" + results[i].price);\n\t\t\t\t//pushing product id and name back up to our choicesArray for use in inquirer\n\t\t\t\tchoicesArray.push(results[i].item_id + \": \" + results[i].product_name);\n\t\t\t};\n\t\t//calling our user input function to ask our user which product they would like to buy\t\n\t\tuserInput();\n\t\t};\n\t});\n}", "function productsForSale() {\n\tvar query = \"SELECT * FROM products HAVING stock_quantity > 0\";\n\tconnection.query(query, function(err, res){\n\t\tfor (var i = 0; i < res.length; i++) {\n\t\t\tconsole.log(res[i].item_id + \" | \" + res[i].product_name + \" | \" + res[i].price + \" | \" + res[i].stock_quantity);\n\t\t\tconsole.log(\"-----------------------------\");\n\t\t}\n\trunSearch();\n\t});\n}", "function get_product_rank(store_id,product_id,product_name,chart_id)\n{\n if(typeof window.product_chart_rank !== \"undefined\")window.product_chart_rank.destroy();\n set_product_rank_chart(store_id,product_id,product_name,chart_id,\"scatter-comparison\")\n}", "function getProducts(){\r\n \r\n var inclusionSet = [];\r\n //var url = \"http://gamecenter-qa.nhl.com/nhlgc/servlets/products?format=xml\";\r\n var url = \"http://gamecenter.nhl.com/nhlgc/servlets/products?format=xml\";\r\n var req = new XMLHttpRequest();\r\n req.onreadystatechange = function() {\r\n try {\r\n console.log('Got ready state change of ' + req.readyState);\r\n if (req.readyState == 4 ) {\r\n console.log('Got status code of ' + req.status);\r\n if ( req.status == 200) {\r\n console.debug(req.responseText);\r\n var xmlDoc = atv.parseXML(req.responseText);\r\n var root = xmlDoc.rootElement;\r\n products = root.getElementsByName(\"products\");\r\n productList = products[0].getElementsByName(\"product\");\r\n nProducts = productList.length;\r\n console.debug(\"Number of products: \" + nProducts);\r\n for (i = 0; i < nProducts; i++) {\r\n product = productList[i];\r\n productType = product.getElementsByName(\"productType\")[0].textContent;\r\n sku = product.getElementsByName(\"sku\")[0].textContent;\r\n tier = product.getElementsByName(\"tier\")[0].textContent;\r\n //value = 'com.neulion.atv.nba.2012.' + tier + '.' + productType + '_' + sku;\r\n value = 'com.nbaimd.gametime.universal.2012.' + tier + '.' + productType + '_' + sku;\r\n //NEED TO IGNORE MONTHLY INSTALLMENT PRODUCTS where <isMonthly>true</isMonthly>\r\n //WHAT WILL TEAM PASS PRODUCT LOOK LIKE\r\n\r\n //AS PER CONTRACT, Only the following products will be available for IAP\r\n //League Pass Tier 1\r\n //League Pass Tier 6\r\n if ((productType == 'LPPREMIUM' && sku == 'SEASON_PLAYOFFS') && tier == 'tier1' || tier =='tier6') {\r\n console.log('FOUND PRODUCT: ' + value);\r\n inclusionSet.push(value);\r\n }\r\n }\r\n console.debug(\"GetInclusionSet RETURN: \" + inclusionSet);\r\n atv.sessionStorage.setItem('ProductList', inclusionSet);\r\n return;\r\n }\r\n else {\r\n // Specify a copyedited string because this will be displayed to the user.\r\n console.log('Failed products inclusion request');\r\n return;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n console.log('Failed products inclusion request. Aborting. Exception: ' + e);\r\n req.abort();\r\n return;\r\n }\r\n }\r\n\r\n req.open(\"GET\", url, false);\r\n req.setRequestHeader('Geo-Coord','52.5233,13.4127');\r\n req.send();\r\n}", "function viewLowInventory(){\n\tvar lowstock = 0;\n\tvar query = \"SELECT * FROM products\";\n connection.query(query, function(err, res) {\n \tfor (var i = 0; i < res.length; i++) {\n \t\tif(res[i].stock_quantity < 5){\n \t\t\tconsole.log('\\nThere are only ' + res[i].stock_quantity + ' ' + res[i].product_name + ' left in stock\\n');\n \t\t\tlowstock++\n \t\t} \t\n \t}\n \tif(lowstock === 0){\n \t\tconsole.log('\\n----------------------------------'); \n \t\tconsole.log('All products are well stocked Bossman'); \n \t\tconsole.log('----------------------------------'); \n \t}\n \tdisplayOptions();\n });\t\n}", "function salesByProduct(products, lineItems){\n //TODO\n}", "function viewLowInventory() {\n\tconnection.query(\"SELECT * FROM products\", function(err, res) {\n\t\t// console.log(res)\n\t\tif(err) {\n\t\t\tthrow err\n\t\t};\n\t\t\n\t\tvar enoughStocked = true;\n\n\t\tfor (var j = 0; j < res.length; j++) {\n\t\t\tif (res[j].stock_quantity < 5) {\n\t\t\t\tenoughStocked = false\n\t\t\t\tconsole.log(\"SKU: \" + res[j].item_id + \" | Product: \" + res[j].product_name \n\t\t\t\t+ \" | Inventory: \" + res[j].stock_quantity)\n\t\t\t} \n\t\t};\n\n\t\tif (enoughStocked === true){\n\t\t\tconsole.log(\"All products have sufficient stock.\")\n\t\t}\n \t// connection.end();\n \trunQuery();\n\t});\n}", "function getProductsStore(selectedStoreName) {\n \n // get the data in the active sheet \n var sheet = getOutputSheet(1); \n \n var cell = getOutputFirstCell(1);\n \n cell.setFormula(\"=QUERY('Base de Datos'!A:M;\\\"select F, G, H, K, sum(I), max(L) where J='No Vendido' and K='\"+selectedStoreName+\"' group by G, F, H, K\\\")\");\n \n\t// create a 2 dim area of the data in the carrier names column and codes \n\tvar products = sheet.getRange(2, 1, sheet.getLastRow() -1, 6).getValues().reduce( \n\t\tfunction(p, c) { \n \n // add the product to the list\n\t\t\tp.push(c); \n\t\t\treturn p; \n\t\t}, []); \n \n return JSON.stringify(products);\n}", "function changeStock(connection,newStock,selectedItem) {\n connection.query(\"UPDATE products SET stock_quantity=? WHERE product_name=?\",[newStock,selectedItem], function (err,res) {\n if (err) throw err;\n shop();\n });\n}", "function productSelector() {\n const previousProducts = [];\n previousProducts.push(leftProduct);\n previousProducts.push(centerProduct);\n previousProducts.push(rightProduct);\n\n // a different index number than the first one\n console.log(Product.allProducts);\n while (previousProducts.includes(rightProduct)){\n let rightIndex = Math.floor(Math.random() * Product.allProducts.length);\n rightProduct = Product.allProducts[rightIndex];\n console.log(rightIndex);\n } previousProducts.push(rightProduct);\n\n while (previousProducts.includes(leftProduct)) {\n let leftIndex = Math.floor(Math.random() * Product.allProducts.length);\n leftProduct = Product.allProducts[leftIndex];\n console.log(leftIndex);\n } previousProducts.push(leftProduct);\n\n while (previousProducts.includes(centerProduct)) {\n let centerIndex = Math.floor(Math.random() * Product.allProducts.length);\n centerProduct = Product.allProducts[centerIndex];\n console.log(centerIndex);\n }\n}", "function removeProductStock(products) {\r\n let productList = JSON.parse(products)\r\n productList.forEach((product) => {\r\n connection.query(\r\n `update products set Stock = Stock - 1 where ProductId = ${e(product.ProductId)}`,\r\n (err, results) => {\r\n if (err) {\r\n throw err\r\n }\r\n }\r\n )\r\n })\r\n}", "function setSelected(sku) {\n selected = cartStore.where({sku: sku});\n }", "seriesHandler(e){\n e.preventDefault();\n const target = e.target;\n let filteredProducts = [];\n let fullProductList = Products.documents;\n\n fullProductList.map((singleProduct, index) => {\n return singleProduct.series === target.name ? \n filteredProducts.push(singleProduct) : null;\n });\n this.setState({\n products: filteredProducts\n });\n }", "removeSelectedStocks(portfolioName) {\n let portfolios = this.state.portfolios;\n portfolios[portfolioName].stocks.forEach(function (stock, index) {\n if (stock.selected) {\n portfolios[portfolioName].stocks.splice(index, 1);\n }\n });\n this.setState({portfolios: portfolios});\n }", "function outOfStock(products, modalProducts){\r\n for (let product of products){\r\n const remaining = product.children[2].children[0].children[0];\r\n if (remaining.innerHTML === \"0\"){\r\n const heading = product.children[0].children[0];\r\n const button = product.children[2].children[1];\r\n // amend styling\r\n heading.style.color = \"lightgrey\";\r\n remaining.style.color = \"lightgrey\";\r\n button.style.backgroundColor = \"lightgrey\";\r\n button.disabled = \"true\";\r\n button.innerHTML = \"Out of Stock\";\r\n } \r\n }\r\n \r\n for (let mProduct of modalProducts){\r\n const mRemainder = mProduct.children[2].children[0];\r\n if (mRemainder.innerHTML === \"0\"){\r\n const radioBtn = mProduct.children[0].children[0];\r\n mProduct.style.opacity = \"0.4\";\r\n radioBtn.disabled = \"true\";\r\n }\r\n }\r\n}", "function listlowInventory() {\n //Variable creation from DB connection\n connection.query(\"SELECT * FROM products WHERE stock_quantity <= 3\", function (err, results) {\n for (var i = 0; i < results.length; i++) {\n\n var itemId = results[i].item_id,\n productName = results[i].product_name,\n stockQuantity = results[i].stock_quantity;\n\n table.push(\n [itemId, productName, stockQuantity]\n );\n }\n console.log(\"\");\n console.log(chalk.blue(\"============================ \") + chalk.yellowBright(\"BAMAZON LOW PRODUCT INVENTORIES\") + chalk.blue(\" =================================\"));\n console.log(\"\");\n console.log(chalk.greenBright(table.toString()));\n console.log(\"\");\n console.log(\"\");\n console.log(\"\");\n newTransaction();\n // connection.end();\n });\n }", "'BUY_STOCK'(state, {shrimpId, quantity, shrimpPrice}) {\n \n // Checks to see which items are already in the array\n const record = state.shrimpInventoryData.find(element => element.id == shrimpId);\n \n // If item already exists then add to its quantity\n if (record) {\n \n record.quantity += quantity;\n \n }\n \n // If item is not in the array then add it\n else { state.shrimpInventoryData.push({\n \n id: shrimpId,\n \n quantity: quantity\n \n });\n }\n \n // Updates funds when an item is purchased\n state.funds -= shrimpPrice * quantity;\n \n }", "qsSelectedProductSkus(prodId, skuInfo) {\n let qsSelectedProductSkusObj = this.state.qsSelectedProductSkus;\n qsSelectedProductSkusObj[prodId] = skuInfo;\n this.setState({\n qsSelectedProductSkus: qsSelectedProductSkusObj\n })\n }", "function getNotSoldProducts(store) {\n \n // get the output1 sheet\n\tvar sheet = getOutputSheet(1)\n \n // get the first cell of the Output1 sheet\n var cell = getOutputFirstCell(1);\n \n // set the formula to get the asked information\n cell.setFormula(\"=QUERY('Base de Datos'!A:M;\\\"select F, G, H, J, L, sum(I) where J='No Vendido' and K='\"+store+\"' group by G, F, H, J, L\\\")\");\n \n\t// create a 2 dim area of the data in the carrier names column and codes \n\tvar products = sheet.getRange(2, 1, sheet.getLastRow()-1, 6).getValues();\n \n if (products.length > 0) {\n \n products.reduce( \n\t\tfunction(p, c) { \n \n // if the inventory is greater than zero, add it to the list\n var inventory = c[5];\n \n if (inventory > 0) {\n \n\t\t\tp.push(c); \n }\n\t\t\treturn p; \n\t\t}, []); \n }\n \n \n return JSON.stringify(products);\n}", "function getProductNameForStockReport(){\r\n\r\n\t$(\"#proName\").empty();\r\n\t$(\"#proName\").append($(\"<option></option>\").attr(\"value\",\"\").text(\"Select product\"));\r\n\tvar params= {};\r\n\tparams[\"methodName\"] = \"getAllProductByCategoriesForStockReport\";\r\n\t$.post('/AgriSoft/jsp/utility/controller.jsp',params,function(data)\r\n\t\t\t{ var count = 1;\r\n\t\t\tvar jsonData = $.parseJSON(data);\r\n\t\t\t$.each(jsonData,function(i,v)\r\n\t\t\t\t\t{\r\n\t\t\t\t$(\"#proName\").append($(\"<option></option>\").attr(\"value\",count).text(v.product + \",\"+v.manufacturer+\",\"+v.weight+\",\"+v.unitName)); \r\n\t\t\t\tcount++;\r\n\t\t\t\t\t});\r\n\t\t\t}).error(function(jqXHR, textStatus, errorThrown){\r\n\t\t\t\tif(textStatus===\"timeout\") {\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n}", "function initSoldOutProductOptions()\n {\n \tif ( $('.commerce-add-to-cart').length > 0 ) {\n \t \n \t $('.commerce-add-to-cart .form-item-product-id').each(function(e) {\n \t var $this = $(this);\n \t var label = $this.children('label').html();\n \t if (label.indexOf(\"soldoutMsg\") >= 0) {\n \t $this.children('input:radio').attr('disabled', true);\n \t $this.addClass('disabledOption');\n \t }\n \t });\n \t}\n }", "addStockProducts(response, stocks) {\n response.items.map(product => {\n if (stocks[product.id]) {\n product.stocks = stocks[product.id];\n }\n if (product.children_products && product.children_products.length > 0) {\n product.children_products.map(childProduct => {\n if (stocks[childProduct.id]) {\n childProduct.stocks = stocks[childProduct.id];\n }\n return childProduct;\n });\n }\n return product;\n });\n return response;\n }", "function outOfStack () {\n if (!get('.colorChoosed')) {\n get(\"#productColor > div:nth-of-type(1)\").className = \"colorChoosed\";\n } \n \n let sizeDivs = get('#productSize > div',true);\n let variants = frank_global.product.product.variants;\n let targetColor = get('.colorChoosed').firstChild.dataset.color_code;\n let sizeHasNoStack = [];\n \n for (let variant of variants) {\n if (variant.color_code === targetColor && variant.stock ===0 ) {\n sizeHasNoStack.push(variant.size);\n }\n }\n for (let div of sizeDivs) { /** reset all size div to display */\n div.style.display = 'inline-block';\n for (let size of sizeHasNoStack) {\n if (size === div.innerText) {\n div.style.display = 'none';\n div.className = '';\n }\n }\n } \n if (!get('.sizeChoosed') ) {\n getFirstOne: for (let div of sizeDivs) {\n if (div.style.display !== 'none') {\n div.className = 'sizeChoosed';\n break getFirstOne;\n }\n } \n }\n}", "function updateStockOne() {\n selector1 = d3.select(\"#sector1\").property(\"value\")\n \n d3.json('/tickerlist').then(data => {\n \n var tickers1 = [];\n \n var filteredData1 = data.filter(d => d.Industry == selector1)\n console.log(filteredData1)\n\n for (key in filteredData1) {\n tickers1.push(filteredData1[key].Ticker)\n }\n\n var selector3 = d3.select(\"#stock1\")\n\n selector3.html('')\n\n tickers1.forEach(t => {\n selector3.append('option').append('value', t).text(t)\n }) \n })\n}", "function populateListProductChoices(slct1, slct2) {\r\n var s1 = document.getElementById(slct1);\r\n var s2 = document.getElementById(slct2);\r\n\r\n\t// s2 represents the <div> in the Products tab, which shows the product list, so we first set it empty\r\n\t// check if s2 is empty or not\r\n\t// s2 represents the <div> in the Products tab, which shows the product list, so we first set it empty\r\n\t// check if s2 is empty or not\r\n\r\n\tif (document.getElementsByName(\"product\").length == 0){\r\n\t\ts2.innerHTML = \"\";\r\n\t// obtain a reduced list of products based on restrictions\r\n\tvar optionArray = restrictListProducts(products, s1.value);\r\n\t} else {\r\n\t// obtain a reduced list of products based on restrictions\r\n\tvar ele = document.getElementsByName(\"product\");\r\n\tvar toRestrict = [];\r\n\r\n\tfor (i = 0; i < ele.length; i++) {\r\n\t\t\ttoRestrict.push(ele[i].id);\r\n\t}\r\n\tvar newOptionArray = getProducts(toRestrict);\r\n\r\n\ts2.innerHTML = \"\";\r\n\tvar optionArray = restrictListProducts(newOptionArray, s1.value);\r\n\t}\r\n\r\n\t// for each item in the array, create a checkbox element, each containing information such as:\r\n\t// <input type=\"checkbox\" name=\"product\" value=\"Bread\">\r\n\t// <label for=\"Bread\">Bread/label><br>\r\n\tvar count = document.createElement(\"p\");\r\n\tcount.id= \"ProductCount\";\r\n\tcount.appendChild(document.createTextNode(optionArray.length + \" Products\"));\r\n\ts2.appendChild(count);\r\n\r\n\tfor (i = 0; i < optionArray.length; i++) {\r\n\r\n\t\tvar productName = optionArray[i].name;\r\n\t\tvar productPrice = optionArray[i].price;\r\n\t\tvar productImg = optionArray[i].image;\r\n\t\t// create the checkbox and add in HTML DOM\r\n\t\tvar container = document.createElement(\"div\");\r\n\t\tcontainer.id=\"Container\";\r\n\t\tcontainer.className=\"container\";\r\n\r\n\t\tvar elem = document.createElement(\"img\");\r\n\t\telem.id = productName;\r\n\t\telem.src = productImg;\r\n\t\telem.setAttribute(\"height\",\"150\");\r\n\t\telem.setAttribute(\"width\", \"150\");\r\n\t\telem.setAttribute(\"alt\", productName);\r\n\t\tcontainer.append(elem);\r\n\r\n\t\t// create a label for the checkbox, and also add in HTML DOM\r\n\t\tvar info = document.createElement(\"div\");\r\n\t\tinfo.class = \"displayInfo\";\r\n\t\tvar label = document.createElement('label')\r\n\t\tlabel.htmlFor = productName;\r\n\t\tlabel.appendChild(document.createTextNode(productName));\r\n\t\tlabel.appendChild(document.createElement(\"br\"));\r\n\t\tlabel.appendChild(document.createTextNode(\"$\"+productPrice));\r\n\t\tinfo.appendChild(label);\r\n\t\tcontainer.appendChild(info);\r\n\r\n\t\tvar button = document.createElement(\"button\");\r\n\t\tbutton.innerHTML =\"ADD TO CART\";\r\n\t\tbutton.className = \"block\";\r\n\t\tbutton.id = productName;\r\n\t\tbutton.name=\"product\";\r\n\t\tbutton.type = \"button\";\r\n\t\tbutton.value = String(productPrice);\r\n\t\tbutton.onclick = function(){\r\n\t\t\taddItem(this.id, this.value);\r\n\t\t};\r\n\t\tcontainer.appendChild(button);\r\n\t\t// create a breakline node and add in HTML DOM\r\n\t\ts2.appendChild(container);\r\n\t}\r\n}", "updateStock(orderProduct, orderOptions) {\r\n // Update product stock\r\n let productId = orderProduct.productId\r\n let quantity = orderProduct.quantity\r\n let productOptionValueIds = []\r\n\r\n if (orderOptions instanceof Array &&\r\n orderOptions.length > 0) {\r\n for (let orderOption in orderOptions) {\r\n if (orderOption.productOptionValueId) {\r\n productOptionValueIds.push(orderOption.productOptionValueId)\r\n }\r\n }\r\n }\r\n\r\n this.updateRealStock(productId, productOptionValueIds, quantity)\r\n }", "function productosStockSlider() {\n const $nextProductFilter = document.querySelector(\".btnSig-Filter\");\n const $prevProductFilter = document.querySelector(\".btnAnt-Filter\");\n const $productsFilter = document.querySelector(\".productFilter\");\n\n //Los muestro como vista inicial\n //Los muestro como vista inicial\n display_Initial_ProductsStockView(window.innerWidth >= 1400, 4);\n display_Initial_ProductsStockView(\n window.innerWidth < 1400 && window.innerWidth > 1024,\n 3\n );\n display_Initial_ProductsStockView(\n window.innerWidth <= 1024 && window.innerWidth > 768,\n 2\n );\n display_Initial_ProductsStockView(\n window.innerWidth <= 768 && window.innerWidth > 525,\n 1\n );\n display_Initial_ProductsStockView(window.innerWidth <= 525, 0);\n\n //Boton de siguiente producto\n $nextProductFilter.addEventListener(\"click\", () => {\n $productsFilter.appendChild($productsFilter.firstElementChild);\n $productsFilter.lastElementChild.style.display = \"none\";\n\n nextOrPrevProductStock__InWidth_(4, window.innerWidth >= 1400, \"flex\");\n nextOrPrevProductStock__InWidth_(\n 3,\n window.innerWidth < 1400 && window.innerWidth >= 1024,\n \"flex\"\n );\n nextOrPrevProductStock__InWidth_(\n 2,\n window.innerWidth <= 1024 && window.innerWidth > 768,\n \"flex\"\n );\n nextOrPrevProductStock__InWidth_(\n 1,\n window.innerWidth <= 768 && window.innerWidth > 525,\n \"flex\"\n );\n nextOrPrevProductStock__InWidth_(0, window.innerWidth <= 525, \"flex\");\n });\n\n //Boton de anterior producto\n $prevProductFilter.addEventListener(\"click\", () => {\n $productsFilter.insertBefore(\n $productsFilter.lastElementChild,\n $productsFilter.firstElementChild\n );\n $productsFilter.firstElementChild.style.display = \"flex\";\n\n nextOrPrevProductStock__InWidth_(5, window.innerWidth >= 1400, \"none\");\n nextOrPrevProductStock__InWidth_(\n 4,\n window.innerWidth < 1400 && window.innerWidth > 1024,\n \"none\"\n );\n nextOrPrevProductStock__InWidth_(\n 3,\n window.innerWidth <= 1024 && window.innerWidth > 768,\n \"none\"\n );\n nextOrPrevProductStock__InWidth_(\n 2,\n window.innerWidth <= 768 && window.innerWidth > 525,\n \"none\"\n );\n nextOrPrevProductStock__InWidth_(1, window.innerWidth <= 525, \"none\");\n });\n\n //Function de muestra inicial de los productos al primer loading\n function display_Initial_ProductsStockView(width, howManyProducts) {\n if (width) {\n for (let i = 0; i < $productsFilter.children.length; i++) {\n if (i > howManyProducts) {\n $productsFilter.children[i].style.display = \"none\";\n }\n }\n }\n }\n\n //Funcion para pasar al siguiente u anterior producto\n function nextOrPrevProductStock__InWidth_(children, width, childrenStatus) {\n if (width) {\n $productsFilter.children[children].style.display = childrenStatus;\n }\n }\n }", "function viewProductStock(a) {\n $(\"#product-list .deactivate\").toggleClass(\"deactivate\");\n $(\".stockdisp .unactivate\").toggleClass(\"deactivate\")\n $(\"li.actparent\").toggleClass(\"actparent\");\n if ($(\".stockdisp .tab1\").css(\"display\") == \"none\") {\n $(\".stockdisp .tab1\").toggle();\n $(\".stockdisp .tab2\").toggle();\n }\n $(\".product_name.act\").toggleClass(\"act\");\n //name = $(\".username.act\").html()\n $(a).find(\".product_name\").toggleClass(\"act\");\n $(a).toggleClass(\"actparent\");\n name = $(\".product_name.act\").html();\n console.log(name);\n $(\".prodname\").text(name);\n $(\"#producthistorypane\").css(\"opacity\", \"0\");\n dbOperations(\"stocks\", \"select_operation\", [\"stock\", \"productname\", String($(\".prodname\").html())]);\n check_for_active_row(\"product_name\", \"stock\");\n $(\"#producthistorypane\").animate({\n opacity: 1\n });\n}", "function bike_selected() {\n var quantities = JSON.parse(localStorage.getItem('quantities'));\n if (!quantities) return false;\n var n = quantities.length;\n for (var i = 0; i < n; ++i)\n if (quantities[i] > 0 && PRODUCT_DATA[i]['product_type'] === 'bike') return true;\n return false;\n}", "function getThreeProducts() {\n const doNotUse = [leftProduct, centerProduct, rightProduct];\n while (doNotUse.includes(leftProduct)) {\n let leftIndex = Math.floor(Math.random() * Product.allProducts.length);\n leftProduct = Product.allProducts[leftIndex];\n }\n doNotUse.push(leftProduct)\n\n while (doNotUse.includes(centerProduct)) {\n let centerIndex = Math.floor(Math.random() * Product.allProducts.length);\n centerProduct = Product.allProducts[centerIndex];\n }\n doNotUse.push(centerProduct)\n\n while (doNotUse.includes(rightProduct)) {\n let rightIndex = Math.floor(Math.random() * Product.allProducts.length);\n rightProduct = Product.allProducts[rightIndex];\n }\n doNotUse.push(rightProduct)\n console.log(doNotUse)\n}", "function Product(prodname, price, inStock){ \n this.prodName = prodname; \n this.price = price; \n this.inStock = inStock; \n\n this.setStock = function(stock) {\n this.inStock = stock; \n }\n\n}", "function lowInventory(num) {\n let sql = `SELECT * FROM products GROUP BY item_id HAVING stock_quantity < ` + num;\n con.query(sql, (err, results, fields) => {\n if (err) throw err;\n results.forEach(element => {\n table.push(\n [element.item_id, element.product_name, \"$\" + element.price, element.stock_quantity]\n )\n });\n console.log(chalk.green(table.toString()))\n // empty table to be able to push updated stock to it\n table.splice(0, table.length);\n startUp();\n })\n}", "static chooseHoldingsToSell(categoriesToSell, unrealizedMinusLosses, portfolio) {\n this.checkSchema(unrealizedMinusLosses, UNREALIZED_COLS);\n this.checkSchema(categoriesToSell, ['category', 'delta']);\n\n const withHoldingType = unrealizedMinusLosses\n .withColumn('preference', r => {\n if (r.get('shortTermGainOrLoss') !== 0) {\n return 0;\n } else {\n return 1;\n }\n });\n\n let tickersToSell = [];\n categoriesToSell.map( row => {\n const tickers = portfolio[row.get('category')].tickers;\n const allForCategory = withHoldingType.filter(r => tickers.includes(r.get('ticker')));\n const grouped = allForCategory.groupBy('ticker', 'preference')\n .aggregate(g => g.stat.sum('marketValue'))\n .sortBy('preference');\n let totalToSell = -row.get('delta');\n grouped.toCollection().forEach( ticker => {\n const toSell = Math.min(ticker.aggregation, totalToSell);\n totalToSell -= toSell;\n if (toSell > 0) {\n tickersToSell.push({ ticker: ticker.ticker, delta: toSell });\n }\n });\n });\n\n return new DataFrame(tickersToSell)\n .groupBy('ticker')\n .aggregate(g => g.stat.sum('delta'))\n .rename('aggregation', 'delta');\n }", "function checkProductStock()\n{\n productListData.forEach(product => {\n if(product.in_stock == false)\n {\n document.getElementById(product.name).setAttribute(\"class\", \"soldoutCardImage position-relative d-inline-block mr-4 ml-3 mt-3\")\n document.getElementById(product.name).innerHTML = `\n \n <img src=\"${product.image}\" alt=\"\" class=\"position-absolute productCardImage\" style=\"\">\n <h6 class=\"position-absolute\" style=\"color: #707070; top: 85%; left: 50%; transform: translate(-50%,-50%); width:90%; text-align: center\">${product.name}: ${product.price} Baht</h6>\n <img src=\"/images/soldoutTag.svg\" alt=\"\" style=\"top: 40%; left: 12%\" class=\"position-absolute w-75 \">\n `\n }\n });\n}", "function query_sdPlus_priceSlab(item) {\n //console.log('query_sdPlus_priceSlab running. . .');\n var userDefined_priceSlab = parseInt(item.extraField2);\n var userDefined_sdPlus = item.extraField3;\n\n if (isLegit_vendorDTO_item(item)) {\n var price = item.commonMinProductDetailsDTO.priceInfo.finalPrice;\n var sdPlus = item.commonMinProductDetailsDTO.vendorDTO.sdPlus;\n if (userDefined_priceSlab && userDefined_sdPlus) {\n if (!sdPlus || price > userDefined_priceSlab) {\n return true;\n } else {\n return false;\n }\n } else if (userDefined_priceSlab) {\n if (price > userDefined_priceSlab) {\n return true;\n }\n } else if (userDefined_sdPlus) {\n //console.log('item pogId:', item.pogId);\n if (!sdPlus) {\n return true;\n }\n } else {\n return false;\n }\n }\n }", "function productToShow(){\n let currentProducts = [leftProduct, midProduct, rightProduct];\n\n while (currentProducts.includes(leftProduct)) {\n let index = randomIndex();\n leftProduct = Product.allProducts[index];\n }\n currentProducts.push(leftProduct);\n\n while (currentProducts.includes(midProduct)) {\n let index = randomIndex();\n midProduct = Product.allProducts[index];\n }\n currentProducts.push(midProduct);\n\n while (currentProducts.includes(rightProduct)) {\n let index = randomIndex();\n rightProduct = Product.allProducts[index];\n }\n currentProducts.push(rightProduct);\n\n leftProduct.renderProduct(leftNameElem, leftImgElem);\n midProduct.renderProduct(midNameElem, midImgElem);\n rightProduct.renderProduct(rightNameElem, rightImgElem);\n roundCounter++;\n roundElem.innerHTML = '';\n roundElem.textContent = `Round Number ${roundCounter}`;\n}", "function weightDisplay (arrOfProducts) {\n const htmlSegment = `<div class=\"product-box\" id = ${arrOfProducts[i].prodId}>\n <input type=\"checkbox\" name=\"book\" class = \"delete-checkbox\" id=\"delete-prod\">\n <h2>${arrOfProducts[i].prodSku} </h1>\n <h2>${arrOfProducts[i].prodName}</h2>\n <h2>${arrOfProducts[i].prodPrice} $</h2>\n <h2>Weight: ${arrOfProducts[i].propValue} KG</h2>\n \n</div>`\n i++\n\n return $('.book').slick('slickAdd', htmlSegment)\n}", "function ExchangeRingPullManageStock(exchangeRingPull) {\n //---Open Inventory type block \"Average Inventory\"---\n let totalCost = 0;\n // let exchangeRingPull = Invoices.findOne(exchangeRingPullId);\n let prefix = exchangeRingPull.stockLocationId + \"-\";\n let newItems = [];\n exchangeRingPull.items.forEach(function (item) {\n let inventory = AverageInventories.findOne({\n branchId: exchangeRingPull.branchId,\n itemId: item.itemId,\n stockLocationId: exchangeRingPull.stockLocationId\n }, {sort: {_id: -1}});\n if (inventory) {\n item.cost = inventory.price;\n //item.amountCost = inventory.price * item.qty;\n //item.profit = item.amount - item.amountCost;\n //totalCost += item.amountCost;\n newItems.push(item);\n let newInventory = {\n _id: idGenerator.genWithPrefix(AverageInventories, prefix, 13),\n branchId: exchangeRingPull.branchId,\n stockLocationId: exchangeRingPull.stockLocationId,\n itemId: item.itemId,\n qty: item.qty,\n price: inventory.price,\n remainQty: inventory.remainQty - item.qty,\n coefficient: -1,\n type: 'exchangeRingPull',\n refId: exchangeRingPull._id\n };\n AverageInventories.insert(newInventory);\n }\n else {\n var thisItem = Item.findOne(item.itemId);\n item.cost = thisItem.purchasePrice;\n //item.amountCost = thisItem.purchasePrice * item.qty;\n //item.profit = item.amount - item.amountCost;\n //totalCost += item.amountCost;\n newItems.push(item);\n let newInventory = {\n _id: idGenerator.genWithPrefix(AverageInventories, prefix, 13),\n branchId: exchangeRingPull.branchId,\n stockLocationId: exchangeRingPull.stockLocationId,\n itemId: item.itemId,\n qty: item.qty,\n price: thisItem.purchasePrice,\n remainQty: 0 - item.qty,\n coefficient: -1,\n type: 'exchangeRingPull',\n refId: exchangeRingPull._id\n };\n AverageInventories.insert(newInventory);\n }\n\n //---insert to Ring Pull Stock---\n let ringPullInventory = RingPullInventories.findOne({\n branchId: exchangeRingPull.branchId,\n itemId: item.itemId,\n });\n if (ringPullInventory) {\n RingPullInventories.update(\n ringPullInventory._id,\n {\n $inc: {qty: item.qty}\n });\n } else {\n RingPullInventories.insert({\n itemId: item.itemId,\n branchId: exchangeRingPull.branchId,\n qty: item.qty\n })\n }\n\n });\n //let totalProfit = exchangeRingPull.total - totalCost;\n ExchangeRingPulls.direct.update(\n exchangeRingPull._id,\n {$set: {items: newItems, totalCost: totalCost}}\n );\n //--- End Inventory type block \"Average Inventory\"---\n\n\n}", "static async _checkProductsAvailInStock(cart) {\n let invalid = '';\n const tempCart = (typeof cart !== 'object' ? cart.toObject() : cart);\n\n await ItemProductController._addProductsForSingleOrder(tempCart);\n _.each(tempCart.items, (item) => {\n // invalid sku\n if (!item.product) {\n invalid = item.sku;\n return false;\n }\n\n // if item is a product\n if (item.product.sku === item.sku) {\n if (item.count > item.product.stock_qty) {\n invalid = item.sku;\n return false;\n }\n\n return;\n }\n\n // if item is a product variation\n _.each(item.product.variations, (variation) => {\n if (variation.sku === item.sku) {\n if (item.count > variation.stock_qty) {\n invalid = item.sku;\n }\n\n return false;\n }\n });\n\n if (invalid !== '') {\n return false;\n }\n });\n\n return invalid;\n }", "function addStock(a, b) {\n data = $(\"#addStock_form\").serialize();\n data += \"&product=\" + String(a) + \"&byadmin=\" + String(b) + \"&class=Stock\";\n data = data.replace(/[&]/g, \"^\");\n prodnam = $(\".product_name.act\").html();\n $(\"#product-list\").css(\"opacity\", \"0\");\n console.log(prodnam);\n $(\"#addStock_form .textadjust\").val(\"\");\n $(\".btnmod\").css(\"visibility\", \"hidden\");\n dbOperations(\"\", \"add_operation\", data, [\"product_name\", \"stock\"], [\"#product-list\", \".pro-item .product_name\", prodnam]);\n $(\".createloadgif\").css(\"visibility\", \"visible\");\n $('.outputmod').css(\"display\", \"inline\");\n}", "function getStocks(stock) {\n\tconst apiURL = 'https://api.iextrading.com/1.0/stock/';\n\tconst params = '/batch?types=quote,news,chart&range=1m&last=1';\n\tconst queryURL = apiURL + stock + params;\n\t// return API data...\n return fetch(queryURL, {\n headers: new Headers({\n Accept: 'application/json'\n })\n })\n .then(res => res.json());\n}", "function recalculate_selected_suppliers()\n{\n\t//Empty present selected_suppliers_list \n\twhile (selected_suppliers_list.length>0) {selected_suppliers_list.pop();}\n\t//Iterate all products in order_list \n\t$.each(order_list, function(product_id, individual_product)\n\t{\n\t\t//Find the supplier id for this product \n\t\tsupplier_id = individual_product.selected_supplier;\n\t\t//If supplier is selected \n\t\tif (supplier_id!=-1)\n\t\t{\n\t\t\t//If selected_supplier_list contains then sum else initialize \n\t\t\tif (supplier_id in selected_suppliers_list) \n\t\t\t\tselected_suppliers_list[supplier_id].total = selected_suppliers_list[supplier_id].total + (individual_product.quantity * individual_product.selected_price);\n\t\t\telse\n\t\t\t\tselected_suppliers_list[supplier_id].total = individual_product.quantity * individual_product.selected_price;\n\t\t}\n\n\t});\n\t$.each(selected_suppliers_list, function(supplier_id, supplier_details)\n\t{\n\t\t//Based on total and MOV and Tolerance set the colors \n\t\tvar mov = suppliers_list[supplier_id].mov;\n\t\tvar tolerance = suppliers_list[supplier_id].tolerance;\n\t\tvar total = suppliers_list[supplier_id].total;\n\t\tif (total>=mov) \n\t\t\tselected_suppliers_list[supplier_id].color = 2; //GREEN\n\t\telse if (total>=(mov*(1-(tolerance/100))))\n\t\t\tselected_suppliers_list[supplier_id].color = 1; //YELLOW \n\t\telse\n\t\t\tselected_suppliers_list[supplier_id].color = 0; //RED\n\t});\n}", "show_stock_counts(){\n var content = document.body.textContent || document.body.innerText;\n var variantText = '{\"data\": ' +\n content.substring(content.indexOf(\"bisVariants\"), content.length).match(\"\\\\[[^\\\\]]*]\") + ' }';\n variantText = variantText.replaceAll(/[{]/g,\"{\\n \").replaceAll(/[}]/g,\" \\n}\")\n .replaceAll(/([a-zA-Z0-9-_]+): ([a-zA-Z0-9-]+)/g, \"\\\"$1\\\":\\\"$2\\\"\")\n .replaceAll(/([a-zA-Z0-9-_]+): (\"[a-zA-Z0-9- \\/\"]+)/g, \"\\\"$1\\\":$2\");\n var variants = JSON.parse(variantText);\n\n var cartForm = document.getElementsByClassName('AddToCartForm')[0];\n variants.data.forEach(stock => {\n var el = cartForm.querySelector('[for=\"add_'+ stock['id'] +'\"]');\n if (el) {\n el.innerText = el.innerText.trim().substring(el.innerText.trim().indexOf(\"\\n\") + 1);\n el.innerHTML = el.innerHTML + '<span class=\"stonks\">(' + stock['qty'] + ')</span>';\n }\n });\n }", "function stockCalculation(data) {\r\n const table = document.querySelector('#stockCalc');\r\n\r\n //clear table\r\n table.innerHTML = \"\";\r\n\r\n //creating table rows \r\n const average = table.insertRow(0);\r\n const minimum = table.insertRow(1);\r\n const maximum = table.insertRow(2);\r\n\r\n //create table cells for row 1\r\n let avg = average.insertCell(0);\r\n let avg_open = average.insertCell(1);\r\n let avg_close = average.insertCell(2);\r\n let avg_low = average.insertCell(3);\r\n let avg_high = average.insertCell(4);\r\n let avg_vol = average.insertCell(5);\r\n\r\n //create table cells for row 2\r\n let min = minimum.insertCell(0);\r\n let min_open = minimum.insertCell(1);\r\n let min_close = minimum.insertCell(2);\r\n let min_low = minimum.insertCell(3);\r\n let min_high = minimum.insertCell(4);\r\n let min_vol = minimum.insertCell(5);\r\n\r\n //create table cells for row 3\r\n let max = maximum.insertCell(0);\r\n let max_open = maximum.insertCell(1);\r\n let max_close = maximum.insertCell(2);\r\n let max_low = maximum.insertCell(3);\r\n let max_high = maximum.insertCell(4);\r\n let max_vol = maximum.insertCell(5);\r\n\r\n //assign content to cells\r\n avg.textContent = \"Average\";\r\n min.textContent = \"Min\";\r\n max.textContent = \"Max\";\r\n\r\n //sort through open, close, high, low and volume and return list of sorted numbers\r\n //then assign min and max to cells\r\n\r\n const sortedOpen = data.sort((a, b) => {\r\n return a.open < b.open ? -1 : 1;\r\n });\r\n\r\n const minOpen = parseFloat(sortedOpen[0].open);\r\n const maxOpen = parseFloat(sortedOpen[sortedOpen.length - 1].open);\r\n min_open.textContent = minOpen.toFixed(4);\r\n max_open.textContent = maxOpen.toFixed(4);\r\n\r\n\r\n const sortedClose = data.sort((a, b) => {\r\n return a.close < b.close ? -1 : 1;\r\n });\r\n\r\n const minClose = parseFloat(sortedClose[0].close);\r\n const maxClose = parseFloat(sortedClose[sortedClose.length - 1].close);\r\n min_close.textContent = minClose.toFixed(4);\r\n max_close.textContent = maxClose.toFixed(4);\r\n\r\n\r\n const sortedLow = data.sort((a, b) => {\r\n return a.low < b.low ? -1 : 1;\r\n });\r\n\r\n const minLow = parseFloat(sortedLow[0].low);\r\n const maxLow = parseFloat(sortedLow[sortedLow.length - 1].low);\r\n min_low.textContent = minLow.toFixed(4);\r\n max_low.textContent = maxLow.toFixed(4);\r\n\r\n\r\n const sortedHigh = data.sort((a, b) => {\r\n return a.high < b.high ? -1 : 1;\r\n });\r\n\r\n const minHigh = parseFloat(sortedHigh[0].high);\r\n const maxHigh = parseFloat(sortedHigh[sortedHigh.length - 1].high);\r\n min_high.textContent = minHigh.toFixed(4);\r\n max_high.textContent = maxHigh.toFixed(4);\r\n\r\n\r\n const sortedVolume = data.sort((a, b) => {\r\n return a.volume < b.volume ? -1 : 1;\r\n });\r\n\r\n\r\n const minVol = sortedVolume[0].volume;\r\n const maxVol = sortedVolume[sortedVolume.length - 1].volume;\r\n min_vol.textContent = numberCommas(minVol);\r\n max_vol.textContent = numberCommas(maxVol);\r\n\r\n //calculate avg and populate cells\r\n let total = 0;\r\n for (let i = 0; i < data.length; i++) {\r\n total += parseFloat(data[i].open);\r\n }\r\n\r\n let avgOpen = (total / data.length).toFixed(4);\r\n avg_open.textContent = avgOpen;\r\n\r\n total = 0;\r\n for (let i = 0; i < data.length; i++) {\r\n total += parseFloat(data[i].close);\r\n }\r\n\r\n const avgClose = (total / data.length).toFixed(4);\r\n avg_close.textContent = avgClose;\r\n\r\n total = 0;\r\n for (let i = 0; i < data.length; i++) {\r\n total += parseFloat(data[i].low);\r\n }\r\n\r\n const avgLow = (total / data.length).toFixed(4);\r\n avg_low.textContent = avgLow;\r\n\r\n total = 0;\r\n for (let i = 0; i < data.length; i++) {\r\n total += parseFloat(data[i].high);\r\n }\r\n\r\n const avgHigh = (total / data.length).toFixed(4);\r\n avg_high.textContent = avgHigh;\r\n\r\n total = 0;\r\n for (let i = 0; i < data.length; i++) {\r\n total += parseFloat(data[i].volume);\r\n }\r\n\r\n const avgVol = (total / data.length).toFixed(4);\r\n avg_vol.textContent = avgVol;\r\n\r\n //pass data into B chart\r\n displayChartB(minOpen, maxOpen, avgOpen,\r\n minClose, maxClose, avgClose,\r\n minLow, maxLow, avgLow,\r\n minHigh, maxHigh, avgHigh);\r\n\r\n }", "function viewProducts() {\n connection.query(\"SELECT item_id, product_name, department_name, price, stock_quantity FROM products\", function (err, res) {\n console.log(\"Products for sale\");\n for (var i = 0; i < res.length; i++) {\n console.log(\"======================\");\n console.log(\"Id: \" + res[i].item_id + \" || Department: \" + res[i].department_name + \" || Product: \" + res[i].product_name + \" || Price($): \" + parseFloat(res[i].price).toFixed(2) + \" || In stock: \" + res[i].stock_quantity);\n }\n });\n displayChoices();\n}", "function selectNextProductSet() {\n //move current product set to previous\n previouslyDisplayedProductIndex[0] = currentlyDisplayedProductIndex.pop();\n previouslyDisplayedProductIndex[1] = currentlyDisplayedProductIndex.pop();\n previouslyDisplayedProductIndex[2] = currentlyDisplayedProductIndex.pop();\n do {\n var aRandomArrayIndex = Math.floor(Math.random() * product.length);//random product\n if (!previouslyDisplayedProductIndex.includes(aRandomArrayIndex) &&\n !currentlyDisplayedProductIndex.includes(aRandomArrayIndex)) {\n currentlyDisplayedProductIndex.push(aRandomArrayIndex);\n }\n } while (currentlyDisplayedProductIndex.length < 3);\n}", "function Product(name, price, inStock) {\n this.prodName = name;\n this.price = price;\n this.inStock = inStock;\n\n this.setStock = function(stock) {\n this.inStock = stock;\n }\n}", "function update(product, shade){\r\n\tdocument.getElementById('sel').innerHTML = \" Selected\";\r\n\tif(product == 'fxtreme'){\r\n\t\tdocument.getElementById('product').value = \"fxtreme\";\r\n\t\tdocument.getElementById('simg').src = \"images/1.png\";\r\n\t\tdocument.getElementById('stitle1').innerHTML = \"Firecherry Xtreme\";\r\n\t\tdocument.getElementById('sprice').innerHTML = \"AUD 1200\";\r\n\t}\r\n\telse\r\n\tif(product == 'fxtremeplus'){\r\n\t\tdocument.getElementById('product').value = \"fxtremeplus\";\r\n\t\tdocument.getElementById('simg').src = \"images/2.jpg\";\r\n\t\tdocument.getElementById('stitle1').innerHTML = \"Firecherry Xtreme Plus\";\r\n\t\tdocument.getElementById('sprice').innerHTML = \"AUD 1500\";\r\n\t}\r\n\telse\r\n\tif(product == 'elegantone'){\r\n\t\tdocument.getElementById('product').value = \"elegantone\";\r\n\t\tdocument.getElementById('simg').src = \"images/3.jpg\";\r\n\t\tdocument.getElementById('stitle1').innerHTML = \"Elegant One\";\r\n\t\tdocument.getElementById('sprice').innerHTML = \"AUD 1000\";\r\n\t}\r\n\telse\r\n\tif(product == 'elegantones'){\r\n\t\tdocument.getElementById('product').value = \"elegantones\";\r\n\t\tdocument.getElementById('simg').src = \"images/4.jpg\";\r\n\t\tdocument.getElementById('stitle1').innerHTML = \"Elegant One S\";\r\n\t\tdocument.getElementById('sprice').innerHTML = \"AUD 800\";\r\n\t}\r\n\telse\r\n\tif(product == 'alphax'){\r\n\t\tdocument.getElementById('product').value = \"alphax\";\r\n\t\tdocument.getElementById('simg').src = \"images/5.png\";\r\n\t\tdocument.getElementById('stitle1').innerHTML = \"Alpha X\";\r\n\t\tdocument.getElementById('sprice').innerHTML = \"AUD 500\";\r\n\t}\r\n\telse\r\n\tif(product == 'fnano'){\r\n\t\tdocument.getElementById('product').value = \"fnano\";\r\n\t\tdocument.getElementById('simg').src = \"images/6.jpg\";\r\n\t\tdocument.getElementById('stitle1').innerHTML = \"Firecherry Nano\";\r\n\t\tdocument.getElementById('sprice').innerHTML = \"AUD 400\";\r\n\t}\r\n\telse\r\n\tif(product == 'fnanos'){\r\n\t\tdocument.getElementById('product').value = \"fnanos\";\r\n\t\tdocument.getElementById('simg').src = \"images/7.png\";\r\n\t\tdocument.getElementById('stitle1').innerHTML = \"Firecherry Nano S\";\r\n\t\tdocument.getElementById('sprice').innerHTML = \"AUD 300\";\r\n\t}\r\n\telse\r\n\tif(product == 'jugnaut'){\r\n\t\tdocument.getElementById('product').value = \"jugnaut\";\r\n\t\tdocument.getElementById('simg').src = \"images/8.jpg\";\r\n\t\tdocument.getElementById('stitle1').innerHTML = \"Juggernaut\";\r\n\t\tdocument.getElementById('sprice').innerHTML = \"AUD 1800\";\r\n\t}\r\n\telse\r\n\tif(product == 'jugnautmini'){\r\n\t\tdocument.getElementById('product').value = \"jugnautmini\";\r\n\t\tdocument.getElementById('simg').src = \"images/9.jpg\";\r\n\t\tdocument.getElementById('stitle1').innerHTML = \"Juggernaut Mini\";\r\n\t\tdocument.getElementById('sprice').innerHTML = \"AUD 1600\";\r\n\t}\r\n\r\n\tif(shade == 'vb'){\r\n\t\tdocument.getElementById('shade').value = \"vb\";\r\n\t\tdocument.getElementById('stitle2').innerHTML = \"Void Black\";\r\n\t}\r\n\telse\r\n\tif (shade == 'fw'){\r\n\t\tdocument.getElementById('shade').value = \"fw\";\r\n\t\tdocument.getElementById('stitle2').innerHTML = \"Frost White\";\r\n\t}\r\n\telse\r\n\tif (shade == 'cg'){\r\n\t\tdocument.getElementById('shade').value = \"cg\";\r\n\t\tdocument.getElementById('stitle2').innerHTML = \"Carbon Grey\";\r\n\t}\r\n\telse\r\n\tif (shade == 'mb'){\r\n\t\tdocument.getElementById('shade').value = \"mb\";\r\n\t\tdocument.getElementById('stitle2').innerHTML = \"Mediterranean Blue\";\r\n\t}\r\n\telse\r\n\tif (shade == 'rp'){\r\n\t\tdocument.getElementById('shade').value = \"rp\";\r\n\t\tdocument.getElementById('stitle2').innerHTML = \"Rose Pink\";\r\n\t}\r\n}", "function viewLowInventory(){\n // query products table and return ids of products\n // with stock lower than 5 \n connection.query('SELECT * FROM products WHERE stock_quantity<=5',function(err,results){\n if(err) throw err;\n resultsToTable(results);\n });\n\n connection.end();\n\n}", "function lowInventory() {\n connection.query(\"SELECT `product_name`, `stock_quantity` FROM `products` WHERE `stock_quantity`< 20 ORDER BY `stock_quantity` DESC;\", function(err, results) {\n if (err)\n throw err;\n console.log(results)\n });\n }", "stockProduct (e) {\n // stock\n\n let orderUpdate, newOrderId, saveClientOrder\n newOrderId = JSON.parse(localStorage.getItem('newOrderId'))\n orderUpdate = JSON.parse(localStorage.getItem('orderUpdate'))\n if (orderUpdate !== null && saveClientOrder !== null) {\n orderUpdate.unshift({ status: \"En préparation\", orderId: newOrderId })\n\n saveClientOrder = this.state.appStateClients\n saveClientOrder.forEach(client => {\n if (client.id == this.state.currentUser) {\n client.order = [...client.order, orderUpdate]\n }\n })\n\n localStorage.setItem('AppStateClients', JSON.stringify(saveClientOrder))\n localStorage.setItem('newOrderId', JSON.stringify(newOrderId + 1))\n\n // nettoie\n ;[...this.shopRef.current.children].forEach(e => {\n e.children[0].children[0].children[2].children[1].value = \"\"\n console.log(e.children[0].children[0].children[2].children[1]);\n })\n\n // document.querySelectorAll('.jsx_InputQuantityArticleShop').forEach(e => e.value = \"\")\n\n localStorage.removeItem('orderUpdate')\n this.forceUpdate()\n\n }\n }", "function renderProduct(product, productGrid, brTrkData, sequance) {\r\n \r\n\r\n /* Set product div class */\r\n var productClassName = '';\r\n if (location.href.toLowerCase().indexOf('justforyou.aspx') > 0 || location.href.toLowerCase().indexOf('noresult.aspx') > 0 || location.href.toLowerCase().indexOf('trending.aspx') > 0) {\r\n if (sequance % 4 == 3)\r\n productClassName = 'product_item last';\r\n else\r\n productClassName = 'product_item';\r\n }\r\n else {\r\n if (sequance % 3 == 2)\r\n productClassName = 'product_item last';\r\n else\r\n productClassName = 'product_item';\r\n }\r\n /* Set price div */\r\n var priceText = '';\r\n if (product.price == product.sale_price) {\r\n priceText = '<span class=\"price_original\">$' + product.price.toFixed(2) + '</span>';\r\n }\r\n else {\r\n priceText = '<span class=\"price_original\">was : $' + product.price.toFixed(2) + '</span>' +\r\n '<br>' +\r\n '<span class=\"price_sale\">now : $' + product.sale_price.toFixed(2) + '</span>'; //+\r\n //'<span class=\"price_discount_rate\">' + '% off</span>';\r\n }\r\n\r\n\t//item tags\r\n var itemtag1 = product.flags ? product.flags.itemtag1 : '';\r\n var itemtag2 = product.flags ? product.flags.itemtag2 : '';\r\n var itemtag3 = product.flags ? product.flags.itemtag3 : '';\r\n var itemtag4 = product.flags ? product.flags.itemtag4 : '';\r\n var itemtag5 = product.flags ? product.flags.itemtag5 : '';\r\n\tvar itemBrand = product.brand;\r\n\r\n /* Set image tag */\r\n var imageTag = '';\r\n\t\r\n\t// brand tag\r\n\tvar brandTag = '';\r\n\r\n\t// back in stock tag\r\n\tvar backInStockTag = '';\r\n\r\n\tif(itemtag1 != ''){\t\t\r\n\t\timageTag = '<span class=\"label\">' + getItemTagUrl(itemtag1,itemBrand) + '</span>';\r\n\t}\r\n\t\r\n\tvar topAreaTag = '';\r\n\t\r\n\tif(itemtag2 != '')\r\n\t{\r\n\t\tbrandTag = getItemTagUrl(itemtag2, itemBrand);\r\n }\r\n\r\n if (itemtag3 != '') {\r\n backInStockTag = getItemTagUrl(itemtag3, itemBrand);\r\n }\r\n\t\r\n\tif(itemtag5 != ''){\r\n\t\ttopAreaTag = getTopAreaBanner(itemtag5, itemBrand);\r\n\t}\r\n\t\r\n var mouseoverEvent = \"onmouseover=\\\"fnChangeProductImageForMouseEvent(this, '\" + product.thumb_image.replace('1_front', '7_additional') + \"')\\\"\";\r\n var mouseoutEvent = \"onmouseout=\\\"fnChangeProductImageForMouseEvent(this, '\" + product.thumb_image + \"')\\\"\";\r\n\t\r\n\tvar defaultCategory = '';\r\n\tvar productUrl = '';\r\n\t\r\n\tproductUrl = product.url;\r\n\r\n\tif(productUrl != '')\r\n\t{\t\t\t\t\r\n\t\tvar n1 = productUrl.indexOf(\"&category=\");\t\r\n\t\tvar n2 = productUrl.indexOf(\"&productid=\");\r\n\t\t\r\n\t\tdefaultCategory = productUrl.substring(n1+10,n2);\r\n\t}\r\n\t\r\n\tif(defaultCategory == '')\r\n\t\tdefaultCategory = 'top';\r\n\t\r\n\t\r\n /* Set swatch images */\r\n\tvar renderedSwatch = '';\r\n\tvar productID = '';\r\n\t\r\n\tproductID = product.pid;\r\n\t\r\n\tvar image_id = \"image_\" + productID;\r\n\r\n\tif (product.variants && product.variants.length > 1)\r\n\t{\r\n\t\tvar variantID = '';\r\n\t\tvar sku = productID.substring(2,10);\r\n\r\n\t\t\r\n\t\trenderedSwatch = '<div class=\"info\">';\r\n\t\t\r\n\t\tfor(var i=0; i < product.variants.length;i++)\r\n\t\t{\t\t\t\r\n\t\t\tvar variant = product.variants[i];\r\n\t\t\t\r\n\t\t\tvar n1 = variant.sku_thumb_images[0].indexOf(\"-\");\t\r\n\t\t\tvar n2 = variant.sku_thumb_images[0].indexOf(\".jpg\");\r\n\t\t\t\r\n\t\t\tvariantID = variant.sku_thumb_images[0].substring(n1+1,n2);\r\n\t\t\t\r\n\t\t\tvar swatchImage = \"http://www.forever21.com/images/sw_22/\" + sku + \"-\" + variantID + \".jpg\";\r\n\t\t\t\r\n\t\t\tif( i > 0)\r\n\t\t\t\trenderedSwatch += \" \";\r\n\t\t\t\t\r\n\t\t\tif( i > 4)\r\n\t\t\t{\r\n\t\t\t\trenderedSwatch += \"<a rel='nofollow' href=\\\"javascript:showPopWin('/Product/product_pop.aspx?BR=\" + itemBrand + \"&Category=\" + defaultCategory + \"&ProductID=\" + productID + \"&VariantID=',730,550,null,'center');\\\"><font style='text-decoration:underline; color:#696969;'>MORE</font></a>\";\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\trenderedSwatch += \"<a rel='nofollow' href=\\\"javascript:showPopWin('/Product/product_pop.aspx?BR=\" + itemBrand + \"&Category=\" + defaultCategory + \"&ProductID=\" + productID + \"&VariantID=\" + variantID + \"',730,550,null,'center');\\\" onMouseOver=\\\"javascript:fnChangeProductImage('\" + image_id + \"', '\" + variantID + \"');\\\" onMouseOut=\\\"javascript:fnChangeProductImage('\" + image_id + \"', '\" + variantID + \"');\\\"><img src='\" + swatchImage + \"' style='width:22px;height:22px;' /></a>\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\trenderedSwatch += '</div>';\r\n\t\t\t\t\r\n\t}\r\n\r\n\t\r\n /* Set brand tag */\r\n var productCell = $([\r\n '<div class=\"' + productClassName + '\">',\r\n '<div class=\"item_pic\">',\t\t\t\t\t\t\t\t\r\n '<a href=\"' + product.url + '\">',\r\n '<img src=\"', product.thumb_image, '\" ' + mouseoverEvent + ' ' + mouseoutEvent + ' id=\\\"' + image_id + '\\\" />',\r\n '</a>',\r\n// '<a href=\"#\"><div class=\"sold_out\"><span class=\"title\">sold out</span><span class=\"addtowait\">add to waitlist</span></div></a>',\r\n '<a class=\"play\" href=\"', \"javascript:showPopWin('/Product/product_pop.aspx?BR=\" + itemBrand + \"&Category=\" + defaultCategory + \"&ProductID=\" + productID + \"&VariantID=',730,550,null,'center')\", '\" >',\r\n '<img src=\"Images/en/common/QuickView_corner_FINAL.gif\">',\r\n '</a>',\r\n\t\t\t\t\t\t\t\ttopAreaTag + \r\n '</div>',\r\n\t\t\t\t\t\t\timageTag,\t\t\t\t\t\t\t\t\r\n '<div class=\"info\">',\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n '<span class=\"brand_name\">',\r\n '<h1>' + brandTag + '</h1>',\r\n '</span>',\r\n '<span class=\"product_name\">',\r\n '<h2>' + product.title + '</h2>',\r\n '</span>',\r\n '<div class=\"wrapper_price\">',\r\n priceText,\r\n '</div>',\r\n '<div>',\r\n backInStockTag,\r\n '</div>',\r\n '</div>',\t\r\n\t\t\t\t\t\t\trenderedSwatch,\r\n '</div>'\t\t\t\t\t\t\r\n ].join(''));\r\n productCell.data('brTrkData', brTrkData);\r\n productGrid.append(productCell);\r\n}", "function getStock() {\n connection.query(\n \"SELECT * FROM products WHERE product_name = ?\",\n [userProductChoice],\n function(error,results,fields) {\n if (error) throw error;\n userProductQuantity = parseInt(results[0].stock_quantity);\n totalQuantity = userProductQuantity + addStockAmount;\n\n updateDatabase();\n }\n ); // close SQL query\n\n function updateDatabase() {\n connection.query(\n \"UPDATE products SET stock_quantity = ? WHERE product_name = ?\",\n [totalQuantity , userProductChoice],\n function(error, results, fields) {\n if (error) throw error;\n console.log(userProductChoice + \" stock updated!\");\n }\n ); // close SQL query\n connection.end(); // ends SQL connection\n }; // close updateDatabase()\n }", "function chooseProduct(el){\n return searchProduct($(el).closest(\"section\").data(\"store\"), $(el).data(\"productid\"));\n }", "function viewLow() {\n //look in database for items less or equal to 5 and display them\n connection.query(\"SELECT * FROM products WHERE stock_quantity<=?\", [5], function (err, res) {\n if (err) throw err;\n\n var table = new Table({\n head: [\"ID\", \"PRODUCT NAME\", \"DEPARTMENT NAME\", \"PRICE\", \"STOCK\"]\n , colWidths: [5, 30, 20, 10, 10]\n });\n for (var i = 0; i < res.length; i++) {\n table.push([res[i].id, res[i].product_name, res[i].department_name, res[i].price, res[i].stock_quantity]);\n }\n console.log(table.toString());\n listChoices();\n })\n}", "function selectOneStock(arrBestMatches) {\n $(\"#stockList\").empty();\n\n if (arrBestMatches.length == 0) {\n // alert(\"The company does not have a stock symbol\");\n $(\"#stockList\").text(\"0 results found\");\n return;\n }\n\n var usMatches = [];\n var maxMatches = arrBestMatches.length;\n if (maxMatches > 75) {\n maxMatches = 75;\n }\n for (i = 0; i < maxMatches; i++) {\n if (arrBestMatches[i][\"4. region\"] === \"United States\") {\n var objComp = {\n symbol: arrBestMatches[i][\"1. symbol\"],\n name: arrBestMatches[i][\"2. name\"],\n };\n usMatches.push(objComp);\n //console.log(objComp);\n }\n }\n\n if (usMatches.length == 1) {\n currentSymbol = usMatches[0].symbol;\n currentCompany = usMatches[0].name;\n weeklyDate = [];\n weeklyValue = [];\n buildCompanyInfo();\n buildStockInfo();\n buildNewsInfo();\n localStorage.setItem(\"key1\", currentSymbol);\n localStorage.setItem(\"key2\", currentCompany);\n return;\n }\n\n for (var i = 0; i < usMatches.length; i++) {\n var bStk = $(\"<button>\")\n .attr(\"type\", \"submit\")\n .attr(\"name\", usMatches[i].name)\n .attr(\"class\", \"btnColor\")\n .attr(\"id\", usMatches[i].symbol)\n .text(usMatches[i].symbol + \" \" + usMatches[i].name)\n .click(function generatePage() {\n currentSymbol = this.id;\n currentCompany = this.name;\n weeklyDate = [];\n weeklyValue = [];\n\n buildCompanyInfo();\n buildStockInfo();\n buildNewsInfo();\n localStorage.setItem(\"key1\", currentSymbol);\n localStorage.setItem(\"key2\", currentCompany);\n // alert(\"Symbol \" + this.id + \" has been selected\");\n // return this.id;\n });\n $(\"#stockList\").append(bStk);\n }\n }", "getTechnicalIndicator() {\n if(this.state.stock_ticker === \"SHW\") return [\"SMA\",\"Time Series\"]\n return [\"RSI\", \"SMA\", \"VWAP\", \"Time Series\"];\n }", "function displayprice(){\r\n subtotal=0;\r\n weight=0;\r\n quantity=0;\r\n\r\n var selectboxofoctupus = document.getElementById(\"selectboxwholeoctupus\");\r\n var rowwholeoctupus = document.getElementById(\"newitem\");\r\n //https://thisinterestsme.com/check-element-exists-javascript/\r\n if (typeof(rowwholeoctupus) !=undefined && rowwholeoctupus !=null){\r\n if (selectboxofoctupus.checked){\r\n subtotal = subtotal + parseFloat(document.getElementById(\"priceofoctupus\").value * document.getElementById(\"display\").value);\r\n quantity = quantity + parseFloat(document.getElementById(\"display\").value);\r\n weight = weight + parseFloat(document.getElementById(\"weightofoctupus\").value * (document.getElementById(\"display\").value) );\r\n }\r\n }\r\n \r\n\r\n var selectboxofslicedoctupus = document.getElementById(\"checkboxforslicedoctupus\");\r\n var rowslicedoctupus = document.getElementById(\"newitemslicedoctupus\");\r\n\r\n if (typeof(rowslicedoctupus) != undefined && rowslicedoctupus != null){\r\n if (checkboxforslicedoctupus.checked){\r\n subtotal = subtotal + parseFloat(document.getElementById(\"priceslicedoctupus\").value * document.getElementById(\"display1\").value);\r\n quantity = quantity + parseFloat(document.getElementById(\"display1\").value);\r\n weight = weight + parseFloat(document.getElementById(\"weightslicedoctupus\").value * (document.getElementById(\"display1\").value));\r\n }\r\n }\r\n \r\n var selectboxofcookedctupus = document.getElementById(\"checkboxcookedoctupus\");\r\n var rowscookedoctupus = document.getElementById(\"newitemcookedoctupus\");\r\n if (typeof(rowscookedoctupus) != undefined && rowscookedoctupus != null){\r\n if(selectboxofcookedctupus.checked){\r\n subtotal = subtotal + parseFloat(document.getElementById(\"pricecookedoctupus\").value * document.getElementById(\"display2\").value);\r\n quantity = quantity + parseFloat(document.getElementById(\"display2\").value);\r\n weight = weight + parseFloat(document.getElementById(\"weightcookedoctupus\").value * (document.getElementById(\"display2\").value));\r\n }\r\n }\r\n\r\n var selectboxofnormaloctupus = document.getElementById(\"checkboxfornormaloctupus\");\r\n var rownormaloctupus = document.getElementById(\"newitemnormaloctupus\");\r\n if (typeof(rownormaloctupus) !=undefined && rownormaloctupus != null){\r\n if(selectboxofnormaloctupus.checked){\r\n subtotal = subtotal + parseFloat(document.getElementById(\"pricenormaloctupus\").value * document.getElementById(\"displaynormaloctupus\").value);\r\n quantity = quantity + parseFloat(document.getElementById(\"displaynormaloctupus\").value);\r\n weight = weight + parseFloat(document.getElementById(\"weightnormaloctupus\").value * (document.getElementById(\"displaynormaloctupus\").value));\r\n\r\n }\r\n }\r\n \r\n\r\n document.getElementById(\"displayinfo\").innerHTML =\"The total price is \"+subtotal+\". The total quanity is \"+quantity+\" items. The total weight is \"+weight + \"g\";\r\n}", "function getProductGridPrices() {\n\tvar POP = \"value-add\";\n\tvar dr_pid =\"\";\n\tvar stx_store = false;\n\tvar dr_locale = \"\";\n\tvar ecomm_currency = \"\";\n\tvar ecomm_locale = getEcommLocale();\n\tif (ecomm_locale !=\"\"){ \n\t\tstx_store = true;\n\t} else { \n\t\treturn;\n\t}\n\tfor (i = 0; i < ecommLocaleMap.ecommLocalesList.length; i++) {\n\t\tif (ecommLocaleMap.ecommLocalesList[i].ecommLocale == ecomm_locale){\n\t\t\tdr_locale = ecommLocaleMap.ecommLocalesList[i].drLocale;\n\t\t\tecomm_currency = ecommLocaleMap.ecommLocalesList[i].currency;\n\t\t}\n\t}\n\t// cache the pricing div and pid for all \"sku\" items that have them\n\tvar productGridItems = [];\n\t$('.teaser-product-grid-item-pid').each( function(i) {\n\t\tproductGridItem = {};\n\t\tproductGridItem.div = $(this).parent();\n\t\tproductGridItem.pid = $(this).val();\n\t\tproductGridItems.push(productGridItem);\n\t});\n\t\n\tif (productGridItems.length > 0) {\n\t\t// build list of pids\n\t\tvar productGridPids = [];\n\t\tfor (var i = 0; i < productGridItems.length; i++) {\n\t\t\tif(productGridItems[i].pid.length > 0){\n\t\t\t\tproductGridPids.push(productGridItems[i].pid);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// get data from dr and update page. Assumes all \"sku\" items have a valid pid.\n\t\tif (productGridPids.length > 0) {\n\t\t\tvar drURL = \"/ww/jsp/common/drproduct.jsp?drProductId=\" + productGridPids +'&drLocale=' + dr_locale + '&currency=' + ecomm_currency;\n\t\t\t$.getJSON (drURL, function(data) {\n\t\t\t\tfor (var j = 0; j < productGridItems.length; j++) {\n\t\t\t\t\tvar storeProduct = getStoreProduct(productGridItems[j].pid, data.storeProduct);\n\t\t\t\t\tif (storeProduct != null) {\n\t\t\t\t\t\tif(storeProduct.price != storeProduct.discountedPrice) {\n\t\t\t\t\t\t\t// if on sale\n\t\t\t\t\t\t\t$(productGridItems[j].div).append(\"<div class='price-discount-message'>\" + labels.sale + \"</div><div class='price-discount'>\" + storeProduct.discountedPrice + \"</div><div class='price sale'>\" + storeProduct.price + \"</div>\");\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$(productGridItems[j].div).append(\"<div class='price'>\" + storeProduct.price + \"</div>\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t \t\t$('.teaser-product-grid').find('.teaser-product-grid-item-pid').each( function() {\n\t \t\t\tdr_pid = $(this).attr('value');\n\t \t\t\t$(this).parents('div.teaser-product-grid-item').find('a.teaser-product-grid-item-button').attr('href', 'http://shop.seagate.com/store/sgateus/' + dr_locale + '/buy/productID.' + dr_pid + '/quantity.1/Currency.' + ecomm_currency);\t\n\t \t\t});\n\t\t}\n\t}\n}", "function changeSelect(stk) \n\n{\n // This variable stores the option selected by the user from the dropdown\n const typeOfChart = document.getElementById('typeOfChart').value;\n\n const results = stk;\n\n // delaring an empty list which does a look up on the json and stores the data\n dataToShow = []\n\n // conditional statement to update the chart with values bbased upon user selection\n if(typeOfChart === 'Open') \n {\n dataToShow = results.map(row=> row.Open)\n } \n else if(typeOfChart === 'Low') \n {\n dataToShow = results.map(row=> row.Low)\n } \n else if(typeOfChart === 'High') \n {\n dataToShow = results.map(row=> row.High)\n } \n else if(typeOfChart === 'Close') \n {\n dataToShow = results.map(row=> row.Close)\n } \n else if(typeOfChart === 'Adj_Close') {\n dataToShow = results.map(row=> row.Adj_Close)\n }\n\n// This variable is used to display the frame after an option is selected\nvar newOptions = {\n \n series: [{\n name: \"Stock Prices\",\n data: dataToShow\n }],\n\n chart: {\n height: 500,\n width: 1000,\n type: 'line',\n zoom: {enabled: false}\n },\n dataLabels: {enabled: false},\n stroke: {curve: 'straight'},\n title: {\n text: 'Lumber Futures Stock Price',\n align: pos,\n style: {fontSize: '24px'}\n },\n grid: {\n row: {\n colors: ['#f3f3f3', 'transparent'], // takes an array which will be repeated on columns\n opacity: 0.5\n },\n },\n xaxis: {categories: results.map(row=> row.Date),}\n };\n\n chart.updateOptions (newOptions, true, true, true)\n }", "function pick3Products() {\n let noProducts = [leftProduct, middleProduct, rightProduct];\n while (noProducts.includes(leftProduct)) {\n let leftProductIndex = Math.floor(Math.random() * Product.possibleProducts.length);\n leftProduct = Product.possibleProducts[leftProductIndex];\n }\n\n while (middleProduct === leftProduct || middleProduct === rightProduct || noProducts.includes(middleProduct)) {\n let middleProductIndex = Math.floor(Math.random() * Product.possibleProducts.length);\n middleProduct = Product.possibleProducts[middleProductIndex];\n }\n \n while (rightProduct === leftProduct || rightProduct === middleProduct || noProducts.includes(rightProduct)) {\n let rightProductIndex = Math.floor(Math.random() * Product.possibleProducts.length);\n rightProduct = Product.possibleProducts[rightProductIndex];\n }\n\n leftProduct.renderSingleProduct(leftImgElem, leftH3Elem);\n middleProduct.renderSingleProduct(middleImgElem, middleH3Elem);\n rightProduct.renderSingleProduct(rightImgElem, rightH3Elem);\n}", "'BUY_STOCK' (state, {stockId, quantity, stockPrice}) {\n // check to see if I already own the stock, to increase instead of create\n const record = state.stocks.find(element => element.id === stockId);\n if (record) {\n record.quantity += quantity;\n } else {\n let currentStock = { id: stockId, quantity: quantity };\n state.stocks.push(currentStock);\n }\n state.funds -= stockPrice * quantity;\n }", "function cateFilter() {\r\n var brandVal = document.querySelectorAll('input[name=\"category\"]:checked');\r\n var brandData = [];\r\n brandVal.forEach((elem) => {\r\n elem.checked ? brandData.push(elem.value) : null ;\r\n })\r\n var resultBrand = []; \r\n brandData.forEach((val) => {\r\n resultBrand = resultBrand.concat(productData.filter((product) => product.category.includes(val)))\r\n \r\n })\r\n brandData.length!==0? cards(resultBrand):cards(productData)\r\n \r\n}", "function getProduct() {\n\n let product = 0;\n let selectedProduct = document.querySelectorAll(\"input[type=checkbox]\");\n\n for (let i = 0; i < selectedProduct.length; i++) {\n if (selectedProduct[i].checked) {\n product += productArray[selectedProduct[i].value] || 0;\n }\n }\n return product;\n}", "function lowinventory(){\n //mysql query to select the colomns to view product table\n connection.query(\"select item_id , product_name, stock_quantity from products where stock_quantity < 5 \",\n function(err,res){\n if(err)throw err;\n console.log(\"\\n\"+ \"Item Id\"+colomnspace(6) + \"Product Name\" + colomnspace(23) + \"Stock Quantity\"+\"\\n\")\n for (var j = 0; j < res.length ; j++){\n //product name length \n var y=(res[j].product_name).length;\n //item id length\n var z=(res[j].item_id).toString().length;\n //var x=(res[j].price).toString().length;\n console.log(res[j].item_id + colomnspace(13-z) + res[j].product_name + colomnspace(35-y)+res[j].stock_quantity );\n }\n //to end database connection\n connection.end(); \n });\n \n \n}", "function getStock(){\n var items = [\n {\"Name\":\"appals\", \"Farmer\": \"Gal\", \"stock\":3},\n {\"Name\":\"tomatoes\", \"Farmer\": \"Gal\", \"stock\":12},\n {\"Name\":\"tomatoes\", \"Farmer\": \"Omer\", \"stock\":4}\n ];\n return items;\n}", "stockValue()\n {\n return this.numOfShares*this.sharePrice;\n }", "function populateListProductChoices(slct1, slct2) {\n\t\n\tvar s1 = document.getElementById(slct1);\n var s2 = document.getElementById(slct2);\n\t\n\tvar productsFillters = document.getElementsByName(\"restriction\");\n\tvar chosenFillters = [];\n\t\n\t\n\t\tfor (i = 0; i < productsFillters.length; i++) { \n\t\t\tif (productsFillters[i].checked) {\n\t\t\t\tchosenFillters.push(productsFillters[i].value);\n\t\t\t}\n\t\t}\n\t\n\tvar sortedProducts = products.sort(sortByPrice);\n\t var optionArray = restrictListProducts(products, chosenFillters);\n\t\n\t\n\t// s2 represents the <div> in the Products tab, which shows the product list, so we first set it empty\n s2.innerHTML = \"\";\n\t\t\n\t// obtain a reduced list of products based on restrictions\n \n\n\t// for each item in the array, create a checkbox element, each containing information such as:\n\t// <input type=\"checkbox\" name=\"product\" value=\"Bread\">\n\t// <label for=\"Bread\">Bread/label><br>\n\t\t\n\tfor (i = 0; i < optionArray.length; i++) {\n\t\t\t\n\t\tvar productName = optionArray[i].name;\n\t\tvar productPrice = optionArray[i].price.toFixed(2);\n\t\t// create the checkbox and add in HTML DOM\n\t\tvar checkbox = document.createElement(\"input\");\n\t\tcheckbox.type = \"checkbox\";\n\t\tcheckbox.name = \"product\";\n\t\tcheckbox.value = productName;\n\t\ts2.appendChild(checkbox);\n\t\t\n\t\t// create a label for the checkbox, and also add in HTML DOM\n\t\tvar label = document.createElement('label')\n\t\tlabel.htmlFor = productName.name;\n\t\tlabel.appendChild(document.createTextNode(productName));\n\t\tlabel.appendChild(document.createElement('br'));\n\t\tlabel.appendChild(document.createTextNode(\" Price: $\" + productPrice));\n\t\tlabel.appendChild(document.createElement('br'));\n\t\ts2.appendChild(label);\n\t\t\n\t\t// create a breakline node and add in HTML DOM\n\t\ts2.appendChild(document.createElement(\"br\")); \n\t}\n}", "function restrictListProducts(prods) {\r\n\tlet product_names = [];\r\n\tprods.sort((a,b) => a.price - b.price);\r\n\tfor (let i=0; i<prods.length; i+=1) {\r\n\t\tif (!(((document.getElementById(\"lactoseFree\").checked==true) && (prods[i].lactoseFree == false)) ||\r\n\t\t((document.getElementById(\"nutFree\").checked==true) && (prods[i].nutFree == false)) ||\r\n\t\t((document.getElementById(\"organic\").checked==true) && (prods[i].organic == false)) ))\r\n\t\t{\r\n\t\t\tproduct_names.push(prods[i].name)\r\n\t\t}\r\n\t}\r\n\r\n\treturn product_names;\r\n}", "function profitLossCalculator(data) {\n const result = [];\n\n for (const stock of data) {\n\n // If sector exists\n if (result.some(e => e.name === stock['sector'])) {\n for (let obj of result) {\n\n if (obj['name'] === stock['sector']) {\n obj['worthNew'] = obj['worthNew'] + stock['current_price'] * stock['n_holding']\n obj['worthOld'] = obj['worthOld'] + stock['buy_price'] * stock['n_holding']\n }\n }\n } else result.push({ \"name\": stock['sector'], \"worthNew\": stock['current_price'] * stock['n_holding'], 'worthOld': stock['buy_price'] * stock['n_holding'] })\n }\n\n for (let i = 0; i < result.length; i++) {\n result[i]['value'] = ((result[i]['worthNew'] - result[i]['worthOld']) / result[i]['worthOld']) * 100\n result[i]['current_total'] = result[i]['value']\n result[i]['ticker'] = result[i]['name']\n }\n const finalResult = result;\n\n console.log(\"Profit/Loss\", finalResult);\n setPortfolioStatistics_profitLoss(finalResult);\n }", "function Stock (stockID,stockName,quantity,price,upperTargetPrice,lowerTargetPrice) {\n\tthis.stockID=stockID;\n\tthis.stockName = stockName;\n\t// Implementing quantity, purchaseDate and purchasePrice as corresponding \n\t// arrays - purchase is +quantity, sell is -quantity...\n\tthis.quantity=[quantity];\n\tthis.purchaseDate = [new Date().getTime()]; // epoch time in ms\n\tthis.purchasePrice=[price]; // list of purchase prices corresponding to dates\n\tthis.currentPrice=price;\n this.upperTargetPrice=upperTargetPrice; //Used for watchlist.. i.e watch/alert when it reaches/ goes above or below target price\n this.lowerTargetPrice=lowerTargetPrice; true; // true for greater than target price, false for below target price...\n\t\n\t// I have decided to put these metrics into the object\n\t// perhaps saves a bit of redundancy...??\n\tthis.peRatio=0;\n\tthis.pegRatio=0;\n\tthis.marketCapitalisation = 0;\n\tthis.previousClose=0;\n\tthis.earningShare=0;\n\tthis.currentBid=0;\n\tthis.absChange=0;\n\tthis.percentChange=0;\n\t\n\t//var historicalData=null; // private variable...\n\t// historical data remains undefined until it is pulled for that stock\n\t// at which point it remains until the application closes....\n\tattachStockMethods(this);\n}", "function StockPicker(arr) { \n let maxProf = 0;\n let profits = arr.map(function (currPrice, index) {\n return arr.slice(index, arr.length)\n .sort(function(a, b) { return b - a ;})[0] - currPrice;\n });\n maxProf = profits.sort( function(a,b) { return b - a ;})[0];\n return (maxProf > 0) ? maxProf : -1;\n}", "function getSuperMarket()\r\n {\r\n \r\n var superMarket = \"Type(?Supermarket, Shop), PropertyValue(?Supermarket, hasComplex, SupermarketComplex)\";\r\n \r\n new jOWL.SPARQL_DL(superMarket).execute({ onComplete : displaySupermarkets});\r\n \r\n }", "initModal() {\n var addons = this.props.product.addons;\n let max = [];\n // loop though addons and create a new list with the max number allowed and mandatory checks\n for (let i = 0; i < addons.length; i++) {\n let checkBoxMax = {\n name: addons[i].name,\n max: addons[i].maximimCount,\n mandatory: addons[i].addonMandatory,\n current: 0\n }\n max.push(checkBoxMax);\n }\n\n this.setState({checkBoxMax: max})\n var price = 0;\n var varPrice = 0;\n var name = null;\n // check for the variants and set the prize of the first variant if it exists\n if (this.props.product.variant.variants.length > 0) {\n price = this.props.product.variant.variants[0].price;\n varPrice = this.props.product.variant.variants[0].price;\n name = this.props.product.variant.variants[0].name;\n } else {\n price = this.props.product.price\n }\n this.setState({modal: this.props.modal, price: price, initPrice: this.props.product.price, varName: name, varPrice: varPrice});\n }", "function selectedItems(){\n\t\n\tvar ele = document.getElementsByName(\"product\");\n\tvar chosenProducts = [];\n\t\n\tvar c = document.getElementById('displayCart');\n\tc.innerHTML = \"\";\n\t\n\t// build list of selected item\n\tvar para = document.createElement(\"P\");\n\tpara.innerHTML = \"You selected : \";\n\tpara.appendChild(document.createElement(\"br\"));\n\tpara.appendChild(document.createElement(\"br\"));\n\tfor (let i = 0; i < ele.length; i++) { \n\t\tif (ele[i].checked) {\n\t\t\tpara.appendChild(document.createTextNode(ele[i].value));\n\t\t\tpara.appendChild(document.createElement(\"br\"));\n\t\t\tpara.appendChild(document.createElement(\"br\"));\n\t\t\tchosenProducts.push(ele[i].value);\n\t\t}\n\t}\n\t\t\n\t// add paragraph and total price\n\tc.appendChild(para);\n\tc.appendChild(document.createTextNode(\"Total Price is $\" + getTotalPrice(chosenProducts)));\n\t\t\n}", "function display () {\n \n//set query all products\n\n var query = \"SELECT * FROM products \";\n\n connection.query(query, function(err, res) {\n \n if (err) {\n// log errors\n\n console.log(err);\n }\n \n// console log products\n\n for (var i = 0; i < res.length; i++) {\n \n//build global array\n\n choice.push(res[i]);\n \n// format id 2 digits\n\n if (res[i].ID.toString().length < 2) {\n \n var prodId = \"0\" + res[i].ID;\n \n } else {\n \n var prodId = res[i].ID;\n \n }\n \n//format title same length\n\n var formatStringTitle = \" \";\n var x = 80 - res[i].product_name.length;\n \n formatStringTitle = formatStringTitle.substring(0,x);\n \n// format price\n var formatStringPrice = \" \";\n \n var x = 5 - res[i].price.toFixed(2).toString().length;\n \n \n formatStringPrice = formatStringPrice.substring(0,x);\n \n// format category\n\n var formatStringCat = \" \";\n \n var x = 10 - res[i].dept_name.length;\n \n formatStringCat = formatStringCat.substring(0,x);\n \n// console log only products in stock\n\n if (choice[i].stock_qty > 0) {\n \n console.log(\"Product ID : \" + prodId + \" \" + res[i].product_name + formatStringTitle + \" Price : $\" + res[i].price.toFixed(2) + formatStringPrice + \" Department : \" + res[i].dept_name + formatStringCat + \" Qty In Stock :\" + res[i].stock_qty);\n \n }\n \n }\n \n console.log(\" \");\n \n qOne();\n \n// get user product selection\n\n function qOne() {\n \n// prompt user\n\n inquirer.prompt({\n name: \"product\",\n type: \"input\",\n message: \"What is the Product ID that you would like to purchase ?\"\n }).then(function(answer) {\n \n var userInput = parseInt(answer.product);\n var checkInput = isNaN(userInput);\n \n// check for valid input\n\n if (checkInput) {\n \n console.log(\" \");\n console.log(\"Sorry that is not a valid Product Id !\");\n console.log(\" \");\n \n qOne();\n \n return;\n \n \n}\n\n// query database\n var query = \"SELECT * FROM products where ID = \" + userInput;\n\n connection.query(query, function(err, res) {\n \n if (err) {\n// log errors\n console.log(err);\n }\n \n// check for no match return\n\n if (res.length < 1) {\n \n console.log(\" \");\n console.log(\"Sorry no product with that ID found !\");\n console.log(\" \");\n \n qOne();\n \n return;\n \n }\n \n qTwo(userInput);\n \n });\n// get user quantities function\n\n function qTwo(userInput) {\n console.log(\" \");\n var invCheck = choice[userInput-1].stock_qty;\n \n if (invCheck < 1) {\n \n console.log(\" \");\n console.log(\"Sorry this item is now out of stock !\");\n console.log(\" \");\n \n return qOne();\n \n }\n \n \n// get user quantity\n\n inquirer.prompt({\n name: \"quan\",\n type: \"input\",\n message: \"How many would you like to purchase ?\"\n }).then(function(answer) { \n \n// validate enough on hand\n\n if (answer.quan > invCheck) {\n \n console.log(\" \");\n console.log(\"Sorry not enough in stock ! Please lower quantity\");\n console.log(\" \");\n \n return qTwo(userInput);\n }\n \n// calculate total sale\n\n var totalSale = choice[userInput-1].price * answer.quan;\n invCheck = invCheck - answer.quan;\n \n \n// display total\n\n console.log(\" \");\n \n console.log(\"Your total is : $\" + totalSale.toFixed(2));\n \n// update database inventory\n \n var query = \"UPDATE products SET stock_qty = \" + invCheck + \" where id = \" + choice[userInput-1].ID;\n\n\n\n connection.query(query, function(err, res) {\n \n if (err) {\n \n// log errors\n\n console.log(err);\n \n }\n \n// message user of remaining inventory\n\n console.log(\" \");\n console.log(\"There are now \" + invCheck + \" left in stock !\");\n \n start();\n });\n \n \n });\n \n }\n \n });\n \n }\n \n });\n\n}", "function stockAvailableOrNotWhenChangingSaleUnitQtyAndPrimaryStock(eventClass)\n {\n /*\n |------------------------------------------------------------------\n | available quantity check , this part is stop for faridpur client\n |------------------------------------------------------------------\n */\n //$('.cr_addToCart_button').attr('disabled','disabled');\n /*\n |------------------------------------------------------------------\n | available quantity check , this part is stop for faridpur client\n |------------------------------------------------------------------\n */\n /**sale unit id */\n var unit_id = $(\"option:selected\", $(\".cr_sale_unit_id_class\")).val();\n var unit_name = $(\"option:selected\", $(\".cr_sale_unit_id_class\")).text();\n\n var stock_id = $(\"option:selected\", $(\".cr_sale_from_stock_class\")).val(); //$('.cr_sale_from_stock_class').val();\n var stock_name = $(\"option:selected\", $(\".cr_sale_from_stock_class\")).text();\n\n var p_v_id = $('.cr_product_variation_id_class').val();\n var pressing_qty= $('.cr_current_quantity_class').val();\n \n var url = $('.cr_checkQtyAvailableByStockIdPvId').val();\n setTimeout(function (){\n $.ajax({\n url: url,\n data: {\n stock_id,product_variation_id:p_v_id,pressing_qty,stock_name,unit_id,unit_name\n },\n type: \"GET\",\n //datatype:\"JSON\",\n beforeSend:function(){\n //$('.loading').fadeIn();\n },\n success: function(response){\n //console.log(response);\n $('.cr_selected_stock_name_class').text(response.stock_name);\n $('.cr_selected_stock_quantity_class').text(response.available_stock.toFixed(2));\n $('.cr_selected_stock_unit_name_class').text(response.unit_name);\n\n $('.cr_finalSaleUnitId_class_text').val(response.unit_name);\n\n /*\n |------------------------------------------------------------------\n | available quantity check , this part is stop for faridpur client\n |------------------------------------------------------------------\n */\n /* available qty check and reset in the qty input field*/\n /* if(response.available_stock < response.pressing_qty)\n {\n $('.cr_low_qty_alert_message').text('Limited Quantity, Available Quantity is '+response.available_stock.toFixed(2));\n $('.cr_current_quantity_class').val(response.available_stock.toFixed(2));\n $('.cr_totalQty_class').text(response.available_stock.toFixed(2));\n }else{\n $('.cr_low_qty_alert_message').text('');\n if(response.pressing_qty > 0 && response.available_stock > 0)\n {\n $('.cr_addToCart_button').removeAttr('disabled','disabled');\n }else{\n $('.cr_addToCart_button').attr('disabled','disabled');\n }\n } */\n /* available qty check and reset in the qty input field*/\n /*\n |------------------------------------------------------------------\n | available quantity check , this part is stop for faridpur client\n |------------------------------------------------------------------\n */\n\n /* New all Sale Price set*/\n $('.cr_defalutSalePriceClass').val(response.default_selling_price.toFixed(2)).change();\n $('.cr_defalutSalePriceClass_text').text(response.default_selling_price.toFixed(2)).change();\n\n $('.cr_defaultPurchasePriceClass').val(response.default_purchase_price.toFixed(2)).change();\n $('.cr_defaultPurchasePriceClass_text').text(response.default_purchase_price.toFixed(2)).change();\n\n $('.cr_wholeSalePriceClass').val(response.whole_sale_price.toFixed(2)).change();\n $('.cr_wholeSalePriceClass_text').text(response.whole_sale_price.toFixed(2)).change();\n\n $('.cr_offerSaleClass').val(response.promo_offer_price.toFixed(2)).change();\n $('.cr_offerSaleClass_text').text(response.promo_offer_price.toFixed(2)).change();\n /* New all Sale Price set*/\n\n /* If Changes from sale Unit , then set price field */\n if(eventClass == 'cr_sale_unit_class')\n {\n $('.cr_sallingPrice').val(response.default_selling_price.toFixed(2)).change();\n }\n /* If Changes from sale Unit , then set price field */\n\n setAllInputAndTextAfterAllFinalCalculation();\n },//end success\n complete:function(){\n //$('.loading').fadeOut();\n },\n });\n }, 200)\n //setAllInputAndTextAfterAllFinalCalculation();\n }", "stockRelevant(stockSymbol) {\n return this.request(`/stock/${stockSymbol}/relevant`);\n }", "addChartsToStocks(stocks, chartResult, range) {\n stocks.forEach((stock) => {\n stock['chart'] = chartResult[stock.symbol]['chart'];\n });\n }", "getStockState(in_stock){\n if(in_stock === 0) {\n return \"Out of Stock\";\n }\n else {\n return \"In Stock\";\n }\n }", "function showLowProd(){\n\n //Sql statement\n var sql = \"select * from products where stock_quantity < 5\";\n var query = conn.query(sql, (err, res) => {\n\n //If error throw error\n if (err) throw err;\n\n //If response length is greater than zero\n if (res.length > 0) {\n\n //Show welcome message and products\n console.log(\"\\nHere are LOW QUANTITY products and their associated information:\");\n console.log(\"\\n ID | Name | Department | Price | Quantity In Stock\");\n console.log(\" --------------------------------------------------\");\n for (i = 0; i < res.length; i++) {\n console.log(' ' +\n res[i].item_id +\n \" | \" +\n res[i].product_name +\n \" | \" +\n res[i].department_name +\n \" | \" +\n '$ '+ parseFloat(res[i].price) +\n \" | \" +\n res[i].stock_quantity\n )\n }\n //Back to the menu\n main();\n\n } else {\n //No low quantity products found\n console.log('No low quantity products were found.');\n main();\n } \n })\n}", "function viewLowInventory() {\n connection.query(\"SELECT * FROM products\", function(error, results) {\n if (error) throw error;\n console.log(\"LOW INVENTORY:\");\n for (var i = 0; i < results.length; i++) {\n if (results[i].stock_quantity < 5) {\n console.log(results[i].id + ' | ' + results[i].product_name + ' | ' + '$'+results[i].price + ' | ' + results[i].stock_quantity);\n }\n }\n });\n connection.end();\n}", "function CheckQuantityInStock(product_id,color_id,size_id){\r\n\t\tquantityCheck = 0;\r\n\t\t$.ajax({\r\n\t\t\turl : \"/TQShop/api/GetQuantityInStock\",\r\n\t\t\tmethod : \"GET\",\r\n\t\t\tdata : {\r\n\t\t\t\tproduct_id : product_id,\r\n\t\t\t\tcolor_id : color_id,\r\n\t\t\t\tsize_id : size_id\r\n\t\t\t},\r\n\t\t\tsuccess: function(data) {\r\n\t\t\t\tquantityCheck = data;\r\n\t }, \r\n\t\t});\r\n\t}", "function applyFilterOnBrand(subCategory)\r\n{\r\n //console.log(subCategory)\r\n //console.log(subCategory.id);\r\n var bradsInFile = document.getElementsByName(\"brandToFilter\");\r\n var checkedBrands = [];\r\n var dispalyFliterData = [];\r\n for (brand of bradsInFile) {\r\n if (brand.checked) {\r\n checkedBrands.push(brand.id);\r\n }\r\n }\r\n console.log(checkedBrands);\r\n $.getJSON(\"../json/data.json\", function (data) {\r\n $.each(data, function (key, value) {\r\n if(checkedBrands.includes(value.brand))\r\n {\r\n dispalyFliterData.push(value);\r\n }\r\n });\r\n console.log(dispalyFliterData);\r\n \r\n var productData = '';\r\n $.each(dispalyFliterData, function (key, value) {\r\n productData += '<div class=\"col-lg-3 col-md-4 col-sm-6 col-xs-12 main\">';\r\n productData += '<img class=\"card-img-top\" src= ' + value.imageUrl + ' height=\"300px\" width=\"200px\">';\r\n productData += '<div class=\"card\">';\r\n productData += '<h4 >' + value.name + '</h4>' + value.price;\r\n productData += '</div>';\r\n productData += '<button class=\"btn btn-info btn-sm\" id=' + value.productId + ' onclick=\"addToCart(' + value.productId + ')\"><span class=\"glyphicon glyphicon-shopping-cart\"></span> Add</button>' + \" \" + '<button class=\"btn btn-warning btn-sm\" id=wish' + value.productId + ' onclick=\"addToWishList(' + value.productId + ')\"><span class=\"glyphicon glyphicon-heart\"></span> WishList</button><br/><br/>';\r\n productData += '</div>';\r\n });\r\n $(\"#productDataTable\").empty();\r\n $(\"#productDataTable\").append(productData);\r\n });\r\n \r\n}", "placeOrder() {\n var cartItems = this.state.itemList.filter((e)=> (e.isChecked == true))\n console.log('cartItems :', JSON.stringify(cartItems));\n\n if(cartItems.length) {\n var numOfPackage = this.findNumOfPackage(cartItems);\n console.log('numOfPackage :', numOfPackage);\n\n if(numOfPackage == 1) {\n this.createCartList(cartItems, numOfPackage);\n } else {\n cartItems.sort((a, b) => parseInt(b.Weight) - parseInt(a.Weight));\n console.log('cartItems :', JSON.stringify(cartItems));\n\n var Package = [];\n cartItems.forEach((val, index) => {\n if(index < numOfPackage) {\n for(var i=0; i<numOfPackage; i++) {\n if(i == index) {\n Package[i] = [];\n Package[i].push(val);\n return;\n }\n }\n } else {\n Package.sort(this.sortFunction);\n for(var i=0; i<numOfPackage; i++) {\n var TPRIZE = 0;\n for(var j=0; j<Package[i].length; j++) {\n TPRIZE += Package[i][j].Price;\n }\n\n if (TPRIZE + val['Price'] <= maxOrderPrice) {\n Package[i].push(val);\n return;\n }\n }\n }\n })\n\n this.createCartList(Package, numOfPackage);\n }\n } else {\n alert(\"choose any item to place order\");\n }\n }", "function selectRandomProducts() {\n\n var leftIndex = Math.floor(Math.random() * Product.all.length);\n var centerIndex = Math.floor(Math.random() * Product.all.length);\n var rightIndex = Math.floor(Math.random() * Product.all.length);\n \n while (leftIndex === rightIndex) {\n rightIndex = Math.floor(Math.random() * Product.all.length);\n }\n while (leftIndex === centerIndex) {\n centerIndex = Math.floor(Math.random() * Product.all.length);\n }\n while (rightIndex === centerIndex) {\n centerIndex = Math.floor(Math.random() * Product.all.length);\n }\n\n leftProduct = Product.all[leftIndex];\n\n centerProduct = Product.all[centerIndex];\n\n rightProduct = Product.all[rightIndex];\n\n \n\n}" ]
[ "0.6156648", "0.59130824", "0.58810306", "0.58352894", "0.5791139", "0.57092667", "0.569306", "0.567611", "0.5468476", "0.5462791", "0.5445787", "0.5444624", "0.5438683", "0.5436604", "0.5427043", "0.54136425", "0.54094", "0.5404308", "0.53978354", "0.538168", "0.5357939", "0.53564936", "0.53425765", "0.5330588", "0.5329737", "0.5314037", "0.529162", "0.5288933", "0.5263888", "0.5259336", "0.5257132", "0.5255449", "0.5255138", "0.5237738", "0.52221227", "0.52166873", "0.521604", "0.5204508", "0.52001053", "0.51786524", "0.51779693", "0.51744753", "0.5173938", "0.5170828", "0.5165471", "0.5155449", "0.5153482", "0.51532716", "0.5149259", "0.51464254", "0.51424253", "0.51401436", "0.5139042", "0.51254016", "0.51165", "0.5116162", "0.5112192", "0.5110686", "0.51064515", "0.51054573", "0.5104023", "0.5101631", "0.51011854", "0.509537", "0.50860226", "0.50828564", "0.50827056", "0.50822574", "0.5081969", "0.5081257", "0.50797457", "0.5077116", "0.50760657", "0.50757533", "0.50686693", "0.50674117", "0.5061434", "0.5060549", "0.5060456", "0.5058372", "0.5057969", "0.50549144", "0.50546294", "0.505333", "0.5052498", "0.5052237", "0.50478643", "0.50442696", "0.5036218", "0.50341165", "0.50335395", "0.50279975", "0.5025983", "0.50243074", "0.502314", "0.50216633", "0.50213915", "0.50191575", "0.50146407", "0.5013354", "0.5012576" ]
0.0
-1
Stargaze Button Click: Open thing, call API (eventually)
function getSGReport(lat, lng){ //https://stargazr-5l7reasoza-uc.a.run.app/?lat_selected=37.75&lng_selected=-122.45 var lat = coords.lat var lng = coords.lng console.log("report at ", lat,lng) sidebar.open('data'); const callEndpoint = async () => { console.log("hey", lat, lng) const response = await fetch(STARGAZR_PROD_ENDPOINT+'?lat_selected='+lat+'&lng_selected='+lng); const response_json = await response.json(); //extract JSON from the http response console.log(response_json) displayData(response_json) // $("#stargaze-conditions").text(response_json) } callEndpoint() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openSidecar() {\n\tdocument.getElementsByClassName('gitter-open-chat-button')[0].click();\n}", "function clickHappy() {\n window.open(\"serotonine.html\", \"_self\");\n}", "function quickSearchButton_click() {\n //Begin Search Animation\n var $quickSearchResultsListWrapper = $(\"#QuickSearchResultsListWrapper_helm\");\n var $quickSearchProgressLoaderWrapper = $(\"#QuickSearchProgressLoaderWrapper_helm\");\n quickSearchResults_show(true);\n showProgressSpinner(true, \"#QuickSearchResultsContentTab_helm\");\n var quickSearch = quickSearchOptions_GetUserDefinedValues(); //Gather the search options specified by user and package them in QuickSearchOptions_helm javascript object\n quickSearch.recentSearches.save.call(quickSearch); //save the quick search in recent quick searches\n //\n helm.xhr.getQuickSearchResults(quickSearch.toJSON()).promise().done(function() {\n showProgressSpinner(false,\"#QuickSearchResultsContentTab_helm\");\n });\n if (Compass.Global.isLoanSelected && helm.DisplayMode !== \"QuickSearchRecentlyViewedOnly\") { //a setting/check for is in iquote mode would be better here.\n helm.showBasicLoanDetailsInPageHeader(true);\n }\n }", "click() {\n let tour = get(this, 'tour');\n tour.start();\n }", "click_Homescreen_TVShows(){\n this.Homescreen_TVShows.waitForExist();\n this.Homescreen_TVShows.click();\n }", "handleClick() {\n\t\tthis.props.changePage(\"aboutSplunk\");\n\t}", "goToWoman() {\n this.womanBtn.waitForClickable()\n this.womanBtn.click();\n }", "clicked() {\n this.get('onOpen')();\n }", "function whenClicked()\r\n{\r\n\r\n $('#trackbtn').button('loading');\r\n getUserLocation();\r\n\r\n}", "function actionButton() {\n\t\t\tif ($('#status').hasClass('play')) {\n\t\t\t\tif (common.type == 'blockly') {\n\t\t\t\t\t// capture screenshot\n\t\t\t\t\tvar xml = capture.captureXml();\n\n\t\t\t\t\t// log screenshot data to database\n\t\t\t\t\tdbService.saveProgram(xml);\n\n\t\t\t\t\t// capture blockly and run generated code\n\t\t\t\t\tvar code = Blockly.JavaScript.workspaceToCode(vm.workspace);\n\t\t\t\t\teval(code);\n\t\t\t\t} else {\n\t\t\t\t\t// capture screenshot and save to database\n\t\t\t\t\tcapture.capturePng('.program-inner');\n\n\t\t\t\t\t// convert program in to list of instructions\n\t\t\t\t\tvar program = [];\n\n\t\t\t\t\tfor (var i = 0; i < vm.program.length; i++) {\n\t\t\t\t\t\tvar ins = vm.program[i];\n\t\t\t\t\t\tprogram.push(ins.name);\n\t\t\t\t\t}\n\n\t\t\t\t\tdbService.saveProgram(program);\n\t\t\t\t}\n\n\t\t\t\t// run program\n\t\t\t\trun();\n\n\t\t\t\t// log button press\n\t\t\t\tdbService.buttonPress('play');\n\n\t\t\t} else if ($('#status').hasClass('stop')) {\n\n\t\t\t\t// stop program\n\t\t\t\tstate.current = state.STOPPED;\n\n\t\t\t\tif (common.type == 'blockly') {\n\t\t\t\t\tvm.program.length = 0;\n\t\t\t\t}\n\n\t\t\t\t// log button press\n\t\t\t\tdbService.buttonPress('stop');\n\n\t\t\t} else if ($('#status').hasClass('rewind')) {\n\t\t\t\trewind();\n\t\t\t}\n\t\t}", "function sitClick(sitID) {\n \n currentSituation = findSituationByID(sitID);\n refreshRateIndicator();\n refreshSituationButtons();\n refreshSpiritQuotes();\n refreshSpiritIcon();\n refreshUnderstanding();\n \n}", "launchTome(button, groupName, index, pointer, event){\n button.scene.scene.start(\"TomeScene\", button.scene.gameData);\n }", "click(e) {\n\n fetch('/api/workflows',\n {\n method: 'post',\n credentials: 'include',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRFToken': csrfToken\n },\n body: JSON.stringify({name: \"New Workflow\"})\n })\n .then(response => response.json())\n .then(json => {\n // ID of new Workflow has been returned by this step, can navigate to new WF page\n goToUrl('/workflows/' + json.id); \n })\n }", "function initGo() {\n\tdocument.getElementById(\"go\").onclick = function() {\n\t\tdocument.getElementById(\"textarea\").innerText = \"Loading ...\";\n\t\tlet url = \"https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY\";\n\t\turl += \"&date=\" + document.getElementById(\"dateInput\").value;\n\t\tlet promjson = respHandler(fetch(url));\n\t\tpromjsonHandler(promjson).catch((e) => {\n\t\t\tdocument.getElementById(\"textarea\").innerText = e.message;\n\t\t});\n\t}\n}", "contClick() {\n // temporarily goes right to the workspace registration\n app.goto('/init/newworkspace');\n }", "open() {\n browser.url(this.url);\n }", "function buttonWorking(e) {\n const baseURL = 'https://ghibliapi.herokuapp.com/';\n e.preventDefault();\n fetch (baseURL + 'films/')\n .then(res => res.json())\n .then(json => {\n displayResults(json);\n })\n}", "function openBrowser(args) {\n utilityModule.openUrl(\"https://newsapi.org\");\n}", "open() {\n browser.url(this.url);\n }", "open() {\n browser.url(this.url);\n }", "function interaction1() {\n window.location.href = `https://amdevito.github.io/211/interact/index.html`;\n}", "click() {\n this.sendAction('deal', this.get('result'));\n }", "function AdaHeads_Take_Call_Button_Click() {\n // Create a new call object, not implemented\n AdaHeads.Alice.Get_Next_Call({\n 200 : function (data) {\n $(\"#Current_Call\").addClass(\"disconnected\").show();\n\n AdaHeads.Status_Console.Log(\"Reserved call\"); \n },\n \n 404 : function (data) {\n AdaHeads.Status_Console.Log(\"Call not found\"); \n },\n \n 204 : function (data) {\n AdaHeads.Status_Console.Log(\"Pickup: No call available\"); \n console.log (data); \n\n },\n 400 : function (data) {\n AdaHeads.Status_Console.Log(\"Pickup: Bad request\");\n },\n \n 500 : function (data) {\n AdaHeads.Status_Console.Log(\"Pickup: Server error\");\n }\n }); \n \n// UI Changes\n// Disable the take call button and enable the end call button\n\n}", "function openSetupClickHandler() {\n openPopup();\n }", "handleJDotterClick() {}", "function goToTravelTodo() {\n console.log(\"TravelTODO\");\n //Apply code to continue to travels\n //Make connection with Jonas page\n}", "function goGetta (){\n AjaxGet(\"api/get.php\",button);\n }", "function handleClick(e) {\n sendRequest()\n }", "function handleClick() {\n\t\t window.ctaClick();\n\t\t}", "function handleClick() {\n\t\t window.ctaClick();\n\t\t}", "function onSkateSpotPageClick() {\n console.log('Hit the spot page!')\n}", "function ativeBonusRound() {\n document.getElementsByClassName(\"start-button\")[0].click();\n }", "function onClicked() {\r\n\t\ttablet.gotoWebScreen(APP_URL);\r\n\t}", "open() {\n this._open();\n }", "function clickButton() {\n location.href = \"index.html\";\n }", "function voting_start() {\n jQuery(\"#vote-page\").show();\n jQuery.getJSON(command_url(\"game_status\"), function(data) {\n\tgame_id=data.id;\n\tjQuery(\".action-butt\").each(function (n) {\n\t this.innerHTML = data.choices[n];\n\t});\n });\n}", "onSwaggerButtonClicked() {\n this.context.editor.showSwaggerViewForService(this.props.model);\n }", "function afterClick() {\n let nameOfcard = this.id;\n id(\"start-btn\").classList.remove(\"hidden\");\n qs(\"#p1 .name\").id = nameOfcard;\n let getinfo = URL_POKE + \"?pokemon=\" + nameOfcard;\n fetch(getinfo)\n .then(checkStatus)\n .then((resp) => resp.json())\n .then((resp) => getCard(resp, \"#p1\"))\n .catch(console.error);\n }", "function sayThings() {\n console.log(\"this button is clicked!\")\n}", "function clickButton()\n {\n // Update requested value\n var btn = this ;\n var setval = \"\" ;\n if ( btn.toggle )\n {\n switch (btn.request)\n {\n case \"Off\": btn.request = \"On\" ; setval = \"F\" ; break ;\n case \"On\": btn.request = \"Off\" ; setval = \"N\" ; break ;\n }\n }\n logDebug(\"clickButton: \", btn, \n \", target: \", btn.target, \", request: \", btn.request) ;\n // Now proceed to set requested value\n if ( btn.target != null )\n {\n // Send update command, refresh selector state when done\n setButtonState(btn, \"Pending\") ;\n var def = doTimedXMLHttpRequest(btn.target+setval, 4.9) ;\n def.addBoth(pollNow) ;\n }\n else\n {\n logError(\"clickButton (no target)\") ;\n }\n return false ; // Suppresss any default onClick action\n }", "function _run() {\n let url = 'https://maker.ifttt.com/trigger/' + this.action + '/with/key/' + this.key;\n\n var xmlhttp = new XMLHttpRequest();\n xmlhttp.open('GET', url, true);\n // xmlhttp.onreadystatechange = (e) => { console.log(e); };\n xmlhttp.send();\n}", "open() {\n super.open('/') //provide your additional URL if any. this will append to the baseUrl to form complete URL\n browser.pause(1000);\n }", "function openPingfmKeyPage(event)\n{\n widget.openURL('http://ping.fm/key/');\n}", "function buttonClick(clicked_id){\n\n if (clicked_id == \"1\"){\n $.get('/post', {command: '/relay', core: 'core', params: '1'});\n } \n\n if (clicked_id == \"2\"){\n $.get('/post', {command: '/relay', core: 'core', params: '0'});\n } \n\n}", "function buttonClick() {\n\tvar id = event.target.id;\n\tswitch(id) {\n\tcase \"Load\":\n\t\tbtRead.disabled = false;\n\t\tloadParams();\n\tbreak;\n\tcase \"Read\":\n\t\tbtStart.disabled = false;\n\t\treadParams();\n\tbreak;\n\tcase \"Start\":\n\t\tif(btStart.innerHTML == \"Start\") {\n\t\t\tbtLoad.disabled = true;\n\t\t\tbtRead.disabled = true;\n\t\t\tbtInfo.disabled = true;\n\t\t\tbtStart.innerHTML = \"Stop\";\n\t\t\tproc = setInterval(simulate, Tproc);\n\t\t} else {\n\t\t\tbtLoad.disabled = false;\n\t\t\tbtRead.disabled = false;\n\t\t\tbtInfo.disabled = false;\n\t\t\tbtStart.innerHTML = \"Start\";\n\t\t\tclearInterval(proc);\n\t\t}\n\tbreak;\n\tcase \"Info\":\n\t\tvar info = \"\";\n\t\tinfo += \"windpend.js\\n\";\n\t\tinfo += \"Wind blows a simple pendulum\\n\";\n\t\tinfo += \"Sparisoma Viridi\\n\";\n\t\tinfo += \"https://github.com/dudung/butiran.js\\n\"\n\t\tinfo += \"Load load parameters\\n\";\n\t\tinfo += \"Read read parameters\\n\";\n\t\tinfo += \"Start start simulation\\n\";\n\t\tinfo += \"Info show this messages\\n\";\n\t\tinfo += \"\\n\";\n\t\taddText(info).to(taOut);\n\tbreak;\n\tdefault:\n\t}\n}", "function pressBtnTheApartmentsKane() {\n var u = document.getElementById('location32a').innerHTML;\n if(u == \"The Apartments Kane\")\n {\n map.flyTo({center: [-122.285434,37.516556],speed: 0.3});\n var popup = new mapboxgl.Popup({closeOnClick: true})\n .setLngLat([-122.285434,37.516556])\n .setHTML('<h3>' + geojson.features[33].properties.title + '</h3><iframe class=\"popup-image\" allowfullscreen=\"allowfullscreen\" frameborder=\"0\" scrolling=\"auto\" src=\"' + geojson.features[33].properties.image + '\"></iframe><p>' + geojson.features[33].properties.description + '</p><br>'\n + '<a href=\"#\" onClick=\"popUpModal(\\'' + geojson.features[33].properties.title + '\\',\\'' + geojson.features[33].properties.history + '\\',\\'' + geojson.features[33].properties.video + '\\',\\'' + geojson.features[33].properties.image + '\\',\\'' + geojson.features[33].properties.description + '\\')\" class=\"btn btn-primary btn-lg active\" role=\"button\" aria-pressed=\"true\">History</a>')\n .addTo(map);\n }\n }", "function callToApi() {\n fetch(`//api.tvmaze.com/search/shows?q=${inputText.value}`)\n .then((response) => response.json())\n .then((data) => {\n shows = data;\n paintShows(data);\n });\n}", "function viewPoll() {\n $(\"#poll\").on(\"click\", function () {\n window.open(\"https://www.strawpoll.me/44308387\");\n });\n}", "open () {\n super.open('https://www.choucairtesting.com/servicio/') //provide your additional URL if any. this will append to the baseUrl to form complete URL\n browser.pause(1000);\n }", "function buyGym(){\n\t\t\tbuyClick(\"localgym\");\n\t\t}", "function clickNotificationAction() {\n\n // API call\n sendAjaxRequest('get', '/api/notifications', {}, clickNotificationReturn);\n}", "function activateThing(e) {\n ajax(\n {url: 'http://10.0.0.16:3000/activate/'+e.itemIndex, type: 'json', cache: false },\n function(data){\n // Update status text in the menu\n things[e.itemIndex].subtitle = 'Status: ' + data.status;\n thingList.items(0, things);\n }, function(error) {\n things[e.itemIndex].subtitle = 'Status: Error communicating';\n thingList.items(0, things);\n }\n ); \n}", "function onFirstButtonPressed() {\n\t\t\t\t\tif (result.meta.redirectURL && result.meta.redirectURL.length != 0) {\n\t\t\t\t\t\t//RaU wants us to open a URL, most probably core/player updated and binary changed. \n\t\t\t\t\t\tSMF.Net.browseOut(result.meta.redirectURL);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//There is an update waiting to be downloaded. Let's download it.\n\t\t\t\t\t\tresult.download(function(err, result) {\n\t\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\t\t//Download failed\n\t\t\t\t\t\t\t\talert(\"Autoupdate download failed: \" + err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t//All files are received, we'll trigger an update.\n\t\t\t\t\t\t\t\tresult.updateAll(function(err) {\n\t\t\t\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\t\t\t\t//Updating the app with downloaded files failed\n\t\t\t\t\t\t\t\t\t\talert(\"Autoupdate update failed: \" + err);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t//After that the app will be restarted automatically to apply the new updates\n\t\t\t\t\t\t\t\t\t\tApplication.restart();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}", "function onFleetButton( event ) {\r\n\topenWindowMenu(3);\r\n}", "async clickOnButton(string) {\n if (string == \"Work out how much I could borrow\") xpath = '[id=\"btnBorrowCalculater\"]';\n else if (string == \"Start over\") xpath = '[aria-label=\"Start over\"]';\n // click\n await this.page.click(xpath);\n }", "open() {\r\n browser.url('');\r\n browser.pause(3000);\r\n // browser.windowHandleMaximize();\r\n // browser.pause(3000);\r\n }", "onObjectClicked(pointer, gameObject) {\n\t\tif (gameObject.name === 'ok') {\n\t\t\tlet nextAction = game.gameData.getNextAction();\n\t\t\tgame.scene.start(nextAction.sceneName);\n\t\t}\n\t}", "async open (page) {\n browser.url(page);\n browser.maximizeWindow();\n }", "function openAHOFbar(){\n servePage('AHOF', 'pages/LargeBlocksTemplate', 'A History of Forests');\n}", "click() { }", "function click(){\n document.getElementById(\"defaultOpen\").click();\n}", "function theClick() {\r\n console.log('inicia')\r\n dataNodes()\r\n dataElements()\r\n backEnd()\r\n}", "function handleClick(){\n history.push(`/getTools/${_id}`)\n }", "function startGame() {\r\n\r\n\tBrowser.loadUrl(CLICKERHEROES_URL);\r\n\tBrowser.finishLoading();\r\n\r\n\tHelper.sleep(5);\r\n\r\n\tfindAndClick(PLAY_PNG);\r\n\r\n\tHelper.log(\"Search Close Button...\");\r\n\tHelper.sleep(5);\r\n\r\n\t//Try to match close button\r\n\tfindAndClick(CLOSE_PNG);\r\n}", "startWebUIOperation(obj) {\n this.props.removeNotificationNow(NOTIFICATION_ID);\n const appSetup = getAppSetup();\n const para_url = appSetup.get('op_para_link');\n const query_args = parseQuery(window.location);\n query_args[\"template_uuid\"] = obj['cdb_object_id'];\n getJSON(para_url, query_args).then(\n (resp) => {\n const errmsg = resp['error'];\n if (errmsg !== undefined) {\n // Back to template selection\n this.props.addNotification(\n NOTIFICATION_ID,\n resp['error_caption'],\n errmsg,\n 'danger',\n 1,\n null,\n 30000\n );\n } else {\n this.props.runOperation(\n Immutable.fromJS(resp['opInfo']),\n {\n parameters: Immutable.fromJS(resp['args']),\n successActions: [OperationHandlers.navigate()],\n },\n );\n }\n }\n );\n }", "function performAction(e){\n const zipCode = document.getElementById('zip').value;\n const feeling = document.getElementById('feelings').value;\n\n // Call the GET request to get weather data\n getWeatherData(baseURL, zipCode, apiKey)\n\n //chain promise to POST the API data and user data to this app\n .then(function(data) {\n postData('/weather', {date: newDate, cityName: data.name, temp: data.main.temp , feel: feeling})\n })\n\n //chain promise to upadate UI \n .then(function(data){\n updateUI()\n }\n )\n}", "function click() {\n\n setName('Ram')\n setAge(21)\n // console.log(\"button clicked\")\n console.log(name,age)\n }", "handleClick(event, url) {\n event.preventDefault();\n this.postRequestOnClick(url);\n }", "function listenForClick() {\n loopThroughGrid();\n clickTurnBtn();\n }", "clickOverviewTab(){\n this.overviewTab.waitForExist();\n this.overviewTab.click();\n }", "function showJoke(btnIDName, callback) {\n // btnIDName = the name of the id in index.html that triggers the show joke action\n document.getElementById(btnIDName).addEventListener(\"click\", callback);\n}", "open() {\n super.open('/budget'); // this will append `budget` to the baseUrl to form complete URL\n browser.pause(1000);\n }", "function showCTIApp(event) {\n client.interface.trigger(\"show\", { id: \"softphone\" })\n .then(function () {\n if (event) {\n var data = event.helper.getData();\n callNumber(data.number);\n }\n }).catch(function (error) {\n console.error('failed to open CTI placeholder');\n console.error(error);\n });\n}", "async click() {\n await $(this.rootElement).click();\n }", "function _clickBidang(e)\r\n{\r\n\tvar arr = findObjectByKey(_nopjson, 'nop', e.layer.feature.properties.nop);\r\n\tviewDetailBidang(e.layer.feature,arr);\r\n}", "function pressBtnRalston() {\n var u = document.getElementById('location25').innerHTML;\n if(u == \"Ralston Hall Mansion\")\n {\n map.flyTo({center: [-122.286784, 37.517380],speed: 0.3});\n var popup = new mapboxgl.Popup({closeOnClick: true})\n .setLngLat([-122.286784, 37.517380])\n .setHTML('<h3>' + geojson.features[2].properties.title + '</h3><iframe class=\"popup-image\" allowfullscreen=\"allowfullscreen\" frameborder=\"0\" scrolling=\"auto\" src=\"' + geojson.features[2].properties.image + '\"></iframe><p>' + geojson.features[2].properties.description + '</p><br>'\n + '<a href=\"#\" onClick=\"popUpModal(\\'' + geojson.features[2].properties.title + '\\',\\'' + geojson.features[2].properties.history + '\\',\\'' + geojson.features[2].properties.video + '\\',\\'' + geojson.features[2].properties.image + '\\',\\'' + geojson.features[2].properties.description + '\\')\" class=\"btn btn-primary btn-lg active\" role=\"button\" aria-pressed=\"true\">History</a>')\n .addTo(map);\n }\n }", "async function clickButtion() {\n const human = Human();\n const dinos = await fetch('./dino.json')\n .then((response) => response.json())\n .then((json) => {\n const dinos = [];\n json.Dinos.map((data) => {\n const dino = new Dino(data);\n compareWeight.call(dino, human);\n compareHeight.call(dino, human);\n compareDiet.call(dino, human);\n dinos.push(dino);\n });\n return dinos;\n });\n\n addTiles(human, dinos);\n}", "function fetchTreasureHunts() {\n //fetching treasureHunts from the API\n fetch(\"https://codecyprus.org/th/api/list\")\n .then(response => response.json()) // taking the json from the response\n .then(jsonObject => { //awaited ready to use json\n\n let myList = document.getElementById(\"generated-api-hunts\"); //flexible div that will contain treasure hunts divs\n let listOfTreasureHunts = jsonObject.treasureHunts; // the actual list from json containing the treasureHunts\n\n /* logic */\n for(let i = 0; i < listOfTreasureHunts.length; i++){ //iterating through each available treasure hunt\n let listItem = document.createElement(\"div\"); //creating a div depending on the current treasure hunt\n // the div will contain a button which will have an id of the current treasure hunt -> that id will go into on click function -> which can be manipulated\n listItem.innerHTML = \"<button type=submit class=treasure onclick='startTreasureHunt(id)' id=\" + listOfTreasureHunts[i].uuid +\">\" + \"<h1>\" + listOfTreasureHunts[i].name + \"</h1>\" + \"</button\";\n myList.appendChild(listItem); //populating the buttons into the divs\n }\n });\n}", "function clickSolve(){\n env.click.render() ;\n env.clickCopy.render() ;\n refreshDisplay() ;\n}", "function clickOn() {\n openedCards[0].click(cardToggle);\n}", "open () {\n //super.open('https://openweathermap.org/') \n //this will append `login` to the baseUrl to form complete URL\n //browser.open('https://openweathermap.org/');\n browser.url('https://openweathermap.org/');\n browser.pause(1000);\n }", "clickLoginButton() {\n this.loginButton.waitForVisible();\n this.loginButton.click();\n }", "function makerequest(){\n console.log(\"Buton Clicked\");\n\n}", "function buttonClicked(){\r\n var httpResponse = new XMLHttpRequest(); //Make a new object to accept return from server\r\n var url = null; \r\n\r\n if(document.getElementById(\"button1\").value == \"Disable\"){ //If the Pi-Hole is currently ENABLED\r\n var time = document.getElementById(\"time\").value; //get the time from the box\r\n time = time * 60; //get it in minutes\r\n url = \"http://pi.hole/admin/api.php?disable=\" + String(time) + \"&auth=\" + API_KEY; //build the url\r\n }\r\n\r\n else if(document.getElementById(\"button1\").value == \"Enable\"){ //If the Pi-Hole is currently DISABLED\r\n url = \"http://pi.hole/admin/api.php?enable&auth=\" + API_KEY; //build the url\r\n }\r\n\r\n httpResponse.addEventListener(\"load\", setStatus); //add listener for the xmlResponse\r\n httpResponse.addEventListener(\"error\", statusError); //add listener to error\r\n httpResponse.open(\"GET\", String(url)); //Open a get request\r\n httpResponse.send(); //Send it to the server\r\n}", "function pressBtnRalstonAnnex() {\n var u = document.getElementById('location25a').innerHTML;\n if(u == \"Ralston Hall Annex\")\n {\n map.flyTo({center: [-122.286468,37.517468],speed: 0.3});\n var popup = new mapboxgl.Popup({closeOnClick: true})\n .setLngLat([-122.286468,37.517468])\n .setHTML('<h3>' + geojson.features[39].properties.title + '</h3><iframe class=\"popup-image\" allowfullscreen=\"allowfullscreen\" frameborder=\"0\" scrolling=\"auto\" src=\"' + geojson.features[39].properties.image + '\"></iframe><p>' + geojson.features[39].properties.description + '</p><br>'\n + '<a href=\"#\" onClick=\"popUpModal(\\'' + geojson.features[39].properties.title + '\\',\\'' + geojson.features[39].properties.history + '\\',\\'' + geojson.features[39].properties.video + '\\',\\'' + geojson.features[39].properties.image + '\\',\\'' + geojson.features[39].properties.description + '\\')\" class=\"btn btn-primary btn-lg active\" role=\"button\" aria-pressed=\"true\">History</a>')\n .addTo(map);\n }\n\n }", "function startButton(){\n hunger();\n happy();\n knowledge();\n \n}", "function openingPage() {\n openScreen = \"<p class='text-center'><a class='btn btn-secondary btn-md btn-block start-button' href='#' role='button'>Start Quiz</a></p>\";\n $(\"#mainArea\").append(openScreen); //using append function to add the start button to the open screen.\n }", "measurementClicked (){\n this.measurement.addEventListener('click',()=>{\n window.open(\"././links/measurement/measurement.htm\");\n },false);\n }", "function updateGrid(Input){\n document.getElementById('StartExperimentButton').href = \"SOSA.html?demo=\" + Input;\n}", "function click(x,y) {\n\tif (!token || !serverUrl) { throw \"Accretion - SDK must call init first\" }\n\n\tconsole.log(\"x,y,t: \" + x + \",\" + y + \", \" + token);\n\trest.post('http://localhost:3000/clicker?token=' + token, { data: \n\t\t\t{\"cellX\" : x, \"cellY\" : y}\n\t\t}).on('complete', function(result) {\n\t\tif (result instanceof Error) {\n\t\t\tconsole.log('Error:', result.message);\n\t\t} \n\t});\t\n}", "function onBrowserActionClick() {\n info(\"event: browser action icon was clicked\");\n click($(_ID_STATUS));\n}", "function buttonClick() {\n timestamp = duration[duration.length-1];\n console.log(timestamp + \"docReady: \" + docReady);\n if (docReady && timestamp !== undefined) {\n firepad.makeHeaderDialog_(timestamp);\n\n //Create buttons that take you to different parts of the video\n var button = document.createElement(\"input\");\n button.type = \"button\";\n button.value = timestamp.toFixed(2)+\"s\";\n button.onclick = function() {\n playerInstance.seek(timestamp);\n };\n document.querySelector(\"#annotatedNotes\").appendChild(button);\n }\n}", "handleClick() {}", "handleClick () {\n super.handleClick();\n if (this.casting) {\n return this.stopCasting();\n } else {\n return this.doLaunch();\n }\n }", "click_Homescreen_RaceResult(){\n this.Homescreen_RaceResult.waitForExist();\n this.Homescreen_RaceResult.click();\n }", "open() {\n super.open(\"https://google.com\"); //provide your additional URL if any. this will append to the baseUrl to form complete URL\n browser.pause(3000);\n }", "function onButtonClick() {\n\t\tdrawerWidget.open();\n\t}", "function onButtonClick(e) {\n // console.log(e);\n fetch('http://172.30.1.59:4000').then((res) => {\n console.log(res);\n });\n }", "function buttonClick() {\n\tvar id = event.target.id;\n\tswitch(id) {\n\tcase \"Load\":\n\t\tbtRead.disabled = false;\n\t\tloadParams();\n\tbreak;\n\tcase \"Read\":\n\t\tbtStart.disabled = false;\n\t\treadParams();\n\tbreak;\n\tcase \"Start\":\n\t\tif(btStart.innerHTML == \"Start\") {\n\t\t\tbtLoad.disabled = true;\n\t\t\tbtRead.disabled = true;\n\t\t\tbtInfo.disabled = true;\n\t\t\tbtStart.innerHTML = \"Stop\";\n\t\t\tproc = setInterval(simulate, Tproc);\n\t\t} else {\n\t\t\tbtLoad.disabled = false;\n\t\t\tbtRead.disabled = false;\n\t\t\tbtInfo.disabled = false;\n\t\t\tbtStart.innerHTML = \"Start\";\n\t\t\tclearInterval(proc);\n\t\t}\n\tbreak;\n\tcase \"Info\":\n\t\tvar info = \"\";\n\t\tinfo += \"cppcmf.js\\n\";\n\t\tinfo += \"Charged particle in perpendicular \";\n\t\tinfo += \"constant magnetic field\\n\";\n\t\tinfo += \"Sparisoma Viridi\\n\";\n\t\tinfo += \"https://github.com/dudung/butiran.js\\n\"\n\t\tinfo += \"Load load parameters\\n\";\n\t\tinfo += \"Read read parameters\\n\";\n\t\tinfo += \"Start start simulation\\n\";\n\t\tinfo += \"Info show this messages\\n\";\n\t\tinfo += \"\\n\";\n\t\taddText(info).to(taOut);\n\tbreak;\n\tdefault:\n\t}\n}", "function autoClick() {\n //simulate a click of <button id=\"refresh\">Refresh</button>\n \n }", "async click() {\n await t.click(selector);\n }" ]
[ "0.6252752", "0.62203145", "0.62004375", "0.61823237", "0.6119333", "0.6116048", "0.611182", "0.6056714", "0.60427785", "0.60306084", "0.60246575", "0.6019932", "0.6011468", "0.59940505", "0.5964392", "0.5926589", "0.5915833", "0.59109527", "0.5881289", "0.5881289", "0.587773", "0.58761996", "0.58716315", "0.5870086", "0.58670187", "0.5865278", "0.5862297", "0.58557415", "0.5853623", "0.5853623", "0.5853392", "0.5840637", "0.58350855", "0.5834106", "0.5795441", "0.57922834", "0.57915854", "0.5780129", "0.57781005", "0.5766772", "0.57618064", "0.5761287", "0.57604516", "0.5758551", "0.57386297", "0.57382077", "0.5728378", "0.5728133", "0.5722115", "0.5714834", "0.5711671", "0.57040715", "0.5699653", "0.5696385", "0.56960654", "0.56748027", "0.5669458", "0.56657875", "0.56622833", "0.56581175", "0.564446", "0.56379884", "0.5637171", "0.5620114", "0.5614644", "0.5610266", "0.5609902", "0.56008375", "0.5598082", "0.5597673", "0.5593864", "0.55925745", "0.5590408", "0.55897164", "0.5586058", "0.5584607", "0.5577929", "0.5577619", "0.557464", "0.5574187", "0.55676854", "0.5566506", "0.55636024", "0.5560999", "0.55571437", "0.5554772", "0.5550098", "0.5550087", "0.55486256", "0.55482936", "0.5543608", "0.5541299", "0.55363953", "0.5534304", "0.5527177", "0.55267483", "0.5523039", "0.5521103", "0.55210304", "0.5516015", "0.5513715" ]
0.0
-1
Funzioni per generare numeri random e inserirli in un Array
function rndNumGen(minNum, maxNum) { var rndNum = parseInt((Math.random() * maxNum) + minNum) return rndNum }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CreateLottoValues() {\n for (var i=0; i<randomArray.length; i++) {\n randomArray[i] = array[Math.floor(Math.random() * array.length)]; \n }\n}", "function creaNumeroRandom(array){\n var numero = Math.round(Math.random()*(array.length-1));\n return numero;\n }", "function randomNum(array){\n\tarray.push(Math.floor(Math.random()*100)+1);\n}", "function generaArray () {\r\n var array = []\r\n\r\n for (var count = 0; count < 10; count++ ) {\r\n var numeroCasuale = Math.floor(Math.random() * 9) + 1;\r\n array.push(numeroCasuale);\r\n}\r\n return array.join(\"\")\r\n}", "generarSecuencia(){\n this.secuencia = new Array(10).fill(0).map(m => Math.floor(Math.random() * 4))\n }", "_getRandomNum(array){\n // console.log(\"array = \", array);\n return Math.floor(Math.random() * Math.floor(array.length));\n }", "function randomNumGenerator (arrayName){\n\treturn Math.floor(Math.random() * arrayName.length);\n}", "function generaArray() {\n var arrayGenerato = [];\n for (var i = 0; i < 10; i++) {\n var numeroCasuale = Math.floor(Math.random() * 100) + 1;\n arrayGenerato.push(numeroCasuale);\n }\n return arrayGenerato;\n}", "function genNum(){\n\tvar ranNum = []\n\tfor(i = 0; i < 10; i++){\n\t\tranNum.push(Math.round(Math.random() *100));\n\t}\n\tretun ranNum;\n}", "function generazioneNumeriCasuali(numeri) {\r\n var arrayNumeri = [];\r\n\r\n while (arrayNumeri.length < numeri){\r\n var arrayNumeriTemp = Math.ceil(Math.random() * 100);\r\n if (!arrayNumeri.includes(arrayNumeriTemp)) {\r\n arrayNumeri.push(arrayNumeriTemp);\r\n }\r\n }\r\n return arrayNumeri;\r\n}", "function multirand(n){\n arr.push(rand10(10))\n}", "function addRandom() {\n var start = arr.length;\n var end = start + 10;\n if (end > 63) {\n end = 63;\n }\n if (start < 63) {\n for (var index = start; index < end; index++) {\n var x = new key(Math.ceil(Math.random() * 99));\n\n arr[index] = x;\n updateLocation(20);\n }\n }\n}", "function addRandomNumber(){\t\t\n\tvar index=Math.floor(Math.random() * 4);\n\tsequence.push(index);\t\n}", "function generateNumRandom (arr){\n return Math.floor(Math.random()*arr.length);\n}", "function randomNumbers() {\n let number = parseInt(document.getElementById(\"arraySize\").value);\n let RandomArray = Array.from({\n length: number\n }, () => Math.floor(Math.random() * 1001));\n document.getElementById(\"uarray\").innerHTML = RandomArray.join(' ').toString();\n}", "function generateNumber() {\n\t\treturn Math.floor(Math.random() * tipsArray.length);\n\t}", "function pickNum(){\n num_arr= [1,2,3,4,5,6,7,8,9];\n ans_arr= []; // this array will have 4 random number from the list.\n for(var i=0; i< 4; i+=1){\n var sele = num_arr.splice(Math.floor(Math.random()*(9 - i)),1)[0];\n ans_arr.push(sele);\n }\n}", "randomNumber() {\n\t\treturn random([1, 2, 3, 4, 5, 6]);\n\t}", "function createRandomInput (){\n var array = [1,2,3,4,5,6,7,8,9];\n index = array.length;\n randomIndex = 0;\n tempValue = '';\n while(index > 0){\n randomIndex = Math.floor(Math.random() * index);\n index--;\n tempValue = array[index];\n array[index] = array[randomIndex];\n array[randomIndex] = tempValue;\n }\n return array;\n}", "function multirand(n){\n return arr.push(rand10(10))\n}", "function randomNum() {\n return Math.floor(Math.random() * productsArray.length);\n}", "function generarPoblacionInicial(){\n\tarrayAux = new Array(GENES);\n\tfor(i=0;i<POBLACION;i++) {\n\n\t\t//aux con los numeros del 0 al 22\n\t\tfor(j=0;j<GENES;j++) {\n\t\t\tarrayAux[j] = j;\n\t\t}\n\n\t\t//rellenar cromosomas con el aux en orden aleatorio\n\t\tfor(j=0;j<GENES;j++) {\n\t\t\tcromosoma[i][j] = parseInt((arrayAux.splice(Math.floor(Math.random() * arrayAux.length), 1)).join(\"\"));\n\t\t}\n\t}\n}", "function getRandomNumbers(arr, num) {\n for (var i = 0; i < num; i++) {\n generatedNum = Math.floor(Math.random() * (100 - 1) + 1);\n arr.push(generatedNum);\n }\n return arr\n}", "function generateNumbers() {\n for (let i=0; i < 4; i++) {\n randomNumbers[i] = Math.floor(Math.random() * 12) + 1;\n }\n}", "function genaratoreNumeriRandom(numero) {\n return Math.floor(Math.random() * numero) +1;\n}", "function getRandNum(array){\n return Math.floor(Math.random() * array.length);\n }", "function getRandomNum(array) {\n return Math.floor(Math.random() * array.length)\n}", "function randomNum() {\n return Math.round(Math.random() * (itemsArray.length - 1));\n}", "function generateRandomForArray() {\r\n var num = Math.floor(Math.random() * imgsArray.length);\r\n return num;\r\n }", "function randomizeNumber(){\n\tvar rNumber = Math.floor(Math.random() *4);\n\tgameArray.push(rNumber);\n}", "secuencia() {\n this.secuencia = new Array(ULTIMO_NIVEL).fill(0).map(n => Math.floor(Math.random() * 4))\n // console.log(this.secuencia)\n }", "function giveMeRandom(n){\n\n let arr= [] \n for(i=0; i<n; i++){\n arr.push(Math.floor((Math.random() * 10)))\n }\n return arr\n}", "function generarAleatorio(valor)\r\n{\r\n return numIdentificacion = Math.floor(Math.random() * ((valor+1) - 0) + 0); \r\n}", "function tiradas(n){\n var lista = [];\n for (var i = 0; i < n; i++) {\n lista.push(random(6));\n }\n return lista;\n}", "function generateNumbers(optionsArray){\n var randomNumber = Math.floor((Math.random()*20)+1);\n if(optionsArray.indexOf(randomNumber) > -1){\n generateNumbers(optionsArray);\n }else{\n optionsArray.push(randomNumber);\n }\n }", "function generateNumbers(optionsArray){\n var randomNumber = Math.floor((Math.random()*20)+1);\n if(optionsArray.indexOf(randomNumber) > -1){\n generateNumbers(optionsArray);\n }else{\n optionsArray.push(randomNumber);\n }\n }", "function generateNumbers(optionsArray){\n var randomNumber = Math.floor((Math.random()*20)+1);\n if(optionsArray.indexOf(randomNumber) > -1){\n generateNumbers(optionsArray);\n }else{\n optionsArray.push(randomNumber);\n }\n }", "function generateNumbers(optionsArray){\n var randomNumber = Math.floor((Math.random()*20)+1);\n if(optionsArray.indexOf(randomNumber) > -1){\n generateNumbers(optionsArray);\n }else{\n optionsArray.push(randomNumber);\n }\n }", "function genPosRan(){\n let arrayOriginal = [0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7];\n arrayOriginal.sort(function() { return Math.random() - 0.5 });\n return(arrayOriginal)\n}", "function getArray() {\n let element = 0;\n\n for (let i = 0; i < 10; i += 1) {\n element = Math.floor((Math.random() * 100) + 1);\n mainArray[i] = element;\n }\n\n document.getElementById('array').innerHTML = mainArray;\n}", "function createArray(){\n let arr = [];\n for(let i = 0; i < 100; i++){\n arr.push(getRandomInteger(0, 100));\n }\n return arr;\n}", "function generateRandomArray(){\n var randomArray = [];\n for(var i = 0; i < 20; i++){\n randomArray.push(Math.floor(Math.random() * 4) + 1);\n }\n return randomArray;\n }", "function CreateLottoValues() {\r\n return Math.floor(Math.random() * 90 + 1);\r\n }", "function getRandomNumber(array) {\n return Math.floor(Math.random() * array.length);\n}", "function randomNums(){\n \n return (Math.random()* 1000);\n }", "constructor(length = 0) {\n this._array = [];\n for (let ii = 0; ii < length; ii++) {\n this._array[ii] = Helper.getRandomWholeNumberBetweenRange(1, 10);\n }\n }", "function randomNumber(arrayLength){\n return Math.floor(Math.random() * arrayLength);\n\n }", "generaSecuencia() {\n this.secuencia = new Array(this.Ultimo_nivel)\n .fill(0)\n .map((n) => Math.floor(Math.random() * 4));\n }", "function randomCatNumber(){\n// var randomCatNum = Math.floor(Math.random()* 12) + 1;\n for (var i = 0; i < images.length; i++){\n numberOptions.push(Math.floor(Math.random()* 12) + 1);\n console.log(numberOptions);\n }\n}", "static getRandom (arr) { return arr[ Math.floor( Math.random() * arr.length ) ] }", "function randomNumGen(){\n\t\tvar randomNumber = (Math.floor(Math.random() * 4) + 1).toString();\n\t\tcolorOrder.push(randomNumber);\n\t}", "function crystalNumberGenerator(arr) {\n if (arr.length >= 4) return;\n var crystalRan = Math.floor((Math.random() * 12) + 1);\n if (arr.indexOf(crystalRan) < 0) {\n arr.push(crystalRan);\n console.log(crystalRan);\n }\n crystalNumberGenerator(arr);\n }", "function random_nums() {\n\t\t\tvar max = all_coords.length + 1;\n\t\t\treturn Math.floor(Math.random() * max) \n\t\t}", "function random(parametro) {\n for (var i = 0; i < random.length; i++) {\n var randomize = Math.random(random[i]);\n }\n console.log(randomize)\n}", "function randomPkmnNum() {\n for (var i=0; i<4; i++) {\n var num = (Math.floor(Math.random() *11) +1);\n imgValue.push(num);\n }\n console.log (imgValue);\n }", "function getRandomNumber(arr) {\n return arr[Math.floor(Math.random() * arr.length)];\n}", "function create_dummy_array(n) {\n let random_num = [];\n for (let i = 0; i < n; i++) {\n random_num.push(Math.floor(Math.random() * 10));\n }\n return random_num;\n}", "function generarNumero(numero){\n return (Math.random()*numero).toFixed(0);\n }", "function gRandom(){\n var arr=[];\n for(var i =0; i< 10; i++){\n arr.push(Math.floor(Math.random()*100))\n }\n return arr;\n}", "function adiciona(){\r\n aleatorio = Math.floor((Math.random()*10)+1)\r\n conjunto.push(aleatorio)\r\n console.log(conjunto)\r\n}", "function randomNumbers() {\n for (var i = 0; i < 4; i++){\n var num = Math.floor(Math.random() * 11+1);\n numbersGenerated.push(num);\n }\n console.log(numbersGenerated)\n}", "function lottoGenerator() {\n const arr = []\n function rando(lot) {\n const ran = Math.floor(Math.random() * (60 - 1 + 1)) + 1\n return lot.includes(ran) ? rando(lot) : ran\n }\n for (let i = 0; i < 6; i++) {\n const ran = rando(arr)\n arr.push(ran)\n }\n return arr\n}", "function aleatorio(){\n\n\nwhile(ale.length < cantidadNumeros ){\n var numeroAleatorio = Math.ceil(Math.random()*21);\n var existe = false;\n for(var i=0;i<ale.length;i++){\n\tif(ale [i] == numeroAleatorio){\n existe = true;\n break;\n }\n }\n if(!existe){\n ale[ale.length] = numeroAleatorio;\n }\n\n\n\n}\n\t\t\n}", "function generaRandom(){\n return Math.floor(Math.random() * 5 + 1);\n}", "function randomNumberArray(number) {\n let arr = [];\n for (let i = 0; i < number; i++) {\n arr.push(Math.floor(Math.random() * 10));\n }\n console.log(arr);\n}", "function generateRandomNumbers(){\n for (var i = 0; i < numberOfPairs; i++) {\n numArray[i]= Math.round((Math.random()*100)+1);\n console.log(numArray);\n }\n numArray=numArray.concat(numArray);\n numArray.sort(function() { \n return 0.5 - Math.random()\n });\n console.log(numArray);\n for (var i = numArray.length ; i > 0; i--) {\n $(\"#tile-\"+i).text(numArray[i-1]);\n }\n }", "function main(){\n\n for(let i = 0; i < 800/5; i ++){\n ar.push(parseInt(Math.round(Math.random()*500)));\n arORD.push(ar[i]);\n }\n}", "function generateNumCommande() {\n var random = Math.floor(100000000 + Math.random() * 900000000);\n num_commande = 'NH'+random\n }", "randomNum() {\n let i = Math.floor(Math.random() * this.length);\n let j = Math.floor(Math.random() * this.breath);\n return i + \"-\" + j;\n }", "function generateRandomIndex() {\n return Math.floor(Math.random() * productsArray.length);\n}", "function randomizer(array) {\n return array[Math.floor(Math.random() * array.length)];\n}", "function func17(arr) {\r\n let len = arr.length;\r\n while (len > 0) {\r\n const rand = Math.floor(Math.random() * len);\r\n len--;\r\n const temp = arr[len];\r\n arr[len] = arr[rand];\r\n arr[rand] = temp;\r\n }\r\n return arr;\r\n}", "function giveMeRandom(n){\n let array=[];\n\n for(let i=0; i<n; i++){\n array[i] = Math.floor(Math.random() * 11);\n }\n return array;\n}", "function tiradas(n) {\n var lista = [];\n for (var i = 0; i < n; i++) {\n lista.push([random(6), random(6)]);\n }\n return lista;\n}", "function multiRand(n) {\n for (let i=0 ; i<n; i++) {\n arr.push(rand10());\n }\n return arr;\n}", "function getRandom(){\n var arr = [];\n arr.push(getRandomNumber());\n arr.push(getRandomAlphabets());\n return arr[Math.floor(Math.random() * arr.length)]\n}", "function generateRandomIndex() {\n return Math.floor(Math.random() * 10);\n}", "function random() {\n return function (min, max) {\n // First init of rand.\n var rand = min + Math.floor(Math.random() * (max + 1 - min)),\n // Value \"count\" will increase in 1 if there no such digit in \"tpm[]\" array.\n count = 0,\n tmp = [];\n // In case when misplaced min with max.\n if (min > max) {\n tmp[0] = max;\n max = min;\n min = tmp[0];\n tmp = [];\n }\n // Repeat loop until count will be max-min.\n do {\n // If no such digit push to tmp increment count\n if (tmp.indexOf(rand) === -1) {\n tmp.push(rand);\n count += 1;\n }\n // Else generate another random digit.\n else {\n rand = min + Math.floor(Math.random() * (max + 1 - min));\n }\n } while (count <= max - min);\n // Return array of random different digits.\n return tmp;\n };\n }", "function arrRandom(arr) {\n var randNumb = arr[Math.floor(Math.random() * arr.length)];\n return randNumb;\n}", "function getRandomNumber() {\n return numeral[Math.floor(Math.random() * numeral.length)];\n}", "function randomArrayMethod(){\n for (var i = 0; i < 10; i++) {\n randomArray[i] = Math.floor((Math.random() * 1000) + 1)\n }\n arrayToScreen();\n}", "function randomArrayMethod(){\n for (var i = 0; i < 10; i++) {\n randomArray[i] = Math.floor((Math.random() * 1000) + 1)\n }\n arrayToScreen();\n}", "function randomnum() {\n //Sets var randArray to a random index of 0-3; relates to arrays: lower, upper, number, special\n var randArray = Math.floor((Math.random() * array.length));\n //Sets var random to the index of selected var randArray from 0 - max length of the randArray\n var random = Math.floor((Math.random() * array[randArray].length));\n //returns the value in var randArray with an index of var random\n return array[randArray][random];\n}", "function rand(numero) {\n\treturn Math.floor(Math.random() * numero) + 1;\n}", "function generateRandomNumber(){\n return Math.floor( Math.random()*productsNames.length);\n}", "function getRandomNum() {\n var min = 0;\n var max = allItems.length;\n return Math.floor(Math.random() * (max - min)) + min;\n}", "function randomNumberGenerator(){\n return Math.floor(Math.random()*1000);\n }", "function generatorOpinion (num) {\n var tempArray = [];\n for (var i = 0; i < num; i++ ) {\n tempArray.push(randomOpinion(opinions));\n }\n return tempArray;\n}", "generateCode() {\n const nums = [\"1\", \"2\", \"3\", \"4\"];\n let code = [];\n let rand = Math.floor(Math.random() * nums.length);\n code.push(nums.splice(rand, 1)[0]);\n rand = Math.floor(Math.random() * nums.length);\n code.push(nums.splice(rand, 1)[0]);\n rand = Math.floor(Math.random() * nums.length);\n code.push(nums.splice(rand, 1)[0]);\n return code;\n }", "function karteGenerieren() {\r\n /* Eine beliebige Zahl wird mit der Länge multipliziert und die Karte nehmen wir*/\r\n let random = Math.floor(Math.random() * alle32Karten.length);\r\n console.log('random Number: ' + random);\r\n let karte = alle32Karten[random];\r\n alle32Karten.splice(random, 1);\r\n return karte;\r\n}", "function num(){\n return Math.floor(Math.random() * (imageArray.length));\n}", "function getRandomNumber(array) {\n return array[Math.random() * array.length | 0];\n}", "function randomNumber(data){\n return data[Math.floor(Math.random() * 510)];\n }", "function newValues() {\n\tvalues = [];\n\tfor (var i = 0, t = 14; i < 4; i++) {\n\t\tvalues.push(Math.round(Math.random() * t) + (i + 1));\n\t}\n}", "function createArray(int) {\r\n\tvar array = [];\r\n\tvar jumble = \"adjflaolzlwoel;knf;dakjksdnfd\";\r\n\tvar random = \"\";\r\n\tfor (var x = 0; x < int; x++) {\r\n\t\tvar long = Math.floor((Math.random() * 10) + 1);\r\n\t\trandom = \"\";\r\n\t\tfor (var y = 0; y <long; y++) {\r\n \t\tvar index = Math.floor(Math.random() * (jumble.length-1));\r\n \t\trandom = jumble[index] + random;\r\n \t}\r\n array[x] = random\r\n\t}\r\n\treturn array\r\n}", "function randomNum(x, y) {\r\n num = [Math.floor(Math.random() * (y-x+1) + x)]\r\n return num;\r\n}", "function generateNumbers() {\n for (let i=0; i<7; i++) {\n numbers[i] = new Number().roll();\n }\n}", "generateSequence() {\n this.sequence = new Array(finalLevel)\n .fill(0)\n .map(element => Math.floor(Math.random() * numberOfColors));\n }", "function CreateLottoValues() {\n for (var i = 0; i < randomArray.length; i++) {\n var newNumber = Math.floor(Math.random() * 4 + 1);\n console.log(\" - \"+newNumber);\n\n if(randomArray[i].valueOf() === newNumber){\n newNumber = Math.floor(Math.random() * 4 + 1);\n console.log(\" --- \"+newNumber);\n }else{\n randomArray[i] = newNumber;\n }\n console.log(randomArray[i]);\n }\n return newNumber;\n}", "function generateRandomNumb() {\n const oprand1 = Math.floor(Math.random() * 10);\n const oprand2 = Math.floor(Math.random() * 10);\n return [oprand1,oprand2];\n}", "function Random(){\n var nb = Math.floor(Math.random()*52)+1;\n if (nb<10){\n var nb = \"0\"+ nb; // Ajout d'un 0 pour s'adapter a l'appelation des fichiers\n }\n return nb;\n}" ]
[ "0.76776683", "0.765673", "0.76102173", "0.74387664", "0.7307626", "0.72218585", "0.7201954", "0.71847117", "0.7146856", "0.71466297", "0.71260846", "0.70743406", "0.7071478", "0.7066091", "0.70407516", "0.70262", "0.7025843", "0.70238453", "0.7006551", "0.7006138", "0.6967558", "0.69538337", "0.69403183", "0.69363123", "0.6928446", "0.6925772", "0.69190663", "0.69180995", "0.6915826", "0.69021785", "0.6881576", "0.6838057", "0.6829077", "0.68115246", "0.6804673", "0.6804673", "0.6804673", "0.6804673", "0.6804428", "0.6796052", "0.67828226", "0.67810684", "0.67675245", "0.67661124", "0.6760779", "0.67577773", "0.67558706", "0.67550266", "0.6732168", "0.67039037", "0.67018837", "0.67014754", "0.6700843", "0.6700528", "0.6698793", "0.66946626", "0.6691709", "0.6685848", "0.66789025", "0.667222", "0.66713816", "0.6670941", "0.6661824", "0.6659533", "0.66580725", "0.6651238", "0.66459966", "0.6644283", "0.66376233", "0.6634667", "0.66331816", "0.66281605", "0.6627053", "0.66221905", "0.6617832", "0.6615577", "0.6614564", "0.66082275", "0.66038007", "0.66014934", "0.6599221", "0.6599221", "0.65972394", "0.6596707", "0.65923774", "0.65859616", "0.6582835", "0.6581391", "0.6578546", "0.65769076", "0.65710104", "0.6564794", "0.6563804", "0.6563583", "0.6556139", "0.6554197", "0.6553902", "0.65510607", "0.6551027", "0.65487576", "0.6547797" ]
0.0
-1
Funzione per mpstrare l'alert
function showNum() { alert("Memorizza questi numeri, hai " + (timeout / 1000) + " secondi: " + rndNumArray.join(" ,")) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "alert(title, message, positiveText){\n alert(title, message, positiveText, () =>{console.log('Possitive Pressed')}, true); \n }", "function __alert($msg) {\r\n __message({type:1, message:$msg, autoclose:3});\r\n}", "alert(title, message, positiveText, positiveOnPress, cancelableFlag){\n Alert.alert(title, message,[{text: positiveText, onPress: positiveOnPress},], {cancelable: cancelableFlag}); \n }", "function showMessage() {\r\n\r\n alert('APASA ESCAPE CA SA AFISEZI COMENTARIILE!');\r\n}", "alert(message){\n alert('Alert', message, \"OK\", () =>{console.log('Possitive Pressed')}, true); \n }", "function issue_called(text_for_alert){\n window.alert(text_for_alert);\n}", "function simpleAlert(data){\n\t\t\tvar app = new Alert();\n\t\t\tif(!app.exist()){\n\t\t\t\tif(app.checkObj(data)){\n\t\t\t\t\tapp.load(data);\n\t\t\t\t\tapp.show();\n\t\t\t\t}else{\n\t\t\t\t\tconsole.log(\"Aconteceu algo :/\");\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tapp.close();\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\tif(app.checkObj(data)){\n\t\t\t\t\t\tapp.load(data);\n\t\t\t\t\t\tapp.show();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.log(\"Aconteceu algo :/\");\n\t\t\t\t\t}\n\t\t\t\t},500);\n\t\t\t}\n\t\t}", "function showAlertFunc() {\n setShowAlert(true);\n }", "function showAlertMessage(mensaje) {\r\n\talert (mensaje);\r\n}", "function alert(notification, id_element) {\n\n // -- Annuler le time out actuel -- //\n clearTimeout(function_setTimeout);\n\n // -- Mise à jour de id_element -- //\n id_element = (!id_element) ? 'appAlert'\n : id_element;\n\n // -- Ecoute si le notificateur est soumis -- //\n if (!notification) {\n notification = {\n isSuccess: true,\n message: 'Error communication',\n }\n }\n \n // -- Afficher l'alert -- //\n $('#' + id_element).html(\n '<div class=\"mmalert alert alert-' + ((notification.isSuccess != null) ? (!notification.isSuccess) ? 'danger'\n : 'success'\n : 'info') + ' alert-dismissible fade show\" role=\"alert\">' +\n '<div class=\"row\">' +\n '<div class=\"col-lg-12\">' +\n '<div class=\"pull-left\">' +\n '<b>Information</b><br/>' +\n notification.message +\n '</div>' +\n '<div class=\"pull-right\">' +\n '<button type=\"button\" class=\"btn btn-sm btn-danger\" data-dismiss=\"alert\" aria-label=\"Close\">' +\n '<i class=\"fa fa-remove\"></i> ' + 'Close' +\n '</button>' +\n '</div>' +\n '</div>' +\n '</div>' +\n '</div>'\n );\n\n // -- Ne pas fermer si la valeur est -1 -- //\n if ($DureeVisibiliteMessageBox > 0) {\n // -- Supprimer l'alert après un temps défini -- //\n function_setTimeout =\n setTimeout(\n function () {\n // -- Fermer l'alert -- //\n $('#' + id_element + ' .alert').alert('close');\n },\n $DureeVisibiliteMessageBox\n );\n }\n\n}", "function lb_alert(type, message) {\n bs_alert(\".featherlight .alert-box\", type, message)\n}", "function _alert(type, mesg){\n var pop = \n $(\"<div class='alert alert-dismissible alert-\"+type+\" fade in' role='alert'>\"+\n \"<button type='button' class='close' data-dismiss='alert'>&times;</button>\"+\n mesg +\n \"</div>\");\n $(document.body).append(pop);\n pop.alert();\n if(type==='success'){\n window.setTimeout(function(){\n pop.alert('close');\n }, 1500);\n }\n }", "function displayAlert(title, message){\n Alert.alert(title,message);\n}", "function bsAlert(){return _callWithEmphasis(this, oj.div, 'alert', 'info', arguments)}", "function showAlert() {\n alert (\"Hello world!\");\n }", "function tryAlert() {\n alert(\"GO TRY THE LES PAUL!\");\n }", "function alert(text, type)\r\n{\r\n\tif(!type)\r\n\t{\r\n\t\ttoastr.info(text);\r\n\t} else\r\n\t{\r\n\t\ttoastr.error(text);\r\n\t}\r\n\t\r\n\t//var msg = document.getElementById(\"msg\");\r\n\t//msg.innerHTML += \"<p>\" + text + \"</p>\";\r\n}", "function message(msg) {\n\tdocument.getElementById('alert-box').innerHTML = msg;\n}", "function showAlert() {\n alert = $mdDialog.alert({\n title: 'Attention',\n textContent: 'Incorrect username and/or password. Please enter information again.',\n ok: 'Close'\n });\n $mdDialog\n .show( alert )\n .finally(function() {\n alert = undefined;\n });\n }", "function popup(){\n window.alert(\"Thank you for your purchase!\")\n}", "function $Alert(strMessage, strSize, strPopupId, strWindowType, strTitle)\n{\n\tVixen.Popup.Alert(strMessage, strSize, strPopupId, strWindowType, strTitle);\n}", "function alert() {\r\n var a, msg, onClose, autoClose, i;\r\n\r\n // Process variable number of arguments.\r\n for (i = 0; i < arguments.length; i++) {\r\n a = arguments[i];\r\n if (typeof a === \"string\") {\r\n msg = a;\r\n } else if (typeof a === \"function\") {\r\n onClose = a;\r\n } else if (typeof a === \"number\") {\r\n autoClose = a;\r\n }\r\n }\r\n\r\n function onOpen(dialogEl) {\r\n // Add the alert message to the alert dialog. If wider than 320 pixels change new lines to <br>.\r\n dialogEl.focus().find(\".msg\").html(msg.replace(/\\n/g, (document.body.offsetWidth > 320 ? \"<br>\" : \" \")));\r\n checkEnter(\"alert\");\r\n }\r\n\r\n return open(\"alert\", onOpen, onClose, autoClose);\r\n }", "function showAlert() {\n navigator.notification.alert(\n 'temp16percent:'+temp16percent+' topForecastSpace:'+topForecastSpace+' timeTextSpace:'+timeTextSpace+' bottomForecastSpace:'+bottomForecastSpace+' topSunChart:'+topSunChart+' sunChartBottom:'+sunChartBottom+' columnWidth:'+columnWidth+' calc(temp16percent*5+topForecastSpace):'+(temp16percent*5+topForecastSpace), // message\n alertDismissed, // callback\n 'bebug', // title\n 'Done' // buttonName\n );\n }", "function opdrachtalert()\n{\n //geef een alert box met de tekst \"How to become a javascript God??\"\n\n\n\n\n}", "function consume_alert() { //to override normal alert behavior\n if (_alert) return;\n var _alert = window.alert;\n window.alert = function(message) {\n $.pnotify({\n text: message\n });\n };\n}", "function dt_alert(type, message) {\n bs_alert(\".top-alert-box\", type, message)\n}", "function messageBox()\r\n{\r\n\tUIATarget.onAlert = function onAlert(alert) {\r\nvar title = alert.name();\r\n//UIALogger.logWarning(\"Alert with title '\" + title + \"' encountered.\");\r\n\t\tdelay(1);\r\nif (title == \"Error\"){\r\n\tdelay(2);\r\nif(alert.staticTexts()[\"Please check your details and relogin\"].isValid())\r\n\t{\r\n\t\talert.buttons()[\"OK\"].tap();\r\n\t\tUIALogger.logPass(\"Error message box is displayed\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\tUIALogger.logFail(\"Error message box is not displayed\");\r\n\t}\r\n\t\r\n\treturn true;\r\n}\r\n\t\telse\r\n\t\t{\r\n\t\t\tUIALogger.logFail(\"Unable to find the ERROR message box\");\r\n\t\t\t//\talert.buttons()[\"OK\"].tap();\r\n\t\t}\r\n// return false to use the default handler\r\n\treturn false;\r\n}\r\n}", "function sd(){\n\n /*\n Swal.fire({\n title:\"Error\", \n text: \"El texto ingresado no ha sido aceptado, ingrese todo en minusculas y evite los numeros y simbolos\",\n icon: 'error'\n });\n */\n alert(\"El texto ingresado no ha sido aceptado, ingrese todo en minusculas y evite los numeros y simbolos\");\n}", "function Alerta(titulo, mensaje, tipo, boton)\n {\n setTimeout(function () \n {\n swal\n ({\n title: titulo,\n text: mensaje,\n type: tipo,\n confirmButtonText: boton\n },\n function(isConfirm)\n {\n if(tipo == \"success\")\n {\n if (isConfirm) \n {\n window.location.href = \"/homeAdmins\";\n }\n }\n }); \n }, 000);\n }", "function sc_alert() {\n var len = arguments.length;\n var s = \"\";\n var i;\n\n for( i = 0; i < len; i++ ) {\n s += sc_toDisplayString(arguments[ i ]);\n }\n\n return alert( s );\n}", "function mostrarAlert() {\n Swal.fire({\n position: \"center\",\n icon: \"success\",\n title: \"Usuario Validado\",\n showConfirmButton: true,\n timer: 4000,\n });\n }", "function AlertTest()\n{\n Log.AppendFolder(\"Alert Test\");\n let page = Aliases.browser.Page;\n page.panelPage.panelDialogbox.link.Click();\n page.Alert.buttonOk.ClickButton();\n page.Wait();\n Log.PopLogFolder();\n}", "function showMsg(id,title,text,type)\n { \n $('#alert_content').html('<div class=\"alert alert-'+type+'\" role=\"alert\">'+text+\"</div>\");\n $('#alert_title').html(title);\n $('#'+id).modal('show');\n if (type=='info') {\n AlertSound();\n }; \n }", "function showAlert(mess)\n{\n alert(mess);\n}", "function handleAlertOK() {\n console.log('the frob should be blitzened here');\n }", "function Hey() { // Fonction d'affichage du \"porn popup\"\n\talert(\"Ce que tu fais est vraiment frais, négro !\");\n}", "function createAlert(){\n alert(\"Thank for comming here\")\n}", "function alertas() {\r\n var aletas = document.getElementById(\"alerta\");\r\n alertas.innerHTML = \"<div class='alert alert-danger alert-dismissible'>\" +\r\n \"<button type='button' class='close' data-dismiss='alert'>\" + \"&times;\" + \"</button>\" +\r\n \"<strong>\" + \"Danger!\" + \"</strong>\" + \"This alert box could indicate a dangerous or potentially negative action.\" +\r\n \"</div>\";\r\n\r\n}", "function mensaje(){\n\n\talert(\"Mensaje de Bienvenida\");\n}", "function mostrarAlert() {\n Swal.fire({\n position: \"center\",\n icon: \"success\",\n title: \"Usuario Registrado\",\n showConfirmButton: true,\n timer: 4000,\n });\n }", "function alert() {\n Alert.alert('First: '+ first_name + ' Last: ' + last_name + ' email: ' + email + ' password: ' + password)\n console.log(first_name, last_name, email, password)\n }", "function alerta(mensaje, btnMensaje, cabecera) {\n $scope.alertPopup = $ionicPopup.alert({\n title: cabecera,\n template: mensaje,\n okText: btnMensaje\n });\n $scope.alertPopup.then(function (res) {\n $scope.popover.hide();\n });\n }", "function alerta() {\n alert(\"Qué pena que no quieras...Piénsalo y dale al si! ;P\");\n return;\n}", "function popup() {\n alertify.set('notifier', 'position', 'bottom-left');\n alertify.success('click the arrow button for the project').delay(3);\n // setTimeout(function () {\n // alertify.success('use scroll or spacebar for a new project');\n // }, 2000);\n // alertify.message('test')\n }", "function alert(title, msg){\n\tif( typeof msg == 'undefined' )\n\t{\n\t\tmsg = title;\n\t\ttitle = '';\n\t}\n\t$.jAlert({\n\t\t'title': title,\n\t\t'content': msg\n\t});\n}", "function showAlert(message,type = 'success'){\n\t\tvar id = Math.floor((Math.random() * 100) + 1);\n\t\tvar alert = '<div class=\"alert alert-' + type + ' alert-dismissable fade show\" id=\"alertBox-' + id + '\">' + message + '<button type=\"button\" class=\"close ml-2\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button></div>';\n\t\t$(\"body\").append(alert);\n\t\tsetTimeout(fadeAlert,5000, '#alertBox-' + id);\n\t}", "function alertMessage(message){\n\talert(message);\n}", "function opdrachtalertprompt()\n{\n //element id=\"alertinput\".\n //voor verduidelijking zie w3school link \"alerts\".\n\n\n\n}", "function mostrarAlerta(msj, alerta) \n{\n var close = document.createElement(\"button\");\n var spa = document.createElement(\"span\");\n var alert = document.getElementById(alerta);\n close.setAttribute(\"type\", \"button\");\n close.setAttribute(\"onclick\", \"quitarAlerta('\"+alerta+\"')\");\n close.setAttribute(\"class\", \"close\");\n close.setAttribute(\"data-dismiss\", \"alert\");\n close.setAttribute(\"aria-label\", \"Close\");\n spa.setAttribute(\"aria-hidden\", \"true\");\n spa.innerHTML = \"&times;\";\n close.appendChild(spa); \n alert.setAttribute(\"class\", \"alert alert-warning\");\n alert.setAttribute(\"role\", \"alert\");\n alert.innerHTML = msj;\n alert.appendChild(close); \n}", "function showAlert(){\nalert(\"Task 01 Completed\");\n}", "alertSuccess(message, autoClose) {\n this.$root.alert.type = 'success';\n this.$root.alert.message = message;\n this.$root.alert.show = true;\n }", "function showAlert(sender, elMensaje){\n alert(elMensaje);\n}", "function showAlert() {\n alert = $mdDialog.alert({\n title: 'Attention',\n textContent: 'This is an example of how easy dialogs can be!',\n ok: 'Close'\n });\n\n $mdDialog\n .show(alert)\n .finally(function () {\n alert = undefined;\n });\n }", "testAlert() {\n sweetalert2__WEBPACK_IMPORTED_MODULE_13___default.a.fire({\n icon: 'warning',\n title: 'Sin Datos de RMUV',\n text: 'Al parecer no existen datos de la Remuneracion Unificada Vigente, por favor, Ingresarlos antes de continuar',\n // footer: `<a [routerLink]=\"['/inicio']\" target=\"blank\">Ingresar Ahora!!<a>`\n footer: '<a href=\"/\" target=\"blank\">Ingresar Ahora!!<a>',\n showConfirmButton: true,\n timer: null,\n backdrop: null,\n position: 'top-end',\n grow: 'row',\n toast: true\n });\n }", "function printAlert(event){\n alert('NO!! Save the trees!')\n}", "function customAlert(title, content) {\n $.alert({\n title: title,\n content: content,\n theme: 'black',\n animation: 'left',\n closeAnimation: 'right',\n icon: 'fa fa-warning',\n keyboardEnabled: true,\n confirm: function() {\n // $.alert('Confirmed!'); // shorthand.\n }\n });\n\n}", "function toastAlert(msg) {\n var toastMsg = document.getElementById(\"popupToastMsg\");\n toastMsg.innerHTML = msg;\n tau.openPopup('#popupToast');\n console.log(msg);\n}", "function msgPerdeu() {\n swal({\n title: \"Perdeste!\",\n type: \"error\",\n timer: 3000,\n showConfirmButton: false\n });\n bloqueioBoneco();\n }", "function alert(msg) {\n if (!ariaContainer) {\n return;\n }\n // Use alternate containers such that duplicated messages get read out by screen readers #99466\n if (alertContainer.textContent !== msg) {\n dom.clearNode(alertContainer2);\n insertMessage(alertContainer, msg);\n }\n else {\n dom.clearNode(alertContainer);\n insertMessage(alertContainer2, msg);\n }\n }", "function bootBoxAlert(message)\n{\n\tbootbox.alert(message, function() {});\n}", "function alert(msg) {\n Components.classes[\"@mozilla.org/embedcomp/prompt-service;1\"]\n .getService(Components.interfaces.nsIPromptService)\n .alert(null, \"Webmonkey alert\", msg);\n}", "function JSalert() {\n getScore();\n swal({\n title: title,\n text: `Your Score is: ${score}, Moves: ${moves.innerText}, Time: ${timer.innerText}`,\n icon: winStars,\n buttons: [\"No thank you!\", \"Play again!\"],\n })\n .then((isConfirm) => {\n if (isConfirm) {\n restartGame();\n } else {\n swal(\"Good By!\");\n }\n });\n}", "function showMsg() {\n\tokButton.textContent = 'OK';\n\talertPre.textContent = demo_msgs;\n\talertArea.style.display = 'block';\n}", "function alerta(inform)\n{\n alert (inform);\n}", "function alertbox() {\n window.alert(\"Due to Covid-19 Restrictions, we only do deliveries within Nairobi at a fixed charge of 200Kshs.\");\n}", "alert(title, message, positiveText, cancelableFlag){\n alert(title, message,[{text: positiveText, onPress: () => console.log('Possitive Pressed')},], cancelableFlag); \n }", "confirmationAlert(title, message, positiveText, negativeText, positiveOnPress, negativeOnPress, cancelableFlag){\n Alert.alert(\n title,\n message,\n [\n {text: negativeText, onPress: negativeOnPress, style: 'cancel',},\n {text: positiveText, onPress: positiveOnPress, style : 'default'},\n ],\n {cancelable: cancelableFlag},\n ); \n }", "function openAlert() {\n alert(\"Hello World\");\n}", "function showBasicMessage() {\n swal(\"Here's a message!\");\n}", "function showAlert() {\n navigator.notification.alert(\n 'Time to Rehearse!', // message\n alertDismissed, // callback\n 'Rehearse', // title\n 'Got it' // buttonName\n \t);\n}", "function showSuccessAlert(ev) {\n customSetting.color = '#000000';\n customSetting.bgColor = '#90ee90';\n customAlert('This operation was successful!', customSetting);\n}", "function resAlert(){\n alert('Reservation Confirmed');\n}", "function alerta(msg, type){\n\tvar color = \"white\";\n\tvar title = \"Alerta\";\n\tvar icon = \"&#xE88F;\";\n\tswitch(type) {\n\t\tcase \"error\":\n\t\t\ticon = \"&#xE888;\";\n\t\t\tcolor = \"red\";\n\t\t\ttitle = \"Error\";\n\t\t\tbreak;\n\t\tcase \"warning\":\n\t\t\ticon = \"&#xE002;\";\n\t\t\tcolor = \"amber darken-1\";\n\t\t\ttitle = \"Precaución\";\n\t\t\tbreak;\n\t\tcase \"info\":\n\t\t\ticon = \"&#xE88F;\";\n\t\t\tcolor = \"light-blue\";\n\t\t\ttitle = \"Información\";\n\t\t\tbreak;\n\t\tcase \"done\":\n\t\t\ticon = \"&#xE876;\";\n\t\t\tcolor = \"green darken-1\";\n\t\t\ttitle = \"Correcto\";\n\t\t\tbreak;\n\t} \n\t\n\tvar dialog = \"\";\n\tdialog += \"\t\t\t<div class='row'>\";\n\tdialog += \"\t\t\t\t<div class='col s4 center-align \"+color+\"'>\";\n\tdialog += \"\t\t\t\t\t<i class='medium material-icons'>\"+icon+\"</i>\";\n\tdialog += \"\t\t\t\t</div>\";\n\tdialog += \"\t\t\t\t<div class='col s8 black-text'>\";\n\tdialog +=\t\t\t\t\t\"<b>\"+title+\":</b><br>\"+msg;\n\tdialog += \"\t\t\t\t\t<i class='fa fa-window-close' aria-hidden='true'></i>\";\n\tdialog += \"\t\t\t\t</div>\";\n\tdialog += \"\t\t\t</div>\";\n\tMaterialize.toast(dialog, DELAY_MESSAGE);\n}", "function showAlert() {\n alert(\"Thank you for buying mobile from us\")\n}", "function finalAlert(){\n\talert(\"Refresh to play again!\");\n}", "function AlertHandler(message)\n {\n alert(message);\n }", "function alertBox() {\n alert('Hi, How are you...')\n}", "function MsgDisplay(message)\n\t {\n\t\t if(showAlert) {\n\t\t\t alert(message);\n\t\t }\n\t }", "function alertbox(message) {\n let content = element.html(message);\n element.addClass(\"alert\");\n element.append(content);\n $(body).append(element);\n }", "function showAlert() {\n navigator.notification.alert(\n 'AVF-1207', // message\n alertDismissed, // callback\n 'Carol Gaylor', // title\n 'Done' // buttonName\n );\n}", "function alertThem() {\n\talert(\"Hello.\");\n}", "function wgm_alert(msg, status) {\n\t$('body').append(alert_html);\n\tdiv = '.wg_alert';\n\t$(div).find('.wg_alert-msg').addClass(status);\n\t$(div).find('.wg_alert-msg').html(msg);\n\t$(div).modal('show');\n\t$(div).on('hidden', function () {\n\t\t$(div).remove();\n });\n}", "function printSuccess($alert,$id_name){\n\t$(\".alert-area\").append(\"<div class=\\\"alert alert-success\\\" role=\\\"alert\\\">\"+$id_name+\" \"+$alert+\"</div>\");\n}", "function alertDismissed() {\n // do something\n }", "function alertUser() {\n resetOutput();\n let alertDialog = document.getElementById(\"alertCustomDialog\");\n alertDialog.showModal();\n\n}", "function showNoticeLoc() {\n return alert({\n text: 'Нет доступа к местоположению',\n animateSpeed: 'fast',\n delay: 3000,\n });\n}", "function showSuccessAlert(message) {\r\n $.pnotify({\r\n type: 'success',\r\n text: message,\r\n opacity: 0.9\r\n });\r\n}", "function printAlert($alert,$id_name){\n\t$(\".alert-area\").append(\"<div class=\\\"alert alert-warning\\\" role=\\\"alert\\\">\"+$id_name+\" \"+$alert+\"</div>\");\n}", "function popupSuccess(title, mensagem) {\n swal(title, mensagem, 'success');\n}", "function showAlert() {\n navigator.notification.alert(\n 'here is my message!', // message\n alertDismissed, // callback\n 'This is the title!', // title\n 'Done' // buttonName \n );\n}", "function successMessage(){\n window.alert(\"Success: Deadline Sent to Deadline Dashboard\");\n}", "function alert(message, title) {\n if (!title) {\n title = '系统提示'\n }\n return Dialog.create({\n title: title,\n message: message,\n ok: '确认',\n persistent: true\n })\n}", "function popUp(){\n\talert(\"You now know how to cook an egg\");\n}", "function alertUser (name) {\n\treturn alert (name);\n}", "function alertUser (name) {\n\treturn alert (name);\n}", "function displaySuccessMsg(msg) {\n\t\t \tswal({\n\t\t \t\t title: \"The action was successfully completed\",\n\t\t \t\t text: msg,\n\t\t \t\t timer: 5000,\n\t\t \t\t type: \"success\",\n\t\t \t\t showConfirmButton: false\n\t\t \t});\n\t\t }", "function alerting(){\n alert('ERROR: Please overwrite existing text before saving!');\n location.reload();\n }", "function AlertSuccess(msg) {\n $(\"#alertSuccess\").css('display', 'block');\n var success = \"<div class='alert alert-success'><button type='button' class='close' data-dismiss='alert'>&times;</button><span>\" + msg + \"</span></div>\";\n $(\"#alertSuccess\").html(success);\n}", "function mostrarMensaje(){\n alert(\"Operacion Exitosa\");\n }", "function notify(newAlert){\n\t\t// change the alert message\n\t\tdocument.getElementById(\"alert-content\").innerHTML = newAlert;\n\t\t// alert animations\n\t\tvar box = document.getElementById(\"alert-wrapper\");\n\t\tbox.className = \"visible\";\n\t\tsetTimeout(function(){ box.className = \"hidden\" }, 2500);\n\t}", "function _alert( msg, func, title, btn ) {\n\talert(msg);\n\n\tif ( typeof func == 'function' ) {\n\t\tfunc();\n\t};\n\n\t// Read more for device notification:\n\t// http://docs.phonegap.com/en/1.1.0/phonegap_notification_notification.md.html#notification.alert\n}" ]
[ "0.7618101", "0.761467", "0.74540824", "0.74189574", "0.7416071", "0.73532", "0.7340212", "0.7285451", "0.72660005", "0.72528607", "0.7215831", "0.721515", "0.7211929", "0.71961856", "0.71933305", "0.71932834", "0.71454805", "0.7128469", "0.71102375", "0.71069205", "0.71026045", "0.7100347", "0.70987", "0.7094953", "0.7086202", "0.7067516", "0.70412093", "0.70173424", "0.70158243", "0.70110875", "0.7008575", "0.70020086", "0.70019984", "0.7000978", "0.70007026", "0.6999662", "0.6991905", "0.699152", "0.6987769", "0.6986965", "0.69865334", "0.6985695", "0.69838923", "0.6970328", "0.6966529", "0.695376", "0.6951871", "0.6927239", "0.692651", "0.6925252", "0.69204664", "0.69032216", "0.68986076", "0.68983936", "0.68972194", "0.6879527", "0.6879386", "0.68696606", "0.6854194", "0.68521583", "0.68469894", "0.6831039", "0.6829213", "0.6819463", "0.6810009", "0.6805055", "0.6804377", "0.6802236", "0.67987144", "0.6798104", "0.6788093", "0.6787472", "0.6781259", "0.6778459", "0.67757285", "0.67746735", "0.67692703", "0.6768464", "0.67676413", "0.67603713", "0.6751955", "0.6751955", "0.67506784", "0.67454535", "0.67418927", "0.67372096", "0.67303634", "0.6727522", "0.67230606", "0.6722071", "0.6721373", "0.6721052", "0.67177284", "0.67092925", "0.67092925", "0.670866", "0.6708063", "0.67052853", "0.6703388", "0.67031586", "0.6698943" ]
0.0
-1